Mercurial > repos > fubar > jbrowse2
view x/static/js/3902.69c7ff0c.chunk.js @ 125:49f3d3878413 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author | fubar |
---|---|
date | Sat, 05 Oct 2024 23:58:05 +0000 |
parents | |
children |
line wrap: on
line source
/*! For license information please see 3902.69c7ff0c.chunk.js.LICENSE.txt */ "use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[3902],{47046:(t,e,n)=>{n.d(e,{A:()=>a});class r{}class i{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(t=new r){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(t),t.aborted?this.handleAborted(t):"function"==typeof t.addEventListener&&t.addEventListener("abort",(()=>{this.handleAborted(t)}))}handleAborted(t){this.signals.delete(t),0===this.signals.size&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}class s{constructor(){this.callbacks=new Set}addCallback(t=()=>{}){this.callbacks.add(t),t(this.currentMessage)}callback(t){this.currentMessage=t;for(const e of this.callbacks)e(t)}}class a{constructor({fill:t,cache:e}){if("function"!=typeof t)throw new TypeError("must pass a fill function");if("object"!=typeof e)throw new TypeError("must pass a cache object");if("function"!=typeof e.get||"function"!=typeof e.set||"function"!=typeof e.delete)throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=e,this.fillCallback=t}static isAbortException(t){return"AbortError"===t.name||"ERR_ABORTED"===t.code||"AbortError: aborted"===t.message||"Error: aborted"===t.message}evict(t,e){this.cache.get(t)===e&&this.cache.delete(t)}fill(t,e,n,r){const a=new i,o=new s;o.addCallback(r);const h={aborter:a,promise:this.fillCallback(e,a.signal,(t=>{o.callback(t)})),settled:!1,statusReporter:o,get aborted(){return this.aborter.signal.aborted}};h.aborter.addSignal(n),h.aborter.signal.addEventListener("abort",(()=>{h.settled||this.evict(t,h)})),h.promise.then((()=>{h.settled=!0}),(()=>{h.settled=!0,this.evict(t,h)})).catch((t=>{throw console.error(t),t})),this.cache.set(t,h)}static checkSinglePromise(t,e){function n(){if(null==e?void 0:e.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return t.then((t=>(n(),t)),(t=>{throw n(),t}))}has(t){return this.cache.has(t)}get(t,e,n,r){if(!n&&e instanceof AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const i=this.cache.get(t);return i?i.aborted&&!i.settled?(this.evict(t,i),this.get(t,e,n,r)):i.settled?i.promise:(i.aborter.addSignal(n),i.statusReporter.addCallback(r),a.checkSinglePromise(i.promise,n)):(this.fill(t,e,n,r),a.checkSinglePromise(this.cache.get(t).promise,n))}delete(t){const e=this.cache.get(t);e&&(e.settled||e.aborter.abort(),this.cache.delete(t))}clear(){const t=this.cache.keys();let e=0;for(let n=t.next();!n.done;n=t.next())this.delete(n.value),e+=1;return e}}},93902:(t,e,n)=>{n.d(e,{C:()=>Yn,j:()=>$n});const r=BigInt(32);"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(t,e){return function(t,e,n){const i=Number(!!n),s=Number(!n);return BigInt(t.getInt32(e,n)*s+t.getInt32(e+4,n)*i)<<r|BigInt(t.getUint32(e,n)*i+t.getUint32(e+4,n)*s)}(this,t,e)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(t,e){return function(t,e,n){const i=t.getUint32(e,n),s=t.getUint32(e+4,n),a=Number(!!n),o=Number(!n);return BigInt(i*o+s*a)<<r|BigInt(i*a+s*o)}(this,t,e)});var i=n(26094),s=n(47046),a=n(16308),o=n.n(a);class h{constructor(t){this.ranges=t}get min(){return this.ranges[0].min}get max(){return this.ranges.at(-1).max}contains(t){for(const e of this.ranges)if(e.min<=t&&e.max>=t)return!0;return!1}isContiguous(){return this.ranges.length>1}getRanges(){return this.ranges.map((t=>new h([{min:t.min,max:t.max}])))}toString(){return this.ranges.map((t=>`[${t.min}-${t.max}]`)).join(",")}union(t){const e=[...this.getRanges(),...t.getRanges()].sort(((t,e)=>t.min<e.min?-1:t.min>e.min?1:t.max<e.max?-1:e.max>t.max?1:0)),n=[];let r=e[0];for(const t of e)t.min>r.max+1?(n.push(r),r=t):t.max>r.max&&(r=new h([{min:r.min,max:t.max}]));return n.push(r),1===n.length?n[0]:new h(n)}}function l(t){let e=t.length;for(;--e>=0;)t[e]=0}const f=new Uint8Array([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]),u=new Uint8Array([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]),c=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),d=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),g=new Array(576);l(g);const _=new Array(60);l(_);const p=new Array(512);l(p);const w=new Array(256);l(w);const b=new Array(29);l(b);const m=new Array(30);function y(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}let k,v,E;function x(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}l(m);const B=t=>t<256?p[t]:p[256+(t>>>7)],U=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},A=(t,e,n)=>{t.bi_valid>16-n?(t.bi_buf|=e<<t.bi_valid&65535,U(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)},z=(t,e,n)=>{A(t,n[2*e],n[2*e+1])},I=(t,e)=>{let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1},R=(t,e,n)=>{const r=new Array(16);let i,s,a=0;for(i=1;i<=15;i++)a=a+n[i-1]<<1,r[i]=a;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=I(r[e]++,e))}},O=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},S=t=>{t.bi_valid>8?U(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},T=(t,e,n,r)=>{const i=2*e,s=2*n;return t[i]<t[s]||t[i]===t[s]&&r[e]<=r[n]},L=(t,e,n)=>{const r=t.heap[n];let i=n<<1;for(;i<=t.heap_len&&(i<t.heap_len&&T(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!T(e,r,t.heap[i],t.depth));)t.heap[n]=t.heap[i],n=i,i<<=1;t.heap[n]=r},N=(t,e,n)=>{let r,i,s,a,o=0;if(0!==t.sym_next)do{r=255&t.pending_buf[t.sym_buf+o++],r+=(255&t.pending_buf[t.sym_buf+o++])<<8,i=t.pending_buf[t.sym_buf+o++],0===r?z(t,i,e):(s=w[i],z(t,s+256+1,e),a=f[s],0!==a&&(i-=b[s],A(t,i,a)),r--,s=B(r),z(t,s,n),a=u[s],0!==a&&(r-=m[s],A(t,r,a)))}while(o<t.sym_next);z(t,256,e)},D=(t,e)=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.has_stree,s=e.stat_desc.elems;let a,o,h,l=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<s;a++)0!==n[2*a]?(t.heap[++t.heap_len]=l=a,t.depth[a]=0):n[2*a+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=l<2?++l:0,n[2*h]=1,t.depth[h]=0,t.opt_len--,i&&(t.static_len-=r[2*h+1]);for(e.max_code=l,a=t.heap_len>>1;a>=1;a--)L(t,n,a);h=s;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],L(t,n,1),o=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=o,n[2*h]=n[2*a]+n[2*o],t.depth[h]=(t.depth[a]>=t.depth[o]?t.depth[a]:t.depth[o])+1,n[2*a+1]=n[2*o+1]=h,t.heap[1]=h++,L(t,n,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const n=e.dyn_tree,r=e.max_code,i=e.stat_desc.static_tree,s=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,h=e.stat_desc.max_length;let l,f,u,c,d,g,_=0;for(c=0;c<=15;c++)t.bl_count[c]=0;for(n[2*t.heap[t.heap_max]+1]=0,l=t.heap_max+1;l<573;l++)f=t.heap[l],c=n[2*n[2*f+1]+1]+1,c>h&&(c=h,_++),n[2*f+1]=c,f>r||(t.bl_count[c]++,d=0,f>=o&&(d=a[f-o]),g=n[2*f],t.opt_len+=g*(c+d),s&&(t.static_len+=g*(i[2*f+1]+d)));if(0!==_){do{for(c=h-1;0===t.bl_count[c];)c--;t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,_-=2}while(_>0);for(c=h;0!==c;c--)for(f=t.bl_count[c];0!==f;)u=t.heap[--l],u>r||(n[2*u+1]!==c&&(t.opt_len+=(c-n[2*u+1])*n[2*u],n[2*u+1]=c),f--)}})(t,e),R(n,l,t.bl_count)},C=(t,e,n)=>{let r,i,s=-1,a=e[1],o=0,h=7,l=4;for(0===a&&(h=138,l=3),e[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=e[2*(r+1)+1],++o<h&&i===a||(o<l?t.bl_tree[2*i]+=o:0!==i?(i!==s&&t.bl_tree[2*i]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=i,0===a?(h=138,l=3):i===a?(h=6,l=3):(h=7,l=4))},Z=(t,e,n)=>{let r,i,s=-1,a=e[1],o=0,h=7,l=4;for(0===a&&(h=138,l=3),r=0;r<=n;r++)if(i=a,a=e[2*(r+1)+1],!(++o<h&&i===a)){if(o<l)do{z(t,i,t.bl_tree)}while(0!=--o);else 0!==i?(i!==s&&(z(t,i,t.bl_tree),o--),z(t,16,t.bl_tree),A(t,o-3,2)):o<=10?(z(t,17,t.bl_tree),A(t,o-3,3)):(z(t,18,t.bl_tree),A(t,o-11,7));o=0,s=i,0===a?(h=138,l=3):i===a?(h=6,l=3):(h=7,l=4)}};let F=!1;const P=(t,e,n,r)=>{A(t,0+(r?1:0),3),S(t),U(t,n),U(t,~n),n&&t.pending_buf.set(t.window.subarray(e,e+n),t.pending),t.pending+=n};var M={_tr_init:t=>{F||((()=>{let t,e,n,r,i;const s=new Array(16);for(n=0,r=0;r<28;r++)for(b[r]=n,t=0;t<1<<f[r];t++)w[n++]=r;for(w[n-1]=r,i=0,r=0;r<16;r++)for(m[r]=i,t=0;t<1<<u[r];t++)p[i++]=r;for(i>>=7;r<30;r++)for(m[r]=i<<7,t=0;t<1<<u[r]-7;t++)p[256+i++]=r;for(e=0;e<=15;e++)s[e]=0;for(t=0;t<=143;)g[2*t+1]=8,t++,s[8]++;for(;t<=255;)g[2*t+1]=9,t++,s[9]++;for(;t<=279;)g[2*t+1]=7,t++,s[7]++;for(;t<=287;)g[2*t+1]=8,t++,s[8]++;for(R(g,287,s),t=0;t<30;t++)_[2*t+1]=5,_[2*t]=I(t,5);k=new y(g,f,257,286,15),v=new y(_,u,0,30,15),E=new y(new Array(0),c,0,19,7)})(),F=!0),t.l_desc=new x(t.dyn_ltree,k),t.d_desc=new x(t.dyn_dtree,v),t.bl_desc=new x(t.bl_tree,E),t.bi_buf=0,t.bi_valid=0,O(t)},_tr_stored_block:P,_tr_flush_block:(t,e,n,r)=>{let i,s,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),D(t,t.l_desc),D(t,t.d_desc),a=(t=>{let e;for(C(t,t.dyn_ltree,t.l_desc.max_code),C(t,t.dyn_dtree,t.d_desc.max_code),D(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*d[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),i=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==e?P(t,e,n,r):4===t.strategy||s===i?(A(t,2+(r?1:0),3),N(t,g,_)):(A(t,4+(r?1:0),3),((t,e,n,r)=>{let i;for(A(t,e-257,5),A(t,n-1,5),A(t,r-4,4),i=0;i<r;i++)A(t,t.bl_tree[2*d[i]+1],3);Z(t,t.dyn_ltree,e-1),Z(t,t.dyn_dtree,n-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),N(t,t.dyn_ltree,t.dyn_dtree)),O(t),r&&S(t)},_tr_tally:(t,e,n)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(w[n]+256+1)]++,t.dyn_dtree[2*B(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{A(t,2,3),z(t,256,g),(t=>{16===t.bi_valid?(U(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},$=(t,e,n,r)=>{let i=65535&t,s=t>>>16&65535,a=0;for(;0!==n;){a=n>2e3?2e3:n,n-=a;do{i=i+e[r++]|0,s=s+i|0}while(--a);i%=65521,s%=65521}return i|s<<16};const j=new Uint32Array((()=>{let t,e=[];for(var n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e})());var H=(t,e,n,r)=>{const i=j,s=r+n;t^=-1;for(let n=r;n<s;n++)t=t>>>8^i[255&(t^e[n])];return~t},V={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Y={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:q,_tr_stored_block:K,_tr_flush_block:G,_tr_tally:W,_tr_align:X}=M,{Z_NO_FLUSH:J,Z_PARTIAL_FLUSH:Q,Z_FULL_FLUSH:tt,Z_FINISH:et,Z_BLOCK:nt,Z_OK:rt,Z_STREAM_END:it,Z_STREAM_ERROR:st,Z_DATA_ERROR:at,Z_BUF_ERROR:ot,Z_DEFAULT_COMPRESSION:ht,Z_FILTERED:lt,Z_HUFFMAN_ONLY:ft,Z_RLE:ut,Z_FIXED:ct,Z_DEFAULT_STRATEGY:dt,Z_UNKNOWN:gt,Z_DEFLATED:_t}=Y,pt=258,wt=262,bt=42,mt=113,yt=666,kt=(t,e)=>(t.msg=V[e],e),vt=t=>2*t-(t>4?9:0),Et=t=>{let e=t.length;for(;--e>=0;)t[e]=0},xt=t=>{let e,n,r,i=t.w_size;e=t.hash_size,r=e;do{n=t.head[--r],t.head[r]=n>=i?n-i:0}while(--e);e=i,r=e;do{n=t.prev[--r],t.prev[r]=n>=i?n-i:0}while(--e)};let Bt=(t,e,n)=>(e<<t.hash_shift^n)&t.hash_mask;const Ut=t=>{const e=t.state;let n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+n),t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))},At=(t,e)=>{G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Ut(t.strm)},zt=(t,e)=>{t.pending_buf[t.pending++]=e},It=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Rt=(t,e,n,r)=>{let i=t.avail_in;return i>r&&(i=r),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),n),1===t.state.wrap?t.adler=$(t.adler,e,i,n):2===t.state.wrap&&(t.adler=H(t.adler,e,i,n)),t.next_in+=i,t.total_in+=i,i)},Ot=(t,e)=>{let n,r,i=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match;const h=t.strstart>t.w_size-wt?t.strstart-(t.w_size-wt):0,l=t.window,f=t.w_mask,u=t.prev,c=t.strstart+pt;let d=l[s+a-1],g=l[s+a];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(n=e,l[n+a]===g&&l[n+a-1]===d&&l[n]===l[s]&&l[++n]===l[s+1]){s+=2,n++;do{}while(l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&l[++s]===l[++n]&&s<c);if(r=pt-(c-s),s=c-pt,r>a){if(t.match_start=e,a=r,r>=o)break;d=l[s+a-1],g=l[s+a]}}}while((e=u[e&f])>h&&0!=--i);return a<=t.lookahead?a:t.lookahead},St=t=>{const e=t.w_size;let n,r,i;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-wt)&&(t.window.set(t.window.subarray(e,e+e-r),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),xt(t),r+=e),0===t.strm.avail_in)break;if(n=Rt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=n,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=Bt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=Bt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<wt&&0!==t.strm.avail_in)},Tt=(t,e)=>{let n,r,i,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,a=0,o=t.strm.avail_in;do{if(n=65535,i=t.bi_valid+42>>3,t.strm.avail_out<i)break;if(i=t.strm.avail_out-i,r=t.strstart-t.block_start,n>r+t.strm.avail_in&&(n=r+t.strm.avail_in),n>i&&(n=i),n<s&&(0===n&&e!==et||e===J||n!==r+t.strm.avail_in))break;a=e===et&&n===r+t.strm.avail_in?1:0,K(t,0,0,a),t.pending_buf[t.pending-4]=n,t.pending_buf[t.pending-3]=n>>8,t.pending_buf[t.pending-2]=~n,t.pending_buf[t.pending-1]=~n>>8,Ut(t.strm),r&&(r>n&&(r=n),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+r),t.strm.next_out),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r,t.block_start+=r,n-=r),n&&(Rt(t.strm,t.strm.output,t.strm.next_out,n),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n)}while(0===a);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),a?4:e!==J&&e!==et&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(i=t.window_size-t.strstart,t.strm.avail_in>i&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(Rt(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water<t.strstart&&(t.high_water=t.strstart),i=t.bi_valid+42>>3,i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i,s=i>t.w_size?t.w_size:i,r=t.strstart-t.block_start,(r>=s||(r||e===et)&&e!==J&&0===t.strm.avail_in&&r<=i)&&(n=r>i?i:r,a=e===et&&0===t.strm.avail_in&&n===r?1:0,K(t,t.block_start,n,a),t.block_start+=n,Ut(t.strm)),a?3:1)},Lt=(t,e)=>{let n,r;for(;;){if(t.lookahead<wt){if(St(t),t.lookahead<wt&&e===J)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=3&&(t.ins_h=Bt(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-wt&&(t.match_length=Ot(t,n)),t.match_length>=3)if(r=W(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Bt(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Bt(t,t.ins_h,t.window[t.strstart+1]);else r=W(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(At(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===et?(At(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(At(t,!1),0===t.strm.avail_out)?1:2},Nt=(t,e)=>{let n,r,i;for(;;){if(t.lookahead<wt){if(St(t),t.lookahead<wt&&e===J)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=3&&(t.ins_h=Bt(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-wt&&(t.match_length=Ot(t,n),t.match_length<=5&&(t.strategy===lt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,r=W(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=Bt(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,r&&(At(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(r=W(t,0,t.window[t.strstart-1]),r&&At(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=W(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===et?(At(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(At(t,!1),0===t.strm.avail_out)?1:2};function Dt(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}const Ct=[new Dt(0,0,0,0,Tt),new Dt(4,4,8,4,Lt),new Dt(4,5,16,8,Lt),new Dt(4,6,32,32,Lt),new Dt(4,4,16,16,Nt),new Dt(8,16,32,32,Nt),new Dt(8,16,128,128,Nt),new Dt(8,32,128,256,Nt),new Dt(32,128,258,1024,Nt),new Dt(32,258,258,4096,Nt)];function Zt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_t,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Et(this.dyn_ltree),Et(this.dyn_dtree),Et(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Et(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Et(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ft=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==bt&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==mt&&e.status!==yt?1:0},Pt=t=>{if(Ft(t))return kt(t,st);t.total_in=t.total_out=0,t.data_type=gt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?bt:mt,t.adler=2===e.wrap?0:1,e.last_flush=-2,q(e),rt},Mt=t=>{const e=Pt(t);var n;return e===rt&&((n=t.state).window_size=2*n.w_size,Et(n.head),n.max_lazy_match=Ct[n.level].max_lazy,n.good_match=Ct[n.level].good_length,n.nice_match=Ct[n.level].nice_length,n.max_chain_length=Ct[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),e},$t=(t,e,n,r,i,s)=>{if(!t)return st;let a=1;if(e===ht&&(e=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||n!==_t||r<8||r>15||e<0||e>9||s<0||s>ct||8===r&&1!==a)return kt(t,st);8===r&&(r=9);const o=new Zt;return t.state=o,o.strm=t,o.status=bt,o.wrap=a,o.gzhead=null,o.w_bits=r,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=n,Mt(t)};var jt=$t,Ht=(t,e)=>Ft(t)||2!==t.state.wrap?st:(t.state.gzhead=e,rt),Vt=(t,e)=>{if(Ft(t)||e>nt||e<0)return t?kt(t,st):st;const n=t.state;if(!t.output||0!==t.avail_in&&!t.input||n.status===yt&&e!==et)return kt(t,0===t.avail_out?ot:st);const r=n.last_flush;if(n.last_flush=e,0!==n.pending){if(Ut(t),0===t.avail_out)return n.last_flush=-1,rt}else if(0===t.avail_in&&vt(e)<=vt(r)&&e!==et)return kt(t,ot);if(n.status===yt&&0!==t.avail_in)return kt(t,ot);if(n.status===bt&&0===n.wrap&&(n.status=mt),n.status===bt){let e=_t+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=ft||n.level<2?0:n.level<6?1:6===n.level?2:3,e|=r<<6,0!==n.strstart&&(e|=32),e+=31-e%31,It(n,e),0!==n.strstart&&(It(n,t.adler>>>16),It(n,65535&t.adler)),t.adler=1,n.status=mt,Ut(t),0!==n.pending)return n.last_flush=-1,rt}if(57===n.status)if(t.adler=0,zt(n,31),zt(n,139),zt(n,8),n.gzhead)zt(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),zt(n,255&n.gzhead.time),zt(n,n.gzhead.time>>8&255),zt(n,n.gzhead.time>>16&255),zt(n,n.gzhead.time>>24&255),zt(n,9===n.level?2:n.strategy>=ft||n.level<2?4:0),zt(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(zt(n,255&n.gzhead.extra.length),zt(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=H(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(zt(n,0),zt(n,0),zt(n,0),zt(n,0),zt(n,0),zt(n,9===n.level?2:n.strategy>=ft||n.level<2?4:0),zt(n,3),n.status=mt,Ut(t),0!==n.pending)return n.last_flush=-1,rt;if(69===n.status){if(n.gzhead.extra){let e=n.pending,r=(65535&n.gzhead.extra.length)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>e&&(t.adler=H(t.adler,n.pending_buf,n.pending-e,e)),n.gzindex+=i,Ut(t),0!==n.pending)return n.last_flush=-1,rt;e=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>e&&(t.adler=H(t.adler,n.pending_buf,n.pending-e,e)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){let e,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(t.adler=H(t.adler,n.pending_buf,n.pending-r,r)),Ut(t),0!==n.pending)return n.last_flush=-1,rt;r=0}e=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,zt(n,e)}while(0!==e);n.gzhead.hcrc&&n.pending>r&&(t.adler=H(t.adler,n.pending_buf,n.pending-r,r)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){let e,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(t.adler=H(t.adler,n.pending_buf,n.pending-r,r)),Ut(t),0!==n.pending)return n.last_flush=-1,rt;r=0}e=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,zt(n,e)}while(0!==e);n.gzhead.hcrc&&n.pending>r&&(t.adler=H(t.adler,n.pending_buf,n.pending-r,r))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Ut(t),0!==n.pending))return n.last_flush=-1,rt;zt(n,255&t.adler),zt(n,t.adler>>8&255),t.adler=0}if(n.status=mt,Ut(t),0!==n.pending)return n.last_flush=-1,rt}if(0!==t.avail_in||0!==n.lookahead||e!==J&&n.status!==yt){let r=0===n.level?Tt(n,e):n.strategy===ft?((t,e)=>{let n;for(;;){if(0===t.lookahead&&(St(t),0===t.lookahead)){if(e===J)return 1;break}if(t.match_length=0,n=W(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(At(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===et?(At(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(At(t,!1),0===t.strm.avail_out)?1:2})(n,e):n.strategy===ut?((t,e)=>{let n,r,i,s;const a=t.window;for(;;){if(t.lookahead<=pt){if(St(t),t.lookahead<=pt&&e===J)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=t.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){s=t.strstart+pt;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<s);t.match_length=pt-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(n=W(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=W(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(At(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===et?(At(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(At(t,!1),0===t.strm.avail_out)?1:2})(n,e):Ct[n.level].func(n,e);if(3!==r&&4!==r||(n.status=yt),1===r||3===r)return 0===t.avail_out&&(n.last_flush=-1),rt;if(2===r&&(e===Q?X(n):e!==nt&&(K(n,0,0,!1),e===tt&&(Et(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Ut(t),0===t.avail_out))return n.last_flush=-1,rt}return e!==et?rt:n.wrap<=0?it:(2===n.wrap?(zt(n,255&t.adler),zt(n,t.adler>>8&255),zt(n,t.adler>>16&255),zt(n,t.adler>>24&255),zt(n,255&t.total_in),zt(n,t.total_in>>8&255),zt(n,t.total_in>>16&255),zt(n,t.total_in>>24&255)):(It(n,t.adler>>>16),It(n,65535&t.adler)),Ut(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?rt:it)},Yt=t=>{if(Ft(t))return st;const e=t.state.status;return t.state=null,e===mt?kt(t,at):rt},qt=(t,e)=>{let n=e.length;if(Ft(t))return st;const r=t.state,i=r.wrap;if(2===i||1===i&&r.status!==bt||r.lookahead)return st;if(1===i&&(t.adler=$(t.adler,e,n,0)),r.wrap=0,n>=r.w_size){0===i&&(Et(r.head),r.strstart=0,r.block_start=0,r.insert=0);let t=new Uint8Array(r.w_size);t.set(e.subarray(n-r.w_size,n),0),e=t,n=r.w_size}const s=t.avail_in,a=t.next_in,o=t.input;for(t.avail_in=n,t.next_in=0,t.input=e,St(r);r.lookahead>=3;){let t=r.strstart,e=r.lookahead-2;do{r.ins_h=Bt(r,r.ins_h,r.window[t+3-1]),r.prev[t&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=t,t++}while(--e);r.strstart=t,r.lookahead=2,St(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=a,t.input=o,t.avail_in=s,r.wrap=i,rt};const Kt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Gt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const e in n)Kt(n,e)&&(t[e]=n[e])}}return t},Wt=t=>{let e=0;for(let n=0,r=t.length;n<r;n++)e+=t[n].length;const n=new Uint8Array(e);for(let e=0,r=0,i=t.length;e<i;e++){let i=t[e];n.set(i,r),r+=i.length}return n};let Xt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Xt=!1}const Jt=new Uint8Array(256);for(let t=0;t<256;t++)Jt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Jt[254]=Jt[254]=1;var Qt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,n,r,i,s,a=t.length,o=0;for(i=0;i<a;i++)n=t.charCodeAt(i),55296==(64512&n)&&i+1<a&&(r=t.charCodeAt(i+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),o+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(o),s=0,i=0;s<o;i++)n=t.charCodeAt(i),55296==(64512&n)&&i+1<a&&(r=t.charCodeAt(i+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?e[s++]=n:n<2048?(e[s++]=192|n>>>6,e[s++]=128|63&n):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|63&n):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|63&n);return e},te=(t,e)=>{const n=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let r,i;const s=new Array(2*n);for(i=0,r=0;r<n;){let e=t[r++];if(e<128){s[i++]=e;continue}let a=Jt[e];if(a>4)s[i++]=65533,r+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&r<n;)e=e<<6|63&t[r++],a--;a>1?s[i++]=65533:e<65536?s[i++]=e:(e-=65536,s[i++]=55296|e>>10&1023,s[i++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Xt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let n="";for(let r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n})(s,i)},ee=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let n=e-1;for(;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?e:n+Jt[t[n]]>e?n:e},ne=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const re=Object.prototype.toString,{Z_NO_FLUSH:ie,Z_SYNC_FLUSH:se,Z_FULL_FLUSH:ae,Z_FINISH:oe,Z_OK:he,Z_STREAM_END:le,Z_DEFAULT_COMPRESSION:fe,Z_DEFAULT_STRATEGY:ue,Z_DEFLATED:ce}=Y;function de(t){this.options=Gt({level:fe,method:ce,chunkSize:16384,windowBits:15,memLevel:8,strategy:ue},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ne,this.strm.avail_out=0;let n=jt(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==he)throw new Error(V[n]);if(e.header&&Ht(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Qt(e.dictionary):"[object ArrayBuffer]"===re.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,n=qt(this.strm,t),n!==he)throw new Error(V[n]);this._dict_set=!0}}function ge(t,e){const n=new de(e);if(n.push(t,!0),n.err)throw n.msg||V[n.err];return n.result}de.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize;let i,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?oe:ie,"string"==typeof t?n.input=Qt(t):"[object ArrayBuffer]"===re.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(s===se||s===ae)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(i=Vt(n,s),i===le)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Yt(this.strm),this.onEnd(i),this.ended=!0,i===he;if(0!==n.avail_out){if(s>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},de.prototype.onData=function(t){this.chunks.push(t)},de.prototype.onEnd=function(t){t===he&&(this.result=Wt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var _e={Deflate:de,deflate:ge,deflateRaw:function(t,e){return(e=e||{}).raw=!0,ge(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,ge(t,e)},constants:Y};const pe=16209;var we=function(t,e){let n,r,i,s,a,o,h,l,f,u,c,d,g,_,p,w,b,m,y,k,v,E,x,B;const U=t.state;n=t.next_in,x=t.input,r=n+(t.avail_in-5),i=t.next_out,B=t.output,s=i-(e-t.avail_out),a=i+(t.avail_out-257),o=U.dmax,h=U.wsize,l=U.whave,f=U.wnext,u=U.window,c=U.hold,d=U.bits,g=U.lencode,_=U.distcode,p=(1<<U.lenbits)-1,w=(1<<U.distbits)-1;t:do{d<15&&(c+=x[n++]<<d,d+=8,c+=x[n++]<<d,d+=8),b=g[c&p];e:for(;;){if(m=b>>>24,c>>>=m,d-=m,m=b>>>16&255,0===m)B[i++]=65535&b;else{if(!(16&m)){if(64&m){if(32&m){U.mode=16191;break t}t.msg="invalid literal/length code",U.mode=pe;break t}b=g[(65535&b)+(c&(1<<m)-1)];continue e}for(y=65535&b,m&=15,m&&(d<m&&(c+=x[n++]<<d,d+=8),y+=c&(1<<m)-1,c>>>=m,d-=m),d<15&&(c+=x[n++]<<d,d+=8,c+=x[n++]<<d,d+=8),b=_[c&w];;){if(m=b>>>24,c>>>=m,d-=m,m=b>>>16&255,16&m){if(k=65535&b,m&=15,d<m&&(c+=x[n++]<<d,d+=8,d<m&&(c+=x[n++]<<d,d+=8)),k+=c&(1<<m)-1,k>o){t.msg="invalid distance too far back",U.mode=pe;break t}if(c>>>=m,d-=m,m=i-s,k>m){if(m=k-m,m>l&&U.sane){t.msg="invalid distance too far back",U.mode=pe;break t}if(v=0,E=u,0===f){if(v+=h-m,m<y){y-=m;do{B[i++]=u[v++]}while(--m);v=i-k,E=B}}else if(f<m){if(v+=h+f-m,m-=f,m<y){y-=m;do{B[i++]=u[v++]}while(--m);if(v=0,f<y){m=f,y-=m;do{B[i++]=u[v++]}while(--m);v=i-k,E=B}}}else if(v+=f-m,m<y){y-=m;do{B[i++]=u[v++]}while(--m);v=i-k,E=B}for(;y>2;)B[i++]=E[v++],B[i++]=E[v++],B[i++]=E[v++],y-=3;y&&(B[i++]=E[v++],y>1&&(B[i++]=E[v++]))}else{v=i-k;do{B[i++]=B[v++],B[i++]=B[v++],B[i++]=B[v++],y-=3}while(y>2);y&&(B[i++]=B[v++],y>1&&(B[i++]=B[v++]))}break}if(64&m){t.msg="invalid distance code",U.mode=pe;break t}b=_[(65535&b)+(c&(1<<m)-1)]}}break}}while(n<r&&i<a);y=d>>3,n-=y,d-=y<<3,c&=(1<<d)-1,t.next_in=n,t.next_out=i,t.avail_in=n<r?r-n+5:5-(n-r),t.avail_out=i<a?a-i+257:257-(i-a),U.hold=c,U.bits=d};const be=new Uint16Array([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]),me=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ye=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ke=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ve=(t,e,n,r,i,s,a,o)=>{const h=o.bits;let l,f,u,c,d,g,_=0,p=0,w=0,b=0,m=0,y=0,k=0,v=0,E=0,x=0,B=null;const U=new Uint16Array(16),A=new Uint16Array(16);let z,I,R,O=null;for(_=0;_<=15;_++)U[_]=0;for(p=0;p<r;p++)U[e[n+p]]++;for(m=h,b=15;b>=1&&0===U[b];b--);if(m>b&&(m=b),0===b)return i[s++]=20971520,i[s++]=20971520,o.bits=1,0;for(w=1;w<b&&0===U[w];w++);for(m<w&&(m=w),v=1,_=1;_<=15;_++)if(v<<=1,v-=U[_],v<0)return-1;if(v>0&&(0===t||1!==b))return-1;for(A[1]=0,_=1;_<15;_++)A[_+1]=A[_]+U[_];for(p=0;p<r;p++)0!==e[n+p]&&(a[A[e[n+p]]++]=p);if(0===t?(B=O=a,g=20):1===t?(B=be,O=me,g=257):(B=ye,O=ke,g=0),x=0,p=0,_=w,d=s,y=m,k=0,u=-1,E=1<<m,c=E-1,1===t&&E>852||2===t&&E>592)return 1;for(;;){z=_-k,a[p]+1<g?(I=0,R=a[p]):a[p]>=g?(I=O[a[p]-g],R=B[a[p]-g]):(I=96,R=0),l=1<<_-k,f=1<<y,w=f;do{f-=l,i[d+(x>>k)+f]=z<<24|I<<16|R}while(0!==f);for(l=1<<_-1;x&l;)l>>=1;if(0!==l?(x&=l-1,x+=l):x=0,p++,0==--U[_]){if(_===b)break;_=e[n+a[p]]}if(_>m&&(x&c)!==u){for(0===k&&(k=m),d+=w,y=_-k,v=1<<y;y+k<b&&(v-=U[y+k],!(v<=0));)y++,v<<=1;if(E+=1<<y,1===t&&E>852||2===t&&E>592)return 1;u=x&c,i[u]=m<<24|y<<16|d-s}}return 0!==x&&(i[d+x]=_-k<<24|64<<16),o.bits=m,0};const{Z_FINISH:Ee,Z_BLOCK:xe,Z_TREES:Be,Z_OK:Ue,Z_STREAM_END:Ae,Z_NEED_DICT:ze,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Re,Z_MEM_ERROR:Oe,Z_BUF_ERROR:Se,Z_DEFLATED:Te}=Y,Le=16180,Ne=16190,De=16191,Ce=16192,Ze=16194,Fe=16199,Pe=16200,Me=16206,$e=16209,je=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function He(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ve=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<Le||e.mode>16211?1:0},Ye=t=>{if(Ve(t))return Ie;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Le,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,Ue},qe=t=>{if(Ve(t))return Ie;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Ye(t)},Ke=(t,e)=>{let n;if(Ve(t))return Ie;const r=t.state;return e<0?(n=0,e=-e):(n=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Ie:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,qe(t))},Ge=(t,e)=>{if(!t)return Ie;const n=new He;t.state=n,n.strm=t,n.window=null,n.mode=Le;const r=Ke(t,e);return r!==Ue&&(t.state=null),r};let We,Xe,Je=!0;const Qe=t=>{if(Je){We=new Int32Array(512),Xe=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ve(1,t.lens,0,288,We,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ve(2,t.lens,0,32,Xe,0,t.work,{bits:5}),Je=!1}t.lencode=We,t.lenbits=9,t.distcode=Xe,t.distbits=5},tn=(t,e,n,r)=>{let i;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(e.subarray(n-s.wsize,n),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(e.subarray(n-r,n-r+i),s.wnext),(r-=i)?(s.window.set(e.subarray(n-r,n),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0};var en=qe,nn=Ge,rn=(t,e)=>{let n,r,i,s,a,o,h,l,f,u,c,d,g,_,p,w,b,m,y,k,v,E,x=0;const B=new Uint8Array(4);let U,A;const z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ve(t)||!t.output||!t.input&&0!==t.avail_in)return Ie;n=t.state,n.mode===De&&(n.mode=Ce),a=t.next_out,i=t.output,h=t.avail_out,s=t.next_in,r=t.input,o=t.avail_in,l=n.hold,f=n.bits,u=o,c=h,E=Ue;t:for(;;)switch(n.mode){case Le:if(0===n.wrap){n.mode=Ce;break}for(;f<16;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}if(2&n.wrap&&35615===l){0===n.wbits&&(n.wbits=15),n.check=0,B[0]=255&l,B[1]=l>>>8&255,n.check=H(n.check,B,2,0),l=0,f=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31){t.msg="incorrect header check",n.mode=$e;break}if((15&l)!==Te){t.msg="unknown compression method",n.mode=$e;break}if(l>>>=4,f-=4,v=8+(15&l),0===n.wbits&&(n.wbits=v),v>15||v>n.wbits){t.msg="invalid window size",n.mode=$e;break}n.dmax=1<<n.wbits,n.flags=0,t.adler=n.check=1,n.mode=512&l?16189:De,l=0,f=0;break;case 16181:for(;f<16;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}if(n.flags=l,(255&n.flags)!==Te){t.msg="unknown compression method",n.mode=$e;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=$e;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&4&n.wrap&&(B[0]=255&l,B[1]=l>>>8&255,n.check=H(n.check,B,2,0)),l=0,f=0,n.mode=16182;case 16182:for(;f<32;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}n.head&&(n.head.time=l),512&n.flags&&4&n.wrap&&(B[0]=255&l,B[1]=l>>>8&255,B[2]=l>>>16&255,B[3]=l>>>24&255,n.check=H(n.check,B,4,0)),l=0,f=0,n.mode=16183;case 16183:for(;f<16;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&4&n.wrap&&(B[0]=255&l,B[1]=l>>>8&255,n.check=H(n.check,B,2,0)),l=0,f=0,n.mode=16184;case 16184:if(1024&n.flags){for(;f<16;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&4&n.wrap&&(B[0]=255&l,B[1]=l>>>8&255,n.check=H(n.check,B,2,0)),l=0,f=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&(d=n.length,d>o&&(d=o),d&&(n.head&&(v=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(s,s+d),v)),512&n.flags&&4&n.wrap&&(n.check=H(n.check,r,d,s)),o-=d,s+=d,n.length-=d),n.length))break t;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===o)break t;d=0;do{v=r[s+d++],n.head&&v&&n.length<65536&&(n.head.name+=String.fromCharCode(v))}while(v&&d<o);if(512&n.flags&&4&n.wrap&&(n.check=H(n.check,r,d,s)),o-=d,s+=d,v)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===o)break t;d=0;do{v=r[s+d++],n.head&&v&&n.length<65536&&(n.head.comment+=String.fromCharCode(v))}while(v&&d<o);if(512&n.flags&&4&n.wrap&&(n.check=H(n.check,r,d,s)),o-=d,s+=d,v)break t}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;f<16;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}if(4&n.wrap&&l!==(65535&n.check)){t.msg="header crc mismatch",n.mode=$e;break}l=0,f=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=De;break;case 16189:for(;f<32;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}t.adler=n.check=je(l),l=0,f=0,n.mode=Ne;case Ne:if(0===n.havedict)return t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,n.hold=l,n.bits=f,ze;t.adler=n.check=1,n.mode=De;case De:if(e===xe||e===Be)break t;case Ce:if(n.last){l>>>=7&f,f-=7&f,n.mode=Me;break}for(;f<3;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}switch(n.last=1&l,l>>>=1,f-=1,3&l){case 0:n.mode=16193;break;case 1:if(Qe(n),n.mode=Fe,e===Be){l>>>=2,f-=2;break t}break;case 2:n.mode=16196;break;case 3:t.msg="invalid block type",n.mode=$e}l>>>=2,f-=2;break;case 16193:for(l>>>=7&f,f-=7&f;f<32;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}if((65535&l)!=(l>>>16^65535)){t.msg="invalid stored block lengths",n.mode=$e;break}if(n.length=65535&l,l=0,f=0,n.mode=Ze,e===Be)break t;case Ze:n.mode=16195;case 16195:if(d=n.length,d){if(d>o&&(d=o),d>h&&(d=h),0===d)break t;i.set(r.subarray(s,s+d),a),o-=d,s+=d,h-=d,a+=d,n.length-=d;break}n.mode=De;break;case 16196:for(;f<14;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}if(n.nlen=257+(31&l),l>>>=5,f-=5,n.ndist=1+(31&l),l>>>=5,f-=5,n.ncode=4+(15&l),l>>>=4,f-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=$e;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;f<3;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}n.lens[z[n.have++]]=7&l,l>>>=3,f-=3}for(;n.have<19;)n.lens[z[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,U={bits:n.lenbits},E=ve(0,n.lens,0,19,n.lencode,0,n.work,U),n.lenbits=U.bits,E){t.msg="invalid code lengths set",n.mode=$e;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;x=n.lencode[l&(1<<n.lenbits)-1],p=x>>>24,w=x>>>16&255,b=65535&x,!(p<=f);){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}if(b<16)l>>>=p,f-=p,n.lens[n.have++]=b;else{if(16===b){for(A=p+2;f<A;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}if(l>>>=p,f-=p,0===n.have){t.msg="invalid bit length repeat",n.mode=$e;break}v=n.lens[n.have-1],d=3+(3&l),l>>>=2,f-=2}else if(17===b){for(A=p+3;f<A;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}l>>>=p,f-=p,v=0,d=3+(7&l),l>>>=3,f-=3}else{for(A=p+7;f<A;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}l>>>=p,f-=p,v=0,d=11+(127&l),l>>>=7,f-=7}if(n.have+d>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=$e;break}for(;d--;)n.lens[n.have++]=v}}if(n.mode===$e)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=$e;break}if(n.lenbits=9,U={bits:n.lenbits},E=ve(1,n.lens,0,n.nlen,n.lencode,0,n.work,U),n.lenbits=U.bits,E){t.msg="invalid literal/lengths set",n.mode=$e;break}if(n.distbits=6,n.distcode=n.distdyn,U={bits:n.distbits},E=ve(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,U),n.distbits=U.bits,E){t.msg="invalid distances set",n.mode=$e;break}if(n.mode=Fe,e===Be)break t;case Fe:n.mode=Pe;case Pe:if(o>=6&&h>=258){t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,n.hold=l,n.bits=f,we(t,c),a=t.next_out,i=t.output,h=t.avail_out,s=t.next_in,r=t.input,o=t.avail_in,l=n.hold,f=n.bits,n.mode===De&&(n.back=-1);break}for(n.back=0;x=n.lencode[l&(1<<n.lenbits)-1],p=x>>>24,w=x>>>16&255,b=65535&x,!(p<=f);){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}if(w&&!(240&w)){for(m=p,y=w,k=b;x=n.lencode[k+((l&(1<<m+y)-1)>>m)],p=x>>>24,w=x>>>16&255,b=65535&x,!(m+p<=f);){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}l>>>=m,f-=m,n.back+=m}if(l>>>=p,f-=p,n.back+=p,n.length=b,0===w){n.mode=16205;break}if(32&w){n.back=-1,n.mode=De;break}if(64&w){t.msg="invalid literal/length code",n.mode=$e;break}n.extra=15&w,n.mode=16201;case 16201:if(n.extra){for(A=n.extra;f<A;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,f-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;x=n.distcode[l&(1<<n.distbits)-1],p=x>>>24,w=x>>>16&255,b=65535&x,!(p<=f);){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}if(!(240&w)){for(m=p,y=w,k=b;x=n.distcode[k+((l&(1<<m+y)-1)>>m)],p=x>>>24,w=x>>>16&255,b=65535&x,!(m+p<=f);){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}l>>>=m,f-=m,n.back+=m}if(l>>>=p,f-=p,n.back+=p,64&w){t.msg="invalid distance code",n.mode=$e;break}n.offset=b,n.extra=15&w,n.mode=16203;case 16203:if(n.extra){for(A=n.extra;f<A;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,f-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=$e;break}n.mode=16204;case 16204:if(0===h)break t;if(d=c-h,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=$e;break}d>n.wnext?(d-=n.wnext,g=n.wsize-d):g=n.wnext-d,d>n.length&&(d=n.length),_=n.window}else _=i,g=a-n.offset,d=n.length;d>h&&(d=h),h-=d,n.length-=d;do{i[a++]=_[g++]}while(--d);0===n.length&&(n.mode=Pe);break;case 16205:if(0===h)break t;i[a++]=n.length,h--,n.mode=Pe;break;case Me:if(n.wrap){for(;f<32;){if(0===o)break t;o--,l|=r[s++]<<f,f+=8}if(c-=h,t.total_out+=c,n.total+=c,4&n.wrap&&c&&(t.adler=n.check=n.flags?H(n.check,i,c,a-c):$(n.check,i,c,a-c)),c=h,4&n.wrap&&(n.flags?l:je(l))!==n.check){t.msg="incorrect data check",n.mode=$e;break}l=0,f=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;f<32;){if(0===o)break t;o--,l+=r[s++]<<f,f+=8}if(4&n.wrap&&l!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=$e;break}l=0,f=0}n.mode=16208;case 16208:E=Ae;break t;case $e:E=Re;break t;case 16210:return Oe;default:return Ie}return t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,n.hold=l,n.bits=f,(n.wsize||c!==t.avail_out&&n.mode<$e&&(n.mode<Me||e!==Ee))&&tn(t,t.output,t.next_out,c-t.avail_out),u-=t.avail_in,c-=t.avail_out,t.total_in+=u,t.total_out+=c,n.total+=c,4&n.wrap&&c&&(t.adler=n.check=n.flags?H(n.check,i,c,t.next_out-c):$(n.check,i,c,t.next_out-c)),t.data_type=n.bits+(n.last?64:0)+(n.mode===De?128:0)+(n.mode===Fe||n.mode===Ze?256:0),(0===u&&0===c||e===Ee)&&E===Ue&&(E=Se),E},sn=t=>{if(Ve(t))return Ie;let e=t.state;return e.window&&(e.window=null),t.state=null,Ue},an=(t,e)=>{if(Ve(t))return Ie;const n=t.state;return 2&n.wrap?(n.head=e,e.done=!1,Ue):Ie},on=(t,e)=>{const n=e.length;let r,i,s;return Ve(t)?Ie:(r=t.state,0!==r.wrap&&r.mode!==Ne?Ie:r.mode===Ne&&(i=1,i=$(i,e,n,0),i!==r.check)?Re:(s=tn(t,e,n,n),s?(r.mode=16210,Oe):(r.havedict=1,Ue)))},hn=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const ln=Object.prototype.toString,{Z_NO_FLUSH:fn,Z_FINISH:un,Z_OK:cn,Z_STREAM_END:dn,Z_NEED_DICT:gn,Z_STREAM_ERROR:_n,Z_DATA_ERROR:pn,Z_MEM_ERROR:wn}=Y;function bn(t){this.options=Gt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ne,this.strm.avail_out=0;let n=nn(this.strm,e.windowBits);if(n!==cn)throw new Error(V[n]);if(this.header=new hn,an(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Qt(e.dictionary):"[object ArrayBuffer]"===ln.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=on(this.strm,e.dictionary),n!==cn)))throw new Error(V[n])}function mn(t,e){const n=new bn(e);if(n.push(t),n.err)throw n.msg||V[n.err];return n.result}bn.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let s,a,o;if(this.ended)return!1;for(a=e===~~e?e:!0===e?un:fn,"[object ArrayBuffer]"===ln.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),s=rn(n,a),s===gn&&i&&(s=on(n,i),s===cn?s=rn(n,a):s===pn&&(s=gn));n.avail_in>0&&s===dn&&n.state.wrap>0&&0!==t[n.next_in];)en(n),s=rn(n,a);switch(s){case _n:case pn:case gn:case wn:return this.onEnd(s),this.ended=!0,!1}if(o=n.avail_out,n.next_out&&(0===n.avail_out||s===dn))if("string"===this.options.to){let t=ee(n.output,n.next_out),e=n.next_out-t,i=te(n.output,t);n.next_out=e,n.avail_out=r-e,e&&n.output.set(n.output.subarray(t,t+e),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(s!==cn||0!==o){if(s===dn)return s=sn(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},bn.prototype.onData=function(t){this.chunks.push(t)},bn.prototype.onEnd=function(t){t===cn&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Wt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var yn={Inflate:bn,inflate:mn,inflateRaw:function(t,e){return(e=e||{}).raw=!0,mn(t,e)},ungzip:mn,constants:Y};const{Deflate:kn,deflate:vn,deflateRaw:En,gzip:xn}=_e,{Inflate:Bn,inflate:Un,inflateRaw:An,ungzip:zn}=yn;var In=An;class Rn extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}}function On(t){if(t&&t.aborted){if("undefined"==typeof DOMException){const t=new Rn("aborted");throw t.code="ERR_ABORTED",t}throw new DOMException("aborted","AbortError")}}const Sn="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function Tn(t,e,n,r){return t<r&&e>=n}class Ln{constructor(t,e,n,r,a,h){if(this.bbi=t,this.refsByName=e,this.cirTreeOffset=n,this.isBigEndian=r,this.isCompressed=a,this.blockType=h,this.featureCache=new s.A({cache:new(o())({maxSize:1e3}),fill:async(t,e)=>{const n=t.length,r=t.offset,{buffer:s}=await this.bbi.read(i.hp.alloc(n),0,n,r,{signal:e});return s}}),!(n>=0))throw new Error("invalid cirTreeOffset!")}async readWigData(t,e,n,r,s){try{const{refsByName:a,bbi:o,cirTreeOffset:l,isBigEndian:f}=this,u=a[t];void 0===u&&r.complete();const c={chrId:u,start:e,end:n};this.cirTreePromise||(this.cirTreePromise=o.read(i.hp.alloc(48),0,48,l,s));const{buffer:d}=await this.cirTreePromise,g=f?d.readUInt32BE(4):d.readUInt32LE(4);let _=[],p=0;const w=!0,b=(t,e,n)=>{try{const r=t.subarray(e),i=new DataView(r.buffer,r.byteOffset,r.length);let s=0;const a=i.getUint8(s);s+=2;const o=i.getUint16(s,w);if(s+=2,1===a){const t=[];for(let e=0;e<o;e++){const e=i.getUint32(s,w);s+=4;const n=i.getUint32(s,w);s+=4;const r=i.getUint32(s,w);s+=4;const a=i.getUint32(s,w);s+=4;const o=Number(i.getBigUint64(s,w));s+=8;const h=Number(i.getBigUint64(s,w));s+=8,t.push({startChrom:e,startBase:n,endBase:a,endChrom:r,blockOffset:o,blockSize:h,offset:s})}_=_.concat(t.filter((t=>m(t))).map((t=>({offset:t.blockOffset,length:t.blockSize}))))}else if(0===a){const t=[];for(let e=0;e<o;e++){const e=i.getUint32(s,w);s+=4;const n=i.getUint32(s,w);s+=4;const r=i.getUint32(s,w);s+=4;const a=i.getUint32(s,w);s+=4;const o=Number(i.getBigUint64(s,w));s+=8,t.push({startChrom:e,startBase:n,endChrom:r,endBase:a,blockOffset:o,offset:s})}const e=t.filter((t=>m(t))).map((t=>t.blockOffset));e.length>0&&k(e,n+1)}}catch(t){r.error(t)}},m=t=>{const{startChrom:r,startBase:i,endChrom:s,endBase:a}=t;return(r<u||r===u&&i<=n)&&(s>u||s===u&&a>=e)},y=async(t,e,n)=>{try{const i=e.max-e.min,a=e.min,o=await this.featureCache.get(`${i}_${a}`,{length:i,offset:a},null==s?void 0:s.signal);for(const i of t)e.contains(i)&&(b(o,i-a,n),p-=1,0===p&&this.readFeatures(r,_,{...s,request:c}).catch((t=>{r.error(t)})))}catch(t){r.error(t)}},k=(t,e)=>{try{p+=t.length;const n=4+32*g;let r=new h([{min:t[0],max:t[0]+n}]);for(let e=1;e<t.length;e+=1){const i=new h([{min:t[e],max:t[e]+n}]);r=r.union(i)}r.getRanges().map((n=>y(t,n,e)))}catch(t){r.error(t)}};return void k([Number(l)+48],1)}catch(t){r.error(t)}}parseSummaryBlock(t,e,n){const r=[];let i=e;const s=new DataView(t.buffer,t.byteOffset,t.length);for(;i<t.byteLength;){const t=s.getUint32(i,!0);i+=4;const e=s.getUint32(i,!0);i+=4;const a=s.getUint32(i,!0);i+=4;const o=s.getUint32(i,!0);i+=4;const h=s.getFloat32(i,!0);i+=4;const l=s.getFloat32(i,!0);i+=4;const f=s.getFloat32(i,!0);i+=4,i+=4,(!n||t===n.chrId&&Tn(e,a,n.start,n.end))&&r.push({start:e,end:a,maxScore:l,minScore:h,summary:!0,score:f/(o||1)})}return r}parseBigBedBlock(t,e,n,r){var i;const s=[];let a=e;const o=!0,h=t,l=new DataView(h.buffer,h.byteOffset,h.length);for(;a<t.byteLength;){const e=a,r=l.getUint32(a,o);a+=4;const h=l.getInt32(a,o);a+=4;const f=l.getInt32(a,o);a+=4;let u=a;for(;u<t.length&&0!==t[u];u++);const c=t.subarray(a,u),d=null!==(i=null==Sn?void 0:Sn.decode(c))&&void 0!==i?i:c.toString();a=u+1,s.push({chromId:r,start:h,end:f,rest:d,uniqueId:`bb-${n+e}`})}return r?s.filter((t=>Tn(t.start,t.end,r.start,r.end))):s}parseBigWigBlock(t,e,n){const r=t.subarray(e),i=new DataView(r.buffer,r.byteOffset,r.length);let s=0;s+=4;const a=i.getInt32(s,!0);s+=8;const o=i.getUint32(s,!0);s+=4;const h=i.getUint32(s,!0);s+=4;const l=i.getUint8(s);s+=2;const f=i.getUint16(s,!0);s+=2;const u=new Array(f);switch(l){case 1:for(let t=0;t<f;t++){const e=i.getInt32(s,!0);s+=4;const n=i.getInt32(s,!0);s+=4;const r=i.getFloat32(s,!0);s+=4,u[t]={start:e,end:n,score:r}}break;case 2:for(let t=0;t<f;t++){const e=i.getInt32(s,!0);s+=4;const n=i.getFloat32(s,!0);s+=4,u[t]={score:n,start:e,end:e+h}}break;case 3:for(let t=0;t<f;t++){const e=i.getFloat32(s,!0);s+=4;const n=a+t*o;u[t]={score:e,start:n,end:n+h}}}return n?u.filter((t=>Tn(t.start,t.end,n.start,n.end))):u}async readFeatures(t,e,n={}){try{const{blockType:r,isCompressed:i}=this,{signal:s,request:a}=n,o=function(t){t.sort(((t,e)=>t.offset-e.offset));const e=[];let n,r;for(const i of t)n&&r&&i.offset-r<=2e3?(n.length=n.length+i.length-r+i.offset,n.blocks.push(i)):e.push(n={blocks:[i],length:i.length,offset:i.offset}),r=n.offset+n.length;return e}(e);On(s),await Promise.all(o.map((async e=>{On(s);const{length:n,offset:o}=e,h=await this.featureCache.get(`${n}_${o}`,e,s);for(const n of e.blocks){On(s);let o=Number(n.offset)-Number(e.offset),f=h;switch(i&&(l=h.subarray(o),f=In(l.subarray(2)),o=0),On(s),r){case"summary":t.next(this.parseSummaryBlock(f,o,a));break;case"bigwig":t.next(this.parseBigWigBlock(f,o,a));break;case"bigbed":t.next(this.parseBigBedBlock(f,o,256*Number(n.offset),a));break;default:console.warn(`Don't know what to do with ${r}`)}}var l}))),t.complete()}catch(e){t.error(e)}}}var Nn=n(45834),Dn=n(89592),Cn=n(44728),Zn=n(82088);const Fn=-2003829722,Pn=-2021002517;class Mn{getHeader(t){return this.headerP||(this.headerP=this._getHeader(t).catch((t=>{throw this.headerP=void 0,t}))),this.headerP}constructor(t){const{filehandle:e,renameRefSeqs:n=t=>t,path:r,url:i}=t;if(this.renameRefSeqs=n,e)this.bbi=e;else if(i)this.bbi=new Nn.Tx(i);else{if(!r)throw new Error("no file given");this.bbi=new Nn.EY(r)}}async _getHeader(t){const e=await this._getMainHeader(t),n=await this._readChromTree(e,t);return{...e,...n}}async _getMainHeader(t,e=2e3){const n=!0,{buffer:r}=await this.bbi.read(i.hp.alloc(e),0,e,0,t),s=this._isBigEndian(r),a=r,o=new DataView(a.buffer,a.byteOffset,a.length);let h=0;const l=o.getInt32(h,n);h+=4;const f=o.getUint16(h,n);h+=2;const u=o.getUint16(h,n);h+=2;const c=Number(o.getBigUint64(h,n));h+=8;const d=Number(o.getBigUint64(h,n));h+=8;const g=Number(o.getBigUint64(h,n));h+=8;const _=o.getUint16(h,n);h+=2;const p=o.getUint16(h,n);h+=2;const w=Number(o.getBigUint64(h,n));h+=8;const b=Number(o.getBigUint64(h,n));h+=8;const m=o.getUint32(h,n);h+=4;const y=Number(o.getBigUint64(h,n));h+=8;const k=[];for(let t=0;t<u;t++){const t=o.getUint32(h,n);h+=4;const e=o.getUint32(h,n);h+=4;const r=Number(o.getBigUint64(h,n));h+=8;const i=Number(o.getBigUint64(h,n));h+=8,k.push({reductionLevel:t,reserved:e,dataOffset:r,indexOffset:i})}const v=l===Pn?"bigbed":"bigwig";if(w>e||b>e-40)return this._getMainHeader(t,2*e);let E;if(!b)throw new Error("no stats");{const t=r.subarray(Number(b));let e=0;const i=new DataView(t.buffer,t.byteOffset,t.length),s=Number(i.getBigUint64(e,n));e+=8;const a=i.getFloat64(e,n);e+=8;const o=i.getFloat64(e,n);e+=8;const h=i.getFloat64(e,n);e+=8;const l=i.getFloat64(e,n);e+=8,E={scoreMin:a,scoreMax:o,scoreSum:h,scoreSumSquares:l,basesCovered:s}}return{zoomLevels:k,magic:l,extHeaderOffset:y,numZoomLevels:u,fieldCount:_,totalSummary:E,definedFieldCount:p,uncompressBufSize:m,asOffset:w,chromTreeOffset:c,totalSummaryOffset:b,unzoomedDataOffset:d,unzoomedIndexOffset:g,fileType:v,version:f,isBigEndian:s,autoSql:w?r.subarray(w,r.indexOf(0,w)).toString():""}}_isBigEndian(t){let e=t.readInt32LE(0);if(e===Fn||e===Pn)return!1;if(e=t.readInt32BE(0),e===Fn||e===Pn)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(t,e){const n=!t.isBigEndian,r=[],s={};let a=t.unzoomedDataOffset;const o=t.chromTreeOffset;for(;a%4!=0;)a+=1;const h=a-o,{buffer:l}=await this.bbi.read(i.hp.alloc(h),0,h,Number(o),e),f=l,u=new DataView(f.buffer,f.byteOffset,f.length);let c=0;c+=4,c+=4;const d=u.getUint32(c,n);c+=4,c+=4,c+=8;const g=async t=>{let e=t;if(e>=l.length)throw new Error("reading beyond end of buffer");const i=u.getUint8(e);e+=2;const a=u.getUint16(e,n);if(e+=2,i)for(let t=0;t<a;t++){const t=l.subarray(e,e+d).toString().replaceAll("\0","");e+=d;const i=u.getUint32(e,n);e+=4;const a=u.getUint32(e,n);e+=4;const o={name:t,id:i,length:a};s[this.renameRefSeqs(t)]=i,r[i]=o}else{const t=[];for(let r=0;r<a;r++){e+=d;const r=Number(u.getBigUint64(e,n));e+=8,t.push(g(Number(r)-Number(o)))}await Promise.all(t)}};return await g(32),{refsByName:s,refsByNumber:r}}async getUnzoomedView(t){const{unzoomedIndexOffset:e,refsByName:n,uncompressBufSize:r,isBigEndian:i,fileType:s}=await this.getHeader(t);return new Ln(this.bbi,n,e,i,r>0,s)}async getFeatureStream(t,e,n,r){await this.getHeader(r);const i=this.renameRefSeqs(t);let s;const{basesPerSpan:a,scale:o}=r||{};return s=a?await this.getView(1/a,r):o?await this.getView(o,r):await this.getView(1,r),new Dn.c((t=>{s.readWigData(i,e,n,t,r).catch((e=>{t.error(e)}))}))}async getFeatures(t,e,n,r){const i=await this.getFeatureStream(t,e,n,r);return(await(0,Cn._)(i.pipe((0,Zn.$)()))).flat()}}class $n extends Mn{async getView(t,e){const{zoomLevels:n,refsByName:r,isBigEndian:i,uncompressBufSize:s}=await this.getHeader(e),a=1/t;for(let t=n.length-1;t>=0;t-=1){const e=n[t];if(e&&e.reductionLevel<=2*a)return new Ln(this.bbi,r,e.indexOffset,i,s>0,"summary")}return this.getUnzoomedView(e)}}var jn=n(62718),Hn=n(69652),Vn=n(34796);class Yn extends Mn{constructor(){super(...arguments),this.readIndicesCache=new s.A({cache:new(o())({maxSize:1}),fill:(t,e)=>this._readIndices({...t,signal:e})})}readIndices(t={}){const{signal:e,...n}=t;return this.readIndicesCache.get(JSON.stringify(n),t,e)}async getView(t,e){return this.getUnzoomedView(e)}async _readIndices(t){const{extHeaderOffset:e,isBigEndian:n}=await this.getHeader(t),{buffer:r}=await this.bbi.read(i.hp.alloc(64),0,64,Number(e)),s=!n,a=r,o=new DataView(a.buffer,a.byteOffset,a.length);let h=0;h+=2;const l=o.getUint16(h,s);h+=2;const f=Number(o.getBigUint64(h,s));if(h+=8,0===l)return[];const u=20*l,{buffer:c}=await this.bbi.read(i.hp.alloc(u),0,u,Number(f)),d=[];for(let t=0;t<l;t+=1){const e=c.subarray(20*t),n=new DataView(e.buffer,e.byteOffset,e.length);let r=0;const i=n.getInt16(r,s);r+=2;const a=n.getInt16(r,s);r+=2;const o=Number(n.getBigUint64(r,s));r+=12;const h=n.getInt16(r,s);d.push({type:i,fieldcount:a,offset:Number(o),field:h})}return d}async searchExtraIndexBlocks(t,e={}){const{isBigEndian:n}=await this.getHeader(e),r=await this.readIndices(e);if(0===r.length)return[];const s=r.map((async r=>{const{offset:s,field:a}=r,{buffer:o}=await this.bbi.read(i.hp.alloc(32),0,32,s,e),h=!n,l=o,f=new DataView(l.buffer,l.byteOffset,l.length);let u=0;u+=4;const c=f.getInt32(u,h);u+=4;const d=f.getInt32(u,h);u+=4;const g=f.getInt32(u,h);u+=4,u+=8;const _=async n=>{const r=Number(n),s=4+c*(d+g),{buffer:o}=await this.bbi.read(i.hp.alloc(s),0,s,r,e),l=o,f=new DataView(l.buffer,l.byteOffset,l.length);let u=0;const p=f.getInt8(u);u+=2;const w=f.getInt16(u,h);u+=2;const b=[];if(0===p){const e=[];for(let t=0;t<w;t++){const t=l.subarray(u,u+d).toString().replaceAll("\0","");u+=d;const n=Number(f.getBigUint64(u,h));u+=8,e.push({key:t,offset:n})}let n=0;for(const{key:r,offset:i}of e){if(t.localeCompare(r)<0&&n)return _(n);n=i}return _(n)}if(1!==p);else{for(let t=0;t<w;t++){const t=l.subarray(u,u+d).toString().replaceAll("\0","");u+=d;const e=Number(f.getBigUint64(u,h));u+=8;const n=f.getUint32(u,h);u+=4;const r=f.getUint32(u,h);u+=4,b.push({key:t,offset:e,length:n,reserved:r})}for(const e of b)if(e.key===t)return{...e,field:a}}};return _(s+32)}));return(await Promise.all(s)).filter((t=>!!t))}async searchExtraIndex(t,e={}){const n=await this.searchExtraIndexBlocks(t,e);if(0===n.length)return[];const r=await this.getUnzoomedView(e),i=n.map((t=>new Dn.c((n=>{r.readFeatures(n,[t],e).catch((t=>{n.error(t)}))})).pipe((0,Hn.T)(((t,e)=>t.concat(e))),(0,Vn.T)((e=>{for(const n of e)n.field=t.field;return e})))));return(await(0,Cn._)((0,jn.h)(...i))).filter((e=>{var n;return(null===(n=e.rest)||void 0===n?void 0:n.split("\t")[(e.field||0)-3])===t}))}}},26094:(t,e,n)=>{const r=n(47130),i=n(96607),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=h,e.IS=50;const a=2147483647;function o(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,h.prototype),e}function h(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return l(t,e,n)}function l(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!h.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|_(t,e);let r=o(n);const i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(G(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(G(t,ArrayBuffer)||t&&G(t.buffer,ArrayBuffer))return d(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(G(t,SharedArrayBuffer)||t&&G(t.buffer,SharedArrayBuffer)))return d(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return h.from(r,e,n);const i=function(t){if(h.isBuffer(t)){const e=0|g(t.length),n=o(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||W(t.length)?o(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return h.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return f(t),o(t<0?0:0|g(t))}function c(t){const e=t.length<0?0:0|g(t.length),n=o(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function d(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,h.prototype),r}function g(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function _(t,e){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||G(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(i)return r?-1:Y(t).length;e=(""+e).toLowerCase(),i=!0}}function p(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,n);case"utf8":case"utf-8":return U(this,e,n);case"ascii":return z(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return B(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function w(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),W(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=h.from(e,r)),h.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){let s,a=1,o=t.length,h=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,o/=2,h/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let r=-1;for(s=n;s<o;s++)if(l(t,s)===l(e,-1===r?0:s-r)){if(-1===r&&(r=s),s-r+1===h)return r*a}else-1!==r&&(s-=s-r),r=-1}else for(n+h>o&&(n=o-h),s=n;s>=0;s--){let n=!0;for(let r=0;r<h;r++)if(l(t,s+r)!==l(e,r)){n=!1;break}if(n)return s}return-1}function y(t,e,n,r){n=Number(n)||0;const i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;const s=e.length;let a;for(r>s/2&&(r=s/2),a=0;a<r;++a){const r=parseInt(e.substr(2*a,2),16);if(W(r))return a;t[n+a]=r}return a}function k(t,e,n,r){return K(Y(e,t.length-n),t,n,r)}function v(t,e,n,r){return K(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function E(t,e,n,r){return K(q(e),t,n,r)}function x(t,e,n,r){return K(function(t,e){let n,r,i;const s=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,s.push(i),s.push(r);return s}(e,t.length-n),t,n,r)}function B(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function U(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i<n;){const e=t[i];let s=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=n){let n,r,o,h;switch(a){case 1:e<128&&(s=e);break;case 2:n=t[i+1],128==(192&n)&&(h=(31&e)<<6|63&n,h>127&&(s=h));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(h=(15&e)<<12|(63&n)<<6|63&r,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:n=t[i+1],r=t[i+2],o=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&o)&&(h=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&o,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return function(t){const e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=A));return n}(r)}h.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),h.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(t,e,n){return l(t,e,n)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(t,e,n){return function(t,e,n){return f(t),t<=0?o(t):void 0!==e?"string"==typeof n?o(t).fill(e,n):o(t).fill(e):o(t)}(t,e,n)},h.allocUnsafe=function(t){return u(t)},h.allocUnsafeSlow=function(t){return u(t)},h.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==h.prototype},h.compare=function(t,e){if(G(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),G(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let i=0,s=Math.min(n,r);i<s;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},h.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=h.allocUnsafe(e);let i=0;for(n=0;n<t.length;++n){let e=t[n];if(G(e,Uint8Array))i+e.length>r.length?(h.isBuffer(e)||(e=h.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!h.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},h.byteLength=_,h.prototype._isBuffer=!0,h.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)w(this,e,e+1);return this},h.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)w(this,e,e+3),w(this,e+1,e+2);return this},h.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)w(this,e,e+7),w(this,e+1,e+6),w(this,e+2,e+5),w(this,e+3,e+4);return this},h.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?U(this,0,t):p.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){let t="";const n=e.IS;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},s&&(h.prototype[s]=h.prototype.inspect),h.prototype.compare=function(t,e,n,r,i){if(G(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let s=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0);const o=Math.min(s,a),l=this.slice(r,i),f=t.slice(e,n);for(let t=0;t<o;++t)if(l[t]!==f[t]){s=l[t],a=f[t];break}return s<a?-1:a<s?1:0},h.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},h.prototype.indexOf=function(t,e,n){return b(this,t,e,n,!0)},h.prototype.lastIndexOf=function(t,e,n){return b(this,t,e,n,!1)},h.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let s=!1;for(;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return k(this,t,e,n);case"ascii":case"latin1":case"binary":return v(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function z(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function R(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=e;r<n;++r)i+=X[t[r]];return i}function O(t,e,n){const r=t.slice(e,n);let i="";for(let t=0;t<r.length-1;t+=2)i+=String.fromCharCode(r[t]+256*r[t+1]);return i}function S(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,n,r,i,s){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function L(t,e,n,r,i){$(e,r,i,t,n,7);let s=Number(e&BigInt(4294967295));t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function N(t,e,n,r,i){$(e,r,i,t,n,7);let s=Number(e&BigInt(4294967295));t[n+7]=s,s>>=8,t[n+6]=s,s>>=8,t[n+5]=s,s>>=8,t[n+4]=s;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function D(t,e,n,r,i,s){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function C(t,e,n,r,s){return e=+e,n>>>=0,s||D(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function Z(t,e,n,r,s){return e=+e,n>>>=0,s||D(t,0,n,8),i.write(t,e,n,r,52,8),n+8}h.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,h.prototype),r},h.prototype.readUintLE=h.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||S(t,e,this.length);let r=this[t],i=1,s=0;for(;++s<e&&(i*=256);)r+=this[t+s]*i;return r},h.prototype.readUintBE=h.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||S(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},h.prototype.readUint8=h.prototype.readUInt8=function(t,e){return t>>>=0,e||S(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||S(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readBigUInt64LE=J((function(t){j(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),h.prototype.readBigUInt64BE=J((function(t){j(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),h.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||S(t,e,this.length);let r=this[t],i=1,s=0;for(;++s<e&&(i*=256);)r+=this[t+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},h.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||S(t,e,this.length);let r=e,i=1,s=this[t+--r];for(;r>0&&(i*=256);)s+=this[t+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*e)),s},h.prototype.readInt8=function(t,e){return t>>>=0,e||S(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){t>>>=0,e||S(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(t,e){t>>>=0,e||S(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return t>>>=0,e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readBigInt64LE=J((function(t){j(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),h.prototype.readBigInt64BE=J((function(t){j(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),h.prototype.readFloatLE=function(t,e){return t>>>=0,e||S(t,4,this.length),i.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||S(t,4,this.length),i.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||S(t,8,this.length),i.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||S(t,8,this.length),i.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||T(this,t,e,n,Math.pow(2,8*n)-1,0);let i=1,s=0;for(this[e]=255&t;++s<n&&(i*=256);)this[e+s]=t/i&255;return e+n},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||T(this,t,e,n,Math.pow(2,8*n)-1,0);let i=n-1,s=1;for(this[e+i]=255&t;--i>=0&&(s*=256);)this[e+i]=t/s&255;return e+n},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,255,0),this[e]=255&t,e+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeBigUInt64LE=J((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),h.prototype.writeBigUInt64BE=J((function(t,e=0){return N(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),h.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);T(this,t,e,n,r-1,-r)}let i=0,s=1,a=0;for(this[e]=255&t;++i<n&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s|0)-a&255;return e+n},h.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);T(this,t,e,n,r-1,-r)}let i=n-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s|0)-a&255;return e+n},h.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},h.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeBigInt64LE=J((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),h.prototype.writeBigInt64BE=J((function(t,e=0){return N(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),h.prototype.writeFloatLE=function(t,e,n){return C(this,t,e,!0,n)},h.prototype.writeFloatBE=function(t,e,n){return C(this,t,e,!1,n)},h.prototype.writeDoubleLE=function(t,e,n){return Z(this,t,e,!0,n)},h.prototype.writeDoubleBE=function(t,e,n){return Z(this,t,e,!1,n)},h.prototype.copy=function(t,e,n,r){if(!h.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},h.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!h.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{const s=h.isBuffer(t)?t:h.from(t,r),a=s.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=s[i%a]}return this};const F={};function P(t,e,n){F[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function M(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function $(t,e,n,r,i,s){if(t>n||t<e){const r="bigint"==typeof e?"n":"";let i;throw i=s>3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(s+1)}${r}`:`>= -(2${r} ** ${8*(s+1)-1}${r}) and < 2 ** ${8*(s+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){j(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||H(e,t.length-(n+1))}(r,i,s)}function j(t,e){if("number"!=typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,n){if(Math.floor(t)!==t)throw j(t,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}P("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),P("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),P("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=M(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=M(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function Y(t,e){let n;e=e||1/0;const r=t.length;let i=null;const s=[];for(let a=0;a<r;++a){if(n=t.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;s.push(n)}else if(n<2048){if((e-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function q(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,n,r){let i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function G(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function W(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}}}]); //# sourceMappingURL=3902.69c7ff0c.chunk.js.map