designix-uis 0.5.31 → 0.5.35

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.
Files changed (61) hide show
  1. package/dist/designix-uis.js +15 -14
  2. package/dist/public/_app/immutable/assets/0.CYMnRzgN.css +1 -0
  3. package/dist/public/_app/immutable/assets/3.C7hmPFkZ.css +1 -0
  4. package/dist/public/_app/immutable/assets/_layout.CYMnRzgN.css +1 -0
  5. package/dist/public/_app/immutable/assets/_page.C7hmPFkZ.css +1 -0
  6. package/dist/public/_app/immutable/chunks/disclose-version.DkikEV2B.js +1 -0
  7. package/dist/public/_app/immutable/chunks/entry.D40EjI52.js +3 -0
  8. package/dist/public/_app/immutable/chunks/index-client.C7pJvqfN.js +1 -0
  9. package/dist/public/_app/immutable/chunks/index.sJjTKvaS.js +216 -0
  10. package/dist/public/_app/immutable/chunks/lifecycle.CQ2Qb9R_.js +1 -0
  11. package/dist/public/_app/immutable/chunks/{makeList.OAfyhA_q.js → makeList.fOLEx6eN.js} +31 -31
  12. package/dist/public/_app/immutable/chunks/paths.xeXTqdFV.js +1 -0
  13. package/dist/public/_app/immutable/chunks/runtime.Xz9lwreE.js +1 -0
  14. package/dist/public/_app/immutable/chunks/slot.CUYYDJeJ.js +1 -0
  15. package/dist/public/_app/immutable/chunks/stores.BtqS84x2.js +1 -0
  16. package/dist/public/_app/immutable/entry/app.bFVvx2bH.js +2 -0
  17. package/dist/public/_app/immutable/entry/start.BsvUjVvn.js +1 -0
  18. package/dist/public/_app/immutable/nodes/0.D_rctyGM.js +2 -0
  19. package/dist/public/_app/immutable/nodes/1.hFsChVXV.js +1 -0
  20. package/dist/public/_app/immutable/nodes/2.D0tWU3xO.js +1 -0
  21. package/dist/public/_app/immutable/nodes/3.D2G_vuK3.js +9 -0
  22. package/dist/public/_app/version.json +1 -1
  23. package/dist/public/gear/gear_bar.html +22 -23
  24. package/dist/public/gear/gear_epicycloid.html +22 -23
  25. package/dist/public/gear/gear_ring.html +22 -23
  26. package/dist/public/gear/gear_wheel.html +22 -23
  27. package/dist/public/heliostat/base.html +22 -23
  28. package/dist/public/heliostat/haxis_guidance.html +22 -23
  29. package/dist/public/heliostat/heliostat.html +26 -35
  30. package/dist/public/heliostat/heliostat_2.html +25 -32
  31. package/dist/public/heliostat/pole_static.html +25 -32
  32. package/dist/public/heliostat/rake.html +22 -23
  33. package/dist/public/heliostat/rake_stopper.html +22 -23
  34. package/dist/public/heliostat/ring.html +22 -23
  35. package/dist/public/heliostat/ring_guidance.html +22 -23
  36. package/dist/public/heliostat/rod.html +22 -23
  37. package/dist/public/heliostat/spider.html +22 -23
  38. package/dist/public/heliostat/surface.html +22 -23
  39. package/dist/public/heliostat/swing.html +22 -23
  40. package/dist/public/heliostat/trapeze.html +22 -23
  41. package/dist/public/heliostat/vaxis.html +22 -23
  42. package/dist/public/heliostat/vaxis_guidance.html +22 -23
  43. package/dist/public/heliostat/vaxis_holder.html +22 -23
  44. package/dist/public/index.html +19 -18
  45. package/package.json +15 -14
  46. package/dist/public/_app/immutable/assets/0.BNk8pMG6.css +0 -1
  47. package/dist/public/_app/immutable/assets/3.Bup7ghXO.css +0 -1
  48. package/dist/public/_app/immutable/assets/_layout.BNk8pMG6.css +0 -1
  49. package/dist/public/_app/immutable/assets/_page.Bup7ghXO.css +0 -1
  50. package/dist/public/_app/immutable/chunks/entry.oPpVaRrB.js +0 -3
  51. package/dist/public/_app/immutable/chunks/index.RMmEH_Pi.js +0 -1
  52. package/dist/public/_app/immutable/chunks/index.VmH-9d5B.js +0 -216
  53. package/dist/public/_app/immutable/chunks/paths.5abfQOAR.js +0 -1
  54. package/dist/public/_app/immutable/chunks/scheduler.2BOoCPD3.js +0 -1
  55. package/dist/public/_app/immutable/chunks/stores.HcZef9In.js +0 -1
  56. package/dist/public/_app/immutable/entry/app.CapF3jjb.js +0 -2
  57. package/dist/public/_app/immutable/entry/start.-Sir-erq.js +0 -1
  58. package/dist/public/_app/immutable/nodes/0.B1yvqSEr.js +0 -4
  59. package/dist/public/_app/immutable/nodes/1.DavRY4Ml.js +0 -1
  60. package/dist/public/_app/immutable/nodes/2.Gyi4j-fY.js +0 -1
  61. package/dist/public/_app/immutable/nodes/3.CR7SAa95.js +0 -18
@@ -0,0 +1,216 @@
1
+ var Ja=Object.defineProperty;var Qa=(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)=>Qa(e,typeof n!="symbol"?n+"":n,t);import{ad as eo,G as to,ar as Ai,h as ot,N as ir,b as no,F as ro,ap as Ci,L as so,M as os,O as ar,P as tn,H as Ei,I as Fi,J as io,as as or,T as ao,C as us,at as qr,au as cs,av as Gr,aw as oo,o as uo,z as ls,ax as co,ao as Si,ay as lo,az as fo,ae as ki,al as po,aA as ho,aj as mo,aB as xo,E as fs,aC as Do,aD as go}from"./runtime.Xz9lwreE.js";let ur=null;function Rl(e,n){return n}function wo(e,n,t,r){for(var s=[],i=n.length,a=0;a<i;a++)co(n[a].e,s,!0);var o=i>0&&s.length===0&&t!==null;if(o){var u=t.parentNode;Si(u),u.append(t),r.clear(),Ft(e,n[0].prev,n[i-1].next)}lo(s,()=>{for(var l=0;l<i;l++){var c=n[l];o||(r.delete(c.k),Ft(e,c.prev,c.next)),fo(c.e,!o)}})}function Ol(e,n,t,r,s,i=null){var a=e,o={flags:n,items:new Map,first:null},u=(n&Ai)!==0;if(u){var l=e;a=ot?ir(ki(l)):l.appendChild(eo())}ot&&no();var c=null,d=!1;to(()=>{var m=t(),x=ro(m)?m:m==null?[]:Ci(m),y=x.length;if(d&&y===0)return;d=y===0;let f=!1;if(ot){var p=a.data===so;p!==(y===0)&&(a=os(),ir(a),ar(!1),f=!0)}if(ot){for(var h=null,g,D=0;D<y;D++){if(tn.nodeType===8&&tn.data===po){a=tn,f=!0,ar(!1);break}var _=x[D],b=r(_,D);g=Ti(tn,o,h,null,_,b,D,s,n),o.items.set(b,g),h=g}y>0&&ir(os())}ot||yo(x,o,a,s,n,r),i!==null&&(y===0?c?Ei(c):c=Fi(()=>i(a)):c!==null&&io(c,()=>{c=null})),f&&ar(!0),t()}),ot&&(a=tn)}function yo(e,n,t,r,s,i){var $,O,R,M;var a=(s&ho)!==0,o=(s&(qr|Gr))!==0,u=e.length,l=n.items,c=n.first,d=c,m,x=null,y,f=[],p=[],h,g,D,_;if(a)for(_=0;_<u;_+=1)h=e[_],g=i(h,_),D=l.get(g),D!==void 0&&(($=D.a)==null||$.measure(),(y??(y=new Set)).add(D));for(_=0;_<u;_+=1){if(h=e[_],g=i(h,_),D=l.get(g),D===void 0){var b=d?d.e.nodes_start:t;x=Ti(b,n,x,x===null?n.first:x.next,h,g,_,r,s),l.set(g,x),f=[],p=[],d=x.next;continue}if(o&&bo(D,h,_,s),D.e.f&or&&(Ei(D.e),a&&((O=D.a)==null||O.unfix(),(y??(y=new Set)).delete(D))),D!==d){if(m!==void 0&&m.has(D)){if(f.length<p.length){var w=p[0],v;x=w.prev;var A=f[0],C=f[f.length-1];for(v=0;v<f.length;v+=1)ds(f[v],w,t);for(v=0;v<p.length;v+=1)m.delete(p[v]);Ft(n,A.prev,C.next),Ft(n,x,A),Ft(n,C,w),d=w,x=C,_-=1,f=[],p=[]}else m.delete(D),ds(D,d,t),Ft(n,D.prev,D.next),Ft(n,D,x===null?n.first:x.next),Ft(n,x,D),x=D;continue}for(f=[],p=[];d!==null&&d.k!==g;)d.e.f&or||(m??(m=new Set)).add(d),p.push(d),d=d.next;if(d===null)continue;D=d}f.push(D),x=D,d=D.next}if(d!==null||m!==void 0){for(var F=m===void 0?[]:Ci(m);d!==null;)d.e.f&or||F.push(d),d=d.next;var S=F.length;if(S>0){var N=s&Ai&&u===0?t:null;if(a){for(_=0;_<S;_+=1)(R=F[_].a)==null||R.measure();for(_=0;_<S;_+=1)(M=F[_].a)==null||M.fix()}wo(n,F,N,l)}}a&&ao(()=>{var V;if(y!==void 0)for(D of y)(V=D.a)==null||V.apply()}),us.first=n.first&&n.first.e,us.last=x&&x.e}function bo(e,n,t,r){r&qr&&cs(e.v,n),r&Gr?cs(e.i,t):e.i=t}function Ti(e,n,t,r,s,i,a,o,u){var l=ur;try{var c=(u&qr)!==0,d=(u&oo)===0,m=c?d?uo(s):ls(s):s,x=u&Gr?ls(a):a,y={i:x,v:m,k:i,a:null,e:null,prev:t,next:r};return ur=y,y.e=Fi(()=>o(e,m,x),ot),y.e.prev=t&&t.e,y.e.next=r&&r.e,t===null?n.first=y:(t.next=y,t.e.next=y.e),r!==null&&(r.prev=y,r.e.prev=y.e),y}finally{ur=l}}function ds(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=mo(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 jl(e){ot&&ki(e)!==null&&Si(e)}let ps=!1;function _o(){ps||(ps=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var n;if(!e.defaultPrevented)for(const t of e.target.elements)(n=t.__on_r)==null||n.call(t)})},{capture:!0}))}function Vl(e){if(ot){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,go(t),_o()}}function Ul(e,n){var t=e.__attributes??(e.__attributes={});t.value===(t.value=n)||e.value===n||(e.value=n)}function ql(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={});ot&&(s[n]=e.getAttribute(n),n==="src"||n==="srcset"||n==="href"&&e.nodeName==="LINK")||s[n]!==(s[n]=t)&&(n==="loading"&&(e[xo]=t),t==null?e.removeAttribute(n):typeof t!="string"&&vo(e).includes(n)?e[n]=t:e.setAttribute(n,t))}var ms=new Map;function vo(e){var n=ms.get(e.nodeName);if(n)return n;ms.set(e.nodeName,n=[]);for(var t,r=fs(e),s=Element.prototype;s!==r;){t=Do(r);for(var i in t)t[i].set&&n.push(i);r=fs(r)}return n}const fn=15,Er=30,Fr=19,Ao=29,Rn=256,Hr=Rn+1+Ao,xs=2*Hr+1,nn=256,Co=7,Ds=16,gs=17,ws=18,cr=8*2,On=-1,Eo=1,bn=2,Fo=0,Zt=0,ys=1,So=3,ke=4,ze=0,Pi=1,_n=2,Je=-2,ko=-3,Wt=-5;function Yn(e){return Zn(e.map(([n,t])=>new Array(n).fill(t,0,n)))}function Zn(e){return e.reduce((n,t)=>n.concat(Array.isArray(t)?Zn(t):t),[])}const bs=[0,1,2,3].concat(...Yn([[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,d,m,x,y,f,p=0;for(x=0;x<=fn;x++)s.bl_count[x]=0;for(i[s.heap[s.heap_max]*2+1]=0,c=s.heap_max+1;c<xs;c++)d=s.heap[c],x=i[i[d*2+1]*2+1]+1,x>l&&(x=l,p++),i[d*2+1]=x,!(d>e.max_code)&&(s.bl_count[x]++,y=0,d>=u&&(y=o[d-u]),f=i[d*2],s.opt_len+=f*(x+y),a&&(s.static_len+=f*(a[d*2+1]+y)));if(p!==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]--,p-=2}while(p>0);for(x=l;x!==0;x--)for(d=s.bl_count[x];d!==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),d--)}}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,d;for(l=1;l<=fn;l++)o[l]=u=u+a[l-1]<<1;for(c=0;c<=i;c++)d=s[c*2+1],d!==0&&(s[c*2]=t(o[d]++,d))}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,d;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;)d=s.heap[++s.heap_len]=c<2?++c:0,i[d*2]=1,s.depth[d]=0,s.opt_len--,a&&(s.static_len-=a[d*2+1]);for(e.max_code=c,u=Math.floor(s.heap_len/2);u>=1;u--)s.pqdownheap(i,u);d=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[d*2]=i[u*2]+i[l*2],s.depth[d]=Math.max(s.depth[u],s.depth[l])+1,i[u*2+1]=i[l*2+1]=d,s.heap[1]=d++,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(...Yn([[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 To=[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],Po=Yn([[144,8],[112,9],[24,7],[8,8]]);_e.static_ltree=Zn(To.map((e,n)=>[e,Po[n]]));const Bo=[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],Mo=Yn([[30,5]]);_e.static_dtree=Zn(Bo.map((e,n)=>[e,Mo[n]]));_e.static_l_desc=new _e(_e.static_ltree,ie.extra_lbits,Rn+1,Hr,fn);_e.static_d_desc=new _e(_e.static_dtree,ie.extra_dbits,0,Er,fn);_e.static_bl_desc=new _e(null,ie.extra_blbits,0,Fr,Co);const Io=9,$o=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 Bi=0,Mn=1,Rt=2,Xe=[new it(0,0,0,0,Bi),new it(4,4,8,4,Mn),new it(4,5,16,8,Mn),new it(4,6,32,32,Mn),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)],vn=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],je=0,An=1,rn=2,Cn=3,Lo=32,lr=42,En=113,sn=666,fr=8,No=0,dr=1,Ro=2,ce=3,In=258,Le=In+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 Oo(){const e=this;let n,t,r,s,i,a,o,u,l,c,d,m,x,y,f,p,h,g,D,_,b,w,v,A,C,F,S,N,$,O,R,M,V;const U=new ie,pe=new ie,j=new ie;e.depth=[];let fe,G,ee,He,ge,he;e.bl_count=[],e.heap=[],R=[],M=[],V=[];function yt(){l=2*i,d[x-1]=0;for(let E=0;E<x-1;E++)d[E]=0;F=Xe[S].max_lazy,$=Xe[S].good_length,O=Xe[S].nice_length,C=Xe[S].max_chain,b=0,h=0,v=0,g=A=ce-1,_=0,m=0}function pt(){let E;for(E=0;E<Hr;E++)R[E*2]=0;for(E=0;E<Er;E++)M[E*2]=0;for(E=0;E<Fr;E++)V[E*2]=0;R[nn*2]=1,e.opt_len=e.static_len=0,G=ee=0}function bt(){U.dyn_tree=R,U.stat_desc=_e.static_l_desc,pe.dyn_tree=M,pe.stat_desc=_e.static_d_desc,j.dyn_tree=V,j.stat_desc=_e.static_bl_desc,ge=0,he=0,He=8,pt()}e.pqdownheap=function(E,P){const T=e.heap,B=T[P];let L=P<<1;for(;L<=e.heap_len&&(L<e.heap_len&&_s(E,T[L+1],T[L],e.depth)&&L++,!_s(E,B,T[L],e.depth));)T[P]=T[L],P=L,L<<=1;T[P]=B};function tt(E,P){let T=-1,B,L=E[0*2+1],q=0,z=7,Ae=4;L===0&&(z=138,Ae=3),E[(P+1)*2+1]=65535;for(let Ze=0;Ze<=P;Ze++)B=L,L=E[(Ze+1)*2+1],!(++q<z&&B==L)&&(q<Ae?V[B*2]+=q:B!==0?(B!=T&&V[B*2]++,V[Ds*2]++):q<=10?V[gs*2]++:V[ws*2]++,q=0,T=B,L===0?(z=138,Ae=3):B==L?(z=6,Ae=3):(z=7,Ae=4))}function It(){let E;for(tt(R,U.max_code),tt(M,pe.max_code),j.build_tree(e),E=Fr-1;E>=3&&V[ie.bl_order[E]*2+1]===0;E--);return e.opt_len+=3*(E+1)+5+5+4,E}function We(E){e.pending_buf[e.pending++]=E}function nt(E){We(E&255),We(E>>>8&255)}function Gt(E){We(E>>8&255),We(E&255&255)}function ue(E,P){let T;const B=P;he>cr-B?(T=E,ge|=T<<he&65535,nt(ge),ge=T>>>cr-he,he+=B-cr):(ge|=E<<he&65535,he+=B)}function we(E,P){const T=E*2;ue(P[T]&65535,P[T+1]&65535)}function ht(E,P){let T,B=-1,L,q=E[0*2+1],z=0,Ae=7,Ze=4;for(q===0&&(Ae=138,Ze=3),T=0;T<=P;T++)if(L=q,q=E[(T+1)*2+1],!(++z<Ae&&L==q)){if(z<Ze)do we(L,V);while(--z!==0);else L!==0?(L!=B&&(we(L,V),z--),we(Ds,V),ue(z-3,2)):z<=10?(we(gs,V),ue(z-3,3)):(we(ws,V),ue(z-11,7));z=0,B=L,q===0?(Ae=138,Ze=3):L==q?(Ae=6,Ze=3):(Ae=7,Ze=4)}}function Oe(E,P,T){let B;for(ue(E-257,5),ue(P-1,5),ue(T-4,4),B=0;B<T;B++)ue(V[ie.bl_order[B]*2+1],3);ht(R,E-1),ht(M,P-1)}function Se(){he==16?(nt(ge),ge=0,he=0):he>=8&&(We(ge&255),ge>>>=8,he-=8)}function rt(){ue(dr<<1,3),we(nn,_e.static_ltree),Se(),1+He+10-he<9&&(ue(dr<<1,3),we(nn,_e.static_ltree),Se()),He=7}function st(E,P){let T,B,L;if(e.dist_buf[G]=E,e.lc_buf[G]=P&255,G++,E===0?R[P*2]++:(ee++,E--,R[(ie._length_code[P]+Rn+1)*2]++,M[ie.d_code(E)*2]++),!(G&8191)&&S>2){for(T=G*8,B=b-h,L=0;L<Er;L++)T+=M[L*2]*(5+ie.extra_dbits[L]);if(T>>>=3,ee<Math.floor(G/2)&&T<Math.floor(B/2))return!0}return G==fe-1}function Ye(E,P){let T,B,L=0,q,z;if(G!==0)do T=e.dist_buf[L],B=e.lc_buf[L],L++,T===0?we(B,E):(q=ie._length_code[B],we(q+Rn+1,E),z=ie.extra_lbits[q],z!==0&&(B-=ie.base_length[q],ue(B,z)),T--,q=ie.d_code(T),we(q,P),z=ie.extra_dbits[q],z!==0&&(T-=ie.base_dist[q],ue(T,z)));while(L<G);we(nn,E),He=E[nn*2+1]}function yn(){he>8?nt(ge):he>0&&We(ge&255),ge=0,he=0}function nr(E,P,T){yn(),He=8,nt(P),nt(~P),e.pending_buf.set(u.subarray(E,E+P),e.pending),e.pending+=P}function Ht(E,P,T){ue((No<<1)+(T?1:0),3),nr(E,P)}function Ya(E,P,T){let B,L,q=0;S>0?(U.build_tree(e),pe.build_tree(e),q=It(),B=e.opt_len+3+7>>>3,L=e.static_len+3+7>>>3,L<=B&&(B=L)):B=L=P+5,P+4<=B&&E!=-1?Ht(E,P,T):L==B?(ue((dr<<1)+(T?1:0),3),Ye(_e.static_ltree,_e.static_dtree)):(ue((Ro<<1)+(T?1:0),3),Oe(U.max_code+1,pe.max_code+1,q+1),Ye(R,M)),pt(),T&&yn()}function _t(E){Ya(h>=0?h:-1,b-h,E),h=b,n.flush_pending()}function rr(){let E,P,T,B;do{if(B=l-v-b,B===0&&b===0&&v===0)B=i;else if(B==-1)B--;else if(b>=i+i-Le){u.set(u.subarray(i,i+i),0),w-=i,b-=i,h-=i,E=x,T=E;do P=d[--T]&65535,d[T]=P>=i?P-i:0;while(--E!==0);E=i,T=E;do P=c[--T]&65535,c[T]=P>=i?P-i:0;while(--E!==0);B+=i}if(n.avail_in===0)return;E=n.read_buf(u,b+v,B),v+=E,v>=ce&&(m=u[b]&255,m=(m<<p^u[b+1]&255)&f)}while(v<Le&&n.avail_in!==0)}function Za(E){let P=65535,T;for(P>r-5&&(P=r-5);;){if(v<=1){if(rr(),v===0&&E==Zt)return je;if(v===0)break}if(b+=v,v=0,T=h+P,(b===0||b>=T)&&(v=b-T,b=T,_t(!1),n.avail_out===0)||b-h>=i-Le&&(_t(!1),n.avail_out===0))return je}return _t(E==ke),n.avail_out===0?E==ke?rn:je:E==ke?Cn:An}function ss(E){let P=C,T=b,B,L,q=A;const z=b>i-Le?b-(i-Le):0;let Ae=O;const Ze=o,sr=b+In;let is=u[T+q-1],as=u[T+q];A>=$&&(P>>=2),Ae>v&&(Ae=v);do if(B=E,!(u[B+q]!=as||u[B+q-1]!=is||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<sr);if(L=In-(sr-T),T=sr-In,L>q){if(w=E,q=L,L>=Ae)break;is=u[T+q-1],as=u[T+q]}}while((E=c[E&Ze]&65535)>z&&--P!==0);return q<=v?q:v}function Xa(E){let P=0,T;for(;;){if(v<Le){if(rr(),v<Le&&E==Zt)return je;if(v===0)break}if(v>=ce&&(m=(m<<p^u[b+(ce-1)]&255)&f,P=d[m]&65535,c[b&o]=d[m],d[m]=b),P!==0&&(b-P&65535)<=i-Le&&N!=bn&&(g=ss(P)),g>=ce)if(T=st(b-w,g-ce),v-=g,g<=F&&v>=ce){g--;do b++,m=(m<<p^u[b+(ce-1)]&255)&f,P=d[m]&65535,c[b&o]=d[m],d[m]=b;while(--g!==0);b++}else b+=g,g=0,m=u[b]&255,m=(m<<p^u[b+1]&255)&f;else T=st(0,u[b]&255),v--,b++;if(T&&(_t(!1),n.avail_out===0))return je}return _t(E==ke),n.avail_out===0?E==ke?rn:je:E==ke?Cn:An}function Ka(E){let P=0,T,B;for(;;){if(v<Le){if(rr(),v<Le&&E==Zt)return je;if(v===0)break}if(v>=ce&&(m=(m<<p^u[b+(ce-1)]&255)&f,P=d[m]&65535,c[b&o]=d[m],d[m]=b),A=g,D=w,g=ce-1,P!==0&&A<F&&(b-P&65535)<=i-Le&&(N!=bn&&(g=ss(P)),g<=5&&(N==Eo||g==ce&&b-w>4096)&&(g=ce-1)),A>=ce&&g<=A){B=b+v-ce,T=st(b-1-D,A-ce),v-=A-1,A-=2;do++b<=B&&(m=(m<<p^u[b+(ce-1)]&255)&f,P=d[m]&65535,c[b&o]=d[m],d[m]=b);while(--A!==0);if(_=0,g=ce-1,b++,T&&(_t(!1),n.avail_out===0))return je}else if(_!==0){if(T=st(0,u[b-1]&255),T&&_t(!1),b++,v--,n.avail_out===0)return je}else _=1,b++,v--}return _!==0&&(T=st(0,u[b-1]&255),_=0),_t(E==ke),n.avail_out===0?E==ke?rn:je:E==ke?Cn:An}function za(E){return E.total_in=E.total_out=0,E.msg=null,e.pending=0,e.pending_out=0,t=En,s=Zt,bt(),yt(),ze}e.deflateInit=function(E,P,T,B,L,q){return B||(B=fr),L||(L=$o),q||(q=Fo),E.msg=null,P==On&&(P=6),L<1||L>Io||B!=fr||T<9||T>15||P<0||P>9||q<0||q>bn?Je:(E.dstate=e,a=T,i=1<<a,o=i-1,y=L+7,x=1<<y,f=x-1,p=Math.floor((y+ce-1)/ce),u=new Uint8Array(i*2),c=[],d=[],fe=1<<L+6,e.pending_buf=new Uint8Array(fe*4),r=fe*4,e.dist_buf=new Uint16Array(fe),e.lc_buf=new Uint8Array(fe),S=P,N=q,za(E))},e.deflateEnd=function(){return t!=lr&&t!=En&&t!=sn?Je:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,d=null,c=null,u=null,e.dstate=null,t==En?ko:ze)},e.deflateParams=function(E,P,T){let B=ze;return P==On&&(P=6),P<0||P>9||T<0||T>bn?Je:(Xe[S].func!=Xe[P].func&&E.total_in!==0&&(B=E.deflate(ys)),S!=P&&(S=P,F=Xe[S].max_lazy,$=Xe[S].good_length,O=Xe[S].nice_length,C=Xe[S].max_chain),N=T,B)},e.deflateSetDictionary=function(E,P,T){let B=T,L,q=0;if(!P||t!=lr)return Je;if(B<ce)return ze;for(B>i-Le&&(B=i-Le,q=T-B),u.set(P.subarray(q,q+B),0),b=B,h=B,m=u[0]&255,m=(m<<p^u[1]&255)&f,L=0;L<=B-ce;L++)m=(m<<p^u[L+(ce-1)]&255)&f,c[L&o]=d[m],d[m]=L;return ze},e.deflate=function(E,P){let T,B,L,q,z;if(P>ke||P<0)return Je;if(!E.next_out||!E.next_in&&E.avail_in!==0||t==sn&&P!=ke)return E.msg=vn[_n-Je],Je;if(E.avail_out===0)return E.msg=vn[_n-Wt],Wt;if(n=E,q=s,s=P,t==lr&&(B=fr+(a-8<<4)<<8,L=(S-1&255)>>1,L>3&&(L=3),B|=L<<6,b!==0&&(B|=Lo),B+=31-B%31,t=En,Gt(B)),e.pending!==0){if(n.flush_pending(),n.avail_out===0)return s=-1,ze}else if(n.avail_in===0&&P<=q&&P!=ke)return n.msg=vn[_n-Wt],Wt;if(t==sn&&n.avail_in!==0)return E.msg=vn[_n-Wt],Wt;if(n.avail_in!==0||v!==0||P!=Zt&&t!=sn){switch(z=-1,Xe[S].func){case Bi:z=Za(P);break;case Mn:z=Xa(P);break;case Rt:z=Ka(P);break}if((z==rn||z==Cn)&&(t=sn),z==je||z==rn)return n.avail_out===0&&(s=-1),ze;if(z==An){if(P==ys)rt();else if(Ht(0,0,!1),P==So)for(T=0;T<x;T++)d[T]=0;if(n.flush_pending(),n.avail_out===0)return s=-1,ze}}return P!=ke?ze:Pi}}function Mi(){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}Mi.prototype={deflateInit(e,n){const t=this;return t.dstate=new Oo,n||(n=fn),t.dstate.deflateInit(t,e,n)},deflate(e){const n=this;return n.dstate?n.dstate.deflate(n,e):Je},deflateEnd(){const e=this;if(!e.dstate)return Je;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):Je},deflateSetDictionary(e,n){const t=this;return t.dstate?t.dstate.deflateSetDictionary(t,e,n):Je},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 jo(e){const n=this,t=new Mi,r=Vo(e&&e.chunkSize?e.chunkSize:64*1024),s=Zt,i=new Uint8Array(r);let a=e?e.level:On;typeof a>"u"&&(a=On),t.deflateInit(a),t.next_out=i,n.append=function(o,u){let l,c,d=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!=ze)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!=d&&(u(t.next_in_index),d=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 d=[];do{if(t.next_out_index=0,t.avail_out=r,o=t.deflate(ke),o!=Pi&&o!=ze)throw new Error("deflating: "+t.msg);r-t.avail_out>0&&d.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),d.forEach(function(m){u.set(m,l),l+=m.length}),u}}function Vo(e){return e+5*(Math.floor(e/16383)+1)}const Uo=15,Q=0,Dt=1,qo=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],Ii=1440,Go=0,Ho=4,Wo=9,Yo=5,Zo=[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],Xo=[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],Ko=[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],zo=[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],Jo=[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],Qo=[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 Sr(){const e=this;let n,t,r,s,i,a;function o(l,c,d,m,x,y,f,p,h,g,D){let _,b,w,v,A,C,F,S,N,$,O,R,M,V,U;$=0,A=d;do r[l[c+$]]++,$++,A--;while(A!==0);if(r[0]==d)return f[0]=-1,p[0]=0,Q;for(S=p[0],C=1;C<=vt&&r[C]===0;C++);for(F=C,S<C&&(S=C),A=vt;A!==0&&r[A]===0;A--);for(w=A,S>A&&(S=A),p[0]=S,V=1<<C;C<A;C++,V<<=1)if((V-=r[C])<0)return ae;if((V-=r[A])<0)return ae;for(r[A]+=V,a[1]=C=0,$=1,M=2;--A!==0;)a[M]=C+=r[$],M++,$++;A=0,$=0;do(C=l[c+$])!==0&&(D[a[C]++]=A),$++;while(++A<d);for(d=a[w],a[0]=A=0,$=0,v=-1,R=-S,i[0]=0,O=0,U=0;F<=w;F++)for(_=r[F];_--!==0;){for(;F>R+S;){if(v++,R+=S,U=w-R,U=U>S?S:U,(b=1<<(C=F-R))>_+1&&(b-=_+1,M=F,C<U))for(;++C<U&&!((b<<=1)<=r[++M]);)b-=r[M];if(U=1<<C,g[0]+U>Ii)return ae;i[v]=O=g[0],g[0]+=U,v!==0?(a[v]=A,s[0]=C,s[1]=S,C=A>>>R-S,s[2]=O-i[v-1]-C,h.set(s,(i[v-1]+C)*3)):f[0]=O}for(s[1]=F-R,$>=d?s[0]=192:D[$]<m?(s[0]=D[$]<256?0:96,s[2]=D[$++]):(s[0]=y[D[$]-m]+16+64,s[2]=x[D[$++]-m]),b=1<<F-R,C=A>>>R;C<U;C+=b)h.set(s,(O+C)*3);for(C=1<<F-1;A&C;C>>>=1)A^=C;for(A^=C,N=(1<<R)-1;(A&N)!=a[v];)v--,R-=S,N=(1<<R)-1}return V!==0&&w!=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,d,m,x){let y;return u(19),n[0]=0,y=o(l,0,19,19,null,null,d,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,d,m,x,y,f,p,h){let g;return u(288),n[0]=0,g=o(d,0,l,257,Ko,zo,y,m,p,n,t),g!=Q||m[0]===0?(g==ae?h.msg="oversubscribed literal/length tree":g!=vs&&(h.msg="incomplete literal/length tree",g=ae),g):(u(288),g=o(d,l,c,0,Jo,Qo,f,x,p,n,t),g!=Q||x[0]===0&&l>257?(g==ae?h.msg="oversubscribed distance tree":g==gt?(h.msg="incomplete distance tree",g=ae):g!=vs&&(h.msg="empty distance tree with lengths",g=ae),g):Q)}}Sr.inflate_trees_fixed=function(e,n,t,r){return e[0]=Wo,n[0]=Yo,t[0]=Zo,r[0]=Xo,Q};const Fn=0,As=1,Cs=2,Es=3,Fs=4,Ss=5,ks=6,pr=7,Ts=8,Sn=9;function eu(){const e=this;let n,t=0,r,s=0,i=0,a=0,o=0,u=0,l=0,c=0,d,m=0,x,y=0;function f(p,h,g,D,_,b,w,v){let A,C,F,S,N,$,O,R,M,V,U,pe,j,fe,G,ee;O=v.next_in_index,R=v.avail_in,N=w.bitb,$=w.bitk,M=w.write,V=M<w.read?w.read-M-1:w.end-M,U=Re[p],pe=Re[h];do{for(;$<20;)R--,N|=(v.read_byte(O++)&255)<<$,$+=8;if(A=N&U,C=g,F=D,ee=(F+A)*3,(S=C[ee])===0){N>>=C[ee+1],$-=C[ee+1],w.win[M++]=C[ee+2],V--;continue}do{if(N>>=C[ee+1],$-=C[ee+1],S&16){for(S&=15,j=C[ee+2]+(N&Re[S]),N>>=S,$-=S;$<15;)R--,N|=(v.read_byte(O++)&255)<<$,$+=8;A=N&pe,C=_,F=b,ee=(F+A)*3,S=C[ee];do if(N>>=C[ee+1],$-=C[ee+1],S&16){for(S&=15;$<S;)R--,N|=(v.read_byte(O++)&255)<<$,$+=8;if(fe=C[ee+2]+(N&Re[S]),N>>=S,$-=S,V-=j,M>=fe)G=M-fe,M-G>0&&2>M-G?(w.win[M++]=w.win[G++],w.win[M++]=w.win[G++],j-=2):(w.win.set(w.win.subarray(G,G+2),M),M+=2,G+=2,j-=2);else{G=M-fe;do G+=w.end;while(G<0);if(S=w.end-G,j>S){if(j-=S,M-G>0&&S>M-G)do w.win[M++]=w.win[G++];while(--S!==0);else w.win.set(w.win.subarray(G,G+S),M),M+=S,G+=S,S=0;G=0}}if(M-G>0&&j>M-G)do w.win[M++]=w.win[G++];while(--j!==0);else w.win.set(w.win.subarray(G,G+j),M),M+=j,G+=j,j=0;break}else if(!(S&64))A+=C[ee+2],A+=N&Re[S],ee=(F+A)*3,S=C[ee];else return v.msg="invalid distance code",j=v.avail_in-R,j=$>>3<j?$>>3:j,R+=j,O-=j,$-=j<<3,w.bitb=N,w.bitk=$,v.avail_in=R,v.total_in+=O-v.next_in_index,v.next_in_index=O,w.write=M,ae;while(!0);break}if(S&64)return S&32?(j=v.avail_in-R,j=$>>3<j?$>>3:j,R+=j,O-=j,$-=j<<3,w.bitb=N,w.bitk=$,v.avail_in=R,v.total_in+=O-v.next_in_index,v.next_in_index=O,w.write=M,Dt):(v.msg="invalid literal/length code",j=v.avail_in-R,j=$>>3<j?$>>3:j,R+=j,O-=j,$-=j<<3,w.bitb=N,w.bitk=$,v.avail_in=R,v.total_in+=O-v.next_in_index,v.next_in_index=O,w.write=M,ae);if(A+=C[ee+2],A+=N&Re[S],ee=(F+A)*3,(S=C[ee])===0){N>>=C[ee+1],$-=C[ee+1],w.win[M++]=C[ee+2],V--;break}}while(!0)}while(V>=258&&R>=10);return j=v.avail_in-R,j=$>>3<j?$>>3:j,R+=j,O-=j,$-=j<<3,w.bitb=N,w.bitk=$,v.avail_in=R,v.total_in+=O-v.next_in_index,v.next_in_index=O,w.write=M,Q}e.init=function(p,h,g,D,_,b){n=Fn,l=p,c=h,d=g,m=D,x=_,y=b,r=null},e.proc=function(p,h,g){let D,_,b,w=0,v=0,A=0,C,F,S,N;for(A=h.next_in_index,C=h.avail_in,w=p.bitb,v=p.bitk,F=p.write,S=F<p.read?p.read-F-1:p.end-F;;)switch(n){case Fn:if(S>=258&&C>=10&&(p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,g=f(l,c,d,m,x,y,p,h),A=h.next_in_index,C=h.avail_in,w=p.bitb,v=p.bitk,F=p.write,S=F<p.read?p.read-F-1:p.end-F,g!=Q)){n=g==Dt?pr:Sn;break}i=l,r=d,s=m,n=As;case As:for(D=i;v<D;){if(C!==0)g=Q;else return p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g);C--,w|=(h.read_byte(A++)&255)<<v,v+=8}if(_=(s+(w&Re[D]))*3,w>>>=r[_+1],v-=r[_+1],b=r[_],b===0){a=r[_+2],n=ks;break}if(b&16){o=b&15,t=r[_+2],n=Cs;break}if(!(b&64)){i=b,s=_/3+r[_+2];break}if(b&32){n=pr;break}return n=Sn,h.msg="invalid literal/length code",g=ae,p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g);case Cs:for(D=o;v<D;){if(C!==0)g=Q;else return p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g);C--,w|=(h.read_byte(A++)&255)<<v,v+=8}t+=w&Re[D],w>>=D,v-=D,i=c,r=x,s=y,n=Es;case Es:for(D=i;v<D;){if(C!==0)g=Q;else return p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g);C--,w|=(h.read_byte(A++)&255)<<v,v+=8}if(_=(s+(w&Re[D]))*3,w>>=r[_+1],v-=r[_+1],b=r[_],b&16){o=b&15,u=r[_+2],n=Fs;break}if(!(b&64)){i=b,s=_/3+r[_+2];break}return n=Sn,h.msg="invalid distance code",g=ae,p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g);case Fs:for(D=o;v<D;){if(C!==0)g=Q;else return p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g);C--,w|=(h.read_byte(A++)&255)<<v,v+=8}u+=w&Re[D],w>>=D,v-=D,n=Ss;case Ss:for(N=F-u;N<0;)N+=p.end;for(;t!==0;){if(S===0&&(F==p.end&&p.read!==0&&(F=0,S=F<p.read?p.read-F-1:p.end-F),S===0&&(p.write=F,g=p.inflate_flush(h,g),F=p.write,S=F<p.read?p.read-F-1:p.end-F,F==p.end&&p.read!==0&&(F=0,S=F<p.read?p.read-F-1:p.end-F),S===0)))return p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g);p.win[F++]=p.win[N++],S--,N==p.end&&(N=0),t--}n=Fn;break;case ks:if(S===0&&(F==p.end&&p.read!==0&&(F=0,S=F<p.read?p.read-F-1:p.end-F),S===0&&(p.write=F,g=p.inflate_flush(h,g),F=p.write,S=F<p.read?p.read-F-1:p.end-F,F==p.end&&p.read!==0&&(F=0,S=F<p.read?p.read-F-1:p.end-F),S===0)))return p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g);g=Q,p.win[F++]=a,S--,n=Fn;break;case pr:if(v>7&&(v-=8,C++,A--),p.write=F,g=p.inflate_flush(h,g),F=p.write,S=F<p.read?p.read-F-1:p.end-F,p.read!=p.write)return p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g);n=Ts;case Ts:return g=Dt,p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g);case Sn:return g=ae,p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g);default:return g=Pe,p.bitb=w,p.bitk=v,h.avail_in=C,h.total_in+=A-h.next_in_index,h.next_in_index=A,p.write=F,p.inflate_flush(h,g)}},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,hr=1,Bs=2,Ms=3,Is=4,$s=5,kn=6,Tn=7,Ls=8,$t=9;function tu(e,n){const t=this;let r=Yt,s=0,i=0,a=0,o;const u=[0],l=[0],c=new eu;let d=0,m=new Int32Array(Ii*3);const x=0,y=new Sr;t.bitk=0,t.bitb=0,t.win=new Uint8Array(n),t.end=n,t.read=0,t.write=0,t.reset=function(f,p){p&&(p[0]=x),r==kn&&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,p){let h,g,D;return g=f.next_out_index,D=t.read,h=(D<=t.write?t.write:t.end)-D,h>f.avail_out&&(h=f.avail_out),h!==0&&p==gt&&(p=Q),f.avail_out-=h,f.total_out+=h,f.next_out.set(t.win.subarray(D,D+h),g),g+=h,D+=h,D==t.end&&(D=0,t.write==t.end&&(t.write=0),h=t.write-D,h>f.avail_out&&(h=f.avail_out),h!==0&&p==gt&&(p=Q),f.avail_out-=h,f.total_out+=h,f.next_out.set(t.win.subarray(D,D+h),g),g+=h,D+=h),f.next_out_index=g,t.read=D,p},t.proc=function(f,p){let h,g,D,_,b,w,v,A;for(_=f.next_in_index,b=f.avail_in,g=t.bitb,D=t.bitk,w=t.write,v=w<t.read?t.read-w-1:t.end-w;;){let C,F,S,N,$,O,R,M;switch(r){case Yt:for(;D<3;){if(b!==0)p=Q;else return t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);b--,g|=(f.read_byte(_++)&255)<<D,D+=8}switch(h=g&7,d=h&1,h>>>1){case 0:g>>>=3,D-=3,h=D&7,g>>>=h,D-=h,r=hr;break;case 1:C=[],F=[],S=[[]],N=[[]],Sr.inflate_trees_fixed(C,F,S,N),c.init(C[0],F[0],S[0],0,N[0],0),g>>>=3,D-=3,r=kn;break;case 2:g>>>=3,D-=3,r=Ms;break;case 3:return g>>>=3,D-=3,r=$t,f.msg="invalid block type",p=ae,t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p)}break;case hr:for(;D<32;){if(b!==0)p=Q;else return t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);b--,g|=(f.read_byte(_++)&255)<<D,D+=8}if((~g>>>16&65535)!=(g&65535))return r=$t,f.msg="invalid stored block lengths",p=ae,t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);s=g&65535,g=D=0,r=s!==0?Bs:d!==0?Tn:Yt;break;case Bs:if(b===0||v===0&&(w==t.end&&t.read!==0&&(w=0,v=w<t.read?t.read-w-1:t.end-w),v===0&&(t.write=w,p=t.inflate_flush(f,p),w=t.write,v=w<t.read?t.read-w-1:t.end-w,w==t.end&&t.read!==0&&(w=0,v=w<t.read?t.read-w-1:t.end-w),v===0)))return t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);if(p=Q,h=s,h>b&&(h=b),h>v&&(h=v),t.win.set(f.read_buf(_,h),w),_+=h,b-=h,w+=h,v-=h,(s-=h)!==0)break;r=d!==0?Tn:Yt;break;case Ms:for(;D<14;){if(b!==0)p=Q;else return t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);b--,g|=(f.read_byte(_++)&255)<<D,D+=8}if(i=h=g&16383,(h&31)>29||(h>>5&31)>29)return r=$t,f.msg="too many length or distance symbols",p=ae,t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);if(h=258+(h&31)+(h>>5&31),!o||o.length<h)o=[];else for(A=0;A<h;A++)o[A]=0;g>>>=14,D-=14,a=0,r=Is;case Is:for(;a<4+(i>>>10);){for(;D<3;){if(b!==0)p=Q;else return t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);b--,g|=(f.read_byte(_++)&255)<<D,D+=8}o[Ps[a++]]=g&7,g>>>=3,D-=3}for(;a<19;)o[Ps[a++]]=0;if(u[0]=7,h=y.inflate_trees_bits(o,u,l,m,f),h!=Q)return p=h,p==ae&&(o=null,r=$t),t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);a=0,r=$s;case $s:for(;h=i,!(a>=258+(h&31)+(h>>5&31));){let V,U;for(h=u[0];D<h;){if(b!==0)p=Q;else return t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);b--,g|=(f.read_byte(_++)&255)<<D,D+=8}if(h=m[(l[0]+(g&Re[h]))*3+1],U=m[(l[0]+(g&Re[h]))*3+2],U<16)g>>>=h,D-=h,o[a++]=U;else{for(A=U==18?7:U-14,V=U==18?11:3;D<h+A;){if(b!==0)p=Q;else return t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);b--,g|=(f.read_byte(_++)&255)<<D,D+=8}if(g>>>=h,D-=h,V+=g&Re[A],g>>>=A,D-=A,A=a,h=i,A+V>258+(h&31)+(h>>5&31)||U==16&&A<1)return o=null,r=$t,f.msg="invalid bit length repeat",p=ae,t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);U=U==16?o[A-1]:0;do o[A++]=U;while(--V!==0);a=A}}if(l[0]=-1,$=[],O=[],R=[],M=[],$[0]=9,O[0]=6,h=i,h=y.inflate_trees_dynamic(257+(h&31),1+(h>>5&31),o,$,O,R,M,m,f),h!=Q)return h==ae&&(o=null,r=$t),p=h,t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);c.init($[0],O[0],m,R[0],m,M[0]),r=kn;case kn:if(t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,(p=c.proc(t,f,p))!=Dt)return t.inflate_flush(f,p);if(p=Q,c.free(f),_=f.next_in_index,b=f.avail_in,g=t.bitb,D=t.bitk,w=t.write,v=w<t.read?t.read-w-1:t.end-w,d===0){r=Yt;break}r=Tn;case Tn:if(t.write=w,p=t.inflate_flush(f,p),w=t.write,v=w<t.read?t.read-w-1:t.end-w,t.read!=t.write)return t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);r=Ls;case Ls:return p=Dt,t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);case $t:return p=ae,t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p);default:return p=Pe,t.bitb=g,t.bitk=D,f.avail_in=b,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=w,t.inflate_flush(f,p)}}},t.free=function(f){t.reset(f,null),t.win=null,m=null},t.set_dictionary=function(f,p,h){t.win.set(f.subarray(p,p+h),0),t.read=t.write=h},t.sync_point=function(){return r==hr?1:0}}const nu=32,ru=8,su=0,Ns=1,Rs=2,Os=3,js=4,Vs=5,mr=6,an=7,Us=12,At=13,iu=[0,0,255,255];function au(){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=an,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 tu(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==Ho?gt:Q,s=gt;;)switch(a.mode){case su: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)!=ru){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&nu)){a.mode=an;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=mr,qo);case mr:return a.mode=At,t.msg="need dictionary",a.marker=0,Pe;case an: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!=mr)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=an,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)==iu[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=an,Q)},e.inflateSyncPoint=function(t){return!t||!t.istate||!t.istate.blocks?Pe:t.istate.blocks.sync_point()}}function $i(){}$i.prototype={inflateInit(e){const n=this;return n.istate=new au,e||(e=Uo),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 ou(e){const n=this,t=new $i,r=e&&e.chunkSize?Math.floor(e.chunkSize*2):128*1024,s=Go,i=new Uint8Array(r);let a=!1;t.inflateInit(),t.next_out=i,n.append=function(o,u){const l=[];let c,d,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?(d=new Uint8Array(y),l.forEach(function(f){d.set(f,x),x+=f.length})):d=l[0]?new Uint8Array(l[0]):new Uint8Array,d}},n.flush=function(){t.inflateEnd()}}const $e=4294967295,Be=65535,uu=8,cu=0,lu=99,fu=67324752,Li=134695760,du=Li,pu=33639248,hu=101010256,mu=101075792,xu=117853008,kr=22,Ni=20,Ri=56,Du=kr+Ni+Ri,gu=1,wu=39169,yu=10,bu=1,Oi=21589,_u=6534,vu=1,Au=8,Cu=2048,Eu=16,Fu=20,qs=45,Gs=51,xr="/",Hs=new Date(2107,11,31),Ws=new Date(1980,0,1),oe=void 0,Pt="undefined",xn="function";class Ys{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 Su=64;let ji=2;try{typeof navigator!=Pt&&navigator.hardwareConcurrency&&(ji=navigator.hardwareConcurrency)}catch{}const ku={chunkSize:512*1024,maxWorkers:ji,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:oe,CompressionStreamNative:typeof CompressionStream!=Pt&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=Pt&&DecompressionStream},St=Object.assign({},ku);function Tu(){return St}function Pu(e){return Math.max(e.chunkSize,Su)}function Wr(e){const{baseURL:n,chunkSize:t,maxWorkers:r,terminateWorkerTimeout:s,useCompressionStream:i,useWebWorkers:a,Deflate:o,Inflate:u,CompressionStream:l,DecompressionStream:c,workerScripts:d}=e;if(Ct("baseURL",n),Ct("chunkSize",t),Ct("maxWorkers",r),Ct("terminateWorkerTimeout",s),Ct("useCompressionStream",i),Ct("useWebWorkers",a),o&&(St.CompressionStream=new Ys(o)),u&&(St.DecompressionStream=new Ys(u)),Ct("CompressionStream",l),Ct("DecompressionStream",c),d!==oe){const{deflate:m,inflate:x}=d;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 Dr={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(Dr))for(const t of Object.keys(Dr[n])){const r=Dr[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 Vi=[];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;Vi[e]=n}class Tr{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^Vi[(t^n[r])&255];this.crc=t}get(){return~this.crc}}class Ui extends TransformStream{constructor(){let n;const t=new Tr;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 $n(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}},jn={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}}},qi={};qi.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=jn.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 Gi={};Gi.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 d=a^a<<1^a<<2^a<<3^a<<4;d=d>>8^d&255^99,t[c]=d,r[d]=c,l=s[u=s[o=s[c]]];let m=l*16843009^u*65537^o*257^c*16843008,x=s[d]*257^d*16843008;for(let y=0;y<4;y++)e[y][c]=x=x<<24^x>>>8,n[y][d]=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 d=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,p,h,g;for(let D=0;D<r;D++)p=a[d>>>24]^o[m>>16&255]^u[x>>8&255]^l[y&255]^t[f],h=a[m>>>24]^o[x>>16&255]^u[y>>8&255]^l[d&255]^t[f+1],g=a[x>>>24]^o[y>>16&255]^u[d>>8&255]^l[m&255]^t[f+2],y=a[y>>>24]^o[d>>16&255]^u[m>>8&255]^l[x&255]^t[f+3],f+=4,d=p,m=h,x=g;for(let D=0;D<4;D++)s[n?3&-D:D]=c[d>>>24]<<24^c[m>>16&255]<<16^c[x>>8&255]<<8^c[y&255]^t[f++],p=d,d=m,m=x,x=y,y=p;return s}};const Bu={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}},Hi={};Hi.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(jn.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),d=new DataView(c);let m=0;const x=Ee;for(n=jn.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++)d.setInt32(m,i[o]),m+=4}return c.slice(0,r/8)}};Ut.hmacSha1=class{constructor(e){const n=this,t=n._hash=qi.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 Mu=typeof crypto!=Pt&&typeof crypto.getRandomValues==xn,Wi="Invalid password",Yi="Invalid signature",Zi="zipjs-abort-check-password";function Xi(e){return Mu?crypto.getRandomValues(e):Bu.getRandomValues(e)}const zt=16,Iu="raw",Ki={name:"PBKDF2"},$u={name:"HMAC"},Lu="SHA-1",Nu=Object.assign({hash:$u},Ki),Pr=Object.assign({iterations:1e3,hash:{name:Lu}},Ki),Ru=["deriveBits"],dn=[8,12,16],on=[16,24,32],Et=10,Ou=[0,0,0,0],Xn=typeof crypto!=Pt,Dn=Xn&&crypto.subtle,zi=Xn&&typeof Dn!=Pt,ft=jn.bytes,ju=Gi.aes,Vu=Hi.ctrGladman,Uu=Ut.hmacSha1;let Zs=Xn&&zi&&typeof Dn.importKey==xn,Xs=Xn&&zi&&typeof Dn.deriveBits==xn;class qu 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:ea(n,t),signed:r,strength:s-1,pending:new Uint8Array})},async transform(a,o){const u=this,{password:l,strength:c,resolveReady:d,ready:m}=u;l?(await Hu(u,c,l,qe(a,0,dn[c]+2)),a=qe(a,dn[c]+2),i?o.error(new Error(Zi)):d()):await m;const x=new Uint8Array(a.length-Et-(a.length-Et)%zt);o.enqueue(Ji(u,a,x,0,Et,!0))},async flush(a){const{signed:o,ctr:u,hmac:l,pending:c,ready:d}=this;if(l&&u){await d;const m=qe(c,0,c.length-Et),x=qe(c,c.length-Et);let y=new Uint8Array;if(m.length){const f=hn(ft,m);l.update(f);const p=u.update(f);y=pn(ft,p)}if(o){const f=qe(pn(ft,l.digest()),0,Et);for(let p=0;p<Et;p++)if(f[p]!=x[p])throw new Error(Yi)}a.enqueue(y)}}})}}class Gu extends TransformStream{constructor({password:n,rawPassword:t,encryptionStrength:r}){let s;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:ea(n,t),strength:r-1,pending:new Uint8Array})},async transform(i,a){const o=this,{password:u,strength:l,resolveReady:c,ready:d}=o;let m=new Uint8Array;u?(m=await Wu(o,l,u),c()):await d;const x=new Uint8Array(m.length+i.length-i.length%zt);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 d=a.update(hn(ft,u));o.update(d),c=pn(ft,d)}s.signature=pn(ft,o.digest()).slice(0,Et),i.enqueue(Yr(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=Yr(u,n),t=Xu(t,l-l%zt));let c;for(c=0;c<=l-zt;c+=zt){const d=hn(ft,qe(n,c,c+zt));i&&o.update(d);const m=a.update(d);i||o.update(m),t.set(pn(ft,m),c+r)}return e.pending=qe(n,c),t}async function Hu(e,n,t,r){const s=await Qi(e,n,t,qe(r,0,dn[n])),i=qe(r,dn[n]);if(s[0]!=i[0]||s[1]!=i[1])throw new Error(Wi)}async function Wu(e,n,t){const r=Xi(new Uint8Array(dn[n])),s=await Qi(e,n,t,r);return Yr(r,s)}async function Qi(e,n,t,r){e.password=null;const s=await Yu(Iu,t,Nu,!1,Ru),i=await Zu(Object.assign({salt:r},Pr),s,8*(on[n]*2+2)),a=new Uint8Array(i),o=hn(ft,qe(a,0,on[n])),u=hn(ft,qe(a,on[n],on[n]*2)),l=qe(a,on[n]*2);return Object.assign(e,{keys:{key:o,authentication:u,passwordVerification:l},ctr:new Vu(new ju(o),Array.from(Ou)),hmac:new Uu(u)}),l}async function Yu(e,n,t,r,s){if(Zs)try{return await Dn.importKey(e,n,t,r,s)}catch{return Zs=!1,Ut.importKey(n)}else return Ut.importKey(n)}async function Zu(e,n,t){if(Xs)try{return await Dn.deriveBits(e,n,t)}catch{return Xs=!1,Ut.pbkdf2(n,e.salt,Pr.iterations,t)}else return Ut.pbkdf2(n,e.salt,Pr.iterations,t)}function ea(e,n){return n===oe?$n(e):n}function Yr(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 Xu(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 pn(e,n){return e.fromBits(n)}function hn(e,n){return e.toBits(n)}const Jt=12;class Ku extends TransformStream{constructor({password:n,passwordVerification:t,checkPasswordOnly:r}){super({start(){Object.assign(this,{password:n,passwordVerification:t}),ta(this,n)},transform(s,i){const a=this;if(a.password){const o=Ks(a,s.subarray(0,Jt));if(a.password=null,o[Jt-1]!=a.passwordVerification)throw new Error(Wi);s=s.subarray(Jt)}r?i.error(new Error(Zi)):i.enqueue(Ks(a,s))}})}}class zu extends TransformStream{constructor({password:n,passwordVerification:t}){super({start(){Object.assign(this,{password:n,passwordVerification:t}),ta(this,n)},transform(r,s){const i=this;let a,o;if(i.password){i.password=null;const u=Xi(new Uint8Array(Jt));u[Jt-1]=i.passwordVerification,a=new Uint8Array(r.length+u.length),a.set(zs(i,u),0),o=Jt}else a=new Uint8Array(r.length),o=0;a.set(zs(i,r),o),s.enqueue(a)}})}}function Ks(e,n){const t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=na(e)^n[r],Zr(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]=na(e)^n[r],Zr(e,n[r]);return t}function ta(e,n){const t=[305419896,591751049,878082192];Object.assign(e,{keys:t,crcKey0:new Tr(t[0]),crcKey2:new Tr(t[2])});for(let r=0;r<n.length;r++)Zr(e,n.charCodeAt(r))}function Zr(e,n){let[t,r,s]=e.keys;e.crcKey0.append([n]),t=~e.crcKey0.get(),r=Js(Math.imul(Js(r+ra(t)),134775813)+1),e.crcKey2.append([r>>>24]),s=~e.crcKey2.get(),e.keys=[t,r,s]}function na(e){const n=e.keys[2]|2;return ra(Math.imul(n,n^1)>>>8)}function ra(e){return e&255}function Js(e){return e&4294967295}const Qs="deflate-raw";class Ju 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,d=this;let m,x,y=sa(super.readable);(!a||u)&&l&&(m=new Ui,y=dt(y,m)),i&&(y=aa(y,o,{level:c,chunkSize:t},s,r)),a&&(u?y=dt(y,new zu(n)):(x=new Gu(n),y=dt(y,x))),ia(d,y,()=>{let f;a&&!u&&(f=x.signature),(!a||u)&&l&&(f=new DataView(m.value.buffer).getUint32(0)),d.signature=f})}}class Qu 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 d,m,x=sa(super.readable);a&&(i?x=dt(x,new Ku(n)):(m=new qu(n),x=dt(x,m))),l&&(x=aa(x,c,{chunkSize:t},s,r)),(!a||i)&&o&&(d=new Ui,x=dt(x,d)),ia(this,x,()=>{if((!a||i)&&o){const y=new DataView(d.value.buffer);if(u!=y.getUint32(0,!1))throw new Error(Yi)}})}}function sa(e){return dt(e,new TransformStream({transform(n,t){n&&n.length&&t.enqueue(n)}}))}function ia(e,n,t){n=dt(n,new TransformStream({flush:t})),Object.defineProperty(e,"readable",{get(){return n}})}function aa(e,n,t,r,s){try{const i=n&&r?r:s;e=dt(e,new i(Qs,t))}catch{if(n)try{e=dt(e,new s(Qs,t))}catch{return e}else return e}return e}function dt(e,n){return e.pipeThrough(n)}const ec="message",tc="start",nc="pull",ei="data",rc="ack",ti="close",oa="deflate",sc="inflate";class ic extends TransformStream{constructor(n,t){super({});const r=this,{codecType:s}=n;let i;s.startsWith(oa)?i=Ju:s.startsWith(sc)&&(i=Qu);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})}}),d=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(d)}})}}class ac 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 ua=typeof Worker!=Pt;class gr{constructor(n,{readable:t,writable:r},{options:s,config:i,streamOptions:a,useWebWorkers:o,transferStreams:u,scripts:l},c){const{signal:d}=a;return Object.assign(n,{busy:!0,readable:t.pipeThrough(new ac(i.chunkSize)).pipeThrough(new oc(t,a),{signal:d}),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&&ua?uc:ca)(n,i)}}class oc extends TransformStream{constructor(n,{onstart:t,onprogress:r,size:s,onend:i}){let a=0;super({async start(){t&&await wr(t,s)},async transform(o,u){a+=o.length,r&&await wr(r,a,s),u.enqueue(o)},async flush(){n.size=a,i&&await wr(i,a)}})}}async function wr(e,...n){try{await e(...n)}catch{}}function ca(e,n){return{run:()=>cc(e,n)}}function uc(e,n){const{baseURL:t,chunkSize:r}=n;if(!e.interface){let s;try{s=dc(e.scripts[0],t,e)}catch{return ua=!1,ca(e,n)}Object.assign(e,{worker:s,interface:{run:()=>lc(e,{chunkSize:r})}})}return e.interface}async function cc({options:e,readable:n,writable:t,onTaskFinished:r},s){try{const i=new ic(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 lc(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}=fc(e.writable),c=Ln({type:tc,scripts:o.slice(1),options:a,config:n,readable:i,writable:u},e);c||Object.assign(e,{reader:i.getReader(),writer:u.getWriter()});const d=await s;return c||await u.getWriter().close(),await l,d}function fc(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 ni=!0,ri=!0;function dc(e,n,t){const r={type:"module"};let s,i;typeof e==xn&&(e=e());try{s=new URL(e,n)}catch{s=e}if(ni)try{i=new Worker(s)}catch{ni=!1,i=new Worker(s,r)}else i=new Worker(s,r);return i.addEventListener(ec,a=>pc(a,t)),i}function Ln(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&&ri?(a&&u.push(a),o&&u.push(o)):e.readable=e.writable=null,u.length)try{return n.postMessage(e,u),!0}catch{ri=!1,e.readable=e.writable=null,n.postMessage(e)}else n.postMessage(e)}catch(i){throw t&&t.releaseLock(),r(),i}}async function pc({data:e},n){const{type:t,value:r,messageId:s,result:i,error:a}=e,{reader:o,writer:u,resolveResult:l,rejectResult:c,onTaskFinished:d}=n;try{if(a){const{message:x,stack:y,code:f,name:p}=a,h=new Error(x);Object.assign(h,{stack:y,code:f,name:p}),m(h)}else{if(t==nc){const{value:x,done:y}=await o.read();Ln({type:ei,value:x,done:y,messageId:s},n)}t==ei&&(await u.ready,await u.write(new Uint8Array(r)),Ln({type:rc,messageId:s},n)),t==ti&&m(null,i)}}catch(x){Ln({type:ti,messageId:s},n),m(x)}function m(x,y){x?c(x):l(y),u&&u.releaseLock(),d()}}let jt=[];const yr=[];let si=0;async function hc(e,n){const{options:t,config:r}=n,{transferStreams:s,useWebWorkers:i,useCompressionStream:a,codecType:o,compressed:u,signed:l,encrypted:c}=t,{workerScripts:d,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&&d?d[o]:[],t.useCompressionStream=a||a===oe&&r.useCompressionStream,(await y()).run();async function y(){const p=jt.find(h=>!h.busy);if(p)return ii(p),new gr(p,e,n,f);if(jt.length<m){const h={indexWorker:si};return si++,jt.push(h),new gr(h,e,n,f)}else return new Promise(h=>yr.push({resolve:h,stream:e,workerOptions:n}))}function f(p){if(yr.length){const[{resolve:h,stream:g,workerOptions:D}]=yr.splice(0,1);h(new gr(p,g,D,f))}else p.worker?(ii(p),mc(p,n)):jt=jt.filter(h=>h!=p)}}function mc(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 ii(e){const{terminateTimeout:n}=e;n&&(clearTimeout(n),e.terminateTimeout=null)}function xc(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=15,Te=573,We=-2;function je(t){return He(t.map((([t,n])=>new e(t).fill(n,0,t))))}function He(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?He(n):n)),[])}const Le=[0,1,2,3].concat(...je([[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 Fe(){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=Te,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;Oe>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;Te>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;Oe>=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 qe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Fe.ke=[0,1,2,3,4,5,6,7].concat(...je([[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]])),Fe.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],Fe.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],Fe.ze=e=>256>e?Le[e]:Le[256+(e>>>7)],Fe.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],Fe.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],Fe.Ae=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Fe._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ge=je([[144,8],[112,9],[24,7],[8,8]]);qe.Ie=He([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,Ge[t]])));const Je=je([[30,5]]);function Qe(e,t,n,r,s){const i=this;i.Pe=e,i.De=t,i.Ve=n,i.Re=r,i.Be=s}qe.Ee=He([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,Je[t]]))),qe.Me=new qe(qe.Ie,Fe.Ce,257,286,Oe),qe.Ue=new qe(qe.Ee,Fe.xe,0,30,Oe),qe.Ke=new qe(null,Fe.Ae,0,19,7);const Xe=[new Qe(0,0,0,0,0),new Qe(4,4,8,4,1),new Qe(4,5,16,8,1),new Qe(4,6,32,32,1),new Qe(4,4,16,16,2),new Qe(8,16,32,32,2),new Qe(8,16,128,128,2),new Qe(8,32,128,256,2),new Qe(32,128,258,1024,2),new Qe(32,258,258,4096,2)],Ye=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ze=113,$e=666,et=262;function tt(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function nt(){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 Fe,N=new Fe,O=new Fe;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*(Fe.ke[n]+256+1)]++,M[2*Fe.ze(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Fe.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=Fe.ke[s],Y(i+256+1,t),o=Fe.Ce[i],0!==o&&(s-=Fe.ve[i],X(s,o)),r--,i=Fe.ze(r),Y(i,n),o=Fe.xe[i],0!==o&&(r-=Fe.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*Fe._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(qe.Ie,qe.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*Fe._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-et){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(et>A&&0!==t.je)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-et?C-(f-et):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&&tt(t,r[i+1],r[i],e.ue)&&i++,!tt(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?We:(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=Ze,c=0,K.se=E,K.oe=qe.Me,N.se=M,N.oe=qe.Ue,O.se=U,O.oe=qe.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=Xe[D].De,R=Xe[D].Pe,B=Xe[D].Ve,I=Xe[D].Re,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&n!=Ze&&n!=$e?We:(e.Te=null,e.Oe=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,n==Ze?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?We:(Xe[D].Be!=Xe[t].Be&&0!==e.Ge&&(r=e.Ze(1)),D!=t&&(D=t,P=Xe[D].De,R=Xe[D].Pe,B=Xe[D].Ve,I=Xe[D].Re),V=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return We;if(3>i)return 0;for(i>f-et&&(i=f-et,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 We;if(!r.et||!r.tt&&0!==r.je||n==$e&&4!=i)return r.Fe=Ye[4],We;if(0===r.nt)return r.Fe=Ye[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=Ze,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=Ye[7],-5;if(n==$e&&0!==t.je)return r.Fe=Ye[7],-5;if(0!==t.je||0!==A||0!=i&&n!=$e){switch(R=-1,Xe[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-et&&(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(et>A){if(ie(),et>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-et||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(et>A){if(ie(),et>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-et>=(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=$e),0==R||2==R)return 0===t.nt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,qe.Ie),$(),9>1+H+10-F&&(X(2,3),Y(256,qe.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 rt(){const e=this;e.rt=0,e.st=0,e.je=0,e.Ge=0,e.nt=0,e.Je=0}function st(e){const t=new rt,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}}rt.prototype={Le(e,t){const n=this;return n.qe=new nt,t||(t=Oe),n.qe.Le(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):We},Xe(){const e=this;if(!e.qe)return We;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):We},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):We},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 it=0,ot=1,ct=-2,ft=-3,at=-4,lt=-5,ut=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],wt=1440,ht=[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],dt=[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],pt=[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],yt=[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],mt=[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],bt=[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],gt=15;function kt(){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,it;for(S=u[0],k=1;gt>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=gt;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 ft;if(0>(I-=n[g]))return ft;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>wt)return ft;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?lt:it}function c(o){let c;for(e||(e=[],t=[],n=new f(gt+1),r=[],s=new f(gt),i=new f(gt+1)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;gt+1>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,gt),0),i.set(n.subarray(0,gt+1),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==ft?f.Fe="oversubscribed dynamic bit lengths tree":a!=lt&&0!==r[0]||(f.Fe="incomplete dynamic bit lengths tree",a=ft),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,pt,yt,a,i,u,e,t),h!=it||0===i[0]?(h==ft?w.Fe="oversubscribed literal/length tree":h!=at&&(w.Fe="incomplete literal/length tree",h=ft),h):(c(288),h=o(s,n,r,0,mt,bt,l,f,u,e,t),h!=it||0===f[0]&&n>257?(h==ft?w.Fe="oversubscribed distance tree":h==lt?(w.Fe="incomplete distance tree",h=ft):h!=at&&(w.Fe="empty distance tree with lengths",h=ft),h):it)}}kt.ct=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ht,r[0]=dt,it);const vt=0,St=1,zt=2,Ct=3,xt=4,At=5,_t=6,It=7,Pt=8,Dt=9;function Vt(){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.ft,h=o.lt,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=ut[e],g=ut[t];do{for(;20>h;)p--,w|=(255&c.ut(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&ut[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ut(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.ut(d++))<<h,h+=8;if(v=a[z+2]+(w&ut[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.wt[y++]=o.wt[S++]}while(0!=--u);else o.wt.set(o.wt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.wt[y++]=o.wt[S++],o.wt[y++]=o.wt[S++],k-=2):(o.wt.set(o.wt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.wt[y++]=o.wt[S++]}while(0!=--k);else o.wt.set(o.wt.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.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ft;f+=a[z+2],f+=w&ut[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.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ot):(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.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ft);if(f+=a[z+2],f+=w&ut[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.wt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.wt[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.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,it}e.init=(e,i,o,c,f,a)=>{t=vt,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ht=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.rt,v=y.je,x=e.ft,A=e.lt,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case vt:if(z>=258&&v>=10&&(e.ft=x,e.lt=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.ft,A=e.lt,S=e.write,z=S<e.read?e.read-S-1:e.end-S,m!=it)){t=m==ot?It:Dt;break}c=u,n=r,o=h,t=St;case St:for(b=c;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}if(g=3*(o+(x&ut[b])),x>>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=_t;break}if(16&k){a=15&k,i=n[g+2],t=zt;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=It;break}return t=Dt,y.Fe="invalid literal/length code",m=ft,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);case zt:for(b=a;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}i+=x&ut[b],x>>=b,A-=b,c=w,n=s,o=d,t=Ct;case Ct:for(b=c;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}if(g=3*(o+(x&ut[b])),x>>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=xt;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=Dt,y.Fe="invalid distance code",m=ft,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);case xt:for(b=a;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}l+=x&ut[b],x>>=b,A-=b,t=At;case At: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.dt(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.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);e.wt[S++]=e.wt[C++],z--,C==e.end&&(C=0),i--}t=vt;break;case _t: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.dt(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.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,e.wt[S++]=f,z--,t=vt;break;case It:if(A>7&&(A-=8,v++,_--),e.write=S,m=e.dt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);t=Pt;case Pt:return m=ot,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);case Dt:return m=ft,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);default:return m=ct,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m)}},e.yt=()=>{}}const Rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Bt=0,Et=1,Mt=2,Ut=3,Kt=4,Nt=5,Ot=6,Tt=7,Wt=8,jt=9;function Ht(e,t){const n=this;let r,s=Bt,o=0,c=0,a=0;const l=[0],u=[0],w=new Vt;let h=0,d=new f(3*wt);const p=new kt;n.lt=0,n.ft=0,n.wt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),s==Ot&&w.yt(e),s=Bt,n.lt=0,n.ft=0,n.read=n.write=0},n.reset(e,null),n.dt=(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==lt&&(t=it),e.nt-=r,e.Je+=r,e.et.set(n.wt.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==lt&&(t=it),e.nt-=r,e.Je+=r,e.et.set(n.wt.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.ht=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.je,f=n.ft,y=n.lt,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 Bt:for(;3>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(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=Et;break;case 1:S=[],z=[],C=[[]],x=[[]],kt.ct(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=Ot;break;case 2:f>>>=3,y-=3,s=Ut;break;case 3:return f>>>=3,y-=3,s=jt,e.Fe="invalid block type",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t)}break;case Et:for(;32>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=jt,e.Fe="invalid stored block lengths",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);o=65535&f,f=y=0,s=0!==o?Mt:0!==h?Tt:Bt;break;case Mt:if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(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.dt(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.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);if(t=it,i=o,i>b&&(i=b),i>k&&(i=k),n.wt.set(e.He(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?Tt:Bt;break;case Ut:for(;14>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=jt,e.Fe="too many length or distance symbols",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(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=Kt;case Kt:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}r[Rt[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[Rt[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),i!=it)return(t=i)==ft&&(r=null,s=jt),n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);a=0,s=Nt;case Nt:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&ut[i]))+1],w=d[3*(u[0]+(f&ut[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.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&ut[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=jt,e.Fe="invalid bit length repeat",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(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),i!=it)return i==ft&&(r=null,s=jt),t=i,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=Ot;case Ot:if(n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,(t=w.ht(n,e,t))!=ot)return n.dt(e,t);if(t=it,w.yt(e),m=e.rt,b=e.je,f=n.ft,y=n.lt,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=Bt;break}s=Tt;case Tt:if(n.write=g,t=n.dt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);s=Wt;case Wt:return t=ot,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);case jt:return t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);default:return t=ct,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t)}}},n.yt=e=>{n.reset(e,null),n.wt=null,d=null},n.bt=(e,t,r)=>{n.wt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>s==Et?1:0}const Lt=13,Ft=[0,0,255,255];function qt(){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),it):ct}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.yt(t),e.vt=null,it),e.At=(n,r)=>(n.Fe=null,e.vt=null,8>r||r>15?(e.xt(n),ct):(e.Ct=r,n.kt.vt=new Ht(n,1<<r),t(n),it)),e._t=(e,t)=>{let n,r;if(!e||!e.kt||!e.tt)return ct;const s=e.kt;for(t=4==t?lt:it,n=lt;;)switch(s.mode){case 0:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,8!=(15&(s.method=e.ut(e.rt++)))){s.mode=Lt,e.Fe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.Ct){s.mode=Lt,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.ut(e.rt++),((s.method<<8)+r)%31!=0){s.mode=Lt,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.ut(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.ut(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.ut(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.je?n:(n=t,e.je--,e.Ge++,s.zt+=255&e.ut(e.rt++),s.mode=6,2);case 6:return s.mode=Lt,e.Fe="need dictionary",s.marker=0,ct;case 7:if(n=s.vt.ht(e,n),n==ft){s.mode=Lt,s.marker=0;break}if(n==it&&(n=t),n!=ot)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.je=0,ot;case Lt:return ft;default:return ct}},e.It=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return ct;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,it},e.Pt=e=>{let n,r,s,i,o;if(!e||!e.kt)return ct;const c=e.kt;if(c.mode!=Lt&&(c.mode=Lt,c.marker=0),0===(n=e.je))return lt;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.ut(r)==Ft[s]?s++:s=0!==e.ut(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.je=n,c.marker=s,4!=s?ft:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,it)},e.Dt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():ct}function Gt(){}function Jt(e){const t=new Gt,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===lt){if(0!==t.je)throw new s("inflating: bad input")}else if(a!==it&&a!==ot)throw new s("inflating: "+t.Fe);if((c||a===ot)&&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()}}Gt.prototype={At(e){const t=this;return t.kt=new qt,e||(e=15),t.kt.At(t,e)},_t(e){const t=this;return t.kt?t.kt._t(t,e):ct},xt(){const e=this;if(!e.kt)return ct;const t=e.kt.xt(e);return e.kt=null,t},Pt(){const e=this;return e.kt?e.kt.Pt(e):ct},It(e,t){const n=this;return n.kt?n.kt.It(n,e,t):ct},ut(e){return this.tt[e]},He(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=st,self.Inflate=Jt};
2
+ `,r=()=>n.useDataURI?"data:text/javascript,"+encodeURIComponent(t):URL.createObjectURL(new Blob([t],{type:"text/javascript"}));e({workerScripts:{inflate:[r],deflate:[r]}})}const Dc="Writer iterator completed too soon",gc="text/plain",wc="Content-Type",yc=64*1024,la="writable";class Xr{constructor(){this.size=0}init(){this.initialized=!0}}class fa extends Xr{get readable(){const n=this,{chunkSize:t=yc}=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 Br(n,i+u,Math.min(t,a-u),o)),u+t>a?s.close():this.chunkOffset+=t}});return r}}class bc extends fa{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 _c extends Xr{constructor(n){super();const t=this,r=new TransformStream,s=[];n&&s.push([wc,n]),Object.defineProperty(t,la,{get(){return r.writable}}),t.blob=new Response(r.readable,{headers:s}).blob()}getData(){return this.blob}}class Ce extends bc{constructor(n){super(new Blob([n],{type:gc}))}}class vc extends fa{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 Br(l,u,t);else{const d=c-u;a=new Uint8Array(t),a.set(await Br(l,u,d)),a.set(await s.readUint8Array(n+d,t-d,r),d)}return s.lastDiskNumber=Math.max(o,s.lastDiskNumber),a}}class ai extends Xr{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:d}=r;if(a)c.length>=d?(await u(c.slice(0,d)),await l(),r.diskOffset+=s.size,r.diskNumber++,a=null,await this.write(c.slice(d))):await u(c);else{const{value:m,done:x}=await n.next();if(x&&!m)throw new Error(Dc);s=m,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await mn(s),i=m.writable,a=i.getWriter(),await this.write(c)}},async close(){await a.ready,await l()}});Object.defineProperty(r,la,{get(){return o}});async function u(c){const d=c.length;d&&(await a.ready,await a.write(c),s.size+=d,r.size+=d,r.availableSize-=d)}async function l(){i.size=s.size,await a.close()}}}async function mn(e,n){if(e.init&&!e.initialized)await e.init(n);else return Promise.resolve()}function Ac(e){return Array.isArray(e)&&(e=new vc(e)),e instanceof ReadableStream&&(e={readable:e}),e}function Cc(e){e.writable===oe&&typeof e.next==xn&&(e=new ai(e)),e instanceof WritableStream&&(e={writable:e});const{writable:n}=e;return n.size===oe&&(n.size=0),e instanceof ai||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function Br(e,n,t,r){return e.readUint8Array(n,t,r)}const Ec="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");Ec.length==256;const Fc="filename",Sc="rawFilename",kc="comment",Tc="rawComment",Pc="uncompressedSize",Bc="compressedSize",Mc="offset",oi="diskNumberStart",da="lastModDate",Ic="rawLastModDate",pa="lastAccessDate",ha="creationDate",ma="internalFileAttribute",xa="externalFileAttribute",Da="msDosCompatible",Kr="zip64",ga="encrypted",wa="version",ya="versionMadeBy",ba="zipCrypto",$c=[Fc,Sc,Bc,Pc,da,Ic,kc,Tc,pa,ha,Mc,oi,oi,ma,xa,Da,Kr,ga,wa,ya,ba,"directory","bitFlag","signature","filenameUTF8","commentUTF8","compressionMethod","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class _a{constructor(n){$c.forEach(t=>this[t]=n[t])}}const Lc="File already exists",Nc="Zip file comment exceeds 64KB",Rc="File entry comment exceeds 64KB",Oc="File entry name exceeds 64KB",ui="Version exceeds 65535",jc="The strength must equal 1, 2, or 3",Vc="Extra field type exceeds 65535",Uc="Extra field data exceeds 64KB",zr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",qc="Undefined uncompressed size",ci=new Uint8Array([7,0,2,0,65,69,3,0,0]);let br=0;const li=[];class Gc{constructor(n,t={}){n=Cc(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:Tu(),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;br<a.maxWorkers?br++:await new Promise(u=>li.push(u));let o;try{if(n=n.trim(),s.filenames.has(n))throw new Error(Lc);return s.filenames.add(n),o=Hc(s,n,t,r),i.add(o),await o}catch(u){throw s.filenames.delete(n),u}finally{i.delete(o);const u=li.shift();u?u():br--}}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 e0(this,n,t),ne(r,t,"preventClose")||await a.getWriter().close(),i.getData?i.getData():a}}async function Hc(e,n,t,r){n=n.trim(),r.directory&&!n.endsWith(xr)?n+=xr:r.directory=n.endsWith(xr);const s=ne(e,r,"encodeText",$n);let i=s(n);if(i===oe&&(i=$n(n)),K(i)>Be)throw new Error(Oc);const a=r.comment||"";let o=s(a);if(o===oe&&(o=$n(a)),K(o)>Be)throw new Error(Rc);const u=ne(e,r,wa,Fu);if(u>Be)throw new Error(ui);const l=ne(e,r,ya,20);if(l>Be)throw new Error(ui);const c=ne(e,r,da,new Date),d=ne(e,r,pa),m=ne(e,r,ha),x=ne(e,r,Da,!0),y=ne(e,r,ma,0),f=ne(e,r,xa,0),p=ne(e,r,"passThrough");let h,g;p||(h=ne(e,r,"password"),g=ne(e,r,"rawPassword"));const D=ne(e,r,"encryptionStrength",3),_=ne(e,r,ba),b=ne(e,r,"extendedTimestamp",!0),w=ne(e,r,"keepOrder",!0),v=ne(e,r,"level"),A=ne(e,r,"useWebWorkers"),C=ne(e,r,"bufferedWrite"),F=ne(e,r,"dataDescriptorSignature",!1),S=ne(e,r,"signal"),N=ne(e,r,"useUnicodeFileNames",!0),$=ne(e,r,"useCompressionStream"),O=ne(e,r,"compressionMethod");let R=ne(e,r,"dataDescriptor",!0),M=ne(e,r,Kr);if(!_&&(h!==oe||g!==oe)&&!(D>=1&&D<=3))throw new Error(jc);let V=new Uint8Array;const{extraField:U}=r;if(U){let ht=0,Oe=0;U.forEach(Se=>ht+=4+K(Se)),V=new Uint8Array(ht),U.forEach((Se,rt)=>{if(rt>Be)throw new Error(Vc);if(K(Se)>Be)throw new Error(Uc);De(V,new Uint16Array([rt]),Oe),De(V,new Uint16Array([K(Se)]),Oe+2),De(V,Se,Oe+4),Oe+=4+K(Se)})}let pe=0,j=0,fe=0;if(p&&({uncompressedSize:fe}=r,fe===oe))throw new Error(qc);const G=M===!0;t&&(t=Ac(t),await mn(t),p?pe=fi(fe):t.size===oe?(R=!0,(M||M===oe)&&(M=!0,fe=pe=$e+1)):(fe=t.size,pe=fi(fe)));const{diskOffset:ee,diskNumber:He,maxSize:ge}=e.writer,he=G||fe>$e,yt=G||pe>$e,pt=G||e.offset+e.pendingEntriesSize-ee>$e,tt=ne(e,r,"supportZip64SplitFile",!0)&&G||He+Math.ceil(e.pendingEntriesSize/ge)>Be;if(pt||he||yt||tt){if(M===!1||!w)throw new Error(zr);M=!0}M=M||!1;const It=ne(e,r,ga),{signature:We}=r;r=Object.assign({},r,{rawFilename:i,rawComment:o,version:u,versionMadeBy:l,lastModDate:c,lastAccessDate:d,creationDate:m,rawExtraField:V,zip64:M,zip64UncompressedSize:he,zip64CompressedSize:yt,zip64Offset:pt,zip64DiskNumberStart:tt,password:h,rawPassword:g,level:!$&&e.config.CompressionStream===oe&&e.config.CompressionStreamNative===oe?0:v,useWebWorkers:A,encryptionStrength:D,extendedTimestamp:b,zipCrypto:_,bufferedWrite:C,keepOrder:w,useUnicodeFileNames:N,dataDescriptor:R,dataDescriptorSignature:F,signal:S,msDosCompatible:x,internalFileAttribute:y,externalFileAttribute:f,useCompressionStream:$,passThrough:p,encrypted:!!(h&&K(h)||g&&K(g))||p&&It,signature:We,compressionMethod:O});const nt=Zc(r),Gt=Kc(r),ue=K(nt.localHeaderArray,Gt.dataDescriptorArray);j=ue+pe,e.options.usdz&&(j+=j+64),e.pendingEntriesSize+=j;let we;try{we=await Wc(e,n,t,{headerInfo:nt,dataDescriptorInfo:Gt,metadataSize:ue},r)}finally{e.pendingEntriesSize-=j}return Object.assign(we,{name:n,comment:a,extraField:U}),new _a(we)}async function Wc(e,n,t,r,s){const{files:i,writer:a}=e,{keepOrder:o,dataDescriptor:u,signal:l}=s,{headerInfo:c}=r,{usdz:d}=e.options,m=Array.from(i.values()).pop();let x={},y,f,p,h,g,D,_;i.set(n,x);try{let A;o&&(A=m&&m.lock,b()),(s.bufferedWrite||e.writerLocked||e.bufferedWrites&&o||!u)&&!d?(D=new TransformStream,_=new Response(D.readable).blob(),D.writable.size=0,y=!0,e.bufferedWrites++,await mn(a)):(D=a,await w()),await mn(D);const{writable:C}=a;let{diskOffset:F}=a;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const N=new Uint8Array(4),$=ve(N);X($,0,Li),await ct(C,N),e.offset+=4}d&&Xc(r,e.offset-F),y||(await A,await v(C));const{diskNumber:S}=a;if(g=!0,x.diskNumberStart=S,x=await Yc(t,D,x,r,e.config,s),g=!1,i.set(n,x),x.filename=n,y){await D.writable.getWriter().close();let N=await _;await A,await w(),h=!0,u||(N=await Jc(x,N,C,s)),await v(C),x.diskNumberStart=a.diskNumber,F=a.diskOffset,await N.stream().pipeTo(C,{preventClose:!0,preventAbort:!0,signal:l}),C.size+=N.size,h=!1}if(x.offset=e.offset-F,x.zip64)Qc(x,s);else if(x.offset>$e)throw new Error(zr);return e.offset+=x.size,x}catch(A){if(y&&h||!y&&g){if(e.hasCorruptedEntries=!0,A)try{A.corruptedEntry=!0}catch{}y?e.offset+=D.writable.size:e.offset=D.writable.size}throw i.delete(n),A}finally{y&&e.bufferedWrites--,p&&p(),f&&f()}function b(){x.lock=new Promise(A=>p=A)}async function w(){e.writerLocked=!0;const{lockWriter:A}=e;e.lockWriter=new Promise(C=>f=()=>{e.writerLocked=!1,C()}),await A}async function v(A){K(c.localHeaderArray)>a.availableSize&&(a.availableSize=0,await ct(A,new Uint8Array))}}async function Yc(e,n,{diskNumberStart:t,lock:r},s,i,a){const{headerInfo:o,dataDescriptorInfo:u,metadataSize:l}=s,{localHeaderArray:c,headerArray:d,lastModDate:m,rawLastModDate:x,encrypted:y,compressed:f,version:p,compressionMethod:h,rawExtraFieldExtendedTimestamp:g,extraFieldExtendedTimestampFlag:D,rawExtraFieldNTFS:_,rawExtraFieldAES:b}=o,{dataDescriptorArray:w}=u,{rawFilename:v,lastAccessDate:A,creationDate:C,password:F,rawPassword:S,level:N,zip64:$,zip64UncompressedSize:O,zip64CompressedSize:R,zip64Offset:M,zip64DiskNumberStart:V,zipCrypto:U,dataDescriptor:pe,directory:j,versionMadeBy:fe,rawComment:G,rawExtraField:ee,useWebWorkers:He,onstart:ge,onprogress:he,onend:yt,signal:pt,encryptionStrength:bt,extendedTimestamp:tt,msDosCompatible:It,internalFileAttribute:We,externalFileAttribute:nt,useCompressionStream:Gt,passThrough:ue}=a,we={lock:r,versionMadeBy:fe,zip64:$,directory:!!j,filenameUTF8:!0,rawFilename:v,commentUTF8:!0,rawComment:G,rawExtraFieldExtendedTimestamp:g,rawExtraFieldNTFS:_,rawExtraFieldAES:b,rawExtraField:ee,extendedTimestamp:tt,msDosCompatible:It,internalFileAttribute:We,externalFileAttribute:nt,diskNumberStart:t};let{signature:ht,uncompressedSize:Oe}=a,Se=0;ue||(Oe=0);const{writable:rt}=n;if(e){e.chunkSize=Pu(i),await ct(rt,c);const Ye=e.readable,yn=Ye.size=e.size,nr={options:{codecType:oa,level:N,rawPassword:S,password:F,encryptionStrength:bt,zipCrypto:y&&U,passwordVerification:y&&U&&x>>8&255,signed:!ue,compressed:f&&!ue,encrypted:y&&!ue,useWebWorkers:He,useCompressionStream:Gt,transferStreams:!1},config:i,streamOptions:{signal:pt,size:yn,onstart:ge,onprogress:he,onend:yt}},Ht=await hc({readable:Ye,writable:rt},nr);Se=Ht.outputSize,ue||(Oe=Ht.inputSize,ht=Ht.signature),rt.size+=Oe}else await ct(rt,c);let st;if($){let Ye=4;O&&(Ye+=8),R&&(Ye+=8),M&&(Ye+=8),V&&(Ye+=4),st=new Uint8Array(Ye)}else st=new Uint8Array;return zc({signature:ht,rawExtraFieldZip64:st,compressedSize:Se,uncompressedSize:Oe,headerInfo:o,dataDescriptorInfo:u},a),pe&&await ct(rt,w),Object.assign(we,{uncompressedSize:Oe,compressedSize:Se,lastModDate:m,rawLastModDate:x,creationDate:C,lastAccessDate:A,encrypted:y,zipCrypto:U,size:l+Se,compressionMethod:h,version:p,headerArray:d,signature:ht,rawExtraFieldZip64:st,extraFieldExtendedTimestampFlag:D,zip64UncompressedSize:O,zip64CompressedSize:R,zip64Offset:M,zip64DiskNumberStart:V}),we}function Zc(e){const{rawFilename:n,lastModDate:t,lastAccessDate:r,creationDate:s,level:i,zip64:a,zipCrypto:o,useUnicodeFileNames:u,dataDescriptor:l,directory:c,rawExtraField:d,encryptionStrength:m,extendedTimestamp:x,encrypted:y}=e,f=i!==0&&!c;let{version:p,compressionMethod:h}=e,g;if(y&&!o){g=new Uint8Array(K(ci)+2);const M=ve(g);J(M,0,wu),De(g,ci,2),Vn(M,8,m)}else g=new Uint8Array;let D,_,b;if(x){_=new Uint8Array(9+(r?4:0)+(s?4:0));const M=ve(_);J(M,0,Oi),J(M,2,K(_)-4),b=1+(r?2:0)+(s?4:0),Vn(M,4,b);let V=5;X(M,V,Math.floor(t.getTime()/1e3)),V+=4,r&&(X(M,V,Math.floor(r.getTime()/1e3)),V+=4),s&&X(M,V,Math.floor(s.getTime()/1e3));try{D=new Uint8Array(36);const U=ve(D),pe=_r(t);J(U,0,yu),J(U,2,32),J(U,8,bu),J(U,10,24),Me(U,12,pe),Me(U,20,_r(r)||pe),Me(U,28,_r(s)||pe)}catch{D=new Uint8Array}}else D=_=new Uint8Array;let w=0;u&&(w=w|Cu),l&&(w=w|Au),h===oe&&(h=f?uu:cu),f&&(i>=1&&i<3&&(w=w|6),i>=3&&i<5&&(w=w|1),i===9&&(w=w|2)),a&&(p=p>qs?p:qs),y&&(w=w|vu,o||(p=p>Gs?p:Gs,g[9]=h,h=lu));const v=new Uint8Array(26),A=ve(v);J(A,0,p),J(A,2,w),J(A,4,h);const C=new Uint32Array(1),F=ve(C);let S;t<Ws?S=Ws:t>Hs?S=Hs:S=t,J(F,0,(S.getHours()<<6|S.getMinutes())<<5|S.getSeconds()/2),J(F,2,(S.getFullYear()-1980<<4|S.getMonth()+1)<<5|S.getDate());const N=C[0];X(A,6,N),J(A,22,K(n));const $=K(g,_,D,d);J(A,24,$);const O=new Uint8Array(30+K(n)+$),R=ve(O);return X(R,0,fu),De(O,v,4),De(O,n,30),De(O,g,30+K(n)),De(O,_,30+K(n,g)),De(O,D,30+K(n,g,_)),De(O,d,30+K(n,g,_,D)),{localHeaderArray:O,headerArray:v,headerView:A,lastModDate:t,rawLastModDate:N,encrypted:y,compressed:f,version:p,compressionMethod:h,extraFieldExtendedTimestampFlag:b,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:D,rawExtraFieldAES:g,extraFieldLength:$}}function Xc(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);J(u,0,_u),J(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),J(i,28,s+a),e.metadataSize+=a}function Kc(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,du))),{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:d}=o,{zip64:m,zip64UncompressedSize:x,zip64CompressedSize:y,zipCrypto:f,dataDescriptor:p}=n;if((!l||f)&&t!==oe&&(X(u,10,t),p&&X(c,d,t)),m){const h=ve(r);J(h,0,gu),J(h,2,K(r)-4);let g=4;x&&(X(u,18,$e),Me(h,g,BigInt(i)),g+=8),y&&(X(u,14,$e),Me(h,g,BigInt(s))),p&&(Me(c,d+4,BigInt(s)),Me(c,d+12,BigInt(i)))}else X(u,14,s),X(u,18,i),p&&(X(c,d+4,s),X(c,d+8,i))}async function Jc(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 ct(t,new Uint8Array(s)),n.slice(s.byteLength)}function Qc(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 e0(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,d=r.size;for(const[,b]of r){const{rawFilename:w,rawExtraFieldZip64:v,rawExtraFieldAES:A,rawComment:C,rawExtraFieldNTFS:F,rawExtraField:S,extendedTimestamp:N,extraFieldExtendedTimestampFlag:$,lastModDate:O}=b;let R;if(N){R=new Uint8Array(9);const M=ve(R);J(M,0,Oi),J(M,2,5),Vn(M,4,$),X(M,5,Math.floor(O.getTime()/1e3))}else R=new Uint8Array;b.rawExtraFieldCDExtendedTimestamp=R,l+=46+K(w,C,v,A,F,R,S)}const m=new Uint8Array(l),x=ve(m);await mn(s);let y=0;for(const[b,w]of Array.from(r.values()).entries()){const{offset:v,rawFilename:A,rawExtraFieldZip64:C,rawExtraFieldAES:F,rawExtraFieldCDExtendedTimestamp:S,rawExtraFieldNTFS:N,rawExtraField:$,rawComment:O,versionMadeBy:R,headerArray:M,directory:V,zip64:U,zip64UncompressedSize:pe,zip64CompressedSize:j,zip64DiskNumberStart:fe,zip64Offset:G,msDosCompatible:ee,internalFileAttribute:He,externalFileAttribute:ge,diskNumberStart:he,uncompressedSize:yt,compressedSize:pt}=w,bt=K(C,F,S,N,$);X(x,u,pu),J(x,u+4,R);const tt=ve(M);pe||X(tt,18,yt),j||X(tt,14,pt),De(m,M,u+6),J(x,u+30,bt),J(x,u+32,K(O)),J(x,u+34,U&&fe?Be:he),J(x,u+36,He),ge?X(x,u+38,ge):V&&ee&&Vn(x,u+38,Eu),X(x,u+42,U&&G?$e:v),De(m,A,u+46),De(m,C,u+46+K(A)),De(m,F,u+46+K(A,C)),De(m,S,u+46+K(A,C,F)),De(m,N,u+46+K(A,C,F,S)),De(m,$,u+46+K(A,C,F,S,N)),De(m,O,u+46+K(A)+bt);const It=46+K(A,O)+bt;if(u-y>s.availableSize&&(s.availableSize=0,await ct(a,m.slice(y,u)),y=u),u+=It,t.onprogress)try{await t.onprogress(b+1,r.size,new _a(w))}catch{}}await ct(a,y?m.slice(y):m);let f=s.diskNumber;const{availableSize:p}=s;p<kr&&f++;let h=ne(e,t,Kr);if(c>$e||l>$e||d>Be||f>Be){if(h===!1)throw new Error(zr);h=!0}const g=new Uint8Array(h?Du:kr),D=ve(g);u=0,h&&(X(D,0,mu),Me(D,4,BigInt(44)),J(D,12,45),J(D,14,45),X(D,16,f),X(D,20,o),Me(D,24,BigInt(d)),Me(D,32,BigInt(d)),Me(D,40,BigInt(l)),Me(D,48,BigInt(c)),X(D,56,xu),Me(D,64,BigInt(c)+BigInt(l)),X(D,72,f+1),ne(e,t,"supportZip64SplitFile",!0)&&(f=Be,o=Be),d=Be,c=$e,l=$e,u+=Ri+Ni),X(D,u,hu),J(D,u+4,f),J(D,u+6,o),J(D,u+8,d),J(D,u+10,d),X(D,u+12,l),X(D,u+16,c);const _=K(n);if(_)if(_<=Be)J(D,u+20,_);else throw new Error(Nc);await ct(a,g),_&&await ct(a,n)}async function ct(e,n){const t=e.getWriter();try{await t.ready,e.size+=K(n),await t.write(n)}finally{t.releaseLock()}}function _r(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 fi(e){return e+5*(Math.floor(e/16383)+1)}function Vn(e,n,t){e.setUint8(n,t)}function J(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 va;try{va=import.meta.url}catch{}Wr({baseURL:va});xc(Wr);Wr({Deflate:jo,Inflate:ou});var t0=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,n0=/[\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]/,r0=/[\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]/,vr={Space_Separator:t0,ID_Start:n0,ID_Continue:r0},xe={isSpaceSeparator(e){return typeof e=="string"&&vr.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||vr.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==="‍"||vr.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 Mr,Fe,xt,Un,Bt,et,ye,Jr,ln;var s0=function(n,t){Mr=String(n),Fe="start",xt=[],Un=0,Bt=1,et=0,ye=void 0,Jr=void 0,ln=void 0;do ye=i0(),u0[Fe]();while(ye.type!=="eof");return typeof t=="function"?Ir({"":ln},"",t):ln};function Ir(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=Ir(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=Ir(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 W,H,cn,mt,Z;function i0(){for(W="default",H="",cn=!1,mt=1;;){Z=wt();const e=Aa[W]();if(e)return e}}function wt(){if(Mr[Un])return String.fromCodePoint(Mr.codePointAt(Un))}function k(){const e=wt();return e===`
3
+ `?(Bt++,et=0):e?et+=e.length:et++,e&&(Un+=e.length),e}const Aa={default(){switch(Z){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
4
+ `:case"\r":case"\u2028":case"\u2029":k();return;case"/":k(),W="comment";return;case void 0:return k(),re("eof")}if(xe.isSpaceSeparator(Z)){k();return}return Aa[Fe]()},comment(){switch(Z){case"*":k(),W="multiLineComment";return;case"/":k(),W="singleLineComment";return}throw se(k())},multiLineComment(){switch(Z){case"*":k(),W="multiLineCommentAsterisk";return;case void 0:throw se(k())}k()},multiLineCommentAsterisk(){switch(Z){case"*":k();return;case"/":k(),W="default";return;case void 0:throw se(k())}k(),W="multiLineComment"},singleLineComment(){switch(Z){case`
5
+ `:case"\r":case"\u2028":case"\u2029":k(),W="default";return;case void 0:return k(),re("eof")}k()},value(){switch(Z){case"{":case"[":return re("punctuator",k());case"n":return k(),Lt("ull"),re("null",null);case"t":return k(),Lt("rue"),re("boolean",!0);case"f":return k(),Lt("alse"),re("boolean",!1);case"-":case"+":k()==="-"&&(mt=-1),W="sign";return;case".":H=k(),W="decimalPointLeading";return;case"0":H=k(),W="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":H=k(),W="decimalInteger";return;case"I":return k(),Lt("nfinity"),re("numeric",1/0);case"N":return k(),Lt("aN"),re("numeric",NaN);case'"':case"'":cn=k()==='"',H="",W="string";return}throw se(k())},identifierNameStartEscape(){if(Z!=="u")throw se(k());k();const e=$r();switch(e){case"$":case"_":break;default:if(!xe.isIdStartChar(e))throw di();break}H+=e,W="identifierName"},identifierName(){switch(Z){case"$":case"_":case"‌":case"‍":H+=k();return;case"\\":k(),W="identifierNameEscape";return}if(xe.isIdContinueChar(Z)){H+=k();return}return re("identifier",H)},identifierNameEscape(){if(Z!=="u")throw se(k());k();const e=$r();switch(e){case"$":case"_":case"‌":case"‍":break;default:if(!xe.isIdContinueChar(e))throw di();break}H+=e,W="identifierName"},sign(){switch(Z){case".":H=k(),W="decimalPointLeading";return;case"0":H=k(),W="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":H=k(),W="decimalInteger";return;case"I":return k(),Lt("nfinity"),re("numeric",mt*(1/0));case"N":return k(),Lt("aN"),re("numeric",NaN)}throw se(k())},zero(){switch(Z){case".":H+=k(),W="decimalPoint";return;case"e":case"E":H+=k(),W="decimalExponent";return;case"x":case"X":H+=k(),W="hexadecimal";return}return re("numeric",mt*0)},decimalInteger(){switch(Z){case".":H+=k(),W="decimalPoint";return;case"e":case"E":H+=k(),W="decimalExponent";return}if(xe.isDigit(Z)){H+=k();return}return re("numeric",mt*Number(H))},decimalPointLeading(){if(xe.isDigit(Z)){H+=k(),W="decimalFraction";return}throw se(k())},decimalPoint(){switch(Z){case"e":case"E":H+=k(),W="decimalExponent";return}if(xe.isDigit(Z)){H+=k(),W="decimalFraction";return}return re("numeric",mt*Number(H))},decimalFraction(){switch(Z){case"e":case"E":H+=k(),W="decimalExponent";return}if(xe.isDigit(Z)){H+=k();return}return re("numeric",mt*Number(H))},decimalExponent(){switch(Z){case"+":case"-":H+=k(),W="decimalExponentSign";return}if(xe.isDigit(Z)){H+=k(),W="decimalExponentInteger";return}throw se(k())},decimalExponentSign(){if(xe.isDigit(Z)){H+=k(),W="decimalExponentInteger";return}throw se(k())},decimalExponentInteger(){if(xe.isDigit(Z)){H+=k();return}return re("numeric",mt*Number(H))},hexadecimal(){if(xe.isHexDigit(Z)){H+=k(),W="hexadecimalInteger";return}throw se(k())},hexadecimalInteger(){if(xe.isHexDigit(Z)){H+=k();return}return re("numeric",mt*Number(H))},string(){switch(Z){case"\\":k(),H+=a0();return;case'"':if(cn)return k(),re("string",H);H+=k();return;case"'":if(!cn)return k(),re("string",H);H+=k();return;case`
6
+ `:case"\r":throw se(k());case"\u2028":case"\u2029":c0(Z);break;case void 0:throw se(k())}H+=k()},start(){switch(Z){case"{":case"[":return re("punctuator",k())}W="value"},beforePropertyName(){switch(Z){case"$":case"_":H=k(),W="identifierName";return;case"\\":k(),W="identifierNameStartEscape";return;case"}":return re("punctuator",k());case'"':case"'":cn=k()==='"',W="string";return}if(xe.isIdStartChar(Z)){H+=k(),W="identifierName";return}throw se(k())},afterPropertyName(){if(Z===":")return re("punctuator",k());throw se(k())},beforePropertyValue(){W="value"},afterPropertyValue(){switch(Z){case",":case"}":return re("punctuator",k())}throw se(k())},beforeArrayValue(){if(Z==="]")return re("punctuator",k());W="value"},afterArrayValue(){switch(Z){case",":case"]":return re("punctuator",k())}throw se(k())},end(){throw se(k())}};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(k());k()}}function a0(){switch(wt()){case"b":return k(),"\b";case"f":return k(),"\f";case"n":return k(),`
7
+ `;case"r":return k(),"\r";case"t":return k()," ";case"v":return k(),"\v";case"0":if(k(),xe.isDigit(wt()))throw se(k());return"\0";case"x":return k(),o0();case"u":return k(),$r();case`
8
+ `:case"\u2028":case"\u2029":return k(),"";case"\r":return k(),wt()===`
9
+ `&&k(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw se(k());case void 0:throw se(k())}return k()}function o0(){let e="",n=wt();if(!xe.isHexDigit(n)||(e+=k(),n=wt(),!xe.isHexDigit(n)))throw se(k());return e+=k(),String.fromCodePoint(parseInt(e,16))}function $r(){let e="",n=4;for(;n-- >0;){const t=wt();if(!xe.isHexDigit(t))throw se(k());e+=k()}return String.fromCodePoint(parseInt(e,16))}const u0={start(){if(ye.type==="eof")throw Nt();Ar()},beforePropertyName(){switch(ye.type){case"identifier":case"string":Jr=ye.value,Fe="afterPropertyName";return;case"punctuator":Pn();return;case"eof":throw Nt()}},afterPropertyName(){if(ye.type==="eof")throw Nt();Fe="beforePropertyValue"},beforePropertyValue(){if(ye.type==="eof")throw Nt();Ar()},beforeArrayValue(){if(ye.type==="eof")throw Nt();if(ye.type==="punctuator"&&ye.value==="]"){Pn();return}Ar()},afterPropertyValue(){if(ye.type==="eof")throw Nt();switch(ye.value){case",":Fe="beforePropertyName";return;case"}":Pn()}},afterArrayValue(){if(ye.type==="eof")throw Nt();switch(ye.value){case",":Fe="beforeArrayValue";return;case"]":Pn()}},end(){}};function Ar(){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(ln===void 0)ln=e;else{const n=xt[xt.length-1];Array.isArray(n)?n.push(e):Object.defineProperty(n,Jr,{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 Pn(){xt.pop();const e=xt[xt.length-1];e==null?Fe="end":Array.isArray(e)?Fe="afterArrayValue":Fe="afterPropertyValue"}function se(e){return qn(e===void 0?`JSON5: invalid end of input at ${Bt}:${et}`:`JSON5: invalid character '${Ca(e)}' at ${Bt}:${et}`)}function Nt(){return qn(`JSON5: invalid end of input at ${Bt}:${et}`)}function di(){return et-=5,qn(`JSON5: invalid identifier character at ${Bt}:${et}`)}function c0(e){console.warn(`JSON5: '${Ca(e)}' in strings is not valid ECMAScript; consider escaping`)}function Ca(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 qn(e){const n=new SyntaxError(e);return n.lineNumber=Bt,n.columnNumber=et,n}var l0=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 p;typeof f=="string"?p=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(p=String(f)),p!==void 0&&a.indexOf(p)<0&&a.push(p)}}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,p){let h=p[f];switch(h!=null&&(typeof h.toJSON5=="function"?h=h.toJSON5(f):typeof h.toJSON=="function"&&(h=h.toJSON(f))),o&&(h=o.call(p,f,h)),h instanceof Number?h=Number(h):h instanceof String?h=String(h):h instanceof Boolean&&(h=h.valueOf()),h){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof h=="string")return d(h);if(typeof h=="number")return String(h);if(typeof h=="object")return Array.isArray(h)?y(h):m(h)}function d(f){const p={"'":.1,'"':.2},h={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let g="";for(let _=0;_<f.length;_++){const b=f[_];switch(b){case"'":case'"':p[b]++,g+=b;continue;case"\0":if(xe.isDigit(f[_+1])){g+="\\x00";continue}}if(h[b]){g+=h[b];continue}if(b<" "){let w=b.charCodeAt(0).toString(16);g+="\\x"+("00"+w).substring(w.length);continue}g+=b}const D=l||Object.keys(p).reduce((_,b)=>p[_]<p[b]?_:b);return g=g.replace(new RegExp(D,"g"),h[D]),D+g+D}function m(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let p=i;i=i+u;let h=a||Object.keys(f),g=[];for(const _ of h){const b=c(_,f);if(b!==void 0){let w=x(_)+":";u!==""&&(w+=" "),w+=b,g.push(w)}}let D;if(g.length===0)D="{}";else{let _;if(u==="")_=g.join(","),D="{"+_+"}";else{let b=`,
10
+ `+i;_=g.join(b),D=`{
11
+ `+i+_+`,
12
+ `+p+"}"}}return s.pop(),i=p,D}function x(f){if(f.length===0)return d(f);const p=String.fromCodePoint(f.codePointAt(0));if(!xe.isIdStartChar(p))return d(f);for(let h=p.length;h<f.length;h++)if(!xe.isIdContinueChar(String.fromCodePoint(f.codePointAt(h))))return d(f);return f}function y(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let p=i;i=i+u;let h=[];for(let D=0;D<f.length;D++){const _=c(String(D),f);h.push(_!==void 0?_:"null")}let g;if(h.length===0)g="[]";else if(u==="")g="["+h.join(",")+"]";else{let D=`,
13
+ `+i,_=h.join(D);g=`[
14
+ `+i+_+`,
15
+ `+p+"]"}return s.pop(),i=p,g}};const f0={parse:s0,stringify:l0};var d0=f0,Qr=10**-4;function Gl(e){return e*Math.PI/180}function Ie(e){return 180*e/Math.PI}function te(e){let n=e;return Math.abs(n)<Qr&&(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 ut(e){let n=e%Math.PI;return n<0&&(n+=Math.PI),n}function Ne(e){let n=ut(e);return n>Math.PI/2&&(n-=Math.PI),n}function Lr(e,n,t){const r=le(n)-le(e);return t?Mt(r):Mt(r)-2*Math.PI}function Ea(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=Lr(n,t,r),a=Lr(n,e,r);Math.abs(a)<Math.abs(i)&&(s=!0)}return s}function lt(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"};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 Hl(e,n,t){const r=(e-t.shiftX)/t.scaleX+t.xMin,s=(n-t.shiftY)/t.scaleY+t.yMin;return[r,s]}function Fa(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 Nr(){return{init:0,xMin:0,yMin:0,xyDiff:1,shiftX:0,shiftY:0,scaleX:1,scaleY:1}}function Rr(e,n,t,r,s,i){const a=Nr(),o=Math.max(n-e,1),u=Math.max(r-t,1),l=s/o,c=i/u;let d=.9*l,m=o;return c<l&&(d=.9*c,m=u),a.init=1,a.xMin=e,a.yMin=t,a.xyDiff=m,a.shiftX=.05*s,a.scaleX=d,a.shiftY=i-.05*i,a.scaleY=-1*d,a}function Wl(e,n,t){const r=structuredClone(t);return r.xMin=e-r.xyDiff/2,r.yMin=n-r.xyDiff/2,r}function Yl(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 Rr(a,o,u,l,s,i)}function Zl(e,n){const t=structuredClone(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 Xl(e,n,t,r,s){const i=structuredClone(s),a=t-e,o=r-n;return i.xMin+=-a,i.yMin+=-o,i}function Kn(e,n){let t=0;if(n>e)throw`err539: ila < ilc ${e} ${n}`;return t=Math.sqrt(e**2-n**2),t}function Kl(e,n,t){return Math.sqrt(e**2+n**2-2*e*n*Math.cos(t))}function pi(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 hi(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=ut(n),a=ut(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 zl(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 p0=(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))(p0||{}),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),d=r.distanceToPoint(l);if(o!==0&&c===d)throw`err284: magnet point p3 is on line p1p2. cx ${r.cx} cy: ${r.cy}`;let m=u;return d<c&&(m=l),m}};function Y(e,n,t=0){return new Ue(e,n,t)}function Sa(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 h0=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=ut(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)*hi(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=ut(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)*hi(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),ut(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=ut(this.ca),i=ut(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=ut((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 zn(e,n,t){return new h0(e,n,t)}function gn(e,n){return zn(0,0,0).setFromPoints(e,n)}function Or(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=ut(e.angleToPoint(n)+Math.PI/2);return zn(t.cx,t.cy,r)}function m0(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=Or(e,n),s=Or(n,t);return r.intersection(s)}function Ke(e){let n=!1;return(e===0||e===1)&&(n=!0),n}function un(e){let n=!1;return(Ke(e)||e===6)&&(n=!0),n}function Nn(e){let n=!1;return(e===3||e===4||e===5)&&(n=!0),n}function Cr(e){let n=!1;return(e===2||Nn(e))&&(n=!0),n}var Qe=class ka{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 ka(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}},x0=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 x0;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=Kn(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 d=l;(!t.arcLarge&&!t.arcCcw||t.arcLarge&&t.arcCcw)&&(d=c);const m=d.angleToPoint(r),x=d.angleToPoint(s);return new Ge(1,r,s,d,t.radius,m,x,t.arcCcw)}function D0(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 g0(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 d=le(l)/2;if(te(d)===0){const f=Qr*.01;if(e.sType===0&&t.sType===1)d=t.arcCcw?f:-f;else if(e.sType===1&&t.sType===0)d=e.arcCcw?f:-f;else if(e.sType===0&&t.sType===0)throw`err402: prepare aPeakHalf too closed to zero ${d}`}const m=o+d,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:d}}function Gn(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 es(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 mi(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 Jn(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=gn(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 Qn(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=gn(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 er(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(!Ea(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 tr(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(!Ea(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 wn(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 d=u.angleToPoint(a),m=u.angleToPoint(o),x=le(d-i+Math.PI),y=le(m-i+Math.PI);Math.abs(y-x)>Math.PI+Qr&&kt.addMsg(`warn882: newRounded a873 or a972 larger than PI/2 ${lt(x)} ${lt(y)} at ${lt(u.cx)} ${lt(u.cy)}
16
+ `);const f=!(s>0);return new Ge(1,a,o,u,r,d,m,f)}function w0(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(Jn(e.s1,s)),a.push(wn(s,i,r,e.ra,e.aph,e.abi)),a.push(Qn(e.s3,i)),a}function y0(e){const t=gn(e.p1,e.p2).lineParallelDistance(e.ra,e.p6,e.p5),r=t.projectPoint(e.p5),s=r.distanceToPoint(e.p5),i=Gn(e.aph,e.s3,e.ra),a=Kn(i,s),o=es(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(Jn(e.s1,y)),f.push(wn(y,l,o,e.ra,e.aph,e.abi)),f.push(tr(e.s3,l)),f}function b0(e){const t=gn(e.p3,e.p2).lineParallelDistance(e.ra,e.p6,e.p4),r=t.projectPoint(e.p4),s=r.distanceToPoint(e.p4),i=Gn(e.aph,e.s1,e.ra),a=Kn(i,s),o=es(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(er(e.s1,l)),f.push(wn(l,y,o,e.ra,e.aph,e.abi)),f.push(Qn(e.s3,y)),f}function _0(e){const n=Gn(e.aph,e.s1,e.ra),t=Gn(e.aph,e.s3,e.ra),r=e.p4.distanceToPoint(e.p5),s=e.p4.angleToPoint(e.p5),i=pi(r,n,t),a=mi(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,d=pi(r,t,n),m=mi(e.p5,c,d,t,e.p6),x=c+m*d,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),p=[];return p.push(er(e.s1,l)),p.push(wn(l,f,u,e.ra,e.aph,e.abi)),p.push(tr(e.s3,f)),p}function Ta(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(Jn(e.s1,r)):e.s1.sType===1&&o.push(er(e.s1,r)),o.push(a),e.s3.sType===0?o.push(Qn(e.s3,s)):e.s3.sType===1&&o.push(tr(e.s3,s)),o}function xi(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=zn(i.cx,i.cy,r.abi);if(n.sType===0)s=gn(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=Kn(n.radius,l);s=es(r.abi,c,u,t)}else kt.addMsg(`warn222: wideAccess not possible on arc ${lt(n.radius)} ${lt(l)} at ${lt(t.cx)} ${lt(t.cy)}
17
+ `),s=t,i=t}}return[s,i]}function v0(e){const n=Ta(e),t=n[1].arcCcw?1:-1,[r,s]=xi(t,e.s1,n[1].p1,e),[i,a]=xi(-t,e.s3,n[1].p2,e),o=[];if(r.isEqual(s))o.push(n[0]);else{e.s1.sType===0?o.push(Jn(e.s1,r)):e.s1.sType===1&&o.push(er(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(wn(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(Qn(e.s3,i)):e.s3.sType===1&&o.push(tr(e.s3,i))}return o}function Di(e,n,t){const r=g0(e,n,t),s=[];if(n.sType===3)if(e.sType===0&&t.sType===0)s.push(...w0(r));else if(e.sType===0&&t.sType===1)s.push(...y0(r));else if(e.sType===1&&t.sType===0)s.push(...b0(r));else if(e.sType===1&&t.sType===1)s.push(..._0(r));else throw`err123: makeCorner unexpected s1s3.sType ${e.sType} ${t.sType}`;else if(n.sType===4)s.push(...Ta(r));else if(n.sType===5)s.push(...v0(r));else throw`err723: makeCorner unexpected s2.sType ${n.sType}`;return s}function at(e){return e.toFixed(4)}function A0(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 C0=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 E0(){return new C0}var F0=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 S0(){return new F0}function Ve(e){return e.toFixed(4)}var ts=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 k0(e,n,t,r){return new ts(!1,e,n,0,0,0,t,r)}function T0(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 ts(!0,e,n,t,u,l,0,0)}function P0(e,n,t){return new ts(!1,e,n,t,0,0,0,0)}var B0=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 M0(){return new B0}function I0(e,n,t){return{circle:!0,cx:e,cy:n,radius:t}}var $0=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 L0(){return new $0}var Pa=class{};function Ba(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 N0=class Ot extends Pa{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 ${lt(i.cx)} ${lt(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=m0(s,r,t),a=i.distanceToPoint(s),o=s.middlePoint(t),u=o.angleToPoint(s),l=o.angleToPoint(r),c=le(l-u);let d=!1,m=!1;if(!o.isEqual(i)){const x=o.angleToPoint(i),y=le(x-u);Math.sign(y)*Math.sign(c)>0&&(d=!0)}Math.sign(c)>0&&(m=!0),this.addPointA(t.cx,t.cy).addSegArc(a,d,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=Or(i,s);let o=s;r&&(o=i);const u=zn(o.cx,o.cy,t+Math.PI/2),l=a.intersection(u),c=l.distanceToPoint(i),d=i.middlePoint(s),m=o.angleToPoint(d),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(d),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 d=Math.tan(l/2),m=Math.tan(c/2),x=a*m/(m+d),y=Math.abs(x/Math.sin(l)),f=x/Math.cos(l/2),p=a*d/(m+d),h=Math.abs(p/Math.sin(c)),g=i.translatePolar(o+l/2,f);let D=!1;Math.sign(l)<0&&(D=!0),this.addPointA(g.cx,g.cy).addSegArc(y,!1,D),this.addPointA(s.cx,s.cy).addSegArc(h,!1,D),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,h))}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 d=c.clone();if(Ke(c.sType)){const x=Y(d.px,d.py).scale(a,s);d.px=x.cx,d.py=x.cy}c.sType===1&&(d.radius*=s),Nn(c.sType)&&i&&(d.radius*=s),d.sType!==6&&(l.addSeg(d),Ke(d.sType)&&l.setLastPoint(d.px,d.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),[d,m]=Vt(u.px,u.py,r);t.beginPath(),t.moveTo(l,c),t.lineTo(d,m),t.strokeStyle=i,t.stroke()}if(u.sType===1)try{const l=Tt(a,o,u),[c,d]=Vt(l.pc.cx,l.pc.cy,r),m=Fa(u.radius,r);t.beginPath(),t.arc(c,d,m,-l.a1,-l.a2,u.arcCcw),t.strokeStyle=i,t.stroke()}catch(l){console.log("err413: "+l)}un(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 d=t.at(-1),m=t.at(-2);if(d!==void 0&&m!==void 0&&Ke(d.sType)&&Cr(m.sType)){const x=t.pop(),y=t.pop(),f=t.pop();if(f!==void 0&&y!==void 0&&x!==void 0){const p=Di(f,y,x);t.push(...p)}else throw"err603: contour generateContour internal error"}if(Cr(c.sType)){if(s===2)throw`err419: generateContour with two consecutive corners ${c.sType}`;if(s===0&&Nn(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&&Nn(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}un(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&&Cr(o.sType)){const c=t[0],d=t.pop(),m=t.pop();if(m!==void 0&&d!==void 0&&c!==void 0){const x=Di(m,d,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 d=D0(c);l.addPointA(c.p2.cx,c.p2.cy).addSegArc(d.radius,d.arcLarge,d.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=Ba(s,i,a);t.push(o)}catch(o){console.log("err453: "+o)}un(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}`}un(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=E0();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(k0(r,s,i.px,i.py));else if(i.sType===1)try{const a=Tt(r,s,i);t.push(T0(a.pc.cx,a.pc.cy,i.radius,a.a1,a.a2,a.arcCcw))}catch(a){console.log("err413: "+a)}un(i.sType)&&(r=i.px,s=i.py)}return t}toPax(){const t=L0();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}},R0=class Kt extends Pa{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=Fa(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 A0(this.px,t-this.py,this.radius,r)}toDxfSeg(){const t=[];return t.push(P0(this.px,this.py,this.radius)),t}toPax(){return I0(this.px,this.py,this.radius)}getPerimeter(){return 2*Math.PI*this.radius}};function ns(e,n,t=""){return new N0(e,n,t)}function Jl(e,n,t,r=""){return new R0(e,n,t,r)}var O0=class jr{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 jr;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 jr,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]=Sa(this.pointList)}getAdjustFull(n,t){let r=Nr();return this.pointList.length>0&&(this.getMinMax(),r=Rr(this.xMin,this.xMax,this.yMin,this.yMax,n,t)),r}getAdjustZoom(n,t){let r=Nr();if(this.pointList.length>0){this.getMinMax();const s=(this.xMin+this.xMax)/2,i=(this.yMin+this.yMax)/2;r=Rr(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 j0(){return new O0}function Vr(e){const n=j0();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 Ql(){return{points:!1,lines:!1,vectors:!1,main:!0,mainB:!1,second:!0,secondB:!1,dynamics:!1,ruler:!0,refframe:!1}}function ef(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 V0=(e=>(e[e.eNumber=0]="eNumber",e[e.eCheckbox=1]="eCheckbox",e[e.eDropdown=2]="eDropdown",e[e.eSectionSeparator=3]="eSectionSeparator",e))(V0||{}),Qt={partName:"",params:[],paramSvg:{},sim:{tMax:0,tStep:0,tUpdate:0}};function U0(e,n,t){return{val:e,init:n,chg:t}}function q0(e){const n={};for(const t of Object.keys(e))n[t]=e[t].val;return n}var G0=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(q0(e))}getDesignParamList(){const e={};for(const n of this.paramNames)e[n]=U0(this.getVal(n),this.getInit(n),this.getChanged(n));return e}};function tf(e,n=""){return new G0(e,n)}function nf(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 rf(e,n){return{name:e,unit:"checkbox",init:n?1:0,min:0,max:1,step:1,dropdown:[],pType:1}}function sf(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 af(e){return{name:e,unit:"section-separator",init:0,min:0,max:0,step:0,dropdown:[],pType:3}}var H0=(e=>(e[e.eLinearOrtho=0]="eLinearOrtho",e[e.eRotate=1]="eRotate",e))(H0||{}),W0=(e=>(e[e.eIdentity=0]="eIdentity",e[e.eIntersection=1]="eIntersection",e[e.eUnion=2]="eUnion",e[e.eSubstraction=3]="eSubstraction",e))(W0||{});function of(e){return{partName:e,calcErr:!0,logstr:"",fig:{},vol:{extrudes:[],volumes:[]},sub:{}}}function uf(e){if(e.calcErr){let n=`err182: Error in sub-design ${e.partName}
63
+ `;throw n+=Y0(e.logstr,e.partName),n}}function Y0(e,n){let t="";for(const r of e.split(`
64
+ `))r!==""&&(t+=`[${n}]: ${r}
65
+ `);return t}var Z0=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 Z0}function rs(e){let n=6;return e===1?n=0:e===2&&(n=1),n}function X0(e){return new Qe(rs(e.typ),e.px,e.py,e.radius,e.large,e.ccw)}function Ma(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 Ia(e,n,t,r=Math.PI/6,s=2){const[i,a]=Ma(r,s,t,2*Math.PI),o=[];for(let c=0;c<i;c++){const d=e+t*Math.cos(c*a),m=n+t*Math.sin(c*a);o.push([d,m])}const u=o[0][0],l=o[0][1];return o.push([u,l]),o}function $a(e,n,t,r,s,i,a=Math.PI/6,o=2){const u=Lr(r,s,i),[l,c]=Ma(a,o,t,Math.abs(u)),d=i?c:-c,m=l+1,x=[];for(let y=1;y<m;y++){const f=r+y*d,p=e+t*Math.cos(f),h=n+t*Math.sin(f);x.push([p,h])}return x}var La=Math.PI/16,Na=2;function gi(e){return e.toFixed(4)}function wi(e){return e.toString().padStart(3,"0")}function yi(e,n){return[[e,n]]}function K0(e,n,t,r,s,i){return $a(e,n,t,r,s,i,La,Na)}function z0(e,n,t){return Ia(e,n,t,La,Na)}function J0(e){const n=[];let t=0,r=0;for(const s of e){if(s.typ===0)n.push(...yi(s.px,s.py));else if(s.typ===1)n.push(...yi(s.px,s.py));else if(s.typ===2)try{const i=s,a=new Qe(rs(i.typ),i.px,i.py,i.radius,i.large,i.ccw),o=Tt(t,r,a);n.push(...K0(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 Q0=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(`[ ${gi(a)}, ${gi(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}_${wi(a)}`,u=`cb_${e}_${wi(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}},el=class{getHeader(){return`// Generated by Parametrix
70
+ `}getOneFigure(e,n){const t=new Q0;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=J0(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,Qt);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 tl(){return new el}var Ra=Math.PI/16,Oa=2;function bi(e){return e.toFixed(4)}function _i(e){return e.toString().padStart(3,"0")}function vi(e,n){return[[e,n]]}function nl(e,n,t,r,s,i){return $a(e,n,t,r,s,i,Ra,Oa)}function rl(e){const n=[];let t=0,r=0;for(const s of e){if(s.typ===0)n.push(...vi(s.px,s.py));else if(s.typ===1)n.push(...vi(s.px,s.py));else if(s.typ===2)try{const i=s,a=new Qe(rs(i.typ),i.px,i.py,i.radius,i.large,i.ccw),o=Tt(t,r,a);n.push(...nl(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 sl(e,n,t){return Ia(e,n,t,Ra,Oa)}function ja(e,n){const t=[];for(const i of e){const[a,o]=i;t.push(`[ ${bi(a)}, ${bi(o)} ]`)}const r=`[ ${t.join(`,
96
+ `)} ]`;return`const ${n} = polygon({ points: ${r} });
97
+
98
+ `}function il(e,n,t,r){const s=sl(e,n,t);return ja(s,r)}function al(e,n){const t=rl(e);return ja(t,n)}function ol(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 ul(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 cl=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${_i(s)}`,o=[];for(const[u,l]of i.entries()){const c=`ctr_${a}_Ctr${_i(u)}`;if(l.circle===!0){const d=l;t+=il(d.cx,d.cy,d.radius,c)}else t+=al(l.seg,c);o.push(c)}t+=ol(o,a),r.push(a)}return t+=ul(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,Qt);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 ll(){return new cl}function de(e){return e.toFixed(4)}function be(e){return e.toString().padStart(3,"0")}function fl(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 dl(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 d=X0(c),m=Ba(r,s,d);t+=` P${be(i)} = App.Vector(${de(m.cx)}, ${de(m.cy)}, 0)
146
+ `,i+=1}catch(d){console.log("err730: "+d)}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 pl(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 hl(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 ml=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 d=l;t+=fl(d.cx,d.cy,d.radius,c)}else t+=dl(l.seg,c);o.push(c)}t+=pl(o,a),r.push(a)}return t+=hl(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,Qt);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 xl(){return new ml}var Dl=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]=Sa(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]}},gl=class{constructor(){I(this,"minMax");I(this,"groups");I(this,"svg");this.minMax=new Dl,this.groups=[],this.svg=S0()}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 Va(){return new gl}function Hn(e){const n=Va();return n.addAContour(e),n.stringify()}function Bn(e){const n=Va();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=M0();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 wl(e){let n="";return n+=e.logstr,n}function Ua(e,n,t){return qt().getPaxStr(e,n,t)}function qa(e){const n=qt().getPaxJson({},e,Qt);return tl().getExportFile(n)}function Ga(e){const n=qt().getPaxJson({},e,Qt);return ll().getExportFile(n)}function Ha(e){const n=qt().getPaxJson({},e,Qt);return xl().getExportFile(n)}async function yl(e,n,t,r,s){const i=new _c("application/zip"),a=new Gc(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 b in n.fig){const w=new Ce(Hn(n.fig[b].mainListC()));await a.add(`face_${o}_${b}.svg`,w);const v=new Ce(Wn(n.fig[b].mainListC()));await a.add(`face_${o}_${b}.dxf`,v);const A=new Ce(Bn(n.fig[b]));await a.add(`deco_${o}_${b}.svg`,A);const C=new Ce(Bn(r.fig[b]));await a.add(`deco_${o}_${b}_t${t}.svg`,C)}const d=Vr(n.fig),m=new Ce(Hn(d.mainListC()));await a.add(`face_${o}_all_merged.svg`,m);const x=new Ce(Wn(d.mainListC()));await a.add(`face_${o}_all_merged.dxf`,x);const y=new Ce(Bn(d));await a.add(`deco_${o}_all_merged.svg`,y);const f=new Ce(Bn(d));await a.add(`deco_${o}_all_merged_t${t}.svg`,f);const p=new Ce(Ua(e,n,s));await a.add(`${o}.pax.json`,p);const h=new Ce(qa(n));await a.add(`${o}_noarc_openscad.scad`,h);const g=new Ce(Ga(n));await a.add(`${o}_noarc_jscad.js`,g);const D=new Ce(Ha(n));return await a.add(`${o}_freecad.py`,D),await a.close(),await i.getData()}var bl=(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))(bl||{});function cf(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=Hn(u.mainListC())}else console.log(`err749: fileTextContent eFace ${r} invalid`);else if(s===1){const u=Vr(i.fig);a=Hn(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=Vr(i.fig);a=Wn(u.mainListC())}else s===4?a=wl(i):s===5?a=Ua(n,i,t):s===6?a=qa(i):s===7?a=Ga(i):s===8?a=Ha(i):console.log(`err912: unknown exportFormat ${s}`)}return a}async function lf(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 yl(t,i,n,a,r):console.log(`err913: unknown exportFormat ${s}`):console.log("err932: error by calling geome ${geome0.calcErr} ${geome1.calcErr}"),o}function ff(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 df(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 pf(e){let n=!1;return e===9&&(n=!0),n}function hf(e,n,t,r){return JSON.stringify({lastModif:e,partName:n,pVal:t,comment:r},null," ")}function mf(e){const n=d0.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 Wa(){return[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]}function en(){return[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]}function _l(e){const n=en(),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 vl(e){const n=en(),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 Al(e){const n=en(),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 Cl(e,n){const t=Wa();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 Ur(e){let n=en();for(const t of e)n=Cl(t,n);return n}function El(e,n,t){return Ur([_l(e),vl(n),Al(t)])}function Fl(e,n,t){const r=en();return r[0][3]=e,r[1][3]=n,r[2][3]=t,r}function Sl(e){const n=Wa();for(let t=0;t<4;t++)for(let r=0;r<4;r++)n[t][r]=e[t][r];return n}function kl(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 Tl(e){return[e[0][3],e[1][3],e[2][3]]}function Pl(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 Bl=class{constructor(e){I(this,"mmat");this.mmat=Sl(e)}addRotation(e,n,t){const r=El(e,n,t);this.mmat=Ur([this.mmat,r])}addTranslation(e,n,t){const r=Fl(e,n,t);this.mmat=Ur([this.mmat,r])}getMatrix(){return this.mmat}getRotation(){return Pl(this.mmat)}getTranslation(){return Tl(this.mmat)}transform(e){return kl(this.mmat,e)}},Ml=en();function xf(e=Ml){return new Bl(e)}function Il(e,n,t,r,s=0){return ns(e,n).addCornerRounded(s).addSegStrokeR(t,0).addCornerRounded(s).addSegStrokeR(0,r).addCornerRounded(s).addSegStrokeR(-t,0).addCornerRounded(s).closeSegStroke()}function $l(e,n,t,r,s,i=0){return Il(e,n,t,r,i).rotate(e,n,s)}function Df(e,n,t,r,s,i=0){const a=r/2*Math.sin(s),o=-r/2*Math.cos(s);return $l(e+a,n+o,t,r,s,i)}function gf(e,n,t,r,s,i=0){const a=(r-t)/2;return ns(e,n).addCornerRounded(i).addSegStrokeR(t,0).addCornerRounded(i).addSegStrokeR(a,s).addCornerRounded(i).addSegStrokeR(-r,0).addCornerRounded(i).closeSegStroke()}function wf(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 ns(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 yf(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{lf as $,zl as A,Kl as B,Mt as C,le as D,H0 as E,yf as F,_o as G,Vl as H,Ul as I,Ql as J,Vr as K,ef as L,hf as M,Nr as N,jl as O,mf as P,V0 as Q,Zl as R,p0 as S,Hl as T,Wl as U,Yl as V,me as W,Xl as X,ql as Y,q0 as Z,bl as _,af as a,cf as a0,df as a1,pf as a2,ff as a3,rf as b,sf as c,of as d,Ol as e,Gl as f,lt as g,ns as h,Rl as i,W0 as j,Jl as k,Y as l,wf as m,tf as n,uf as o,nf as p,Y0 as q,Ie as r,hs as s,xf as t,gf as u,Df as v,Il as w,$l as x,j0 as y,te as z};