designix-uis 0.5.35 → 0.5.37
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/designix-uis.js +7 -7
- package/dist/public/_app/immutable/assets/3.Dk97tpeU.css +1 -0
- package/dist/public/_app/immutable/assets/_page.Dk97tpeU.css +1 -0
- package/dist/public/_app/immutable/chunks/disclose-version.BhJaPCe6.js +1 -0
- package/dist/public/_app/immutable/chunks/entry.BOPLbfqM.js +3 -0
- package/dist/public/_app/immutable/chunks/index-client.BOL5qd8o.js +1 -0
- package/dist/public/_app/immutable/chunks/index.Zd1pjIe_.js +216 -0
- package/dist/public/_app/immutable/chunks/legacy.CatByI85.js +1 -0
- package/dist/public/_app/immutable/chunks/{makeList.fOLEx6eN.js → makeList.9UufwhFd.js} +1 -1
- package/dist/public/_app/immutable/chunks/paths.Dxjvtojq.js +1 -0
- package/dist/public/_app/immutable/chunks/runtime.DszaluMK.js +1 -0
- package/dist/public/_app/immutable/chunks/snippet.Dyz5snsn.js +1 -0
- package/dist/public/_app/immutable/chunks/store.BRUYvPrV.js +1 -0
- package/dist/public/_app/immutable/chunks/stores.D82DeJyw.js +1 -0
- package/dist/public/_app/immutable/entry/app.AtOxma3-.js +2 -0
- package/dist/public/_app/immutable/entry/start.D3m-RfHI.js +1 -0
- package/dist/public/_app/immutable/nodes/0.DannA4GN.js +2 -0
- package/dist/public/_app/immutable/nodes/1.B0-aIHPM.js +1 -0
- package/dist/public/_app/immutable/nodes/2.GeWVa4XV.js +1 -0
- package/dist/public/_app/immutable/nodes/3.CE8L2BIi.js +7 -0
- package/dist/public/_app/version.json +1 -1
- package/dist/public/gear/gear_bar.html +23 -22
- package/dist/public/gear/gear_epicycloid.html +23 -22
- package/dist/public/gear/gear_ring.html +23 -22
- package/dist/public/gear/gear_wheel.html +23 -22
- package/dist/public/heliostat/base.html +23 -22
- package/dist/public/heliostat/haxis_guidance.html +23 -22
- package/dist/public/heliostat/heliostat.html +23 -22
- package/dist/public/heliostat/heliostat_2.html +23 -22
- package/dist/public/heliostat/pole_static.html +23 -22
- package/dist/public/heliostat/rake.html +23 -22
- package/dist/public/heliostat/rake_stopper.html +23 -22
- package/dist/public/heliostat/ring.html +23 -22
- package/dist/public/heliostat/ring_guidance.html +23 -22
- package/dist/public/heliostat/rod.html +23 -22
- package/dist/public/heliostat/spider.html +23 -22
- package/dist/public/heliostat/surface.html +23 -22
- package/dist/public/heliostat/swing.html +23 -22
- package/dist/public/heliostat/trapeze.html +23 -22
- package/dist/public/heliostat/vaxis.html +23 -22
- package/dist/public/heliostat/vaxis_guidance.html +23 -22
- package/dist/public/heliostat/vaxis_holder.html +23 -22
- package/dist/public/index.html +21 -20
- package/package.json +7 -7
- package/dist/public/_app/immutable/assets/3.C7hmPFkZ.css +0 -1
- package/dist/public/_app/immutable/assets/_page.C7hmPFkZ.css +0 -1
- package/dist/public/_app/immutable/chunks/disclose-version.DkikEV2B.js +0 -1
- package/dist/public/_app/immutable/chunks/entry.D40EjI52.js +0 -3
- package/dist/public/_app/immutable/chunks/index-client.C7pJvqfN.js +0 -1
- package/dist/public/_app/immutable/chunks/index.sJjTKvaS.js +0 -216
- package/dist/public/_app/immutable/chunks/lifecycle.CQ2Qb9R_.js +0 -1
- package/dist/public/_app/immutable/chunks/paths.xeXTqdFV.js +0 -1
- package/dist/public/_app/immutable/chunks/runtime.Xz9lwreE.js +0 -1
- package/dist/public/_app/immutable/chunks/slot.CUYYDJeJ.js +0 -1
- package/dist/public/_app/immutable/chunks/stores.BtqS84x2.js +0 -1
- package/dist/public/_app/immutable/entry/app.bFVvx2bH.js +0 -2
- package/dist/public/_app/immutable/entry/start.BsvUjVvn.js +0 -1
- package/dist/public/_app/immutable/nodes/0.D_rctyGM.js +0 -2
- package/dist/public/_app/immutable/nodes/1.hFsChVXV.js +0 -1
- package/dist/public/_app/immutable/nodes/2.D0tWU3xO.js +0 -1
- package/dist/public/_app/immutable/nodes/3.D2G_vuK3.js +0 -9
- /package/dist/public/_app/immutable/assets/{0.CYMnRzgN.css → 0.D3ep0F2Z.css} +0 -0
- /package/dist/public/_app/immutable/assets/{2.CTp7BhB8.css → 2.BTCojHq8.css} +0 -0
- /package/dist/public/_app/immutable/assets/{_layout.CYMnRzgN.css → _layout.D3ep0F2Z.css} +0 -0
- /package/dist/public/_app/immutable/assets/{_page.CTp7BhB8.css → _page.BTCojHq8.css} +0 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
var Ja=Object.defineProperty;var za=(e,n,t)=>n in e?Ja(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var I=(e,n,t)=>za(e,typeof n!="symbol"?n+"":n,t);import{ag as Qa,b as eo,as as Ci,h as mt,Q as ur,N as to,K as no,aq as Ei,O as ro,P as us,R as cr,g as nn,at as In,L as Fi,d as Si,M as so,W as io,H as cs,au as Gr,av as ls,aw as Hr,ax as ao,ad as oo,ay as uo,e as co,ac as lo,an as fo,af as po,az as ho,y as mo,D as fs,aA as xo,al as Do,aB as go,J as ds,aC as wo,aD as yo}from"./runtime.DszaluMK.js";import{d as bo}from"./disclose-version.BhJaPCe6.js";function jl(e,n){return n}function _o(e,n,t,r){for(var s=[],i=n.length,a=0;a<i;a++)ao(n[a].e,s,!0);var o=i>0&&s.length===0&&t!==null;if(o){var u=t.parentNode;oo(u),u.append(t),r.clear(),Ft(e,n[0].prev,n[i-1].next)}uo(s,()=>{for(var l=0;l<i;l++){var c=n[l];o||(r.delete(c.k),Ft(e,c.prev,c.next)),co(c.e,!o)}})}function Vl(e,n,t,r,s,i=null){var a=e,o={flags:n,items:new Map,first:null},u=(n&Ci)!==0;if(u){var l=e;a=mt?ur(lo(l)):l.appendChild(Qa())}mt&&to();var c=null,h=!1;eo(()=>{var m=t(),x=no(m)?m:m==null?[]:Ei(m),y=x.length;if(h&&y===0)return;h=y===0;let f=!1;if(mt){var d=a.data===ro;d!==(y===0)&&(a=us(),ur(a),cr(!1),f=!0)}if(mt){for(var p=null,D,g=0;g<y;g++){if(nn.nodeType===8&&nn.data===fo){a=nn,f=!0,cr(!1);break}var _=x[g],w=r(_,g);D=ki(nn,o,p,null,_,w,g,s,n),o.items.set(w,D),p=D}y>0&&ur(us())}if(!mt){var b=po;vo(x,o,a,s,n,(b.f&In)!==0,r)}i!==null&&(y===0?c?Fi(c):c=Si(()=>i(a)):c!==null&&so(c,()=>{c=null})),f&&cr(!0),t()}),mt&&(a=nn)}function vo(e,n,t,r,s,i,a){var j,R,M,U;var o=(s&ho)!==0,u=(s&(Gr|Hr))!==0,l=e.length,c=n.items,h=n.first,m=h,x,y=null,f,d=[],p=[],D,g,_,w;if(o)for(w=0;w<l;w+=1)D=e[w],g=a(D,w),_=c.get(g),_!==void 0&&((j=_.a)==null||j.measure(),(f??(f=new Set)).add(_));for(w=0;w<l;w+=1){if(D=e[w],g=a(D,w),_=c.get(g),_===void 0){var b=m?m.e.nodes_start:t;y=ki(b,n,y,y===null?n.first:y.next,D,g,w,r,s),c.set(g,y),d=[],p=[],m=y.next;continue}if(u&&Ao(_,D,w,s),_.e.f&In&&(Fi(_.e),o&&((R=_.a)==null||R.unfix(),(f??(f=new Set)).delete(_))),_!==m){if(x!==void 0&&x.has(_)){if(d.length<p.length){var A=p[0],v;y=A.prev;var E=d[0],k=d[d.length-1];for(v=0;v<d.length;v+=1)ps(d[v],A,t);for(v=0;v<p.length;v+=1)x.delete(p[v]);Ft(n,E.prev,k.next),Ft(n,y,E),Ft(n,k,A),m=A,y=k,w-=1,d=[],p=[]}else x.delete(_),ps(_,m,t),Ft(n,_.prev,_.next),Ft(n,_,y===null?n.first:y.next),Ft(n,y,_),y=_;continue}for(d=[],p=[];m!==null&&m.k!==g;)(i||!(m.e.f&In))&&(x??(x=new Set)).add(m),p.push(m),m=m.next;if(m===null)continue;_=m}d.push(_),y=_,m=_.next}if(m!==null||x!==void 0){for(var F=x===void 0?[]:Ei(x);m!==null;)(i||!(m.e.f&In))&&F.push(m),m=m.next;var L=F.length;if(L>0){var $=s&Ci&&l===0?t:null;if(o){for(w=0;w<L;w+=1)(M=F[w].a)==null||M.measure();for(w=0;w<L;w+=1)(U=F[w].a)==null||U.fix()}_o(n,F,$,c)}}o&&io(()=>{var O;if(f!==void 0)for(_ of f)(O=_.a)==null||O.apply()}),cs.first=n.first&&n.first.e,cs.last=y&&y.e}function Ao(e,n,t,r){r&Gr&&ls(e.v,n),r&Hr?ls(e.i,t):e.i=t}function ki(e,n,t,r,s,i,a,o,u){var l=(u&Gr)!==0,c=(u&xo)===0,h=l?c?mo(s):fs(s):s,m=u&Hr?fs(a):a,x={i:m,v:h,k:i,a:null,e:null,prev:t,next:r};try{return x.e=Si(()=>o(e,h,m),mt),x.e.prev=t&&t.e,x.e.next=r&&r.e,t===null?n.first=x:(t.next=x,t.e.next=x.e),r!==null&&(r.prev=x,r.e.prev=x.e),x}finally{}}function ps(e,n,t){for(var r=e.next?e.next.e.nodes_start:t,s=n?n.e.nodes_start:t,i=e.e.nodes_start;i!==r;){var a=Do(i);s.before(i),i=a}}function Ft(e,n,t){n===null?e.first=t:(n.next=t,n.e.next=t&&t.e),t!==null&&(t.prev=n,t.e.prev=n&&n.e)}function Ul(e){if(mt){var n=!1,t=()=>{if(!n){if(n=!0,e.hasAttribute("value")){var r=e.value;hs(e,"value",null),e.value=r}if(e.hasAttribute("checked")){var s=e.checked;hs(e,"checked",null),e.checked=s}}};e.__on_r=t,yo(t),bo()}}function ql(e,n){var t=e.__attributes??(e.__attributes={});t.value===(t.value=n)||e.value===n&&(n!==0||e.nodeName!=="PROGRESS")||(e.value=n)}function Gl(e,n){var t=e.__attributes??(e.__attributes={});t.checked!==(t.checked=n)&&(e.checked=n)}function hs(e,n,t,r){var s=e.__attributes??(e.__attributes={});mt&&(s[n]=e.getAttribute(n),n==="src"||n==="srcset"||n==="href"&&e.nodeName==="LINK")||s[n]!==(s[n]=t)&&(n==="style"&&"__styles"in e&&(e.__styles={}),n==="loading"&&(e[go]=t),t==null?e.removeAttribute(n):typeof t!="string"&&Co(e).includes(n)?e[n]=t:e.setAttribute(n,t))}var ms=new Map;function Co(e){var n=ms.get(e.nodeName);if(n)return n;ms.set(e.nodeName,n=[]);for(var t,r=ds(e),s=Element.prototype;s!==r;){t=wo(r);for(var i in t)t[i].set&&n.push(i);r=ds(r)}return n}const dn=15,Fr=30,Sr=19,Eo=29,jn=256,Zr=jn+1+Eo,xs=2*Zr+1,rn=256,Fo=7,Ds=16,gs=17,ws=18,lr=8*2,Vn=-1,So=1,_n=2,ko=0,Wt=0,ys=1,To=3,ke=4,Je=0,Ti=1,vn=2,ze=-2,Po=-3,Zt=-5;function Xn(e){return Kn(e.map(([n,t])=>new Array(n).fill(t,0,n)))}function Kn(e){return e.reduce((n,t)=>n.concat(Array.isArray(t)?Kn(t):t),[])}const bs=[0,1,2,3].concat(...Xn([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function ie(){const e=this;function n(s){const i=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,l=e.stat_desc.max_length;let c,h,m,x,y,f,d=0;for(x=0;x<=dn;x++)s.bl_count[x]=0;for(i[s.heap[s.heap_max]*2+1]=0,c=s.heap_max+1;c<xs;c++)h=s.heap[c],x=i[i[h*2+1]*2+1]+1,x>l&&(x=l,d++),i[h*2+1]=x,!(h>e.max_code)&&(s.bl_count[x]++,y=0,h>=u&&(y=o[h-u]),f=i[h*2],s.opt_len+=f*(x+y),a&&(s.static_len+=f*(a[h*2+1]+y)));if(d!==0){do{for(x=l-1;s.bl_count[x]===0;)x--;s.bl_count[x]--,s.bl_count[x+1]+=2,s.bl_count[l]--,d-=2}while(d>0);for(x=l;x!==0;x--)for(h=s.bl_count[x];h!==0;)m=s.heap[--c],!(m>e.max_code)&&(i[m*2+1]!=x&&(s.opt_len+=(x-i[m*2+1])*i[m*2],i[m*2+1]=x),h--)}}function t(s,i){let a=0;do a|=s&1,s>>>=1,a<<=1;while(--i>0);return a>>>1}function r(s,i,a){const o=[];let u=0,l,c,h;for(l=1;l<=dn;l++)o[l]=u=u+a[l-1]<<1;for(c=0;c<=i;c++)h=s[c*2+1],h!==0&&(s[c*2]=t(o[h]++,h))}e.build_tree=function(s){const i=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.elems;let u,l,c=-1,h;for(s.heap_len=0,s.heap_max=xs,u=0;u<o;u++)i[u*2]!==0?(s.heap[++s.heap_len]=c=u,s.depth[u]=0):i[u*2+1]=0;for(;s.heap_len<2;)h=s.heap[++s.heap_len]=c<2?++c:0,i[h*2]=1,s.depth[h]=0,s.opt_len--,a&&(s.static_len-=a[h*2+1]);for(e.max_code=c,u=Math.floor(s.heap_len/2);u>=1;u--)s.pqdownheap(i,u);h=o;do u=s.heap[1],s.heap[1]=s.heap[s.heap_len--],s.pqdownheap(i,1),l=s.heap[1],s.heap[--s.heap_max]=u,s.heap[--s.heap_max]=l,i[h*2]=i[u*2]+i[l*2],s.depth[h]=Math.max(s.depth[u],s.depth[l])+1,i[u*2+1]=i[l*2+1]=h,s.heap[1]=h++,s.pqdownheap(i,1);while(s.heap_len>=2);s.heap[--s.heap_max]=s.heap[1],n(s),r(i,e.max_code,s.bl_count)}}ie._length_code=[0,1,2,3,4,5,6,7].concat(...Xn([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));ie.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];ie.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];ie.d_code=function(e){return e<256?bs[e]:bs[256+(e>>>7)]};ie.extra_lbits=[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];ie.extra_dbits=[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];ie.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];ie.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function _e(e,n,t,r,s){const i=this;i.static_tree=e,i.extra_bits=n,i.extra_base=t,i.elems=r,i.max_length=s}const Bo=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],Mo=Xn([[144,8],[112,9],[24,7],[8,8]]);_e.static_ltree=Kn(Bo.map((e,n)=>[e,Mo[n]]));const Io=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],$o=Xn([[30,5]]);_e.static_dtree=Kn(Io.map((e,n)=>[e,$o[n]]));_e.static_l_desc=new _e(_e.static_ltree,ie.extra_lbits,jn+1,Zr,dn);_e.static_d_desc=new _e(_e.static_dtree,ie.extra_dbits,0,Fr,dn);_e.static_bl_desc=new _e(null,ie.extra_blbits,0,Sr,Fo);const Lo=9,No=8;function it(e,n,t,r,s){const i=this;i.good_length=e,i.max_lazy=n,i.nice_length=t,i.max_chain=r,i.func=s}const Pi=0,$n=1,Rt=2,Xe=[new it(0,0,0,0,Pi),new it(4,4,8,4,$n),new it(4,5,16,8,$n),new it(4,6,32,32,$n),new it(4,4,16,16,Rt),new it(8,16,32,32,Rt),new it(8,16,128,128,Rt),new it(8,32,128,256,Rt),new it(32,128,258,1024,Rt),new it(32,258,258,4096,Rt)],An=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],je=0,Cn=1,sn=2,En=3,Ro=32,fr=42,Fn=113,an=666,dr=8,Oo=0,pr=1,jo=2,ce=3,Ln=258,Le=Ln+ce+1;function _s(e,n,t,r){const s=e[n*2],i=e[t*2];return s<i||s==i&&r[n]<=r[t]}function Vo(){const e=this;let n,t,r,s,i,a,o,u,l,c,h,m,x,y,f,d,p,D,g,_,w,b,A,v,E,k,F,L,$,j,R,M,U;const O=new ie,pe=new ie,V=new ie;e.depth=[];let fe,G,ee,He,ge,he;e.bl_count=[],e.heap=[],R=[],M=[],U=[];function yt(){l=2*i,h[x-1]=0;for(let C=0;C<x-1;C++)h[C]=0;k=Xe[F].max_lazy,$=Xe[F].good_length,j=Xe[F].nice_length,E=Xe[F].max_chain,w=0,p=0,A=0,D=v=ce-1,_=0,m=0}function dt(){let C;for(C=0;C<Zr;C++)R[C*2]=0;for(C=0;C<Fr;C++)M[C*2]=0;for(C=0;C<Sr;C++)U[C*2]=0;R[rn*2]=1,e.opt_len=e.static_len=0,G=ee=0}function bt(){O.dyn_tree=R,O.stat_desc=_e.static_l_desc,pe.dyn_tree=M,pe.stat_desc=_e.static_d_desc,V.dyn_tree=U,V.stat_desc=_e.static_bl_desc,ge=0,he=0,He=8,dt()}e.pqdownheap=function(C,P){const T=e.heap,B=T[P];let N=P<<1;for(;N<=e.heap_len&&(N<e.heap_len&&_s(C,T[N+1],T[N],e.depth)&&N++,!_s(C,B,T[N],e.depth));)T[P]=T[N],P=N,N<<=1;T[P]=B};function tt(C,P){let T=-1,B,N=C[0*2+1],q=0,J=7,Ae=4;N===0&&(J=138,Ae=3),C[(P+1)*2+1]=65535;for(let We=0;We<=P;We++)B=N,N=C[(We+1)*2+1],!(++q<J&&B==N)&&(q<Ae?U[B*2]+=q:B!==0?(B!=T&&U[B*2]++,U[Ds*2]++):q<=10?U[gs*2]++:U[ws*2]++,q=0,T=B,N===0?(J=138,Ae=3):B==N?(J=6,Ae=3):(J=7,Ae=4))}function It(){let C;for(tt(R,O.max_code),tt(M,pe.max_code),V.build_tree(e),C=Sr-1;C>=3&&U[ie.bl_order[C]*2+1]===0;C--);return e.opt_len+=3*(C+1)+5+5+4,C}function Ze(C){e.pending_buf[e.pending++]=C}function nt(C){Ze(C&255),Ze(C>>>8&255)}function Gt(C){Ze(C>>8&255),Ze(C&255&255)}function ue(C,P){let T;const B=P;he>lr-B?(T=C,ge|=T<<he&65535,nt(ge),ge=T>>>lr-he,he+=B-lr):(ge|=C<<he&65535,he+=B)}function we(C,P){const T=C*2;ue(P[T]&65535,P[T+1]&65535)}function pt(C,P){let T,B=-1,N,q=C[0*2+1],J=0,Ae=7,We=4;for(q===0&&(Ae=138,We=3),T=0;T<=P;T++)if(N=q,q=C[(T+1)*2+1],!(++J<Ae&&N==q)){if(J<We)do we(N,U);while(--J!==0);else N!==0?(N!=B&&(we(N,U),J--),we(Ds,U),ue(J-3,2)):J<=10?(we(gs,U),ue(J-3,3)):(we(ws,U),ue(J-11,7));J=0,B=N,q===0?(Ae=138,We=3):N==q?(Ae=6,We=3):(Ae=7,We=4)}}function Oe(C,P,T){let B;for(ue(C-257,5),ue(P-1,5),ue(T-4,4),B=0;B<T;B++)ue(U[ie.bl_order[B]*2+1],3);pt(R,C-1),pt(M,P-1)}function Se(){he==16?(nt(ge),ge=0,he=0):he>=8&&(Ze(ge&255),ge>>>=8,he-=8)}function rt(){ue(pr<<1,3),we(rn,_e.static_ltree),Se(),1+He+10-he<9&&(ue(pr<<1,3),we(rn,_e.static_ltree),Se()),He=7}function st(C,P){let T,B,N;if(e.dist_buf[G]=C,e.lc_buf[G]=P&255,G++,C===0?R[P*2]++:(ee++,C--,R[(ie._length_code[P]+jn+1)*2]++,M[ie.d_code(C)*2]++),!(G&8191)&&F>2){for(T=G*8,B=w-p,N=0;N<Fr;N++)T+=M[N*2]*(5+ie.extra_dbits[N]);if(T>>>=3,ee<Math.floor(G/2)&&T<Math.floor(B/2))return!0}return G==fe-1}function Ye(C,P){let T,B,N=0,q,J;if(G!==0)do T=e.dist_buf[N],B=e.lc_buf[N],N++,T===0?we(B,C):(q=ie._length_code[B],we(q+jn+1,C),J=ie.extra_lbits[q],J!==0&&(B-=ie.base_length[q],ue(B,J)),T--,q=ie.d_code(T),we(q,P),J=ie.extra_dbits[q],J!==0&&(T-=ie.base_dist[q],ue(T,J)));while(N<G);we(rn,C),He=C[rn*2+1]}function bn(){he>8?nt(ge):he>0&&Ze(ge&255),ge=0,he=0}function ir(C,P,T){bn(),He=8,nt(P),nt(~P),e.pending_buf.set(u.subarray(C,C+P),e.pending),e.pending+=P}function Ht(C,P,T){ue((Oo<<1)+(T?1:0),3),ir(C,P)}function Za(C,P,T){let B,N,q=0;F>0?(O.build_tree(e),pe.build_tree(e),q=It(),B=e.opt_len+3+7>>>3,N=e.static_len+3+7>>>3,N<=B&&(B=N)):B=N=P+5,P+4<=B&&C!=-1?Ht(C,P,T):N==B?(ue((pr<<1)+(T?1:0),3),Ye(_e.static_ltree,_e.static_dtree)):(ue((jo<<1)+(T?1:0),3),Oe(O.max_code+1,pe.max_code+1,q+1),Ye(R,M)),dt(),T&&bn()}function _t(C){Za(p>=0?p:-1,w-p,C),p=w,n.flush_pending()}function ar(){let C,P,T,B;do{if(B=l-A-w,B===0&&w===0&&A===0)B=i;else if(B==-1)B--;else if(w>=i+i-Le){u.set(u.subarray(i,i+i),0),b-=i,w-=i,p-=i,C=x,T=C;do P=h[--T]&65535,h[T]=P>=i?P-i:0;while(--C!==0);C=i,T=C;do P=c[--T]&65535,c[T]=P>=i?P-i:0;while(--C!==0);B+=i}if(n.avail_in===0)return;C=n.read_buf(u,w+A,B),A+=C,A>=ce&&(m=u[w]&255,m=(m<<d^u[w+1]&255)&f)}while(A<Le&&n.avail_in!==0)}function Ya(C){let P=65535,T;for(P>r-5&&(P=r-5);;){if(A<=1){if(ar(),A===0&&C==Wt)return je;if(A===0)break}if(w+=A,A=0,T=p+P,(w===0||w>=T)&&(A=w-T,w=T,_t(!1),n.avail_out===0)||w-p>=i-Le&&(_t(!1),n.avail_out===0))return je}return _t(C==ke),n.avail_out===0?C==ke?sn:je:C==ke?En:Cn}function is(C){let P=E,T=w,B,N,q=v;const J=w>i-Le?w-(i-Le):0;let Ae=j;const We=o,or=w+Ln;let as=u[T+q-1],os=u[T+q];v>=$&&(P>>=2),Ae>A&&(Ae=A);do if(B=C,!(u[B+q]!=os||u[B+q-1]!=as||u[B]!=u[T]||u[++B]!=u[T+1])){T+=2,B++;do;while(u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&T<or);if(N=Ln-(or-T),T=or-Ln,N>q){if(b=C,q=N,N>=Ae)break;as=u[T+q-1],os=u[T+q]}}while((C=c[C&We]&65535)>J&&--P!==0);return q<=A?q:A}function Wa(C){let P=0,T;for(;;){if(A<Le){if(ar(),A<Le&&C==Wt)return je;if(A===0)break}if(A>=ce&&(m=(m<<d^u[w+(ce-1)]&255)&f,P=h[m]&65535,c[w&o]=h[m],h[m]=w),P!==0&&(w-P&65535)<=i-Le&&L!=_n&&(D=is(P)),D>=ce)if(T=st(w-b,D-ce),A-=D,D<=k&&A>=ce){D--;do w++,m=(m<<d^u[w+(ce-1)]&255)&f,P=h[m]&65535,c[w&o]=h[m],h[m]=w;while(--D!==0);w++}else w+=D,D=0,m=u[w]&255,m=(m<<d^u[w+1]&255)&f;else T=st(0,u[w]&255),A--,w++;if(T&&(_t(!1),n.avail_out===0))return je}return _t(C==ke),n.avail_out===0?C==ke?sn:je:C==ke?En:Cn}function Xa(C){let P=0,T,B;for(;;){if(A<Le){if(ar(),A<Le&&C==Wt)return je;if(A===0)break}if(A>=ce&&(m=(m<<d^u[w+(ce-1)]&255)&f,P=h[m]&65535,c[w&o]=h[m],h[m]=w),v=D,g=b,D=ce-1,P!==0&&v<k&&(w-P&65535)<=i-Le&&(L!=_n&&(D=is(P)),D<=5&&(L==So||D==ce&&w-b>4096)&&(D=ce-1)),v>=ce&&D<=v){B=w+A-ce,T=st(w-1-g,v-ce),A-=v-1,v-=2;do++w<=B&&(m=(m<<d^u[w+(ce-1)]&255)&f,P=h[m]&65535,c[w&o]=h[m],h[m]=w);while(--v!==0);if(_=0,D=ce-1,w++,T&&(_t(!1),n.avail_out===0))return je}else if(_!==0){if(T=st(0,u[w-1]&255),T&&_t(!1),w++,A--,n.avail_out===0)return je}else _=1,w++,A--}return _!==0&&(T=st(0,u[w-1]&255),_=0),_t(C==ke),n.avail_out===0?C==ke?sn:je:C==ke?En:Cn}function Ka(C){return C.total_in=C.total_out=0,C.msg=null,e.pending=0,e.pending_out=0,t=Fn,s=Wt,bt(),yt(),Je}e.deflateInit=function(C,P,T,B,N,q){return B||(B=dr),N||(N=No),q||(q=ko),C.msg=null,P==Vn&&(P=6),N<1||N>Lo||B!=dr||T<9||T>15||P<0||P>9||q<0||q>_n?ze:(C.dstate=e,a=T,i=1<<a,o=i-1,y=N+7,x=1<<y,f=x-1,d=Math.floor((y+ce-1)/ce),u=new Uint8Array(i*2),c=[],h=[],fe=1<<N+6,e.pending_buf=new Uint8Array(fe*4),r=fe*4,e.dist_buf=new Uint16Array(fe),e.lc_buf=new Uint8Array(fe),F=P,L=q,Ka(C))},e.deflateEnd=function(){return t!=fr&&t!=Fn&&t!=an?ze:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,h=null,c=null,u=null,e.dstate=null,t==Fn?Po:Je)},e.deflateParams=function(C,P,T){let B=Je;return P==Vn&&(P=6),P<0||P>9||T<0||T>_n?ze:(Xe[F].func!=Xe[P].func&&C.total_in!==0&&(B=C.deflate(ys)),F!=P&&(F=P,k=Xe[F].max_lazy,$=Xe[F].good_length,j=Xe[F].nice_length,E=Xe[F].max_chain),L=T,B)},e.deflateSetDictionary=function(C,P,T){let B=T,N,q=0;if(!P||t!=fr)return ze;if(B<ce)return Je;for(B>i-Le&&(B=i-Le,q=T-B),u.set(P.subarray(q,q+B),0),w=B,p=B,m=u[0]&255,m=(m<<d^u[1]&255)&f,N=0;N<=B-ce;N++)m=(m<<d^u[N+(ce-1)]&255)&f,c[N&o]=h[m],h[m]=N;return Je},e.deflate=function(C,P){let T,B,N,q,J;if(P>ke||P<0)return ze;if(!C.next_out||!C.next_in&&C.avail_in!==0||t==an&&P!=ke)return C.msg=An[vn-ze],ze;if(C.avail_out===0)return C.msg=An[vn-Zt],Zt;if(n=C,q=s,s=P,t==fr&&(B=dr+(a-8<<4)<<8,N=(F-1&255)>>1,N>3&&(N=3),B|=N<<6,w!==0&&(B|=Ro),B+=31-B%31,t=Fn,Gt(B)),e.pending!==0){if(n.flush_pending(),n.avail_out===0)return s=-1,Je}else if(n.avail_in===0&&P<=q&&P!=ke)return n.msg=An[vn-Zt],Zt;if(t==an&&n.avail_in!==0)return C.msg=An[vn-Zt],Zt;if(n.avail_in!==0||A!==0||P!=Wt&&t!=an){switch(J=-1,Xe[F].func){case Pi:J=Ya(P);break;case $n:J=Wa(P);break;case Rt:J=Xa(P);break}if((J==sn||J==En)&&(t=an),J==je||J==sn)return n.avail_out===0&&(s=-1),Je;if(J==Cn){if(P==ys)rt();else if(Ht(0,0,!1),P==To)for(T=0;T<x;T++)h[T]=0;if(n.flush_pending(),n.avail_out===0)return s=-1,Je}}return P!=ke?Je:Ti}}function Bi(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}Bi.prototype={deflateInit(e,n){const t=this;return t.dstate=new Vo,n||(n=dn),t.dstate.deflateInit(t,e,n)},deflate(e){const n=this;return n.dstate?n.dstate.deflate(n,e):ze},deflateEnd(){const e=this;if(!e.dstate)return ze;const n=e.dstate.deflateEnd();return e.dstate=null,n},deflateParams(e,n){const t=this;return t.dstate?t.dstate.deflateParams(t,e,n):ze},deflateSetDictionary(e,n){const t=this;return t.dstate?t.dstate.deflateSetDictionary(t,e,n):ze},read_buf(e,n,t){const r=this;let s=r.avail_in;return s>t&&(s=t),s===0?0:(r.avail_in-=s,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),n),r.next_in_index+=s,r.total_in+=s,s)},flush_pending(){const e=this;let n=e.dstate.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+n),e.next_out_index),e.next_out_index+=n,e.dstate.pending_out+=n,e.total_out+=n,e.avail_out-=n,e.dstate.pending-=n,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Uo(e){const n=this,t=new Bi,r=qo(e&&e.chunkSize?e.chunkSize:64*1024),s=Wt,i=new Uint8Array(r);let a=e?e.level:Vn;typeof a>"u"&&(a=Vn),t.deflateInit(a),t.next_out=i,n.append=function(o,u){let l,c,h=0,m=0,x=0;const y=[];if(o.length){t.next_in_index=0,t.next_in=o,t.avail_in=o.length;do{if(t.next_out_index=0,t.avail_out=r,l=t.deflate(s),l!=Je)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==r?y.push(new Uint8Array(i)):y.push(i.subarray(0,t.next_out_index))),x+=t.next_out_index,u&&t.next_in_index>0&&t.next_in_index!=h&&(u(t.next_in_index),h=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return y.length>1?(c=new Uint8Array(x),y.forEach(function(f){c.set(f,m),m+=f.length})):c=y[0]?new Uint8Array(y[0]):new Uint8Array,c}},n.flush=function(){let o,u,l=0,c=0;const h=[];do{if(t.next_out_index=0,t.avail_out=r,o=t.deflate(ke),o!=Ti&&o!=Je)throw new Error("deflating: "+t.msg);r-t.avail_out>0&&h.push(i.slice(0,t.next_out_index)),c+=t.next_out_index}while(t.avail_in>0||t.avail_out===0);return t.deflateEnd(),u=new Uint8Array(c),h.forEach(function(m){u.set(m,l),l+=m.length}),u}}function qo(e){return e+5*(Math.floor(e/16383)+1)}const Go=15,Q=0,Dt=1,Ho=2,Pe=-2,ae=-3,vs=-4,gt=-5,Re=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Mi=1440,Zo=0,Yo=4,Wo=9,Xo=5,Ko=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Jo=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],zo=[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],Qo=[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,112,112],eu=[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],tu=[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],vt=15;function kr(){const e=this;let n,t,r,s,i,a;function o(l,c,h,m,x,y,f,d,p,D,g){let _,w,b,A,v,E,k,F,L,$,j,R,M,U,O;$=0,v=h;do r[l[c+$]]++,$++,v--;while(v!==0);if(r[0]==h)return f[0]=-1,d[0]=0,Q;for(F=d[0],E=1;E<=vt&&r[E]===0;E++);for(k=E,F<E&&(F=E),v=vt;v!==0&&r[v]===0;v--);for(b=v,F>v&&(F=v),d[0]=F,U=1<<E;E<v;E++,U<<=1)if((U-=r[E])<0)return ae;if((U-=r[v])<0)return ae;for(r[v]+=U,a[1]=E=0,$=1,M=2;--v!==0;)a[M]=E+=r[$],M++,$++;v=0,$=0;do(E=l[c+$])!==0&&(g[a[E]++]=v),$++;while(++v<h);for(h=a[b],a[0]=v=0,$=0,A=-1,R=-F,i[0]=0,j=0,O=0;k<=b;k++)for(_=r[k];_--!==0;){for(;k>R+F;){if(A++,R+=F,O=b-R,O=O>F?F:O,(w=1<<(E=k-R))>_+1&&(w-=_+1,M=k,E<O))for(;++E<O&&!((w<<=1)<=r[++M]);)w-=r[M];if(O=1<<E,D[0]+O>Mi)return ae;i[A]=j=D[0],D[0]+=O,A!==0?(a[A]=v,s[0]=E,s[1]=F,E=v>>>R-F,s[2]=j-i[A-1]-E,p.set(s,(i[A-1]+E)*3)):f[0]=j}for(s[1]=k-R,$>=h?s[0]=192:g[$]<m?(s[0]=g[$]<256?0:96,s[2]=g[$++]):(s[0]=y[g[$]-m]+16+64,s[2]=x[g[$++]-m]),w=1<<k-R,E=v>>>R;E<O;E+=w)p.set(s,(j+E)*3);for(E=1<<k-1;v&E;E>>>=1)v^=E;for(v^=E,L=(1<<R)-1;(v&L)!=a[A];)A--,R-=F,L=(1<<R)-1}return U!==0&&b!=1?gt:Q}function u(l){let c;for(n||(n=[],t=[],r=new Int32Array(vt+1),s=[],i=new Int32Array(vt),a=new Int32Array(vt+1)),t.length<l&&(t=[]),c=0;c<l;c++)t[c]=0;for(c=0;c<vt+1;c++)r[c]=0;for(c=0;c<3;c++)s[c]=0;i.set(r.subarray(0,vt),0),a.set(r.subarray(0,vt+1),0)}e.inflate_trees_bits=function(l,c,h,m,x){let y;return u(19),n[0]=0,y=o(l,0,19,19,null,null,h,c,m,n,t),y==ae?x.msg="oversubscribed dynamic bit lengths tree":(y==gt||c[0]===0)&&(x.msg="incomplete dynamic bit lengths tree",y=ae),y},e.inflate_trees_dynamic=function(l,c,h,m,x,y,f,d,p){let D;return u(288),n[0]=0,D=o(h,0,l,257,zo,Qo,y,m,d,n,t),D!=Q||m[0]===0?(D==ae?p.msg="oversubscribed literal/length tree":D!=vs&&(p.msg="incomplete literal/length tree",D=ae),D):(u(288),D=o(h,l,c,0,eu,tu,f,x,d,n,t),D!=Q||x[0]===0&&l>257?(D==ae?p.msg="oversubscribed distance tree":D==gt?(p.msg="incomplete distance tree",D=ae):D!=vs&&(p.msg="empty distance tree with lengths",D=ae),D):Q)}}kr.inflate_trees_fixed=function(e,n,t,r){return e[0]=Wo,n[0]=Xo,t[0]=Ko,r[0]=Jo,Q};const Sn=0,As=1,Cs=2,Es=3,Fs=4,Ss=5,ks=6,hr=7,Ts=8,kn=9;function nu(){const e=this;let n,t=0,r,s=0,i=0,a=0,o=0,u=0,l=0,c=0,h,m=0,x,y=0;function f(d,p,D,g,_,w,b,A){let v,E,k,F,L,$,j,R,M,U,O,pe,V,fe,G,ee;j=A.next_in_index,R=A.avail_in,L=b.bitb,$=b.bitk,M=b.write,U=M<b.read?b.read-M-1:b.end-M,O=Re[d],pe=Re[p];do{for(;$<20;)R--,L|=(A.read_byte(j++)&255)<<$,$+=8;if(v=L&O,E=D,k=g,ee=(k+v)*3,(F=E[ee])===0){L>>=E[ee+1],$-=E[ee+1],b.win[M++]=E[ee+2],U--;continue}do{if(L>>=E[ee+1],$-=E[ee+1],F&16){for(F&=15,V=E[ee+2]+(L&Re[F]),L>>=F,$-=F;$<15;)R--,L|=(A.read_byte(j++)&255)<<$,$+=8;v=L&pe,E=_,k=w,ee=(k+v)*3,F=E[ee];do if(L>>=E[ee+1],$-=E[ee+1],F&16){for(F&=15;$<F;)R--,L|=(A.read_byte(j++)&255)<<$,$+=8;if(fe=E[ee+2]+(L&Re[F]),L>>=F,$-=F,U-=V,M>=fe)G=M-fe,M-G>0&&2>M-G?(b.win[M++]=b.win[G++],b.win[M++]=b.win[G++],V-=2):(b.win.set(b.win.subarray(G,G+2),M),M+=2,G+=2,V-=2);else{G=M-fe;do G+=b.end;while(G<0);if(F=b.end-G,V>F){if(V-=F,M-G>0&&F>M-G)do b.win[M++]=b.win[G++];while(--F!==0);else b.win.set(b.win.subarray(G,G+F),M),M+=F,G+=F,F=0;G=0}}if(M-G>0&&V>M-G)do b.win[M++]=b.win[G++];while(--V!==0);else b.win.set(b.win.subarray(G,G+V),M),M+=V,G+=V,V=0;break}else if(!(F&64))v+=E[ee+2],v+=L&Re[F],ee=(k+v)*3,F=E[ee];else return A.msg="invalid distance code",V=A.avail_in-R,V=$>>3<V?$>>3:V,R+=V,j-=V,$-=V<<3,b.bitb=L,b.bitk=$,A.avail_in=R,A.total_in+=j-A.next_in_index,A.next_in_index=j,b.write=M,ae;while(!0);break}if(F&64)return F&32?(V=A.avail_in-R,V=$>>3<V?$>>3:V,R+=V,j-=V,$-=V<<3,b.bitb=L,b.bitk=$,A.avail_in=R,A.total_in+=j-A.next_in_index,A.next_in_index=j,b.write=M,Dt):(A.msg="invalid literal/length code",V=A.avail_in-R,V=$>>3<V?$>>3:V,R+=V,j-=V,$-=V<<3,b.bitb=L,b.bitk=$,A.avail_in=R,A.total_in+=j-A.next_in_index,A.next_in_index=j,b.write=M,ae);if(v+=E[ee+2],v+=L&Re[F],ee=(k+v)*3,(F=E[ee])===0){L>>=E[ee+1],$-=E[ee+1],b.win[M++]=E[ee+2],U--;break}}while(!0)}while(U>=258&&R>=10);return V=A.avail_in-R,V=$>>3<V?$>>3:V,R+=V,j-=V,$-=V<<3,b.bitb=L,b.bitk=$,A.avail_in=R,A.total_in+=j-A.next_in_index,A.next_in_index=j,b.write=M,Q}e.init=function(d,p,D,g,_,w){n=Sn,l=d,c=p,h=D,m=g,x=_,y=w,r=null},e.proc=function(d,p,D){let g,_,w,b=0,A=0,v=0,E,k,F,L;for(v=p.next_in_index,E=p.avail_in,b=d.bitb,A=d.bitk,k=d.write,F=k<d.read?d.read-k-1:d.end-k;;)switch(n){case Sn:if(F>=258&&E>=10&&(d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,D=f(l,c,h,m,x,y,d,p),v=p.next_in_index,E=p.avail_in,b=d.bitb,A=d.bitk,k=d.write,F=k<d.read?d.read-k-1:d.end-k,D!=Q)){n=D==Dt?hr:kn;break}i=l,r=h,s=m,n=As;case As:for(g=i;A<g;){if(E!==0)D=Q;else return d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(v++)&255)<<A,A+=8}if(_=(s+(b&Re[g]))*3,b>>>=r[_+1],A-=r[_+1],w=r[_],w===0){a=r[_+2],n=ks;break}if(w&16){o=w&15,t=r[_+2],n=Cs;break}if(!(w&64)){i=w,s=_/3+r[_+2];break}if(w&32){n=hr;break}return n=kn,p.msg="invalid literal/length code",D=ae,d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D);case Cs:for(g=o;A<g;){if(E!==0)D=Q;else return d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(v++)&255)<<A,A+=8}t+=b&Re[g],b>>=g,A-=g,i=c,r=x,s=y,n=Es;case Es:for(g=i;A<g;){if(E!==0)D=Q;else return d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(v++)&255)<<A,A+=8}if(_=(s+(b&Re[g]))*3,b>>=r[_+1],A-=r[_+1],w=r[_],w&16){o=w&15,u=r[_+2],n=Fs;break}if(!(w&64)){i=w,s=_/3+r[_+2];break}return n=kn,p.msg="invalid distance code",D=ae,d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D);case Fs:for(g=o;A<g;){if(E!==0)D=Q;else return d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(v++)&255)<<A,A+=8}u+=b&Re[g],b>>=g,A-=g,n=Ss;case Ss:for(L=k-u;L<0;)L+=d.end;for(;t!==0;){if(F===0&&(k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0&&(d.write=k,D=d.inflate_flush(p,D),k=d.write,F=k<d.read?d.read-k-1:d.end-k,k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0)))return d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D);d.win[k++]=d.win[L++],F--,L==d.end&&(L=0),t--}n=Sn;break;case ks:if(F===0&&(k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0&&(d.write=k,D=d.inflate_flush(p,D),k=d.write,F=k<d.read?d.read-k-1:d.end-k,k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0)))return d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D);D=Q,d.win[k++]=a,F--,n=Sn;break;case hr:if(A>7&&(A-=8,E++,v--),d.write=k,D=d.inflate_flush(p,D),k=d.write,F=k<d.read?d.read-k-1:d.end-k,d.read!=d.write)return d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D);n=Ts;case Ts:return D=Dt,d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D);case kn:return D=ae,d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D);default:return D=Pe,d.bitb=b,d.bitk=A,p.avail_in=E,p.total_in+=v-p.next_in_index,p.next_in_index=v,d.write=k,d.inflate_flush(p,D)}},e.free=function(){}}const Ps=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Yt=0,mr=1,Bs=2,Ms=3,Is=4,$s=5,Tn=6,Pn=7,Ls=8,$t=9;function ru(e,n){const t=this;let r=Yt,s=0,i=0,a=0,o;const u=[0],l=[0],c=new nu;let h=0,m=new Int32Array(Mi*3);const x=0,y=new kr;t.bitk=0,t.bitb=0,t.win=new Uint8Array(n),t.end=n,t.read=0,t.write=0,t.reset=function(f,d){d&&(d[0]=x),r==Tn&&c.free(f),r=Yt,t.bitk=0,t.bitb=0,t.read=t.write=0},t.reset(e,null),t.inflate_flush=function(f,d){let p,D,g;return D=f.next_out_index,g=t.read,p=(g<=t.write?t.write:t.end)-g,p>f.avail_out&&(p=f.avail_out),p!==0&&d==gt&&(d=Q),f.avail_out-=p,f.total_out+=p,f.next_out.set(t.win.subarray(g,g+p),D),D+=p,g+=p,g==t.end&&(g=0,t.write==t.end&&(t.write=0),p=t.write-g,p>f.avail_out&&(p=f.avail_out),p!==0&&d==gt&&(d=Q),f.avail_out-=p,f.total_out+=p,f.next_out.set(t.win.subarray(g,g+p),D),D+=p,g+=p),f.next_out_index=D,t.read=g,d},t.proc=function(f,d){let p,D,g,_,w,b,A,v;for(_=f.next_in_index,w=f.avail_in,D=t.bitb,g=t.bitk,b=t.write,A=b<t.read?t.read-b-1:t.end-b;;){let E,k,F,L,$,j,R,M;switch(r){case Yt:for(;g<3;){if(w!==0)d=Q;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}switch(p=D&7,h=p&1,p>>>1){case 0:D>>>=3,g-=3,p=g&7,D>>>=p,g-=p,r=mr;break;case 1:E=[],k=[],F=[[]],L=[[]],kr.inflate_trees_fixed(E,k,F,L),c.init(E[0],k[0],F[0],0,L[0],0),D>>>=3,g-=3,r=Tn;break;case 2:D>>>=3,g-=3,r=Ms;break;case 3:return D>>>=3,g-=3,r=$t,f.msg="invalid block type",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d)}break;case mr:for(;g<32;){if(w!==0)d=Q;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if((~D>>>16&65535)!=(D&65535))return r=$t,f.msg="invalid stored block lengths",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);s=D&65535,D=g=0,r=s!==0?Bs:h!==0?Pn:Yt;break;case Bs:if(w===0||A===0&&(b==t.end&&t.read!==0&&(b=0,A=b<t.read?t.read-b-1:t.end-b),A===0&&(t.write=b,d=t.inflate_flush(f,d),b=t.write,A=b<t.read?t.read-b-1:t.end-b,b==t.end&&t.read!==0&&(b=0,A=b<t.read?t.read-b-1:t.end-b),A===0)))return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);if(d=Q,p=s,p>w&&(p=w),p>A&&(p=A),t.win.set(f.read_buf(_,p),b),_+=p,w-=p,b+=p,A-=p,(s-=p)!==0)break;r=h!==0?Pn:Yt;break;case Ms:for(;g<14;){if(w!==0)d=Q;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if(i=p=D&16383,(p&31)>29||(p>>5&31)>29)return r=$t,f.msg="too many length or distance symbols",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);if(p=258+(p&31)+(p>>5&31),!o||o.length<p)o=[];else for(v=0;v<p;v++)o[v]=0;D>>>=14,g-=14,a=0,r=Is;case Is:for(;a<4+(i>>>10);){for(;g<3;){if(w!==0)d=Q;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}o[Ps[a++]]=D&7,D>>>=3,g-=3}for(;a<19;)o[Ps[a++]]=0;if(u[0]=7,p=y.inflate_trees_bits(o,u,l,m,f),p!=Q)return d=p,d==ae&&(o=null,r=$t),t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);a=0,r=$s;case $s:for(;p=i,!(a>=258+(p&31)+(p>>5&31));){let U,O;for(p=u[0];g<p;){if(w!==0)d=Q;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if(p=m[(l[0]+(D&Re[p]))*3+1],O=m[(l[0]+(D&Re[p]))*3+2],O<16)D>>>=p,g-=p,o[a++]=O;else{for(v=O==18?7:O-14,U=O==18?11:3;g<p+v;){if(w!==0)d=Q;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if(D>>>=p,g-=p,U+=D&Re[v],D>>>=v,g-=v,v=a,p=i,v+U>258+(p&31)+(p>>5&31)||O==16&&v<1)return o=null,r=$t,f.msg="invalid bit length repeat",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);O=O==16?o[v-1]:0;do o[v++]=O;while(--U!==0);a=v}}if(l[0]=-1,$=[],j=[],R=[],M=[],$[0]=9,j[0]=6,p=i,p=y.inflate_trees_dynamic(257+(p&31),1+(p>>5&31),o,$,j,R,M,m,f),p!=Q)return p==ae&&(o=null,r=$t),d=p,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);c.init($[0],j[0],m,R[0],m,M[0]),r=Tn;case Tn:if(t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,(d=c.proc(t,f,d))!=Dt)return t.inflate_flush(f,d);if(d=Q,c.free(f),_=f.next_in_index,w=f.avail_in,D=t.bitb,g=t.bitk,b=t.write,A=b<t.read?t.read-b-1:t.end-b,h===0){r=Yt;break}r=Pn;case Pn:if(t.write=b,d=t.inflate_flush(f,d),b=t.write,A=b<t.read?t.read-b-1:t.end-b,t.read!=t.write)return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);r=Ls;case Ls:return d=Dt,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);case $t:return d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);default:return d=Pe,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d)}}},t.free=function(f){t.reset(f,null),t.win=null,m=null},t.set_dictionary=function(f,d,p){t.win.set(f.subarray(d,d+p),0),t.read=t.write=p},t.sync_point=function(){return r==mr?1:0}}const su=32,iu=8,au=0,Ns=1,Rs=2,Os=3,js=4,Vs=5,xr=6,on=7,Us=12,At=13,ou=[0,0,255,255];function uu(){const e=this;e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0;function n(t){return!t||!t.istate?Pe:(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=on,t.istate.blocks.reset(t,null),Q)}e.inflateEnd=function(t){return e.blocks&&e.blocks.free(t),e.blocks=null,Q},e.inflateInit=function(t,r){return t.msg=null,e.blocks=null,r<8||r>15?(e.inflateEnd(t),Pe):(e.wbits=r,t.istate.blocks=new ru(t,1<<r),n(t),Q)},e.inflate=function(t,r){let s,i;if(!t||!t.istate||!t.next_in)return Pe;const a=t.istate;for(r=r==Yo?gt:Q,s=gt;;)switch(a.mode){case au:if(t.avail_in===0)return s;if(s=r,t.avail_in--,t.total_in++,((a.method=t.read_byte(t.next_in_index++))&15)!=iu){a.mode=At,t.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=At,t.msg="invalid win size",a.marker=5;break}a.mode=Ns;case Ns:if(t.avail_in===0)return s;if(s=r,t.avail_in--,t.total_in++,i=t.read_byte(t.next_in_index++)&255,((a.method<<8)+i)%31!==0){a.mode=At,t.msg="incorrect header check",a.marker=5;break}if(!(i&su)){a.mode=on;break}a.mode=Rs;case Rs:if(t.avail_in===0)return s;s=r,t.avail_in--,t.total_in++,a.need=(t.read_byte(t.next_in_index++)&255)<<24&4278190080,a.mode=Os;case Os:if(t.avail_in===0)return s;s=r,t.avail_in--,t.total_in++,a.need+=(t.read_byte(t.next_in_index++)&255)<<16&16711680,a.mode=js;case js:if(t.avail_in===0)return s;s=r,t.avail_in--,t.total_in++,a.need+=(t.read_byte(t.next_in_index++)&255)<<8&65280,a.mode=Vs;case Vs:return t.avail_in===0?s:(s=r,t.avail_in--,t.total_in++,a.need+=t.read_byte(t.next_in_index++)&255,a.mode=xr,Ho);case xr:return a.mode=At,t.msg="need dictionary",a.marker=0,Pe;case on:if(s=a.blocks.proc(t,s),s==ae){a.mode=At,a.marker=0;break}if(s==Q&&(s=r),s!=Dt)return s;s=r,a.blocks.reset(t,a.was),a.mode=Us;case Us:return t.avail_in=0,Dt;case At:return ae;default:return Pe}},e.inflateSetDictionary=function(t,r,s){let i=0,a=s;if(!t||!t.istate||t.istate.mode!=xr)return Pe;const o=t.istate;return a>=1<<o.wbits&&(a=(1<<o.wbits)-1,i=s-a),o.blocks.set_dictionary(r,i,a),o.mode=on,Q},e.inflateSync=function(t){let r,s,i,a,o;if(!t||!t.istate)return Pe;const u=t.istate;if(u.mode!=At&&(u.mode=At,u.marker=0),(r=t.avail_in)===0)return gt;for(s=t.next_in_index,i=u.marker;r!==0&&i<4;)t.read_byte(s)==ou[i]?i++:t.read_byte(s)!==0?i=0:i=4-i,s++,r--;return t.total_in+=s-t.next_in_index,t.next_in_index=s,t.avail_in=r,u.marker=i,i!=4?ae:(a=t.total_in,o=t.total_out,n(t),t.total_in=a,t.total_out=o,u.mode=on,Q)},e.inflateSyncPoint=function(t){return!t||!t.istate||!t.istate.blocks?Pe:t.istate.blocks.sync_point()}}function Ii(){}Ii.prototype={inflateInit(e){const n=this;return n.istate=new uu,e||(e=Go),n.istate.inflateInit(n,e)},inflate(e){const n=this;return n.istate?n.istate.inflate(n,e):Pe},inflateEnd(){const e=this;if(!e.istate)return Pe;const n=e.istate.inflateEnd(e);return e.istate=null,n},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):Pe},inflateSetDictionary(e,n){const t=this;return t.istate?t.istate.inflateSetDictionary(t,e,n):Pe},read_byte(e){return this.next_in[e]},read_buf(e,n){return this.next_in.subarray(e,e+n)}};function cu(e){const n=this,t=new Ii,r=e&&e.chunkSize?Math.floor(e.chunkSize*2):128*1024,s=Zo,i=new Uint8Array(r);let a=!1;t.inflateInit(),t.next_out=i,n.append=function(o,u){const l=[];let c,h,m=0,x=0,y=0;if(o.length!==0){t.next_in_index=0,t.next_in=o,t.avail_in=o.length;do{if(t.next_out_index=0,t.avail_out=r,t.avail_in===0&&!a&&(t.next_in_index=0,a=!0),c=t.inflate(s),a&&c===gt){if(t.avail_in!==0)throw new Error("inflating: bad input")}else if(c!==Q&&c!==Dt)throw new Error("inflating: "+t.msg);if((a||c===Dt)&&t.avail_in===o.length)throw new Error("inflating: bad input");t.next_out_index&&(t.next_out_index===r?l.push(new Uint8Array(i)):l.push(i.subarray(0,t.next_out_index))),y+=t.next_out_index,u&&t.next_in_index>0&&t.next_in_index!=m&&(u(t.next_in_index),m=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return l.length>1?(h=new Uint8Array(y),l.forEach(function(f){h.set(f,x),x+=f.length})):h=l[0]?new Uint8Array(l[0]):new Uint8Array,h}},n.flush=function(){t.inflateEnd()}}const $e=4294967295,Be=65535,qs=8,lu=0,fu=99,du=67324752,$i=134695760,pu=$i,hu=33639248,mu=101010256,xu=101075792,Du=117853008,Tr=22,Li=20,Ni=56,gu=Tr+Li+Ni,wu=1,yu=39169,bu=10,_u=1,Ri=21589,vu=6534,Au=1,Cu=8,Eu=2048,Fu=16,Su=20,Gs=45,Hs=51,Dr="/",Zs=new Date(2107,11,31),Ys=new Date(1980,0,1),oe=void 0,Pt="undefined",Dn="function";class Ws{constructor(n){return class extends TransformStream{constructor(t,r){const s=new n(r);super({transform(i,a){a.enqueue(s.append(i))},flush(i){const a=s.flush();a&&i.enqueue(a)}})}}}}const ku=64;let Oi=2;try{typeof navigator!=Pt&&navigator.hardwareConcurrency&&(Oi=navigator.hardwareConcurrency)}catch{}const Tu={chunkSize:512*1024,maxWorkers:Oi,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:oe,CompressionStreamNative:typeof CompressionStream!=Pt&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=Pt&&DecompressionStream},St=Object.assign({},Tu);function Pu(){return St}function Bu(e){return Math.max(e.chunkSize,ku)}function Yr(e){const{baseURL:n,chunkSize:t,maxWorkers:r,terminateWorkerTimeout:s,useCompressionStream:i,useWebWorkers:a,Deflate:o,Inflate:u,CompressionStream:l,DecompressionStream:c,workerScripts:h}=e;if(Ct("baseURL",n),Ct("chunkSize",t),Ct("maxWorkers",r),Ct("terminateWorkerTimeout",s),Ct("useCompressionStream",i),Ct("useWebWorkers",a),o&&(St.CompressionStream=new Ws(o)),u&&(St.DecompressionStream=new Ws(u)),Ct("CompressionStream",l),Ct("DecompressionStream",c),h!==oe){const{deflate:m,inflate:x}=h;if((m||x)&&(St.workerScripts||(St.workerScripts={})),m){if(!Array.isArray(m))throw new Error("workerScripts.deflate must be an array");St.workerScripts.deflate=m}if(x){if(!Array.isArray(x))throw new Error("workerScripts.inflate must be an array");St.workerScripts.inflate=x}}}function Ct(e,n){n!==oe&&(St[e]=n)}const gr={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const n of Object.keys(gr))for(const t of Object.keys(gr[n])){const r=gr[n][t];if(typeof r=="string")e[r]=n+"/"+t;else for(let s=0;s<r.length;s++)e[r[s]]=n+"/"+t}return e})();const ji=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)n&1?n=n>>>1^3988292384:n=n>>>1;ji[e]=n}class Pr{constructor(n){this.crc=n||-1}append(n){let t=this.crc|0;for(let r=0,s=n.length|0;r<s;r++)t=t>>>8^ji[(t^n[r])&255];this.crc=t}get(){return~this.crc}}class Vi extends TransformStream{constructor(){let n;const t=new Pr;super({transform(r,s){t.append(r),s.enqueue(r)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.value=r}}),n=this}}function Nn(e){if(typeof TextEncoder==Pt){e=unescape(encodeURIComponent(e));const n=new Uint8Array(e.length);for(let t=0;t<n.length;t++)n[t]=e.charCodeAt(t);return n}else return new TextEncoder().encode(e)}const Ee={concat(e,n){if(e.length===0||n.length===0)return e.concat(n);const t=e[e.length-1],r=Ee.getPartial(t);return r===32?e.concat(n):Ee._shiftRight(n,r,t|0,e.slice(0,e.length-1))},bitLength(e){const n=e.length;if(n===0)return 0;const t=e[n-1];return(n-1)*32+Ee.getPartial(t)},clamp(e,n){if(e.length*32<n)return e;e=e.slice(0,Math.ceil(n/32));const t=e.length;return n=n&31,t>0&&n&&(e[t-1]=Ee.partial(n,e[t-1]&2147483648>>n-1,1)),e},partial(e,n,t){return e===32?n:(t?n|0:n<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,n,t,r){for(r===void 0&&(r=[]);n>=32;n-=32)r.push(t),t=0;if(n===0)return r.concat(e);for(let a=0;a<e.length;a++)r.push(t|e[a]>>>n),t=e[a]<<32-n;const s=e.length?e[e.length-1]:0,i=Ee.getPartial(s);return r.push(Ee.partial(n+i&31,n+i>32?t:r.pop(),1)),r}},Un={bytes:{fromBits(e){const t=Ee.bitLength(e)/8,r=new Uint8Array(t);let s;for(let i=0;i<t;i++)i&3||(s=e[i/4]),r[i]=s>>>24,s<<=8;return r},toBits(e){const n=[];let t,r=0;for(t=0;t<e.length;t++)r=r<<8|e[t],(t&3)===3&&(n.push(r),r=0);return t&3&&n.push(Ee.partial(8*(t&3),r)),n}}},Ui={};Ui.sha1=class{constructor(e){const n=this;n.blockSize=512,n._init=[1732584193,4023233417,2562383102,271733878,3285377520],n._key=[1518500249,1859775393,2400959708,3395469782],e?(n._h=e._h.slice(0),n._buffer=e._buffer.slice(0),n._length=e._length):n.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const n=this;typeof e=="string"&&(e=Un.utf8String.toBits(e));const t=n._buffer=Ee.concat(n._buffer,e),r=n._length,s=n._length=r+Ee.bitLength(e);if(s>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(t);let a=0;for(let o=n.blockSize+r-(n.blockSize+r&n.blockSize-1);o<=s;o+=n.blockSize)n._block(i.subarray(16*a,16*(a+1))),a+=1;return t.splice(0,16*a),n}finalize(){const e=this;let n=e._buffer;const t=e._h;n=Ee.concat(n,[Ee.partial(1,1)]);for(let r=n.length+2;r&15;r++)n.push(0);for(n.push(Math.floor(e._length/4294967296)),n.push(e._length|0);n.length;)e._block(n.splice(0,16));return e.reset(),t}_f(e,n,t,r){if(e<=19)return n&t|~n&r;if(e<=39)return n^t^r;if(e<=59)return n&t|n&r|t&r;if(e<=79)return n^t^r}_S(e,n){return n<<e|n>>>32-e}_block(e){const n=this,t=n._h,r=Array(80);for(let l=0;l<16;l++)r[l]=e[l];let s=t[0],i=t[1],a=t[2],o=t[3],u=t[4];for(let l=0;l<=79;l++){l>=16&&(r[l]=n._S(1,r[l-3]^r[l-8]^r[l-14]^r[l-16]));const c=n._S(5,s)+n._f(l,i,a,o)+u+r[l]+n._key[Math.floor(l/20)]|0;u=o,o=a,a=n._S(30,i),i=s,s=c}t[0]=t[0]+s|0,t[1]=t[1]+i|0,t[2]=t[2]+a|0,t[3]=t[3]+o|0,t[4]=t[4]+u|0}};const qi={};qi.aes=class{constructor(e){const n=this;n._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],n._tables[0][0][0]||n._precompute();const t=n._tables[0][4],r=n._tables[1],s=e.length;let i,a,o,u=1;if(s!==4&&s!==6&&s!==8)throw new Error("invalid aes key size");for(n._key=[a=e.slice(0),o=[]],i=s;i<4*s+28;i++){let l=a[i-1];(i%s===0||s===8&&i%s===4)&&(l=t[l>>>24]<<24^t[l>>16&255]<<16^t[l>>8&255]<<8^t[l&255],i%s===0&&(l=l<<8^l>>>24^u<<24,u=u<<1^(u>>7)*283)),a[i]=a[i-s]^l}for(let l=0;i;l++,i--){const c=a[l&3?i:i-4];i<=4||l<4?o[l]=c:o[l]=r[0][t[c>>>24]]^r[1][t[c>>16&255]]^r[2][t[c>>8&255]]^r[3][t[c&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],n=this._tables[1],t=e[4],r=n[4],s=[],i=[];let a,o,u,l;for(let c=0;c<256;c++)i[(s[c]=c<<1^(c>>7)*283)^c]=c;for(let c=a=0;!t[c];c^=o||1,a=i[a]||1){let h=a^a<<1^a<<2^a<<3^a<<4;h=h>>8^h&255^99,t[c]=h,r[h]=c,l=s[u=s[o=s[c]]];let m=l*16843009^u*65537^o*257^c*16843008,x=s[h]*257^h*16843008;for(let y=0;y<4;y++)e[y][c]=x=x<<24^x>>>8,n[y][h]=m=m<<24^m>>>8}for(let c=0;c<5;c++)e[c]=e[c].slice(0),n[c]=n[c].slice(0)}_crypt(e,n){if(e.length!==4)throw new Error("invalid aes block size");const t=this._key[n],r=t.length/4-2,s=[0,0,0,0],i=this._tables[n],a=i[0],o=i[1],u=i[2],l=i[3],c=i[4];let h=e[0]^t[0],m=e[n?3:1]^t[1],x=e[2]^t[2],y=e[n?1:3]^t[3],f=4,d,p,D;for(let g=0;g<r;g++)d=a[h>>>24]^o[m>>16&255]^u[x>>8&255]^l[y&255]^t[f],p=a[m>>>24]^o[x>>16&255]^u[y>>8&255]^l[h&255]^t[f+1],D=a[x>>>24]^o[y>>16&255]^u[h>>8&255]^l[m&255]^t[f+2],y=a[y>>>24]^o[h>>16&255]^u[m>>8&255]^l[x&255]^t[f+3],f+=4,h=d,m=p,x=D;for(let g=0;g<4;g++)s[n?3&-g:g]=c[h>>>24]<<24^c[m>>16&255]<<16^c[x>>8&255]<<8^c[y&255]^t[f++],d=h,h=m,m=x,x=y,y=d;return s}};const Mu={getRandomValues(e){const n=new Uint32Array(e.buffer),t=r=>{let s=987654321;const i=4294967295;return function(){return s=36969*(s&65535)+(s>>16)&i,r=18e3*(r&65535)+(r>>16)&i,(((s<<16)+r&i)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,s;r<e.length;r+=4){const i=t((s||Math.random())*4294967296);s=i()*987654071,n[r/4]=i()*4294967296|0}return e}},Gi={};Gi.ctrGladman=class{constructor(e,n){this._prf=e,this._initIv=n,this._iv=n}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)===255){let n=e>>16&255,t=e>>8&255,r=e&255;n===255?(n=0,t===255?(t=0,r===255?r=0:++r):++t):++n,e=0,e+=n<<16,e+=t<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,n,t){let r;if(!(r=n.length))return[];const s=Ee.bitLength(n);for(let i=0;i<r;i+=4){this.incCounter(t);const a=e.encrypt(t);n[i]^=a[0],n[i+1]^=a[1],n[i+2]^=a[2],n[i+3]^=a[3]}return Ee.clamp(n,s)}};const Ut={importKey(e){return new Ut.hmacSha1(Un.bytes.toBits(e))},pbkdf2(e,n,t,r){if(t=t||1e4,r<0||t<0)throw new Error("invalid params to pbkdf2");const s=(r>>5)+1<<2;let i,a,o,u,l;const c=new ArrayBuffer(s),h=new DataView(c);let m=0;const x=Ee;for(n=Un.bytes.toBits(n),l=1;m<(s||1);l++){for(i=a=e.encrypt(x.concat(n,[l])),o=1;o<t;o++)for(a=e.encrypt(a),u=0;u<a.length;u++)i[u]^=a[u];for(o=0;m<(s||1)&&o<i.length;o++)h.setInt32(m,i[o]),m+=4}return c.slice(0,r/8)}};Ut.hmacSha1=class{constructor(e){const n=this,t=n._hash=Ui.sha1,r=[[],[]];n._baseHash=[new t,new t];const s=n._baseHash[0].blockSize/32;e.length>s&&(e=new t().update(e).finalize());for(let i=0;i<s;i++)r[0][i]=e[i]^909522486,r[1][i]=e[i]^1549556828;n._baseHash[0].update(r[0]),n._baseHash[1].update(r[1]),n._resultHash=new t(n._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){const n=this;n._updated=!0,n._resultHash.update(e)}digest(){const e=this,n=e._resultHash.finalize(),t=new e._hash(e._baseHash[1]).update(n).finalize();return e.reset(),t}encrypt(e){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}};const Iu=typeof crypto!=Pt&&typeof crypto.getRandomValues==Dn,Hi="Invalid password",Zi="Invalid signature",Yi="zipjs-abort-check-password";function Wi(e){return Iu?crypto.getRandomValues(e):Mu.getRandomValues(e)}const Jt=16,$u="raw",Xi={name:"PBKDF2"},Lu={name:"HMAC"},Nu="SHA-1",Ru=Object.assign({hash:Lu},Xi),Br=Object.assign({iterations:1e3,hash:{name:Nu}},Xi),Ou=["deriveBits"],pn=[8,12,16],un=[16,24,32],Et=10,ju=[0,0,0,0],Jn=typeof crypto!=Pt,gn=Jn&&crypto.subtle,Ki=Jn&&typeof gn!=Pt,lt=Un.bytes,Vu=qi.aes,Uu=Gi.ctrGladman,qu=Ut.hmacSha1;let Xs=Jn&&Ki&&typeof gn.importKey==Dn,Ks=Jn&&Ki&&typeof gn.deriveBits==Dn;class Gu extends TransformStream{constructor({password:n,rawPassword:t,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(a=>this.resolveReady=a),password:Qi(n,t),signed:r,strength:s-1,pending:new Uint8Array})},async transform(a,o){const u=this,{password:l,strength:c,resolveReady:h,ready:m}=u;l?(await Zu(u,c,l,qe(a,0,pn[c]+2)),a=qe(a,pn[c]+2),i?o.error(new Error(Yi)):h()):await m;const x=new Uint8Array(a.length-Et-(a.length-Et)%Jt);o.enqueue(Ji(u,a,x,0,Et,!0))},async flush(a){const{signed:o,ctr:u,hmac:l,pending:c,ready:h}=this;if(l&&u){await h;const m=qe(c,0,c.length-Et),x=qe(c,c.length-Et);let y=new Uint8Array;if(m.length){const f=mn(lt,m);l.update(f);const d=u.update(f);y=hn(lt,d)}if(o){const f=qe(hn(lt,l.digest()),0,Et);for(let d=0;d<Et;d++)if(f[d]!=x[d])throw new Error(Zi)}a.enqueue(y)}}})}}class Hu extends TransformStream{constructor({password:n,rawPassword:t,encryptionStrength:r}){let s;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:Qi(n,t),strength:r-1,pending:new Uint8Array})},async transform(i,a){const o=this,{password:u,strength:l,resolveReady:c,ready:h}=o;let m=new Uint8Array;u?(m=await Yu(o,l,u),c()):await h;const x=new Uint8Array(m.length+i.length-i.length%Jt);x.set(m,0),a.enqueue(Ji(o,i,x,m.length,0))},async flush(i){const{ctr:a,hmac:o,pending:u,ready:l}=this;if(o&&a){await l;let c=new Uint8Array;if(u.length){const h=a.update(mn(lt,u));o.update(h),c=hn(lt,h)}s.signature=hn(lt,o.digest()).slice(0,Et),i.enqueue(Wr(c,s.signature))}}}),s=this}}function Ji(e,n,t,r,s,i){const{ctr:a,hmac:o,pending:u}=e,l=n.length-s;u.length&&(n=Wr(u,n),t=Ku(t,l-l%Jt));let c;for(c=0;c<=l-Jt;c+=Jt){const h=mn(lt,qe(n,c,c+Jt));i&&o.update(h);const m=a.update(h);i||o.update(m),t.set(hn(lt,m),c+r)}return e.pending=qe(n,c),t}async function Zu(e,n,t,r){const s=await zi(e,n,t,qe(r,0,pn[n])),i=qe(r,pn[n]);if(s[0]!=i[0]||s[1]!=i[1])throw new Error(Hi)}async function Yu(e,n,t){const r=Wi(new Uint8Array(pn[n])),s=await zi(e,n,t,r);return Wr(r,s)}async function zi(e,n,t,r){e.password=null;const s=await Wu($u,t,Ru,!1,Ou),i=await Xu(Object.assign({salt:r},Br),s,8*(un[n]*2+2)),a=new Uint8Array(i),o=mn(lt,qe(a,0,un[n])),u=mn(lt,qe(a,un[n],un[n]*2)),l=qe(a,un[n]*2);return Object.assign(e,{keys:{key:o,authentication:u,passwordVerification:l},ctr:new Uu(new Vu(o),Array.from(ju)),hmac:new qu(u)}),l}async function Wu(e,n,t,r,s){if(Xs)try{return await gn.importKey(e,n,t,r,s)}catch{return Xs=!1,Ut.importKey(n)}else return Ut.importKey(n)}async function Xu(e,n,t){if(Ks)try{return await gn.deriveBits(e,n,t)}catch{return Ks=!1,Ut.pbkdf2(n,e.salt,Br.iterations,t)}else return Ut.pbkdf2(n,e.salt,Br.iterations,t)}function Qi(e,n){return n===oe?Nn(e):n}function Wr(e,n){let t=e;return e.length+n.length&&(t=new Uint8Array(e.length+n.length),t.set(e,0),t.set(n,e.length)),t}function Ku(e,n){if(n&&n>e.length){const t=e;e=new Uint8Array(n),e.set(t,0)}return e}function qe(e,n,t){return e.subarray(n,t)}function hn(e,n){return e.fromBits(n)}function mn(e,n){return e.toBits(n)}const Qt=12;class Ju extends TransformStream{constructor({password:n,passwordVerification:t,checkPasswordOnly:r}){super({start(){Object.assign(this,{password:n,passwordVerification:t}),ea(this,n)},transform(s,i){const a=this;if(a.password){const o=Js(a,s.subarray(0,Qt));if(a.password=null,o[Qt-1]!=a.passwordVerification)throw new Error(Hi);s=s.subarray(Qt)}r?i.error(new Error(Yi)):i.enqueue(Js(a,s))}})}}class zu extends TransformStream{constructor({password:n,passwordVerification:t}){super({start(){Object.assign(this,{password:n,passwordVerification:t}),ea(this,n)},transform(r,s){const i=this;let a,o;if(i.password){i.password=null;const u=Wi(new Uint8Array(Qt));u[Qt-1]=i.passwordVerification,a=new Uint8Array(r.length+u.length),a.set(zs(i,u),0),o=Qt}else a=new Uint8Array(r.length),o=0;a.set(zs(i,r),o),s.enqueue(a)}})}}function Js(e,n){const t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=ta(e)^n[r],Xr(e,t[r]);return t}function zs(e,n){const t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=ta(e)^n[r],Xr(e,n[r]);return t}function ea(e,n){const t=[305419896,591751049,878082192];Object.assign(e,{keys:t,crcKey0:new Pr(t[0]),crcKey2:new Pr(t[2])});for(let r=0;r<n.length;r++)Xr(e,n.charCodeAt(r))}function Xr(e,n){let[t,r,s]=e.keys;e.crcKey0.append([n]),t=~e.crcKey0.get(),r=Qs(Math.imul(Qs(r+na(t)),134775813)+1),e.crcKey2.append([r>>>24]),s=~e.crcKey2.get(),e.keys=[t,r,s]}function ta(e){const n=e.keys[2]|2;return na(Math.imul(n,n^1)>>>8)}function na(e){return e&255}function Qs(e){return e&4294967295}const ei="deflate-raw";class Qu extends TransformStream{constructor(n,{chunkSize:t,CompressionStream:r,CompressionStreamNative:s}){super({});const{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:u,signed:l,level:c}=n,h=this;let m,x,y=ra(super.readable);(!a||u)&&l&&(m=new Vi,y=ft(y,m)),i&&(y=ia(y,o,{level:c,chunkSize:t},s,r)),a&&(u?y=ft(y,new zu(n)):(x=new Hu(n),y=ft(y,x))),sa(h,y,()=>{let f;a&&!u&&(f=x.signature),(!a||u)&&l&&(f=new DataView(m.value.buffer).getUint32(0)),h.signature=f})}}class ec extends TransformStream{constructor(n,{chunkSize:t,DecompressionStream:r,DecompressionStreamNative:s}){super({});const{zipCrypto:i,encrypted:a,signed:o,signature:u,compressed:l,useCompressionStream:c}=n;let h,m,x=ra(super.readable);a&&(i?x=ft(x,new Ju(n)):(m=new Gu(n),x=ft(x,m))),l&&(x=ia(x,c,{chunkSize:t},s,r)),(!a||i)&&o&&(h=new Vi,x=ft(x,h)),sa(this,x,()=>{if((!a||i)&&o){const y=new DataView(h.value.buffer);if(u!=y.getUint32(0,!1))throw new Error(Zi)}})}}function ra(e){return ft(e,new TransformStream({transform(n,t){n&&n.length&&t.enqueue(n)}}))}function sa(e,n,t){n=ft(n,new TransformStream({flush:t})),Object.defineProperty(e,"readable",{get(){return n}})}function ia(e,n,t,r,s){try{const i=n&&r?r:s;e=ft(e,new i(ei,t))}catch{if(n)try{e=ft(e,new s(ei,t))}catch{return e}else return e}return e}function ft(e,n){return e.pipeThrough(n)}const tc="message",nc="start",rc="pull",ti="data",sc="ack",ni="close",aa="deflate",ic="inflate";class ac extends TransformStream{constructor(n,t){super({});const r=this,{codecType:s}=n;let i;s.startsWith(aa)?i=Qu:s.startsWith(ic)&&(i=ec);let a=0,o=0;const u=new i(n,t),l=super.readable,c=new TransformStream({transform(m,x){m&&m.length&&(o+=m.length,x.enqueue(m))},flush(){Object.assign(r,{inputSize:o})}}),h=new TransformStream({transform(m,x){m&&m.length&&(a+=m.length,x.enqueue(m))},flush(){const{signature:m}=u;Object.assign(r,{signature:m,outputSize:a,inputSize:o})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(c).pipeThrough(u).pipeThrough(h)}})}}class oc extends TransformStream{constructor(n){let t;super({transform:r,flush(s){t&&t.length&&s.enqueue(t)}});function r(s,i){if(t){const a=new Uint8Array(t.length+s.length);a.set(t),a.set(s,t.length),s=a,t=null}s.length>n?(i.enqueue(s.slice(0,n)),r(s.slice(n),i)):t=s}}}let oa=typeof Worker!=Pt;class wr{constructor(n,{readable:t,writable:r},{options:s,config:i,streamOptions:a,useWebWorkers:o,transferStreams:u,scripts:l},c){const{signal:h}=a;return Object.assign(n,{busy:!0,readable:t.pipeThrough(new oc(i.chunkSize)).pipeThrough(new uc(t,a),{signal:h}),writable:r,options:Object.assign({},s),scripts:l,transferStreams:u,terminate(){return new Promise(m=>{const{worker:x,busy:y}=n;x?(y?n.resolveTerminated=m:(x.terminate(),m()),n.interface=null):m()})},onTaskFinished(){const{resolveTerminated:m}=n;m&&(n.resolveTerminated=null,n.terminated=!0,n.worker.terminate(),m()),n.busy=!1,c(n)}}),(o&&oa?cc:ua)(n,i)}}class uc extends TransformStream{constructor(n,{onstart:t,onprogress:r,size:s,onend:i}){let a=0;super({async start(){t&&await yr(t,s)},async transform(o,u){a+=o.length,r&&await yr(r,a,s),u.enqueue(o)},async flush(){n.size=a,i&&await yr(i,a)}})}}async function yr(e,...n){try{await e(...n)}catch{}}function ua(e,n){return{run:()=>lc(e,n)}}function cc(e,n){const{baseURL:t,chunkSize:r}=n;if(!e.interface){let s;try{s=pc(e.scripts[0],t,e)}catch{return oa=!1,ua(e,n)}Object.assign(e,{worker:s,interface:{run:()=>fc(e,{chunkSize:r})}})}return e.interface}async function lc({options:e,readable:n,writable:t,onTaskFinished:r},s){try{const i=new ac(e,s);await n.pipeThrough(i).pipeTo(t,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:u}=i;return{signature:a,inputSize:o,outputSize:u}}finally{r()}}async function fc(e,n){let t,r;const s=new Promise((m,x)=>{t=m,r=x});Object.assign(e,{reader:null,writer:null,resolveResult:t,rejectResult:r,result:s});const{readable:i,options:a,scripts:o}=e,{writable:u,closed:l}=dc(e.writable),c=Rn({type:nc,scripts:o.slice(1),options:a,config:n,readable:i,writable:u},e);c||Object.assign(e,{reader:i.getReader(),writer:u.getWriter()});const h=await s;return c||await u.getWriter().close(),await l,h}function dc(e){let n;const t=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){const i=e.getWriter();await i.ready,await i.write(s),i.releaseLock()},close(){n()},abort(s){return e.getWriter().abort(s)}}),closed:t}}let ri=!0,si=!0;function pc(e,n,t){const r={type:"module"};let s,i;typeof e==Dn&&(e=e());try{s=new URL(e,n)}catch{s=e}if(ri)try{i=new Worker(s)}catch{ri=!1,i=new Worker(s,r)}else i=new Worker(s,r);return i.addEventListener(tc,a=>hc(a,t)),i}function Rn(e,{worker:n,writer:t,onTaskFinished:r,transferStreams:s}){try{let{value:i,readable:a,writable:o}=e;const u=[];if(i&&(i.byteLength<i.buffer.byteLength?e.value=i.buffer.slice(0,i.byteLength):e.value=i.buffer,u.push(e.value)),s&&si?(a&&u.push(a),o&&u.push(o)):e.readable=e.writable=null,u.length)try{return n.postMessage(e,u),!0}catch{si=!1,e.readable=e.writable=null,n.postMessage(e)}else n.postMessage(e)}catch(i){throw t&&t.releaseLock(),r(),i}}async function hc({data:e},n){const{type:t,value:r,messageId:s,result:i,error:a}=e,{reader:o,writer:u,resolveResult:l,rejectResult:c,onTaskFinished:h}=n;try{if(a){const{message:x,stack:y,code:f,name:d}=a,p=new Error(x);Object.assign(p,{stack:y,code:f,name:d}),m(p)}else{if(t==rc){const{value:x,done:y}=await o.read();Rn({type:ti,value:x,done:y,messageId:s},n)}t==ti&&(await u.ready,await u.write(new Uint8Array(r)),Rn({type:sc,messageId:s},n)),t==ni&&m(null,i)}}catch(x){Rn({type:ni,messageId:s},n),m(x)}function m(x,y){x?c(x):l(y),u&&u.releaseLock(),h()}}let jt=[];const br=[];let ii=0;async function mc(e,n){const{options:t,config:r}=n,{transferStreams:s,useWebWorkers:i,useCompressionStream:a,codecType:o,compressed:u,signed:l,encrypted:c}=t,{workerScripts:h,maxWorkers:m}=r;n.transferStreams=s||s===oe;const x=!u&&!l&&!c&&!n.transferStreams;return n.useWebWorkers=!x&&(i||i===oe&&r.useWebWorkers),n.scripts=n.useWebWorkers&&h?h[o]:[],t.useCompressionStream=a||a===oe&&r.useCompressionStream,(await y()).run();async function y(){const d=jt.find(p=>!p.busy);if(d)return ai(d),new wr(d,e,n,f);if(jt.length<m){const p={indexWorker:ii};return ii++,jt.push(p),new wr(p,e,n,f)}else return new Promise(p=>br.push({resolve:p,stream:e,workerOptions:n}))}function f(d){if(br.length){const[{resolve:p,stream:D,workerOptions:g}]=br.splice(0,1);p(new wr(d,D,g,f))}else d.worker?(ai(d),xc(d,n)):jt=jt.filter(p=>p!=d)}}function xc(e,n){const{config:t}=n,{terminateWorkerTimeout:r}=t;Number.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{jt=jt.filter(s=>s!=e);try{await e.terminate()}catch{}},r))}function ai(e){const{terminateTimeout:n}=e;n&&(clearTimeout(n),e.terminateTimeout=null)}function Dc(e,n={}){const t=`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)3&s||(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},k(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3&~n||(t.push(r),r=0);return 3&n&&t.push(_.h(8*(3&n),r)),t}}},P=class{constructor(e){const t=this;t.blockSize=512,t.v=[1732584193,4023233417,2562383102,271733878,3285377520],t.S=[1518500249,1859775393,2400959708,3395469782],e?(t.C=e.C.slice(0),t.A=e.A.slice(0),t._=e._):t.reset()}reset(){const e=this;return e.C=e.v.slice(0),e.A=[],e._=0,e}update(e){const t=this;"string"==typeof e&&(e=I.I.k(e));const n=t.A=_.concat(t.A,e),r=t._,i=t._=r+_.l(e);if(i>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.P(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.A;const n=e.C;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.P(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}R(e,t){return t<<e|t>>>32-e}P(t){const n=this,s=n.C,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.R(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.R(5,o)+n.V(e,c,f,a)+l+i[e]+n.S[r.floor(e/20)]|0;l=a,a=f,f=n.R(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;i<e.length;i+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[i/4]=4294967296*e()|0}return e}},V={importKey:e=>new V.B(I.p.k(e)),M(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.k(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;a<c.length;a++)o[a]^=c[a];for(f=0;(i||1)>d&&f<o.length;f++)h.setInt32(d,o[f]),d+=4}return w.slice(0,r/8)},B:class{constructor(e){const t=this,n=t.U=P,r=[[],[]];t.K=[new n,new n];const s=t.K[0].blockSize/32;e.length>s&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.N=new n(t.K[0])}reset(){const e=this;e.N=new e.U(e.K[0]),e.O=!1}update(e){this.O=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.U(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.O)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.T=[[[],[],[],[],[]],[[],[],[],[],[]]],t.T[0][0][0]||t.W();const n=t.T[0][4],r=t.T[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.S=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.j(e,0)}decrypt(e){return this.j(e,1)}W(){const e=this.T[0],t=this.T[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}j(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.S[t],r=n.length/4-2,i=[0,0,0,0],o=this.T[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.H=e,this.L=t,this.F=t}reset(){this.F=this.L}update(e){return this.q(this.H,e,this.F)}G(e){if(255&~(e>>24))e+=1<<24;else{let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.B;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:ie(e,n),signed:r,Y:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:ie(e,n),Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.M(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.M(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,ee:u,passwordVerification:w},Z:new Y(new X(l),e.from(F)),$:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)})(e):t}function oe(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ce(e,t,n){return e.subarray(t,n)}function fe(e,t){return e.m(t)}function ae(e,t){return e.k(t)}class le extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;if(n.password){const t=we(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(B);e=e.subarray(12)}r?t.error(new s(M)):t.enqueue(we(n,e))}})}}class ue extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=U(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(he(n,t),0),s=12}else r=new i(e.length),s=0;r.set(he(n,e),s),t.enqueue(r)}})}}function we(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,n[r]);return n}function he(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,t[r]);return n}function de(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,te:new x(r[0]),ne:new x(r[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,s,i]=e.keys;e.te.append([t]),n=~e.te.get(),s=be(r.imul(be(s+me(n)),134775813)+1),e.ne.append([s>>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function Le(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}He.ke=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.ze=e=>256>e?je[e]:je[256+(e>>>7)],He.Ce=[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],He.xe=[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],He.Ae=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le.Ie=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Pe=e,i.De=t,i.Ve=n,i.Re=r,i.Be=s}Le.Ee=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Me=new Le(Le.Ie,He.Ce,257,286,15),Le.Ue=new Le(Le.Ee,He.xe,0,30,15),Le.Ke=new Le(null,He.Ae,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.we=e.he=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++i<o&&n==s||(c>i?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<<F&65535,Q(L),L=n>>>16-F,F+=r-16):(L|=e<<F&65535,F+=r)}function Y(e,t){const n=2*e;X(65535&t[n],65535&t[n+1])}function Z(e,t){let n,r,s=-1,i=e[1],o=0,c=7,f=4;for(0===i&&(c=138,f=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Oe[W]=t,e.Te[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ke[n]+256+1)]++,M[2*He.ze(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.xe[o]);if(s>>>=3,j<r.floor(W/2)&&s<r.floor(i/2))return!0}return W==T-1}function te(t,n){let r,s,i,o,c=0;if(0!==W)do{r=e.Oe[c],s=e.Te[c],c++,0===r?Y(s,t):(i=He.ke[s],Y(i+256+1,t),o=He.Ce[i],0!==o&&(s-=He.ve[i],X(s,o)),r--,i=He.ze(r),Y(i,n),o=He.xe[i],0!==o&&(r-=He.Se[i],X(r,o)))}while(W>c);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.re(e),N.re(e),o=(()=>{let t;for(G(E,K.de),G(M,N.de),O.re(e),t=18;t>=3&&0===U[2*He._e[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le.Ie,Le.Ee)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.de+1,N.de+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.We()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.je)return;e=t.He(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(Ze>A&&0!==t.je)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.ue=[],e.ge=[],e.le=[],E=[],M=[],U=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i<e.fe&&$e(t,r[i+1],r[i],e.ue)&&i++,!$e(t,s,r[i],e.ue));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.Le=(t,S,x,W,j,G)=>(W||(W=8),j||(j=8),G||(G=0),t.Fe=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.qe=e,a=x,f=1<<a,l=f-1,m=j+7,y=1<<m,b=y-1,g=r.floor((m+3-1)/3),u=new i(2*f),h=[],d=[],T=1<<j+6,e.Ne=new i(4*T),s=4*T,e.Oe=new o(T),e.Te=new i(T),D=S,V=G,(t=>(t.Ge=t.Je=0,t.Fe=null,e.pending=0,e.Qe=0,n=Xe,c=0,K.se=E,K.oe=Le.Me,N.se=M,N.oe=Le.Ue,O.se=U,O.oe=Le.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].De,R=Je[D].Pe,B=Je[D].Ve,I=Je[D].Re,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Te=null,e.Oe=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,n==Xe?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Be!=Je[t].Be&&0!==e.Ge&&(r=e.Ze(1)),D!=t&&(D=t,P=Je[D].De,R=Je[D].Pe,B=Je[D].Ve,I=Je[D].Re),V=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<<g^255&u[1])&b,s=0;i-3>=s;s++)p=(p<<g^255&u[s+2])&b,h[s&l]=d[p],d[p]=s;return 0},e.Ze=(r,i)=>{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.et||!r.tt&&0!==r.je||n==Ye&&4!=i)return r.Fe=Qe[4],Oe;if(0===r.nt)return r.Fe=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.We(),0===t.nt)return c=-1,0}else if(0===t.je&&I>=i&&4!=i)return t.Fe=Qe[7],-5;if(n==Ye&&0!==t.je)return r.Fe=Qe[7],-5;if(0!==t.je||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Be){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.nt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C),0===r||(C-r&65535)>f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<<g^255&u[C+1])&b;else{v--;do{C++,p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C}while(0!=--v);C++}if(n&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 2:R=(e=>{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C),_=v,S=x,v=2,0!==s&&P>_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.nt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C)}while(0!=--_);if(z=0,v=2,C++,n&&(se(!1),0===t.nt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i)}if(2!=R&&3!=R||(n=Ye),0==R||2==R)return 0===t.nt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,Le.Ie),$(),9>1+H+10-F&&(X(2,3),Y(256,Le.Ie),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.We(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.rt=0,e.st=0,e.je=0,e.Ge=0,e.nt=0,e.Je=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Le(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Fe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.subarray(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.je>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Fe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.je>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={Le(e,t){const n=this;return n.qe=new et,t||(t=15),n.qe.Le(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):Oe},Xe(){const e=this;if(!e.qe)return Oe;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):Oe},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):Oe},He(e,t,n){const r=this;let s=r.je;return s>n&&(s=n),0===s?0:(r.je-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},We(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[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],lt=[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,112,112],ut=[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],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<<k;g>k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g<o);for(o=i[m],i[0]=g=0,C=0,b=-1,A=-S,s[0]=0,x=0,P=0;m>=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++k<P&&(y<<=1)>n[++_];)y-=n[_];if(P=1<<k,h[0]+P>1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]<c?(r[0]=256>d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<<v-A,k=g>>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<<v-1;g&k;k>>>=1)g^=k;for(g^=k,z=(1<<A)-1;(g&z)!=i[b];)b--,A-=S,z=(1<<A)-1}return 0!==I&&1!=m?it:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Fe="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Fe="incomplete dynamic bit lengths tree",a=st),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Fe="oversubscribed literal/length tree":-4!=h&&(w.Fe="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Fe="oversubscribed distance tree":h==it?(w.Fe="incomplete distance tree",h=st):-4!=h&&(w.Fe="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.je,w=o.ct,h=o.ft,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=ot[e],g=ot[t];do{for(;20>h;)p--,w|=(255&c.lt(d++))<<h,h+=8;if(f=w&b,a=n,l=r,z=3*(l+f),0!==(u=a[z]))for(;;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<<h,h+=8;for(f=w&g,a=s,l=i,z=3*(l+f),u=a[z];;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<<h,h+=8;if(v=a[z+2]+(w&ot[u]),w>>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(64&u)return c.Fe="invalid distance code",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(64&u)return 32&u?(k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Fe="invalid literal/length code",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.rt,v=y.je,x=e.ct,A=e.ft,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case 0:if(z>=258&&v>=10&&(e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.rt,v=y.je,x=e.ct,A=e.ft,S=e.write,z=S<e.read?e.read-S-1:e.end-S,0!=m)){t=1==m?7:9;break}c=u,n=r,o=h,t=1;case 1:for(b=c;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(16&k){a=15&k,i=n[g+2],t=2;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=7;break}return t=9,y.Fe="invalid literal/length code",m=st,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}i+=x&ot[b],x>>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=4;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Fe="invalid distance code",m=st,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}l+=x&ot[b],x>>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.ht(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);e.ut[S++]=e.ut[C++],z--,C==e.end&&(C=0),i--}t=0;break;case 6:if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.ht(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,e.ut[S++]=f,z--,t=0;break;case 7:if(A>7&&(A-=8,v++,_--),e.write=S,m=e.ht(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);t=8;case 8:return m=1,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);case 9:return m=st,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);default:return m=rt,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m)}},e.dt=()=>{}}ht.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&t==it&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&t==it&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.je,f=n.ct,y=n.ft,g=n.write,k=g<n.read?n.read-g-1:n.end-g;;){let S,z,C,x,A,_,I,P;switch(s){case 0:for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.yt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Fe="invalid block type",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=9,e.Fe="invalid stored block lengths",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k&&(n.write=g,t=n.ht(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k)))return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(t=0,i=o,i>b&&(i=b),i>k&&(i=k),n.ut.set(e.He(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=9,e.Fe="too many length or distance symbols",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(v=0;i>v;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}r[pt[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&ot[i]))+1],w=d[3*(u[0]+(f&ot[i]))+2],16>w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Fe="invalid bit length repeat",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.je,f=n.ct,y=n.ft,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=0;break}s=7;case 7:if(n.write=g,t=n.ht(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);s=8;case 8:return t=1,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);case 9:return t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);default:return t=rt,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}}},n.dt=e=>{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Fe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):rt}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e.Ct=0,e.xt=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.At=(n,r)=>(n.Fe=null,e.vt=null,8>r||r>15?(e.xt(n),rt):(e.Ct=r,n.kt.vt=new yt(n,1<<r),t(n),0)),e._t=(e,t)=>{let n,r;if(!e||!e.kt||!e.tt)return rt;const s=e.kt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=mt,e.Fe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.Ct){s.mode=mt,e.Fe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Fe="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.je?n:(n=t,e.je--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=mt,e.Fe="need dictionary",s.marker=0,rt;case 7:if(n=s.vt.wt(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.je=0,1;case mt:return st;default:return rt}},e.It=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return rt;const i=e.kt;return s<1<<i.Ct||(s=(1<<i.Ct)-1,r=n-s),i.vt.bt(t,r,s),i.mode=7,0},e.Pt=e=>{let n,r,s,i,o;if(!e||!e.kt)return rt;const c=e.kt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.je))return it;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==bt[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.je=n,c.marker=s,4!=s?st:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Dt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.At(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,0!==t.je||c||(t.rt=0,c=!0),a=t._t(0),c&&a===it){if(0!==t.je)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Fe);if((c||1===a)&&t.je===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.subarray(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.je>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.xt()}}kt.prototype={At(e){const t=this;return t.kt=new gt,e||(e=15),t.kt.At(t,e)},_t(e){const t=this;return t.kt?t.kt._t(t,e):rt},xt(){const e=this;if(!e.kt)return rt;const t=e.kt.xt(e);return e.kt=null,t},Pt(){const e=this;return e.kt?e.kt.Pt(e):rt},It(e,t){const n=this;return n.kt?n.kt.It(n,e,t):rt},lt(e){return this.tt[e]},He(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};
|
|
2
|
+
`,r=()=>n.useDataURI?"data:text/javascript,"+encodeURIComponent(t):URL.createObjectURL(new Blob([t],{type:"text/javascript"}));e({workerScripts:{inflate:[r],deflate:[r]}})}const gc="Writer iterator completed too soon",wc="text/plain",yc="Content-Type",bc=64*1024,ca="writable";class Kr{constructor(){this.size=0}init(){this.initialized=!0}}class la extends Kr{get readable(){const n=this,{chunkSize:t=bc}=n,r=new ReadableStream({start(){this.chunkOffset=0},async pull(s){const{offset:i=0,size:a,diskNumberStart:o}=r,{chunkOffset:u}=this;s.enqueue(await Mr(n,i+u,Math.min(t,a-u),o)),u+t>a?s.close():this.chunkOffset+=t}});return r}}class _c extends la{constructor(n){super(),Object.assign(this,{blob:n,size:n.size})}async readUint8Array(n,t){const r=this,s=n+t;let a=await(n||s<r.size?r.blob.slice(n,s):r.blob).arrayBuffer();return a.byteLength>t&&(a=a.slice(n,s)),new Uint8Array(a)}}class vc extends Kr{constructor(n){super();const t=this,r=new TransformStream,s=[];n&&s.push([yc,n]),Object.defineProperty(t,ca,{get(){return r.writable}}),t.blob=new Response(r.readable,{headers:s}).blob()}getData(){return this.blob}}class Ce extends _c{constructor(n){super(new Blob([n],{type:wc}))}}class Ac extends la{constructor(n){super(),this.readers=n}async init(){const n=this,{readers:t}=n;n.lastDiskNumber=0,n.lastDiskOffset=0,await Promise.all(t.map(async(r,s)=>{await r.init(),s!=t.length-1&&(n.lastDiskOffset+=r.size),n.size+=r.size})),super.init()}async readUint8Array(n,t,r=0){const s=this,{readers:i}=this;let a,o=r;o==-1&&(o=i.length-1);let u=n;for(;u>=i[o].size;)u-=i[o].size,o++;const l=i[o],c=l.size;if(u+t<=c)a=await Mr(l,u,t);else{const h=c-u;a=new Uint8Array(t),a.set(await Mr(l,u,h)),a.set(await s.readUint8Array(n+h,t-h,r),h)}return s.lastDiskNumber=Math.max(o,s.lastDiskNumber),a}}class oi extends Kr{constructor(n,t=4294967295){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let s,i,a;const o=new WritableStream({async write(c){const{availableSize:h}=r;if(a)c.length>=h?(await u(c.slice(0,h)),await l(),r.diskOffset+=s.size,r.diskNumber++,a=null,await this.write(c.slice(h))):await u(c);else{const{value:m,done:x}=await n.next();if(x&&!m)throw new Error(gc);s=m,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await xn(s),i=m.writable,a=i.getWriter(),await this.write(c)}},async close(){await a.ready,await l()}});Object.defineProperty(r,ca,{get(){return o}});async function u(c){const h=c.length;h&&(await a.ready,await a.write(c),s.size+=h,r.size+=h,r.availableSize-=h)}async function l(){i.size=s.size,await a.close()}}}async function xn(e,n){if(e.init&&!e.initialized)await e.init(n);else return Promise.resolve()}function Cc(e){return Array.isArray(e)&&(e=new Ac(e)),e instanceof ReadableStream&&(e={readable:e}),e}function Ec(e){e.writable===oe&&typeof e.next==Dn&&(e=new oi(e)),e instanceof WritableStream&&(e={writable:e});const{writable:n}=e;return n.size===oe&&(n.size=0),e instanceof oi||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function Mr(e,n,t,r){return e.readUint8Array(n,t,r)}const Fc="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");Fc.length==256;const Sc="filename",kc="rawFilename",Tc="comment",Pc="rawComment",Bc="uncompressedSize",Mc="compressedSize",Ic="offset",ui="diskNumberStart",fa="lastModDate",$c="rawLastModDate",da="lastAccessDate",pa="creationDate",ha="internalFileAttribute",ma="externalFileAttribute",xa="msDosCompatible",Jr="zip64",Da="encrypted",ga="version",wa="versionMadeBy",ya="zipCrypto",Lc=[Sc,kc,Mc,Bc,fa,$c,Tc,Pc,da,pa,Ic,ui,ui,ha,ma,xa,Jr,Da,ga,wa,ya,"directory","bitFlag","signature","filenameUTF8","commentUTF8","compressionMethod","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class ba{constructor(n){Lc.forEach(t=>this[t]=n[t])}}const Nc="File already exists",Rc="Zip file comment exceeds 64KB",Oc="File entry comment exceeds 64KB",jc="File entry name exceeds 64KB",ci="Version exceeds 65535",Vc="The strength must equal 1, 2, or 3",Uc="Extra field type exceeds 65535",qc="Extra field data exceeds 64KB",zr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Gc="Undefined uncompressed size",li=new Uint8Array([7,0,2,0,65,69,3,0,0]);let _r=0;const fi=[];class Hc{constructor(n,t={}){n=Ec(n);const r=n.availableSize!==oe&&n.availableSize>0&&n.availableSize!==1/0&&n.maxSize!==oe&&n.maxSize>0&&n.maxSize!==1/0;Object.assign(this,{writer:n,addSplitZipSignature:r,options:t,config:Pu(),files:new Map,filenames:new Set,offset:t.offset===oe?n.writable.size:t.offset,pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async add(n="",t,r={}){const s=this,{pendingAddFileCalls:i,config:a}=s;_r<a.maxWorkers?_r++:await new Promise(u=>fi.push(u));let o;try{if(n=n.trim(),s.filenames.has(n))throw new Error(Nc);return s.filenames.add(n),o=Zc(s,n,t,r),i.add(o),await o}catch(u){throw s.filenames.delete(n),u}finally{i.delete(o);const u=fi.shift();u?u():_r--}}async close(n=new Uint8Array,t={}){const r=this,{pendingAddFileCalls:s,writer:i}=this,{writable:a}=i;for(;s.size;)await Promise.allSettled(Array.from(s));return await t0(this,n,t),ne(r,t,"preventClose")||await a.getWriter().close(),i.getData?i.getData():a}}async function Zc(e,n,t,r){n=n.trim(),r.directory&&!n.endsWith(Dr)?n+=Dr:r.directory=n.endsWith(Dr);const s=ne(e,r,"encodeText",Nn);let i=s(n);if(i===oe&&(i=Nn(n)),K(i)>Be)throw new Error(jc);const a=r.comment||"";let o=s(a);if(o===oe&&(o=Nn(a)),K(o)>Be)throw new Error(Oc);const u=ne(e,r,ga,Su);if(u>Be)throw new Error(ci);const l=ne(e,r,wa,20);if(l>Be)throw new Error(ci);const c=ne(e,r,fa,new Date),h=ne(e,r,da),m=ne(e,r,pa),x=ne(e,r,xa,!0),y=ne(e,r,ha,0),f=ne(e,r,ma,0),d=ne(e,r,"passThrough");let p,D;d||(p=ne(e,r,"password"),D=ne(e,r,"rawPassword"));const g=ne(e,r,"encryptionStrength",3),_=ne(e,r,ya),w=ne(e,r,"extendedTimestamp",!0),b=ne(e,r,"keepOrder",!0),A=ne(e,r,"level"),v=ne(e,r,"useWebWorkers"),E=ne(e,r,"bufferedWrite"),k=ne(e,r,"dataDescriptorSignature",!1),F=ne(e,r,"signal"),L=ne(e,r,"useUnicodeFileNames",!0),$=ne(e,r,"useCompressionStream"),j=ne(e,r,"compressionMethod");let R=ne(e,r,"dataDescriptor",!0),M=ne(e,r,Jr);if(!_&&(p!==oe||D!==oe)&&!(g>=1&&g<=3))throw new Error(Vc);let U=new Uint8Array;const{extraField:O}=r;if(O){let pt=0,Oe=0;O.forEach(Se=>pt+=4+K(Se)),U=new Uint8Array(pt),O.forEach((Se,rt)=>{if(rt>Be)throw new Error(Uc);if(K(Se)>Be)throw new Error(qc);De(U,new Uint16Array([rt]),Oe),De(U,new Uint16Array([K(Se)]),Oe+2),De(U,Se,Oe+4),Oe+=4+K(Se)})}let pe=0,V=0,fe=0;if(d&&({uncompressedSize:fe}=r,fe===oe))throw new Error(Gc);const G=M===!0;t&&(t=Cc(t),await xn(t),d?pe=di(fe):t.size===oe?(R=!0,(M||M===oe)&&(M=!0,fe=pe=$e+1)):(fe=t.size,pe=di(fe)));const{diskOffset:ee,diskNumber:He,maxSize:ge}=e.writer,he=G||fe>$e,yt=G||pe>$e,dt=G||e.offset+e.pendingEntriesSize-ee>$e,tt=ne(e,r,"supportZip64SplitFile",!0)&&G||He+Math.ceil(e.pendingEntriesSize/ge)>Be;if(dt||he||yt||tt){if(M===!1||!b)throw new Error(zr);M=!0}M=M||!1;const It=ne(e,r,Da),{signature:Ze}=r;r=Object.assign({},r,{rawFilename:i,rawComment:o,version:u,versionMadeBy:l,lastModDate:c,lastAccessDate:h,creationDate:m,rawExtraField:U,zip64:M,zip64UncompressedSize:he,zip64CompressedSize:yt,zip64Offset:dt,zip64DiskNumberStart:tt,password:p,rawPassword:D,level:!$&&e.config.CompressionStream===oe&&e.config.CompressionStreamNative===oe?0:A,useWebWorkers:v,encryptionStrength:g,extendedTimestamp:w,zipCrypto:_,bufferedWrite:E,keepOrder:b,useUnicodeFileNames:L,dataDescriptor:R,dataDescriptorSignature:k,signal:F,msDosCompatible:x,internalFileAttribute:y,externalFileAttribute:f,useCompressionStream:$,passThrough:d,encrypted:!!(p&&K(p)||D&&K(D))||d&&It,signature:Ze,compressionMethod:j});const nt=Xc(r),Gt=Jc(r),ue=K(nt.localHeaderArray,Gt.dataDescriptorArray);V=ue+pe,e.options.usdz&&(V+=V+64),e.pendingEntriesSize+=V;let we;try{we=await Yc(e,n,t,{headerInfo:nt,dataDescriptorInfo:Gt,metadataSize:ue},r)}finally{e.pendingEntriesSize-=V}return Object.assign(we,{name:n,comment:a,extraField:O}),new ba(we)}async function Yc(e,n,t,r,s){const{files:i,writer:a}=e,{keepOrder:o,dataDescriptor:u,signal:l}=s,{headerInfo:c}=r,{usdz:h}=e.options,m=Array.from(i.values()).pop();let x={},y,f,d,p,D,g,_;i.set(n,x);try{let v;o&&(v=m&&m.lock,w()),(s.bufferedWrite||e.writerLocked||e.bufferedWrites&&o||!u)&&!h?(g=new TransformStream,_=new Response(g.readable).blob(),g.writable.size=0,y=!0,e.bufferedWrites++,await xn(a)):(g=a,await b()),await xn(g);const{writable:E}=a;let{diskOffset:k}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const L=new Uint8Array(4),$=ve(L);X($,0,$i),await ut(E,L),e.offset+=4}h&&Kc(r,e.offset-k),y||(await v,await A(E));const{diskNumber:F}=a;if(D=!0,x.diskNumberStart=F,x=await Wc(t,g,x,r,e.config,s),D=!1,i.set(n,x),x.filename=n,y){await g.writable.getWriter().close();let L=await _;await v,await b(),p=!0,u||(L=await Qc(x,L,E,s)),await A(E),x.diskNumberStart=a.diskNumber,k=a.diskOffset,await L.stream().pipeTo(E,{preventClose:!0,preventAbort:!0,signal:l}),E.size+=L.size,p=!1}if(x.offset=e.offset-k,x.zip64)e0(x,s);else if(x.offset>$e)throw new Error(zr);return e.offset+=x.size,x}catch(v){if(y&&p||!y&&D){if(e.hasCorruptedEntries=!0,v)try{v.corruptedEntry=!0}catch{}y?e.offset+=g.writable.size:e.offset=g.writable.size}throw i.delete(n),v}finally{y&&e.bufferedWrites--,d&&d(),f&&f()}function w(){x.lock=new Promise(v=>d=v)}async function b(){e.writerLocked=!0;const{lockWriter:v}=e;e.lockWriter=new Promise(E=>f=()=>{e.writerLocked=!1,E()}),await v}async function A(v){K(c.localHeaderArray)>a.availableSize&&(a.availableSize=0,await ut(v,new Uint8Array))}}async function Wc(e,n,{diskNumberStart:t,lock:r},s,i,a){const{headerInfo:o,dataDescriptorInfo:u,metadataSize:l}=s,{localHeaderArray:c,headerArray:h,lastModDate:m,rawLastModDate:x,encrypted:y,compressed:f,version:d,compressionMethod:p,rawExtraFieldExtendedTimestamp:D,extraFieldExtendedTimestampFlag:g,rawExtraFieldNTFS:_,rawExtraFieldAES:w}=o,{dataDescriptorArray:b}=u,{rawFilename:A,lastAccessDate:v,creationDate:E,password:k,rawPassword:F,level:L,zip64:$,zip64UncompressedSize:j,zip64CompressedSize:R,zip64Offset:M,zip64DiskNumberStart:U,zipCrypto:O,dataDescriptor:pe,directory:V,versionMadeBy:fe,rawComment:G,rawExtraField:ee,useWebWorkers:He,onstart:ge,onprogress:he,onend:yt,signal:dt,encryptionStrength:bt,extendedTimestamp:tt,msDosCompatible:It,internalFileAttribute:Ze,externalFileAttribute:nt,useCompressionStream:Gt,passThrough:ue}=a,we={lock:r,versionMadeBy:fe,zip64:$,directory:!!V,filenameUTF8:!0,rawFilename:A,commentUTF8:!0,rawComment:G,rawExtraFieldExtendedTimestamp:D,rawExtraFieldNTFS:_,rawExtraFieldAES:w,rawExtraField:ee,extendedTimestamp:tt,msDosCompatible:It,internalFileAttribute:Ze,externalFileAttribute:nt,diskNumberStart:t};let{signature:pt,uncompressedSize:Oe}=a,Se=0;ue||(Oe=0);const{writable:rt}=n;if(e){e.chunkSize=Bu(i),await ut(rt,c);const Ye=e.readable,bn=Ye.size=e.size,ir={options:{codecType:aa,level:L,rawPassword:F,password:k,encryptionStrength:bt,zipCrypto:y&&O,passwordVerification:y&&O&&x>>8&255,signed:!ue,compressed:f&&!ue,encrypted:y&&!ue,useWebWorkers:He,useCompressionStream:Gt,transferStreams:!1},config:i,streamOptions:{signal:dt,size:bn,onstart:ge,onprogress:he,onend:yt}},Ht=await mc({readable:Ye,writable:rt},ir);Se=Ht.outputSize,ue||(Oe=Ht.inputSize,pt=Ht.signature),rt.size+=Oe}else await ut(rt,c);let st;if($){let Ye=4;j&&(Ye+=8),R&&(Ye+=8),M&&(Ye+=8),U&&(Ye+=4),st=new Uint8Array(Ye)}else st=new Uint8Array;return zc({signature:pt,rawExtraFieldZip64:st,compressedSize:Se,uncompressedSize:Oe,headerInfo:o,dataDescriptorInfo:u},a),pe&&await ut(rt,b),Object.assign(we,{uncompressedSize:Oe,compressedSize:Se,lastModDate:m,rawLastModDate:x,creationDate:E,lastAccessDate:v,encrypted:y,zipCrypto:O,size:l+Se,compressionMethod:p,version:d,headerArray:h,signature:pt,rawExtraFieldZip64:st,extraFieldExtendedTimestampFlag:g,zip64UncompressedSize:j,zip64CompressedSize:R,zip64Offset:M,zip64DiskNumberStart:U}),we}function Xc(e){const{rawFilename:n,lastModDate:t,lastAccessDate:r,creationDate:s,level:i,zip64:a,zipCrypto:o,useUnicodeFileNames:u,dataDescriptor:l,directory:c,rawExtraField:h,encryptionStrength:m,extendedTimestamp:x,encrypted:y}=e,f=i!==0&&!c;let{version:d,compressionMethod:p}=e,D;if(y&&!o){D=new Uint8Array(K(li)+2);const M=ve(D);z(M,0,yu),De(D,li,2),qn(M,8,m)}else D=new Uint8Array;let g,_,w;if(x){_=new Uint8Array(9+(r?4:0)+(s?4:0));const M=ve(_);z(M,0,Ri),z(M,2,K(_)-4),w=1+(r?2:0)+(s?4:0),qn(M,4,w);let U=5;X(M,U,Math.floor(t.getTime()/1e3)),U+=4,r&&(X(M,U,Math.floor(r.getTime()/1e3)),U+=4),s&&X(M,U,Math.floor(s.getTime()/1e3));try{g=new Uint8Array(36);const O=ve(g),pe=vr(t);z(O,0,bu),z(O,2,32),z(O,8,_u),z(O,10,24),Me(O,12,pe),Me(O,20,vr(r)||pe),Me(O,28,vr(s)||pe)}catch{g=new Uint8Array}}else g=_=new Uint8Array;let b=0;u&&(b=b|Eu),l&&(b=b|Cu),p===oe&&(p=f?qs:lu),p==qs&&(i>=1&&i<3&&(b=b|6),i>=3&&i<5&&(b=b|1),i===9&&(b=b|2)),a&&(d=d>Gs?d:Gs),y&&(b=b|Au,o||(d=d>Hs?d:Hs,D[9]=p,p=fu));const A=new Uint8Array(26),v=ve(A);z(v,0,d),z(v,2,b),z(v,4,p);const E=new Uint32Array(1),k=ve(E);let F;t<Ys?F=Ys:t>Zs?F=Zs:F=t,z(k,0,(F.getHours()<<6|F.getMinutes())<<5|F.getSeconds()/2),z(k,2,(F.getFullYear()-1980<<4|F.getMonth()+1)<<5|F.getDate());const L=E[0];X(v,6,L),z(v,22,K(n));const $=K(D,_,g,h);z(v,24,$);const j=new Uint8Array(30+K(n)+$),R=ve(j);return X(R,0,du),De(j,A,4),De(j,n,30),De(j,D,30+K(n)),De(j,_,30+K(n,D)),De(j,g,30+K(n,D,_)),De(j,h,30+K(n,D,_,g)),{localHeaderArray:j,headerArray:A,headerView:v,lastModDate:t,rawLastModDate:L,encrypted:y,compressed:f,version:d,compressionMethod:p,extraFieldExtendedTimestampFlag:w,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:g,rawExtraFieldAES:D,extraFieldLength:$}}function Kc(e,n){const{headerInfo:t}=e;let{localHeaderArray:r,extraFieldLength:s}=t,i=ve(r),a=64-(n+K(r))%64;a<4&&(a+=64);const o=new Uint8Array(a),u=ve(o);z(u,0,vu),z(u,2,a-2);const l=r;t.localHeaderArray=r=new Uint8Array(K(l)+a),De(r,l),De(r,o,K(l)),i=ve(r),z(i,28,s+a),e.metadataSize+=a}function Jc(e){const{zip64:n,dataDescriptor:t,dataDescriptorSignature:r}=e;let s=new Uint8Array,i,a=0;return t&&(s=new Uint8Array(n?r?24:20:r?16:12),i=ve(s),r&&(a=4,X(i,0,pu))),{dataDescriptorArray:s,dataDescriptorView:i,dataDescriptorOffset:a}}function zc(e,n){const{signature:t,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:i,headerInfo:a,dataDescriptorInfo:o}=e,{headerView:u,encrypted:l}=a,{dataDescriptorView:c,dataDescriptorOffset:h}=o,{zip64:m,zip64UncompressedSize:x,zip64CompressedSize:y,zipCrypto:f,dataDescriptor:d}=n;if((!l||f)&&t!==oe&&(X(u,10,t),d&&X(c,h,t)),m){const p=ve(r);z(p,0,wu),z(p,2,K(r)-4);let D=4;x&&(X(u,18,$e),Me(p,D,BigInt(i)),D+=8),y&&(X(u,14,$e),Me(p,D,BigInt(s))),d&&(Me(c,h+4,BigInt(s)),Me(c,h+12,BigInt(i)))}else X(u,14,s),X(u,18,i),d&&(X(c,h+4,s),X(c,h+8,i))}async function Qc(e,n,t,{zipCrypto:r}){let s;s=await n.slice(0,26).arrayBuffer(),s.byteLength!=26&&(s=s.slice(0,26));const i=new DataView(s);return(!e.encrypted||r)&&X(i,14,e.signature),e.zip64?(X(i,18,$e),X(i,22,$e)):(X(i,18,e.compressedSize),X(i,22,e.uncompressedSize)),await ut(t,new Uint8Array(s)),n.slice(s.byteLength)}function e0(e,n){const{rawExtraFieldZip64:t,offset:r,diskNumberStart:s}=e,{zip64UncompressedSize:i,zip64CompressedSize:a,zip64Offset:o,zip64DiskNumberStart:u}=n,l=ve(t);let c=4;i&&(c+=8),a&&(c+=8),o&&(Me(l,c,BigInt(r)),c+=8),u&&X(l,c,s)}async function t0(e,n,t){const{files:r,writer:s}=e,{diskOffset:i,writable:a}=s;let{diskNumber:o}=s,u=0,l=0,c=e.offset-i,h=r.size;for(const[,w]of r){const{rawFilename:b,rawExtraFieldZip64:A,rawExtraFieldAES:v,rawComment:E,rawExtraFieldNTFS:k,rawExtraField:F,extendedTimestamp:L,extraFieldExtendedTimestampFlag:$,lastModDate:j}=w;let R;if(L){R=new Uint8Array(9);const M=ve(R);z(M,0,Ri),z(M,2,5),qn(M,4,$),X(M,5,Math.floor(j.getTime()/1e3))}else R=new Uint8Array;w.rawExtraFieldCDExtendedTimestamp=R,l+=46+K(b,E,A,v,k,R,F)}const m=new Uint8Array(l),x=ve(m);await xn(s);let y=0;for(const[w,b]of Array.from(r.values()).entries()){const{offset:A,rawFilename:v,rawExtraFieldZip64:E,rawExtraFieldAES:k,rawExtraFieldCDExtendedTimestamp:F,rawExtraFieldNTFS:L,rawExtraField:$,rawComment:j,versionMadeBy:R,headerArray:M,directory:U,zip64:O,zip64UncompressedSize:pe,zip64CompressedSize:V,zip64DiskNumberStart:fe,zip64Offset:G,msDosCompatible:ee,internalFileAttribute:He,externalFileAttribute:ge,diskNumberStart:he,uncompressedSize:yt,compressedSize:dt}=b,bt=K(E,k,F,L,$);X(x,u,hu),z(x,u+4,R);const tt=ve(M);pe||X(tt,18,yt),V||X(tt,14,dt),De(m,M,u+6),z(x,u+30,bt),z(x,u+32,K(j)),z(x,u+34,O&&fe?Be:he),z(x,u+36,He),ge?X(x,u+38,ge):U&&ee&&qn(x,u+38,Fu),X(x,u+42,O&&G?$e:A),De(m,v,u+46),De(m,E,u+46+K(v)),De(m,k,u+46+K(v,E)),De(m,F,u+46+K(v,E,k)),De(m,L,u+46+K(v,E,k,F)),De(m,$,u+46+K(v,E,k,F,L)),De(m,j,u+46+K(v)+bt);const It=46+K(v,j)+bt;if(u-y>s.availableSize&&(s.availableSize=0,await ut(a,m.slice(y,u)),y=u),u+=It,t.onprogress)try{await t.onprogress(w+1,r.size,new ba(b))}catch{}}await ut(a,y?m.slice(y):m);let f=s.diskNumber;const{availableSize:d}=s;d<Tr&&f++;let p=ne(e,t,Jr);if(c>$e||l>$e||h>Be||f>Be){if(p===!1)throw new Error(zr);p=!0}const D=new Uint8Array(p?gu:Tr),g=ve(D);u=0,p&&(X(g,0,xu),Me(g,4,BigInt(44)),z(g,12,45),z(g,14,45),X(g,16,f),X(g,20,o),Me(g,24,BigInt(h)),Me(g,32,BigInt(h)),Me(g,40,BigInt(l)),Me(g,48,BigInt(c)),X(g,56,Du),Me(g,64,BigInt(c)+BigInt(l)),X(g,72,f+1),ne(e,t,"supportZip64SplitFile",!0)&&(f=Be,o=Be),h=Be,c=$e,l=$e,u+=Ni+Li),X(g,u,mu),z(g,u+4,f),z(g,u+6,o),z(g,u+8,h),z(g,u+10,h),X(g,u+12,l),X(g,u+16,c);const _=K(n);if(_)if(_<=Be)z(g,u+20,_);else throw new Error(Rc);await ut(a,D),_&&await ut(a,n)}async function ut(e,n){const t=e.getWriter();try{await t.ready,e.size+=K(n),await t.write(n)}finally{t.releaseLock()}}function vr(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function ne(e,n,t,r){const s=n[t]===oe?e.options[t]:n[t];return s===oe?r:s}function di(e){return e+5*(Math.floor(e/16383)+1)}function qn(e,n,t){e.setUint8(n,t)}function z(e,n,t){e.setUint16(n,t,!0)}function X(e,n,t){e.setUint32(n,t,!0)}function Me(e,n,t){e.setBigUint64(n,t,!0)}function De(e,n,t){e.set(n,t)}function ve(e){return new DataView(e.buffer)}function K(...e){let n=0;return e.forEach(t=>t&&(n+=t.length)),n}let _a;try{_a=import.meta.url}catch{}Yr({baseURL:_a});Dc(Yr);Yr({Deflate:Uo,Inflate:cu});var n0=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,r0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,s0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Ar={Space_Separator:n0,ID_Start:r0,ID_Continue:s0},xe={isSpaceSeparator(e){return typeof e=="string"&&Ar.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Ar.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e===""||e===""||Ar.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}};let Ir,Fe,xt,Gn,Bt,et,ye,Qr,fn;var i0=function(n,t){Ir=String(n),Fe="start",xt=[],Gn=0,Bt=1,et=0,ye=void 0,Qr=void 0,fn=void 0;do ye=a0(),c0[Fe]();while(ye.type!=="eof");return typeof t=="function"?$r({"":fn},"",t):fn};function $r(e,n,t){const r=e[n];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let s=0;s<r.length;s++){const i=String(s),a=$r(r,i,t);a===void 0?delete r[i]:Object.defineProperty(r,i,{value:a,writable:!0,enumerable:!0,configurable:!0})}else for(const s in r){const i=$r(r,s,t);i===void 0?delete r[s]:Object.defineProperty(r,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}return t.call(e,n,r)}let Z,H,ln,ht,W;function a0(){for(Z="default",H="",ln=!1,ht=1;;){W=wt();const e=va[Z]();if(e)return e}}function wt(){if(Ir[Gn])return String.fromCodePoint(Ir.codePointAt(Gn))}function S(){const e=wt();return e===`
|
|
3
|
+
`?(Bt++,et=0):e?et+=e.length:et++,e&&(Gn+=e.length),e}const va={default(){switch(W){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
|
|
4
|
+
`:case"\r":case"\u2028":case"\u2029":S();return;case"/":S(),Z="comment";return;case void 0:return S(),re("eof")}if(xe.isSpaceSeparator(W)){S();return}return va[Fe]()},comment(){switch(W){case"*":S(),Z="multiLineComment";return;case"/":S(),Z="singleLineComment";return}throw se(S())},multiLineComment(){switch(W){case"*":S(),Z="multiLineCommentAsterisk";return;case void 0:throw se(S())}S()},multiLineCommentAsterisk(){switch(W){case"*":S();return;case"/":S(),Z="default";return;case void 0:throw se(S())}S(),Z="multiLineComment"},singleLineComment(){switch(W){case`
|
|
5
|
+
`:case"\r":case"\u2028":case"\u2029":S(),Z="default";return;case void 0:return S(),re("eof")}S()},value(){switch(W){case"{":case"[":return re("punctuator",S());case"n":return S(),Lt("ull"),re("null",null);case"t":return S(),Lt("rue"),re("boolean",!0);case"f":return S(),Lt("alse"),re("boolean",!1);case"-":case"+":S()==="-"&&(ht=-1),Z="sign";return;case".":H=S(),Z="decimalPointLeading";return;case"0":H=S(),Z="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":H=S(),Z="decimalInteger";return;case"I":return S(),Lt("nfinity"),re("numeric",1/0);case"N":return S(),Lt("aN"),re("numeric",NaN);case'"':case"'":ln=S()==='"',H="",Z="string";return}throw se(S())},identifierNameStartEscape(){if(W!=="u")throw se(S());S();const e=Lr();switch(e){case"$":case"_":break;default:if(!xe.isIdStartChar(e))throw pi();break}H+=e,Z="identifierName"},identifierName(){switch(W){case"$":case"_":case"":case"":H+=S();return;case"\\":S(),Z="identifierNameEscape";return}if(xe.isIdContinueChar(W)){H+=S();return}return re("identifier",H)},identifierNameEscape(){if(W!=="u")throw se(S());S();const e=Lr();switch(e){case"$":case"_":case"":case"":break;default:if(!xe.isIdContinueChar(e))throw pi();break}H+=e,Z="identifierName"},sign(){switch(W){case".":H=S(),Z="decimalPointLeading";return;case"0":H=S(),Z="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":H=S(),Z="decimalInteger";return;case"I":return S(),Lt("nfinity"),re("numeric",ht*(1/0));case"N":return S(),Lt("aN"),re("numeric",NaN)}throw se(S())},zero(){switch(W){case".":H+=S(),Z="decimalPoint";return;case"e":case"E":H+=S(),Z="decimalExponent";return;case"x":case"X":H+=S(),Z="hexadecimal";return}return re("numeric",ht*0)},decimalInteger(){switch(W){case".":H+=S(),Z="decimalPoint";return;case"e":case"E":H+=S(),Z="decimalExponent";return}if(xe.isDigit(W)){H+=S();return}return re("numeric",ht*Number(H))},decimalPointLeading(){if(xe.isDigit(W)){H+=S(),Z="decimalFraction";return}throw se(S())},decimalPoint(){switch(W){case"e":case"E":H+=S(),Z="decimalExponent";return}if(xe.isDigit(W)){H+=S(),Z="decimalFraction";return}return re("numeric",ht*Number(H))},decimalFraction(){switch(W){case"e":case"E":H+=S(),Z="decimalExponent";return}if(xe.isDigit(W)){H+=S();return}return re("numeric",ht*Number(H))},decimalExponent(){switch(W){case"+":case"-":H+=S(),Z="decimalExponentSign";return}if(xe.isDigit(W)){H+=S(),Z="decimalExponentInteger";return}throw se(S())},decimalExponentSign(){if(xe.isDigit(W)){H+=S(),Z="decimalExponentInteger";return}throw se(S())},decimalExponentInteger(){if(xe.isDigit(W)){H+=S();return}return re("numeric",ht*Number(H))},hexadecimal(){if(xe.isHexDigit(W)){H+=S(),Z="hexadecimalInteger";return}throw se(S())},hexadecimalInteger(){if(xe.isHexDigit(W)){H+=S();return}return re("numeric",ht*Number(H))},string(){switch(W){case"\\":S(),H+=o0();return;case'"':if(ln)return S(),re("string",H);H+=S();return;case"'":if(!ln)return S(),re("string",H);H+=S();return;case`
|
|
6
|
+
`:case"\r":throw se(S());case"\u2028":case"\u2029":l0(W);break;case void 0:throw se(S())}H+=S()},start(){switch(W){case"{":case"[":return re("punctuator",S())}Z="value"},beforePropertyName(){switch(W){case"$":case"_":H=S(),Z="identifierName";return;case"\\":S(),Z="identifierNameStartEscape";return;case"}":return re("punctuator",S());case'"':case"'":ln=S()==='"',Z="string";return}if(xe.isIdStartChar(W)){H+=S(),Z="identifierName";return}throw se(S())},afterPropertyName(){if(W===":")return re("punctuator",S());throw se(S())},beforePropertyValue(){Z="value"},afterPropertyValue(){switch(W){case",":case"}":return re("punctuator",S())}throw se(S())},beforeArrayValue(){if(W==="]")return re("punctuator",S());Z="value"},afterArrayValue(){switch(W){case",":case"]":return re("punctuator",S())}throw se(S())},end(){throw se(S())}};function re(e,n){return{type:e,value:n,line:Bt,column:et}}function Lt(e){for(const n of e){if(wt()!==n)throw se(S());S()}}function o0(){switch(wt()){case"b":return S(),"\b";case"f":return S(),"\f";case"n":return S(),`
|
|
7
|
+
`;case"r":return S(),"\r";case"t":return S()," ";case"v":return S(),"\v";case"0":if(S(),xe.isDigit(wt()))throw se(S());return"\0";case"x":return S(),u0();case"u":return S(),Lr();case`
|
|
8
|
+
`:case"\u2028":case"\u2029":return S(),"";case"\r":return S(),wt()===`
|
|
9
|
+
`&&S(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw se(S());case void 0:throw se(S())}return S()}function u0(){let e="",n=wt();if(!xe.isHexDigit(n)||(e+=S(),n=wt(),!xe.isHexDigit(n)))throw se(S());return e+=S(),String.fromCodePoint(parseInt(e,16))}function Lr(){let e="",n=4;for(;n-- >0;){const t=wt();if(!xe.isHexDigit(t))throw se(S());e+=S()}return String.fromCodePoint(parseInt(e,16))}const c0={start(){if(ye.type==="eof")throw Nt();Cr()},beforePropertyName(){switch(ye.type){case"identifier":case"string":Qr=ye.value,Fe="afterPropertyName";return;case"punctuator":Bn();return;case"eof":throw Nt()}},afterPropertyName(){if(ye.type==="eof")throw Nt();Fe="beforePropertyValue"},beforePropertyValue(){if(ye.type==="eof")throw Nt();Cr()},beforeArrayValue(){if(ye.type==="eof")throw Nt();if(ye.type==="punctuator"&&ye.value==="]"){Bn();return}Cr()},afterPropertyValue(){if(ye.type==="eof")throw Nt();switch(ye.value){case",":Fe="beforePropertyName";return;case"}":Bn()}},afterArrayValue(){if(ye.type==="eof")throw Nt();switch(ye.value){case",":Fe="beforeArrayValue";return;case"]":Bn()}},end(){}};function Cr(){let e;switch(ye.type){case"punctuator":switch(ye.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=ye.value;break}if(fn===void 0)fn=e;else{const n=xt[xt.length-1];Array.isArray(n)?n.push(e):Object.defineProperty(n,Qr,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")xt.push(e),Array.isArray(e)?Fe="beforeArrayValue":Fe="beforePropertyName";else{const n=xt[xt.length-1];n==null?Fe="end":Array.isArray(n)?Fe="afterArrayValue":Fe="afterPropertyValue"}}function Bn(){xt.pop();const e=xt[xt.length-1];e==null?Fe="end":Array.isArray(e)?Fe="afterArrayValue":Fe="afterPropertyValue"}function se(e){return Hn(e===void 0?`JSON5: invalid end of input at ${Bt}:${et}`:`JSON5: invalid character '${Aa(e)}' at ${Bt}:${et}`)}function Nt(){return Hn(`JSON5: invalid end of input at ${Bt}:${et}`)}function pi(){return et-=5,Hn(`JSON5: invalid identifier character at ${Bt}:${et}`)}function l0(e){console.warn(`JSON5: '${Aa(e)}' in strings is not valid ECMAScript; consider escaping`)}function Aa(e){const n={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(n[e])return n[e];if(e<" "){const t=e.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return e}function Hn(e){const n=new SyntaxError(e);return n.lineNumber=Bt,n.columnNumber=et,n}var f0=function(n,t,r){const s=[];let i="",a,o,u="",l;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(r=t.space,l=t.quote,t=t.replacer),typeof t=="function")o=t;else if(Array.isArray(t)){a=[];for(const f of t){let d;typeof f=="string"?d=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(d=String(f)),d!==void 0&&a.indexOf(d)<0&&a.push(d)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r=="number"?r>0&&(r=Math.min(10,Math.floor(r)),u=" ".substr(0,r)):typeof r=="string"&&(u=r.substr(0,10)),c("",{"":n});function c(f,d){let p=d[f];switch(p!=null&&(typeof p.toJSON5=="function"?p=p.toJSON5(f):typeof p.toJSON=="function"&&(p=p.toJSON(f))),o&&(p=o.call(d,f,p)),p instanceof Number?p=Number(p):p instanceof String?p=String(p):p instanceof Boolean&&(p=p.valueOf()),p){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof p=="string")return h(p);if(typeof p=="number")return String(p);if(typeof p=="object")return Array.isArray(p)?y(p):m(p)}function h(f){const d={"'":.1,'"':.2},p={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let D="";for(let _=0;_<f.length;_++){const w=f[_];switch(w){case"'":case'"':d[w]++,D+=w;continue;case"\0":if(xe.isDigit(f[_+1])){D+="\\x00";continue}}if(p[w]){D+=p[w];continue}if(w<" "){let b=w.charCodeAt(0).toString(16);D+="\\x"+("00"+b).substring(b.length);continue}D+=w}const g=l||Object.keys(d).reduce((_,w)=>d[_]<d[w]?_:w);return D=D.replace(new RegExp(g,"g"),p[g]),g+D+g}function m(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let d=i;i=i+u;let p=a||Object.keys(f),D=[];for(const _ of p){const w=c(_,f);if(w!==void 0){let b=x(_)+":";u!==""&&(b+=" "),b+=w,D.push(b)}}let g;if(D.length===0)g="{}";else{let _;if(u==="")_=D.join(","),g="{"+_+"}";else{let w=`,
|
|
10
|
+
`+i;_=D.join(w),g=`{
|
|
11
|
+
`+i+_+`,
|
|
12
|
+
`+d+"}"}}return s.pop(),i=d,g}function x(f){if(f.length===0)return h(f);const d=String.fromCodePoint(f.codePointAt(0));if(!xe.isIdStartChar(d))return h(f);for(let p=d.length;p<f.length;p++)if(!xe.isIdContinueChar(String.fromCodePoint(f.codePointAt(p))))return h(f);return f}function y(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let d=i;i=i+u;let p=[];for(let g=0;g<f.length;g++){const _=c(String(g),f);p.push(_!==void 0?_:"null")}let D;if(p.length===0)D="[]";else if(u==="")D="["+p.join(",")+"]";else{let g=`,
|
|
13
|
+
`+i,_=p.join(g);D=`[
|
|
14
|
+
`+i+_+`,
|
|
15
|
+
`+d+"]"}return s.pop(),i=d,D}};const d0={parse:i0,stringify:f0};var p0=d0,es=10**-4;function Hl(e){return e*Math.PI/180}function Ie(e){return 180*e/Math.PI}function te(e){let n=e;return Math.abs(n)<es&&(n=0),n}function Mt(e){let n=e%(2*Math.PI);return n<0&&(n+=2*Math.PI),n}function le(e){let n=Mt(e);return n>Math.PI&&(n-=2*Math.PI),n}function ot(e){let n=e%Math.PI;return n<0&&(n+=Math.PI),n}function Ne(e){let n=ot(e);return n>Math.PI/2&&(n-=Math.PI),n}function Nr(e,n,t){const r=le(n)-le(e);return t?Mt(r):Mt(r)-2*Math.PI}function Ca(e,n,t,r){let s=!1;if(te(le(e-n))===0)s=!0;else if(te(le(e-t))===0)s=!0;else{const i=Nr(n,t,r),a=Nr(n,e,r);Math.abs(a)<Math.abs(i)&&(s=!0)}return s}function ct(e){return e.toFixed(2)}var me={point:"grey",line:"grey",vector:"DarkTurquoise",contour:"green",mainOuter:"SlateBlue",mainInner:"SteelBlue",mainB:"SlateGrey",second:"Violet",secondB:"SlateGrey",dynamics:"Tomato",ruler:"blue",origin:"red",reference:"blue",mouse:"yellow"},zt=.05;function Vt(e,n,t){const r=t.shiftX+(e-t.xMin)*t.scaleX,s=t.shiftY+(n-t.yMin)*t.scaleY;return[r,s]}function Zl(e,n,t){const r=(e-t.shiftX)/t.scaleX+t.xMin,s=(n-t.shiftY)/t.scaleY+t.yMin;return[r,s]}function Ea(e,n){if(te(n.scaleX-Math.abs(n.scaleY))!==0)throw`err683: iAdjust.scaleX and scaleY differ ${n.scaleX} ${n.scaleY}`;if(n.scaleX<0)throw`err684: iAdjust.scaleX ${n.scaleX} is negative`;const t=e*n.scaleX;if(t<0)throw`err685: rRadius for canvas ${t} is negative`;return t}function Rr(){return{init:0,xMin:0,yMin:0,xyDiff:1,shiftX:0,shiftY:0,scaleX:1,scaleY:1}}function zn(e){return{init:e.init,xMin:e.xMin,yMin:e.yMin,xyDiff:e.xyDiff,shiftX:e.shiftX,shiftY:e.shiftY,scaleX:e.scaleX,scaleY:e.scaleY}}function Or(e,n,t,r,s,i){const a=Rr(),o=Math.max(n-e,1),u=Math.max(r-t,1),l=s/o,c=i/u;let h=.9*l,m=o;return c<l&&(h=.9*c,m=u),a.init=1,a.xMin=e,a.yMin=t,a.xyDiff=m,a.shiftX=zt*s,a.scaleX=h,a.shiftY=i-zt*i,a.scaleY=-1*h,a}function Yl(e,n,t){const r=zn(t);return r.xMin=e-r.xyDiff/2,r.yMin=n-r.xyDiff/2,r}function Wl(e,n,t,r,s,i){const a=Math.min(e,t),o=Math.max(e,t),u=Math.min(n,r),l=Math.max(n,r);return Or(a,o,u,l,s,i)}function Xl(e,n){const t=zn(n),r=(1-e)/2;return t.xMin+=r*n.xyDiff,t.yMin+=r*n.xyDiff,t.xyDiff*=e,t.scaleX*=1/e,t.scaleY*=1/e,t}function Kl(e,n,t,r,s){const i=zn(s),a=t-e,o=r-n;return i.xMin+=-a,i.yMin+=-o,i}function Jl(e,n,t){const r=zn(t);if(e>0&&n>0){const s=e/n;r.xyDiff*=s,r.scaleX*=1/s,r.scaleY*=1/s,r.shiftX+=zt*n-zt*e,r.shiftY+=(1-zt)*n-(1-zt)*e}return r}function Qn(e,n){let t=0;if(n>e)throw`err539: ila < ilc ${e} ${n}`;return t=Math.sqrt(e**2-n**2),t}function zl(e,n,t){return Math.sqrt(e**2+n**2-2*e*n*Math.cos(t))}function hi(e,n,t){let r=0;const s=[e,n,t];for(let a=0;a<s.length;a++)if(s[a]<0)throw`err209: l3[${a}] = ${s[a]}`;const i=s.sort(function(a,o){return o-a});if(i[0]>i[1]+i[2])throw`err839: impossible triangle with length ${e}, ${n} and ${t}`;return r=Math.acos((e**2+n**2-t**2)/(2*e*n)),r}function mi(e,n,t){let r=0;const s=[e,n,t];for(let u=0;u<s.length;u++)if(te(s[u])===0||s[u]<0)throw`err329: negative or zero triangle-args ${u} : ${s[u]}`;const i=ot(n),a=ot(t);if(i+a>Math.PI)throw`err939: impossible triangle with angles ${n} and ${t}`;return r=e*Math.sin(t)/Math.sin(n),r}function Ql(e,n,t){let r=0;const s=[e,n,t];for(let i=0;i<s.length;i++)if(s[i]<=0)throw`err429: negative or zero triangle-args ${i} : ${s[i]}`;return r=Math.asin(n*Math.sin(t)/e),r}var h0=(e=>(e[e.eDefault=0]="eDefault",e[e.eCircle=1]="eCircle",e[e.eCross=2]="eCross",e[e.eSquare=3]="eSquare",e[e.eBigSquare=4]="eBigSquare",e[e.eTwoTri=5]="eTwoTri",e[e.eTri1=6]="eTri1",e[e.eTri2=7]="eTri2",e[e.eTri3=8]="eTri3",e[e.eTri4=9]="eTri4",e))(h0||{}),Ue=class Xt{constructor(n,t,r=0){I(this,"cx");I(this,"cy");I(this,"shape");this.cx=n,this.cy=t,this.shape=r}draw(n,t,r=me.point,s=0){if(isFinite(this.cx)&&isFinite(this.cy)){const i=n.canvas.width*.006999999999999999,a=2*i,[o,u]=Vt(this.cx,this.cy,t);let l=s;switch(l===0&&(l=this.shape),n.beginPath(),l){case 2:n.moveTo(o-a,u),n.lineTo(o+a,u),n.moveTo(o,u-a),n.lineTo(o,u+a);break;case 3:n.rect(o-i,u-i,2*i,2*i);break;case 4:n.rect(o-2*i,u-2*i,4*i,4*i);break;case 5:n.moveTo(o-a,u),n.lineTo(o+a,u),n.lineTo(o,u+a),n.lineTo(o,u-a),n.lineTo(o-a,u);break;case 6:n.moveTo(o-a,u),n.lineTo(o+a,u),n.lineTo(o,u-a),n.lineTo(o,u+a);break;case 7:n.moveTo(o+a,u),n.lineTo(o-a,u),n.lineTo(o,u-a),n.lineTo(o,u+a);break;case 8:n.moveTo(o+a,u),n.lineTo(o-a,u),n.lineTo(o,u+a),n.lineTo(o,u-a);break;case 9:n.moveTo(o-a,u),n.lineTo(o+a,u),n.lineTo(o,u+a),n.lineTo(o,u-a);break;case 1:default:n.arc(o,u,i,0,2*Math.PI)}n.strokeStyle=r,n.stroke()}else console.log(`INFO489: point not draw because of infinity ${this.cx} ${this.cy}`)}distanceOrig(){return Math.sqrt(this.cx**2+this.cy**2)}angleOrig(){return Math.atan2(this.cy,this.cx)}getPolar(){return[this.angleOrig(),this.distanceOrig()]}setPolar(n,t){return new Xt(t*Math.cos(n),t*Math.sin(n))}translate(n,t){return new Xt(this.cx+n,this.cy+t)}translatePolar(n,t){return new Xt(this.cx+t*Math.cos(n),this.cy+t*Math.sin(n))}clone(n=0){return new Xt(this.cx,this.cy,n)}rotateOrig(n){const t=this.getPolar();return this.setPolar(t[0]+n,t[1])}scaleOrig(n){const t=this.getPolar();return this.setPolar(t[0],t[1]*n)}rotate(n,t){const s=this.translate(-1*n.cx,-1*n.cy).getPolar();return this.setPolar(s[0]+t,s[1]).translate(n.cx,n.cy)}scale(n,t){const s=this.translate(-1*n.cx,-1*n.cy).getPolar();return this.setPolar(s[0],s[1]*t).translate(n.cx,n.cy)}isEqual(n){return te(this.cx-n.cx)===0&&te(this.cy-n.cy)===0}distanceToPoint(n){return Math.sqrt((n.cx-this.cx)**2+(n.cy-this.cy)**2)}angleToPoint(n){if(te(this.distanceToPoint(n))===0)throw`err434: no angle because points identical ${this.cx} ${n.cx} ${this.cy} ${n.cy}`;return Math.atan2(n.cy-this.cy,n.cx-this.cx)}angleFromToPoints(n,t){const r=this.angleToPoint(n),s=this.angleToPoint(t);return le(s-r)}middlePoint(n){const t=(this.cx+n.cx)/2,r=(this.cy+n.cy)/2;return new Xt(t,r)}equidistantPoint(n,t,r){const s=this.distanceToPoint(n)/2;if(this.isEqual(n))throw`err633: no equidistance because identical point ${this.cx} ${this.cy}`;if(t<s)throw`err392: equidistance ${t} smaller than lp1p2h ${s}`;const i=this.middlePoint(n),a=this.angleToPoint(n)+Math.PI/2,o=Math.sqrt(t**2-s**2),u=i.translatePolar(a,o),l=i.translatePolar(a+Math.PI,o),c=r.distanceToPoint(u),h=r.distanceToPoint(l);if(o!==0&&c===h)throw`err284: magnet point p3 is on line p1p2. cx ${r.cx} cy: ${r.cy}`;let m=u;return h<c&&(m=l),m}};function Y(e,n,t=0){return new Ue(e,n,t)}function Fa(e){let n=0,t=0,r=0,s=0;if(e.length>0){const i=e[0];if(i.cx===Number.NEGATIVE_INFINITY||i.cx===Number.POSITIVE_INFINITY||i.cy===Number.NEGATIVE_INFINITY||i.cy===Number.POSITIVE_INFINITY)throw`err292: pointMinMax first point with infinity: ${i.cx} ${i.cy}`;n=e[0].cx,t=e[0].cx,r=e[0].cy,s=e[0].cy;for(const a of e)a.cx!==Number.NEGATIVE_INFINITY&&(n=Math.min(n,a.cx)),a.cx!==Number.POSITIVE_INFINITY&&(t=Math.max(t,a.cx)),a.cy!==Number.NEGATIVE_INFINITY&&(r=Math.min(r,a.cy)),a.cy!==Number.POSITIVE_INFINITY&&(s=Math.max(s,a.cy))}return[n,t,r,s]}var m0=class Te{constructor(n,t,r){I(this,"cx");I(this,"cy");I(this,"ca");this.cx=n,this.cy=t,this.ca=r}draw(n,t,r=me.line){const s=n.canvas.width*2,[i,a]=Vt(this.cx-s*Math.cos(this.ca),this.cy-s*Math.sin(this.ca),t),[o,u]=Vt(this.cx+2*s*Math.cos(this.ca),this.cy+2*s*Math.sin(this.ca),t);n.beginPath(),n.moveTo(i,a),n.lineTo(o,u),n.strokeStyle=r,n.stroke()}setFromPoints(n,t){return this.cx=n.cx,this.cy=n.cy,this.ca=n.angleToPoint(t),this}getAffine(){const n={quasiVertical:!1,ha:0,hb:0,va:0,vb:0};return Math.abs(Ne(this.ca))>Math.PI/4?(n.quasiVertical=!0,n.va=-1*Math.tan(Ne(this.ca-Math.PI/2)),n.vb=this.cx-n.va*this.cy):(n.ha=Math.tan(Ne(this.ca)),n.hb=this.cy-n.ha*this.cx),n}setAffine(n){const t=new Te(0,0,0);return n.quasiVertical?(t.ca=Math.PI/2-Math.atan(n.va),t.cx=n.vb,t.cy=0):(t.ca=Math.atan(n.ha),t.cx=0,t.cy=n.hb),t}intersection(n){if(this.isParallel(n))throw`err902: no intersection, lines are parallel ca1: ${this.ca} ca2: ${n.ca}`;let t=0,r=0;const s=this.getAffine(),i=n.getAffine();return s.quasiVertical?i.quasiVertical?(r=(s.vb-i.vb)/(i.va-s.va),t=s.va*r+s.vb):(t=(s.va*i.hb+s.vb)/(1-s.va*i.ha),r=i.ha*t+i.hb):i.quasiVertical?(r=(s.ha*i.vb+s.hb)/(1-s.ha*i.va),t=i.va*r+i.vb):(t=(s.hb-i.hb)/(i.ha-s.ha),r=s.ha*t+s.hb),Y(t,r)}getAxisXIntersection(){const n=new Te(0,0,0);return this.intersection(n).cx}getAxisYIntersection(){const n=new Te(0,0,Math.PI/2);return this.intersection(n).cy}getAxisXIntersecTri(){let n=1/0;if(te(Ne(this.ca))!==0){const t=new Ue(this.cx,this.cy),r=ot(this.ca),s=t.angleOrig(),i=t.distanceOrig();if(te(i)===0)n=0;else if(te(Ne(r-s))===0)n=0;else{const a=Math.min(r,Math.PI-r),o=le(r-s),u=Math.min(Math.abs(o),Math.PI-Math.abs(o));n=Math.sign(o)*mi(i,a,u)}}return n}getAxisYIntersecTri(){let n=1/0;if(te(Ne(this.ca-Math.PI/2))!==0){const t=new Ue(this.cx,this.cy),r=Ne(this.ca),s=t.angleOrig(),i=t.distanceOrig(),a=Ne(r-s);if(te(i)===0)n=0;else if(te(a)===0)n=0;else{const o=ot(r-Math.PI/2),u=-1*le(r-s),l=Math.min(o,Math.PI-o),c=Math.min(Math.abs(u),Math.PI-Math.abs(u));n=Math.sign(u)*mi(i,l,c)}}return n}angleOrig(){const t=new Ue(this.cx,this.cy).angleOrig(),r=Ne(this.ca),s=-1*le(r-t);let i=0;return s<0&&(i=-Math.PI),ot(Math.PI/2+this.ca)+i}distanceOrig(){const n=this.angleOrig(),t=new Ue(this.cx,this.cy),r=t.angleOrig(),s=t.distanceOrig(),i=Ne(r-n);return s*Math.cos(i)}projectOrig(){const n=this.angleOrig(),t=this.distanceOrig();return Y(0,0).setPolar(n,t)}translate(n,t){return new Te(this.cx+n,this.cy+t,this.ca)}rotateOrig(n){const t=new Ue(this.cx,this.cy).rotateOrig(n);return new Te(t.cx,t.cy,le(this.ca+n))}scaleOrig(n){const t=new Ue(this.cx,this.cy).scaleOrig(n);return new Te(t.cx,t.cy,this.ca)}rotate(n,t){const r=new Ue(this.cx,this.cy).rotate(n,t);return new Te(r.cx,r.cy,le(this.ca+t))}scale(n,t){const r=new Ue(this.cx,this.cy).scale(n,t);return new Te(r.cx,r.cy,this.ca)}clone(){const n=new Ue(this.cx,this.cy);return new Te(n.cx,n.cy,this.ca)}lineOrthogonal(n){return new Te(n.cx,n.cy,this.ca+Math.PI/2)}lineParallel(n){return new Te(n.cx,n.cy,this.ca)}distanceToPoint(n){let t=0;const r=new Ue(this.cx,this.cy),s=r.distanceToPoint(n);if(te(s)!==0){const i=r.angleToPoint(n),a=Ne(i-this.ca);t=s*Math.abs(Math.sin(a))}return t}projectPoint(n){let t=0;const r=new Ue(this.cx,this.cy),s=r.distanceToPoint(n);if(te(s)!==0){const a=r.angleToPoint(n),o=le(a-this.ca);t=s*Math.cos(o)}return r.translatePolar(this.ca,t)}isParallel(n){return te(Ne(this.ca-n.ca))===0}isOrthogonal(n){return te(Ne(Math.PI/2+this.ca-n.ca))===0}isEqual(n){const t=Y(n.cx,n.cy),r=this.distanceToPoint(t);return te(r)===0&&this.isParallel(n)}bisector(n,t){const r=this.intersection(n),s=ot(this.ca),i=ot(n.ca),a=Math.min(s,i),o=Math.max(s,i),u=[a,o,a+Math.PI,o+Math.PI,a],l=r.angleToPoint(t);let c=0;for(let x=0;x<4;x++){const y=le(u[x]-l),f=le(u[x+1]-l);if(y===0||f===0)throw`err419: bad reference point for bisecor ${t.cx} ${t.cy}`;y<0&&f>0&&(c=x)}const m=ot((a+o)/2)+c*Math.PI/2;return new Te(r.cx,r.cy,m)}lineParallelDistance(n,t,r){const s=Y(this.cx,this.cy),i=s.translatePolar(this.ca+Math.PI/2,n),a=s.translatePolar(this.ca-Math.PI/2,n);let o=a,u=t;return te(this.distanceToPoint(u))===0&&(u=r),u.distanceToPoint(i)<u.distanceToPoint(a)&&(o=i),new Te(o.cx,o.cy,this.ca)}};function er(e,n,t){return new m0(e,n,t)}function wn(e,n){return er(0,0,0).setFromPoints(e,n)}function jr(e,n){if(e.isEqual(n))throw`err546: no bisector with two same points cx: ${e.cx} cy: ${e.cy}`;const t=e.middlePoint(n),r=ot(e.angleToPoint(n)+Math.PI/2);return er(t.cx,t.cy,r)}function x0(e,n,t){if(e.isEqual(n)||n.isEqual(t)||e.isEqual(t))throw`err833: no bisector with two same points cx: ${e.cx} cy: ${e.cy}`;const r=jr(e,n),s=jr(n,t);return r.intersection(s)}function Ke(e){let n=!1;return(e===0||e===1)&&(n=!0),n}function cn(e){let n=!1;return(Ke(e)||e===6)&&(n=!0),n}function On(e){let n=!1;return(e===3||e===4||e===5)&&(n=!0),n}function Er(e){let n=!1;return(e===2||On(e))&&(n=!0),n}var Qe=class Sa{constructor(n,t,r,s,i=!1,a=!1){I(this,"sType");I(this,"px");I(this,"py");I(this,"radius");I(this,"arcLarge");I(this,"arcCcw");this.sType=n,this.px=t,this.py=r,this.radius=s,this.arcLarge=i,this.arcCcw=a}clone(){return new Sa(this.sType,this.px,this.py,this.radius,this.arcLarge,this.arcCcw)}},Ge=class{constructor(e,n,t,r,s,i,a,o=!1){I(this,"sType");I(this,"p1");I(this,"p2");I(this,"pc");I(this,"radius");I(this,"a1");I(this,"a2");I(this,"arcCcw");this.sType=e,this.p1=n,this.p2=t,this.pc=r,this.radius=s,this.a1=i,this.a2=a,this.arcCcw=o}},D0=class{constructor(){I(this,"debugPoints");I(this,"debugLines");I(this,"logMessage");this.debugPoints=[],this.debugLines=[],this.logMessage=""}addPoint(e){this.debugPoints.push(e)}getPoints(){return this.debugPoints}clearPoints(){this.debugPoints=[]}addLine(e){this.debugLines.push(e)}getLines(){return this.debugLines}clearLines(){this.debugLines=[]}addMsg(e){this.logMessage+=e}getMsg(){return this.logMessage}clearMsg(){this.logMessage=""}},kt=new D0;function Tt(e,n,t){if(t.sType!==1)throw`err202: arcSeg1To2 has unexpected type ${t.sType}`;const r=Y(e,n),s=Y(t.px,t.py),i=r.distanceToPoint(s)/2;if(r.isEqual(s))throw`err638: no equidistance because identical point ${r.cx} ${s.cy}`;let a=0;if(te(t.radius-i)===0)a=0;else{if(t.radius<i)throw`err399: radius ${t.radius} smaller than lp1p2h ${i}`;a=Qn(t.radius,i)}const o=r.middlePoint(s),u=r.angleToPoint(s)+Math.PI/2,l=o.translatePolar(u,a),c=o.translatePolar(u+Math.PI,a);let h=l;(!t.arcLarge&&!t.arcCcw||t.arcLarge&&t.arcCcw)&&(h=c);const m=h.angleToPoint(r),x=h.angleToPoint(s);return new Ge(1,r,s,h,t.radius,m,x,t.arcCcw)}function g0(e){let n=Mt(e.a2-e.a1);e.arcCcw||(n=2*Math.PI-n);let t=!1;return n>Math.PI&&(t=!0),new Qe(1,e.p2.cx,e.p2.cy,e.radius,t,e.arcCcw)}function w0(e,n,t){const r=e.p1,s=e.p2,i=t.p1,a=t.p2;if(!s.isEqual(i))throw`err309: makeCorner-prepare p2 and p2b differ px ${s.cx} ${i.cx} py ${s.cy} ${i.cy}`;let o=s.angleToPoint(r);if(e.sType===1){const f=e.arcCcw?1:-1;o=e.a2-f*Math.PI/2}let u=s.angleToPoint(a);if(t.sType===1){const f=t.arcCcw?1:-1;u=t.a1+f*Math.PI/2}const l=u-o;let h=le(l)/2;if(te(h)===0){const f=es*.01;if(e.sType===0&&t.sType===1)h=t.arcCcw?f:-f;else if(e.sType===1&&t.sType===0)h=e.arcCcw?f:-f;else if(e.sType===0&&t.sType===0)throw`err402: prepare aPeakHalf too closed to zero ${h}`}const m=o+h,x=s.translatePolar(m,n.radius);return{s1:e,s2:n,s3:t,ra:n.radius,p1:r,p2:s,p3:a,p4:e.pc,p5:t.pc,p6:x,at1:o,at3:u,abi:m,aph:h}}function Zn(e,n,t){if(n.sType!==1)throw`err510: modifRadius with wrong type ${n.sType}`;const r=e>0?1:-1,s=n.arcCcw?1:-1,i=te(e)===0?1:r*s,a=n.radius+i*t;if(a<=0)throw`err621: modifRadius with negative modified lenght ${a}`;return a}function ts(e,n,t,r){const s=t.translatePolar(e,n),i=t.translatePolar(e+Math.PI,n),a=r.distanceToPoint(s),o=r.distanceToPoint(i);return a<o?s:i}function xi(e,n,t,r,s){const i=e.translatePolar(n-t,r),a=e.translatePolar(n+t,r),o=s.distanceToPoint(i),u=s.distanceToPoint(a);return o<u?-1:1}function tr(e,n){const t=n.clone(),r=e.p1.clone(),s=e.p2;if(e.sType!==0)throw`err103: newStrokeFirst unexpected sType ${e.sType}`;const i=wn(r,s).distanceToPoint(t);if(te(i)!==0)throw`err104: newStrokeFirst new point not aligned ${i} ${t.cx} ${t.cy}`;const a=r.angleToPoint(s),o=r.angleToPoint(t);if(te(le(o-a))!==0)throw`err105: newStrokeFirst new point miss aligned ${a} ${o} ${t.cx} ${t.cy}`;const u=r.distanceToPoint(t),l=r.distanceToPoint(s);if(l<u)throw`err106: newStrokeFirst new point out of scope ${l} ${u} ${t.cx} ${t.cy}`;const c=Y(0,0);return new Ge(0,r,t,c,0,0,0,!1)}function nr(e,n){const t=n.clone(),r=e.p2.clone(),s=e.p1;if(e.sType!==0)throw`err203: newStrokeSecond unexpected sType ${e.sType}`;const i=wn(r,s).distanceToPoint(t);if(te(i)!==0)throw`err204: newStrokeSecond new point not aligned ${i} ${t.cx} ${t.cy}`;const a=r.angleToPoint(s),o=r.angleToPoint(t);if(te(le(o-a))!==0)throw`err205: newStrokeSecond new point miss aligned ${a} ${o} ${t.cx} ${t.cy}`;const u=r.distanceToPoint(t),l=r.distanceToPoint(s);if(l<u)throw`err206: newStrokeSecond new point out of scope ${l} ${u} ${t.cx} ${t.cy}`;const c=Y(0,0);return new Ge(0,t,r,c,0,0,0,!1)}function rr(e,n){if(e.sType!==1)throw`err203: newArcFirst unexpected sType ${e.sType}`;const t=e.p1.clone(),r=e.pc.clone(),s=n.clone(),i=r.angleToPoint(s);if(!Ca(i,e.a1,e.a2,e.arcCcw))throw`err908: newArcFirst a48 out of scope ${i} ${e.a1} ${e.a2} ${e.arcCcw}`;return new Ge(1,t,s,r,e.radius,e.a1,i,e.arcCcw)}function sr(e,n){if(e.sType!==1)throw`err204: newArcSecond unexpected sType ${e.sType}`;const t=e.p2.clone(),r=e.pc.clone(),s=n.clone(),i=r.angleToPoint(s);if(!Ca(i,e.a1,e.a2,e.arcCcw))throw`err907: newArcSecond a59 out of scope ${i} ${e.a1} ${e.a2} ${e.arcCcw}`;return new Ge(1,s,t,r,e.radius,i,e.a2,e.arcCcw)}function yn(e,n,t,r,s,i){const a=e.clone(),o=n.clone(),u=t.clone(),l=u.distanceToPoint(a),c=u.distanceToPoint(o);if(te(l-r)!==0||te(c-r)!==0)throw`err610: newRounded not on circle ${r} ${l} ${c}`;const h=u.angleToPoint(a),m=u.angleToPoint(o),x=le(h-i+Math.PI),y=le(m-i+Math.PI);Math.abs(y-x)>Math.PI+es&&kt.addMsg(`warn882: newRounded a873 or a972 larger than PI/2 ${ct(x)} ${ct(y)} at ${ct(u.cx)} ${ct(u.cy)}
|
|
16
|
+
`);const f=!(s>0);return new Ge(1,a,o,u,r,h,m,f)}function y0(e){const n=Math.abs(e.ra/Math.sin(e.aph)),t=n*Math.cos(e.aph),r=e.p2.translatePolar(e.abi,n),s=e.p2.translatePolar(e.at1,t),i=e.p2.translatePolar(e.at3,t),a=[];return a.push(tr(e.s1,s)),a.push(yn(s,i,r,e.ra,e.aph,e.abi)),a.push(nr(e.s3,i)),a}function b0(e){const t=wn(e.p1,e.p2).lineParallelDistance(e.ra,e.p6,e.p5),r=t.projectPoint(e.p5),s=r.distanceToPoint(e.p5),i=Zn(e.aph,e.s3,e.ra),a=Qn(i,s),o=ts(t.ca,a,r,e.p6),u=e.p5.angleToPoint(o),l=e.p5.translatePolar(u,e.s3.radius),c=e.p2.angleFromToPoints(e.p1,o),m=Math.abs(e.ra/Math.sin(c))*Math.cos(c),x=e.p2.angleToPoint(e.p1),y=e.p2.translatePolar(x,m),f=[];return f.push(tr(e.s1,y)),f.push(yn(y,l,o,e.ra,e.aph,e.abi)),f.push(sr(e.s3,l)),f}function _0(e){const t=wn(e.p3,e.p2).lineParallelDistance(e.ra,e.p6,e.p4),r=t.projectPoint(e.p4),s=r.distanceToPoint(e.p4),i=Zn(e.aph,e.s1,e.ra),a=Qn(i,s),o=ts(t.ca,a,r,e.p6),u=e.p4.angleToPoint(o),l=e.p4.translatePolar(u,e.s1.radius),c=e.p2.angleFromToPoints(e.p3,o),m=Math.abs(e.ra/Math.sin(c))*Math.cos(c),x=e.p2.angleToPoint(e.p3),y=e.p2.translatePolar(x,m),f=[];return f.push(rr(e.s1,l)),f.push(yn(l,y,o,e.ra,e.aph,e.abi)),f.push(nr(e.s3,y)),f}function v0(e){const n=Zn(e.aph,e.s1,e.ra),t=Zn(e.aph,e.s3,e.ra),r=e.p4.distanceToPoint(e.p5),s=e.p4.angleToPoint(e.p5),i=hi(r,n,t),a=xi(e.p4,s,i,n,e.p6),o=s+a*i,u=e.p4.translatePolar(o,n),l=e.p4.translatePolar(o,e.s1.radius),c=Math.PI+s,h=hi(r,t,n),m=xi(e.p5,c,h,t,e.p6),x=c+m*h,y=e.p5.translatePolar(x,t);if(!y.isEqual(u))throw`err909: roundArcArc p7 anf p7b differ ${u.cx} ${y.cx} ${u.cy} ${y.cy} 0`;const f=e.p5.translatePolar(x,e.s3.radius),d=[];return d.push(rr(e.s1,l)),d.push(yn(l,f,u,e.ra,e.aph,e.abi)),d.push(sr(e.s3,f)),d}function ka(e){const n=e.abi-2*e.aph,t=e.abi+2*e.aph;let r=e.p6.translatePolar(n,e.ra),s=e.p6.translatePolar(t,e.ra);if(e.s1.sType===1){const u=e.p4.angleFromToPoints(e.p2,e.p6),c=e.p4.angleToPoint(e.p2)+2*u;r=e.p4.translatePolar(c,e.s1.radius)}if(e.s3.sType===1){const u=e.p5.angleFromToPoints(e.p2,e.p6),c=e.p5.angleToPoint(e.p2)+2*u;s=e.p5.translatePolar(c,e.s3.radius)}const i=!(e.aph>0),a=new Ge(1,r,s,e.p6,e.ra,n,t,i),o=[];return e.s1.sType===0?o.push(tr(e.s1,r)):e.s1.sType===1&&o.push(rr(e.s1,r)),o.push(a),e.s3.sType===0?o.push(nr(e.s3,s)):e.s3.sType===1&&o.push(sr(e.s3,s)),o}function Di(e,n,t,r){let s=t,i=t;const a=r.p6.angleFromToPoints(r.p2,t);if(Math.abs(a)>Math.PI/2){i=r.p6.translatePolar(r.abi+e*Math.PI/2,r.ra);const o=er(i.cx,i.cy,r.abi);if(n.sType===0)s=wn(n.p1,n.p2).intersection(o);else if(n.sType===1){const u=o.projectPoint(n.pc),l=u.distanceToPoint(n.pc);if(l<n.radius){const c=Qn(n.radius,l);s=ts(r.abi,c,u,t)}else kt.addMsg(`warn222: wideAccess not possible on arc ${ct(n.radius)} ${ct(l)} at ${ct(t.cx)} ${ct(t.cy)}
|
|
17
|
+
`),s=t,i=t}}return[s,i]}function A0(e){const n=ka(e),t=n[1].arcCcw?1:-1,[r,s]=Di(t,e.s1,n[1].p1,e),[i,a]=Di(-t,e.s3,n[1].p2,e),o=[];if(r.isEqual(s))o.push(n[0]);else{e.s1.sType===0?o.push(tr(e.s1,r)):e.s1.sType===1&&o.push(rr(e.s1,r));const u=Y(0,0),l=new Ge(0,r,s,u,0,0,0,!1);o.push(l)}if(o.push(yn(s,a,e.p6,e.ra,e.aph,e.abi)),i.isEqual(a))o.push(n[2]);else{const u=Y(0,0),l=new Ge(0,a,i,u,0,0,0,!1);o.push(l),e.s3.sType===0?o.push(nr(e.s3,i)):e.s3.sType===1&&o.push(sr(e.s3,i))}return o}function gi(e,n,t){const r=w0(e,n,t),s=[];if(n.sType===3)if(e.sType===0&&t.sType===0)s.push(...y0(r));else if(e.sType===0&&t.sType===1)s.push(...b0(r));else if(e.sType===1&&t.sType===0)s.push(..._0(r));else if(e.sType===1&&t.sType===1)s.push(...v0(r));else throw`err123: makeCorner unexpected s1s3.sType ${e.sType} ${t.sType}`;else if(n.sType===4)s.push(...ka(r));else if(n.sType===5)s.push(...A0(r));else throw`err723: makeCorner unexpected s2.sType ${n.sType}`;return s}function at(e){return e.toFixed(4)}function C0(e,n,t,r=""){let s=r;return s===""&&(s="black"),`<circle cx="${at(e)}" cy="${at(n)}" r="${at(t)}" stroke="${s}" stroke-width="1" fill="none" />`}var E0=class{constructor(){I(this,"pathD");this.pathD=""}addStart(e,n){this.pathD=`M ${at(e)} ${at(n)}`}addStroke(e,n){this.pathD+=` L ${at(e)} ${at(n)}`}addArc(e,n,t,r,s){const i=at(t),a=r?1:0,o=s?1:0;this.pathD+=` A ${i} ${i} 0 ${a} ${o} ${at(e)} ${at(n)}`}stringify(e=""){let n=e;return n===""&&(n="black"),`<path d="${this.pathD} Z" stroke="${n}" stroke-width="1" fill="none" />`}};function F0(){return new E0}var S0=class{constructor(){I(this,"svgStr");I(this,"payloadStr");I(this,"groupActive");this.payloadStr="",this.svgStr="",this.groupActive=!1}addHeader(e,n,t,r){const s=`${e} ${t} ${n} ${r}`;this.svgStr=`<svg width="${n}" height="${r}" viewBox="${s}" xmlns="http://www.w3.org/2000/svg">`}addSvgString(e){this.payloadStr+=e}addGroup(e){if(this.groupActive)throw"err321: group must be closed before opening a new one";this.groupActive=!0,this.payloadStr+=`<g id="${e}">`}closeGroup(){if(!this.groupActive)throw"err331: group is not active so can not be closed";this.groupActive=!1,this.payloadStr+="</g>"}closeSvg(){if(this.svgStr==="")throw"err301: no header set for the svg";if(this.groupActive)throw"err311: group is not closed";this.svgStr+=this.payloadStr,this.svgStr+="</svg>"}stringify(){return this.closeSvg(),this.svgStr}};function k0(){return new S0}function Ve(e){return e.toFixed(4)}var ns=class{constructor(e,n,t,r,s,i,a,o){I(this,"arc");I(this,"p1x");I(this,"p1y");I(this,"radius");I(this,"a1");I(this,"a2");I(this,"p2x");I(this,"p2y");this.arc=e,this.p1x=n,this.p1y=t,this.radius=r,this.a1=s,this.a2=i,this.p2x=a,this.p2y=o}};function T0(e,n,t,r){return new ns(!1,e,n,0,0,0,t,r)}function P0(e,n,t,r,s,i){const a=i?r:s,o=i?s:r,u=Ie(Mt(a)),l=Ie(Mt(o));return new ns(!0,e,n,t,u,l,0,0)}function B0(e,n,t){return new ns(!1,e,n,t,0,0,0,0)}var M0=class{constructor(){I(this,"dxfStr");this.dxfStr=`0
|
|
18
|
+
SECTION
|
|
19
|
+
2
|
|
20
|
+
ENTITIES
|
|
21
|
+
`}addCircle(e,n,t){this.dxfStr+=`0
|
|
22
|
+
CIRCLE
|
|
23
|
+
8
|
|
24
|
+
PARAMETRIX
|
|
25
|
+
`,this.dxfStr+=`10
|
|
26
|
+
${Ve(e)}
|
|
27
|
+
20
|
|
28
|
+
${Ve(n)}
|
|
29
|
+
40
|
|
30
|
+
${Ve(t)}
|
|
31
|
+
`}addLine(e,n,t,r){this.dxfStr+=`0
|
|
32
|
+
LINE
|
|
33
|
+
8
|
|
34
|
+
PARAMETRIX
|
|
35
|
+
`,this.dxfStr+=`10
|
|
36
|
+
${Ve(e)}
|
|
37
|
+
20
|
|
38
|
+
${Ve(n)}
|
|
39
|
+
11
|
|
40
|
+
${Ve(t)}
|
|
41
|
+
21
|
|
42
|
+
${Ve(r)}
|
|
43
|
+
`}addArc(e,n,t,r,s){this.dxfStr+=`0
|
|
44
|
+
ARC
|
|
45
|
+
8
|
|
46
|
+
PARAMETRIX
|
|
47
|
+
`,this.dxfStr+=`10
|
|
48
|
+
${Ve(e)}
|
|
49
|
+
20
|
|
50
|
+
${Ve(n)}
|
|
51
|
+
40
|
|
52
|
+
${Ve(t)}
|
|
53
|
+
50
|
|
54
|
+
${Ve(r)}
|
|
55
|
+
51
|
|
56
|
+
${Ve(s)}
|
|
57
|
+
`}close(){this.dxfStr+=`0
|
|
58
|
+
ENDSEC
|
|
59
|
+
0
|
|
60
|
+
EOF
|
|
61
|
+
`}stringify(){return this.close(),this.dxfStr}};function I0(){return new M0}function $0(e,n,t){return{circle:!0,cx:e,cy:n,radius:t}}var L0=class{constructor(){I(this,"seg");this.seg=[]}addStart(e,n){this.seg=[];const t={typ:0,px:e,py:n};this.seg.push(t)}addStroke(e,n){const t={typ:1,px:e,py:n};this.seg.push(t)}addArc(e,n,t,r,s){const i={typ:2,px:e,py:n,radius:t,large:r,ccw:s};this.seg.push(i)}toJson(){return{circle:!1,seg:this.seg}}};function N0(){return new L0}var Ta=class{};function Pa(e,n,t){const r=Tt(e,n,t),s=Y(r.pc.cx,r.pc.cy),i=le((r.a2-r.a1)/2);let a=r.a1+i;return(Math.sign(i)>0&&!t.arcCcw||Math.sign(i)<0&&t.arcCcw)&&(a+=Math.PI),s.translatePolar(a,t.radius)}var R0=class Ot extends Ta{constructor(t,r,s=""){super();I(this,"circle",!1);I(this,"segments");I(this,"points");I(this,"debugPoints");I(this,"debugLines");I(this,"lastPoint");I(this,"imposedColor");this.segments=[new Qe(6,t,r,0)],this.points=[],this.debugPoints=[],this.debugLines=[],this.lastPoint=Y(t,r),this.imposedColor=s}setLastPoint(t,r){this.lastPoint=Y(t,r)}getLastPoint(){return this.lastPoint}getFirstPoint(){return Y(this.segments[0].px,this.segments[0].py)}addPointA(t,r){if(this.points.length>2)throw`err311: contour add too much point ${t} ${r}`;return this.points.push(Y(t,r)),this}addPointAP(t,r){const s=Y(0,0).translatePolar(t,r);return this.addPointA(s.cx,s.cy),this}addPointR(t,r){const i=this.getLastPoint().translate(t,r);return this.addPointA(i.cx,i.cy),this}addPointRP(t,r){const i=this.getLastPoint().translatePolar(t,r);return this.addPointA(i.cx,i.cy),this}addSeg(t){return this.segments.push(t),this}addSegStroke(){if(this.points.length!==1)throw`err554: contour addSegStroke with unexpected points.length ${this.points.length}`;const t=this.points.pop();if(t!==void 0){const r=new Qe(0,t.cx,t.cy,0);t.isEqual(this.getLastPoint())||(this.addSeg(r),this.setLastPoint(t.cx,t.cy))}else throw"err284: contour p1 is undefined";return this}addSegStrokeA(t,r){return this.addPointA(t,r).addSegStroke(),this}addSegStrokeAP(t,r){return this.addPointAP(t,r).addSegStroke(),this}addSegStrokeR(t,r){return this.addPointR(t,r).addSegStroke(),this}addSegStrokeRP(t,r){return this.addPointRP(t,r).addSegStroke(),this}addSegArc(t,r,s){if(this.points.length!==1)throw`err954: contour addSegArc with unexpected points.length ${this.points.length}`;const i=this.points.pop();if(i!==void 0){const a=new Qe(1,i.cx,i.cy,t,r,s);i.isEqual(this.getLastPoint())?console.log(`warn144: addSegArc last and new point identical ${ct(i.cx)} ${ct(i.cy)}`):(this.addSeg(a),this.setLastPoint(i.cx,i.cy))}else throw"err482: contour p1 is undefined";return this}addSegArc2(){if(this.points.length!==2)throw`err958: contour addSegArc2 with unexpected points.length ${this.points.length}`;const t=this.points.pop(),r=this.points.pop();if(r!==void 0&&t!==void 0){const s=this.getLastPoint(),i=x0(s,r,t),a=i.distanceToPoint(s),o=s.middlePoint(t),u=o.angleToPoint(s),l=o.angleToPoint(r),c=le(l-u);let h=!1,m=!1;if(!o.isEqual(i)){const x=o.angleToPoint(i),y=le(x-u);Math.sign(y)*Math.sign(c)>0&&(h=!0)}Math.sign(c)>0&&(m=!0),this.addPointA(t.cx,t.cy).addSegArc(a,h,m),this.debugPoints.push(r)}else throw"err488: contour p1 or p2 or seg is undefined";return this}addSegArc3(t,r){if(this.points.length!==1)throw`err914: contour addSegArc3 with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),a=jr(i,s);let o=s;r&&(o=i);const u=er(o.cx,o.cy,t+Math.PI/2),l=a.intersection(u),c=l.distanceToPoint(i),h=i.middlePoint(s),m=o.angleToPoint(h),x=le(t-m);let y=!1;Math.abs(x)>Math.PI/2&&(y=!0);let f=!1;x<0&&(f=!0),r||(f=!f),this.addPointA(s.cx,s.cy).addSegArc(c,y,f),this.debugPoints.push(h),this.debugPoints.push(l)}else throw"err282: contour p1 is undefined";return this}addSeg2Arcs(t,r){if(this.points.length!==1)throw`err214: contour addSeg2Arcs with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),a=i.distanceToPoint(s),o=i.angleToPoint(s),u=s.angleToPoint(i),l=le(t-o),c=-1*le(r-u);if(Math.abs(l)>=Math.PI/2)throw`err545: addSeg2Arcs with too large au ${l}`;if(Math.abs(c)>=Math.PI/2)throw`err546: addSeg2Arcs with too large av ${c}`;if(te(l)===0)throw`err765: addSeg2Arcs with almost zero au ${l}`;if(te(c)===0)throw`err766: addSeg2Arcs with almost zero av ${c}`;if(Math.sign(l)*Math.sign(c)<1)throw`err767: addSeg2Arcs with au/av bad orientation ${l} ${c}`;const h=Math.tan(l/2),m=Math.tan(c/2),x=a*m/(m+h),y=Math.abs(x/Math.sin(l)),f=x/Math.cos(l/2),d=a*h/(m+h),p=Math.abs(d/Math.sin(c)),D=i.translatePolar(o+l/2,f);let g=!1;Math.sign(l)<0&&(g=!0),this.addPointA(D.cx,D.cy).addSegArc(y,!1,g),this.addPointA(s.cx,s.cy).addSegArc(p,!1,g),this.debugPoints.push(i.translatePolar(o,x)),this.debugPoints.push(i.translatePolar(o+l-Math.sign(l)*Math.PI/2,y)),this.debugPoints.push(s.translatePolar(u-c+Math.sign(l)*Math.PI/2,p))}else throw"err182: contour p1 is undefined";return this}addCornerPointed(){const t=new Qe(2,0,0,0);return this.addSeg(t),this}addCornerRounded(t){const r=new Qe(3,0,0,t);return this.addSeg(r),this}addCornerWidened(t){const r=new Qe(4,0,0,t);return this.addSeg(r),this}addCornerWideAcc(t){const r=new Qe(5,0,0,t);return this.addSeg(r),this}closeSegStroke(){const t=this.segments[0].px,r=this.segments[0].py;return this.addSegStrokeA(t,r),this}closeSegArc(t,r,s){const i=this.segments[0].px,a=this.segments[0].py;return this.addPointA(i,a).addSegArc(t,r,s),this}clone(){const t=new Ot(this.segments[0].px,this.segments[0].py);for(const r of this.segments){const s=r.clone();s.sType!==6&&(t.addSeg(s),Ke(s.sType)&&t.setLastPoint(s.px,s.py))}return t}translate(t,r){const s=this.segments[0].px+t,i=this.segments[0].py+r,a=new Ot(s,i);for(const o of this.segments){const u=o.clone();Ke(o.sType)&&(u.px+=t,u.py+=r),u.sType!==6&&(a.addSeg(u),Ke(u.sType)&&a.setLastPoint(u.px,u.py))}return a}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Y(t,r),o=Y(this.segments[0].px,this.segments[0].py).rotate(i,s),u=new Ot(o.cx,o.cy);for(const l of this.segments){const c=l.clone();if(Ke(l.sType)){const m=Y(c.px,c.py).rotate(i,s);c.px=m.cx,c.py=m.cy}c.sType!==6&&(u.addSeg(c),Ke(c.sType)&&u.setLastPoint(c.px,c.py))}return u}scale(t,r,s,i=!1){const a=Y(t,r),u=Y(this.segments[0].px,this.segments[0].py).scale(a,s),l=new Ot(u.cx,u.cy);for(const c of this.segments){const h=c.clone();if(Ke(c.sType)){const x=Y(h.px,h.py).scale(a,s);h.px=x.cx,h.py=x.cy}c.sType===1&&(h.radius*=s),On(c.sType)&&i&&(h.radius*=s),h.sType!==6&&(l.addSeg(h),Ke(h.sType)&&l.setLastPoint(h.px,h.py))}return l}addPartial(t){if(this.points.length>0)throw`err911: addPartial, points should be used ${this.points.length}`;let r=t;if(t.segments.length>0){const s=t.segments[0],i=this.getLastPoint(),a=s.px-i.cx,o=s.py-i.cy;s.sType===6&&(r=t.translate(-a,-o))}for(const s of r.segments)s.sType!==6&&(this.addSeg(s),Ke(s.sType)&&this.setLastPoint(s.px,s.py));return this}draw(t,r,s=me.contour){const i=this.imposedColor===""?s:this.imposedColor;let a=0,o=0;for(const u of this.segments){if(u.sType===0){const[l,c]=Vt(a,o,r),[h,m]=Vt(u.px,u.py,r);t.beginPath(),t.moveTo(l,c),t.lineTo(h,m),t.strokeStyle=i,t.stroke()}if(u.sType===1)try{const l=Tt(a,o,u),[c,h]=Vt(l.pc.cx,l.pc.cy,r),m=Ea(u.radius,r);t.beginPath(),t.arc(c,h,m,-l.a1,-l.a2,u.arcCcw),t.strokeStyle=i,t.stroke()}catch(l){console.log("err413: "+l)}cn(u.sType)&&(a=u.px,o=u.py)}}extractSkeleton(){const t=this.segments[0],r=new Ot(t.px,t.py);for(const s of this.segments)Ke(s.sType)&&r.addSeg(s);return r}generateContour(){kt.clearPoints(),kt.clearLines();const t=[],r=[];let s=0,i=0,a=0;for(const c of this.segments){if(c.sType===0){const x=Y(i,a),y=Y(c.px,c.py),f=Y(0,0);t.push(new Ge(c.sType,x,y,f,0,0,0,!1)),s=1}if(c.sType===1){const x=Tt(i,a,c);t.push(x),s=1}const h=t.at(-1),m=t.at(-2);if(h!==void 0&&m!==void 0&&Ke(h.sType)&&Er(m.sType)){const x=t.pop(),y=t.pop(),f=t.pop();if(f!==void 0&&y!==void 0&&x!==void 0){const d=gi(f,y,x);t.push(...d)}else throw"err603: contour generateContour internal error"}if(Er(c.sType)){if(s===2)throw`err419: generateContour with two consecutive corners ${c.sType}`;if(s===0&&On(c.sType)&&c.radius>0){const x=Y(0,0);r.push(new Ge(c.sType,x,x,x,c.radius,0,0,!1))}if(s===1&&On(c.sType)&&c.radius>0){const x=Y(0,0);t.push(new Ge(c.sType,x,x,x,c.radius,0,0,!1))}s=2}cn(c.sType)&&(i=c.px,a=c.py)}if(r.length>0)if(s===1)t.push(...r);else throw"err397: contour generateContour Corners defined at end and begining";const o=t.at(-1);if(o!==void 0&&Er(o.sType)){const c=t[0],h=t.pop(),m=t.pop();if(m!==void 0&&h!==void 0&&c!==void 0){const x=gi(m,h,c);t.push(...x.slice(0,-1));const y=x.at(-1);if(y!==void 0)t[0]=y;else throw"err606: contour generateContour internal error"}else throw"err602: contour generateContour internal error"}const u=t[0],l=new Ot(u.p1.cx,u.p1.cy,this.imposedColor);l.debugPoints.push(...kt.getPoints()),l.debugLines.push(...kt.getLines());for(const c of t)if(c.sType===0)l.addSegStrokeA(c.p2.cx,c.p2.cy);else if(c.sType===1){const h=g0(c);l.addPointA(c.p2.cx,c.p2.cy).addSegArc(h.radius,h.arcLarge,h.arcCcw)}else throw`err986: contour generateContour unexpected in seg2 Enum ${c.sType}`;return l}generatePoints(){const t=[];t.push(...this.debugPoints);const r=this.segments[0];t.push(Y(r.px,r.py));let s=0,i=0;for(const a of this.segments){if(a.sType===1)try{const o=Pa(s,i,a);t.push(o)}catch(o){console.log("err453: "+o)}cn(a.sType)&&(s=a.px,i=a.py,t.push(Y(s,i)))}return t}generateLines(){const t=[];return t.push(...this.debugLines),t}checkContour(t){if(t.segments[0].sType!==6)throw`err412: contour check first seg is not eStart ${t.segments[0].sType}`;let r=0,s=0;for(const o of t.segments){if(o.sType===1)try{Tt(r,s,o)}catch(u){throw`err778: ${u}`}cn(o.sType)&&(r=o.px,s=o.py)}const i=t.segments[0].px,a=t.segments[0].py;if(te(r-i)!==0||te(s-a)!==0)throw`err414: contour check, contour is not closed px ${i} ${r} py ${i} ${a}`}check(){kt.clearMsg(),this.checkContour(this);const t=this.generateContour();return this.checkContour(t),kt.getMsg()}toSvg(t,r=""){const s=F0();for(const a of this.segments)a.sType===6?s.addStart(a.px,t-a.py):a.sType===0?s.addStroke(a.px,t-a.py):a.sType===1?s.addArc(a.px,t-a.py,a.radius,a.arcLarge,!a.arcCcw):console.log(`err631: contour.toSvg has unknown segment type ${a.sType}`);return s.stringify(r)}toDxfSeg(){const t=[];let r=0,s=0;for(const i of this.segments){if(i.sType===0)t.push(T0(r,s,i.px,i.py));else if(i.sType===1)try{const a=Tt(r,s,i);t.push(P0(a.pc.cx,a.pc.cy,i.radius,a.a1,a.a2,a.arcCcw))}catch(a){console.log("err413: "+a)}cn(i.sType)&&(r=i.px,s=i.py)}return t}toPax(){const t=N0();for(const s of this.segments)s.sType===6?t.addStart(s.px,s.py):s.sType===0?t.addStroke(s.px,s.py):s.sType===1?t.addArc(s.px,s.py,s.radius,s.arcLarge,s.arcCcw):console.log(`err709: contour.toPax has unknown segment type ${s.sType}`);return t.toJson()}getPerimeter(){let t=0;const r=this.generateContour();let s=0,i=0;for(const a of r.segments)if(a.sType===6)s=a.px,i=a.py;else if(a.sType===0){const o=Math.sqrt((a.px-s)**2+(a.py-i)**2);s=a.px,i=a.py,t+=o}else if(a.sType===1){const o=Tt(s,i,a),u=Mt(o.a2-o.a1),l=o.arcCcw?u:Mt(2*Math.PI-u),c=a.radius*l;s=a.px,i=a.py,t+=c}else console.log(`err760: contour.getPerimeter has unknown segment type ${a.sType}`);return t}},O0=class Kt extends Ta{constructor(t,r,s,i=""){super();I(this,"circle",!0);I(this,"px");I(this,"py");I(this,"radius");I(this,"imposedColor");if(this.px=t,this.py=r,this.radius=s,this.imposedColor=i,s<0)throw`err432: iRadius ${s} is negative at circle ix ${t}, iy ${r}`}clone(){return new Kt(this.px,this.py,this.radius,this.imposedColor)}translate(t,r){return new Kt(this.px+t,this.py+r,this.radius,this.imposedColor)}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=Y(t,r),a=Y(this.px,this.py).rotate(i,s);return new Kt(a.cx,a.cy,this.radius,this.imposedColor)}draw(t,r,s=me.contour){const[i,a]=Vt(this.px,this.py,r),o=Ea(this.radius,r),u=this.imposedColor===""?s:this.imposedColor;t.beginPath(),t.arc(i,a,o,0,2*Math.PI,!0),t.strokeStyle=u,t.stroke()}extractSkeleton(){return new Kt(this.px,this.py,this.radius)}generateContour(){return new Kt(this.px,this.py,this.radius,this.imposedColor)}generatePoints(){const t=[],r=Y(this.px,this.py);t.push(r);for(let s=0;s<4;s++){const i=r.translatePolar(s*Math.PI/2,this.radius);t.push(i)}return t}generateLines(){return[]}check(){return""}toSvg(t,r=""){return C0(this.px,t-this.py,this.radius,r)}toDxfSeg(){const t=[];return t.push(B0(this.px,this.py,this.radius)),t}toPax(){return $0(this.px,this.py,this.radius)}getPerimeter(){return 2*Math.PI*this.radius}};function rs(e,n,t=""){return new R0(e,n,t)}function ef(e,n,t,r=""){return new O0(e,n,t,r)}var j0=class Vr{constructor(){I(this,"pointList");I(this,"lineList");I(this,"vectorList");I(this,"mainList");I(this,"mainBList");I(this,"secondList");I(this,"secondBList");I(this,"dynamicsList");I(this,"xMin");I(this,"xMax");I(this,"yMin");I(this,"yMax");this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[],this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addPoint(n){this.pointList.push(n)}addPoints(n){this.pointList.push(...n)}addLine(n){this.lineList.push(n)}addLines(n){for(const t of n)this.lineList.push(t)}addVector(n){this.vectorList.push(n)}addMainOI(n){const t=[];for(const r of n){const s=r.generateContour();this.addPoints(s.generatePoints()),this.addLines(s.generateLines()),t.push(s),this.mainBList.push(r.extractSkeleton())}this.mainList.push(t)}addMainO(n){const t=[n];this.addMainOI(t)}addSecond(n){const t=n.generateContour();this.addPoints(t.generatePoints()),this.addLines(t.generateLines()),this.secondList.push(t),this.secondBList.push(n.extractSkeleton())}addDynamics(n){this.addPoints(n.generatePoints()),this.addLines(n.generateLines()),this.dynamicsList.push(n)}translate(n,t){const r=new Vr;for(const s of this.pointList)r.addPoint(s.translate(n,t));for(const s of this.lineList)r.addLine(s.translate(n,t));for(const s of this.vectorList)r.addVector(s.translate(n,t));for(const s of this.mainList){const i=[];for(const a of s)i.push(a.translate(n,t));r.addMainOI(i)}for(const s of this.secondList)r.addSecond(s.translate(n,t));for(const s of this.dynamicsList)r.addDynamics(s.translate(n,t));return r}translatePolar(n,t){return this.translate(t*Math.cos(n),t*Math.sin(n))}rotate(n,t,r){const s=new Vr,i=Y(n,t);for(const a of this.pointList)s.addPoint(a.rotate(i,r));for(const a of this.lineList)s.addLine(a.rotate(i,r));for(const a of this.vectorList)s.addVector(a.rotate(i,r));for(const a of this.mainList){const o=[];for(const u of a)o.push(u.rotate(n,t,r));s.addMainOI(o)}for(const a of this.secondList)s.addSecond(a.rotate(n,t,r));for(const a of this.dynamicsList)s.addDynamics(a.rotate(n,t,r));return s}mergeFigure(n,t=!1){for(const r of n.pointList)this.addPoint(r.clone());for(const r of n.lineList)this.addLine(r.clone());for(const r of n.vectorList)this.addVector(r.clone());for(const r of n.mainList){const s=[];for(const i of r)s.push(i.clone());if(t)for(const i of s)this.addSecond(i);else this.addMainOI(s)}for(const r of n.secondList)this.addSecond(r.clone());for(const r of n.dynamicsList)this.addDynamics(r.clone())}mainListC(){const n=[];for(const t of this.mainList)for(const r of t)n.push(r);return n}clear(){this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[]}getMinMax(){[this.xMin,this.xMax,this.yMin,this.yMax]=Fa(this.pointList)}getAdjustFull(n,t){let r=Rr();return this.pointList.length>0&&(this.getMinMax(),r=Or(this.xMin,this.xMax,this.yMin,this.yMax,n,t)),r}getAdjustZoom(n,t){let r=Rr();if(this.pointList.length>0){this.getMinMax();const s=(this.xMin+this.xMax)/2,i=(this.yMin+this.yMax)/2;r=Or(s,this.xMax,i,this.yMax,n,t)}return r}quantifyRuler(n,t){const s=n/10/t.scaleX;let i=1e-4;for(;i<s;)i*=10;i/5>s?i/=5:i/2>s&&(i/=2);const a=i*t.scaleX;return[i,a]}drawRuler(n,t,r){const[s,i]=this.quantifyRuler(n.canvas.width,t),a=n.canvas.width-10-i;n.font="15px Arial",n.fillStyle=r,n.fillText(`${s.toFixed(4)}`,a,20),n.beginPath(),n.moveTo(a,25),n.lineTo(a+i,25),n.lineTo(a+i,25+i),n.strokeStyle=r,n.stroke()}draw(n,t,r){if(r.points)for(const s of this.pointList)s.draw(n,t);if(r.lines)for(const s of this.lineList)s.draw(n,t);if(r.vectors)for(const s of this.vectorList)s.draw(n,t);if(r.main)for(const s of this.mainList)for(const[i,a]of s.entries()){let o=me.mainOuter;i>0&&(o=me.mainInner),a.draw(n,t,o)}if(r.mainB)for(const s of this.mainBList)s.draw(n,t,me.mainB);if(r.second)for(const s of this.secondList)s.draw(n,t,me.second);if(r.secondB)for(const s of this.secondBList)s.draw(n,t,me.secondB);if(r.dynamics)for(const s of this.dynamicsList)s.draw(n,t,me.dynamics);if(r.ruler&&this.drawRuler(n,t,me.ruler),r.refframe){for(const s of[10,100,200])Y(s,0).draw(n,t,me.reference,2),Y(-s,0).draw(n,t,me.reference,2),Y(0,s).draw(n,t,me.reference,2),Y(0,-s).draw(n,t,me.reference,2);Y(0,0).draw(n,t,me.origin,2)}}};function V0(){return new j0}function Ur(e){const n=V0();for(const t in e){const r=e[t];for(const s of r.pointList)n.pointList.push(s);for(const s of r.lineList)n.lineList.push(s);for(const s of r.vectorList)n.vectorList.push(s);for(const s of r.mainList)n.mainList.push(s);for(const s of r.mainBList)n.mainBList.push(s);for(const s of r.secondList)n.secondList.push(s);for(const s of r.secondBList)n.secondBList.push(s);for(const s of r.dynamicsList)n.dynamicsList.push(s)}return n}function tf(){return{points:!1,lines:!1,vectors:!1,main:!0,mainB:!1,second:!0,secondB:!1,dynamics:!1,ruler:!0,refframe:!1}}function nf(e){return{points:e.points,lines:e.lines,vectors:e.vectors,main:e.main,mainB:e.mainB,second:e.second,secondB:e.secondB,dynamics:e.dynamics,ruler:e.ruler,refframe:e.refframe}}var U0=(e=>(e[e.eNumber=0]="eNumber",e[e.eCheckbox=1]="eCheckbox",e[e.eDropdown=2]="eDropdown",e[e.eSectionSeparator=3]="eSectionSeparator",e))(U0||{}),en={partName:"",params:[],paramSvg:{},sim:{tMax:0,tStep:0,tUpdate:0}};function q0(e,n,t){return{val:e,init:n,chg:t}}function G0(e){const n={};for(const t of Object.keys(e))n[t]=e[t].val;return n}var H0=class{constructor(e,n=""){I(this,"paramVal",{});I(this,"paramInit",{});I(this,"paramChanged",{});I(this,"partName");I(this,"suffix");I(this,"paramNames");for(const t of e.params)this.paramVal[t.name]=t.init,this.paramInit[t.name]=t.init,this.paramChanged[t.name]=!1;this.suffix=n,this.partName=e.partName,this.paramNames=this.getParamName()}getParamName(){const e=[];for(const n of Object.keys(this.paramVal))e.push(n);return e}getPartName(){return this.partName}getPartNameSuffix(){return this.partName+this.suffix}getSuffix(){return this.suffix}getParamVal(){return this.paramVal}getVal(e){if(this.paramNames.includes(e))return this.paramVal[e];throw`err140: parameter ${e} does not exist in design ${this.partName}`}getInit(e){if(this.paramNames.includes(e))return this.paramInit[e];throw`err149: parameter ${e} does not exist in design ${this.partName}`}getChanged(e){if(this.paramNames.includes(e))return this.paramChanged[e];throw`err156: parameter ${e} does not exist in design ${this.partName}`}setVal(e,n){if(this.paramNames.includes(e))this.paramVal[e]=n,this.paramChanged[e]=!0;else throw`err163: parameter ${e} does not exist in design ${this.partName}`}applyParamVal(e){let n="";for(const t of Object.keys(e))this.setVal(t,e[t]);return n+=`info104: apply ${Object.keys(e).length} parameters on ${this.partName}
|
|
62
|
+
`,n}applyParamList(e){return this.applyParamVal(G0(e))}getDesignParamList(){const e={};for(const n of this.paramNames)e[n]=q0(this.getVal(n),this.getInit(n),this.getChanged(n));return e}};function rf(e,n=""){return new H0(e,n)}function sf(e,n,t,r=0,s=100,i=1){return{name:e,unit:n,init:t,min:r,max:s,step:i,dropdown:[],pType:0}}function af(e,n){return{name:e,unit:"checkbox",init:n?1:0,min:0,max:1,step:1,dropdown:[],pType:1}}function of(e,n,t=0){let r=0;return t<n.length&&(r=t),{name:e,unit:"dropdown",init:r,min:0,max:n.length-1,step:1,dropdown:n,pType:2}}function uf(e){return{name:e,unit:"section-separator",init:0,min:0,max:0,step:0,dropdown:[],pType:3}}var Z0=(e=>(e[e.eLinearOrtho=0]="eLinearOrtho",e[e.eRotate=1]="eRotate",e))(Z0||{}),Y0=(e=>(e[e.eIdentity=0]="eIdentity",e[e.eIntersection=1]="eIntersection",e[e.eUnion=2]="eUnion",e[e.eSubstraction=3]="eSubstraction",e))(Y0||{});function cf(e){return{partName:e,calcErr:!0,logstr:"",fig:{},vol:{extrudes:[],volumes:[]},sub:{}}}function lf(e){if(e.calcErr){let n=`err182: Error in sub-design ${e.partName}
|
|
63
|
+
`;throw n+=W0(e.logstr,e.partName),n}}function W0(e,n){let t="";for(const r of e.split(`
|
|
64
|
+
`))r!==""&&(t+=`[${n}]: ${r}
|
|
65
|
+
`);return t}var X0=class{figureToPaxF(e){const n=[];for(const t of e){const r=[];for(const s of t)r.push(s.toPax());n.push(r)}return n}getFigures(e){const n={};for(const t in e){const r=this.figureToPaxF(e[t].mainList);n[t]=r}return n}getPaxJson(e,n,t){return{partName:n.partName,pDef:t,params:e,figures:this.getFigures(n.fig),volume:n.vol,subs:n.sub,log:n.logstr}}getPaxStr(e,n,t){const r=this.getPaxJson(e,n,t);return JSON.stringify(r,null,2)}};function qt(){return new X0}function ss(e){let n=6;return e===1?n=0:e===2&&(n=1),n}function K0(e){return new Qe(ss(e.typ),e.px,e.py,e.radius,e.large,e.ccw)}function Ba(e,n,t,r){let s=Math.PI/2;n<2*t&&(s=2*Math.asin(n/(2*t)));const i=Math.min(e,s),a=Math.ceil(r/i),o=r/a;return[a,o]}function Ma(e,n,t,r=Math.PI/6,s=2){const[i,a]=Ba(r,s,t,2*Math.PI),o=[];for(let c=0;c<i;c++){const h=e+t*Math.cos(c*a),m=n+t*Math.sin(c*a);o.push([h,m])}const u=o[0][0],l=o[0][1];return o.push([u,l]),o}function Ia(e,n,t,r,s,i,a=Math.PI/6,o=2){const u=Nr(r,s,i),[l,c]=Ba(a,o,t,Math.abs(u)),h=i?c:-c,m=l+1,x=[];for(let y=1;y<m;y++){const f=r+y*h,d=e+t*Math.cos(f),p=n+t*Math.sin(f);x.push([d,p])}return x}var $a=Math.PI/16,La=2;function wi(e){return e.toFixed(4)}function yi(e){return e.toString().padStart(3,"0")}function bi(e,n){return[[e,n]]}function J0(e,n,t,r,s,i){return Ia(e,n,t,r,s,i,$a,La)}function z0(e,n,t){return Ma(e,n,t,$a,La)}function Q0(e){const n=[];let t=0,r=0;for(const s of e){if(s.typ===0)n.push(...bi(s.px,s.py));else if(s.typ===1)n.push(...bi(s.px,s.py));else if(s.typ===2)try{const i=s,a=new Qe(ss(i.typ),i.px,i.py,i.radius,i.large,i.ccw),o=Tt(t,r,a);n.push(...J0(o.pc.cx,o.pc.cy,a.radius,o.a1,o.a2,o.arcCcw))}catch(i){console.log("err730: "+i)}t=s.px,r=s.py}return n}var el=class{constructor(){I(this,"pts");I(this,"ptIdx");I(this,"idx");this.pts=[],this.ptIdx=[],this.idx=0}addContour(e){const n=[],t=[];for(const i of e){const[a,o]=i;n.push(`[ ${wi(a)}, ${wi(o)} ]`),t.push(` ${this.idx}`),this.idx+=1}const r=`[ ${n.join(",")} ]`,s=`[ ${t.join(",")} ]`;this.pts.push(r),this.ptIdx.push(s)}getFigure(e){let n="";const t=[],r=[];for(const a of this.pts.keys()){const o=`ca_${e}_${yi(a)}`,u=`cb_${e}_${yi(a)}`;n+=`${o} = ${this.pts[a]};
|
|
66
|
+
`,n+=`${u} = ${this.ptIdx[a]};
|
|
67
|
+
`,t.push(o),r.push(u)}const s=t.join(", "),i=r.join(", ");return n+=`a_${e} = concat(${s});
|
|
68
|
+
`,n+=`b_${e} = [${i}];
|
|
69
|
+
`,n}},tl=class{getHeader(){return`// Generated by Parametrix
|
|
70
|
+
`}getOneFigure(e,n){const t=new el;for(const s of e)for(const i of s)if(i.circle===!0){const a=i,o=z0(a.cx,a.cy,a.radius);t.addContour(o)}else{const o=Q0(i.seg);t.addContour(o)}return t.getFigure(n)}getAllFigures(e,n){let t="";for(const r in e){const s=this.getOneFigure(e[r],`${n}_${r}`);t+=s}return t}getOneExtrude(e){let n="rotate_extrude",t="";return e.extrudeMethod===0&&(e.length===void 0&&console.log("err103: design error: scad-linear_extrude length undefined!"),n="linear_extrude",t=`height = ${e.length}`),`
|
|
71
|
+
module ${e.outName} () {
|
|
72
|
+
translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]} ])
|
|
73
|
+
rotate( [ ${Ie(e.rotate[0])}, ${Ie(e.rotate[1])}, ${Ie(e.rotate[2])} ])
|
|
74
|
+
${n}(${t}) polygon(a_${e.face}, b_${e.face});
|
|
75
|
+
}
|
|
76
|
+
`}getAllExtrudes(e){let n="";for(const t of e){const r=this.getOneExtrude(t);n+=r}return n}getOneVolume(e){let n="identity";switch(e.boolMethod){case 1:n="intersection";break;case 2:n="union";break;case 3:n="difference";break}const t=[];for(const i of e.inList)t.push(`${i}();`);const r=t.join(`
|
|
77
|
+
`);let s=`
|
|
78
|
+
module ${e.outName} () {
|
|
79
|
+
${n} () {
|
|
80
|
+
${r}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
`;return e.boolMethod===0&&(s=`
|
|
84
|
+
module ${e.outName} () {
|
|
85
|
+
${r}
|
|
86
|
+
}
|
|
87
|
+
`),s}getAllVolumes(e){let n="";for(const t of e){const r=this.getOneVolume(t);n+=r}return n}getAllSubGeoms(e){const n=[];for(const t of e)n.includes(t.subgeom)||n.push(t.subgeom);return n}getOneInherit(e){return`
|
|
88
|
+
module ${e.outName} () {
|
|
89
|
+
translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]} ])
|
|
90
|
+
rotate( [ ${Ie(e.rotate[0])}, ${Ie(e.rotate[1])}, ${Ie(e.rotate[2])} ])
|
|
91
|
+
${e.subdesign}();
|
|
92
|
+
}
|
|
93
|
+
`}getAllInherits(e){let n="";for(const t of e){const r=this.getOneInherit(t);n+=r}return n}getVolume(e){let n="";if(e.inherits!==void 0){const t=this.getAllSubGeoms(e.inherits);for(const r of t){const s=qt().getPaxJson({},r,en);n+=this.getAllFigures(s.figures,s.partName),n+=this.getVolume(r.vol)}n+=this.getAllInherits(e.inherits)}return n+=this.getAllExtrudes(e.extrudes),n+=this.getAllVolumes(e.volumes),n}getFooter(e){return`
|
|
94
|
+
pax_${e}();
|
|
95
|
+
`}getExportFile(e){let n=this.getHeader();return n+=this.getAllFigures(e.figures,e.partName),n+=this.getVolume(e.volume),n+=this.getFooter(e.partName),n}};function nl(){return new tl}var Na=Math.PI/16,Ra=2;function _i(e){return e.toFixed(4)}function vi(e){return e.toString().padStart(3,"0")}function Ai(e,n){return[[e,n]]}function rl(e,n,t,r,s,i){return Ia(e,n,t,r,s,i,Na,Ra)}function sl(e){const n=[];let t=0,r=0;for(const s of e){if(s.typ===0)n.push(...Ai(s.px,s.py));else if(s.typ===1)n.push(...Ai(s.px,s.py));else if(s.typ===2)try{const i=s,a=new Qe(ss(i.typ),i.px,i.py,i.radius,i.large,i.ccw),o=Tt(t,r,a);n.push(...rl(o.pc.cx,o.pc.cy,a.radius,o.a1,o.a2,o.arcCcw))}catch(i){console.log("err730: "+i)}t=s.px,r=s.py}return n}function il(e,n,t){return Ma(e,n,t,Na,Ra)}function Oa(e,n){const t=[];for(const i of e){const[a,o]=i;t.push(`[ ${_i(a)}, ${_i(o)} ]`)}const r=`[ ${t.join(`,
|
|
96
|
+
`)} ]`;return`const ${n} = polygon({ points: ${r} });
|
|
97
|
+
|
|
98
|
+
`}function al(e,n,t,r){const s=il(e,n,t);return Oa(s,r)}function ol(e,n){const t=sl(e);return Oa(t,n)}function ul(e,n){let t="";const r=e[0];return e.slice(1).length>0?t+=`${n} = subtract( ${e.join(", ")} );
|
|
99
|
+
`:t+=`${n} = ${r};
|
|
100
|
+
`,t}function cl(e,n){let t="";const r=e[0];return e.slice(1).length>0?t+=`${n} = union( ${e.join(", ")} );
|
|
101
|
+
`:t+=`${n} = ${r};
|
|
102
|
+
`,t}var ll=class{getHeader(){return`// Generated by Parametrix
|
|
103
|
+
|
|
104
|
+
const { polygon } = require('@jscad/modeling').primitives;
|
|
105
|
+
//const { subtract } = require('@jscad/modeling').booleans;
|
|
106
|
+
//const { union, intersect, scission, subtract } = require('@jscad/modeling').booleans;
|
|
107
|
+
const { union, intersect, subtract } = require('@jscad/modeling').booleans;
|
|
108
|
+
const { extrudeLinear, extrudeRotate } = require('@jscad/modeling').extrusions;
|
|
109
|
+
const { translate, rotate } = require('@jscad/modeling').transforms;
|
|
110
|
+
|
|
111
|
+
const main = () => {
|
|
112
|
+
|
|
113
|
+
`}getOneFigure(e,n){let t="";const r=[];for(const[s,i]of e.entries()){const a=`face_${n}_Fa${vi(s)}`,o=[];for(const[u,l]of i.entries()){const c=`ctr_${a}_Ctr${vi(u)}`;if(l.circle===!0){const h=l;t+=al(h.cx,h.cy,h.radius,c)}else t+=ol(l.seg,c);o.push(c)}t+=ul(o,a),r.push(a)}return t+=cl(r,n),t}getAllFigures(e,n){let t="";for(const r in e){const s=this.getOneFigure(e[r],`fig_${n}_${r}`);t+=s}return t}getOneExtrude(e){let n="extrudeRotate",t="{segments: 32}";return e.extrudeMethod===0&&(e.length===void 0&&console.log("err079: design error: extrudeLinear length undefined!"),n="extrudeLinear",t=`{height: ${e.length}}`),`
|
|
114
|
+
const ${e.outName} =
|
|
115
|
+
translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]}, ],
|
|
116
|
+
rotate( [ ${e.rotate[0]}, ${e.rotate[1]}, ${e.rotate[2]}, ],
|
|
117
|
+
${n}( ${t}, fig_${e.face} )
|
|
118
|
+
)
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
`}getAllExtrudes(e){let n="";for(const t of e){const r=this.getOneExtrude(t);n+=r}return n}getOneVolume(e){let n="identity";switch(e.boolMethod){case 1:n="intersect";break;case 2:n="union";break;case 3:n="subtract";break}const t=e.inList.join(", ");let r=`const ${e.outName} = ${n}( ${t} );
|
|
122
|
+
`;return e.boolMethod===0&&(r=`const ${e.outName} = ${e.inList[0]};
|
|
123
|
+
`),r}getAllVolumes(e){let n="";for(const t of e){const r=this.getOneVolume(t);n+=r}return n}getAllSubGeoms(e){const n=[];for(const t of e)n.includes(t.subgeom)||n.push(t.subgeom);return n}getOneInherit(e){return`
|
|
124
|
+
const ${e.outName} =
|
|
125
|
+
translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]}, ],
|
|
126
|
+
rotate( [ ${e.rotate[0]}, ${e.rotate[1]}, ${e.rotate[2]}, ],
|
|
127
|
+
${e.subdesign}
|
|
128
|
+
)
|
|
129
|
+
);
|
|
130
|
+
`}getAllInherits(e){let n="";for(const t of e){const r=this.getOneInherit(t);n+=r}return n}getVolume(e){let n="";if(e.inherits!==void 0){const t=this.getAllSubGeoms(e.inherits);for(const r of t){const s=qt().getPaxJson({},r,en);n+=this.getAllFigures(s.figures,s.partName),n+=this.getVolume(r.vol)}n+=this.getAllInherits(e.inherits)}return n+=this.getAllExtrudes(e.extrudes),n+=this.getAllVolumes(e.volumes),n}getFooter(e){return`
|
|
131
|
+
return pax_${e};
|
|
132
|
+
}
|
|
133
|
+
module.exports = { main };
|
|
134
|
+
`}getExportFile(e){let n=this.getHeader();return n+=this.getAllFigures(e.figures,e.partName),n+=this.getVolume(e.volume),n+=this.getFooter(e.partName),n}};function fl(){return new ll}function de(e){return e.toFixed(4)}function be(e){return e.toString().padStart(3,"0")}function dl(e,n,t,r){return`def ${r}():
|
|
135
|
+
# Radius, XYZ-position, orientation
|
|
136
|
+
aCircle = Part.makeCircle(${de(t)}, App.Vector(${de(e)}, ${de(n)}, 0), App.Vector(0, 0, 1))
|
|
137
|
+
aWire = Part.Wire(aCircle)
|
|
138
|
+
rFace = Part.Face(aWire)
|
|
139
|
+
return rFace
|
|
140
|
+
|
|
141
|
+
`}function pl(e,n){let t=`def ${n}():
|
|
142
|
+
`,r=0,s=0,i=0,a=0,o=0;for(const[l,c]of e.entries()){if(c.typ===0)t+=` P${be(i)} = App.Vector(${de(c.px)}, ${de(c.py)}, 0)
|
|
143
|
+
`,i+=1;else if(c.typ===1)t+=` P${be(i)} = App.Vector(${de(c.px)}, ${de(c.py)}, 0)
|
|
144
|
+
`,l<e.length-1?a=i:a=0,t+=` S${be(o)} = Part.LineSegment(P${be(i-1)}, P${be(a)})
|
|
145
|
+
`,i+=1,o+=1;else if(c.typ===2){try{const h=K0(c),m=Pa(r,s,h);t+=` P${be(i)} = App.Vector(${de(m.cx)}, ${de(m.cy)}, 0)
|
|
146
|
+
`,i+=1}catch(h){console.log("err730: "+h)}t+=` P${be(i)} = App.Vector(${de(c.px)}, ${de(c.py)}, 0)
|
|
147
|
+
`,l<e.length-1?a=i:a=0,t+=` S${be(o)} = Part.Arc(P${be(i-2)}, P${be(i-1)}, P${be(a)})
|
|
148
|
+
`,i+=1,o+=1}r=c.px,s=c.py}const u=Array.from({length:o},(l,c)=>`S${be(c)}`);return t+=` aShape = Part.Shape([${u.join(", ")}])
|
|
149
|
+
aWire = Part.Wire(aShape.Edges)
|
|
150
|
+
subFace = Part.Face(aWire)
|
|
151
|
+
subFace.check()
|
|
152
|
+
return subFace
|
|
153
|
+
|
|
154
|
+
`,t}function hl(e,n){let t=`def ${n}():
|
|
155
|
+
`;const r=[];for(const[a,o]of e.entries()){const u=`FC${be(a)}`;t+=` ${u} = ${o}()
|
|
156
|
+
`,r.push(u)}const s=r[0],i=r.slice(1);return i.length>0?t+=` rOneFace = ${s}.cut([${i.join(", ")}])
|
|
157
|
+
`:t+=` rOneFace = ${s}
|
|
158
|
+
`,t+=` rOneFace.check()
|
|
159
|
+
return rOneFace
|
|
160
|
+
|
|
161
|
+
`,t}function ml(e,n){let t=`def ${n}():
|
|
162
|
+
`;const r=[];for(const[a,o]of e.entries()){const u=`FA${be(a)}`;t+=` ${u} = ${o}()
|
|
163
|
+
`,r.push(u)}const s=r[0],i=r.slice(1);return i.length>0?t+=` rOneFig = ${s}.fuse([${i.join(", ")}])
|
|
164
|
+
`:t+=` rOneFig = ${s}
|
|
165
|
+
`,t+=` rOneFig.check()
|
|
166
|
+
return rOneFig
|
|
167
|
+
|
|
168
|
+
`,t}var xl=class{getHeader(e){return`# freecad-python generated by Parametrix
|
|
169
|
+
# run the script with:
|
|
170
|
+
# freecad.cmd myScript.py
|
|
171
|
+
|
|
172
|
+
import FreeCAD as App
|
|
173
|
+
import Part
|
|
174
|
+
|
|
175
|
+
#print(sys.argv)
|
|
176
|
+
outFileName = "${e}"
|
|
177
|
+
if (len(sys.argv) == 3):
|
|
178
|
+
outFileName = sys.argv[2]
|
|
179
|
+
print(f"outFileName: {outFileName}")
|
|
180
|
+
|
|
181
|
+
`}getOneFigure(e,n){let t="";const r=[];for(const[s,i]of e.entries()){const a=`face_${n}_Fa${s}`,o=[];for(const[u,l]of i.entries()){const c=`ctr_${a}_Ctr${u}`;if(l.circle===!0){const h=l;t+=dl(h.cx,h.cy,h.radius,c)}else t+=pl(l.seg,c);o.push(c)}t+=hl(o,a),r.push(a)}return t+=ml(r,n),t}getAllFigures(e,n){let t="";for(const r in e){const s=this.getOneFigure(e[r],`${n}_${r}`);t+=s}return t}getOneExtrude(e){let n=`def fex_${e.outName}():
|
|
182
|
+
FIG = ${e.face}()
|
|
183
|
+
`;return e.extrudeMethod===0?(e.length===void 0&&console.log(`err103: ${e.face} ${e.outName} design error: eLinearOrtho length undefined!`),n+=` VEX = FIG.extrude(App.Vector(0, 0, ${e.length}))`):e.extrudeMethod===1&&(n+=" VEX = FIG.revolve(App.Vector(0, 0, 0), App.Vector(0, 1, 0), 360).rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), 90)"),n+=`
|
|
184
|
+
VR1 = VEX.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${de(Ie(e.rotate[0]))})
|
|
185
|
+
VR2 = VR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${de(Ie(e.rotate[1]))})
|
|
186
|
+
VR3 = VR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${de(Ie(e.rotate[2]))})
|
|
187
|
+
VFP = VR3.translate(App.Vector(${de(e.translate[0])}, ${de(e.translate[1])}, ${de(e.translate[2])}))
|
|
188
|
+
return VFP
|
|
189
|
+
${e.outName} = fex_${e.outName}()
|
|
190
|
+
|
|
191
|
+
`,n}getAllExtrudes(e){let n="";for(const t of e){const r=this.getOneExtrude(t);n+=r}return n}getOneVolume(e){let n="";if(e.inList.length===0)console.log(`err215: ${e.outName} has an empty inList`);else if(e.inList.length===1||e.boolMethod===0)n+=`${e.outName} = ${e.inList[0]}
|
|
192
|
+
`;else{const t=e.inList[0],r=e.inList.slice(1);let s="dbg897";switch(e.boolMethod){case 1:s="common";break;case 2:s="fuse";break;case 3:s="cut";break}n+=`def fvol_${e.outName}():
|
|
193
|
+
V000 = ${t}
|
|
194
|
+
`;let i=0;for(const a of r)n+=` V${be(i+1)} = V${be(i)}.${s}(${a})
|
|
195
|
+
`,i+=1;n+=` VFC = V${be(i)}.removeSplitter()
|
|
196
|
+
return VFC
|
|
197
|
+
${e.outName} = fvol_${e.outName}()
|
|
198
|
+
|
|
199
|
+
`}return n}getAllVolumes(e){let n="";for(const t of e){const r=this.getOneVolume(t);n+=r}return n}getAllSubGeoms(e){const n=[];for(const t of e)n.includes(t.subgeom)||n.push(t.subgeom);return n}getOneInherit(e){return`def finh_${e.outName}():
|
|
200
|
+
IVR1 = ${e.subdesign}.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${de(Ie(e.rotate[0]))})
|
|
201
|
+
IVR2 = IVR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${de(Ie(e.rotate[1]))})
|
|
202
|
+
IVR3 = IVR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${de(Ie(e.rotate[2]))})
|
|
203
|
+
IVF = IVR3.translate(App.Vector(${de(e.translate[0])}, ${de(e.translate[1])}, ${de(e.translate[2])}))
|
|
204
|
+
return IVF
|
|
205
|
+
${e.outName} = finh_${e.outName}()
|
|
206
|
+
|
|
207
|
+
`}getAllInherits(e){let n="";for(const t of e){const r=this.getOneInherit(t);n+=r}return n}getVolume(e){let n="";if(e.inherits!==void 0){const t=this.getAllSubGeoms(e.inherits);for(const r of t){const s=qt().getPaxJson({},r,en);n+=this.getAllFigures(s.figures,s.partName),n+=this.getVolume(r.vol)}n+=this.getAllInherits(e.inherits)}return n+=this.getAllExtrudes(e.extrudes),n+=this.getAllVolumes(e.volumes),n}getFooter(e){return`
|
|
208
|
+
pax_${e}.check()
|
|
209
|
+
#pax_${e}.exportBrep(f"{outFileName}.brep")
|
|
210
|
+
#pax_${e}.exportIges(f"{outFileName}.igs")
|
|
211
|
+
#pax_${e}.exportStep(f"{outFileName}.stp")
|
|
212
|
+
pax_${e}.exportStl(f"{outFileName}.stl")
|
|
213
|
+
|
|
214
|
+
`}getExportFile(e){let n=this.getHeader(e.partName);return n+=this.getAllFigures(e.figures,e.partName),n+=this.getVolume(e.volume),n+=this.getFooter(e.partName),n}};function Dl(){return new xl}var gl=class{constructor(){I(this,"xMin");I(this,"xMax");I(this,"yMin");I(this,"yMax");I(this,"firstDone");this.firstDone=!1,this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addAContour(e){if(e.length>0){const n=[];this.firstDone&&(n.push(Y(this.xMin,this.yMin)),n.push(Y(this.xMax,this.yMax)));for(const a of e)n.push(...a.generatePoints());const[t,r,s,i]=Fa(n);this.xMin=t,this.xMax=r,this.yMin=s,this.yMax=i}}getViewBox(){const e=Math.round((this.xMax-this.xMin)*1.1)+10,n=Math.round((this.yMax-this.yMin)*1.1)+10,t=Math.round(this.xMin-e*.05),r=Math.round(this.yMin-n*.05);return[t,e,r,n]}},wl=class{constructor(){I(this,"minMax");I(this,"groups");I(this,"svg");this.minMax=new gl,this.groups=[],this.svg=k0()}addAContour(e,n="",t=me.contour){this.minMax.addAContour(e);const r={gpName:n,gpColor:t,ctrs:e};this.groups.push(r)}makeSvg(e){for(const n of this.groups){n.gpName!==""&&this.svg.addGroup(n.gpName);for(const t of n.ctrs){let r=t.imposedColor;r===""&&(r=n.gpColor),this.svg.addSvgString(t.toSvg(e,r))}n.gpName!==""&&this.svg.closeGroup()}}stringify(){const[e,n,t,r]=this.minMax.getViewBox();return this.svg.addHeader(e,n,t,r),this.makeSvg(this.minMax.yMax+this.minMax.yMin),this.svg.stringify()}};function ja(){return new wl}function Yn(e){const n=ja();return n.addAContour(e),n.stringify()}function Mn(e){const n=ja();return n.addAContour(e.mainListC(),"main",me.mainInner),n.addAContour(e.mainBList,"mainB",me.mainB),n.addAContour(e.secondList,"second",me.second),n.addAContour(e.secondBList,"secondB",me.secondB),n.addAContour(e.dynamicsList,"dynamics",me.dynamics),n.stringify()}function Wn(e){const n=I0();for(const r of e)if(r.circle){const s=r.toDxfSeg()[0];n.addCircle(s.p1x,s.p1y,s.radius)}else for(const s of r.toDxfSeg())s.arc?n.addArc(s.p1x,s.p1y,s.radius,s.a1,s.a2):n.addLine(s.p1x,s.p1y,s.p2x,s.p2y);return n.stringify()}function yl(e){let n="";return n+=e.logstr,n}function Va(e,n,t){return qt().getPaxStr(e,n,t)}function Ua(e){const n=qt().getPaxJson({},e,en);return nl().getExportFile(n)}function qa(e){const n=qt().getPaxJson({},e,en);return fl().getExportFile(n)}function Ga(e){const n=qt().getPaxJson({},e,en);return Dl().getExportFile(n)}async function bl(e,n,t,r,s){const i=new vc("application/zip"),a=new Hc(i),o=n.partName,u=new Ce(JSON.stringify(e,null,2));await a.add(`param_${o}.json`,u);const l=new Ce(n.logstr);await a.add(`geom_${o}_log.txt`,l);const c=new Ce(r.logstr);await a.add(`geom_${o}_t${t}_log.txt`,c);for(const w in n.fig){const b=new Ce(Yn(n.fig[w].mainListC()));await a.add(`face_${o}_${w}.svg`,b);const A=new Ce(Wn(n.fig[w].mainListC()));await a.add(`face_${o}_${w}.dxf`,A);const v=new Ce(Mn(n.fig[w]));await a.add(`deco_${o}_${w}.svg`,v);const E=new Ce(Mn(r.fig[w]));await a.add(`deco_${o}_${w}_t${t}.svg`,E)}const h=Ur(n.fig),m=new Ce(Yn(h.mainListC()));await a.add(`face_${o}_all_merged.svg`,m);const x=new Ce(Wn(h.mainListC()));await a.add(`face_${o}_all_merged.dxf`,x);const y=new Ce(Mn(h));await a.add(`deco_${o}_all_merged.svg`,y);const f=new Ce(Mn(h));await a.add(`deco_${o}_all_merged_t${t}.svg`,f);const d=new Ce(Va(e,n,s));await a.add(`${o}.pax.json`,d);const p=new Ce(Ua(n));await a.add(`${o}_noarc_openscad.scad`,p);const D=new Ce(qa(n));await a.add(`${o}_noarc_jscad.js`,D);const g=new Ce(Ga(n));return await a.add(`${o}_freecad.py`,g),await a.close(),await i.getData()}var _l=(e=>(e[e.eSVG=0]="eSVG",e[e.eSVGALL=1]="eSVGALL",e[e.eDXF=2]="eDXF",e[e.eDXFALL=3]="eDXFALL",e[e.eTXTLOG=4]="eTXTLOG",e[e.ePAX=5]="ePAX",e[e.eOPENSCAD=6]="eOPENSCAD",e[e.eJSCAD=7]="eJSCAD",e[e.eFREECAD=8]="eFREECAD",e[e.eZIP=9]="eZIP",e))(_l||{});function ff(e,n,t,r,s){const i=e(0,n);let a="";if(i.calcErr)console.log("err931: error by calling geome ${geome0.calcErr}");else{const o=Object.keys(i.fig);if(s===0)if(o.includes(r)){const u=i.fig[r];a=Yn(u.mainListC())}else console.log(`err749: fileTextContent eFace ${r} invalid`);else if(s===1){const u=Ur(i.fig);a=Yn(u.mainListC())}else if(s===2)if(o.includes(r)){const u=i.fig[r];a=Wn(u.mainListC())}else console.log(`err759: fileTextContent eFace ${r} invalid`);else if(s===3){const u=Ur(i.fig);a=Wn(u.mainListC())}else s===4?a=yl(i):s===5?a=Va(n,i,t):s===6?a=Ua(i):s===7?a=qa(i):s===8?a=Ga(i):console.log(`err912: unknown exportFormat ${s}`)}return a}async function df(e,n,t,r,s){const i=e(0,t),a=e(n,t);let o=new Blob;return!i.calcErr&&!a.calcErr?s===9?o=await bl(t,i,n,a,r):console.log(`err913: unknown exportFormat ${s}`):console.log("err932: error by calling geome ${geome0.calcErr} ${geome1.calcErr}"),o}function pf(e){let n="";return e===0||e===1?n="image/svg+xml":e===2||e===3?n="application/dxf":e===4?n="text/plain":e===5?n="application/json":e===6||e===7||e===8?n="text/plain":e===9&&(n="application/zip"),n}function hf(e){let n="";return e===0||e===1?n=".svg":e===2||e===3?n=".dxf":e===4?n=".log":e===5?n=".pax.json":e===6?n="_noarc_openscad.scad":e===7?n="_noarc_jscad.js":e===8?n="_freecad.py":e===9&&(n=".zip"),n}function mf(e){let n=!1;return e===9&&(n=!0),n}function xf(e,n,t,r){return JSON.stringify({lastModif:e,partName:n,pVal:t,comment:r},null," ")}function Df(e){const n=p0.parse(e),t="lastModif",r="partName",s="pVal",i="comment";let a="";const o={lastModif:"",partName:"",pVal:{},comment:""};if(Object.hasOwn(n,t)&&(o[t]=n[t]),Object.hasOwn(n,r)&&(o[r]=n[r]),Object.hasOwn(n,s)){const u=n[s];for(const l of Object.keys(u)){const c=u[l];if(isNaN(c))throw`err905: ${c} is not a number!`;o[s][l]=c}a+=`info398: parsing file has found ${Object.keys(o[s]).length} parameters
|
|
215
|
+
`}else throw`err489: parameter-json-file has no key ${s}
|
|
216
|
+
`;return Object.hasOwn(n,i)&&(o[i]=n[i]),[o,a]}function Ha(){return[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]}function tn(){return[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]}function vl(e){const n=tn(),t=Math.cos(e),r=Math.sin(e);return n[1][1]=t,n[2][2]=t,n[2][1]=r,n[1][2]=-r,n}function Al(e){const n=tn(),t=Math.cos(e),r=Math.sin(e);return n[0][0]=t,n[2][2]=t,n[0][2]=r,n[2][0]=-r,n}function Cl(e){const n=tn(),t=Math.cos(e),r=Math.sin(e);return n[0][0]=t,n[1][1]=t,n[0][1]=-r,n[1][0]=r,n}function El(e,n){const t=Ha();for(let r=0;r<4;r++)for(let s=0;s<4;s++){let i=0;for(let a=0;a<4;a++)i+=e[r][a]*n[a][s];t[r][s]=i}return t}function qr(e){let n=tn();for(const t of e)n=El(t,n);return n}function Fl(e,n,t){return qr([vl(e),Al(n),Cl(t)])}function Sl(e,n,t){const r=tn();return r[0][3]=e,r[1][3]=n,r[2][3]=t,r}function kl(e){const n=Ha();for(let t=0;t<4;t++)for(let r=0;r<4;r++)n[t][r]=e[t][r];return n}function Tl(e,n){const t=[n[0],n[1],n[2],1],r=[0,0,0];for(let s=0;s<3;s++){let i=0;for(let a=0;a<4;a++)i+=e[s][a]*t[a];r[s]=i}return r}function Pl(e){return[e[0][3],e[1][3],e[2][3]]}function Bl(e){let n=0,t=0,r=0;const s=e[2][0],i=10**-5;return Math.abs(s-1)<i?(r=0,t=-Math.PI/2,n=-r+Math.atan2(-e[0][1],-e[0][2])):Math.abs(s+1)<i?(r=0,t=Math.PI/2,n=r+Math.atan2(e[0][1],e[0][2])):(n=Math.atan2(e[2][1],e[2][2]),t=Math.atan2(-e[2][0],Math.sqrt(e[2][1]**2+e[2][2]**2)),r=Math.atan2(e[1][0],e[0][0])),[n,t,r]}var Ml=class{constructor(e){I(this,"mmat");this.mmat=kl(e)}addRotation(e,n,t){const r=Fl(e,n,t);return this.mmat=qr([this.mmat,r]),this}addTranslation(e,n,t){const r=Sl(e,n,t);return this.mmat=qr([this.mmat,r]),this}getMatrix(){return this.mmat}getRotation(){return Bl(this.mmat)}getTranslation(){return Pl(this.mmat)}transform(e){return Tl(this.mmat,e)}},Il=tn();function gf(e=Il){return new Ml(e)}function $l(e,n,t,r,s=0){return rs(e,n).addCornerRounded(s).addSegStrokeR(t,0).addCornerRounded(s).addSegStrokeR(0,r).addCornerRounded(s).addSegStrokeR(-t,0).addCornerRounded(s).closeSegStroke()}function Ll(e,n,t,r,s,i=0){return $l(e,n,t,r,i).rotate(e,n,s)}function wf(e,n,t,r,s,i=0){const a=r/2*Math.sin(s),o=-r/2*Math.cos(s);return Ll(e+a,n+o,t,r,s,i)}function yf(e,n,t,r,s,i=0){const a=(r-t)/2;return rs(e,n).addCornerRounded(i).addSegStrokeR(t,0).addCornerRounded(i).addSegStrokeR(a,s).addCornerRounded(i).addSegStrokeR(-r,0).addCornerRounded(i).closeSegStroke()}function bf(e,n,t,r,s){if(r<t)throw`err821: Hlength ${r} is too small compare to Vwidth ${t}`;const i=t/2,a=r-t;return rs(i+a,-i).addPointA(i+a,i).addSegArc(i,!1,!0).addSegStrokeA(i,i).addPointA(i,-i).addSegArc(i,!1,!0).closeSegStroke().rotate(0,0,s).translate(e,n)}function _f(e){const n=[];n.push("version details:"),n.push(`${e.name} : ${e.version}`),n.push("dependencies:");const t=Object.keys(e.dependencies);for(const[r,s]of t.entries()){const i=s;n.push(`${r+1} : ${s} : ${e.dependencies[i]}`)}return n}export{ff as $,Ql as A,zl as B,Mt as C,le as D,Z0 as E,_f as F,Ul as G,ql as H,tf as I,Rr as J,nf as K,Jl as L,xf as M,Df as N,Xl as O,U0 as P,Zl as Q,Yl as R,h0 as S,Wl as T,zn as U,Kl as V,me as W,Gl as X,G0 as Y,_l as Z,df as _,uf as a,hf as a0,mf as a1,pf as a2,Ur as a3,af as b,of as c,cf as d,Vl as e,Hl as f,ct as g,rs as h,jl as i,Y0 as j,ef as k,Y as l,bf as m,rf as n,lf as o,sf as p,W0 as q,Ie as r,hs as s,gf as t,yf as u,wf as v,$l as w,Ll as x,V0 as y,te as z};
|