@genome-spy/app 0.43.2 → 0.43.3

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 (3) hide show
  1. package/dist/index.es.js +1043 -1034
  2. package/dist/index.js +89 -86
  3. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(me,_e){typeof exports=="object"&&typeof module<"u"?_e(exports):typeof define=="function"&&define.amd?define(["exports"],_e):(me=typeof globalThis<"u"?globalThis:me||self,_e(me.genomeSpyApp={}))})(this,function(me){"use strict";var cee=Object.defineProperty;var lee=(me,_e,De)=>_e in me?cee(me,_e,{enumerable:!0,configurable:!0,writable:!0,value:De}):me[_e]=De;var zn=(me,_e,De)=>(lee(me,typeof _e!="symbol"?_e+"":_e,De),De),Y2=(me,_e,De)=>{if(!_e.has(me))throw TypeError("Cannot "+De)};var F=(me,_e,De)=>(Y2(me,_e,"read from private field"),De?De.call(me):_e.get(me)),Z=(me,_e,De)=>{if(_e.has(me))throw TypeError("Cannot add the same private member more than once");_e instanceof WeakSet?_e.add(me):_e.set(me,De)},le=(me,_e,De,Vo)=>(Y2(me,_e,"write to private field"),Vo?Vo.call(me,De):_e.set(me,De),De);var UT=(me,_e,De,Vo)=>({set _(Bf){le(me,_e,Bf,De)},get _(){return F(me,_e,Vo)}}),J=(me,_e,De)=>(Y2(me,_e,"access private method"),De);var tf,W0,HT,Y0,GT,nf,Z2,rf,Q2,af,X2,lc,of,sf,Po,Tf,cf,K2,ai,uc,Ot,Dr,ya,Z0,VT,fc,yp,oi,Ho,lf,J2,Q0,jT,V2,uee,uf,ev,hc,ff,dc,pc,Mo,hf,df,pf,si,gc,mc,vn,Oo,bc,ci,Go,X0,qT,Lo,If,gf,tv,mf,nv,bf,rv,K0,WT,yc,vp,J0,YT,vc,wc,No,yf,zo,_T,xc,li,la,vf,ep,ZT,tp,QT,wf,iv,np,XT,et,rp,KT,ip,JT,ap,eI,op,tI,Uo,Df,sp,nI,cp,rI,Ln,ua,$o,Ac,Ec,ui,Sc,It,xf,Af,av,ot,Ht,Ef,_c,lp,iI,up,aI,fp,oI,Sf,ov,hp,sI,dp,cI,pp,lI,_f,Cf,sv;function _e(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function De(e,t,n){return e.fields=t||[],e.fname=n,e}function Vo(e){return e==null?null:e.fname}function Bf(e){return e==null?null:e.fields}function uI(e){return e.length===1?fI(e[0]):hI(e)}const fI=e=>function(t){return t[e]},hI=e=>{const t=e.length;return function(n){for(let r=0;r<t;++r)n=n[e[r]];return n}};function it(e){throw Error(e)}function dI(e){const t=[],n=e.length;let r=null,i=0,a="",o,s,c;e=e+"";function l(){t.push(a+e.substring(o,s)),a="",o=s+1}for(o=s=0;s<n;++s)if(c=e[s],c==="\\")a+=e.substring(o,s),a+=e.substring(++s,++s),o=s;else if(c===r)l(),r=null,i=-1;else{if(r)continue;o===i&&c==='"'||o===i&&c==="'"?(o=s+1,r=c):c==="."&&!i?s>o?l():o=s+1:c==="["?(s>o&&l(),i=o=s+1):c==="]"&&(i||it("Access path missing open bracket: "+e),i>0&&l(),i=0,o=s+1)}return i&&it("Access path missing closing bracket: "+e),r&&it("Access path missing closing quote: "+e),s>o&&(s++,l()),t}function Ff(e,t,n){const r=dI(e);return e=r.length===1?r[0]:e,De((n&&n.get||uI)(r),[e],t||e)}Ff("id");const Pf=De(e=>e,[],"identity");De(()=>0,[],"zero"),De(()=>1,[],"one"),De(()=>!0,[],"true"),De(()=>!1,[],"false");var Qt=Array.isArray;function Xt(e){return e===Object(e)}function Un(e){return e[e.length-1]}function Cc(e){return e==null||e===""?null:+e}const cv=e=>t=>e*Math.exp(t),lv=e=>t=>Math.log(e*t),pI=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),gI=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,Mf=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function wp(e,t,n,r){const i=n(e[0]),a=n(Un(e)),o=(a-i)*t;return[r(i-o),r(a-o)]}function mI(e,t){return wp(e,t,Cc,Pf)}function bI(e,t){var n=Math.sign(e[0]);return wp(e,t,lv(n),cv(n))}function yI(e,t,n){return wp(e,t,Mf(n),Mf(1/n))}function Of(e,t,n,r,i){const a=r(e[0]),o=r(Un(e)),s=t!=null?r(t):(a+o)/2;return[i(s+(a-s)*n),i(s+(o-s)*n)]}function xp(e,t,n){return Of(e,t,n,Cc,Pf)}function uv(e,t,n){const r=Math.sign(e[0]);return Of(e,t,n,lv(r),cv(r))}function Ap(e,t,n,r){return Of(e,t,n,Mf(r),Mf(1/r))}function vI(e,t,n,r){return Of(e,t,n,pI(r),gI(r))}function Ep(e){return e!=null?Qt(e)?e:[e]:[]}function wI(e,t,n){let r=e[0],i=e[1],a;return i<r&&(a=i,i=r,r=a),a=i-r,a>=n-t?[t,n]:[r=Math.min(Math.max(r,t),n-a),r+a]}function Kt(e){return typeof e=="function"}const xI="descending";function fv(e,t,n){n=n||{},t=Ep(t)||[];const r=[],i=[],a={},o=n.comparator||AI;return Ep(e).forEach((s,c)=>{s!=null&&(r.push(t[c]===xI?-1:1),i.push(s=Kt(s)?s:Ff(s,null,n)),(Bf(s)||[]).forEach(l=>a[l]=1))}),i.length===0?null:De(o(i,r),Object.keys(a))}const hv=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),AI=(e,t)=>e.length===1?EI(e[0],t[0]):SI(e,t,e.length),EI=(e,t)=>function(n,r){return hv(e(n),e(r))*t},SI=(e,t,n)=>(t.push(0),function(r,i){let a,o=0,s=-1;for(;o===0&&++s<n;)a=e[s],o=hv(a(r),a(i));return o*t[s]});function _I(e){return Kt(e)?e:()=>e}function Sp(e){for(let t,n,r=1,i=arguments.length;r<i;++r){t=arguments[r];for(n in t)e[n]=t[n]}return e}const CI=Object.prototype.hasOwnProperty;function va(e,t){return CI.call(e,t)}function kc(e){return typeof e=="boolean"}function kI(e){return Object.prototype.toString.call(e)==="[object Date]"}function TI(e){return e&&Kt(e[Symbol.iterator])}function ft(e){return typeof e=="number"}function II(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Me(e){return typeof e=="string"}function dv(e,t){const n=e[0],r=Un(e),i=+t;return i?i===1?r:n+i*(r-n):n}function Lf(e){return e&&Un(e)-e[0]||0}function Nf(e){return Qt(e)?"["+e.map(Nf)+"]":Xt(e)||Me(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function RI(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const DI=e=>ft(e)||kI(e)?e:Date.parse(e);function BI(e,t){return t=t||DI,e==null||e===""?null:t(e)}function FI(e){return e==null||e===""?null:e+""}function zf(e){const t={},n=e.length;for(let r=0;r<n;++r)t[e[r]]=!0;return t}var pv={},_p={},Cp=34,Tc=10,kp=13;function gv(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function PI(e,t){var n=gv(e);return function(r,i){return t(n(r),i,e)}}function mv(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function Jt(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function MI(e){return e<0?"-"+Jt(-e,6):e>9999?"+"+Jt(e,6):Jt(e,4)}function OI(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":MI(e.getUTCFullYear())+"-"+Jt(e.getUTCMonth()+1,2)+"-"+Jt(e.getUTCDate(),2)+(i?"T"+Jt(t,2)+":"+Jt(n,2)+":"+Jt(r,2)+"."+Jt(i,3)+"Z":r?"T"+Jt(t,2)+":"+Jt(n,2)+":"+Jt(r,2)+"Z":n||t?"T"+Jt(t,2)+":"+Jt(n,2)+"Z":"")}function bv(e){var t=new RegExp('["'+e+`
1
+ (function(me,_e){typeof exports=="object"&&typeof module<"u"?_e(exports):typeof define=="function"&&define.amd?define(["exports"],_e):(me=typeof globalThis<"u"?globalThis:me||self,_e(me.genomeSpyApp={}))})(this,function(me){"use strict";var lee=Object.defineProperty;var uee=(me,_e,De)=>_e in me?lee(me,_e,{enumerable:!0,configurable:!0,writable:!0,value:De}):me[_e]=De;var zn=(me,_e,De)=>(uee(me,typeof _e!="symbol"?_e+"":_e,De),De),Y2=(me,_e,De)=>{if(!_e.has(me))throw TypeError("Cannot "+De)};var F=(me,_e,De)=>(Y2(me,_e,"read from private field"),De?De.call(me):_e.get(me)),Z=(me,_e,De)=>{if(_e.has(me))throw TypeError("Cannot add the same private member more than once");_e instanceof WeakSet?_e.add(me):_e.set(me,De)},le=(me,_e,De,Vo)=>(Y2(me,_e,"write to private field"),Vo?Vo.call(me,De):_e.set(me,De),De);var UT=(me,_e,De,Vo)=>({set _(Bf){le(me,_e,Bf,De)},get _(){return F(me,_e,Vo)}}),J=(me,_e,De)=>(Y2(me,_e,"access private method"),De);var tf,W0,HT,Y0,GT,nf,Z2,rf,Q2,af,X2,lc,of,sf,Po,Tf,cf,K2,ai,uc,Ot,Dr,ya,Z0,VT,fc,yp,oi,Ho,lf,J2,Q0,jT,V2,fee,uf,ev,hc,ff,dc,pc,Mo,hf,df,pf,si,gc,mc,vn,Oo,bc,ci,Go,X0,qT,Lo,If,gf,tv,mf,nv,bf,rv,K0,WT,yc,vp,J0,YT,vc,wc,No,yf,zo,_T,xc,li,la,vf,ep,ZT,tp,QT,wf,iv,np,XT,et,rp,KT,ip,JT,ap,eI,op,tI,Uo,Df,sp,nI,cp,rI,Ln,ua,$o,Ac,Ec,ui,Sc,It,xf,Af,av,ot,Ht,Ef,_c,lp,iI,up,aI,fp,oI,Sf,ov,hp,sI,dp,cI,pp,lI,_f,Cf,sv;function _e(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function De(e,t,n){return e.fields=t||[],e.fname=n,e}function Vo(e){return e==null?null:e.fname}function Bf(e){return e==null?null:e.fields}function uI(e){return e.length===1?fI(e[0]):hI(e)}const fI=e=>function(t){return t[e]},hI=e=>{const t=e.length;return function(n){for(let r=0;r<t;++r)n=n[e[r]];return n}};function it(e){throw Error(e)}function dI(e){const t=[],n=e.length;let r=null,i=0,a="",o,s,c;e=e+"";function l(){t.push(a+e.substring(o,s)),a="",o=s+1}for(o=s=0;s<n;++s)if(c=e[s],c==="\\")a+=e.substring(o,s),a+=e.substring(++s,++s),o=s;else if(c===r)l(),r=null,i=-1;else{if(r)continue;o===i&&c==='"'||o===i&&c==="'"?(o=s+1,r=c):c==="."&&!i?s>o?l():o=s+1:c==="["?(s>o&&l(),i=o=s+1):c==="]"&&(i||it("Access path missing open bracket: "+e),i>0&&l(),i=0,o=s+1)}return i&&it("Access path missing closing bracket: "+e),r&&it("Access path missing closing quote: "+e),s>o&&(s++,l()),t}function Ff(e,t,n){const r=dI(e);return e=r.length===1?r[0]:e,De((n&&n.get||uI)(r),[e],t||e)}Ff("id");const Pf=De(e=>e,[],"identity");De(()=>0,[],"zero"),De(()=>1,[],"one"),De(()=>!0,[],"true"),De(()=>!1,[],"false");var Qt=Array.isArray;function Xt(e){return e===Object(e)}function Un(e){return e[e.length-1]}function Cc(e){return e==null||e===""?null:+e}const cv=e=>t=>e*Math.exp(t),lv=e=>t=>Math.log(e*t),pI=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),gI=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,Mf=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function wp(e,t,n,r){const i=n(e[0]),a=n(Un(e)),o=(a-i)*t;return[r(i-o),r(a-o)]}function mI(e,t){return wp(e,t,Cc,Pf)}function bI(e,t){var n=Math.sign(e[0]);return wp(e,t,lv(n),cv(n))}function yI(e,t,n){return wp(e,t,Mf(n),Mf(1/n))}function Of(e,t,n,r,i){const a=r(e[0]),o=r(Un(e)),s=t!=null?r(t):(a+o)/2;return[i(s+(a-s)*n),i(s+(o-s)*n)]}function xp(e,t,n){return Of(e,t,n,Cc,Pf)}function uv(e,t,n){const r=Math.sign(e[0]);return Of(e,t,n,lv(r),cv(r))}function Ap(e,t,n,r){return Of(e,t,n,Mf(r),Mf(1/r))}function vI(e,t,n,r){return Of(e,t,n,pI(r),gI(r))}function Ep(e){return e!=null?Qt(e)?e:[e]:[]}function wI(e,t,n){let r=e[0],i=e[1],a;return i<r&&(a=i,i=r,r=a),a=i-r,a>=n-t?[t,n]:[r=Math.min(Math.max(r,t),n-a),r+a]}function Kt(e){return typeof e=="function"}const xI="descending";function fv(e,t,n){n=n||{},t=Ep(t)||[];const r=[],i=[],a={},o=n.comparator||AI;return Ep(e).forEach((s,c)=>{s!=null&&(r.push(t[c]===xI?-1:1),i.push(s=Kt(s)?s:Ff(s,null,n)),(Bf(s)||[]).forEach(l=>a[l]=1))}),i.length===0?null:De(o(i,r),Object.keys(a))}const hv=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),AI=(e,t)=>e.length===1?EI(e[0],t[0]):SI(e,t,e.length),EI=(e,t)=>function(n,r){return hv(e(n),e(r))*t},SI=(e,t,n)=>(t.push(0),function(r,i){let a,o=0,s=-1;for(;o===0&&++s<n;)a=e[s],o=hv(a(r),a(i));return o*t[s]});function _I(e){return Kt(e)?e:()=>e}function Sp(e){for(let t,n,r=1,i=arguments.length;r<i;++r){t=arguments[r];for(n in t)e[n]=t[n]}return e}const CI=Object.prototype.hasOwnProperty;function va(e,t){return CI.call(e,t)}function kc(e){return typeof e=="boolean"}function kI(e){return Object.prototype.toString.call(e)==="[object Date]"}function TI(e){return e&&Kt(e[Symbol.iterator])}function ft(e){return typeof e=="number"}function II(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Me(e){return typeof e=="string"}function dv(e,t){const n=e[0],r=Un(e),i=+t;return i?i===1?r:n+i*(r-n):n}function Lf(e){return e&&Un(e)-e[0]||0}function Nf(e){return Qt(e)?"["+e.map(Nf)+"]":Xt(e)||Me(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function RI(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const DI=e=>ft(e)||kI(e)?e:Date.parse(e);function BI(e,t){return t=t||DI,e==null||e===""?null:t(e)}function FI(e){return e==null||e===""?null:e+""}function zf(e){const t={},n=e.length;for(let r=0;r<n;++r)t[e[r]]=!0;return t}var pv={},_p={},Cp=34,Tc=10,kp=13;function gv(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function PI(e,t){var n=gv(e);return function(r,i){return t(n(r),i,e)}}function mv(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function Jt(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function MI(e){return e<0?"-"+Jt(-e,6):e>9999?"+"+Jt(e,6):Jt(e,4)}function OI(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":MI(e.getUTCFullYear())+"-"+Jt(e.getUTCMonth()+1,2)+"-"+Jt(e.getUTCDate(),2)+(i?"T"+Jt(t,2)+":"+Jt(n,2)+":"+Jt(r,2)+"."+Jt(i,3)+"Z":r?"T"+Jt(t,2)+":"+Jt(n,2)+":"+Jt(r,2)+"Z":n||t?"T"+Jt(t,2)+":"+Jt(n,2)+"Z":"")}function bv(e){var t=new RegExp('["'+e+`
2
2
  \r]`),n=e.charCodeAt(0);function r(f,h){var d,p,g=i(f,function(b,y){if(d)return d(b,y-1);p=b,d=h?PI(b,h):gv(b)});return g.columns=p||[],g}function i(f,h){var d=[],p=f.length,g=0,b=0,y,w=p<=0,A=!1;f.charCodeAt(p-1)===Tc&&--p,f.charCodeAt(p-1)===kp&&--p;function x(){if(w)return _p;if(A)return A=!1,pv;var _,I=g,D;if(f.charCodeAt(I)===Cp){for(;g++<p&&f.charCodeAt(g)!==Cp||f.charCodeAt(++g)===Cp;);return(_=g)>=p?w=!0:(D=f.charCodeAt(g++))===Tc?A=!0:D===kp&&(A=!0,f.charCodeAt(g)===Tc&&++g),f.slice(I+1,_-1).replace(/""/g,'"')}for(;g<p;){if((D=f.charCodeAt(_=g++))===Tc)A=!0;else if(D===kp)A=!0,f.charCodeAt(g)===Tc&&++g;else if(D!==n)continue;return f.slice(I,_)}return w=!0,f.slice(I,p)}for(;(y=x())!==_p;){for(var C=[];y!==pv&&y!==_p;)C.push(y),y=x();h&&(C=h(C,b++))==null||d.push(C)}return d}function a(f,h){return f.map(function(d){return h.map(function(p){return u(d[p])}).join(e)})}function o(f,h){return h==null&&(h=mv(f)),[h.map(u).join(e)].concat(a(f,h)).join(`
3
3
  `)}function s(f,h){return h==null&&(h=mv(f)),a(f,h).join(`
4
4
  `)}function c(f){return f.map(l).join(`
@@ -1691,33 +1691,36 @@ void main() {
1691
1691
  * All rights reserved.
1692
1692
  *
1693
1693
  * BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
1694
- */const pN="locus",gN="index";var mN=5;function bN(e){const t=e.type;return!e.bins&&(t===es||t===pl||t===gl)}function iE(e){return _t(e)&&![dr,gN,pN].includes(e)}function aE(e){return e||{warn:(t,...n)=>console.warn(t,...n)}}var yN=zf(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma","zoom","fp64","name"]);function oE(e,t,n){n=aE(n);for(const r in e)if(!yN[r]){if(r==="padding"&&iE(t.type))continue;Kt(t[r])?t[r](e[r]):n.warn("Unsupported scale property: "+r)}CN(t,e,_N(t,e,AN(t,e,n)))}function vN(e,t){const n=wN(e),r=ke(n);if(!r)throw new Error("Unknown scale type: "+n);const i=r();return!e.domain&&_t(i.type)&&(e.domain=[0,0]),oE(e,i,t),i}function wN(e){var t=e.type,n="",r;return t===dr?dr+"-"+es:(xN(e)&&(r=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=r===2?dr+"-":r===3?ts+"-":""),(n+t||es).toLowerCase())}function xN(e){const t=e.type;return _t(t)&&t!==Kx&&t!==Jx&&(e.scheme||e.range&&e.range.length&&e.range.every(Me))}function AN(e,t,n){if(!e.domain)return 0;n=aE(n);var r=EN(e,t.domainRaw,n);if(r>-1)return r;var i=t.domain,a=e.type,o=t.zero||t.zero===void 0&&bN(e),s,c;return i?(iE(a)&&t.padding&&i[0]!==Un(i)&&(i=SN(a,i,t.range,t.padding,t.exponent,t.constant)),(o||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(s=(i=i.slice()).length-1||1,o&&(i[0]>0&&(i[0]=0),i[s]<0&&(i[s]=0)),t.domainMin!=null&&(i[0]=t.domainMin),t.domainMax!=null&&(i[s]=t.domainMax),t.domainMid!=null&&(c=t.domainMid,(c<i[0]||c>i[s])&&n.warn("Scale domainMid exceeds domain min or max.",c),i.splice(s,0,c))),e.domain(sE(a,i,n)),a===Yg&&e.unknown(t.domainImplicit?gg:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&nE(e,t.nice)||null),i.length):0}function EN(e,t,n){return t?(e.domain(sE(e.type,t,n)),t.length):-1}function SN(e,t,n,r,i,a){var o=Math.abs(Un(n)-n[0]),s=o/(o-2*r),c=e===Ti?uv(t,null,s):e===gl?Ap(t,null,s,.5):e===pl?Ap(t,null,s,i||1):e===Ah?vI(t,null,s,a||1):xp(t,null,s);return t=t.slice(),t[0]=c[0],t[t.length-1]=c[1],t}function sE(e,t,n){if(o3(e)){var r=Math.abs(t.reduce(function(i,a){return i+(a<0?-1:a>0?1:0)},0));r!==t.length&&n.warn("Log scale domain includes zero: "+Nf(t))}return t}function _N(e,t,n){let r=t.bins;if(r&&!Qt(r)){const i=(r.start==null||r.stop==null)&&e.domain(),a=r.start==null?i[0]:r.start,o=r.stop==null?Un(i):r.stop,s=r.step;s||it("Scale bins parameter missing step property."),r=mi(a,o+s,s)}return r?e.bins=r:e.bins&&delete e.bins,e.type===Qg&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function CN(e,t,n){var r=e.type,i=t.round||!1,a=t.range;if(t.rangeStep!=null)a=kN(r,t,n);else if(t.scheme&&(a=TN(r,t,n),Kt(a))){if(e.interpolator)return e.interpolator(a);it(`Scale type ${r} does not support interpolating color schemes.`)}if(a&&Sh(r))return e.interpolator(_h(Gm(a,t.reverse),t.interpolate,t.interpolateGamma));a&&t.interpolate&&e.interpolate?e.interpolate(s3(t.interpolate,t.interpolateGamma)):Kt(e.round)?e.round(i):Kt(e.rangeRound)&&e.interpolate(i?hl:Ci),a&&e.range(Gm(a,t.reverse))}function kN(e,t,n){e!==n3&&e!==Zg&&it("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===Zg?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*qg(n,i,r)]}function TN(e,t,n){var r=t.schemeExtent,i,a;return Qt(t.scheme)?a=_h(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),a=Kg(i),a||it(`Unrecognized scheme name: ${t.scheme}`)),n=e===t3?n+1:e===Qg?n-1:e===Wg||e===e3?+t.schemeCount||mN:n,Sh(e)?cE(a,r,t.reverse):Kt(a)?HB(cE(a,r),n):e===Yg?a:a.slice(0,n)}function cE(e,t,n){return Kt(e)&&(t||n)?$B(e,Gm(t||[0,1],n)):e}function Gm(e,t){return t?e.slice().reverse():e}const Vm=pt(",d");function IN(e){return e.chrom+":"+Vm(Math.floor(e.pos+1))}function lE(e){return!ft(e)&&"chrom"in e?IN(e):""+e}function RN(e,t){return e.chrom+":"+Vm(Math.floor(e.pos+1))+"-"+(e.chrom!=t.chrom?t.chrom+":":"")+Vm(Math.ceil(t.pos))}const DN="https://genomespy.app/data/genomes/";class BN{constructor(t){if(this.config=t,!this.config.contigs&&typeof this.config.name!="string")throw new Error("No name has been defined for the genome assembly!");this.chromosomes=[],this.cumulativeChromPositions=new Map,this.chromosomesByName=new Map,this.startByIndex=[],this.totalSize=0,this.config.contigs&&this.setChromSizes(this.config.contigs)}get name(){return this.config.name}async load(t){if(!this.config.contigs){this.config.baseUrl?this.baseUrl=/^http(s)?/.test(this.config.baseUrl)?this.config.baseUrl:t+"/"+this.config.baseUrl:this.baseUrl=DN;try{this.setChromSizes(FN(await Zc({baseURL:this.baseUrl}).load(`${this.config.name}/${this.name}.chrom.sizes`)))}catch(n){throw new Error(`Could not load chrom sizes: ${n.message}`)}}}hasChrPrefix(){return this.chromosomes.some(t=>t.name.startsWith("chr"))}setChromSizes(t){let n=0;this.startByIndex=[0];for(let r=0;r<t.length;r++){this.startByIndex.push(n);const i=t[r].size,a={...t[r],continuousStart:n,continuousEnd:n+i,continuousInterval:[n,n+i],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(a);const o=a.name.replace(/^chr/i,"");for(const s of["chr"+o,"CHR"+o,"Chr"+o,a.number,""+a.number,o,a.name])this.cumulativeChromPositions.set(s,n),this.chromosomesByName.set(s,a);n+=a.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(t,n){let r=this.cumulativeChromPositions.get(t);if(r===void 0)throw new Error("Unknown chromosome/contig: "+t);return r+ +n}toChromosome(t){if(t>this.totalSize)return;t=Math.floor(t);const n=Pr(this.startByIndex,t)-1;if(n>0&&n<=this.chromosomes.length)return this.chromosomes[n-1]}toChromosomal(t){const n=this.toChromosome(t);if(n)return{chrom:n.name,pos:Math.floor(t)-n.continuousStart}}getChromosome(t){return this.chromosomesByName.get(t)}formatInterval(t){return RN(...this.toChromosomalInterval(t))}toChromosomalInterval(t){const n=this.toChromosomal(t[0]+.5),r=this.toChromosomal(t[1]-.5);return r.pos+=1,[n,r]}toContinuousInterval(t){var i;let[n,r]=t;return r||(r=n),[this.toContinuous(n.chrom,n.pos??0),this.toContinuous(r.chrom,r.pos??((i=this.chromosomesByName.get(r.chrom))==null?void 0:i.size))]}toDiscreteChromosomeIntervals(t){const n=t[0],r=t[1],i=[];if(n.chrom===r.chrom)i.push({chrom:n.chrom,startPos:n.pos,endPos:r.pos});else{const a=this.chromosomes.findIndex(s=>s.name===n.chrom),o=this.chromosomes.findIndex(s=>s.name===r.chrom);i.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[a].size});for(let s=a+1;s<o;s++)i.push({chrom:this.chromosomes[s].name,startPos:0,endPos:this.chromosomes[s].size});i.push({chrom:r.chrom,startPos:0,endPos:r.pos})}return i}continuousToDiscreteChromosomeIntervals(t){return this.toDiscreteChromosomeIntervals([this.toChromosomal(t[0]),this.toChromosomal(t[1])])}parseInterval(t){const n=t.match(/^(chr[0-9A-Z]+)(?::([0-9,]+)(?:-(?:(chr[0-9A-Z]+):)?([0-9,]+))?)?$/);if(n){const r=n[1];if(n.slice(2).every(s=>s===void 0)){const s=this.getChromosome(r);return s?[s.continuousStart,s.continuousEnd]:void 0}const i=n[3]||r,a=parseInt(n[2].replace(/,/g,"")),o=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):a;return[this.toContinuous(r,a-1),this.toContinuous(i,o)]}}}function FN(e){return NI(e).filter(t=>/^chr[0-9A-Z]+$/.test(t[0])).map(([t,n])=>({name:t,size:parseInt(n)}))}function td(e){return Xt(e)&&"chrom"in e}function PN(e){return e.every(td)}class Ml extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof Ml&&t.type!=this.type)throw new Error(`Cannot combine different types of domains: ${this.type} and ${t.type}`);for(const n of t)this.extend(n);return this}extendAllWithAccessor(t,n){for(const r of t)this.extend(n(r));return this}}class jm extends Ml{constructor(){super(),this.type="quantitative"}extend(t){return t==null||Number.isNaN(t)?this:(t=+t,this.length?t<this[0]?this[0]=t:t>this[1]&&(this[1]=t):(this.push(t),this.push(t)),this)}}class uE extends Ml{constructor(){super(),this.type="ordinal",this.uniqueValues=new Set}extend(t){return t==null||Number.isNaN(t)?this:(this.uniqueValues.has(t)||(this.uniqueValues.add(t),this.push(t)),this)}}class fE extends uE{constructor(){super(),this.type="nominal"}}class MN extends Ml{constructor(t){super();let n=0;for(let r=1;r<t.length;r++)n+=Math.sign(t[r]-t[r-1]);if(Math.abs(n)!=t.length-1)throw new Error("Piecewise domain must be strictly increasing or decreasing: "+JSON.stringify(t));t.forEach(r=>this.push(r))}extend(t){if(this.includes(t))return this;throw new Error("Piecewise domains are immutable and cannot be unioned!")}}const hE={quantitative:jm,index:jm,locus:jm,nominal:fE,ordinal:uE};function dE(e,t){if(e=="quantitative"&&ON(t)){const n=new MN(t);return n.type=e,n}else if(hE[e]){const n=new hE[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function ON(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function LN(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function NN(e){return--e*e*e+1}function zN(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function UN(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function $N(e){return 1-UN(e)}function HN(e,t,n){return e*Math.pow(t/e,n)}ke("index",Hm,["continuous"]),ke("locus",aN,["continuous"]),ke("null",Ch,[]);const pE="quantitative",qm="ordinal",Wm="nominal",gE="locus",GN="index";class VN{constructor(t){Z(this,Dr);Z(this,Z0);Z(this,fc);Z(this,oi);Z(this,lf);Z(this,Q0);Z(this,V2);Z(this,uf);Z(this,ai,void 0);Z(this,uc,new Set);Z(this,Ot,void 0);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){if(t!="domain")throw new Error("Unsupported event type: "+t);F(this,uc).add(n)}removeEventListener(t,n){if(t!="domain")throw new Error("Unsupported event type: "+t);F(this,uc).delete(n)}pushUnitView(t,n){var o;const r=Jg(t,n),i=r.type,a=(o=r==null?void 0:r.scale)==null?void 0:o.name;if(a){if(this.name!==void 0&&a!=this.name)throw new Error(`Shared scales have conflicting names: "${a}" vs. "${this.name}"!`);this.name=a}if(!this.type)this.type=i;else if(i!==this.type&&!xl(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${i}. Use "resolve: independent" for channel ${this.channel}`);this.members.push({view:t,channel:n})}isExplicitDomain(){return!!this.getConfiguredDomain()}isDomainInitialized(){const t=F(this,Ot);if(!t)return!1;const n=t.domain();return _t(t.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0}getScaleProps(){return ds(this,"scaleProps",()=>{const t=J(this,Z0,VT).call(this);if(t===null||t.type=="null")return{type:"null"};const n={...J(this,Q0,jT).call(this,this.type),...t};n.type||(n.type=jN(this.channel,this.type));const r=J(this,fc,yp).call(this);return r&&r.length>0?n.domain=r:Vn(n.type)&&(n.domain=new fE),!n.domain&&n.domainMid!==void 0&&(n.domain=[n.domainMin??0,n.domainMax??1]),this.channel=="y"&&Vn(n.type)&&n.reverse==null&&(n.reverse=!0),n.range&&n.scheme&&delete n.scheme,!("zoom"in n)&&["index","locus"].includes(n.type)&&(n.zoom=!0),qN(n,this.channel),n})}getConfiguredDomain(){return J(this,uf,ev).call(this,t=>xl(t.channel)?void 0:t.view.getConfiguredDomain(t.channel))}getDataDomain(){return J(this,uf,ev).call(this,t=>xl(t.channel)?void 0:t.view.extractDataDomain(t.channel))}reconfigure(){if(F(this,Ot)&&F(this,Ot).type!="null"){const t=this.isDomainInitialized(),n=F(this,Ot).domain();NA(this,"scaleProps");const r=this.getScaleProps();if(oE(r,F(this,Ot)),_t(F(this,Ot).type)&&le(this,ai,J(this,lf,J2).call(this)),!t){J(this,Dr,ya).call(this);return}const i=F(this,Ot).domain();th(i,n)||(this.isZoomable()?F(this,Ot).domain(n):J(this,oi,Ho).call(this)?(F(this,Ot).domain(n),this.zoomTo(i,500)):J(this,Dr,ya).call(this))}}getScale(){if(F(this,Ot))return F(this,Ot);const t=this.getScaleProps(),n=vN(t);return le(this,Ot,n),oN(n)&&n.genome(this.getGenome()),_t(n.type)&&le(this,ai,J(this,lf,J2).call(this)),n}getDomain(){return this.getScale().domain()}getComplexDomain(){var t;return((t=this.getGenome())==null?void 0:t.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return J(this,oi,Ho).call(this)&&th(J(this,fc,yp).call(this),this.getDomain())}isZoomable(){return J(this,oi,Ho).call(this)&&!!this.getScaleProps().zoom}zoom(t,n,r){if(!J(this,oi,Ho).call(this))return!1;const i=this.getScale(),a=i.domain();let o=[...a],s=i.invert(n);switch(this.getScaleProps().reverse&&(r=-r),"align"in i&&(s+=i.align()),i.type){case"linear":case"index":case"locus":o=mI(o,r||0),o=xp(o,s,t);break;case"log":o=bI(o,r||0),o=uv(o,s,t);break;case"pow":case"sqrt":{const c=i;o=yI(o,r||0,c.exponent()),o=Ap(o,s,t,c.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return F(this,ai)&&(o=wI(o,F(this,ai)[0],F(this,ai)[1])),[0,1].some(c=>o[c]!=a[c])?(i.domain(o),J(this,Dr,ya).call(this),!0):!1}async zoomTo(t,n=!1){var s;if(kc(n)&&(n=n?700:0),!J(this,oi,Ho).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(t),i=(s=this.members[0])==null?void 0:s.view.context.animator,a=this.getScale(),o=a.domain();if(n>0&&o.length==2){const c=o[1]-o[0],l=o[0]+c/2,u=r[1]-r[0],f=r[0]+u/2;await i.transition({duration:n,easingFunction:zN,onUpdate:h=>{const d=HN(c,u,h),p=(c-d)/(c-u),g=p*f+(1-p)*l;a.domain([g-d/2,g+d/2]),J(this,Dr,ya).call(this)}}),a.domain(r),J(this,Dr,ya).call(this)}else a.domain(r),i==null||i.requestRender(),J(this,Dr,ya).call(this)}resetZoom(){if(!J(this,oi,Ho).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=J(this,fc,yp).call(this);return[0,1].some(r=>n[r]!=t[r])?(F(this,Ot).domain(n),J(this,Dr,ya).call(this),!0):!1}getZoomLevel(){return this.isZoomable()?Lf(F(this,ai))/Lf(this.getScale().domain()):1}getGenome(){var n;if(this.type!=="locus")return;const t=(n=this.members[0].view.context.genomeStore)==null?void 0:n.getGenome();if(!t)throw new Error("No genome has been defined!");return t}invertToComplex(t){const n=this.getScale();if("invert"in n){const r=n.invert(t);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(t){const n=this.getGenome();return n?n.toChromosomal(t):t}fromComplex(t){return td(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&PN(t)?this.getGenome().toContinuousInterval(t):t}}ai=new WeakMap,uc=new WeakMap,Ot=new WeakMap,Dr=new WeakSet,ya=function(){for(const t of F(this,uc).values())t({type:"domain",scaleResolution:this})},Z0=new WeakSet,VT=function(){return ds(this,"mergedScaleProps",()=>{const t=this.members.map(n=>Jg(n.view,n.channel).scale).filter(n=>n!==void 0);return ed(t,"scale",["domain"])})},fc=new WeakSet,yp=function(){return this.getConfiguredDomain()??(this.type==gE?this.getGenome().getExtent():this.getDataDomain())},oi=new WeakSet,Ho=function(){const t=this.getScale().type;return _t(t)},lf=new WeakSet,J2=function(){const t=this.getScaleProps(),n=t.zoom;if(WN(n)&&Qt(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():F(this,Ot).domain()},Q0=new WeakSet,jT=function(t){const n=this.channel,r={};return this.isExplicitDomain()&&(r.zero=!1),wl(n)?r.nice=!this.isExplicitDomain():Ha(n)?r.scheme=t==Wm?"tableau10":t==qm?"blues":"viridis":Th(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r},V2=new WeakSet,uee=function(){return this.members.map(t=>t.view.getPathString()).join(", ")},uf=new WeakSet,ev=function(t){const n=this.members.filter(r=>!r.view.getLayoutAncestors().some(i=>!i.options.contributesToScaleDomain)).map(t).filter(r=>!!r);if(n.length)return n.reduce((r,i)=>r.extendAll(i))};function jN(e,t){if(t==GN||t==gE){if(h3(e))return t;throw new Error(`${e} does not support ${t} data type. Only positional channels do.`)}const n={x:["band","band","linear"],y:["band","band","linear"],size:[void 0,"point","linear"],opacity:[void 0,"point","linear"],fillOpacity:[void 0,"point","linear"],strokeOpacity:[void 0,"point","linear"],color:["ordinal","ordinal","linear"],fill:["ordinal","ordinal","linear"],stroke:["ordinal","ordinal","linear"],strokeWidth:[void 0,void 0,"linear"],shape:["ordinal","ordinal",void 0],dx:[void 0,void 0,"null"],dy:[void 0,void 0,"null"],angle:[void 0,void 0,"linear"]},i=["sample"].includes(e)?"null":n[e]?n[e][[Wm,qm,pE].indexOf(t)]:t==pE?"linear":"ordinal";if(i===void 0)throw new Error(`Channel "${e}" is not compatible with "${t}" data type. Use of a proper scale may be needed.`);return i}function qN(e,t){wl(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&_t(e.type)&&(e.clamp=!0)}function WN(e){return Xt(e)}function Ym(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of Lt(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function Zm(...e){for(const t of e)if(t!==void 0)return t}class YN{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=xn(this.members))==null?void 0:t.view.getScaleResolution(this.channel)}pushUnitView(t,n){const r=t.getScaleResolution(this.channel);if(!r)throw new Error("Cannot find a scale resolution!");if(this.scaleResolution&&r!==this.scaleResolution)throw new Error("Shared axes must have a shared scale!");this.members.push({view:t,channel:n})}getAxisProps(){return ds(this,"axisProps",()=>{const t=this.members.map(n=>{const r=n.view.mark.encoding[n.channel];return"axis"in r&&r.axis});return t.length>0&&t.some(n=>n===null)?null:ed(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=a=>{var s;const o=Jg(a.view,a.channel);if(!jn(o))return{member:a,explicitTitle:Zm("axis"in o?(s=o.axis)==null?void 0:s.title:void 0,o.title),implicitTitle:Zm(Ur(o)?o.field:void 0,kh(o)?o.expr:void 0)}},n=this.members.map(t),r=n.filter(a=>{var o;if(xl(a.member.channel)&&!a.explicitTitle){const s=$a(a.member.channel);return((o=n.find(c=>c.member.view==a.member.view&&c.member.channel==s))==null?void 0:o.explicitTitle)===void 0}return!0}),i=new Set(r.map(a=>Zm(a.explicitTitle,a.implicitTitle)).filter(Me));return i.size?[...i].join(", "):null}}const ZN={point:RL,rect:EL,rule:PL,link:UL,text:WL};class mt extends Yn{constructor(t,n,r,i,a,o){super(t,n,r,i,a,o),this.spec=t;const s=ZN[this.getMarkType()];if(s)this.mark=new s(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),this.needsAxes={x:!0,y:!0}}render(t,n,r={}){super.render(t,n,r),this.isConfiguredVisible()&&(t.pushView(this,n),t.renderMark(this.mark,r),t.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}resolve(t){t||(this.resolve("scale"),this.resolve("axis"));const n=this.mark.encoding;for(const[r,i]of Object.entries(n)){if(!rn(i))continue;const a=$a(i.resolutionChannel??r);if(!Ri(a)||t=="axis"&&!wl(a))continue;let o=this;for(;(o.getConfiguredOrDefaultResolution(a,t)=="forced"||o.dataParent instanceof Yn&&["shared","excluded","forced"].includes(o.dataParent.getConfiguredOrDefaultResolution(a,t)))&&o.getConfiguredOrDefaultResolution(a,t)!="excluded";)o=o.dataParent;t=="axis"&&wl(r)&&h3(a)?(o.resolutions[t][a]||(o.resolutions[t][a]=new YN(a)),o.resolutions[t][a].pushUnitView(this,r)):t=="scale"&&Ri(r)&&(o.resolutions[t][a]||(o.resolutions[t][a]=new VN(a)),o.resolutions[t][a].pushUnitView(this,r))}}getAccessor(t){return this._cache("accessor/"+t,()=>{const n=this.mark.encoding;if(n&&n[t])return this.context.accessorFactory.createAccessor(n[t])})}getFacetAccessor(t){const n=this.getAccessor("sample");return n||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}_validateDomainQuery(t){if(xl(t))throw new Error(`getDomain(${t}), must only be called for primary channels!`);const n=this.mark.encoding[t];if(!rn(n))throw new Error("The channel has no scale, cannot get domain!");return n}getConfiguredDomain(t){const n=this._validateDomainQuery(t),r=n&&n.scale&&n.scale.domain;if(r){const i=this.getScaleResolution(n.resolutionChannel??t);return dE(n.type??"nominal",i.fromComplexInterval(r))}}extractDataDomain(t){const r=this._validateDomainQuery(t).type??"nominal",i=s=>{let c;const l=this.mark.encoding[s];if(l){const u=this.context.accessorFactory.createAccessor(l);if(u)if(c=dE(r),u.constant)c.extend(u({}));else{const f=this.getCollector();f!=null&&f.completed&&f.visitData(h=>c.extend(u(h)))}}return c};let a=i(t);const o=em[t];if(o){const s=i(o);s&&a.extendAll(s)}return a}getZoomLevel(){const t=n=>{var r;return((r=this.getScaleResolution(n))==null?void 0:r.getZoomLevel())??1};return ns.map(t).reduce((n,r)=>n*r,1)}propagateInteractionEvent(t){this.handleInteractionEvent(void 0,t,!0),t.target=this,!t.stopped&&this.handleInteractionEvent(void 0,t,!1)}getDefaultResolution(t,n){return t=="x"?"shared":"independent"}}function*Qm(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of Qm(r,[...t,n]))yield i;else yield[[...t,n],r]}class Ol extends at{get behavior(){return zm}constructor(t){super(),this.params=t??{type:"collect"},this.observers=[],this.facetBatches=void 0,this._init()}_init(){this._data=[],this.facetBatches=new gi([],JSON.stringify),this.facetBatches.set(void 0,this._data)}reset(){super.reset(),this._init()}handle(t){this._data.push(t)}beginBatch(t){TL(t)&&(this._data=[],this.facetBatches.set(Lt(t.facetId),this._data))}complete(){var i,a;const t=(i=this.params)==null?void 0:i.sort,n=t?fv(t.field,t.order):void 0,r=o=>{n&&o.sort(n)};if((a=this.params.groupby)!=null&&a.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const o=this.params.groupby.map(c=>Oe(c)),s=o.length>1?Rc(this._data,...o):QN(this._data,o[0]);this.facetBatches.clear();for(const[c,l]of Qm(s))this.facetBatches.set(c,l)}for(const o of this.facetBatches.values())r(o);if(this.children.length)for(const[o,s]of this.facetBatches.entries()){if(o){const c={type:"facet",facetId:o};for(const l of this.children)l.beginBatch(c)}for(const c of s)this._propagate(c)}super.complete();for(const o of this.observers)o(this)}getData(){switch(this._checkStatus(),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const t=this.facetBatches;return{[Symbol.iterator]:function*(){for(const r of t.values())for(let i=0;i<r.length;i++)yield r[i]}}}}}visitData(t){this._checkStatus();for(const n of this.facetBatches.values())for(let r=0;r<n.length;r++)t(n[r])}getItemCount(){let t=0;for(const n of this.facetBatches.values())t+=n.length;return t}_checkStatus(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")}}function QN(e,t){const n=new Map;for(let r=0,i=e.length;r<i;r++){const a=e[r],o=t(a);let s=n.get(o);s||(s=[],n.set(o,s)),s.push(a)}return n}class Ll{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,n){let r=this.length++;for(;r>0;){const i=r-1>>1,a=this.values[i];if(n>=a)break;this.ids[r]=this.ids[i],this.values[r]=a,r=i}this.ids[r]=t,this.values[r]=n}pop(){if(this.length===0)return;const t=this.ids[0];if(this.length--,this.length>0){const n=this.ids[0]=this.ids[this.length],r=this.values[0]=this.values[this.length],i=this.length>>1;let a=0;for(;a<i;){let o=(a<<1)+1;const s=o+1;let c=this.ids[o],l=this.values[o];const u=this.values[s];if(s<this.length&&u<l&&(o=s,c=this.ids[s],l=u),l>=r)break;this.ids[a]=c,this.values[a]=l,a=o}this.ids[a]=n,this.values[a]=r}return t}peek(){if(this.length!==0)return this.ids[0]}peekValue(){if(this.length!==0)return this.values[0]}shrink(){this.ids.length=this.values.length=this.length}}class XN extends at{get behavior(){return mr}constructor(t){super(),this.params=t,this.startAccessor=Oe(t.start),this.endAccessor=Oe(t.end),this.chromAccessor=t.chrom?Oe(t.chrom):n=>{},this.weightAccessor=t.weight?Oe(t.weight):n=>1,this.as={coverage:t.as||"coverage",start:t.asStart||t.start,end:t.asEnd||t.end,chrom:t.asChrom||t.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([n,r])=>r).map(([n,r])=>`${JSON.stringify(r)}: ${n}`).join(", ")+"};"),this.ends=new Ll}reset(){super.reset(),this.initialize()}initialize(){const t=this.as.coverage,n=this.as.end,r=this.as.chrom,i=this.startAccessor,a=this.endAccessor,o=this.chromAccessor,s=this.weightAccessor;let c,l,u,f=0,h;const d=this.ends;d.clear();const p=(b,y,w)=>{if(b==y)return;let A=!1;c&&(c[t]===w?(c[n]=y,A=!0):c[t]!=0&&this._propagate(c)),A||(c=this.createSegment(b,y,w,u))},g=()=>{let b=0;for(;(b=d.peekValue())!==void 0;)p(h,b,f),h=b,f-=d.pop();h=void 0,c&&(this._propagate(c),c=void 0)};this.handle=b=>{const y=i(b);let w=0;for(;(w=d.peekValue())!==void 0&&w<y;)p(h,w,f),h=w,f-=d.pop();if(r){let x=o(b);x!==l&&(g(),u=x,l=u)}h!==void 0&&p(h,y,f),h=y;const A=s(b);f+=A,d.push(A,a(b))},this.complete=()=>{g(),super.complete()},this.beginBatch=b=>{g(),l=void 0,super.beginBatch(b)}}}function KN(e,t,n=0,r=e.length){const i=new Ll,a=r-n;let o;for(o=0;o<t&&o<a;o++)i.push(o,e[n+o]);for(;o<a;o++){const l=e[n+o];l>=i.peekValue()&&(i.push(o,l),i.pop())}const s=[];let c;for(;(c=i.pop())!==void 0;)s.push(n+c);return s.reverse()}class JN{constructor(t,n=-1/0,r=1/0){this.maxSize=t,this.lowerLimit=n,this.upperLimit=r;const i=this.maxSize*2+1;this.lowerLimits=new Float64Array(i),this.upperLimits=new Float64Array(i),this.lowerChildren=new Int32Array(i),this.upperChildren=new Int32Array(i),this.reset()}reset(){this.lowerLimits.fill(0),this.upperLimits.fill(0),this.lowerChildren.fill(0),this.upperChildren.fill(0),this.n=1,this.lowerLimits[0]=this.lowerLimit,this.upperLimits[0]=this.upperLimit}_findSlot(t,n,r=0){if(t>=this.lowerLimits[r]&&n<=this.upperLimits[r]){const i=this.lowerChildren[r];if(i){const a=this._findSlot(t,n,i);return a>=0?a:this._findSlot(t,n,this.upperChildren[r])}else return r}else return-1}reserve(t,n){if(n-t<=0)throw new Error("Cannot reserve an empty or negative-size slot!");if(this.n+1>this.lowerLimits.length)return!1;const r=this._findSlot(t,n);if(r<0)return!1;const i=this.n++,a=this.n++;return this.lowerLimits[i]=this.lowerLimits[r],this.upperLimits[i]=t,this.lowerLimits[a]=n,this.upperLimits[a]=this.upperLimits[r],this.lowerChildren[r]=i,this.upperChildren[r]=a,!0}}class ez extends at{get behavior(){return zm}constructor(t,n){if(super(),this.params=t,this._data=[],this.channel=t.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.posAccessor=Oe(this.params.pos),this.posBisector=Uf(this.posAccessor),this.scoreAccessor=Oe(this.params.score),this.widthAccessor=Oe(this.params.width),this.laneAccessor=this.params.lane?Oe(this.params.lane):i=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=n.getScaleResolution(this.channel);const r=()=>this._filterAndPropagate();this.schedule=()=>n.context.animator.requestTransition(r),this.resolution.addEventListener("domain",i=>this.schedule()),n._addBroadcastHandler("layoutComputed",()=>this.schedule())}complete(){const t=this.posAccessor;this._data.sort((n,r)=>t(n)-t(r)),this._scores=this._data.map(this.scoreAccessor);for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new JN(200));this.schedule(),super.complete()}_filterAndPropagate(){var o;super.reset();const t=this.resolution.getScale(),n=(o=this.resolution.members[0].view.coords)==null?void 0:o[this.channel=="x"?"width":"height"];if(!n)return;for(const s of this.reservationMaps.values())s.reset();const r=t.domain(),i=70,a=KN(this._scores,i,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of a){const c=this._data[s],l=t(this.posAccessor(c))*n,u=this.widthAccessor(c)/2+this.padding;this.reservationMaps.get(this.laneAccessor(c)).reserve(l-u,l+u)&&this._propagate(c)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class tz extends at{constructor(t){super(),this.params=t,this.predicate=void 0}initialize(){this.predicate=ch(this.params.expr,this.getGlobalObject())}handle(t){this.predicate(t)&&this._propagate(t)}}class nz extends at{get behavior(){return mr}constructor(t){super();const n=t.index;if(t.fields){const r=Lt(t.fields).map(a=>Oe(a)),i=Lt(t.as||t.fields);if(r.length!==i.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${i.length}) do not match!`);this.handle=a=>{const o=r.map((c,l)=>c(a)??[]),s=o[0].length;for(let c=0;c<s;c++){const l=Object.assign({},a);for(let u=0;u<r.length;u++)l[i[u]]=c<o[u].length?o[u][c]:null;n&&(l[n]=c),this._propagate(l)}}}else this.handle=r=>{for(let i=0;i<r.length;i++){const a=Object.assign({},r[i]);n&&(a[n]=i),this._propagate(a)}}}}const rz="0".charCodeAt(0);function*iz(e,t=","){const n=t.charCodeAt(0);let r=0;for(let i=0;i<e.length;i++){const a=e.charCodeAt(i);a==n?(yield r,r=0):r=r*10+a-rz}yield r}class az extends at{get behavior(){return mr}constructor(t){super();const n=Oe(t.exons??"exons"),r=Oe(t.start??"start"),[i,a]=t.as||["exonStart","exonEnd"];this.handle=o=>{let s=r(o),c=s,l=!0;const u=n(o);for(const f of iz(u)){if(l)c=s+f;else{s=c+f;const h=Object.assign({},o);h[i]=c,h[a]=s,this._propagate(h)}l=!l}}}}class oz extends at{get behavior(){return mr}constructor(t){super();const n=Lt(t.field).map(a=>Oe(a)),r=Lt(t.separator),i=Lt(t.as||t.field);if(n.length!==r.length||n.length!==i.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${n.length}), and "as" (${i.length}) do not match!`);this.handle=a=>{if(n.some(c=>!c(a)))return;const o=n.map((c,l)=>c(a).split(r[l]));sz(o,a);const s=o[0].length;for(let c=0;c<s;c++){const l=Object.assign({},a);for(let u=0;u<n.length;u++)l[i[u]]=o[u][c];this._propagate(l)}}}}function sz(e,t){const n=e.map(r=>r.length);if(!n.every(r=>r==n[0]))throw new Error("Mismatching number of elements in the fields to be split: "+JSON.stringify(t))}class cz extends at{get behavior(){return Li}constructor(t){super(),this.params=t,this.as=t.as,this.fn=void 0}initialize(){this.fn=ch(this.params.expr,this.getGlobalObject())}handle(t){t[this.as]=this.fn(t),this._propagate(t)}}class mE extends at{get behavior(){return Li}constructor(t,n){super();const r=t.channel??"x";if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const i=n.getScaleResolution(r).getGenome();if(!i)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const a=Oe(t.chrom),o=Lt(t.pos).map(p=>Oe(p)),s=Lt(t.as);if(o.length!=s.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=Lt(t.offset);let l;if(c.length==0)l=new Array(o.length).fill(0);else if(c.length==1)l=new Array(o.length).fill(c[0]);else if(c.length==o.length)l=c;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(t.offset)}!`);const u=new Function("datum","chromOffset","posAccessors",s.map((p,g)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${g}](datum) - ${l[g]};`).join(`
1694
+ */const pN="locus",gN="index";var mN=5;function bN(e){const t=e.type;return!e.bins&&(t===es||t===pl||t===gl)}function iE(e){return _t(e)&&![dr,gN,pN].includes(e)}function aE(e){return e||{warn:(t,...n)=>console.warn(t,...n)}}var yN=zf(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma","zoom","fp64","name"]);function oE(e,t,n){n=aE(n);for(const r in e)if(!yN[r]){if(r==="padding"&&iE(t.type))continue;Kt(t[r])?t[r](e[r]):n.warn("Unsupported scale property: "+r)}CN(t,e,_N(t,e,AN(t,e,n)))}function vN(e,t){const n=wN(e),r=ke(n);if(!r)throw new Error("Unknown scale type: "+n);const i=r();return!e.domain&&_t(i.type)&&(e.domain=[0,0]),oE(e,i,t),i}function wN(e){var t=e.type,n="",r;return t===dr?dr+"-"+es:(xN(e)&&(r=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=r===2?dr+"-":r===3?ts+"-":""),(n+t||es).toLowerCase())}function xN(e){const t=e.type;return _t(t)&&t!==Kx&&t!==Jx&&(e.scheme||e.range&&e.range.length&&e.range.every(Me))}function AN(e,t,n){if(!e.domain)return 0;n=aE(n);var r=EN(e,t.domainRaw,n);if(r>-1)return r;var i=t.domain,a=e.type,o=t.zero||t.zero===void 0&&bN(e),s,c;return i?(iE(a)&&t.padding&&i[0]!==Un(i)&&(i=SN(a,i,t.range,t.padding,t.exponent,t.constant)),(o||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(s=(i=i.slice()).length-1||1,o&&(i[0]>0&&(i[0]=0),i[s]<0&&(i[s]=0)),t.domainMin!=null&&(i[0]=t.domainMin),t.domainMax!=null&&(i[s]=t.domainMax),t.domainMid!=null&&(c=t.domainMid,(c<i[0]||c>i[s])&&n.warn("Scale domainMid exceeds domain min or max.",c),i.splice(s,0,c))),e.domain(sE(a,i,n)),a===Yg&&e.unknown(t.domainImplicit?gg:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&nE(e,t.nice)||null),i.length):0}function EN(e,t,n){return t?(e.domain(sE(e.type,t,n)),t.length):-1}function SN(e,t,n,r,i,a){var o=Math.abs(Un(n)-n[0]),s=o/(o-2*r),c=e===Ti?uv(t,null,s):e===gl?Ap(t,null,s,.5):e===pl?Ap(t,null,s,i||1):e===Ah?vI(t,null,s,a||1):xp(t,null,s);return t=t.slice(),t[0]=c[0],t[t.length-1]=c[1],t}function sE(e,t,n){if(o3(e)){var r=Math.abs(t.reduce(function(i,a){return i+(a<0?-1:a>0?1:0)},0));r!==t.length&&n.warn("Log scale domain includes zero: "+Nf(t))}return t}function _N(e,t,n){let r=t.bins;if(r&&!Qt(r)){const i=(r.start==null||r.stop==null)&&e.domain(),a=r.start==null?i[0]:r.start,o=r.stop==null?Un(i):r.stop,s=r.step;s||it("Scale bins parameter missing step property."),r=mi(a,o+s,s)}return r?e.bins=r:e.bins&&delete e.bins,e.type===Qg&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function CN(e,t,n){var r=e.type,i=t.round||!1,a=t.range;if(t.rangeStep!=null)a=kN(r,t,n);else if(t.scheme&&(a=TN(r,t,n),Kt(a))){if(e.interpolator)return e.interpolator(a);it(`Scale type ${r} does not support interpolating color schemes.`)}if(a&&Sh(r))return e.interpolator(_h(Gm(a,t.reverse),t.interpolate,t.interpolateGamma));a&&t.interpolate&&e.interpolate?e.interpolate(s3(t.interpolate,t.interpolateGamma)):Kt(e.round)?e.round(i):Kt(e.rangeRound)&&e.interpolate(i?hl:Ci),a&&e.range(Gm(a,t.reverse))}function kN(e,t,n){e!==n3&&e!==Zg&&it("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===Zg?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*qg(n,i,r)]}function TN(e,t,n){var r=t.schemeExtent,i,a;return Qt(t.scheme)?a=_h(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),a=Kg(i),a||it(`Unrecognized scheme name: ${t.scheme}`)),n=e===t3?n+1:e===Qg?n-1:e===Wg||e===e3?+t.schemeCount||mN:n,Sh(e)?cE(a,r,t.reverse):Kt(a)?HB(cE(a,r),n):e===Yg?a:a.slice(0,n)}function cE(e,t,n){return Kt(e)&&(t||n)?$B(e,Gm(t||[0,1],n)):e}function Gm(e,t){return t?e.slice().reverse():e}const Vm=pt(",d");function IN(e){return e.chrom+":"+Vm(Math.floor(e.pos+1))}function lE(e){return!ft(e)&&"chrom"in e?IN(e):""+e}function RN(e,t){return e.chrom+":"+Vm(Math.floor(e.pos+1))+"-"+(e.chrom!=t.chrom?t.chrom+":":"")+Vm(Math.ceil(t.pos))}const DN="https://genomespy.app/data/genomes/";class BN{constructor(t){if(this.config=t,!this.config.contigs&&typeof this.config.name!="string")throw new Error("No name has been defined for the genome assembly!");this.chromosomes=[],this.cumulativeChromPositions=new Map,this.chromosomesByName=new Map,this.startByIndex=[],this.totalSize=0,this.config.contigs&&this.setChromSizes(this.config.contigs)}get name(){return this.config.name}async load(t){if(!this.config.contigs){this.config.baseUrl?this.baseUrl=/^http(s)?/.test(this.config.baseUrl)?this.config.baseUrl:t+"/"+this.config.baseUrl:this.baseUrl=DN;try{this.setChromSizes(FN(await Zc({baseURL:this.baseUrl}).load(`${this.config.name}/${this.name}.chrom.sizes`)))}catch(n){throw new Error(`Could not load chrom sizes: ${n.message}`)}}}hasChrPrefix(){return this.chromosomes.some(t=>t.name.startsWith("chr"))}setChromSizes(t){let n=0;this.startByIndex=[0];for(let r=0;r<t.length;r++){this.startByIndex.push(n);const i=t[r].size,a={...t[r],continuousStart:n,continuousEnd:n+i,continuousInterval:[n,n+i],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(a);const o=a.name.replace(/^chr/i,"");for(const s of["chr"+o,"CHR"+o,"Chr"+o,a.number,""+a.number,o,a.name])this.cumulativeChromPositions.set(s,n),this.chromosomesByName.set(s,a);n+=a.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(t,n){let r=this.cumulativeChromPositions.get(t);if(r===void 0)throw new Error("Unknown chromosome/contig: "+t);return r+ +n}toChromosome(t){if(t>this.totalSize)return;t=Math.floor(t);const n=Pr(this.startByIndex,t)-1;if(n>0&&n<=this.chromosomes.length)return this.chromosomes[n-1]}toChromosomal(t){const n=this.toChromosome(t);if(n)return{chrom:n.name,pos:Math.floor(t)-n.continuousStart}}getChromosome(t){return this.chromosomesByName.get(t)}formatInterval(t){return RN(...this.toChromosomalInterval(t))}toChromosomalInterval(t){const n=this.toChromosomal(t[0]+.5),r=this.toChromosomal(t[1]-.5);return r.pos+=1,[n,r]}toContinuousInterval(t){var i;let[n,r]=t;return r||(r=n),[this.toContinuous(n.chrom,n.pos??0),this.toContinuous(r.chrom,r.pos??((i=this.chromosomesByName.get(r.chrom))==null?void 0:i.size))]}toDiscreteChromosomeIntervals(t){const n=t[0],r=t[1],i=[];if(n.chrom===r.chrom)i.push({chrom:n.chrom,startPos:n.pos,endPos:r.pos});else{const a=this.chromosomes.findIndex(s=>s.name===n.chrom),o=this.chromosomes.findIndex(s=>s.name===r.chrom);i.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[a].size});for(let s=a+1;s<o;s++)i.push({chrom:this.chromosomes[s].name,startPos:0,endPos:this.chromosomes[s].size});i.push({chrom:r.chrom,startPos:0,endPos:r.pos})}return i}continuousToDiscreteChromosomeIntervals(t){return this.toDiscreteChromosomeIntervals([this.toChromosomal(t[0]),this.toChromosomal(t[1])])}parseInterval(t){const n=t.match(/^(chr[0-9A-Z]+)(?::([0-9,]+)(?:-(?:(chr[0-9A-Z]+):)?([0-9,]+))?)?$/);if(n){const r=n[1];if(n.slice(2).every(s=>s===void 0)){const s=this.getChromosome(r);return s?[s.continuousStart,s.continuousEnd]:void 0}const i=n[3]||r,a=parseInt(n[2].replace(/,/g,"")),o=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):a;return[this.toContinuous(r,a-1),this.toContinuous(i,o)]}}}function FN(e){return NI(e).filter(t=>/^chr[0-9A-Z]+$/.test(t[0])).map(([t,n])=>({name:t,size:parseInt(n)}))}function td(e){return Xt(e)&&"chrom"in e}function PN(e){return e.every(td)}class Ml extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof Ml&&t.type!=this.type)throw new Error(`Cannot combine different types of domains: ${this.type} and ${t.type}`);for(const n of t)this.extend(n);return this}extendAllWithAccessor(t,n){for(const r of t)this.extend(n(r));return this}}class jm extends Ml{constructor(){super(),this.type="quantitative"}extend(t){return t==null||Number.isNaN(t)?this:(t=+t,this.length?t<this[0]?this[0]=t:t>this[1]&&(this[1]=t):(this.push(t),this.push(t)),this)}}class uE extends Ml{constructor(){super(),this.type="ordinal",this.uniqueValues=new Set}extend(t){return t==null||Number.isNaN(t)?this:(this.uniqueValues.has(t)||(this.uniqueValues.add(t),this.push(t)),this)}}class fE extends uE{constructor(){super(),this.type="nominal"}}class MN extends Ml{constructor(t){super();let n=0;for(let r=1;r<t.length;r++)n+=Math.sign(t[r]-t[r-1]);if(Math.abs(n)!=t.length-1)throw new Error("Piecewise domain must be strictly increasing or decreasing: "+JSON.stringify(t));t.forEach(r=>this.push(r))}extend(t){if(this.includes(t))return this;throw new Error("Piecewise domains are immutable and cannot be unioned!")}}const hE={quantitative:jm,index:jm,locus:jm,nominal:fE,ordinal:uE};function dE(e,t){if(e=="quantitative"&&ON(t)){const n=new MN(t);return n.type=e,n}else if(hE[e]){const n=new hE[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function ON(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function LN(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function NN(e){return--e*e*e+1}function zN(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function UN(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function $N(e){return 1-UN(e)}function HN(e,t,n){return e*Math.pow(t/e,n)}ke("index",Hm,["continuous"]),ke("locus",aN,["continuous"]),ke("null",Ch,[]);const pE="quantitative",qm="ordinal",Wm="nominal",gE="locus",GN="index";class VN{constructor(t){Z(this,Dr);Z(this,Z0);Z(this,fc);Z(this,oi);Z(this,lf);Z(this,Q0);Z(this,V2);Z(this,uf);Z(this,ai,void 0);Z(this,uc,new Set);Z(this,Ot,void 0);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){if(t!="domain")throw new Error("Unsupported event type: "+t);F(this,uc).add(n)}removeEventListener(t,n){if(t!="domain")throw new Error("Unsupported event type: "+t);F(this,uc).delete(n)}pushUnitView(t,n){var o;const r=Jg(t,n),i=r.type,a=(o=r==null?void 0:r.scale)==null?void 0:o.name;if(a){if(this.name!==void 0&&a!=this.name)throw new Error(`Shared scales have conflicting names: "${a}" vs. "${this.name}"!`);this.name=a}if(!this.type)this.type=i;else if(i!==this.type&&!xl(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${i}. Use "resolve: independent" for channel ${this.channel}`);this.members.push({view:t,channel:n})}isExplicitDomain(){return!!this.getConfiguredDomain()}isDomainInitialized(){const t=F(this,Ot);if(!t)return!1;const n=t.domain();return _t(t.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0}getScaleProps(){return ds(this,"scaleProps",()=>{const t=J(this,Z0,VT).call(this);if(t===null||t.type=="null")return{type:"null"};const n={...J(this,Q0,jT).call(this,this.type),...t};n.type||(n.type=jN(this.channel,this.type));const r=J(this,fc,yp).call(this);return r&&r.length>0?n.domain=r:Vn(n.type)&&(n.domain=new fE),!n.domain&&n.domainMid!==void 0&&(n.domain=[n.domainMin??0,n.domainMax??1]),this.channel=="y"&&Vn(n.type)&&n.reverse==null&&(n.reverse=!0),n.range&&n.scheme&&delete n.scheme,!("zoom"in n)&&["index","locus"].includes(n.type)&&(n.zoom=!0),qN(n,this.channel),n})}getConfiguredDomain(){return J(this,uf,ev).call(this,t=>xl(t.channel)?void 0:t.view.getConfiguredDomain(t.channel))}getDataDomain(){return J(this,uf,ev).call(this,t=>xl(t.channel)?void 0:t.view.extractDataDomain(t.channel))}reconfigure(){if(F(this,Ot)&&F(this,Ot).type!="null"){const t=this.isDomainInitialized(),n=F(this,Ot).domain();NA(this,"scaleProps");const r=this.getScaleProps();if(oE(r,F(this,Ot)),_t(F(this,Ot).type)&&le(this,ai,J(this,lf,J2).call(this)),!t){J(this,Dr,ya).call(this);return}const i=F(this,Ot).domain();th(i,n)||(this.isZoomable()?F(this,Ot).domain(n):J(this,oi,Ho).call(this)?(F(this,Ot).domain(n),this.zoomTo(i,500)):J(this,Dr,ya).call(this))}}getScale(){if(F(this,Ot))return F(this,Ot);const t=this.getScaleProps(),n=vN(t);return le(this,Ot,n),oN(n)&&n.genome(this.getGenome()),_t(n.type)&&le(this,ai,J(this,lf,J2).call(this)),n}getDomain(){return this.getScale().domain()}getComplexDomain(){var t;return((t=this.getGenome())==null?void 0:t.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return J(this,oi,Ho).call(this)&&th(J(this,fc,yp).call(this),this.getDomain())}isZoomable(){return J(this,oi,Ho).call(this)&&!!this.getScaleProps().zoom}zoom(t,n,r){if(!J(this,oi,Ho).call(this))return!1;const i=this.getScale(),a=i.domain();let o=[...a],s=i.invert(n);switch(this.getScaleProps().reverse&&(r=-r),"align"in i&&(s+=i.align()),i.type){case"linear":case"index":case"locus":o=mI(o,r||0),o=xp(o,s,t);break;case"log":o=bI(o,r||0),o=uv(o,s,t);break;case"pow":case"sqrt":{const c=i;o=yI(o,r||0,c.exponent()),o=Ap(o,s,t,c.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return F(this,ai)&&(o=wI(o,F(this,ai)[0],F(this,ai)[1])),[0,1].some(c=>o[c]!=a[c])?(i.domain(o),J(this,Dr,ya).call(this),!0):!1}async zoomTo(t,n=!1){var s;if(kc(n)&&(n=n?700:0),!J(this,oi,Ho).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(t),i=(s=this.members[0])==null?void 0:s.view.context.animator,a=this.getScale(),o=a.domain();if(n>0&&o.length==2){const c=o[1]-o[0],l=o[0]+c/2,u=r[1]-r[0],f=r[0]+u/2;await i.transition({duration:n,easingFunction:zN,onUpdate:h=>{const d=HN(c,u,h),p=(c-d)/(c-u),g=p*f+(1-p)*l;a.domain([g-d/2,g+d/2]),J(this,Dr,ya).call(this)}}),a.domain(r),J(this,Dr,ya).call(this)}else a.domain(r),i==null||i.requestRender(),J(this,Dr,ya).call(this)}resetZoom(){if(!J(this,oi,Ho).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=J(this,fc,yp).call(this);return[0,1].some(r=>n[r]!=t[r])?(F(this,Ot).domain(n),J(this,Dr,ya).call(this),!0):!1}getZoomLevel(){return this.isZoomable()?Lf(F(this,ai))/Lf(this.getScale().domain()):1}getGenome(){var n;if(this.type!=="locus")return;const t=(n=this.members[0].view.context.genomeStore)==null?void 0:n.getGenome();if(!t)throw new Error("No genome has been defined!");return t}invertToComplex(t){const n=this.getScale();if("invert"in n){const r=n.invert(t);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(t){const n=this.getGenome();return n?n.toChromosomal(t):t}fromComplex(t){return td(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&PN(t)?this.getGenome().toContinuousInterval(t):t}}ai=new WeakMap,uc=new WeakMap,Ot=new WeakMap,Dr=new WeakSet,ya=function(){for(const t of F(this,uc).values())t({type:"domain",scaleResolution:this})},Z0=new WeakSet,VT=function(){return ds(this,"mergedScaleProps",()=>{const t=this.members.map(n=>Jg(n.view,n.channel).scale).filter(n=>n!==void 0);return ed(t,"scale",["domain"])})},fc=new WeakSet,yp=function(){return this.getConfiguredDomain()??(this.type==gE?this.getGenome().getExtent():this.getDataDomain())},oi=new WeakSet,Ho=function(){const t=this.getScale().type;return _t(t)},lf=new WeakSet,J2=function(){const t=this.getScaleProps(),n=t.zoom;if(WN(n)&&Qt(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():F(this,Ot).domain()},Q0=new WeakSet,jT=function(t){const n=this.channel,r={};return this.isExplicitDomain()&&(r.zero=!1),wl(n)?r.nice=!this.isExplicitDomain():Ha(n)?r.scheme=t==Wm?"tableau10":t==qm?"blues":"viridis":Th(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r},V2=new WeakSet,fee=function(){return this.members.map(t=>t.view.getPathString()).join(", ")},uf=new WeakSet,ev=function(t){const n=this.members.filter(r=>!r.view.getLayoutAncestors().some(i=>!i.options.contributesToScaleDomain)).map(t).filter(r=>!!r);if(n.length)return n.reduce((r,i)=>r.extendAll(i))};function jN(e,t){if(t==GN||t==gE){if(h3(e))return t;throw new Error(`${e} does not support ${t} data type. Only positional channels do.`)}const n={x:["band","band","linear"],y:["band","band","linear"],size:[void 0,"point","linear"],opacity:[void 0,"point","linear"],fillOpacity:[void 0,"point","linear"],strokeOpacity:[void 0,"point","linear"],color:["ordinal","ordinal","linear"],fill:["ordinal","ordinal","linear"],stroke:["ordinal","ordinal","linear"],strokeWidth:[void 0,void 0,"linear"],shape:["ordinal","ordinal",void 0],dx:[void 0,void 0,"null"],dy:[void 0,void 0,"null"],angle:[void 0,void 0,"linear"]},i=["sample"].includes(e)?"null":n[e]?n[e][[Wm,qm,pE].indexOf(t)]:t==pE?"linear":"ordinal";if(i===void 0)throw new Error(`Channel "${e}" is not compatible with "${t}" data type. Use of a proper scale may be needed.`);return i}function qN(e,t){wl(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&_t(e.type)&&(e.clamp=!0)}function WN(e){return Xt(e)}function Ym(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of Lt(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function Zm(...e){for(const t of e)if(t!==void 0)return t}class YN{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=xn(this.members))==null?void 0:t.view.getScaleResolution(this.channel)}pushUnitView(t,n){const r=t.getScaleResolution(this.channel);if(!r)throw new Error("Cannot find a scale resolution!");if(this.scaleResolution&&r!==this.scaleResolution)throw new Error("Shared axes must have a shared scale!");this.members.push({view:t,channel:n})}getAxisProps(){return ds(this,"axisProps",()=>{const t=this.members.map(n=>{const r=n.view.mark.encoding[n.channel];return"axis"in r&&r.axis});return t.length>0&&t.some(n=>n===null)?null:ed(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=a=>{var s;const o=Jg(a.view,a.channel);if(!jn(o))return{member:a,explicitTitle:Zm("axis"in o?(s=o.axis)==null?void 0:s.title:void 0,o.title),implicitTitle:Zm(Ur(o)?o.field:void 0,kh(o)?o.expr:void 0)}},n=this.members.map(t),r=n.filter(a=>{var o;if(xl(a.member.channel)&&!a.explicitTitle){const s=$a(a.member.channel);return((o=n.find(c=>c.member.view==a.member.view&&c.member.channel==s))==null?void 0:o.explicitTitle)===void 0}return!0}),i=new Set(r.map(a=>Zm(a.explicitTitle,a.implicitTitle)).filter(Me));return i.size?[...i].join(", "):null}}const ZN={point:RL,rect:EL,rule:PL,link:UL,text:WL};class mt extends Yn{constructor(t,n,r,i,a,o){super(t,n,r,i,a,o),this.spec=t;const s=ZN[this.getMarkType()];if(s)this.mark=new s(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),this.needsAxes={x:!0,y:!0}}render(t,n,r={}){super.render(t,n,r),this.isConfiguredVisible()&&(t.pushView(this,n),t.renderMark(this.mark,r),t.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}resolve(t){t||(this.resolve("scale"),this.resolve("axis"));const n=this.mark.encoding;for(const[r,i]of Object.entries(n)){if(!rn(i))continue;const a=$a(i.resolutionChannel??r);if(!Ri(a)||t=="axis"&&!wl(a))continue;let o=this;for(;(o.getConfiguredOrDefaultResolution(a,t)=="forced"||o.dataParent instanceof Yn&&["shared","excluded","forced"].includes(o.dataParent.getConfiguredOrDefaultResolution(a,t)))&&o.getConfiguredOrDefaultResolution(a,t)!="excluded";)o=o.dataParent;t=="axis"&&wl(r)&&h3(a)?(o.resolutions[t][a]||(o.resolutions[t][a]=new YN(a)),o.resolutions[t][a].pushUnitView(this,r)):t=="scale"&&Ri(r)&&(o.resolutions[t][a]||(o.resolutions[t][a]=new VN(a)),o.resolutions[t][a].pushUnitView(this,r))}}getAccessor(t){return this._cache("accessor/"+t,()=>{const n=this.mark.encoding;if(n&&n[t])return this.context.accessorFactory.createAccessor(n[t])})}getFacetAccessor(t){const n=this.getAccessor("sample");return n||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}_validateDomainQuery(t){if(xl(t))throw new Error(`getDomain(${t}), must only be called for primary channels!`);const n=this.mark.encoding[t];if(!rn(n))throw new Error("The channel has no scale, cannot get domain!");return n}getConfiguredDomain(t){const n=this._validateDomainQuery(t),r=n&&n.scale&&n.scale.domain;if(r){const i=this.getScaleResolution(n.resolutionChannel??t);return dE(n.type??"nominal",i.fromComplexInterval(r))}}extractDataDomain(t){const r=this._validateDomainQuery(t).type??"nominal",i=s=>{let c;const l=this.mark.encoding[s];if(l){const u=this.context.accessorFactory.createAccessor(l);if(u)if(c=dE(r),u.constant)c.extend(u({}));else{const f=this.getCollector();f!=null&&f.completed&&f.visitData(h=>c.extend(u(h)))}}return c};let a=i(t);const o=em[t];if(o){const s=i(o);s&&a.extendAll(s)}return a}getZoomLevel(){const t=n=>{var r;return((r=this.getScaleResolution(n))==null?void 0:r.getZoomLevel())??1};return ns.map(t).reduce((n,r)=>n*r,1)}propagateInteractionEvent(t){this.handleInteractionEvent(void 0,t,!0),t.target=this,!t.stopped&&this.handleInteractionEvent(void 0,t,!1)}getDefaultResolution(t,n){return t=="x"?"shared":"independent"}}function*Qm(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of Qm(r,[...t,n]))yield i;else yield[[...t,n],r]}class Ol extends at{get behavior(){return zm}constructor(t){super(),this.params=t??{type:"collect"},this.observers=[],this.facetBatches=void 0,this._init()}_init(){this._data=[],this.facetBatches=new gi([],JSON.stringify),this.facetBatches.set(void 0,this._data)}reset(){super.reset(),this._init()}handle(t){this._data.push(t)}beginBatch(t){TL(t)&&(this._data=[],this.facetBatches.set(Lt(t.facetId),this._data))}complete(){var i,a;const t=(i=this.params)==null?void 0:i.sort,n=t?fv(t.field,t.order):void 0,r=o=>{n&&o.sort(n)};if((a=this.params.groupby)!=null&&a.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const o=this.params.groupby.map(c=>Oe(c)),s=o.length>1?Rc(this._data,...o):QN(this._data,o[0]);this.facetBatches.clear();for(const[c,l]of Qm(s))this.facetBatches.set(c,l)}for(const o of this.facetBatches.values())r(o);if(this.children.length)for(const[o,s]of this.facetBatches.entries()){if(o){const c={type:"facet",facetId:o};for(const l of this.children)l.beginBatch(c)}for(const c of s)this._propagate(c)}super.complete();for(const o of this.observers)o(this)}getData(){switch(this._checkStatus(),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const t=this.facetBatches;return{[Symbol.iterator]:function*(){for(const r of t.values())for(let i=0;i<r.length;i++)yield r[i]}}}}}visitData(t){this._checkStatus();for(const n of this.facetBatches.values())for(let r=0;r<n.length;r++)t(n[r])}getItemCount(){let t=0;for(const n of this.facetBatches.values())t+=n.length;return t}_checkStatus(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")}}function QN(e,t){const n=new Map;for(let r=0,i=e.length;r<i;r++){const a=e[r],o=t(a);let s=n.get(o);s||(s=[],n.set(o,s)),s.push(a)}return n}class Ll{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,n){let r=this.length++;for(;r>0;){const i=r-1>>1,a=this.values[i];if(n>=a)break;this.ids[r]=this.ids[i],this.values[r]=a,r=i}this.ids[r]=t,this.values[r]=n}pop(){if(this.length===0)return;const t=this.ids[0];if(this.length--,this.length>0){const n=this.ids[0]=this.ids[this.length],r=this.values[0]=this.values[this.length],i=this.length>>1;let a=0;for(;a<i;){let o=(a<<1)+1;const s=o+1;let c=this.ids[o],l=this.values[o];const u=this.values[s];if(s<this.length&&u<l&&(o=s,c=this.ids[s],l=u),l>=r)break;this.ids[a]=c,this.values[a]=l,a=o}this.ids[a]=n,this.values[a]=r}return t}peek(){if(this.length!==0)return this.ids[0]}peekValue(){if(this.length!==0)return this.values[0]}shrink(){this.ids.length=this.values.length=this.length}}class XN extends at{get behavior(){return mr}constructor(t){super(),this.params=t,this.startAccessor=Oe(t.start),this.endAccessor=Oe(t.end),this.chromAccessor=t.chrom?Oe(t.chrom):n=>{},this.weightAccessor=t.weight?Oe(t.weight):n=>1,this.as={coverage:t.as||"coverage",start:t.asStart||t.start,end:t.asEnd||t.end,chrom:t.asChrom||t.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([n,r])=>r).map(([n,r])=>`${JSON.stringify(r)}: ${n}`).join(", ")+"};"),this.ends=new Ll}reset(){super.reset(),this.initialize()}initialize(){const t=this.as.coverage,n=this.as.end,r=this.as.chrom,i=this.startAccessor,a=this.endAccessor,o=this.chromAccessor,s=this.weightAccessor;let c,l,u,f=0,h;const d=this.ends;d.clear();const p=(b,y,w)=>{if(b==y)return;let A=!1;c&&(c[t]===w?(c[n]=y,A=!0):c[t]!=0&&this._propagate(c)),A||(c=this.createSegment(b,y,w,u))},g=()=>{let b=0;for(;(b=d.peekValue())!==void 0;)p(h,b,f),h=b,f-=d.pop();h=void 0,c&&(this._propagate(c),c=void 0)};this.handle=b=>{const y=i(b);let w=0;for(;(w=d.peekValue())!==void 0&&w<y;)p(h,w,f),h=w,f-=d.pop();if(r){let x=o(b);x!==l&&(g(),u=x,l=u)}h!==void 0&&p(h,y,f),h=y;const A=s(b);f+=A,d.push(A,a(b))},this.complete=()=>{g(),super.complete()},this.beginBatch=b=>{g(),l=void 0,super.beginBatch(b)}}}function KN(e,t,n=0,r=e.length){const i=new Ll,a=r-n;let o;for(o=0;o<t&&o<a;o++)i.push(o,e[n+o]);for(;o<a;o++){const l=e[n+o];l>=i.peekValue()&&(i.push(o,l),i.pop())}const s=[];let c;for(;(c=i.pop())!==void 0;)s.push(n+c);return s.reverse()}class JN{constructor(t,n=-1/0,r=1/0){this.maxSize=t,this.lowerLimit=n,this.upperLimit=r;const i=this.maxSize*2+1;this.lowerLimits=new Float64Array(i),this.upperLimits=new Float64Array(i),this.lowerChildren=new Int32Array(i),this.upperChildren=new Int32Array(i),this.reset()}reset(){this.lowerLimits.fill(0),this.upperLimits.fill(0),this.lowerChildren.fill(0),this.upperChildren.fill(0),this.n=1,this.lowerLimits[0]=this.lowerLimit,this.upperLimits[0]=this.upperLimit}_findSlot(t,n,r=0){if(t>=this.lowerLimits[r]&&n<=this.upperLimits[r]){const i=this.lowerChildren[r];if(i){const a=this._findSlot(t,n,i);return a>=0?a:this._findSlot(t,n,this.upperChildren[r])}else return r}else return-1}reserve(t,n){if(n-t<=0)throw new Error("Cannot reserve an empty or negative-size slot!");if(this.n+1>this.lowerLimits.length)return!1;const r=this._findSlot(t,n);if(r<0)return!1;const i=this.n++,a=this.n++;return this.lowerLimits[i]=this.lowerLimits[r],this.upperLimits[i]=t,this.lowerLimits[a]=n,this.upperLimits[a]=this.upperLimits[r],this.lowerChildren[r]=i,this.upperChildren[r]=a,!0}}class ez extends at{get behavior(){return zm}constructor(t,n){if(super(),this.params=t,this._data=[],this.channel=t.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.posAccessor=Oe(this.params.pos),this.posBisector=Uf(this.posAccessor),this.scoreAccessor=Oe(this.params.score),this.widthAccessor=Oe(this.params.width),this.laneAccessor=this.params.lane?Oe(this.params.lane):i=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=n.getScaleResolution(this.channel);const r=()=>this._filterAndPropagate();this.schedule=()=>n.context.animator.requestTransition(r),this.resolution.addEventListener("domain",i=>this.schedule()),n._addBroadcastHandler("layoutComputed",()=>this.schedule())}complete(){const t=this.posAccessor;this._data.sort((n,r)=>t(n)-t(r)),this._scores=this._data.map(this.scoreAccessor);for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new JN(200));this.schedule(),super.complete()}_filterAndPropagate(){var o;super.reset();const t=this.resolution.getScale(),n=(o=this.resolution.members[0].view.coords)==null?void 0:o[this.channel=="x"?"width":"height"];if(!n)return;for(const s of this.reservationMaps.values())s.reset();const r=t.domain(),i=70,a=KN(this._scores,i,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of a){const c=this._data[s],l=t(this.posAccessor(c))*n,u=this.widthAccessor(c)/2+this.padding;this.reservationMaps.get(this.laneAccessor(c)).reserve(l-u,l+u)&&this._propagate(c)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class tz extends at{constructor(t){super(),this.params=t,this.predicate=void 0}initialize(){this.predicate=ch(this.params.expr,this.getGlobalObject())}handle(t){this.predicate(t)&&this._propagate(t)}}class nz extends at{get behavior(){return mr}constructor(t){super();const n=t.index;if(t.fields){const r=Lt(t.fields).map(a=>Oe(a)),i=Lt(t.as||t.fields);if(r.length!==i.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${i.length}) do not match!`);this.handle=a=>{const o=r.map((c,l)=>c(a)??[]),s=o[0].length;for(let c=0;c<s;c++){const l=Object.assign({},a);for(let u=0;u<r.length;u++)l[i[u]]=c<o[u].length?o[u][c]:null;n&&(l[n]=c),this._propagate(l)}}}else this.handle=r=>{for(let i=0;i<r.length;i++){const a=Object.assign({},r[i]);n&&(a[n]=i),this._propagate(a)}}}}const rz="0".charCodeAt(0);function*iz(e,t=","){const n=t.charCodeAt(0);let r=0;for(let i=0;i<e.length;i++){const a=e.charCodeAt(i);a==n?(yield r,r=0):r=r*10+a-rz}yield r}class az extends at{get behavior(){return mr}constructor(t){super();const n=Oe(t.exons??"exons"),r=Oe(t.start??"start"),[i,a]=t.as||["exonStart","exonEnd"];this.handle=o=>{let s=r(o),c=s,l=!0;const u=n(o);for(const f of iz(u)){if(l)c=s+f;else{s=c+f;const h=Object.assign({},o);h[i]=c,h[a]=s,this._propagate(h)}l=!l}}}}class oz extends at{get behavior(){return mr}constructor(t){super();const n=Lt(t.field).map(a=>Oe(a)),r=Lt(t.separator),i=Lt(t.as||t.field);if(n.length!==r.length||n.length!==i.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${n.length}), and "as" (${i.length}) do not match!`);this.handle=a=>{if(n.some(c=>!c(a)))return;const o=n.map((c,l)=>c(a).split(r[l]));sz(o,a);const s=o[0].length;for(let c=0;c<s;c++){const l=Object.assign({},a);for(let u=0;u<n.length;u++)l[i[u]]=o[u][c];this._propagate(l)}}}}function sz(e,t){const n=e.map(r=>r.length);if(!n.every(r=>r==n[0]))throw new Error("Mismatching number of elements in the fields to be split: "+JSON.stringify(t))}class cz extends at{get behavior(){return Li}constructor(t){super(),this.params=t,this.as=t.as,this.fn=void 0}initialize(){this.fn=ch(this.params.expr,this.getGlobalObject())}handle(t){t[this.as]=this.fn(t),this._propagate(t)}}class mE extends at{get behavior(){return Li}constructor(t,n){super();const r=t.channel??"x";if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const i=n.getScaleResolution(r).getGenome();if(!i)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const a=Oe(t.chrom),o=Lt(t.pos).map(p=>Oe(p)),s=Lt(t.as);if(o.length!=s.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=Lt(t.offset);let l;if(c.length==0)l=new Array(o.length).fill(0);else if(c.length==1)l=new Array(o.length).fill(c[0]);else if(c.length==o.length)l=c;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(t.offset)}!`);const u=new Function("datum","chromOffset","posAccessors",s.map((p,g)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${g}](datum) - ${l[g]};`).join(`
1695
1695
  `));let f,h=0;const d=p=>{if(p!==f){if(h=i.cumulativeChromPositions.get(p),h===void 0)throw new Error("Unknown chromosome/contig: "+p);f=p}return h};this.handle=p=>{u(p,d(a(p)),o),this._propagate(p)}}}const bE={pages:["Lato-Regular.png"],chars:[{id:87,width:53,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:43.491,chnl:15,x:0,y:0,page:0},{id:124,width:17,height:50,xoffset:0,yoffset:-32.193000000000005,xadvance:10.521,chnl:15,x:0,y:42,page:0},{id:40,width:20,height:49,xoffset:0,yoffset:-32.571000000000005,xadvance:11.214,chnl:15,x:0,y:94,page:0},{id:41,width:19,height:49,xoffset:0,yoffset:-32.571000000000005,xadvance:11.214,chnl:15,x:0,y:145,page:0},{id:36,width:32,height:49,xoffset:0,yoffset:-34.419000000000004,xadvance:24.360000000000003,chnl:15,x:0,y:196,page:0},{id:125,width:21,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.642000000000001,chnl:15,x:0,y:247,page:0},{id:91,width:22,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.852,chnl:15,x:0,y:297,page:0},{id:93,width:19,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.852,chnl:15,x:0,y:347,page:0},{id:123,width:21,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.642000000000001,chnl:15,x:0,y:397,page:0},{id:106,width:19,height:48,xoffset:0,yoffset:-30.639000000000003,xadvance:10.08,chnl:15,x:0,y:447,page:0},{id:81,width:43,height:47,xoffset:0,yoffset:-30.429000000000002,xadvance:33.621,chnl:15,x:21,y:447,page:0},{id:77,width:45,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:38.997,chnl:15,x:66,y:447,page:0},{id:64,width:43,height:44,xoffset:0,yoffset:-28.539,xadvance:35.133,chnl:15,x:23,y:397,page:0},{id:92,width:28,height:43,xoffset:0,yoffset:-30.933000000000003,xadvance:18.984,chnl:15,x:68,y:397,page:0},{id:47,width:28,height:43,xoffset:0,yoffset:-30.933000000000003,xadvance:18.984,chnl:15,x:98,y:397,page:0},{id:109,width:42,height:32,xoffset:0,yoffset:-21.609,xadvance:34.545,chnl:15,x:113,y:447,page:0},{id:119,width:42,height:31,xoffset:0,yoffset:-21.315,xadvance:32.991,chnl:15,x:157,y:447,page:0},{id:42,width:25,height:42,xoffset:0,yoffset:-31.626,xadvance:17.85,chnl:15,x:128,y:397,page:0},{id:37,width:42,height:41,xoffset:0,yoffset:-30.387,xadvance:33.663000000000004,chnl:15,x:155,y:397,page:0},{id:79,width:42,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:33.621,chnl:15,x:199,y:397,page:0},{id:102,width:24,height:41,xoffset:0,yoffset:-30.534000000000002,xadvance:14.721,chnl:15,x:243,y:397,page:0},{id:100,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.520000000000003,chnl:15,x:269,y:397,page:0},{id:98,width:32,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.520000000000003,chnl:15,x:302,y:397,page:0},{id:56,width:32,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:336,y:397,page:0},{id:38,width:40,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:29.904000000000003,chnl:15,x:370,y:397,page:0},{id:108,width:17,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:9.912,chnl:15,x:412,y:397,page:0},{id:107,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:21.336000000000002,chnl:15,x:431,y:397,page:0},{id:48,width:33,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:464,y:397,page:0},{id:71,width:38,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:30.681,chnl:15,x:21,y:347,page:0},{id:83,width:31,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:22.785,chnl:15,x:61,y:347,page:0},{id:63,width:27,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:18.795,chnl:15,x:94,y:347,page:0},{id:105,width:18,height:41,xoffset:0,yoffset:-30.639000000000003,xadvance:10.08,chnl:15,x:123,y:347,page:0},{id:51,width:32,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:143,y:347,page:0},{id:104,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.436,chnl:15,x:177,y:347,page:0},{id:67,width:37,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:28.056,chnl:15,x:210,y:347,page:0},{id:88,width:37,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.258000000000003,chnl:15,x:249,y:347,page:0},{id:68,width:40,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:31.941000000000003,chnl:15,x:288,y:347,page:0},{id:70,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:23.751,chnl:15,x:330,y:347,page:0},{id:34,width:23,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:15.561000000000002,chnl:15,x:364,y:347,page:0},{id:72,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:32.067,chnl:15,x:389,y:347,page:0},{id:73,width:18,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:11.760000000000002,chnl:15,x:429,y:347,page:0},{id:74,width:24,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:17.745,chnl:15,x:449,y:347,page:0},{id:75,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.825000000000003,chnl:15,x:24,y:297,page:0},{id:76,width:31,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:21.567,chnl:15,x:475,y:347,page:0},{id:66,width:35,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.153000000000002,chnl:15,x:64,y:297,page:0},{id:78,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:32.067,chnl:15,x:101,y:297,page:0},{id:33,width:18,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:11.298,chnl:15,x:141,y:297,page:0},{id:80,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:25.221,chnl:15,x:161,y:297,page:0},{id:65,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:28.434,chnl:15,x:197,y:297,page:0},{id:82,width:36,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:26.313000000000002,chnl:15,x:237,y:297,page:0},{id:35,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:275,y:297,page:0},{id:84,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.801000000000002,chnl:15,x:310,y:297,page:0},{id:85,width:37,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:30.891000000000002,chnl:15,x:346,y:297,page:0},{id:86,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:28.434,chnl:15,x:385,y:297,page:0},{id:39,width:16,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:8.568000000000001,chnl:15,x:425,y:297,page:0},{id:69,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.255000000000003,chnl:15,x:443,y:297,page:0},{id:89,width:36,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:26.208000000000002,chnl:15,x:23,y:247,page:0},{id:90,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:25.284000000000002,chnl:15,x:477,y:297,page:0},{id:49,width:31,height:40,xoffset:0,yoffset:-30.156000000000002,xadvance:24.360000000000003,chnl:15,x:61,y:247,page:0},{id:50,width:32,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:94,y:247,page:0},{id:57,width:32,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:128,y:247,page:0},{id:94,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:162,y:247,page:0},{id:96,width:21,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:16.8,chnl:15,x:196,y:247,page:0},{id:55,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:219,y:247,page:0},{id:54,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:254,y:247,page:0},{id:53,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:289,y:247,page:0},{id:52,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:323,y:247,page:0},{id:103,width:31,height:39,xoffset:0,yoffset:-21.630000000000003,xadvance:21.84,chnl:15,x:358,y:247,page:0},{id:112,width:32,height:39,xoffset:0,yoffset:-21.651,xadvance:23.541,chnl:15,x:391,y:247,page:0},{id:113,width:31,height:39,xoffset:0,yoffset:-21.651,xadvance:23.520000000000003,chnl:15,x:425,y:247,page:0},{id:116,width:25,height:39,xoffset:0,yoffset:-28.182000000000002,xadvance:15.057,chnl:15,x:458,y:247,page:0},{id:121,width:31,height:38,xoffset:0,yoffset:-21.273,xadvance:21.651,chnl:15,x:34,y:196,page:0},{id:59,width:18,height:36,xoffset:0,yoffset:-20.706,xadvance:10.983,chnl:15,x:485,y:247,page:0},{id:43,width:32,height:34,xoffset:0,yoffset:-24.486,xadvance:24.360000000000003,chnl:15,x:67,y:196,page:0},{id:60,width:30,height:33,xoffset:0,yoffset:-23.331000000000003,xadvance:24.360000000000003,chnl:15,x:101,y:196,page:0},{id:62,width:31,height:33,xoffset:0,yoffset:-23.331000000000003,xadvance:24.360000000000003,chnl:15,x:133,y:196,page:0},{id:117,width:30,height:32,xoffset:0,yoffset:-21.273,xadvance:23.415000000000003,chnl:15,x:166,y:196,page:0},{id:99,width:29,height:32,xoffset:0,yoffset:-21.609,xadvance:20.055,chnl:15,x:198,y:196,page:0},{id:110,width:31,height:32,xoffset:0,yoffset:-21.609,xadvance:23.436,chnl:15,x:229,y:196,page:0},{id:111,width:32,height:32,xoffset:0,yoffset:-21.609,xadvance:23.814,chnl:15,x:262,y:196,page:0},{id:126,width:32,height:26,xoffset:0,yoffset:-16.128,xadvance:24.360000000000003,chnl:15,x:201,y:447,page:0},{id:101,width:31,height:32,xoffset:0,yoffset:-21.609,xadvance:22.176000000000002,chnl:15,x:296,y:196,page:0},{id:114,width:25,height:32,xoffset:0,yoffset:-21.651,xadvance:15.288,chnl:15,x:329,y:196,page:0},{id:115,width:27,height:32,xoffset:0,yoffset:-21.609,xadvance:18.186,chnl:15,x:356,y:196,page:0},{id:97,width:28,height:32,xoffset:0,yoffset:-21.651,xadvance:20.874000000000002,chnl:15,x:385,y:196,page:0},{id:118,width:31,height:31,xoffset:0,yoffset:-21.273,xadvance:21.672,chnl:15,x:415,y:196,page:0},{id:61,width:31,height:29,xoffset:0,yoffset:-19.089000000000002,xadvance:24.360000000000003,chnl:15,x:448,y:196,page:0},{id:120,width:30,height:31,xoffset:0,yoffset:-21.273,xadvance:20.916,chnl:15,x:21,y:145,page:0},{id:58,width:18,height:31,xoffset:0,yoffset:-20.706,xadvance:10.5,chnl:15,x:53,y:145,page:0},{id:122,width:28,height:31,xoffset:0,yoffset:-21.273,xadvance:18.984,chnl:15,x:73,y:145,page:0},{id:95,width:28,height:16,xoffset:0,yoffset:0,xadvance:19.278000000000002,chnl:15,x:235,y:447,page:0},{id:45,width:23,height:24,xoffset:0,yoffset:-14.175,xadvance:15.603000000000002,chnl:15,x:481,y:196,page:0},{id:44,width:17,height:21,xoffset:0,yoffset:-4.956,xadvance:9.534,chnl:15,x:103,y:145,page:0},{id:46,width:18,height:15,xoffset:0,yoffset:-4.956,xadvance:9.912,chnl:15,x:0,y:497,page:0},{id:32,width:0,height:0,xoffset:0,yoffset:0,xadvance:10.752,chnl:15,x:20,y:497,page:0}],info:{face:"Lato Regular",size:42,bold:0,italic:0,charset:[" ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~"],unicode:1,stretchH:100,smooth:1,aa:1,padding:[0,0,0,0],spacing:[2,2]},common:{lineHeight:50.400000000000006,base:41.454,scaleW:512,scaleH:512,pages:1,packed:0,alphaChnl:0,redChnl:0,greenChnl:0,blueChnl:0},kernings:[]};class lz extends at{get behavior(){return Li}constructor(t){super();const n=Om(bE),r=Oe(t.field),i=t.as,a=t.fontSize;this.handle=o=>{const s=r(o);s!==void 0?o[i]=n.measureWidth(s,a):o[i]=0,this._propagate(o)}}}const uz=65536;class fz extends at{get behavior(){return Li}constructor(t){super(),this.params=t}reset(){super.reset(),this.initialize()}initialize(){const t=this.params,n=t.as||"lane",r=ft(t.spacing)?t.spacing:1,i=Oe(t.start),a=Oe(t.end);if(!t.preference!=!t.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(t.preference){const o=new Float64Array(uz),s=Oe(t.preference),c=t.preferredOrder;let l=1/0;this.handle=u=>{const f=i(u);f<l&&o.fill(-1/0),l=f;const h=c.indexOf(s(u));let d=-1;if(h>=0&&o[h]<f)d=h;else{const p=i(u);for(d=0;d<o.length&&!(o[d]<p);d++);if(d>=o.length)throw new Error("Out of lanes!")}o[d]=a(u)+r,u[n]=d,this._propagate(u)}}else{const o=new Ll,s=new Ll;let c=-1/0,l=0;this.handle=u=>{const f=i(u);for(;o.length&&(o.peekValue()<=f||f<c);){const d=o.pop();s.push(d,d)}c=f;let h=s.pop();h===void 0&&(h=l++),u[n]=h,this._propagate(u),o.push(h,a(u)+r)}}}}class hz extends at{get behavior(){return mr}constructor(t){if(super(),t.as&&t.as.length!=t.fields.length)throw new Error('"fields" and "as" have unequal lengths!');const n=t.fields.map(i=>Oe(i)),r=t.as?t.as:n.map(Vo);this.handle=i=>{const a={};for(let o=0;o<n.length;o++)a[r[o]]=n[o](i);this._propagate(a)}}}class dz extends at{get behavior(){return Li}constructor(t){super();const n=new RegExp(t.regex),r=typeof t.as=="string"?[t.as]:t.as,i=Oe(t.field);this.handle=a=>{const o=i(a);if(Me(o)){const s=o.match(n);if(s){if(s.length-1!=r.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let c=0;c<r.length;c++)a[r[c]]=s[c+1]}else if(t.skipInvalidInput)for(let c=0;c<r.length;c++)a[r[c]]=void 0;else throw new Error(`"${o}" does not match the given regex: ${n.toString()}`)}else if(!t.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof o}, field content: "${o}".`);this._propagate(a)}}}class pz extends at{get behavior(){return mr}constructor(t){super();const n=Lt(t.columnRegex).map(h=>new RegExp(h)),r=Lt(t.asValue);if(n.length!=r.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const i=t.skipRegex?new RegExp(t.skipRegex):void 0,a=t.asKey||"sample";let o,s,c;const l=h=>{var b;const d=Object.keys(h);for(const y of n)if(!d.some(w=>y.test(w)))throw new Error(`No columns matching the regex ${y.toString()} found in the data!`);const p=new Map;for(const[y,w]of n.entries())for(const A of d){const x=(b=w.exec(A))==null?void 0:b[1];if(x!==void 0){let C=p.get(x);C||(C=[],p.set(x,C)),C[y]=A}}o=[...p.entries()],s=d.filter(y=>!n.some(w=>w.test(y))&&!(i&&i.test(y)));const g=[...s.map(y=>JSON.stringify(y)+": datum["+JSON.stringify(y)+"]"),JSON.stringify(a)+": sampleId",...r.map((y,w)=>JSON.stringify(y)+`: datum[attrs[${w}]]`)];c=new Function("datum","sampleId","attrs",`return {
1696
1696
  `+g.join(`,
1697
1697
  `)+`
1698
- };`)},u=h=>{o||l(h);for(let d=0;d<o.length;d++){const[p,g]=o[d],b=c(h,p,g);this._propagate(b)}},f=h=>{l(h),u(h),this.handle=u};this.handle=f,this.beginBatch=h=>{qA(h)&&(this.handle=f),super.beginBatch(h)}}}class gz extends at{get behavior(){return Li}constructor(t){super(),this.params=t,this.buffer=[]}reset(){this.buffer=[]}handle(t){this.buffer.push(t)}complete(){const t=this.params,n=t.as||["y0","y1"],r=t.sort?fv(t.sort.field,t.sort.order):void 0,i=t.field?Oe(t.field):()=>1,a=t.groupby.map(u=>Oe(u)),o=JI(this.buffer,u=>a.map(f=>f(u)).join()).map(u=>u[1]);let s=u=>!0;if(t.baseField){const u=Oe(t.baseField);s=f=>u(f)!==null}let c,l;switch(t.offset){case"normalize":c=(u,f)=>u/f,l=(u,f)=>Gf(u,f);break;case"center":c=(u,f)=>u-f/2,l=(u,f)=>Gf(u,f);break;case"information":{const u=Math.log2(t.cardinality??4);c=(f,h)=>f/h,l=(f,h)=>{const p=Gf(f,w=>+!s(w)),g=Gf(f,h),b=g-p;let y=0;for(let w=0;w<f.length;w++){const A=f[w];if(s(A)){const x=h(A)/b;y-=x*Math.log2(x)}}return b/(u-(y+0))*(b/g)}}break;default:c=(u,f)=>u,l=(u,f)=>1}for(const u of o){r&&u.sort(r);const f=l(u,i);let h=0;for(const d of u){const p=h+i(d);s(d)&&(d[n[0]]=c(h,f),d[n[1]]=c(p,f),this._propagate(d),h=p)}}super.complete()}}class mz extends at{get behavior(){return mr}constructor(t){super();const n=Oe(t.field??"sequence"),[r,i]=t.as??["pos","sequence"];this.handle=a=>{const o=Object.assign({},a,{[i]:"",[r]:0}),s=n(a);for(let c=0;c<s.length;c++){const l=Object.assign({},o);l[r]=c,l[i]=s.charAt(c),this._propagate(l)}}}}class bz extends at{get behavior(){return mr}constructor(t){super(),this.params=t,this.buffer=[]}reset(){this.buffer=[]}handle(t){this.buffer.push(t)}complete(){const n=this.params.groupby,r=n.map(a=>Oe(a)),i=Rc(this.buffer,...r);for(const[a,o]of Qm(i)){const s={count:o.length};for(let c=0;c<n.length;c++)s[n[c]]=a[c];this._propagate(s)}super.complete()}}const yz="_uniqueId",yE=1e4,vE=[null];class wE extends at{get behavior(){return Li}constructor(t){super(),this.params=t,this.as=t.as??yz,this._blocks=[],this._usedBlocks=0,this._id=-1}initialize(){}reset(){super.reset(),this._usedBlocks=0,this._id=-1}handle(t){t[this.as]=this._nextId(),this._propagate(t)}_nextId(){return++this._id%yE==0&&(this._id=this._getBlock()*yE),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const t=vE.length;return vE[t]=this,this._blocks.push(t),this._usedBlocks++,t}}const xE={aggregate:bz,collect:Ol,coverage:XN,filterScoredLabels:ez,filter:tz,flatten:nz,flattenCompressedExons:az,flattenDelimited:oz,flattenSequence:mz,formula:cz,identifier:wE,linearizeGenomicCoordinate:mE,measureText:lz,pileup:fz,project:hz,regexExtract:dz,regexFold:pz,sample:WA,stack:gz};function vz(e,t){const n=xE[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function AE(e){if(!_E(e)&&!SE(e))return;const t={...e.format};if(t.type??(t.type=SE(e)&&wz(e.url)),t.parse??(t.parse="auto"),!t.type)throw new Error("Format for the data source was not defined and it could not be inferred: "+JSON.stringify(e));return t}function wz(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const EE=e=>typeof e!="object"?xz:Az,xz=e=>({data:e}),Az=e=>e;function SE(e){return"url"in e}class ms extends at{get identifier(){}handle(t){throw new Error("Source does not handle incoming data!")}async load(){}}function _E(e){return"values"in e}class Ez extends ms{constructor(t,n){var r;if(super(),this.params=t,typeof t.values=="string"&&!((r=t==null?void 0:t.format)!=null&&r.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}loadSynchronously(){const t=this.params.values;let n=[],r=i=>i;if(Array.isArray(t))t.length>0&&(n=t,r=EE(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=dw(t,AE(this.params));else throw new Error('"values" in data configuration is not an array, object, or a string!');this.reset(),this.beginBatch({type:"file"});for(const i of n)this._propagate(r(i));this.complete()}async load(){this.loadSynchronously()}}function Sz(e){return"url"in e}class _z extends ms{constructor(t,n){super(),this.params=t,this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}async load(){const t=this.params.url,n=Array.isArray(t)?t:[t],r=async a=>Zc({baseURL:this.baseUrl}).load(a).catch(o=>{throw new Error(`Cannot fetch: ${this.baseUrl}${a}: ${o.message}`)}),i=(a,o)=>{try{const s=dw(a,AE(this.params));this.beginBatch({type:"file",url:o});for(const c of s)this._propagate(c)}catch(s){throw new Error(`Cannot parse: ${o}: ${s.message}`)}};this.reset(),await Promise.all(n.map(a=>r(a).then(i))),this.complete()}}function Cz(e){return"sequence"in e}class kz extends ms{constructor(t,n){if(super(),this.sequence=t.sequence,!("start"in this.sequence))throw new Error("'start' is missing from sequence parameters!");if(!("stop"in this.sequence))throw new Error("'stop' is missing from sequence parameters!")}loadSynchronously(){const t=this.sequence.as||"data",n=this.sequence.step||1,r=this.sequence.stop;this.reset(),this.beginBatch({type:"file"});for(let i=this.sequence.start;i<r;i+=n)this._propagate({[t]:i});this.complete()}async load(){this.loadSynchronously()}}class Xm extends ms{constructor(n,r){super();zn(this,"initializedPromise",Promise.resolve());if(this.view=n,r){if(r!=="x"&&r!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${r}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the lazy data source. Must be either "x" or "y".');if(this.channel=r,this.scaleResolution=this.view.getScaleResolution(r),!this.scaleResolution){const a=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof mt||a.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(a.join(" "))}const i=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",i),this.view.context.addBroadcastListener("layoutComputed",i)}getAxisLength(){const n=this.scaleResolution.members.map(r=>{var i;return(i=r.view.coords)==null?void 0:i[this.channel==="x"?"width":"height"]}).filter(r=>r>0);return n.length?n.reduce((r,i)=>Math.min(r,i),1e4):0}get genome(){return this.scaleResolution.getGenome()}async onDomainChanged(n,r){}setLoadingStatus(n){this.view.context.setDataLoadingStatus(this.view,n)}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(n){this.reset(),this.beginBatch({type:"file"});for(const r of n)for(const i of r)this._propagate(i);this.complete(),Ym(this.view),this.requestRender()}}class Tz extends Xm{constructor(n,r){const i={axis:{},...n};super(r,i.channel);zn(this,"ticks",[]);this.params=n}async onDomainChanged(){const n=this.scaleResolution.getScale(),r=this.params.axis,i=this.getAxisLength(),a=l=>25+60*pg(100,700,l),o=ft(r.tickCount)?r.tickCount:Math.round(i/a(i)),s=nE(n,o,r.tickMinStep),c=r.values?rE(n,r.values,s):sN(n,s);if(!th(c,this.ticks)){this.ticks=c;const l=lN(n,o,r.format);this.publishData([c.map(u=>({value:u,label:l(u)}))])}}}class Iz extends Xm{constructor(t,n){super(n,t.channel)}async load(){this.publishData([this.genome.chromosomes])}}function Xa(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}function bs(e,t,n=!0){let r,i=o=>{};return function(...s){return new Promise((c,l)=>{const u=()=>{clearTimeout(r),i=f=>{},c(e(...s))};n&&i("debounced"),clearTimeout(r),i=l,r=window.setTimeout(u,t)})}}class Nl extends Xm{constructor(){super(...arguments);Z(this,hc,new AbortController);Z(this,ff,[0,0]);zn(this,"params")}setupDebouncing(n){n.debounce>0&&(n.debounceMode=="domain"?this.onDomainChanged=bs(this.onDomainChanged.bind(this),n.debounce,!1):n.debounceMode=="window"&&(this.loadInterval=bs(this.loadInterval.bind(this),n.debounce,!1)))}async onDomainChanged(n){var a;const r=((a=this.params)==null?void 0:a.windowSize)??-1;if(n[1]-n[0]>r)return;const i=this.quantizeInterval(n,r);this.checkAndUpdateLastInterval(i)&&(await this.initializedPromise,this.loadInterval(i))}async loadInterval(n){}async discretizeAndLoad(n,r){F(this,hc).abort(),this.setLoadingStatus(!0),le(this,hc,new AbortController);const i=F(this,hc).signal,a=this.genome.continuousToDiscreteChromosomeIntervals(n);try{const o=await Promise.all(a.map(async s=>r(s,i)));if(!i.aborted)return this.setLoadingStatus(!1),o}catch(o){if(!i.aborted)throw this.setLoadingStatus(!1),o}}quantizeInterval(n,r){return[Math.max(Math.floor(n[0]/r-1)*r,0),Math.min(Math.ceil(n[1]/r+1)*r,this.genome.totalSize)]}checkAndUpdateLastInterval(n){return th(F(this,ff),n)?!1:(le(this,ff,n),!0)}}hc=new WeakMap,ff=new WeakMap;class Rz extends Nl{constructor(t,n){const r={channel:"x",windowSize:7e3,debounce:200,debounceMode:"window",...t};if(super(n,r.channel),this.params=r,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>d6),Promise.resolve().then(()=>UY),Promise.resolve().then(()=>hu)]).then(([{Buffer:a},{IndexedFasta:o},{RemoteFile:s}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=a));const c=l=>new s(Xa(l,this.view.getBaseUrl()));this.fasta=new o({fasta:c(this.params.url),fai:c(this.params.indexUrl??this.params.url+".fai")}),i()})})}async loadInterval(t){const n=await this.discretizeAndLoad(t,async(r,i)=>this.fasta.getSequence(r.chrom,r.startPos,r.endPos,{signal:i}).then(a=>({chrom:r.chrom,start:r.startPos,sequence:a})));n&&this.publishData([n])}}class Dz extends Nl{constructor(n,r){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n};super(r,i.channel);Z(this,dc,[]);Z(this,pc,void 0);if(this.params=i,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>fk),Promise.resolve().then(()=>hu)]).then(([{BigWig:o},{RemoteFile:s}])=>{le(this,pc,new o({filehandle:new s(Xa(this.params.url,this.view.getBaseUrl()))})),F(this,pc).getHeader().then(c=>{le(this,dc,c.zoomLevels.map(l=>l.reductionLevel).reverse()),F(this,dc).push(1),a()})})})}async onDomainChanged(n){await this.initializedPromise;const r=this.getAxisLength()||700,i=Bz(n,r,F(this,dc)),a=Math.max(i*r,5e3),o=this.quantizeInterval(n,a);this.checkAndUpdateLastInterval(o)&&this.loadInterval(o,i)}async loadInterval(n,r){const i=.5/r/this.params.pixelsPerBin,a=await this.discretizeAndLoad(n,(o,s)=>F(this,pc).getFeatures(o.chrom,o.startPos,o.endPos,{scale:i,signal:s}).then(c=>c.map(l=>({chrom:o.chrom,start:l.start,end:l.end,score:l.score}))));a&&this.publishData(a)}}dc=new WeakMap,pc=new WeakMap;function Bz(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class Fz extends Nl{constructor(n,r){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n};super(r,i.channel);zn(this,"parser");zn(this,"bbi");zn(this,"parseLine");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>MK),Promise.resolve().then(()=>fk),Promise.resolve().then(()=>hu)]).then(([o,{BigBed:s},{RemoteFile:c}])=>{const l=o.default;this.bbi=new s({filehandle:new c(Xa(this.params.url,this.view.getBaseUrl()))}),this.bbi.getHeader().then(async u=>{this.parser=new l({autoSql:u.autoSql});try{const f=Pz(this.parser);this.parseLine=(h,d)=>f(h,d.start,d.end,d.rest)}catch{this.parseLine=(h,d)=>this.parser.parseLine(`${h} ${d.start} ${d.end} ${d.rest}`)}a()})})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>this.bbi.getFeatures(i.chrom,i.startPos,i.endPos,{signal:a}).then(o=>o.map(s=>this.parseLine(i.chrom,s))));r&&this.publishData(r)}}function Pz(e){const t=e.autoSql.fields.filter(y=>y.type).slice(3);let n=0,r="",i=0,a={};const o=" ",s=o.charCodeAt(0),c="0".charCodeAt(0),l="-".charCodeAt(0);function u(){let y=r.indexOf(o,n);y<0&&(y=i);const w=r.substring(n,y);return n=y+1,w}function f(){let y=0,w=r.charCodeAt(n),A=1;w===l&&(A=-1,n++,w=r.charCodeAt(n));do{if(w===s){n++;break}y=y*10+w-c,w=r.charCodeAt(++n)}while(n<i);return y*A}const h=t.map(y=>{const{name:w,type:A}=y;if(["ubyte","int","uint"].includes(A))return()=>{a[w]=f()};if(y.isNumeric)return()=>{a[w]=Number(u())};if(["char","string","lstring"].includes(A))return()=>{a[w]=u()};throw new Error("Unsupported type: "+A)}),d=t.map(y=>`"${y.name}": ${y.isNumeric?"0":"emptyString"}`),p=new Function(`
1698
+ };`)},u=h=>{o||l(h);for(let d=0;d<o.length;d++){const[p,g]=o[d],b=c(h,p,g);this._propagate(b)}},f=h=>{l(h),u(h),this.handle=u};this.handle=f,this.beginBatch=h=>{qA(h)&&(this.handle=f),super.beginBatch(h)}}}class gz extends at{get behavior(){return Li}constructor(t){super(),this.params=t,this.buffer=[]}reset(){this.buffer=[]}handle(t){this.buffer.push(t)}complete(){const t=this.params,n=t.as||["y0","y1"],r=t.sort?fv(t.sort.field,t.sort.order):void 0,i=t.field?Oe(t.field):()=>1,a=t.groupby.map(u=>Oe(u)),o=JI(this.buffer,u=>a.map(f=>f(u)).join()).map(u=>u[1]);let s=u=>!0;if(t.baseField){const u=Oe(t.baseField);s=f=>u(f)!==null}let c,l;switch(t.offset){case"normalize":c=(u,f)=>u/f,l=(u,f)=>Gf(u,f);break;case"center":c=(u,f)=>u-f/2,l=(u,f)=>Gf(u,f);break;case"information":{const u=Math.log2(t.cardinality??4);c=(f,h)=>f/h,l=(f,h)=>{const p=Gf(f,w=>+!s(w)),g=Gf(f,h),b=g-p;let y=0;for(let w=0;w<f.length;w++){const A=f[w];if(s(A)){const x=h(A)/b;y-=x*Math.log2(x)}}return b/(u-(y+0))*(b/g)}}break;default:c=(u,f)=>u,l=(u,f)=>1}for(const u of o){r&&u.sort(r);const f=l(u,i);let h=0;for(const d of u){const p=h+i(d);s(d)&&(d[n[0]]=c(h,f),d[n[1]]=c(p,f),this._propagate(d),h=p)}}super.complete()}}class mz extends at{get behavior(){return mr}constructor(t){super();const n=Oe(t.field??"sequence"),[r,i]=t.as??["pos","sequence"];this.handle=a=>{const o=Object.assign({},a,{[i]:"",[r]:0}),s=n(a);for(let c=0;c<s.length;c++){const l=Object.assign({},o);l[r]=c,l[i]=s.charAt(c),this._propagate(l)}}}}class bz extends at{get behavior(){return mr}constructor(t){super(),this.params=t,this.buffer=[]}reset(){this.buffer=[]}handle(t){this.buffer.push(t)}complete(){const n=this.params.groupby,r=n.map(a=>Oe(a)),i=Rc(this.buffer,...r);for(const[a,o]of Qm(i)){const s={count:o.length};for(let c=0;c<n.length;c++)s[n[c]]=a[c];this._propagate(s)}super.complete()}}const yz="_uniqueId",yE=1e4,vE=[null];class wE extends at{get behavior(){return Li}constructor(t){super(),this.params=t,this.as=t.as??yz,this._blocks=[],this._usedBlocks=0,this._id=-1}initialize(){}reset(){super.reset(),this._usedBlocks=0,this._id=-1}handle(t){t[this.as]=this._nextId(),this._propagate(t)}_nextId(){return++this._id%yE==0&&(this._id=this._getBlock()*yE),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const t=vE.length;return vE[t]=this,this._blocks.push(t),this._usedBlocks++,t}}const xE={aggregate:bz,collect:Ol,coverage:XN,filterScoredLabels:ez,filter:tz,flatten:nz,flattenCompressedExons:az,flattenDelimited:oz,flattenSequence:mz,formula:cz,identifier:wE,linearizeGenomicCoordinate:mE,measureText:lz,pileup:fz,project:hz,regexExtract:dz,regexFold:pz,sample:WA,stack:gz};function vz(e,t){const n=xE[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function AE(e){if(!_E(e)&&!SE(e))return;const t={...e.format};if(t.type??(t.type=SE(e)&&wz(e.url)),t.parse??(t.parse="auto"),!t.type)throw new Error("Format for the data source was not defined and it could not be inferred: "+JSON.stringify(e));return t}function wz(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const EE=e=>typeof e!="object"?xz:Az,xz=e=>({data:e}),Az=e=>e;function SE(e){return"url"in e}class ms extends at{get identifier(){}handle(t){throw new Error("Source does not handle incoming data!")}async load(){}}function _E(e){return"values"in e}class Ez extends ms{constructor(t,n){var r;if(super(),this.params=t,typeof t.values=="string"&&!((r=t==null?void 0:t.format)!=null&&r.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}loadSynchronously(){const t=this.params.values;let n=[],r=i=>i;if(Array.isArray(t))t.length>0&&(n=t,r=EE(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=dw(t,AE(this.params));else throw new Error('"values" in data configuration is not an array, object, or a string!');this.reset(),this.beginBatch({type:"file"});for(const i of n)this._propagate(r(i));this.complete()}async load(){this.loadSynchronously()}}function Sz(e){return"url"in e}class _z extends ms{constructor(t,n){super(),this.params=t,this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}async load(){const t=this.params.url,n=Array.isArray(t)?t:[t],r=async a=>Zc({baseURL:this.baseUrl}).load(a).catch(o=>{throw new Error(`Cannot fetch: ${this.baseUrl}${a}: ${o.message}`)}),i=(a,o)=>{try{const s=dw(a,AE(this.params));this.beginBatch({type:"file",url:o});for(const c of s)this._propagate(c)}catch(s){throw new Error(`Cannot parse: ${o}: ${s.message}`)}};this.reset(),await Promise.all(n.map(a=>r(a).then(i))),this.complete()}}function Cz(e){return"sequence"in e}class kz extends ms{constructor(t,n){if(super(),this.sequence=t.sequence,!("start"in this.sequence))throw new Error("'start' is missing from sequence parameters!");if(!("stop"in this.sequence))throw new Error("'stop' is missing from sequence parameters!")}loadSynchronously(){const t=this.sequence.as||"data",n=this.sequence.step||1,r=this.sequence.stop;this.reset(),this.beginBatch({type:"file"});for(let i=this.sequence.start;i<r;i+=n)this._propagate({[t]:i});this.complete()}async load(){this.loadSynchronously()}}class Xm extends ms{constructor(n,r){super();zn(this,"initializedPromise",Promise.resolve());if(this.view=n,r){if(r!=="x"&&r!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${r}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the lazy data source. Must be either "x" or "y".');if(this.channel=r,this.scaleResolution=this.view.getScaleResolution(r),!this.scaleResolution){const a=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof mt||a.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(a.join(" "))}const i=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",i),this.view.context.addBroadcastListener("layoutComputed",i)}getAxisLength(){const n=this.scaleResolution.members.map(r=>{var i;return(i=r.view.coords)==null?void 0:i[this.channel==="x"?"width":"height"]}).filter(r=>r>0);return n.length?n.reduce((r,i)=>Math.min(r,i),1e4):0}get genome(){return this.scaleResolution.getGenome()}async onDomainChanged(n,r){}setLoadingStatus(n){this.view.context.setDataLoadingStatus(this.view,n)}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(n){this.reset(),this.beginBatch({type:"file"});for(const r of n)for(const i of r)this._propagate(i);this.complete(),Ym(this.view),this.requestRender()}}class Tz extends Xm{constructor(n,r){const i={axis:{},...n};super(r,i.channel);zn(this,"ticks",[]);this.params=n}async onDomainChanged(){const n=this.scaleResolution.getScale(),r=this.params.axis,i=this.getAxisLength(),a=l=>25+60*pg(100,700,l),o=ft(r.tickCount)?r.tickCount:Math.round(i/a(i)),s=nE(n,o,r.tickMinStep),c=r.values?rE(n,r.values,s):sN(n,s);if(!th(c,this.ticks)){this.ticks=c;const l=lN(n,o,r.format);this.publishData([c.map(u=>({value:u,label:l(u)}))])}}}class Iz extends Xm{constructor(t,n){super(n,t.channel)}async load(){this.publishData([this.genome.chromosomes])}}function Xa(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}function bs(e,t,n=!0){let r,i=o=>{};return function(...s){return new Promise((c,l)=>{const u=()=>{clearTimeout(r),i=f=>{},c(e(...s))};n&&i("debounced"),clearTimeout(r),i=l,r=window.setTimeout(u,t)})}}class Nl extends Xm{constructor(){super(...arguments);Z(this,hc,new AbortController);Z(this,ff,[0,0]);zn(this,"params")}setupDebouncing(n){n.debounce>0&&(n.debounceMode=="domain"?this.onDomainChanged=bs(this.onDomainChanged.bind(this),n.debounce,!1):n.debounceMode=="window"&&(this.loadInterval=bs(this.loadInterval.bind(this),n.debounce,!1)))}async onDomainChanged(n){var a;const r=((a=this.params)==null?void 0:a.windowSize)??-1;if(n[1]-n[0]>r)return;const i=this.quantizeInterval(n,r);this.checkAndUpdateLastInterval(i)&&(await this.initializedPromise,this.loadInterval(i))}async loadInterval(n){}async discretizeAndLoad(n,r){F(this,hc).abort(),this.setLoadingStatus(!0),le(this,hc,new AbortController);const i=F(this,hc).signal,a=this.genome.continuousToDiscreteChromosomeIntervals(n);try{const o=await Promise.all(a.map(async s=>r(s,i)));if(!i.aborted)return this.setLoadingStatus(!1),o}catch(o){if(!i.aborted)throw this.setLoadingStatus(!1),o}}quantizeInterval(n,r){return[Math.max(Math.floor(n[0]/r-1)*r,0),Math.min(Math.ceil(n[1]/r+1)*r,this.genome.totalSize)]}checkAndUpdateLastInterval(n){return th(F(this,ff),n)?!1:(le(this,ff,n),!0)}}hc=new WeakMap,ff=new WeakMap;class Rz extends Nl{constructor(t,n){const r={channel:"x",windowSize:7e3,debounce:200,debounceMode:"window",...t};if(super(n,r.channel),this.params=r,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>d6),Promise.resolve().then(()=>$Y),Promise.resolve().then(()=>hu)]).then(([{Buffer:a},{IndexedFasta:o},{RemoteFile:s}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=a));const c=l=>new s(Xa(l,this.view.getBaseUrl()));this.fasta=new o({fasta:c(this.params.url),fai:c(this.params.indexUrl??this.params.url+".fai")}),i()})})}async loadInterval(t){const n=await this.discretizeAndLoad(t,async(r,i)=>this.fasta.getSequence(r.chrom,r.startPos,r.endPos,{signal:i}).then(a=>({chrom:r.chrom,start:r.startPos,sequence:a})));n&&this.publishData([n])}}class Dz extends Nl{constructor(n,r){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n};super(r,i.channel);Z(this,dc,[]);Z(this,pc,void 0);if(this.params=i,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>fk),Promise.resolve().then(()=>hu)]).then(([{BigWig:o},{RemoteFile:s}])=>{le(this,pc,new o({filehandle:new s(Xa(this.params.url,this.view.getBaseUrl()))})),F(this,pc).getHeader().then(c=>{le(this,dc,c.zoomLevels.map(l=>l.reductionLevel).reverse()),F(this,dc).push(1),a()})})})}async onDomainChanged(n){await this.initializedPromise;const r=this.getAxisLength()||700,i=Bz(n,r,F(this,dc)),a=Math.max(i*r,5e3),o=this.quantizeInterval(n,a);this.checkAndUpdateLastInterval(o)&&this.loadInterval(o,i)}async loadInterval(n,r){const i=.5/r/this.params.pixelsPerBin,a=await this.discretizeAndLoad(n,(o,s)=>F(this,pc).getFeatures(o.chrom,o.startPos,o.endPos,{scale:i,signal:s}).then(c=>c.map(l=>({chrom:o.chrom,start:l.start,end:l.end,score:l.score}))));a&&this.publishData(a)}}dc=new WeakMap,pc=new WeakMap;function Bz(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class Fz extends Nl{constructor(n,r){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n};super(r,i.channel);zn(this,"parser");zn(this,"bbi");zn(this,"parseLine");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>OK),Promise.resolve().then(()=>fk),Promise.resolve().then(()=>hu)]).then(([o,{BigBed:s},{RemoteFile:c}])=>{const l=o.default;this.bbi=new s({filehandle:new c(Xa(this.params.url,this.view.getBaseUrl()))}),this.bbi.getHeader().then(async u=>{this.parser=new l({autoSql:u.autoSql});try{const f=Pz(this.parser);this.parseLine=(h,d)=>f(h,d.start,d.end,d.rest)}catch{this.parseLine=(h,d)=>this.parser.parseLine(`${h} ${d.start} ${d.end} ${d.rest}`)}a()})})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>this.bbi.getFeatures(i.chrom,i.startPos,i.endPos,{signal:a}).then(o=>o.map(s=>this.parseLine(i.chrom,s))));r&&this.publishData(r)}}function Pz(e){const t=e.autoSql.fields.filter(w=>w.type).slice(3);let n=0,r="",i=0,a={};const o=" ",s=o.charCodeAt(0),c="0".charCodeAt(0),l="-".charCodeAt(0);function u(){let w=r.indexOf(o,n);w<0&&(w=i);const A=r.substring(n,w);return n=w+1,A}function f(){let w=0,A=r.charCodeAt(n),x=1;A===l&&(x=-1,n++,A=r.charCodeAt(n));do{if(A===s){n++;break}w=w*10+A-c,A=r.charCodeAt(++n)}while(n<i);return w*x}const h=t.map(w=>`${JSON.stringify(w.name)}: ${w.isNumeric?"0":"emptyString"}`),d=new Function(`
1699
1699
  const emptyString = "";
1700
1700
  return function makeTemplate(chrom, chromStart, chromEnd) {
1701
1701
  return {
1702
1702
  chrom,
1703
1703
  chromStart,
1704
1704
  chromEnd,
1705
- ${d.join(`,
1705
+ ${h.join(`,
1706
1706
  `)}
1707
1707
  }
1708
- };`)();function g(y){r=y,i=y.length,n=0}function b(y,w,A,x){g(x),a=p(y,w,A);for(let C=0,_=h.length;C<_;C++)h[C]();return a}return b}class Mz extends Nl{constructor(n,r){const i={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,i.channel);Z(this,Mo,void 0);zn(this,"chrPrefixFixer",n=>n);if(this.params=i,!this.params.url)throw new Error("No URL provided for BamSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>tJ),Promise.resolve().then(()=>hu)]).then(([{BamFile:o},{RemoteFile:s}])=>{const c=l=>new s(Xa(l,this.view.getBaseUrl()));le(this,Mo,new o({bamFilehandle:c(this.params.url),baiFilehandle:c(this.params.indexUrl??this.params.url+".bai")})),F(this,Mo).getHeader().then(l=>{var h,d;const u=this.genome.hasChrPrefix(),f=(d=(h=F(this,Mo).indexToChr)==null?void 0:h[0])==null?void 0:d.refName.startsWith("chr");u&&!f?this.chrPrefixFixer=p=>p.replace("chr",""):!u&&f&&(this.chrPrefixFixer=p=>"chr"+p),a()})})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>F(this,Mo).getRecordsForRange(this.chrPrefixFixer(i.chrom),i.startPos,i.endPos,{signal:a}).then(o=>o.map(s=>({chrom:i.chrom,start:s.get("start"),end:s.get("end"),name:s.get("name"),MD:s.get("MD"),cigar:s.get("cigar"),mapq:s.get("mq"),strand:s.get("strand")===1?"+":"-"}))));r&&this.publishData(r)}}Mo=new WeakMap;class Oz extends Nl{constructor(n,r){const i={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",...n};super(r,i.channel);Z(this,hf,void 0);if(this.params=i,!this.params.url)throw new Error("No URL provided for TabixSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>d6),Promise.resolve().then(()=>fJ),Promise.resolve().then(()=>hu)]).then(([{Buffer:o},{TabixIndexedFile:s},{RemoteFile:c}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const l=u=>new c(Xa(u,this.view.getBaseUrl()));le(this,hf,new s({filehandle:l(this.params.url),tbiFilehandle:l(this.params.indexUrl??this.params.url+".tbi")})),a()})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>{const o=[];return await F(this,hf).getLines(i.chrom,i.startPos,i.endPos,{lineCallback:s=>{o.push(s)},signal:a}),this._parseFeatures(o)});r&&this.publishData(r)}_parseFeatures(n){return[]}}hf=new WeakMap;class Lz extends Oz{constructor(n,r){super(n,r);Z(this,df,void 0);Promise.resolve().then(()=>ZJ).then(i=>{le(this,df,i.default)})}_parseFeatures(n){var i;return(i=F(this,df))==null?void 0:i.parseStringSync(n.join(`
1709
- `),{parseSequences:!1})}}df=new WeakMap;function CE(e,t){if(_E(e))return new Ez(e,t);if(Sz(e))return new _z(e,t);if(Cz(e))return new kz(e,t);if(Nz(e))return qz(e.lazy,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function Nz(e){return"lazy"in e}function zz(e){return(e==null?void 0:e.type)=="axisTicks"}function Uz(e){return(e==null?void 0:e.type)=="axisGenome"}function $z(e){return(e==null?void 0:e.type)=="indexedFasta"}function Hz(e){return(e==null?void 0:e.type)=="bigwig"}function Gz(e){return(e==null?void 0:e.type)=="bigbed"}function Vz(e){return(e==null?void 0:e.type)=="bam"}function jz(e){return(e==null?void 0:e.type)=="gff3"}function qz(e,t){if(zz(e))return new Tz(e,t);if(Uz(e))return new Iz(e,t);if($z(e))return new Rz(e,t);if(Hz(e))return new Dz(e,t);if(Gz(e))return new Fz(e,t);if(Vz(e))return new Mz(e,t);if(jz(e))return new Lz(e,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function Wz(e){const t=Object.keys(e).filter(r=>typeof r=="string"),n=new Function("source","return { "+t.map(r=>JSON.stringify(r)).map(r=>`${r}: source[${r}]`).join(`,
1710
- `)+" };");return n.properties=t,n}class nd extends at{get behavior(){return mr}constructor(){super();const t=n=>{const r=Wz(n);this.handle=i=>this._propagate(r(i)),this.handle(n)};this.handle=t,this.beginBatch=n=>{qA(n)&&(this.handle=t),super.beginBatch(n)}}}function Yz(e){return"name"in e}class kE extends ms{constructor(n,r,i){super();Z(this,pf,void 0);this.provider=i,this.params=n}get identifier(){return this.params.name}updateDynamicData(n){le(this,pf,n),this.loadSynchronously()}loadSynchronously(){const n=F(this,pf)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(n))n.length>0&&(r=EE(n[0]));else throw new Error(`Named data "${this.params.name}" is not an array!`);this.reset(),this.beginBatch({type:"file"});for(const i of n)this._propagate(r(i));this.complete()}async load(){this.loadSynchronously()}}pf=new WeakMap;class TE{constructor(){this._dataSourcesByHost=new Map,this._collectorsByHost=new Map,this._observers=new Map}get dataSources(){return[...new Set(this._dataSourcesByHost.values()).values()]}get collectors(){return[...this._collectorsByHost.values()]}addObserver(t,n){let r=this._observers.get(n);r||(r=[],this._observers.set(n,r)),r.push(t)}_relayObserverCallback(t,n){const r=this._observers.get(n);if(r)for(const i of r)i(t)}addDataSource(t,n){this._dataSourcesByHost.set(n,t)}findDataSourceByKey(t){return this._dataSourcesByHost.get(t)}findNamedDataSource(t){let n,r=[];for(const[i,a]of this._dataSourcesByHost.entries())if(a instanceof kE&&t==a.identifier){if(n&&n!==a)throw new Error(`Found multiple instances of named data: ${t}. Data flow optimization is broken (it's a bug).`);n=a,r.push(i)}if(n)return{dataSource:n,hosts:r}}addCollector(t,n){this._collectorsByHost.set(n,t),t.observers.push(r=>this._relayObserverCallback(r,n))}findCollectorByKey(t){return this._collectorsByHost.get(t)}initialize(){for(const t of this.dataSources)t.visit(n=>n.initialize())}}function IE(e,t){const n=new Map,r=[];for(const i of e)n.set(i,{ref:i,children:[]});for(const i of n.values()){const a=n.get(t(i.ref));a?a.children.push(i):r.push(i)}return r}function RE(e,t,n){var i,a;const r=(i=t.preOrder)==null?void 0:i.call(t,e);if(r)return r;for(const o of n(e)){const s=RE(o,t,n);if(s==="stop")return s}return(a=t.postOrder)==null?void 0:a.call(t,e)}function DE(e,t){return RE(e,t,n=>n.children)}function BE(e,t){const n=[];let r;const i=t??new TE,a=[];function o(f,h=()=>{}){if(!r)throw h()||new Error("Cannot append data flow node, no parent exist!");return r.addChild(f),r=f,f}function s(f,h){return o(f,()=>new Error(`Cannot append a transform because no (inherited) data are available! ${h?JSON.stringify(h):""}`))}function c(f,h){for(const d of f){let p;try{p=vz(d,h)}catch(g){throw console.warn(g),new Error(`Cannot initialize "${d.type}" transform: ${g}`)}p.behavior&Li&&s(new nd),s(p)}}const l=f=>{if(n.push(r),f.spec.data){const h=Yz(f.spec.data)?new kE(f.spec.data,f,f.context.getNamedDataFromProvider):CE(f.spec.data,f);r=h,i.addDataSource(h,f)}if(f.spec.transform&&c(f.spec.transform,f),f instanceof mt){if(!r)throw new Error(`A unit view (${f.getPathString()}) has no (inherited) data source`);const h=Zz(f);if(h){a.push(h.rewrite);for(const p of h.transforms)s(p)}f.mark.isPickingParticipant()&&(s(new nd),s(new wE({type:"identifier"})));const d=new Ol({type:"collect",groupby:f.getFacetFields(),sort:Qz(f,h==null?void 0:h.rewrittenEncoding)});o(d),i.addCollector(d,f)}},u=IE(e.getDescendants(),f=>f.dataParent);for(const f of u)DE(f,{preOrder:h=>l(h.ref),postOrder:()=>{r=n.pop()}});return a.forEach(f=>f()),i}function Zz(e){var a;const t=[],n={},r=[];for(const[o,s]of Object.entries(e.getEncoding())){const c=o;wl(c)&&f3(s)&&r.push({channel:c,chromPosDef:s})}const i=Rc(r,o=>$a(o.channel),o=>o.chromPosDef.chrom);for(const[o,s]of i.entries())for(const[c,l]of s.entries()){const u=[],f=[],h=[];for(const{channel:d,chromPosDef:p}of l){const g=w=>w.replace(/[^A-Za-z0-9_]/g,""),b=["_linearized_",g(p.chrom),"_",g(p.pos)].join(""),y={...((a=e.spec.encoding)==null?void 0:a[d])??e.getEncoding()[d]??{},field:b};delete y.chrom,delete y.pos,!y.type&&p.type&&(y.type=p.type),n[d]=y,u.push(p.pos),h.push(p.offset??0),f.push(b)}t.push(new nd),t.push(new mE({type:"linearizeGenomicCoordinate",channel:o,chrom:c,pos:u,offset:h,as:f},e))}return t.length?{transforms:t,rewrittenEncoding:n,rewrite:()=>{e.spec.encoding={...e.spec.encoding,...n},NA(e.mark,"encoding")}}:void 0}function Qz(e,t){var r;const n={...e.getEncoding(),...t}.x;if(rn(n)&&(r=e.getScaleResolution("x"))!=null&&r.isZoomable()){if(Ur(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!vl(n)){if(kh(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function Xz(e,...t){let n=e;for(const a of t)n.addChild(a),n=a;let r;n instanceof Ol?r=n:(r=new Ol,n.addChild(r));let i;return e instanceof ms?i=async()=>(await e.load(),r.getData()):i=async()=>{throw new Error("The root node is not derived from DataSource!")},{dataSource:e,collector:r,loadAndCollect:i}}function FE(e,t=void 0){if(e.parent!==t)return!1;for(const n of e.children)if(!FE(n,e))return!1;return!0}function Km(e,t=!1){if(e.behavior&zm&&(t=!0),e instanceof nd)if(t)t=!1;else{const n=e.children[0];e.excise(),n&&Km(n,t);return}e.behavior&mr&&(t=!1);for(let n=0,r=e.children.length;n<r;n++)Km(e.children[n],t||r>1)}function Kz(e){const t=[...e._dataSourcesByHost.entries()],n=new Map;for(const r of t){const i=r[1];i.identifier&&!n.has(i.identifier)&&n.set(i.identifier,i)}e._dataSourcesByHost.clear();for(let[r,i]of t){const a=n.get(i.identifier);a&&(a.adoptChildrenOf(i),i=a),e.addDataSource(i,r)}}function Jz(e){if(Km(e),!FE(e))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function eU(e){for(const t of e.dataSources)Jz(t);Kz(e)}function PE(e){const t=new Set;e.visit(n=>{for(const r of Object.values(n.resolutions.scale)){const i=r.name;if(i&&t.has(i))throw new Error(`The same scale name "${i}" occurs in multiple scale resolutions!`);t.add(i)}})}function tU(e){for(const t of ns){const n=e.getScaleResolution(t);n&&!n.name&&n.isZoomable()&&(n.name=`${t}_at_root`)}}function nU(e){const t=[];return e.visit(n=>{if(n instanceof mt){const r=n.getEncoding();for(const[i,a]of Object.entries(r))Ur(a)&&"type"in a&&t.push({view:n,channel:i,field:a.field,type:a.type});return KA}}),t}async function rU(e,t,n){var o;if(!e.import.url)throw new Error("Cannot import, not an import spec: "+JSON.stringify(e));const r=Zc({baseURL:t}),i=e.import.url,a=JSON.parse(await r.load(i).catch(s=>{throw new Error(`Could not load imported view spec: ${i}
1711
- Reason: ${s.message}`)}));if(n.isViewSpec(a))return a.baseUrl=(o=i.match(/^[^?#]*\//))==null?void 0:o[0],a;throw new Error(`The imported spec "${i}" is not a view spec: ${JSON.stringify(e)}`)}function ME(e){const t=[];return e.visit(n=>{t.push(n)}),new Set([...eR(t,n=>n.length,n=>n.name)].filter(([n,r])=>r==1&&n!==void 0).map(([n,r])=>n))}const iU=e=>!/^(layer|concat)\d+$/.test(e);function aU(e){const t=e.getSize().addPadding(e.getOverhang()),n=r=>r.grow>0?void 0:r.px;return{width:n(t.width),height:n(t.height)}}function Vr(e){return()=>e}const ar=class ar{static create(t,n,r,i){return new ar(Vr(t),Vr(n),Vr(r),Vr(i))}_offset(t,n){const r=this["_"+t];if(n===0)return r;switch(typeof n){case"number":return()=>r()+n;case"function":return()=>r()+n();default:throw new Error("Not a number of function")}}_passThrough(t){return this._offset(t,0)}constructor(t,n,r,i){this._x=t,this._y=n,this._width=r,this._height=i}get x(){return this._x()}get y(){return this._y()}get width(){return this._width()}get height(){return this._height()}get x2(){return this._x()+this._width()}get y2(){return this._y()+this._height()}equals(t){return t?this===t||this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height:!1}modify(t){if(!Object.keys(t).length)return this;const n=r=>{const i=t[r];return typeof i=="number"?Vr(i):typeof i=="function"?i:this._passThrough(r)};return new ar(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new ar(this._offset("x",t),this._offset("y",n),this._passThrough("width"),this._passThrough("height"))}translateBy(t){return this.translate(t.x,t.y)}expand(t,n=1){return t.left==0&&t.top==0&&t.right==0&&t.bottom==0?this:new ar(t.left?this._offset("x",-t.left*n):this._passThrough("x"),t.top?this._offset("y",-t.top*n):this._passThrough("y"),t.width?this._offset("width",t.width*n):this._passThrough("width"),t.height?this._offset("height",t.height*n):this._passThrough("height"))}shrink(t){return this.expand(t,-1)}intersect(t){return this===t||t==null?this:new ar(()=>Math.max(this.x,t.x),()=>Math.max(this.y,t.y),()=>Math.min(this.x2,t.x2)-Math.max(this.x,t.x),()=>Math.min(this.y2,t.y2)-Math.max(this.y,t.y))}union(t){return this===t||t==null?this:new ar(()=>Math.min(this.x,t.x),()=>Math.min(this.y,t.y),()=>Math.max(this.x2,t.x2)-Math.min(this.x,t.x),()=>Math.max(this.y2,t.y2)-Math.min(this.y,t.y))}isDefined(){return this.width>=0&&this.height>=0}flatten(){return new ar(Vr(this.x),Vr(this.y),Vr(this.width),Vr(this.height))}containsPoint(t,n){return t>=this.x&&t<this.x2&&n>=this.y&&n<this.y2}normalizePoint(t,n){return{x:(t-this.x)/this.width,y:(n-this.y)/this.height}}toString(){return`Rectangle: x: ${this.x}, y: ${this.y}, width: ${this.width}, height: ${this.height}`}toRoundedString(){return`Rectangle: x: ${Math.round(this.x)}, y: ${Math.round(this.y)}, width: ${Math.round(this.width)}, height: ${Math.round(this.height)}`}};zn(ar,"ZERO",ar.create(0,0,0,0));let Zn=ar;class OE{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class LE extends OE{constructor(t,n){super(t),this.webGLHelper=n,this.buffer=[],this.coords=void 0,this.views=new Set}pushView(t,n){this.views.add(t),this.coords=n}renderMark(t,n){if(this.globalOptions.picking&&!t.isPickingParticipant())return;const r=t.render(n);r&&this.buffer.push({mark:t,callback:r,coords:this.coords,clipRect:n.clipRect})}render(){if(this.batch||this._buildBatch(),this.batch.length==0)return;const t=this.webGLHelper.gl,n=this.globalOptions.picking;t.bindFramebuffer(t.FRAMEBUFFER,n?this.webGLHelper._pickingBufferInfo.framebuffer:null),this.webGLHelper.clearAll();for(const r of this.views)r.onBeforeRender();for(const r of this.batch)r();n&&t.bindFramebuffer(t.FRAMEBUFFER,null)}_buildBatch(){this.batch=[];let t=!0,n=!0;const r=o=>()=>{t&&o()},i=o=>()=>{t&&n&&o()},a=Rc(this.buffer.reverse(),o=>o.mark);for(const[o,s]of[...a.entries()].reverse()){if(!o.isReady())continue;this.batch.push(()=>{t=o.unitView.getEffectiveOpacity()>0}),this.batch.push(...o.prepareRender(this.globalOptions).map(l=>r(l)));let c;for(const l of s){const u=l.coords;u.equals(c)||this.batch.push(r(()=>{n=o.setViewport(u,l.clipRect)})),this.batch.push(i(l.callback)),c=l.coords}}}}class oU extends OE{constructor(...t){super({}),this.contexts=t}pushView(t,n){for(const r of this.contexts)r.pushView(t,n)}popView(t){for(const n of this.contexts)n.popView(t)}renderMark(t,n){for(const r of this.contexts)r.renderMark(t,n)}}class sU{constructor(t,n){this.point=t,this.uiEvent=n,this.stopped=!1,this.target=void 0}stopPropagation(){this.stopped=!0}get type(){return this.uiEvent.type}}class cU{constructor(t,n){this.x=t,this.y=n}equals(t){return t?t===this||t.x===this.x&&t.y===this.y:!1}}const lU=e=>new Promise(t=>setTimeout(t,e));function rd(e){const t=e.requestAnimationFrame||window.requestAnimationFrame,n=e.signal,r=()=>new Promise((i,a)=>{if(n!=null&&n.aborted)return a("aborted");const o=performance.now(),s=o+(e.duration||1e3),c=typeof e.from=="number"?e.from:0,l=typeof e.to=="number"?e.to:1,u=e.easingFunction||(g=>g),f=g=>(g-o)/(s-o),h=g=>g*(l-c)+c,d=g=>Math.max(0,Math.min(1,g)),p=g=>{n!=null&&n.aborted?a("aborted"):(e.onUpdate(h(u(d(f(g))))),g<s?t(p):(e.onUpdate(h(u(1))),i()))};t(p)});return e.delay?n!=null&&n.aborted?Promise.reject("aborted"):lU(e.delay).then(r):r()}class uU{constructor(t){this._renderCallback=t,this._renderRequested=!1,this._warn=!1,this.transitions=[]}requestTransition(t){this.cancelTransition(t),this.transitions.push(t),this.requestRender()}cancelTransition(t){const n=this.transitions.indexOf(t);n>=0&&this.transitions.splice(n,1)}requestRender(){this._renderRequested?this._warn&&console.warn("Render already requested!"):(this._renderRequested=!0,window.requestAnimationFrame(t=>{this._renderRequested=!1;const n=this.transitions;this.transitions=[];let r;for(;r=n.shift();)r(t);this._renderCallback(t)}))}transition(t){return rd({requestAnimationFrame:n=>this.requestTransition(n),...t})}}class fU{constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new BN(t);return this.genomes.set(n.name,n),Promise.all([...this.genomes.values()].map(r=>r.load(this.baseUrl)))}getGenome(t){if(!this.genomes.size)throw new Error("No genomes have been configured!");if(t){const n=this.genomes.get(t);if(!n)throw new Error(`No genome with the name ${t} has been configured!`);return n}else{if(this.genomes.size>1)throw new Error("Cannot pick a default genome! More than one have been configured!");return this.genomes.values().next().value}}}const hU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMhERycB36XD+hX0/DuzSlsnw3OfyilcwAA/vn/yzQQMoUHg9r59hhn7Oz/njH9ncJAiAXNj9P2qTxdhARETufgDYNs4fsH/Cv2jL53nzm1lcZH2dngKCP/Gnn/LTEiXg+Tw/Q+btvJ1+/vlPfvYz/v1vEwA26w4fs8lm4R4GgIiIAmB5GdvGnmbuh9Rq8MIXcuMGpVJ6AFhEXNwneOI//OfnSz8fL49/jI+9lJcecjjJJD15Ho8+yo9/TKUCb7J5vY1tcw+JiOgMILYJc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+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",dU={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class pU{constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new gi([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:Om(bE),texture:t?this._createTextureNow(hU):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(Me(r)&&(r=dU[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const i={family:t,style:n,weight:r};let a=this._fonts.get(i);return a||(a={metrics:void 0,texture:void 0},this._fonts.set(i,a),this._promises.push(this._loadFontEntry(a,i))),a}async _loadFontEntry(t,n){try{const r=await this._loadMetadata(n.family),i=mU(r,n),a=this.fontRepository+NE(n.family)+"/"+i.replace(/\.\w+/,""),o=this._createTexture(a+".png"),s=this._loadFont(a+".json");t.texture=await o,t.metrics=await s}catch(r){console.log("Cannot load font. Using default.",r),t.metrics=this._defaultFontEntry.metrics,t.texture=this._defaultFontEntry.texture}}_loadFont(t){let n=this._fontPromises.get(t);return n||(n=fetch(t).then(r=>{if(!r.ok)throw new Error("Could not load font: "+r.status);return r}).then(r=>r.json()).then(r=>Om(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=NE(t);let r=this._metadataPromises.get(n);return r||(r=fetch(this.fontRepository+n+"/METADATA.pb").then(i=>{if(!i.ok)throw new Error("Could not load font metadata: "+i.status);return i}).then(i=>i.text()).then(i=>gU(i)).catch(i=>{console.warn(i)}),this._metadataPromises.set(n,r)),r}getDefaultFont(){return this._defaultFontEntry}_createTexture(t){const n=this._webGLHelper.gl;return new Promise((r,i)=>{kl(n,{src:t,min:n.LINEAR},(a,o,s)=>{a?i(a):r(o)})})}_createTextureNow(t){const n=this._webGLHelper.gl;let r;const i=new Promise((a,o)=>{r=kl(n,{src:t,min:n.LINEAR},(s,c,l)=>{s?o(s):a(c)})});return this._promises.push(i),r}}function NE(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function gU(e){const t=e.split(`
1712
- `),n=[];let r;for(const i of t)if(i.startsWith("fonts {")&&(r={name:void 0,style:void 0,weight:void 0,filename:void 0,post_script_name:void 0,full_name:void 0,copyright:void 0}),i.startsWith("}")&&(n.push(r),r=void 0),r){let a=i.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(a){const o=a[1];r[o]=a[2]}if(a=i.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),a){const o=a[1];r[o]=+a[2]}}return n}function mU(e,t){let n,r=Number.POSITIVE_INFINITY;for(const i of e)if(t.family.localeCompare(i.name,void 0,{sensitivity:"accent"})==0&&t.style==i.style){const a=Math.abs(t.weight-i.weight);a<r&&(r=a,n=i)}return n==null?void 0:n.filename}function bU(e,t){const n=[];let r;for(const i of e.split(`
1713
- `))if(i.startsWith(">"))r={identifier:i.match(/>(\S+)/)[1],sequence:""},n.push(r);else if(r)r.sequence+=i.trim();else throw new Error("Invalid fasta file!");return n}class yU{constructor(t,n){this.animator=t,this.disabled=!!n,this.damping=.015,this.acceleration=.3,this.accelerationThreshold=100,this.lowerLimit=.5,this.loop=!1,this.momentum=0,this.timestamp=0,this.callback=null,this._transitionCallback=this.animate.bind(this),this.clear()}clear(){this.momentum=0,this.timestamp=null,this.loop=null,this.callback=null}cancel(){this.loop&&(this.animator.cancelTransition(this._transitionCallback),this.clear())}setMomentum(t,n){if(this.disabled){n(t);return}t*this.momentum<0?this.momentum=0:Math.abs(t)>this.accelerationThreshold?this.momentum=dv([this.momentum,t],this.acceleration):this.momentum=t,this.callback=n,this.loop||this.animate()}animate(t){this.callback(this.momentum);const n=t-this.timestamp||0;this.timestamp=t;const r=Math.abs(this.momentum);this.momentum=Math.sign(this.momentum)*Math.max(0,r-((r*this.damping)**1.5+.04)*n),Math.abs(this.momentum)>this.lowerLimit?(this.loop=!0,this.animator.requestTransition(this._transitionCallback)):this.clear()}}function vU(e){const t={},n=["string","number","boolean"],r=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const i in e){const a=i;!r.includes(i)&&n.includes(typeof e[a])&&(t[a]=e[a])}return t}const zE=new Map;async function wU(e,t,n){const r=e.symbol;let i=zE.get(r)??await EU(e.symbol);return i?(zE.set(r,i),$`
1708
+ };`)(),p=t.map(w=>{const A=w.type,x=JSON.stringify(w.name);if(["ubyte","int","uint"].includes(A))return`d[${x}] = parseInt();`;if(w.isNumeric)return`d[${x}] = Number(parseString());`;if(["char","string","lstring"].includes(A))return`d[${x}] = parseString();`;throw new Error("Unsupported type: "+A)}),g=Mz(p,50).map((w,A)=>Function("parseInt","parseString",`return function parseFieldChunk${A}(d) {
1709
+ ${w.join(`
1710
+ `)}
1711
+ }`)(f,u));function b(w){r=w,i=w.length,n=0}function y(w,A,x,C){b(C),a=d(w,A,x);for(const _ of g)_(a);return a}return y}function Mz(e,t){return Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t))}class Oz extends Nl{constructor(n,r){const i={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,i.channel);Z(this,Mo,void 0);zn(this,"chrPrefixFixer",n=>n);if(this.params=i,!this.params.url)throw new Error("No URL provided for BamSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>nJ),Promise.resolve().then(()=>hu)]).then(([{BamFile:o},{RemoteFile:s}])=>{const c=l=>new s(Xa(l,this.view.getBaseUrl()));le(this,Mo,new o({bamFilehandle:c(this.params.url),baiFilehandle:c(this.params.indexUrl??this.params.url+".bai")})),F(this,Mo).getHeader().then(l=>{var h,d;const u=this.genome.hasChrPrefix(),f=(d=(h=F(this,Mo).indexToChr)==null?void 0:h[0])==null?void 0:d.refName.startsWith("chr");u&&!f?this.chrPrefixFixer=p=>p.replace("chr",""):!u&&f&&(this.chrPrefixFixer=p=>"chr"+p),a()})})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>F(this,Mo).getRecordsForRange(this.chrPrefixFixer(i.chrom),i.startPos,i.endPos,{signal:a}).then(o=>o.map(s=>({chrom:i.chrom,start:s.get("start"),end:s.get("end"),name:s.get("name"),MD:s.get("MD"),cigar:s.get("cigar"),mapq:s.get("mq"),strand:s.get("strand")===1?"+":"-"}))));r&&this.publishData(r)}}Mo=new WeakMap;class Lz extends Nl{constructor(n,r){const i={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",...n};super(r,i.channel);Z(this,hf,void 0);if(this.params=i,!this.params.url)throw new Error("No URL provided for TabixSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>d6),Promise.resolve().then(()=>hJ),Promise.resolve().then(()=>hu)]).then(([{Buffer:o},{TabixIndexedFile:s},{RemoteFile:c}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const l=u=>new c(Xa(u,this.view.getBaseUrl()));le(this,hf,new s({filehandle:l(this.params.url),tbiFilehandle:l(this.params.indexUrl??this.params.url+".tbi")})),a()})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>{const o=[];return await F(this,hf).getLines(i.chrom,i.startPos,i.endPos,{lineCallback:s=>{o.push(s)},signal:a}),this._parseFeatures(o)});r&&this.publishData(r)}_parseFeatures(n){return[]}}hf=new WeakMap;class Nz extends Lz{constructor(n,r){super(n,r);Z(this,df,void 0);Promise.resolve().then(()=>QJ).then(i=>{le(this,df,i.default)})}_parseFeatures(n){var i;return(i=F(this,df))==null?void 0:i.parseStringSync(n.join(`
1712
+ `),{parseSequences:!1})}}df=new WeakMap;function CE(e,t){if(_E(e))return new Ez(e,t);if(Sz(e))return new _z(e,t);if(Cz(e))return new kz(e,t);if(zz(e))return Wz(e.lazy,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function zz(e){return"lazy"in e}function Uz(e){return(e==null?void 0:e.type)=="axisTicks"}function $z(e){return(e==null?void 0:e.type)=="axisGenome"}function Hz(e){return(e==null?void 0:e.type)=="indexedFasta"}function Gz(e){return(e==null?void 0:e.type)=="bigwig"}function Vz(e){return(e==null?void 0:e.type)=="bigbed"}function jz(e){return(e==null?void 0:e.type)=="bam"}function qz(e){return(e==null?void 0:e.type)=="gff3"}function Wz(e,t){if(Uz(e))return new Tz(e,t);if($z(e))return new Iz(e,t);if(Hz(e))return new Rz(e,t);if(Gz(e))return new Dz(e,t);if(Vz(e))return new Fz(e,t);if(jz(e))return new Oz(e,t);if(qz(e))return new Nz(e,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function Yz(e){const t=Object.keys(e).filter(r=>typeof r=="string"),n=new Function("source","return { "+t.map(r=>JSON.stringify(r)).map(r=>`${r}: source[${r}]`).join(`,
1713
+ `)+" };");return n.properties=t,n}class nd extends at{get behavior(){return mr}constructor(){super();const t=n=>{const r=Yz(n);this.handle=i=>this._propagate(r(i)),this.handle(n)};this.handle=t,this.beginBatch=n=>{qA(n)&&(this.handle=t),super.beginBatch(n)}}}function Zz(e){return"name"in e}class kE extends ms{constructor(n,r,i){super();Z(this,pf,void 0);this.provider=i,this.params=n}get identifier(){return this.params.name}updateDynamicData(n){le(this,pf,n),this.loadSynchronously()}loadSynchronously(){const n=F(this,pf)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(n))n.length>0&&(r=EE(n[0]));else throw new Error(`Named data "${this.params.name}" is not an array!`);this.reset(),this.beginBatch({type:"file"});for(const i of n)this._propagate(r(i));this.complete()}async load(){this.loadSynchronously()}}pf=new WeakMap;class TE{constructor(){this._dataSourcesByHost=new Map,this._collectorsByHost=new Map,this._observers=new Map}get dataSources(){return[...new Set(this._dataSourcesByHost.values()).values()]}get collectors(){return[...this._collectorsByHost.values()]}addObserver(t,n){let r=this._observers.get(n);r||(r=[],this._observers.set(n,r)),r.push(t)}_relayObserverCallback(t,n){const r=this._observers.get(n);if(r)for(const i of r)i(t)}addDataSource(t,n){this._dataSourcesByHost.set(n,t)}findDataSourceByKey(t){return this._dataSourcesByHost.get(t)}findNamedDataSource(t){let n,r=[];for(const[i,a]of this._dataSourcesByHost.entries())if(a instanceof kE&&t==a.identifier){if(n&&n!==a)throw new Error(`Found multiple instances of named data: ${t}. Data flow optimization is broken (it's a bug).`);n=a,r.push(i)}if(n)return{dataSource:n,hosts:r}}addCollector(t,n){this._collectorsByHost.set(n,t),t.observers.push(r=>this._relayObserverCallback(r,n))}findCollectorByKey(t){return this._collectorsByHost.get(t)}initialize(){for(const t of this.dataSources)t.visit(n=>n.initialize())}}function IE(e,t){const n=new Map,r=[];for(const i of e)n.set(i,{ref:i,children:[]});for(const i of n.values()){const a=n.get(t(i.ref));a?a.children.push(i):r.push(i)}return r}function RE(e,t,n){var i,a;const r=(i=t.preOrder)==null?void 0:i.call(t,e);if(r)return r;for(const o of n(e)){const s=RE(o,t,n);if(s==="stop")return s}return(a=t.postOrder)==null?void 0:a.call(t,e)}function DE(e,t){return RE(e,t,n=>n.children)}function BE(e,t){const n=[];let r;const i=t??new TE,a=[];function o(f,h=()=>{}){if(!r)throw h()||new Error("Cannot append data flow node, no parent exist!");return r.addChild(f),r=f,f}function s(f,h){return o(f,()=>new Error(`Cannot append a transform because no (inherited) data are available! ${h?JSON.stringify(h):""}`))}function c(f,h){for(const d of f){let p;try{p=vz(d,h)}catch(g){throw console.warn(g),new Error(`Cannot initialize "${d.type}" transform: ${g}`)}p.behavior&Li&&s(new nd),s(p)}}const l=f=>{if(n.push(r),f.spec.data){const h=Zz(f.spec.data)?new kE(f.spec.data,f,f.context.getNamedDataFromProvider):CE(f.spec.data,f);r=h,i.addDataSource(h,f)}if(f.spec.transform&&c(f.spec.transform,f),f instanceof mt){if(!r)throw new Error(`A unit view (${f.getPathString()}) has no (inherited) data source`);const h=Qz(f);if(h){a.push(h.rewrite);for(const p of h.transforms)s(p)}f.mark.isPickingParticipant()&&(s(new nd),s(new wE({type:"identifier"})));const d=new Ol({type:"collect",groupby:f.getFacetFields(),sort:Xz(f,h==null?void 0:h.rewrittenEncoding)});o(d),i.addCollector(d,f)}},u=IE(e.getDescendants(),f=>f.dataParent);for(const f of u)DE(f,{preOrder:h=>l(h.ref),postOrder:()=>{r=n.pop()}});return a.forEach(f=>f()),i}function Qz(e){var a;const t=[],n={},r=[];for(const[o,s]of Object.entries(e.getEncoding())){const c=o;wl(c)&&f3(s)&&r.push({channel:c,chromPosDef:s})}const i=Rc(r,o=>$a(o.channel),o=>o.chromPosDef.chrom);for(const[o,s]of i.entries())for(const[c,l]of s.entries()){const u=[],f=[],h=[];for(const{channel:d,chromPosDef:p}of l){const g=w=>w.replace(/[^A-Za-z0-9_]/g,""),b=["_linearized_",g(p.chrom),"_",g(p.pos)].join(""),y={...((a=e.spec.encoding)==null?void 0:a[d])??e.getEncoding()[d]??{},field:b};delete y.chrom,delete y.pos,!y.type&&p.type&&(y.type=p.type),n[d]=y,u.push(p.pos),h.push(p.offset??0),f.push(b)}t.push(new nd),t.push(new mE({type:"linearizeGenomicCoordinate",channel:o,chrom:c,pos:u,offset:h,as:f},e))}return t.length?{transforms:t,rewrittenEncoding:n,rewrite:()=>{e.spec.encoding={...e.spec.encoding,...n},NA(e.mark,"encoding")}}:void 0}function Xz(e,t){var r;const n={...e.getEncoding(),...t}.x;if(rn(n)&&(r=e.getScaleResolution("x"))!=null&&r.isZoomable()){if(Ur(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!vl(n)){if(kh(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function Kz(e,...t){let n=e;for(const a of t)n.addChild(a),n=a;let r;n instanceof Ol?r=n:(r=new Ol,n.addChild(r));let i;return e instanceof ms?i=async()=>(await e.load(),r.getData()):i=async()=>{throw new Error("The root node is not derived from DataSource!")},{dataSource:e,collector:r,loadAndCollect:i}}function FE(e,t=void 0){if(e.parent!==t)return!1;for(const n of e.children)if(!FE(n,e))return!1;return!0}function Km(e,t=!1){if(e.behavior&zm&&(t=!0),e instanceof nd)if(t)t=!1;else{const n=e.children[0];e.excise(),n&&Km(n,t);return}e.behavior&mr&&(t=!1);for(let n=0,r=e.children.length;n<r;n++)Km(e.children[n],t||r>1)}function Jz(e){const t=[...e._dataSourcesByHost.entries()],n=new Map;for(const r of t){const i=r[1];i.identifier&&!n.has(i.identifier)&&n.set(i.identifier,i)}e._dataSourcesByHost.clear();for(let[r,i]of t){const a=n.get(i.identifier);a&&(a.adoptChildrenOf(i),i=a),e.addDataSource(i,r)}}function eU(e){if(Km(e),!FE(e))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function tU(e){for(const t of e.dataSources)eU(t);Jz(e)}function PE(e){const t=new Set;e.visit(n=>{for(const r of Object.values(n.resolutions.scale)){const i=r.name;if(i&&t.has(i))throw new Error(`The same scale name "${i}" occurs in multiple scale resolutions!`);t.add(i)}})}function nU(e){for(const t of ns){const n=e.getScaleResolution(t);n&&!n.name&&n.isZoomable()&&(n.name=`${t}_at_root`)}}function rU(e){const t=[];return e.visit(n=>{if(n instanceof mt){const r=n.getEncoding();for(const[i,a]of Object.entries(r))Ur(a)&&"type"in a&&t.push({view:n,channel:i,field:a.field,type:a.type});return KA}}),t}async function iU(e,t,n){var o;if(!e.import.url)throw new Error("Cannot import, not an import spec: "+JSON.stringify(e));const r=Zc({baseURL:t}),i=e.import.url,a=JSON.parse(await r.load(i).catch(s=>{throw new Error(`Could not load imported view spec: ${i}
1714
+ Reason: ${s.message}`)}));if(n.isViewSpec(a))return a.baseUrl=(o=i.match(/^[^?#]*\//))==null?void 0:o[0],a;throw new Error(`The imported spec "${i}" is not a view spec: ${JSON.stringify(e)}`)}function ME(e){const t=[];return e.visit(n=>{t.push(n)}),new Set([...eR(t,n=>n.length,n=>n.name)].filter(([n,r])=>r==1&&n!==void 0).map(([n,r])=>n))}const aU=e=>!/^(layer|concat)\d+$/.test(e);function oU(e){const t=e.getSize().addPadding(e.getOverhang()),n=r=>r.grow>0?void 0:r.px;return{width:n(t.width),height:n(t.height)}}function Vr(e){return()=>e}const ar=class ar{static create(t,n,r,i){return new ar(Vr(t),Vr(n),Vr(r),Vr(i))}_offset(t,n){const r=this["_"+t];if(n===0)return r;switch(typeof n){case"number":return()=>r()+n;case"function":return()=>r()+n();default:throw new Error("Not a number of function")}}_passThrough(t){return this._offset(t,0)}constructor(t,n,r,i){this._x=t,this._y=n,this._width=r,this._height=i}get x(){return this._x()}get y(){return this._y()}get width(){return this._width()}get height(){return this._height()}get x2(){return this._x()+this._width()}get y2(){return this._y()+this._height()}equals(t){return t?this===t||this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height:!1}modify(t){if(!Object.keys(t).length)return this;const n=r=>{const i=t[r];return typeof i=="number"?Vr(i):typeof i=="function"?i:this._passThrough(r)};return new ar(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new ar(this._offset("x",t),this._offset("y",n),this._passThrough("width"),this._passThrough("height"))}translateBy(t){return this.translate(t.x,t.y)}expand(t,n=1){return t.left==0&&t.top==0&&t.right==0&&t.bottom==0?this:new ar(t.left?this._offset("x",-t.left*n):this._passThrough("x"),t.top?this._offset("y",-t.top*n):this._passThrough("y"),t.width?this._offset("width",t.width*n):this._passThrough("width"),t.height?this._offset("height",t.height*n):this._passThrough("height"))}shrink(t){return this.expand(t,-1)}intersect(t){return this===t||t==null?this:new ar(()=>Math.max(this.x,t.x),()=>Math.max(this.y,t.y),()=>Math.min(this.x2,t.x2)-Math.max(this.x,t.x),()=>Math.min(this.y2,t.y2)-Math.max(this.y,t.y))}union(t){return this===t||t==null?this:new ar(()=>Math.min(this.x,t.x),()=>Math.min(this.y,t.y),()=>Math.max(this.x2,t.x2)-Math.min(this.x,t.x),()=>Math.max(this.y2,t.y2)-Math.min(this.y,t.y))}isDefined(){return this.width>=0&&this.height>=0}flatten(){return new ar(Vr(this.x),Vr(this.y),Vr(this.width),Vr(this.height))}containsPoint(t,n){return t>=this.x&&t<this.x2&&n>=this.y&&n<this.y2}normalizePoint(t,n){return{x:(t-this.x)/this.width,y:(n-this.y)/this.height}}toString(){return`Rectangle: x: ${this.x}, y: ${this.y}, width: ${this.width}, height: ${this.height}`}toRoundedString(){return`Rectangle: x: ${Math.round(this.x)}, y: ${Math.round(this.y)}, width: ${Math.round(this.width)}, height: ${Math.round(this.height)}`}};zn(ar,"ZERO",ar.create(0,0,0,0));let Zn=ar;class OE{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class LE extends OE{constructor(t,n){super(t),this.webGLHelper=n,this.buffer=[],this.coords=void 0,this.views=new Set}pushView(t,n){this.views.add(t),this.coords=n}renderMark(t,n){if(this.globalOptions.picking&&!t.isPickingParticipant())return;const r=t.render(n);r&&this.buffer.push({mark:t,callback:r,coords:this.coords,clipRect:n.clipRect})}render(){if(this.batch||this._buildBatch(),this.batch.length==0)return;const t=this.webGLHelper.gl,n=this.globalOptions.picking;t.bindFramebuffer(t.FRAMEBUFFER,n?this.webGLHelper._pickingBufferInfo.framebuffer:null),this.webGLHelper.clearAll();for(const r of this.views)r.onBeforeRender();for(const r of this.batch)r();n&&t.bindFramebuffer(t.FRAMEBUFFER,null)}_buildBatch(){this.batch=[];let t=!0,n=!0;const r=o=>()=>{t&&o()},i=o=>()=>{t&&n&&o()},a=Rc(this.buffer.reverse(),o=>o.mark);for(const[o,s]of[...a.entries()].reverse()){if(!o.isReady())continue;this.batch.push(()=>{t=o.unitView.getEffectiveOpacity()>0}),this.batch.push(...o.prepareRender(this.globalOptions).map(l=>r(l)));let c;for(const l of s){const u=l.coords;u.equals(c)||this.batch.push(r(()=>{n=o.setViewport(u,l.clipRect)})),this.batch.push(i(l.callback)),c=l.coords}}}}class sU extends OE{constructor(...t){super({}),this.contexts=t}pushView(t,n){for(const r of this.contexts)r.pushView(t,n)}popView(t){for(const n of this.contexts)n.popView(t)}renderMark(t,n){for(const r of this.contexts)r.renderMark(t,n)}}class cU{constructor(t,n){this.point=t,this.uiEvent=n,this.stopped=!1,this.target=void 0}stopPropagation(){this.stopped=!0}get type(){return this.uiEvent.type}}class lU{constructor(t,n){this.x=t,this.y=n}equals(t){return t?t===this||t.x===this.x&&t.y===this.y:!1}}const uU=e=>new Promise(t=>setTimeout(t,e));function rd(e){const t=e.requestAnimationFrame||window.requestAnimationFrame,n=e.signal,r=()=>new Promise((i,a)=>{if(n!=null&&n.aborted)return a("aborted");const o=performance.now(),s=o+(e.duration||1e3),c=typeof e.from=="number"?e.from:0,l=typeof e.to=="number"?e.to:1,u=e.easingFunction||(g=>g),f=g=>(g-o)/(s-o),h=g=>g*(l-c)+c,d=g=>Math.max(0,Math.min(1,g)),p=g=>{n!=null&&n.aborted?a("aborted"):(e.onUpdate(h(u(d(f(g))))),g<s?t(p):(e.onUpdate(h(u(1))),i()))};t(p)});return e.delay?n!=null&&n.aborted?Promise.reject("aborted"):uU(e.delay).then(r):r()}class fU{constructor(t){this._renderCallback=t,this._renderRequested=!1,this._warn=!1,this.transitions=[]}requestTransition(t){this.cancelTransition(t),this.transitions.push(t),this.requestRender()}cancelTransition(t){const n=this.transitions.indexOf(t);n>=0&&this.transitions.splice(n,1)}requestRender(){this._renderRequested?this._warn&&console.warn("Render already requested!"):(this._renderRequested=!0,window.requestAnimationFrame(t=>{this._renderRequested=!1;const n=this.transitions;this.transitions=[];let r;for(;r=n.shift();)r(t);this._renderCallback(t)}))}transition(t){return rd({requestAnimationFrame:n=>this.requestTransition(n),...t})}}class hU{constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new BN(t);return this.genomes.set(n.name,n),Promise.all([...this.genomes.values()].map(r=>r.load(this.baseUrl)))}getGenome(t){if(!this.genomes.size)throw new Error("No genomes have been configured!");if(t){const n=this.genomes.get(t);if(!n)throw new Error(`No genome with the name ${t} has been configured!`);return n}else{if(this.genomes.size>1)throw new Error("Cannot pick a default genome! More than one have been configured!");return this.genomes.values().next().value}}}const dU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMhERycB36XD+hX0/DuzSlsnw3OfyilcwAA/vn/yzQQMoUHg9r59hhn7Oz/njH9ncJAiAXNj9P2qTxdhARETufgDYNs4fsH/Cv2jL53nzm1lcZH2dngKCP/Gnn/LTEiXg+Tw/Q+btvJ1+/vlPfvYz/v1vEwA26w4fs8lm4R4GgIiIAmB5GdvGnmbuh9Rq8MIXcuMGpVJ6AFhEXNwneOI//OfnSz8fL49/jI+9lJcecjjJJD15Ho8+yo9/TKUCb7J5vY1tcw+JiOgMILYJcDpNuFQKq5+neMrFbRXLnI+fu7im6KlSCS9fqXDBccLb31siIgqARBOu1SiV8DzKZbpr0nRxWxnQqs8tv51lol/2Xf63qlS6euOpKYZIREQ7ANOHTYdu1SDL/wMOlguFlxW+Hf8dujMX9ryrNx4KEREFgGXd9BQoWu97S0vLbU36T4EOD6NwGf78R0REAZBoxWaJ3qqDA9Kcx3p9YXW1sLLSCoBM5jIV+i7/gwCWl8Nbzs0xLCIiCgDbDiub7b8JMF3exT3kMOM4a3bLmuNczoX22ScpPluK33KIREQUALmc2QS0KjGqT3BxzWKf2VmKhl0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cAAAAASUVORK5CYII=",pU={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class gU{constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new gi([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:Om(bE),texture:t?this._createTextureNow(dU):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(Me(r)&&(r=pU[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const i={family:t,style:n,weight:r};let a=this._fonts.get(i);return a||(a={metrics:void 0,texture:void 0},this._fonts.set(i,a),this._promises.push(this._loadFontEntry(a,i))),a}async _loadFontEntry(t,n){try{const r=await this._loadMetadata(n.family),i=bU(r,n),a=this.fontRepository+NE(n.family)+"/"+i.replace(/\.\w+/,""),o=this._createTexture(a+".png"),s=this._loadFont(a+".json");t.texture=await o,t.metrics=await s}catch(r){console.log("Cannot load font. Using default.",r),t.metrics=this._defaultFontEntry.metrics,t.texture=this._defaultFontEntry.texture}}_loadFont(t){let n=this._fontPromises.get(t);return n||(n=fetch(t).then(r=>{if(!r.ok)throw new Error("Could not load font: "+r.status);return r}).then(r=>r.json()).then(r=>Om(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=NE(t);let r=this._metadataPromises.get(n);return r||(r=fetch(this.fontRepository+n+"/METADATA.pb").then(i=>{if(!i.ok)throw new Error("Could not load font metadata: "+i.status);return i}).then(i=>i.text()).then(i=>mU(i)).catch(i=>{console.warn(i)}),this._metadataPromises.set(n,r)),r}getDefaultFont(){return this._defaultFontEntry}_createTexture(t){const n=this._webGLHelper.gl;return new Promise((r,i)=>{kl(n,{src:t,min:n.LINEAR},(a,o,s)=>{a?i(a):r(o)})})}_createTextureNow(t){const n=this._webGLHelper.gl;let r;const i=new Promise((a,o)=>{r=kl(n,{src:t,min:n.LINEAR},(s,c,l)=>{s?o(s):a(c)})});return this._promises.push(i),r}}function NE(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function mU(e){const t=e.split(`
1715
+ `),n=[];let r;for(const i of t)if(i.startsWith("fonts {")&&(r={name:void 0,style:void 0,weight:void 0,filename:void 0,post_script_name:void 0,full_name:void 0,copyright:void 0}),i.startsWith("}")&&(n.push(r),r=void 0),r){let a=i.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(a){const o=a[1];r[o]=a[2]}if(a=i.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),a){const o=a[1];r[o]=+a[2]}}return n}function bU(e,t){let n,r=Number.POSITIVE_INFINITY;for(const i of e)if(t.family.localeCompare(i.name,void 0,{sensitivity:"accent"})==0&&t.style==i.style){const a=Math.abs(t.weight-i.weight);a<r&&(r=a,n=i)}return n==null?void 0:n.filename}function yU(e,t){const n=[];let r;for(const i of e.split(`
1716
+ `))if(i.startsWith(">"))r={identifier:i.match(/>(\S+)/)[1],sequence:""},n.push(r);else if(r)r.sequence+=i.trim();else throw new Error("Invalid fasta file!");return n}class vU{constructor(t,n){this.animator=t,this.disabled=!!n,this.damping=.015,this.acceleration=.3,this.accelerationThreshold=100,this.lowerLimit=.5,this.loop=!1,this.momentum=0,this.timestamp=0,this.callback=null,this._transitionCallback=this.animate.bind(this),this.clear()}clear(){this.momentum=0,this.timestamp=null,this.loop=null,this.callback=null}cancel(){this.loop&&(this.animator.cancelTransition(this._transitionCallback),this.clear())}setMomentum(t,n){if(this.disabled){n(t);return}t*this.momentum<0?this.momentum=0:Math.abs(t)>this.accelerationThreshold?this.momentum=dv([this.momentum,t],this.acceleration):this.momentum=t,this.callback=n,this.loop||this.animate()}animate(t){this.callback(this.momentum);const n=t-this.timestamp||0;this.timestamp=t;const r=Math.abs(this.momentum);this.momentum=Math.sign(this.momentum)*Math.max(0,r-((r*this.damping)**1.5+.04)*n),Math.abs(this.momentum)>this.lowerLimit?(this.loop=!0,this.animator.requestTransition(this._transitionCallback)):this.clear()}}function wU(e){const t={},n=["string","number","boolean"],r=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const i in e){const a=i;!r.includes(i)&&n.includes(typeof e[a])&&(t[a]=e[a])}return t}const zE=new Map;async function xU(e,t,n){const r=e.symbol;let i=zE.get(r)??await SU(e.symbol);return i?(zE.set(r,i),$`
1714
1717
  <div class="title">
1715
1718
  <strong>${i.name}</strong>
1716
1719
  ${i.description}
1717
1720
  </div>
1718
1721
  <p class="summary">${i.summary}</p>
1719
1722
  <p class="source">Source: NCBI RefSeq Gene</p>
1720
- `):null}async function xU(e){console.log("Searching: "+e);const t={mode:"cors"},r=(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&term=${e}[GENE]&sort=relevance&retmode=json`,t).then(i=>i.json())).esearchresult.idlist[0];return r?(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id=${r}&retmode=json`,t).then(o=>o.json())).result[r]:null}const AU=bs(xU,500);function EU(e){return AU(e)}const SU=pt(".4~r"),_U=pt(".4~e");function Jm(e){return e==null?$` <span class="na">NA</span> `:Me(e)?e.substring(0,30):Number.isInteger(e)?""+e:ft(e)?Math.abs(e)>Math.pow(10,8)||Math.abs(e)<Math.pow(10,-8)?_U(e):SU(e):kc(e)?e?"True":"False":Qt(e)?$`${e.map((t,n)=>[Jm(t),n<e.length-1?", ":ue])}`:"?"+typeof e+" "+e}async function CU(e,t,n){const r=(c,l)=>{var u;for(const[f,h]of Object.entries(t.encoders))if((u=h==null?void 0:h.accessor)!=null&&u.fields.includes(c))switch(f){case"color":case"fill":case"stroke":return $`
1723
+ `):null}async function AU(e){console.log("Searching: "+e);const t={mode:"cors"},r=(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&term=${e}[GENE]&sort=relevance&retmode=json`,t).then(i=>i.json())).esearchresult.idlist[0];return r?(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id=${r}&retmode=json`,t).then(o=>o.json())).result[r]:null}const EU=bs(AU,500);function SU(e){return EU(e)}const _U=pt(".4~r"),CU=pt(".4~e");function Jm(e){return e==null?$` <span class="na">NA</span> `:Me(e)?e.substring(0,30):Number.isInteger(e)?""+e:ft(e)?Math.abs(e)>Math.pow(10,8)||Math.abs(e)<Math.pow(10,-8)?CU(e):_U(e):kc(e)?e?"True":"False":Qt(e)?$`${e.map((t,n)=>[Jm(t),n<e.length-1?", ":ue])}`:"?"+typeof e+" "+e}async function kU(e,t,n){const r=(c,l)=>{var u;for(const[f,h]of Object.entries(t.encoders))if((u=h==null?void 0:h.accessor)!=null&&u.fields.includes(c))switch(f){case"color":case"fill":case"stroke":return $`
1721
1724
  <span
1722
1725
  class="color-legend"
1723
1726
  style=${`background-color: ${h(l)}`}
@@ -1735,20 +1738,20 @@ Reason: ${s.message}`)}));if(n.isViewSpec(a))return a.baseUrl=(o=i.match(/^[^?#]
1735
1738
  <div class="title">
1736
1739
  <strong>${o}</strong>
1737
1740
  </div>
1738
- `:"";return $`${s}${a}`}class Ka extends Yn{constructor(n,r,i,a,o,s){super(n,r,i,a,o,s);Z(this,si,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){le(this,si,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!od(i)&&!ad(i))throw new Za("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return F(this,si).slice()}*[Symbol.iterator](){for(const n of F(this,si))yield n}render(n,r,i={}){if(super.render(n,r,i),!!this.isConfiguredVisible()){n.pushView(this,r);for(const a of F(this,si))a.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=F(this,si).length-1;r>=0;r--)if(F(this,si)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}si=new WeakMap;class UE{constructor(t,n){this.n=t,this.maxCols=n??1/0}get nRows(){return this.maxCols==1/0?1:Math.ceil(this.n/this.maxCols)}get nCols(){return Math.min(this.n,this.maxCols)}get rowIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<r;i++){const a=[];t.push(a);for(let o=0;o<n;o++){const s=i*n+o;s<this.n&&a.push(s)}}return t}get colIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<n;i++){const a=[];t.push(a);for(let o=0;o<r;o++){const s=o*n+i;s<this.n&&a.push(s)}}return t}getCellIndex(t,n){let r=0;if(this.maxCols==1/0)r=n==0?t:void 0;else{if(t>=this.maxCols)return;r=n*this.nCols+t}return r<this.n?r:void 0}getCellCoords(t){if(!(t<0||t>=this.n))return[t%this.nCols,Math.floor(t/this.nCols)]}}const kU="chromosome_ticks_and_labels",TU={x:"width",y:"height"};function e1(e){return e=="x"?"y":"x"}const id={x:["bottom","top"],y:["left","right"]},t1=Object.fromEntries(Object.entries(id).map(([e,t])=>t.map(n=>[n,e])).flat(1));function Ni(e){return t1[e]}class n1 extends Ka{constructor(t,n,r,i,a,o){const s=n=="locus",c={...s?RU:$E,...IU(n,t),...t};super(s?DU(c,n):HE(c,n),r,i,a,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=c}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return t1[this.axisProps.orient]=="x"?new Gr(n,t):new Gr(t,n)}getPerpendicularSize(){return r1(this.axisProps)}isPickingSupported(){return!1}}function r1(e){const t=Ni(e.orient);let n=e.ticks&&e.tickSize||0;return e.labels&&(n+=e.labelPadding,t=="x"?n+=e.labelFontSize:n+=30),e.title&&(n+=e.titlePadding+e.titleFontSize),n=Math.min(e.maxExtent||1/0,Math.max(e.minExtent||0,n)),n}const $E={values:null,minExtent:20,maxExtent:1/0,offset:0,domain:!0,domainWidth:1,domainColor:"gray",domainDash:null,domainDashOffset:0,domainCap:"square",ticks:!0,tickSize:5,tickWidth:1,tickColor:"gray",tickDash:null,tickDashOffset:0,tickCap:"square",tickCount:null,tickMinStep:null,labels:!0,labelAlign:"center",labelBaseline:"middle",labelPadding:4,labelFontSize:10,labelLimit:180,labelColor:"black",format:null,titleColor:"black",titleFont:"sans-serif",titleFontSize:10,titlePadding:3};function IU(e,t){const n=t.orient,r=e=="nominal"||e=="ordinal";let i="center",a="middle",o=t.labelAngle??((n=="top"||n=="bottom")&&r?-90:0);switch(n){case"left":i="right";break;case"right":i="left";break;case"top":case"bottom":Math.abs(o)>30?(i=o>0==(n=="bottom")?"left":"right",a="middle"):a=n=="top"?"alphabetic":"top";break}return{labelAlign:i,labelAngle:o,labelBaseline:a}}function HE(e,t){const n={...e,extent:r1(e)},r=Ni(n.orient),i=e1(r),a=n.orient=="bottom"||n.orient=="right"?1:-1,o=n.orient=="bottom"||n.orient=="left"?1:0,s=()=>({name:"domain",data:{values:[0]},mark:{type:"rule",clip:!1,strokeDash:n.domainDash,strokeCap:n.domainCap,color:n.domainColor,[i]:o,size:n.domainWidth}}),c=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[i+"Offset"]:(n.tickSize+n.labelPadding)*a,[i]:o,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:t},text:{field:"label"}}}),l=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[i]:{value:o},[i+"2"]:{value:o-n.tickSize/n.extent*(o?1:-1)}}}),u=()=>({name:"title",data:{values:[0]},mark:{type:"text",clip:!1,align:"center",baseline:n.orient=="bottom"?"bottom":"top",angle:[0,90,0,-90][["top","right","bottom","left"].indexOf(n.orient)],text:n.title,color:n.titleColor,[r]:.5,[i]:1-o}}),f=()=>{const d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:t}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(c()),d},h={resolve:{scale:{[r]:"forced"}},[TU[e1(r)]]:n.extent,data:{lazy:{type:"axisTicks",channel:r,axis:e}},layer:[]};return n.domain&&h.layer.push(s()),(n.ticks||n.labels)&&h.layer.push(f()),n.title&&h.layer.push(u()),h}const RU={...$E,chromTicks:!0,chromTickSize:18,chromTickWidth:1,chromTickColor:"#989898",chromTickDash:[4,2],chromTickDashOffset:1,chromLabels:!0,chromLabelFontSize:13,chromLabelFontWeight:"normal",chromLabelFontStyle:"normal",chromLabelColor:"black",chromLabelAlign:"left",chromLabelPadding:7};function DU(e,t){const n={...e,extent:r1(e)},r=Ni(n.orient),i=e1(r),a=n.orient=="bottom"||n.orient=="left"?1:0,o=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:e.chromTickDash,strokeDashOffset:e.chromTickDashOffset,[i]:a,[i+"2"]:a-n.chromTickSize/n.extent*(a?1:-1),color:e.chromTickColor,size:n.chromTickWidth}}),s=()=>{let u;switch(n.orient){case"top":u={y:0,angle:0,paddingX:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":u={y:1,angle:0,paddingX:4,dy:n.chromLabelPadding+n.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":u={x:1,angle:-90,paddingY:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":u={x:0,angle:90,align:"right",paddingY:4,dy:-n.chromLabelPadding};break;default:u={}}return{name:"chromosome_labels",mark:{type:"text",size:n.chromLabelFontSize,font:n.chromLabelFont,fontWeight:n.chromLabelFontWeight,fontStyle:n.chromLabelFontStyle,color:n.chromLabelColor,align:e.chromLabelAlign,baseline:"alphabetic",clip:!1,...u},encoding:{[r+"2"]:{field:"continuousEnd",type:t},text:{field:"name"}}}};let c;switch(n.orient){case"bottom":case"top":c={};break;case"left":c={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":c={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:c={}}const l=HE({...e,...c},t);if(e.chromTicks||e.chromLabels){const u={name:kU,data:{lazy:{type:"axisGenome",channel:Ni(n.orient)}},encoding:{[r]:{field:"continuousStart",type:t,band:0}},layer:[]};if(e.chromTicks&&u.layer.push(o()),e.chromLabels){u.layer.push(s());let f;l.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(d=>d.name=="labels").forEach(d=>{f=d.mark})),f&&(n.orient=="top"||n.orient=="bottom"?(f.viewportEdgeFadeWidthLeft=30,f.viewportEdgeFadeDistanceLeft=40):(f.viewportEdgeFadeWidthBottom=30,f.viewportEdgeFadeDistanceBottom=40))}l.layer.push(u)}return l}class BU extends Ka{constructor(t,n,r,i,a,o){const c={...n=="locus"?FU:GE,...t};super(LU(c,n),r,i,a,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=c}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const GE={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},FU={...GE,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function PU(e,t){const n=e,r=Ni(n.orient);return{name:"grid_lines",data:{lazy:{type:"axisTicks",channel:r,axis:e}},mark:{type:"rule",strokeDash:n.gridDash,strokeCap:n.gridCap,color:n.gridColor,size:n.gridWidth,opacity:n.gridOpacity,minBufferSize:300},encoding:{[r]:{field:"value",type:t}}}}function MU(e,t){const n=e,r=Ni(n.orient);return{name:"chromosome_lines",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rule",strokeDash:n.chromGridDash,strokeCap:n.chromGridCap,color:n.chromGridColor,size:n.chromGridWidth,opacity:n.chromGridOpacity},encoding:{[r]:{field:"continuousStart",type:t,band:0}}}}function OU(e,t){const n=e,r=Ni(n.orient);return{name:"chromosome_fill",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rect"},encoding:{[r]:{field:"continuousStart",type:t,band:0},[r+"2"]:{field:"continuousEnd",band:0},fill:{field:"odd",type:"nominal",scale:{domain:[!1,!0],range:[n.chromGridFillEven??"white",n.chromGridFillOdd??"white"]}},opacity:{field:"odd",type:"nominal",scale:{type:"ordinal",domain:[!1,!0],range:[n.chromGridFillEven?1:0,n.chromGridFillOdd?1:0]}}}}}function LU(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(OU(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(MU(n,t)),n.grid&&n.gridOpacity>0&&r.push(PU(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Ni(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const VE={anchor:"middle",frame:"group",offset:10,orient:"top",align:void 0,angle:0,baseline:"alphabetic",dx:0,dy:0,color:void 0,font:void 0,fontSize:12,fontStyle:"normal",fontWeight:"normal"},NU={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},zU={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},UU={start:0,middle:.5,end:1},$U={start:"left",middle:"center",end:"right"};function HU(e){if(!e)return;const t=Me(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":NU,overlay:zU}[t.style]??{},r={...VE,...n,...t};let i={},a={x:0,y:0};const o=UU[r.anchor??"middle"];switch(r.orient){case"top":a={x:o,y:1},i={baseline:"alphabetic",angle:0};break;case"right":a={x:1,y:1-o},i={baseline:"alphabetic",angle:90};break;case"bottom":a={x:o,y:0},i={baseline:"top",angle:0};break;case"left":a={x:0,y:o},i={baseline:"alphabetic",angle:-90};break}const s={...VE,...i,...n,...t},c={xOffset:0,yOffset:0};switch(r.orient){case"top":c.yOffset=-s.offset;break;case"right":c.xOffset=s.offset;break;case"bottom":c.yOffset=s.offset;break;case"left":c.xOffset=-s.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...a,...c,text:s.text,align:s.align??$U[s.anchor],angle:s.angle,baseline:s.baseline,dx:s.dx,dy:s.dy,color:s.color,font:s.font,size:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight}}}function jE(e,t,n,r){if(e.type=="wheel"){e.uiEvent.preventDefault();const i=e.uiEvent,a=i.deltaMode?120:1;let{x:o,y:s}=e.point;if(r){const c=r.mark.encoders;c.x&&!c.x2&&!c.x.constantValue&&(o=+c.x(r.datum)*t.width+t.x),c.y&&!c.y2&&!c.y.constantValue&&(s=(1-+c.y(r.datum))*t.height+t.y)}Math.abs(i.deltaX)<Math.abs(i.deltaY)?n({x:o,y:s,xDelta:0,yDelta:0,zDelta:i.deltaY*a/300}):n({x:o,y:s,xDelta:-i.deltaX*a,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){const i=e.uiEvent;i.preventDefault();let a=i;const o=c=>{n({x:a.clientX,y:a.clientY,xDelta:c.clientX-a.clientX,yDelta:c.clientY-a.clientY,zDelta:0}),a=c},s=c=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",s)};document.addEventListener("mouseup",s,!1),document.addEventListener("mousemove",o,!1)}}class GU extends Yn{constructor(n,r,i,a,o,s,c){super(n,r,i,a,o,c);Z(this,ci);Z(this,X0);Z(this,Lo);Z(this,gf);Z(this,mf);Z(this,bf);Z(this,K0);Z(this,yc);Z(this,J0);Z(this,gc,1/0);Z(this,mc,10);Z(this,vn,[]);Z(this,Oo,{});Z(this,bc,0);this.spec=n,le(this,mc,n.spacing??10),le(this,gc,s),le(this,vn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),F(this,vn).push(new a1(n,this,F(this,bc))),UT(this,bc)._++}setChildren(n){le(this,vn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=F(this,vn).findIndex(a=>a.view==n);if(i>=0)F(this,vn)[i]=new a1(r,this,F(this,bc));else throw new Error("Not my child view!")}get children(){return F(this,vn).map(n=>n.view)}get childCount(){return F(this,vn).length}async createAxes(){const n=[];for(const r of ns){const i=this.resolutions.axis[r];if(i){const a=i.getAxisProps();if(a){const o={title:i.getTitle(),orient:id[r][0],...a},s=new n1(o,i.scaleResolution.type,this.context,this,this);n.push(s.initializeChildren()),F(this,Oo)[r]=s}}}return Promise.all([...n,...F(this,vn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of F(this,vn))yield*n.getChildren();for(const n of Object.values(F(this,Oo)))yield n}getOverhang(){return J(this,K0,WT).call(this).union(J(this,yc,vp).call(this))}getSize(){return this._cache("size",()=>new Gr(J(this,mf,nv).call(this,"column"),J(this,mf,nv).call(this,"row")).addPadding(J(this,yc,vp).call(this)))}render(n,r,i={}){if(super.render(n,r,i),!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(J(this,yc,vp).call(this)),n.pushView(this,r);const a={devicePixelRatio:this.context.devicePixelRatio},o=Fl(J(this,gf,tv).call(this,"column"),r.width,a),s=Fl(J(this,gf,tv).call(this,"row"),r.height,a),c=new UE(F(this,ci,Go).length,F(this,gc)??1/0),l=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,f]of F(this,ci,Go).entries()){const{view:h,axes:d,gridLines:p,background:g,backgroundStroke:b,title:y}=f,[w,A]=c.getCellCoords(u),x=o[J(this,bf,rv).call(this,"column",w)],C=s[J(this,bf,rv).call(this,"row",A)],_=h.getViewportSize(),I=h.getSize(),D=h.getOverhang(),M=x.location-D.left,G=C.location-D.top,O=(Ve,N)=>(Ve[N].grow?(N=="width"?x:C).size:Ve[N].px)+D[N],ae=O(_,"width"),se=O(_,"height"),ve=O(I,"width"),Pe=O(I,"height"),st=f.scrollbars.horizontal,Ne=f.scrollbars.vertical,lt=st?()=>l(st.viewportOffset):()=>0,tt=Ne?()=>l(Ne.viewportOffset):()=>0,ut=new Zn(()=>r.x+M,()=>r.y+G,()=>ae,()=>se),Te=h.isScrollable(),Ie=Te?new Zn(()=>r.x+M-lt(),()=>r.y+G-tt(),()=>ve,()=>Pe):ut;f.coords=ut;const Rt=i.clipRect?ut.intersect(i.clipRect):ut;g==null||g.render(n,Rt,{...i,clipRect:void 0});for(const Ve of Object.values(p))Ve.render(n,ut,i);const ln=jU(h)||Te;ln&&h.render(n,Ie,{...i,clipRect:Rt}),b==null||b.render(n,Rt,{...i,clipRect:void 0});for(const[Ve,N]of Object.entries(d)){const L=Ve=="left"||Ve=="right"?"vertical":"horizontal",W=f.scrollbars[L],j=W?ut.modify(L=="vertical"?{y:()=>Ie.y,height:Pe}:{x:()=>Ie.x,width:ve}):ut,Q=i1(j,Ve,N);let T=i.clipRect;W&&(T=Q.intersect(T).intersect(W?ut.modify(L=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),N.render(n,Q,{...i,clipRect:T})}for(const Ve of Object.values(F(this,Oo))){const L=Ve.axisProps.orient;(L=="left"&&w==0||L=="right"&&w==c.nCols-1||L=="top"&&A==0||L=="bottom"&&A==c.nRows-1)&&Ve.render(n,i1(ut.shrink(f.view.getOverhang()),L,Ve),i)}ln||h.render(n,Ie,i);for(const Ve of Object.values(f.scrollbars))Ve.updateScrollbar(ut,Ie),Ve.render(n,r,i);y==null||y.render(n,ut,i)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=F(this,ci,Go).find(a=>a.coords.containsPoint(n.point.x,n.point.y));for(const a of Object.values((r==null?void 0:r.scrollbars)??{}))if(a.coords.containsPoint(n.point.x,n.point.y)&&(a.propagateInteractionEvent(n),n.stopped))return;const i=r==null?void 0:r.view;i&&(i.propagateInteractionEvent(n),(i instanceof mt||i instanceof Ka)&&jE(n,r.coords,a=>J(this,J0,YT).call(this,r.coords,r.view,a),this.context.getCurrentHover())),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}gc=new WeakMap,mc=new WeakMap,vn=new WeakMap,Oo=new WeakMap,bc=new WeakMap,ci=new WeakSet,Go=function(){return F(this,vn).filter(n=>n.view.isConfiguredVisible())},X0=new WeakSet,qT=function(){return new UE(F(this,ci,Go).length,F(this,gc)??1/0)},Lo=new WeakSet,If=function(n){const r=n=="column"?"width":"height",i=(a,o)=>a.map(s=>{const l=F(this,ci,Go)[s].getOverhangAndPadding();return n=="column"?o?l.right:l.left:o?l.bottom:l.top}).reduce((s,c)=>Math.max(s,c),0);return this._cache(`size/directionSizes/${n}`,()=>F(this,X0,qT)[n=="column"?"colIndices":"rowIndices"].map(a=>({axisBefore:i(a,0),axisAfter:i(a,1),view:YL(a.map(o=>F(this,ci,Go)[o].view.getViewportSize()[r]))})))},gf=new WeakSet,tv=function(n){const r=J(this,Lo,If).call(this,n),i=[];i.push(Pl);for(const[a,o]of r.entries())a>0&&i.push({px:F(this,mc),grow:0}),(a==0||this.wrappingFacet)&&i.push(Pl),i.push({px:o.axisBefore,grow:0}),i.push(o.view),i.push({px:o.axisAfter,grow:0}),(a==r.length-1||this.wrappingFacet)&&i.push(Pl);return i},mf=new WeakSet,nv=function(n){let r=0,i=0;const a=n=="row"?this.spec.height:this.spec.width;if(a||a===0)return QA(a);const o=J(this,Lo,If).call(this,n);for(const[s,c]of o.entries())s>0&&(i+=F(this,mc)),(s==0||this.wrappingFacet)&&(i+=0),i+=c.axisBefore,i+=c.view.px??0,r+=c.view.grow??0,i+=c.axisAfter,(s==o.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},bf=new WeakSet,rv=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},K0=new WeakSet,WT=function(){const n=J(this,Lo,If).call(this,"column"),r=J(this,Lo,If).call(this,"row");return!n.length||!r.length?Ct.zero():new Ct(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},yc=new WeakSet,vp=function(){const n=r=>{const i=t1[r],a=F(this,Oo)[i];return(a==null?void 0:a.axisProps.orient)!==r?0:Math.max(a.getPerpendicularSize()+a.axisProps.offset,0)};return new Ct(n("top"),n("right"),n("bottom"),n("left"))},J0=new WeakSet,YT=function(n,r,i){for(const[a,o]of Object.entries(VU(r))){if(o.size<=0)continue;const s=n.normalizePoint(i.x,i.y),c=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:c.x-s.x,y:c.y-s.y};for(const u of o)u.zoom(2**i.zDelta,a=="y"?1-s[a]:s[a],a=="x"?l.x:-l.y)}this.context.animator.requestRender()};function qE(e){if(!(!e||!e.fill||e.fillOpacity===0))return{configurableVisibility:!1,data:{values:[{}]},mark:{color:e.fill,opacity:e.fillOpacity??1,type:"rect",clip:!1,tooltip:null,minHeight:1,minOpacity:0}}}function WE(e){if(!(!e||!e.stroke||e.strokeWidth===0||e.strokeOpacity===0))return{configurableVisibility:!1,resolve:{scale:{x:"excluded",y:"excluded"},axis:{x:"excluded",y:"excluded"}},data:{values:[{x:0,y:0,x2:1,y2:0},{x:1,y:0,x2:1,y2:1},{x:1,y:1,x2:0,y2:1},{x:0,y:1,x2:0,y2:0}]},mark:{size:e.strokeWidth??1,color:e.stroke??"lightgray",strokeCap:"square",strokeOpacity:e.strokeOpacity??1,type:"rule",clip:!1,tooltip:null},encoding:{x:{field:"x",type:"quantitative",scale:null},y:{field:"y",type:"quantitative",scale:null},x2:{field:"x2"},y2:{field:"y2"}}}}function VU(e){const t={x:new Set,y:new Set};return e.visit(n=>{for(const[r,i]of Object.entries(t)){const a=n.getScaleResolution(r);a&&a.isZoomable()&&i.add(a)}}),t}function jU(e){let t=!0;return e.visit(n=>{n instanceof mt&&t&&(t=n.mark.properties.clip===!0)}),t}function i1(e,t,n){const r=n.axisProps,i=n.getPerpendicularSize();if(t=="bottom")return e.translate(0,e.height+r.offset).modify({height:i});if(t=="top")return e.translate(0,-i-r.offset).modify({height:i});if(t=="left")return e.translate(-i-r.offset,0).modify({width:i});if(t=="right")return e.translate(e.width+r.offset,0).modify({width:i})}class a1{constructor(t,n,r){if(this.layoutParent=n,this.view=t,this.serial=r,this.background=void 0,this.backgroundStroke=void 0,this.axes={},this.gridLines={},this.scrollbars={},this.title=void 0,this.coords=Zn.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,a="view"in i?i==null?void 0:i.view:void 0,o=qE(a);o&&(this.background=new mt(o,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const s=WE(a);s&&(this.backgroundStroke=new mt(s,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const c=HU(t.spec.title);if(c){const l=new mt(c,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=l}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new YE(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new YE(this,"vertical"))}*getChildren(){this.background&&(yield this.background),this.backgroundStroke&&(yield this.backgroundStroke),this.title&&(yield this.title),yield*Object.values(this.axes),yield*Object.values(this.gridLines),yield this.view,yield*Object.values(this.scrollbars)}async createAxes(){const{view:t,axes:n,gridLines:r}=this,i=(s,c)=>{const l=s.getAxisProps();if(l===null)return;const u=l?{...l}:{};if(!u.orient){for(const f of id[c])if(!n[f]){u.orient=f;break}if(!u.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(u.title??(u.title=s.getTitle()),!id[c].includes(u.orient))throw new Error(`Invalid axis orientation "${u.orient}" on channel "${c}"!`);return u},a=async(s,c,l)=>{const u=i(s,c);if(u){if(n[u.orient])throw new Error(`An axis with the orient "${u.orient}" already exists!`);const f=new n1(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[u.orient]=f,await f.initializeChildren()}},o=async(s,c,l)=>{const u=i(s,c);if(u&&(u.grid||u.chromGrid)){const f=new BU(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[u.orient]=f,await f.initializeChildren()}};for(const s of["x","y"])if(t.needsAxes[s]){const c=t.resolutions.axis[s];if(!c)continue;await a(c,s,t)}for(const s of["x","y"])if(t.needsAxes[s]){const c=t.getAxisResolution(s);if(!c)continue;await o(c,s,t)}if(t instanceof Ka){for(const s of t)for(const[c,l]of Object.entries(s.resolutions.axis)){const u=l.getAxisProps();u&&u.orient&&await a(l,c,s)}for(const s of t)for(const[c,l]of Object.entries(s.resolutions.axis)){const u=l.getAxisProps();u&&!u.orient&&await a(l,c,s)}}[...Object.values(n),...Object.values(r)].forEach(s=>s.visit(c=>{c instanceof mt&&c.resolve("scale")}))}getOverhang(){const t=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+r.axisProps.offset,0):0};return new Ct(t("top"),t("right"),t("bottom"),t("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}class YE extends mt{constructor(t,n){const r={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},t.layoutParent.context,t.layoutParent,t.view,"scrollbar-"+n,{blockEncodingInheritance:!0}),this.config=r,this.scrollDirection=n,this.viewportOffset=0,this.maxScrollOffset=0,this.scrollbarCoords=Zn.ZERO,this.addInteractionEventListener("mousedown",(i,a)=>{if(a.stopPropagation(),this.maxScrollOffset<=0)return;const o=h=>n=="vertical"?h.clientY:h.clientX,s=a.uiEvent;s.preventDefault();const c=this.getScrollOffset(),l=o(s),u=h=>{const d=Ai(o(h)-l+c,0,this.maxScrollOffset);this.viewportOffset=d/this.maxScrollOffset*this.maxViewportOffset,this.context.animator.requestRender()},f=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f)};document.addEventListener("mouseup",f,!1),document.addEventListener("mousemove",u,!1)})}getScrollOffset(){return this.viewportOffset/this.maxViewportOffset*this.maxScrollOffset}render(t,n,r){super.render(t,this.scrollbarCoords,r)}updateScrollbar(t,n){const r=this.config.scrollbarPadding,i=this.config.scrollbarSize,a=this.scrollDirection=="horizontal"?"width":"height",o=Math.min(1,t[a]/n[a]),s=t[a]-2*r,c=o*s;this.maxScrollOffset=s-c,this.maxViewportOffset=n[a]-t[a],this.viewportOffset=Ai(this.viewportOffset,0,this.maxViewportOffset),this.scrollbarCoords=this.scrollDirection=="vertical"?new Zn(()=>t.x+t.width-i-r,()=>t.y+r+this.getScrollOffset(),()=>i,()=>c):new Zn(()=>t.x+r+this.getScrollOffset(),()=>t.y+t.height-i-r,()=>c,()=>i)}}class ys extends GU{constructor(t,n,r,i,a){super(t,n,r,i,a,o1(t)?t.columns:sd(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=o1(t)?t.concat:sd(t)?t.vconcat:t.hconcat;this.setChildren(await Promise.all(n.map((r,i)=>this.context.createOrImportView(r,this,this,"grid"+i)))),await this.createAxes()}getDefaultResolution(t,n){return n=="axis"?"independent":sd(this.spec)&&t==="x"||QE(this.spec)&&t==="y"?"shared":"independent"}}const ZE="viewRoot";class qU{constructor(t={}){Z(this,vc,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,a,o,s,c)=>new r(i,a,o,s,i.name??c);this.addViewType(od,n(Ka)),this.addViewType(ad,n(mt)),this.addViewType(sd,n(ys)),this.addViewType(QE,n(ys)),this.addViewType(o1,n(ys)),this.addViewType(XE,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){F(this,vc).set(t,n)}createView(t,n,r,i,a){for(const[o,s]of F(this,vc))if(o(t))return s(t,n,r,i,a);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(t)]))}isViewSpec(t){const n=[...F(this,vc).keys()].filter(r=>r(t));if(n.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return n.length==1}async createOrImportView(t,n,r,i,a,o){let s;if(YU(t))if(this.options.allowImport)s=await rU(t,i.getBaseUrl(),n),o&&o(s);else throw new Za("Importing views is not allowed!",r);else s=t;!i&&this.options.wrapRoot&&(ad(s)||od(s))&&a===ZE&&(s={name:"implicitRoot",vconcat:[s]});const c=this.createView(s,n,r,i,a);return c instanceof Yn&&await c.initializeChildren(),c}}vc=new WeakMap;function ad(e){return"mark"in e&&(Me(e.mark)||Xt(e.mark))}function od(e){return"layer"in e&&Xt(e.layer)}function WU(e){return e&&(ad(e)||od(e))&&"aggregateSamples"in e}function YU(e){return"import"in e}function sd(e){return"vconcat"in e&&Qt(e.vconcat)}function QE(e){return"hconcat"in e&&Qt(e.hconcat)}function o1(e){return"concat"in e&&Qt(e.concat)}function XE(e){return"samples"in e&&Xt(e.samples)&&"spec"in e&&Xt(e.spec)}class ZU{constructor(){Z(this,wc,void 0);Z(this,No,void 0);Z(this,yf,void 0);Z(this,zo,void 0);le(this,wc,new Map),le(this,No,new Set),le(this,zo,new Map),le(this,yf,new Proxy(F(this,wc),{get(t,n){return Me(n)?t.get(n):void 0}}))}allocateSetter(t){if(F(this,No).has(t))throw new Error("Setter already allocated for parameter: "+t);return F(this,No).add(t),n=>{F(this,wc).set(t,n);const r=F(this,zo).get(t);if(r)for(const i of r)i()}}createExpression(t){const n=ch(t,F(this,yf));for(const r of n.globals)if(!F(this,No).has(r))throw new Error(`Unknown variable "${r}" in expression: ${t}`);return n.addListener=r=>{for(const i of n.globals){const a=F(this,zo).get(i)??new Set;F(this,zo).set(i,a),a.add(r)}},n}}wc=new WeakMap,No=new WeakMap,yf=new WeakMap,zo=new WeakMap,hw("fasta",bU);class KE{constructor(t,n,r={}){this.container=t,this._destructionCallbacks=[];const i=document.createElement("style");i.innerHTML=fD,t.appendChild(i),this.spec=n,this.accessorFactory=new JB,this.viewFactory=new qU,this.namedDataProviders=[],this.animator=new uU(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=a=>a.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new yU(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:CU,refseqgene:wU,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._paramBroker=new ZU,this._loadingViews=new Map}registerNamedDataProvider(t){this.namedDataProviders.unshift(t)}getNamedDataFromProvider(t){for(const n of this.namedDataProviders){const r=n(t);if(r)return r}}updateNamedData(t,n){const r=this.viewRoot.context.dataFlow.findNamedDataSource(t);if(!r)throw new Error("No such named data source: "+t);r.dataSource.updateDynamicData(n),Ym(r.hosts),this.animator.requestRender()}broadcast(t,n){var i;const r={type:t,payload:n};this.viewRoot.visit(a=>a.handleBroadcast(r)),(i=this._extraBroadcastListeners.get(t))==null||i.forEach(a=>a(r))}_updateLoadingIndicators(){const t=[],n=()=>[...this._loadingViews.values()].some(r=>r);for(const[r,i]of this._loadingViews){const a=r.coords;if(a){const o={left:`${a.x}px`,top:`${a.y}px`,width:`${a.width}px`,height:`${a.height}px`};t.push($`<div style=${eh(o)}>
1741
+ `:"";return $`${s}${a}`}class Ka extends Yn{constructor(n,r,i,a,o,s){super(n,r,i,a,o,s);Z(this,si,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){le(this,si,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!od(i)&&!ad(i))throw new Za("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return F(this,si).slice()}*[Symbol.iterator](){for(const n of F(this,si))yield n}render(n,r,i={}){if(super.render(n,r,i),!!this.isConfiguredVisible()){n.pushView(this,r);for(const a of F(this,si))a.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=F(this,si).length-1;r>=0;r--)if(F(this,si)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}si=new WeakMap;class UE{constructor(t,n){this.n=t,this.maxCols=n??1/0}get nRows(){return this.maxCols==1/0?1:Math.ceil(this.n/this.maxCols)}get nCols(){return Math.min(this.n,this.maxCols)}get rowIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<r;i++){const a=[];t.push(a);for(let o=0;o<n;o++){const s=i*n+o;s<this.n&&a.push(s)}}return t}get colIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<n;i++){const a=[];t.push(a);for(let o=0;o<r;o++){const s=o*n+i;s<this.n&&a.push(s)}}return t}getCellIndex(t,n){let r=0;if(this.maxCols==1/0)r=n==0?t:void 0;else{if(t>=this.maxCols)return;r=n*this.nCols+t}return r<this.n?r:void 0}getCellCoords(t){if(!(t<0||t>=this.n))return[t%this.nCols,Math.floor(t/this.nCols)]}}const TU="chromosome_ticks_and_labels",IU={x:"width",y:"height"};function e1(e){return e=="x"?"y":"x"}const id={x:["bottom","top"],y:["left","right"]},t1=Object.fromEntries(Object.entries(id).map(([e,t])=>t.map(n=>[n,e])).flat(1));function Ni(e){return t1[e]}class n1 extends Ka{constructor(t,n,r,i,a,o){const s=n=="locus",c={...s?DU:$E,...RU(n,t),...t};super(s?BU(c,n):HE(c,n),r,i,a,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=c}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return t1[this.axisProps.orient]=="x"?new Gr(n,t):new Gr(t,n)}getPerpendicularSize(){return r1(this.axisProps)}isPickingSupported(){return!1}}function r1(e){const t=Ni(e.orient);let n=e.ticks&&e.tickSize||0;return e.labels&&(n+=e.labelPadding,t=="x"?n+=e.labelFontSize:n+=30),e.title&&(n+=e.titlePadding+e.titleFontSize),n=Math.min(e.maxExtent||1/0,Math.max(e.minExtent||0,n)),n}const $E={values:null,minExtent:20,maxExtent:1/0,offset:0,domain:!0,domainWidth:1,domainColor:"gray",domainDash:null,domainDashOffset:0,domainCap:"square",ticks:!0,tickSize:5,tickWidth:1,tickColor:"gray",tickDash:null,tickDashOffset:0,tickCap:"square",tickCount:null,tickMinStep:null,labels:!0,labelAlign:"center",labelBaseline:"middle",labelPadding:4,labelFontSize:10,labelLimit:180,labelColor:"black",format:null,titleColor:"black",titleFont:"sans-serif",titleFontSize:10,titlePadding:3};function RU(e,t){const n=t.orient,r=e=="nominal"||e=="ordinal";let i="center",a="middle",o=t.labelAngle??((n=="top"||n=="bottom")&&r?-90:0);switch(n){case"left":i="right";break;case"right":i="left";break;case"top":case"bottom":Math.abs(o)>30?(i=o>0==(n=="bottom")?"left":"right",a="middle"):a=n=="top"?"alphabetic":"top";break}return{labelAlign:i,labelAngle:o,labelBaseline:a}}function HE(e,t){const n={...e,extent:r1(e)},r=Ni(n.orient),i=e1(r),a=n.orient=="bottom"||n.orient=="right"?1:-1,o=n.orient=="bottom"||n.orient=="left"?1:0,s=()=>({name:"domain",data:{values:[0]},mark:{type:"rule",clip:!1,strokeDash:n.domainDash,strokeCap:n.domainCap,color:n.domainColor,[i]:o,size:n.domainWidth}}),c=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[i+"Offset"]:(n.tickSize+n.labelPadding)*a,[i]:o,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:t},text:{field:"label"}}}),l=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[i]:{value:o},[i+"2"]:{value:o-n.tickSize/n.extent*(o?1:-1)}}}),u=()=>({name:"title",data:{values:[0]},mark:{type:"text",clip:!1,align:"center",baseline:n.orient=="bottom"?"bottom":"top",angle:[0,90,0,-90][["top","right","bottom","left"].indexOf(n.orient)],text:n.title,color:n.titleColor,[r]:.5,[i]:1-o}}),f=()=>{const d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:t}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(c()),d},h={resolve:{scale:{[r]:"forced"}},[IU[e1(r)]]:n.extent,data:{lazy:{type:"axisTicks",channel:r,axis:e}},layer:[]};return n.domain&&h.layer.push(s()),(n.ticks||n.labels)&&h.layer.push(f()),n.title&&h.layer.push(u()),h}const DU={...$E,chromTicks:!0,chromTickSize:18,chromTickWidth:1,chromTickColor:"#989898",chromTickDash:[4,2],chromTickDashOffset:1,chromLabels:!0,chromLabelFontSize:13,chromLabelFontWeight:"normal",chromLabelFontStyle:"normal",chromLabelColor:"black",chromLabelAlign:"left",chromLabelPadding:7};function BU(e,t){const n={...e,extent:r1(e)},r=Ni(n.orient),i=e1(r),a=n.orient=="bottom"||n.orient=="left"?1:0,o=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:e.chromTickDash,strokeDashOffset:e.chromTickDashOffset,[i]:a,[i+"2"]:a-n.chromTickSize/n.extent*(a?1:-1),color:e.chromTickColor,size:n.chromTickWidth}}),s=()=>{let u;switch(n.orient){case"top":u={y:0,angle:0,paddingX:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":u={y:1,angle:0,paddingX:4,dy:n.chromLabelPadding+n.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":u={x:1,angle:-90,paddingY:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":u={x:0,angle:90,align:"right",paddingY:4,dy:-n.chromLabelPadding};break;default:u={}}return{name:"chromosome_labels",mark:{type:"text",size:n.chromLabelFontSize,font:n.chromLabelFont,fontWeight:n.chromLabelFontWeight,fontStyle:n.chromLabelFontStyle,color:n.chromLabelColor,align:e.chromLabelAlign,baseline:"alphabetic",clip:!1,...u},encoding:{[r+"2"]:{field:"continuousEnd",type:t},text:{field:"name"}}}};let c;switch(n.orient){case"bottom":case"top":c={};break;case"left":c={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":c={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:c={}}const l=HE({...e,...c},t);if(e.chromTicks||e.chromLabels){const u={name:TU,data:{lazy:{type:"axisGenome",channel:Ni(n.orient)}},encoding:{[r]:{field:"continuousStart",type:t,band:0}},layer:[]};if(e.chromTicks&&u.layer.push(o()),e.chromLabels){u.layer.push(s());let f;l.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(d=>d.name=="labels").forEach(d=>{f=d.mark})),f&&(n.orient=="top"||n.orient=="bottom"?(f.viewportEdgeFadeWidthLeft=30,f.viewportEdgeFadeDistanceLeft=40):(f.viewportEdgeFadeWidthBottom=30,f.viewportEdgeFadeDistanceBottom=40))}l.layer.push(u)}return l}class FU extends Ka{constructor(t,n,r,i,a,o){const c={...n=="locus"?PU:GE,...t};super(NU(c,n),r,i,a,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=c}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const GE={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},PU={...GE,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function MU(e,t){const n=e,r=Ni(n.orient);return{name:"grid_lines",data:{lazy:{type:"axisTicks",channel:r,axis:e}},mark:{type:"rule",strokeDash:n.gridDash,strokeCap:n.gridCap,color:n.gridColor,size:n.gridWidth,opacity:n.gridOpacity,minBufferSize:300},encoding:{[r]:{field:"value",type:t}}}}function OU(e,t){const n=e,r=Ni(n.orient);return{name:"chromosome_lines",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rule",strokeDash:n.chromGridDash,strokeCap:n.chromGridCap,color:n.chromGridColor,size:n.chromGridWidth,opacity:n.chromGridOpacity},encoding:{[r]:{field:"continuousStart",type:t,band:0}}}}function LU(e,t){const n=e,r=Ni(n.orient);return{name:"chromosome_fill",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rect"},encoding:{[r]:{field:"continuousStart",type:t,band:0},[r+"2"]:{field:"continuousEnd",band:0},fill:{field:"odd",type:"nominal",scale:{domain:[!1,!0],range:[n.chromGridFillEven??"white",n.chromGridFillOdd??"white"]}},opacity:{field:"odd",type:"nominal",scale:{type:"ordinal",domain:[!1,!0],range:[n.chromGridFillEven?1:0,n.chromGridFillOdd?1:0]}}}}}function NU(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(LU(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(OU(n,t)),n.grid&&n.gridOpacity>0&&r.push(MU(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Ni(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const VE={anchor:"middle",frame:"group",offset:10,orient:"top",align:void 0,angle:0,baseline:"alphabetic",dx:0,dy:0,color:void 0,font:void 0,fontSize:12,fontStyle:"normal",fontWeight:"normal"},zU={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},UU={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},$U={start:0,middle:.5,end:1},HU={start:"left",middle:"center",end:"right"};function GU(e){if(!e)return;const t=Me(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":zU,overlay:UU}[t.style]??{},r={...VE,...n,...t};let i={},a={x:0,y:0};const o=$U[r.anchor??"middle"];switch(r.orient){case"top":a={x:o,y:1},i={baseline:"alphabetic",angle:0};break;case"right":a={x:1,y:1-o},i={baseline:"alphabetic",angle:90};break;case"bottom":a={x:o,y:0},i={baseline:"top",angle:0};break;case"left":a={x:0,y:o},i={baseline:"alphabetic",angle:-90};break}const s={...VE,...i,...n,...t},c={xOffset:0,yOffset:0};switch(r.orient){case"top":c.yOffset=-s.offset;break;case"right":c.xOffset=s.offset;break;case"bottom":c.yOffset=s.offset;break;case"left":c.xOffset=-s.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...a,...c,text:s.text,align:s.align??HU[s.anchor],angle:s.angle,baseline:s.baseline,dx:s.dx,dy:s.dy,color:s.color,font:s.font,size:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight}}}function jE(e,t,n,r){if(e.type=="wheel"){e.uiEvent.preventDefault();const i=e.uiEvent,a=i.deltaMode?120:1;let{x:o,y:s}=e.point;if(r){const c=r.mark.encoders;c.x&&!c.x2&&!c.x.constantValue&&(o=+c.x(r.datum)*t.width+t.x),c.y&&!c.y2&&!c.y.constantValue&&(s=(1-+c.y(r.datum))*t.height+t.y)}Math.abs(i.deltaX)<Math.abs(i.deltaY)?n({x:o,y:s,xDelta:0,yDelta:0,zDelta:i.deltaY*a/300}):n({x:o,y:s,xDelta:-i.deltaX*a,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){const i=e.uiEvent;i.preventDefault();let a=i;const o=c=>{n({x:a.clientX,y:a.clientY,xDelta:c.clientX-a.clientX,yDelta:c.clientY-a.clientY,zDelta:0}),a=c},s=c=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",s)};document.addEventListener("mouseup",s,!1),document.addEventListener("mousemove",o,!1)}}class VU extends Yn{constructor(n,r,i,a,o,s,c){super(n,r,i,a,o,c);Z(this,ci);Z(this,X0);Z(this,Lo);Z(this,gf);Z(this,mf);Z(this,bf);Z(this,K0);Z(this,yc);Z(this,J0);Z(this,gc,1/0);Z(this,mc,10);Z(this,vn,[]);Z(this,Oo,{});Z(this,bc,0);this.spec=n,le(this,mc,n.spacing??10),le(this,gc,s),le(this,vn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),F(this,vn).push(new a1(n,this,F(this,bc))),UT(this,bc)._++}setChildren(n){le(this,vn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=F(this,vn).findIndex(a=>a.view==n);if(i>=0)F(this,vn)[i]=new a1(r,this,F(this,bc));else throw new Error("Not my child view!")}get children(){return F(this,vn).map(n=>n.view)}get childCount(){return F(this,vn).length}async createAxes(){const n=[];for(const r of ns){const i=this.resolutions.axis[r];if(i){const a=i.getAxisProps();if(a){const o={title:i.getTitle(),orient:id[r][0],...a},s=new n1(o,i.scaleResolution.type,this.context,this,this);n.push(s.initializeChildren()),F(this,Oo)[r]=s}}}return Promise.all([...n,...F(this,vn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of F(this,vn))yield*n.getChildren();for(const n of Object.values(F(this,Oo)))yield n}getOverhang(){return J(this,K0,WT).call(this).union(J(this,yc,vp).call(this))}getSize(){return this._cache("size",()=>new Gr(J(this,mf,nv).call(this,"column"),J(this,mf,nv).call(this,"row")).addPadding(J(this,yc,vp).call(this)))}render(n,r,i={}){if(super.render(n,r,i),!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(J(this,yc,vp).call(this)),n.pushView(this,r);const a={devicePixelRatio:this.context.devicePixelRatio},o=Fl(J(this,gf,tv).call(this,"column"),r.width,a),s=Fl(J(this,gf,tv).call(this,"row"),r.height,a),c=new UE(F(this,ci,Go).length,F(this,gc)??1/0),l=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,f]of F(this,ci,Go).entries()){const{view:h,axes:d,gridLines:p,background:g,backgroundStroke:b,title:y}=f,[w,A]=c.getCellCoords(u),x=o[J(this,bf,rv).call(this,"column",w)],C=s[J(this,bf,rv).call(this,"row",A)],_=h.getViewportSize(),I=h.getSize(),D=h.getOverhang(),M=x.location-D.left,G=C.location-D.top,O=(Ve,N)=>(Ve[N].grow?(N=="width"?x:C).size:Ve[N].px)+D[N],ae=O(_,"width"),se=O(_,"height"),ve=O(I,"width"),Pe=O(I,"height"),st=f.scrollbars.horizontal,Ne=f.scrollbars.vertical,lt=st?()=>l(st.viewportOffset):()=>0,tt=Ne?()=>l(Ne.viewportOffset):()=>0,ut=new Zn(()=>r.x+M,()=>r.y+G,()=>ae,()=>se),Te=h.isScrollable(),Ie=Te?new Zn(()=>r.x+M-lt(),()=>r.y+G-tt(),()=>ve,()=>Pe):ut;f.coords=ut;const Rt=i.clipRect?ut.intersect(i.clipRect):ut;g==null||g.render(n,Rt,{...i,clipRect:void 0});for(const Ve of Object.values(p))Ve.render(n,ut,i);const ln=qU(h)||Te;ln&&h.render(n,Ie,{...i,clipRect:Rt}),b==null||b.render(n,Rt,{...i,clipRect:void 0});for(const[Ve,N]of Object.entries(d)){const L=Ve=="left"||Ve=="right"?"vertical":"horizontal",W=f.scrollbars[L],j=W?ut.modify(L=="vertical"?{y:()=>Ie.y,height:Pe}:{x:()=>Ie.x,width:ve}):ut,Q=i1(j,Ve,N);let T=i.clipRect;W&&(T=Q.intersect(T).intersect(W?ut.modify(L=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),N.render(n,Q,{...i,clipRect:T})}for(const Ve of Object.values(F(this,Oo))){const L=Ve.axisProps.orient;(L=="left"&&w==0||L=="right"&&w==c.nCols-1||L=="top"&&A==0||L=="bottom"&&A==c.nRows-1)&&Ve.render(n,i1(ut.shrink(f.view.getOverhang()),L,Ve),i)}ln||h.render(n,Ie,i);for(const Ve of Object.values(f.scrollbars))Ve.updateScrollbar(ut,Ie),Ve.render(n,r,i);y==null||y.render(n,ut,i)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=F(this,ci,Go).find(a=>a.coords.containsPoint(n.point.x,n.point.y));for(const a of Object.values((r==null?void 0:r.scrollbars)??{}))if(a.coords.containsPoint(n.point.x,n.point.y)&&(a.propagateInteractionEvent(n),n.stopped))return;const i=r==null?void 0:r.view;i&&(i.propagateInteractionEvent(n),(i instanceof mt||i instanceof Ka)&&jE(n,r.coords,a=>J(this,J0,YT).call(this,r.coords,r.view,a),this.context.getCurrentHover())),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}gc=new WeakMap,mc=new WeakMap,vn=new WeakMap,Oo=new WeakMap,bc=new WeakMap,ci=new WeakSet,Go=function(){return F(this,vn).filter(n=>n.view.isConfiguredVisible())},X0=new WeakSet,qT=function(){return new UE(F(this,ci,Go).length,F(this,gc)??1/0)},Lo=new WeakSet,If=function(n){const r=n=="column"?"width":"height",i=(a,o)=>a.map(s=>{const l=F(this,ci,Go)[s].getOverhangAndPadding();return n=="column"?o?l.right:l.left:o?l.bottom:l.top}).reduce((s,c)=>Math.max(s,c),0);return this._cache(`size/directionSizes/${n}`,()=>F(this,X0,qT)[n=="column"?"colIndices":"rowIndices"].map(a=>({axisBefore:i(a,0),axisAfter:i(a,1),view:YL(a.map(o=>F(this,ci,Go)[o].view.getViewportSize()[r]))})))},gf=new WeakSet,tv=function(n){const r=J(this,Lo,If).call(this,n),i=[];i.push(Pl);for(const[a,o]of r.entries())a>0&&i.push({px:F(this,mc),grow:0}),(a==0||this.wrappingFacet)&&i.push(Pl),i.push({px:o.axisBefore,grow:0}),i.push(o.view),i.push({px:o.axisAfter,grow:0}),(a==r.length-1||this.wrappingFacet)&&i.push(Pl);return i},mf=new WeakSet,nv=function(n){let r=0,i=0;const a=n=="row"?this.spec.height:this.spec.width;if(a||a===0)return QA(a);const o=J(this,Lo,If).call(this,n);for(const[s,c]of o.entries())s>0&&(i+=F(this,mc)),(s==0||this.wrappingFacet)&&(i+=0),i+=c.axisBefore,i+=c.view.px??0,r+=c.view.grow??0,i+=c.axisAfter,(s==o.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},bf=new WeakSet,rv=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},K0=new WeakSet,WT=function(){const n=J(this,Lo,If).call(this,"column"),r=J(this,Lo,If).call(this,"row");return!n.length||!r.length?Ct.zero():new Ct(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},yc=new WeakSet,vp=function(){const n=r=>{const i=t1[r],a=F(this,Oo)[i];return(a==null?void 0:a.axisProps.orient)!==r?0:Math.max(a.getPerpendicularSize()+a.axisProps.offset,0)};return new Ct(n("top"),n("right"),n("bottom"),n("left"))},J0=new WeakSet,YT=function(n,r,i){for(const[a,o]of Object.entries(jU(r))){if(o.size<=0)continue;const s=n.normalizePoint(i.x,i.y),c=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:c.x-s.x,y:c.y-s.y};for(const u of o)u.zoom(2**i.zDelta,a=="y"?1-s[a]:s[a],a=="x"?l.x:-l.y)}this.context.animator.requestRender()};function qE(e){if(!(!e||!e.fill||e.fillOpacity===0))return{configurableVisibility:!1,data:{values:[{}]},mark:{color:e.fill,opacity:e.fillOpacity??1,type:"rect",clip:!1,tooltip:null,minHeight:1,minOpacity:0}}}function WE(e){if(!(!e||!e.stroke||e.strokeWidth===0||e.strokeOpacity===0))return{configurableVisibility:!1,resolve:{scale:{x:"excluded",y:"excluded"},axis:{x:"excluded",y:"excluded"}},data:{values:[{x:0,y:0,x2:1,y2:0},{x:1,y:0,x2:1,y2:1},{x:1,y:1,x2:0,y2:1},{x:0,y:1,x2:0,y2:0}]},mark:{size:e.strokeWidth??1,color:e.stroke??"lightgray",strokeCap:"square",strokeOpacity:e.strokeOpacity??1,type:"rule",clip:!1,tooltip:null},encoding:{x:{field:"x",type:"quantitative",scale:null},y:{field:"y",type:"quantitative",scale:null},x2:{field:"x2"},y2:{field:"y2"}}}}function jU(e){const t={x:new Set,y:new Set};return e.visit(n=>{for(const[r,i]of Object.entries(t)){const a=n.getScaleResolution(r);a&&a.isZoomable()&&i.add(a)}}),t}function qU(e){let t=!0;return e.visit(n=>{n instanceof mt&&t&&(t=n.mark.properties.clip===!0)}),t}function i1(e,t,n){const r=n.axisProps,i=n.getPerpendicularSize();if(t=="bottom")return e.translate(0,e.height+r.offset).modify({height:i});if(t=="top")return e.translate(0,-i-r.offset).modify({height:i});if(t=="left")return e.translate(-i-r.offset,0).modify({width:i});if(t=="right")return e.translate(e.width+r.offset,0).modify({width:i})}class a1{constructor(t,n,r){if(this.layoutParent=n,this.view=t,this.serial=r,this.background=void 0,this.backgroundStroke=void 0,this.axes={},this.gridLines={},this.scrollbars={},this.title=void 0,this.coords=Zn.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,a="view"in i?i==null?void 0:i.view:void 0,o=qE(a);o&&(this.background=new mt(o,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const s=WE(a);s&&(this.backgroundStroke=new mt(s,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const c=GU(t.spec.title);if(c){const l=new mt(c,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=l}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new YE(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new YE(this,"vertical"))}*getChildren(){this.background&&(yield this.background),this.backgroundStroke&&(yield this.backgroundStroke),this.title&&(yield this.title),yield*Object.values(this.axes),yield*Object.values(this.gridLines),yield this.view,yield*Object.values(this.scrollbars)}async createAxes(){const{view:t,axes:n,gridLines:r}=this,i=(s,c)=>{const l=s.getAxisProps();if(l===null)return;const u=l?{...l}:{};if(!u.orient){for(const f of id[c])if(!n[f]){u.orient=f;break}if(!u.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(u.title??(u.title=s.getTitle()),!id[c].includes(u.orient))throw new Error(`Invalid axis orientation "${u.orient}" on channel "${c}"!`);return u},a=async(s,c,l)=>{const u=i(s,c);if(u){if(n[u.orient])throw new Error(`An axis with the orient "${u.orient}" already exists!`);const f=new n1(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[u.orient]=f,await f.initializeChildren()}},o=async(s,c,l)=>{const u=i(s,c);if(u&&(u.grid||u.chromGrid)){const f=new FU(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[u.orient]=f,await f.initializeChildren()}};for(const s of["x","y"])if(t.needsAxes[s]){const c=t.resolutions.axis[s];if(!c)continue;await a(c,s,t)}for(const s of["x","y"])if(t.needsAxes[s]){const c=t.getAxisResolution(s);if(!c)continue;await o(c,s,t)}if(t instanceof Ka){for(const s of t)for(const[c,l]of Object.entries(s.resolutions.axis)){const u=l.getAxisProps();u&&u.orient&&await a(l,c,s)}for(const s of t)for(const[c,l]of Object.entries(s.resolutions.axis)){const u=l.getAxisProps();u&&!u.orient&&await a(l,c,s)}}[...Object.values(n),...Object.values(r)].forEach(s=>s.visit(c=>{c instanceof mt&&c.resolve("scale")}))}getOverhang(){const t=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+r.axisProps.offset,0):0};return new Ct(t("top"),t("right"),t("bottom"),t("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}class YE extends mt{constructor(t,n){const r={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},t.layoutParent.context,t.layoutParent,t.view,"scrollbar-"+n,{blockEncodingInheritance:!0}),this.config=r,this.scrollDirection=n,this.viewportOffset=0,this.maxScrollOffset=0,this.scrollbarCoords=Zn.ZERO,this.addInteractionEventListener("mousedown",(i,a)=>{if(a.stopPropagation(),this.maxScrollOffset<=0)return;const o=h=>n=="vertical"?h.clientY:h.clientX,s=a.uiEvent;s.preventDefault();const c=this.getScrollOffset(),l=o(s),u=h=>{const d=Ai(o(h)-l+c,0,this.maxScrollOffset);this.viewportOffset=d/this.maxScrollOffset*this.maxViewportOffset,this.context.animator.requestRender()},f=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f)};document.addEventListener("mouseup",f,!1),document.addEventListener("mousemove",u,!1)})}getScrollOffset(){return this.viewportOffset/this.maxViewportOffset*this.maxScrollOffset}render(t,n,r){super.render(t,this.scrollbarCoords,r)}updateScrollbar(t,n){const r=this.config.scrollbarPadding,i=this.config.scrollbarSize,a=this.scrollDirection=="horizontal"?"width":"height",o=Math.min(1,t[a]/n[a]),s=t[a]-2*r,c=o*s;this.maxScrollOffset=s-c,this.maxViewportOffset=n[a]-t[a],this.viewportOffset=Ai(this.viewportOffset,0,this.maxViewportOffset),this.scrollbarCoords=this.scrollDirection=="vertical"?new Zn(()=>t.x+t.width-i-r,()=>t.y+r+this.getScrollOffset(),()=>i,()=>c):new Zn(()=>t.x+r+this.getScrollOffset(),()=>t.y+t.height-i-r,()=>c,()=>i)}}class ys extends VU{constructor(t,n,r,i,a){super(t,n,r,i,a,o1(t)?t.columns:sd(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=o1(t)?t.concat:sd(t)?t.vconcat:t.hconcat;this.setChildren(await Promise.all(n.map((r,i)=>this.context.createOrImportView(r,this,this,"grid"+i)))),await this.createAxes()}getDefaultResolution(t,n){return n=="axis"?"independent":sd(this.spec)&&t==="x"||QE(this.spec)&&t==="y"?"shared":"independent"}}const ZE="viewRoot";class WU{constructor(t={}){Z(this,vc,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,a,o,s,c)=>new r(i,a,o,s,i.name??c);this.addViewType(od,n(Ka)),this.addViewType(ad,n(mt)),this.addViewType(sd,n(ys)),this.addViewType(QE,n(ys)),this.addViewType(o1,n(ys)),this.addViewType(XE,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){F(this,vc).set(t,n)}createView(t,n,r,i,a){for(const[o,s]of F(this,vc))if(o(t))return s(t,n,r,i,a);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(t)]))}isViewSpec(t){const n=[...F(this,vc).keys()].filter(r=>r(t));if(n.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return n.length==1}async createOrImportView(t,n,r,i,a,o){let s;if(ZU(t))if(this.options.allowImport)s=await iU(t,i.getBaseUrl(),n),o&&o(s);else throw new Za("Importing views is not allowed!",r);else s=t;!i&&this.options.wrapRoot&&(ad(s)||od(s))&&a===ZE&&(s={name:"implicitRoot",vconcat:[s]});const c=this.createView(s,n,r,i,a);return c instanceof Yn&&await c.initializeChildren(),c}}vc=new WeakMap;function ad(e){return"mark"in e&&(Me(e.mark)||Xt(e.mark))}function od(e){return"layer"in e&&Xt(e.layer)}function YU(e){return e&&(ad(e)||od(e))&&"aggregateSamples"in e}function ZU(e){return"import"in e}function sd(e){return"vconcat"in e&&Qt(e.vconcat)}function QE(e){return"hconcat"in e&&Qt(e.hconcat)}function o1(e){return"concat"in e&&Qt(e.concat)}function XE(e){return"samples"in e&&Xt(e.samples)&&"spec"in e&&Xt(e.spec)}class QU{constructor(){Z(this,wc,void 0);Z(this,No,void 0);Z(this,yf,void 0);Z(this,zo,void 0);le(this,wc,new Map),le(this,No,new Set),le(this,zo,new Map),le(this,yf,new Proxy(F(this,wc),{get(t,n){return Me(n)?t.get(n):void 0}}))}allocateSetter(t){if(F(this,No).has(t))throw new Error("Setter already allocated for parameter: "+t);return F(this,No).add(t),n=>{F(this,wc).set(t,n);const r=F(this,zo).get(t);if(r)for(const i of r)i()}}createExpression(t){const n=ch(t,F(this,yf));for(const r of n.globals)if(!F(this,No).has(r))throw new Error(`Unknown variable "${r}" in expression: ${t}`);return n.addListener=r=>{for(const i of n.globals){const a=F(this,zo).get(i)??new Set;F(this,zo).set(i,a),a.add(r)}},n}}wc=new WeakMap,No=new WeakMap,yf=new WeakMap,zo=new WeakMap,hw("fasta",yU);class KE{constructor(t,n,r={}){this.container=t,this._destructionCallbacks=[];const i=document.createElement("style");i.innerHTML=fD,t.appendChild(i),this.spec=n,this.accessorFactory=new JB,this.viewFactory=new WU,this.namedDataProviders=[],this.animator=new fU(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=a=>a.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new vU(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:kU,refseqgene:xU,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._paramBroker=new QU,this._loadingViews=new Map}registerNamedDataProvider(t){this.namedDataProviders.unshift(t)}getNamedDataFromProvider(t){for(const n of this.namedDataProviders){const r=n(t);if(r)return r}}updateNamedData(t,n){const r=this.viewRoot.context.dataFlow.findNamedDataSource(t);if(!r)throw new Error("No such named data source: "+t);r.dataSource.updateDynamicData(n),Ym(r.hosts),this.animator.requestRender()}broadcast(t,n){var i;const r={type:t,payload:n};this.viewRoot.visit(a=>a.handleBroadcast(r)),(i=this._extraBroadcastListeners.get(t))==null||i.forEach(a=>a(r))}_updateLoadingIndicators(){const t=[],n=()=>[...this._loadingViews.values()].some(r=>r);for(const[r,i]of this._loadingViews){const a=r.coords;if(a){const o={left:`${a.x}px`,top:`${a.y}px`,width:`${a.width}px`,height:`${a.height}px`};t.push($`<div style=${eh(o)}>
1739
1742
  <div class=${i?"loading":""}>
1740
1743
  <img src="${uD}" alt="" />
1741
1744
  <span>Loading...</span>
1742
1745
  </div>
1743
- </div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),Vt(t,this.loadingIndicatorsElement)}_prepareContainer(){this.container.classList.add("genome-spy"),this.container.classList.add("loading"),this._glHelper=new mL(this.container,()=>this.viewRoot?aU(this.viewRoot):{width:void 0,height:void 0},this.spec.background);const t=()=>{this._glHelper.invalidateSize(),r(window.devicePixelRatio),this.computeLayout(),this.renderAll()},n=new ResizeObserver(t);n.observe(this.container),this._destructionCallbacks.push(()=>n.disconnect());const r=this._paramBroker.allocateSetter("devicePixelRatio");r(window.devicePixelRatio);let i=null;const a=()=>{i!=null&&(i(),t());const o=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);o.addEventListener("change",a),i=()=>{o.removeEventListener("change",a)}};a(),i&&this._destructionCallbacks.push(i),this.loadingMessageElement=document.createElement("div"),this.loadingMessageElement.className="loading-message",this.loadingMessageElement.innerHTML='<div class="message">Loading<span class="ellipsis">...</span></div>',this.container.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=document.createElement("div"),this.loadingIndicatorsElement.className="loading-indicators",this.container.appendChild(this.loadingIndicatorsElement),this.tooltip=new hD(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})}destroy(){this.container.classList.remove("genome-spy"),this.container.classList.remove("loading");for(const[t,n]of this._keyboardListeners)for(const r of n)document.removeEventListener(t,r);for(this._destructionCallbacks.forEach(t=>t()),this._glHelper.finalize();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new fU(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new TE,accessorFactory:this.accessorFactory,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new pU(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},paramBroker:this._paramBroker,requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(c,l)=>{this._loadingViews.set(c,l),this._updateLoadingIndicators()},addKeyboardListener:(c,l)=>{document.addEventListener(c,l);let u=this._keyboardListeners.get(c);u||(u=[],this._keyboardListeners.set(c,u)),u.push(l)},addBroadcastListener(c,l){const u=t._extraBroadcastListeners;let f=u.get(c);f||(f=new Set,u.set(c,f)),f.add(l)},removeBroadcastListener(c,l){var f;(f=t._extraBroadcastListeners.get(c))==null||f.delete(l)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:c=>t.viewFactory.isViewSpec(c),createView:function(c,l,u,f){return t.viewFactory.createView(c,n,l,u,f)},createOrImportView:async function(c,l,u,f,h){return t.viewFactory.createOrImportView(c,n,l,u,f,h)}},r=this.spec;r.datasets&&this.registerNamedDataProvider(c=>r.datasets[c]),this.viewRoot=await n.createOrImportView(r,null,null,ZE),PE(this.viewRoot),tU(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(c=>c.configureViewOpacity()),this._glHelper.invalidateSize();const a=i.filter(c=>c instanceof mt),o=BE(this.viewRoot,n.dataFlow);eU(o),this.broadcast("dataFlowBuilt",o),a.forEach(c=>c.mark.initializeEncoders());const s=Promise.all(a.map(c=>c.mark.initializeGraphics()));for(const c of a)o.addObserver(l=>{c.mark.initializeData(),c.mark.updateGraphicsData()},c);await n.fontManager.waitUntilReady(),o.initialize(),await Promise.all(o.dataSources.map(c=>c.load())),Ym(this.viewRoot),this.broadcast("dataLoaded"),await s,this.viewRoot.visit(c=>{for(const l of Object.values(c.resolutions.scale))this._glHelper.createRangeTexture(l)});for(const c of a)c.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(c=>Il(c,"size")),this._glHelper.invalidateSize()}async launch(){try{return this._prepareContainer(),await this._prepareViewsAndData(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),!0}catch(t){const n=`${t.view?`At "${t.view.getPathString()}": `:""}${t.toString()}`;return console.error(t.stack),QU(this.container,n),!1}finally{this.container.classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const t=this._glHelper.canvas,n=r=>{var i;if(r instanceof MouseEvent){r.type=="mousemove"&&(this.tooltip.handleMouseMove(r),this._tooltipUpdateRequested=!1,r.buttons==0&&this.renderPickingFramebuffer());const a=t.getBoundingClientRect(),o=new cU(r.clientX-a.left-t.clientLeft,r.clientY-a.top-t.clientTop),s=c=>{this.viewRoot.propagateInteractionEvent(new sU(o,c)),this._tooltipUpdateRequested||this.tooltip.clear()};if(r.type!="wheel"&&this._wheelInertia.cancel(),r.type=="mousemove")this._handlePicking(o.x,o.y);else if(r.type=="mousedown"||r.type=="mouseup")this.renderPickingFramebuffer();else if(r.type=="wheel"){this._tooltipUpdateRequested=!1;const c=r;if(Math.abs(c.deltaX)>Math.abs(c.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const l=vU(c);this._wheelInertia.setMomentum(c.deltaY*(c.deltaMode?80:1),u=>{const f=new WheelEvent("wheel",{...l,deltaMode:0,deltaX:0,deltaY:u});s(f)}),c.preventDefault();return}}if(r.type=="click"){const c=this._currentHover?{type:r.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(l=>l.name).reverse(),datum:this._currentHover.datum}:{type:r.type,viewPath:null,datum:null};(i=this._eventListeners.get("click"))==null||i.forEach(l=>l(c))}s(r)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(r=>t.addEventListener(r,n)),t.addEventListener("mousedown",()=>{document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),t.addEventListener("dragstart",r=>r.stopPropagation())}_handlePicking(t,n){var a;const r=this._glHelper.readPickingPixel(t,n),i=r[0]|r[1]<<8|r[2]<<16;if(i==0){this._currentHover=null;return}if(i!==((a=this._currentHover)==null?void 0:a.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(o=>{if(o instanceof mt){if(o.mark.isPickingParticipant()){const s=o.mark.encoders.uniqueId.accessor;o.getCollector().visitData(c=>{s(c)==i&&(this._currentHover={mark:o.mark,datum:c,uniqueId:i})})}if(this._currentHover)return Qa}}),this._currentHover){const o=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async s=>{if(!o.isPickingParticipant())return;const c=o.properties.tooltip;if(c!==null){const l=(c==null?void 0:c.handler)??"default",u=this.tooltipHandlers[l];if(!u)throw new Error("No such tooltip handler: "+l);return u(s,o,c==null?void 0:c.params)}})}}updateTooltip(t,n){if(!this._tooltipUpdateRequested||!t)this.tooltip.updateWithDatum(t,n),this._tooltipUpdateRequested=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}computeLayout(){const t=this.viewRoot;if(!t)return;this.broadcast("layout");const n=this._glHelper.getLogicalCanvasSize();if(isNaN(n.width)||isNaN(n.height)){console.log(`NaN in canvas size: ${n.width}x${n.height}. Skipping computeLayout().`);return}this._renderingContext=new LE({picking:!1},this._glHelper),this._pickingContext=new LE({picking:!0},this._glHelper),t.render(new oU(this._renderingContext,this._pickingContext),Zn.create(0,0,n.width,n.height)),this.broadcast("layoutComputed")}renderAll(){var t;(t=this._renderingContext)==null||t.render(),this._dirtyPickingBuffer=!0}renderPickingFramebuffer(){this._dirtyPickingBuffer&&(this._pickingContext.render(),this._dirtyPickingBuffer=!1)}getSearchableViews(){const t=[];return this.viewRoot.visit(n=>{n instanceof mt&&n.getAccessor("search")&&t.push(n)}),t}getNamedScaleResolutions(){const t=new Map;return this.viewRoot.visit(n=>{for(const r of Object.values(n.resolutions.scale))r.name&&t.set(r.name,r)}),t}}function QU(e,t){const n=document.createElement("div");n.className="message-box";const r=document.createElement("div");r.textContent=t,n.appendChild(r),e.appendChild(n)}const XU="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;'%3e%3cg%20transform='matrix(0.10221,0.00683825,-0.0067136,0.100347,-8.03424,-13.2222)'%3e%3cpath%20d='M208.629,548.17C208.629,548.17%20219.768,594.389%20239.814,619.222C259.86,644.055%20319.119,680.831%20319.119,680.831C319.119,680.831%20385.557,622.915%20437.87,498.346C437.87,498.346%20456.021,499.236%20473.808,486.446C491.594,473.656%20490.239,478.534%20494.883,461.62C494.883,461.62%20551.848,467.937%20625.826,451.863C667.634,442.778%20710.238,425.649%20747.382,393.142C747.382,393.142%20721.992,360.244%20689.422,291.45C677.029,265.275%20647.518,257.098%20590.747,203.309L438.083,391.273L208.629,548.17Z'%20style='fill-opacity:0.11;'/%3e%3c/g%3e%3cg%20transform='matrix(0.081985,-0.0582493,0.0582493,0.081985,-40.4754,34.7668)'%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'%20style='fill:rgb(127,187,221);'/%3e%3cclipPath%20id='_clip1'%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip1)'%3e%3cg%20transform='matrix(0.758637,0.45892,-0.45892,0.758637,425.635,-121.213)'%3e%3cpath%20d='M386.873,397.241C371.345,383.628%20335.138,374.782%20290.644,380.543C246.149,386.304%20196.827,402.266%20178.802,412.065C168.202,417.828%20151.494,429.354%20150.682,439.334C149.527,453.528%20153.593,477.066%20165.625,491.284C171.69,498.451%20179.927,503.445%20193.838,505.423C211.701,507.963%20252.714,480.627%20275.399,469.22C299.332,457.187%20313.981,454.56%20338.386,447.014C338.386,447.014%20291.346,478.587%20270.205,494.393C239.61,517.268%20218.575,522.444%20212.859,539.897C209.766,549.34%20212.237,567.767%20220.354,577.538C229.427,588.461%20233.197,595.069%20254.591,597.624C267.303,599.143%20276.685,598.802%20314.37,568.95C336.06,551.767%20370.297,509.817%20381.412,494.616C397.581,472.506%20405.165,451.462%20402.656,435.04C399.045,411.391%20394.259,403.716%20386.873,397.241Z'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.752145,0.454993,-0.454993,0.752145,468.36,-108.293)'%3e%3cpath%20d='M484.733,378.934C479.33,367.886%20467.092,350.452%20483.886,325.205C502.172,297.717%20514.898,280.938%20528.117,264.632C541.335,248.326%20574.793,218.447%20587.739,212.53C600.684,206.613%20621.026,203.852%20631.889,212.841C642.874,221.93%20648.416,233.377%20654.92,245.478C662.331,259.267%20667.318,274.808%20656.518,288.278C641.093,307.515%20622.242,305.294%20594.912,319.844C567.244,334.573%20552.644,342.943%20539.244,355.703C539.244,355.703%20591.431,334.114%20621.229,324.474C651.027,314.833%20680.952,304.461%20695.995,315.975C711.038,327.49%20710.631,331.463%20714.425,347.187C719.107,366.59%20707.231,385.165%20694.294,395.838C681.356,406.51%20659.958,411.756%20636.875,416.852C606.42,423.576%20540.278,431.917%20512.819,419.366C485.361,406.815%20488.488,386.613%20484.733,378.934Z'%20style='fill:white;'/%3e%3c/g%3e%3c/g%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'%20style='fill:none;stroke:black;stroke-width:16.57px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.100298,-0.00740488,0.00740488,0.100298,-15.7457,-5.17528)'%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'%20style='fill:rgb(127,187,221);'/%3e%3cclipPath%20id='_clip2'%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip2)'%3e%3cg%20transform='matrix(0.909069,3.67641e-17,-3.79818e-17,0.85852,37.051,52.1829)'%3e%3cpath%20d='M413.282,402.697C430.77,421.58%20423.307,448.426%20441.683,446.137C463.409,443.431%20472.604,430.356%20473.316,413.402C474.028,396.448%20472.245,393.911%20466.172,375.321C460.099,356.731%20447.953,352.176%20422.842,357.179C401.957,361.339%20405.039,360.215%20398.735,367.228C392.43,374.242%20384.315,393.182%20384.315,393.182C384.315,393.182%20392.715,380.492%20413.282,402.697Z'%20style='fill:white;'/%3e%3c/g%3e%3c/g%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'%20style='fill:none;stroke:black;stroke-width:16.57px;'/%3e%3c/g%3e%3c/svg%3e";/**
1746
+ </div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),Vt(t,this.loadingIndicatorsElement)}_prepareContainer(){this.container.classList.add("genome-spy"),this.container.classList.add("loading"),this._glHelper=new mL(this.container,()=>this.viewRoot?oU(this.viewRoot):{width:void 0,height:void 0},this.spec.background);const t=()=>{this._glHelper.invalidateSize(),r(window.devicePixelRatio),this.computeLayout(),this.renderAll()},n=new ResizeObserver(t);n.observe(this.container),this._destructionCallbacks.push(()=>n.disconnect());const r=this._paramBroker.allocateSetter("devicePixelRatio");r(window.devicePixelRatio);let i=null;const a=()=>{i!=null&&(i(),t());const o=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);o.addEventListener("change",a),i=()=>{o.removeEventListener("change",a)}};a(),i&&this._destructionCallbacks.push(i),this.loadingMessageElement=document.createElement("div"),this.loadingMessageElement.className="loading-message",this.loadingMessageElement.innerHTML='<div class="message">Loading<span class="ellipsis">...</span></div>',this.container.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=document.createElement("div"),this.loadingIndicatorsElement.className="loading-indicators",this.container.appendChild(this.loadingIndicatorsElement),this.tooltip=new hD(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})}destroy(){this.container.classList.remove("genome-spy"),this.container.classList.remove("loading");for(const[t,n]of this._keyboardListeners)for(const r of n)document.removeEventListener(t,r);for(this._destructionCallbacks.forEach(t=>t()),this._glHelper.finalize();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new hU(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new TE,accessorFactory:this.accessorFactory,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new gU(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},paramBroker:this._paramBroker,requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(c,l)=>{this._loadingViews.set(c,l),this._updateLoadingIndicators()},addKeyboardListener:(c,l)=>{document.addEventListener(c,l);let u=this._keyboardListeners.get(c);u||(u=[],this._keyboardListeners.set(c,u)),u.push(l)},addBroadcastListener(c,l){const u=t._extraBroadcastListeners;let f=u.get(c);f||(f=new Set,u.set(c,f)),f.add(l)},removeBroadcastListener(c,l){var f;(f=t._extraBroadcastListeners.get(c))==null||f.delete(l)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:c=>t.viewFactory.isViewSpec(c),createView:function(c,l,u,f){return t.viewFactory.createView(c,n,l,u,f)},createOrImportView:async function(c,l,u,f,h){return t.viewFactory.createOrImportView(c,n,l,u,f,h)}},r=this.spec;r.datasets&&this.registerNamedDataProvider(c=>r.datasets[c]),this.viewRoot=await n.createOrImportView(r,null,null,ZE),PE(this.viewRoot),nU(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(c=>c.configureViewOpacity()),this._glHelper.invalidateSize();const a=i.filter(c=>c instanceof mt),o=BE(this.viewRoot,n.dataFlow);tU(o),this.broadcast("dataFlowBuilt",o),a.forEach(c=>c.mark.initializeEncoders());const s=Promise.all(a.map(c=>c.mark.initializeGraphics()));for(const c of a)o.addObserver(l=>{c.mark.initializeData(),c.mark.updateGraphicsData()},c);await n.fontManager.waitUntilReady(),o.initialize(),await Promise.all(o.dataSources.map(c=>c.load())),Ym(this.viewRoot),this.broadcast("dataLoaded"),await s,this.viewRoot.visit(c=>{for(const l of Object.values(c.resolutions.scale))this._glHelper.createRangeTexture(l)});for(const c of a)c.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(c=>Il(c,"size")),this._glHelper.invalidateSize()}async launch(){try{return this._prepareContainer(),await this._prepareViewsAndData(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),!0}catch(t){const n=`${t.view?`At "${t.view.getPathString()}": `:""}${t.toString()}`;return console.error(t.stack),XU(this.container,n),!1}finally{this.container.classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const t=this._glHelper.canvas,n=r=>{var i;if(r instanceof MouseEvent){r.type=="mousemove"&&(this.tooltip.handleMouseMove(r),this._tooltipUpdateRequested=!1,r.buttons==0&&this.renderPickingFramebuffer());const a=t.getBoundingClientRect(),o=new lU(r.clientX-a.left-t.clientLeft,r.clientY-a.top-t.clientTop),s=c=>{this.viewRoot.propagateInteractionEvent(new cU(o,c)),this._tooltipUpdateRequested||this.tooltip.clear()};if(r.type!="wheel"&&this._wheelInertia.cancel(),r.type=="mousemove")this._handlePicking(o.x,o.y);else if(r.type=="mousedown"||r.type=="mouseup")this.renderPickingFramebuffer();else if(r.type=="wheel"){this._tooltipUpdateRequested=!1;const c=r;if(Math.abs(c.deltaX)>Math.abs(c.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const l=wU(c);this._wheelInertia.setMomentum(c.deltaY*(c.deltaMode?80:1),u=>{const f=new WheelEvent("wheel",{...l,deltaMode:0,deltaX:0,deltaY:u});s(f)}),c.preventDefault();return}}if(r.type=="click"){const c=this._currentHover?{type:r.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(l=>l.name).reverse(),datum:this._currentHover.datum}:{type:r.type,viewPath:null,datum:null};(i=this._eventListeners.get("click"))==null||i.forEach(l=>l(c))}s(r)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(r=>t.addEventListener(r,n)),t.addEventListener("mousedown",()=>{document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),t.addEventListener("dragstart",r=>r.stopPropagation())}_handlePicking(t,n){var a;const r=this._glHelper.readPickingPixel(t,n),i=r[0]|r[1]<<8|r[2]<<16;if(i==0){this._currentHover=null;return}if(i!==((a=this._currentHover)==null?void 0:a.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(o=>{if(o instanceof mt){if(o.mark.isPickingParticipant()){const s=o.mark.encoders.uniqueId.accessor;o.getCollector().visitData(c=>{s(c)==i&&(this._currentHover={mark:o.mark,datum:c,uniqueId:i})})}if(this._currentHover)return Qa}}),this._currentHover){const o=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async s=>{if(!o.isPickingParticipant())return;const c=o.properties.tooltip;if(c!==null){const l=(c==null?void 0:c.handler)??"default",u=this.tooltipHandlers[l];if(!u)throw new Error("No such tooltip handler: "+l);return u(s,o,c==null?void 0:c.params)}})}}updateTooltip(t,n){if(!this._tooltipUpdateRequested||!t)this.tooltip.updateWithDatum(t,n),this._tooltipUpdateRequested=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}computeLayout(){const t=this.viewRoot;if(!t)return;this.broadcast("layout");const n=this._glHelper.getLogicalCanvasSize();if(isNaN(n.width)||isNaN(n.height)){console.log(`NaN in canvas size: ${n.width}x${n.height}. Skipping computeLayout().`);return}this._renderingContext=new LE({picking:!1},this._glHelper),this._pickingContext=new LE({picking:!0},this._glHelper),t.render(new sU(this._renderingContext,this._pickingContext),Zn.create(0,0,n.width,n.height)),this.broadcast("layoutComputed")}renderAll(){var t;(t=this._renderingContext)==null||t.render(),this._dirtyPickingBuffer=!0}renderPickingFramebuffer(){this._dirtyPickingBuffer&&(this._pickingContext.render(),this._dirtyPickingBuffer=!1)}getSearchableViews(){const t=[];return this.viewRoot.visit(n=>{n instanceof mt&&n.getAccessor("search")&&t.push(n)}),t}getNamedScaleResolutions(){const t=new Map;return this.viewRoot.visit(n=>{for(const r of Object.values(n.resolutions.scale))r.name&&t.set(r.name,r)}),t}}function XU(e,t){const n=document.createElement("div");n.className="message-box";const r=document.createElement("div");r.textContent=t,n.appendChild(r),e.appendChild(n)}const KU="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;'%3e%3cg%20transform='matrix(0.10221,0.00683825,-0.0067136,0.100347,-8.03424,-13.2222)'%3e%3cpath%20d='M208.629,548.17C208.629,548.17%20219.768,594.389%20239.814,619.222C259.86,644.055%20319.119,680.831%20319.119,680.831C319.119,680.831%20385.557,622.915%20437.87,498.346C437.87,498.346%20456.021,499.236%20473.808,486.446C491.594,473.656%20490.239,478.534%20494.883,461.62C494.883,461.62%20551.848,467.937%20625.826,451.863C667.634,442.778%20710.238,425.649%20747.382,393.142C747.382,393.142%20721.992,360.244%20689.422,291.45C677.029,265.275%20647.518,257.098%20590.747,203.309L438.083,391.273L208.629,548.17Z'%20style='fill-opacity:0.11;'/%3e%3c/g%3e%3cg%20transform='matrix(0.081985,-0.0582493,0.0582493,0.081985,-40.4754,34.7668)'%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'%20style='fill:rgb(127,187,221);'/%3e%3cclipPath%20id='_clip1'%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip1)'%3e%3cg%20transform='matrix(0.758637,0.45892,-0.45892,0.758637,425.635,-121.213)'%3e%3cpath%20d='M386.873,397.241C371.345,383.628%20335.138,374.782%20290.644,380.543C246.149,386.304%20196.827,402.266%20178.802,412.065C168.202,417.828%20151.494,429.354%20150.682,439.334C149.527,453.528%20153.593,477.066%20165.625,491.284C171.69,498.451%20179.927,503.445%20193.838,505.423C211.701,507.963%20252.714,480.627%20275.399,469.22C299.332,457.187%20313.981,454.56%20338.386,447.014C338.386,447.014%20291.346,478.587%20270.205,494.393C239.61,517.268%20218.575,522.444%20212.859,539.897C209.766,549.34%20212.237,567.767%20220.354,577.538C229.427,588.461%20233.197,595.069%20254.591,597.624C267.303,599.143%20276.685,598.802%20314.37,568.95C336.06,551.767%20370.297,509.817%20381.412,494.616C397.581,472.506%20405.165,451.462%20402.656,435.04C399.045,411.391%20394.259,403.716%20386.873,397.241Z'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.752145,0.454993,-0.454993,0.752145,468.36,-108.293)'%3e%3cpath%20d='M484.733,378.934C479.33,367.886%20467.092,350.452%20483.886,325.205C502.172,297.717%20514.898,280.938%20528.117,264.632C541.335,248.326%20574.793,218.447%20587.739,212.53C600.684,206.613%20621.026,203.852%20631.889,212.841C642.874,221.93%20648.416,233.377%20654.92,245.478C662.331,259.267%20667.318,274.808%20656.518,288.278C641.093,307.515%20622.242,305.294%20594.912,319.844C567.244,334.573%20552.644,342.943%20539.244,355.703C539.244,355.703%20591.431,334.114%20621.229,324.474C651.027,314.833%20680.952,304.461%20695.995,315.975C711.038,327.49%20710.631,331.463%20714.425,347.187C719.107,366.59%20707.231,385.165%20694.294,395.838C681.356,406.51%20659.958,411.756%20636.875,416.852C606.42,423.576%20540.278,431.917%20512.819,419.366C485.361,406.815%20488.488,386.613%20484.733,378.934Z'%20style='fill:white;'/%3e%3c/g%3e%3c/g%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'%20style='fill:none;stroke:black;stroke-width:16.57px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.100298,-0.00740488,0.00740488,0.100298,-15.7457,-5.17528)'%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'%20style='fill:rgb(127,187,221);'/%3e%3cclipPath%20id='_clip2'%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip2)'%3e%3cg%20transform='matrix(0.909069,3.67641e-17,-3.79818e-17,0.85852,37.051,52.1829)'%3e%3cpath%20d='M413.282,402.697C430.77,421.58%20423.307,448.426%20441.683,446.137C463.409,443.431%20472.604,430.356%20473.316,413.402C474.028,396.448%20472.245,393.911%20466.172,375.321C460.099,356.731%20447.953,352.176%20422.842,357.179C401.957,361.339%20405.039,360.215%20398.735,367.228C392.43,374.242%20384.315,393.182%20384.315,393.182C384.315,393.182%20392.715,380.492%20413.282,402.697Z'%20style='fill:white;'/%3e%3c/g%3e%3c/g%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'%20style='fill:none;stroke:black;stroke-width:16.57px;'/%3e%3c/g%3e%3c/svg%3e";/**
1744
1747
  * @license
1745
1748
  * Copyright 2019 Google LLC
1746
1749
  * SPDX-License-Identifier: BSD-3-Clause
1747
- */const cd=globalThis,s1=cd.ShadowRoot&&(cd.ShadyCSS===void 0||cd.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,JE=Symbol(),e4=new WeakMap;let KU=class{constructor(t,n,r){if(this._$cssResult$=!0,r!==JE)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(s1&&t===void 0){const r=n!==void 0&&n.length===1;r&&(t=e4.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&e4.set(n,t))}return t}toString(){return this.cssText}};const JU=e=>new KU(typeof e=="string"?e:e+"",void 0,JE),e$=(e,t)=>{if(s1)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of t){const r=document.createElement("style"),i=cd.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,e.appendChild(r)}},t4=s1?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const r of t.cssRules)n+=r.cssText;return JU(n)})(e):e;/**
1750
+ */const cd=globalThis,s1=cd.ShadowRoot&&(cd.ShadyCSS===void 0||cd.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,JE=Symbol(),e4=new WeakMap;let JU=class{constructor(t,n,r){if(this._$cssResult$=!0,r!==JE)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(s1&&t===void 0){const r=n!==void 0&&n.length===1;r&&(t=e4.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&e4.set(n,t))}return t}toString(){return this.cssText}};const e$=e=>new JU(typeof e=="string"?e:e+"",void 0,JE),t$=(e,t)=>{if(s1)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of t){const r=document.createElement("style"),i=cd.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,e.appendChild(r)}},t4=s1?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const r of t.cssRules)n+=r.cssText;return e$(n)})(e):e;/**
1748
1751
  * @license
1749
1752
  * Copyright 2017 Google LLC
1750
1753
  * SPDX-License-Identifier: BSD-3-Clause
1751
- */const{is:t$,defineProperty:n$,getOwnPropertyDescriptor:r$,getOwnPropertyNames:i$,getOwnPropertySymbols:a$,getPrototypeOf:o$}=Object,zi=globalThis,n4=zi.trustedTypes,s$=n4?n4.emptyScript:"",c1=zi.reactiveElementPolyfillSupport,zl=(e,t)=>e,l1={toAttribute(e,t){switch(t){case Boolean:e=e?s$:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},r4=(e,t)=>!t$(e,t),i4={attribute:!0,type:String,converter:l1,reflect:!1,hasChanged:r4};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),zi.litPropertyMetadata??(zi.litPropertyMetadata=new WeakMap);let vs=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=i4){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(t,n),!n.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,n);i!==void 0&&n$(this.prototype,t,i)}}static getPropertyDescriptor(t,n,r){const{get:i,set:a}=r$(this.prototype,t)??{get(){return this[n]},set(o){this[n]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const s=i==null?void 0:i.call(this);a.call(this,o),this.requestUpdate(t,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??i4}static _$Ei(){if(this.hasOwnProperty(zl("elementProperties")))return;const t=o$(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(zl("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zl("properties"))){const n=this.properties,r=[...i$(n),...a$(n)];for(const i of r)this.createProperty(i,n[i])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)n.unshift(t4(i))}else t!==void 0&&n.push(t4(t));return n}static _$Eu(t,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$ES(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(n=>n(this))}addController(t){var n;(this._$E_??(this._$E_=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)==null||n.call(t))}removeController(t){var n;(n=this._$E_)==null||n.delete(t)}_$ES(){const t=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return e$(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$E_)==null||t.forEach(n=>{var r;return(r=n.hostConnected)==null?void 0:r.call(n)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$E_)==null||t.forEach(n=>{var r;return(r=n.hostDisconnected)==null?void 0:r.call(n)})}attributeChangedCallback(t,n,r){this._$AK(t,r)}_$EO(t,n){var a;const r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){const o=(((a=r.converter)==null?void 0:a.toAttribute)!==void 0?r.converter:l1).toAttribute(n,r.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,n){var a;const r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:((a=o.converter)==null?void 0:a.fromAttribute)!==void 0?o.converter:l1;this._$Em=i,this[i]=s.fromAttribute(n,o.type),this._$Em=null}}requestUpdate(t,n,r,i=!1,a){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??r4)(i?a:this[t],n))return;this.C(t,n,r)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,n,r){this._$AL.has(t)||this._$AL.set(t,n),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,o]of this._$Ep)this[a]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[a,o]of i)o.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.C(a,this[a],o)}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(r=this._$E_)==null||r.forEach(i=>{var a;return(a=i.hostUpdate)==null?void 0:a.call(i)}),this.update(n)):this._$ET()}catch(i){throw t=!1,this._$ET(),i}t&&this._$AE(n)}willUpdate(t){}_$AE(t){var n;(n=this._$E_)==null||n.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EO(n,this[n]))),this._$ET()}updated(t){}firstUpdated(t){}};vs.elementStyles=[],vs.shadowRootOptions={mode:"open"},vs[zl("elementProperties")]=new Map,vs[zl("finalized")]=new Map,c1==null||c1({ReactiveElement:vs}),(zi.reactiveElementVersions??(zi.reactiveElementVersions=[])).push("2.0.2");/**
1754
+ */const{is:n$,defineProperty:r$,getOwnPropertyDescriptor:i$,getOwnPropertyNames:a$,getOwnPropertySymbols:o$,getPrototypeOf:s$}=Object,zi=globalThis,n4=zi.trustedTypes,c$=n4?n4.emptyScript:"",c1=zi.reactiveElementPolyfillSupport,zl=(e,t)=>e,l1={toAttribute(e,t){switch(t){case Boolean:e=e?c$:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},r4=(e,t)=>!n$(e,t),i4={attribute:!0,type:String,converter:l1,reflect:!1,hasChanged:r4};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),zi.litPropertyMetadata??(zi.litPropertyMetadata=new WeakMap);let vs=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=i4){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(t,n),!n.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,n);i!==void 0&&r$(this.prototype,t,i)}}static getPropertyDescriptor(t,n,r){const{get:i,set:a}=i$(this.prototype,t)??{get(){return this[n]},set(o){this[n]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const s=i==null?void 0:i.call(this);a.call(this,o),this.requestUpdate(t,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??i4}static _$Ei(){if(this.hasOwnProperty(zl("elementProperties")))return;const t=s$(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(zl("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zl("properties"))){const n=this.properties,r=[...a$(n),...o$(n)];for(const i of r)this.createProperty(i,n[i])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)n.unshift(t4(i))}else t!==void 0&&n.push(t4(t));return n}static _$Eu(t,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$ES(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(n=>n(this))}addController(t){var n;(this._$E_??(this._$E_=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)==null||n.call(t))}removeController(t){var n;(n=this._$E_)==null||n.delete(t)}_$ES(){const t=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return t$(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$E_)==null||t.forEach(n=>{var r;return(r=n.hostConnected)==null?void 0:r.call(n)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$E_)==null||t.forEach(n=>{var r;return(r=n.hostDisconnected)==null?void 0:r.call(n)})}attributeChangedCallback(t,n,r){this._$AK(t,r)}_$EO(t,n){var a;const r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){const o=(((a=r.converter)==null?void 0:a.toAttribute)!==void 0?r.converter:l1).toAttribute(n,r.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,n){var a;const r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:((a=o.converter)==null?void 0:a.fromAttribute)!==void 0?o.converter:l1;this._$Em=i,this[i]=s.fromAttribute(n,o.type),this._$Em=null}}requestUpdate(t,n,r,i=!1,a){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??r4)(i?a:this[t],n))return;this.C(t,n,r)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,n,r){this._$AL.has(t)||this._$AL.set(t,n),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,o]of this._$Ep)this[a]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[a,o]of i)o.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.C(a,this[a],o)}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(r=this._$E_)==null||r.forEach(i=>{var a;return(a=i.hostUpdate)==null?void 0:a.call(i)}),this.update(n)):this._$ET()}catch(i){throw t=!1,this._$ET(),i}t&&this._$AE(n)}willUpdate(t){}_$AE(t){var n;(n=this._$E_)==null||n.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EO(n,this[n]))),this._$ET()}updated(t){}firstUpdated(t){}};vs.elementStyles=[],vs.shadowRootOptions={mode:"open"},vs[zl("elementProperties")]=new Map,vs[zl("finalized")]=new Map,c1==null||c1({ReactiveElement:vs}),(zi.reactiveElementVersions??(zi.reactiveElementVersions=[])).push("2.0.2");/**
1752
1755
  * @license
1753
1756
  * Copyright 2017 Google LLC
1754
1757
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1756,9 +1759,9 @@ Reason: ${s.message}`)}));if(n.isViewSpec(a))return a.baseUrl=(o=i.match(/^[^?#]
1756
1759
  * @license
1757
1760
  * Copyright 2018 Google LLC
1758
1761
  * SPDX-License-Identifier: BSD-3-Clause
1759
- */const f1=Da(class extends Zo{constructor(e){var t;if(super(e),e.type!==cr.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var r,i;if(this.it===void 0){this.it=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!((r=this.st)!=null&&r.has(a))&&this.it.add(a);return this.render(t)}const n=e.element.classList;for(const a of this.it)a in t||(n.remove(a),this.it.delete(a));for(const a in t){const o=!!t[a];o===this.it.has(a)||(i=this.st)!=null&&i.has(a)||(o?(n.add(a),this.it.add(a)):(n.remove(a),this.it.delete(a)))}return Dt}});var c$={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"]},ld=c$,l$={prefix:"fas",iconName:"forward-step",icon:[320,512,["step-forward"],"f051","M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416V96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4l192 160L256 241V96c0-17.7 14.3-32 32-32s32 14.3 32 32V416c0 17.7-14.3 32-32 32s-32-14.3-32-32V271l-11.5 9.6-192 160z"]},u$=l$,f$={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},h$=f$,a4={prefix:"fas",iconName:"bookmark",icon:[384,512,[128278,61591],"f02e","M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z"]},d$={prefix:"fas",iconName:"maximize",icon:[512,512,["expand-arrows-alt"],"f31e","M200 32H56C42.7 32 32 42.7 32 56V200c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l40-40 79 79-79 79L73 295c-6.9-6.9-17.2-8.9-26.2-5.2S32 302.3 32 312V456c0 13.3 10.7 24 24 24H200c9.7 0 18.5-5.8 22.2-14.8s1.7-19.3-5.2-26.2l-40-40 79-79 79 79-40 40c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H456c13.3 0 24-10.7 24-24V312c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2l-40 40-79-79 79-79 40 40c6.9 6.9 17.2 8.9 26.2 5.2s14.8-12.5 14.8-22.2V56c0-13.3-10.7-24-24-24H312c-9.7 0-18.5 5.8-22.2 14.8s-1.7 19.3 5.2 26.2l40 40-79 79-79-79 40-40c6.9-6.9 8.9-17.2 5.2-26.2S209.7 32 200 32z"]},p$=d$,g$={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320z"]},m$=g$,Ja={prefix:"fas",iconName:"filter",icon:[512,512,[],"f0b0","M3.9 54.9C10.5 40.9 24.5 32 40 32H472c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9V448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6V320.9L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"]},Ul={prefix:"fas",iconName:"object-group",icon:[576,512,[],"f247","M32 119.4C12.9 108.4 0 87.7 0 64C0 28.7 28.7 0 64 0c23.7 0 44.4 12.9 55.4 32H456.6C467.6 12.9 488.3 0 512 0c35.3 0 64 28.7 64 64c0 23.7-12.9 44.4-32 55.4V392.6c19.1 11.1 32 31.7 32 55.4c0 35.3-28.7 64-64 64c-23.7 0-44.4-12.9-55.4-32H119.4c-11.1 19.1-31.7 32-55.4 32c-35.3 0-64-28.7-64-64c0-23.7 12.9-44.4 32-55.4V119.4zM456.6 96H119.4c-5.6 9.7-13.7 17.8-23.4 23.4V392.6c9.7 5.6 17.8 13.7 23.4 23.4H456.6c5.6-9.7 13.7-17.8 23.4-23.4V119.4c-9.7-5.6-17.8-13.7-23.4-23.4zM128 160c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v96c0 17.7-14.3 32-32 32H160c-17.7 0-32-14.3-32-32V160zM256 320h32c35.3 0 64-28.7 64-64V224h64c17.7 0 32 14.3 32 32v96c0 17.7-14.3 32-32 32H288c-17.7 0-32-14.3-32-32V320z"]},o4={prefix:"fas",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"]},b$={prefix:"fas",iconName:"circle-question",icon:[512,512,[62108,"question-circle"],"f059","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},y$=b$,v$={prefix:"fas",iconName:"pen",icon:[512,512,[128394],"f304","M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"]},w$={prefix:"fas",iconName:"arrow-rotate-right",icon:[512,512,[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],"f01e","M386.3 160H336c-17.7 0-32 14.3-32 32s14.3 32 32 32H464c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v51.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L386.3 160z"]},x$=w$,s4={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},A$={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},c4=A$,E$={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},S$=E$,_$={prefix:"fas",iconName:"backward-step",icon:[320,512,["step-backward"],"f048","M267.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29V96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160L64 241V96c0-17.7-14.3-32-32-32S0 78.3 0 96V416c0 17.7 14.3 32 32 32s32-14.3 32-32V271l11.5 9.6 192 160z"]},C$=_$,k$={prefix:"fas",iconName:"sliders",icon:[512,512,["sliders-h"],"f1de","M0 416c0 17.7 14.3 32 32 32l54.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 448c17.7 0 32-14.3 32-32s-14.3-32-32-32l-246.7 0c-12.3-28.3-40.5-48-73.3-48s-61 19.7-73.3 48L32 384c-17.7 0-32 14.3-32 32zm128 0a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32-80c-32.8 0-61 19.7-73.3 48L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l246.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48l54.7 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-54.7 0c-12.3-28.3-40.5-48-73.3-48zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm73.3-64C253 35.7 224.8 16 192 16s-61 19.7-73.3 48L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l86.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 128c17.7 0 32-14.3 32-32s-14.3-32-32-32L265.3 64z"]},T$=k$,I$={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},R$=I$,D$={prefix:"fas",iconName:"ellipsis",icon:[448,512,["ellipsis-h"],"f141","M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"]},B$=D$,l4={prefix:"fas",iconName:"medal",icon:[512,512,[127941],"f5a2","M4.1 38.2C1.4 34.2 0 29.4 0 24.6C0 11 11 0 24.6 0H133.9c11.2 0 21.7 5.9 27.4 15.5l68.5 114.1c-48.2 6.1-91.3 28.6-123.4 61.9L4.1 38.2zm503.7 0L405.6 191.5c-32.1-33.3-75.2-55.8-123.4-61.9L350.7 15.5C356.5 5.9 366.9 0 378.1 0H487.4C501 0 512 11 512 24.6c0 4.8-1.4 9.6-4.1 13.6zM80 336a176 176 0 1 1 352 0A176 176 0 1 1 80 336zm184.4-94.9c-3.4-7-13.3-7-16.8 0l-22.4 45.4c-1.4 2.8-4 4.7-7 5.1L168 298.9c-7.7 1.1-10.7 10.5-5.2 16l36.3 35.4c2.2 2.2 3.2 5.2 2.7 8.3l-8.6 49.9c-1.3 7.6 6.7 13.5 13.6 9.9l44.8-23.6c2.7-1.4 6-1.4 8.7 0l44.8 23.6c6.9 3.6 14.9-2.2 13.6-9.9l-8.6-49.9c-.5-3 .5-6.1 2.7-8.3l36.3-35.4c5.6-5.4 2.5-14.8-5.2-16l-50.1-7.3c-3-.4-5.7-2.4-7-5.1l-22.4-45.4z"]},F$={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},P$={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},M$={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},O$={prefix:"fas",iconName:"up-down",icon:[256,512,[8597,11021,"arrows-alt-v"],"f338","M145.6 7.7C141 2.8 134.7 0 128 0s-13 2.8-17.6 7.7l-104 112c-6.5 7-8.2 17.2-4.4 25.9S14.5 160 24 160H80V352H24c-9.5 0-18.2 5.7-22 14.4s-2.1 18.9 4.4 25.9l104 112c4.5 4.9 10.9 7.7 17.6 7.7s13-2.8 17.6-7.7l104-112c6.5-7 8.2-17.2 4.4-25.9s-12.5-14.4-22-14.4H176V160h56c9.5 0 18.2-5.7 22-14.4s2.1-18.9-4.4-25.9l-104-112z"]},L$=O$,N$={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},h1={prefix:"fas",iconName:"share",icon:[512,512,["arrow-turn-right","mail-forward"],"f064","M307 34.8c-11.5 5.1-19 16.6-19 29.2v64H176C78.8 128 0 206.8 0 304C0 417.3 81.5 467.9 100.2 478.1c2.5 1.4 5.3 1.9 8.1 1.9c10.9 0 19.7-8.9 19.7-19.7c0-7.5-4.3-14.4-9.8-19.5C108.8 431.9 96 414.4 96 384c0-53 43-96 96-96h96v64c0 12.6 7.4 24.1 19 29.2s25 3 34.4-5.4l160-144c6.7-6.1 10.6-14.7 10.6-23.8s-3.8-17.7-10.6-23.8l-160-144c-9.4-8.5-22.9-10.6-34.4-5.4z"]};function u4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u4(Object(n),!0).forEach(function(r){bt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ud(e){"@babel/helpers - typeof";return ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ud(e)}function z$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function U$(e,t,n){return t&&f4(e.prototype,t),n&&f4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d1(e,t){return H$(e)||V$(e,t)||h4(e,t)||q$()}function $l(e){return $$(e)||G$(e)||h4(e)||j$()}function $$(e){if(Array.isArray(e))return p1(e)}function H$(e){if(Array.isArray(e))return e}function G$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function V$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(c){a=!0,s=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function h4(e,t){if(e){if(typeof e=="string")return p1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p1(e,t)}}function p1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function j$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1760
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1761
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var d4=function(){},g1={},p4={},g4=null,m4={mark:d4,measure:d4};try{typeof window<"u"&&(g1=window),typeof document<"u"&&(p4=document),typeof MutationObserver<"u"&&(g4=MutationObserver),typeof performance<"u"&&(m4=performance)}catch{}var W$=g1.navigator||{},b4=W$.userAgent,y4=b4===void 0?"":b4,Ui=g1,We=p4,v4=g4,fd=m4;Ui.document;var jr=!!We.documentElement&&!!We.head&&typeof We.addEventListener=="function"&&typeof We.createElement=="function",w4=~y4.indexOf("MSIE")||~y4.indexOf("Trident/"),hd,dd,pd,gd,md,qr="___FONT_AWESOME___",m1=16,x4="fa",A4="svg-inline--fa",eo="data-fa-i2svg",b1="data-fa-pseudo-element",Y$="data-fa-pseudo-element-pending",y1="data-prefix",v1="data-icon",E4="fontawesome-i2svg",Z$="async",Q$=["HTML","HEAD","STYLE","SCRIPT"],S4=function(){try{return!0}catch{return!1}}(),Ye="classic",ct="sharp",w1=[Ye,ct];function Hl(e){return new Proxy(e,{get:function(n,r){return r in n?n[r]:n[Ye]}})}var Gl=Hl((hd={},bt(hd,Ye,{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit","fa-kit":"kit"}),bt(hd,ct,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light"}),hd)),Vl=Hl((dd={},bt(dd,Ye,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),bt(dd,ct,{solid:"fass",regular:"fasr",light:"fasl"}),dd)),jl=Hl((pd={},bt(pd,Ye,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),bt(pd,ct,{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light"}),pd)),X$=Hl((gd={},bt(gd,Ye,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),bt(gd,ct,{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl"}),gd)),K$=/fa(s|r|l|t|d|b|k|ss|sr|sl)?[\-\ ]/,_4="fa-layers-text",J$=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,eH=Hl((md={},bt(md,Ye,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),bt(md,ct,{900:"fass",400:"fasr",300:"fasl"}),md)),C4=[1,2,3,4,5,6,7,8,9,10],tH=C4.concat([11,12,13,14,15,16,17,18,19,20]),nH=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],to={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},ql=new Set;Object.keys(Vl[Ye]).map(ql.add.bind(ql)),Object.keys(Vl[ct]).map(ql.add.bind(ql));var rH=[].concat(w1,$l(ql),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",to.GROUP,to.SWAP_OPACITY,to.PRIMARY,to.SECONDARY]).concat(C4.map(function(e){return"".concat(e,"x")})).concat(tH.map(function(e){return"w-".concat(e)})),Wl=Ui.FontAwesomeConfig||{};function iH(e){var t=We.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function aH(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(We&&typeof We.querySelector=="function"){var oH=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];oH.forEach(function(e){var t=d1(e,2),n=t[0],r=t[1],i=aH(iH(n));i!=null&&(Wl[r]=i)})}var k4={styleDefault:"solid",familyDefault:"classic",cssPrefix:x4,replacementClass:A4,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Wl.familyPrefix&&(Wl.cssPrefix=Wl.familyPrefix);var ws=te(te({},k4),Wl);ws.autoReplaceSvg||(ws.observeMutations=!1);var re={};Object.keys(k4).forEach(function(e){Object.defineProperty(re,e,{enumerable:!0,set:function(n){ws[e]=n,Yl.forEach(function(r){return r(re)})},get:function(){return ws[e]}})}),Object.defineProperty(re,"familyPrefix",{enumerable:!0,set:function(t){ws.cssPrefix=t,Yl.forEach(function(n){return n(re)})},get:function(){return ws.cssPrefix}}),Ui.FontAwesomeConfig=re;var Yl=[];function sH(e){return Yl.push(e),function(){Yl.splice(Yl.indexOf(e),1)}}var $i=m1,yr={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function cH(e){if(!(!e||!jr)){var t=We.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=We.head.childNodes,r=null,i=n.length-1;i>-1;i--){var a=n[i],o=(a.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(r=a)}return We.head.insertBefore(t,r),e}}var lH="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Zl(){for(var e=12,t="";e-- >0;)t+=lH[Math.random()*62|0];return t}function xs(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function x1(e){return e.classList?xs(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function T4(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function uH(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(T4(e[n]),'" ')},"").trim()}function bd(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function A1(e){return e.size!==yr.size||e.x!==yr.x||e.y!==yr.y||e.rotate!==yr.rotate||e.flipX||e.flipY}function fH(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},a="translate(".concat(t.x*32,", ").concat(t.y*32,") "),o="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),c={transform:"".concat(a," ").concat(o," ").concat(s)},l={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:c,path:l}}function hH(e){var t=e.transform,n=e.width,r=n===void 0?m1:n,i=e.height,a=i===void 0?m1:i,o=e.startCentered,s=o===void 0?!1:o,c="";return s&&w4?c+="translate(".concat(t.x/$i-r/2,"em, ").concat(t.y/$i-a/2,"em) "):s?c+="translate(calc(-50% + ".concat(t.x/$i,"em), calc(-50% + ").concat(t.y/$i,"em)) "):c+="translate(".concat(t.x/$i,"em, ").concat(t.y/$i,"em) "),c+="scale(".concat(t.size/$i*(t.flipX?-1:1),", ").concat(t.size/$i*(t.flipY?-1:1),") "),c+="rotate(".concat(t.rotate,"deg) "),c}var dH=`:root, :host {
1762
+ */const f1=Da(class extends Zo{constructor(e){var t;if(super(e),e.type!==cr.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var r,i;if(this.it===void 0){this.it=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!((r=this.st)!=null&&r.has(a))&&this.it.add(a);return this.render(t)}const n=e.element.classList;for(const a of this.it)a in t||(n.remove(a),this.it.delete(a));for(const a in t){const o=!!t[a];o===this.it.has(a)||(i=this.st)!=null&&i.has(a)||(o?(n.add(a),this.it.add(a)):(n.remove(a),this.it.delete(a)))}return Dt}});var l$={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"]},ld=l$,u$={prefix:"fas",iconName:"forward-step",icon:[320,512,["step-forward"],"f051","M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416V96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4l192 160L256 241V96c0-17.7 14.3-32 32-32s32 14.3 32 32V416c0 17.7-14.3 32-32 32s-32-14.3-32-32V271l-11.5 9.6-192 160z"]},f$=u$,h$={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},d$=h$,a4={prefix:"fas",iconName:"bookmark",icon:[384,512,[128278,61591],"f02e","M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z"]},p$={prefix:"fas",iconName:"maximize",icon:[512,512,["expand-arrows-alt"],"f31e","M200 32H56C42.7 32 32 42.7 32 56V200c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l40-40 79 79-79 79L73 295c-6.9-6.9-17.2-8.9-26.2-5.2S32 302.3 32 312V456c0 13.3 10.7 24 24 24H200c9.7 0 18.5-5.8 22.2-14.8s1.7-19.3-5.2-26.2l-40-40 79-79 79 79-40 40c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H456c13.3 0 24-10.7 24-24V312c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2l-40 40-79-79 79-79 40 40c6.9 6.9 17.2 8.9 26.2 5.2s14.8-12.5 14.8-22.2V56c0-13.3-10.7-24-24-24H312c-9.7 0-18.5 5.8-22.2 14.8s-1.7 19.3 5.2 26.2l40 40-79 79-79-79 40-40c6.9-6.9 8.9-17.2 5.2-26.2S209.7 32 200 32z"]},g$=p$,m$={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320z"]},b$=m$,Ja={prefix:"fas",iconName:"filter",icon:[512,512,[],"f0b0","M3.9 54.9C10.5 40.9 24.5 32 40 32H472c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9V448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6V320.9L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"]},Ul={prefix:"fas",iconName:"object-group",icon:[576,512,[],"f247","M32 119.4C12.9 108.4 0 87.7 0 64C0 28.7 28.7 0 64 0c23.7 0 44.4 12.9 55.4 32H456.6C467.6 12.9 488.3 0 512 0c35.3 0 64 28.7 64 64c0 23.7-12.9 44.4-32 55.4V392.6c19.1 11.1 32 31.7 32 55.4c0 35.3-28.7 64-64 64c-23.7 0-44.4-12.9-55.4-32H119.4c-11.1 19.1-31.7 32-55.4 32c-35.3 0-64-28.7-64-64c0-23.7 12.9-44.4 32-55.4V119.4zM456.6 96H119.4c-5.6 9.7-13.7 17.8-23.4 23.4V392.6c9.7 5.6 17.8 13.7 23.4 23.4H456.6c5.6-9.7 13.7-17.8 23.4-23.4V119.4c-9.7-5.6-17.8-13.7-23.4-23.4zM128 160c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v96c0 17.7-14.3 32-32 32H160c-17.7 0-32-14.3-32-32V160zM256 320h32c35.3 0 64-28.7 64-64V224h64c17.7 0 32 14.3 32 32v96c0 17.7-14.3 32-32 32H288c-17.7 0-32-14.3-32-32V320z"]},o4={prefix:"fas",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"]},y$={prefix:"fas",iconName:"circle-question",icon:[512,512,[62108,"question-circle"],"f059","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},v$=y$,w$={prefix:"fas",iconName:"pen",icon:[512,512,[128394],"f304","M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"]},x$={prefix:"fas",iconName:"arrow-rotate-right",icon:[512,512,[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],"f01e","M386.3 160H336c-17.7 0-32 14.3-32 32s14.3 32 32 32H464c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v51.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L386.3 160z"]},A$=x$,s4={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},E$={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},c4=E$,S$={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},_$=S$,C$={prefix:"fas",iconName:"backward-step",icon:[320,512,["step-backward"],"f048","M267.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29V96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160L64 241V96c0-17.7-14.3-32-32-32S0 78.3 0 96V416c0 17.7 14.3 32 32 32s32-14.3 32-32V271l11.5 9.6 192 160z"]},k$=C$,T$={prefix:"fas",iconName:"sliders",icon:[512,512,["sliders-h"],"f1de","M0 416c0 17.7 14.3 32 32 32l54.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 448c17.7 0 32-14.3 32-32s-14.3-32-32-32l-246.7 0c-12.3-28.3-40.5-48-73.3-48s-61 19.7-73.3 48L32 384c-17.7 0-32 14.3-32 32zm128 0a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32-80c-32.8 0-61 19.7-73.3 48L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l246.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48l54.7 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-54.7 0c-12.3-28.3-40.5-48-73.3-48zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm73.3-64C253 35.7 224.8 16 192 16s-61 19.7-73.3 48L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l86.7 0c12.3 28.3 40.5 48 73.3 48s61-19.7 73.3-48L480 128c17.7 0 32-14.3 32-32s-14.3-32-32-32L265.3 64z"]},I$=T$,R$={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},D$=R$,B$={prefix:"fas",iconName:"ellipsis",icon:[448,512,["ellipsis-h"],"f141","M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"]},F$=B$,l4={prefix:"fas",iconName:"medal",icon:[512,512,[127941],"f5a2","M4.1 38.2C1.4 34.2 0 29.4 0 24.6C0 11 11 0 24.6 0H133.9c11.2 0 21.7 5.9 27.4 15.5l68.5 114.1c-48.2 6.1-91.3 28.6-123.4 61.9L4.1 38.2zm503.7 0L405.6 191.5c-32.1-33.3-75.2-55.8-123.4-61.9L350.7 15.5C356.5 5.9 366.9 0 378.1 0H487.4C501 0 512 11 512 24.6c0 4.8-1.4 9.6-4.1 13.6zM80 336a176 176 0 1 1 352 0A176 176 0 1 1 80 336zm184.4-94.9c-3.4-7-13.3-7-16.8 0l-22.4 45.4c-1.4 2.8-4 4.7-7 5.1L168 298.9c-7.7 1.1-10.7 10.5-5.2 16l36.3 35.4c2.2 2.2 3.2 5.2 2.7 8.3l-8.6 49.9c-1.3 7.6 6.7 13.5 13.6 9.9l44.8-23.6c2.7-1.4 6-1.4 8.7 0l44.8 23.6c6.9 3.6 14.9-2.2 13.6-9.9l-8.6-49.9c-.5-3 .5-6.1 2.7-8.3l36.3-35.4c5.6-5.4 2.5-14.8-5.2-16l-50.1-7.3c-3-.4-5.7-2.4-7-5.1l-22.4-45.4z"]},P$={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},M$={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},O$={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},L$={prefix:"fas",iconName:"up-down",icon:[256,512,[8597,11021,"arrows-alt-v"],"f338","M145.6 7.7C141 2.8 134.7 0 128 0s-13 2.8-17.6 7.7l-104 112c-6.5 7-8.2 17.2-4.4 25.9S14.5 160 24 160H80V352H24c-9.5 0-18.2 5.7-22 14.4s-2.1 18.9 4.4 25.9l104 112c4.5 4.9 10.9 7.7 17.6 7.7s13-2.8 17.6-7.7l104-112c6.5-7 8.2-17.2 4.4-25.9s-12.5-14.4-22-14.4H176V160h56c9.5 0 18.2-5.7 22-14.4s2.1-18.9-4.4-25.9l-104-112z"]},N$=L$,z$={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},h1={prefix:"fas",iconName:"share",icon:[512,512,["arrow-turn-right","mail-forward"],"f064","M307 34.8c-11.5 5.1-19 16.6-19 29.2v64H176C78.8 128 0 206.8 0 304C0 417.3 81.5 467.9 100.2 478.1c2.5 1.4 5.3 1.9 8.1 1.9c10.9 0 19.7-8.9 19.7-19.7c0-7.5-4.3-14.4-9.8-19.5C108.8 431.9 96 414.4 96 384c0-53 43-96 96-96h96v64c0 12.6 7.4 24.1 19 29.2s25 3 34.4-5.4l160-144c6.7-6.1 10.6-14.7 10.6-23.8s-3.8-17.7-10.6-23.8l-160-144c-9.4-8.5-22.9-10.6-34.4-5.4z"]};function u4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u4(Object(n),!0).forEach(function(r){bt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ud(e){"@babel/helpers - typeof";return ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ud(e)}function U$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $$(e,t,n){return t&&f4(e.prototype,t),n&&f4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d1(e,t){return G$(e)||j$(e,t)||h4(e,t)||W$()}function $l(e){return H$(e)||V$(e)||h4(e)||q$()}function H$(e){if(Array.isArray(e))return p1(e)}function G$(e){if(Array.isArray(e))return e}function V$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j$(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(c){a=!0,s=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function h4(e,t){if(e){if(typeof e=="string")return p1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p1(e,t)}}function p1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1763
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1764
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var d4=function(){},g1={},p4={},g4=null,m4={mark:d4,measure:d4};try{typeof window<"u"&&(g1=window),typeof document<"u"&&(p4=document),typeof MutationObserver<"u"&&(g4=MutationObserver),typeof performance<"u"&&(m4=performance)}catch{}var Y$=g1.navigator||{},b4=Y$.userAgent,y4=b4===void 0?"":b4,Ui=g1,We=p4,v4=g4,fd=m4;Ui.document;var jr=!!We.documentElement&&!!We.head&&typeof We.addEventListener=="function"&&typeof We.createElement=="function",w4=~y4.indexOf("MSIE")||~y4.indexOf("Trident/"),hd,dd,pd,gd,md,qr="___FONT_AWESOME___",m1=16,x4="fa",A4="svg-inline--fa",eo="data-fa-i2svg",b1="data-fa-pseudo-element",Z$="data-fa-pseudo-element-pending",y1="data-prefix",v1="data-icon",E4="fontawesome-i2svg",Q$="async",X$=["HTML","HEAD","STYLE","SCRIPT"],S4=function(){try{return!0}catch{return!1}}(),Ye="classic",ct="sharp",w1=[Ye,ct];function Hl(e){return new Proxy(e,{get:function(n,r){return r in n?n[r]:n[Ye]}})}var Gl=Hl((hd={},bt(hd,Ye,{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit","fa-kit":"kit"}),bt(hd,ct,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light"}),hd)),Vl=Hl((dd={},bt(dd,Ye,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),bt(dd,ct,{solid:"fass",regular:"fasr",light:"fasl"}),dd)),jl=Hl((pd={},bt(pd,Ye,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),bt(pd,ct,{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light"}),pd)),K$=Hl((gd={},bt(gd,Ye,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),bt(gd,ct,{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl"}),gd)),J$=/fa(s|r|l|t|d|b|k|ss|sr|sl)?[\-\ ]/,_4="fa-layers-text",eH=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,tH=Hl((md={},bt(md,Ye,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),bt(md,ct,{900:"fass",400:"fasr",300:"fasl"}),md)),C4=[1,2,3,4,5,6,7,8,9,10],nH=C4.concat([11,12,13,14,15,16,17,18,19,20]),rH=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],to={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},ql=new Set;Object.keys(Vl[Ye]).map(ql.add.bind(ql)),Object.keys(Vl[ct]).map(ql.add.bind(ql));var iH=[].concat(w1,$l(ql),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",to.GROUP,to.SWAP_OPACITY,to.PRIMARY,to.SECONDARY]).concat(C4.map(function(e){return"".concat(e,"x")})).concat(nH.map(function(e){return"w-".concat(e)})),Wl=Ui.FontAwesomeConfig||{};function aH(e){var t=We.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function oH(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(We&&typeof We.querySelector=="function"){var sH=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];sH.forEach(function(e){var t=d1(e,2),n=t[0],r=t[1],i=oH(aH(n));i!=null&&(Wl[r]=i)})}var k4={styleDefault:"solid",familyDefault:"classic",cssPrefix:x4,replacementClass:A4,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Wl.familyPrefix&&(Wl.cssPrefix=Wl.familyPrefix);var ws=te(te({},k4),Wl);ws.autoReplaceSvg||(ws.observeMutations=!1);var re={};Object.keys(k4).forEach(function(e){Object.defineProperty(re,e,{enumerable:!0,set:function(n){ws[e]=n,Yl.forEach(function(r){return r(re)})},get:function(){return ws[e]}})}),Object.defineProperty(re,"familyPrefix",{enumerable:!0,set:function(t){ws.cssPrefix=t,Yl.forEach(function(n){return n(re)})},get:function(){return ws.cssPrefix}}),Ui.FontAwesomeConfig=re;var Yl=[];function cH(e){return Yl.push(e),function(){Yl.splice(Yl.indexOf(e),1)}}var $i=m1,yr={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function lH(e){if(!(!e||!jr)){var t=We.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=We.head.childNodes,r=null,i=n.length-1;i>-1;i--){var a=n[i],o=(a.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(r=a)}return We.head.insertBefore(t,r),e}}var uH="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Zl(){for(var e=12,t="";e-- >0;)t+=uH[Math.random()*62|0];return t}function xs(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function x1(e){return e.classList?xs(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function T4(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function fH(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(T4(e[n]),'" ')},"").trim()}function bd(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function A1(e){return e.size!==yr.size||e.x!==yr.x||e.y!==yr.y||e.rotate!==yr.rotate||e.flipX||e.flipY}function hH(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},a="translate(".concat(t.x*32,", ").concat(t.y*32,") "),o="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),c={transform:"".concat(a," ").concat(o," ").concat(s)},l={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:c,path:l}}function dH(e){var t=e.transform,n=e.width,r=n===void 0?m1:n,i=e.height,a=i===void 0?m1:i,o=e.startCentered,s=o===void 0?!1:o,c="";return s&&w4?c+="translate(".concat(t.x/$i-r/2,"em, ").concat(t.y/$i-a/2,"em) "):s?c+="translate(calc(-50% + ".concat(t.x/$i,"em), calc(-50% + ").concat(t.y/$i,"em)) "):c+="translate(".concat(t.x/$i,"em, ").concat(t.y/$i,"em) "),c+="scale(".concat(t.size/$i*(t.flipX?-1:1),", ").concat(t.size/$i*(t.flipY?-1:1),") "),c+="rotate(".concat(t.rotate,"deg) "),c}var pH=`:root, :host {
1762
1765
  --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";
1763
1766
  --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";
1764
1767
  --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";
@@ -2514,17 +2517,17 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2514
2517
  .fad.fa-inverse,
2515
2518
  .fa-duotone.fa-inverse {
2516
2519
  color: var(--fa-inverse, #fff);
2517
- }`;function I4(){var e=x4,t=A4,n=re.cssPrefix,r=re.replacementClass,i=dH;if(n!==e||r!==t){var a=new RegExp("\\.".concat(e,"\\-"),"g"),o=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");i=i.replace(a,".".concat(n,"-")).replace(o,"--".concat(n,"-")).replace(s,".".concat(r))}return i}var R4=!1;function E1(){re.autoAddCss&&!R4&&(cH(I4()),R4=!0)}var pH={mixout:function(){return{dom:{css:I4,insertCss:E1}}},hooks:function(){return{beforeDOMElementCreation:function(){E1()},beforeI2svg:function(){E1()}}}},Wr=Ui||{};Wr[qr]||(Wr[qr]={}),Wr[qr].styles||(Wr[qr].styles={}),Wr[qr].hooks||(Wr[qr].hooks={}),Wr[qr].shims||(Wr[qr].shims=[]);var Qn=Wr[qr],D4=[],gH=function e(){We.removeEventListener("DOMContentLoaded",e),yd=1,D4.map(function(t){return t()})},yd=!1;jr&&(yd=(We.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(We.readyState),yd||We.addEventListener("DOMContentLoaded",gH));function mH(e){jr&&(yd?setTimeout(e,0):D4.push(e))}function Ql(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,a=i===void 0?[]:i;return typeof e=="string"?T4(e):"<".concat(t," ").concat(uH(r),">").concat(a.map(Ql).join(""),"</").concat(t,">")}function B4(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var bH=function(t,n){return function(r,i,a,o){return t.call(n,r,i,a,o)}},S1=function(t,n,r,i){var a=Object.keys(t),o=a.length,s=i!==void 0?bH(n,i):n,c,l,u;for(r===void 0?(c=1,u=t[a[0]]):(c=0,u=r);c<o;c++)l=a[c],u=s(u,t[l],l,t);return u};function yH(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}function _1(e){var t=yH(e);return t.length===1?t[0].toString(16):null}function vH(e,t){var n=e.length,r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function F4(e){return Object.keys(e).reduce(function(t,n){var r=e[n],i=!!r.icon;return i?t[r.iconName]=r.icon:t[n]=r,t},{})}function C1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,a=F4(t);typeof Qn.hooks.addPack=="function"&&!i?Qn.hooks.addPack(e,F4(t)):Qn.styles[e]=te(te({},Qn.styles[e]||{}),a),e==="fas"&&C1("fa",t)}var vd,wd,xd,As=Qn.styles,wH=Qn.shims,xH=(vd={},bt(vd,Ye,Object.values(jl[Ye])),bt(vd,ct,Object.values(jl[ct])),vd),k1=null,P4={},M4={},O4={},L4={},N4={},AH=(wd={},bt(wd,Ye,Object.keys(Gl[Ye])),bt(wd,ct,Object.keys(Gl[ct])),wd);function EH(e){return~rH.indexOf(e)}function SH(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!EH(i)?i:null}var z4=function(){var t=function(a){return S1(As,function(o,s,c){return o[c]=S1(s,a,{}),o},{})};P4=t(function(i,a,o){if(a[3]&&(i[a[3]]=o),a[2]){var s=a[2].filter(function(c){return typeof c=="number"});s.forEach(function(c){i[c.toString(16)]=o})}return i}),M4=t(function(i,a,o){if(i[o]=o,a[2]){var s=a[2].filter(function(c){return typeof c=="string"});s.forEach(function(c){i[c]=o})}return i}),N4=t(function(i,a,o){var s=a[2];return i[o]=o,s.forEach(function(c){i[c]=o}),i});var n="far"in As||re.autoFetchSvg,r=S1(wH,function(i,a){var o=a[0],s=a[1],c=a[2];return s==="far"&&!n&&(s="fas"),typeof o=="string"&&(i.names[o]={prefix:s,iconName:c}),typeof o=="number"&&(i.unicodes[o.toString(16)]={prefix:s,iconName:c}),i},{names:{},unicodes:{}});O4=r.names,L4=r.unicodes,k1=Ad(re.styleDefault,{family:re.familyDefault})};sH(function(e){k1=Ad(e.styleDefault,{family:re.familyDefault})}),z4();function T1(e,t){return(P4[e]||{})[t]}function _H(e,t){return(M4[e]||{})[t]}function no(e,t){return(N4[e]||{})[t]}function U4(e){return O4[e]||{prefix:null,iconName:null}}function CH(e){var t=L4[e],n=T1("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Hi(){return k1}var I1=function(){return{prefix:null,iconName:null,rest:[]}};function Ad(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Ye:n,i=Gl[r][e],a=Vl[r][e]||Vl[r][i],o=e in Qn.styles?e:null;return a||o||null}var $4=(xd={},bt(xd,Ye,Object.keys(jl[Ye])),bt(xd,ct,Object.keys(jl[ct])),xd);function Ed(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,a=(t={},bt(t,Ye,"".concat(re.cssPrefix,"-").concat(Ye)),bt(t,ct,"".concat(re.cssPrefix,"-").concat(ct)),t),o=null,s=Ye;(e.includes(a[Ye])||e.some(function(l){return $4[Ye].includes(l)}))&&(s=Ye),(e.includes(a[ct])||e.some(function(l){return $4[ct].includes(l)}))&&(s=ct);var c=e.reduce(function(l,u){var f=SH(re.cssPrefix,u);if(As[u]?(u=xH[s].includes(u)?X$[s][u]:u,o=u,l.prefix=u):AH[s].indexOf(u)>-1?(o=u,l.prefix=Ad(u,{family:s})):f?l.iconName=f:u!==re.replacementClass&&u!==a[Ye]&&u!==a[ct]&&l.rest.push(u),!i&&l.prefix&&l.iconName){var h=o==="fa"?U4(l.iconName):{},d=no(l.prefix,l.iconName);h.prefix&&(o=null),l.iconName=h.iconName||d||l.iconName,l.prefix=h.prefix||l.prefix,l.prefix==="far"&&!As.far&&As.fas&&!re.autoFetchSvg&&(l.prefix="fas")}return l},I1());return(e.includes("fa-brands")||e.includes("fab"))&&(c.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(c.prefix="fad"),!c.prefix&&s===ct&&(As.fass||re.autoFetchSvg)&&(c.prefix="fass",c.iconName=no(c.prefix,c.iconName)||c.iconName),(c.prefix==="fa"||o==="fa")&&(c.prefix=Hi()||"fas"),c}var kH=function(){function e(){z$(this,e),this.definitions={}}return U$(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=i.reduce(this._pullDefinitions,{});Object.keys(o).forEach(function(s){n.definitions[s]=te(te({},n.definitions[s]||{}),o[s]),C1(s,o[s]);var c=jl[Ye][s];c&&C1(c,o[s]),z4()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(n,r){var i=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(i).map(function(a){var o=i[a],s=o.prefix,c=o.iconName,l=o.icon,u=l[2];n[s]||(n[s]={}),u.length>0&&u.forEach(function(f){typeof f=="string"&&(n[s][f]=l)}),n[s][c]=l}),n}}]),e}(),H4=[],Es={},Ss={},TH=Object.keys(Ss);function IH(e,t){var n=t.mixoutsTo;return H4=e,Es={},Object.keys(Ss).forEach(function(r){TH.indexOf(r)===-1&&delete Ss[r]}),H4.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(o){typeof i[o]=="function"&&(n[o]=i[o]),ud(i[o])==="object"&&Object.keys(i[o]).forEach(function(s){n[o]||(n[o]={}),n[o][s]=i[o][s]})}),r.hooks){var a=r.hooks();Object.keys(a).forEach(function(o){Es[o]||(Es[o]=[]),Es[o].push(a[o])})}r.provides&&r.provides(Ss)}),n}function R1(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var a=Es[e]||[];return a.forEach(function(o){t=o.apply(null,[t].concat(r))}),t}function ro(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=Es[e]||[];i.forEach(function(a){a.apply(null,n)})}function Yr(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Ss[e]?Ss[e].apply(null,t):void 0}function D1(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,n=e.prefix||Hi();if(t)return t=no(n,t)||t,B4(G4.definitions,n,t)||B4(Qn.styles,n,t)}var G4=new kH,RH=function(){re.autoReplaceSvg=!1,re.observeMutations=!1,ro("noAuto")},DH={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return jr?(ro("beforeI2svg",t),Yr("pseudoElements2svg",t),Yr("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;re.autoReplaceSvg===!1&&(re.autoReplaceSvg=!0),re.observeMutations=!0,mH(function(){FH({autoReplaceSvgRoot:n}),ro("watch",t)})}},BH={icon:function(t){if(t===null)return null;if(ud(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:no(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=Ad(t[0]);return{prefix:r,iconName:no(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(re.cssPrefix,"-"))>-1||t.match(K$))){var i=Ed(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Hi(),iconName:no(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var a=Hi();return{prefix:a,iconName:no(a,t)||t}}}},hn={noAuto:RH,config:re,dom:DH,parse:BH,library:G4,findIconDefinition:D1,toHtml:Ql},FH=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?We:n;(Object.keys(Qn.styles).length>0||re.autoFetchSvg)&&jr&&re.autoReplaceSvg&&hn.dom.i2svg({node:r})};function Sd(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Ql(r)})}}),Object.defineProperty(e,"node",{get:function(){if(jr){var r=We.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function PH(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,a=e.styles,o=e.transform;if(A1(o)&&n.found&&!r.found){var s=n.width,c=n.height,l={x:s/c/2,y:.5};i.style=bd(te(te({},a),{},{"transform-origin":"".concat(l.x+o.x/16,"em ").concat(l.y+o.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function MH(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,a=e.symbol,o=a===!0?"".concat(t,"-").concat(re.cssPrefix,"-").concat(n):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:te(te({},i),{},{id:o}),children:r}]}]}function B1(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,a=e.iconName,o=e.transform,s=e.symbol,c=e.title,l=e.maskId,u=e.titleId,f=e.extra,h=e.watchable,d=h===void 0?!1:h,p=r.found?r:n,g=p.width,b=p.height,y=i==="fak",w=[re.replacementClass,a?"".concat(re.cssPrefix,"-").concat(a):""].filter(function(M){return f.classes.indexOf(M)===-1}).filter(function(M){return M!==""||!!M}).concat(f.classes).join(" "),A={children:[],attributes:te(te({},f.attributes),{},{"data-prefix":i,"data-icon":a,class:w,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(g," ").concat(b)})},x=y&&!~f.classes.indexOf("fa-fw")?{width:"".concat(g/b*16*.0625,"em")}:{};d&&(A.attributes[eo]=""),c&&(A.children.push({tag:"title",attributes:{id:A.attributes["aria-labelledby"]||"title-".concat(u||Zl())},children:[c]}),delete A.attributes.title);var C=te(te({},A),{},{prefix:i,iconName:a,main:n,mask:r,maskId:l,transform:o,symbol:s,styles:te(te({},x),f.styles)}),_=r.found&&n.found?Yr("generateAbstractMask",C)||{children:[],attributes:{}}:Yr("generateAbstractIcon",C)||{children:[],attributes:{}},I=_.children,D=_.attributes;return C.children=I,C.attributes=D,s?MH(C):PH(C)}function V4(e){var t=e.content,n=e.width,r=e.height,i=e.transform,a=e.title,o=e.extra,s=e.watchable,c=s===void 0?!1:s,l=te(te(te({},o.attributes),a?{title:a}:{}),{},{class:o.classes.join(" ")});c&&(l[eo]="");var u=te({},o.styles);A1(i)&&(u.transform=hH({transform:i,startCentered:!0,width:n,height:r}),u["-webkit-transform"]=u.transform);var f=bd(u);f.length>0&&(l.style=f);var h=[];return h.push({tag:"span",attributes:l,children:[t]}),a&&h.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),h}function OH(e){var t=e.content,n=e.title,r=e.extra,i=te(te(te({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),a=bd(r.styles);a.length>0&&(i.style=a);var o=[];return o.push({tag:"span",attributes:i,children:[t]}),n&&o.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),o}var F1=Qn.styles;function P1(e){var t=e[0],n=e[1],r=e.slice(4),i=d1(r,1),a=i[0],o=null;return Array.isArray(a)?o={tag:"g",attributes:{class:"".concat(re.cssPrefix,"-").concat(to.GROUP)},children:[{tag:"path",attributes:{class:"".concat(re.cssPrefix,"-").concat(to.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(re.cssPrefix,"-").concat(to.PRIMARY),fill:"currentColor",d:a[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:a}},{found:!0,width:t,height:n,icon:o}}var LH={found:!1,width:512,height:512};function NH(e,t){!S4&&!re.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function M1(e,t){var n=t;return t==="fa"&&re.styleDefault!==null&&(t=Hi()),new Promise(function(r,i){if(Yr("missingIconAbstract"),n==="fa"){var a=U4(e)||{};e=a.iconName||e,t=a.prefix||t}if(e&&t&&F1[t]&&F1[t][e]){var o=F1[t][e];return r(P1(o))}NH(e,t),r(te(te({},LH),{},{icon:re.showMissingIcons&&e?Yr("missingIconAbstract")||{}:{}}))})}var j4=function(){},O1=re.measurePerformance&&fd&&fd.mark&&fd.measure?fd:{mark:j4,measure:j4},Xl='FA "6.4.2"',zH=function(t){return O1.mark("".concat(Xl," ").concat(t," begins")),function(){return q4(t)}},q4=function(t){O1.mark("".concat(Xl," ").concat(t," ends")),O1.measure("".concat(Xl," ").concat(t),"".concat(Xl," ").concat(t," begins"),"".concat(Xl," ").concat(t," ends"))},L1={begin:zH,end:q4},_d=function(){};function W4(e){var t=e.getAttribute?e.getAttribute(eo):null;return typeof t=="string"}function UH(e){var t=e.getAttribute?e.getAttribute(y1):null,n=e.getAttribute?e.getAttribute(v1):null;return t&&n}function $H(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(re.replacementClass)}function HH(){if(re.autoReplaceSvg===!0)return Cd.replace;var e=Cd[re.autoReplaceSvg];return e||Cd.replace}function GH(e){return We.createElementNS("http://www.w3.org/2000/svg",e)}function VH(e){return We.createElement(e)}function Y4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?GH:VH:n;if(typeof e=="string")return We.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(o){i.setAttribute(o,e.attributes[o])});var a=e.children||[];return a.forEach(function(o){i.appendChild(Y4(o,{ceFn:r}))}),i}function jH(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var Cd={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(Y4(i),n)}),n.getAttribute(eo)===null&&re.keepOriginalSource){var r=We.createComment(jH(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~x1(n).indexOf(re.replacementClass))return Cd.replace(t);var i=new RegExp("".concat(re.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var a=r[0].attributes.class.split(" ").reduce(function(s,c){return c===re.replacementClass||c.match(i)?s.toSvg.push(c):s.toNode.push(c),s},{toNode:[],toSvg:[]});r[0].attributes.class=a.toSvg.join(" "),a.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",a.toNode.join(" "))}var o=r.map(function(s){return Ql(s)}).join(`
2518
- `);n.setAttribute(eo,""),n.innerHTML=o}};function Z4(e){e()}function Q4(e,t){var n=typeof t=="function"?t:_d;if(e.length===0)n();else{var r=Z4;re.mutateApproach===Z$&&(r=Ui.requestAnimationFrame||Z4),r(function(){var i=HH(),a=L1.begin("mutate");e.map(i),a(),n()})}}var N1=!1;function X4(){N1=!0}function z1(){N1=!1}var kd=null;function K4(e){if(v4&&re.observeMutations){var t=e.treeCallback,n=t===void 0?_d:t,r=e.nodeCallback,i=r===void 0?_d:r,a=e.pseudoElementsCallback,o=a===void 0?_d:a,s=e.observeMutationsRoot,c=s===void 0?We:s;kd=new v4(function(l){if(!N1){var u=Hi();xs(l).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!W4(f.addedNodes[0])&&(re.searchPseudoElements&&o(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&re.searchPseudoElements&&o(f.target.parentNode),f.type==="attributes"&&W4(f.target)&&~nH.indexOf(f.attributeName))if(f.attributeName==="class"&&UH(f.target)){var h=Ed(x1(f.target)),d=h.prefix,p=h.iconName;f.target.setAttribute(y1,d||u),p&&f.target.setAttribute(v1,p)}else $H(f.target)&&i(f.target)})}}),jr&&kd.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function qH(){kd&&kd.disconnect()}function WH(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var a=i.split(":"),o=a[0],s=a.slice(1);return o&&s.length>0&&(r[o]=s.join(":").trim()),r},{})),n}function YH(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=Ed(x1(e));return i.prefix||(i.prefix=Hi()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=_H(i.prefix,e.innerText)||T1(i.prefix,_1(e.innerText))),!i.iconName&&re.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function ZH(e){var t=xs(e.attributes).reduce(function(i,a){return i.name!=="class"&&i.name!=="style"&&(i[a.name]=a.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return re.autoA11y&&(n?t["aria-labelledby"]="".concat(re.replacementClass,"-title-").concat(r||Zl()):(t["aria-hidden"]="true",t.focusable="false")),t}function QH(){return{iconName:null,title:null,titleId:null,prefix:null,transform:yr,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function J4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=YH(e),r=n.iconName,i=n.prefix,a=n.rest,o=ZH(e),s=R1("parseNodeAttributes",{},e),c=t.styleParser?WH(e):[];return te({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:yr,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:a,styles:c,attributes:o}},s)}var XH=Qn.styles;function eS(e){var t=re.autoReplaceSvg==="nest"?J4(e,{styleParser:!1}):J4(e);return~t.extra.classes.indexOf(_4)?Yr("generateLayersText",e,t):Yr("generateSvgReplacementMutation",e,t)}var Gi=new Set;w1.map(function(e){Gi.add("fa-".concat(e))}),Object.keys(Gl[Ye]).map(Gi.add.bind(Gi)),Object.keys(Gl[ct]).map(Gi.add.bind(Gi)),Gi=$l(Gi);function tS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!jr)return Promise.resolve();var n=We.documentElement.classList,r=function(f){return n.add("".concat(E4,"-").concat(f))},i=function(f){return n.remove("".concat(E4,"-").concat(f))},a=re.autoFetchSvg?Gi:w1.map(function(u){return"fa-".concat(u)}).concat(Object.keys(XH));a.includes("fa")||a.push("fa");var o=[".".concat(_4,":not([").concat(eo,"])")].concat(a.map(function(u){return".".concat(u,":not([").concat(eo,"])")})).join(", ");if(o.length===0)return Promise.resolve();var s=[];try{s=xs(e.querySelectorAll(o))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();var c=L1.begin("onTree"),l=s.reduce(function(u,f){try{var h=eS(f);h&&u.push(h)}catch(d){S4||d.name==="MissingIcon"&&console.error(d)}return u},[]);return new Promise(function(u,f){Promise.all(l).then(function(h){Q4(h,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),c(),u()})}).catch(function(h){c(),f(h)})})}function KH(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;eS(e).then(function(n){n&&Q4([n],t)})}function JH(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:D1(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:D1(i||{})),e(r,te(te({},n),{},{mask:i}))}}var eG=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?yr:r,a=n.symbol,o=a===void 0?!1:a,s=n.mask,c=s===void 0?null:s,l=n.maskId,u=l===void 0?null:l,f=n.title,h=f===void 0?null:f,d=n.titleId,p=d===void 0?null:d,g=n.classes,b=g===void 0?[]:g,y=n.attributes,w=y===void 0?{}:y,A=n.styles,x=A===void 0?{}:A;if(t){var C=t.prefix,_=t.iconName,I=t.icon;return Sd(te({type:"icon"},t),function(){return ro("beforeDOMElementCreation",{iconDefinition:t,params:n}),re.autoA11y&&(h?w["aria-labelledby"]="".concat(re.replacementClass,"-title-").concat(p||Zl()):(w["aria-hidden"]="true",w.focusable="false")),B1({icons:{main:P1(I),mask:c?P1(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:C,iconName:_,transform:te(te({},yr),i),symbol:o,title:h,maskId:u,titleId:p,extra:{attributes:w,styles:x,classes:b}})})}},tG={mixout:function(){return{icon:JH(eG)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=tS,n.nodeCallback=KH,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?We:r,a=n.callback,o=a===void 0?function(){}:a;return tS(i,o)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,a=r.title,o=r.titleId,s=r.prefix,c=r.transform,l=r.symbol,u=r.mask,f=r.maskId,h=r.extra;return new Promise(function(d,p){Promise.all([M1(i,s),u.iconName?M1(u.iconName,u.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(g){var b=d1(g,2),y=b[0],w=b[1];d([n,B1({icons:{main:y,mask:w},prefix:s,iconName:i,transform:c,symbol:l,maskId:f,title:a,titleId:o,extra:h,watchable:!0})])}).catch(p)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,a=n.main,o=n.transform,s=n.styles,c=bd(s);c.length>0&&(i.style=c);var l;return A1(o)&&(l=Yr("generateAbstractTransformGrouping",{main:a,transform:o,containerWidth:a.width,iconWidth:a.width})),r.push(l||a.icon),{children:r,attributes:i}}}},nG={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,a=i===void 0?[]:i;return Sd({type:"layer"},function(){ro("beforeDOMElementCreation",{assembler:n,params:r});var o=[];return n(function(s){Array.isArray(s)?s.map(function(c){o=o.concat(c.abstract)}):o=o.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(re.cssPrefix,"-layers")].concat($l(a)).join(" ")},children:o}]})}}}},rG={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,a=i===void 0?null:i,o=r.classes,s=o===void 0?[]:o,c=r.attributes,l=c===void 0?{}:c,u=r.styles,f=u===void 0?{}:u;return Sd({type:"counter",content:n},function(){return ro("beforeDOMElementCreation",{content:n,params:r}),OH({content:n.toString(),title:a,extra:{attributes:l,styles:f,classes:["".concat(re.cssPrefix,"-layers-counter")].concat($l(s))}})})}}}},iG={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,a=i===void 0?yr:i,o=r.title,s=o===void 0?null:o,c=r.classes,l=c===void 0?[]:c,u=r.attributes,f=u===void 0?{}:u,h=r.styles,d=h===void 0?{}:h;return Sd({type:"text",content:n},function(){return ro("beforeDOMElementCreation",{content:n,params:r}),V4({content:n,transform:te(te({},yr),a),title:s,extra:{attributes:f,styles:d,classes:["".concat(re.cssPrefix,"-layers-text")].concat($l(l))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,a=r.transform,o=r.extra,s=null,c=null;if(w4){var l=parseInt(getComputedStyle(n).fontSize,10),u=n.getBoundingClientRect();s=u.width/l,c=u.height/l}return re.autoA11y&&!i&&(o.attributes["aria-hidden"]="true"),Promise.resolve([n,V4({content:n.innerHTML,width:s,height:c,transform:a,title:i,extra:o,watchable:!0})])}}},aG=new RegExp('"',"ug"),nS=[1105920,1112319];function oG(e){var t=e.replace(aG,""),n=vH(t,0),r=n>=nS[0]&&n<=nS[1],i=t.length===2?t[0]===t[1]:!1;return{value:_1(i?t[0]:t),isSecondary:r||i}}function rS(e,t){var n="".concat(Y$).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var a=xs(e.children),o=a.filter(function(I){return I.getAttribute(b1)===t})[0],s=Ui.getComputedStyle(e,t),c=s.getPropertyValue("font-family").match(J$),l=s.getPropertyValue("font-weight"),u=s.getPropertyValue("content");if(o&&!c)return e.removeChild(o),r();if(c&&u!=="none"&&u!==""){var f=s.getPropertyValue("content"),h=~["Sharp"].indexOf(c[2])?ct:Ye,d=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(c[2])?Vl[h][c[2].toLowerCase()]:eH[h][l],p=oG(f),g=p.value,b=p.isSecondary,y=c[0].startsWith("FontAwesome"),w=T1(d,g),A=w;if(y){var x=CH(g);x.iconName&&x.prefix&&(w=x.iconName,d=x.prefix)}if(w&&!b&&(!o||o.getAttribute(y1)!==d||o.getAttribute(v1)!==A)){e.setAttribute(n,A),o&&e.removeChild(o);var C=QH(),_=C.extra;_.attributes[b1]=t,M1(w,d).then(function(I){var D=B1(te(te({},C),{},{icons:{main:I,mask:I1()},prefix:d,iconName:A,extra:_,watchable:!0})),M=We.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(M,e.firstChild):e.appendChild(M),M.outerHTML=D.map(function(G){return Ql(G)}).join(`
2519
- `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function sG(e){return Promise.all([rS(e,"::before"),rS(e,"::after")])}function cG(e){return e.parentNode!==document.head&&!~Q$.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(b1)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function iS(e){if(jr)return new Promise(function(t,n){var r=xs(e.querySelectorAll("*")).filter(cG).map(sG),i=L1.begin("searchPseudoElements");X4(),Promise.all(r).then(function(){i(),z1(),t()}).catch(function(){i(),z1(),n()})})}var lG={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=iS,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?We:r;re.searchPseudoElements&&iS(i)}}},aS=!1,uG={mixout:function(){return{dom:{unwatch:function(){X4(),aS=!0}}}},hooks:function(){return{bootstrap:function(){K4(R1("mutationObserverCallbacks",{}))},noAuto:function(){qH()},watch:function(n){var r=n.observeMutationsRoot;aS?z1():K4(R1("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},oS=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var a=i.toLowerCase().split("-"),o=a[0],s=a.slice(1).join("-");if(o&&s==="h")return r.flipX=!0,r;if(o&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(o){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n)},fG={mixout:function(){return{parse:{transform:function(n){return oS(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=oS(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,a=n.containerWidth,o=n.iconWidth,s={transform:"translate(".concat(a/2," 256)")},c="translate(".concat(i.x*32,", ").concat(i.y*32,") "),l="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),u="rotate(".concat(i.rotate," 0 0)"),f={transform:"".concat(c," ").concat(l," ").concat(u)},h={transform:"translate(".concat(o/2*-1," -256)")},d={outer:s,inner:f,path:h};return{tag:"g",attributes:te({},d.outer),children:[{tag:"g",attributes:te({},d.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:te(te({},r.icon.attributes),d.path)}]}]}}}},U1={x:0,y:0,width:"100%",height:"100%"};function sS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function hG(e){return e.tag==="g"?e.children:[e]}var dG={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),a=i?Ed(i.split(" ").map(function(o){return o.trim()})):I1();return a.prefix||(a.prefix=Hi()),n.mask=a,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,a=n.main,o=n.mask,s=n.maskId,c=n.transform,l=a.width,u=a.icon,f=o.width,h=o.icon,d=fH({transform:c,containerWidth:f,iconWidth:l}),p={tag:"rect",attributes:te(te({},U1),{},{fill:"white"})},g=u.children?{children:u.children.map(sS)}:{},b={tag:"g",attributes:te({},d.inner),children:[sS(te({tag:u.tag,attributes:te(te({},u.attributes),d.path)},g))]},y={tag:"g",attributes:te({},d.outer),children:[b]},w="mask-".concat(s||Zl()),A="clip-".concat(s||Zl()),x={tag:"mask",attributes:te(te({},U1),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[p,y]},C={tag:"defs",children:[{tag:"clipPath",attributes:{id:A},children:hG(h)},x]};return r.push(C,{tag:"rect",attributes:te({fill:"currentColor","clip-path":"url(#".concat(A,")"),mask:"url(#".concat(w,")")},U1)}),{children:r,attributes:i}}}},pG={provides:function(t){var n=!1;Ui.matchMedia&&(n=Ui.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},a={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:te(te({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var o=te(te({},a),{},{attributeName:"opacity"}),s={tag:"circle",attributes:te(te({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||s.children.push({tag:"animate",attributes:te(te({},a),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:te(te({},o),{},{values:"1;0;1;1;0;1;"})}),r.push(s),r.push({tag:"path",attributes:te(te({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:te(te({},o),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:te(te({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:te(te({},o),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},gG={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),a=i===null?!1:i===""?!0:i;return n.symbol=a,n}}}},mG=[pH,tG,nG,rG,iG,lG,uG,fG,dG,pG,gG];IH(mG,{mixoutsTo:hn}),hn.noAuto,hn.config,hn.library,hn.dom,hn.parse,hn.findIconDefinition,hn.toHtml;var Ue=hn.icon;hn.layer,hn.text,hn.counter;/**
2520
+ }`;function I4(){var e=x4,t=A4,n=re.cssPrefix,r=re.replacementClass,i=pH;if(n!==e||r!==t){var a=new RegExp("\\.".concat(e,"\\-"),"g"),o=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");i=i.replace(a,".".concat(n,"-")).replace(o,"--".concat(n,"-")).replace(s,".".concat(r))}return i}var R4=!1;function E1(){re.autoAddCss&&!R4&&(lH(I4()),R4=!0)}var gH={mixout:function(){return{dom:{css:I4,insertCss:E1}}},hooks:function(){return{beforeDOMElementCreation:function(){E1()},beforeI2svg:function(){E1()}}}},Wr=Ui||{};Wr[qr]||(Wr[qr]={}),Wr[qr].styles||(Wr[qr].styles={}),Wr[qr].hooks||(Wr[qr].hooks={}),Wr[qr].shims||(Wr[qr].shims=[]);var Qn=Wr[qr],D4=[],mH=function e(){We.removeEventListener("DOMContentLoaded",e),yd=1,D4.map(function(t){return t()})},yd=!1;jr&&(yd=(We.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(We.readyState),yd||We.addEventListener("DOMContentLoaded",mH));function bH(e){jr&&(yd?setTimeout(e,0):D4.push(e))}function Ql(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,a=i===void 0?[]:i;return typeof e=="string"?T4(e):"<".concat(t," ").concat(fH(r),">").concat(a.map(Ql).join(""),"</").concat(t,">")}function B4(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var yH=function(t,n){return function(r,i,a,o){return t.call(n,r,i,a,o)}},S1=function(t,n,r,i){var a=Object.keys(t),o=a.length,s=i!==void 0?yH(n,i):n,c,l,u;for(r===void 0?(c=1,u=t[a[0]]):(c=0,u=r);c<o;c++)l=a[c],u=s(u,t[l],l,t);return u};function vH(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}function _1(e){var t=vH(e);return t.length===1?t[0].toString(16):null}function wH(e,t){var n=e.length,r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function F4(e){return Object.keys(e).reduce(function(t,n){var r=e[n],i=!!r.icon;return i?t[r.iconName]=r.icon:t[n]=r,t},{})}function C1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,a=F4(t);typeof Qn.hooks.addPack=="function"&&!i?Qn.hooks.addPack(e,F4(t)):Qn.styles[e]=te(te({},Qn.styles[e]||{}),a),e==="fas"&&C1("fa",t)}var vd,wd,xd,As=Qn.styles,xH=Qn.shims,AH=(vd={},bt(vd,Ye,Object.values(jl[Ye])),bt(vd,ct,Object.values(jl[ct])),vd),k1=null,P4={},M4={},O4={},L4={},N4={},EH=(wd={},bt(wd,Ye,Object.keys(Gl[Ye])),bt(wd,ct,Object.keys(Gl[ct])),wd);function SH(e){return~iH.indexOf(e)}function _H(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!SH(i)?i:null}var z4=function(){var t=function(a){return S1(As,function(o,s,c){return o[c]=S1(s,a,{}),o},{})};P4=t(function(i,a,o){if(a[3]&&(i[a[3]]=o),a[2]){var s=a[2].filter(function(c){return typeof c=="number"});s.forEach(function(c){i[c.toString(16)]=o})}return i}),M4=t(function(i,a,o){if(i[o]=o,a[2]){var s=a[2].filter(function(c){return typeof c=="string"});s.forEach(function(c){i[c]=o})}return i}),N4=t(function(i,a,o){var s=a[2];return i[o]=o,s.forEach(function(c){i[c]=o}),i});var n="far"in As||re.autoFetchSvg,r=S1(xH,function(i,a){var o=a[0],s=a[1],c=a[2];return s==="far"&&!n&&(s="fas"),typeof o=="string"&&(i.names[o]={prefix:s,iconName:c}),typeof o=="number"&&(i.unicodes[o.toString(16)]={prefix:s,iconName:c}),i},{names:{},unicodes:{}});O4=r.names,L4=r.unicodes,k1=Ad(re.styleDefault,{family:re.familyDefault})};cH(function(e){k1=Ad(e.styleDefault,{family:re.familyDefault})}),z4();function T1(e,t){return(P4[e]||{})[t]}function CH(e,t){return(M4[e]||{})[t]}function no(e,t){return(N4[e]||{})[t]}function U4(e){return O4[e]||{prefix:null,iconName:null}}function kH(e){var t=L4[e],n=T1("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Hi(){return k1}var I1=function(){return{prefix:null,iconName:null,rest:[]}};function Ad(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Ye:n,i=Gl[r][e],a=Vl[r][e]||Vl[r][i],o=e in Qn.styles?e:null;return a||o||null}var $4=(xd={},bt(xd,Ye,Object.keys(jl[Ye])),bt(xd,ct,Object.keys(jl[ct])),xd);function Ed(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,a=(t={},bt(t,Ye,"".concat(re.cssPrefix,"-").concat(Ye)),bt(t,ct,"".concat(re.cssPrefix,"-").concat(ct)),t),o=null,s=Ye;(e.includes(a[Ye])||e.some(function(l){return $4[Ye].includes(l)}))&&(s=Ye),(e.includes(a[ct])||e.some(function(l){return $4[ct].includes(l)}))&&(s=ct);var c=e.reduce(function(l,u){var f=_H(re.cssPrefix,u);if(As[u]?(u=AH[s].includes(u)?K$[s][u]:u,o=u,l.prefix=u):EH[s].indexOf(u)>-1?(o=u,l.prefix=Ad(u,{family:s})):f?l.iconName=f:u!==re.replacementClass&&u!==a[Ye]&&u!==a[ct]&&l.rest.push(u),!i&&l.prefix&&l.iconName){var h=o==="fa"?U4(l.iconName):{},d=no(l.prefix,l.iconName);h.prefix&&(o=null),l.iconName=h.iconName||d||l.iconName,l.prefix=h.prefix||l.prefix,l.prefix==="far"&&!As.far&&As.fas&&!re.autoFetchSvg&&(l.prefix="fas")}return l},I1());return(e.includes("fa-brands")||e.includes("fab"))&&(c.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(c.prefix="fad"),!c.prefix&&s===ct&&(As.fass||re.autoFetchSvg)&&(c.prefix="fass",c.iconName=no(c.prefix,c.iconName)||c.iconName),(c.prefix==="fa"||o==="fa")&&(c.prefix=Hi()||"fas"),c}var TH=function(){function e(){U$(this,e),this.definitions={}}return $$(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=i.reduce(this._pullDefinitions,{});Object.keys(o).forEach(function(s){n.definitions[s]=te(te({},n.definitions[s]||{}),o[s]),C1(s,o[s]);var c=jl[Ye][s];c&&C1(c,o[s]),z4()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(n,r){var i=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(i).map(function(a){var o=i[a],s=o.prefix,c=o.iconName,l=o.icon,u=l[2];n[s]||(n[s]={}),u.length>0&&u.forEach(function(f){typeof f=="string"&&(n[s][f]=l)}),n[s][c]=l}),n}}]),e}(),H4=[],Es={},Ss={},IH=Object.keys(Ss);function RH(e,t){var n=t.mixoutsTo;return H4=e,Es={},Object.keys(Ss).forEach(function(r){IH.indexOf(r)===-1&&delete Ss[r]}),H4.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(o){typeof i[o]=="function"&&(n[o]=i[o]),ud(i[o])==="object"&&Object.keys(i[o]).forEach(function(s){n[o]||(n[o]={}),n[o][s]=i[o][s]})}),r.hooks){var a=r.hooks();Object.keys(a).forEach(function(o){Es[o]||(Es[o]=[]),Es[o].push(a[o])})}r.provides&&r.provides(Ss)}),n}function R1(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var a=Es[e]||[];return a.forEach(function(o){t=o.apply(null,[t].concat(r))}),t}function ro(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=Es[e]||[];i.forEach(function(a){a.apply(null,n)})}function Yr(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Ss[e]?Ss[e].apply(null,t):void 0}function D1(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,n=e.prefix||Hi();if(t)return t=no(n,t)||t,B4(G4.definitions,n,t)||B4(Qn.styles,n,t)}var G4=new TH,DH=function(){re.autoReplaceSvg=!1,re.observeMutations=!1,ro("noAuto")},BH={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return jr?(ro("beforeI2svg",t),Yr("pseudoElements2svg",t),Yr("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;re.autoReplaceSvg===!1&&(re.autoReplaceSvg=!0),re.observeMutations=!0,bH(function(){PH({autoReplaceSvgRoot:n}),ro("watch",t)})}},FH={icon:function(t){if(t===null)return null;if(ud(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:no(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=Ad(t[0]);return{prefix:r,iconName:no(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(re.cssPrefix,"-"))>-1||t.match(J$))){var i=Ed(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Hi(),iconName:no(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var a=Hi();return{prefix:a,iconName:no(a,t)||t}}}},hn={noAuto:DH,config:re,dom:BH,parse:FH,library:G4,findIconDefinition:D1,toHtml:Ql},PH=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?We:n;(Object.keys(Qn.styles).length>0||re.autoFetchSvg)&&jr&&re.autoReplaceSvg&&hn.dom.i2svg({node:r})};function Sd(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Ql(r)})}}),Object.defineProperty(e,"node",{get:function(){if(jr){var r=We.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function MH(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,a=e.styles,o=e.transform;if(A1(o)&&n.found&&!r.found){var s=n.width,c=n.height,l={x:s/c/2,y:.5};i.style=bd(te(te({},a),{},{"transform-origin":"".concat(l.x+o.x/16,"em ").concat(l.y+o.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function OH(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,a=e.symbol,o=a===!0?"".concat(t,"-").concat(re.cssPrefix,"-").concat(n):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:te(te({},i),{},{id:o}),children:r}]}]}function B1(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,a=e.iconName,o=e.transform,s=e.symbol,c=e.title,l=e.maskId,u=e.titleId,f=e.extra,h=e.watchable,d=h===void 0?!1:h,p=r.found?r:n,g=p.width,b=p.height,y=i==="fak",w=[re.replacementClass,a?"".concat(re.cssPrefix,"-").concat(a):""].filter(function(M){return f.classes.indexOf(M)===-1}).filter(function(M){return M!==""||!!M}).concat(f.classes).join(" "),A={children:[],attributes:te(te({},f.attributes),{},{"data-prefix":i,"data-icon":a,class:w,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(g," ").concat(b)})},x=y&&!~f.classes.indexOf("fa-fw")?{width:"".concat(g/b*16*.0625,"em")}:{};d&&(A.attributes[eo]=""),c&&(A.children.push({tag:"title",attributes:{id:A.attributes["aria-labelledby"]||"title-".concat(u||Zl())},children:[c]}),delete A.attributes.title);var C=te(te({},A),{},{prefix:i,iconName:a,main:n,mask:r,maskId:l,transform:o,symbol:s,styles:te(te({},x),f.styles)}),_=r.found&&n.found?Yr("generateAbstractMask",C)||{children:[],attributes:{}}:Yr("generateAbstractIcon",C)||{children:[],attributes:{}},I=_.children,D=_.attributes;return C.children=I,C.attributes=D,s?OH(C):MH(C)}function V4(e){var t=e.content,n=e.width,r=e.height,i=e.transform,a=e.title,o=e.extra,s=e.watchable,c=s===void 0?!1:s,l=te(te(te({},o.attributes),a?{title:a}:{}),{},{class:o.classes.join(" ")});c&&(l[eo]="");var u=te({},o.styles);A1(i)&&(u.transform=dH({transform:i,startCentered:!0,width:n,height:r}),u["-webkit-transform"]=u.transform);var f=bd(u);f.length>0&&(l.style=f);var h=[];return h.push({tag:"span",attributes:l,children:[t]}),a&&h.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),h}function LH(e){var t=e.content,n=e.title,r=e.extra,i=te(te(te({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),a=bd(r.styles);a.length>0&&(i.style=a);var o=[];return o.push({tag:"span",attributes:i,children:[t]}),n&&o.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),o}var F1=Qn.styles;function P1(e){var t=e[0],n=e[1],r=e.slice(4),i=d1(r,1),a=i[0],o=null;return Array.isArray(a)?o={tag:"g",attributes:{class:"".concat(re.cssPrefix,"-").concat(to.GROUP)},children:[{tag:"path",attributes:{class:"".concat(re.cssPrefix,"-").concat(to.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(re.cssPrefix,"-").concat(to.PRIMARY),fill:"currentColor",d:a[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:a}},{found:!0,width:t,height:n,icon:o}}var NH={found:!1,width:512,height:512};function zH(e,t){!S4&&!re.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function M1(e,t){var n=t;return t==="fa"&&re.styleDefault!==null&&(t=Hi()),new Promise(function(r,i){if(Yr("missingIconAbstract"),n==="fa"){var a=U4(e)||{};e=a.iconName||e,t=a.prefix||t}if(e&&t&&F1[t]&&F1[t][e]){var o=F1[t][e];return r(P1(o))}zH(e,t),r(te(te({},NH),{},{icon:re.showMissingIcons&&e?Yr("missingIconAbstract")||{}:{}}))})}var j4=function(){},O1=re.measurePerformance&&fd&&fd.mark&&fd.measure?fd:{mark:j4,measure:j4},Xl='FA "6.4.2"',UH=function(t){return O1.mark("".concat(Xl," ").concat(t," begins")),function(){return q4(t)}},q4=function(t){O1.mark("".concat(Xl," ").concat(t," ends")),O1.measure("".concat(Xl," ").concat(t),"".concat(Xl," ").concat(t," begins"),"".concat(Xl," ").concat(t," ends"))},L1={begin:UH,end:q4},_d=function(){};function W4(e){var t=e.getAttribute?e.getAttribute(eo):null;return typeof t=="string"}function $H(e){var t=e.getAttribute?e.getAttribute(y1):null,n=e.getAttribute?e.getAttribute(v1):null;return t&&n}function HH(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(re.replacementClass)}function GH(){if(re.autoReplaceSvg===!0)return Cd.replace;var e=Cd[re.autoReplaceSvg];return e||Cd.replace}function VH(e){return We.createElementNS("http://www.w3.org/2000/svg",e)}function jH(e){return We.createElement(e)}function Y4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?VH:jH:n;if(typeof e=="string")return We.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(o){i.setAttribute(o,e.attributes[o])});var a=e.children||[];return a.forEach(function(o){i.appendChild(Y4(o,{ceFn:r}))}),i}function qH(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var Cd={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(Y4(i),n)}),n.getAttribute(eo)===null&&re.keepOriginalSource){var r=We.createComment(qH(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~x1(n).indexOf(re.replacementClass))return Cd.replace(t);var i=new RegExp("".concat(re.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var a=r[0].attributes.class.split(" ").reduce(function(s,c){return c===re.replacementClass||c.match(i)?s.toSvg.push(c):s.toNode.push(c),s},{toNode:[],toSvg:[]});r[0].attributes.class=a.toSvg.join(" "),a.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",a.toNode.join(" "))}var o=r.map(function(s){return Ql(s)}).join(`
2521
+ `);n.setAttribute(eo,""),n.innerHTML=o}};function Z4(e){e()}function Q4(e,t){var n=typeof t=="function"?t:_d;if(e.length===0)n();else{var r=Z4;re.mutateApproach===Q$&&(r=Ui.requestAnimationFrame||Z4),r(function(){var i=GH(),a=L1.begin("mutate");e.map(i),a(),n()})}}var N1=!1;function X4(){N1=!0}function z1(){N1=!1}var kd=null;function K4(e){if(v4&&re.observeMutations){var t=e.treeCallback,n=t===void 0?_d:t,r=e.nodeCallback,i=r===void 0?_d:r,a=e.pseudoElementsCallback,o=a===void 0?_d:a,s=e.observeMutationsRoot,c=s===void 0?We:s;kd=new v4(function(l){if(!N1){var u=Hi();xs(l).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!W4(f.addedNodes[0])&&(re.searchPseudoElements&&o(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&re.searchPseudoElements&&o(f.target.parentNode),f.type==="attributes"&&W4(f.target)&&~rH.indexOf(f.attributeName))if(f.attributeName==="class"&&$H(f.target)){var h=Ed(x1(f.target)),d=h.prefix,p=h.iconName;f.target.setAttribute(y1,d||u),p&&f.target.setAttribute(v1,p)}else HH(f.target)&&i(f.target)})}}),jr&&kd.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function WH(){kd&&kd.disconnect()}function YH(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var a=i.split(":"),o=a[0],s=a.slice(1);return o&&s.length>0&&(r[o]=s.join(":").trim()),r},{})),n}function ZH(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=Ed(x1(e));return i.prefix||(i.prefix=Hi()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=CH(i.prefix,e.innerText)||T1(i.prefix,_1(e.innerText))),!i.iconName&&re.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function QH(e){var t=xs(e.attributes).reduce(function(i,a){return i.name!=="class"&&i.name!=="style"&&(i[a.name]=a.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return re.autoA11y&&(n?t["aria-labelledby"]="".concat(re.replacementClass,"-title-").concat(r||Zl()):(t["aria-hidden"]="true",t.focusable="false")),t}function XH(){return{iconName:null,title:null,titleId:null,prefix:null,transform:yr,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function J4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=ZH(e),r=n.iconName,i=n.prefix,a=n.rest,o=QH(e),s=R1("parseNodeAttributes",{},e),c=t.styleParser?YH(e):[];return te({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:yr,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:a,styles:c,attributes:o}},s)}var KH=Qn.styles;function eS(e){var t=re.autoReplaceSvg==="nest"?J4(e,{styleParser:!1}):J4(e);return~t.extra.classes.indexOf(_4)?Yr("generateLayersText",e,t):Yr("generateSvgReplacementMutation",e,t)}var Gi=new Set;w1.map(function(e){Gi.add("fa-".concat(e))}),Object.keys(Gl[Ye]).map(Gi.add.bind(Gi)),Object.keys(Gl[ct]).map(Gi.add.bind(Gi)),Gi=$l(Gi);function tS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!jr)return Promise.resolve();var n=We.documentElement.classList,r=function(f){return n.add("".concat(E4,"-").concat(f))},i=function(f){return n.remove("".concat(E4,"-").concat(f))},a=re.autoFetchSvg?Gi:w1.map(function(u){return"fa-".concat(u)}).concat(Object.keys(KH));a.includes("fa")||a.push("fa");var o=[".".concat(_4,":not([").concat(eo,"])")].concat(a.map(function(u){return".".concat(u,":not([").concat(eo,"])")})).join(", ");if(o.length===0)return Promise.resolve();var s=[];try{s=xs(e.querySelectorAll(o))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();var c=L1.begin("onTree"),l=s.reduce(function(u,f){try{var h=eS(f);h&&u.push(h)}catch(d){S4||d.name==="MissingIcon"&&console.error(d)}return u},[]);return new Promise(function(u,f){Promise.all(l).then(function(h){Q4(h,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),c(),u()})}).catch(function(h){c(),f(h)})})}function JH(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;eS(e).then(function(n){n&&Q4([n],t)})}function eG(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:D1(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:D1(i||{})),e(r,te(te({},n),{},{mask:i}))}}var tG=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?yr:r,a=n.symbol,o=a===void 0?!1:a,s=n.mask,c=s===void 0?null:s,l=n.maskId,u=l===void 0?null:l,f=n.title,h=f===void 0?null:f,d=n.titleId,p=d===void 0?null:d,g=n.classes,b=g===void 0?[]:g,y=n.attributes,w=y===void 0?{}:y,A=n.styles,x=A===void 0?{}:A;if(t){var C=t.prefix,_=t.iconName,I=t.icon;return Sd(te({type:"icon"},t),function(){return ro("beforeDOMElementCreation",{iconDefinition:t,params:n}),re.autoA11y&&(h?w["aria-labelledby"]="".concat(re.replacementClass,"-title-").concat(p||Zl()):(w["aria-hidden"]="true",w.focusable="false")),B1({icons:{main:P1(I),mask:c?P1(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:C,iconName:_,transform:te(te({},yr),i),symbol:o,title:h,maskId:u,titleId:p,extra:{attributes:w,styles:x,classes:b}})})}},nG={mixout:function(){return{icon:eG(tG)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=tS,n.nodeCallback=JH,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?We:r,a=n.callback,o=a===void 0?function(){}:a;return tS(i,o)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,a=r.title,o=r.titleId,s=r.prefix,c=r.transform,l=r.symbol,u=r.mask,f=r.maskId,h=r.extra;return new Promise(function(d,p){Promise.all([M1(i,s),u.iconName?M1(u.iconName,u.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(g){var b=d1(g,2),y=b[0],w=b[1];d([n,B1({icons:{main:y,mask:w},prefix:s,iconName:i,transform:c,symbol:l,maskId:f,title:a,titleId:o,extra:h,watchable:!0})])}).catch(p)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,a=n.main,o=n.transform,s=n.styles,c=bd(s);c.length>0&&(i.style=c);var l;return A1(o)&&(l=Yr("generateAbstractTransformGrouping",{main:a,transform:o,containerWidth:a.width,iconWidth:a.width})),r.push(l||a.icon),{children:r,attributes:i}}}},rG={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,a=i===void 0?[]:i;return Sd({type:"layer"},function(){ro("beforeDOMElementCreation",{assembler:n,params:r});var o=[];return n(function(s){Array.isArray(s)?s.map(function(c){o=o.concat(c.abstract)}):o=o.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(re.cssPrefix,"-layers")].concat($l(a)).join(" ")},children:o}]})}}}},iG={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,a=i===void 0?null:i,o=r.classes,s=o===void 0?[]:o,c=r.attributes,l=c===void 0?{}:c,u=r.styles,f=u===void 0?{}:u;return Sd({type:"counter",content:n},function(){return ro("beforeDOMElementCreation",{content:n,params:r}),LH({content:n.toString(),title:a,extra:{attributes:l,styles:f,classes:["".concat(re.cssPrefix,"-layers-counter")].concat($l(s))}})})}}}},aG={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,a=i===void 0?yr:i,o=r.title,s=o===void 0?null:o,c=r.classes,l=c===void 0?[]:c,u=r.attributes,f=u===void 0?{}:u,h=r.styles,d=h===void 0?{}:h;return Sd({type:"text",content:n},function(){return ro("beforeDOMElementCreation",{content:n,params:r}),V4({content:n,transform:te(te({},yr),a),title:s,extra:{attributes:f,styles:d,classes:["".concat(re.cssPrefix,"-layers-text")].concat($l(l))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,a=r.transform,o=r.extra,s=null,c=null;if(w4){var l=parseInt(getComputedStyle(n).fontSize,10),u=n.getBoundingClientRect();s=u.width/l,c=u.height/l}return re.autoA11y&&!i&&(o.attributes["aria-hidden"]="true"),Promise.resolve([n,V4({content:n.innerHTML,width:s,height:c,transform:a,title:i,extra:o,watchable:!0})])}}},oG=new RegExp('"',"ug"),nS=[1105920,1112319];function sG(e){var t=e.replace(oG,""),n=wH(t,0),r=n>=nS[0]&&n<=nS[1],i=t.length===2?t[0]===t[1]:!1;return{value:_1(i?t[0]:t),isSecondary:r||i}}function rS(e,t){var n="".concat(Z$).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var a=xs(e.children),o=a.filter(function(I){return I.getAttribute(b1)===t})[0],s=Ui.getComputedStyle(e,t),c=s.getPropertyValue("font-family").match(eH),l=s.getPropertyValue("font-weight"),u=s.getPropertyValue("content");if(o&&!c)return e.removeChild(o),r();if(c&&u!=="none"&&u!==""){var f=s.getPropertyValue("content"),h=~["Sharp"].indexOf(c[2])?ct:Ye,d=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(c[2])?Vl[h][c[2].toLowerCase()]:tH[h][l],p=sG(f),g=p.value,b=p.isSecondary,y=c[0].startsWith("FontAwesome"),w=T1(d,g),A=w;if(y){var x=kH(g);x.iconName&&x.prefix&&(w=x.iconName,d=x.prefix)}if(w&&!b&&(!o||o.getAttribute(y1)!==d||o.getAttribute(v1)!==A)){e.setAttribute(n,A),o&&e.removeChild(o);var C=XH(),_=C.extra;_.attributes[b1]=t,M1(w,d).then(function(I){var D=B1(te(te({},C),{},{icons:{main:I,mask:I1()},prefix:d,iconName:A,extra:_,watchable:!0})),M=We.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(M,e.firstChild):e.appendChild(M),M.outerHTML=D.map(function(G){return Ql(G)}).join(`
2522
+ `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function cG(e){return Promise.all([rS(e,"::before"),rS(e,"::after")])}function lG(e){return e.parentNode!==document.head&&!~X$.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(b1)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function iS(e){if(jr)return new Promise(function(t,n){var r=xs(e.querySelectorAll("*")).filter(lG).map(cG),i=L1.begin("searchPseudoElements");X4(),Promise.all(r).then(function(){i(),z1(),t()}).catch(function(){i(),z1(),n()})})}var uG={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=iS,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?We:r;re.searchPseudoElements&&iS(i)}}},aS=!1,fG={mixout:function(){return{dom:{unwatch:function(){X4(),aS=!0}}}},hooks:function(){return{bootstrap:function(){K4(R1("mutationObserverCallbacks",{}))},noAuto:function(){WH()},watch:function(n){var r=n.observeMutationsRoot;aS?z1():K4(R1("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},oS=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var a=i.toLowerCase().split("-"),o=a[0],s=a.slice(1).join("-");if(o&&s==="h")return r.flipX=!0,r;if(o&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(o){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n)},hG={mixout:function(){return{parse:{transform:function(n){return oS(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=oS(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,a=n.containerWidth,o=n.iconWidth,s={transform:"translate(".concat(a/2," 256)")},c="translate(".concat(i.x*32,", ").concat(i.y*32,") "),l="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),u="rotate(".concat(i.rotate," 0 0)"),f={transform:"".concat(c," ").concat(l," ").concat(u)},h={transform:"translate(".concat(o/2*-1," -256)")},d={outer:s,inner:f,path:h};return{tag:"g",attributes:te({},d.outer),children:[{tag:"g",attributes:te({},d.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:te(te({},r.icon.attributes),d.path)}]}]}}}},U1={x:0,y:0,width:"100%",height:"100%"};function sS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function dG(e){return e.tag==="g"?e.children:[e]}var pG={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),a=i?Ed(i.split(" ").map(function(o){return o.trim()})):I1();return a.prefix||(a.prefix=Hi()),n.mask=a,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,a=n.main,o=n.mask,s=n.maskId,c=n.transform,l=a.width,u=a.icon,f=o.width,h=o.icon,d=hH({transform:c,containerWidth:f,iconWidth:l}),p={tag:"rect",attributes:te(te({},U1),{},{fill:"white"})},g=u.children?{children:u.children.map(sS)}:{},b={tag:"g",attributes:te({},d.inner),children:[sS(te({tag:u.tag,attributes:te(te({},u.attributes),d.path)},g))]},y={tag:"g",attributes:te({},d.outer),children:[b]},w="mask-".concat(s||Zl()),A="clip-".concat(s||Zl()),x={tag:"mask",attributes:te(te({},U1),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[p,y]},C={tag:"defs",children:[{tag:"clipPath",attributes:{id:A},children:dG(h)},x]};return r.push(C,{tag:"rect",attributes:te({fill:"currentColor","clip-path":"url(#".concat(A,")"),mask:"url(#".concat(w,")")},U1)}),{children:r,attributes:i}}}},gG={provides:function(t){var n=!1;Ui.matchMedia&&(n=Ui.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},a={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:te(te({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var o=te(te({},a),{},{attributeName:"opacity"}),s={tag:"circle",attributes:te(te({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||s.children.push({tag:"animate",attributes:te(te({},a),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:te(te({},o),{},{values:"1;0;1;1;0;1;"})}),r.push(s),r.push({tag:"path",attributes:te(te({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:te(te({},o),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:te(te({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:te(te({},o),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},mG={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),a=i===null?!1:i===""?!0:i;return n.symbol=a,n}}}},bG=[gH,nG,rG,iG,aG,uG,fG,hG,pG,gG,mG];RH(bG,{mixoutsTo:hn}),hn.noAuto,hn.config,hn.library,hn.dom,hn.parse,hn.findIconDefinition,hn.toHtml;var Ue=hn.icon;hn.layer,hn.text,hn.counter;/**
2520
2523
  * @license
2521
2524
  * Copyright 2020 Google LLC
2522
2525
  * SPDX-License-Identifier: BSD-3-Clause
2523
- */const{D:bG}=cD,yG=e=>e===null||typeof e!="object"&&typeof e!="function",cS=e=>e.strings===void 0,lS=()=>document.createComment(""),Kl=(e,t,n)=>{var a;const r=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(n===void 0){const o=r.insertBefore(lS(),i),s=r.insertBefore(lS(),i);n=new bG(o,s,e,e.options)}else{const o=n._$AB.nextSibling,s=n._$AM,c=s!==e;if(c){let l;(a=n._$AQ)==null||a.call(n,e),n._$AM=e,n._$AP!==void 0&&(l=e._$AU)!==s._$AU&&n._$AP(l)}if(o!==i||c){let l=n._$AA;for(;l!==o;){const u=l.nextSibling;r.insertBefore(l,i),l=u}}}return n},io=(e,t,n=e)=>(e._$AI(t,n),e),vG={},uS=(e,t=vG)=>e._$AH=t,wG=e=>e._$AH,$1=e=>{var r;(r=e._$AP)==null||r.call(e,!1,!0);let t=e._$AA;const n=e._$AB.nextSibling;for(;t!==n;){const i=t.nextSibling;t.remove(),t=i}};/**
2526
+ */const{D:yG}=cD,vG=e=>e===null||typeof e!="object"&&typeof e!="function",cS=e=>e.strings===void 0,lS=()=>document.createComment(""),Kl=(e,t,n)=>{var a;const r=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(n===void 0){const o=r.insertBefore(lS(),i),s=r.insertBefore(lS(),i);n=new yG(o,s,e,e.options)}else{const o=n._$AB.nextSibling,s=n._$AM,c=s!==e;if(c){let l;(a=n._$AQ)==null||a.call(n,e),n._$AM=e,n._$AP!==void 0&&(l=e._$AU)!==s._$AU&&n._$AP(l)}if(o!==i||c){let l=n._$AA;for(;l!==o;){const u=l.nextSibling;r.insertBefore(l,i),l=u}}}return n},io=(e,t,n=e)=>(e._$AI(t,n),e),wG={},uS=(e,t=wG)=>e._$AH=t,xG=e=>e._$AH,$1=e=>{var r;(r=e._$AP)==null||r.call(e,!1,!0);let t=e._$AA;const n=e._$AB.nextSibling;for(;t!==n;){const i=t.nextSibling;t.remove(),t=i}};/**
2524
2527
  * @license
2525
2528
  * Copyright 2017 Google LLC
2526
2529
  * SPDX-License-Identifier: BSD-3-Clause
2527
- */const fS=(e,t,n)=>{const r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},xG=Da(class extends Zo{constructor(e){if(super(e),e.type!==cr.CHILD)throw Error("repeat() can only be used in text expressions")}ht(e,t,n){let r;n===void 0?n=t:t!==void 0&&(r=t);const i=[],a=[];let o=0;for(const s of e)i[o]=r?r(s,o):o,a[o]=n(s,o),o++;return{values:a,keys:i}}render(e,t,n){return this.ht(e,t,n).values}update(e,[t,n,r]){const i=wG(e),{values:a,keys:o}=this.ht(t,n,r);if(!Array.isArray(i))return this.dt=o,a;const s=this.dt??(this.dt=[]),c=[];let l,u,f=0,h=i.length-1,d=0,p=a.length-1;for(;f<=h&&d<=p;)if(i[f]===null)f++;else if(i[h]===null)h--;else if(s[f]===o[d])c[d]=io(i[f],a[d]),f++,d++;else if(s[h]===o[p])c[p]=io(i[h],a[p]),h--,p--;else if(s[f]===o[p])c[p]=io(i[f],a[p]),Kl(e,c[p+1],i[f]),f++,p--;else if(s[h]===o[d])c[d]=io(i[h],a[d]),Kl(e,i[f],i[h]),h--,d++;else if(l===void 0&&(l=fS(o,d,p),u=fS(s,f,h)),l.has(s[f]))if(l.has(s[h])){const g=u.get(o[d]),b=g!==void 0?i[g]:null;if(b===null){const y=Kl(e,i[f]);io(y,a[d]),c[d]=y}else c[d]=io(b,a[d]),Kl(e,i[f],b),i[g]=null;d++}else $1(i[h]),h--;else $1(i[f]),f++;for(;d<=p;){const g=Kl(e,c[p+1]);io(g,a[d]),c[d++]=g}for(;f<=h;){const g=i[f++];g!==null&&$1(g)}return this.dt=o,uS(e,c),Dt}}),hS="close-dialog";function AG(){return new CustomEvent(hS,{bubbles:!0})}function ao(e="default",t=document.body){const n=document.createElement("div");n.classList.add("gs-modal"),e!="default"&&n.classList.add(e);const r=a=>{var o;switch(a.key){case"Escape":{const s=n.querySelector(".btn-cancel");s&&(s.click(),a.stopPropagation());break}case"Enter":{if(((o=a.target)==null?void 0:o.tagName)=="TEXTAREA")return;n.querySelector(".btn-primary").click(),a.stopPropagation();break}}};n.addEventListener("keydown",r),Vt($`<div class="backdrop"></div>
2530
+ */const fS=(e,t,n)=>{const r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},AG=Da(class extends Zo{constructor(e){if(super(e),e.type!==cr.CHILD)throw Error("repeat() can only be used in text expressions")}ht(e,t,n){let r;n===void 0?n=t:t!==void 0&&(r=t);const i=[],a=[];let o=0;for(const s of e)i[o]=r?r(s,o):o,a[o]=n(s,o),o++;return{values:a,keys:i}}render(e,t,n){return this.ht(e,t,n).values}update(e,[t,n,r]){const i=xG(e),{values:a,keys:o}=this.ht(t,n,r);if(!Array.isArray(i))return this.dt=o,a;const s=this.dt??(this.dt=[]),c=[];let l,u,f=0,h=i.length-1,d=0,p=a.length-1;for(;f<=h&&d<=p;)if(i[f]===null)f++;else if(i[h]===null)h--;else if(s[f]===o[d])c[d]=io(i[f],a[d]),f++,d++;else if(s[h]===o[p])c[p]=io(i[h],a[p]),h--,p--;else if(s[f]===o[p])c[p]=io(i[f],a[p]),Kl(e,c[p+1],i[f]),f++,p--;else if(s[h]===o[d])c[d]=io(i[h],a[d]),Kl(e,i[f],i[h]),h--,d++;else if(l===void 0&&(l=fS(o,d,p),u=fS(s,f,h)),l.has(s[f]))if(l.has(s[h])){const g=u.get(o[d]),b=g!==void 0?i[g]:null;if(b===null){const y=Kl(e,i[f]);io(y,a[d]),c[d]=y}else c[d]=io(b,a[d]),Kl(e,i[f],b),i[g]=null;d++}else $1(i[h]),h--;else $1(i[f]),f++;for(;d<=p;){const g=Kl(e,c[p+1]);io(g,a[d]),c[d++]=g}for(;f<=h;){const g=i[f++];g!==null&&$1(g)}return this.dt=o,uS(e,c),Dt}}),hS="close-dialog";function EG(){return new CustomEvent(hS,{bubbles:!0})}function ao(e="default",t=document.body){const n=document.createElement("div");n.classList.add("gs-modal"),e!="default"&&n.classList.add(e);const r=a=>{var o;switch(a.key){case"Escape":{const s=n.querySelector(".btn-cancel");s&&(s.click(),a.stopPropagation());break}case"Enter":{if(((o=a.target)==null?void 0:o.tagName)=="TEXTAREA")return;n.querySelector(".btn-primary").click(),a.stopPropagation();break}}};n.addEventListener("keydown",r),Vt($`<div class="backdrop"></div>
2528
2531
  <div class="content"></div>`,n);const i=()=>{n.querySelector(".backdrop").addEventListener("transitionend",()=>n.remove()),n.classList.remove("visible"),document.body.classList.remove(Ba)};return n.addEventListener("keydown",a=>{a.stopPropagation()}),n.addEventListener(hS,i),t.appendChild(n),window.requestAnimationFrame(()=>n.classList.add("visible")),e!="tour"&&document.body.classList.add(Ba),{content:n.querySelector(".content"),close:i}}function dn(e,t={}){const n=ao(),r=t.title;return t.okLabel??(t.okLabel="OK"),new Promise((i,a)=>{const o=()=>{n.close(),i(!0)},s=$`
2529
2532
  ${r?$`<div class="modal-title">${r}</div>`:ue}
2530
2533
  <div class="modal-body" style="max-width: 700px">
@@ -2569,7 +2572,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2569
2572
  <div class="histogram-extent">
2570
2573
  ${n.domain().map(a=>$`<div>${a}</div>`)}
2571
2574
  </div>
2572
- </div>`}}xc=new WeakMap,li=new WeakMap,la=new WeakMap,vf=new WeakMap,ep=new WeakSet,ZT=function(n){if(performance.now()<F(this,vf)+200)return;const r=n.target,i=Dw(r,n);J(this,wf,iv).call(this,"add",0,i[0]/r.offsetWidth)},tp=new WeakSet,QT=function(n,r){const a=n.target.closest(".histogram-threshold"),o=a.offsetLeft,s=a.offsetParent.offsetWidth;n.preventDefault(),n.stopPropagation(),this.style.cursor="col-resize",SG(n,(c,l)=>{J(this,wf,iv).call(this,"adjust",r,(o+c)/s)},()=>{le(this,vf,performance.now()),this.style.cursor=""})},wf=new WeakSet,iv=function(n,r,i){i=Ai(i,0,1),this.dispatchEvent(new EG(n,r,+F(this,la).invert(i*100).toPrecision(3)))},np=new WeakSet,XT=function(){const n=F(this,li),r=F(this,la),i=90/n.map(u=>u.length).reduce((u,f)=>Math.max(u,f),0),a=[],o=this.thresholds.length==1&&this.operators[0]=="eq",s=[-1/0,...this.thresholds,1/0],c=[!1,...this.operators.map(u=>["lte","gt"].includes(u)),!0],l=["gt","gte"].includes(this.operators[0])?u=>s.length-u-2:u=>u;for(let u=0;u<n.length;u++){const f=n[u],h=r(f.x0);let d=0,p=0;if(o)for(let g=0;g<=1;g++)p=CG(f,this.thresholds[0],g>0),p&&a.push({x:h,y:d*i,height:p*i,group:g}),d+=p;else if(this.thresholds.length)for(let g=0;g<s.length-1;g++){const b=l(g);p=_G(f,s[b],s[b+1],!c[b],c[b+1]),p&&a.push({x:h,y:d*i,height:p*i,group:g}),d+=p}else p=f.length,p&&a.push({x:h,y:d,height:p*i,group:null})}return a},zn(dS,"properties",{values:{attribute:!1},thresholds:{attribute:!1},operators:{attribute:!1},colors:{attribute:!1},showThresholdNumbers:{}}),customElements.define("genome-spy-histogram",dS);class EG extends Event{constructor(t,n,r){super(t),this.index=n,this.value=r}}function SG(e,t,n){const r=e.clientX,i=e.clientY,a=function(s){t(s.clientX-r,s.clientY-i)},o=function(s){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",o),n==null||n(s.clientX-r,s.clientY-i)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",o)}function _G(e,t,n,r=!0,i=!1){const a=r?c=>c>=t:c=>c>t,o=i?c=>c<=n:c=>c<n;let s=0;for(let c=0;c<e.length;c++){const l=e[c];a(l)&&o(l)&&s++}return s}function CG(e,t,n=!1){let r=0;for(let i=0;i<e.length;i++)r+=+(e[i]==t);return n?e.length-r:r}const pS=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b"];function kG(e,t){var r;const n=(r=e.scale)==null?void 0:r.type;Vn(n)?IG(e,t):_t(n)||Ii(n)?RG(e,t):e.type==="identifier"?TG(e,t):dn("Not implemented (yet).")}function TG(e,t){gS(t.getSamples().map(n=>n.id),e,t)}function IG(e,t){const n=e.scale,r=i=>$`<span
2575
+ </div>`}}xc=new WeakMap,li=new WeakMap,la=new WeakMap,vf=new WeakMap,ep=new WeakSet,ZT=function(n){if(performance.now()<F(this,vf)+200)return;const r=n.target,i=Dw(r,n);J(this,wf,iv).call(this,"add",0,i[0]/r.offsetWidth)},tp=new WeakSet,QT=function(n,r){const a=n.target.closest(".histogram-threshold"),o=a.offsetLeft,s=a.offsetParent.offsetWidth;n.preventDefault(),n.stopPropagation(),this.style.cursor="col-resize",_G(n,(c,l)=>{J(this,wf,iv).call(this,"adjust",r,(o+c)/s)},()=>{le(this,vf,performance.now()),this.style.cursor=""})},wf=new WeakSet,iv=function(n,r,i){i=Ai(i,0,1),this.dispatchEvent(new SG(n,r,+F(this,la).invert(i*100).toPrecision(3)))},np=new WeakSet,XT=function(){const n=F(this,li),r=F(this,la),i=90/n.map(u=>u.length).reduce((u,f)=>Math.max(u,f),0),a=[],o=this.thresholds.length==1&&this.operators[0]=="eq",s=[-1/0,...this.thresholds,1/0],c=[!1,...this.operators.map(u=>["lte","gt"].includes(u)),!0],l=["gt","gte"].includes(this.operators[0])?u=>s.length-u-2:u=>u;for(let u=0;u<n.length;u++){const f=n[u],h=r(f.x0);let d=0,p=0;if(o)for(let g=0;g<=1;g++)p=kG(f,this.thresholds[0],g>0),p&&a.push({x:h,y:d*i,height:p*i,group:g}),d+=p;else if(this.thresholds.length)for(let g=0;g<s.length-1;g++){const b=l(g);p=CG(f,s[b],s[b+1],!c[b],c[b+1]),p&&a.push({x:h,y:d*i,height:p*i,group:g}),d+=p}else p=f.length,p&&a.push({x:h,y:d,height:p*i,group:null})}return a},zn(dS,"properties",{values:{attribute:!1},thresholds:{attribute:!1},operators:{attribute:!1},colors:{attribute:!1},showThresholdNumbers:{}}),customElements.define("genome-spy-histogram",dS);class SG extends Event{constructor(t,n,r){super(t),this.index=n,this.value=r}}function _G(e,t,n){const r=e.clientX,i=e.clientY,a=function(s){t(s.clientX-r,s.clientY-i)},o=function(s){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",o),n==null||n(s.clientX-r,s.clientY-i)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",o)}function CG(e,t,n,r=!0,i=!1){const a=r?c=>c>=t:c=>c>t,o=i?c=>c<=n:c=>c<n;let s=0;for(let c=0;c<e.length;c++){const l=e[c];a(l)&&o(l)&&s++}return s}function kG(e,t,n=!1){let r=0;for(let i=0;i<e.length;i++)r+=+(e[i]==t);return n?e.length-r:r}const pS=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b"];function TG(e,t){var r;const n=(r=e.scale)==null?void 0:r.type;Vn(n)?RG(e,t):_t(n)||Ii(n)?DG(e,t):e.type==="identifier"?IG(e,t):dn("Not implemented (yet).")}function IG(e,t){gS(t.getSamples().map(n=>n.id),e,t)}function RG(e,t){const n=e.scale,r=i=>$`<span
2573
2576
  class="color"
2574
2577
  style=${eh({backgroundColor:n(i).toString()})}
2575
2578
  ></span>`;gS(n.domain(),e,t,r)}function gS(e,t,n,r=i=>ue){const i=n.provenance.storeHelper.getDispatcher(),a=new Set(mS(t,n.leafSamples,n.sampleHierarchy)),o=e.filter(x=>a.has(x)).map((x,C)=>({index:C,value:x,stringValue:`${x}`,lowerCaseValue:`${x}`.toLowerCase()})),s=ao(),c=$`
@@ -2607,7 +2610,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2607
2610
  @input=${p}
2608
2611
  @keydown=${y}
2609
2612
  >
2610
- ${xG(x,I=>I.value,I=>$`<li>
2613
+ ${AG(x,I=>I.value,I=>$`<li>
2611
2614
  <label class="checkbox">
2612
2615
  ${r(I.value)}
2613
2616
  <input
@@ -2623,7 +2626,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2623
2626
  <div>Nothing found</div>
2624
2627
  </div>`:x.length==1&&o.length>1?$`<div class="search-note">
2625
2628
  <div>
2626
- ${Ue(P$).node[0]} Hit enter to select the
2629
+ ${Ue(M$).node[0]} Hit enter to select the
2627
2630
  exact match
2628
2631
  </div>
2629
2632
  </div>`:ue}
@@ -2634,7 +2637,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2634
2637
  </small>
2635
2638
  </div>`;Vt($`${c}
2636
2639
  <div class="modal-body">${C}</div>
2637
- ${w()}`,s.content);const _=s.content.querySelector(".gs-checkbox-list");_.style.minHeight=`${_.offsetHeight}px`}A(),b()}function RG(e,t){var b;const n=t.provenance.storeHelper.getDispatcher();let r="lt",i;const a=ao(),o=$`
2640
+ ${w()}`,s.content);const _=s.content.querySelector(".gs-checkbox-list");_.style.minHeight=`${_.offsetHeight}px`}A(),b()}function DG(e,t){var b;const n=t.provenance.storeHelper.getDispatcher();let r="lt",i;const a=ao(),o=$`
2638
2641
  <div class="modal-title">Filter by <em>${e.name}</em></div>
2639
2642
  `,s=y=>{n(t.actions.filterByQuantitative({attribute:e.attribute,operator:r,operand:i})),a.close()},c=()=>$` <div class="modal-buttons">
2640
2643
  <button class="btn btn-cancel" @click=${()=>a.close()}>
@@ -2654,7 +2657,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2654
2657
  >Retain samples where <em>${e.name}</em> is</label
2655
2658
  >
2656
2659
  <div class="btn-group" role="group">
2657
- ${Object.entries(DG).map(([y,w])=>$`<button
2660
+ ${Object.entries(BG).map(([y,w])=>$`<button
2658
2661
  class=${f1({btn:!0,chosen:y==r})}
2659
2662
  .value=${y}
2660
2663
  @click=${l}
@@ -2681,11 +2684,11 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2681
2684
  </div>
2682
2685
  `;function g(){Vt($`${o}
2683
2686
  <div class="modal-body">${p()}</div>
2684
- ${c()}`,a.content)}g(),(b=a.content.querySelector("input[type='text']"))==null||b.focus()}const DG={lt:["<","less than"],lte:["≤","less than or equal to"],eq:["=","equal to"],gte:["≥","greater than or equal to"],gt:[">","greater than"]};function mS(e,t,n){const r=e.accessor;return t.map(i=>r(i,n))}function Ft(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var BG=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")(),bS=BG,H1=()=>Math.random().toString(36).substring(7).split("").join("."),FG={INIT:`@@redux/INIT${H1()}`,REPLACE:`@@redux/REPLACE${H1()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${H1()}`},Td=FG;function G1(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function yS(e,t,n){if(typeof e!="function")throw new Error(Ft(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ft(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ft(1));return n(yS)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((b,y)=>{o.set(y,b)}))}function u(){if(c)throw new Error(Ft(3));return i}function f(b){if(typeof b!="function")throw new Error(Ft(4));if(c)throw new Error(Ft(5));let y=!0;l();const w=s++;return o.set(w,b),function(){if(y){if(c)throw new Error(Ft(6));y=!1,l(),o.delete(w),a=null}}}function h(b){if(!G1(b))throw new Error(Ft(7));if(typeof b.type>"u")throw new Error(Ft(8));if(typeof b.type!="string")throw new Error(Ft(17));if(c)throw new Error(Ft(9));try{c=!0,i=r(i,b)}finally{c=!1}return(a=o).forEach(w=>{w()}),b}function d(b){if(typeof b!="function")throw new Error(Ft(10));r=b,h({type:Td.REPLACE})}function p(){const b=f;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Ft(11));function w(){const x=y;x.next&&x.next(u())}return w(),{unsubscribe:b(w)}},[bS](){return this}}}return h({type:Td.INIT}),{dispatch:h,subscribe:f,getState:u,replaceReducer:d,[bS]:p}}function PG(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Td.INIT})>"u")throw new Error(Ft(12));if(typeof n(void 0,{type:Td.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ft(13))})}function V1(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(n[o]=e[o])}const r=Object.keys(n);let i;try{PG(n)}catch(a){i=a}return function(o={},s){if(i)throw i;let c=!1;const l={};for(let u=0;u<r.length;u++){const f=r[u],h=n[f],d=o[f],p=h(d,s);if(typeof p>"u")throw s&&s.type,new Error(Ft(14));l[f]=p,c=c||p!==d}return c=c||r.length!==Object.keys(o).length,c?l:o}}function Id(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function MG(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(Ft(15))};const o={getState:i.getState,dispatch:(c,...l)=>a(c,...l)},s=e.map(c=>c(o));return a=Id(...s)(i.dispatch),{...i,dispatch:a}}}function OG(e){return G1(e)&&"type"in e&&typeof e.type=="string"}var vS=Symbol.for("immer-nothing"),wS=Symbol.for("immer-draftable"),pn=Symbol.for("immer-state");function Xn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _s=Object.getPrototypeOf;function Vi(e){return!!e&&!!e[pn]}function Zr(e){var t;return e?xS(e)||Array.isArray(e)||!!e[wS]||!!((t=e.constructor)!=null&&t[wS])||Dd(e)||Bd(e):!1}var LG=Object.prototype.constructor.toString();function xS(e){if(!e||typeof e!="object")return!1;const t=_s(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===LG}function Jl(e,t){Rd(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Rd(e){const t=e[pn];return t?t.type_:Array.isArray(e)?1:Dd(e)?2:Bd(e)?3:0}function j1(e,t){return Rd(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function AS(e,t,n){const r=Rd(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function NG(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Dd(e){return e instanceof Map}function Bd(e){return e instanceof Set}function oo(e){return e.copy_||e.base_}function q1(e,t){if(Dd(e))return new Map(e);if(Bd(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&xS(e))return _s(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[pn];let r=Reflect.ownKeys(n);for(let i=0;i<r.length;i++){const a=r[i],o=n[a];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[a]})}return Object.create(_s(e),n)}function W1(e,t=!1){return Fd(e)||Vi(e)||!Zr(e)||(Rd(e)>1&&(e.set=e.add=e.clear=e.delete=zG),Object.freeze(e),t&&Jl(e,(n,r)=>W1(r,!0))),e}function zG(){Xn(2)}function Fd(e){return Object.isFrozen(e)}var UG={};function so(e){const t=UG[e];return t||Xn(0,e),t}var eu;function ES(){return eu}function $G(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function SS(e,t){t&&(so("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Y1(e){Z1(e),e.drafts_.forEach(HG),e.drafts_=null}function Z1(e){e===eu&&(eu=e.parent_)}function _S(e){return eu=$G(eu,e)}function HG(e){const t=e[pn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function CS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[pn].modified_&&(Y1(t),Xn(4)),Zr(e)&&(e=Pd(t,e),t.parent_||Md(t,e)),t.patches_&&so("Patches").generateReplacementPatches_(n[pn].base_,e,t.patches_,t.inversePatches_)):e=Pd(t,n,[]),Y1(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vS?e:void 0}function Pd(e,t,n){if(Fd(t))return t;const r=t[pn];if(!r)return Jl(t,(i,a)=>kS(e,r,t,i,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Md(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let a=i,o=!1;r.type_===3&&(a=new Set(i),i.clear(),o=!0),Jl(a,(s,c)=>kS(e,r,i,s,c,n,o)),Md(e,i,!1),n&&e.patches_&&so("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function kS(e,t,n,r,i,a,o){if(Vi(i)){const s=a&&t&&t.type_!==3&&!j1(t.assigned_,r)?a.concat(r):void 0,c=Pd(e,i,s);if(AS(n,r,c),Vi(c))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(Zr(i)&&!Fd(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Pd(e,i),(!t||!t.scope_.parent_)&&Md(e,i)}}function Md(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&W1(t,n)}function GG(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ES(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=Q1;n&&(i=[r],a=tu);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var Q1={get(e,t){if(t===pn)return e;const n=oo(e);if(!j1(n,t))return VG(e,n,t);const r=n[t];return e.finalized_||!Zr(r)?r:r===X1(e.base_,t)?(J1(e),e.copy_[t]=eb(r,e)):r},has(e,t){return t in oo(e)},ownKeys(e){return Reflect.ownKeys(oo(e))},set(e,t,n){const r=TS(oo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=X1(oo(e),t),a=i==null?void 0:i[pn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(NG(n,i)&&(n!==void 0||j1(e.base_,t)))return!0;J1(e),K1(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return X1(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,J1(e),K1(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=oo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Xn(11)},getPrototypeOf(e){return _s(e.base_)},setPrototypeOf(){Xn(12)}},tu={};Jl(Q1,(e,t)=>{tu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),tu.deleteProperty=function(e,t){return tu.set.call(this,e,t,void 0)},tu.set=function(e,t,n){return Q1.set.call(this,e[0],t,n,e[0])};function X1(e,t){const n=e[pn];return(n?oo(n):e)[t]}function VG(e,t,n){var i;const r=TS(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function TS(e,t){if(!(t in e))return;let n=_s(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=_s(n)}}function K1(e){e.modified_||(e.modified_=!0,e.parent_&&K1(e.parent_))}function J1(e){e.copy_||(e.copy_=q1(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jG=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const o=this;return function(c=a,...l){return o.produce(c,u=>n.call(this,u,...l))}}typeof n!="function"&&Xn(6),r!==void 0&&typeof r!="function"&&Xn(7);let i;if(Zr(t)){const a=_S(this),o=eb(t,void 0);let s=!0;try{i=n(o),s=!1}finally{s?Y1(a):Z1(a)}return SS(a,r),CS(i,a)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===vS&&(i=void 0),this.autoFreeze_&&W1(i,!0),r){const a=[],o=[];so("Patches").generateReplacementPatches_(t,i,a,o),r(a,o)}return i}else Xn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,c=>t(c,...s));let r,i;return[this.produce(t,n,(o,s)=>{r=o,i=s}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Zr(e)||Xn(8),Vi(e)&&(e=IS(e));const t=_S(this),n=eb(e,void 0);return n[pn].isManual_=!0,Z1(t),n}finishDraft(e,t){const n=e&&e[pn];(!n||!n.isManual_)&&Xn(9);const{scope_:r}=n;return SS(r,t),CS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=so("Patches").applyPatches_;return Vi(e)?r(e,t):this.produce(e,i=>r(i,t))}};function eb(e,t){const n=Dd(e)?so("MapSet").proxyMap_(e,t):Bd(e)?so("MapSet").proxySet_(e,t):GG(e,t);return(t?t.scope_:ES()).drafts_.push(n),n}function IS(e){return Vi(e)||Xn(10,e),RS(e)}function RS(e){if(!Zr(e)||Fd(e))return e;const t=e[pn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=q1(e,t.scope_.immer_.useStrictShallowCopy_)}else n=q1(e,!0);return Jl(n,(r,i)=>{AS(n,r,RS(i))}),t&&(t.finalized_=!1),n}var gn=new jG,DS=gn.produce;gn.produceWithPatches.bind(gn),gn.setAutoFreeze.bind(gn),gn.setUseStrictShallowCopy.bind(gn),gn.applyPatches.bind(gn),gn.createDraft.bind(gn),gn.finishDraft.bind(gn);function qG(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function WG(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var BS=e=>Array.isArray(e)?e:[e];function YG(e){const t=Array.isArray(e[0])?e[0]:e;return WG(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ZG(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var QG=class{constructor(e){this.value=e}deref(){return this.value}},XG=WeakRef??QG,KG=0,FS=1;function Od(){return{s:KG,v:void 0,o:null,p:null}}function tb(e,t={}){let n=Od();const{resultEqualityCheck:r}=t;let i,a=0;function o(){let s=n;const{length:c}=arguments;for(let f=0,h=c;f<h;f++){const d=arguments[f];if(typeof d=="function"||typeof d=="object"&&d!==null){let p=s.o;p===null&&(s.o=p=new WeakMap);const g=p.get(d);g===void 0?(s=Od(),p.set(d,s)):s=g}else{let p=s.p;p===null&&(s.p=p=new Map);const g=p.get(d);g===void 0?(s=Od(),p.set(d,s)):s=g}}const l=s;let u;if(s.s===FS?u=s.v:(u=e.apply(null,arguments),a++),l.s=FS,r){const f=(i==null?void 0:i.deref())??i;f!=null&&r(f,u)&&(u=f,a!==0&&a--),i=typeof u=="object"&&u!==null||typeof u=="function"?new XG(u):u}return l.v=u,u}return o.clearCache=()=>{n=Od(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function PS(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e;return(...i)=>{let a=0,o=0,s,c={},l=i.pop();typeof l=="object"&&(c=l,l=i.pop()),qG(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const u={...n,...c},{memoize:f,memoizeOptions:h=[],argsMemoize:d=tb,argsMemoizeOptions:p=[],devModeChecks:g={}}=u,b=BS(h),y=BS(p),w=YG(i),A=f(function(){return a++,l.apply(null,arguments)},...b),x=d(function(){o++;const _=ZG(w,arguments);return s=A.apply(null,_),s},...y);return Object.assign(x,{resultFunc:l,memoizedResultFunc:A,dependencies:w,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:d})}}var JG=PS(tb);function MS(e){return({dispatch:n,getState:r})=>i=>a=>typeof a=="function"?a(n,r,e):i(a)}var eV=MS(),tV=MS,nV=(...e)=>{const t=PS(...e);return(...n)=>{const r=t(...n),i=(a,...o)=>r(Vi(a)?IS(a):a,...o);return Object.assign(i,r),i}};nV(tb);var rV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Id:Id.apply(null,arguments)};function nu(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Kn(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>OG(r)&&r.type===e,n}var OS=class Rf extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Rf.prototype)}static get[Symbol.species](){return Rf}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Rf(...t[0].concat(this)):new Rf(...t.concat(this))}};function LS(e){return Zr(e)?DS(e,()=>{}):e}function NS(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error(Kn(10));const r=n.insert(t,e);return e.set(t,r),r}function iV(e){return typeof e=="boolean"}var aV=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new OS;return n&&(iV(n)?o.push(eV):o.push(tV(n.extraArgument))),o},oV="RTK_autoBatch",zS=e=>t=>{setTimeout(t,e)},sV=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:zS(10),cV=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,o=!1;const s=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?sV:e.type==="callback"?e.queueNotification:zS(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const f=()=>i&&u(),h=r.subscribe(f);return s.add(u),()=>{h(),s.delete(u)}},dispatch(u){var f;try{return i=!((f=u==null?void 0:u.meta)!=null&&f[oV]),a=!i,a&&(o||(o=!0,c(l))),r.dispatch(u)}finally{i=!0}}})},lV=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new OS(e);return r&&i.push(cV(typeof r=="object"?r:void 0)),i},uV=!0;function fV(e){const t=aV(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let s;if(typeof n=="function")s=n;else if(G1(n))s=V1(n);else throw new Error(Kn(1));let c;typeof r=="function"?c=r(t):c=t();let l=Id;i&&(l=rV({trace:!uV,...typeof i=="object"&&i}));const u=MG(...c),f=lV(u);let h=typeof o=="function"?o(f):f();const d=l(...h);return yS(s,a,d)}function US(e){const t={},n=[];let r;const i={addCase(a,o){const s=typeof a=="string"?a:a.type;if(!s)throw new Error(Kn(28));if(s in t)throw new Error(Kn(29));return t[s]=o,i},addMatcher(a,o){return n.push({matcher:a,reducer:o}),i},addDefaultCase(a){return r=a,i}};return e(i),[t,n,r]}function hV(e){return typeof e=="function"}function dV(e,t){let[n,r,i]=US(t),a;if(hV(e))a=()=>LS(e());else{const s=LS(e);a=()=>s}function o(s=a(),c){let l=[n[c.type],...r.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[i]),l.reduce((u,f)=>{if(f)if(Vi(u)){const d=f(u,c);return d===void 0?u:d}else{if(Zr(u))return DS(u,h=>f(h,c));{const h=f(u,c);if(h===void 0){if(u===null)return u;throw new Error(Kn(9))}return h}}return u},s)}return o.getInitialState=a,o}var pV=Symbol.for("rtk-slice-createasyncthunk");function gV(e,t){return`${e}/${t}`}function mV({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[pV];return function(i){const{name:a,reducerPath:o=a}=i;if(!a)throw new Error(Kn(11));typeof process<"u";const s=(typeof i.reducers=="function"?i.reducers(yV()):i.reducers)||{},c=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(b,y){const w=typeof b=="string"?b:b.type;if(!w)throw new Error(Kn(12));if(w in l.sliceCaseReducersByType)throw new Error(Kn(13));return l.sliceCaseReducersByType[w]=y,u},addMatcher(b,y){return l.sliceMatchers.push({matcher:b,reducer:y}),u},exposeAction(b,y){return l.actionCreators[b]=y,u},exposeCaseReducer(b,y){return l.sliceCaseReducersByName[b]=y,u}};c.forEach(b=>{const y=s[b],w={reducerName:b,type:gV(a,b),createNotation:typeof i.reducers=="function"};wV(y)?AV(w,y,u,t):vV(w,y,u)});function f(){const[b={},y=[],w=void 0]=typeof i.extraReducers=="function"?US(i.extraReducers):[i.extraReducers],A={...b,...l.sliceCaseReducersByType};return dV(i.initialState,x=>{for(let C in A)x.addCase(C,A[C]);for(let C of l.sliceMatchers)x.addMatcher(C.matcher,C.reducer);for(let C of y)x.addMatcher(C.matcher,C.reducer);w&&x.addDefaultCase(w)})}const h=b=>b,d=new WeakMap;let p;const g={name:a,reducerPath:o,reducer(b,y){return p||(p=f()),p(b,y)},actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState(){return p||(p=f()),p.getInitialState()},getSelectors(b=h){const y=NS(d,this,{insert:()=>new WeakMap});return NS(y,b,{insert:()=>{const w={};for(const[A,x]of Object.entries(i.selectors??{}))w[A]=bV(this,x,b,this!==g);return w}})},selectSlice(b){let y=b[this.reducerPath];return typeof y>"u"&&this!==g&&(y=this.getInitialState()),y},get selectors(){return this.getSelectors(this.selectSlice)},injectInto(b,{reducerPath:y,...w}={}){const A=y??this.reducerPath;return b.inject({reducerPath:A,reducer:this.reducer},w),{...this,reducerPath:A}}};return g}}function bV(e,t,n,r){function i(a,...o){let s=n.call(e,a);return typeof s>"u"&&r&&(s=e.getInitialState()),t(s,...o)}return i.unwrapped=t,i}var $S=mV();function yV(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function vV({type:e,reducerName:t,createNotation:n},r,i){let a,o;if("reducer"in r){if(n&&!xV(r))throw new Error(Kn(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?nu(e,o):nu(e))}function wV(e){return e._reducerDefinitionType==="asyncThunk"}function xV(e){return e._reducerDefinitionType==="reducerWithPrepare"}function AV({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Kn(18));const{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,f=i(e,a,u);r.exposeAction(t,f),o&&r.addCase(f.fulfilled,o),s&&r.addCase(f.pending,s),c&&r.addCase(f.rejected,c),l&&r.addMatcher(f.settled,l),r.exposeCaseReducer(t,{fulfilled:o||Ld,pending:s||Ld,rejected:c||Ld,settled:l||Ld})}function Ld(){}var nb="listenerMiddleware";nu(`${nb}/add`),nu(`${nb}/removeAll`),nu(`${nb}/remove`);function Kn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function EV(e,t){var n=e+"",r=t+"";return n<r?-1:n==r?0:1}var SV=[].forEach;function _V(e,t,n){if(typeof t!="function")throw new TypeError(t+" is not a function");var r,i=[],a=[],o=[];SV.call(e,function(c,l,u){if(r=t(c,l,u),r===void 0)return void o.push(c);if(n===void 0&&typeof r=="symbol")throw new TypeError("Can't convert symbol to string");i.push(l),a[l]=r}),n===void 0&&(n=EV),i.sort(function(c,l){return n(a[c],a[l])});var s=i.map(function(c){return e[c]}).concat(o);return s.length!=e.length&&(s.length=e.length),s}function CV(e,t){const n=i=>i.copy().range(mi(0,i.domain().length)).unknown(-1);let r;switch(t.type){case"quantitative":r=i=>ft(i)&&!isNaN(i)?-i:-1/0;break;case"ordinal":r=n(t.scale);break;case"nominal":r=i=>i||"";break}return i=>r(e(i))}function kV(e,t){const n=new Set,r=i=>{const a=n.has(i);return n.add(i),a};return e.filter(i=>!r(t(i)))}function TV(e,t,n){const r=new Set,i=a=>(r.size<n&&r.add(a),r.has(a));return e.filter(a=>i(t(a)))}function IV(e,t,n=!1){return _V(e,t,(r,i)=>(n&&([r,i]=[i,r]),r<i?-1:r>i?1:0))}const RV={lt:(e,t)=>e<t,lte:(e,t)=>e<=t,eq:(e,t)=>e==t,gte:(e,t)=>e>=t,gt:(e,t)=>e>t};function DV(e,t,n,r){const i=RV[n];return e.filter(a=>i(t(a),r))}function HS(e,t,n,r){const i=new Set(r),a=s=>i.has(s),o=n=="remove"?s=>!a(s):a;return e.filter(s=>o(t(s)))}function BV(e,t){const n=r=>r!=null;return e.filter(r=>n(t(r)))}/**
2687
+ ${c()}`,a.content)}g(),(b=a.content.querySelector("input[type='text']"))==null||b.focus()}const BG={lt:["<","less than"],lte:["≤","less than or equal to"],eq:["=","equal to"],gte:["≥","greater than or equal to"],gt:[">","greater than"]};function mS(e,t,n){const r=e.accessor;return t.map(i=>r(i,n))}function Ft(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var FG=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")(),bS=FG,H1=()=>Math.random().toString(36).substring(7).split("").join("."),PG={INIT:`@@redux/INIT${H1()}`,REPLACE:`@@redux/REPLACE${H1()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${H1()}`},Td=PG;function G1(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function yS(e,t,n){if(typeof e!="function")throw new Error(Ft(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ft(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ft(1));return n(yS)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((b,y)=>{o.set(y,b)}))}function u(){if(c)throw new Error(Ft(3));return i}function f(b){if(typeof b!="function")throw new Error(Ft(4));if(c)throw new Error(Ft(5));let y=!0;l();const w=s++;return o.set(w,b),function(){if(y){if(c)throw new Error(Ft(6));y=!1,l(),o.delete(w),a=null}}}function h(b){if(!G1(b))throw new Error(Ft(7));if(typeof b.type>"u")throw new Error(Ft(8));if(typeof b.type!="string")throw new Error(Ft(17));if(c)throw new Error(Ft(9));try{c=!0,i=r(i,b)}finally{c=!1}return(a=o).forEach(w=>{w()}),b}function d(b){if(typeof b!="function")throw new Error(Ft(10));r=b,h({type:Td.REPLACE})}function p(){const b=f;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Ft(11));function w(){const x=y;x.next&&x.next(u())}return w(),{unsubscribe:b(w)}},[bS](){return this}}}return h({type:Td.INIT}),{dispatch:h,subscribe:f,getState:u,replaceReducer:d,[bS]:p}}function MG(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Td.INIT})>"u")throw new Error(Ft(12));if(typeof n(void 0,{type:Td.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ft(13))})}function V1(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(n[o]=e[o])}const r=Object.keys(n);let i;try{MG(n)}catch(a){i=a}return function(o={},s){if(i)throw i;let c=!1;const l={};for(let u=0;u<r.length;u++){const f=r[u],h=n[f],d=o[f],p=h(d,s);if(typeof p>"u")throw s&&s.type,new Error(Ft(14));l[f]=p,c=c||p!==d}return c=c||r.length!==Object.keys(o).length,c?l:o}}function Id(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function OG(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(Ft(15))};const o={getState:i.getState,dispatch:(c,...l)=>a(c,...l)},s=e.map(c=>c(o));return a=Id(...s)(i.dispatch),{...i,dispatch:a}}}function LG(e){return G1(e)&&"type"in e&&typeof e.type=="string"}var vS=Symbol.for("immer-nothing"),wS=Symbol.for("immer-draftable"),pn=Symbol.for("immer-state");function Xn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _s=Object.getPrototypeOf;function Vi(e){return!!e&&!!e[pn]}function Zr(e){var t;return e?xS(e)||Array.isArray(e)||!!e[wS]||!!((t=e.constructor)!=null&&t[wS])||Dd(e)||Bd(e):!1}var NG=Object.prototype.constructor.toString();function xS(e){if(!e||typeof e!="object")return!1;const t=_s(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===NG}function Jl(e,t){Rd(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Rd(e){const t=e[pn];return t?t.type_:Array.isArray(e)?1:Dd(e)?2:Bd(e)?3:0}function j1(e,t){return Rd(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function AS(e,t,n){const r=Rd(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function zG(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Dd(e){return e instanceof Map}function Bd(e){return e instanceof Set}function oo(e){return e.copy_||e.base_}function q1(e,t){if(Dd(e))return new Map(e);if(Bd(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&xS(e))return _s(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[pn];let r=Reflect.ownKeys(n);for(let i=0;i<r.length;i++){const a=r[i],o=n[a];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[a]})}return Object.create(_s(e),n)}function W1(e,t=!1){return Fd(e)||Vi(e)||!Zr(e)||(Rd(e)>1&&(e.set=e.add=e.clear=e.delete=UG),Object.freeze(e),t&&Jl(e,(n,r)=>W1(r,!0))),e}function UG(){Xn(2)}function Fd(e){return Object.isFrozen(e)}var $G={};function so(e){const t=$G[e];return t||Xn(0,e),t}var eu;function ES(){return eu}function HG(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function SS(e,t){t&&(so("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Y1(e){Z1(e),e.drafts_.forEach(GG),e.drafts_=null}function Z1(e){e===eu&&(eu=e.parent_)}function _S(e){return eu=HG(eu,e)}function GG(e){const t=e[pn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function CS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[pn].modified_&&(Y1(t),Xn(4)),Zr(e)&&(e=Pd(t,e),t.parent_||Md(t,e)),t.patches_&&so("Patches").generateReplacementPatches_(n[pn].base_,e,t.patches_,t.inversePatches_)):e=Pd(t,n,[]),Y1(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vS?e:void 0}function Pd(e,t,n){if(Fd(t))return t;const r=t[pn];if(!r)return Jl(t,(i,a)=>kS(e,r,t,i,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Md(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let a=i,o=!1;r.type_===3&&(a=new Set(i),i.clear(),o=!0),Jl(a,(s,c)=>kS(e,r,i,s,c,n,o)),Md(e,i,!1),n&&e.patches_&&so("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function kS(e,t,n,r,i,a,o){if(Vi(i)){const s=a&&t&&t.type_!==3&&!j1(t.assigned_,r)?a.concat(r):void 0,c=Pd(e,i,s);if(AS(n,r,c),Vi(c))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(Zr(i)&&!Fd(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Pd(e,i),(!t||!t.scope_.parent_)&&Md(e,i)}}function Md(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&W1(t,n)}function VG(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ES(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=Q1;n&&(i=[r],a=tu);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var Q1={get(e,t){if(t===pn)return e;const n=oo(e);if(!j1(n,t))return jG(e,n,t);const r=n[t];return e.finalized_||!Zr(r)?r:r===X1(e.base_,t)?(J1(e),e.copy_[t]=eb(r,e)):r},has(e,t){return t in oo(e)},ownKeys(e){return Reflect.ownKeys(oo(e))},set(e,t,n){const r=TS(oo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=X1(oo(e),t),a=i==null?void 0:i[pn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(zG(n,i)&&(n!==void 0||j1(e.base_,t)))return!0;J1(e),K1(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return X1(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,J1(e),K1(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=oo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Xn(11)},getPrototypeOf(e){return _s(e.base_)},setPrototypeOf(){Xn(12)}},tu={};Jl(Q1,(e,t)=>{tu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),tu.deleteProperty=function(e,t){return tu.set.call(this,e,t,void 0)},tu.set=function(e,t,n){return Q1.set.call(this,e[0],t,n,e[0])};function X1(e,t){const n=e[pn];return(n?oo(n):e)[t]}function jG(e,t,n){var i;const r=TS(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function TS(e,t){if(!(t in e))return;let n=_s(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=_s(n)}}function K1(e){e.modified_||(e.modified_=!0,e.parent_&&K1(e.parent_))}function J1(e){e.copy_||(e.copy_=q1(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qG=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const o=this;return function(c=a,...l){return o.produce(c,u=>n.call(this,u,...l))}}typeof n!="function"&&Xn(6),r!==void 0&&typeof r!="function"&&Xn(7);let i;if(Zr(t)){const a=_S(this),o=eb(t,void 0);let s=!0;try{i=n(o),s=!1}finally{s?Y1(a):Z1(a)}return SS(a,r),CS(i,a)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===vS&&(i=void 0),this.autoFreeze_&&W1(i,!0),r){const a=[],o=[];so("Patches").generateReplacementPatches_(t,i,a,o),r(a,o)}return i}else Xn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,c=>t(c,...s));let r,i;return[this.produce(t,n,(o,s)=>{r=o,i=s}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Zr(e)||Xn(8),Vi(e)&&(e=IS(e));const t=_S(this),n=eb(e,void 0);return n[pn].isManual_=!0,Z1(t),n}finishDraft(e,t){const n=e&&e[pn];(!n||!n.isManual_)&&Xn(9);const{scope_:r}=n;return SS(r,t),CS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=so("Patches").applyPatches_;return Vi(e)?r(e,t):this.produce(e,i=>r(i,t))}};function eb(e,t){const n=Dd(e)?so("MapSet").proxyMap_(e,t):Bd(e)?so("MapSet").proxySet_(e,t):VG(e,t);return(t?t.scope_:ES()).drafts_.push(n),n}function IS(e){return Vi(e)||Xn(10,e),RS(e)}function RS(e){if(!Zr(e)||Fd(e))return e;const t=e[pn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=q1(e,t.scope_.immer_.useStrictShallowCopy_)}else n=q1(e,!0);return Jl(n,(r,i)=>{AS(n,r,RS(i))}),t&&(t.finalized_=!1),n}var gn=new qG,DS=gn.produce;gn.produceWithPatches.bind(gn),gn.setAutoFreeze.bind(gn),gn.setUseStrictShallowCopy.bind(gn),gn.applyPatches.bind(gn),gn.createDraft.bind(gn),gn.finishDraft.bind(gn);function WG(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function YG(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var BS=e=>Array.isArray(e)?e:[e];function ZG(e){const t=Array.isArray(e[0])?e[0]:e;return YG(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function QG(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var XG=class{constructor(e){this.value=e}deref(){return this.value}},KG=WeakRef??XG,JG=0,FS=1;function Od(){return{s:JG,v:void 0,o:null,p:null}}function tb(e,t={}){let n=Od();const{resultEqualityCheck:r}=t;let i,a=0;function o(){let s=n;const{length:c}=arguments;for(let f=0,h=c;f<h;f++){const d=arguments[f];if(typeof d=="function"||typeof d=="object"&&d!==null){let p=s.o;p===null&&(s.o=p=new WeakMap);const g=p.get(d);g===void 0?(s=Od(),p.set(d,s)):s=g}else{let p=s.p;p===null&&(s.p=p=new Map);const g=p.get(d);g===void 0?(s=Od(),p.set(d,s)):s=g}}const l=s;let u;if(s.s===FS?u=s.v:(u=e.apply(null,arguments),a++),l.s=FS,r){const f=(i==null?void 0:i.deref())??i;f!=null&&r(f,u)&&(u=f,a!==0&&a--),i=typeof u=="object"&&u!==null||typeof u=="function"?new KG(u):u}return l.v=u,u}return o.clearCache=()=>{n=Od(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function PS(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e;return(...i)=>{let a=0,o=0,s,c={},l=i.pop();typeof l=="object"&&(c=l,l=i.pop()),WG(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const u={...n,...c},{memoize:f,memoizeOptions:h=[],argsMemoize:d=tb,argsMemoizeOptions:p=[],devModeChecks:g={}}=u,b=BS(h),y=BS(p),w=ZG(i),A=f(function(){return a++,l.apply(null,arguments)},...b),x=d(function(){o++;const _=QG(w,arguments);return s=A.apply(null,_),s},...y);return Object.assign(x,{resultFunc:l,memoizedResultFunc:A,dependencies:w,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:d})}}var eV=PS(tb);function MS(e){return({dispatch:n,getState:r})=>i=>a=>typeof a=="function"?a(n,r,e):i(a)}var tV=MS(),nV=MS,rV=(...e)=>{const t=PS(...e);return(...n)=>{const r=t(...n),i=(a,...o)=>r(Vi(a)?IS(a):a,...o);return Object.assign(i,r),i}};rV(tb);var iV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Id:Id.apply(null,arguments)};function nu(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Kn(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>LG(r)&&r.type===e,n}var OS=class Rf extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Rf.prototype)}static get[Symbol.species](){return Rf}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Rf(...t[0].concat(this)):new Rf(...t.concat(this))}};function LS(e){return Zr(e)?DS(e,()=>{}):e}function NS(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error(Kn(10));const r=n.insert(t,e);return e.set(t,r),r}function aV(e){return typeof e=="boolean"}var oV=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new OS;return n&&(aV(n)?o.push(tV):o.push(nV(n.extraArgument))),o},sV="RTK_autoBatch",zS=e=>t=>{setTimeout(t,e)},cV=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:zS(10),lV=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,o=!1;const s=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?cV:e.type==="callback"?e.queueNotification:zS(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const f=()=>i&&u(),h=r.subscribe(f);return s.add(u),()=>{h(),s.delete(u)}},dispatch(u){var f;try{return i=!((f=u==null?void 0:u.meta)!=null&&f[sV]),a=!i,a&&(o||(o=!0,c(l))),r.dispatch(u)}finally{i=!0}}})},uV=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new OS(e);return r&&i.push(lV(typeof r=="object"?r:void 0)),i},fV=!0;function hV(e){const t=oV(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let s;if(typeof n=="function")s=n;else if(G1(n))s=V1(n);else throw new Error(Kn(1));let c;typeof r=="function"?c=r(t):c=t();let l=Id;i&&(l=iV({trace:!fV,...typeof i=="object"&&i}));const u=OG(...c),f=uV(u);let h=typeof o=="function"?o(f):f();const d=l(...h);return yS(s,a,d)}function US(e){const t={},n=[];let r;const i={addCase(a,o){const s=typeof a=="string"?a:a.type;if(!s)throw new Error(Kn(28));if(s in t)throw new Error(Kn(29));return t[s]=o,i},addMatcher(a,o){return n.push({matcher:a,reducer:o}),i},addDefaultCase(a){return r=a,i}};return e(i),[t,n,r]}function dV(e){return typeof e=="function"}function pV(e,t){let[n,r,i]=US(t),a;if(dV(e))a=()=>LS(e());else{const s=LS(e);a=()=>s}function o(s=a(),c){let l=[n[c.type],...r.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[i]),l.reduce((u,f)=>{if(f)if(Vi(u)){const d=f(u,c);return d===void 0?u:d}else{if(Zr(u))return DS(u,h=>f(h,c));{const h=f(u,c);if(h===void 0){if(u===null)return u;throw new Error(Kn(9))}return h}}return u},s)}return o.getInitialState=a,o}var gV=Symbol.for("rtk-slice-createasyncthunk");function mV(e,t){return`${e}/${t}`}function bV({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[gV];return function(i){const{name:a,reducerPath:o=a}=i;if(!a)throw new Error(Kn(11));typeof process<"u";const s=(typeof i.reducers=="function"?i.reducers(vV()):i.reducers)||{},c=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(b,y){const w=typeof b=="string"?b:b.type;if(!w)throw new Error(Kn(12));if(w in l.sliceCaseReducersByType)throw new Error(Kn(13));return l.sliceCaseReducersByType[w]=y,u},addMatcher(b,y){return l.sliceMatchers.push({matcher:b,reducer:y}),u},exposeAction(b,y){return l.actionCreators[b]=y,u},exposeCaseReducer(b,y){return l.sliceCaseReducersByName[b]=y,u}};c.forEach(b=>{const y=s[b],w={reducerName:b,type:mV(a,b),createNotation:typeof i.reducers=="function"};xV(y)?EV(w,y,u,t):wV(w,y,u)});function f(){const[b={},y=[],w=void 0]=typeof i.extraReducers=="function"?US(i.extraReducers):[i.extraReducers],A={...b,...l.sliceCaseReducersByType};return pV(i.initialState,x=>{for(let C in A)x.addCase(C,A[C]);for(let C of l.sliceMatchers)x.addMatcher(C.matcher,C.reducer);for(let C of y)x.addMatcher(C.matcher,C.reducer);w&&x.addDefaultCase(w)})}const h=b=>b,d=new WeakMap;let p;const g={name:a,reducerPath:o,reducer(b,y){return p||(p=f()),p(b,y)},actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState(){return p||(p=f()),p.getInitialState()},getSelectors(b=h){const y=NS(d,this,{insert:()=>new WeakMap});return NS(y,b,{insert:()=>{const w={};for(const[A,x]of Object.entries(i.selectors??{}))w[A]=yV(this,x,b,this!==g);return w}})},selectSlice(b){let y=b[this.reducerPath];return typeof y>"u"&&this!==g&&(y=this.getInitialState()),y},get selectors(){return this.getSelectors(this.selectSlice)},injectInto(b,{reducerPath:y,...w}={}){const A=y??this.reducerPath;return b.inject({reducerPath:A,reducer:this.reducer},w),{...this,reducerPath:A}}};return g}}function yV(e,t,n,r){function i(a,...o){let s=n.call(e,a);return typeof s>"u"&&r&&(s=e.getInitialState()),t(s,...o)}return i.unwrapped=t,i}var $S=bV();function vV(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function wV({type:e,reducerName:t,createNotation:n},r,i){let a,o;if("reducer"in r){if(n&&!AV(r))throw new Error(Kn(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?nu(e,o):nu(e))}function xV(e){return e._reducerDefinitionType==="asyncThunk"}function AV(e){return e._reducerDefinitionType==="reducerWithPrepare"}function EV({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Kn(18));const{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,f=i(e,a,u);r.exposeAction(t,f),o&&r.addCase(f.fulfilled,o),s&&r.addCase(f.pending,s),c&&r.addCase(f.rejected,c),l&&r.addMatcher(f.settled,l),r.exposeCaseReducer(t,{fulfilled:o||Ld,pending:s||Ld,rejected:c||Ld,settled:l||Ld})}function Ld(){}var nb="listenerMiddleware";nu(`${nb}/add`),nu(`${nb}/removeAll`),nu(`${nb}/remove`);function Kn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function SV(e,t){var n=e+"",r=t+"";return n<r?-1:n==r?0:1}var _V=[].forEach;function CV(e,t,n){if(typeof t!="function")throw new TypeError(t+" is not a function");var r,i=[],a=[],o=[];_V.call(e,function(c,l,u){if(r=t(c,l,u),r===void 0)return void o.push(c);if(n===void 0&&typeof r=="symbol")throw new TypeError("Can't convert symbol to string");i.push(l),a[l]=r}),n===void 0&&(n=SV),i.sort(function(c,l){return n(a[c],a[l])});var s=i.map(function(c){return e[c]}).concat(o);return s.length!=e.length&&(s.length=e.length),s}function kV(e,t){const n=i=>i.copy().range(mi(0,i.domain().length)).unknown(-1);let r;switch(t.type){case"quantitative":r=i=>ft(i)&&!isNaN(i)?-i:-1/0;break;case"ordinal":r=n(t.scale);break;case"nominal":r=i=>i||"";break}return i=>r(e(i))}function TV(e,t){const n=new Set,r=i=>{const a=n.has(i);return n.add(i),a};return e.filter(i=>!r(t(i)))}function IV(e,t,n){const r=new Set,i=a=>(r.size<n&&r.add(a),r.has(a));return e.filter(a=>i(t(a)))}function RV(e,t,n=!1){return CV(e,t,(r,i)=>(n&&([r,i]=[i,r]),r<i?-1:r>i?1:0))}const DV={lt:(e,t)=>e<t,lte:(e,t)=>e<=t,eq:(e,t)=>e==t,gte:(e,t)=>e>=t,gt:(e,t)=>e>t};function BV(e,t,n,r){const i=DV[n];return e.filter(a=>i(t(a),r))}function HS(e,t,n,r){const i=new Set(r),a=s=>i.has(s),o=n=="remove"?s=>!a(s):a;return e.filter(s=>o(t(s)))}function FV(e,t){const n=r=>r!=null;return e.filter(r=>n(t(r)))}/**
2685
2688
  * @license
2686
2689
  * Copyright 2021 Google LLC
2687
2690
  * SPDX-License-Identifier: BSD-3-Clause
2688
- */function*FV(e,t){const n=typeof t=="function";if(e!==void 0){let r=-1;for(const i of e)r>-1&&(yield n?t(r):t),r++,yield i}}const GS="setSamples",VS="sortBy",jS="retainFirstOfEach",qS="retainFirstNCategories",WS="filterByNominal",YS="filterByQuantitative",ZS="removeUndefined",QS="groupByNominal",XS="groupToQuartiles",KS="groupByThresholds",JS="removeGroup",e_="retainMatched",Cs="sampleView";function PV(){return{sampleData:void 0,groupMetadata:[],rootGroup:{name:"ROOT",title:"Root",samples:[]}}}function MV(e){const t=(n,r)=>{const i=e(n.attribute).accessor;return a=>i(a,r)};return $S({name:Cs,initialState:PV(),reducers:{[GS]:(n,r)=>{const i=r.payload.samples;if(n.sampleData)throw new Error("Samples have already been set!");if(i.some(o=>o.id===void 0||o.id===null))throw new Error('The sample metadata contains missing sample ids or the "sample" column is missing!');if(new Set(i.map(o=>o.id)).size!=i.length)throw new Error("The sample metadata contains duplicate sample ids!");const a=i.map((o,s)=>({...o,indexNumber:s}));n.sampleData={ids:a.map(o=>o.id),entities:Object.fromEntries(a.map(o=>[o.id,o]))},n.rootGroup={name:"ROOT",title:"Root",samples:n.sampleData.ids}},[VS]:(n,r)=>{co(n,i=>IV(i,CV(t(r.payload,n),e(r.payload.attribute)),!1))},[jS]:(n,r)=>{co(n,i=>kV(i,t(r.payload,n)))},[qS]:(n,r)=>{co(n,i=>TV(i,t(r.payload,n),r.payload.n))},[YS]:(n,r)=>{co(n,i=>DV(i,t(r.payload,n),r.payload.operator,r.payload.operand))},[WS]:(n,r)=>{co(n,i=>HS(i,t(r.payload,n),r.payload.remove?"remove":"retain",r.payload.values))},[ZS]:(n,r)=>{co(n,i=>BV(i,t(r.payload,n)))},[QS]:(n,r)=>{var a;const i=(a=e(r.payload.attribute).scale)==null?void 0:a.domain();rb(n,o=>i_(o,t(r.payload,n),i)),n.groupMetadata.push({attribute:r.payload.attribute})},[XS]:(n,r)=>{rb(n,i=>zV(i,t(r.payload,n))),n.groupMetadata.push({attribute:r.payload.attribute})},[KS]:(n,r)=>{rb(n,i=>NV(i,t(r.payload,n),r.payload.thresholds)),n.groupMetadata.push({attribute:r.payload.attribute})},[JS]:(n,r)=>{const i=n.rootGroup;Nd(i)&&o_(i,r.payload.path)},[e_]:(n,r)=>{const i=t(r.payload,n),a=[];for(const s of ib(n))if(s.samples.length>0){const c=new Set;for(const l of s.samples)c.add(i(l));a.push(c)}const o=[];for(const s of a[0]){let c=!0;for(let l=1;l<a.length&&c;l++)c=a[l].has(s);c&&o.push(s)}co(n,s=>HS(s,i,"retain",o))}}})}function co(e,t){for(const n of ib(e))n.samples=t(n.samples)}function rb(e,t){for(const n of ib(e))t(n)}function ib(e){return ob(e).map(t=>xn(t))}function ab(e){return e.provenance.present[Cs]}function ob(e){const t=[],n=[],r=i=>{if(t.push(i),Nd(i))for(const a of i.groups)r(a);else n.push([...t]);t.pop()};return r(e.rootGroup),n}function t_(e){return"samples"in e}function Nd(e){return"groups"in e}function*sb(e){if(yield[e],Nd(e))for(const t of e.groups)for(const n of sb(t))yield[e,...n]}const OV=pt(".4"),n_={lt:"<",lte:"≤",eq:"=",gte:"≥",gt:">"};function r_(e){return $`{${e.map((t,n)=>$`${n>0?", ":""}<strong>${t}</strong>`)}}`}function LV(e,t){if(!e.type.startsWith(Cs))return;const n=e.payload,r=n.attribute&&t(n.attribute),i=r==null?void 0:r.name,a=(r==null?void 0:r.title)||$` <em>${i}</em> `,o={attributeName:i};switch(e.type.substring(Cs.length+1)){case GS:return{...o,title:"The initial state",icon:N$};case VS:return{...o,title:"Sort by",provenanceTitle:$` Sort by ${a} `,icon:m$};case jS:return{...o,title:$`
2691
+ */function*PV(e,t){const n=typeof t=="function";if(e!==void 0){let r=-1;for(const i of e)r>-1&&(yield n?t(r):t),r++,yield i}}const GS="setSamples",VS="sortBy",jS="retainFirstOfEach",qS="retainFirstNCategories",WS="filterByNominal",YS="filterByQuantitative",ZS="removeUndefined",QS="groupByNominal",XS="groupToQuartiles",KS="groupByThresholds",JS="removeGroup",e_="retainMatched",Cs="sampleView";function MV(){return{sampleData:void 0,groupMetadata:[],rootGroup:{name:"ROOT",title:"Root",samples:[]}}}function OV(e){const t=(n,r)=>{const i=e(n.attribute).accessor;return a=>i(a,r)};return $S({name:Cs,initialState:MV(),reducers:{[GS]:(n,r)=>{const i=r.payload.samples;if(n.sampleData)throw new Error("Samples have already been set!");if(i.some(o=>o.id===void 0||o.id===null))throw new Error('The sample metadata contains missing sample ids or the "sample" column is missing!');if(new Set(i.map(o=>o.id)).size!=i.length)throw new Error("The sample metadata contains duplicate sample ids!");const a=i.map((o,s)=>({...o,indexNumber:s}));n.sampleData={ids:a.map(o=>o.id),entities:Object.fromEntries(a.map(o=>[o.id,o]))},n.rootGroup={name:"ROOT",title:"Root",samples:n.sampleData.ids}},[VS]:(n,r)=>{co(n,i=>RV(i,kV(t(r.payload,n),e(r.payload.attribute)),!1))},[jS]:(n,r)=>{co(n,i=>TV(i,t(r.payload,n)))},[qS]:(n,r)=>{co(n,i=>IV(i,t(r.payload,n),r.payload.n))},[YS]:(n,r)=>{co(n,i=>BV(i,t(r.payload,n),r.payload.operator,r.payload.operand))},[WS]:(n,r)=>{co(n,i=>HS(i,t(r.payload,n),r.payload.remove?"remove":"retain",r.payload.values))},[ZS]:(n,r)=>{co(n,i=>FV(i,t(r.payload,n)))},[QS]:(n,r)=>{var a;const i=(a=e(r.payload.attribute).scale)==null?void 0:a.domain();rb(n,o=>i_(o,t(r.payload,n),i)),n.groupMetadata.push({attribute:r.payload.attribute})},[XS]:(n,r)=>{rb(n,i=>UV(i,t(r.payload,n))),n.groupMetadata.push({attribute:r.payload.attribute})},[KS]:(n,r)=>{rb(n,i=>zV(i,t(r.payload,n),r.payload.thresholds)),n.groupMetadata.push({attribute:r.payload.attribute})},[JS]:(n,r)=>{const i=n.rootGroup;Nd(i)&&o_(i,r.payload.path)},[e_]:(n,r)=>{const i=t(r.payload,n),a=[];for(const s of ib(n))if(s.samples.length>0){const c=new Set;for(const l of s.samples)c.add(i(l));a.push(c)}const o=[];for(const s of a[0]){let c=!0;for(let l=1;l<a.length&&c;l++)c=a[l].has(s);c&&o.push(s)}co(n,s=>HS(s,i,"retain",o))}}})}function co(e,t){for(const n of ib(e))n.samples=t(n.samples)}function rb(e,t){for(const n of ib(e))t(n)}function ib(e){return ob(e).map(t=>xn(t))}function ab(e){return e.provenance.present[Cs]}function ob(e){const t=[],n=[],r=i=>{if(t.push(i),Nd(i))for(const a of i.groups)r(a);else n.push([...t]);t.pop()};return r(e.rootGroup),n}function t_(e){return"samples"in e}function Nd(e){return"groups"in e}function*sb(e){if(yield[e],Nd(e))for(const t of e.groups)for(const n of sb(t))yield[e,...n]}const LV=pt(".4"),n_={lt:"<",lte:"≤",eq:"=",gte:"≥",gt:">"};function r_(e){return $`{${e.map((t,n)=>$`${n>0?", ":""}<strong>${t}</strong>`)}}`}function NV(e,t){if(!e.type.startsWith(Cs))return;const n=e.payload,r=n.attribute&&t(n.attribute),i=r==null?void 0:r.name,a=(r==null?void 0:r.title)||$` <em>${i}</em> `,o={attributeName:i};switch(e.type.substring(Cs.length+1)){case GS:return{...o,title:"The initial state",icon:z$};case VS:return{...o,title:"Sort by",provenanceTitle:$` Sort by ${a} `,icon:b$};case jS:return{...o,title:$`
2689
2692
  Retain the first sample of each
2690
2693
  <em>${i}</em>
2691
2694
  `,provenanceTitle:$`
@@ -2706,7 +2709,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2706
2709
  <span class="operator"
2707
2710
  >${n_[n.operator]}</span
2708
2711
  >
2709
- <strong>${OV(n.operand)}</strong>
2712
+ <strong>${LV(n.operand)}</strong>
2710
2713
  `;return{...o,title:c($` <em>${i}</em> `),provenanceTitle:c(a),icon:Ja}}case ZS:return{...o,title:"Remove samples having missing attribute",provenanceTitle:$`
2711
2714
  Remove samples having missing ${a}
2712
2715
  `,icon:ld};case QS:return{...o,title:"Group by",provenanceTitle:$` Group by ${a} `,icon:Ul};case XS:return{...o,title:"Group by quartiles",provenanceTitle:$`
@@ -2717,13 +2720,13 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2717
2720
  on ${a}
2718
2721
  `,icon:Ul};case JS:return{title:"Remove group",provenanceTitle:$`
2719
2722
  Remove group
2720
- ${FV(n.path.map(c=>$`<strong>${c}</strong>`)," / ")}
2723
+ ${PV(n.path.map(c=>$`<strong>${c}</strong>`)," / ")}
2721
2724
  `,icon:ld};case e_:return{...o,title:$`
2722
2725
  Retain group-wise matched samples using
2723
2726
  <em>${i}</em>
2724
2727
  `,provenanceTitle:$`
2725
2728
  Retain group-wise matched samples using ${a}
2726
- `,icon:Ja};default:return{...o,title:JSON.stringify(e),icon:o4}}}function i_(e,t,n,r){if(r&&!n)throw new Error("Custom labels need explicit group order!");const i=Rc(e.samples,t),a=n?n.map(c=>[c,i.get(c)]).filter(c=>c[1]):[...i],s=e;s.groups=a.map(([c,l],u)=>({name:""+c,title:r?r[u]:c,samples:l})),delete e.samples}function a_(e,t,n){const r=o=>`Group ${o+1}`,i=mi(n.length-1).reverse(),a=s_(t,n.slice(1,n.length-1));i_(e,o=>r(a(o)),i.map(r),i.map(o=>l_(n[o],n[o+1])))}function NV(e,t,n){a_(e,t,[{operator:"lt",operand:-1/0},...n,{operator:"lte",operand:1/0}])}function zV(e,t){const n=$V(UV(e.samples,t,[0,.25,.5,.75,1]));n.length==1&&n.push(n[0]),a_(e,t,n.map((r,i,a)=>({operator:i==a.length-1?"lte":"lt",operand:r})))}function o_(e,t){if(t.length==0)return;const n=e.groups.findIndex(r=>r.name==t[0]);if(!(n<0)){if(t.length==1)e.groups.splice(n,1);else if(t.length>1){const r=e.groups[n];Nd(r)&&o_(r,[...t].splice(1))}}}function s_(e,t){return r=>{const i=e(r);if(!(!ft(i)||isNaN(i))){for(let a=0;a<t.length;a++)if(t[a].operator=="lt"){if(i<t[a].operand)return a}else if(i<=t[a].operand)return a;return t.length}}}function UV(e,t,n){const r=nR(e.map(t).filter(i=>ft(i)&&!isNaN(i)));return n.map(i=>Fp(r,i))}function $V(e){const t=[e[0]];for(let n=1;n<e.length;n++)e[n]!=e[n-1]&&t.push(e[n]);return t}const c_=pt(".3~r"),l_=(e,t)=>`${e.operator=="lt"?"[":"("}${c_(e.operand)}, ${c_(t.operand)}${t.operator=="lte"?"]":")"}`;function HV(e,t){const n=t.provenance.storeHelper.getDispatcher(),r=[],i=ao(),a=$`
2729
+ `,icon:Ja};default:return{...o,title:JSON.stringify(e),icon:o4}}}function i_(e,t,n,r){if(r&&!n)throw new Error("Custom labels need explicit group order!");const i=Rc(e.samples,t),a=n?n.map(c=>[c,i.get(c)]).filter(c=>c[1]):[...i],s=e;s.groups=a.map(([c,l],u)=>({name:""+c,title:r?r[u]:c,samples:l})),delete e.samples}function a_(e,t,n){const r=o=>`Group ${o+1}`,i=mi(n.length-1).reverse(),a=s_(t,n.slice(1,n.length-1));i_(e,o=>r(a(o)),i.map(r),i.map(o=>l_(n[o],n[o+1])))}function zV(e,t,n){a_(e,t,[{operator:"lt",operand:-1/0},...n,{operator:"lte",operand:1/0}])}function UV(e,t){const n=HV($V(e.samples,t,[0,.25,.5,.75,1]));n.length==1&&n.push(n[0]),a_(e,t,n.map((r,i,a)=>({operator:i==a.length-1?"lte":"lt",operand:r})))}function o_(e,t){if(t.length==0)return;const n=e.groups.findIndex(r=>r.name==t[0]);if(!(n<0)){if(t.length==1)e.groups.splice(n,1);else if(t.length>1){const r=e.groups[n];Nd(r)&&o_(r,[...t].splice(1))}}}function s_(e,t){return r=>{const i=e(r);if(!(!ft(i)||isNaN(i))){for(let a=0;a<t.length;a++)if(t[a].operator=="lt"){if(i<t[a].operand)return a}else if(i<=t[a].operand)return a;return t.length}}}function $V(e,t,n){const r=nR(e.map(t).filter(i=>ft(i)&&!isNaN(i)));return n.map(i=>Fp(r,i))}function HV(e){const t=[e[0]];for(let n=1;n<e.length;n++)e[n]!=e[n-1]&&t.push(e[n]);return t}const c_=pt(".3~r"),l_=(e,t)=>`${e.operator=="lt"?"[":"("}${c_(e.operand)}, ${c_(t.operand)}${t.operator=="lte"?"]":")"}`;function GV(e,t){const n=t.provenance.storeHelper.getDispatcher(),r=[],i=ao(),a=$`
2727
2730
  <div class="modal-title">
2728
2731
  Group by threshold on <em>${e.name}</em>
2729
2732
  </div>
@@ -2734,12 +2737,12 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2734
2737
 
2735
2738
  <button
2736
2739
  class="btn btn-primary"
2737
- ?disabled=${!GV(r)}
2740
+ ?disabled=${!VV(r)}
2738
2741
  @click=${()=>o()}
2739
2742
  >
2740
2743
  ${Ue(Ul).node[0]} Group
2741
2744
  </button>
2742
- </div>`,c=(b,y)=>(y>0&&(b=Math.max(b,r[y-1].operand)),y<r.length-1&&(b=Math.min(b,r[y+1].operand)),b),l=(b,y)=>{const w=b.target.value;r[y].operator=w,g()},u=(b,y)=>{const w=b.target.value;/^\d+(\.\d+)?$/.test(w)&&(r[y].operand=c(+w,y),g())},f=b=>{const y=r.findIndex(w=>w.operand>b.value);r.splice(y<0?r.length:y,0,{operand:b.value,operator:"lt"}),g()},h=b=>{r[b.index].operand=c(b.value,b.index),g()},d=b=>{r.splice(b,1),g()},p=VV(e,t.leafSamples,t.sampleHierarchy);function g(){const b=()=>{const w=[{operand:-1/0,operator:"lt"},...r,{operand:1/0,operator:"lte"}],A=s_(_=>_,w),x=[];for(let _=1;_<w.length;_++)x.push(0);for(const _ of p)x[A(_)-1]++;const C=[];for(let _=1;_<w.length;_++)C.push({index:_-1,name:_,interval:l_(w[_-1],w[_]),n:x[_-1]});return $`<table class="threshold-groups">
2745
+ </div>`,c=(b,y)=>(y>0&&(b=Math.max(b,r[y-1].operand)),y<r.length-1&&(b=Math.min(b,r[y+1].operand)),b),l=(b,y)=>{const w=b.target.value;r[y].operator=w,g()},u=(b,y)=>{const w=b.target.value;/^\d+(\.\d+)?$/.test(w)&&(r[y].operand=c(+w,y),g())},f=b=>{const y=r.findIndex(w=>w.operand>b.value);r.splice(y<0?r.length:y,0,{operand:b.value,operator:"lt"}),g()},h=b=>{r[b.index].operand=c(b.value,b.index),g()},d=b=>{r.splice(b,1),g()},p=jV(e,t.leafSamples,t.sampleHierarchy);function g(){const b=()=>{const w=[{operand:-1/0,operator:"lt"},...r,{operand:1/0,operator:"lte"}],A=s_(_=>_,w),x=[];for(let _=1;_<w.length;_++)x.push(0);for(const _ of p)x[A(_)-1]++;const C=[];for(let _=1;_<w.length;_++)C.push({index:_-1,name:_,interval:l_(w[_-1],w[_]),n:x[_-1]});return $`<table class="threshold-groups">
2743
2746
  <thead>
2744
2747
  <tr>
2745
2748
  <th>Group</th>
@@ -2807,7 +2810,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2807
2810
  </div>
2808
2811
  `;Vt($`${a}
2809
2812
  <div class="modal-body">${y}</div>
2810
- ${s()}`,i.content)}g()}function GV(e){return e.length}function VV(e,t,n){const r=e.accessor;return t.map(i=>r(i,n))}function jV(e,t){const n=t.provenance.storeHelper.getDispatcher();let r=5;const i=ao(),a=$`
2813
+ ${s()}`,i.content)}g()}function VV(e){return e.length}function jV(e,t,n){const r=e.accessor;return t.map(i=>r(i,n))}function qV(e,t){const n=t.provenance.storeHelper.getDispatcher();let r=5;const i=ao(),a=$`
2811
2814
  <div class="modal-title">
2812
2815
  Retain first n categories of <em>${e.title}</em>
2813
2816
  </div>
@@ -2831,19 +2834,19 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2831
2834
  </div>
2832
2835
  `;function l(){Vt($`${a}
2833
2836
  <div class="modal-body">${c}</div>
2834
- ${s()}`,i.content)}l(),i.content.querySelector("input").focus()}function cb(e,t,n,r){const i=r.actions,a=t.attribute,o=r.sampleHierarchy,s=r.provenance.storeHelper.getDispatcher(),c=[];e&&c.push({label:e,type:"header"});const l=(h,d,p)=>{const g=r.provenance.getActionInfo(h);return{label:g.title,icon:g.icon,callback:d?void 0:p??(()=>s(h))}},u=(...h)=>c.push(...h.map(d=>l(d)));u(i.sortBy({attribute:a}));const f=(t==null?void 0:t.type)??"identifier";return f!="quantitative"?(f!="identifier"&&(u(i.groupByNominal({attribute:a}),i.retainFirstOfEach({attribute:a})),c.push(l(i.retainFirstNCategories({attribute:a,n:void 0}),!1,()=>jV(t,r)))),u(i.filterByNominal({attribute:a,values:[n]}),i.filterByNominal({attribute:a,remove:!0,values:[n]})),f!="identifier"&&c.push(l(i.retainMatched({attribute:a}),!o.groupMetadata.length))):(u(i.groupToQuartiles({attribute:a})),c.push({icon:Ul,label:"Group by thresholds...",callback:()=>HV(t,r)}),qV(n)?u(i.filterByQuantitative({attribute:a,operator:"gte",operand:+n}),i.filterByQuantitative({attribute:a,operator:"lte",operand:+n})):u(i.removeUndefined({attribute:a}))),c.push({icon:Ja,label:"Advanced filter...",callback:()=>kG(t,r)}),c}function qV(e){return e!=null&&e!==""&&!(typeof e=="number"&&isNaN(e))}const En={UNDO:"@@redux-undo/UNDO",REDO:"@@redux-undo/REDO",JUMP_TO_FUTURE:"@@redux-undo/JUMP_TO_FUTURE",JUMP_TO_PAST:"@@redux-undo/JUMP_TO_PAST",JUMP:"@@redux-undo/JUMP",CLEAR_HISTORY:"@@redux-undo/CLEAR_HISTORY"},lo={undo(){return{type:En.UNDO}},redo(){return{type:En.REDO}},jumpToFuture(e){return{type:En.JUMP_TO_FUTURE,index:e}},jumpToPast(e){return{type:En.JUMP_TO_PAST,index:e}},jump(e){return{type:En.JUMP,index:e}},clearHistory(){return{type:En.CLEAR_HISTORY}}};function u_(e,t=[]){return Array.isArray(e)?e:typeof e=="string"?[e]:t}function WV(e){return typeof e.present<"u"&&typeof e.future<"u"&&typeof e.past<"u"&&Array.isArray(e.future)&&Array.isArray(e.past)}function uo(e,t,n,r=null){return{past:e,present:t,future:n,group:r,_latestUnfiltered:t,index:e.length,limit:e.length+n.length+1}}let zd,Sn;const lb={prevState:"#9E9E9E",action:"#03A9F4",nextState:"#4CAF50"};function YV(){Sn={header:[],prev:[],action:[],next:[],msgs:[]}}function ZV(){const{header:e,prev:t,next:n,action:r,msgs:i}=Sn;console.group?(console.groupCollapsed(...e),console.log(...t),console.log(...r),console.log(...n),console.log(...i),console.groupEnd()):(console.log(...e),console.log(...t),console.log(...r),console.log(...n),console.log(...i))}function ub(e,t,n){return[`%c${e}`,`color: ${t}; font-weight: bold`,n]}function QV(e,t){YV(),zd&&(console.group?(Sn.header=["%credux-undo","font-style: italic","action",e.type],Sn.action=ub("action",lb.action,e),Sn.prev=ub("prev history",lb.prevState,t)):(Sn.header=["redux-undo action",e.type],Sn.action=["action",e],Sn.prev=["prev history",t]))}function Jn(e){zd&&(console.group?Sn.next=ub("next history",lb.nextState,e):Sn.next=["next history",e],ZV())}function $t(...e){zd&&(Sn.msgs=Sn.msgs.concat([...e,`
2835
- `]))}function XV(e){zd=e}function fb(e,t){const n=uo([],e,[]);return t&&(n._latestUnfiltered=null),n}function KV(e,t,n,r){const i=e.past.length+1;$t("inserting",t),$t("new free: ",n-i);const{past:a,_latestUnfiltered:o}=e,s=n&&n<=i,c=a.slice(s?1:0),l=o!=null?[...c,o]:c;return uo(l,t,[],r)}function f_(e,t){if(t<0||t>=e.future.length)return e;const{past:n,future:r,_latestUnfiltered:i}=e,a=[...n,i,...r.slice(0,t)],o=r[t],s=r.slice(t+1);return uo(a,o,s)}function h_(e,t){if(t<0||t>=e.past.length)return e;const{past:n,future:r,_latestUnfiltered:i}=e,a=n.slice(0,t),o=[...n.slice(t+1),i,...r],s=n[t];return uo(a,s,o)}function hb(e,t){return t>0?f_(e,t-1):t<0?h_(e,e.past.length+t):e}function JV(e,t){return t.indexOf(e)>-1?e:!e}function ej(e,t={}){XV(t.debug);const n={limit:void 0,filter:()=>!0,groupBy:()=>null,undoType:En.UNDO,redoType:En.REDO,jumpToPastType:En.JUMP_TO_PAST,jumpToFutureType:En.JUMP_TO_FUTURE,jumpType:En.JUMP,neverSkipReducer:!1,ignoreInitialState:!1,syncFilter:!1,...t,initTypes:u_(t.initTypes,["@@redux-undo/INIT"]),clearHistoryType:u_(t.clearHistoryType,[En.CLEAR_HISTORY])},r=n.neverSkipReducer?(a,o,...s)=>({...a,present:e(a.present,o,...s)}):a=>a;let i;return(a=i,o={},...s)=>{QV(o,a);let c=a;if(!i)if($t("history is uninitialized"),a===void 0){const u=e(a,{type:"@@redux-undo/CREATE_HISTORY"},...s);return c=fb(u,n.ignoreInitialState),$t("do not set initialState on probe actions"),Jn(c),c}else WV(a)?(c=i=n.ignoreInitialState?a:uo(a.past,a.present,a.future),$t("initialHistory initialized: initialState is a history",i)):(c=i=fb(a,n.ignoreInitialState),$t("initialHistory initialized: initialState is not a history",i));let l;switch(o.type){case void 0:return c;case n.undoType:return l=hb(c,-1),$t("perform undo"),Jn(l),r(l,o,...s);case n.redoType:return l=hb(c,1),$t("perform redo"),Jn(l),r(l,o,...s);case n.jumpToPastType:return l=h_(c,o.index),$t(`perform jumpToPast to ${o.index}`),Jn(l),r(l,o,...s);case n.jumpToFutureType:return l=f_(c,o.index),$t(`perform jumpToFuture to ${o.index}`),Jn(l),r(l,o,...s);case n.jumpType:return l=hb(c,o.index),$t(`perform jump to ${o.index}`),Jn(l),r(l,o,...s);case JV(o.type,n.clearHistoryType):return l=fb(c.present,n.ignoreInitialState),$t("perform clearHistory"),Jn(l),r(l,o,...s);default:if(l=e(c.present,o,...s),n.initTypes.some(f=>f===o.type))return $t("reset history due to init action"),Jn(i),i;if(c._latestUnfiltered===l)return c;if(typeof n.filter=="function"&&!n.filter(o,l,c)){const f=uo(c.past,l,c.future,c.group);return n.syncFilter||(f._latestUnfiltered=c._latestUnfiltered),$t("filter ignored action, not storing it in past"),Jn(f),f}const u=n.groupBy(o,l,c);if(u!=null&&u===c.group){const f=uo(c.past,l,c.future,c.group);return $t("groupBy grouped the action with the previous action"),Jn(f),f}return c=KV(c,l,n.limit,u),$t("inserted new state into history"),Jn(c),c}}}function Ud(e){return e.split("-")[0]}function db(e){return e.split("-")[1]}function pb(e){return["top","bottom"].includes(Ud(e))?"x":"y"}function d_(e){return e==="y"?"height":"width"}function p_(e,t,n){let{reference:r,floating:i}=e;const a=r.x+r.width/2-i.width/2,o=r.y+r.height/2-i.height/2,s=pb(t),c=d_(s),l=r[c]/2-i[c]/2,u=s==="x";let f;switch(Ud(t)){case"top":f={x:a,y:r.y-i.height};break;case"bottom":f={x:a,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:o};break;case"left":f={x:r.x-i.width,y:o};break;default:f={x:r.x,y:r.y}}switch(db(t)){case"start":f[s]-=l*(n&&u?-1:1);break;case"end":f[s]+=l*(n&&u?-1:1)}return f}const tj=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:l,y:u}=p_(c,r,s),f=r,h={};for(let d=0;d<a.length;d++){const{name:p,fn:g}=a[d],{x:b,y,data:w,reset:A}=await g({x:l,y:u,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});l=b??l,u=y??u,h={...h,[p]:{...h[p],...w}},A&&(typeof A=="object"&&(A.placement&&(f=A.placement),A.rects&&(c=A.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:l,y:u}=p_(c,f,s)),d=-1)}return{x:l,y:u,placement:f,strategy:i,middlewareData:h}};function nj(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function $d(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function rj(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=t,p=nj(d),g=s[h?f==="floating"?"reference":"floating":f],b=$d(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y=$d(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f==="floating"?{...o.floating,x:r,y:i}:o.reference,offsetParent:await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),strategy:c}):o[f]);return{top:b.top-y.top+p.top,bottom:y.bottom-b.bottom+p.bottom,left:b.left-y.left+p.left,right:y.right-b.right+p.right}}const ij={left:"right",right:"left",bottom:"top",top:"bottom"};function Hd(e){return e.replace(/left|right|bottom|top/g,t=>ij[t])}function aj(e,t,n){n===void 0&&(n=!1);const r=db(e),i=pb(e),a=d_(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Hd(o)),{main:o,cross:Hd(o)}}const oj={start:"end",end:"start"};function g_(e){return e.replace(/start|end/g,t=>oj[t])}["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const m_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",flipAlignment:d=!0,...p}=e,g=Ud(r),b=f||(g===o||!d?[Hd(o)]:function(D){const M=Hd(D);return[g_(D),M,g_(M)]}(o)),y=[o,...b],w=await rj(t,p),A=[];let x=((n=i.flip)==null?void 0:n.overflows)||[];if(l&&A.push(w[g]),u){const{main:D,cross:M}=aj(r,a,await(s.isRTL==null?void 0:s.isRTL(c.floating)));A.push(w[D],w[M])}if(x=[...x,{placement:r,overflows:A}],!A.every(D=>D<=0)){var C,_;const D=((C=(_=i.flip)==null?void 0:_.index)!=null?C:0)+1,M=y[D];if(M)return{data:{index:D,overflows:x},reset:{placement:M}};let G="bottom";switch(h){case"bestFit":{var I;const O=(I=x.map(ae=>[ae,ae.overflows.filter(se=>se>0).reduce((se,ve)=>se+ve,0)]).sort((ae,se)=>ae[1]-se[1])[0])==null?void 0:I[0].placement;O&&(G=O);break}case"initialPlacement":G=o}if(r!==G)return{reset:{placement:G}}}return{}}}},sj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await async function(a,o){const{placement:s,platform:c,elements:l}=a,u=await(c.isRTL==null?void 0:c.isRTL(l.floating)),f=Ud(s),h=db(s),d=pb(s)==="x",p=["left","top"].includes(f)?-1:1,g=u&&d?-1:1,b=typeof o=="function"?o(a):o;let{mainAxis:y,crossAxis:w,alignmentAxis:A}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...b};return h&&typeof A=="number"&&(w=h==="end"?-1*A:A),d?{x:w*g,y:y*p}:{x:y*p,y:w*g}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function b_(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Qr(e){if(e==null)return window;if(!b_(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function ru(e){return Qr(e).getComputedStyle(e)}function Xr(e){return b_(e)?"":e?(e.nodeName||"").toLowerCase():""}function y_(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function vr(e){return e instanceof Qr(e).HTMLElement}function ks(e){return e instanceof Qr(e).Element}function gb(e){return typeof ShadowRoot>"u"?!1:e instanceof Qr(e).ShadowRoot||e instanceof ShadowRoot}function Gd(e){const{overflow:t,overflowX:n,overflowY:r}=ru(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function cj(e){return["table","td","th"].includes(Xr(e))}function v_(e){const t=/firefox/i.test(y_()),n=ru(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"}function w_(){return!/^((?!chrome|android).)*safari/i.test(y_())}const x_=Math.min,iu=Math.max,Vd=Math.round;function fo(e,t,n){var r,i,a,o;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let c=1,l=1;t&&vr(e)&&(c=e.offsetWidth>0&&Vd(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&Vd(s.height)/e.offsetHeight||1);const u=ks(e)?Qr(e):window,f=!w_()&&n,h=(s.left+(f&&(r=(i=u.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/c,d=(s.top+(f&&(a=(o=u.visualViewport)==null?void 0:o.offsetTop)!=null?a:0))/l,p=s.width/c,g=s.height/l;return{width:p,height:g,top:d,right:h+p,bottom:d+g,left:h,x:h,y:d}}function ji(e){return(t=e,(t instanceof Qr(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function jd(e){return ks(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function A_(e){return fo(ji(e)).left+jd(e).scrollLeft}function lj(e,t,n){const r=vr(t),i=ji(t),a=fo(e,r&&function(c){const l=fo(c);return Vd(l.width)!==c.offsetWidth||Vd(l.height)!==c.offsetHeight}(t),n==="fixed");let o={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Xr(t)!=="body"||Gd(i))&&(o=jd(t)),vr(t)){const c=fo(t,!0);s.x=c.x+t.clientLeft,s.y=c.y+t.clientTop}else i&&(s.x=A_(i));return{x:a.left+o.scrollLeft-s.x,y:a.top+o.scrollTop-s.y,width:a.width,height:a.height}}function E_(e){return Xr(e)==="html"?e:e.assignedSlot||e.parentNode||(gb(e)?e.host:null)||ji(e)}function S_(e){return vr(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function mb(e){const t=Qr(e);let n=S_(e);for(;n&&cj(n)&&getComputedStyle(n).position==="static";)n=S_(n);return n&&(Xr(n)==="html"||Xr(n)==="body"&&getComputedStyle(n).position==="static"&&!v_(n))?t:n||function(r){let i=E_(r);for(gb(i)&&(i=i.host);vr(i)&&!["html","body"].includes(Xr(i));){if(v_(i))return i;i=i.parentNode}return null}(e)||t}function __(e){if(vr(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=fo(e);return{width:t.width,height:t.height}}function C_(e){const t=E_(e);return["html","body","#document"].includes(Xr(t))?e.ownerDocument.body:vr(t)&&Gd(t)?t:C_(t)}function k_(e,t){var n;t===void 0&&(t=[]);const r=C_(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=Qr(r),o=i?[a].concat(a.visualViewport||[],Gd(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(k_(o))}function T_(e,t,n){return t==="viewport"?$d(function(r,i){const a=Qr(r),o=ji(r),s=a.visualViewport;let c=o.clientWidth,l=o.clientHeight,u=0,f=0;if(s){c=s.width,l=s.height;const h=w_();(h||!h&&i==="fixed")&&(u=s.offsetLeft,f=s.offsetTop)}return{width:c,height:l,x:u,y:f}}(e,n)):ks(t)?function(r,i){const a=fo(r,!1,i==="fixed"),o=a.top+r.clientTop,s=a.left+r.clientLeft;return{top:o,left:s,x:s,y:o,right:s+r.clientWidth,bottom:o+r.clientHeight,width:r.clientWidth,height:r.clientHeight}}(t,n):$d(function(r){var i;const a=ji(r),o=jd(r),s=(i=r.ownerDocument)==null?void 0:i.body,c=iu(a.scrollWidth,a.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),l=iu(a.scrollHeight,a.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let u=-o.scrollLeft+A_(r);const f=-o.scrollTop;return ru(s||a).direction==="rtl"&&(u+=iu(a.clientWidth,s?s.clientWidth:0)-c),{width:c,height:l,x:u,y:f}}(ji(e)))}function uj(e){const t=k_(e),n=["absolute","fixed"].includes(ru(e).position)&&vr(e)?mb(e):e;return ks(n)?t.filter(r=>ks(r)&&function(i,a){const o=a==null||a.getRootNode==null?void 0:a.getRootNode();if(i!=null&&i.contains(a))return!0;if(o&&gb(o)){let s=a;do{if(s&&i===s)return!0;s=s.parentNode||s.host}while(s)}return!1}(r,n)&&Xr(r)!=="body"):[]}const fj={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?uj(t):[].concat(n),r],o=a[0],s=a.reduce((c,l)=>{const u=T_(t,l,i);return c.top=iu(u.top,c.top),c.right=x_(u.right,c.right),c.bottom=x_(u.bottom,c.bottom),c.left=iu(u.left,c.left),c},T_(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=vr(n),a=ji(n);if(n===a)return t;let o={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Xr(n)!=="body"||Gd(a))&&(o=jd(n)),vr(n))){const c=fo(n,!0);s.x=c.x+n.clientLeft,s.y=c.y+n.clientTop}return{...t,x:t.x-o.scrollLeft+s.x,y:t.y-o.scrollTop+s.y}},isElement:ks,getDimensions:__,getOffsetParent:mb,getDocumentElement:ji,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:lj(t,mb(n),r),floating:{...__(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>ru(e).direction==="rtl"},hj=(e,t,n)=>tj(e,t,{platform:fj,...n});let wr;const au=[],bb=bs(e=>e(),150,!1),yb={type:"divider"};function ou(e){if((e==null?void 0:e.type)=="contextmenu"){e.preventDefault();return}wr&&(wr.remove(),wr=void 0,document.body.classList.remove(Ba))}function I_(e){var t;if(!(e<1)){for(let n=e;n<au.length;n++)(t=au[n])==null||t.remove(),au[n]=void 0;for(const n of au[e-1].querySelectorAll("li.active"))n.classList.remove("active")}}const dj=()=>$`<li class="menu-divider"></li>`,pj=e=>$` <li class="menu-header">${e.label||"-"}</li> `,gj=(e,t)=>$`
2837
+ ${s()}`,i.content)}l(),i.content.querySelector("input").focus()}function cb(e,t,n,r){const i=r.actions,a=t.attribute,o=r.sampleHierarchy,s=r.provenance.storeHelper.getDispatcher(),c=[];e&&c.push({label:e,type:"header"});const l=(h,d,p)=>{const g=r.provenance.getActionInfo(h);return{label:g.title,icon:g.icon,callback:d?void 0:p??(()=>s(h))}},u=(...h)=>c.push(...h.map(d=>l(d)));u(i.sortBy({attribute:a}));const f=(t==null?void 0:t.type)??"identifier";return f!="quantitative"?(f!="identifier"&&(u(i.groupByNominal({attribute:a}),i.retainFirstOfEach({attribute:a})),c.push(l(i.retainFirstNCategories({attribute:a,n:void 0}),!1,()=>qV(t,r)))),u(i.filterByNominal({attribute:a,values:[n]}),i.filterByNominal({attribute:a,remove:!0,values:[n]})),f!="identifier"&&c.push(l(i.retainMatched({attribute:a}),!o.groupMetadata.length))):(u(i.groupToQuartiles({attribute:a})),c.push({icon:Ul,label:"Group by thresholds...",callback:()=>GV(t,r)}),WV(n)?u(i.filterByQuantitative({attribute:a,operator:"gte",operand:+n}),i.filterByQuantitative({attribute:a,operator:"lte",operand:+n})):u(i.removeUndefined({attribute:a}))),c.push({icon:Ja,label:"Advanced filter...",callback:()=>TG(t,r)}),c}function WV(e){return e!=null&&e!==""&&!(typeof e=="number"&&isNaN(e))}const En={UNDO:"@@redux-undo/UNDO",REDO:"@@redux-undo/REDO",JUMP_TO_FUTURE:"@@redux-undo/JUMP_TO_FUTURE",JUMP_TO_PAST:"@@redux-undo/JUMP_TO_PAST",JUMP:"@@redux-undo/JUMP",CLEAR_HISTORY:"@@redux-undo/CLEAR_HISTORY"},lo={undo(){return{type:En.UNDO}},redo(){return{type:En.REDO}},jumpToFuture(e){return{type:En.JUMP_TO_FUTURE,index:e}},jumpToPast(e){return{type:En.JUMP_TO_PAST,index:e}},jump(e){return{type:En.JUMP,index:e}},clearHistory(){return{type:En.CLEAR_HISTORY}}};function u_(e,t=[]){return Array.isArray(e)?e:typeof e=="string"?[e]:t}function YV(e){return typeof e.present<"u"&&typeof e.future<"u"&&typeof e.past<"u"&&Array.isArray(e.future)&&Array.isArray(e.past)}function uo(e,t,n,r=null){return{past:e,present:t,future:n,group:r,_latestUnfiltered:t,index:e.length,limit:e.length+n.length+1}}let zd,Sn;const lb={prevState:"#9E9E9E",action:"#03A9F4",nextState:"#4CAF50"};function ZV(){Sn={header:[],prev:[],action:[],next:[],msgs:[]}}function QV(){const{header:e,prev:t,next:n,action:r,msgs:i}=Sn;console.group?(console.groupCollapsed(...e),console.log(...t),console.log(...r),console.log(...n),console.log(...i),console.groupEnd()):(console.log(...e),console.log(...t),console.log(...r),console.log(...n),console.log(...i))}function ub(e,t,n){return[`%c${e}`,`color: ${t}; font-weight: bold`,n]}function XV(e,t){ZV(),zd&&(console.group?(Sn.header=["%credux-undo","font-style: italic","action",e.type],Sn.action=ub("action",lb.action,e),Sn.prev=ub("prev history",lb.prevState,t)):(Sn.header=["redux-undo action",e.type],Sn.action=["action",e],Sn.prev=["prev history",t]))}function Jn(e){zd&&(console.group?Sn.next=ub("next history",lb.nextState,e):Sn.next=["next history",e],QV())}function $t(...e){zd&&(Sn.msgs=Sn.msgs.concat([...e,`
2838
+ `]))}function KV(e){zd=e}function fb(e,t){const n=uo([],e,[]);return t&&(n._latestUnfiltered=null),n}function JV(e,t,n,r){const i=e.past.length+1;$t("inserting",t),$t("new free: ",n-i);const{past:a,_latestUnfiltered:o}=e,s=n&&n<=i,c=a.slice(s?1:0),l=o!=null?[...c,o]:c;return uo(l,t,[],r)}function f_(e,t){if(t<0||t>=e.future.length)return e;const{past:n,future:r,_latestUnfiltered:i}=e,a=[...n,i,...r.slice(0,t)],o=r[t],s=r.slice(t+1);return uo(a,o,s)}function h_(e,t){if(t<0||t>=e.past.length)return e;const{past:n,future:r,_latestUnfiltered:i}=e,a=n.slice(0,t),o=[...n.slice(t+1),i,...r],s=n[t];return uo(a,s,o)}function hb(e,t){return t>0?f_(e,t-1):t<0?h_(e,e.past.length+t):e}function ej(e,t){return t.indexOf(e)>-1?e:!e}function tj(e,t={}){KV(t.debug);const n={limit:void 0,filter:()=>!0,groupBy:()=>null,undoType:En.UNDO,redoType:En.REDO,jumpToPastType:En.JUMP_TO_PAST,jumpToFutureType:En.JUMP_TO_FUTURE,jumpType:En.JUMP,neverSkipReducer:!1,ignoreInitialState:!1,syncFilter:!1,...t,initTypes:u_(t.initTypes,["@@redux-undo/INIT"]),clearHistoryType:u_(t.clearHistoryType,[En.CLEAR_HISTORY])},r=n.neverSkipReducer?(a,o,...s)=>({...a,present:e(a.present,o,...s)}):a=>a;let i;return(a=i,o={},...s)=>{XV(o,a);let c=a;if(!i)if($t("history is uninitialized"),a===void 0){const u=e(a,{type:"@@redux-undo/CREATE_HISTORY"},...s);return c=fb(u,n.ignoreInitialState),$t("do not set initialState on probe actions"),Jn(c),c}else YV(a)?(c=i=n.ignoreInitialState?a:uo(a.past,a.present,a.future),$t("initialHistory initialized: initialState is a history",i)):(c=i=fb(a,n.ignoreInitialState),$t("initialHistory initialized: initialState is not a history",i));let l;switch(o.type){case void 0:return c;case n.undoType:return l=hb(c,-1),$t("perform undo"),Jn(l),r(l,o,...s);case n.redoType:return l=hb(c,1),$t("perform redo"),Jn(l),r(l,o,...s);case n.jumpToPastType:return l=h_(c,o.index),$t(`perform jumpToPast to ${o.index}`),Jn(l),r(l,o,...s);case n.jumpToFutureType:return l=f_(c,o.index),$t(`perform jumpToFuture to ${o.index}`),Jn(l),r(l,o,...s);case n.jumpType:return l=hb(c,o.index),$t(`perform jump to ${o.index}`),Jn(l),r(l,o,...s);case ej(o.type,n.clearHistoryType):return l=fb(c.present,n.ignoreInitialState),$t("perform clearHistory"),Jn(l),r(l,o,...s);default:if(l=e(c.present,o,...s),n.initTypes.some(f=>f===o.type))return $t("reset history due to init action"),Jn(i),i;if(c._latestUnfiltered===l)return c;if(typeof n.filter=="function"&&!n.filter(o,l,c)){const f=uo(c.past,l,c.future,c.group);return n.syncFilter||(f._latestUnfiltered=c._latestUnfiltered),$t("filter ignored action, not storing it in past"),Jn(f),f}const u=n.groupBy(o,l,c);if(u!=null&&u===c.group){const f=uo(c.past,l,c.future,c.group);return $t("groupBy grouped the action with the previous action"),Jn(f),f}return c=JV(c,l,n.limit,u),$t("inserted new state into history"),Jn(c),c}}}function Ud(e){return e.split("-")[0]}function db(e){return e.split("-")[1]}function pb(e){return["top","bottom"].includes(Ud(e))?"x":"y"}function d_(e){return e==="y"?"height":"width"}function p_(e,t,n){let{reference:r,floating:i}=e;const a=r.x+r.width/2-i.width/2,o=r.y+r.height/2-i.height/2,s=pb(t),c=d_(s),l=r[c]/2-i[c]/2,u=s==="x";let f;switch(Ud(t)){case"top":f={x:a,y:r.y-i.height};break;case"bottom":f={x:a,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:o};break;case"left":f={x:r.x-i.width,y:o};break;default:f={x:r.x,y:r.y}}switch(db(t)){case"start":f[s]-=l*(n&&u?-1:1);break;case"end":f[s]+=l*(n&&u?-1:1)}return f}const nj=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:l,y:u}=p_(c,r,s),f=r,h={};for(let d=0;d<a.length;d++){const{name:p,fn:g}=a[d],{x:b,y,data:w,reset:A}=await g({x:l,y:u,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});l=b??l,u=y??u,h={...h,[p]:{...h[p],...w}},A&&(typeof A=="object"&&(A.placement&&(f=A.placement),A.rects&&(c=A.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:l,y:u}=p_(c,f,s)),d=-1)}return{x:l,y:u,placement:f,strategy:i,middlewareData:h}};function rj(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function $d(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function ij(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=t,p=rj(d),g=s[h?f==="floating"?"reference":"floating":f],b=$d(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y=$d(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f==="floating"?{...o.floating,x:r,y:i}:o.reference,offsetParent:await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),strategy:c}):o[f]);return{top:b.top-y.top+p.top,bottom:y.bottom-b.bottom+p.bottom,left:b.left-y.left+p.left,right:y.right-b.right+p.right}}const aj={left:"right",right:"left",bottom:"top",top:"bottom"};function Hd(e){return e.replace(/left|right|bottom|top/g,t=>aj[t])}function oj(e,t,n){n===void 0&&(n=!1);const r=db(e),i=pb(e),a=d_(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Hd(o)),{main:o,cross:Hd(o)}}const sj={start:"end",end:"start"};function g_(e){return e.replace(/start|end/g,t=>sj[t])}["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const m_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",flipAlignment:d=!0,...p}=e,g=Ud(r),b=f||(g===o||!d?[Hd(o)]:function(D){const M=Hd(D);return[g_(D),M,g_(M)]}(o)),y=[o,...b],w=await ij(t,p),A=[];let x=((n=i.flip)==null?void 0:n.overflows)||[];if(l&&A.push(w[g]),u){const{main:D,cross:M}=oj(r,a,await(s.isRTL==null?void 0:s.isRTL(c.floating)));A.push(w[D],w[M])}if(x=[...x,{placement:r,overflows:A}],!A.every(D=>D<=0)){var C,_;const D=((C=(_=i.flip)==null?void 0:_.index)!=null?C:0)+1,M=y[D];if(M)return{data:{index:D,overflows:x},reset:{placement:M}};let G="bottom";switch(h){case"bestFit":{var I;const O=(I=x.map(ae=>[ae,ae.overflows.filter(se=>se>0).reduce((se,ve)=>se+ve,0)]).sort((ae,se)=>ae[1]-se[1])[0])==null?void 0:I[0].placement;O&&(G=O);break}case"initialPlacement":G=o}if(r!==G)return{reset:{placement:G}}}return{}}}},cj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await async function(a,o){const{placement:s,platform:c,elements:l}=a,u=await(c.isRTL==null?void 0:c.isRTL(l.floating)),f=Ud(s),h=db(s),d=pb(s)==="x",p=["left","top"].includes(f)?-1:1,g=u&&d?-1:1,b=typeof o=="function"?o(a):o;let{mainAxis:y,crossAxis:w,alignmentAxis:A}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...b};return h&&typeof A=="number"&&(w=h==="end"?-1*A:A),d?{x:w*g,y:y*p}:{x:y*p,y:w*g}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function b_(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Qr(e){if(e==null)return window;if(!b_(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function ru(e){return Qr(e).getComputedStyle(e)}function Xr(e){return b_(e)?"":e?(e.nodeName||"").toLowerCase():""}function y_(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function vr(e){return e instanceof Qr(e).HTMLElement}function ks(e){return e instanceof Qr(e).Element}function gb(e){return typeof ShadowRoot>"u"?!1:e instanceof Qr(e).ShadowRoot||e instanceof ShadowRoot}function Gd(e){const{overflow:t,overflowX:n,overflowY:r}=ru(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function lj(e){return["table","td","th"].includes(Xr(e))}function v_(e){const t=/firefox/i.test(y_()),n=ru(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"}function w_(){return!/^((?!chrome|android).)*safari/i.test(y_())}const x_=Math.min,iu=Math.max,Vd=Math.round;function fo(e,t,n){var r,i,a,o;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let c=1,l=1;t&&vr(e)&&(c=e.offsetWidth>0&&Vd(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&Vd(s.height)/e.offsetHeight||1);const u=ks(e)?Qr(e):window,f=!w_()&&n,h=(s.left+(f&&(r=(i=u.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/c,d=(s.top+(f&&(a=(o=u.visualViewport)==null?void 0:o.offsetTop)!=null?a:0))/l,p=s.width/c,g=s.height/l;return{width:p,height:g,top:d,right:h+p,bottom:d+g,left:h,x:h,y:d}}function ji(e){return(t=e,(t instanceof Qr(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function jd(e){return ks(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function A_(e){return fo(ji(e)).left+jd(e).scrollLeft}function uj(e,t,n){const r=vr(t),i=ji(t),a=fo(e,r&&function(c){const l=fo(c);return Vd(l.width)!==c.offsetWidth||Vd(l.height)!==c.offsetHeight}(t),n==="fixed");let o={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Xr(t)!=="body"||Gd(i))&&(o=jd(t)),vr(t)){const c=fo(t,!0);s.x=c.x+t.clientLeft,s.y=c.y+t.clientTop}else i&&(s.x=A_(i));return{x:a.left+o.scrollLeft-s.x,y:a.top+o.scrollTop-s.y,width:a.width,height:a.height}}function E_(e){return Xr(e)==="html"?e:e.assignedSlot||e.parentNode||(gb(e)?e.host:null)||ji(e)}function S_(e){return vr(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function mb(e){const t=Qr(e);let n=S_(e);for(;n&&lj(n)&&getComputedStyle(n).position==="static";)n=S_(n);return n&&(Xr(n)==="html"||Xr(n)==="body"&&getComputedStyle(n).position==="static"&&!v_(n))?t:n||function(r){let i=E_(r);for(gb(i)&&(i=i.host);vr(i)&&!["html","body"].includes(Xr(i));){if(v_(i))return i;i=i.parentNode}return null}(e)||t}function __(e){if(vr(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=fo(e);return{width:t.width,height:t.height}}function C_(e){const t=E_(e);return["html","body","#document"].includes(Xr(t))?e.ownerDocument.body:vr(t)&&Gd(t)?t:C_(t)}function k_(e,t){var n;t===void 0&&(t=[]);const r=C_(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=Qr(r),o=i?[a].concat(a.visualViewport||[],Gd(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(k_(o))}function T_(e,t,n){return t==="viewport"?$d(function(r,i){const a=Qr(r),o=ji(r),s=a.visualViewport;let c=o.clientWidth,l=o.clientHeight,u=0,f=0;if(s){c=s.width,l=s.height;const h=w_();(h||!h&&i==="fixed")&&(u=s.offsetLeft,f=s.offsetTop)}return{width:c,height:l,x:u,y:f}}(e,n)):ks(t)?function(r,i){const a=fo(r,!1,i==="fixed"),o=a.top+r.clientTop,s=a.left+r.clientLeft;return{top:o,left:s,x:s,y:o,right:s+r.clientWidth,bottom:o+r.clientHeight,width:r.clientWidth,height:r.clientHeight}}(t,n):$d(function(r){var i;const a=ji(r),o=jd(r),s=(i=r.ownerDocument)==null?void 0:i.body,c=iu(a.scrollWidth,a.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),l=iu(a.scrollHeight,a.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let u=-o.scrollLeft+A_(r);const f=-o.scrollTop;return ru(s||a).direction==="rtl"&&(u+=iu(a.clientWidth,s?s.clientWidth:0)-c),{width:c,height:l,x:u,y:f}}(ji(e)))}function fj(e){const t=k_(e),n=["absolute","fixed"].includes(ru(e).position)&&vr(e)?mb(e):e;return ks(n)?t.filter(r=>ks(r)&&function(i,a){const o=a==null||a.getRootNode==null?void 0:a.getRootNode();if(i!=null&&i.contains(a))return!0;if(o&&gb(o)){let s=a;do{if(s&&i===s)return!0;s=s.parentNode||s.host}while(s)}return!1}(r,n)&&Xr(r)!=="body"):[]}const hj={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?fj(t):[].concat(n),r],o=a[0],s=a.reduce((c,l)=>{const u=T_(t,l,i);return c.top=iu(u.top,c.top),c.right=x_(u.right,c.right),c.bottom=x_(u.bottom,c.bottom),c.left=iu(u.left,c.left),c},T_(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=vr(n),a=ji(n);if(n===a)return t;let o={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Xr(n)!=="body"||Gd(a))&&(o=jd(n)),vr(n))){const c=fo(n,!0);s.x=c.x+n.clientLeft,s.y=c.y+n.clientTop}return{...t,x:t.x-o.scrollLeft+s.x,y:t.y-o.scrollTop+s.y}},isElement:ks,getDimensions:__,getOffsetParent:mb,getDocumentElement:ji,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:uj(t,mb(n),r),floating:{...__(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>ru(e).direction==="rtl"},dj=(e,t,n)=>nj(e,t,{platform:hj,...n});let wr;const au=[],bb=bs(e=>e(),150,!1),yb={type:"divider"};function ou(e){if((e==null?void 0:e.type)=="contextmenu"){e.preventDefault();return}wr&&(wr.remove(),wr=void 0,document.body.classList.remove(Ba))}function I_(e){var t;if(!(e<1)){for(let n=e;n<au.length;n++)(t=au[n])==null||t.remove(),au[n]=void 0;for(const n of au[e-1].querySelectorAll("li.active"))n.classList.remove("active")}}const pj=()=>$`<li class="menu-divider"></li>`,gj=e=>$` <li class="menu-header">${e.label||"-"}</li> `,mj=(e,t)=>$`
2836
2839
  <li>
2837
2840
  <a
2838
2841
  class="submenu-item"
2839
2842
  @click=${n=>n.stopPropagation()}
2840
2843
  @mouseup=${n=>n.stopPropagation()}
2841
- @mouseenter=${n=>bb(()=>{const r=n.target.closest("li");yj(e.submenu,r,t+1),n.stopPropagation()})}
2844
+ @mouseenter=${n=>bb(()=>{const r=n.target.closest("li");vj(e.submenu,r,t+1),n.stopPropagation()})}
2842
2845
  @mouseleave=${()=>bb(()=>I_(t+1))}
2843
2846
  ><span>${e.label}</span></a
2844
2847
  >
2845
2848
  </li>
2846
- `,mj=e=>$`
2849
+ `,bj=e=>$`
2847
2850
  <li>
2848
2851
  <a
2849
2852
  class="choice-item"
@@ -2860,17 +2863,17 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2860
2863
  class="menu-ellipsis"
2861
2864
  @click=${e.ellipsisCallback}
2862
2865
  >
2863
- ${Ue(R$).node[0]}
2866
+ ${Ue(D$).node[0]}
2864
2867
  </a>`:ue}
2865
2868
  </li>
2866
- `,bj=e=>$`
2869
+ `,yj=e=>$`
2867
2870
  <li>
2868
2871
  <span class="disabled-item">
2869
2872
  ${e.icon?Ue(e.icon).node[0]:""}
2870
2873
  ${e.label||"-"}</span
2871
2874
  >
2872
2875
  </li>
2873
- `;function R_(e,t=1){switch(e.type){case"divider":return dj();case"header":return pj(e);default:return e.submenu?gj(e,t):e.callback?mj(e):bj(e)}}function yj(e,t,n){D_(e,t,n,"right-start"),t.classList.add("active")}function D_(e,t,n,r){const i=document.createElement("ul");i.classList.add("gs-context-menu"),i.addEventListener("mouseenter",()=>{bb(()=>{})}),Vt(e.map(a=>R_(a,n)),i),wr.appendChild(i),I_(n),au[n]=i,hj(t,i,{placement:r??"right-start",middleware:n?[m_()]:[sj(2),m_()]}).then(({x:a,y:o})=>{const s=i.querySelector(":scope > li");s&&(o-=s.getBoundingClientRect().top),i.style.left=`${a}px`,i.style.top=`${o}px`})}function B_(e,t,n){n??(n="bottom-start"),ou();const r=performance.now(),i=document.body;wr=document.createElement("div"),wr.classList.add("gs-context-menu-backdrop"),wr.addEventListener("click",ou),wr.addEventListener("contextmenu",ou),wr.addEventListener("mouseup",()=>{performance.now()-r>500&&ou()},{once:!0}),i.appendChild(wr),document.body.classList.add(Ba),D_(e.items,t,0,n)}function vb(e,t){B_(e,vj(t),"right-start"),t.preventDefault()}function vj(e){return{getBoundingClientRect(){return{width:0,height:0,x:e.clientX,y:e.clientY,top:e.clientY,left:e.clientX,right:e.clientX,bottom:e.clientY,toJSON:void 0}}}}const wb={NOMINAL:"nominal",ORDINAL:"ordinal",QUANTITATIVE:"quantitative"},qd="SAMPLE_ATTRIBUTE",F_="SAMPLE_NAME",wj=/^attribute-(.*)$/;class P_ extends ys{constructor(n,r){super({title:"Sample metadata",data:{name:null},hconcat:[],spacing:n.spec.samples.attributeSpacing??1,padding:{right:10},resolve:{scale:{default:"independent"},axis:{default:"independent"}}},n.context,n,r,"sample-metadata");Z(this,rp);Z(this,ip);Z(this,ap);Z(this,op);Z(this,Uo);Z(this,sp);Z(this,et,void 0);le(this,et,n),this._attributeHighlighState={backgroundOpacity:1,currentAttribute:void 0,abortController:new AbortController},F(this,et).compositeAttributeInfoSource.addAttributeInfoSource(qd,i=>this.children.map(J(this,Uo,Df).bind(this)).find(a=>a&&a.name==i.specifier)),F(this,et).compositeAttributeInfoSource.addAttributeInfoSource(F_,i=>M_),this.addInteractionEventListener("contextmenu",this.handleContextMenu.bind(this)),this.addInteractionEventListener("mousemove",(i,a)=>{var l;const o=a.target,s=F(this,et).findSampleForMouseEvent(i,a),c=o&&((l=J(this,Uo,Df).call(this,o))==null?void 0:l.name)||void 0;if(s){const u=JSON.stringify([s.id,c]);this.context.updateTooltip(u,f=>Promise.resolve(J(this,sp,nI).call(this,f)))}this._handleAttributeHighlight(c)}),xn([...F(this,et).getLayoutAncestors()]).addInteractionEventListener("mousemove",(i,a)=>{if(this._attributeHighlighState.currentAttribute){if(a.target){for(const o of a.target.getLayoutAncestors())if(o==this)return}this._handleAttributeHighlight(void 0)}})}getEncoding(){return{}}render(n,r,i={}){this.isConfiguredVisible()&&super.render(n,r,{...i,clipRect:F(this,et).locationManager.clipBySummary(r)})}_handleAttributeHighlight(n){const r=this._attributeHighlighState;n!=r.currentAttribute&&(r.abortController.abort(),r.abortController=new AbortController,this.context.animator.transition({from:r.backgroundOpacity,onUpdate:i=>{r.backgroundOpacity=i},easingFunction:LN,signal:r.abortController.signal,...n?{to:.1,duration:1e3,delay:r.backgroundOpacity<1?0:500}:{to:1,duration:200,delay:150}}).catch(i=>{}),this.context.animator.requestRender()),r.currentAttribute=n}getSample(n){var r;return(r=F(this,et).sampleHierarchy.sampleData)==null?void 0:r.entities[n]}handleContextMenu(n,r){const i=r.uiEvent,a=F(this,et).findSampleForMouseEvent(n,r);if(!a){i.preventDefault();return}const o=[F(this,et).makePeekMenuItem(),yb],s=J(this,Uo,Df).call(this,r.target);if(s){const c=a.attributes[s.name];o.push(...cb($`Attribute: <strong>${s.name}</strong>`,s,c,F(this,et)))}else o.push(...cb($`Sample: <strong>${a.displayName}</strong>`,M_,a.id,F(this,et)));vb({items:o},i)}setSamples(n){if(this.childCount)throw new Error("Children are already created!");this._createViews();const r=this.context.dataFlow;BE(this,r);const i=r.findDataSourceByKey(this);i.visit(o=>o.initialize());const a=[];this.visit(o=>{if(o instanceof mt){const s=o.mark;s.initializeEncoders(),a.push(s.initializeGraphics().then(c=>s)),r.addObserver(c=>{s.initializeData(),s.updateGraphicsData()},o)}}),Promise.allSettled(a).then(o=>{for(const s of o)"value"in s?s.value.finalizeGraphicsInitialization():"reason"in s&&console.error(s.reason)}),i.updateDynamicData(n),this.visit(o=>{o.name.startsWith("title")&&r.findDataSourceByKey(o).load()})}_createViews(){const n=[];n.push(this.context.createView(Aj(F(this,et).spec.samples),this,this));for(const r of this.getAttributeNames()){const i=this.context.createView(J(this,ap,eI).call(this,r),this,this);i.opacityFunction=a=>a*J(this,rp,KT).call(this,r),n.push(i)}this.setChildren(n);for(const r of this.getDescendants())r instanceof mt&&r.name.startsWith("title")&&typeof r.spec.mark!="string"&&(r.spec.mark.clip="never");PE(this)}getAttributeNames(){return this._cache("attributeNames",()=>[...F(this,et).getSamples().flatMap(i=>Object.keys(i.attributes)).reduce((i,a)=>i.add(a),new Set)])}getAttributeInfo(n){return J(this,Uo,Df).call(this,J(this,op,tI).call(this,n))}getDefaultResolution(n,r){return"independent"}handleVerboseCommand(n){const r=n;for(const i of this.getAttributeNames()){const a=this.getAttributeInfo(i);if((a.type==qm||a.type==Wm)&&F(this,et).getSamples().find(s=>s.attributes[a.name]==r)){const s=F(this,et).actions.filterByNominal({attribute:{type:qd,specifier:i},values:[r]}),c=F(this,et).provenance.getPresentState().lastAction,l=F(this,et).actions.filterByNominal.match(c)&&!c.payload.remove&&c.payload.attribute.type==qd&&c.payload.attribute.specifier==i&&c.payload.values.length==1;return F(this,et).provenance.storeHelper.dispatch(l?[lo.undo(),s]:s),!0}}return!1}isPickingSupported(){return!1}}et=new WeakMap,rp=new WeakSet,KT=function(n){const r=this._attributeHighlighState;return n==r.currentAttribute?1:r.backgroundOpacity},ip=new WeakSet,JT=function(n){var r,i;return(i=(r=F(this,et).spec.samples)==null?void 0:r.attributes)==null?void 0:i[n]},ap=new WeakSet,eI=function(n){const r=J(this,ip,JT).call(this,n);let i=r?r.type:void 0;if(!i){const a=F(this,et).getSamples();switch(lw(a.map(o=>o.attributes[n]))){case"integer":case"number":i=wb.QUANTITATIVE;break;default:i=wb.NOMINAL}}return xj(n,{...r||{},type:i},F(this,et).spec.samples)},op=new WeakSet,tI=function(n){return this.children[this.getAttributeNames().indexOf(n)+1]},Uo=new WeakSet,Df=function(n){const r=n==null?void 0:n.name.match(wj);if(r){const i=n.getScaleResolution("color"),a=r[1];return{name:a,attribute:{type:qd,specifier:a},accessor:(o,s)=>s.sampleData.entities[o].attributes[a],type:i.type,scale:i.getScale(),title:$`<em class="attribute">${a}</em>`}}},sp=new WeakSet,nI=function(n){const[r,i]=JSON.parse(n),a=this.getSample(r),o=(c,l)=>Ej(l)?this.getAttributeInfo(c).scale(l):"transparent",s=$`
2876
+ `;function R_(e,t=1){switch(e.type){case"divider":return pj();case"header":return gj(e);default:return e.submenu?mj(e,t):e.callback?bj(e):yj(e)}}function vj(e,t,n){D_(e,t,n,"right-start"),t.classList.add("active")}function D_(e,t,n,r){const i=document.createElement("ul");i.classList.add("gs-context-menu"),i.addEventListener("mouseenter",()=>{bb(()=>{})}),Vt(e.map(a=>R_(a,n)),i),wr.appendChild(i),I_(n),au[n]=i,dj(t,i,{placement:r??"right-start",middleware:n?[m_()]:[cj(2),m_()]}).then(({x:a,y:o})=>{const s=i.querySelector(":scope > li");s&&(o-=s.getBoundingClientRect().top),i.style.left=`${a}px`,i.style.top=`${o}px`})}function B_(e,t,n){n??(n="bottom-start"),ou();const r=performance.now(),i=document.body;wr=document.createElement("div"),wr.classList.add("gs-context-menu-backdrop"),wr.addEventListener("click",ou),wr.addEventListener("contextmenu",ou),wr.addEventListener("mouseup",()=>{performance.now()-r>500&&ou()},{once:!0}),i.appendChild(wr),document.body.classList.add(Ba),D_(e.items,t,0,n)}function vb(e,t){B_(e,wj(t),"right-start"),t.preventDefault()}function wj(e){return{getBoundingClientRect(){return{width:0,height:0,x:e.clientX,y:e.clientY,top:e.clientY,left:e.clientX,right:e.clientX,bottom:e.clientY,toJSON:void 0}}}}const wb={NOMINAL:"nominal",ORDINAL:"ordinal",QUANTITATIVE:"quantitative"},qd="SAMPLE_ATTRIBUTE",F_="SAMPLE_NAME",xj=/^attribute-(.*)$/;class P_ extends ys{constructor(n,r){super({title:"Sample metadata",data:{name:null},hconcat:[],spacing:n.spec.samples.attributeSpacing??1,padding:{right:10},resolve:{scale:{default:"independent"},axis:{default:"independent"}}},n.context,n,r,"sample-metadata");Z(this,rp);Z(this,ip);Z(this,ap);Z(this,op);Z(this,Uo);Z(this,sp);Z(this,et,void 0);le(this,et,n),this._attributeHighlighState={backgroundOpacity:1,currentAttribute:void 0,abortController:new AbortController},F(this,et).compositeAttributeInfoSource.addAttributeInfoSource(qd,i=>this.children.map(J(this,Uo,Df).bind(this)).find(a=>a&&a.name==i.specifier)),F(this,et).compositeAttributeInfoSource.addAttributeInfoSource(F_,i=>M_),this.addInteractionEventListener("contextmenu",this.handleContextMenu.bind(this)),this.addInteractionEventListener("mousemove",(i,a)=>{var l;const o=a.target,s=F(this,et).findSampleForMouseEvent(i,a),c=o&&((l=J(this,Uo,Df).call(this,o))==null?void 0:l.name)||void 0;if(s){const u=JSON.stringify([s.id,c]);this.context.updateTooltip(u,f=>Promise.resolve(J(this,sp,nI).call(this,f)))}this._handleAttributeHighlight(c)}),xn([...F(this,et).getLayoutAncestors()]).addInteractionEventListener("mousemove",(i,a)=>{if(this._attributeHighlighState.currentAttribute){if(a.target){for(const o of a.target.getLayoutAncestors())if(o==this)return}this._handleAttributeHighlight(void 0)}})}getEncoding(){return{}}render(n,r,i={}){this.isConfiguredVisible()&&super.render(n,r,{...i,clipRect:F(this,et).locationManager.clipBySummary(r)})}_handleAttributeHighlight(n){const r=this._attributeHighlighState;n!=r.currentAttribute&&(r.abortController.abort(),r.abortController=new AbortController,this.context.animator.transition({from:r.backgroundOpacity,onUpdate:i=>{r.backgroundOpacity=i},easingFunction:LN,signal:r.abortController.signal,...n?{to:.1,duration:1e3,delay:r.backgroundOpacity<1?0:500}:{to:1,duration:200,delay:150}}).catch(i=>{}),this.context.animator.requestRender()),r.currentAttribute=n}getSample(n){var r;return(r=F(this,et).sampleHierarchy.sampleData)==null?void 0:r.entities[n]}handleContextMenu(n,r){const i=r.uiEvent,a=F(this,et).findSampleForMouseEvent(n,r);if(!a){i.preventDefault();return}const o=[F(this,et).makePeekMenuItem(),yb],s=J(this,Uo,Df).call(this,r.target);if(s){const c=a.attributes[s.name];o.push(...cb($`Attribute: <strong>${s.name}</strong>`,s,c,F(this,et)))}else o.push(...cb($`Sample: <strong>${a.displayName}</strong>`,M_,a.id,F(this,et)));vb({items:o},i)}setSamples(n){if(this.childCount)throw new Error("Children are already created!");this._createViews();const r=this.context.dataFlow;BE(this,r);const i=r.findDataSourceByKey(this);i.visit(o=>o.initialize());const a=[];this.visit(o=>{if(o instanceof mt){const s=o.mark;s.initializeEncoders(),a.push(s.initializeGraphics().then(c=>s)),r.addObserver(c=>{s.initializeData(),s.updateGraphicsData()},o)}}),Promise.allSettled(a).then(o=>{for(const s of o)"value"in s?s.value.finalizeGraphicsInitialization():"reason"in s&&console.error(s.reason)}),i.updateDynamicData(n),this.visit(o=>{o.name.startsWith("title")&&r.findDataSourceByKey(o).load()})}_createViews(){const n=[];n.push(this.context.createView(Ej(F(this,et).spec.samples),this,this));for(const r of this.getAttributeNames()){const i=this.context.createView(J(this,ap,eI).call(this,r),this,this);i.opacityFunction=a=>a*J(this,rp,KT).call(this,r),n.push(i)}this.setChildren(n);for(const r of this.getDescendants())r instanceof mt&&r.name.startsWith("title")&&typeof r.spec.mark!="string"&&(r.spec.mark.clip="never");PE(this)}getAttributeNames(){return this._cache("attributeNames",()=>[...F(this,et).getSamples().flatMap(i=>Object.keys(i.attributes)).reduce((i,a)=>i.add(a),new Set)])}getAttributeInfo(n){return J(this,Uo,Df).call(this,J(this,op,tI).call(this,n))}getDefaultResolution(n,r){return"independent"}handleVerboseCommand(n){const r=n;for(const i of this.getAttributeNames()){const a=this.getAttributeInfo(i);if((a.type==qm||a.type==Wm)&&F(this,et).getSamples().find(s=>s.attributes[a.name]==r)){const s=F(this,et).actions.filterByNominal({attribute:{type:qd,specifier:i},values:[r]}),c=F(this,et).provenance.getPresentState().lastAction,l=F(this,et).actions.filterByNominal.match(c)&&!c.payload.remove&&c.payload.attribute.type==qd&&c.payload.attribute.specifier==i&&c.payload.values.length==1;return F(this,et).provenance.storeHelper.dispatch(l?[lo.undo(),s]:s),!0}}return!1}isPickingSupported(){return!1}}et=new WeakMap,rp=new WeakSet,KT=function(n){const r=this._attributeHighlighState;return n==r.currentAttribute?1:r.backgroundOpacity},ip=new WeakSet,JT=function(n){var r,i;return(i=(r=F(this,et).spec.samples)==null?void 0:r.attributes)==null?void 0:i[n]},ap=new WeakSet,eI=function(n){const r=J(this,ip,JT).call(this,n);let i=r?r.type:void 0;if(!i){const a=F(this,et).getSamples();switch(lw(a.map(o=>o.attributes[n]))){case"integer":case"number":i=wb.QUANTITATIVE;break;default:i=wb.NOMINAL}}return Aj(n,{...r||{},type:i},F(this,et).spec.samples)},op=new WeakSet,tI=function(n){return this.children[this.getAttributeNames().indexOf(n)+1]},Uo=new WeakSet,Df=function(n){const r=n==null?void 0:n.name.match(xj);if(r){const i=n.getScaleResolution("color"),a=r[1];return{name:a,attribute:{type:qd,specifier:a},accessor:(o,s)=>s.sampleData.entities[o].attributes[a],type:i.type,scale:i.getScale(),title:$`<em class="attribute">${a}</em>`}}},sp=new WeakSet,nI=function(n){const[r,i]=JSON.parse(n),a=this.getSample(r),o=(c,l)=>Sj(l)?this.getAttributeInfo(c).scale(l):"transparent",s=$`
2874
2877
  <table class="attributes">
2875
2878
  ${Object.entries(a.attributes).map(([c,l])=>$`
2876
2879
  <tr class=${f1({hovered:c==i})}>
@@ -2888,24 +2891,24 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2888
2891
  <strong>${a.displayName||a.id}</strong>
2889
2892
  </div>
2890
2893
  ${s}
2891
- `};function xj(e,t,n){const r=`attributes["${e}"]`,i={name:`attribute-${e}`,title:{text:e,orient:"bottom",align:"right",baseline:"middle",offset:5,angle:-90+(n.attributeLabelAngle??0),dy:-.5,font:n.attributeLabelFont,fontSize:n.attributeLabelFontSize??11,fontStyle:n.attributeLabelFontStyle,fontWeight:n.attributeLabelFontWeight},visible:t.visible??!0,width:t.width??n.attributeSize??10,transform:[{type:"filter",expr:`datum.${r} != null`}],mark:{type:"rect",xOffset:-.5},encoding:{facetIndex:{field:"indexNumber"},color:{field:r,type:t.type,scale:t.scale}},opacity:1};return t.barScale&&t.type==wb.QUANTITATIVE&&(i.encoding.x={field:`attributes["${e}"]`,type:t.type,scale:t.barScale,axis:null}),i}function Aj(e){return{name:"metadata-sample-name",title:{text:e.labelTitleText??"Sample name",orient:"bottom",anchor:"start",offset:5,font:e.attributeLabelFont,fontSize:e.attributeLabelFontSize??11,fontStyle:e.attributeLabelFontStyle,fontWeight:e.attributeLabelFontWeight},width:e.labelLength??140,mark:{type:"text",baseline:"middle",font:e.labelFont,size:e.labelFontSize??11,fontStyle:e.labelFontStyle,fontWeight:e.labelFontWeight,align:e.labelAlign??"left",flushY:!1},encoding:{facetIndex:{field:"indexNumber"},x:{value:0},x2:{value:1},y:{value:0},y2:{value:1},text:{field:"displayName"}}}}function Ej(e){return e!==""&&!(typeof e=="number"&&isNaN(e))&&e!==null}const M_=Object.freeze({name:"sample",attribute:{type:F_},accessor:e=>e,type:"identifier",scale:void 0});class Sj extends Ka{constructor(n,r){super({title:{text:"Groups",orient:"none"},padding:{right:0},width:{step:22},data:{name:null},transform:[{type:"filter",expr:"datum._depth > 0"},{type:"formula",as:"_y1",expr:"datum._index * 2"},{type:"formula",as:"_y2",expr:"datum._index * 2 + 1"},{type:"formula",as:"_title",expr:"datum.title || datum.name"},{type:"formula",as:"_NA",expr:"datum._title === null"},{type:"formula",as:"_title",expr:"datum._title !== null ? datum._title: 'NA'"}],encoding:{x:{field:"_depth",type:"ordinal",scale:{align:0,padding:.2272727},axis:null},y:{field:"_y1",type:"nominal",scale:{type:"ordinal",domain:mi(500)},axis:null},y2:{field:"_y2"}},layer:[{title:"Group",mark:{type:"rect",clip:!0,color:"#e8e8e8",cornerRadiusBottomLeft:14,cornerRadiusTopLeft:14}},{mark:{type:"text",clip:!0,angle:-90,paddingY:5,tooltip:null},encoding:{text:{field:"_title"},opacity:{field:"_NA",type:"nominal",scale:{type:"ordinal",domain:[!1,!0],range:[1,.3]}}}}]},n.context,n,r,"sample-groups");Z(this,cp);this.sampleView=n,this._addBroadcastHandler("layoutComputed",()=>{this.updateRange()}),this.addInteractionEventListener("contextmenu",(i,a)=>{const o=a.uiEvent,s=this.context.getCurrentHover();if(!s)return;const c=s.datum._rawGroup;let l;for(const d of sb(this.sampleView.sampleHierarchy.rootGroup))if(d.at(-1)===c){l=d.slice(1);break}const u=n.actions.removeGroup({path:l.map(d=>d.name)}),f=n.provenance.getActionInfo(u),h=n.provenance.storeHelper.getDispatcher();vb({items:[{label:f.title,icon:f.icon,callback:()=>h(u)}]},o)})}updateRange(){var o,s;const n=(o=this.sampleView.locationManager.getLocations())==null?void 0:o.groups;if(!(n!=null&&n.length))return;const r=((s=this.sampleView)==null?void 0:s.childCoords.height)??0,i=this.getScaleResolution("y"),a=[];for(const c of n)a.push(1-(c.locSize.location+c.locSize.size)/r),a.push(1-c.locSize.location/r);i.getScale().range(a),this.context.glHelper.createRangeTexture(i,!0)}updateGroups(){var o;const n=((o=this.sampleView.locationManager.getLocations())==null?void 0:o.groups)??[],r=this.context.dataFlow.findDataSourceByKey(this);if(!r)return;const i=J(this,cp,rI).call(this),a=n.map(s=>({_index:s.key.index,_depth:s.key.depth,_rawGroup:s.key.group,attribute:i[s.key.depth],name:s.key.group.name,...s.key.group.name!=s.key.group.title?{title:s.key.group.title}:{},n:s.key.n}));r.updateDynamicData(a),this.getScaleResolution("x").reconfigure(),this.getScaleResolution("y").reconfigure(),n.length&&this.updateRange(),xn([...this.getLayoutAncestors()]).visit(s=>Il(s,"size"))}}cp=new WeakSet,rI=function(){const n=document.createElement("div");return[null,...this.sampleView.sampleHierarchy.groupMetadata].map(r=>{if(!r)return"unknown";const i=this.sampleView.compositeAttributeInfoSource.getAttributeInfo(r.attribute).title;return i?Me(i)?i:(Vt(i,n),n.textContent.replace(/\s+/g," ").trim()):"unknown"})};class _j{constructor(){this.attributeInfoSourcesByType={}}addAttributeInfoSource(t,n){this.attributeInfoSourcesByType[t]=n}getAttributeInfo(t){const n=this.attributeInfoSourcesByType[t.type];if(!n)throw new Error("Cannot find attribute info source for: "+JSON.stringify(t));const r=n(t);if(r)return r;throw new Error("Unknown attribute: "+JSON.stringify(t))}}function Wd(e,t,n){let r=n&&e(n);return i=>{const a=e(i);a!==r&&(t(a,r),r=a)}}class Cj{constructor(t){Z(this,Af);Z(this,Ln,0);Z(this,ua,0);Z(this,$o,0);Z(this,Ac,void 0);Z(this,Ec,void 0);Z(this,ui,void 0);Z(this,Sc,void 0);Z(this,It,void 0);Z(this,xf,void 0);le(this,It,t),le(this,xf,t.viewContext.paramBroker.allocateSetter("sampleHeight"))}isCloseup(){return F(this,Ln)===1}resetLocations(){le(this,ui,void 0)}reset(){le(this,Ln,0),this.resetLocations()}handleWheelEvent(t){le(this,ua,Ai(F(this,ua)+t.deltaY,0,F(this,$o)-F(this,It).getHeight()))}togglePeek(t,n,r){if(F(this,Ln)>0&&F(this,Ln)<1||t!==void 0&&t==!!F(this,Ln))return;const i=F(this,It).viewContext,a=F(this,It).getHeight(),o={requestAnimationFrame:s=>i.animator.requestTransition(s),onUpdate:s=>{le(this,Ln,Math.pow(s,2)),F(this,It).onLocationUpdate(),J(this,Af,av).call(this),i.animator.requestRender()},from:F(this,Ln)};if(F(this,Ln)==0){let s;if(r)s=(l=>l.location+l.size/2)(F(this,Sc).samples.find(l=>l.key==r).locSize);else{const c=this.getSummaryAt(n);c&&(s=F(this,Sc).summaries[c.index].locSize.location-(c.location.locSize.location-n))}s?le(this,ua,s-n):le(this,ua,(F(this,$o)-a)/2),F(this,$o)>a?rd({...o,to:1,duration:500,easingFunction:$N}):rd({...o,from:0,to:1,duration:300,easingFunction:l=>(1-Math.pow(l*2-1,2))*.5})}else rd({...o,to:0,duration:400,easingFunction:NN})}getLocations(){if(F(this,ui))return F(this,ui);const t=F(this,It).getHeight();if(!t)return;const n=F(this,It).getSampleHierarchy(),r=ob(n),i=F(this,It).getSummaryHeight(),a=O_(r,{viewHeight:t,groupSpacing:5,summaryHeight:i}),o=O_(r,{sampleHeight:35,groupSpacing:15,summaryHeight:i}),s=()=>-F(this,ua),c=()=>F(this,Ln);le(this,Sc,o),le(this,$o,o.summaries.map(f=>f.locSize.location+f.locSize.size).reduce((f,h)=>Math.max(f,h),0));const l=(f,h)=>{const d=[];for(let p=0;p<f.length;p++){const g=f[p].key;d.push({key:g,locSize:XL(f[p].locSize,KL(h[p].locSize,s),c)})}return d},u=l(a.groups,o.groups);return le(this,ui,{samples:l(a.samples,o.samples),summaries:l(a.summaries,o.summaries),groups:u}),J(this,Af,av).call(this),F(this,ui)}getGroupBackgroundRects(t){const n=this.getLocations().groups,r=n.map(s=>s.key.depth).reduce((s,c)=>Math.max(s,c),0),i=n.filter(s=>s.key.depth==r),a=F(this,It).getSummaryHeight();t=t.flatten();const o=F(this,It).isStickySummaries()&&a>0?t.shrink(new Ct(a,0,0,0)):t;return[...i.values()].map(s=>{const c=()=>{const l=s.locSize.location;return t.y+l+a};return{coords:t.modify({y:c,height:()=>s.locSize.size-a}).intersect(o),clipRect:o}})}updateFacetTexture(){const t=F(this,It).getSampleHierarchy().sampleData;if(!F(this,Ec)){const a=t&&Object.values(t.entities);le(this,Ec,new Float32Array(Math.ceil(a.length*2/4)*4))}const n=F(this,Ec);n.fill(0);const r=t==null?void 0:t.entities;if(r){const a=this.getLocations().samples,o=F(this,It).getHeight();for(const s of a){const c=r[s.key].indexNumber;n[c*2+0]=s.locSize.location/o,n[c*2+1]=s.locSize.size/o}}const i=F(this,It).viewContext.glHelper.gl;le(this,Ac,Dl(i,{internalFormat:i.RG32F,format:i.RG,height:1},n,F(this,Ac)))}getFacetTexture(){return F(this,Ac)}getSummaryAt(t){const n=this.getLocations().summaries,r=n.findIndex(i=>XA(i.locSize,t));return r>=0?{index:r,location:n[r]}:void 0}clipBySummary(t){if(F(this,It).isStickySummaries()){const n=F(this,It).getSummaryHeight();if(n>0)return t.modify({y:()=>t.y+n,height:()=>t.height-n})}return t}}Ln=new WeakMap,ua=new WeakMap,$o=new WeakMap,Ac=new WeakMap,Ec=new WeakMap,ui=new WeakMap,Sc=new WeakMap,It=new WeakMap,xf=new WeakMap,Af=new WeakSet,av=function(){var t;F(this,xf).call(this,((t=F(this,ui).samples[0])==null?void 0:t.locSize.size)??0)};function O_(e,{viewHeight:t=0,sampleHeight:n=0,groupSpacing:r=5,summaryHeight:i=0}){if(!t&&!n)throw new Error("viewHeight or sampleHeight must be provided!");const a=h=>xn(h),o=e.map(h=>({path:h,sampleGroup:a(h),samples:a(h).samples})).filter(h=>h.samples.length),s=n?h=>({px:h.length*n+i,grow:0}):h=>({px:i,grow:h.length}),c=[];Fl(o.map(h=>s(h.samples)),t,{spacing:r}).forEach((h,d)=>{c.push({key:o[d].path,locSize:h})});const l=[];for(const[h,d]of o.entries()){const p={grow:1},g=d.samples;Fl(g.map(b=>p),Math.max(0,c[h].locSize.size-i),{offset:c[h].locSize.location+i}).forEach((b,y)=>{const{size:w,location:A}=b,x=w*.1*pg(15,22,w);b.location=A+x,b.size=w-2*x,l.push({key:g[y],locSize:b})})}function*u(){const h=[];for(const d of c){const p=d.key,g=xn(p);for(;h.length<=p.length&&h.length&&p[h.length-1]!=h[h.length-1].group;)yield h.pop();for(let b=0;b<h.length;b++){const y=h[b];y.locSize.size=d.locSize.location-y.locSize.location+d.locSize.size}for(let b=h.length;b<p.length;b++)h.push({group:p[b],locSize:{...d.locSize},depth:h.length,n:0});for(const b of h)b.n+=g.samples.length}for(;h.length;)yield h.pop()}const f=[...u()].sort((h,d)=>h.depth-d.depth).map((h,d)=>({key:{index:d,group:h.group,depth:h.depth,n:h.n,attributeLabel:void 0},locSize:h.locSize}));return{samples:l,summaries:c,groups:f}}function kj(e,t){return t.find(n=>XA(n.locSize,e))}function Tj(e,t){const n=t.specifier,r=e.findDescendantByName(n.view),i=r.getScaleResolution("x");let a;if(td(n.locus)){const f=i.getGenome();if(f)a=f.toContinuous(n.locus.chrom,n.locus.pos);else throw new Error("Encountered a chromosomal locus but no genome is available!")}else a=n.locus;const o=f=>{var h;return(h=r.mark.findDatumAt(f,a))==null?void 0:h[n.field]},[s,c]=Object.entries(r.getEncoding()).find(([f,h])=>"field"in h&&h.field==n.field),l=Ri(s)?r.getScaleResolution(s).getScale():void 0;return{name:n.field,attribute:t,title:$` <em class="attribute">${n.field}</em>
2894
+ `};function Aj(e,t,n){const r=`attributes["${e}"]`,i={name:`attribute-${e}`,title:{text:e,orient:"bottom",align:"right",baseline:"middle",offset:5,angle:-90+(n.attributeLabelAngle??0),dy:-.5,font:n.attributeLabelFont,fontSize:n.attributeLabelFontSize??11,fontStyle:n.attributeLabelFontStyle,fontWeight:n.attributeLabelFontWeight},visible:t.visible??!0,width:t.width??n.attributeSize??10,transform:[{type:"filter",expr:`datum.${r} != null`}],mark:{type:"rect",xOffset:-.5},encoding:{facetIndex:{field:"indexNumber"},color:{field:r,type:t.type,scale:t.scale}},opacity:1};return t.barScale&&t.type==wb.QUANTITATIVE&&(i.encoding.x={field:`attributes["${e}"]`,type:t.type,scale:t.barScale,axis:null}),i}function Ej(e){return{name:"metadata-sample-name",title:{text:e.labelTitleText??"Sample name",orient:"bottom",anchor:"start",offset:5,font:e.attributeLabelFont,fontSize:e.attributeLabelFontSize??11,fontStyle:e.attributeLabelFontStyle,fontWeight:e.attributeLabelFontWeight},width:e.labelLength??140,mark:{type:"text",baseline:"middle",font:e.labelFont,size:e.labelFontSize??11,fontStyle:e.labelFontStyle,fontWeight:e.labelFontWeight,align:e.labelAlign??"left",flushY:!1},encoding:{facetIndex:{field:"indexNumber"},x:{value:0},x2:{value:1},y:{value:0},y2:{value:1},text:{field:"displayName"}}}}function Sj(e){return e!==""&&!(typeof e=="number"&&isNaN(e))&&e!==null}const M_=Object.freeze({name:"sample",attribute:{type:F_},accessor:e=>e,type:"identifier",scale:void 0});class _j extends Ka{constructor(n,r){super({title:{text:"Groups",orient:"none"},padding:{right:0},width:{step:22},data:{name:null},transform:[{type:"filter",expr:"datum._depth > 0"},{type:"formula",as:"_y1",expr:"datum._index * 2"},{type:"formula",as:"_y2",expr:"datum._index * 2 + 1"},{type:"formula",as:"_title",expr:"datum.title || datum.name"},{type:"formula",as:"_NA",expr:"datum._title === null"},{type:"formula",as:"_title",expr:"datum._title !== null ? datum._title: 'NA'"}],encoding:{x:{field:"_depth",type:"ordinal",scale:{align:0,padding:.2272727},axis:null},y:{field:"_y1",type:"nominal",scale:{type:"ordinal",domain:mi(500)},axis:null},y2:{field:"_y2"}},layer:[{title:"Group",mark:{type:"rect",clip:!0,color:"#e8e8e8",cornerRadiusBottomLeft:14,cornerRadiusTopLeft:14}},{mark:{type:"text",clip:!0,angle:-90,paddingY:5,tooltip:null},encoding:{text:{field:"_title"},opacity:{field:"_NA",type:"nominal",scale:{type:"ordinal",domain:[!1,!0],range:[1,.3]}}}}]},n.context,n,r,"sample-groups");Z(this,cp);this.sampleView=n,this._addBroadcastHandler("layoutComputed",()=>{this.updateRange()}),this.addInteractionEventListener("contextmenu",(i,a)=>{const o=a.uiEvent,s=this.context.getCurrentHover();if(!s)return;const c=s.datum._rawGroup;let l;for(const d of sb(this.sampleView.sampleHierarchy.rootGroup))if(d.at(-1)===c){l=d.slice(1);break}const u=n.actions.removeGroup({path:l.map(d=>d.name)}),f=n.provenance.getActionInfo(u),h=n.provenance.storeHelper.getDispatcher();vb({items:[{label:f.title,icon:f.icon,callback:()=>h(u)}]},o)})}updateRange(){var o,s;const n=(o=this.sampleView.locationManager.getLocations())==null?void 0:o.groups;if(!(n!=null&&n.length))return;const r=((s=this.sampleView)==null?void 0:s.childCoords.height)??0,i=this.getScaleResolution("y"),a=[];for(const c of n)a.push(1-(c.locSize.location+c.locSize.size)/r),a.push(1-c.locSize.location/r);i.getScale().range(a),this.context.glHelper.createRangeTexture(i,!0)}updateGroups(){var o;const n=((o=this.sampleView.locationManager.getLocations())==null?void 0:o.groups)??[],r=this.context.dataFlow.findDataSourceByKey(this);if(!r)return;const i=J(this,cp,rI).call(this),a=n.map(s=>({_index:s.key.index,_depth:s.key.depth,_rawGroup:s.key.group,attribute:i[s.key.depth],name:s.key.group.name,...s.key.group.name!=s.key.group.title?{title:s.key.group.title}:{},n:s.key.n}));r.updateDynamicData(a),this.getScaleResolution("x").reconfigure(),this.getScaleResolution("y").reconfigure(),n.length&&this.updateRange(),xn([...this.getLayoutAncestors()]).visit(s=>Il(s,"size"))}}cp=new WeakSet,rI=function(){const n=document.createElement("div");return[null,...this.sampleView.sampleHierarchy.groupMetadata].map(r=>{if(!r)return"unknown";const i=this.sampleView.compositeAttributeInfoSource.getAttributeInfo(r.attribute).title;return i?Me(i)?i:(Vt(i,n),n.textContent.replace(/\s+/g," ").trim()):"unknown"})};class Cj{constructor(){this.attributeInfoSourcesByType={}}addAttributeInfoSource(t,n){this.attributeInfoSourcesByType[t]=n}getAttributeInfo(t){const n=this.attributeInfoSourcesByType[t.type];if(!n)throw new Error("Cannot find attribute info source for: "+JSON.stringify(t));const r=n(t);if(r)return r;throw new Error("Unknown attribute: "+JSON.stringify(t))}}function Wd(e,t,n){let r=n&&e(n);return i=>{const a=e(i);a!==r&&(t(a,r),r=a)}}class kj{constructor(t){Z(this,Af);Z(this,Ln,0);Z(this,ua,0);Z(this,$o,0);Z(this,Ac,void 0);Z(this,Ec,void 0);Z(this,ui,void 0);Z(this,Sc,void 0);Z(this,It,void 0);Z(this,xf,void 0);le(this,It,t),le(this,xf,t.viewContext.paramBroker.allocateSetter("sampleHeight"))}isCloseup(){return F(this,Ln)===1}resetLocations(){le(this,ui,void 0)}reset(){le(this,Ln,0),this.resetLocations()}handleWheelEvent(t){le(this,ua,Ai(F(this,ua)+t.deltaY,0,F(this,$o)-F(this,It).getHeight()))}togglePeek(t,n,r){if(F(this,Ln)>0&&F(this,Ln)<1||t!==void 0&&t==!!F(this,Ln))return;const i=F(this,It).viewContext,a=F(this,It).getHeight(),o={requestAnimationFrame:s=>i.animator.requestTransition(s),onUpdate:s=>{le(this,Ln,Math.pow(s,2)),F(this,It).onLocationUpdate(),J(this,Af,av).call(this),i.animator.requestRender()},from:F(this,Ln)};if(F(this,Ln)==0){let s;if(r)s=(l=>l.location+l.size/2)(F(this,Sc).samples.find(l=>l.key==r).locSize);else{const c=this.getSummaryAt(n);c&&(s=F(this,Sc).summaries[c.index].locSize.location-(c.location.locSize.location-n))}s?le(this,ua,s-n):le(this,ua,(F(this,$o)-a)/2),F(this,$o)>a?rd({...o,to:1,duration:500,easingFunction:$N}):rd({...o,from:0,to:1,duration:300,easingFunction:l=>(1-Math.pow(l*2-1,2))*.5})}else rd({...o,to:0,duration:400,easingFunction:NN})}getLocations(){if(F(this,ui))return F(this,ui);const t=F(this,It).getHeight();if(!t)return;const n=F(this,It).getSampleHierarchy(),r=ob(n),i=F(this,It).getSummaryHeight(),a=O_(r,{viewHeight:t,groupSpacing:5,summaryHeight:i}),o=O_(r,{sampleHeight:35,groupSpacing:15,summaryHeight:i}),s=()=>-F(this,ua),c=()=>F(this,Ln);le(this,Sc,o),le(this,$o,o.summaries.map(f=>f.locSize.location+f.locSize.size).reduce((f,h)=>Math.max(f,h),0));const l=(f,h)=>{const d=[];for(let p=0;p<f.length;p++){const g=f[p].key;d.push({key:g,locSize:XL(f[p].locSize,KL(h[p].locSize,s),c)})}return d},u=l(a.groups,o.groups);return le(this,ui,{samples:l(a.samples,o.samples),summaries:l(a.summaries,o.summaries),groups:u}),J(this,Af,av).call(this),F(this,ui)}getGroupBackgroundRects(t){const n=this.getLocations().groups,r=n.map(s=>s.key.depth).reduce((s,c)=>Math.max(s,c),0),i=n.filter(s=>s.key.depth==r),a=F(this,It).getSummaryHeight();t=t.flatten();const o=F(this,It).isStickySummaries()&&a>0?t.shrink(new Ct(a,0,0,0)):t;return[...i.values()].map(s=>{const c=()=>{const l=s.locSize.location;return t.y+l+a};return{coords:t.modify({y:c,height:()=>s.locSize.size-a}).intersect(o),clipRect:o}})}updateFacetTexture(){const t=F(this,It).getSampleHierarchy().sampleData;if(!F(this,Ec)){const a=t&&Object.values(t.entities);le(this,Ec,new Float32Array(Math.ceil(a.length*2/4)*4))}const n=F(this,Ec);n.fill(0);const r=t==null?void 0:t.entities;if(r){const a=this.getLocations().samples,o=F(this,It).getHeight();for(const s of a){const c=r[s.key].indexNumber;n[c*2+0]=s.locSize.location/o,n[c*2+1]=s.locSize.size/o}}const i=F(this,It).viewContext.glHelper.gl;le(this,Ac,Dl(i,{internalFormat:i.RG32F,format:i.RG,height:1},n,F(this,Ac)))}getFacetTexture(){return F(this,Ac)}getSummaryAt(t){const n=this.getLocations().summaries,r=n.findIndex(i=>XA(i.locSize,t));return r>=0?{index:r,location:n[r]}:void 0}clipBySummary(t){if(F(this,It).isStickySummaries()){const n=F(this,It).getSummaryHeight();if(n>0)return t.modify({y:()=>t.y+n,height:()=>t.height-n})}return t}}Ln=new WeakMap,ua=new WeakMap,$o=new WeakMap,Ac=new WeakMap,Ec=new WeakMap,ui=new WeakMap,Sc=new WeakMap,It=new WeakMap,xf=new WeakMap,Af=new WeakSet,av=function(){var t;F(this,xf).call(this,((t=F(this,ui).samples[0])==null?void 0:t.locSize.size)??0)};function O_(e,{viewHeight:t=0,sampleHeight:n=0,groupSpacing:r=5,summaryHeight:i=0}){if(!t&&!n)throw new Error("viewHeight or sampleHeight must be provided!");const a=h=>xn(h),o=e.map(h=>({path:h,sampleGroup:a(h),samples:a(h).samples})).filter(h=>h.samples.length),s=n?h=>({px:h.length*n+i,grow:0}):h=>({px:i,grow:h.length}),c=[];Fl(o.map(h=>s(h.samples)),t,{spacing:r}).forEach((h,d)=>{c.push({key:o[d].path,locSize:h})});const l=[];for(const[h,d]of o.entries()){const p={grow:1},g=d.samples;Fl(g.map(b=>p),Math.max(0,c[h].locSize.size-i),{offset:c[h].locSize.location+i}).forEach((b,y)=>{const{size:w,location:A}=b,x=w*.1*pg(15,22,w);b.location=A+x,b.size=w-2*x,l.push({key:g[y],locSize:b})})}function*u(){const h=[];for(const d of c){const p=d.key,g=xn(p);for(;h.length<=p.length&&h.length&&p[h.length-1]!=h[h.length-1].group;)yield h.pop();for(let b=0;b<h.length;b++){const y=h[b];y.locSize.size=d.locSize.location-y.locSize.location+d.locSize.size}for(let b=h.length;b<p.length;b++)h.push({group:p[b],locSize:{...d.locSize},depth:h.length,n:0});for(const b of h)b.n+=g.samples.length}for(;h.length;)yield h.pop()}const f=[...u()].sort((h,d)=>h.depth-d.depth).map((h,d)=>({key:{index:d,group:h.group,depth:h.depth,n:h.n,attributeLabel:void 0},locSize:h.locSize}));return{samples:l,summaries:c,groups:f}}function Tj(e,t){return t.find(n=>XA(n.locSize,e))}function Ij(e,t){const n=t.specifier,r=e.findDescendantByName(n.view),i=r.getScaleResolution("x");let a;if(td(n.locus)){const f=i.getGenome();if(f)a=f.toContinuous(n.locus.chrom,n.locus.pos);else throw new Error("Encountered a chromosomal locus but no genome is available!")}else a=n.locus;const o=f=>{var h;return(h=r.mark.findDatumAt(f,a))==null?void 0:h[n.field]},[s,c]=Object.entries(r.getEncoding()).find(([f,h])=>"field"in h&&h.field==n.field),l=Ri(s)?r.getScaleResolution(s).getScale():void 0;return{name:n.field,attribute:t,title:$` <em class="attribute">${n.field}</em>
2892
2895
  <span class="viewTitle">(${r.getTitleText()??r.name})</span>
2893
2896
  ${td(n.locus)?$`at
2894
2897
  <span class="locus"
2895
2898
  >${lE(n.locus)}</span
2896
- >`:$`<span class="scalar">of ${a}</span>`}`,accessor:o,type:"type"in c?c.type:void 0,scale:l}}const L_="VALUE_AT_LOCUS";class xb extends Yn{constructor(n,r,i,a,o,s){super(n,r,i,a,o);Z(this,lp);Z(this,up);Z(this,fp);Z(this,Sf);Z(this,hp);Z(this,dp);Z(this,pp);Z(this,ot,void 0);Z(this,Ht,void 0);Z(this,Ef,-1);Z(this,_c,!1);this.provenance=s,this.spec=n,le(this,_c,n.stickySummaries??!0),this.compositeAttributeInfoSource=new _j,this.childCoords=Zn.ZERO,this.sidebarCoords=Zn.ZERO,this.locationManager=new Cj({getSampleHierarchy:()=>this.sampleHierarchy,getHeight:()=>this.childCoords.height,getSummaryHeight:()=>F(this,ot).summaryViews.getSize().height.px,onLocationUpdate:()=>{this.groupPanel.updateGroups()},viewContext:this.context,isStickySummaries:()=>F(this,_c)}),this.provenance.storeHelper.subscribe(Wd(f=>ab(f).rootGroup,f=>{var h;this.locationManager.reset(),(h=this.groupPanel)==null||h.updateGroups(),this.context.requestLayoutReflow(),this.context.animator.requestRender()})),this.provenance.storeHelper.subscribe(Wd(f=>ab(f).sampleData,f=>{const h=f&&Object.values(f.entities);h&&(this.metadataView.setSamples(h),this.groupPanel.updateGroups())})),this.compositeAttributeInfoSource.addAttributeInfoSource(L_,f=>Tj(this,f)),this._addBroadcastHandler("dataLoaded",()=>J(this,up,aI).call(this)),this._addBroadcastHandler("layout",()=>{this.locationManager.resetLocations()}),this.addInteractionEventListener("mousemove",(f,h)=>{le(this,Ef,h.point.y-this.childCoords.y)}),this.addInteractionEventListener("wheel",(f,h)=>{const d=h.uiEvent;this.locationManager.isCloseup()&&!d.ctrlKey&&(this.locationManager.handleWheelEvent(d),this.groupPanel.updateRange(),this.context.animator.requestRender(),h.uiEvent={type:d.type,deltaX:d.deltaX,preventDefault:d.preventDefault.bind(d)})},!0),r.addKeyboardListener("keydown",f=>{f.code=="KeyE"&&!f.repeat&&J(this,Sf,ov).call(this)}),r.addKeyboardListener("keyup",f=>{f.code=="KeyE"&&this.locationManager.togglePeek(!1)});const c=f=>this.compositeAttributeInfoSource.getAttributeInfo(f),l=MV(c);this.provenance.addReducer(l.name,l.reducer),this.provenance.addActionInfoSource(f=>LV(f,c)),this.actions=l.actions;const u=JG(f=>{var h;return(h=f.sampleData)==null?void 0:h.entities},f=>f&&Object.values(f));this.getSamples=()=>u(this.sampleHierarchy),this.spec.samples.data&&J(this,lp,iI).call(this)}async initializeChildren(){le(this,ot,new Dj(this.context.createView(this.spec.spec,this,this,"sample-facets"),this,0,this.spec.view)),le(this,Ht,new ys({title:"Sidebar",resolve:{scale:{default:"independent"},axis:{default:"independent"}},encoding:{y:null,facetIndex:null},hconcat:[],spacing:0},this.context,this,this,"sample-sidebar")),this.groupPanel=new Sj(this,F(this,Ht)),this.metadataView=new P_(this,F(this,Ht)),F(this,Ht).setChildren([this.groupPanel,this.metadataView]),F(this,ot).view instanceof Yn&&await F(this,ot).view.initializeChildren(),F(this,ot).summaryViews instanceof Yn&&await F(this,ot).summaryViews.initializeChildren(),await F(this,ot).createAxes(),await J(this,pp,lI).call(this),await F(this,ot).summaryViews.createAxes(),await this.groupPanel.initializeChildren(),await this.metadataView.initializeChildren(),F(this,ot).view.addInteractionEventListener("contextmenu",J(this,hp,sI).bind(this))}getOverhang(){let n=F(this,Ht).isConfiguredVisible()?F(this,Ht).getSize().width.px+F(this,Ht).getPadding().horizontalTotal:0;return new Ct(0,0,0,n).add(F(this,ot).getOverhang())}getSize(){return this._cache("size/size2",()=>{const n=super.getSize(),r=a=>a.getSize().addPadding(a.getOverhang()).addPadding(a.getPadding()),i=ZL([F(this,Ht),F(this,ot).view].map(a=>r(a).width));return new Gr(i,n.height)})}*[Symbol.iterator](){yield F(this,Ht),yield*F(this,ot).getChildren()}get sampleHierarchy(){return this.provenance.getPresentState()[Cs]}get leafSamples(){return ob(this.sampleHierarchy).map(r=>r.at(-1)).map(r=>r.samples).flat()}getSampleAt(n){const r=kj(n,this.locationManager.getLocations().samples);if(r)return this.sampleHierarchy.sampleData.entities[r.key]}render(n,r,i={}){if(super.render(n,r,i),!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(F(this,ot).getOverhang()),n.pushView(this,r);const a=Fl([F(this,Ht).isConfiguredVisible()?F(this,Ht).getSize().width:{px:0},{grow:1}],r.width),o=s=>r.modify({x:s.location+r.x,width:s.size});this.sidebarCoords=o(a[0]),this.childCoords=o(a[1]),F(this,Ht).render(n,this.sidebarCoords,i),J(this,fp,oI).call(this,n,this.childCoords,i),n.popView(this)}onBeforeRender(){this.locationManager.updateFacetTexture()}getSampleFacetTexture(){return this.locationManager.getFacetTexture()}makePeekMenuItem(){return{...this.locationManager.isCloseup()?{label:"Close closeup",callback:()=>this.locationManager.togglePeek(!1),icon:M$}:{label:"Open closeup",callback:()=>J(this,Sf,ov).call(this),icon:L$},shortcut:"E"}}findSampleForMouseEvent(n,r){return this.getSampleAt(r.point.y-this.childCoords.y)}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0),!n.stopped&&(this.childCoords.containsPoint(n.point.x,n.point.y)&&(F(this,ot).view.propagateInteractionEvent(n),jE(n,this.childCoords,r=>J(this,dp,cI).call(this,this.childCoords,F(this,ot).view,r),this.context.getCurrentHover())),this.sidebarCoords.containsPoint(n.point.x,n.point.y)&&F(this,Ht).propagateInteractionEvent(n),!n.stopped&&this.handleInteractionEvent(void 0,n,!1))}getDefaultResolution(n,r){if(r=="axis")return"independent";switch(n){case"x":case"sample":return"shared";default:return"independent"}}}ot=new WeakMap,Ht=new WeakMap,Ef=new WeakMap,_c=new WeakMap,lp=new WeakSet,iI=function(){if(!this.spec.samples.data)throw new Error("SampleView has no explicit sample metadata specified! Cannot load anything.");const{dataSource:n,collector:r}=Xz(CE(this.spec.samples.data,this),new Ij);r.observers.push(a=>{const o=a.getData();this.provenance.storeHelper.dispatch(this.actions.setSamples({samples:o}))});const i="samples "+this.getPathString();this.context.dataFlow.addDataSource(n,i)},up=new WeakSet,aI=function(){if(this.getSamples())return;const n=this.getScaleResolution("sample");if(n){const r=[...n.getDataDomain()].map((i,a)=>({id:i,displayName:i,indexNumber:a,attributes:[]}));this.provenance.storeHelper.dispatch(this.actions.setSamples({samples:r}))}else throw new Error("No explicit sample data nor sample channels found!")},fp=new WeakSet,oI=function(n,r,i={}){var g,b,y,w;const a=F(this,ot),o=a.groupBackground||Object.values(a.axes).length?this.locationManager.getGroupBackgroundRects(this.childCoords):[];for(const{coords:A,clipRect:x}of o){(g=a.groupBackground)==null||g.render(n,A,i);for(const C of Object.values(a.gridLines))C.render(n,A,{...i,clipRect:x})}const s=1/r.height,c=()=>s,l=this.locationManager.clipBySummary(r),u=this.locationManager.getLocations(),f=u.samples.map(A=>({...i,sampleFacetRenderingOptions:{locSize:JL(A.locSize,c)},facetId:[A.key],clipRect:l}));for(const A of f)(b=a.background)==null||b.render(n,r,A),a.view.render(n,r,A),(y=a.backgroundStroke)==null||y.render(n,r,A);for(const{coords:A}of o)(w=a.groupBackgroundStroke)==null||w.render(n,A,i);for(const[A,x]of Object.entries(a.axes))x.render(n,i1(r,A,x));const h=a.summaryViews,d=h.getOverhang().getHorizontal();i={...i,clipRect:r.expand(d)};const p=h.getSize().height.px;for(const[A,x]of u.summaries.entries()){const C=()=>{const I=x.locSize.location;let D=r.y+I;return F(this,_c)?D+Ai(-I,0,x.locSize.size-p):D},_=r.modify({y:C,height:p}).expand(d);h.render(n,_,{...i,facetId:[A]})}},Sf=new WeakSet,ov=function(){var i;const n=F(this,Ef),r=(i=this.getSampleAt(n))==null?void 0:i.id;this.locationManager.togglePeek(void 0,n,r)},hp=new WeakSet,sI=function(n,r){var g,b;const i=r.uiEvent,a=this.childCoords.normalizePoint(r.point.x,r.point.y).x,o=this.findSampleForMouseEvent(n,r),s=F(this,ot).view,c=s.getScaleResolution("x"),l=c.invertToComplex(a),u=ME(this.getLayoutAncestors().at(-1)),f=(g=s.getAxisResolution("x"))==null?void 0:g.getTitle(),h=nU(s).filter(y=>!["sample","x","x2"].includes(y.channel)).filter(y=>["rect","rule"].includes(y.view.getMarkType())).filter(y=>u.has(y.view.name));let d=[this.makePeekMenuItem(),yb,{label:c.type==="locus"?`Locus: ${lE(l)}`:`${f?f+": ":""}${l}`,type:"header"},yb],p="";for(const[y,w]of h.entries()){const A={view:w.view.name,field:w.field,locus:l},x=this.compositeAttributeInfoSource.getAttributeInfo({type:L_,specifier:A}),C=w.view.getTitleText()??w.view.spec.name;C!=p&&(y>0&&d.push({type:"divider"}),d.push({label:C,type:"header"}),p=C);const _=c.getScale(),I="invert"in _&&o?(b=w.view.mark.findDatumAt(o.id,_.invert(a)))==null?void 0:b[w.field]:void 0;d.push({label:w.field,submenu:cb(null,x,I,this)})}vb({items:d},i)},dp=new WeakSet,cI=function(n,r,i){const a=F(this,ot).view.getScaleResolution("x");if(!a||!a.isZoomable())return;const o=n.normalizePoint(i.x,i.y),s=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta);a.zoom(2**i.zDelta,o.x,s.x-o.x),this.context.animator.requestRender()},pp=new WeakSet,lI=async function(){const n=[];for(const r of F(this,ot).view.getDescendants()){const i=r.spec;if(WU(i))for(const a of i.aggregateSamples){const o=a.transform??[];o.length&&o.at(-1).type!="collect"&&o.push({type:"collect"}),o.push({type:"mergeFacets"}),a.transform=o,a.encoding={...a.encoding??{},sample:null};const s=this.context.createView(a,this,r,"summaryView");s instanceof Yn&&await s.initializeChildren(),s.getFacetFields=c=>{},n.push(s)}}F(this,ot).summaryViews.setChildren(n)};class Ij extends at{constructor(){super(),this.reset()}reset(){this._index=0}handle(t){this._propagate({id:t.sample,displayName:t.displayName||t.sample,indexNumber:this._index++,attributes:Rj(t)})}}function Rj(e){const t=Object.assign({},e);return delete t.sample,delete t.displayName,t}class Dj extends a1{constructor(t,n,r,i){super(t,n,r),this.groupBackground=void 0,this.groupBackgroundStroke=void 0;const a=qE(i);a&&(this.groupBackground=new mt(a,n.context,n,t,"sample-group-background-"+r,{blockEncodingInheritance:!0}));const o=WE(i);o&&(this.groupBackgroundStroke=new mt(o,n.context,n,t,"sample-group-background-stroke-"+r,{blockEncodingInheritance:!0})),this.summaryViews=new ys({configurableVisibility:!1,resolve:{axis:{x:"independent"}},spacing:0,vconcat:[]},n.context,n,n,"sampleSummaries")}*getChildren(){this.groupBackground&&(yield this.groupBackground),this.groupBackgroundStroke&&(yield this.groupBackgroundStroke),yield this.summaryViews,yield*super.getChildren()}}const Bj=(e,t)=>t.some(n=>e instanceof n);let N_,z_;function Fj(){return N_||(N_=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Pj(){return z_||(z_=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const U_=new WeakMap,Ab=new WeakMap,$_=new WeakMap,Eb=new WeakMap,Sb=new WeakMap;function Mj(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{n(qi(e.result)),i()},o=()=>{r(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return t.then(n=>{n instanceof IDBCursor&&U_.set(n,e)}).catch(()=>{}),Sb.set(t,e),t}function Oj(e){if(Ab.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{n(),i()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});Ab.set(e,t)}let _b={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Ab.get(e);if(t==="objectStoreNames")return e.objectStoreNames||$_.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return qi(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Lj(e){_b=e(_b)}function Nj(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(Cb(this),t,...n);return $_.set(r,t.sort?t.sort():[t]),qi(r)}:Pj().includes(e)?function(...t){return e.apply(Cb(this),t),qi(U_.get(this))}:function(...t){return qi(e.apply(Cb(this),t))}}function zj(e){return typeof e=="function"?Nj(e):(e instanceof IDBTransaction&&Oj(e),Bj(e,Fj())?new Proxy(e,_b):e)}function qi(e){if(e instanceof IDBRequest)return Mj(e);if(Eb.has(e))return Eb.get(e);const t=zj(e);return t!==e&&(Eb.set(e,t),Sb.set(t,e)),t}const Cb=e=>Sb.get(e);function Uj(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=qi(o);return r&&o.addEventListener("upgradeneeded",c=>{r(qi(o.result),c.oldVersion,c.newVersion,qi(o.transaction),c)}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),s.then(c=>{a&&c.addEventListener("close",()=>a()),i&&c.addEventListener("versionchange",l=>i(l.oldVersion,l.newVersion,l))}).catch(()=>{}),s}const $j=["get","getKey","getAll","getAllKeys","count"],Hj=["put","add","delete","clear"],kb=new Map;function H_(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(kb.get(t))return kb.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Hj.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||$j.includes(n)))return;const a=async function(o,...s){const c=this.transaction(o,i?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(s.shift())),(await Promise.all([l[n](...s),i&&c.done]))[0]};return kb.set(t,a),a}Lj(e=>({...e,get:(t,n,r)=>H_(t,n)||e.get(t,n,r),has:(t,n)=>!!H_(t,n)||e.has(t,n)}));class G_{isReadonly(){return!0}async put(t,n){this._checkReadonly()}async delete(t){this._checkReadonly()}async getNames(){return[]}async get(t){}_checkReadonly(){if(this.isReadonly())throw new Error("This bookmark")}}const su="bookmarks";class Gj extends G_{constructor(t){super(),this.specId=t,this._db=void 0}async _getDB(){if(!this._db){const t=`GenomeSpy: ${this.specId}`;this._db=Uj(t,1,{upgrade(n,r,i,a){n.createObjectStore(su,{keyPath:"name"})},blocked(){},blocking(){},terminated(){}})}return this._db}isReadonly(){return!1}async put(t,n){const i=(await this._getDB()).transaction(su,"readwrite");try{n?(await i.store.delete(n),await i.store.put(t)):await i.store.put(t),await i.done}catch(a){throw i.abort(),a}}async delete(t){(await this._getDB()).delete(su,t)}async getNames(){return(await this._getDB()).getAllKeys(su)}async get(t){return(await this._getDB()).get(su,t)}}/**
2899
+ >`:$`<span class="scalar">of ${a}</span>`}`,accessor:o,type:"type"in c?c.type:void 0,scale:l}}const L_="VALUE_AT_LOCUS";class xb extends Yn{constructor(n,r,i,a,o,s){super(n,r,i,a,o);Z(this,lp);Z(this,up);Z(this,fp);Z(this,Sf);Z(this,hp);Z(this,dp);Z(this,pp);Z(this,ot,void 0);Z(this,Ht,void 0);Z(this,Ef,-1);Z(this,_c,!1);this.provenance=s,this.spec=n,le(this,_c,n.stickySummaries??!0),this.compositeAttributeInfoSource=new Cj,this.childCoords=Zn.ZERO,this.sidebarCoords=Zn.ZERO,this.locationManager=new kj({getSampleHierarchy:()=>this.sampleHierarchy,getHeight:()=>this.childCoords.height,getSummaryHeight:()=>F(this,ot).summaryViews.getSize().height.px,onLocationUpdate:()=>{this.groupPanel.updateGroups()},viewContext:this.context,isStickySummaries:()=>F(this,_c)}),this.provenance.storeHelper.subscribe(Wd(f=>ab(f).rootGroup,f=>{var h;this.locationManager.reset(),(h=this.groupPanel)==null||h.updateGroups(),this.context.requestLayoutReflow(),this.context.animator.requestRender()})),this.provenance.storeHelper.subscribe(Wd(f=>ab(f).sampleData,f=>{const h=f&&Object.values(f.entities);h&&(this.metadataView.setSamples(h),this.groupPanel.updateGroups())})),this.compositeAttributeInfoSource.addAttributeInfoSource(L_,f=>Ij(this,f)),this._addBroadcastHandler("dataLoaded",()=>J(this,up,aI).call(this)),this._addBroadcastHandler("layout",()=>{this.locationManager.resetLocations()}),this.addInteractionEventListener("mousemove",(f,h)=>{le(this,Ef,h.point.y-this.childCoords.y)}),this.addInteractionEventListener("wheel",(f,h)=>{const d=h.uiEvent;this.locationManager.isCloseup()&&!d.ctrlKey&&(this.locationManager.handleWheelEvent(d),this.groupPanel.updateRange(),this.context.animator.requestRender(),h.uiEvent={type:d.type,deltaX:d.deltaX,preventDefault:d.preventDefault.bind(d)})},!0),r.addKeyboardListener("keydown",f=>{f.code=="KeyE"&&!f.repeat&&J(this,Sf,ov).call(this)}),r.addKeyboardListener("keyup",f=>{f.code=="KeyE"&&this.locationManager.togglePeek(!1)});const c=f=>this.compositeAttributeInfoSource.getAttributeInfo(f),l=OV(c);this.provenance.addReducer(l.name,l.reducer),this.provenance.addActionInfoSource(f=>NV(f,c)),this.actions=l.actions;const u=eV(f=>{var h;return(h=f.sampleData)==null?void 0:h.entities},f=>f&&Object.values(f));this.getSamples=()=>u(this.sampleHierarchy),this.spec.samples.data&&J(this,lp,iI).call(this)}async initializeChildren(){le(this,ot,new Bj(this.context.createView(this.spec.spec,this,this,"sample-facets"),this,0,this.spec.view)),le(this,Ht,new ys({title:"Sidebar",resolve:{scale:{default:"independent"},axis:{default:"independent"}},encoding:{y:null,facetIndex:null},hconcat:[],spacing:0},this.context,this,this,"sample-sidebar")),this.groupPanel=new _j(this,F(this,Ht)),this.metadataView=new P_(this,F(this,Ht)),F(this,Ht).setChildren([this.groupPanel,this.metadataView]),F(this,ot).view instanceof Yn&&await F(this,ot).view.initializeChildren(),F(this,ot).summaryViews instanceof Yn&&await F(this,ot).summaryViews.initializeChildren(),await F(this,ot).createAxes(),await J(this,pp,lI).call(this),await F(this,ot).summaryViews.createAxes(),await this.groupPanel.initializeChildren(),await this.metadataView.initializeChildren(),F(this,ot).view.addInteractionEventListener("contextmenu",J(this,hp,sI).bind(this))}getOverhang(){let n=F(this,Ht).isConfiguredVisible()?F(this,Ht).getSize().width.px+F(this,Ht).getPadding().horizontalTotal:0;return new Ct(0,0,0,n).add(F(this,ot).getOverhang())}getSize(){return this._cache("size/size2",()=>{const n=super.getSize(),r=a=>a.getSize().addPadding(a.getOverhang()).addPadding(a.getPadding()),i=ZL([F(this,Ht),F(this,ot).view].map(a=>r(a).width));return new Gr(i,n.height)})}*[Symbol.iterator](){yield F(this,Ht),yield*F(this,ot).getChildren()}get sampleHierarchy(){return this.provenance.getPresentState()[Cs]}get leafSamples(){return ob(this.sampleHierarchy).map(r=>r.at(-1)).map(r=>r.samples).flat()}getSampleAt(n){const r=Tj(n,this.locationManager.getLocations().samples);if(r)return this.sampleHierarchy.sampleData.entities[r.key]}render(n,r,i={}){if(super.render(n,r,i),!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(F(this,ot).getOverhang()),n.pushView(this,r);const a=Fl([F(this,Ht).isConfiguredVisible()?F(this,Ht).getSize().width:{px:0},{grow:1}],r.width),o=s=>r.modify({x:s.location+r.x,width:s.size});this.sidebarCoords=o(a[0]),this.childCoords=o(a[1]),F(this,Ht).render(n,this.sidebarCoords,i),J(this,fp,oI).call(this,n,this.childCoords,i),n.popView(this)}onBeforeRender(){this.locationManager.updateFacetTexture()}getSampleFacetTexture(){return this.locationManager.getFacetTexture()}makePeekMenuItem(){return{...this.locationManager.isCloseup()?{label:"Close closeup",callback:()=>this.locationManager.togglePeek(!1),icon:O$}:{label:"Open closeup",callback:()=>J(this,Sf,ov).call(this),icon:N$},shortcut:"E"}}findSampleForMouseEvent(n,r){return this.getSampleAt(r.point.y-this.childCoords.y)}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0),!n.stopped&&(this.childCoords.containsPoint(n.point.x,n.point.y)&&(F(this,ot).view.propagateInteractionEvent(n),jE(n,this.childCoords,r=>J(this,dp,cI).call(this,this.childCoords,F(this,ot).view,r),this.context.getCurrentHover())),this.sidebarCoords.containsPoint(n.point.x,n.point.y)&&F(this,Ht).propagateInteractionEvent(n),!n.stopped&&this.handleInteractionEvent(void 0,n,!1))}getDefaultResolution(n,r){if(r=="axis")return"independent";switch(n){case"x":case"sample":return"shared";default:return"independent"}}}ot=new WeakMap,Ht=new WeakMap,Ef=new WeakMap,_c=new WeakMap,lp=new WeakSet,iI=function(){if(!this.spec.samples.data)throw new Error("SampleView has no explicit sample metadata specified! Cannot load anything.");const{dataSource:n,collector:r}=Kz(CE(this.spec.samples.data,this),new Rj);r.observers.push(a=>{const o=a.getData();this.provenance.storeHelper.dispatch(this.actions.setSamples({samples:o}))});const i="samples "+this.getPathString();this.context.dataFlow.addDataSource(n,i)},up=new WeakSet,aI=function(){if(this.getSamples())return;const n=this.getScaleResolution("sample");if(n){const r=[...n.getDataDomain()].map((i,a)=>({id:i,displayName:i,indexNumber:a,attributes:[]}));this.provenance.storeHelper.dispatch(this.actions.setSamples({samples:r}))}else throw new Error("No explicit sample data nor sample channels found!")},fp=new WeakSet,oI=function(n,r,i={}){var g,b,y,w;const a=F(this,ot),o=a.groupBackground||Object.values(a.axes).length?this.locationManager.getGroupBackgroundRects(this.childCoords):[];for(const{coords:A,clipRect:x}of o){(g=a.groupBackground)==null||g.render(n,A,i);for(const C of Object.values(a.gridLines))C.render(n,A,{...i,clipRect:x})}const s=1/r.height,c=()=>s,l=this.locationManager.clipBySummary(r),u=this.locationManager.getLocations(),f=u.samples.map(A=>({...i,sampleFacetRenderingOptions:{locSize:JL(A.locSize,c)},facetId:[A.key],clipRect:l}));for(const A of f)(b=a.background)==null||b.render(n,r,A),a.view.render(n,r,A),(y=a.backgroundStroke)==null||y.render(n,r,A);for(const{coords:A}of o)(w=a.groupBackgroundStroke)==null||w.render(n,A,i);for(const[A,x]of Object.entries(a.axes))x.render(n,i1(r,A,x));const h=a.summaryViews,d=h.getOverhang().getHorizontal();i={...i,clipRect:r.expand(d)};const p=h.getSize().height.px;for(const[A,x]of u.summaries.entries()){const C=()=>{const I=x.locSize.location;let D=r.y+I;return F(this,_c)?D+Ai(-I,0,x.locSize.size-p):D},_=r.modify({y:C,height:p}).expand(d);h.render(n,_,{...i,facetId:[A]})}},Sf=new WeakSet,ov=function(){var i;const n=F(this,Ef),r=(i=this.getSampleAt(n))==null?void 0:i.id;this.locationManager.togglePeek(void 0,n,r)},hp=new WeakSet,sI=function(n,r){var g,b;const i=r.uiEvent,a=this.childCoords.normalizePoint(r.point.x,r.point.y).x,o=this.findSampleForMouseEvent(n,r),s=F(this,ot).view,c=s.getScaleResolution("x"),l=c.invertToComplex(a),u=ME(this.getLayoutAncestors().at(-1)),f=(g=s.getAxisResolution("x"))==null?void 0:g.getTitle(),h=rU(s).filter(y=>!["sample","x","x2"].includes(y.channel)).filter(y=>["rect","rule"].includes(y.view.getMarkType())).filter(y=>u.has(y.view.name));let d=[this.makePeekMenuItem(),yb,{label:c.type==="locus"?`Locus: ${lE(l)}`:`${f?f+": ":""}${l}`,type:"header"},yb],p="";for(const[y,w]of h.entries()){const A={view:w.view.name,field:w.field,locus:l},x=this.compositeAttributeInfoSource.getAttributeInfo({type:L_,specifier:A}),C=w.view.getTitleText()??w.view.spec.name;C!=p&&(y>0&&d.push({type:"divider"}),d.push({label:C,type:"header"}),p=C);const _=c.getScale(),I="invert"in _&&o?(b=w.view.mark.findDatumAt(o.id,_.invert(a)))==null?void 0:b[w.field]:void 0;d.push({label:w.field,submenu:cb(null,x,I,this)})}vb({items:d},i)},dp=new WeakSet,cI=function(n,r,i){const a=F(this,ot).view.getScaleResolution("x");if(!a||!a.isZoomable())return;const o=n.normalizePoint(i.x,i.y),s=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta);a.zoom(2**i.zDelta,o.x,s.x-o.x),this.context.animator.requestRender()},pp=new WeakSet,lI=async function(){const n=[];for(const r of F(this,ot).view.getDescendants()){const i=r.spec;if(YU(i))for(const a of i.aggregateSamples){const o=a.transform??[];o.length&&o.at(-1).type!="collect"&&o.push({type:"collect"}),o.push({type:"mergeFacets"}),a.transform=o,a.encoding={...a.encoding??{},sample:null};const s=this.context.createView(a,this,r,"summaryView");s instanceof Yn&&await s.initializeChildren(),s.getFacetFields=c=>{},n.push(s)}}F(this,ot).summaryViews.setChildren(n)};class Rj extends at{constructor(){super(),this.reset()}reset(){this._index=0}handle(t){this._propagate({id:t.sample,displayName:t.displayName||t.sample,indexNumber:this._index++,attributes:Dj(t)})}}function Dj(e){const t=Object.assign({},e);return delete t.sample,delete t.displayName,t}class Bj extends a1{constructor(t,n,r,i){super(t,n,r),this.groupBackground=void 0,this.groupBackgroundStroke=void 0;const a=qE(i);a&&(this.groupBackground=new mt(a,n.context,n,t,"sample-group-background-"+r,{blockEncodingInheritance:!0}));const o=WE(i);o&&(this.groupBackgroundStroke=new mt(o,n.context,n,t,"sample-group-background-stroke-"+r,{blockEncodingInheritance:!0})),this.summaryViews=new ys({configurableVisibility:!1,resolve:{axis:{x:"independent"}},spacing:0,vconcat:[]},n.context,n,n,"sampleSummaries")}*getChildren(){this.groupBackground&&(yield this.groupBackground),this.groupBackgroundStroke&&(yield this.groupBackgroundStroke),yield this.summaryViews,yield*super.getChildren()}}const Fj=(e,t)=>t.some(n=>e instanceof n);let N_,z_;function Pj(){return N_||(N_=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Mj(){return z_||(z_=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const U_=new WeakMap,Ab=new WeakMap,$_=new WeakMap,Eb=new WeakMap,Sb=new WeakMap;function Oj(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{n(qi(e.result)),i()},o=()=>{r(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return t.then(n=>{n instanceof IDBCursor&&U_.set(n,e)}).catch(()=>{}),Sb.set(t,e),t}function Lj(e){if(Ab.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{n(),i()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});Ab.set(e,t)}let _b={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Ab.get(e);if(t==="objectStoreNames")return e.objectStoreNames||$_.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return qi(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Nj(e){_b=e(_b)}function zj(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(Cb(this),t,...n);return $_.set(r,t.sort?t.sort():[t]),qi(r)}:Mj().includes(e)?function(...t){return e.apply(Cb(this),t),qi(U_.get(this))}:function(...t){return qi(e.apply(Cb(this),t))}}function Uj(e){return typeof e=="function"?zj(e):(e instanceof IDBTransaction&&Lj(e),Fj(e,Pj())?new Proxy(e,_b):e)}function qi(e){if(e instanceof IDBRequest)return Oj(e);if(Eb.has(e))return Eb.get(e);const t=Uj(e);return t!==e&&(Eb.set(e,t),Sb.set(t,e)),t}const Cb=e=>Sb.get(e);function $j(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=qi(o);return r&&o.addEventListener("upgradeneeded",c=>{r(qi(o.result),c.oldVersion,c.newVersion,qi(o.transaction),c)}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),s.then(c=>{a&&c.addEventListener("close",()=>a()),i&&c.addEventListener("versionchange",l=>i(l.oldVersion,l.newVersion,l))}).catch(()=>{}),s}const Hj=["get","getKey","getAll","getAllKeys","count"],Gj=["put","add","delete","clear"],kb=new Map;function H_(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(kb.get(t))return kb.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Gj.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Hj.includes(n)))return;const a=async function(o,...s){const c=this.transaction(o,i?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(s.shift())),(await Promise.all([l[n](...s),i&&c.done]))[0]};return kb.set(t,a),a}Nj(e=>({...e,get:(t,n,r)=>H_(t,n)||e.get(t,n,r),has:(t,n)=>!!H_(t,n)||e.has(t,n)}));class G_{isReadonly(){return!0}async put(t,n){this._checkReadonly()}async delete(t){this._checkReadonly()}async getNames(){return[]}async get(t){}_checkReadonly(){if(this.isReadonly())throw new Error("This bookmark")}}const su="bookmarks";class Vj extends G_{constructor(t){super(),this.specId=t,this._db=void 0}async _getDB(){if(!this._db){const t=`GenomeSpy: ${this.specId}`;this._db=$j(t,1,{upgrade(n,r,i,a){n.createObjectStore(su,{keyPath:"name"})},blocked(){},blocking(){},terminated(){}})}return this._db}isReadonly(){return!1}async put(t,n){const i=(await this._getDB()).transaction(su,"readwrite");try{n?(await i.store.delete(n),await i.store.put(t)):await i.store.put(t),await i.done}catch(a){throw i.abort(),a}}async delete(t){(await this._getDB()).delete(su,t)}async getNames(){return(await this._getDB()).getAllKeys(su)}async get(t){return(await this._getDB()).get(su,t)}}/**
2897
2900
  * @license
2898
2901
  * Copyright 2017 Google LLC
2899
2902
  * SPDX-License-Identifier: BSD-3-Clause
2900
- */const cu=(e,t)=>{var r;const n=e._$AN;if(n===void 0)return!1;for(const i of n)(r=i._$AO)==null||r.call(i,t,!1),cu(i,t);return!0},Yd=e=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while((n==null?void 0:n.size)===0)},V_=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),qj(t)}};function Vj(e){this._$AN!==void 0?(Yd(this),this._$AM=e,V_(this)):this._$AM=e}function jj(e,t=!1,n=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(r))for(let a=n;a<r.length;a++)cu(r[a],!1),Yd(r[a]);else r!=null&&(cu(r,!1),Yd(r));else cu(this,e)}const qj=e=>{e.type==cr.CHILD&&(e._$AP??(e._$AP=jj),e._$AQ??(e._$AQ=Vj))};class j_ extends Zo{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,n,r){super._$AT(t,n,r),V_(this),this.isConnected=t._$AU}_$AO(t,n=!0){var r,i;t!==this.isConnected&&(this.isConnected=t,t?(r=this.reconnected)==null||r.call(this):(i=this.disconnected)==null||i.call(this)),n&&(cu(this,t),Yd(this))}setValue(t){if(cS(this._$Ct))this._$Ct._$AI(t,this);else{const n=[...this._$Ct._$AH];n[this._$Ci]=t,this._$Ct._$AI(n,this,0)}}disconnected(){}reconnected(){}}/**
2903
+ */const cu=(e,t)=>{var r;const n=e._$AN;if(n===void 0)return!1;for(const i of n)(r=i._$AO)==null||r.call(i,t,!1),cu(i,t);return!0},Yd=e=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while((n==null?void 0:n.size)===0)},V_=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),Wj(t)}};function jj(e){this._$AN!==void 0?(Yd(this),this._$AM=e,V_(this)):this._$AM=e}function qj(e,t=!1,n=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(r))for(let a=n;a<r.length;a++)cu(r[a],!1),Yd(r[a]);else r!=null&&(cu(r,!1),Yd(r));else cu(this,e)}const Wj=e=>{e.type==cr.CHILD&&(e._$AP??(e._$AP=qj),e._$AQ??(e._$AQ=jj))};class j_ extends Zo{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,n,r){super._$AT(t,n,r),V_(this),this.isConnected=t._$AU}_$AO(t,n=!0){var r,i;t!==this.isConnected&&(this.isConnected=t,t?(r=this.reconnected)==null||r.call(this):(i=this.disconnected)==null||i.call(this)),n&&(cu(this,t),Yd(this))}setValue(t){if(cS(this._$Ct))this._$Ct._$AI(t,this);else{const n=[...this._$Ct._$AH];n[this._$Ci]=t,this._$Ct._$AI(n,this,0)}}disconnected(){}reconnected(){}}/**
2901
2904
  * @license
2902
2905
  * Copyright 2020 Google LLC
2903
2906
  * SPDX-License-Identifier: BSD-3-Clause
2904
- */const q_=()=>new Wj;let Wj=class{};const Tb=new WeakMap,W_=Da(class extends j_{render(e){return ue}update(e,[t]){var r;const n=t!==this.G;return n&&this.G!==void 0&&this.ot(void 0),(n||this.rt!==this.lt)&&(this.G=t,this.ct=(r=e.options)==null?void 0:r.host,this.ot(this.lt=e.element)),ue}ot(e){if(typeof this.G=="function"){const t=this.ct??globalThis;let n=Tb.get(t);n===void 0&&(n=new WeakMap,Tb.set(t,n)),n.get(this.G)!==void 0&&this.G.call(this.ct,void 0),n.set(this.G,e),e!==void 0&&this.G.call(this.ct,e)}else this.G.value=e}get rt(){var e,t;return typeof this.G=="function"?(e=Tb.get(this.ct??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});/**
2907
+ */const q_=()=>new Yj;let Yj=class{};const Tb=new WeakMap,W_=Da(class extends j_{render(e){return ue}update(e,[t]){var r;const n=t!==this.G;return n&&this.G!==void 0&&this.ot(void 0),(n||this.rt!==this.lt)&&(this.G=t,this.ct=(r=e.options)==null?void 0:r.host,this.ot(this.lt=e.element)),ue}ot(e){if(typeof this.G=="function"){const t=this.ct??globalThis;let n=Tb.get(t);n===void 0&&(n=new WeakMap,Tb.set(t,n)),n.get(this.G)!==void 0&&this.G.call(this.ct,void 0),n.set(this.G,e),e!==void 0&&this.G.call(this.ct,e)}else this.G.value=e}get rt(){var e,t;return typeof this.G=="function"?(e=Tb.get(this.ct??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});/**
2905
2908
  * @license
2906
2909
  * Copyright 2018 Google LLC
2907
2910
  * SPDX-License-Identifier: BSD-3-Clause
2908
- */const Yj={},Zj=Da(class extends Zo{constructor(){super(...arguments),this.nt=Yj}render(e,t){return t()}update(e,[t,n]){if(Array.isArray(t)){if(Array.isArray(this.nt)&&this.nt.length===t.length&&t.every((r,i)=>r===this.nt[i]))return Dt}else if(this.nt===t)return Dt;return this.nt=Array.isArray(t)?Array.from(t):t,this.render(t,n)}});class Qj extends br{constructor(){super(),this.inputRef=q_(),this.app=void 0,this.getDefaultValue=()=>"",this._keyListener=this._onKeyDown.bind(this),this._documentClickListener=t=>{var n;t.target!==this._inputField&&((n=this._inputField)==null||n.blur())},this._focused=!1}get genomeSpy(){return this.app.genomeSpy}get _inputField(){return this.inputRef.value}static get properties(){return{app:{type:Object}}}connectedCallback(){super.connectedCallback(),this._initializeGenome(),document.addEventListener("keydown",this._keyListener),document.addEventListener("click",this._documentClickListener)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._keyListener),document.removeEventListener("click",this._documentClickListener)}createRenderRoot(){return this}_onKeyDown(t){switch(t.code){case"KeyF":t.metaKey||t.altKey||t.ctrlKey||(t.preventDefault(),this.inputRef.value.focus());break}}_initializeGenome(){const t=Y_(this.genomeSpy.viewRoot);t&&(this._genomeResolution=t,this._genome=this.genomeSpy.genomeStore.getGenome(),this.getDefaultValue=()=>this._genome.formatInterval(t.getDomain()),t.addEventListener("domain",bs(()=>this.requestUpdate(),60,!1)))}async searchViews(t){var r;const n=new Intl.Collator("en",{usage:"search",sensitivity:"base"});for(const i of this.genomeSpy.getSearchableViews()){const a=i.getAccessor("search"),o=i.getAccessor("x"),s=i.getAccessor("x2"),c=i.getScaleResolution("x");if(!(!o||!s||!(c!=null&&c.isZoomable()))){for(const l of((r=i.getCollector())==null?void 0:r.getData())??[])if(n.compare(a(l),t)===0){const u=xp([o(l),s(l)],null,1.2);return await c.zoomTo(u),!0}}}return!1}async search(t){await(async()=>{if(this._genomeResolution&&this._genome){const r=this._genome.parseInterval(t);if(r){this._genomeResolution.zoomTo(r);return}if(await this.searchViews(t))return;this.genomeSpy.viewRoot.visit(i=>{i instanceof P_&&i.handleVerboseCommand(t)})}})(),this._inputField.value=this.getDefaultValue(),this.requestUpdate()}_onSearchHelpClicked(t){const n=t.target;n.tagName=="LI"&&this._doExampleSearch(n.innerText)}_onSearchFocused(t){const n=t.target;switch(t.type){case"focus":this._focused=!0,n.select();break;case"blur":this._focused=!1;break}}_onSearchKeyDown(t){const n=t.target;t.code=="Enter"?(t.preventDefault(),this.search(n.value).then(()=>{n.focus(),n.select()}).catch(r=>{console.log(r),alert(r)})):t.code=="Escape"?n.blur():t.stopPropagation()}_doExampleSearch(t){Xj(t,this._inputField).then(()=>{this._inputField.blur(),this.search(t)})}_getSearchHelp(){var r,i;const t=[];t.push($`
2911
+ */const Zj={},Qj=Da(class extends Zo{constructor(){super(...arguments),this.nt=Zj}render(e,t){return t()}update(e,[t,n]){if(Array.isArray(t)){if(Array.isArray(this.nt)&&this.nt.length===t.length&&t.every((r,i)=>r===this.nt[i]))return Dt}else if(this.nt===t)return Dt;return this.nt=Array.isArray(t)?Array.from(t):t,this.render(t,n)}});class Xj extends br{constructor(){super(),this.inputRef=q_(),this.app=void 0,this.getDefaultValue=()=>"",this._keyListener=this._onKeyDown.bind(this),this._documentClickListener=t=>{var n;t.target!==this._inputField&&((n=this._inputField)==null||n.blur())},this._focused=!1}get genomeSpy(){return this.app.genomeSpy}get _inputField(){return this.inputRef.value}static get properties(){return{app:{type:Object}}}connectedCallback(){super.connectedCallback(),this._initializeGenome(),document.addEventListener("keydown",this._keyListener),document.addEventListener("click",this._documentClickListener)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._keyListener),document.removeEventListener("click",this._documentClickListener)}createRenderRoot(){return this}_onKeyDown(t){switch(t.code){case"KeyF":t.metaKey||t.altKey||t.ctrlKey||(t.preventDefault(),this.inputRef.value.focus());break}}_initializeGenome(){const t=Y_(this.genomeSpy.viewRoot);t&&(this._genomeResolution=t,this._genome=this.genomeSpy.genomeStore.getGenome(),this.getDefaultValue=()=>this._genome.formatInterval(t.getDomain()),t.addEventListener("domain",bs(()=>this.requestUpdate(),60,!1)))}async searchViews(t){var r;const n=new Intl.Collator("en",{usage:"search",sensitivity:"base"});for(const i of this.genomeSpy.getSearchableViews()){const a=i.getAccessor("search"),o=i.getAccessor("x"),s=i.getAccessor("x2"),c=i.getScaleResolution("x");if(!(!o||!s||!(c!=null&&c.isZoomable()))){for(const l of((r=i.getCollector())==null?void 0:r.getData())??[])if(n.compare(a(l),t)===0){const u=xp([o(l),s(l)],null,1.2);return await c.zoomTo(u),!0}}}return!1}async search(t){await(async()=>{if(this._genomeResolution&&this._genome){const r=this._genome.parseInterval(t);if(r){this._genomeResolution.zoomTo(r);return}if(await this.searchViews(t))return;this.genomeSpy.viewRoot.visit(i=>{i instanceof P_&&i.handleVerboseCommand(t)})}})(),this._inputField.value=this.getDefaultValue(),this.requestUpdate()}_onSearchHelpClicked(t){const n=t.target;n.tagName=="LI"&&this._doExampleSearch(n.innerText)}_onSearchFocused(t){const n=t.target;switch(t.type){case"focus":this._focused=!0,n.select();break;case"blur":this._focused=!1;break}}_onSearchKeyDown(t){const n=t.target;t.code=="Enter"?(t.preventDefault(),this.search(n.value).then(()=>{n.focus(),n.select()}).catch(r=>{console.log(r),alert(r)})):t.code=="Escape"?n.blur():t.stopPropagation()}_doExampleSearch(t){Kj(t,this._inputField).then(()=>{this._inputField.blur(),this.search(t)})}_getSearchHelp(){var r,i;const t=[];t.push($`
2909
2912
  <p>Focus to a specific range. Examples:</p>
2910
2913
  <ul>
2911
2914
  <!-- TODO: Display only when using a genomic coordinate system-->
@@ -2940,13 +2943,13 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2940
2943
  @blur=${this._onSearchFocused}
2941
2944
  ${W_(this.inputRef)}
2942
2945
  />
2943
- ${Zj([123],()=>this._getSearchHelp())}
2946
+ ${Qj([123],()=>this._getSearchHelp())}
2944
2947
  </div>
2945
- `}}customElements.define("genome-spy-search-field",Qj);function Xj(e,t){return new Promise(n=>{let r=0;const i=700/e.length+30;function a(){t.value=e.substring(0,r),r>=e.length?setTimeout(n,500):(r++,setTimeout(a,Math.random()*i*2))}a()})}function Y_(e){let t;return e.visit(n=>{for(const r of["x","y"]){const i=n.resolutions.scale[r];if(i&&i.type=="locus"&&i.isZoomable())return t=i,Qa}}),t}const Z_="data:image/svg+xml,%3csvg%20viewBox='0%200%2032%2032'%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20clip-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='1.5'%3e%3cpath%20d='M4.7%2021.2s.4%202.3%201.3%203.6C7%2026%209.8%2028%209.8%2028s3.4-2.6%206.4-8.5c0%200%201%20.1%201.9-.4.9-.6.8-.4%201-1.2%200%200%202.9.5%206.6%200%202.1-.3%204.3-1%206.2-2.5%200%200-1.1-1.7-2.5-5.1-.5-1.3-2-1.8-4.6-4.6l-8.2%208.6-11.9%206.9z'%20fill-opacity='.1'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='%237fbbdd'/%3e%3cpath%20d='M12.4%2015.5c-.7-.5-2.4-.8-4.4-.4-2%20.4-4%201.3-4.8%201.8-.5.3-1.2%201-1.2%201.4%200%20.7.3%201.8.8%202.4.3.3.7.5%201.4.6.8%200%202.5-1.4%203.5-2%201-.6%201.6-.8%202.7-1.2l-2.9%202.4c-1.3%201.2-2.2%201.5-2.4%202.3%200%20.5%200%201.4.5%201.8.4.5.6.8%201.6.8.6%200%201%200%202.6-1.5.9-.9%202.3-3%202.7-3.7.6-1.1%201-2.2.7-3-.2-1-.4-1.4-.8-1.7zM17.4%2014.2c-.3-.5-.9-1.2-.2-2.5l1.9-3c.5-.8%202-2.3%202.6-2.6.6-.4%201.5-.6%202-.2.6.4%201%201%201.3%201.5.4.6.7%201.3.2%202-.7%201-1.6.9-2.8%201.7-1.2.8-1.9%201.2-2.5%201.9l3.8-1.8c1.3-.6%202.7-1.1%203.4-.7.8.5.8.7%201%201.4.3%201-.2%201.9-.8%202.4-.5.6-1.5.9-2.6%201.2-1.4.4-4.5%201-5.8.5-1.3-.5-1.3-1.4-1.5-1.8z'%20fill='%23fff'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='%237fbbdd'/%3e%3cpath%20d='M13.8%2015.3c.9.8.6%202%201.4%201.8%201-.2%201.4-.8%201.3-1.5%200-.7%200-.8-.4-1.6-.3-.7-1-1.1-2-.5-.7.5-1.4%201.3-1.4%201.3s.2-.3%201.1.5z'%20fill='%23fff'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3c/svg%3e",Q_={name:"@genome-spy/app",description:"GenomeSpy-based visualization tool for multiple patient samples",author:{name:"Kari Lavikka",email:"kari.lavikka@helsinki.fi"},contributors:[],license:"MIT",version:"0.43.2",main:"dist/index.js",type:"module",files:["dist/"],repository:{type:"git",url:"github:genome-spy/genome-spy",directory:"packages/app"},scripts:{dev:"node dev-server.mjs",build:"vite build","test:tsc":"tsc -p tsconfig.json --noEmit",prepublishOnly:"npm run build"},dependencies:{"@floating-ui/dom":"^0.5.0","@fortawesome/fontawesome-free":"^6.4.2","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@genome-spy/core":"^0.43.2","@reduxjs/toolkit":"^1.8.4",idb:"^7.1.1",lit:"^3.1.0","lz-string":"^1.4.4",mapsort:"^1.0.5","redux-batched-actions":"^0.5.0","redux-undo":"^1.0.1",snarkdown:"^2.0.0"},gitHead:"12ff70326672ed7ca34ef081c01fc25f19cf1ede"};/**
2948
+ `}}customElements.define("genome-spy-search-field",Xj);function Kj(e,t){return new Promise(n=>{let r=0;const i=700/e.length+30;function a(){t.value=e.substring(0,r),r>=e.length?setTimeout(n,500):(r++,setTimeout(a,Math.random()*i*2))}a()})}function Y_(e){let t;return e.visit(n=>{for(const r of["x","y"]){const i=n.resolutions.scale[r];if(i&&i.type=="locus"&&i.isZoomable())return t=i,Qa}}),t}const Z_="data:image/svg+xml,%3csvg%20viewBox='0%200%2032%2032'%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20clip-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='1.5'%3e%3cpath%20d='M4.7%2021.2s.4%202.3%201.3%203.6C7%2026%209.8%2028%209.8%2028s3.4-2.6%206.4-8.5c0%200%201%20.1%201.9-.4.9-.6.8-.4%201-1.2%200%200%202.9.5%206.6%200%202.1-.3%204.3-1%206.2-2.5%200%200-1.1-1.7-2.5-5.1-.5-1.3-2-1.8-4.6-4.6l-8.2%208.6-11.9%206.9z'%20fill-opacity='.1'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='%237fbbdd'/%3e%3cpath%20d='M12.4%2015.5c-.7-.5-2.4-.8-4.4-.4-2%20.4-4%201.3-4.8%201.8-.5.3-1.2%201-1.2%201.4%200%20.7.3%201.8.8%202.4.3.3.7.5%201.4.6.8%200%202.5-1.4%203.5-2%201-.6%201.6-.8%202.7-1.2l-2.9%202.4c-1.3%201.2-2.2%201.5-2.4%202.3%200%20.5%200%201.4.5%201.8.4.5.6.8%201.6.8.6%200%201%200%202.6-1.5.9-.9%202.3-3%202.7-3.7.6-1.1%201-2.2.7-3-.2-1-.4-1.4-.8-1.7zM17.4%2014.2c-.3-.5-.9-1.2-.2-2.5l1.9-3c.5-.8%202-2.3%202.6-2.6.6-.4%201.5-.6%202-.2.6.4%201%201%201.3%201.5.4.6.7%201.3.2%202-.7%201-1.6.9-2.8%201.7-1.2.8-1.9%201.2-2.5%201.9l3.8-1.8c1.3-.6%202.7-1.1%203.4-.7.8.5.8.7%201%201.4.3%201-.2%201.9-.8%202.4-.5.6-1.5.9-2.6%201.2-1.4.4-4.5%201-5.8.5-1.3-.5-1.3-1.4-1.5-1.8z'%20fill='%23fff'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='%237fbbdd'/%3e%3cpath%20d='M13.8%2015.3c.9.8.6%202%201.4%201.8%201-.2%201.4-.8%201.3-1.5%200-.7%200-.8-.4-1.6-.3-.7-1-1.1-2-.5-.7.5-1.4%201.3-1.4%201.3s.2-.3%201.1.5z'%20fill='%23fff'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3c/svg%3e",Q_={name:"@genome-spy/app",description:"GenomeSpy-based visualization tool for multiple patient samples",author:{name:"Kari Lavikka",email:"kari.lavikka@helsinki.fi"},contributors:[],license:"MIT",version:"0.43.3",main:"dist/index.js",type:"module",files:["dist/"],repository:{type:"git",url:"github:genome-spy/genome-spy",directory:"packages/app"},scripts:{dev:"node dev-server.mjs",build:"vite build","test:tsc":"tsc -p tsconfig.json --noEmit",prepublishOnly:"npm run build"},dependencies:{"@floating-ui/dom":"^0.5.0","@fortawesome/fontawesome-free":"^6.4.2","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@genome-spy/core":"^0.43.3","@reduxjs/toolkit":"^1.8.4",idb:"^7.1.1",lit:"^3.1.0","lz-string":"^1.4.4",mapsort:"^1.0.5","redux-batched-actions":"^0.5.0","redux-undo":"^1.0.1",snarkdown:"^2.0.0"},gitHead:"0c6e0418a7461b40da98896bfaf5e05732384e85"};/**
2946
2949
  * @license
2947
2950
  * Copyright 2020 Google LLC
2948
2951
  * SPDX-License-Identifier: BSD-3-Clause
2949
- */const Kj=Da(class extends Zo{constructor(e){if(super(e),e.type!==cr.PROPERTY&&e.type!==cr.ATTRIBUTE&&e.type!==cr.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!cS(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===Dt||t===ue)return t;const n=e.element,r=e.name;if(e.type===cr.PROPERTY){if(t===n[r])return Dt}else if(e.type===cr.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(r))return Dt}else if(e.type===cr.ATTRIBUTE&&n.getAttribute(r)===t+"")return Dt;return uS(e),t}});function X_(e,t){return new CustomEvent("query-dependency",{detail:{name:e,setter:t},bubbles:!0})}function Jj(e){if(!(e!=null&&e.length))throw new Error("Can't nest an empty array!");const t=K_(null);for(const n of e){if(!(n!=null&&n.length))throw new Error("Cannot nest, element has no path!");let r=t;for(const i of n){let a=r.children.find(o=>o.item===i);a||(a=K_(i),r.children.push(a)),r=a}}return t.children[0]}const K_=e=>({item:e,children:[]}),Ib=new Set;function Rb(e){const n=e.currentTarget.parentNode,r=!n.classList.contains("show");for(const i of Ib)i.classList.remove("show"),document.body.classList.remove(Ba);return Ib.clear(),e.stopPropagation(),r?(Ib.add(n),n.classList.add("show"),document.body.classList.add(Ba),window.addEventListener("click",i=>{n.classList.contains("show")&&(n.classList.remove("show"),document.body.classList.remove(Ba),i.preventDefault())},{once:!0})):window.dispatchEvent(new MouseEvent("click")),r}const Db={visibilities:{}},Ts=$S({name:"viewSettings",initialState:Db,reducers:{setVisibility:(e,t)=>{e.visibilities[t.payload.name]=t.payload.visibility},restoreDefaultVisibility:(e,t)=>{delete e.visibilities[t.payload]},restoreDefaultVisibilities:(e,t)=>Db,setViewSettings:(e,t)=>({...Db,...t.payload?t.payload:{}})}});class eq extends br{constructor(){super(),this.app=void 0,this.nestedPaths=void 0,this.sateWatcher=Wd(t=>t.viewSettings,(t,n)=>this.requestUpdate()),this.style.display="none"}connectedCallback(){super.connectedCallback(),this.dispatchEvent(X_("app",t=>{this.app=t})),this.app.addInitializationListener(()=>{this.updateToggles(),this.requestUpdate(),this.style.display=this.nestedPaths.children.length?"block":"none"}),this.app.storeHelper.subscribe(this.sateWatcher)}disconnectedCallback(){this.app.storeHelper.unsubscribe(this.sateWatcher)}createRenderRoot(){return this}toolButtonClicked(t){Rb(t)}handleCheckboxClick(t,n){const r=t.target.checked;this.app.storeHelper.dispatch(r!=n.isVisibleInSpec()?Ts.actions.setVisibility({name:n.name,visibility:r}):Ts.actions.restoreDefaultVisibility(n.name)),this.requestUpdate(),t.stopPropagation()}handleResetClick(){this.app.storeHelper.dispatch(Ts.actions.restoreDefaultVisibilities())}updateToggles(){const t=this.app.genomeSpy.viewRoot;if(!t)return;const n=[];for(const i of IE(t.getDescendants(),a=>a.dataParent))DE(i,{preOrder:a=>{const o=a.ref;if(o instanceof n1)return"skip";n.push(o)}});const r=n.filter(i=>iU(i.name)&&J_(i)).map(i=>[...i.getDataAncestors()].reverse());this.nestedPaths=Jj(r)}renderToggles(){const t=this.getVisibilities(),n=this.app.genomeSpy.viewRoot,r=ME(n);var i=(o,s=!0)=>o.length?$`
2952
+ */const Jj=Da(class extends Zo{constructor(e){if(super(e),e.type!==cr.PROPERTY&&e.type!==cr.ATTRIBUTE&&e.type!==cr.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!cS(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===Dt||t===ue)return t;const n=e.element,r=e.name;if(e.type===cr.PROPERTY){if(t===n[r])return Dt}else if(e.type===cr.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(r))return Dt}else if(e.type===cr.ATTRIBUTE&&n.getAttribute(r)===t+"")return Dt;return uS(e),t}});function X_(e,t){return new CustomEvent("query-dependency",{detail:{name:e,setter:t},bubbles:!0})}function eq(e){if(!(e!=null&&e.length))throw new Error("Can't nest an empty array!");const t=K_(null);for(const n of e){if(!(n!=null&&n.length))throw new Error("Cannot nest, element has no path!");let r=t;for(const i of n){let a=r.children.find(o=>o.item===i);a||(a=K_(i),r.children.push(a)),r=a}}return t.children[0]}const K_=e=>({item:e,children:[]}),Ib=new Set;function Rb(e){const n=e.currentTarget.parentNode,r=!n.classList.contains("show");for(const i of Ib)i.classList.remove("show"),document.body.classList.remove(Ba);return Ib.clear(),e.stopPropagation(),r?(Ib.add(n),n.classList.add("show"),document.body.classList.add(Ba),window.addEventListener("click",i=>{n.classList.contains("show")&&(n.classList.remove("show"),document.body.classList.remove(Ba),i.preventDefault())},{once:!0})):window.dispatchEvent(new MouseEvent("click")),r}const Db={visibilities:{}},Ts=$S({name:"viewSettings",initialState:Db,reducers:{setVisibility:(e,t)=>{e.visibilities[t.payload.name]=t.payload.visibility},restoreDefaultVisibility:(e,t)=>{delete e.visibilities[t.payload]},restoreDefaultVisibilities:(e,t)=>Db,setViewSettings:(e,t)=>({...Db,...t.payload?t.payload:{}})}});class tq extends br{constructor(){super(),this.app=void 0,this.nestedPaths=void 0,this.sateWatcher=Wd(t=>t.viewSettings,(t,n)=>this.requestUpdate()),this.style.display="none"}connectedCallback(){super.connectedCallback(),this.dispatchEvent(X_("app",t=>{this.app=t})),this.app.addInitializationListener(()=>{this.updateToggles(),this.requestUpdate(),this.style.display=this.nestedPaths.children.length?"block":"none"}),this.app.storeHelper.subscribe(this.sateWatcher)}disconnectedCallback(){this.app.storeHelper.unsubscribe(this.sateWatcher)}createRenderRoot(){return this}toolButtonClicked(t){Rb(t)}handleCheckboxClick(t,n){const r=t.target.checked;this.app.storeHelper.dispatch(r!=n.isVisibleInSpec()?Ts.actions.setVisibility({name:n.name,visibility:r}):Ts.actions.restoreDefaultVisibility(n.name)),this.requestUpdate(),t.stopPropagation()}handleResetClick(){this.app.storeHelper.dispatch(Ts.actions.restoreDefaultVisibilities())}updateToggles(){const t=this.app.genomeSpy.viewRoot;if(!t)return;const n=[];for(const i of IE(t.getDescendants(),a=>a.dataParent))DE(i,{preOrder:a=>{const o=a.ref;if(o instanceof n1)return"skip";n.push(o)}});const r=n.filter(i=>aU(i.name)&&J_(i)).map(i=>[...i.getDataAncestors()].reverse());this.nestedPaths=eq(r)}renderToggles(){const t=this.getVisibilities(),n=this.app.genomeSpy.viewRoot,r=ME(n);var i=(o,s=!0)=>o.length?$`
2950
2953
  <ul class=${s?null:"unchecked"}>
2951
2954
  ${o.map(a)}
2952
2955
  </ul>
@@ -2955,7 +2958,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2955
2958
  ><input
2956
2959
  type="checkbox"
2957
2960
  ?disabled=${!r.has(s.name)||!J_(s)}
2958
- .checked=${Kj(c)}
2961
+ .checked=${Jj(c)}
2959
2962
  @change=${l=>this.handleCheckboxClick(l,s)}
2960
2963
  />${s.getTitleText()??s.name}
2961
2964
  </label>
@@ -2967,7 +2970,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2967
2970
  title="Toggle view visibilities"
2968
2971
  @click=${this.toolButtonClicked.bind(this)}
2969
2972
  >
2970
- ${Ue(T$).node[0]}
2973
+ ${Ue(I$).node[0]}
2971
2974
  </button>
2972
2975
  <ul
2973
2976
  class="gs-dropdown-menu"
@@ -2989,7 +2992,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2989
2992
  </li>
2990
2993
  </ul>
2991
2994
  </div>
2992
- `}getVisibilities(){return this.app.storeHelper.state.viewSettings.visibilities}}const J_=e=>e.spec.configurableVisibility??!(e.layoutParent&&e.layoutParent instanceof Ka);customElements.define("genome-spy-view-visibility",eq);class tq extends br{constructor(){super(),this.provenance=void 0}connectedCallback(){super.connectedCallback(),this.provenance.storeHelper.subscribe(()=>{this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback()}createRenderRoot(){return this}render(){const t=(r,i)=>{if(!r)return ue;const a=this.provenance.getActionInfo(r);return a?$`
2995
+ `}getVisibilities(){return this.app.storeHelper.state.viewSettings.visibilities}}const J_=e=>e.spec.configurableVisibility??!(e.layoutParent&&e.layoutParent instanceof Ka);customElements.define("genome-spy-view-visibility",tq);class nq extends br{constructor(){super(),this.provenance=void 0}connectedCallback(){super.connectedCallback(),this.provenance.storeHelper.subscribe(()=>{this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback()}createRenderRoot(){return this}render(){const t=(r,i)=>{if(!r)return ue;const a=this.provenance.getActionInfo(r);return a?$`
2993
2996
  <li>
2994
2997
  <a
2995
2998
  @click=${()=>this.provenance.activateState(i)}
@@ -3007,7 +3010,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3007
3010
  ?disabled=${this.provenance.isEmpty()}
3008
3011
  @click=${Rb}
3009
3012
  >
3010
- ${Ue(B$).node[0]}
3013
+ ${Ue(F$).node[0]}
3011
3014
  </button>
3012
3015
  <ol class="gs-dropdown-menu provenance-menu">
3013
3016
  ${this.provenance.getFullActionHistory().map(t)}
@@ -3024,7 +3027,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3024
3027
  ?disabled=${!this.provenance.isUndoable()}
3025
3028
  @click=${()=>this.provenance.undo()}
3026
3029
  >
3027
- ${Ue(S$).node[0]}
3030
+ ${Ue(_$).node[0]}
3028
3031
  </button>
3029
3032
  ${n()}
3030
3033
  <button
@@ -3033,19 +3036,19 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3033
3036
  ?disabled=${!this.provenance.isRedoable()}
3034
3037
  @click=${()=>this.provenance.redo()}
3035
3038
  >
3036
- ${Ue(x$).node[0]}
3039
+ ${Ue(A$).node[0]}
3037
3040
  </button>
3038
3041
  </div>
3039
- `}}customElements.define("genome-spy-provenance-buttons",tq);/**
3042
+ `}}customElements.define("genome-spy-provenance-buttons",nq);/**
3040
3043
  * @license
3041
3044
  * Copyright 2021 Google LLC
3042
3045
  * SPDX-License-Identifier: BSD-3-Clause
3043
- */class nq{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}let rq=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??(this.Y=new Promise(t=>this.Z=t))}resume(){var t;(t=this.Z)==null||t.call(this),this.Y=this.Z=void 0}};/**
3046
+ */class rq{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}let iq=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??(this.Y=new Promise(t=>this.Z=t))}resume(){var t;(t=this.Z)==null||t.call(this),this.Y=this.Z=void 0}};/**
3044
3047
  * @license
3045
3048
  * Copyright 2017 Google LLC
3046
3049
  * SPDX-License-Identifier: BSD-3-Clause
3047
- */const e6=e=>!yG(e)&&typeof e.then=="function",t6=1073741823,iq=Da(class extends j_{constructor(){super(...arguments),this._$C_t=t6,this._$Cwt=[],this._$Cq=new nq(this),this._$CK=new rq}render(...t){return t.find(n=>!e6(n))??Dt}update(t,n){const r=this._$Cwt;let i=r.length;this._$Cwt=n;const a=this._$Cq,o=this._$CK;this.isConnected||this.disconnected();for(let s=0;s<n.length&&!(s>this._$C_t);s++){const c=n[s];if(!e6(c))return this._$C_t=s,c;s<i&&c===r[s]||(this._$C_t=t6,i=0,Promise.resolve(c).then(async l=>{for(;o.get();)await o.get();const u=a.deref();if(u!==void 0){const f=u._$Cwt.indexOf(c);f>-1&&f<u._$C_t&&(u._$C_t=f,u.setValue(l))}}))}return Dt}disconnected(){this._$Cq.disconnect(),this._$CK.pause()}reconnected(){this._$Cq.reconnect(this),this._$CK.resume()}});var aq={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function n6(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function lu(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Bb(e,t){var n,r,i,a,o,s=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,c=[],l="",u=t||{},f=0;function h(p){var g=aq[p[1]||""],b=c[c.length-1]==p;return g?g[1]?(b?c.pop():c.push(p),g[0|b]):g[0]:p}function d(){for(var p="";c.length;)p+=h(c[c.length-1]);return p}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(p,g,b){return u[g.toLowerCase()]=b,""}).replace(/^\n+|\n+$/g,"");i=s.exec(e);)r=e.substring(f,i.index),f=s.lastIndex,n=i[0],r.match(/[^\\](\\\\)*\\$/)||((o=i[3]||i[4])?n='<pre class="code '+(i[4]?"poetry":i[2].toLowerCase())+'"><code'+(i[2]?' class="language-'+i[2].toLowerCase()+'"':"")+">"+n6(lu(o).replace(/^\n+|\n+$/g,""))+"</code></pre>":(o=i[6])?(o.match(/\./)&&(i[5]=i[5].replace(/^\d+/gm,"")),a=Bb(n6(i[5].replace(/^\s*[>*+.-]/gm,""))),o==">"?o="blockquote":(o=o.match(/\./)?"ol":"ul",a=a.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),n="<"+o+">"+a+"</"+o+">"):i[8]?n='<img src="'+lu(i[8])+'" alt="'+lu(i[7])+'">':i[10]?(l=l.replace("<a>",'<a href="'+lu(i[11]||u[r.toLowerCase()])+'">'),n=d()+"</a>"):i[9]?n="<a>":i[12]||i[14]?n="<"+(o="h"+(i[14]?i[14].length:i[13]>"="?1:2))+">"+Bb(i[12]||i[15],u)+"</"+o+">":i[16]?n="<code>"+lu(i[16])+"</code>":(i[17]||i[1])&&(n=h(i[17]||"--"))),l+=r,l+=n;return(l+e.substring(f)+d()).replace(/^\n+|\n+$/g,"")}function oq(e,t={}){const n=Bb(e),r=new DOMParser().parseFromString(`<!DOCTYPE html><html><body><div>${n}</div></body></html>`,"text/html");r.normalize(),r6(r.body);for(const a of r.querySelectorAll("a[href]"))a.setAttribute("target","blank"),a.setAttribute("rel","noopener noreferrer"),a.setAttribute("href",Xa(a.getAttribute("href"),t.baseUrl));for(const a of r.querySelectorAll("img[src]"))a.setAttribute("src",Xa(a.getAttribute("src"),t.baseUrl));const i=r.body.removeChild(r.querySelector("body > div"));return i.className="snarkdown",i}function r6(e){if(e.nodeType!==3){if(e.nodeType!==1||/^(script|iframe|object|embed|svg)$/i.test(e.tagName))return e.remove();for(let t=e.attributes.length;t--;){const n=e.attributes[t].name;/^(class|id|name|href|src|alt|align|valign|(on[a-z]+))$/i.test(n)||e.attributes.removeNamedItem(n)}for(let t=e.childNodes.length;t--;)r6(e.childNodes[t])}}function sq(e){e.stopPropagation(),e.preventDefault();const n=e.target.parentElement,r=n.parentElement,a=r.parentElement.querySelector(".panes"),o=[...r.children].findIndex(s=>s==n);for(const s of r.children)s.classList.remove("active-tab");for(const s of a.children)s.classList.remove("active-tab");r.children.item(o).classList.add("active-tab"),a.children.item(o).classList.add("active-tab")}var Zd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cq(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Fb={exports:{}};Fb.exports,function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",a={};function o(c,l){if(!a[c]){a[c]={};for(var u=0;u<c.length;u++)a[c][c.charAt(u)]=u}return a[c][l]}var s={compressToBase64:function(c){if(c==null)return"";var l=s._compress(c,6,function(u){return r.charAt(u)});switch(l.length%4){default:case 0:return l;case 1:return l+"===";case 2:return l+"==";case 3:return l+"="}},decompressFromBase64:function(c){return c==null?"":c==""?null:s._decompress(c.length,32,function(l){return o(r,c.charAt(l))})},compressToUTF16:function(c){return c==null?"":s._compress(c,15,function(l){return n(l+32)})+" "},decompressFromUTF16:function(c){return c==null?"":c==""?null:s._decompress(c.length,16384,function(l){return c.charCodeAt(l)-32})},compressToUint8Array:function(c){for(var l=s.compress(c),u=new Uint8Array(l.length*2),f=0,h=l.length;f<h;f++){var d=l.charCodeAt(f);u[f*2]=d>>>8,u[f*2+1]=d%256}return u},decompressFromUint8Array:function(c){if(c==null)return s.decompress(c);for(var l=new Array(c.length/2),u=0,f=l.length;u<f;u++)l[u]=c[u*2]*256+c[u*2+1];var h=[];return l.forEach(function(d){h.push(n(d))}),s.decompress(h.join(""))},compressToEncodedURIComponent:function(c){return c==null?"":s._compress(c,6,function(l){return i.charAt(l)})},decompressFromEncodedURIComponent:function(c){return c==null?"":c==""?null:(c=c.replace(/ /g,"+"),s._decompress(c.length,32,function(l){return o(i,c.charAt(l))}))},compress:function(c){return s._compress(c,16,function(l){return n(l)})},_compress:function(c,l,u){if(c==null)return"";var f,h,d={},p={},g="",b="",y="",w=2,A=3,x=2,C=[],_=0,I=0,D;for(D=0;D<c.length;D+=1)if(g=c.charAt(D),Object.prototype.hasOwnProperty.call(d,g)||(d[g]=A++,p[g]=!0),b=y+g,Object.prototype.hasOwnProperty.call(d,b))y=b;else{if(Object.prototype.hasOwnProperty.call(p,y)){if(y.charCodeAt(0)<256){for(f=0;f<x;f++)_=_<<1,I==l-1?(I=0,C.push(u(_)),_=0):I++;for(h=y.charCodeAt(0),f=0;f<8;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1}else{for(h=1,f=0;f<x;f++)_=_<<1|h,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=0;for(h=y.charCodeAt(0),f=0;f<16;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1}w--,w==0&&(w=Math.pow(2,x),x++),delete p[y]}else for(h=d[y],f=0;f<x;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1;w--,w==0&&(w=Math.pow(2,x),x++),d[b]=A++,y=String(g)}if(y!==""){if(Object.prototype.hasOwnProperty.call(p,y)){if(y.charCodeAt(0)<256){for(f=0;f<x;f++)_=_<<1,I==l-1?(I=0,C.push(u(_)),_=0):I++;for(h=y.charCodeAt(0),f=0;f<8;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1}else{for(h=1,f=0;f<x;f++)_=_<<1|h,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=0;for(h=y.charCodeAt(0),f=0;f<16;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1}w--,w==0&&(w=Math.pow(2,x),x++),delete p[y]}else for(h=d[y],f=0;f<x;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1;w--,w==0&&(w=Math.pow(2,x),x++)}for(h=2,f=0;f<x;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1;for(;;)if(_=_<<1,I==l-1){C.push(u(_));break}else I++;return C.join("")},decompress:function(c){return c==null?"":c==""?null:s._decompress(c.length,32768,function(l){return c.charCodeAt(l)})},_decompress:function(c,l,u){var f=[],h=4,d=4,p=3,g="",b=[],y,w,A,x,C,_,I,D={val:u(0),position:l,index:1};for(y=0;y<3;y+=1)f[y]=y;for(A=0,C=Math.pow(2,2),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;switch(A){case 0:for(A=0,C=Math.pow(2,8),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;I=n(A);break;case 1:for(A=0,C=Math.pow(2,16),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;I=n(A);break;case 2:return""}for(f[3]=I,w=I,b.push(I);;){if(D.index>c)return"";for(A=0,C=Math.pow(2,p),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;switch(I=A){case 0:for(A=0,C=Math.pow(2,8),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;f[d++]=n(A),I=d-1,h--;break;case 1:for(A=0,C=Math.pow(2,16),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;f[d++]=n(A),I=d-1,h--;break;case 2:return b.join("")}if(h==0&&(h=Math.pow(2,p),p++),f[I])g=f[I];else if(I===d)g=w+w.charAt(0);else return null;b.push(g),f[d++]=w+g.charAt(0),h--,w=g,h==0&&(h=Math.pow(2,p),p++)}}};return s}();e!=null&&(e.exports=t)}(Fb);var i6=Fb.exports;function lq(){const e=typeof process<"u"?require("util").TextEncoder:TextEncoder;return new e}let a6;function uq(){let e,t=[];for(let n=0;n<256;n++){e=n;for(let r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}function fq(e){a6??(a6=uq());let t=-1;const n=lq().encode(e);for(let r=0;r<n.length;r++)t=t>>>8^a6[(t^n[r])&255];return(t^-1)>>>0}function o6(e){return("00000000"+fq(e).toString(16)).slice(-8)}function s6(e){const t=i6.compressToEncodedURIComponent(JSON.stringify(e));return"#"+t+o6(t)}function hq(e){if(!e||e.length<10)throw new Error("The state string in the URL is too short.");const t=e.slice(1,-8),n=e.slice(-8);if(o6(t)!==n)throw new Error("The state string in the URL is corrupted.");return JSON.parse(i6.decompressFromEncodedURIComponent(t))}let ho;function dq(e){for(const t of e.genomeSpy.getNamedScaleResolutions().values())t.isZoomable()&&t.resetZoom();e.storeHelper.dispatch([...e.provenance.isUndoable()?[lo.jumpToPast(0)]:[],Ts.actions.restoreDefaultVisibilities()])}async function Pb(e,t){try{e.actions&&t.provenance.dispatchBookmark(e.actions),t.storeHelper.dispatch(Ts.actions.setViewSettings(e.viewSettings));const n=[];for(const[r,i]of Object.entries(e.scaleDomains??{})){const a=t.genomeSpy.getNamedScaleResolutions().get(r);a?n.push(a.zoomTo(i)):console.warn(`Cannot restore scale domain. Unknown name: ${r}`)}await Promise.all(n)}catch(n){console.error(n),dn($`<p>Cannot restore the state:</p>
3048
- <p>${n}</p>`),t.provenance.activateState(0)}}async function fu(e,t,n={}){await Pb(e,t),(ho||e.notes||n.mode=="shared"&&(e.name||e.notes))&&await pq(e,t,n)}async function pq(e,t,n={}){ho??(ho=ao("tour",t.appContainer)),await gq(e,t,n)}async function gq(e,t,n){const r=n.database,i=r?await r.getNames():[],a=i.indexOf(e.name),o=r?` ${a+1} of ${i.length}`:"",s=`${n.mode=="shared"?"Shared bookmark":"Bookmark"}${o}: ${e.name??"Unnamed"}`,c=e.notes?oq(e.notes,{baseUrl:t.genomeSpy.spec.baseUrl}):$`<span class="no-notes">No notes provided</span>`,l=async()=>{if(ho==null||ho.close(),ho=void 0,n.mode=="tour"){const g=n.afterTourBookmark;if(typeof g=="string"){const b=await n.database.get(g);if(!b)throw new Error(`No such bookmark: ${g}`);Pb(b,t)}else g===null||dq(t)}},u=async g=>{const b=await r.get(i[g]);fu(b,t,n),t.appContainer.querySelector("canvas").focus()},f=async()=>{if(await Mb(t.localBookmarkDatabase,e,"add"))try{await t.localBookmarkDatabase.put(e)}catch(g){console.warn(g),dn(`Cannot import bookmark: ${g}`)}},h=$` <button class="btn" @click=${l}>
3050
+ */const e6=e=>!vG(e)&&typeof e.then=="function",t6=1073741823,aq=Da(class extends j_{constructor(){super(...arguments),this._$C_t=t6,this._$Cwt=[],this._$Cq=new rq(this),this._$CK=new iq}render(...t){return t.find(n=>!e6(n))??Dt}update(t,n){const r=this._$Cwt;let i=r.length;this._$Cwt=n;const a=this._$Cq,o=this._$CK;this.isConnected||this.disconnected();for(let s=0;s<n.length&&!(s>this._$C_t);s++){const c=n[s];if(!e6(c))return this._$C_t=s,c;s<i&&c===r[s]||(this._$C_t=t6,i=0,Promise.resolve(c).then(async l=>{for(;o.get();)await o.get();const u=a.deref();if(u!==void 0){const f=u._$Cwt.indexOf(c);f>-1&&f<u._$C_t&&(u._$C_t=f,u.setValue(l))}}))}return Dt}disconnected(){this._$Cq.disconnect(),this._$CK.pause()}reconnected(){this._$Cq.reconnect(this),this._$CK.resume()}});var oq={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function n6(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function lu(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Bb(e,t){var n,r,i,a,o,s=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,c=[],l="",u=t||{},f=0;function h(p){var g=oq[p[1]||""],b=c[c.length-1]==p;return g?g[1]?(b?c.pop():c.push(p),g[0|b]):g[0]:p}function d(){for(var p="";c.length;)p+=h(c[c.length-1]);return p}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(p,g,b){return u[g.toLowerCase()]=b,""}).replace(/^\n+|\n+$/g,"");i=s.exec(e);)r=e.substring(f,i.index),f=s.lastIndex,n=i[0],r.match(/[^\\](\\\\)*\\$/)||((o=i[3]||i[4])?n='<pre class="code '+(i[4]?"poetry":i[2].toLowerCase())+'"><code'+(i[2]?' class="language-'+i[2].toLowerCase()+'"':"")+">"+n6(lu(o).replace(/^\n+|\n+$/g,""))+"</code></pre>":(o=i[6])?(o.match(/\./)&&(i[5]=i[5].replace(/^\d+/gm,"")),a=Bb(n6(i[5].replace(/^\s*[>*+.-]/gm,""))),o==">"?o="blockquote":(o=o.match(/\./)?"ol":"ul",a=a.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),n="<"+o+">"+a+"</"+o+">"):i[8]?n='<img src="'+lu(i[8])+'" alt="'+lu(i[7])+'">':i[10]?(l=l.replace("<a>",'<a href="'+lu(i[11]||u[r.toLowerCase()])+'">'),n=d()+"</a>"):i[9]?n="<a>":i[12]||i[14]?n="<"+(o="h"+(i[14]?i[14].length:i[13]>"="?1:2))+">"+Bb(i[12]||i[15],u)+"</"+o+">":i[16]?n="<code>"+lu(i[16])+"</code>":(i[17]||i[1])&&(n=h(i[17]||"--"))),l+=r,l+=n;return(l+e.substring(f)+d()).replace(/^\n+|\n+$/g,"")}function sq(e,t={}){const n=Bb(e),r=new DOMParser().parseFromString(`<!DOCTYPE html><html><body><div>${n}</div></body></html>`,"text/html");r.normalize(),r6(r.body);for(const a of r.querySelectorAll("a[href]"))a.setAttribute("target","blank"),a.setAttribute("rel","noopener noreferrer"),a.setAttribute("href",Xa(a.getAttribute("href"),t.baseUrl));for(const a of r.querySelectorAll("img[src]"))a.setAttribute("src",Xa(a.getAttribute("src"),t.baseUrl));const i=r.body.removeChild(r.querySelector("body > div"));return i.className="snarkdown",i}function r6(e){if(e.nodeType!==3){if(e.nodeType!==1||/^(script|iframe|object|embed|svg)$/i.test(e.tagName))return e.remove();for(let t=e.attributes.length;t--;){const n=e.attributes[t].name;/^(class|id|name|href|src|alt|align|valign|(on[a-z]+))$/i.test(n)||e.attributes.removeNamedItem(n)}for(let t=e.childNodes.length;t--;)r6(e.childNodes[t])}}function cq(e){e.stopPropagation(),e.preventDefault();const n=e.target.parentElement,r=n.parentElement,a=r.parentElement.querySelector(".panes"),o=[...r.children].findIndex(s=>s==n);for(const s of r.children)s.classList.remove("active-tab");for(const s of a.children)s.classList.remove("active-tab");r.children.item(o).classList.add("active-tab"),a.children.item(o).classList.add("active-tab")}var Zd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lq(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Fb={exports:{}};Fb.exports,function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",a={};function o(c,l){if(!a[c]){a[c]={};for(var u=0;u<c.length;u++)a[c][c.charAt(u)]=u}return a[c][l]}var s={compressToBase64:function(c){if(c==null)return"";var l=s._compress(c,6,function(u){return r.charAt(u)});switch(l.length%4){default:case 0:return l;case 1:return l+"===";case 2:return l+"==";case 3:return l+"="}},decompressFromBase64:function(c){return c==null?"":c==""?null:s._decompress(c.length,32,function(l){return o(r,c.charAt(l))})},compressToUTF16:function(c){return c==null?"":s._compress(c,15,function(l){return n(l+32)})+" "},decompressFromUTF16:function(c){return c==null?"":c==""?null:s._decompress(c.length,16384,function(l){return c.charCodeAt(l)-32})},compressToUint8Array:function(c){for(var l=s.compress(c),u=new Uint8Array(l.length*2),f=0,h=l.length;f<h;f++){var d=l.charCodeAt(f);u[f*2]=d>>>8,u[f*2+1]=d%256}return u},decompressFromUint8Array:function(c){if(c==null)return s.decompress(c);for(var l=new Array(c.length/2),u=0,f=l.length;u<f;u++)l[u]=c[u*2]*256+c[u*2+1];var h=[];return l.forEach(function(d){h.push(n(d))}),s.decompress(h.join(""))},compressToEncodedURIComponent:function(c){return c==null?"":s._compress(c,6,function(l){return i.charAt(l)})},decompressFromEncodedURIComponent:function(c){return c==null?"":c==""?null:(c=c.replace(/ /g,"+"),s._decompress(c.length,32,function(l){return o(i,c.charAt(l))}))},compress:function(c){return s._compress(c,16,function(l){return n(l)})},_compress:function(c,l,u){if(c==null)return"";var f,h,d={},p={},g="",b="",y="",w=2,A=3,x=2,C=[],_=0,I=0,D;for(D=0;D<c.length;D+=1)if(g=c.charAt(D),Object.prototype.hasOwnProperty.call(d,g)||(d[g]=A++,p[g]=!0),b=y+g,Object.prototype.hasOwnProperty.call(d,b))y=b;else{if(Object.prototype.hasOwnProperty.call(p,y)){if(y.charCodeAt(0)<256){for(f=0;f<x;f++)_=_<<1,I==l-1?(I=0,C.push(u(_)),_=0):I++;for(h=y.charCodeAt(0),f=0;f<8;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1}else{for(h=1,f=0;f<x;f++)_=_<<1|h,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=0;for(h=y.charCodeAt(0),f=0;f<16;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1}w--,w==0&&(w=Math.pow(2,x),x++),delete p[y]}else for(h=d[y],f=0;f<x;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1;w--,w==0&&(w=Math.pow(2,x),x++),d[b]=A++,y=String(g)}if(y!==""){if(Object.prototype.hasOwnProperty.call(p,y)){if(y.charCodeAt(0)<256){for(f=0;f<x;f++)_=_<<1,I==l-1?(I=0,C.push(u(_)),_=0):I++;for(h=y.charCodeAt(0),f=0;f<8;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1}else{for(h=1,f=0;f<x;f++)_=_<<1|h,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=0;for(h=y.charCodeAt(0),f=0;f<16;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1}w--,w==0&&(w=Math.pow(2,x),x++),delete p[y]}else for(h=d[y],f=0;f<x;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1;w--,w==0&&(w=Math.pow(2,x),x++)}for(h=2,f=0;f<x;f++)_=_<<1|h&1,I==l-1?(I=0,C.push(u(_)),_=0):I++,h=h>>1;for(;;)if(_=_<<1,I==l-1){C.push(u(_));break}else I++;return C.join("")},decompress:function(c){return c==null?"":c==""?null:s._decompress(c.length,32768,function(l){return c.charCodeAt(l)})},_decompress:function(c,l,u){var f=[],h=4,d=4,p=3,g="",b=[],y,w,A,x,C,_,I,D={val:u(0),position:l,index:1};for(y=0;y<3;y+=1)f[y]=y;for(A=0,C=Math.pow(2,2),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;switch(A){case 0:for(A=0,C=Math.pow(2,8),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;I=n(A);break;case 1:for(A=0,C=Math.pow(2,16),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;I=n(A);break;case 2:return""}for(f[3]=I,w=I,b.push(I);;){if(D.index>c)return"";for(A=0,C=Math.pow(2,p),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;switch(I=A){case 0:for(A=0,C=Math.pow(2,8),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;f[d++]=n(A),I=d-1,h--;break;case 1:for(A=0,C=Math.pow(2,16),_=1;_!=C;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;f[d++]=n(A),I=d-1,h--;break;case 2:return b.join("")}if(h==0&&(h=Math.pow(2,p),p++),f[I])g=f[I];else if(I===d)g=w+w.charAt(0);else return null;b.push(g),f[d++]=w+g.charAt(0),h--,w=g,h==0&&(h=Math.pow(2,p),p++)}}};return s}();e!=null&&(e.exports=t)}(Fb);var i6=Fb.exports;function uq(){const e=typeof process<"u"?require("util").TextEncoder:TextEncoder;return new e}let a6;function fq(){let e,t=[];for(let n=0;n<256;n++){e=n;for(let r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}function hq(e){a6??(a6=fq());let t=-1;const n=uq().encode(e);for(let r=0;r<n.length;r++)t=t>>>8^a6[(t^n[r])&255];return(t^-1)>>>0}function o6(e){return("00000000"+hq(e).toString(16)).slice(-8)}function s6(e){const t=i6.compressToEncodedURIComponent(JSON.stringify(e));return"#"+t+o6(t)}function dq(e){if(!e||e.length<10)throw new Error("The state string in the URL is too short.");const t=e.slice(1,-8),n=e.slice(-8);if(o6(t)!==n)throw new Error("The state string in the URL is corrupted.");return JSON.parse(i6.decompressFromEncodedURIComponent(t))}let ho;function pq(e){for(const t of e.genomeSpy.getNamedScaleResolutions().values())t.isZoomable()&&t.resetZoom();e.storeHelper.dispatch([...e.provenance.isUndoable()?[lo.jumpToPast(0)]:[],Ts.actions.restoreDefaultVisibilities()])}async function Pb(e,t){try{e.actions&&t.provenance.dispatchBookmark(e.actions),t.storeHelper.dispatch(Ts.actions.setViewSettings(e.viewSettings));const n=[];for(const[r,i]of Object.entries(e.scaleDomains??{})){const a=t.genomeSpy.getNamedScaleResolutions().get(r);a?n.push(a.zoomTo(i)):console.warn(`Cannot restore scale domain. Unknown name: ${r}`)}await Promise.all(n)}catch(n){console.error(n),dn($`<p>Cannot restore the state:</p>
3051
+ <p>${n}</p>`),t.provenance.activateState(0)}}async function fu(e,t,n={}){await Pb(e,t),(ho||e.notes||n.mode=="shared"&&(e.name||e.notes))&&await gq(e,t,n)}async function gq(e,t,n={}){ho??(ho=ao("tour",t.appContainer)),await mq(e,t,n)}async function mq(e,t,n){const r=n.database,i=r?await r.getNames():[],a=i.indexOf(e.name),o=r?` ${a+1} of ${i.length}`:"",s=`${n.mode=="shared"?"Shared bookmark":"Bookmark"}${o}: ${e.name??"Unnamed"}`,c=e.notes?sq(e.notes,{baseUrl:t.genomeSpy.spec.baseUrl}):$`<span class="no-notes">No notes provided</span>`,l=async()=>{if(ho==null||ho.close(),ho=void 0,n.mode=="tour"){const g=n.afterTourBookmark;if(typeof g=="string"){const b=await n.database.get(g);if(!b)throw new Error(`No such bookmark: ${g}`);Pb(b,t)}else g===null||pq(t)}},u=async g=>{const b=await r.get(i[g]);fu(b,t,n),t.appContainer.querySelector("canvas").focus()},f=async()=>{if(await Mb(t.localBookmarkDatabase,e,"add"))try{await t.localBookmarkDatabase.put(e)}catch(g){console.warn(g),dn(`Cannot import bookmark: ${g}`)}},h=$` <button class="btn" @click=${l}>
3049
3052
  ${n.mode=="tour"?"End tour":"Close"}
3050
3053
  </button>
3051
3054
  ${n.mode=="shared"&&t.localBookmarkDatabase?$`
@@ -3058,17 +3061,17 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3058
3061
  @click=${()=>u(a-1)}
3059
3062
  ?disabled=${a<=0}
3060
3063
  >
3061
- ${Ue(C$).node[0]} Previous
3064
+ ${Ue(k$).node[0]} Previous
3062
3065
  </button>
3063
3066
  <button
3064
3067
  class="btn"
3065
3068
  @click=${()=>u(a+1)}
3066
3069
  ?disabled=${a>=i.length-1}
3067
3070
  >
3068
- Next ${Ue(u$).node[0]}
3071
+ Next ${Ue(f$).node[0]}
3069
3072
  </button>`:ue}`,p=$`
3070
3073
  <button title="Collapse" class="btn collapse" @click=${g=>g.target.closest(".gs-modal").classList.toggle("collapsed")}>
3071
- ${Ue(F$).node[0]}
3074
+ ${Ue(P$).node[0]}
3072
3075
  </button>
3073
3076
  <div class="modal-title">${s}</div>
3074
3077
  <div class="modal-body markdown" style="max-width: 600px">
@@ -3077,7 +3080,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3077
3080
  <div class="modal-buttons">${h}</div>
3078
3081
  `;Vt(p,ho.content)}function c6(e,t){const n=JSON.stringify(e,void 0,2),r=window.location,i=r.origin+r.pathname+r.search+(t?"#bookmark:"+e.name.replaceAll(" ","-"):s6(e));dn($`
3079
3082
  <div class="gs-tabs" style="width: 600px">
3080
- <ul class="tabs" @click=${sq}>
3083
+ <ul class="tabs" @click=${cq}>
3081
3084
  <li class="active-tab"><button>URL</button></li>
3082
3085
  <li><button>JSON</button></li>
3083
3086
  </ul>
@@ -3090,7 +3093,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3090
3093
  type="text"
3091
3094
  .value=${i}
3092
3095
  />
3093
- <button @click=${o=>navigator.clipboard.writeText(i).then(()=>o.target.dispatchEvent(AG())).catch(()=>dn("Failed to copy!"))}>Copy</button>
3096
+ <button @click=${o=>navigator.clipboard.writeText(i).then(()=>o.target.dispatchEvent(EG())).catch(()=>dn("Failed to copy!"))}>Copy</button>
3094
3097
  </div>
3095
3098
  <small
3096
3099
  >The bookmark URL contains all the bookmarked data,
@@ -3115,7 +3118,7 @@ ${n}</textarea
3115
3118
  <div class="modal-body" style="width: 500px">
3116
3119
  ${n=="edit"?$`
3117
3120
  <div class="gs-alert warning">
3118
- ${Ue(h$).node[0]} The current
3121
+ ${Ue(d$).node[0]} The current
3119
3122
  visualization state will be updated to the bookmark
3120
3123
  you are editing.
3121
3124
  </div>
@@ -3173,7 +3176,7 @@ ${n}</textarea
3173
3176
  </div>
3174
3177
  `,a=t.name,o=()=>!!t.name,s=ao();return new Promise(c=>{const l=()=>{s.close(),c(!1)},u=async()=>{if(!o()){dn("Name is missing!",{title:"Error"});return}let h=!0;e&&!(n&&t.name==a)&&await e.get(t.name)&&(h=await dn($`A bookmark with the name
3175
3178
  <em>${t.name}</em> already exists. It will be
3176
- overwritten.`,{title:"Bookmark already exists",cancelButton:!0})),h&&(s.close(),c(!0))},f=()=>{s.close(),c(!0)};Vt(i(l,n=="share"?f:u),s.content),s.content.querySelector("#bookmark-title").focus()})}function l6(e){if(e!==void 0&&(e=e.trim(),e.length))return e}class mq extends br{constructor(){super(),this.app=void 0}connectedCallback(){super.connectedCallback(),this.dispatchEvent(X_("app",t=>{this.app=t}))}createRenderRoot(){return this}_createBookmarkWithCurrentState(){const t={name:void 0,timestamp:Date.now(),actions:this.app.provenance.getBookmarkableActionHistory(),scaleDomains:{}},n=this.app.storeHelper.state.viewSettings;Object.keys(n.visibilities).length&&(t.viewSettings=n);for(const[r,i]of this.app.genomeSpy.getNamedScaleResolutions().entries())i.isZoomable()&&(t.scaleDomains[r]=i.getComplexDomain());return t}async _shareCurrentState(){const t=this._createBookmarkWithCurrentState();await Mb(void 0,t,"share")&&c6(t,!1)}async _addBookmark(t,n){const r=n?await t.get(n):void 0,i=!!r,a=this._createBookmarkWithCurrentState();if(a.name??(a.name=r==null?void 0:r.name),a.notes??(a.notes=r==null?void 0:r.notes),await Mb(t,a,i?"edit":"add"))try{await t.put(a,r==null?void 0:r.name),this.requestUpdate()}catch(o){dn(`${o}`,{title:"Cannot save the bookmark!"})}}async _loadBookmark(t,n){const r=await t.get(n);r&&fu(r,this.app,{database:t})}_createContextMenu(t,n,r){r.stopPropagation();const i=r.target.closest("li"),a=()=>dn($`The bookmark <em>${n}</em> will be deleted.`,{title:"Are you sure?",cancelButton:!0}).then(async c=>{c&&(await t.delete(n),this.requestUpdate())}),o=[],s=t==this.app.globalBookmarkDatabase;s||(o.push({label:"Edit and replace...",icon:v$,callback:()=>this._addBookmark(t,n)}),o.push({label:"Delete",icon:s4,callback:a})),o.push({label:"Share...",icon:h1,callback:async()=>c6(await t.get(n),s)}),B_({items:o},i,"right-start")}async _makeBookmarkMenuItems(t,n){const i=(await t.getNames()).map(a=>({label:a,callback:()=>this._loadBookmark(t,a),ellipsisCallback:o=>this._createContextMenu(t,a,o)}));return i.length?[{type:"divider"},{label:n,type:"header"},...i].map(a=>R_(a)):ue}_getBookmarks(){const t=(n,r)=>n?iq(this._makeBookmarkMenuItems(n,r),$`Loading...`):ue;return[t(this.app.globalBookmarkDatabase,"Bookmarks on the server"),t(this.app.localBookmarkDatabase,"Bookmarks in the web browser")]}render(){const t=this.app.localBookmarkDatabase,n=t?$` <li>
3179
+ overwritten.`,{title:"Bookmark already exists",cancelButton:!0})),h&&(s.close(),c(!0))},f=()=>{s.close(),c(!0)};Vt(i(l,n=="share"?f:u),s.content),s.content.querySelector("#bookmark-title").focus()})}function l6(e){if(e!==void 0&&(e=e.trim(),e.length))return e}class bq extends br{constructor(){super(),this.app=void 0}connectedCallback(){super.connectedCallback(),this.dispatchEvent(X_("app",t=>{this.app=t}))}createRenderRoot(){return this}_createBookmarkWithCurrentState(){const t={name:void 0,timestamp:Date.now(),actions:this.app.provenance.getBookmarkableActionHistory(),scaleDomains:{}},n=this.app.storeHelper.state.viewSettings;Object.keys(n.visibilities).length&&(t.viewSettings=n);for(const[r,i]of this.app.genomeSpy.getNamedScaleResolutions().entries())i.isZoomable()&&(t.scaleDomains[r]=i.getComplexDomain());return t}async _shareCurrentState(){const t=this._createBookmarkWithCurrentState();await Mb(void 0,t,"share")&&c6(t,!1)}async _addBookmark(t,n){const r=n?await t.get(n):void 0,i=!!r,a=this._createBookmarkWithCurrentState();if(a.name??(a.name=r==null?void 0:r.name),a.notes??(a.notes=r==null?void 0:r.notes),await Mb(t,a,i?"edit":"add"))try{await t.put(a,r==null?void 0:r.name),this.requestUpdate()}catch(o){dn(`${o}`,{title:"Cannot save the bookmark!"})}}async _loadBookmark(t,n){const r=await t.get(n);r&&fu(r,this.app,{database:t})}_createContextMenu(t,n,r){r.stopPropagation();const i=r.target.closest("li"),a=()=>dn($`The bookmark <em>${n}</em> will be deleted.`,{title:"Are you sure?",cancelButton:!0}).then(async c=>{c&&(await t.delete(n),this.requestUpdate())}),o=[],s=t==this.app.globalBookmarkDatabase;s||(o.push({label:"Edit and replace...",icon:w$,callback:()=>this._addBookmark(t,n)}),o.push({label:"Delete",icon:s4,callback:a})),o.push({label:"Share...",icon:h1,callback:async()=>c6(await t.get(n),s)}),B_({items:o},i,"right-start")}async _makeBookmarkMenuItems(t,n){const i=(await t.getNames()).map(a=>({label:a,callback:()=>this._loadBookmark(t,a),ellipsisCallback:o=>this._createContextMenu(t,a,o)}));return i.length?[{type:"divider"},{label:n,type:"header"},...i].map(a=>R_(a)):ue}_getBookmarks(){const t=(n,r)=>n?aq(this._makeBookmarkMenuItems(n,r),$`Loading...`):ue;return[t(this.app.globalBookmarkDatabase,"Bookmarks on the server"),t(this.app.localBookmarkDatabase,"Bookmarks in the web browser")]}render(){const t=this.app.localBookmarkDatabase,n=t?$` <li>
3177
3180
  <a @click=${()=>this._addBookmark(t)}
3178
3181
  >Add bookmark...</a
3179
3182
  >
@@ -3201,7 +3204,7 @@ ${n}</textarea
3201
3204
  ${Ue(h1).node[0]}
3202
3205
  </button>
3203
3206
  </div>
3204
- `}}customElements.define("genome-spy-bookmark-button",mq);class bq extends br{constructor(){super(),this.app=void 0,this.appInitialized=!1}static get properties(){return{app:{type:Object},appInitialized:{type:Boolean}}}createRenderRoot(){return this}_getToolButtons(){const t=this.app.provenance,n=[];t.isEnabled()&&n.push($`
3207
+ `}}customElements.define("genome-spy-bookmark-button",bq);class yq extends br{constructor(){super(),this.app=void 0,this.appInitialized=!1}static get properties(){return{app:{type:Object},appInitialized:{type:Boolean}}}createRenderRoot(){return this}_getToolButtons(){const t=this.app.provenance,n=[];t.isEnabled()&&n.push($`
3205
3208
  <genome-spy-provenance-buttons
3206
3209
  .provenance=${t}
3207
3210
  ></genome-spy-provenance-buttons>
@@ -3232,7 +3235,7 @@ ${n}</textarea
3232
3235
  title="Fullscreen"
3233
3236
  @click=${()=>this.app.toggleFullScreen()}
3234
3237
  >
3235
- ${Ue(p$).node[0]}
3238
+ ${Ue(g$).node[0]}
3236
3239
  </button>
3237
3240
  `:ue}
3238
3241
 
@@ -3241,7 +3244,7 @@ ${n}</textarea
3241
3244
  title="Help"
3242
3245
  @click=${()=>window.open("https://genomespy.app/docs/sample-collections/analyzing/","_blank")}
3243
3246
  >
3244
- ${Ue(y$).node[0]}
3247
+ ${Ue(v$).node[0]}
3245
3248
  </button>
3246
3249
  `),n}render(){const t=this.app.genomeSpy;return $`
3247
3250
  <nav class="gs-toolbar">
@@ -3256,25 +3259,25 @@ ${n}</textarea
3256
3259
  `:ue}
3257
3260
  ${this._getToolButtons()}
3258
3261
  </nav>
3259
- `}}customElements.define("genome-spy-toolbar",bq);class yq{constructor(t){this.storeHelper=t,this._reducers={},this.actionInfoSources=[],this._reducer=void 0,t.addReducer("provenance",(n,r)=>this._reducer?this._reducer(n,r):n??{})}addReducer(t,n){this._reducers[t]=n;const r=a=>Object.keys(this._reducers).some(o=>Me(o)&&a.type.startsWith(o)),i=(a,o)=>r(o)?o:a??null;this._reducer=ej(V1({...this._reducers,lastAction:i}),{ignoreInitialState:!0,filter:r}),this.storeHelper.dispatch({type:"@@redux/REPLACE"+Math.random().toString(36).substring(7).split("").join(".")})}get _storeState(){return this.storeHelper.store.getState()}get _provenanceState(){return this._storeState.provenance}isEnabled(){return!!this.getPresentState()}getPresentState(){return this._provenanceState.present}addActionInfoSource(t){this.actionInfoSources.push(t)}getActionInfo(t){for(const n of this.actionInfoSources){const r=n(t);if(r)return r}}dispatchBookmark(t){this.storeHelper.dispatch([...this.isUndoable()?[lo.jumpToPast(0)]:[],...t])}isRedoable(){return this.isEnabled()&&this._provenanceState.future.length>0}redo(){this.storeHelper.dispatch(lo.redo())}isUndoable(){return this.isEnabled()&&this._provenanceState.past.length>0}undo(){this.storeHelper.dispatch(lo.undo())}isAtInitialState(){return!this.isUndoable()}isEmpty(){const t=this._provenanceState;return!this.isEnabled()||t.past.length+t.future.length<=0}activateState(t){const n=this.getCurrentIndex();t<n?this.storeHelper.dispatch(lo.jumpToPast(t)):t>n&&this.storeHelper.dispatch(lo.jumpToFuture(t-n-1))}getCurrentIndex(){var t;return(t=this._provenanceState.past)==null?void 0:t.length}getActionHistory(){const t=this._provenanceState;return t.present&&[...t.past,t.present].map(n=>n.lastAction)}getFullActionHistory(){const t=this._provenanceState;return[...t.past,t.present,...t.future].map(n=>n.lastAction)}getBookmarkableActionHistory(){var t;return(t=this.getActionHistory())==null?void 0:t.slice(1)}}function vq(e,t,n=r=>+r){const r=e.length,i=new Ll,a=new Array(r).fill(0);for(const[s,c]of e.entries())c.length&&i.push(s,n(c[0]));let o=0;for(;(o=i.pop())!==void 0;){const s=e[o];let c=a[o];const l=s[c++];if(t(l),c<s.length){const u=n(s[c]);i.push(o,u),a[o]=c}}}const wq="sampleCount";class xq extends at{constructor(n,r){super();Z(this,Cf);Z(this,_f,!0);this.view=r;const i=r.context.animator;if(this.provenance=Aq(r),!this.provenance)throw new Error("No SampleView was found!");this.provenance.storeHelper.subscribe(a=>{F(this,Cf,sv)&&(F(this,_f)&&(le(this,_f,!1),this.reset(),this.complete()),i.requestTransition(()=>{this.reset(),this._mergeAndPropagate(ab(a)),this.complete()}))}),this.contextObject=void 0}initialize(){this.contextObject=Object.create(super.getGlobalObject());const n=this.view.getEncoding().x;if(Ur(n))this.xAccessor=Oe(n.field);else throw new Error("Sample summarization requires a FieldDef. This is not a FieldDef: "+JSON.stringify(n))}handle(n){}getGlobalObject(){return this.contextObject}_getCollector(){if(this.parent instanceof Ol)return this.parent;throw new Error("MergeFacetsTransform must be a direct child of a Collector")}complete(){F(this,Cf,sv)&&(this._mergeAndPropagate(this.provenance.getPresentState()[Cs]),super.complete())}_mergeAndPropagate(n){const r=[...sb(n.rootGroup)].filter(i=>t_(xn(i)));for(const[i,a]of r.entries()){const o=xn(a);if(t_(o)){this.contextObject[wq]=o.samples.length,this.beginBatch({type:"facet",facetId:[i]});const s=o.samples,c=this._getCollector();vq(s.map(l=>c.facetBatches.get([l])??[]),l=>this._propagate(l),this.xAccessor)}}this._updateScales()}setParent(n){super.setParent(n)}_updateScales(){const n=new Set;this.view.visit(r=>{if(r instanceof mt&&r.mark.encoding.y){const i=r.getScaleResolution("y");i&&n.add(i)}});for(const r of n)r.reconfigure()}}_f=new WeakMap,Cf=new WeakSet,sv=function(){return this.view.isConfiguredVisible()};function Aq(e){for(const t of e.getLayoutAncestors())if(t instanceof xb)return t.provenance}var Eq="BATCHING_REDUCER.BATCH";function Sq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Eq;return{type:t,meta:{batch:!0},payload:e}}function _q(e){return function t(n,r){return r&&r.meta&&r.meta.batch?r.payload.reduce(t,n):e(n,r)}}class Cq{constructor(t){this._reducers=t??{},this.store=fV({reducer:{}}),this._listeners=new Set,this.store.subscribe(()=>{const n=this.store.getState();for(const r of this._listeners)r(n)})}get state(){return this.store.getState()}addReducer(t,n){this._reducers[t]=n,this.store.replaceReducer(_q(V1(this._reducers)))}subscribe(t){this._listeners.add(t)}unsubscribe(t){this._listeners.delete(t)}dispatch(t){Array.isArray(t)?this.store.dispatch(Sq(t)):this.store.dispatch(t)}getDispatcher(){return t=>this.dispatch(t)}}class kq extends G_{constructor(t){super(),this.bookmarks=t,this.names=t.map(n=>n.name)}async getNames(){return this.names}async get(t){return this.bookmarks.find(n=>n.name==t)}}xE.mergeFacets=xq;class u6{constructor(t,n,r={}){const i=this;this.config=n,this.storeHelper=new Cq,this.storeHelper.addReducer("viewSettings",Ts.reducer),this.provenance=new yq(this.storeHelper),this._initializationListeners=[],this.toolbarRef=q_(),this.appContainer=t,this._configureContainer(),this.localBookmarkDatabase=typeof n.specId=="string"?new Gj(n.specId):void 0,this.globalBookmarkDatabase=void 0,Vt($`<div class="genome-spy-app">
3262
+ `}}customElements.define("genome-spy-toolbar",yq);class vq{constructor(t){this.storeHelper=t,this._reducers={},this.actionInfoSources=[],this._reducer=void 0,t.addReducer("provenance",(n,r)=>this._reducer?this._reducer(n,r):n??{})}addReducer(t,n){this._reducers[t]=n;const r=a=>Object.keys(this._reducers).some(o=>Me(o)&&a.type.startsWith(o)),i=(a,o)=>r(o)?o:a??null;this._reducer=tj(V1({...this._reducers,lastAction:i}),{ignoreInitialState:!0,filter:r}),this.storeHelper.dispatch({type:"@@redux/REPLACE"+Math.random().toString(36).substring(7).split("").join(".")})}get _storeState(){return this.storeHelper.store.getState()}get _provenanceState(){return this._storeState.provenance}isEnabled(){return!!this.getPresentState()}getPresentState(){return this._provenanceState.present}addActionInfoSource(t){this.actionInfoSources.push(t)}getActionInfo(t){for(const n of this.actionInfoSources){const r=n(t);if(r)return r}}dispatchBookmark(t){this.storeHelper.dispatch([...this.isUndoable()?[lo.jumpToPast(0)]:[],...t])}isRedoable(){return this.isEnabled()&&this._provenanceState.future.length>0}redo(){this.storeHelper.dispatch(lo.redo())}isUndoable(){return this.isEnabled()&&this._provenanceState.past.length>0}undo(){this.storeHelper.dispatch(lo.undo())}isAtInitialState(){return!this.isUndoable()}isEmpty(){const t=this._provenanceState;return!this.isEnabled()||t.past.length+t.future.length<=0}activateState(t){const n=this.getCurrentIndex();t<n?this.storeHelper.dispatch(lo.jumpToPast(t)):t>n&&this.storeHelper.dispatch(lo.jumpToFuture(t-n-1))}getCurrentIndex(){var t;return(t=this._provenanceState.past)==null?void 0:t.length}getActionHistory(){const t=this._provenanceState;return t.present&&[...t.past,t.present].map(n=>n.lastAction)}getFullActionHistory(){const t=this._provenanceState;return[...t.past,t.present,...t.future].map(n=>n.lastAction)}getBookmarkableActionHistory(){var t;return(t=this.getActionHistory())==null?void 0:t.slice(1)}}function wq(e,t,n=r=>+r){const r=e.length,i=new Ll,a=new Array(r).fill(0);for(const[s,c]of e.entries())c.length&&i.push(s,n(c[0]));let o=0;for(;(o=i.pop())!==void 0;){const s=e[o];let c=a[o];const l=s[c++];if(t(l),c<s.length){const u=n(s[c]);i.push(o,u),a[o]=c}}}const xq="sampleCount";class Aq extends at{constructor(n,r){super();Z(this,Cf);Z(this,_f,!0);this.view=r;const i=r.context.animator;if(this.provenance=Eq(r),!this.provenance)throw new Error("No SampleView was found!");this.provenance.storeHelper.subscribe(a=>{F(this,Cf,sv)&&(F(this,_f)&&(le(this,_f,!1),this.reset(),this.complete()),i.requestTransition(()=>{this.reset(),this._mergeAndPropagate(ab(a)),this.complete()}))}),this.contextObject=void 0}initialize(){this.contextObject=Object.create(super.getGlobalObject());const n=this.view.getEncoding().x;if(Ur(n))this.xAccessor=Oe(n.field);else throw new Error("Sample summarization requires a FieldDef. This is not a FieldDef: "+JSON.stringify(n))}handle(n){}getGlobalObject(){return this.contextObject}_getCollector(){if(this.parent instanceof Ol)return this.parent;throw new Error("MergeFacetsTransform must be a direct child of a Collector")}complete(){F(this,Cf,sv)&&this._mergeAndPropagate(this.provenance.getPresentState()[Cs]),super.complete()}_mergeAndPropagate(n){const r=[...sb(n.rootGroup)].filter(i=>t_(xn(i)));for(const[i,a]of r.entries()){const o=xn(a);if(t_(o)){this.contextObject[xq]=o.samples.length,this.beginBatch({type:"facet",facetId:[i]});const s=o.samples,c=this._getCollector();wq(s.map(l=>c.facetBatches.get([l])??[]),l=>this._propagate(l),this.xAccessor)}}this._updateScales()}setParent(n){super.setParent(n)}_updateScales(){const n=new Set;this.view.visit(r=>{if(r instanceof mt&&r.mark.encoding.y){const i=r.getScaleResolution("y");i&&n.add(i)}});for(const r of n)r.reconfigure()}}_f=new WeakMap,Cf=new WeakSet,sv=function(){return this.view.isConfiguredVisible()};function Eq(e){for(const t of e.getLayoutAncestors())if(t instanceof xb)return t.provenance}var Sq="BATCHING_REDUCER.BATCH";function _q(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Sq;return{type:t,meta:{batch:!0},payload:e}}function Cq(e){return function t(n,r){return r&&r.meta&&r.meta.batch?r.payload.reduce(t,n):e(n,r)}}class kq{constructor(t){this._reducers=t??{},this.store=hV({reducer:{}}),this._listeners=new Set,this.store.subscribe(()=>{const n=this.store.getState();for(const r of this._listeners)r(n)})}get state(){return this.store.getState()}addReducer(t,n){this._reducers[t]=n,this.store.replaceReducer(Cq(V1(this._reducers)))}subscribe(t){this._listeners.add(t)}unsubscribe(t){this._listeners.delete(t)}dispatch(t){Array.isArray(t)?this.store.dispatch(_q(t)):this.store.dispatch(t)}getDispatcher(){return t=>this.dispatch(t)}}class Tq extends G_{constructor(t){super(),this.bookmarks=t,this.names=t.map(n=>n.name)}async getNames(){return this.names}async get(t){return this.bookmarks.find(n=>n.name==t)}}xE.mergeFacets=Aq;class u6{constructor(t,n,r={}){const i=this;this.config=n,this.storeHelper=new kq,this.storeHelper.addReducer("viewSettings",Ts.reducer),this.provenance=new vq(this.storeHelper),this._initializationListeners=[],this.toolbarRef=q_(),this.appContainer=t,this._configureContainer(),this.localBookmarkDatabase=typeof n.specId=="string"?new Vj(n.specId):void 0,this.globalBookmarkDatabase=void 0,Vt($`<div class="genome-spy-app">
3260
3263
  <genome-spy-toolbar
3261
3264
  ${W_(i.toolbarRef)}
3262
3265
  .app=${i}
3263
3266
  ></genome-spy-toolbar>
3264
3267
  <div class="genome-spy-container"></div>
3265
- </div>`,i.appContainer),i.appContainer.querySelector(".genome-spy-app").addEventListener("query-dependency",s=>{s.detail.name=="app"&&(s.detail.setter(i),s.stopPropagation())});const a=s=>this.appContainer.getElementsByClassName(s)[0];this.genomeSpy=new KE(a("genome-spy-container"),this.config,r),this.genomeSpy.viewFactory.addViewType(XE,(s,c,l,u,f)=>new xb(s,c,l,u,f,this.provenance));const o=this.genomeSpy.viewVisibilityPredicate;this.genomeSpy.viewVisibilityPredicate=s=>{var c;return((c=this.storeHelper.state.viewSettings)==null?void 0:c.visibilities[s.name])??o(s)}}addInitializationListener(t){this._initializationListeners?this._initializationListeners.push(t):t()}toggleFullScreen(){document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():this.appContainer.requestFullscreen()}isFullPage(){return this.appContainer==document.body}async launch(){var o;const t=(o=this.config.bookmarks)!=null&&o.remote?Zc({baseURL:this.config.baseUrl}).load(this.config.bookmarks.remote.url).then(s=>Promise.resolve(JSON.parse(s))):Promise.resolve([]);if(!await this.genomeSpy.launch())return;this.appContainer.querySelector("canvas").setAttribute("tabindex","-1"),this.storeHelper.subscribe(Wd(s=>{var c;return(c=s.viewSettings)==null?void 0:c.visibilities},(s,c)=>{this.genomeSpy.viewRoot._invalidateCacheByPrefix("size","progeny");const l=this.genomeSpy.viewRoot.context;l.requestLayoutReflow(),l.animator.requestRender()},this.storeHelper.store.getState()));try{const s=await t;s.length&&(this.globalBookmarkDatabase=new kq(s))}catch(s){throw new Error(`Cannot load remote bookmarks: ${s}`)}try{await this._restoreStateFromUrlOrBookmark()}catch(s){dn(s.toString())}this.storeHelper.subscribe(()=>{this._updateStateToUrl()}),window.addEventListener("hashchange",()=>this._restoreStateFromUrl().catch(s=>dn(s.toString())),!1);const r=bs(()=>this._updateStateToUrl(),500,!1);for(const[,s]of this.genomeSpy.getNamedScaleResolutions())s.isZoomable()&&s.addEventListener("domain",r);const i=this.toolbarRef.value;i.appInitialized=!0;const a=Lt(this.genomeSpy.spec.description??[]);this.isFullPage()&&a.length>0&&(document.title="GenomeSpy - "+a);for(const s of this._initializationListeners)s();this._initializationListeners=void 0}async _restoreStateFromUrlOrBookmark(){var i;const t=(i=this.config.bookmarks)==null?void 0:i.remote,n=this.globalBookmarkDatabase;if(!await this._restoreStateFromUrl()&&t&&n){const a=t.initialBookmark??(t.tour&&(await n.getNames())[0]);if(a){const o=await n.get(a);if(!o)throw new Error(`No such bookmark: ${a}`);t.tour?await fu(o,this,{mode:"tour",database:n,afterTourBookmark:t.afterTourBookmark}):await Pb(o,this)}}}_updateStateToUrl(){const t={actions:[],scaleDomains:{}},n=this.provenance.getBookmarkableActionHistory();n!=null&&n.length&&(t.actions=n);for(const[a,o]of this.genomeSpy.getNamedScaleResolutions().entries())o.isZoomed()||(t.scaleDomains[a]=o.getComplexDomain());const r=this.storeHelper.state.viewSettings;Object.keys(r.visibilities).length&&(t.viewSettings=r);const i=t.actions.length||Object.keys(t.scaleDomains).length||t.viewSettings?s6(t):"";window.history.replaceState(void 0,document.title,window.location.pathname+window.location.search+i)}async _restoreStateFromUrl(){var r,i;const t=window.location.hash,n=(r=t.match(/^#bookmark:(.+)$/))==null?void 0:r[1];if(n){const a=(i=this.config.bookmarks)==null?void 0:i.remote,o=this.globalBookmarkDatabase;if(a&&o){const s=(await o.getNames()).find(c=>c.replaceAll(" ","-")==n);if(s){const c=await o.get(s);if(!c)throw new Error(`No such bookmark: ${s}`);return await fu(c,this,{mode:"tour",database:o}),!0}else throw new Error(`No such bookmark: ${n}`)}}if(t&&t.length>0)try{const a=hq(t);return fu(a,this,{mode:"shared"}),!0}catch(a){console.error(a),dn($`<p>Cannot restore the state:</p>
3266
- <p>${a}</p>`)}return!1}_configureContainer(){this.isFullPage()?(this.appContainer.style.margin="0",this.appContainer.style.padding="0",this.appContainer.style.overflow="hidden",Tq(XU)):this.appContainer.style.position="relative"}getSampleView(){var n;if(!((n=this.genomeSpy)!=null&&n.viewRoot))return;let t;return this.genomeSpy.viewRoot.visit(r=>{if(r instanceof xb)return t=r,Qa}),t}}function Tq(e){const t=document.querySelector("head"),n=document.createElement("link");n.setAttribute("rel","shortcut icon"),n.setAttribute("href",e),t.appendChild(n)}async function Iq(e,t,n={}){let r;if(Me(e)){if(r=document.querySelector(e),!r)throw new Error(`No such element: ${e}`)}else if(e instanceof HTMLElement)r=e;else throw new Error(`Invalid element: ${e}`);let i;try{const a=Xt(t)?t:await f6(t);a.baseUrl??(a.baseUrl=""),a.width??(a.width="container"),a.padding??(a.padding=10);const o=new u6(r,a,n);i=o.genomeSpy,Rq(i,n),await o.launch()}catch(a){r.innerText=a.toString(),console.error(a)}return{finalize(){for(i.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(a,o){const s=i._eventListeners;let c=s.get(a);c||(c=new Set,s.set(a,c)),c.add(o)},removeEventListener(a,o){var c;(c=i._eventListeners.get(a))==null||c.delete(o)},getScaleResolutionByName(a){return i.getNamedScaleResolutions().get(a)},updateNamedData:i.updateNamedData.bind(i)}}function Rq(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function f6(e){let t;try{t=JSON.parse(await Zc().load(e))}catch(n){throw new Error(`Could not load or parse configuration: ${e}, reason: ${n.message}`)}if(!t.baseUrl){const n=e.match(/^[^?#]*\//);t.baseUrl=n&&n[0]||"./"}return t}var we={},Qd={};Qd.byteLength=Fq,Qd.toByteArray=Mq,Qd.fromByteArray=Nq;for(var xr=[],_n=[],Dq=typeof Uint8Array<"u"?Uint8Array:Array,Ob="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Is=0,Bq=Ob.length;Is<Bq;++Is)xr[Is]=Ob[Is],_n[Ob.charCodeAt(Is)]=Is;_n["-".charCodeAt(0)]=62,_n["_".charCodeAt(0)]=63;function h6(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function Fq(e){var t=h6(e),n=t[0],r=t[1];return(n+r)*3/4-r}function Pq(e,t,n){return(t+n)*3/4-n}function Mq(e){var t,n=h6(e),r=n[0],i=n[1],a=new Dq(Pq(e,r,i)),o=0,s=i>0?r-4:r,c;for(c=0;c<s;c+=4)t=_n[e.charCodeAt(c)]<<18|_n[e.charCodeAt(c+1)]<<12|_n[e.charCodeAt(c+2)]<<6|_n[e.charCodeAt(c+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=_n[e.charCodeAt(c)]<<2|_n[e.charCodeAt(c+1)]>>4,a[o++]=t&255),i===1&&(t=_n[e.charCodeAt(c)]<<10|_n[e.charCodeAt(c+1)]<<4|_n[e.charCodeAt(c+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function Oq(e){return xr[e>>18&63]+xr[e>>12&63]+xr[e>>6&63]+xr[e&63]}function Lq(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(Oq(r));return i.join("")}function Nq(e){for(var t,n=e.length,r=n%3,i=[],a=16383,o=0,s=n-r;o<s;o+=a)i.push(Lq(e,o,o+a>s?s:o+a));return r===1?(t=e[n-1],i.push(xr[t>>2]+xr[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(xr[t>>10]+xr[t>>4&63]+xr[t<<2&63]+"=")),i.join("")}var Lb={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Lb.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-u)-1,d>>=-u,u+=s;u>0;a=a*256+e[t+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+f],f+=h,u-=8);if(a===0)a=1-l;else{if(a===c)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-l}return(d?-1:1)*o*Math.pow(2,a-r)},Lb.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,f=u>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+f>=1?t+=h/c:t+=h*Math.pow(2,1-f),t*c>=2&&(o++,c/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(t*c-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=s&255,d+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+d]=o&255,d+=p,o/=256,l-=8);e[n+d-p]|=g*128};/*!
3268
+ </div>`,i.appContainer),i.appContainer.querySelector(".genome-spy-app").addEventListener("query-dependency",s=>{s.detail.name=="app"&&(s.detail.setter(i),s.stopPropagation())});const a=s=>this.appContainer.getElementsByClassName(s)[0];this.genomeSpy=new KE(a("genome-spy-container"),this.config,r),this.genomeSpy.viewFactory.addViewType(XE,(s,c,l,u,f)=>new xb(s,c,l,u,f,this.provenance));const o=this.genomeSpy.viewVisibilityPredicate;this.genomeSpy.viewVisibilityPredicate=s=>{var c;return((c=this.storeHelper.state.viewSettings)==null?void 0:c.visibilities[s.name])??o(s)}}addInitializationListener(t){this._initializationListeners?this._initializationListeners.push(t):t()}toggleFullScreen(){document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():this.appContainer.requestFullscreen()}isFullPage(){return this.appContainer==document.body}async launch(){var o;const t=(o=this.config.bookmarks)!=null&&o.remote?Zc({baseURL:this.config.baseUrl}).load(this.config.bookmarks.remote.url).then(s=>Promise.resolve(JSON.parse(s))):Promise.resolve([]);if(!await this.genomeSpy.launch())return;this.appContainer.querySelector("canvas").setAttribute("tabindex","-1"),this.storeHelper.subscribe(Wd(s=>{var c;return(c=s.viewSettings)==null?void 0:c.visibilities},(s,c)=>{this.genomeSpy.viewRoot._invalidateCacheByPrefix("size","progeny");const l=this.genomeSpy.viewRoot.context;l.requestLayoutReflow(),l.animator.requestRender()},this.storeHelper.store.getState()));try{const s=await t;s.length&&(this.globalBookmarkDatabase=new Tq(s))}catch(s){throw new Error(`Cannot load remote bookmarks: ${s}`)}try{await this._restoreStateFromUrlOrBookmark()}catch(s){dn(s.toString())}this.storeHelper.subscribe(()=>{this._updateStateToUrl()}),window.addEventListener("hashchange",()=>this._restoreStateFromUrl().catch(s=>dn(s.toString())),!1);const r=bs(()=>this._updateStateToUrl(),500,!1);for(const[,s]of this.genomeSpy.getNamedScaleResolutions())s.isZoomable()&&s.addEventListener("domain",r);const i=this.toolbarRef.value;i.appInitialized=!0;const a=Lt(this.genomeSpy.spec.description??[]);this.isFullPage()&&a.length>0&&(document.title="GenomeSpy - "+a);for(const s of this._initializationListeners)s();this._initializationListeners=void 0}async _restoreStateFromUrlOrBookmark(){var i;const t=(i=this.config.bookmarks)==null?void 0:i.remote,n=this.globalBookmarkDatabase;if(!await this._restoreStateFromUrl()&&t&&n){const a=t.initialBookmark??(t.tour&&(await n.getNames())[0]);if(a){const o=await n.get(a);if(!o)throw new Error(`No such bookmark: ${a}`);t.tour?await fu(o,this,{mode:"tour",database:n,afterTourBookmark:t.afterTourBookmark}):await Pb(o,this)}}}_updateStateToUrl(){const t={actions:[],scaleDomains:{}},n=this.provenance.getBookmarkableActionHistory();n!=null&&n.length&&(t.actions=n);for(const[a,o]of this.genomeSpy.getNamedScaleResolutions().entries())o.isZoomed()||(t.scaleDomains[a]=o.getComplexDomain());const r=this.storeHelper.state.viewSettings;Object.keys(r.visibilities).length&&(t.viewSettings=r);const i=t.actions.length||Object.keys(t.scaleDomains).length||t.viewSettings?s6(t):"";window.history.replaceState(void 0,document.title,window.location.pathname+window.location.search+i)}async _restoreStateFromUrl(){var r,i;const t=window.location.hash,n=(r=t.match(/^#bookmark:(.+)$/))==null?void 0:r[1];if(n){const a=(i=this.config.bookmarks)==null?void 0:i.remote,o=this.globalBookmarkDatabase;if(a&&o){const s=(await o.getNames()).find(c=>c.replaceAll(" ","-")==n);if(s){const c=await o.get(s);if(!c)throw new Error(`No such bookmark: ${s}`);return await fu(c,this,{mode:"tour",database:o}),!0}else throw new Error(`No such bookmark: ${n}`)}}if(t&&t.length>0)try{const a=dq(t);return fu(a,this,{mode:"shared"}),!0}catch(a){console.error(a),dn($`<p>Cannot restore the state:</p>
3269
+ <p>${a}</p>`)}return!1}_configureContainer(){this.isFullPage()?(this.appContainer.style.margin="0",this.appContainer.style.padding="0",this.appContainer.style.overflow="hidden",Iq(KU)):this.appContainer.style.position="relative"}getSampleView(){var n;if(!((n=this.genomeSpy)!=null&&n.viewRoot))return;let t;return this.genomeSpy.viewRoot.visit(r=>{if(r instanceof xb)return t=r,Qa}),t}}function Iq(e){const t=document.querySelector("head"),n=document.createElement("link");n.setAttribute("rel","shortcut icon"),n.setAttribute("href",e),t.appendChild(n)}async function Rq(e,t,n={}){let r;if(Me(e)){if(r=document.querySelector(e),!r)throw new Error(`No such element: ${e}`)}else if(e instanceof HTMLElement)r=e;else throw new Error(`Invalid element: ${e}`);let i;try{const a=Xt(t)?t:await f6(t);a.baseUrl??(a.baseUrl=""),a.width??(a.width="container"),a.padding??(a.padding=10);const o=new u6(r,a,n);i=o.genomeSpy,Dq(i,n),await o.launch()}catch(a){r.innerText=a.toString(),console.error(a)}return{finalize(){for(i.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(a,o){const s=i._eventListeners;let c=s.get(a);c||(c=new Set,s.set(a,c)),c.add(o)},removeEventListener(a,o){var c;(c=i._eventListeners.get(a))==null||c.delete(o)},getScaleResolutionByName(a){return i.getNamedScaleResolutions().get(a)},updateNamedData:i.updateNamedData.bind(i)}}function Dq(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function f6(e){let t;try{t=JSON.parse(await Zc().load(e))}catch(n){throw new Error(`Could not load or parse configuration: ${e}, reason: ${n.message}`)}if(!t.baseUrl){const n=e.match(/^[^?#]*\//);t.baseUrl=n&&n[0]||"./"}return t}var we={},Qd={};Qd.byteLength=Pq,Qd.toByteArray=Oq,Qd.fromByteArray=zq;for(var xr=[],_n=[],Bq=typeof Uint8Array<"u"?Uint8Array:Array,Ob="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Is=0,Fq=Ob.length;Is<Fq;++Is)xr[Is]=Ob[Is],_n[Ob.charCodeAt(Is)]=Is;_n["-".charCodeAt(0)]=62,_n["_".charCodeAt(0)]=63;function h6(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function Pq(e){var t=h6(e),n=t[0],r=t[1];return(n+r)*3/4-r}function Mq(e,t,n){return(t+n)*3/4-n}function Oq(e){var t,n=h6(e),r=n[0],i=n[1],a=new Bq(Mq(e,r,i)),o=0,s=i>0?r-4:r,c;for(c=0;c<s;c+=4)t=_n[e.charCodeAt(c)]<<18|_n[e.charCodeAt(c+1)]<<12|_n[e.charCodeAt(c+2)]<<6|_n[e.charCodeAt(c+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=_n[e.charCodeAt(c)]<<2|_n[e.charCodeAt(c+1)]>>4,a[o++]=t&255),i===1&&(t=_n[e.charCodeAt(c)]<<10|_n[e.charCodeAt(c+1)]<<4|_n[e.charCodeAt(c+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function Lq(e){return xr[e>>18&63]+xr[e>>12&63]+xr[e>>6&63]+xr[e&63]}function Nq(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(Lq(r));return i.join("")}function zq(e){for(var t,n=e.length,r=n%3,i=[],a=16383,o=0,s=n-r;o<s;o+=a)i.push(Nq(e,o,o+a>s?s:o+a));return r===1?(t=e[n-1],i.push(xr[t>>2]+xr[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(xr[t>>10]+xr[t>>4&63]+xr[t<<2&63]+"=")),i.join("")}var Lb={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Lb.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-u)-1,d>>=-u,u+=s;u>0;a=a*256+e[t+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+f],f+=h,u-=8);if(a===0)a=1-l;else{if(a===c)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-l}return(d?-1:1)*o*Math.pow(2,a-r)},Lb.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,f=u>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+f>=1?t+=h/c:t+=h*Math.pow(2,1-f),t*c>=2&&(o++,c/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(t*c-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=s&255,d+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+d]=o&255,d+=p,o/=256,l-=8);e[n+d-p]|=g*128};/*!
3267
3270
  * The buffer module from node.js, for the browser.
3268
3271
  *
3269
3272
  * @author Feross Aboukhadijeh <https://feross.org>
3270
3273
  * @license MIT
3271
- */(function(e){const t=Qd,n=Lb,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=w,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function a(){try{const E=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(E,m),E.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(E){if(E>i)throw new RangeError('The value "'+E+'" is invalid for option "size"');const m=new Uint8Array(E);return Object.setPrototypeOf(m,s.prototype),m}function s(E,m,v){if(typeof E=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(E)}return c(E,m,v)}s.poolSize=8192;function c(E,m,v){if(typeof E=="string")return h(E,m);if(ArrayBuffer.isView(E))return p(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(Gt(E,ArrayBuffer)||E&&Gt(E.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Gt(E,SharedArrayBuffer)||E&&Gt(E.buffer,SharedArrayBuffer)))return g(E,m,v);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const R=E.valueOf&&E.valueOf();if(R!=null&&R!==E)return s.from(R,m,v);const P=b(E);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return s.from(E[Symbol.toPrimitive]("string"),m,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}s.from=function(E,m,v){return c(E,m,v)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(E){if(typeof E!="number")throw new TypeError('"size" argument must be of type number');if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function u(E,m,v){return l(E),E<=0?o(E):m!==void 0?typeof v=="string"?o(E).fill(m,v):o(E).fill(m):o(E)}s.alloc=function(E,m,v){return u(E,m,v)};function f(E){return l(E),o(E<0?0:y(E)|0)}s.allocUnsafe=function(E){return f(E)},s.allocUnsafeSlow=function(E){return f(E)};function h(E,m){if((typeof m!="string"||m==="")&&(m="utf8"),!s.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const v=A(E,m)|0;let R=o(v);const P=R.write(E,m);return P!==v&&(R=R.slice(0,P)),R}function d(E){const m=E.length<0?0:y(E.length)|0,v=o(m);for(let R=0;R<m;R+=1)v[R]=E[R]&255;return v}function p(E){if(Gt(E,Uint8Array)){const m=new Uint8Array(E);return g(m.buffer,m.byteOffset,m.byteLength)}return d(E)}function g(E,m,v){if(m<0||E.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<m+(v||0))throw new RangeError('"length" is outside of buffer bounds');let R;return m===void 0&&v===void 0?R=new Uint8Array(E):v===void 0?R=new Uint8Array(E,m):R=new Uint8Array(E,m,v),Object.setPrototypeOf(R,s.prototype),R}function b(E){if(s.isBuffer(E)){const m=y(E.length)|0,v=o(m);return v.length===0||E.copy(v,0,0,m),v}if(E.length!==void 0)return typeof E.length!="number"||fi(E.length)?o(0):d(E);if(E.type==="Buffer"&&Array.isArray(E.data))return d(E.data)}function y(E){if(E>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return E|0}function w(E){return+E!=E&&(E=0),s.alloc(+E)}s.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==s.prototype},s.compare=function(m,v){if(Gt(m,Uint8Array)&&(m=s.from(m,m.offset,m.byteLength)),Gt(v,Uint8Array)&&(v=s.from(v,v.offset,v.byteLength)),!s.isBuffer(m)||!s.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(m===v)return 0;let R=m.length,P=v.length;for(let z=0,q=Math.min(R,P);z<q;++z)if(m[z]!==v[z]){R=m[z],P=v[z];break}return R<P?-1:P<R?1:0},s.isEncoding=function(m){switch(String(m).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}},s.concat=function(m,v){if(!Array.isArray(m))throw new TypeError('"list" argument must be an Array of Buffers');if(m.length===0)return s.alloc(0);let R;if(v===void 0)for(v=0,R=0;R<m.length;++R)v+=m[R].length;const P=s.allocUnsafe(v);let z=0;for(R=0;R<m.length;++R){let q=m[R];if(Gt(q,Uint8Array))z+q.length>P.length?(s.isBuffer(q)||(q=s.from(q)),q.copy(P,z)):Uint8Array.prototype.set.call(P,q,z);else if(s.isBuffer(q))q.copy(P,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=q.length}return P};function A(E,m){if(s.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||Gt(E,ArrayBuffer))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);const v=E.length,R=arguments.length>2&&arguments[2]===!0;if(!R&&v===0)return 0;let P=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return pe(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return ha(E).length;default:if(P)return R?-1:pe(E).length;m=(""+m).toLowerCase(),P=!0}}s.byteLength=A;function x(E,m,v){let R=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,m>>>=0,v<=m))return"";for(E||(E="utf8");;)switch(E){case"hex":return tt(this,m,v);case"utf8":case"utf-8":return ve(this,m,v);case"ascii":return Ne(this,m,v);case"latin1":case"binary":return lt(this,m,v);case"base64":return se(this,m,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(this,m,v);default:if(R)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),R=!0}}s.prototype._isBuffer=!0;function C(E,m,v){const R=E[m];E[m]=E[v],E[v]=R}s.prototype.swap16=function(){const m=this.length;if(m%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;v<m;v+=2)C(this,v,v+1);return this},s.prototype.swap32=function(){const m=this.length;if(m%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let v=0;v<m;v+=4)C(this,v,v+3),C(this,v+1,v+2);return this},s.prototype.swap64=function(){const m=this.length;if(m%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let v=0;v<m;v+=8)C(this,v,v+7),C(this,v+1,v+6),C(this,v+2,v+5),C(this,v+3,v+4);return this},s.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?ve(this,0,m):x.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(m){if(!s.isBuffer(m))throw new TypeError("Argument must be a Buffer");return this===m?!0:s.compare(this,m)===0},s.prototype.inspect=function(){let m="";const v=e.INSPECT_MAX_BYTES;return m=this.toString("hex",0,v).replace(/(.{2})/g,"$1 ").trim(),this.length>v&&(m+=" ... "),"<Buffer "+m+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(m,v,R,P,z){if(Gt(m,Uint8Array)&&(m=s.from(m,m.offset,m.byteLength)),!s.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(v===void 0&&(v=0),R===void 0&&(R=m?m.length:0),P===void 0&&(P=0),z===void 0&&(z=this.length),v<0||R>m.length||P<0||z>this.length)throw new RangeError("out of range index");if(P>=z&&v>=R)return 0;if(P>=z)return-1;if(v>=R)return 1;if(v>>>=0,R>>>=0,P>>>=0,z>>>=0,this===m)return 0;let q=z-P,ge=R-v;const Ze=Math.min(q,ge),$e=this.slice(P,z),nt=m.slice(v,R);for(let Re=0;Re<Ze;++Re)if($e[Re]!==nt[Re]){q=$e[Re],ge=nt[Re];break}return q<ge?-1:ge<q?1:0};function _(E,m,v,R,P){if(E.length===0)return-1;if(typeof v=="string"?(R=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,fi(v)&&(v=P?0:E.length-1),v<0&&(v=E.length+v),v>=E.length){if(P)return-1;v=E.length-1}else if(v<0)if(P)v=0;else return-1;if(typeof m=="string"&&(m=s.from(m,R)),s.isBuffer(m))return m.length===0?-1:I(E,m,v,R,P);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(E,m,v):Uint8Array.prototype.lastIndexOf.call(E,m,v):I(E,[m],v,R,P);throw new TypeError("val must be string, number or Buffer")}function I(E,m,v,R,P){let z=1,q=E.length,ge=m.length;if(R!==void 0&&(R=String(R).toLowerCase(),R==="ucs2"||R==="ucs-2"||R==="utf16le"||R==="utf-16le")){if(E.length<2||m.length<2)return-1;z=2,q/=2,ge/=2,v/=2}function Ze(nt,Re){return z===1?nt[Re]:nt.readUInt16BE(Re*z)}let $e;if(P){let nt=-1;for($e=v;$e<q;$e++)if(Ze(E,$e)===Ze(m,nt===-1?0:$e-nt)){if(nt===-1&&(nt=$e),$e-nt+1===ge)return nt*z}else nt!==-1&&($e-=$e-nt),nt=-1}else for(v+ge>q&&(v=q-ge),$e=v;$e>=0;$e--){let nt=!0;for(let Re=0;Re<ge;Re++)if(Ze(E,$e+Re)!==Ze(m,Re)){nt=!1;break}if(nt)return $e}return-1}s.prototype.includes=function(m,v,R){return this.indexOf(m,v,R)!==-1},s.prototype.indexOf=function(m,v,R){return _(this,m,v,R,!0)},s.prototype.lastIndexOf=function(m,v,R){return _(this,m,v,R,!1)};function D(E,m,v,R){v=Number(v)||0;const P=E.length-v;R?(R=Number(R),R>P&&(R=P)):R=P;const z=m.length;R>z/2&&(R=z/2);let q;for(q=0;q<R;++q){const ge=parseInt(m.substr(q*2,2),16);if(fi(ge))return q;E[v+q]=ge}return q}function M(E,m,v,R){return da(pe(m,E.length-v),E,v,R)}function G(E,m,v,R){return da(un(m),E,v,R)}function O(E,m,v,R){return da(ha(m),E,v,R)}function ae(E,m,v,R){return da(fa(m,E.length-v),E,v,R)}s.prototype.write=function(m,v,R,P){if(v===void 0)P="utf8",R=this.length,v=0;else if(R===void 0&&typeof v=="string")P=v,R=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(R)?(R=R>>>0,P===void 0&&(P="utf8")):(P=R,R=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const z=this.length-v;if((R===void 0||R>z)&&(R=z),m.length>0&&(R<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let q=!1;for(;;)switch(P){case"hex":return D(this,m,v,R);case"utf8":case"utf-8":return M(this,m,v,R);case"ascii":case"latin1":case"binary":return G(this,m,v,R);case"base64":return O(this,m,v,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,m,v,R);default:if(q)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),q=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(E,m,v){return m===0&&v===E.length?t.fromByteArray(E):t.fromByteArray(E.slice(m,v))}function ve(E,m,v){v=Math.min(E.length,v);const R=[];let P=m;for(;P<v;){const z=E[P];let q=null,ge=z>239?4:z>223?3:z>191?2:1;if(P+ge<=v){let Ze,$e,nt,Re;switch(ge){case 1:z<128&&(q=z);break;case 2:Ze=E[P+1],(Ze&192)===128&&(Re=(z&31)<<6|Ze&63,Re>127&&(q=Re));break;case 3:Ze=E[P+1],$e=E[P+2],(Ze&192)===128&&($e&192)===128&&(Re=(z&15)<<12|(Ze&63)<<6|$e&63,Re>2047&&(Re<55296||Re>57343)&&(q=Re));break;case 4:Ze=E[P+1],$e=E[P+2],nt=E[P+3],(Ze&192)===128&&($e&192)===128&&(nt&192)===128&&(Re=(z&15)<<18|(Ze&63)<<12|($e&63)<<6|nt&63,Re>65535&&Re<1114112&&(q=Re))}}q===null?(q=65533,ge=1):q>65535&&(q-=65536,R.push(q>>>10&1023|55296),q=56320|q&1023),R.push(q),P+=ge}return st(R)}const Pe=4096;function st(E){const m=E.length;if(m<=Pe)return String.fromCharCode.apply(String,E);let v="",R=0;for(;R<m;)v+=String.fromCharCode.apply(String,E.slice(R,R+=Pe));return v}function Ne(E,m,v){let R="";v=Math.min(E.length,v);for(let P=m;P<v;++P)R+=String.fromCharCode(E[P]&127);return R}function lt(E,m,v){let R="";v=Math.min(E.length,v);for(let P=m;P<v;++P)R+=String.fromCharCode(E[P]);return R}function tt(E,m,v){const R=E.length;(!m||m<0)&&(m=0),(!v||v<0||v>R)&&(v=R);let P="";for(let z=m;z<v;++z)P+=pa[E[z]];return P}function ut(E,m,v){const R=E.slice(m,v);let P="";for(let z=0;z<R.length-1;z+=2)P+=String.fromCharCode(R[z]+R[z+1]*256);return P}s.prototype.slice=function(m,v){const R=this.length;m=~~m,v=v===void 0?R:~~v,m<0?(m+=R,m<0&&(m=0)):m>R&&(m=R),v<0?(v+=R,v<0&&(v=0)):v>R&&(v=R),v<m&&(v=m);const P=this.subarray(m,v);return Object.setPrototypeOf(P,s.prototype),P};function Te(E,m,v){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+m>v)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(m,v,R){m=m>>>0,v=v>>>0,R||Te(m,v,this.length);let P=this[m],z=1,q=0;for(;++q<v&&(z*=256);)P+=this[m+q]*z;return P},s.prototype.readUintBE=s.prototype.readUIntBE=function(m,v,R){m=m>>>0,v=v>>>0,R||Te(m,v,this.length);let P=this[m+--v],z=1;for(;v>0&&(z*=256);)P+=this[m+--v]*z;return P},s.prototype.readUint8=s.prototype.readUInt8=function(m,v){return m=m>>>0,v||Te(m,1,this.length),this[m]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(m,v){return m=m>>>0,v||Te(m,2,this.length),this[m]|this[m+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(m,v){return m=m>>>0,v||Te(m,2,this.length),this[m]<<8|this[m+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+this[m+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),this[m]*16777216+(this[m+1]<<16|this[m+2]<<8|this[m+3])},s.prototype.readBigUInt64LE=fn(function(m){m=m>>>0,V(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Y(m,this.length-8);const P=v+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24,z=this[++m]+this[++m]*2**8+this[++m]*2**16+R*2**24;return BigInt(P)+(BigInt(z)<<BigInt(32))}),s.prototype.readBigUInt64BE=fn(function(m){m=m>>>0,V(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Y(m,this.length-8);const P=v*2**24+this[++m]*2**16+this[++m]*2**8+this[++m],z=this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+R;return(BigInt(P)<<BigInt(32))+BigInt(z)}),s.prototype.readIntLE=function(m,v,R){m=m>>>0,v=v>>>0,R||Te(m,v,this.length);let P=this[m],z=1,q=0;for(;++q<v&&(z*=256);)P+=this[m+q]*z;return z*=128,P>=z&&(P-=Math.pow(2,8*v)),P},s.prototype.readIntBE=function(m,v,R){m=m>>>0,v=v>>>0,R||Te(m,v,this.length);let P=v,z=1,q=this[m+--P];for(;P>0&&(z*=256);)q+=this[m+--P]*z;return z*=128,q>=z&&(q-=Math.pow(2,8*v)),q},s.prototype.readInt8=function(m,v){return m=m>>>0,v||Te(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},s.prototype.readInt16LE=function(m,v){m=m>>>0,v||Te(m,2,this.length);const R=this[m]|this[m+1]<<8;return R&32768?R|4294901760:R},s.prototype.readInt16BE=function(m,v){m=m>>>0,v||Te(m,2,this.length);const R=this[m+1]|this[m]<<8;return R&32768?R|4294901760:R},s.prototype.readInt32LE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},s.prototype.readInt32BE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},s.prototype.readBigInt64LE=fn(function(m){m=m>>>0,V(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Y(m,this.length-8);const P=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(R<<24);return(BigInt(P)<<BigInt(32))+BigInt(v+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24)}),s.prototype.readBigInt64BE=fn(function(m){m=m>>>0,V(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Y(m,this.length-8);const P=(v<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(P)<<BigInt(32))+BigInt(this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+R)}),s.prototype.readFloatLE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),n.read(this,m,!0,23,4)},s.prototype.readFloatBE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),n.read(this,m,!1,23,4)},s.prototype.readDoubleLE=function(m,v){return m=m>>>0,v||Te(m,8,this.length),n.read(this,m,!0,52,8)},s.prototype.readDoubleBE=function(m,v){return m=m>>>0,v||Te(m,8,this.length),n.read(this,m,!1,52,8)};function Ie(E,m,v,R,P,z){if(!s.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>P||m<z)throw new RangeError('"value" argument is out of bounds');if(v+R>E.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(m,v,R,P){if(m=+m,v=v>>>0,R=R>>>0,!P){const ge=Math.pow(2,8*R)-1;Ie(this,m,v,R,ge,0)}let z=1,q=0;for(this[v]=m&255;++q<R&&(z*=256);)this[v+q]=m/z&255;return v+R},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(m,v,R,P){if(m=+m,v=v>>>0,R=R>>>0,!P){const ge=Math.pow(2,8*R)-1;Ie(this,m,v,R,ge,0)}let z=R-1,q=1;for(this[v+z]=m&255;--z>=0&&(q*=256);)this[v+z]=m/q&255;return v+R},s.prototype.writeUint8=s.prototype.writeUInt8=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,1,255,0),this[v]=m&255,v+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,2,65535,0),this[v]=m&255,this[v+1]=m>>>8,v+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,2,65535,0),this[v]=m>>>8,this[v+1]=m&255,v+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,4,4294967295,0),this[v+3]=m>>>24,this[v+2]=m>>>16,this[v+1]=m>>>8,this[v]=m&255,v+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,4,4294967295,0),this[v]=m>>>24,this[v+1]=m>>>16,this[v+2]=m>>>8,this[v+3]=m&255,v+4};function Rt(E,m,v,R,P){S(m,R,P,E,v,7);let z=Number(m&BigInt(4294967295));E[v++]=z,z=z>>8,E[v++]=z,z=z>>8,E[v++]=z,z=z>>8,E[v++]=z;let q=Number(m>>BigInt(32)&BigInt(4294967295));return E[v++]=q,q=q>>8,E[v++]=q,q=q>>8,E[v++]=q,q=q>>8,E[v++]=q,v}function ln(E,m,v,R,P){S(m,R,P,E,v,7);let z=Number(m&BigInt(4294967295));E[v+7]=z,z=z>>8,E[v+6]=z,z=z>>8,E[v+5]=z,z=z>>8,E[v+4]=z;let q=Number(m>>BigInt(32)&BigInt(4294967295));return E[v+3]=q,q=q>>8,E[v+2]=q,q=q>>8,E[v+1]=q,q=q>>8,E[v]=q,v+8}s.prototype.writeBigUInt64LE=fn(function(m,v=0){return Rt(this,m,v,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=fn(function(m,v=0){return ln(this,m,v,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(m,v,R,P){if(m=+m,v=v>>>0,!P){const Ze=Math.pow(2,8*R-1);Ie(this,m,v,R,Ze-1,-Ze)}let z=0,q=1,ge=0;for(this[v]=m&255;++z<R&&(q*=256);)m<0&&ge===0&&this[v+z-1]!==0&&(ge=1),this[v+z]=(m/q>>0)-ge&255;return v+R},s.prototype.writeIntBE=function(m,v,R,P){if(m=+m,v=v>>>0,!P){const Ze=Math.pow(2,8*R-1);Ie(this,m,v,R,Ze-1,-Ze)}let z=R-1,q=1,ge=0;for(this[v+z]=m&255;--z>=0&&(q*=256);)m<0&&ge===0&&this[v+z+1]!==0&&(ge=1),this[v+z]=(m/q>>0)-ge&255;return v+R},s.prototype.writeInt8=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,1,127,-128),m<0&&(m=255+m+1),this[v]=m&255,v+1},s.prototype.writeInt16LE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,2,32767,-32768),this[v]=m&255,this[v+1]=m>>>8,v+2},s.prototype.writeInt16BE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,2,32767,-32768),this[v]=m>>>8,this[v+1]=m&255,v+2},s.prototype.writeInt32LE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,4,2147483647,-2147483648),this[v]=m&255,this[v+1]=m>>>8,this[v+2]=m>>>16,this[v+3]=m>>>24,v+4},s.prototype.writeInt32BE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[v]=m>>>24,this[v+1]=m>>>16,this[v+2]=m>>>8,this[v+3]=m&255,v+4},s.prototype.writeBigInt64LE=fn(function(m,v=0){return Rt(this,m,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=fn(function(m,v=0){return ln(this,m,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ve(E,m,v,R,P,z){if(v+R>E.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function N(E,m,v,R,P){return m=+m,v=v>>>0,P||Ve(E,m,v,4),n.write(E,m,v,R,23,4),v+4}s.prototype.writeFloatLE=function(m,v,R){return N(this,m,v,!0,R)},s.prototype.writeFloatBE=function(m,v,R){return N(this,m,v,!1,R)};function L(E,m,v,R,P){return m=+m,v=v>>>0,P||Ve(E,m,v,8),n.write(E,m,v,R,52,8),v+8}s.prototype.writeDoubleLE=function(m,v,R){return L(this,m,v,!0,R)},s.prototype.writeDoubleBE=function(m,v,R){return L(this,m,v,!1,R)},s.prototype.copy=function(m,v,R,P){if(!s.isBuffer(m))throw new TypeError("argument should be a Buffer");if(R||(R=0),!P&&P!==0&&(P=this.length),v>=m.length&&(v=m.length),v||(v=0),P>0&&P<R&&(P=R),P===R||m.length===0||this.length===0)return 0;if(v<0)throw new RangeError("targetStart out of bounds");if(R<0||R>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),m.length-v<P-R&&(P=m.length-v+R);const z=P-R;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,R,P):Uint8Array.prototype.set.call(m,this.subarray(R,P),v),z},s.prototype.fill=function(m,v,R,P){if(typeof m=="string"){if(typeof v=="string"?(P=v,v=0,R=this.length):typeof R=="string"&&(P=R,R=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!s.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(m.length===1){const q=m.charCodeAt(0);(P==="utf8"&&q<128||P==="latin1")&&(m=q)}}else typeof m=="number"?m=m&255:typeof m=="boolean"&&(m=Number(m));if(v<0||this.length<v||this.length<R)throw new RangeError("Out of range index");if(R<=v)return this;v=v>>>0,R=R===void 0?this.length:R>>>0,m||(m=0);let z;if(typeof m=="number")for(z=v;z<R;++z)this[z]=m;else{const q=s.isBuffer(m)?m:s.from(m,P),ge=q.length;if(ge===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(z=0;z<R-v;++z)this[z+v]=q[z%ge]}return this};const W={};function j(E,m,v){W[E]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,this.stack,delete this.name}get code(){return E}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}j("ERR_BUFFER_OUT_OF_BOUNDS",function(E){return E?`${E} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(E,m){return`The "${E}" argument must be of type number. Received type ${typeof m}`},TypeError),j("ERR_OUT_OF_RANGE",function(E,m,v){let R=`The value of "${E}" is out of range.`,P=v;return Number.isInteger(v)&&Math.abs(v)>2**32?P=Q(String(v)):typeof v=="bigint"&&(P=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(P=Q(P)),P+="n"),R+=` It must be ${m}. Received ${P}`,R},RangeError);function Q(E){let m="",v=E.length;const R=E[0]==="-"?1:0;for(;v>=R+4;v-=3)m=`_${E.slice(v-3,v)}${m}`;return`${E.slice(0,v)}${m}`}function T(E,m,v){V(m,"offset"),(E[m]===void 0||E[m+v]===void 0)&&Y(m,E.length-(v+1))}function S(E,m,v,R,P,z){if(E>v||E<m){const q=typeof m=="bigint"?"n":"";let ge;throw z>3?m===0||m===BigInt(0)?ge=`>= 0${q} and < 2${q} ** ${(z+1)*8}${q}`:ge=`>= -(2${q} ** ${(z+1)*8-1}${q}) and < 2 ** ${(z+1)*8-1}${q}`:ge=`>= ${m}${q} and <= ${v}${q}`,new W.ERR_OUT_OF_RANGE("value",ge,E)}T(R,P,z)}function V(E,m){if(typeof E!="number")throw new W.ERR_INVALID_ARG_TYPE(m,"number",E)}function Y(E,m,v){throw Math.floor(E)!==E?(V(E,v),new W.ERR_OUT_OF_RANGE(v||"offset","an integer",E)):m<0?new W.ERR_BUFFER_OUT_OF_BOUNDS:new W.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${m}`,E)}const de=/[^+/0-9A-Za-z-_]/g;function ie(E){if(E=E.split("=")[0],E=E.trim().replace(de,""),E.length<2)return"";for(;E.length%4!==0;)E=E+"=";return E}function pe(E,m){m=m||1/0;let v;const R=E.length;let P=null;const z=[];for(let q=0;q<R;++q){if(v=E.charCodeAt(q),v>55295&&v<57344){if(!P){if(v>56319){(m-=3)>-1&&z.push(239,191,189);continue}else if(q+1===R){(m-=3)>-1&&z.push(239,191,189);continue}P=v;continue}if(v<56320){(m-=3)>-1&&z.push(239,191,189),P=v;continue}v=(P-55296<<10|v-56320)+65536}else P&&(m-=3)>-1&&z.push(239,191,189);if(P=null,v<128){if((m-=1)<0)break;z.push(v)}else if(v<2048){if((m-=2)<0)break;z.push(v>>6|192,v&63|128)}else if(v<65536){if((m-=3)<0)break;z.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((m-=4)<0)break;z.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return z}function un(E){const m=[];for(let v=0;v<E.length;++v)m.push(E.charCodeAt(v)&255);return m}function fa(E,m){let v,R,P;const z=[];for(let q=0;q<E.length&&!((m-=2)<0);++q)v=E.charCodeAt(q),R=v>>8,P=v%256,z.push(P),z.push(R);return z}function ha(E){return t.toByteArray(ie(E))}function da(E,m,v,R){let P;for(P=0;P<R&&!(P+v>=m.length||P>=E.length);++P)m[P+v]=E[P];return P}function Gt(E,m){return E instanceof m||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===m.name}function fi(E){return E!==E}const pa=function(){const E="0123456789abcdef",m=new Array(256);for(let v=0;v<16;++v){const R=v*16;for(let P=0;P<16;++P)m[R+P]=E[v]+E[P]}return m}();function fn(E){return typeof BigInt>"u"?Br:E}function Br(){throw new Error("BigInt not supported")}})(we);const d6=_e({__proto__:null,default:uu(we)},[we]),kt={},zq=Object.freeze(Object.defineProperty({__proto__:null,default:kt},Symbol.toStringTag,{value:"Module"})),Nb=typeof window<"u"?window:typeof self<"u"?self:{fetch:void 0};class po{async getBufferFromResponse(t){if(typeof t.buffer=="function")return t.buffer();if(typeof t.arrayBuffer=="function"){const n=await t.arrayBuffer();return we.Buffer.from(n)}else throw new TypeError("invalid HTTP response object, has no buffer method, and no arrayBuffer method")}constructor(t,n={}){this.baseOverrides={},this.url=t;const r=n.fetch||Nb.fetch&&Nb.fetch.bind(Nb);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");n.overrides&&(this.baseOverrides=n.overrides),this.fetchImplementation=r}async fetch(t,n){let r;try{r=await this.fetchImplementation(t,n)}catch(i){if(`${i}`.includes("Failed to fetch"))console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`),r=await this.fetchImplementation(t,{...n,cache:"reload"});else throw i}return r}async read(t,n=0,r,i=0,a={}){const{headers:o={},signal:s,overrides:c={}}=a;r<1/0?o.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(o.range=`bytes=${i}-`);const l={...this.baseOverrides,...c,headers:{...o,...c.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s},u=await this.fetch(this.url,l);if(!u.ok)throw new Error(`HTTP ${u.status} ${u.statusText} ${this.url}`);if(u.status===200&&i===0||u.status===206){const f=await this.getBufferFromResponse(u),h=f.copy(t,n,0,Math.min(r,f.length)),d=u.headers.get("content-range"),p=/\/(\d+)$/.exec(d||"");return p&&p[1]&&(this._stat={size:parseInt(p[1],10)}),{bytesRead:h,buffer:t}}throw u.status===200?new Error("${this.url} fetch returned status 200, expected 206"):new Error(`HTTP ${u.status} fetching ${this.url}`)}async readFile(t={}){let n,r;typeof t=="string"?(n=t,r={}):(n=t.encoding,r=t,delete r.encoding);const{headers:i={},signal:a,overrides:o={}}=r,s={headers:i,method:"GET",redirect:"follow",mode:"cors",signal:a,...this.baseOverrides,...o},c=await this.fetch(this.url,s);if(!c)throw new Error("generic-filehandle failed to fetch");if(c.status!==200)throw Object.assign(new Error(`HTTP ${c.status} fetching ${this.url}`),{status:c.status});if(n==="utf8")return c.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(c)}async stat(){if(!this._stat){const t=we.Buffer.allocUnsafe(10);if(await this.read(t,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function p6(e){const t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new Error("problem reading blob"))},t.onabort=()=>{r(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&typeof t.result!="string"?n(t.result):r(new Error("unknown error reading blob"))},t.readAsArrayBuffer(e)})}function Uq(e){const t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new Error("problem reading blob"))},t.onabort=()=>{r(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&typeof t.result=="string"?n(t.result):r(new Error("unknown error reading blob"))},t.readAsText(e)})}class $q{constructor(t){this.blob=t,this.size=t.size}async read(t,n=0,r,i=0){if(!r)return{bytesRead:0,buffer:t};const a=i,o=a+r,s=await p6(this.blob.slice(a,o)),c=we.Buffer.from(s);return{bytesRead:c.copy(t,n),buffer:c}}async readFile(t){let n;if(typeof t=="string"?n=t:n=t&&t.encoding,n==="utf8")return Uq(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await p6(this.blob);return we.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function g6(e,t={}){return new po(e,t)}function Hq(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return g6(e,r);if(t!==void 0)return new kt(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const hu=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:$q,LocalFile:kt,RemoteFile:po,fromUrl:g6,open:Hq},Symbol.toStringTag,{value:"Module"}));var Kr={};(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(a,o){return Object.prototype.hasOwnProperty.call(a,o)}e.assign=function(a){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var s=o.shift();if(s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var c in s)n(s,c)&&(a[c]=s[c])}}return a},e.shrinkBuf=function(a,o){return a.length===o?a:a.subarray?a.subarray(0,o):(a.length=o,a)};var r={arraySet:function(a,o,s,c,l){if(o.subarray&&a.subarray){a.set(o.subarray(s,s+c),l);return}for(var u=0;u<c;u++)a[l+u]=o[s+u]},flattenChunks:function(a){var o,s,c,l,u,f;for(c=0,o=0,s=a.length;o<s;o++)c+=a[o].length;for(f=new Uint8Array(c),l=0,o=0,s=a.length;o<s;o++)u=a[o],f.set(u,l),l+=u.length;return f}},i={arraySet:function(a,o,s,c,l){for(var u=0;u<c;u++)a[l+u]=o[s+u]},flattenChunks:function(a){return[].concat.apply([],a)}};e.setTyped=function(a){a?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})(Kr);var du={},Ar={},Rs={},Gq=Kr,Vq=4,m6=0,b6=1,jq=2;function Ds(e){for(var t=e.length;--t>=0;)e[t]=0}var qq=0,y6=1,Wq=2,Yq=3,Zq=258,zb=29,pu=256,gu=pu+1+zb,Bs=30,Ub=19,v6=2*gu+1,go=15,$b=16,Qq=7,Hb=256,w6=16,x6=17,A6=18,Gb=[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],Xd=[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],Xq=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],E6=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Kq=512,Jr=new Array((gu+2)*2);Ds(Jr);var mu=new Array(Bs*2);Ds(mu);var bu=new Array(Kq);Ds(bu);var yu=new Array(Zq-Yq+1);Ds(yu);var Vb=new Array(zb);Ds(Vb);var Kd=new Array(Bs);Ds(Kd);function jb(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var S6,_6,C6;function qb(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function k6(e){return e<256?bu[e]:bu[256+(e>>>7)]}function vu(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function an(e,t,n){e.bi_valid>$b-n?(e.bi_buf|=t<<e.bi_valid&65535,vu(e,e.bi_buf),e.bi_buf=t>>$b-e.bi_valid,e.bi_valid+=n-$b):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Er(e,t,n){an(e,n[t*2],n[t*2+1])}function T6(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function Jq(e){e.bi_valid===16?(vu(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function eW(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,f,h,d,p,g=0;for(h=0;h<=go;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<v6;l++)u=e.heap[l],h=n[n[u*2+1]*2+1]+1,h>c&&(h=c,g++),n[u*2+1]=h,!(u>r)&&(e.bl_count[h]++,d=0,u>=s&&(d=o[u-s]),p=n[u*2],e.opt_len+=p*(h+d),a&&(e.static_len+=p*(i[u*2+1]+d)));if(g!==0){do{for(h=c-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(h=c;h!==0;h--)for(u=e.bl_count[h];u!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),u--)}}function I6(e,t,n){var r=new Array(go+1),i=0,a,o;for(a=1;a<=go;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=T6(r[s]++,s))}}function tW(){var e,t,n,r,i,a=new Array(go+1);for(n=0,r=0;r<zb-1;r++)for(Vb[r]=n,e=0;e<1<<Gb[r];e++)yu[n++]=r;for(yu[n-1]=r,i=0,r=0;r<16;r++)for(Kd[r]=i,e=0;e<1<<Xd[r];e++)bu[i++]=r;for(i>>=7;r<Bs;r++)for(Kd[r]=i<<7,e=0;e<1<<Xd[r]-7;e++)bu[256+i++]=r;for(t=0;t<=go;t++)a[t]=0;for(e=0;e<=143;)Jr[e*2+1]=8,e++,a[8]++;for(;e<=255;)Jr[e*2+1]=9,e++,a[9]++;for(;e<=279;)Jr[e*2+1]=7,e++,a[7]++;for(;e<=287;)Jr[e*2+1]=8,e++,a[8]++;for(I6(Jr,gu+1,a),e=0;e<Bs;e++)mu[e*2+1]=5,mu[e*2]=T6(e,5);S6=new jb(Jr,Gb,pu+1,gu,go),_6=new jb(mu,Xd,0,Bs,go),C6=new jb(new Array(0),Xq,0,Ub,Qq)}function R6(e){var t;for(t=0;t<gu;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Bs;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Ub;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Hb*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function D6(e){e.bi_valid>8?vu(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function nW(e,t,n,r){D6(e),r&&(vu(e,n),vu(e,~n)),Gq.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function B6(e,t,n,r){var i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function Wb(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&B6(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!B6(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function F6(e,t,n){var r,i,a=0,o,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],i=e.pending_buf[e.l_buf+a],a++,r===0?Er(e,i,t):(o=yu[i],Er(e,o+pu+1,t),s=Gb[o],s!==0&&(i-=Vb[o],an(e,i,s)),r--,o=k6(r),Er(e,o,n),s=Xd[o],s!==0&&(r-=Kd[o],an(e,r,s)));while(a<e.last_lit);Er(e,Hb,t)}function Yb(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=v6,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)Wb(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Wb(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,Wb(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],eW(e,t),I6(n,c,e.bl_count)}function P6(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[w6*2]++):s<=10?e.bl_tree[x6*2]++:e.bl_tree[A6*2]++,s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))}function M6(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do Er(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Er(e,a,e.bl_tree),s--),Er(e,w6,e.bl_tree),an(e,s-3,2)):s<=10?(Er(e,x6,e.bl_tree),an(e,s-3,3)):(Er(e,A6,e.bl_tree),an(e,s-11,7));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}}function rW(e){var t;for(P6(e,e.dyn_ltree,e.l_desc.max_code),P6(e,e.dyn_dtree,e.d_desc.max_code),Yb(e,e.bl_desc),t=Ub-1;t>=3&&e.bl_tree[E6[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function iW(e,t,n,r){var i;for(an(e,t-257,5),an(e,n-1,5),an(e,r-4,4),i=0;i<r;i++)an(e,e.bl_tree[E6[i]*2+1],3);M6(e,e.dyn_ltree,t-1),M6(e,e.dyn_dtree,n-1)}function aW(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return m6;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return b6;for(n=32;n<pu;n++)if(e.dyn_ltree[n*2]!==0)return b6;return m6}var O6=!1;function oW(e){O6||(tW(),O6=!0),e.l_desc=new qb(e.dyn_ltree,S6),e.d_desc=new qb(e.dyn_dtree,_6),e.bl_desc=new qb(e.bl_tree,C6),e.bi_buf=0,e.bi_valid=0,R6(e)}function L6(e,t,n,r){an(e,(qq<<1)+(r?1:0),3),nW(e,t,n,!0)}function sW(e){an(e,y6<<1,3),Er(e,Hb,Jr),Jq(e)}function cW(e,t,n,r){var i,a,o=0;e.level>0?(e.strm.data_type===jq&&(e.strm.data_type=aW(e)),Yb(e,e.l_desc),Yb(e,e.d_desc),o=rW(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?L6(e,t,n,r):e.strategy===Vq||a===i?(an(e,(y6<<1)+(r?1:0),3),F6(e,Jr,mu)):(an(e,(Wq<<1)+(r?1:0),3),iW(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),F6(e,e.dyn_ltree,e.dyn_dtree)),R6(e),r&&D6(e)}function lW(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(yu[n]+pu+1)*2]++,e.dyn_dtree[k6(t)*2]++),e.last_lit===e.lit_bufsize-1}Rs._tr_init=oW,Rs._tr_stored_block=L6,Rs._tr_flush_block=cW,Rs._tr_tally=lW,Rs._tr_align=sW;function uW(e,t,n,r){for(var i=e&65535|0,a=e>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0}var N6=uW;function fW(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}var hW=fW();function dW(e,t,n,r){var i=hW,a=r+n;e^=-1;for(var o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1}var z6=dW,Zb={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"},Wt=Kr,Cn=Rs,U6=N6,Wi=z6,pW=Zb,mo=0,gW=1,mW=3,Yi=4,$6=5,Sr=0,H6=1,kn=-2,bW=-3,Qb=-5,yW=-1,vW=1,Jd=2,wW=3,xW=4,AW=0,EW=2,e0=8,SW=9,_W=15,CW=8,kW=29,TW=256,Xb=TW+1+kW,IW=30,RW=19,DW=2*Xb+1,BW=15,be=3,Zi=258,er=Zi+be+1,FW=32,t0=42,Kb=69,n0=73,r0=91,i0=103,bo=113,wu=666,yt=1,xu=2,yo=3,Fs=4,PW=3;function Qi(e,t){return e.msg=pW[t],t}function G6(e){return(e<<1)-(e>4?9:0)}function Xi(e){for(var t=e.length;--t>=0;)e[t]=0}function Ki(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Wt.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function Pt(e,t){Cn._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ki(e.strm)}function Se(e,t){e.pending_buf[e.pending++]=t}function Au(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function MW(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Wt.arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=U6(e.adler,t,i,n):e.state.wrap===2&&(e.adler=Wi(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function V6(e,t){var n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-er?e.strstart-(e.w_size-er):0,l=e.window,u=e.w_mask,f=e.prev,h=e.strstart+Zi,d=l[r+o-1],p=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+o]!==p||l[i+o-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(a=Zi-(h-r),r=h-Zi,a>o){if(e.match_start=t,o=a,a>=s)break;d=l[r+o-1],p=l[r+o]}}while((t=f[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead}function vo(e){var t=e.w_size,n,r,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-er)){Wt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);a+=t}if(e.strm.avail_in===0)break;if(r=MW(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=be)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+be-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<be)););}while(e.lookahead<er&&e.strm.avail_in!==0)}function OW(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(vo(e),e.lookahead===0&&t===mo)return yt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Pt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-er&&(Pt(e,!1),e.strm.avail_out===0))return yt}return e.insert=0,t===Yi?(Pt(e,!0),e.strm.avail_out===0?yo:Fs):(e.strstart>e.block_start&&(Pt(e,!1),e.strm.avail_out===0),yt)}function Jb(e,t){for(var n,r;;){if(e.lookahead<er){if(vo(e),e.lookahead<er&&t===mo)return yt;if(e.lookahead===0)break}if(n=0,e.lookahead>=be&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+be-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-er&&(e.match_length=V6(e,n)),e.match_length>=be)if(r=Cn._tr_tally(e,e.strstart-e.match_start,e.match_length-be),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=be){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+be-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=Cn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Pt(e,!1),e.strm.avail_out===0))return yt}return e.insert=e.strstart<be-1?e.strstart:be-1,t===Yi?(Pt(e,!0),e.strm.avail_out===0?yo:Fs):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?yt:xu}function Ps(e,t){for(var n,r,i;;){if(e.lookahead<er){if(vo(e),e.lookahead<er&&t===mo)return yt;if(e.lookahead===0)break}if(n=0,e.lookahead>=be&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+be-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=be-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-er&&(e.match_length=V6(e,n),e.match_length<=5&&(e.strategy===vW||e.match_length===be&&e.strstart-e.match_start>4096)&&(e.match_length=be-1)),e.prev_length>=be&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-be,r=Cn._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-be),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+be-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=be-1,e.strstart++,r&&(Pt(e,!1),e.strm.avail_out===0))return yt}else if(e.match_available){if(r=Cn._tr_tally(e,0,e.window[e.strstart-1]),r&&Pt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return yt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Cn._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<be-1?e.strstart:be-1,t===Yi?(Pt(e,!0),e.strm.avail_out===0?yo:Fs):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?yt:xu}function LW(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=Zi){if(vo(e),e.lookahead<=Zi&&t===mo)return yt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=be&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+Zi;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=Zi-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=be?(n=Cn._tr_tally(e,1,e.match_length-be),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Cn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Pt(e,!1),e.strm.avail_out===0))return yt}return e.insert=0,t===Yi?(Pt(e,!0),e.strm.avail_out===0?yo:Fs):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?yt:xu}function NW(e,t){for(var n;;){if(e.lookahead===0&&(vo(e),e.lookahead===0)){if(t===mo)return yt;break}if(e.match_length=0,n=Cn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Pt(e,!1),e.strm.avail_out===0))return yt}return e.insert=0,t===Yi?(Pt(e,!0),e.strm.avail_out===0?yo:Fs):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?yt:xu}function _r(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var Ms;Ms=[new _r(0,0,0,0,OW),new _r(4,4,8,4,Jb),new _r(4,5,16,8,Jb),new _r(4,6,32,32,Jb),new _r(4,4,16,16,Ps),new _r(8,16,32,32,Ps),new _r(8,16,128,128,Ps),new _r(8,32,128,256,Ps),new _r(32,128,258,1024,Ps),new _r(32,258,258,4096,Ps)];function zW(e){e.window_size=2*e.w_size,Xi(e.head),e.max_lazy_match=Ms[e.level].max_lazy,e.good_match=Ms[e.level].good_length,e.nice_match=Ms[e.level].nice_length,e.max_chain_length=Ms[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=be-1,e.match_available=0,e.ins_h=0}function UW(){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=e0,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 Wt.Buf16(DW*2),this.dyn_dtree=new Wt.Buf16((2*IW+1)*2),this.bl_tree=new Wt.Buf16((2*RW+1)*2),Xi(this.dyn_ltree),Xi(this.dyn_dtree),Xi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Wt.Buf16(BW+1),this.heap=new Wt.Buf16(2*Xb+1),Xi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Wt.Buf16(2*Xb+1),Xi(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function j6(e){var t;return!e||!e.state?Qi(e,kn):(e.total_in=e.total_out=0,e.data_type=EW,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?t0:bo,e.adler=t.wrap===2?0:1,t.last_flush=mo,Cn._tr_init(t),Sr)}function q6(e){var t=j6(e);return t===Sr&&zW(e.state),t}function $W(e,t){return!e||!e.state||e.state.wrap!==2?kn:(e.state.gzhead=t,Sr)}function W6(e,t,n,r,i,a){if(!e)return kn;var o=1;if(t===yW&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>SW||n!==e0||r<8||r>15||t<0||t>9||a<0||a>xW)return Qi(e,kn);r===8&&(r=9);var s=new UW;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+be-1)/be),s.window=new Wt.Buf8(s.w_size*2),s.head=new Wt.Buf16(s.hash_size),s.prev=new Wt.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Wt.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=t,s.strategy=a,s.method=n,q6(e)}function HW(e,t){return W6(e,t,e0,_W,CW,AW)}function GW(e,t){var n,r,i,a;if(!e||!e.state||t>$6||t<0)return e?Qi(e,kn):kn;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===wu&&t!==Yi)return Qi(e,e.avail_out===0?Qb:kn);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===t0)if(r.wrap===2)e.adler=0,Se(r,31),Se(r,139),Se(r,8),r.gzhead?(Se(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Se(r,r.gzhead.time&255),Se(r,r.gzhead.time>>8&255),Se(r,r.gzhead.time>>16&255),Se(r,r.gzhead.time>>24&255),Se(r,r.level===9?2:r.strategy>=Jd||r.level<2?4:0),Se(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(Se(r,r.gzhead.extra.length&255),Se(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Wi(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Kb):(Se(r,0),Se(r,0),Se(r,0),Se(r,0),Se(r,0),Se(r,r.level===9?2:r.strategy>=Jd||r.level<2?4:0),Se(r,PW),r.status=bo);else{var o=e0+(r.w_bits-8<<4)<<8,s=-1;r.strategy>=Jd||r.level<2?s=0:r.level<6?s=1:r.level===6?s=2:s=3,o|=s<<6,r.strstart!==0&&(o|=FW),o+=31-o%31,r.status=bo,Au(r,o),r.strstart!==0&&(Au(r,e.adler>>>16),Au(r,e.adler&65535)),e.adler=1}if(r.status===Kb)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(r.gzhead.extra.length&65535)&&!(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),Ki(e),i=r.pending,r.pending===r.pending_buf_size));)Se(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=n0)}else r.status=n0;if(r.status===n0)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),Ki(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}r.gzindex<r.gzhead.name.length?a=r.gzhead.name.charCodeAt(r.gzindex++)&255:a=0,Se(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=r0)}else r.status=r0;if(r.status===r0)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),Ki(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}r.gzindex<r.gzhead.comment.length?a=r.gzhead.comment.charCodeAt(r.gzindex++)&255:a=0,Se(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=i0)}else r.status=i0;if(r.status===i0&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Ki(e),r.pending+2<=r.pending_buf_size&&(Se(r,e.adler&255),Se(r,e.adler>>8&255),e.adler=0,r.status=bo)):r.status=bo),r.pending!==0){if(Ki(e),e.avail_out===0)return r.last_flush=-1,Sr}else if(e.avail_in===0&&G6(t)<=G6(n)&&t!==Yi)return Qi(e,Qb);if(r.status===wu&&e.avail_in!==0)return Qi(e,Qb);if(e.avail_in!==0||r.lookahead!==0||t!==mo&&r.status!==wu){var c=r.strategy===Jd?NW(r,t):r.strategy===wW?LW(r,t):Ms[r.level].func(r,t);if((c===yo||c===Fs)&&(r.status=wu),c===yt||c===yo)return e.avail_out===0&&(r.last_flush=-1),Sr;if(c===xu&&(t===gW?Cn._tr_align(r):t!==$6&&(Cn._tr_stored_block(r,0,0,!1),t===mW&&(Xi(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Ki(e),e.avail_out===0))return r.last_flush=-1,Sr}return t!==Yi?Sr:r.wrap<=0?H6:(r.wrap===2?(Se(r,e.adler&255),Se(r,e.adler>>8&255),Se(r,e.adler>>16&255),Se(r,e.adler>>24&255),Se(r,e.total_in&255),Se(r,e.total_in>>8&255),Se(r,e.total_in>>16&255),Se(r,e.total_in>>24&255)):(Au(r,e.adler>>>16),Au(r,e.adler&65535)),Ki(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Sr:H6)}function VW(e){var t;return!e||!e.state?kn:(t=e.state.status,t!==t0&&t!==Kb&&t!==n0&&t!==r0&&t!==i0&&t!==bo&&t!==wu?Qi(e,kn):(e.state=null,t===bo?Qi(e,bW):Sr))}function jW(e,t){var n=t.length,r,i,a,o,s,c,l,u;if(!e||!e.state||(r=e.state,o=r.wrap,o===2||o===1&&r.status!==t0||r.lookahead))return kn;for(o===1&&(e.adler=U6(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(o===0&&(Xi(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new Wt.Buf8(r.w_size),Wt.arraySet(u,t,n-r.w_size,r.w_size,0),t=u,n=r.w_size),s=e.avail_in,c=e.next_in,l=e.input,e.avail_in=n,e.next_in=0,e.input=t,vo(r);r.lookahead>=be;){i=r.strstart,a=r.lookahead-(be-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+be-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--a);r.strstart=i,r.lookahead=be-1,vo(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=be-1,r.match_available=0,e.next_in=c,e.input=l,e.avail_in=s,r.wrap=o,Sr}Ar.deflateInit=HW,Ar.deflateInit2=W6,Ar.deflateReset=q6,Ar.deflateResetKeep=j6,Ar.deflateSetHeader=$W,Ar.deflate=GW,Ar.deflateEnd=VW,Ar.deflateSetDictionary=jW,Ar.deflateInfo="pako deflate (from Nodeca project)";var wo={},a0=Kr,Y6=!0,Z6=!0;try{String.fromCharCode.apply(null,[0])}catch{Y6=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Z6=!1}for(var Eu=new a0.Buf8(256),Ji=0;Ji<256;Ji++)Eu[Ji]=Ji>=252?6:Ji>=248?5:Ji>=240?4:Ji>=224?3:Ji>=192?2:1;Eu[254]=Eu[254]=1,wo.string2buf=function(e){var t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new a0.Buf8(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};function Q6(e,t){if(t<65534&&(e.subarray&&Z6||!e.subarray&&Y6))return String.fromCharCode.apply(null,a0.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}wo.buf2binstring=function(e){return Q6(e,e.length)},wo.binstring2buf=function(e){for(var t=new a0.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},wo.buf2string=function(e,t){var n,r,i,a,o=t||e.length,s=new Array(o*2);for(r=0,n=0;n<o;){if(i=e[n++],i<128){s[r++]=i;continue}if(a=Eu[i],a>4){s[r++]=65533,n+=a-1;continue}for(i&=a===2?31:a===3?15:7;a>1&&n<o;)i=i<<6|e[n++]&63,a--;if(a>1){s[r++]=65533;continue}i<65536?s[r++]=i:(i-=65536,s[r++]=55296|i>>10&1023,s[r++]=56320|i&1023)}return Q6(s,r)},wo.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Eu[e[n]]>t?n:t};function qW(){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}var X6=qW,Su=Ar,_u=Kr,ey=wo,ty=Zb,WW=X6,K6=Object.prototype.toString,YW=0,ny=4,Os=0,J6=1,eC=2,ZW=-1,QW=0,XW=8;function xo(e){if(!(this instanceof xo))return new xo(e);this.options=_u.assign({level:ZW,method:XW,chunkSize:16384,windowBits:15,memLevel:8,strategy:QW,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new WW,this.strm.avail_out=0;var n=Su.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Os)throw new Error(ty[n]);if(t.header&&Su.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=ey.string2buf(t.dictionary):K6.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Su.deflateSetDictionary(this.strm,r),n!==Os)throw new Error(ty[n]);this._dict_set=!0}}xo.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;a=t===~~t?t:t===!0?ny:YW,typeof e=="string"?n.input=ey.string2buf(e):K6.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new _u.Buf8(r),n.next_out=0,n.avail_out=r),i=Su.deflate(n,a),i!==J6&&i!==Os)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(a===ny||a===eC))&&(this.options.to==="string"?this.onData(ey.buf2binstring(_u.shrinkBuf(n.output,n.next_out))):this.onData(_u.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==J6);return a===ny?(i=Su.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Os):(a===eC&&(this.onEnd(Os),n.avail_out=0),!0)},xo.prototype.onData=function(e){this.chunks.push(e)},xo.prototype.onEnd=function(e){e===Os&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=_u.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ry(e,t){var n=new xo(t);if(n.push(e,!0),n.err)throw n.msg||ty[n.err];return n.result}function KW(e,t){return t=t||{},t.raw=!0,ry(e,t)}function JW(e,t){return t=t||{},t.gzip=!0,ry(e,t)}du.Deflate=xo,du.deflate=ry,du.deflateRaw=KW,du.gzip=JW;var Cu={},tr={},o0=30,eY=12,tY=function(t,n){var r,i,a,o,s,c,l,u,f,h,d,p,g,b,y,w,A,x,C,_,I,D,M,G,O;r=t.state,i=t.next_in,G=t.input,a=i+(t.avail_in-5),o=t.next_out,O=t.output,s=o-(n-t.avail_out),c=o+(t.avail_out-257),l=r.dmax,u=r.wsize,f=r.whave,h=r.wnext,d=r.window,p=r.hold,g=r.bits,b=r.lencode,y=r.distcode,w=(1<<r.lenbits)-1,A=(1<<r.distbits)-1;e:do{g<15&&(p+=G[i++]<<g,g+=8,p+=G[i++]<<g,g+=8),x=b[p&w];t:for(;;){if(C=x>>>24,p>>>=C,g-=C,C=x>>>16&255,C===0)O[o++]=x&65535;else if(C&16){_=x&65535,C&=15,C&&(g<C&&(p+=G[i++]<<g,g+=8),_+=p&(1<<C)-1,p>>>=C,g-=C),g<15&&(p+=G[i++]<<g,g+=8,p+=G[i++]<<g,g+=8),x=y[p&A];n:for(;;){if(C=x>>>24,p>>>=C,g-=C,C=x>>>16&255,C&16){if(I=x&65535,C&=15,g<C&&(p+=G[i++]<<g,g+=8,g<C&&(p+=G[i++]<<g,g+=8)),I+=p&(1<<C)-1,I>l){t.msg="invalid distance too far back",r.mode=o0;break e}if(p>>>=C,g-=C,C=o-s,I>C){if(C=I-C,C>f&&r.sane){t.msg="invalid distance too far back",r.mode=o0;break e}if(D=0,M=d,h===0){if(D+=u-C,C<_){_-=C;do O[o++]=d[D++];while(--C);D=o-I,M=O}}else if(h<C){if(D+=u+h-C,C-=h,C<_){_-=C;do O[o++]=d[D++];while(--C);if(D=0,h<_){C=h,_-=C;do O[o++]=d[D++];while(--C);D=o-I,M=O}}}else if(D+=h-C,C<_){_-=C;do O[o++]=d[D++];while(--C);D=o-I,M=O}for(;_>2;)O[o++]=M[D++],O[o++]=M[D++],O[o++]=M[D++],_-=3;_&&(O[o++]=M[D++],_>1&&(O[o++]=M[D++]))}else{D=o-I;do O[o++]=O[D++],O[o++]=O[D++],O[o++]=O[D++],_-=3;while(_>2);_&&(O[o++]=O[D++],_>1&&(O[o++]=O[D++]))}}else if(C&64){t.msg="invalid distance code",r.mode=o0;break e}else{x=y[(x&65535)+(p&(1<<C)-1)];continue n}break}}else if(C&64)if(C&32){r.mode=eY;break e}else{t.msg="invalid literal/length code",r.mode=o0;break e}else{x=b[(x&65535)+(p&(1<<C)-1)];continue t}break}}while(i<a&&o<c);_=g>>3,i-=_,g-=_<<3,p&=(1<<g)-1,t.next_in=i,t.next_out=o,t.avail_in=i<a?5+(a-i):5-(i-a),t.avail_out=o<c?257+(c-o):257-(o-c),r.hold=p,r.bits=g},tC=Kr,Ls=15,nC=852,rC=592,iC=0,iy=1,aC=2,nY=[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],rY=[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],iY=[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],aY=[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],oY=function(t,n,r,i,a,o,s,c){var l=c.bits,u=0,f=0,h=0,d=0,p=0,g=0,b=0,y=0,w=0,A=0,x,C,_,I,D,M=null,G=0,O,ae=new tC.Buf16(Ls+1),se=new tC.Buf16(Ls+1),ve=null,Pe=0,st,Ne,lt;for(u=0;u<=Ls;u++)ae[u]=0;for(f=0;f<i;f++)ae[n[r+f]]++;for(p=l,d=Ls;d>=1&&ae[d]===0;d--);if(p>d&&(p=d),d===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,c.bits=1,0;for(h=1;h<d&&ae[h]===0;h++);for(p<h&&(p=h),y=1,u=1;u<=Ls;u++)if(y<<=1,y-=ae[u],y<0)return-1;if(y>0&&(t===iC||d!==1))return-1;for(se[1]=0,u=1;u<Ls;u++)se[u+1]=se[u]+ae[u];for(f=0;f<i;f++)n[r+f]!==0&&(s[se[n[r+f]]++]=f);if(t===iC?(M=ve=s,O=19):t===iy?(M=nY,G-=257,ve=rY,Pe-=257,O=256):(M=iY,ve=aY,O=-1),A=0,f=0,u=h,D=o,g=p,b=0,_=-1,w=1<<p,I=w-1,t===iy&&w>nC||t===aC&&w>rC)return 1;for(;;){st=u-b,s[f]<O?(Ne=0,lt=s[f]):s[f]>O?(Ne=ve[Pe+s[f]],lt=M[G+s[f]]):(Ne=32+64,lt=0),x=1<<u-b,C=1<<g,h=C;do C-=x,a[D+(A>>b)+C]=st<<24|Ne<<16|lt|0;while(C!==0);for(x=1<<u-1;A&x;)x>>=1;if(x!==0?(A&=x-1,A+=x):A=0,f++,--ae[u]===0){if(u===d)break;u=n[r+s[f]]}if(u>p&&(A&I)!==_){for(b===0&&(b=p),D+=h,g=u-b,y=1<<g;g+b<d&&(y-=ae[g+b],!(y<=0));)g++,y<<=1;if(w+=1<<g,t===iy&&w>nC||t===aC&&w>rC)return 1;_=A&I,a[_]=p<<24|g<<16|D-o|0}}return A!==0&&(a[D+A]=u-b<<24|64<<16|0),c.bits=p,0},mn=Kr,ay=N6,Cr=z6,sY=tY,ku=oY,cY=0,oC=1,sC=2,cC=4,lY=5,s0=6,Ao=0,uY=1,fY=2,Tn=-2,lC=-3,uC=-4,hY=-5,fC=8,hC=1,dC=2,pC=3,gC=4,mC=5,bC=6,yC=7,vC=8,wC=9,xC=10,c0=11,ei=12,oy=13,AC=14,sy=15,EC=16,SC=17,_C=18,CC=19,l0=20,u0=21,kC=22,TC=23,IC=24,RC=25,DC=26,cy=27,BC=28,FC=29,Ke=30,PC=31,dY=32,pY=852,gY=592,mY=15,bY=mY;function MC(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function yY(){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 mn.Buf16(320),this.work=new mn.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function OC(e){var t;return!e||!e.state?Tn:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=hC,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new mn.Buf32(pY),t.distcode=t.distdyn=new mn.Buf32(gY),t.sane=1,t.back=-1,Ao)}function LC(e){var t;return!e||!e.state?Tn:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,OC(e))}function NC(e,t){var n,r;return!e||!e.state||(r=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Tn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,LC(e))}function zC(e,t){var n,r;return e?(r=new yY,e.state=r,r.window=null,n=NC(e,t),n!==Ao&&(e.state=null),n):Tn}function vY(e){return zC(e,bY)}var UC=!0,ly,uy;function wY(e){if(UC){var t;for(ly=new mn.Buf32(512),uy=new mn.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ku(oC,e.lens,0,288,ly,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ku(sC,e.lens,0,32,uy,0,e.work,{bits:5}),UC=!1}e.lencode=ly,e.lenbits=9,e.distcode=uy,e.distbits=5}function $C(e,t,n,r){var i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new mn.Buf8(a.wsize)),r>=a.wsize?(mn.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),mn.arraySet(a.window,t,n-r,i,a.wnext),r-=i,r?(mn.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function xY(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p,g,b=0,y,w,A,x,C,_,I,D,M=new mn.Buf8(4),G,O,ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Tn;n=e.state,n.mode===ei&&(n.mode=oy),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,f=s,h=c,D=Ao;e:for(;;)switch(n.mode){case hC:if(n.wrap===0){n.mode=oy;break}for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=Cr(n.check,M,2,0),l=0,u=0,n.mode=dC;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Ke;break}if((l&15)!==fC){e.msg="unknown compression method",n.mode=Ke;break}if(l>>>=4,u-=4,I=(l&15)+8,n.wbits===0)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=Ke;break}n.dmax=1<<I,e.adler=n.check=1,n.mode=l&512?xC:ei,l=0,u=0;break;case dC:for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==fC){e.msg="unknown compression method",n.mode=Ke;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Ke;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Cr(n.check,M,2,0)),l=0,u=0,n.mode=pC;case pC:for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=Cr(n.check,M,4,0)),l=0,u=0,n.mode=gC;case gC:for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Cr(n.check,M,2,0)),l=0,u=0,n.mode=mC;case mC:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Cr(n.check,M,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=bC;case bC:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),mn.arraySet(n.head.extra,r,a,d,I)),n.flags&512&&(n.check=Cr(n.check,r,d,a)),s-=d,a+=d,n.length-=d),n.length))break e;n.length=0,n.mode=yC;case yC:if(n.flags&2048){if(s===0)break e;d=0;do I=r[a+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&(n.check=Cr(n.check,r,d,a)),s-=d,a+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=vC;case vC:if(n.flags&4096){if(s===0)break e;d=0;do I=r[a+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&(n.check=Cr(n.check,r,d,a)),s-=d,a+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=wC;case wC:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Ke;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ei;break;case xC:for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=MC(l),l=0,u=0,n.mode=c0;case c0:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,fY;e.adler=n.check=1,n.mode=ei;case ei:if(t===lY||t===s0)break e;case oy:if(n.last){l>>>=u&7,u-=u&7,n.mode=cy;break}for(;u<3;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=AC;break;case 1:if(wY(n),n.mode=l0,t===s0){l>>>=2,u-=2;break e}break;case 2:n.mode=SC;break;case 3:e.msg="invalid block type",n.mode=Ke}l>>>=2,u-=2;break;case AC:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Ke;break}if(n.length=l&65535,l=0,u=0,n.mode=sy,t===s0)break e;case sy:n.mode=EC;case EC:if(d=n.length,d){if(d>s&&(d=s),d>c&&(d=c),d===0)break e;mn.arraySet(i,r,a,d,o),s-=d,a+=d,c-=d,o+=d,n.length-=d;break}n.mode=ei;break;case SC:for(;u<14;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Ke;break}n.have=0,n.mode=_C;case _C:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.lens[ae[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[ae[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=ku(cY,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid code lengths set",n.mode=Ke;break}n.have=0,n.mode=CC;case CC:for(;n.have<n.nlen+n.ndist;){for(;b=n.lencode[l&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(A<16)l>>>=y,u-=y,n.lens[n.have++]=A;else{if(A===16){for(O=y+2;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(l>>>=y,u-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=Ke;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,u-=2}else if(A===17){for(O=y+3;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=y,u-=y,I=0,d=3+(l&7),l>>>=3,u-=3}else{for(O=y+7;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=y,u-=y,I=0,d=11+(l&127),l>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Ke;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===Ke)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Ke;break}if(n.lenbits=9,G={bits:n.lenbits},D=ku(oC,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid literal/lengths set",n.mode=Ke;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},D=ku(sC,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,D){e.msg="invalid distances set",n.mode=Ke;break}if(n.mode=l0,t===s0)break e;case l0:n.mode=u0;case u0:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,sY(e,h),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===ei&&(n.back=-1);break}for(n.back=0;b=n.lencode[l&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(w&&!(w&240)){for(x=y,C=w,_=A;b=n.lencode[_+((l&(1<<x+C)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=x,u-=x,n.back+=x}if(l>>>=y,u-=y,n.back+=y,n.length=A,w===0){n.mode=DC;break}if(w&32){n.back=-1,n.mode=ei;break}if(w&64){e.msg="invalid literal/length code",n.mode=Ke;break}n.extra=w&15,n.mode=kC;case kC:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=TC;case TC:for(;b=n.distcode[l&(1<<n.distbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(!(w&240)){for(x=y,C=w,_=A;b=n.distcode[_+((l&(1<<x+C)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=x,u-=x,n.back+=x}if(l>>>=y,u-=y,n.back+=y,w&64){e.msg="invalid distance code",n.mode=Ke;break}n.offset=A,n.extra=w&15,n.mode=IC;case IC:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Ke;break}n.mode=RC;case RC:if(c===0)break e;if(d=h-c,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Ke;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),g=n.window}else g=i,p=o-n.offset,d=n.length;d>c&&(d=c),c-=d,n.length-=d;do i[o++]=g[p++];while(--d);n.length===0&&(n.mode=u0);break;case DC:if(c===0)break e;i[o++]=n.length,c--,n.mode=u0;break;case cy:if(n.wrap){for(;u<32;){if(s===0)break e;s--,l|=r[a++]<<u,u+=8}if(h-=c,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?Cr(n.check,i,h,o-h):ay(n.check,i,h,o-h)),h=c,(n.flags?l:MC(l))!==n.check){e.msg="incorrect data check",n.mode=Ke;break}l=0,u=0}n.mode=BC;case BC:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Ke;break}l=0,u=0}n.mode=FC;case FC:D=uY;break e;case Ke:D=lC;break e;case PC:return uC;case dY:default:return Tn}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<Ke&&(n.mode<cy||t!==cC))&&$C(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?Cr(n.check,i,h,e.next_out-h):ay(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===ei?128:0)+(n.mode===l0||n.mode===sy?256:0),(f===0&&h===0||t===cC)&&D===Ao&&(D=hY),D}function AY(e){if(!e||!e.state)return Tn;var t=e.state;return t.window&&(t.window=null),e.state=null,Ao}function EY(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?Tn:(n.head=t,t.done=!1,Ao)}function SY(e,t){var n=t.length,r,i,a;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==c0)?Tn:r.mode===c0&&(i=1,i=ay(i,t,n,0),i!==r.check)?lC:(a=$C(e,t,n,n),a?(r.mode=PC,uC):(r.havedict=1,Ao))}tr.inflateReset=LC,tr.inflateReset2=NC,tr.inflateResetKeep=OC,tr.inflateInit=vY,tr.inflateInit2=zC,tr.inflate=xY,tr.inflateEnd=AY,tr.inflateGetHeader=EY,tr.inflateSetDictionary=SY,tr.inflateInfo="pako inflate (from Nodeca project)";var HC={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};function _Y(){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}var CY=_Y,Ns=tr,Tu=Kr,f0=wo,ht=HC,fy=Zb,kY=X6,TY=CY,GC=Object.prototype.toString;function Eo(e){if(!(this instanceof Eo))return new Eo(e);this.options=Tu.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new kY,this.strm.avail_out=0;var n=Ns.inflateInit2(this.strm,t.windowBits);if(n!==ht.Z_OK)throw new Error(fy[n]);if(this.header=new TY,Ns.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=f0.string2buf(t.dictionary):GC.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Ns.inflateSetDictionary(this.strm,t.dictionary),n!==ht.Z_OK)))throw new Error(fy[n])}Eo.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s,c,l,u=!1;if(this.ended)return!1;o=t===~~t?t:t===!0?ht.Z_FINISH:ht.Z_NO_FLUSH,typeof e=="string"?n.input=f0.binstring2buf(e):GC.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new Tu.Buf8(r),n.next_out=0,n.avail_out=r),a=Ns.inflate(n,ht.Z_NO_FLUSH),a===ht.Z_NEED_DICT&&i&&(a=Ns.inflateSetDictionary(this.strm,i)),a===ht.Z_BUF_ERROR&&u===!0&&(a=ht.Z_OK,u=!1),a!==ht.Z_STREAM_END&&a!==ht.Z_OK)return this.onEnd(a),this.ended=!0,!1;n.next_out&&(n.avail_out===0||a===ht.Z_STREAM_END||n.avail_in===0&&(o===ht.Z_FINISH||o===ht.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=f0.utf8border(n.output,n.next_out),c=n.next_out-s,l=f0.buf2string(n.output,s),n.next_out=c,n.avail_out=r-c,c&&Tu.arraySet(n.output,n.output,s,c,0),this.onData(l)):this.onData(Tu.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(u=!0)}while((n.avail_in>0||n.avail_out===0)&&a!==ht.Z_STREAM_END);return a===ht.Z_STREAM_END&&(o=ht.Z_FINISH),o===ht.Z_FINISH?(a=Ns.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ht.Z_OK):(o===ht.Z_SYNC_FLUSH&&(this.onEnd(ht.Z_OK),n.avail_out=0),!0)},Eo.prototype.onData=function(e){this.chunks.push(e)},Eo.prototype.onEnd=function(e){e===ht.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Tu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function hy(e,t){var n=new Eo(t);if(n.push(e,!0),n.err)throw n.msg||fy[n.err];return n.result}function IY(e,t){return t=t||{},t.raw=!0,hy(e,t)}Cu.Inflate=Eo,Cu.inflate=hy,Cu.inflateRaw=IY,Cu.ungzip=hy;var RY=Kr.assign,DY=du,BY=Cu,FY=HC,VC={};RY(VC,DY,BY,FY);var h0=VC;async function ea(e){try{let t,n=0,r=0;const i=[];let a=0,o;do{const c=e.subarray(n);if(o=new h0.Inflate,{strm:t}=o,o.push(c,h0.Z_SYNC_FLUSH),o.err)throw new Error(o.msg);n+=t.next_in,i[r]=o.result,a+=i[r].length,r+=1}while(t.avail_in);const s=new Uint8Array(a);for(let c=0,l=0;c<i.length;c++)s.set(i[c],l),l+=i[c].length;return we.Buffer.from(s)}catch(t){throw`${t}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function jC(e,t){try{let n;const{minv:r,maxv:i}=t;let a=r.blockPosition,o=r.dataPosition;const s=[],c=[],l=[];let u=0,f=0;do{const p=e.subarray(a-r.blockPosition),g=new h0.Inflate;if({strm:n}=g,g.push(p,h0.Z_SYNC_FLUSH),g.err)throw new Error(g.msg);const b=g.result;s.push(b);let y=b.length;c.push(a),l.push(o),s.length===1&&r.dataPosition&&(s[0]=s[0].subarray(r.dataPosition),y=s[0].length);const w=a;if(a+=n.next_in,o+=y,w>=i.blockPosition){s[f]=s[f].subarray(0,i.blockPosition===r.blockPosition?i.dataPosition-r.dataPosition+1:i.dataPosition+1),c.push(a),l.push(o),u+=s[f].length;break}u+=s[f].length,f++}while(n.avail_in);const h=new Uint8Array(u);for(let p=0,g=0;p<s.length;p++)h.set(s[p],g),g+=s[p].length;return{buffer:we.Buffer.from(h),cpositions:c,dpositions:l}}catch(n){throw`${n}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):n}}var PY=He,In=null;try{In=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function He(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}He.prototype.__isLong__,Object.defineProperty(He.prototype,"__isLong__",{value:!0});function on(e){return(e&&e.__isLong__)===!0}He.isLong=on;var qC={},WC={};function So(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=WC[e],r)?r:(n=Ge(e,(e|0)<0?-1:0,!0),i&&(WC[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=qC[e],r)?r:(n=Ge(e,e<0?-1:0,!1),i&&(qC[e]=n),n))}He.fromInt=So;function Rn(e,t){if(isNaN(e))return t?_o:Dn;if(t){if(e<0)return _o;if(e>=ZC)return e5}else{if(e<=-QC)return sn;if(e+1>=QC)return JC}return e<0?Rn(-e,t).neg():Ge(e%zs|0,e/zs|0,t)}He.fromNumber=Rn;function Ge(e,t,n){return new He(e,t,n)}He.fromBits=Ge;var d0=Math.pow;function dy(e,t,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return Dn;if(typeof t=="number"?(n=t,t=!1):t=!!t,n=n||10,n<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(r===0)return dy(e.substring(1),t,n).neg();for(var i=Rn(d0(n,8)),a=Dn,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),c=parseInt(e.substring(o,o+s),n);if(s<8){var l=Rn(d0(n,s));a=a.mul(l).add(Rn(c))}else a=a.mul(i),a=a.add(Rn(c))}return a.unsigned=t,a}He.fromString=dy;function nr(e,t){return typeof e=="number"?Rn(e,t):typeof e=="string"?dy(e,t):Ge(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}He.fromValue=nr;var YC=65536,MY=1<<24,zs=YC*YC,ZC=zs*zs,QC=ZC/2,XC=So(MY),Dn=So(0);He.ZERO=Dn;var _o=So(0,!0);He.UZERO=_o;var Us=So(1);He.ONE=Us;var KC=So(1,!0);He.UONE=KC;var py=So(-1);He.NEG_ONE=py;var JC=Ge(-1,2147483647,!1);He.MAX_VALUE=JC;var e5=Ge(-1,-1,!0);He.MAX_UNSIGNED_VALUE=e5;var sn=Ge(0,-2147483648,!1);He.MIN_VALUE=sn;var X=He.prototype;X.toInt=function(){return this.unsigned?this.low>>>0:this.low},X.toNumber=function(){return this.unsigned?(this.high>>>0)*zs+(this.low>>>0):this.high*zs+(this.low>>>0)},X.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(sn)){var n=Rn(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var a=Rn(d0(t,6),this.unsigned),o=this,s="";;){var c=o.div(a),l=o.sub(c.mul(a)).toInt()>>>0,u=l.toString(t);if(o=c,o.isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},X.getHighBits=function(){return this.high},X.getHighBitsUnsigned=function(){return this.high>>>0},X.getLowBits=function(){return this.low},X.getLowBitsUnsigned=function(){return this.low>>>0},X.getNumBitsAbs=function(){if(this.isNegative())return this.eq(sn)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,n=31;n>0&&!(t&1<<n);n--);return this.high!=0?n+33:n+1},X.isZero=function(){return this.high===0&&this.low===0},X.eqz=X.isZero,X.isNegative=function(){return!this.unsigned&&this.high<0},X.isPositive=function(){return this.unsigned||this.high>=0},X.isOdd=function(){return(this.low&1)===1},X.isEven=function(){return(this.low&1)===0},X.equals=function(t){return on(t)||(t=nr(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},X.eq=X.equals,X.notEquals=function(t){return!this.eq(t)},X.neq=X.notEquals,X.ne=X.notEquals,X.lessThan=function(t){return this.comp(t)<0},X.lt=X.lessThan,X.lessThanOrEqual=function(t){return this.comp(t)<=0},X.lte=X.lessThanOrEqual,X.le=X.lessThanOrEqual,X.greaterThan=function(t){return this.comp(t)>0},X.gt=X.greaterThan,X.greaterThanOrEqual=function(t){return this.comp(t)>=0},X.gte=X.greaterThanOrEqual,X.ge=X.greaterThanOrEqual,X.compare=function(t){if(on(t)||(t=nr(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},X.comp=X.compare,X.negate=function(){return!this.unsigned&&this.eq(sn)?sn:this.not().add(Us)},X.neg=X.negate,X.add=function(t){on(t)||(t=nr(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,a=this.low&65535,o=t.high>>>16,s=t.high&65535,c=t.low>>>16,l=t.low&65535,u=0,f=0,h=0,d=0;return d+=a+l,h+=d>>>16,d&=65535,h+=i+c,f+=h>>>16,h&=65535,f+=r+s,u+=f>>>16,f&=65535,u+=n+o,u&=65535,Ge(h<<16|d,u<<16|f,this.unsigned)},X.subtract=function(t){return on(t)||(t=nr(t)),this.add(t.neg())},X.sub=X.subtract,X.multiply=function(t){if(this.isZero())return Dn;if(on(t)||(t=nr(t)),In){var n=In.mul(this.low,this.high,t.low,t.high);return Ge(n,In.get_high(),this.unsigned)}if(t.isZero())return Dn;if(this.eq(sn))return t.isOdd()?sn:Dn;if(t.eq(sn))return this.isOdd()?sn:Dn;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(XC)&&t.lt(XC))return Rn(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,a=this.low>>>16,o=this.low&65535,s=t.high>>>16,c=t.high&65535,l=t.low>>>16,u=t.low&65535,f=0,h=0,d=0,p=0;return p+=o*u,d+=p>>>16,p&=65535,d+=a*u,h+=d>>>16,d&=65535,d+=o*l,h+=d>>>16,d&=65535,h+=i*u,f+=h>>>16,h&=65535,h+=a*l,f+=h>>>16,h&=65535,h+=o*c,f+=h>>>16,h&=65535,f+=r*u+i*l+a*c+o*s,f&=65535,Ge(d<<16|p,f<<16|h,this.unsigned)},X.mul=X.multiply,X.divide=function(t){if(on(t)||(t=nr(t)),t.isZero())throw Error("division by zero");if(In){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?In.div_u:In.div_s)(this.low,this.high,t.low,t.high);return Ge(n,In.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?_o:Dn;var r,i,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return _o;if(t.gt(this.shru(1)))return KC;a=_o}else{if(this.eq(sn)){if(t.eq(Us)||t.eq(py))return sn;if(t.eq(sn))return Us;var o=this.shr(1);return r=o.div(t).shl(1),r.eq(Dn)?t.isNegative()?Us:py:(i=this.sub(t.mul(r)),a=r.add(i.div(t)),a)}else if(t.eq(sn))return this.unsigned?_o:Dn;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=Dn}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),c=s<=48?1:d0(2,s-48),l=Rn(r),u=l.mul(t);u.isNegative()||u.gt(i);)r-=c,l=Rn(r,this.unsigned),u=l.mul(t);l.isZero()&&(l=Us),a=a.add(l),i=i.sub(u)}return a},X.div=X.divide,X.modulo=function(t){if(on(t)||(t=nr(t)),In){var n=(this.unsigned?In.rem_u:In.rem_s)(this.low,this.high,t.low,t.high);return Ge(n,In.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},X.mod=X.modulo,X.rem=X.modulo,X.not=function(){return Ge(~this.low,~this.high,this.unsigned)},X.and=function(t){return on(t)||(t=nr(t)),Ge(this.low&t.low,this.high&t.high,this.unsigned)},X.or=function(t){return on(t)||(t=nr(t)),Ge(this.low|t.low,this.high|t.high,this.unsigned)},X.xor=function(t){return on(t)||(t=nr(t)),Ge(this.low^t.low,this.high^t.high,this.unsigned)},X.shiftLeft=function(t){return on(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ge(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Ge(0,this.low<<t-32,this.unsigned)},X.shl=X.shiftLeft,X.shiftRight=function(t){return on(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ge(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Ge(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},X.shr=X.shiftRight,X.shiftRightUnsigned=function(t){if(on(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return Ge(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?Ge(n,0,this.unsigned):Ge(n>>>t-32,0,this.unsigned)},X.shru=X.shiftRightUnsigned,X.shr_u=X.shiftRightUnsigned,X.toSigned=function(){return this.unsigned?Ge(this.low,this.high,!1):this},X.toUnsigned=function(){return this.unsigned?this:Ge(this.low,this.high,!0)},X.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},X.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},X.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},He.fromBytes=function(t,n,r){return r?He.fromBytesLE(t,n):He.fromBytesBE(t,n)},He.fromBytesLE=function(t,n){return new He(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},He.fromBytesBE=function(t,n){return new He(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};const p0=uu(PY),g0=1;class OY{constructor({filehandle:t,path:n}){if(t)this.filehandle=t;else if(n)this.filehandle=new kt(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(t,n=0,r=!0){const i=p0.fromBytesLE(t.slice(n,n+8),r);if(i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return i.toNumber()}_getIndex(){return this.index||(this.index=this._readIndex()),this.index}async _readIndex(){let t=we.Buffer.allocUnsafe(8);await this.filehandle.read(t,0,8,0);const n=this._readLongWithOverflow(t,0,!0);if(!n)return[[0,0]];const r=new Array(n+1);r[0]=[0,0];const i=8*2*n;if(i>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");t=we.Buffer.allocUnsafe(i),await this.filehandle.read(t,0,i,8);for(let a=0;a<n;a+=1){const o=this._readLongWithOverflow(t,a*16),s=this._readLongWithOverflow(t,a*16+8);r[a+1]=[o,s]}return r}async getLastBlock(){const t=await this._getIndex();if(t.length)return t[t.length-1]}async getRelevantBlocksForRead(t,n){const r=n+t;if(t===0)return[];const i=await this._getIndex(),a=[],o=(h,d)=>{const p=h[g0],g=d?d[g0]:1/0;return p<=n&&g>n?0:p<n?-1:1};let s=0,c=i.length-1,l=Math.floor(i.length/2),u=o(i[l],i[l+1]);for(;u!==0;)u>0?c=l-1:u<0&&(s=l+1),l=Math.ceil((c-s)/2)+s,u=o(i[l],i[l+1]);a.push(i[l]);let f=l+1;for(;f<i.length&&(a.push(i[f]),!(i[f][g0]>=r));f+=1);return a[a.length-1][g0]<r&&a.push([]),a}}class t5{constructor({filehandle:t,path:n,gziFilehandle:r,gziPath:i}){if(t)this.filehandle=t;else if(n)this.filehandle=new kt(n);else throw new TypeError("either filehandle or path must be defined");if(!r&&!i&&!n)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new OY({filehandle:r,path:!r&&!i&&n?i:`${n}.gzi`})}async stat(){const t=await this.filehandle.stat();return Object.assign(t,{size:await this.getUncompressedFileSize(),blocks:void 0,blksize:void 0})}async getUncompressedFileSize(){const[,t]=await this.gzi.getLastBlock(),{size:n}=await this.filehandle.stat(),r=we.Buffer.allocUnsafe(4),{bytesRead:i}=await this.filehandle.read(r,0,4,n-28-4);if(i!==4)throw new Error("read error");const a=r.readUInt32LE(0);return t+a}async _readAndUncompressBlock(t,[n],[r]){let i=r;i||(i=(await this.filehandle.stat()).size);const a=i-n;return await this.filehandle.read(t,0,a,n),await ea(t.slice(0,a))}async read(t,n,r,i){const a=await this.gzi.getRelevantBlocksForRead(r,i),o=we.Buffer.allocUnsafe(32768*2);let s=n,c=0;for(let l=0;l<a.length-1;l+=1){const u=await this._readAndUncompressBlock(o,a[l],a[l+1]),[,f]=a[l],h=f>=i?0:i-f,d=Math.min(i+r,f+u.length)-f;h>=0&&h<u.length&&(u.copy(t,s,h,d),s+=d-h,c+=d-h)}return{bytesRead:c,buffer:t}}}function n5(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function LY(e,t){const n=await e.readFile(t);if(!(n&&n.length))throw new Error("No data read from FASTA index (FAI) file");let r=0,i;const a=n.toString("utf8").split(/\r?\n/).filter(o=>/\S/.test(o)).map(o=>o.split(" ")).filter(o=>o[0]!=="").map(o=>((!i||i.name!==o[0])&&(i={name:o[0],id:r},r+=1),{id:i.id,name:o[0],length:+o[1],start:0,end:+o[1],offset:+o[2],lineLength:+o[3],lineBytes:+o[4]}));return{name:Object.fromEntries(a.map(o=>[o.name,o])),id:Object.fromEntries(a.map(o=>[o.id,o]))}}class r5{constructor({fasta:t,fai:n,path:r,faiPath:i,chunkSizeLimit:a=1e6}){if(t)this.fasta=t;else if(r)this.fasta=new kt(r);else throw new Error("Need to pass filehandle for fasta or path to localfile");if(n)this.fai=n;else if(i)this.fai=new kt(i);else if(r)this.fai=new kt(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile");this.chunkSizeLimit=a}async _getIndexes(t){return this.indexes||(this.indexes=LY(this.fai,t)),this.indexes}async getSequenceNames(t){return Object.keys((await this._getIndexes(t)).name)}async getSequenceSizes(t){const n={},r=await this._getIndexes(t),i=Object.values(r.id);for(let a=0;a<i.length;a+=1)n[i[a].name]=i[a].length;return n}async getSequenceSize(t,n){var r;return(r=(await this._getIndexes(n)).name[t])===null||r===void 0?void 0:r.length}async hasReferenceSequence(t,n){return!!(await this._getIndexes(n)).name[t]}async getResiduesById(t,n,r,i){const a=(await this._getIndexes(i)).id[t];if(a)return this._fetchFromIndexEntry(a,n,r,i)}async getResiduesByName(t,n,r,i){const a=(await this._getIndexes(i)).name[t];if(a)return this._fetchFromIndexEntry(a,n,r,i)}async getSequence(t,n,r,i){return this.getResiduesByName(t,n,r,i)}async _fetchFromIndexEntry(t,n=0,r,i){let a=r;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((a===void 0||a>t.length)&&(a=t.length),n>=a)return"";const o=n5(t,n),s=n5(t,a)-o;if(s>this.chunkSizeLimit)throw new Error(`data size of ${s.toLocaleString()} bytes exceeded chunk size limit of ${this.chunkSizeLimit.toLocaleString()} bytes`);const c=Buffer.allocUnsafe(s);return await this.fasta.read(c,0,s,o,i),c.toString("utf8").replace(/\s+/g,"")}}class NY extends r5{constructor({fasta:t,path:n,fai:r,faiPath:i,gzi:a,gziPath:o,chunkSizeLimit:s}){super({fasta:t,path:n,fai:r,faiPath:i,chunkSizeLimit:s}),t&&a?this.fasta=new t5({filehandle:t,gziFilehandle:a}):n&&o&&(this.fasta=new t5({path:n,gziPath:o}))}}function i5(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
3272
- `),[i,...a]=n.split(" "),o=r.join("").replace(/\s/g,"");return{id:i,description:a.join(" "),sequence:o}})}class zY{constructor({fasta:t,path:n}){if(t)this.fasta=t;else if(n)this.fasta=new kt(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const i=r.toString("utf8");return i5(i)})}async fetch(t,n,r){const a=(await this.data).find(s=>s.id===t),o=r-n;if(!a)throw new Error(`no sequence with id ${t} exists`);return a.sequence.substr(n,o)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const UY=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:NY,FetchableSmallFasta:zY,IndexedFasta:r5,parseSmallFasta:i5},Symbol.toStringTag,{value:"Module"})),m0=BigInt(32);function $Y(e,t,n){const r=+!!n,i=+!n;return BigInt(e.getInt32(t,n)*i+e.getInt32(t+4,n)*r)<<m0|BigInt(e.getUint32(t,n)*r+e.getUint32(t+4,n)*i)}function HY(e,t,n){const r=e.getUint32(t,n),i=e.getUint32(t+4,n),a=+!!n,o=+!n;return BigInt(r*o+i*a)<<m0|BigInt(r*a+i*o)}function GY(e,t,n,r){const i=Number(n>>m0),a=Number(n&BigInt(4294967295));r?(e.setInt32(t+4,i,r),e.setUint32(t,a,r)):(e.setInt32(t,i,r),e.setUint32(t+4,a,r))}function VY(e,t,n,r){const i=Number(n>>m0),a=Number(n&BigInt(4294967295));r?(e.setUint32(t+4,i,r),e.setUint32(t,a,r)):(e.setUint32(t,i,r),e.setUint32(t+4,a,r))}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return $Y(this,e,t)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(e,t){return HY(this,e,t)}),"setBigInt64"in DataView||(DataView.prototype.setBigInt64=function(e,t,n){GY(this,e,t,n)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,n){VY(this,e,t,n)});class jY{constructor(t,n){this.code="",this.scopes=[["vars"]],this.bitFields=[],this.tmpVariableCount=0,this.references=new Map,this.imports=[],this.reverseImports=new Map,this.useContextVariables=!1,this.importPath=t,this.useContextVariables=n}generateVariable(t){const n=[...this.scopes[this.scopes.length-1]];return t&&n.push(t),n.join(".")}generateOption(t){switch(typeof t){case"number":return t.toString();case"string":return this.generateVariable(t);case"function":return`${this.addImport(t)}.call(${this.generateVariable()}, vars)`}}generateError(t){this.pushCode(`throw new Error(${t});`)}generateTmpVariable(){return"$tmp"+this.tmpVariableCount++}pushCode(t){this.code+=t+`
3273
- `}pushPath(t){t&&this.scopes[this.scopes.length-1].push(t)}popPath(t){t&&this.scopes[this.scopes.length-1].pop()}pushScope(t){this.scopes.push([t])}popScope(){this.scopes.pop()}addImport(t){if(!this.importPath)return`(${t})`;let n=this.reverseImports.get(t);return n||(n=this.imports.push(t)-1,this.reverseImports.set(t,n)),`${this.importPath}[${n}]`}addReference(t){this.references.has(t)||this.references.set(t,{resolved:!1,requested:!1})}markResolved(t){const n=this.references.get(t);n&&(n.resolved=!0)}markRequested(t){t.forEach(n=>{const r=this.references.get(n);r&&(r.requested=!0)})}getUnresolvedReferences(){return Array.from(this.references).filter(([t,n])=>!n.resolved&&!n.requested).map(([t,n])=>t)}}const rr=new Map,Co="___parser_",ir={uint8:1,uint16le:2,uint16be:2,uint32le:4,uint32be:4,int8:1,int16le:2,int16be:2,int32le:4,int32be:4,int64be:8,int64le:8,uint64be:8,uint64le:8,floatle:4,floatbe:4,doublele:8,doublebe:8},b0={uint8:"Uint8",uint16le:"Uint16",uint16be:"Uint16",uint32le:"Uint32",uint32be:"Uint32",int8:"Int8",int16le:"Int16",int16be:"Int16",int32le:"Int32",int32be:"Int32",int64be:"BigInt64",int64le:"BigInt64",uint64be:"BigUint64",uint64le:"BigUint64",floatle:"Float32",floatbe:"Float32",doublele:"Float64",doublebe:"Float64"},y0={uint8:!1,uint16le:!0,uint16be:!1,uint32le:!0,uint32be:!1,int8:!1,int16le:!0,int16be:!1,int32le:!0,int32be:!1,int64be:!1,int64le:!0,uint64be:!1,uint64le:!0,floatle:!0,floatbe:!1,doublele:!0,doublebe:!1};let Fe=class sr{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new sr}primitiveGenerateN(t,n){const r=b0[t],i=y0[t];n.pushCode(`${n.generateVariable(this.varName)} = dataView.get${r}(offset, ${i});`),n.pushCode(`offset += ${ir[t]};`)}primitiveN(t,n,r){return this.setNextParser(t,n,r)}useThisEndian(t){return t+this.endian.toLowerCase()}uint8(t,n={}){return this.primitiveN("uint8",t,n)}uint16(t,n={}){return this.primitiveN(this.useThisEndian("uint16"),t,n)}uint16le(t,n={}){return this.primitiveN("uint16le",t,n)}uint16be(t,n={}){return this.primitiveN("uint16be",t,n)}uint32(t,n={}){return this.primitiveN(this.useThisEndian("uint32"),t,n)}uint32le(t,n={}){return this.primitiveN("uint32le",t,n)}uint32be(t,n={}){return this.primitiveN("uint32be",t,n)}int8(t,n={}){return this.primitiveN("int8",t,n)}int16(t,n={}){return this.primitiveN(this.useThisEndian("int16"),t,n)}int16le(t,n={}){return this.primitiveN("int16le",t,n)}int16be(t,n={}){return this.primitiveN("int16be",t,n)}int32(t,n={}){return this.primitiveN(this.useThisEndian("int32"),t,n)}int32le(t,n={}){return this.primitiveN("int32le",t,n)}int32be(t,n={}){return this.primitiveN("int32be",t,n)}bigIntVersionCheck(){if(!DataView.prototype.getBigInt64)throw new Error("BigInt64 is unsupported on this runtime")}int64(t,n={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("int64"),t,n)}int64be(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("int64be",t,n)}int64le(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("int64le",t,n)}uint64(t,n={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("uint64"),t,n)}uint64be(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("uint64be",t,n)}uint64le(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("uint64le",t,n)}floatle(t,n={}){return this.primitiveN("floatle",t,n)}floatbe(t,n={}){return this.primitiveN("floatbe",t,n)}doublele(t,n={}){return this.primitiveN("doublele",t,n)}doublebe(t,n={}){return this.primitiveN("doublebe",t,n)}bitN(t,n,r){return r.length=t,this.setNextParser("bit",n,r)}bit1(t,n={}){return this.bitN(1,t,n)}bit2(t,n={}){return this.bitN(2,t,n)}bit3(t,n={}){return this.bitN(3,t,n)}bit4(t,n={}){return this.bitN(4,t,n)}bit5(t,n={}){return this.bitN(5,t,n)}bit6(t,n={}){return this.bitN(6,t,n)}bit7(t,n={}){return this.bitN(7,t,n)}bit8(t,n={}){return this.bitN(8,t,n)}bit9(t,n={}){return this.bitN(9,t,n)}bit10(t,n={}){return this.bitN(10,t,n)}bit11(t,n={}){return this.bitN(11,t,n)}bit12(t,n={}){return this.bitN(12,t,n)}bit13(t,n={}){return this.bitN(13,t,n)}bit14(t,n={}){return this.bitN(14,t,n)}bit15(t,n={}){return this.bitN(15,t,n)}bit16(t,n={}){return this.bitN(16,t,n)}bit17(t,n={}){return this.bitN(17,t,n)}bit18(t,n={}){return this.bitN(18,t,n)}bit19(t,n={}){return this.bitN(19,t,n)}bit20(t,n={}){return this.bitN(20,t,n)}bit21(t,n={}){return this.bitN(21,t,n)}bit22(t,n={}){return this.bitN(22,t,n)}bit23(t,n={}){return this.bitN(23,t,n)}bit24(t,n={}){return this.bitN(24,t,n)}bit25(t,n={}){return this.bitN(25,t,n)}bit26(t,n={}){return this.bitN(26,t,n)}bit27(t,n={}){return this.bitN(27,t,n)}bit28(t,n={}){return this.bitN(28,t,n)}bit29(t,n={}){return this.bitN(29,t,n)}bit30(t,n={}){return this.bitN(30,t,n)}bit31(t,n={}){return this.bitN(31,t,n)}bit32(t,n={}){return this.bitN(32,t,n)}namely(t){return rr.set(t,this),this.alias=t,this}skip(t,n={}){return this.seek(t,n)}seek(t,n={}){if(n.assert)throw new Error("assert option on seek is not allowed.");return this.setNextParser("seek","",{length:t})}string(t,n){if(!n.zeroTerminated&&!n.length&&!n.greedy)throw new Error("One of length, zeroTerminated, or greedy must be defined for string.");if((n.zeroTerminated||n.length)&&n.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(n.stripNull&&!(n.length||n.greedy))throw new Error("length or greedy must be defined if stripNull is enabled.");return n.encoding=n.encoding||"utf8",this.setNextParser("string",t,n)}buffer(t,n){if(!n.length&&!n.readUntil)throw new Error("length or readUntil must be defined for buffer.");return this.setNextParser("buffer",t,n)}wrapped(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.wrapper||!n.type)throw new Error("Both wrapper and type must be defined for wrapped.");if(!n.length&&!n.readUntil)throw new Error("length or readUntil must be defined for wrapped.");return this.setNextParser("wrapper",t,n)}array(t,n){if(!n.readUntil&&!n.length&&!n.lengthInBytes)throw new Error("One of readUntil, length and lengthInBytes must be defined for array.");if(!n.type)throw new Error("type is required for array.");if(typeof n.type=="string"&&!rr.has(n.type)&&!(n.type in ir))throw new Error(`Array element type "${n.type}" is unkown.`);return this.setNextParser("array",t,n)}choice(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n)throw new Error("tag and choices are are required for choice.");if(!n.tag)throw new Error("tag is requird for choice.");if(!n.choices)throw new Error("choices is required for choice.");for(const r in n.choices){const i=parseInt(r,10),a=n.choices[i];if(isNaN(i))throw new Error(`Choice key "${r}" is not a number.`);if(typeof a=="string"&&!rr.has(a)&&!(a in ir))throw new Error(`Choice type "${a}" is unkown.`)}return this.setNextParser("choice",t,n)}nest(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.type)throw new Error("type is required for nest.");if(!(n.type instanceof sr)&&!rr.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof sr)&&!t)throw new Error("type must be a Parser object if the variable name is omitted.");return this.setNextParser("nest",t,n)}pointer(t,n){if(!n.offset)throw new Error("offset is required for pointer.");if(!n.type)throw new Error("type is required for pointer.");if(typeof n.type=="string"&&!(n.type in ir)&&!rr.has(n.type))throw new Error(`Pointer type "${n.type}" is unkown.`);return this.setNextParser("pointer",t,n)}saveOffset(t,n={}){return this.setNextParser("saveOffset",t,n)}endianness(t){switch(t.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error('endianness must be one of "little" or "big"')}return this}endianess(t){return this.endianness(t)}useContextVars(t=!0){return this.useContextVariables=t,this}create(t){if(!(t instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=t,this}getContext(t){const n=new jY(t,this.useContextVariables);return n.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(n),n.pushCode(`return ${Co+this.alias}(0).result;`)):this.addRawCode(n),n}getCode(){const t="imports";return this.getContext(t).code}addRawCode(t){t.pushCode("var offset = 0;"),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("vars.$parent = null;"),t.pushCode("vars.$root = vars;"),this.generate(t),this.resolveReferences(t),t.pushCode("delete vars.$parent;"),t.pushCode("delete vars.$root;"),t.pushCode("return vars;")}addAliasedCode(t){return t.pushCode(`function ${Co+this.alias}(offset, context) {`),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"),t.pushCode("vars = Object.assign(vars, ctx);"),this.generate(t),t.markResolved(this.alias),this.resolveReferences(t),t.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"),t.pushCode("return { offset: offset, result: vars };"),t.pushCode("}"),t}resolveReferences(t){const n=t.getUnresolvedReferences();t.markRequested(n),n.forEach(r=>{var i;(i=rr.get(r))===null||i===void 0||i.addAliasedCode(t)})}compile(){const t="imports",n=this.getContext(t);this.compiled=new Function(t,"TextDecoder",`return function (buffer, constructorFn) { ${n.code} };`)(n.imports,TextDecoder)}sizeOf(){let t=NaN;if(Object.keys(ir).indexOf(this.type)>=0)t=ir[this.type];else if(this.type==="string"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="buffer"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="array"&&typeof this.options.length=="number"){let n=NaN;typeof this.options.type=="string"?n=ir[this.options.type]:this.options.type instanceof sr&&(n=this.options.type.sizeOf()),t=this.options.length*n}else this.type==="seek"?t=this.options.length:this.type==="nest"?t=this.options.type.sizeOf():this.type||(t=0);return this.next&&(t+=this.next.sizeOf()),t}parse(t){return this.compiled||this.compile(),this.compiled(t,this.constructorFn)}setNextParser(t,n,r){const i=new sr;return i.type=t,i.varName=n,i.options=r,i.endian=this.endian,this.head?this.head.next=i:this.next=i,this.head=i,this}generate(t){if(this.type){switch(this.type){case"uint8":case"uint16le":case"uint16be":case"uint32le":case"uint32be":case"int8":case"int16le":case"int16be":case"int32le":case"int32be":case"int64be":case"int64le":case"uint64be":case"uint64le":case"floatle":case"floatbe":case"doublele":case"doublebe":this.primitiveGenerateN(this.type,t);break;case"bit":this.generateBit(t);break;case"string":this.generateString(t);break;case"buffer":this.generateBuffer(t);break;case"seek":this.generateSeek(t);break;case"nest":this.generateNest(t);break;case"array":this.generateArray(t);break;case"choice":this.generateChoice(t);break;case"pointer":this.generatePointer(t);break;case"saveOffset":this.generateSaveOffset(t);break;case"wrapper":this.generateWrapper(t);break}this.type!=="bit"&&this.generateAssert(t)}const n=t.generateVariable(this.varName);return this.options.formatter&&this.type!=="bit"&&this.generateFormatter(t,n,this.options.formatter),this.generateNext(t)}generateAssert(t){if(!this.options.assert)return;const n=t.generateVariable(this.varName);switch(typeof this.options.assert){case"function":{const r=t.addImport(this.options.assert);t.pushCode(`if (!${r}.call(vars, ${n})) {`)}break;case"number":t.pushCode(`if (${this.options.assert} !== ${n}) {`);break;case"string":t.pushCode(`if (${JSON.stringify(this.options.assert)} !== ${n}) {`);break;default:throw new Error("assert option must be a string, number or a function.")}t.generateError(`"Assertion error: ${n} is " + ${JSON.stringify(this.options.assert.toString())}`),t.pushCode("}")}generateNext(t){return this.next&&(t=this.next.generate(t)),t}generateBit(t){const n=JSON.parse(JSON.stringify(this));if(n.options=this.options,n.generateAssert=this.generateAssert.bind(this),n.generateFormatter=this.generateFormatter.bind(this),n.varName=t.generateVariable(n.varName),t.bitFields.push(n),!this.next||this.next&&["bit","nest"].indexOf(this.next.type)<0){const r=t.generateTmpVariable();t.pushCode(`var ${r} = 0;`);const i=(u=0)=>{let f=0;for(let h=u;h<t.bitFields.length;h++){const d=t.bitFields[h].options.length;if(f+d>32)break;f+=d}return f},a=u=>(u<=8?(t.pushCode(`${r} = dataView.getUint8(offset);`),u=8):u<=16?(t.pushCode(`${r} = dataView.getUint16(offset);`),u=16):u<=24?(t.pushCode(`${r} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`),u=24):(t.pushCode(`${r} = dataView.getUint32(offset);`),u=32),t.pushCode(`offset += ${u/8};`),u);let o=0;const s=this.endian==="be";let c=0,l=0;t.bitFields.forEach((u,f)=>{let h=u.options.length;if(h>l){if(l){const g=-1>>>32-l;t.pushCode(`${u.varName} = (${r} & 0x${g.toString(16)}) << ${h-l};`),h-=l}o=0,l=c=a(i(f)-l)}const d=s?c-o-h:o,p=-1>>>32-h;t.pushCode(`${u.varName} ${h<u.options.length?"|=":"="} ${r} >> ${d} & 0x${p.toString(16)};`),u.options.length===32&&t.pushCode(`${u.varName} >>>= 0`),u.options.assert&&u.generateAssert(t),u.options.formatter&&u.generateFormatter(t,u.varName,u.options.formatter),o+=h,l-=h}),t.bitFields=[]}}generateSeek(t){const n=t.generateOption(this.options.length);t.pushCode(`offset += ${n};`)}generateString(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable(),i=this.options.encoding,a=i.toLowerCase()==="hex",o='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){const s=this.options.length;t.pushCode(`var ${r} = offset;`),t.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${r} < ${s});`);const c=`offset - ${r} < ${s} ? offset - 1 : offset`;t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, ${c}), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, ${c}));`)}else if(this.options.length){const s=t.generateOption(this.options.length);t.pushCode(a?`${n} = Array.from(buffer.subarray(offset, offset + ${s}), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(offset, offset + ${s}));`),t.pushCode(`offset += ${s};`)}else this.options.zeroTerminated?(t.pushCode(`var ${r} = offset;`),t.pushCode("while(dataView.getUint8(offset++) !== 0);"),t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, offset - 1), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset - 1));`)):this.options.greedy&&(t.pushCode(`var ${r} = offset;`),t.pushCode("while(buffer.length > offset++);"),t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, offset), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset));`));this.options.stripNull&&t.pushCode(`${n} = ${n}.replace(/\\x00+$/g, '')`)}generateBuffer(t){const n=t.generateVariable(this.varName);if(typeof this.options.readUntil=="function"){const r=this.options.readUntil,i=t.generateTmpVariable(),a=t.generateTmpVariable();t.pushCode(`var ${i} = offset;`),t.pushCode(`var ${a} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${a} = dataView.getUint8(offset);`);const o=t.addImport(r);t.pushCode(`if (${o}.call(${t.generateVariable()}, ${a}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${n} = buffer.subarray(${i}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${n} = buffer.subarray(offset);`);else{const r=t.generateOption(this.options.length);t.pushCode(`${n} = buffer.subarray(offset, offset + ${r});`),t.pushCode(`offset += ${r};`)}this.options.clone&&t.pushCode(`${n} = buffer.constructor.from(${n});`)}generateArray(t){const n=t.generateOption(this.options.length),r=t.generateOption(this.options.lengthInBytes),i=this.options.type,a=t.generateTmpVariable(),o=t.generateVariable(this.varName),s=t.generateTmpVariable(),c=this.options.key,l=typeof c=="string";if(l?t.pushCode(`${o} = {};`):t.pushCode(`${o} = [];`),typeof this.options.readUntil=="function"?t.pushCode("do {"):this.options.readUntil==="eof"?t.pushCode(`for (var ${a} = 0; offset < buffer.length; ${a}++) {`):r!==void 0?t.pushCode(`for (var ${a} = offset + ${r}; offset < ${a}; ) {`):t.pushCode(`for (var ${a} = ${n}; ${a} > 0; ${a}--) {`),typeof i=="string")if(rr.get(i)){const u=t.generateTmpVariable();if(t.pushCode(`var ${u} = ${Co+i}(offset, {`),t.useContextVariables){const f=t.generateVariable();t.pushCode(`$parent: ${f},`),t.pushCode(`$root: ${f}.$root,`),!this.options.readUntil&&r===void 0&&t.pushCode(`$index: ${n} - ${a},`)}t.pushCode("});"),t.pushCode(`var ${s} = ${u}.result; offset = ${u}.offset;`),i!==this.alias&&t.addReference(i)}else{const u=b0[i],f=y0[i];t.pushCode(`var ${s} = dataView.get${u}(offset, ${f});`),t.pushCode(`offset += ${ir[i]};`)}else if(i instanceof sr){t.pushCode(`var ${s} = {};`);const u=t.generateVariable();t.pushScope(s),t.useContextVariables&&(t.pushCode(`${s}.$parent = ${u};`),t.pushCode(`${s}.$root = ${u}.$root;`),!this.options.readUntil&&r===void 0&&t.pushCode(`${s}.$index = ${n} - ${a};`)),i.generate(t),t.useContextVariables&&(t.pushCode(`delete ${s}.$parent;`),t.pushCode(`delete ${s}.$root;`),t.pushCode(`delete ${s}.$index;`)),t.popScope()}if(l?t.pushCode(`${o}[${s}.${c}] = ${s};`):t.pushCode(`${o}.push(${s});`),t.pushCode("}"),typeof this.options.readUntil=="function"){const u=this.options.readUntil,f=t.addImport(u);t.pushCode(`while (!${f}.call(${t.generateVariable()}, ${s}, buffer.subarray(offset)));`)}}generateChoiceCase(t,n,r){if(typeof r=="string"){const i=t.generateVariable(this.varName);if(rr.has(r)){const a=t.generateTmpVariable();t.pushCode(`var ${a} = ${Co+r}(offset, {`),t.useContextVariables&&(t.pushCode(`$parent: ${i}.$parent,`),t.pushCode(`$root: ${i}.$root,`)),t.pushCode("});"),t.pushCode(`${i} = ${a}.result; offset = ${a}.offset;`),r!==this.alias&&t.addReference(r)}else{const a=b0[r],o=y0[r];t.pushCode(`${i} = dataView.get${a}(offset, ${o});`),t.pushCode(`offset += ${ir[r]}`)}}else r instanceof sr&&(t.pushPath(n),r.generate(t),t.popPath(n))}generateChoice(t){const n=t.generateOption(this.options.tag),r=t.generateVariable(this.varName);if(this.varName&&(t.pushCode(`${r} = {};`),t.useContextVariables)){const i=t.generateVariable();t.pushCode(`${r}.$parent = ${i};`),t.pushCode(`${r}.$root = ${i}.$root;`)}t.pushCode(`switch(${n}) {`);for(const i in this.options.choices){const a=parseInt(i,10),o=this.options.choices[a];t.pushCode(`case ${a}:`),this.generateChoiceCase(t,this.varName,o),t.pushCode("break;")}t.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(t,this.varName,this.options.defaultChoice):t.generateError(`"Met undefined tag value " + ${n} + " at choice"`),t.pushCode("}"),this.varName&&t.useContextVariables&&(t.pushCode(`delete ${r}.$parent;`),t.pushCode(`delete ${r}.$root;`))}generateNest(t){const n=t.generateVariable(this.varName);if(this.options.type instanceof sr){if(this.varName&&(t.pushCode(`${n} = {};`),t.useContextVariables)){const r=t.generateVariable();t.pushCode(`${n}.$parent = ${r};`),t.pushCode(`${n}.$root = ${r}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),this.varName&&t.useContextVariables&&t.useContextVariables&&(t.pushCode(`delete ${n}.$parent;`),t.pushCode(`delete ${n}.$root;`))}else if(rr.has(this.options.type)){const r=t.generateTmpVariable();if(t.pushCode(`var ${r} = ${Co+this.options.type}(offset, {`),t.useContextVariables){const i=t.generateVariable();t.pushCode(`$parent: ${i},`),t.pushCode(`$root: ${i}.$root,`)}t.pushCode("});"),t.pushCode(`${n} = ${r}.result; offset = ${r}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}}generateWrapper(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable();if(typeof this.options.readUntil=="function"){const c=this.options.readUntil,l=t.generateTmpVariable(),u=t.generateTmpVariable();t.pushCode(`var ${l} = offset;`),t.pushCode(`var ${u} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${u} = dataView.getUint8(offset);`);const f=t.addImport(c);t.pushCode(`if (${f}.call(${t.generateVariable()}, ${u}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${r} = buffer.subarray(${l}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${r} = buffer.subarray(offset);`);else{const c=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${c});`),t.pushCode(`offset += ${c};`)}this.options.clone&&t.pushCode(`${r} = buffer.constructor.from(${r});`);const i=t.generateTmpVariable(),a=t.generateTmpVariable(),o=t.generateTmpVariable(),s=t.addImport(this.options.wrapper);if(t.pushCode(`${r} = ${s}.call(this, ${r}).subarray(0);`),t.pushCode(`var ${i} = buffer;`),t.pushCode(`var ${a} = offset;`),t.pushCode(`var ${o} = dataView;`),t.pushCode(`buffer = ${r};`),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof sr)this.varName&&t.pushCode(`${n} = {};`),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(rr.has(this.options.type)){const c=t.generateTmpVariable();t.pushCode(`var ${c} = ${Co+this.options.type}(0);`),t.pushCode(`${n} = ${c}.result;`),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode(`buffer = ${i};`),t.pushCode(`dataView = ${o};`),t.pushCode(`offset = ${a};`)}generateFormatter(t,n,r){if(typeof r=="function"){const i=t.addImport(r);t.pushCode(`${n} = ${i}.call(${t.generateVariable()}, ${n});`)}}generatePointer(t){const n=this.options.type,r=t.generateOption(this.options.offset),i=t.generateTmpVariable(),a=t.generateVariable(this.varName);if(t.pushCode(`var ${i} = offset;`),t.pushCode(`offset = ${r};`),this.options.type instanceof sr){if(t.pushCode(`${a} = {};`),t.useContextVariables){const o=t.generateVariable();t.pushCode(`${a}.$parent = ${o};`),t.pushCode(`${a}.$root = ${o}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode(`delete ${a}.$parent;`),t.pushCode(`delete ${a}.$root;`))}else if(rr.has(this.options.type)){const o=t.generateTmpVariable();if(t.pushCode(`var ${o} = ${Co+this.options.type}(offset, {`),t.useContextVariables){const s=t.generateVariable();t.pushCode(`$parent: ${s},`),t.pushCode(`$root: ${s}.$root,`)}t.pushCode("});"),t.pushCode(`${a} = ${o}.result; offset = ${o}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(ir).indexOf(this.options.type)>=0){const o=b0[n],s=y0[n];t.pushCode(`${a} = dataView.get${o}(offset, ${s});`),t.pushCode(`offset += ${ir[n]};`)}t.pushCode(`offset = ${i};`)}generateSaveOffset(t){const n=t.generateVariable(this.varName);t.pushCode(`${n} = offset`)}};var a5={},gy={},ko={},Iu={};Object.defineProperty(Iu,"__esModule",{value:!0});function my(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function by(e,t,n){return t&&o5(e.prototype,t),n&&o5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yy(e,t)}function $s(e){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$s(e)}function yy(e,t){return yy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},yy(e,t)}function WY(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ru(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YY(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ru(e)}function ZY(e){var t=WY();return function(){var r=$s(e),i;if(t){var a=$s(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return YY(this,i)}}function QY(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=$s(e),e!==null););return e}function v0(){return typeof Reflect<"u"&&Reflect.get?v0=Reflect.get.bind():v0=function(t,n,r){var i=QY(t,n);if(i){var a=Object.getOwnPropertyDescriptor(i,n);return a.get?a.get.call(arguments.length<3?t:r):a.value}},v0.apply(this,arguments)}var s5=function(){function e(){my(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return by(e,[{key:"addEventListener",value:function(n,r,i){n in this.listeners||(this.listeners[n]=[]),this.listeners[n].push({callback:r,options:i})}},{key:"removeEventListener",value:function(n,r){if(n in this.listeners){for(var i=this.listeners[n],a=0,o=i.length;a<o;a++)if(i[a].callback===r){i.splice(a,1);return}}}},{key:"dispatchEvent",value:function(n){if(n.type in this.listeners){for(var r=this.listeners[n.type],i=r.slice(),a=0,o=i.length;a<o;a++){var s=i[a];try{s.callback.call(this,n)}catch(c){Promise.resolve().then(function(){throw c})}s.options&&s.options.once&&this.removeEventListener(n.type,s.callback)}return!n.defaultPrevented}}}]),e}(),vy=function(e){qY(n,e);var t=ZY(n);function n(){var r;return my(this,n),r=t.call(this),r.listeners||s5.call(Ru(r)),Object.defineProperty(Ru(r),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(Ru(r),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(Ru(r),"reason",{value:void 0,writable:!0,configurable:!0}),r}return by(n,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(i){i.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,i)),v0($s(n.prototype),"dispatchEvent",this).call(this,i)}}]),n}(s5),c5=function(){function e(){my(this,e),Object.defineProperty(this,"signal",{value:new vy,writable:!0,configurable:!0})}return by(e,[{key:"abort",value:function(n){var r;try{r=new Event("abort")}catch{typeof document<"u"?document.createEvent?(r=document.createEvent("Event"),r.initEvent("abort",!1,!1)):(r=document.createEventObject(),r.type="abort"):r={type:"abort",bubbles:!1,cancelable:!1}}var i=n;if(i===void 0)if(typeof document>"u")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch{i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(r)}},{key:"toString",value:function(){return"[object AbortController]"}}]),e}();typeof Symbol<"u"&&Symbol.toStringTag&&(c5.prototype[Symbol.toStringTag]="AbortController",vy.prototype[Symbol.toStringTag]="AbortSignal");function XY(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function KY(e){typeof e=="function"&&(e={fetch:e});var t=e,n=t.fetch,r=t.Request,i=r===void 0?n.Request:r,a=t.AbortController,o=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,s=o===void 0?!1:o;if(!XY({fetch:n,Request:i,AbortController:a,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:n,Request:c};var c=i;(c&&!c.prototype.hasOwnProperty("signal")||s)&&(c=function(h,d){var p;d&&d.signal&&(p=d.signal,delete d.signal);var g=new i(h,d);return p&&Object.defineProperty(g,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),g},c.prototype=i.prototype);var l=n,u=function(h,d){var p=c&&c.prototype.isPrototypeOf(h)?h.signal:d?d.signal:void 0;if(p){var g;try{g=new DOMException("Aborted","AbortError")}catch{g=new Error("Aborted"),g.name="AbortError"}if(p.aborted)return Promise.reject(g);var b=new Promise(function(y,w){p.addEventListener("abort",function(){return w(g)},{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([b,l(h,d)])}return l(h,d)};return{fetch:u,Request:c}}Iu.AbortController=c5,Iu.AbortSignal=vy,Iu.abortableFetch=KY,Object.defineProperty(ko,"__esModule",{value:!0}),ko.AbortSignal=ko.AbortController=void 0;const l5=Iu;var w0=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")};let JY=typeof w0().AbortController>"u"?l5.AbortController:w0().AbortController;ko.AbortController=JY;let eZ=typeof w0().AbortController>"u"?l5.AbortSignal:w0().AbortSignal;ko.AbortSignal=eZ;var wy={};Object.defineProperty(wy,"__esModule",{value:!0});const tZ=ko;class nZ{}class rZ{constructor(){this.signals=new Set,this.abortController=new tZ.AbortController}addSignal(t=new nZ){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(t),t.aborted?this.handleAborted(t):typeof t.addEventListener=="function"&&t.addEventListener("abort",()=>{this.handleAborted(t)})}handleAborted(t){this.signals.delete(t),this.signals.size===0&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}wy.default=rZ;var xy={};Object.defineProperty(xy,"__esModule",{value:!0});class iZ{constructor(){this.callbacks=new Set}addCallback(t=()=>{}){this.callbacks.add(t),t(this.currentMessage)}callback(t){this.currentMessage=t,this.callbacks.forEach(n=>{n(t)})}}xy.default=iZ;var u5=Zd&&Zd.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gy,"__esModule",{value:!0});const aZ=ko,oZ=u5(wy),sZ=u5(xy);class x0{constructor({fill:t,cache:n}){if(typeof t!="function")throw new TypeError("must pass a fill function");if(typeof n!="object")throw new TypeError("must pass a cache object");if(typeof n.get!="function"||typeof n.set!="function"||typeof n.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=n,this.fillCallback=t}static isAbortException(t){return t.name==="AbortError"||t.code==="ERR_ABORTED"||t.message==="AbortError: aborted"||t.message==="Error: aborted"}evict(t,n){this.cache.get(t)===n&&this.cache.delete(t)}fill(t,n,r,i){const a=new oZ.default,o=new sZ.default;o.addCallback(i);const s={aborter:a,promise:this.fillCallback(n,a.signal,c=>{o.callback(c)}),settled:!1,statusReporter:o,get aborted(){return this.aborter.signal.aborted}};s.aborter.addSignal(r),s.aborter.signal.addEventListener("abort",()=>{s.settled||this.evict(t,s)}),s.promise.then(()=>{s.settled=!0},()=>{s.settled=!0,this.evict(t,s)}).catch(c=>{throw console.error(c),c}),this.cache.set(t,s)}static checkSinglePromise(t,n){function r(){if(n&&n.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return t.then(i=>(r(),i),i=>{throw r(),i})}has(t){return this.cache.has(t)}get(t,n,r,i){if(!r&&n instanceof aZ.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const a=this.cache.get(t);return a?a.aborted&&!a.settled?(this.evict(t,a),this.get(t,n,r,i)):a.settled?a.promise:(a.aborter.addSignal(r),a.statusReporter.addCallback(i),x0.checkSinglePromise(a.promise,r)):(this.fill(t,n,r,i),x0.checkSinglePromise(this.cache.get(t).promise,r))}delete(t){const n=this.cache.get(t);n&&(n.settled||n.aborter.abort(),this.cache.delete(t))}clear(){const t=this.cache.keys();let n=0;for(let r=t.next();!r.done;r=t.next())this.delete(r.value),n+=1;return n}}gy.default=x0;var cZ=Zd&&Zd.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a5,"__esModule",{value:!0});const lZ=cZ(gy);var A0=a5.default=lZ.default;class uZ{constructor(t={}){if(!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=t.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(t,n){this.cache.set(t,n),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t)){const n=this.oldCache.get(t);return this.oldCache.delete(t),this._set(t,n),n}}set(t,n){return this.cache.has(t)?this.cache.set(t,n):this._set(t,n),this}has(t){return this.cache.has(t)||this.oldCache.has(t)}peek(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t))return this.oldCache.get(t)}delete(t){const n=this.cache.delete(t);return n&&this._size--,this.oldCache.delete(t)||n}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache)yield t;for(const t of this.oldCache){const[n]=t;this.cache.has(n)||(yield t)}}get size(){let t=0;for(const n of this.oldCache.keys())this.cache.has(n)||t++;return this._size+t}}var fZ=uZ;const E0=uu(fZ);class ta{constructor(t,n){this.ranges=arguments.length===2?[{min:t,max:n}]:0 in t?Object.assign({},t):[t]}min(){return this.ranges[0].min}max(){return this.ranges[this.ranges.length-1].max}contains(t){for(let n=0;n<this.ranges.length;n+=1){const r=this.ranges[n];if(r.min<=t&&r.max>=t)return!0}return!1}isContiguous(){return this.ranges.length>1}getRanges(){return this.ranges.map(t=>new ta(t.min,t.max))}toString(){return this.ranges.map(t=>`[${t.min}-${t.max}]`).join(",")}union(t){const n=this.getRanges().concat(t.getRanges()).sort(this.rangeOrder),r=[];let i=n[0];for(let a=1;a<n.length;a+=1){const o=n[a];o.min()>i.max()+1?(r.push(i),i=o):o.max()>i.max()&&(i=new ta(i.min(),o.max()))}return r.push(i),r.length===1?r[0]:new ta(r)}intersection(t){let n=this,r=t;const i=this.ranges(),a=r.ranges(),o=i.length,s=a.length;let c=0,l=0;const u=[];for(;c<o&&l<s;){n=i[c],r=a[l];const f=Math.max(n.min(),r.min()),h=Math.min(n.max(),r.max());h>=f&&u.push(new ta(f,h)),n.max()>r.max()?l+=1:c+=1}if(u.length===0)throw new Error("found range of length 0");return u.length===1?u[0]:new ta(u)}coverage(){let t=0;const n=this.ranges();for(const r of n)t+=r.max()-r.min()+1;return t}rangeOrder(t,n){let r=t,i=n;return arguments.length<2&&(i=r,r=this),r.min()<i.min()?-1:r.min()>i.min()?1:r.max()<i.max()?-1:i.max()>r.max()?1:0}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const hZ=4,f5=0,h5=1,dZ=2;function Hs(e){let t=e.length;for(;--t>=0;)e[t]=0}const pZ=0,d5=1,gZ=2,mZ=3,bZ=258,Ay=29,Du=256,Bu=Du+1+Ay,Gs=30,Ey=19,p5=2*Bu+1,To=15,Sy=16,yZ=7,_y=256,g5=16,m5=17,b5=18,Cy=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]),S0=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]),vZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),y5=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),wZ=512,ti=new Array((Bu+2)*2);Hs(ti);const Fu=new Array(Gs*2);Hs(Fu);const Pu=new Array(wZ);Hs(Pu);const Mu=new Array(bZ-mZ+1);Hs(Mu);const ky=new Array(Ay);Hs(ky);const _0=new Array(Gs);Hs(_0);function Ty(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let v5,w5,x5;function Iy(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const A5=e=>e<256?Pu[e]:Pu[256+(e>>>7)],Ou=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},cn=(e,t,n)=>{e.bi_valid>Sy-n?(e.bi_buf|=t<<e.bi_valid&65535,Ou(e,e.bi_buf),e.bi_buf=t>>Sy-e.bi_valid,e.bi_valid+=n-Sy):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},kr=(e,t,n)=>{cn(e,n[t*2],n[t*2+1])},E5=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},xZ=e=>{e.bi_valid===16?(Ou(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},AZ=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,u,f,h,d,p,g=0;for(h=0;h<=To;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<p5;l++)u=e.heap[l],h=n[n[u*2+1]*2+1]+1,h>c&&(h=c,g++),n[u*2+1]=h,!(u>r)&&(e.bl_count[h]++,d=0,u>=s&&(d=o[u-s]),p=n[u*2],e.opt_len+=p*(h+d),a&&(e.static_len+=p*(i[u*2+1]+d)));if(g!==0){do{for(h=c-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(h=c;h!==0;h--)for(u=e.bl_count[h];u!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),u--)}},S5=(e,t,n)=>{const r=new Array(To+1);let i=0,a,o;for(a=1;a<=To;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let s=e[o*2+1];s!==0&&(e[o*2]=E5(r[s]++,s))}},EZ=()=>{let e,t,n,r,i;const a=new Array(To+1);for(n=0,r=0;r<Ay-1;r++)for(ky[r]=n,e=0;e<1<<Cy[r];e++)Mu[n++]=r;for(Mu[n-1]=r,i=0,r=0;r<16;r++)for(_0[r]=i,e=0;e<1<<S0[r];e++)Pu[i++]=r;for(i>>=7;r<Gs;r++)for(_0[r]=i<<7,e=0;e<1<<S0[r]-7;e++)Pu[256+i++]=r;for(t=0;t<=To;t++)a[t]=0;for(e=0;e<=143;)ti[e*2+1]=8,e++,a[8]++;for(;e<=255;)ti[e*2+1]=9,e++,a[9]++;for(;e<=279;)ti[e*2+1]=7,e++,a[7]++;for(;e<=287;)ti[e*2+1]=8,e++,a[8]++;for(S5(ti,Bu+1,a),e=0;e<Gs;e++)Fu[e*2+1]=5,Fu[e*2]=E5(e,5);v5=new Ty(ti,Cy,Du+1,Bu,To),w5=new Ty(Fu,S0,0,Gs,To),x5=new Ty(new Array(0),vZ,0,Ey,yZ)},_5=e=>{let t;for(t=0;t<Bu;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Gs;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Ey;t++)e.bl_tree[t*2]=0;e.dyn_ltree[_y*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},C5=e=>{e.bi_valid>8?Ou(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},k5=(e,t,n,r)=>{const i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},Ry=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&k5(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!k5(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},T5=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?kr(e,i,t):(o=Mu[i],kr(e,o+Du+1,t),s=Cy[o],s!==0&&(i-=ky[o],cn(e,i,s)),r--,o=A5(r),kr(e,o,n),s=S0[o],s!==0&&(r-=_0[o],cn(e,r,s)));while(a<e.sym_next);kr(e,_y,t)},Dy=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems;let o,s,c=-1,l;for(e.heap_len=0,e.heap_max=p5,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)Ry(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ry(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,Ry(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],AZ(e,t),S5(n,c,e.bl_count)},I5=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[g5*2]++):s<=10?e.bl_tree[m5*2]++:e.bl_tree[b5*2]++,s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},R5=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do kr(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(kr(e,a,e.bl_tree),s--),kr(e,g5,e.bl_tree),cn(e,s-3,2)):s<=10?(kr(e,m5,e.bl_tree),cn(e,s-3,3)):(kr(e,b5,e.bl_tree),cn(e,s-11,7));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},SZ=e=>{let t;for(I5(e,e.dyn_ltree,e.l_desc.max_code),I5(e,e.dyn_dtree,e.d_desc.max_code),Dy(e,e.bl_desc),t=Ey-1;t>=3&&e.bl_tree[y5[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},_Z=(e,t,n,r)=>{let i;for(cn(e,t-257,5),cn(e,n-1,5),cn(e,r-4,4),i=0;i<r;i++)cn(e,e.bl_tree[y5[i]*2+1],3);R5(e,e.dyn_ltree,t-1),R5(e,e.dyn_dtree,n-1)},CZ=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return f5;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return h5;for(n=32;n<Du;n++)if(e.dyn_ltree[n*2]!==0)return h5;return f5};let D5=!1;const kZ=e=>{D5||(EZ(),D5=!0),e.l_desc=new Iy(e.dyn_ltree,v5),e.d_desc=new Iy(e.dyn_dtree,w5),e.bl_desc=new Iy(e.bl_tree,x5),e.bi_buf=0,e.bi_valid=0,_5(e)},B5=(e,t,n,r)=>{cn(e,(pZ<<1)+(r?1:0),3),C5(e),Ou(e,n),Ou(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},TZ=e=>{cn(e,d5<<1,3),kr(e,_y,ti),xZ(e)},IZ=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===dZ&&(e.strm.data_type=CZ(e)),Dy(e,e.l_desc),Dy(e,e.d_desc),o=SZ(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?B5(e,t,n,r):e.strategy===hZ||a===i?(cn(e,(d5<<1)+(r?1:0),3),T5(e,ti,Fu)):(cn(e,(gZ<<1)+(r?1:0),3),_Z(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),T5(e,e.dyn_ltree,e.dyn_dtree)),_5(e),r&&C5(e)},RZ=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Mu[n]+Du+1)*2]++,e.dyn_dtree[A5(t)*2]++),e.sym_next===e.sym_end);var DZ=kZ,BZ=B5,FZ=IZ,PZ=RZ,MZ=TZ,OZ={_tr_init:DZ,_tr_stored_block:BZ,_tr_flush_block:FZ,_tr_tally:PZ,_tr_align:MZ},Lu=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};const LZ=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},NZ=new Uint32Array(LZ());var Tt=(e,t,n,r)=>{const i=NZ,a=r+n;e^=-1;for(let o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1},Vs={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"},Nu={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:zZ,_tr_stored_block:By,_tr_flush_block:UZ,_tr_tally:na,_tr_align:$Z}=OZ,{Z_NO_FLUSH:ra,Z_PARTIAL_FLUSH:HZ,Z_FULL_FLUSH:GZ,Z_FINISH:Bn,Z_BLOCK:F5,Z_OK:Mt,Z_STREAM_END:P5,Z_STREAM_ERROR:Tr,Z_DATA_ERROR:VZ,Z_BUF_ERROR:Fy,Z_DEFAULT_COMPRESSION:jZ,Z_FILTERED:qZ,Z_HUFFMAN_ONLY:C0,Z_RLE:WZ,Z_FIXED:YZ,Z_DEFAULT_STRATEGY:ZZ,Z_UNKNOWN:QZ,Z_DEFLATED:k0}=Nu,XZ=9,KZ=15,JZ=8,eQ=29,Py=256+1+eQ,tQ=30,nQ=19,rQ=2*Py+1,iQ=15,ye=3,ia=258,Ir=ia+ye+1,aQ=32,js=42,My=57,Oy=69,Ly=73,Ny=91,zy=103,Io=113,zu=666,Yt=1,qs=2,Ro=3,Ws=4,oQ=3,Do=(e,t)=>(e.msg=Vs[t],t),M5=e=>e*2-(e>4?9:0),aa=e=>{let t=e.length;for(;--t>=0;)e[t]=0},sQ=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)};let oa=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const bn=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},yn=(e,t)=>{UZ(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,bn(e.strm)},Ce=(e,t)=>{e.pending_buf[e.pending++]=t},Uu=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Uy=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Lu(e.adler,t,i,n):e.state.wrap===2&&(e.adler=Tt(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},O5=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-Ir?e.strstart-(e.w_size-Ir):0,l=e.window,u=e.w_mask,f=e.prev,h=e.strstart+ia;let d=l[r+o-1],p=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+o]!==p||l[i+o-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(a=ia-(h-r),r=h-ia,a>o){if(e.match_start=t,o=a,a>=s)break;d=l[r+o-1],p=l[r+o]}}while((t=f[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},Ys=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ir)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),sQ(e),r+=t),e.strm.avail_in===0)break;if(n=Uy(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=ye)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=oa(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=oa(e,e.ins_h,e.window[i+ye-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<ye)););}while(e.lookahead<Ir&&e.strm.avail_in!==0)},L5=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==Bn||t===ra||r!==i+e.strm.avail_in)))break;o=t===Bn&&r===i+e.strm.avail_in?1:0,By(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,bn(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Uy(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?Ws:t!==ra&&t!==Bn&&e.strm.avail_in===0&&e.strstart===e.block_start?qs:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(Uy(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===Bn)&&t!==ra&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=t===Bn&&e.strm.avail_in===0&&r===i?1:0,By(e,e.block_start,r,o),e.block_start+=r,bn(e.strm)),o?Ro:Yt)},$y=(e,t)=>{let n,r;for(;;){if(e.lookahead<Ir){if(Ys(e),e.lookahead<Ir&&t===ra)return Yt;if(e.lookahead===0)break}if(n=0,e.lookahead>=ye&&(e.ins_h=oa(e,e.ins_h,e.window[e.strstart+ye-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Ir&&(e.match_length=O5(e,n)),e.match_length>=ye)if(r=na(e,e.strstart-e.match_start,e.match_length-ye),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ye){e.match_length--;do e.strstart++,e.ins_h=oa(e,e.ins_h,e.window[e.strstart+ye-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=oa(e,e.ins_h,e.window[e.strstart+1]);else r=na(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(yn(e,!1),e.strm.avail_out===0))return Yt}return e.insert=e.strstart<ye-1?e.strstart:ye-1,t===Bn?(yn(e,!0),e.strm.avail_out===0?Ro:Ws):e.sym_next&&(yn(e,!1),e.strm.avail_out===0)?Yt:qs},Zs=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<Ir){if(Ys(e),e.lookahead<Ir&&t===ra)return Yt;if(e.lookahead===0)break}if(n=0,e.lookahead>=ye&&(e.ins_h=oa(e,e.ins_h,e.window[e.strstart+ye-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=ye-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Ir&&(e.match_length=O5(e,n),e.match_length<=5&&(e.strategy===qZ||e.match_length===ye&&e.strstart-e.match_start>4096)&&(e.match_length=ye-1)),e.prev_length>=ye&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-ye,r=na(e,e.strstart-1-e.prev_match,e.prev_length-ye),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=oa(e,e.ins_h,e.window[e.strstart+ye-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=ye-1,e.strstart++,r&&(yn(e,!1),e.strm.avail_out===0))return Yt}else if(e.match_available){if(r=na(e,0,e.window[e.strstart-1]),r&&yn(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Yt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=na(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<ye-1?e.strstart:ye-1,t===Bn?(yn(e,!0),e.strm.avail_out===0?Ro:Ws):e.sym_next&&(yn(e,!1),e.strm.avail_out===0)?Yt:qs},cQ=(e,t)=>{let n,r,i,a;const o=e.window;for(;;){if(e.lookahead<=ia){if(Ys(e),e.lookahead<=ia&&t===ra)return Yt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=ye&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+ia;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=ia-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ye?(n=na(e,1,e.match_length-ye),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=na(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(yn(e,!1),e.strm.avail_out===0))return Yt}return e.insert=0,t===Bn?(yn(e,!0),e.strm.avail_out===0?Ro:Ws):e.sym_next&&(yn(e,!1),e.strm.avail_out===0)?Yt:qs},lQ=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Ys(e),e.lookahead===0)){if(t===ra)return Yt;break}if(e.match_length=0,n=na(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(yn(e,!1),e.strm.avail_out===0))return Yt}return e.insert=0,t===Bn?(yn(e,!0),e.strm.avail_out===0?Ro:Ws):e.sym_next&&(yn(e,!1),e.strm.avail_out===0)?Yt:qs};function Rr(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const $u=[new Rr(0,0,0,0,L5),new Rr(4,4,8,4,$y),new Rr(4,5,16,8,$y),new Rr(4,6,32,32,$y),new Rr(4,4,16,16,Zs),new Rr(8,16,32,32,Zs),new Rr(8,16,128,128,Zs),new Rr(8,32,128,256,Zs),new Rr(32,128,258,1024,Zs),new Rr(32,258,258,4096,Zs)],uQ=e=>{e.window_size=2*e.w_size,aa(e.head),e.max_lazy_match=$u[e.level].max_lazy,e.good_match=$u[e.level].good_length,e.nice_match=$u[e.level].nice_length,e.max_chain_length=$u[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ye-1,e.match_available=0,e.ins_h=0};function fQ(){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=k0,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(rQ*2),this.dyn_dtree=new Uint16Array((2*tQ+1)*2),this.bl_tree=new Uint16Array((2*nQ+1)*2),aa(this.dyn_ltree),aa(this.dyn_dtree),aa(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(iQ+1),this.heap=new Uint16Array(2*Py+1),aa(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Py+1),aa(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 Hu=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==js&&t.status!==My&&t.status!==Oy&&t.status!==Ly&&t.status!==Ny&&t.status!==zy&&t.status!==Io&&t.status!==zu?1:0},N5=e=>{if(Hu(e))return Do(e,Tr);e.total_in=e.total_out=0,e.data_type=QZ;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?My:t.wrap?js:Io,e.adler=t.wrap===2?0:1,t.last_flush=-2,zZ(t),Mt},z5=e=>{const t=N5(e);return t===Mt&&uQ(e.state),t},hQ=(e,t)=>Hu(e)||e.state.wrap!==2?Tr:(e.state.gzhead=t,Mt),U5=(e,t,n,r,i,a)=>{if(!e)return Tr;let o=1;if(t===jZ&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>XZ||n!==k0||r<8||r>15||t<0||t>9||a<0||a>YZ||r===8&&o!==1)return Do(e,Tr);r===8&&(r=9);const s=new fQ;return e.state=s,s.strm=e,s.status=js,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+ye-1)/ye),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=a,s.method=n,z5(e)},dQ=(e,t)=>U5(e,t,k0,KZ,JZ,ZZ),pQ=(e,t)=>{if(Hu(e)||t>F5||t<0)return e?Do(e,Tr):Tr;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===zu&&t!==Bn)return Do(e,e.avail_out===0?Fy:Tr);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(bn(e),e.avail_out===0)return n.last_flush=-1,Mt}else if(e.avail_in===0&&M5(t)<=M5(r)&&t!==Bn)return Do(e,Fy);if(n.status===zu&&e.avail_in!==0)return Do(e,Fy);if(n.status===js&&n.wrap===0&&(n.status=Io),n.status===js){let i=k0+(n.w_bits-8<<4)<<8,a=-1;if(n.strategy>=C0||n.level<2?a=0:n.level<6?a=1:n.level===6?a=2:a=3,i|=a<<6,n.strstart!==0&&(i|=aQ),i+=31-i%31,Uu(n,i),n.strstart!==0&&(Uu(n,e.adler>>>16),Uu(n,e.adler&65535)),e.adler=1,n.status=Io,bn(e),n.pending!==0)return n.last_flush=-1,Mt}if(n.status===My){if(e.adler=0,Ce(n,31),Ce(n,139),Ce(n,8),n.gzhead)Ce(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)),Ce(n,n.gzhead.time&255),Ce(n,n.gzhead.time>>8&255),Ce(n,n.gzhead.time>>16&255),Ce(n,n.gzhead.time>>24&255),Ce(n,n.level===9?2:n.strategy>=C0||n.level<2?4:0),Ce(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Ce(n,n.gzhead.extra.length&255),Ce(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Tt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Oy;else if(Ce(n,0),Ce(n,0),Ce(n,0),Ce(n,0),Ce(n,0),Ce(n,n.level===9?2:n.strategy>=C0||n.level<2?4:0),Ce(n,oQ),n.status=Io,bn(e),n.pending!==0)return n.last_flush=-1,Mt}if(n.status===Oy){if(n.gzhead.extra){let i=n.pending,a=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+a>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,bn(e),n.pending!==0)return n.last_flush=-1,Mt;i=0,a-=s}let o=new Uint8Array(n.gzhead.extra);n.pending_buf.set(o.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Ly}if(n.status===Ly){if(n.gzhead.name){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i)),bn(e),n.pending!==0)return n.last_flush=-1,Mt;i=0}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,Ce(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Ny}if(n.status===Ny){if(n.gzhead.comment){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i)),bn(e),n.pending!==0)return n.last_flush=-1,Mt;i=0}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,Ce(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i))}n.status=zy}if(n.status===zy){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(bn(e),n.pending!==0))return n.last_flush=-1,Mt;Ce(n,e.adler&255),Ce(n,e.adler>>8&255),e.adler=0}if(n.status=Io,bn(e),n.pending!==0)return n.last_flush=-1,Mt}if(e.avail_in!==0||n.lookahead!==0||t!==ra&&n.status!==zu){let i=n.level===0?L5(n,t):n.strategy===C0?lQ(n,t):n.strategy===WZ?cQ(n,t):$u[n.level].func(n,t);if((i===Ro||i===Ws)&&(n.status=zu),i===Yt||i===Ro)return e.avail_out===0&&(n.last_flush=-1),Mt;if(i===qs&&(t===HZ?$Z(n):t!==F5&&(By(n,0,0,!1),t===GZ&&(aa(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),bn(e),e.avail_out===0))return n.last_flush=-1,Mt}return t!==Bn?Mt:n.wrap<=0?P5:(n.wrap===2?(Ce(n,e.adler&255),Ce(n,e.adler>>8&255),Ce(n,e.adler>>16&255),Ce(n,e.adler>>24&255),Ce(n,e.total_in&255),Ce(n,e.total_in>>8&255),Ce(n,e.total_in>>16&255),Ce(n,e.total_in>>24&255)):(Uu(n,e.adler>>>16),Uu(n,e.adler&65535)),bn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Mt:P5)},gQ=e=>{if(Hu(e))return Tr;const t=e.state.status;return e.state=null,t===Io?Do(e,VZ):Mt},mQ=(e,t)=>{let n=t.length;if(Hu(e))return Tr;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==js||r.lookahead)return Tr;if(i===1&&(e.adler=Lu(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(aa(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(t.subarray(n-r.w_size,n),0),t=c,n=r.w_size}const a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ys(r);r.lookahead>=ye;){let c=r.strstart,l=r.lookahead-(ye-1);do r.ins_h=oa(r,r.ins_h,r.window[c+ye-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--l);r.strstart=c,r.lookahead=ye-1,Ys(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ye-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,Mt};var bQ=dQ,yQ=U5,vQ=z5,wQ=N5,xQ=hQ,AQ=pQ,EQ=gQ,SQ=mQ,_Q="pako deflate (from Nodeca project)",Gu={deflateInit:bQ,deflateInit2:yQ,deflateReset:vQ,deflateResetKeep:wQ,deflateSetHeader:xQ,deflate:AQ,deflateEnd:EQ,deflateSetDictionary:SQ,deflateInfo:_Q};const CQ=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var kQ=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)CQ(n,r)&&(e[r]=n[r])}}return e},TQ=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,a=e.length;r<a;r++){let o=e[r];n.set(o,i),i+=o.length}return n},T0={assign:kQ,flattenChunks:TQ};let $5=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{$5=!1}const Vu=new Uint8Array(256);for(let e=0;e<256;e++)Vu[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Vu[254]=Vu[254]=1;var IQ=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};const RQ=(e,t)=>{if(t<65534&&e.subarray&&$5)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var DQ=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const a=new Array(n*2);for(i=0,r=0;r<n;){let o=e[r++];if(o<128){a[i++]=o;continue}let s=Vu[o];if(s>4){a[i++]=65533,r+=s-1;continue}for(o&=s===2?31:s===3?15:7;s>1&&r<n;)o=o<<6|e[r++]&63,s--;if(s>1){a[i++]=65533;continue}o<65536?a[i++]=o:(o-=65536,a[i++]=55296|o>>10&1023,a[i++]=56320|o&1023)}return RQ(a,i)},BQ=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Vu[e[n]]>t?n:t},ju={string2buf:IQ,buf2string:DQ,utf8border:BQ};function FQ(){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}var H5=FQ;const G5=Object.prototype.toString,{Z_NO_FLUSH:PQ,Z_SYNC_FLUSH:MQ,Z_FULL_FLUSH:OQ,Z_FINISH:LQ,Z_OK:I0,Z_STREAM_END:NQ,Z_DEFAULT_COMPRESSION:zQ,Z_DEFAULT_STRATEGY:UQ,Z_DEFLATED:$Q}=Nu;function Hy(e){this.options=T0.assign({level:zQ,method:$Q,chunkSize:16384,windowBits:15,memLevel:8,strategy:UQ},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H5,this.strm.avail_out=0;let n=Gu.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==I0)throw new Error(Vs[n]);if(t.header&&Gu.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=ju.string2buf(t.dictionary):G5.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Gu.deflateSetDictionary(this.strm,r),n!==I0)throw new Error(Vs[n]);this._dict_set=!0}}Hy.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,a;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?LQ:PQ,typeof e=="string"?n.input=ju.string2buf(e):G5.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===MQ||a===OQ)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Gu.deflate(n,a),i===NQ)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Gu.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===I0;if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0},Hy.prototype.onData=function(e){this.chunks.push(e)},Hy.prototype.onEnd=function(e){e===I0&&(this.result=T0.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const R0=16209,HQ=16191;var GQ=function(t,n){let r,i,a,o,s,c,l,u,f,h,d,p,g,b,y,w,A,x,C,_,I,D,M,G;const O=t.state;r=t.next_in,M=t.input,i=r+(t.avail_in-5),a=t.next_out,G=t.output,o=a-(n-t.avail_out),s=a+(t.avail_out-257),c=O.dmax,l=O.wsize,u=O.whave,f=O.wnext,h=O.window,d=O.hold,p=O.bits,g=O.lencode,b=O.distcode,y=(1<<O.lenbits)-1,w=(1<<O.distbits)-1;e:do{p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),A=g[d&y];t:for(;;){if(x=A>>>24,d>>>=x,p-=x,x=A>>>16&255,x===0)G[a++]=A&65535;else if(x&16){C=A&65535,x&=15,x&&(p<x&&(d+=M[r++]<<p,p+=8),C+=d&(1<<x)-1,d>>>=x,p-=x),p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),A=b[d&w];n:for(;;){if(x=A>>>24,d>>>=x,p-=x,x=A>>>16&255,x&16){if(_=A&65535,x&=15,p<x&&(d+=M[r++]<<p,p+=8,p<x&&(d+=M[r++]<<p,p+=8)),_+=d&(1<<x)-1,_>c){t.msg="invalid distance too far back",O.mode=R0;break e}if(d>>>=x,p-=x,x=a-o,_>x){if(x=_-x,x>u&&O.sane){t.msg="invalid distance too far back",O.mode=R0;break e}if(I=0,D=h,f===0){if(I+=l-x,x<C){C-=x;do G[a++]=h[I++];while(--x);I=a-_,D=G}}else if(f<x){if(I+=l+f-x,x-=f,x<C){C-=x;do G[a++]=h[I++];while(--x);if(I=0,f<C){x=f,C-=x;do G[a++]=h[I++];while(--x);I=a-_,D=G}}}else if(I+=f-x,x<C){C-=x;do G[a++]=h[I++];while(--x);I=a-_,D=G}for(;C>2;)G[a++]=D[I++],G[a++]=D[I++],G[a++]=D[I++],C-=3;C&&(G[a++]=D[I++],C>1&&(G[a++]=D[I++]))}else{I=a-_;do G[a++]=G[I++],G[a++]=G[I++],G[a++]=G[I++],C-=3;while(C>2);C&&(G[a++]=G[I++],C>1&&(G[a++]=G[I++]))}}else if(x&64){t.msg="invalid distance code",O.mode=R0;break e}else{A=b[(A&65535)+(d&(1<<x)-1)];continue n}break}}else if(x&64)if(x&32){O.mode=HQ;break e}else{t.msg="invalid literal/length code",O.mode=R0;break e}else{A=g[(A&65535)+(d&(1<<x)-1)];continue t}break}}while(r<i&&a<s);C=p>>3,r-=C,p-=C<<3,d&=(1<<p)-1,t.next_in=r,t.next_out=a,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=a<s?257+(s-a):257-(a-s),O.hold=d,O.bits=p};const Qs=15,V5=852,j5=592,q5=0,Gy=1,W5=2,VQ=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]),jQ=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]),qQ=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]),WQ=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 qu=(e,t,n,r,i,a,o,s)=>{const c=s.bits;let l=0,u=0,f=0,h=0,d=0,p=0,g=0,b=0,y=0,w=0,A,x,C,_,I,D=null,M;const G=new Uint16Array(Qs+1),O=new Uint16Array(Qs+1);let ae=null,se,ve,Pe;for(l=0;l<=Qs;l++)G[l]=0;for(u=0;u<r;u++)G[t[n+u]]++;for(d=c,h=Qs;h>=1&&G[h]===0;h--);if(d>h&&(d=h),h===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,s.bits=1,0;for(f=1;f<h&&G[f]===0;f++);for(d<f&&(d=f),b=1,l=1;l<=Qs;l++)if(b<<=1,b-=G[l],b<0)return-1;if(b>0&&(e===q5||h!==1))return-1;for(O[1]=0,l=1;l<Qs;l++)O[l+1]=O[l]+G[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[O[t[n+u]]++]=u);if(e===q5?(D=ae=o,M=20):e===Gy?(D=VQ,ae=jQ,M=257):(D=qQ,ae=WQ,M=0),w=0,u=0,l=f,I=a,p=d,g=0,C=-1,y=1<<d,_=y-1,e===Gy&&y>V5||e===W5&&y>j5)return 1;for(;;){se=l-g,o[u]+1<M?(ve=0,Pe=o[u]):o[u]>=M?(ve=ae[o[u]-M],Pe=D[o[u]-M]):(ve=32+64,Pe=0),A=1<<l-g,x=1<<p,f=x;do x-=A,i[I+(w>>g)+x]=se<<24|ve<<16|Pe|0;while(x!==0);for(A=1<<l-1;w&A;)A>>=1;if(A!==0?(w&=A-1,w+=A):w=0,u++,--G[l]===0){if(l===h)break;l=t[n+o[u]]}if(l>d&&(w&_)!==C){for(g===0&&(g=d),I+=f,p=l-g,b=1<<p;p+g<h&&(b-=G[p+g],!(b<=0));)p++,b<<=1;if(y+=1<<p,e===Gy&&y>V5||e===W5&&y>j5)return 1;C=w&_,i[C]=d<<24|p<<16|I-a|0}}return w!==0&&(i[I+w]=l-g<<24|64<<16|0),s.bits=d,0};const YQ=0,Y5=1,Z5=2,{Z_FINISH:Q5,Z_BLOCK:ZQ,Z_TREES:D0,Z_OK:Bo,Z_STREAM_END:QQ,Z_NEED_DICT:XQ,Z_STREAM_ERROR:Fn,Z_DATA_ERROR:X5,Z_MEM_ERROR:K5,Z_BUF_ERROR:KQ,Z_DEFLATED:J5}=Nu,B0=16180,e8=16181,t8=16182,n8=16183,r8=16184,i8=16185,a8=16186,o8=16187,s8=16188,c8=16189,F0=16190,ni=16191,Vy=16192,l8=16193,jy=16194,u8=16195,f8=16196,h8=16197,d8=16198,P0=16199,M0=16200,p8=16201,g8=16202,m8=16203,b8=16204,y8=16205,qy=16206,v8=16207,w8=16208,Je=16209,x8=16210,A8=16211,JQ=852,eX=592,tX=15,E8=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function nX(){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 Fo=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<B0||t.mode>A8?1:0},S8=e=>{if(Fo(e))return Fn;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=B0,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(JQ),t.distcode=t.distdyn=new Int32Array(eX),t.sane=1,t.back=-1,Bo},_8=e=>{if(Fo(e))return Fn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,S8(e)},C8=(e,t)=>{let n;if(Fo(e))return Fn;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Fn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,_8(e))},k8=(e,t)=>{if(!e)return Fn;const n=new nX;e.state=n,n.strm=e,n.window=null,n.mode=B0;const r=C8(e,t);return r!==Bo&&(e.state=null),r},rX=e=>k8(e,tX);let T8=!0,Wy,Yy;const iX=e=>{if(T8){Wy=new Int32Array(512),Yy=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(qu(Y5,e.lens,0,288,Wy,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;qu(Z5,e.lens,0,32,Yy,0,e.work,{bits:5}),T8=!1}e.lencode=Wy,e.lenbits=9,e.distcode=Yy,e.distbits=5},I8=(e,t,n,r)=>{let i;const a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},aX=(e,t)=>{let n,r,i,a,o,s,c,l,u,f,h,d,p,g,b=0,y,w,A,x,C,_,I,D;const M=new Uint8Array(4);let G,O;const ae=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Fo(e)||!e.output||!e.input&&e.avail_in!==0)return Fn;n=e.state,n.mode===ni&&(n.mode=Vy),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,f=s,h=c,D=Bo;e:for(;;)switch(n.mode){case B0:if(n.wrap===0){n.mode=Vy;break}for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=Tt(n.check,M,2,0),l=0,u=0,n.mode=e8;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Je;break}if((l&15)!==J5){e.msg="unknown compression method",n.mode=Je;break}if(l>>>=4,u-=4,I=(l&15)+8,n.wbits===0&&(n.wbits=I),I>15||I>n.wbits){e.msg="invalid window size",n.mode=Je;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?c8:ni,l=0,u=0;break;case e8:for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==J5){e.msg="unknown compression method",n.mode=Je;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Je;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Tt(n.check,M,2,0)),l=0,u=0,n.mode=t8;case t8:for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=Tt(n.check,M,4,0)),l=0,u=0,n.mode=n8;case n8:for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Tt(n.check,M,2,0)),l=0,u=0,n.mode=r8;case r8:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Tt(n.check,M,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=i8;case i8:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+d),I)),n.flags&512&&n.wrap&4&&(n.check=Tt(n.check,r,d,a)),s-=d,a+=d,n.length-=d),n.length))break e;n.length=0,n.mode=a8;case a8:if(n.flags&2048){if(s===0)break e;d=0;do I=r[a+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=Tt(n.check,r,d,a)),s-=d,a+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=o8;case o8:if(n.flags&4096){if(s===0)break e;d=0;do I=r[a+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=Tt(n.check,r,d,a)),s-=d,a+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=s8;case s8:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Je;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ni;break;case c8:for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=E8(l),l=0,u=0,n.mode=F0;case F0:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,XQ;e.adler=n.check=1,n.mode=ni;case ni:if(t===ZQ||t===D0)break e;case Vy:if(n.last){l>>>=u&7,u-=u&7,n.mode=qy;break}for(;u<3;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=l8;break;case 1:if(iX(n),n.mode=P0,t===D0){l>>>=2,u-=2;break e}break;case 2:n.mode=f8;break;case 3:e.msg="invalid block type",n.mode=Je}l>>>=2,u-=2;break;case l8:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Je;break}if(n.length=l&65535,l=0,u=0,n.mode=jy,t===D0)break e;case jy:n.mode=u8;case u8:if(d=n.length,d){if(d>s&&(d=s),d>c&&(d=c),d===0)break e;i.set(r.subarray(a,a+d),o),s-=d,a+=d,c-=d,o+=d,n.length-=d;break}n.mode=ni;break;case f8:for(;u<14;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Je;break}n.have=0,n.mode=h8;case h8:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.lens[ae[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[ae[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=qu(YQ,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid code lengths set",n.mode=Je;break}n.have=0,n.mode=d8;case d8:for(;n.have<n.nlen+n.ndist;){for(;b=n.lencode[l&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(A<16)l>>>=y,u-=y,n.lens[n.have++]=A;else{if(A===16){for(O=y+2;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(l>>>=y,u-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=Je;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,u-=2}else if(A===17){for(O=y+3;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=y,u-=y,I=0,d=3+(l&7),l>>>=3,u-=3}else{for(O=y+7;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=y,u-=y,I=0,d=11+(l&127),l>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Je;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===Je)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Je;break}if(n.lenbits=9,G={bits:n.lenbits},D=qu(Y5,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid literal/lengths set",n.mode=Je;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},D=qu(Z5,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,D){e.msg="invalid distances set",n.mode=Je;break}if(n.mode=P0,t===D0)break e;case P0:n.mode=M0;case M0:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,GQ(e,h),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===ni&&(n.back=-1);break}for(n.back=0;b=n.lencode[l&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(w&&!(w&240)){for(x=y,C=w,_=A;b=n.lencode[_+((l&(1<<x+C)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=x,u-=x,n.back+=x}if(l>>>=y,u-=y,n.back+=y,n.length=A,w===0){n.mode=y8;break}if(w&32){n.back=-1,n.mode=ni;break}if(w&64){e.msg="invalid literal/length code",n.mode=Je;break}n.extra=w&15,n.mode=p8;case p8:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=g8;case g8:for(;b=n.distcode[l&(1<<n.distbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(!(w&240)){for(x=y,C=w,_=A;b=n.distcode[_+((l&(1<<x+C)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=x,u-=x,n.back+=x}if(l>>>=y,u-=y,n.back+=y,w&64){e.msg="invalid distance code",n.mode=Je;break}n.offset=A,n.extra=w&15,n.mode=m8;case m8:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Je;break}n.mode=b8;case b8:if(c===0)break e;if(d=h-c,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Je;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),g=n.window}else g=i,p=o-n.offset,d=n.length;d>c&&(d=c),c-=d,n.length-=d;do i[o++]=g[p++];while(--d);n.length===0&&(n.mode=M0);break;case y8:if(c===0)break e;i[o++]=n.length,c--,n.mode=M0;break;case qy:if(n.wrap){for(;u<32;){if(s===0)break e;s--,l|=r[a++]<<u,u+=8}if(h-=c,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?Tt(n.check,i,h,o-h):Lu(n.check,i,h,o-h)),h=c,n.wrap&4&&(n.flags?l:E8(l))!==n.check){e.msg="incorrect data check",n.mode=Je;break}l=0,u=0}n.mode=v8;case v8:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Je;break}l=0,u=0}n.mode=w8;case w8:D=QQ;break e;case Je:D=X5;break e;case x8:return K5;case A8:default:return Fn}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<Je&&(n.mode<qy||t!==Q5))&&I8(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?Tt(n.check,i,h,e.next_out-h):Lu(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===ni?128:0)+(n.mode===P0||n.mode===jy?256:0),(f===0&&h===0||t===Q5)&&D===Bo&&(D=KQ),D},oX=e=>{if(Fo(e))return Fn;let t=e.state;return t.window&&(t.window=null),e.state=null,Bo},sX=(e,t)=>{if(Fo(e))return Fn;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,Bo):Fn},cX=(e,t)=>{const n=t.length;let r,i,a;return Fo(e)||(r=e.state,r.wrap!==0&&r.mode!==F0)?Fn:r.mode===F0&&(i=1,i=Lu(i,t,n,0),i!==r.check)?X5:(a=I8(e,t,n,n),a?(r.mode=x8,K5):(r.havedict=1,Bo))};var lX=_8,uX=C8,fX=S8,hX=rX,dX=k8,pX=aX,gX=oX,mX=sX,bX=cX,yX="pako inflate (from Nodeca project)",ri={inflateReset:lX,inflateReset2:uX,inflateResetKeep:fX,inflateInit:hX,inflateInit2:dX,inflate:pX,inflateEnd:gX,inflateGetHeader:mX,inflateSetDictionary:bX,inflateInfo:yX};function vX(){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}var wX=vX;const R8=Object.prototype.toString,{Z_NO_FLUSH:xX,Z_FINISH:AX,Z_OK:Wu,Z_STREAM_END:Zy,Z_NEED_DICT:Qy,Z_STREAM_ERROR:EX,Z_DATA_ERROR:D8,Z_MEM_ERROR:SX}=Nu;function Yu(e){this.options=T0.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H5,this.strm.avail_out=0;let n=ri.inflateInit2(this.strm,t.windowBits);if(n!==Wu)throw new Error(Vs[n]);if(this.header=new wX,ri.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ju.string2buf(t.dictionary):R8.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ri.inflateSetDictionary(this.strm,t.dictionary),n!==Wu)))throw new Error(Vs[n])}Yu.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let a,o,s;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?AX:xX,R8.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=ri.inflate(n,o),a===Qy&&i&&(a=ri.inflateSetDictionary(n,i),a===Wu?a=ri.inflate(n,o):a===D8&&(a=Qy));n.avail_in>0&&a===Zy&&n.state.wrap>0&&e[n.next_in]!==0;)ri.inflateReset(n),a=ri.inflate(n,o);switch(a){case EX:case D8:case Qy:case SX:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===Zy))if(this.options.to==="string"){let c=ju.utf8border(n.output,n.next_out),l=n.next_out-c,u=ju.buf2string(n.output,c);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(c,c+l),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===Wu&&s===0)){if(a===Zy)return a=ri.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},Yu.prototype.onData=function(e){this.chunks.push(e)},Yu.prototype.onEnd=function(e){e===Wu&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=T0.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Xy(e,t){const n=new Yu(t);if(n.push(e),n.err)throw n.msg||Vs[n.err];return n.result}function _X(e,t){return t=t||{},t.raw=!0,Xy(e,t)}var CX=Yu,kX=Xy,TX=_X,IX=Xy,RX=Nu,DX={Inflate:CX,inflate:kX,inflateRaw:TX,ungzip:IX,constants:RX};const{Inflate:Uee,inflate:$ee,inflateRaw:BX,ungzip:Hee}=DX;var FX=BX;function PX(e){return FX(e.subarray(2))}let MX=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function OX(e){e.sort((i,a)=>Number(i.offset)-Number(a.offset));const t=[];let n,r;for(const i of e)n&&r&&Number(i.offset)-r<=2e3?(n.length=BigInt(Number(n.length)+Number(i.length)-r+Number(i.offset)),n.blocks.push(i)):t.push(n={blocks:[i],length:i.length,offset:i.offset}),r=Number(n.offset)+Number(n.length);return t}function O0(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new MX("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const LX=1,NX=2,zX=3;function Ky(e,t,n,r){return e<r&&t>=n}function UX(e){const t=e?"big":"little",n=new Fe().endianess(t).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),r=new Fe().endianess(t).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:new Fe().endianess(t).array("blocksToFetch",{length:"cnt",type:new Fe().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:new Fe().array("recurOffsets",{length:"cnt",type:new Fe().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),i=new Fe().endianess(t).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:new Fe().endianess(t).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:{[zX]:new Fe().array("items",{length:"itemCount",type:new Fe().floatle("score")}),[NX]:new Fe().array("items",{length:"itemCount",type:new Fe().endianess(t).int32("start").floatle("score")}),[LX]:new Fe().array("items",{length:"itemCount",type:new Fe().endianess(t).int32("start").int32("end").floatle("score")})}}),bigBedParser:i,summaryParser:n,leafParser:r}}class B8{constructor(t,n,r,i,a,o){if(this.bbi=t,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=i,this.isCompressed=a,this.blockType=o,this.featureCache=new A0({cache:new E0({maxSize:1e3}),fill:async(c,l)=>{const u=Number(c.length),f=Number(c.offset),{buffer:h}=await this.bbi.read(we.Buffer.alloc(u),0,u,f,{signal:l});return h}}),!(r>=0))throw new Error("invalid cirTreeOffset!");const s=UX(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}async readWigData(t,n,r,i,a){try{const{refsByName:o,bbi:s,cirTreeOffset:c,isBigEndian:l}=this,u=o[t];u===void 0&&i.complete();const f={chrId:u,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=s.read(we.Buffer.alloc(48),0,48,Number(c),a));const{buffer:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],g=0;const b=(x,C,_)=>{try{const I=x.subarray(C),D=this.leafParser.parse(I);if(D.blocksToFetch&&(p=p.concat(D.blocksToFetch.filter(M=>y(M)).map(M=>({offset:M.blockOffset,length:M.blockSize})))),D.recurOffsets){const M=D.recurOffsets.filter(G=>y(G)).map(G=>Number(G.blockOffset));M.length>0&&A(M,_+1)}}catch(I){i.error(I)}},y=x=>{const{startChrom:C,startBase:_,endChrom:I,endBase:D}=x;return(C<u||C===u&&_<=r)&&(I>u||I===u&&D>=n)},w=async(x,C,_)=>{try{const I=C.max()-C.min(),D=C.min(),M=await this.featureCache.get(`${I}_${D}`,{length:I,offset:D},a==null?void 0:a.signal);for(const G of x)C.contains(G)&&(b(M,G-D,_),g-=1,g===0&&this.readFeatures(i,p,{...a,request:f}))}catch(I){i.error(I)}},A=(x,C)=>{try{g+=x.length;const _=4+Number(d)*32;let I=new ta(x[0],x[0]+_);for(let D=1;D<x.length;D+=1){const M=new ta(x[D],x[D]+_);I=I.union(M)}I.getRanges().map(D=>w(x,D,C))}catch(_){i.error(_)}};return A([Number(c)+48],1)}catch(o){i.error(o)}}parseSummaryBlock(t,n,r){const i=[];let a=n;const o=new DataView(t.buffer,t.byteOffset,t.length);for(;a<t.byteLength;){const s=o.getUint32(a,!0);a+=4;const c=o.getUint32(a,!0);a+=4;const l=o.getUint32(a,!0);a+=4;const u=o.getUint32(a,!0);a+=4;const f=o.getFloat32(a,!0);a+=4;const h=o.getFloat32(a,!0);a+=4;const d=o.getFloat32(a,!0);a+=4,a+=4,(!r||s===r.chrId&&Ky(c,l,r.start,r.end))&&i.push({start:c,end:l,maxScore:h,minScore:f,summary:!0,score:d/(u||1)})}return i}parseBigBedBlock(t,n,r,i){const a=[];let o=n;for(;o<t.byteLength;){const s=this.bigBedParser.parse(t.subarray(o));s.uniqueId=`bb-${r+o}`,a.push(s),o+=s.offset}return i?a.filter(s=>Ky(s.start,s.end,i.start,i.end)):a}parseBigWigBlock(t,n,r){const i=t.subarray(n),a=new DataView(i.buffer,i.byteOffset,i.length);let o=0;o+=4;const s=a.getInt32(o,!0);o+=8;const c=a.getUint32(o,!0);o+=4;const l=a.getUint32(o,!0);o+=4;const u=a.getUint8(o);o+=2;const f=a.getUint16(o,!0);o+=2;const h=new Array(f);switch(u){case 1:{for(let d=0;d<f;d++){const p=a.getInt32(o,!0);o+=4;const g=a.getInt32(o,!0);o+=4;const b=a.getFloat32(o,!0);o+=4,h[d]={start:p,end:g,score:b}}break}case 2:{for(let d=0;d<f;d++){const p=a.getInt32(o,!0);o+=4;const g=a.getFloat32(o,!0);o+=4,h[d]={score:g,start:p,end:p+l}}break}case 3:{for(let d=0;d<f;d++){const p=a.getFloat32(o,!0);o+=4;const g=s+d*c;h[d]={score:p,start:g,end:g+l}}break}}return r?h.filter(d=>Ky(d.start,d.end,r.start,r.end)):h}async readFeatures(t,n,r={}){try{const{blockType:i,isCompressed:a}=this,{signal:o,request:s}=r,c=OX(n);O0(o),await Promise.all(c.map(async l=>{O0(o);const{length:u,offset:f}=l,h=await this.featureCache.get(`${u}_${f}`,l,o);for(const d of l.blocks){O0(o);let p=Number(d.offset)-Number(l.offset),g=h;switch(a&&(g=PX(h.subarray(p)),p=0),O0(o),i){case"summary":{t.next(this.parseSummaryBlock(g,p,s));break}case"bigwig":{t.next(this.parseBigWigBlock(g,p,s));break}case"bigbed":{t.next(this.parseBigBedBlock(g,p,Number(d.offset)*256,s));break}default:console.warn(`Don't know what to do with ${i}`)}}})),t.complete()}catch(i){t.error(i)}}}var Jy=function(e,t){return Jy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Jy(e,t)};function e2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Jy(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function $X(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})}function F8(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Zu(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function t2(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function n2(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function Xs(e){return this instanceof Xs?(this.v=e,this):new Xs(e)}function HX(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(h){r[h]&&(i[h]=function(d){return new Promise(function(p,g){a.push([h,d,p,g])>1||s(h,d)})})}function s(h,d){try{c(r[h](d))}catch(p){f(a[0][3],p)}}function c(h){h.value instanceof Xs?Promise.resolve(h.value.v).then(l,u):f(a[0][2],h)}function l(h){s("next",h)}function u(h){s("throw",h)}function f(h,d){h(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function GX(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Zu=="function"?Zu(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(s,c){o=e[a](o),i(s,c,o.done,o.value)})}}function i(a,o,s,c){Promise.resolve(c).then(function(l){a({value:l,done:s})},o)}}typeof SuppressedError=="function"&&SuppressedError;function vt(e){return typeof e=="function"}function P8(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var r2=P8(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
3274
+ */(function(e){const t=Qd,n=Lb,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=w,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function a(){try{const E=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(E,m),E.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(E){if(E>i)throw new RangeError('The value "'+E+'" is invalid for option "size"');const m=new Uint8Array(E);return Object.setPrototypeOf(m,s.prototype),m}function s(E,m,v){if(typeof E=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(E)}return c(E,m,v)}s.poolSize=8192;function c(E,m,v){if(typeof E=="string")return h(E,m);if(ArrayBuffer.isView(E))return p(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(Gt(E,ArrayBuffer)||E&&Gt(E.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Gt(E,SharedArrayBuffer)||E&&Gt(E.buffer,SharedArrayBuffer)))return g(E,m,v);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const R=E.valueOf&&E.valueOf();if(R!=null&&R!==E)return s.from(R,m,v);const P=b(E);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return s.from(E[Symbol.toPrimitive]("string"),m,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}s.from=function(E,m,v){return c(E,m,v)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(E){if(typeof E!="number")throw new TypeError('"size" argument must be of type number');if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function u(E,m,v){return l(E),E<=0?o(E):m!==void 0?typeof v=="string"?o(E).fill(m,v):o(E).fill(m):o(E)}s.alloc=function(E,m,v){return u(E,m,v)};function f(E){return l(E),o(E<0?0:y(E)|0)}s.allocUnsafe=function(E){return f(E)},s.allocUnsafeSlow=function(E){return f(E)};function h(E,m){if((typeof m!="string"||m==="")&&(m="utf8"),!s.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const v=A(E,m)|0;let R=o(v);const P=R.write(E,m);return P!==v&&(R=R.slice(0,P)),R}function d(E){const m=E.length<0?0:y(E.length)|0,v=o(m);for(let R=0;R<m;R+=1)v[R]=E[R]&255;return v}function p(E){if(Gt(E,Uint8Array)){const m=new Uint8Array(E);return g(m.buffer,m.byteOffset,m.byteLength)}return d(E)}function g(E,m,v){if(m<0||E.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<m+(v||0))throw new RangeError('"length" is outside of buffer bounds');let R;return m===void 0&&v===void 0?R=new Uint8Array(E):v===void 0?R=new Uint8Array(E,m):R=new Uint8Array(E,m,v),Object.setPrototypeOf(R,s.prototype),R}function b(E){if(s.isBuffer(E)){const m=y(E.length)|0,v=o(m);return v.length===0||E.copy(v,0,0,m),v}if(E.length!==void 0)return typeof E.length!="number"||fi(E.length)?o(0):d(E);if(E.type==="Buffer"&&Array.isArray(E.data))return d(E.data)}function y(E){if(E>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return E|0}function w(E){return+E!=E&&(E=0),s.alloc(+E)}s.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==s.prototype},s.compare=function(m,v){if(Gt(m,Uint8Array)&&(m=s.from(m,m.offset,m.byteLength)),Gt(v,Uint8Array)&&(v=s.from(v,v.offset,v.byteLength)),!s.isBuffer(m)||!s.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(m===v)return 0;let R=m.length,P=v.length;for(let z=0,q=Math.min(R,P);z<q;++z)if(m[z]!==v[z]){R=m[z],P=v[z];break}return R<P?-1:P<R?1:0},s.isEncoding=function(m){switch(String(m).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}},s.concat=function(m,v){if(!Array.isArray(m))throw new TypeError('"list" argument must be an Array of Buffers');if(m.length===0)return s.alloc(0);let R;if(v===void 0)for(v=0,R=0;R<m.length;++R)v+=m[R].length;const P=s.allocUnsafe(v);let z=0;for(R=0;R<m.length;++R){let q=m[R];if(Gt(q,Uint8Array))z+q.length>P.length?(s.isBuffer(q)||(q=s.from(q)),q.copy(P,z)):Uint8Array.prototype.set.call(P,q,z);else if(s.isBuffer(q))q.copy(P,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=q.length}return P};function A(E,m){if(s.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||Gt(E,ArrayBuffer))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);const v=E.length,R=arguments.length>2&&arguments[2]===!0;if(!R&&v===0)return 0;let P=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return pe(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return ha(E).length;default:if(P)return R?-1:pe(E).length;m=(""+m).toLowerCase(),P=!0}}s.byteLength=A;function x(E,m,v){let R=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,m>>>=0,v<=m))return"";for(E||(E="utf8");;)switch(E){case"hex":return tt(this,m,v);case"utf8":case"utf-8":return ve(this,m,v);case"ascii":return Ne(this,m,v);case"latin1":case"binary":return lt(this,m,v);case"base64":return se(this,m,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(this,m,v);default:if(R)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),R=!0}}s.prototype._isBuffer=!0;function C(E,m,v){const R=E[m];E[m]=E[v],E[v]=R}s.prototype.swap16=function(){const m=this.length;if(m%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;v<m;v+=2)C(this,v,v+1);return this},s.prototype.swap32=function(){const m=this.length;if(m%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let v=0;v<m;v+=4)C(this,v,v+3),C(this,v+1,v+2);return this},s.prototype.swap64=function(){const m=this.length;if(m%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let v=0;v<m;v+=8)C(this,v,v+7),C(this,v+1,v+6),C(this,v+2,v+5),C(this,v+3,v+4);return this},s.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?ve(this,0,m):x.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(m){if(!s.isBuffer(m))throw new TypeError("Argument must be a Buffer");return this===m?!0:s.compare(this,m)===0},s.prototype.inspect=function(){let m="";const v=e.INSPECT_MAX_BYTES;return m=this.toString("hex",0,v).replace(/(.{2})/g,"$1 ").trim(),this.length>v&&(m+=" ... "),"<Buffer "+m+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(m,v,R,P,z){if(Gt(m,Uint8Array)&&(m=s.from(m,m.offset,m.byteLength)),!s.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(v===void 0&&(v=0),R===void 0&&(R=m?m.length:0),P===void 0&&(P=0),z===void 0&&(z=this.length),v<0||R>m.length||P<0||z>this.length)throw new RangeError("out of range index");if(P>=z&&v>=R)return 0;if(P>=z)return-1;if(v>=R)return 1;if(v>>>=0,R>>>=0,P>>>=0,z>>>=0,this===m)return 0;let q=z-P,ge=R-v;const Ze=Math.min(q,ge),$e=this.slice(P,z),nt=m.slice(v,R);for(let Re=0;Re<Ze;++Re)if($e[Re]!==nt[Re]){q=$e[Re],ge=nt[Re];break}return q<ge?-1:ge<q?1:0};function _(E,m,v,R,P){if(E.length===0)return-1;if(typeof v=="string"?(R=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,fi(v)&&(v=P?0:E.length-1),v<0&&(v=E.length+v),v>=E.length){if(P)return-1;v=E.length-1}else if(v<0)if(P)v=0;else return-1;if(typeof m=="string"&&(m=s.from(m,R)),s.isBuffer(m))return m.length===0?-1:I(E,m,v,R,P);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(E,m,v):Uint8Array.prototype.lastIndexOf.call(E,m,v):I(E,[m],v,R,P);throw new TypeError("val must be string, number or Buffer")}function I(E,m,v,R,P){let z=1,q=E.length,ge=m.length;if(R!==void 0&&(R=String(R).toLowerCase(),R==="ucs2"||R==="ucs-2"||R==="utf16le"||R==="utf-16le")){if(E.length<2||m.length<2)return-1;z=2,q/=2,ge/=2,v/=2}function Ze(nt,Re){return z===1?nt[Re]:nt.readUInt16BE(Re*z)}let $e;if(P){let nt=-1;for($e=v;$e<q;$e++)if(Ze(E,$e)===Ze(m,nt===-1?0:$e-nt)){if(nt===-1&&(nt=$e),$e-nt+1===ge)return nt*z}else nt!==-1&&($e-=$e-nt),nt=-1}else for(v+ge>q&&(v=q-ge),$e=v;$e>=0;$e--){let nt=!0;for(let Re=0;Re<ge;Re++)if(Ze(E,$e+Re)!==Ze(m,Re)){nt=!1;break}if(nt)return $e}return-1}s.prototype.includes=function(m,v,R){return this.indexOf(m,v,R)!==-1},s.prototype.indexOf=function(m,v,R){return _(this,m,v,R,!0)},s.prototype.lastIndexOf=function(m,v,R){return _(this,m,v,R,!1)};function D(E,m,v,R){v=Number(v)||0;const P=E.length-v;R?(R=Number(R),R>P&&(R=P)):R=P;const z=m.length;R>z/2&&(R=z/2);let q;for(q=0;q<R;++q){const ge=parseInt(m.substr(q*2,2),16);if(fi(ge))return q;E[v+q]=ge}return q}function M(E,m,v,R){return da(pe(m,E.length-v),E,v,R)}function G(E,m,v,R){return da(un(m),E,v,R)}function O(E,m,v,R){return da(ha(m),E,v,R)}function ae(E,m,v,R){return da(fa(m,E.length-v),E,v,R)}s.prototype.write=function(m,v,R,P){if(v===void 0)P="utf8",R=this.length,v=0;else if(R===void 0&&typeof v=="string")P=v,R=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(R)?(R=R>>>0,P===void 0&&(P="utf8")):(P=R,R=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const z=this.length-v;if((R===void 0||R>z)&&(R=z),m.length>0&&(R<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let q=!1;for(;;)switch(P){case"hex":return D(this,m,v,R);case"utf8":case"utf-8":return M(this,m,v,R);case"ascii":case"latin1":case"binary":return G(this,m,v,R);case"base64":return O(this,m,v,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,m,v,R);default:if(q)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),q=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(E,m,v){return m===0&&v===E.length?t.fromByteArray(E):t.fromByteArray(E.slice(m,v))}function ve(E,m,v){v=Math.min(E.length,v);const R=[];let P=m;for(;P<v;){const z=E[P];let q=null,ge=z>239?4:z>223?3:z>191?2:1;if(P+ge<=v){let Ze,$e,nt,Re;switch(ge){case 1:z<128&&(q=z);break;case 2:Ze=E[P+1],(Ze&192)===128&&(Re=(z&31)<<6|Ze&63,Re>127&&(q=Re));break;case 3:Ze=E[P+1],$e=E[P+2],(Ze&192)===128&&($e&192)===128&&(Re=(z&15)<<12|(Ze&63)<<6|$e&63,Re>2047&&(Re<55296||Re>57343)&&(q=Re));break;case 4:Ze=E[P+1],$e=E[P+2],nt=E[P+3],(Ze&192)===128&&($e&192)===128&&(nt&192)===128&&(Re=(z&15)<<18|(Ze&63)<<12|($e&63)<<6|nt&63,Re>65535&&Re<1114112&&(q=Re))}}q===null?(q=65533,ge=1):q>65535&&(q-=65536,R.push(q>>>10&1023|55296),q=56320|q&1023),R.push(q),P+=ge}return st(R)}const Pe=4096;function st(E){const m=E.length;if(m<=Pe)return String.fromCharCode.apply(String,E);let v="",R=0;for(;R<m;)v+=String.fromCharCode.apply(String,E.slice(R,R+=Pe));return v}function Ne(E,m,v){let R="";v=Math.min(E.length,v);for(let P=m;P<v;++P)R+=String.fromCharCode(E[P]&127);return R}function lt(E,m,v){let R="";v=Math.min(E.length,v);for(let P=m;P<v;++P)R+=String.fromCharCode(E[P]);return R}function tt(E,m,v){const R=E.length;(!m||m<0)&&(m=0),(!v||v<0||v>R)&&(v=R);let P="";for(let z=m;z<v;++z)P+=pa[E[z]];return P}function ut(E,m,v){const R=E.slice(m,v);let P="";for(let z=0;z<R.length-1;z+=2)P+=String.fromCharCode(R[z]+R[z+1]*256);return P}s.prototype.slice=function(m,v){const R=this.length;m=~~m,v=v===void 0?R:~~v,m<0?(m+=R,m<0&&(m=0)):m>R&&(m=R),v<0?(v+=R,v<0&&(v=0)):v>R&&(v=R),v<m&&(v=m);const P=this.subarray(m,v);return Object.setPrototypeOf(P,s.prototype),P};function Te(E,m,v){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+m>v)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(m,v,R){m=m>>>0,v=v>>>0,R||Te(m,v,this.length);let P=this[m],z=1,q=0;for(;++q<v&&(z*=256);)P+=this[m+q]*z;return P},s.prototype.readUintBE=s.prototype.readUIntBE=function(m,v,R){m=m>>>0,v=v>>>0,R||Te(m,v,this.length);let P=this[m+--v],z=1;for(;v>0&&(z*=256);)P+=this[m+--v]*z;return P},s.prototype.readUint8=s.prototype.readUInt8=function(m,v){return m=m>>>0,v||Te(m,1,this.length),this[m]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(m,v){return m=m>>>0,v||Te(m,2,this.length),this[m]|this[m+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(m,v){return m=m>>>0,v||Te(m,2,this.length),this[m]<<8|this[m+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+this[m+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),this[m]*16777216+(this[m+1]<<16|this[m+2]<<8|this[m+3])},s.prototype.readBigUInt64LE=fn(function(m){m=m>>>0,V(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Y(m,this.length-8);const P=v+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24,z=this[++m]+this[++m]*2**8+this[++m]*2**16+R*2**24;return BigInt(P)+(BigInt(z)<<BigInt(32))}),s.prototype.readBigUInt64BE=fn(function(m){m=m>>>0,V(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Y(m,this.length-8);const P=v*2**24+this[++m]*2**16+this[++m]*2**8+this[++m],z=this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+R;return(BigInt(P)<<BigInt(32))+BigInt(z)}),s.prototype.readIntLE=function(m,v,R){m=m>>>0,v=v>>>0,R||Te(m,v,this.length);let P=this[m],z=1,q=0;for(;++q<v&&(z*=256);)P+=this[m+q]*z;return z*=128,P>=z&&(P-=Math.pow(2,8*v)),P},s.prototype.readIntBE=function(m,v,R){m=m>>>0,v=v>>>0,R||Te(m,v,this.length);let P=v,z=1,q=this[m+--P];for(;P>0&&(z*=256);)q+=this[m+--P]*z;return z*=128,q>=z&&(q-=Math.pow(2,8*v)),q},s.prototype.readInt8=function(m,v){return m=m>>>0,v||Te(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},s.prototype.readInt16LE=function(m,v){m=m>>>0,v||Te(m,2,this.length);const R=this[m]|this[m+1]<<8;return R&32768?R|4294901760:R},s.prototype.readInt16BE=function(m,v){m=m>>>0,v||Te(m,2,this.length);const R=this[m+1]|this[m]<<8;return R&32768?R|4294901760:R},s.prototype.readInt32LE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},s.prototype.readInt32BE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},s.prototype.readBigInt64LE=fn(function(m){m=m>>>0,V(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Y(m,this.length-8);const P=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(R<<24);return(BigInt(P)<<BigInt(32))+BigInt(v+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24)}),s.prototype.readBigInt64BE=fn(function(m){m=m>>>0,V(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Y(m,this.length-8);const P=(v<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(P)<<BigInt(32))+BigInt(this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+R)}),s.prototype.readFloatLE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),n.read(this,m,!0,23,4)},s.prototype.readFloatBE=function(m,v){return m=m>>>0,v||Te(m,4,this.length),n.read(this,m,!1,23,4)},s.prototype.readDoubleLE=function(m,v){return m=m>>>0,v||Te(m,8,this.length),n.read(this,m,!0,52,8)},s.prototype.readDoubleBE=function(m,v){return m=m>>>0,v||Te(m,8,this.length),n.read(this,m,!1,52,8)};function Ie(E,m,v,R,P,z){if(!s.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>P||m<z)throw new RangeError('"value" argument is out of bounds');if(v+R>E.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(m,v,R,P){if(m=+m,v=v>>>0,R=R>>>0,!P){const ge=Math.pow(2,8*R)-1;Ie(this,m,v,R,ge,0)}let z=1,q=0;for(this[v]=m&255;++q<R&&(z*=256);)this[v+q]=m/z&255;return v+R},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(m,v,R,P){if(m=+m,v=v>>>0,R=R>>>0,!P){const ge=Math.pow(2,8*R)-1;Ie(this,m,v,R,ge,0)}let z=R-1,q=1;for(this[v+z]=m&255;--z>=0&&(q*=256);)this[v+z]=m/q&255;return v+R},s.prototype.writeUint8=s.prototype.writeUInt8=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,1,255,0),this[v]=m&255,v+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,2,65535,0),this[v]=m&255,this[v+1]=m>>>8,v+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,2,65535,0),this[v]=m>>>8,this[v+1]=m&255,v+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,4,4294967295,0),this[v+3]=m>>>24,this[v+2]=m>>>16,this[v+1]=m>>>8,this[v]=m&255,v+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,4,4294967295,0),this[v]=m>>>24,this[v+1]=m>>>16,this[v+2]=m>>>8,this[v+3]=m&255,v+4};function Rt(E,m,v,R,P){S(m,R,P,E,v,7);let z=Number(m&BigInt(4294967295));E[v++]=z,z=z>>8,E[v++]=z,z=z>>8,E[v++]=z,z=z>>8,E[v++]=z;let q=Number(m>>BigInt(32)&BigInt(4294967295));return E[v++]=q,q=q>>8,E[v++]=q,q=q>>8,E[v++]=q,q=q>>8,E[v++]=q,v}function ln(E,m,v,R,P){S(m,R,P,E,v,7);let z=Number(m&BigInt(4294967295));E[v+7]=z,z=z>>8,E[v+6]=z,z=z>>8,E[v+5]=z,z=z>>8,E[v+4]=z;let q=Number(m>>BigInt(32)&BigInt(4294967295));return E[v+3]=q,q=q>>8,E[v+2]=q,q=q>>8,E[v+1]=q,q=q>>8,E[v]=q,v+8}s.prototype.writeBigUInt64LE=fn(function(m,v=0){return Rt(this,m,v,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=fn(function(m,v=0){return ln(this,m,v,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(m,v,R,P){if(m=+m,v=v>>>0,!P){const Ze=Math.pow(2,8*R-1);Ie(this,m,v,R,Ze-1,-Ze)}let z=0,q=1,ge=0;for(this[v]=m&255;++z<R&&(q*=256);)m<0&&ge===0&&this[v+z-1]!==0&&(ge=1),this[v+z]=(m/q>>0)-ge&255;return v+R},s.prototype.writeIntBE=function(m,v,R,P){if(m=+m,v=v>>>0,!P){const Ze=Math.pow(2,8*R-1);Ie(this,m,v,R,Ze-1,-Ze)}let z=R-1,q=1,ge=0;for(this[v+z]=m&255;--z>=0&&(q*=256);)m<0&&ge===0&&this[v+z+1]!==0&&(ge=1),this[v+z]=(m/q>>0)-ge&255;return v+R},s.prototype.writeInt8=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,1,127,-128),m<0&&(m=255+m+1),this[v]=m&255,v+1},s.prototype.writeInt16LE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,2,32767,-32768),this[v]=m&255,this[v+1]=m>>>8,v+2},s.prototype.writeInt16BE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,2,32767,-32768),this[v]=m>>>8,this[v+1]=m&255,v+2},s.prototype.writeInt32LE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,4,2147483647,-2147483648),this[v]=m&255,this[v+1]=m>>>8,this[v+2]=m>>>16,this[v+3]=m>>>24,v+4},s.prototype.writeInt32BE=function(m,v,R){return m=+m,v=v>>>0,R||Ie(this,m,v,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[v]=m>>>24,this[v+1]=m>>>16,this[v+2]=m>>>8,this[v+3]=m&255,v+4},s.prototype.writeBigInt64LE=fn(function(m,v=0){return Rt(this,m,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=fn(function(m,v=0){return ln(this,m,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ve(E,m,v,R,P,z){if(v+R>E.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function N(E,m,v,R,P){return m=+m,v=v>>>0,P||Ve(E,m,v,4),n.write(E,m,v,R,23,4),v+4}s.prototype.writeFloatLE=function(m,v,R){return N(this,m,v,!0,R)},s.prototype.writeFloatBE=function(m,v,R){return N(this,m,v,!1,R)};function L(E,m,v,R,P){return m=+m,v=v>>>0,P||Ve(E,m,v,8),n.write(E,m,v,R,52,8),v+8}s.prototype.writeDoubleLE=function(m,v,R){return L(this,m,v,!0,R)},s.prototype.writeDoubleBE=function(m,v,R){return L(this,m,v,!1,R)},s.prototype.copy=function(m,v,R,P){if(!s.isBuffer(m))throw new TypeError("argument should be a Buffer");if(R||(R=0),!P&&P!==0&&(P=this.length),v>=m.length&&(v=m.length),v||(v=0),P>0&&P<R&&(P=R),P===R||m.length===0||this.length===0)return 0;if(v<0)throw new RangeError("targetStart out of bounds");if(R<0||R>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),m.length-v<P-R&&(P=m.length-v+R);const z=P-R;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,R,P):Uint8Array.prototype.set.call(m,this.subarray(R,P),v),z},s.prototype.fill=function(m,v,R,P){if(typeof m=="string"){if(typeof v=="string"?(P=v,v=0,R=this.length):typeof R=="string"&&(P=R,R=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!s.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(m.length===1){const q=m.charCodeAt(0);(P==="utf8"&&q<128||P==="latin1")&&(m=q)}}else typeof m=="number"?m=m&255:typeof m=="boolean"&&(m=Number(m));if(v<0||this.length<v||this.length<R)throw new RangeError("Out of range index");if(R<=v)return this;v=v>>>0,R=R===void 0?this.length:R>>>0,m||(m=0);let z;if(typeof m=="number")for(z=v;z<R;++z)this[z]=m;else{const q=s.isBuffer(m)?m:s.from(m,P),ge=q.length;if(ge===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(z=0;z<R-v;++z)this[z+v]=q[z%ge]}return this};const W={};function j(E,m,v){W[E]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,this.stack,delete this.name}get code(){return E}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}j("ERR_BUFFER_OUT_OF_BOUNDS",function(E){return E?`${E} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(E,m){return`The "${E}" argument must be of type number. Received type ${typeof m}`},TypeError),j("ERR_OUT_OF_RANGE",function(E,m,v){let R=`The value of "${E}" is out of range.`,P=v;return Number.isInteger(v)&&Math.abs(v)>2**32?P=Q(String(v)):typeof v=="bigint"&&(P=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(P=Q(P)),P+="n"),R+=` It must be ${m}. Received ${P}`,R},RangeError);function Q(E){let m="",v=E.length;const R=E[0]==="-"?1:0;for(;v>=R+4;v-=3)m=`_${E.slice(v-3,v)}${m}`;return`${E.slice(0,v)}${m}`}function T(E,m,v){V(m,"offset"),(E[m]===void 0||E[m+v]===void 0)&&Y(m,E.length-(v+1))}function S(E,m,v,R,P,z){if(E>v||E<m){const q=typeof m=="bigint"?"n":"";let ge;throw z>3?m===0||m===BigInt(0)?ge=`>= 0${q} and < 2${q} ** ${(z+1)*8}${q}`:ge=`>= -(2${q} ** ${(z+1)*8-1}${q}) and < 2 ** ${(z+1)*8-1}${q}`:ge=`>= ${m}${q} and <= ${v}${q}`,new W.ERR_OUT_OF_RANGE("value",ge,E)}T(R,P,z)}function V(E,m){if(typeof E!="number")throw new W.ERR_INVALID_ARG_TYPE(m,"number",E)}function Y(E,m,v){throw Math.floor(E)!==E?(V(E,v),new W.ERR_OUT_OF_RANGE(v||"offset","an integer",E)):m<0?new W.ERR_BUFFER_OUT_OF_BOUNDS:new W.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${m}`,E)}const de=/[^+/0-9A-Za-z-_]/g;function ie(E){if(E=E.split("=")[0],E=E.trim().replace(de,""),E.length<2)return"";for(;E.length%4!==0;)E=E+"=";return E}function pe(E,m){m=m||1/0;let v;const R=E.length;let P=null;const z=[];for(let q=0;q<R;++q){if(v=E.charCodeAt(q),v>55295&&v<57344){if(!P){if(v>56319){(m-=3)>-1&&z.push(239,191,189);continue}else if(q+1===R){(m-=3)>-1&&z.push(239,191,189);continue}P=v;continue}if(v<56320){(m-=3)>-1&&z.push(239,191,189),P=v;continue}v=(P-55296<<10|v-56320)+65536}else P&&(m-=3)>-1&&z.push(239,191,189);if(P=null,v<128){if((m-=1)<0)break;z.push(v)}else if(v<2048){if((m-=2)<0)break;z.push(v>>6|192,v&63|128)}else if(v<65536){if((m-=3)<0)break;z.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((m-=4)<0)break;z.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return z}function un(E){const m=[];for(let v=0;v<E.length;++v)m.push(E.charCodeAt(v)&255);return m}function fa(E,m){let v,R,P;const z=[];for(let q=0;q<E.length&&!((m-=2)<0);++q)v=E.charCodeAt(q),R=v>>8,P=v%256,z.push(P),z.push(R);return z}function ha(E){return t.toByteArray(ie(E))}function da(E,m,v,R){let P;for(P=0;P<R&&!(P+v>=m.length||P>=E.length);++P)m[P+v]=E[P];return P}function Gt(E,m){return E instanceof m||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===m.name}function fi(E){return E!==E}const pa=function(){const E="0123456789abcdef",m=new Array(256);for(let v=0;v<16;++v){const R=v*16;for(let P=0;P<16;++P)m[R+P]=E[v]+E[P]}return m}();function fn(E){return typeof BigInt>"u"?Br:E}function Br(){throw new Error("BigInt not supported")}})(we);const d6=_e({__proto__:null,default:uu(we)},[we]),kt={},Uq=Object.freeze(Object.defineProperty({__proto__:null,default:kt},Symbol.toStringTag,{value:"Module"})),Nb=typeof window<"u"?window:typeof self<"u"?self:{fetch:void 0};class po{async getBufferFromResponse(t){if(typeof t.buffer=="function")return t.buffer();if(typeof t.arrayBuffer=="function"){const n=await t.arrayBuffer();return we.Buffer.from(n)}else throw new TypeError("invalid HTTP response object, has no buffer method, and no arrayBuffer method")}constructor(t,n={}){this.baseOverrides={},this.url=t;const r=n.fetch||Nb.fetch&&Nb.fetch.bind(Nb);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");n.overrides&&(this.baseOverrides=n.overrides),this.fetchImplementation=r}async fetch(t,n){let r;try{r=await this.fetchImplementation(t,n)}catch(i){if(`${i}`.includes("Failed to fetch"))console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`),r=await this.fetchImplementation(t,{...n,cache:"reload"});else throw i}return r}async read(t,n=0,r,i=0,a={}){const{headers:o={},signal:s,overrides:c={}}=a;r<1/0?o.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(o.range=`bytes=${i}-`);const l={...this.baseOverrides,...c,headers:{...o,...c.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s},u=await this.fetch(this.url,l);if(!u.ok)throw new Error(`HTTP ${u.status} ${u.statusText} ${this.url}`);if(u.status===200&&i===0||u.status===206){const f=await this.getBufferFromResponse(u),h=f.copy(t,n,0,Math.min(r,f.length)),d=u.headers.get("content-range"),p=/\/(\d+)$/.exec(d||"");return p&&p[1]&&(this._stat={size:parseInt(p[1],10)}),{bytesRead:h,buffer:t}}throw u.status===200?new Error("${this.url} fetch returned status 200, expected 206"):new Error(`HTTP ${u.status} fetching ${this.url}`)}async readFile(t={}){let n,r;typeof t=="string"?(n=t,r={}):(n=t.encoding,r=t,delete r.encoding);const{headers:i={},signal:a,overrides:o={}}=r,s={headers:i,method:"GET",redirect:"follow",mode:"cors",signal:a,...this.baseOverrides,...o},c=await this.fetch(this.url,s);if(!c)throw new Error("generic-filehandle failed to fetch");if(c.status!==200)throw Object.assign(new Error(`HTTP ${c.status} fetching ${this.url}`),{status:c.status});if(n==="utf8")return c.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(c)}async stat(){if(!this._stat){const t=we.Buffer.allocUnsafe(10);if(await this.read(t,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function p6(e){const t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new Error("problem reading blob"))},t.onabort=()=>{r(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&typeof t.result!="string"?n(t.result):r(new Error("unknown error reading blob"))},t.readAsArrayBuffer(e)})}function $q(e){const t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new Error("problem reading blob"))},t.onabort=()=>{r(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&typeof t.result=="string"?n(t.result):r(new Error("unknown error reading blob"))},t.readAsText(e)})}class Hq{constructor(t){this.blob=t,this.size=t.size}async read(t,n=0,r,i=0){if(!r)return{bytesRead:0,buffer:t};const a=i,o=a+r,s=await p6(this.blob.slice(a,o)),c=we.Buffer.from(s);return{bytesRead:c.copy(t,n),buffer:c}}async readFile(t){let n;if(typeof t=="string"?n=t:n=t&&t.encoding,n==="utf8")return $q(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await p6(this.blob);return we.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function g6(e,t={}){return new po(e,t)}function Gq(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return g6(e,r);if(t!==void 0)return new kt(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const hu=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:Hq,LocalFile:kt,RemoteFile:po,fromUrl:g6,open:Gq},Symbol.toStringTag,{value:"Module"}));var Kr={};(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(a,o){return Object.prototype.hasOwnProperty.call(a,o)}e.assign=function(a){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var s=o.shift();if(s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var c in s)n(s,c)&&(a[c]=s[c])}}return a},e.shrinkBuf=function(a,o){return a.length===o?a:a.subarray?a.subarray(0,o):(a.length=o,a)};var r={arraySet:function(a,o,s,c,l){if(o.subarray&&a.subarray){a.set(o.subarray(s,s+c),l);return}for(var u=0;u<c;u++)a[l+u]=o[s+u]},flattenChunks:function(a){var o,s,c,l,u,f;for(c=0,o=0,s=a.length;o<s;o++)c+=a[o].length;for(f=new Uint8Array(c),l=0,o=0,s=a.length;o<s;o++)u=a[o],f.set(u,l),l+=u.length;return f}},i={arraySet:function(a,o,s,c,l){for(var u=0;u<c;u++)a[l+u]=o[s+u]},flattenChunks:function(a){return[].concat.apply([],a)}};e.setTyped=function(a){a?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})(Kr);var du={},Ar={},Rs={},Vq=Kr,jq=4,m6=0,b6=1,qq=2;function Ds(e){for(var t=e.length;--t>=0;)e[t]=0}var Wq=0,y6=1,Yq=2,Zq=3,Qq=258,zb=29,pu=256,gu=pu+1+zb,Bs=30,Ub=19,v6=2*gu+1,go=15,$b=16,Xq=7,Hb=256,w6=16,x6=17,A6=18,Gb=[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],Xd=[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],Kq=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],E6=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Jq=512,Jr=new Array((gu+2)*2);Ds(Jr);var mu=new Array(Bs*2);Ds(mu);var bu=new Array(Jq);Ds(bu);var yu=new Array(Qq-Zq+1);Ds(yu);var Vb=new Array(zb);Ds(Vb);var Kd=new Array(Bs);Ds(Kd);function jb(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var S6,_6,C6;function qb(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function k6(e){return e<256?bu[e]:bu[256+(e>>>7)]}function vu(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function an(e,t,n){e.bi_valid>$b-n?(e.bi_buf|=t<<e.bi_valid&65535,vu(e,e.bi_buf),e.bi_buf=t>>$b-e.bi_valid,e.bi_valid+=n-$b):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Er(e,t,n){an(e,n[t*2],n[t*2+1])}function T6(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function eW(e){e.bi_valid===16?(vu(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function tW(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,f,h,d,p,g=0;for(h=0;h<=go;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<v6;l++)u=e.heap[l],h=n[n[u*2+1]*2+1]+1,h>c&&(h=c,g++),n[u*2+1]=h,!(u>r)&&(e.bl_count[h]++,d=0,u>=s&&(d=o[u-s]),p=n[u*2],e.opt_len+=p*(h+d),a&&(e.static_len+=p*(i[u*2+1]+d)));if(g!==0){do{for(h=c-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(h=c;h!==0;h--)for(u=e.bl_count[h];u!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),u--)}}function I6(e,t,n){var r=new Array(go+1),i=0,a,o;for(a=1;a<=go;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=T6(r[s]++,s))}}function nW(){var e,t,n,r,i,a=new Array(go+1);for(n=0,r=0;r<zb-1;r++)for(Vb[r]=n,e=0;e<1<<Gb[r];e++)yu[n++]=r;for(yu[n-1]=r,i=0,r=0;r<16;r++)for(Kd[r]=i,e=0;e<1<<Xd[r];e++)bu[i++]=r;for(i>>=7;r<Bs;r++)for(Kd[r]=i<<7,e=0;e<1<<Xd[r]-7;e++)bu[256+i++]=r;for(t=0;t<=go;t++)a[t]=0;for(e=0;e<=143;)Jr[e*2+1]=8,e++,a[8]++;for(;e<=255;)Jr[e*2+1]=9,e++,a[9]++;for(;e<=279;)Jr[e*2+1]=7,e++,a[7]++;for(;e<=287;)Jr[e*2+1]=8,e++,a[8]++;for(I6(Jr,gu+1,a),e=0;e<Bs;e++)mu[e*2+1]=5,mu[e*2]=T6(e,5);S6=new jb(Jr,Gb,pu+1,gu,go),_6=new jb(mu,Xd,0,Bs,go),C6=new jb(new Array(0),Kq,0,Ub,Xq)}function R6(e){var t;for(t=0;t<gu;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Bs;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Ub;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Hb*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function D6(e){e.bi_valid>8?vu(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function rW(e,t,n,r){D6(e),r&&(vu(e,n),vu(e,~n)),Vq.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function B6(e,t,n,r){var i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function Wb(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&B6(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!B6(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function F6(e,t,n){var r,i,a=0,o,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],i=e.pending_buf[e.l_buf+a],a++,r===0?Er(e,i,t):(o=yu[i],Er(e,o+pu+1,t),s=Gb[o],s!==0&&(i-=Vb[o],an(e,i,s)),r--,o=k6(r),Er(e,o,n),s=Xd[o],s!==0&&(r-=Kd[o],an(e,r,s)));while(a<e.last_lit);Er(e,Hb,t)}function Yb(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=v6,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)Wb(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Wb(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,Wb(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],tW(e,t),I6(n,c,e.bl_count)}function P6(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[w6*2]++):s<=10?e.bl_tree[x6*2]++:e.bl_tree[A6*2]++,s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))}function M6(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do Er(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Er(e,a,e.bl_tree),s--),Er(e,w6,e.bl_tree),an(e,s-3,2)):s<=10?(Er(e,x6,e.bl_tree),an(e,s-3,3)):(Er(e,A6,e.bl_tree),an(e,s-11,7));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}}function iW(e){var t;for(P6(e,e.dyn_ltree,e.l_desc.max_code),P6(e,e.dyn_dtree,e.d_desc.max_code),Yb(e,e.bl_desc),t=Ub-1;t>=3&&e.bl_tree[E6[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function aW(e,t,n,r){var i;for(an(e,t-257,5),an(e,n-1,5),an(e,r-4,4),i=0;i<r;i++)an(e,e.bl_tree[E6[i]*2+1],3);M6(e,e.dyn_ltree,t-1),M6(e,e.dyn_dtree,n-1)}function oW(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return m6;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return b6;for(n=32;n<pu;n++)if(e.dyn_ltree[n*2]!==0)return b6;return m6}var O6=!1;function sW(e){O6||(nW(),O6=!0),e.l_desc=new qb(e.dyn_ltree,S6),e.d_desc=new qb(e.dyn_dtree,_6),e.bl_desc=new qb(e.bl_tree,C6),e.bi_buf=0,e.bi_valid=0,R6(e)}function L6(e,t,n,r){an(e,(Wq<<1)+(r?1:0),3),rW(e,t,n,!0)}function cW(e){an(e,y6<<1,3),Er(e,Hb,Jr),eW(e)}function lW(e,t,n,r){var i,a,o=0;e.level>0?(e.strm.data_type===qq&&(e.strm.data_type=oW(e)),Yb(e,e.l_desc),Yb(e,e.d_desc),o=iW(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?L6(e,t,n,r):e.strategy===jq||a===i?(an(e,(y6<<1)+(r?1:0),3),F6(e,Jr,mu)):(an(e,(Yq<<1)+(r?1:0),3),aW(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),F6(e,e.dyn_ltree,e.dyn_dtree)),R6(e),r&&D6(e)}function uW(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(yu[n]+pu+1)*2]++,e.dyn_dtree[k6(t)*2]++),e.last_lit===e.lit_bufsize-1}Rs._tr_init=sW,Rs._tr_stored_block=L6,Rs._tr_flush_block=lW,Rs._tr_tally=uW,Rs._tr_align=cW;function fW(e,t,n,r){for(var i=e&65535|0,a=e>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0}var N6=fW;function hW(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}var dW=hW();function pW(e,t,n,r){var i=dW,a=r+n;e^=-1;for(var o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1}var z6=pW,Zb={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"},Wt=Kr,Cn=Rs,U6=N6,Wi=z6,gW=Zb,mo=0,mW=1,bW=3,Yi=4,$6=5,Sr=0,H6=1,kn=-2,yW=-3,Qb=-5,vW=-1,wW=1,Jd=2,xW=3,AW=4,EW=0,SW=2,e0=8,_W=9,CW=15,kW=8,TW=29,IW=256,Xb=IW+1+TW,RW=30,DW=19,BW=2*Xb+1,FW=15,be=3,Zi=258,er=Zi+be+1,PW=32,t0=42,Kb=69,n0=73,r0=91,i0=103,bo=113,wu=666,yt=1,xu=2,yo=3,Fs=4,MW=3;function Qi(e,t){return e.msg=gW[t],t}function G6(e){return(e<<1)-(e>4?9:0)}function Xi(e){for(var t=e.length;--t>=0;)e[t]=0}function Ki(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Wt.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function Pt(e,t){Cn._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ki(e.strm)}function Se(e,t){e.pending_buf[e.pending++]=t}function Au(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function OW(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Wt.arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=U6(e.adler,t,i,n):e.state.wrap===2&&(e.adler=Wi(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function V6(e,t){var n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-er?e.strstart-(e.w_size-er):0,l=e.window,u=e.w_mask,f=e.prev,h=e.strstart+Zi,d=l[r+o-1],p=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+o]!==p||l[i+o-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(a=Zi-(h-r),r=h-Zi,a>o){if(e.match_start=t,o=a,a>=s)break;d=l[r+o-1],p=l[r+o]}}while((t=f[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead}function vo(e){var t=e.w_size,n,r,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-er)){Wt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);a+=t}if(e.strm.avail_in===0)break;if(r=OW(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=be)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+be-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<be)););}while(e.lookahead<er&&e.strm.avail_in!==0)}function LW(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(vo(e),e.lookahead===0&&t===mo)return yt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Pt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-er&&(Pt(e,!1),e.strm.avail_out===0))return yt}return e.insert=0,t===Yi?(Pt(e,!0),e.strm.avail_out===0?yo:Fs):(e.strstart>e.block_start&&(Pt(e,!1),e.strm.avail_out===0),yt)}function Jb(e,t){for(var n,r;;){if(e.lookahead<er){if(vo(e),e.lookahead<er&&t===mo)return yt;if(e.lookahead===0)break}if(n=0,e.lookahead>=be&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+be-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-er&&(e.match_length=V6(e,n)),e.match_length>=be)if(r=Cn._tr_tally(e,e.strstart-e.match_start,e.match_length-be),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=be){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+be-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=Cn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Pt(e,!1),e.strm.avail_out===0))return yt}return e.insert=e.strstart<be-1?e.strstart:be-1,t===Yi?(Pt(e,!0),e.strm.avail_out===0?yo:Fs):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?yt:xu}function Ps(e,t){for(var n,r,i;;){if(e.lookahead<er){if(vo(e),e.lookahead<er&&t===mo)return yt;if(e.lookahead===0)break}if(n=0,e.lookahead>=be&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+be-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=be-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-er&&(e.match_length=V6(e,n),e.match_length<=5&&(e.strategy===wW||e.match_length===be&&e.strstart-e.match_start>4096)&&(e.match_length=be-1)),e.prev_length>=be&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-be,r=Cn._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-be),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+be-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=be-1,e.strstart++,r&&(Pt(e,!1),e.strm.avail_out===0))return yt}else if(e.match_available){if(r=Cn._tr_tally(e,0,e.window[e.strstart-1]),r&&Pt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return yt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Cn._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<be-1?e.strstart:be-1,t===Yi?(Pt(e,!0),e.strm.avail_out===0?yo:Fs):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?yt:xu}function NW(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=Zi){if(vo(e),e.lookahead<=Zi&&t===mo)return yt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=be&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+Zi;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=Zi-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=be?(n=Cn._tr_tally(e,1,e.match_length-be),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Cn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Pt(e,!1),e.strm.avail_out===0))return yt}return e.insert=0,t===Yi?(Pt(e,!0),e.strm.avail_out===0?yo:Fs):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?yt:xu}function zW(e,t){for(var n;;){if(e.lookahead===0&&(vo(e),e.lookahead===0)){if(t===mo)return yt;break}if(e.match_length=0,n=Cn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Pt(e,!1),e.strm.avail_out===0))return yt}return e.insert=0,t===Yi?(Pt(e,!0),e.strm.avail_out===0?yo:Fs):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?yt:xu}function _r(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var Ms;Ms=[new _r(0,0,0,0,LW),new _r(4,4,8,4,Jb),new _r(4,5,16,8,Jb),new _r(4,6,32,32,Jb),new _r(4,4,16,16,Ps),new _r(8,16,32,32,Ps),new _r(8,16,128,128,Ps),new _r(8,32,128,256,Ps),new _r(32,128,258,1024,Ps),new _r(32,258,258,4096,Ps)];function UW(e){e.window_size=2*e.w_size,Xi(e.head),e.max_lazy_match=Ms[e.level].max_lazy,e.good_match=Ms[e.level].good_length,e.nice_match=Ms[e.level].nice_length,e.max_chain_length=Ms[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=be-1,e.match_available=0,e.ins_h=0}function $W(){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=e0,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 Wt.Buf16(BW*2),this.dyn_dtree=new Wt.Buf16((2*RW+1)*2),this.bl_tree=new Wt.Buf16((2*DW+1)*2),Xi(this.dyn_ltree),Xi(this.dyn_dtree),Xi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Wt.Buf16(FW+1),this.heap=new Wt.Buf16(2*Xb+1),Xi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Wt.Buf16(2*Xb+1),Xi(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function j6(e){var t;return!e||!e.state?Qi(e,kn):(e.total_in=e.total_out=0,e.data_type=SW,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?t0:bo,e.adler=t.wrap===2?0:1,t.last_flush=mo,Cn._tr_init(t),Sr)}function q6(e){var t=j6(e);return t===Sr&&UW(e.state),t}function HW(e,t){return!e||!e.state||e.state.wrap!==2?kn:(e.state.gzhead=t,Sr)}function W6(e,t,n,r,i,a){if(!e)return kn;var o=1;if(t===vW&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>_W||n!==e0||r<8||r>15||t<0||t>9||a<0||a>AW)return Qi(e,kn);r===8&&(r=9);var s=new $W;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+be-1)/be),s.window=new Wt.Buf8(s.w_size*2),s.head=new Wt.Buf16(s.hash_size),s.prev=new Wt.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Wt.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=t,s.strategy=a,s.method=n,q6(e)}function GW(e,t){return W6(e,t,e0,CW,kW,EW)}function VW(e,t){var n,r,i,a;if(!e||!e.state||t>$6||t<0)return e?Qi(e,kn):kn;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===wu&&t!==Yi)return Qi(e,e.avail_out===0?Qb:kn);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===t0)if(r.wrap===2)e.adler=0,Se(r,31),Se(r,139),Se(r,8),r.gzhead?(Se(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Se(r,r.gzhead.time&255),Se(r,r.gzhead.time>>8&255),Se(r,r.gzhead.time>>16&255),Se(r,r.gzhead.time>>24&255),Se(r,r.level===9?2:r.strategy>=Jd||r.level<2?4:0),Se(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(Se(r,r.gzhead.extra.length&255),Se(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Wi(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Kb):(Se(r,0),Se(r,0),Se(r,0),Se(r,0),Se(r,0),Se(r,r.level===9?2:r.strategy>=Jd||r.level<2?4:0),Se(r,MW),r.status=bo);else{var o=e0+(r.w_bits-8<<4)<<8,s=-1;r.strategy>=Jd||r.level<2?s=0:r.level<6?s=1:r.level===6?s=2:s=3,o|=s<<6,r.strstart!==0&&(o|=PW),o+=31-o%31,r.status=bo,Au(r,o),r.strstart!==0&&(Au(r,e.adler>>>16),Au(r,e.adler&65535)),e.adler=1}if(r.status===Kb)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(r.gzhead.extra.length&65535)&&!(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),Ki(e),i=r.pending,r.pending===r.pending_buf_size));)Se(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=n0)}else r.status=n0;if(r.status===n0)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),Ki(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}r.gzindex<r.gzhead.name.length?a=r.gzhead.name.charCodeAt(r.gzindex++)&255:a=0,Se(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=r0)}else r.status=r0;if(r.status===r0)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),Ki(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}r.gzindex<r.gzhead.comment.length?a=r.gzhead.comment.charCodeAt(r.gzindex++)&255:a=0,Se(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=Wi(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=i0)}else r.status=i0;if(r.status===i0&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Ki(e),r.pending+2<=r.pending_buf_size&&(Se(r,e.adler&255),Se(r,e.adler>>8&255),e.adler=0,r.status=bo)):r.status=bo),r.pending!==0){if(Ki(e),e.avail_out===0)return r.last_flush=-1,Sr}else if(e.avail_in===0&&G6(t)<=G6(n)&&t!==Yi)return Qi(e,Qb);if(r.status===wu&&e.avail_in!==0)return Qi(e,Qb);if(e.avail_in!==0||r.lookahead!==0||t!==mo&&r.status!==wu){var c=r.strategy===Jd?zW(r,t):r.strategy===xW?NW(r,t):Ms[r.level].func(r,t);if((c===yo||c===Fs)&&(r.status=wu),c===yt||c===yo)return e.avail_out===0&&(r.last_flush=-1),Sr;if(c===xu&&(t===mW?Cn._tr_align(r):t!==$6&&(Cn._tr_stored_block(r,0,0,!1),t===bW&&(Xi(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Ki(e),e.avail_out===0))return r.last_flush=-1,Sr}return t!==Yi?Sr:r.wrap<=0?H6:(r.wrap===2?(Se(r,e.adler&255),Se(r,e.adler>>8&255),Se(r,e.adler>>16&255),Se(r,e.adler>>24&255),Se(r,e.total_in&255),Se(r,e.total_in>>8&255),Se(r,e.total_in>>16&255),Se(r,e.total_in>>24&255)):(Au(r,e.adler>>>16),Au(r,e.adler&65535)),Ki(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Sr:H6)}function jW(e){var t;return!e||!e.state?kn:(t=e.state.status,t!==t0&&t!==Kb&&t!==n0&&t!==r0&&t!==i0&&t!==bo&&t!==wu?Qi(e,kn):(e.state=null,t===bo?Qi(e,yW):Sr))}function qW(e,t){var n=t.length,r,i,a,o,s,c,l,u;if(!e||!e.state||(r=e.state,o=r.wrap,o===2||o===1&&r.status!==t0||r.lookahead))return kn;for(o===1&&(e.adler=U6(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(o===0&&(Xi(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new Wt.Buf8(r.w_size),Wt.arraySet(u,t,n-r.w_size,r.w_size,0),t=u,n=r.w_size),s=e.avail_in,c=e.next_in,l=e.input,e.avail_in=n,e.next_in=0,e.input=t,vo(r);r.lookahead>=be;){i=r.strstart,a=r.lookahead-(be-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+be-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--a);r.strstart=i,r.lookahead=be-1,vo(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=be-1,r.match_available=0,e.next_in=c,e.input=l,e.avail_in=s,r.wrap=o,Sr}Ar.deflateInit=GW,Ar.deflateInit2=W6,Ar.deflateReset=q6,Ar.deflateResetKeep=j6,Ar.deflateSetHeader=HW,Ar.deflate=VW,Ar.deflateEnd=jW,Ar.deflateSetDictionary=qW,Ar.deflateInfo="pako deflate (from Nodeca project)";var wo={},a0=Kr,Y6=!0,Z6=!0;try{String.fromCharCode.apply(null,[0])}catch{Y6=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Z6=!1}for(var Eu=new a0.Buf8(256),Ji=0;Ji<256;Ji++)Eu[Ji]=Ji>=252?6:Ji>=248?5:Ji>=240?4:Ji>=224?3:Ji>=192?2:1;Eu[254]=Eu[254]=1,wo.string2buf=function(e){var t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new a0.Buf8(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};function Q6(e,t){if(t<65534&&(e.subarray&&Z6||!e.subarray&&Y6))return String.fromCharCode.apply(null,a0.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}wo.buf2binstring=function(e){return Q6(e,e.length)},wo.binstring2buf=function(e){for(var t=new a0.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},wo.buf2string=function(e,t){var n,r,i,a,o=t||e.length,s=new Array(o*2);for(r=0,n=0;n<o;){if(i=e[n++],i<128){s[r++]=i;continue}if(a=Eu[i],a>4){s[r++]=65533,n+=a-1;continue}for(i&=a===2?31:a===3?15:7;a>1&&n<o;)i=i<<6|e[n++]&63,a--;if(a>1){s[r++]=65533;continue}i<65536?s[r++]=i:(i-=65536,s[r++]=55296|i>>10&1023,s[r++]=56320|i&1023)}return Q6(s,r)},wo.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Eu[e[n]]>t?n:t};function WW(){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}var X6=WW,Su=Ar,_u=Kr,ey=wo,ty=Zb,YW=X6,K6=Object.prototype.toString,ZW=0,ny=4,Os=0,J6=1,eC=2,QW=-1,XW=0,KW=8;function xo(e){if(!(this instanceof xo))return new xo(e);this.options=_u.assign({level:QW,method:KW,chunkSize:16384,windowBits:15,memLevel:8,strategy:XW,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new YW,this.strm.avail_out=0;var n=Su.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Os)throw new Error(ty[n]);if(t.header&&Su.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=ey.string2buf(t.dictionary):K6.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Su.deflateSetDictionary(this.strm,r),n!==Os)throw new Error(ty[n]);this._dict_set=!0}}xo.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;a=t===~~t?t:t===!0?ny:ZW,typeof e=="string"?n.input=ey.string2buf(e):K6.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new _u.Buf8(r),n.next_out=0,n.avail_out=r),i=Su.deflate(n,a),i!==J6&&i!==Os)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(a===ny||a===eC))&&(this.options.to==="string"?this.onData(ey.buf2binstring(_u.shrinkBuf(n.output,n.next_out))):this.onData(_u.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==J6);return a===ny?(i=Su.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Os):(a===eC&&(this.onEnd(Os),n.avail_out=0),!0)},xo.prototype.onData=function(e){this.chunks.push(e)},xo.prototype.onEnd=function(e){e===Os&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=_u.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ry(e,t){var n=new xo(t);if(n.push(e,!0),n.err)throw n.msg||ty[n.err];return n.result}function JW(e,t){return t=t||{},t.raw=!0,ry(e,t)}function eY(e,t){return t=t||{},t.gzip=!0,ry(e,t)}du.Deflate=xo,du.deflate=ry,du.deflateRaw=JW,du.gzip=eY;var Cu={},tr={},o0=30,tY=12,nY=function(t,n){var r,i,a,o,s,c,l,u,f,h,d,p,g,b,y,w,A,x,C,_,I,D,M,G,O;r=t.state,i=t.next_in,G=t.input,a=i+(t.avail_in-5),o=t.next_out,O=t.output,s=o-(n-t.avail_out),c=o+(t.avail_out-257),l=r.dmax,u=r.wsize,f=r.whave,h=r.wnext,d=r.window,p=r.hold,g=r.bits,b=r.lencode,y=r.distcode,w=(1<<r.lenbits)-1,A=(1<<r.distbits)-1;e:do{g<15&&(p+=G[i++]<<g,g+=8,p+=G[i++]<<g,g+=8),x=b[p&w];t:for(;;){if(C=x>>>24,p>>>=C,g-=C,C=x>>>16&255,C===0)O[o++]=x&65535;else if(C&16){_=x&65535,C&=15,C&&(g<C&&(p+=G[i++]<<g,g+=8),_+=p&(1<<C)-1,p>>>=C,g-=C),g<15&&(p+=G[i++]<<g,g+=8,p+=G[i++]<<g,g+=8),x=y[p&A];n:for(;;){if(C=x>>>24,p>>>=C,g-=C,C=x>>>16&255,C&16){if(I=x&65535,C&=15,g<C&&(p+=G[i++]<<g,g+=8,g<C&&(p+=G[i++]<<g,g+=8)),I+=p&(1<<C)-1,I>l){t.msg="invalid distance too far back",r.mode=o0;break e}if(p>>>=C,g-=C,C=o-s,I>C){if(C=I-C,C>f&&r.sane){t.msg="invalid distance too far back",r.mode=o0;break e}if(D=0,M=d,h===0){if(D+=u-C,C<_){_-=C;do O[o++]=d[D++];while(--C);D=o-I,M=O}}else if(h<C){if(D+=u+h-C,C-=h,C<_){_-=C;do O[o++]=d[D++];while(--C);if(D=0,h<_){C=h,_-=C;do O[o++]=d[D++];while(--C);D=o-I,M=O}}}else if(D+=h-C,C<_){_-=C;do O[o++]=d[D++];while(--C);D=o-I,M=O}for(;_>2;)O[o++]=M[D++],O[o++]=M[D++],O[o++]=M[D++],_-=3;_&&(O[o++]=M[D++],_>1&&(O[o++]=M[D++]))}else{D=o-I;do O[o++]=O[D++],O[o++]=O[D++],O[o++]=O[D++],_-=3;while(_>2);_&&(O[o++]=O[D++],_>1&&(O[o++]=O[D++]))}}else if(C&64){t.msg="invalid distance code",r.mode=o0;break e}else{x=y[(x&65535)+(p&(1<<C)-1)];continue n}break}}else if(C&64)if(C&32){r.mode=tY;break e}else{t.msg="invalid literal/length code",r.mode=o0;break e}else{x=b[(x&65535)+(p&(1<<C)-1)];continue t}break}}while(i<a&&o<c);_=g>>3,i-=_,g-=_<<3,p&=(1<<g)-1,t.next_in=i,t.next_out=o,t.avail_in=i<a?5+(a-i):5-(i-a),t.avail_out=o<c?257+(c-o):257-(o-c),r.hold=p,r.bits=g},tC=Kr,Ls=15,nC=852,rC=592,iC=0,iy=1,aC=2,rY=[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],iY=[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],aY=[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],oY=[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],sY=function(t,n,r,i,a,o,s,c){var l=c.bits,u=0,f=0,h=0,d=0,p=0,g=0,b=0,y=0,w=0,A=0,x,C,_,I,D,M=null,G=0,O,ae=new tC.Buf16(Ls+1),se=new tC.Buf16(Ls+1),ve=null,Pe=0,st,Ne,lt;for(u=0;u<=Ls;u++)ae[u]=0;for(f=0;f<i;f++)ae[n[r+f]]++;for(p=l,d=Ls;d>=1&&ae[d]===0;d--);if(p>d&&(p=d),d===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,c.bits=1,0;for(h=1;h<d&&ae[h]===0;h++);for(p<h&&(p=h),y=1,u=1;u<=Ls;u++)if(y<<=1,y-=ae[u],y<0)return-1;if(y>0&&(t===iC||d!==1))return-1;for(se[1]=0,u=1;u<Ls;u++)se[u+1]=se[u]+ae[u];for(f=0;f<i;f++)n[r+f]!==0&&(s[se[n[r+f]]++]=f);if(t===iC?(M=ve=s,O=19):t===iy?(M=rY,G-=257,ve=iY,Pe-=257,O=256):(M=aY,ve=oY,O=-1),A=0,f=0,u=h,D=o,g=p,b=0,_=-1,w=1<<p,I=w-1,t===iy&&w>nC||t===aC&&w>rC)return 1;for(;;){st=u-b,s[f]<O?(Ne=0,lt=s[f]):s[f]>O?(Ne=ve[Pe+s[f]],lt=M[G+s[f]]):(Ne=32+64,lt=0),x=1<<u-b,C=1<<g,h=C;do C-=x,a[D+(A>>b)+C]=st<<24|Ne<<16|lt|0;while(C!==0);for(x=1<<u-1;A&x;)x>>=1;if(x!==0?(A&=x-1,A+=x):A=0,f++,--ae[u]===0){if(u===d)break;u=n[r+s[f]]}if(u>p&&(A&I)!==_){for(b===0&&(b=p),D+=h,g=u-b,y=1<<g;g+b<d&&(y-=ae[g+b],!(y<=0));)g++,y<<=1;if(w+=1<<g,t===iy&&w>nC||t===aC&&w>rC)return 1;_=A&I,a[_]=p<<24|g<<16|D-o|0}}return A!==0&&(a[D+A]=u-b<<24|64<<16|0),c.bits=p,0},mn=Kr,ay=N6,Cr=z6,cY=nY,ku=sY,lY=0,oC=1,sC=2,cC=4,uY=5,s0=6,Ao=0,fY=1,hY=2,Tn=-2,lC=-3,uC=-4,dY=-5,fC=8,hC=1,dC=2,pC=3,gC=4,mC=5,bC=6,yC=7,vC=8,wC=9,xC=10,c0=11,ei=12,oy=13,AC=14,sy=15,EC=16,SC=17,_C=18,CC=19,l0=20,u0=21,kC=22,TC=23,IC=24,RC=25,DC=26,cy=27,BC=28,FC=29,Ke=30,PC=31,pY=32,gY=852,mY=592,bY=15,yY=bY;function MC(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function vY(){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 mn.Buf16(320),this.work=new mn.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function OC(e){var t;return!e||!e.state?Tn:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=hC,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new mn.Buf32(gY),t.distcode=t.distdyn=new mn.Buf32(mY),t.sane=1,t.back=-1,Ao)}function LC(e){var t;return!e||!e.state?Tn:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,OC(e))}function NC(e,t){var n,r;return!e||!e.state||(r=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Tn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,LC(e))}function zC(e,t){var n,r;return e?(r=new vY,e.state=r,r.window=null,n=NC(e,t),n!==Ao&&(e.state=null),n):Tn}function wY(e){return zC(e,yY)}var UC=!0,ly,uy;function xY(e){if(UC){var t;for(ly=new mn.Buf32(512),uy=new mn.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ku(oC,e.lens,0,288,ly,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ku(sC,e.lens,0,32,uy,0,e.work,{bits:5}),UC=!1}e.lencode=ly,e.lenbits=9,e.distcode=uy,e.distbits=5}function $C(e,t,n,r){var i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new mn.Buf8(a.wsize)),r>=a.wsize?(mn.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),mn.arraySet(a.window,t,n-r,i,a.wnext),r-=i,r?(mn.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function AY(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p,g,b=0,y,w,A,x,C,_,I,D,M=new mn.Buf8(4),G,O,ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Tn;n=e.state,n.mode===ei&&(n.mode=oy),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,f=s,h=c,D=Ao;e:for(;;)switch(n.mode){case hC:if(n.wrap===0){n.mode=oy;break}for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=Cr(n.check,M,2,0),l=0,u=0,n.mode=dC;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Ke;break}if((l&15)!==fC){e.msg="unknown compression method",n.mode=Ke;break}if(l>>>=4,u-=4,I=(l&15)+8,n.wbits===0)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=Ke;break}n.dmax=1<<I,e.adler=n.check=1,n.mode=l&512?xC:ei,l=0,u=0;break;case dC:for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==fC){e.msg="unknown compression method",n.mode=Ke;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Ke;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Cr(n.check,M,2,0)),l=0,u=0,n.mode=pC;case pC:for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=Cr(n.check,M,4,0)),l=0,u=0,n.mode=gC;case gC:for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Cr(n.check,M,2,0)),l=0,u=0,n.mode=mC;case mC:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Cr(n.check,M,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=bC;case bC:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),mn.arraySet(n.head.extra,r,a,d,I)),n.flags&512&&(n.check=Cr(n.check,r,d,a)),s-=d,a+=d,n.length-=d),n.length))break e;n.length=0,n.mode=yC;case yC:if(n.flags&2048){if(s===0)break e;d=0;do I=r[a+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&(n.check=Cr(n.check,r,d,a)),s-=d,a+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=vC;case vC:if(n.flags&4096){if(s===0)break e;d=0;do I=r[a+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&(n.check=Cr(n.check,r,d,a)),s-=d,a+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=wC;case wC:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Ke;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ei;break;case xC:for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=MC(l),l=0,u=0,n.mode=c0;case c0:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,hY;e.adler=n.check=1,n.mode=ei;case ei:if(t===uY||t===s0)break e;case oy:if(n.last){l>>>=u&7,u-=u&7,n.mode=cy;break}for(;u<3;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=AC;break;case 1:if(xY(n),n.mode=l0,t===s0){l>>>=2,u-=2;break e}break;case 2:n.mode=SC;break;case 3:e.msg="invalid block type",n.mode=Ke}l>>>=2,u-=2;break;case AC:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Ke;break}if(n.length=l&65535,l=0,u=0,n.mode=sy,t===s0)break e;case sy:n.mode=EC;case EC:if(d=n.length,d){if(d>s&&(d=s),d>c&&(d=c),d===0)break e;mn.arraySet(i,r,a,d,o),s-=d,a+=d,c-=d,o+=d,n.length-=d;break}n.mode=ei;break;case SC:for(;u<14;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Ke;break}n.have=0,n.mode=_C;case _C:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.lens[ae[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[ae[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=ku(lY,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid code lengths set",n.mode=Ke;break}n.have=0,n.mode=CC;case CC:for(;n.have<n.nlen+n.ndist;){for(;b=n.lencode[l&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(A<16)l>>>=y,u-=y,n.lens[n.have++]=A;else{if(A===16){for(O=y+2;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(l>>>=y,u-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=Ke;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,u-=2}else if(A===17){for(O=y+3;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=y,u-=y,I=0,d=3+(l&7),l>>>=3,u-=3}else{for(O=y+7;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=y,u-=y,I=0,d=11+(l&127),l>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Ke;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===Ke)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Ke;break}if(n.lenbits=9,G={bits:n.lenbits},D=ku(oC,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid literal/lengths set",n.mode=Ke;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},D=ku(sC,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,D){e.msg="invalid distances set",n.mode=Ke;break}if(n.mode=l0,t===s0)break e;case l0:n.mode=u0;case u0:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,cY(e,h),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===ei&&(n.back=-1);break}for(n.back=0;b=n.lencode[l&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(w&&!(w&240)){for(x=y,C=w,_=A;b=n.lencode[_+((l&(1<<x+C)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=x,u-=x,n.back+=x}if(l>>>=y,u-=y,n.back+=y,n.length=A,w===0){n.mode=DC;break}if(w&32){n.back=-1,n.mode=ei;break}if(w&64){e.msg="invalid literal/length code",n.mode=Ke;break}n.extra=w&15,n.mode=kC;case kC:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=TC;case TC:for(;b=n.distcode[l&(1<<n.distbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(!(w&240)){for(x=y,C=w,_=A;b=n.distcode[_+((l&(1<<x+C)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=x,u-=x,n.back+=x}if(l>>>=y,u-=y,n.back+=y,w&64){e.msg="invalid distance code",n.mode=Ke;break}n.offset=A,n.extra=w&15,n.mode=IC;case IC:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Ke;break}n.mode=RC;case RC:if(c===0)break e;if(d=h-c,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Ke;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),g=n.window}else g=i,p=o-n.offset,d=n.length;d>c&&(d=c),c-=d,n.length-=d;do i[o++]=g[p++];while(--d);n.length===0&&(n.mode=u0);break;case DC:if(c===0)break e;i[o++]=n.length,c--,n.mode=u0;break;case cy:if(n.wrap){for(;u<32;){if(s===0)break e;s--,l|=r[a++]<<u,u+=8}if(h-=c,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?Cr(n.check,i,h,o-h):ay(n.check,i,h,o-h)),h=c,(n.flags?l:MC(l))!==n.check){e.msg="incorrect data check",n.mode=Ke;break}l=0,u=0}n.mode=BC;case BC:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Ke;break}l=0,u=0}n.mode=FC;case FC:D=fY;break e;case Ke:D=lC;break e;case PC:return uC;case pY:default:return Tn}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<Ke&&(n.mode<cy||t!==cC))&&$C(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?Cr(n.check,i,h,e.next_out-h):ay(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===ei?128:0)+(n.mode===l0||n.mode===sy?256:0),(f===0&&h===0||t===cC)&&D===Ao&&(D=dY),D}function EY(e){if(!e||!e.state)return Tn;var t=e.state;return t.window&&(t.window=null),e.state=null,Ao}function SY(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?Tn:(n.head=t,t.done=!1,Ao)}function _Y(e,t){var n=t.length,r,i,a;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==c0)?Tn:r.mode===c0&&(i=1,i=ay(i,t,n,0),i!==r.check)?lC:(a=$C(e,t,n,n),a?(r.mode=PC,uC):(r.havedict=1,Ao))}tr.inflateReset=LC,tr.inflateReset2=NC,tr.inflateResetKeep=OC,tr.inflateInit=wY,tr.inflateInit2=zC,tr.inflate=AY,tr.inflateEnd=EY,tr.inflateGetHeader=SY,tr.inflateSetDictionary=_Y,tr.inflateInfo="pako inflate (from Nodeca project)";var HC={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};function CY(){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}var kY=CY,Ns=tr,Tu=Kr,f0=wo,ht=HC,fy=Zb,TY=X6,IY=kY,GC=Object.prototype.toString;function Eo(e){if(!(this instanceof Eo))return new Eo(e);this.options=Tu.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new TY,this.strm.avail_out=0;var n=Ns.inflateInit2(this.strm,t.windowBits);if(n!==ht.Z_OK)throw new Error(fy[n]);if(this.header=new IY,Ns.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=f0.string2buf(t.dictionary):GC.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Ns.inflateSetDictionary(this.strm,t.dictionary),n!==ht.Z_OK)))throw new Error(fy[n])}Eo.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s,c,l,u=!1;if(this.ended)return!1;o=t===~~t?t:t===!0?ht.Z_FINISH:ht.Z_NO_FLUSH,typeof e=="string"?n.input=f0.binstring2buf(e):GC.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new Tu.Buf8(r),n.next_out=0,n.avail_out=r),a=Ns.inflate(n,ht.Z_NO_FLUSH),a===ht.Z_NEED_DICT&&i&&(a=Ns.inflateSetDictionary(this.strm,i)),a===ht.Z_BUF_ERROR&&u===!0&&(a=ht.Z_OK,u=!1),a!==ht.Z_STREAM_END&&a!==ht.Z_OK)return this.onEnd(a),this.ended=!0,!1;n.next_out&&(n.avail_out===0||a===ht.Z_STREAM_END||n.avail_in===0&&(o===ht.Z_FINISH||o===ht.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=f0.utf8border(n.output,n.next_out),c=n.next_out-s,l=f0.buf2string(n.output,s),n.next_out=c,n.avail_out=r-c,c&&Tu.arraySet(n.output,n.output,s,c,0),this.onData(l)):this.onData(Tu.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(u=!0)}while((n.avail_in>0||n.avail_out===0)&&a!==ht.Z_STREAM_END);return a===ht.Z_STREAM_END&&(o=ht.Z_FINISH),o===ht.Z_FINISH?(a=Ns.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ht.Z_OK):(o===ht.Z_SYNC_FLUSH&&(this.onEnd(ht.Z_OK),n.avail_out=0),!0)},Eo.prototype.onData=function(e){this.chunks.push(e)},Eo.prototype.onEnd=function(e){e===ht.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Tu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function hy(e,t){var n=new Eo(t);if(n.push(e,!0),n.err)throw n.msg||fy[n.err];return n.result}function RY(e,t){return t=t||{},t.raw=!0,hy(e,t)}Cu.Inflate=Eo,Cu.inflate=hy,Cu.inflateRaw=RY,Cu.ungzip=hy;var DY=Kr.assign,BY=du,FY=Cu,PY=HC,VC={};DY(VC,BY,FY,PY);var h0=VC;async function ea(e){try{let t,n=0,r=0;const i=[];let a=0,o;do{const c=e.subarray(n);if(o=new h0.Inflate,{strm:t}=o,o.push(c,h0.Z_SYNC_FLUSH),o.err)throw new Error(o.msg);n+=t.next_in,i[r]=o.result,a+=i[r].length,r+=1}while(t.avail_in);const s=new Uint8Array(a);for(let c=0,l=0;c<i.length;c++)s.set(i[c],l),l+=i[c].length;return we.Buffer.from(s)}catch(t){throw`${t}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function jC(e,t){try{let n;const{minv:r,maxv:i}=t;let a=r.blockPosition,o=r.dataPosition;const s=[],c=[],l=[];let u=0,f=0;do{const p=e.subarray(a-r.blockPosition),g=new h0.Inflate;if({strm:n}=g,g.push(p,h0.Z_SYNC_FLUSH),g.err)throw new Error(g.msg);const b=g.result;s.push(b);let y=b.length;c.push(a),l.push(o),s.length===1&&r.dataPosition&&(s[0]=s[0].subarray(r.dataPosition),y=s[0].length);const w=a;if(a+=n.next_in,o+=y,w>=i.blockPosition){s[f]=s[f].subarray(0,i.blockPosition===r.blockPosition?i.dataPosition-r.dataPosition+1:i.dataPosition+1),c.push(a),l.push(o),u+=s[f].length;break}u+=s[f].length,f++}while(n.avail_in);const h=new Uint8Array(u);for(let p=0,g=0;p<s.length;p++)h.set(s[p],g),g+=s[p].length;return{buffer:we.Buffer.from(h),cpositions:c,dpositions:l}}catch(n){throw`${n}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):n}}var MY=He,In=null;try{In=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function He(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}He.prototype.__isLong__,Object.defineProperty(He.prototype,"__isLong__",{value:!0});function on(e){return(e&&e.__isLong__)===!0}He.isLong=on;var qC={},WC={};function So(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=WC[e],r)?r:(n=Ge(e,(e|0)<0?-1:0,!0),i&&(WC[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=qC[e],r)?r:(n=Ge(e,e<0?-1:0,!1),i&&(qC[e]=n),n))}He.fromInt=So;function Rn(e,t){if(isNaN(e))return t?_o:Dn;if(t){if(e<0)return _o;if(e>=ZC)return e5}else{if(e<=-QC)return sn;if(e+1>=QC)return JC}return e<0?Rn(-e,t).neg():Ge(e%zs|0,e/zs|0,t)}He.fromNumber=Rn;function Ge(e,t,n){return new He(e,t,n)}He.fromBits=Ge;var d0=Math.pow;function dy(e,t,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return Dn;if(typeof t=="number"?(n=t,t=!1):t=!!t,n=n||10,n<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(r===0)return dy(e.substring(1),t,n).neg();for(var i=Rn(d0(n,8)),a=Dn,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),c=parseInt(e.substring(o,o+s),n);if(s<8){var l=Rn(d0(n,s));a=a.mul(l).add(Rn(c))}else a=a.mul(i),a=a.add(Rn(c))}return a.unsigned=t,a}He.fromString=dy;function nr(e,t){return typeof e=="number"?Rn(e,t):typeof e=="string"?dy(e,t):Ge(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}He.fromValue=nr;var YC=65536,OY=1<<24,zs=YC*YC,ZC=zs*zs,QC=ZC/2,XC=So(OY),Dn=So(0);He.ZERO=Dn;var _o=So(0,!0);He.UZERO=_o;var Us=So(1);He.ONE=Us;var KC=So(1,!0);He.UONE=KC;var py=So(-1);He.NEG_ONE=py;var JC=Ge(-1,2147483647,!1);He.MAX_VALUE=JC;var e5=Ge(-1,-1,!0);He.MAX_UNSIGNED_VALUE=e5;var sn=Ge(0,-2147483648,!1);He.MIN_VALUE=sn;var X=He.prototype;X.toInt=function(){return this.unsigned?this.low>>>0:this.low},X.toNumber=function(){return this.unsigned?(this.high>>>0)*zs+(this.low>>>0):this.high*zs+(this.low>>>0)},X.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(sn)){var n=Rn(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var a=Rn(d0(t,6),this.unsigned),o=this,s="";;){var c=o.div(a),l=o.sub(c.mul(a)).toInt()>>>0,u=l.toString(t);if(o=c,o.isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},X.getHighBits=function(){return this.high},X.getHighBitsUnsigned=function(){return this.high>>>0},X.getLowBits=function(){return this.low},X.getLowBitsUnsigned=function(){return this.low>>>0},X.getNumBitsAbs=function(){if(this.isNegative())return this.eq(sn)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,n=31;n>0&&!(t&1<<n);n--);return this.high!=0?n+33:n+1},X.isZero=function(){return this.high===0&&this.low===0},X.eqz=X.isZero,X.isNegative=function(){return!this.unsigned&&this.high<0},X.isPositive=function(){return this.unsigned||this.high>=0},X.isOdd=function(){return(this.low&1)===1},X.isEven=function(){return(this.low&1)===0},X.equals=function(t){return on(t)||(t=nr(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},X.eq=X.equals,X.notEquals=function(t){return!this.eq(t)},X.neq=X.notEquals,X.ne=X.notEquals,X.lessThan=function(t){return this.comp(t)<0},X.lt=X.lessThan,X.lessThanOrEqual=function(t){return this.comp(t)<=0},X.lte=X.lessThanOrEqual,X.le=X.lessThanOrEqual,X.greaterThan=function(t){return this.comp(t)>0},X.gt=X.greaterThan,X.greaterThanOrEqual=function(t){return this.comp(t)>=0},X.gte=X.greaterThanOrEqual,X.ge=X.greaterThanOrEqual,X.compare=function(t){if(on(t)||(t=nr(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},X.comp=X.compare,X.negate=function(){return!this.unsigned&&this.eq(sn)?sn:this.not().add(Us)},X.neg=X.negate,X.add=function(t){on(t)||(t=nr(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,a=this.low&65535,o=t.high>>>16,s=t.high&65535,c=t.low>>>16,l=t.low&65535,u=0,f=0,h=0,d=0;return d+=a+l,h+=d>>>16,d&=65535,h+=i+c,f+=h>>>16,h&=65535,f+=r+s,u+=f>>>16,f&=65535,u+=n+o,u&=65535,Ge(h<<16|d,u<<16|f,this.unsigned)},X.subtract=function(t){return on(t)||(t=nr(t)),this.add(t.neg())},X.sub=X.subtract,X.multiply=function(t){if(this.isZero())return Dn;if(on(t)||(t=nr(t)),In){var n=In.mul(this.low,this.high,t.low,t.high);return Ge(n,In.get_high(),this.unsigned)}if(t.isZero())return Dn;if(this.eq(sn))return t.isOdd()?sn:Dn;if(t.eq(sn))return this.isOdd()?sn:Dn;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(XC)&&t.lt(XC))return Rn(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,a=this.low>>>16,o=this.low&65535,s=t.high>>>16,c=t.high&65535,l=t.low>>>16,u=t.low&65535,f=0,h=0,d=0,p=0;return p+=o*u,d+=p>>>16,p&=65535,d+=a*u,h+=d>>>16,d&=65535,d+=o*l,h+=d>>>16,d&=65535,h+=i*u,f+=h>>>16,h&=65535,h+=a*l,f+=h>>>16,h&=65535,h+=o*c,f+=h>>>16,h&=65535,f+=r*u+i*l+a*c+o*s,f&=65535,Ge(d<<16|p,f<<16|h,this.unsigned)},X.mul=X.multiply,X.divide=function(t){if(on(t)||(t=nr(t)),t.isZero())throw Error("division by zero");if(In){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?In.div_u:In.div_s)(this.low,this.high,t.low,t.high);return Ge(n,In.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?_o:Dn;var r,i,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return _o;if(t.gt(this.shru(1)))return KC;a=_o}else{if(this.eq(sn)){if(t.eq(Us)||t.eq(py))return sn;if(t.eq(sn))return Us;var o=this.shr(1);return r=o.div(t).shl(1),r.eq(Dn)?t.isNegative()?Us:py:(i=this.sub(t.mul(r)),a=r.add(i.div(t)),a)}else if(t.eq(sn))return this.unsigned?_o:Dn;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=Dn}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),c=s<=48?1:d0(2,s-48),l=Rn(r),u=l.mul(t);u.isNegative()||u.gt(i);)r-=c,l=Rn(r,this.unsigned),u=l.mul(t);l.isZero()&&(l=Us),a=a.add(l),i=i.sub(u)}return a},X.div=X.divide,X.modulo=function(t){if(on(t)||(t=nr(t)),In){var n=(this.unsigned?In.rem_u:In.rem_s)(this.low,this.high,t.low,t.high);return Ge(n,In.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},X.mod=X.modulo,X.rem=X.modulo,X.not=function(){return Ge(~this.low,~this.high,this.unsigned)},X.and=function(t){return on(t)||(t=nr(t)),Ge(this.low&t.low,this.high&t.high,this.unsigned)},X.or=function(t){return on(t)||(t=nr(t)),Ge(this.low|t.low,this.high|t.high,this.unsigned)},X.xor=function(t){return on(t)||(t=nr(t)),Ge(this.low^t.low,this.high^t.high,this.unsigned)},X.shiftLeft=function(t){return on(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ge(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Ge(0,this.low<<t-32,this.unsigned)},X.shl=X.shiftLeft,X.shiftRight=function(t){return on(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ge(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Ge(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},X.shr=X.shiftRight,X.shiftRightUnsigned=function(t){if(on(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return Ge(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?Ge(n,0,this.unsigned):Ge(n>>>t-32,0,this.unsigned)},X.shru=X.shiftRightUnsigned,X.shr_u=X.shiftRightUnsigned,X.toSigned=function(){return this.unsigned?Ge(this.low,this.high,!1):this},X.toUnsigned=function(){return this.unsigned?this:Ge(this.low,this.high,!0)},X.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},X.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},X.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},He.fromBytes=function(t,n,r){return r?He.fromBytesLE(t,n):He.fromBytesBE(t,n)},He.fromBytesLE=function(t,n){return new He(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},He.fromBytesBE=function(t,n){return new He(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};const p0=uu(MY),g0=1;class LY{constructor({filehandle:t,path:n}){if(t)this.filehandle=t;else if(n)this.filehandle=new kt(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(t,n=0,r=!0){const i=p0.fromBytesLE(t.slice(n,n+8),r);if(i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return i.toNumber()}_getIndex(){return this.index||(this.index=this._readIndex()),this.index}async _readIndex(){let t=we.Buffer.allocUnsafe(8);await this.filehandle.read(t,0,8,0);const n=this._readLongWithOverflow(t,0,!0);if(!n)return[[0,0]];const r=new Array(n+1);r[0]=[0,0];const i=8*2*n;if(i>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");t=we.Buffer.allocUnsafe(i),await this.filehandle.read(t,0,i,8);for(let a=0;a<n;a+=1){const o=this._readLongWithOverflow(t,a*16),s=this._readLongWithOverflow(t,a*16+8);r[a+1]=[o,s]}return r}async getLastBlock(){const t=await this._getIndex();if(t.length)return t[t.length-1]}async getRelevantBlocksForRead(t,n){const r=n+t;if(t===0)return[];const i=await this._getIndex(),a=[],o=(h,d)=>{const p=h[g0],g=d?d[g0]:1/0;return p<=n&&g>n?0:p<n?-1:1};let s=0,c=i.length-1,l=Math.floor(i.length/2),u=o(i[l],i[l+1]);for(;u!==0;)u>0?c=l-1:u<0&&(s=l+1),l=Math.ceil((c-s)/2)+s,u=o(i[l],i[l+1]);a.push(i[l]);let f=l+1;for(;f<i.length&&(a.push(i[f]),!(i[f][g0]>=r));f+=1);return a[a.length-1][g0]<r&&a.push([]),a}}class t5{constructor({filehandle:t,path:n,gziFilehandle:r,gziPath:i}){if(t)this.filehandle=t;else if(n)this.filehandle=new kt(n);else throw new TypeError("either filehandle or path must be defined");if(!r&&!i&&!n)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new LY({filehandle:r,path:!r&&!i&&n?i:`${n}.gzi`})}async stat(){const t=await this.filehandle.stat();return Object.assign(t,{size:await this.getUncompressedFileSize(),blocks:void 0,blksize:void 0})}async getUncompressedFileSize(){const[,t]=await this.gzi.getLastBlock(),{size:n}=await this.filehandle.stat(),r=we.Buffer.allocUnsafe(4),{bytesRead:i}=await this.filehandle.read(r,0,4,n-28-4);if(i!==4)throw new Error("read error");const a=r.readUInt32LE(0);return t+a}async _readAndUncompressBlock(t,[n],[r]){let i=r;i||(i=(await this.filehandle.stat()).size);const a=i-n;return await this.filehandle.read(t,0,a,n),await ea(t.slice(0,a))}async read(t,n,r,i){const a=await this.gzi.getRelevantBlocksForRead(r,i),o=we.Buffer.allocUnsafe(32768*2);let s=n,c=0;for(let l=0;l<a.length-1;l+=1){const u=await this._readAndUncompressBlock(o,a[l],a[l+1]),[,f]=a[l],h=f>=i?0:i-f,d=Math.min(i+r,f+u.length)-f;h>=0&&h<u.length&&(u.copy(t,s,h,d),s+=d-h,c+=d-h)}return{bytesRead:c,buffer:t}}}function n5(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function NY(e,t){const n=await e.readFile(t);if(!(n&&n.length))throw new Error("No data read from FASTA index (FAI) file");let r=0,i;const a=n.toString("utf8").split(/\r?\n/).filter(o=>/\S/.test(o)).map(o=>o.split(" ")).filter(o=>o[0]!=="").map(o=>((!i||i.name!==o[0])&&(i={name:o[0],id:r},r+=1),{id:i.id,name:o[0],length:+o[1],start:0,end:+o[1],offset:+o[2],lineLength:+o[3],lineBytes:+o[4]}));return{name:Object.fromEntries(a.map(o=>[o.name,o])),id:Object.fromEntries(a.map(o=>[o.id,o]))}}class r5{constructor({fasta:t,fai:n,path:r,faiPath:i,chunkSizeLimit:a=1e6}){if(t)this.fasta=t;else if(r)this.fasta=new kt(r);else throw new Error("Need to pass filehandle for fasta or path to localfile");if(n)this.fai=n;else if(i)this.fai=new kt(i);else if(r)this.fai=new kt(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile");this.chunkSizeLimit=a}async _getIndexes(t){return this.indexes||(this.indexes=NY(this.fai,t)),this.indexes}async getSequenceNames(t){return Object.keys((await this._getIndexes(t)).name)}async getSequenceSizes(t){const n={},r=await this._getIndexes(t),i=Object.values(r.id);for(let a=0;a<i.length;a+=1)n[i[a].name]=i[a].length;return n}async getSequenceSize(t,n){var r;return(r=(await this._getIndexes(n)).name[t])===null||r===void 0?void 0:r.length}async hasReferenceSequence(t,n){return!!(await this._getIndexes(n)).name[t]}async getResiduesById(t,n,r,i){const a=(await this._getIndexes(i)).id[t];if(a)return this._fetchFromIndexEntry(a,n,r,i)}async getResiduesByName(t,n,r,i){const a=(await this._getIndexes(i)).name[t];if(a)return this._fetchFromIndexEntry(a,n,r,i)}async getSequence(t,n,r,i){return this.getResiduesByName(t,n,r,i)}async _fetchFromIndexEntry(t,n=0,r,i){let a=r;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((a===void 0||a>t.length)&&(a=t.length),n>=a)return"";const o=n5(t,n),s=n5(t,a)-o;if(s>this.chunkSizeLimit)throw new Error(`data size of ${s.toLocaleString()} bytes exceeded chunk size limit of ${this.chunkSizeLimit.toLocaleString()} bytes`);const c=Buffer.allocUnsafe(s);return await this.fasta.read(c,0,s,o,i),c.toString("utf8").replace(/\s+/g,"")}}class zY extends r5{constructor({fasta:t,path:n,fai:r,faiPath:i,gzi:a,gziPath:o,chunkSizeLimit:s}){super({fasta:t,path:n,fai:r,faiPath:i,chunkSizeLimit:s}),t&&a?this.fasta=new t5({filehandle:t,gziFilehandle:a}):n&&o&&(this.fasta=new t5({path:n,gziPath:o}))}}function i5(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
3275
+ `),[i,...a]=n.split(" "),o=r.join("").replace(/\s/g,"");return{id:i,description:a.join(" "),sequence:o}})}class UY{constructor({fasta:t,path:n}){if(t)this.fasta=t;else if(n)this.fasta=new kt(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const i=r.toString("utf8");return i5(i)})}async fetch(t,n,r){const a=(await this.data).find(s=>s.id===t),o=r-n;if(!a)throw new Error(`no sequence with id ${t} exists`);return a.sequence.substr(n,o)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const $Y=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:zY,FetchableSmallFasta:UY,IndexedFasta:r5,parseSmallFasta:i5},Symbol.toStringTag,{value:"Module"})),m0=BigInt(32);function HY(e,t,n){const r=+!!n,i=+!n;return BigInt(e.getInt32(t,n)*i+e.getInt32(t+4,n)*r)<<m0|BigInt(e.getUint32(t,n)*r+e.getUint32(t+4,n)*i)}function GY(e,t,n){const r=e.getUint32(t,n),i=e.getUint32(t+4,n),a=+!!n,o=+!n;return BigInt(r*o+i*a)<<m0|BigInt(r*a+i*o)}function VY(e,t,n,r){const i=Number(n>>m0),a=Number(n&BigInt(4294967295));r?(e.setInt32(t+4,i,r),e.setUint32(t,a,r)):(e.setInt32(t,i,r),e.setUint32(t+4,a,r))}function jY(e,t,n,r){const i=Number(n>>m0),a=Number(n&BigInt(4294967295));r?(e.setUint32(t+4,i,r),e.setUint32(t,a,r)):(e.setUint32(t,i,r),e.setUint32(t+4,a,r))}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return HY(this,e,t)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(e,t){return GY(this,e,t)}),"setBigInt64"in DataView||(DataView.prototype.setBigInt64=function(e,t,n){VY(this,e,t,n)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,n){jY(this,e,t,n)});class qY{constructor(t,n){this.code="",this.scopes=[["vars"]],this.bitFields=[],this.tmpVariableCount=0,this.references=new Map,this.imports=[],this.reverseImports=new Map,this.useContextVariables=!1,this.importPath=t,this.useContextVariables=n}generateVariable(t){const n=[...this.scopes[this.scopes.length-1]];return t&&n.push(t),n.join(".")}generateOption(t){switch(typeof t){case"number":return t.toString();case"string":return this.generateVariable(t);case"function":return`${this.addImport(t)}.call(${this.generateVariable()}, vars)`}}generateError(t){this.pushCode(`throw new Error(${t});`)}generateTmpVariable(){return"$tmp"+this.tmpVariableCount++}pushCode(t){this.code+=t+`
3276
+ `}pushPath(t){t&&this.scopes[this.scopes.length-1].push(t)}popPath(t){t&&this.scopes[this.scopes.length-1].pop()}pushScope(t){this.scopes.push([t])}popScope(){this.scopes.pop()}addImport(t){if(!this.importPath)return`(${t})`;let n=this.reverseImports.get(t);return n||(n=this.imports.push(t)-1,this.reverseImports.set(t,n)),`${this.importPath}[${n}]`}addReference(t){this.references.has(t)||this.references.set(t,{resolved:!1,requested:!1})}markResolved(t){const n=this.references.get(t);n&&(n.resolved=!0)}markRequested(t){t.forEach(n=>{const r=this.references.get(n);r&&(r.requested=!0)})}getUnresolvedReferences(){return Array.from(this.references).filter(([t,n])=>!n.resolved&&!n.requested).map(([t,n])=>t)}}const rr=new Map,Co="___parser_",ir={uint8:1,uint16le:2,uint16be:2,uint32le:4,uint32be:4,int8:1,int16le:2,int16be:2,int32le:4,int32be:4,int64be:8,int64le:8,uint64be:8,uint64le:8,floatle:4,floatbe:4,doublele:8,doublebe:8},b0={uint8:"Uint8",uint16le:"Uint16",uint16be:"Uint16",uint32le:"Uint32",uint32be:"Uint32",int8:"Int8",int16le:"Int16",int16be:"Int16",int32le:"Int32",int32be:"Int32",int64be:"BigInt64",int64le:"BigInt64",uint64be:"BigUint64",uint64le:"BigUint64",floatle:"Float32",floatbe:"Float32",doublele:"Float64",doublebe:"Float64"},y0={uint8:!1,uint16le:!0,uint16be:!1,uint32le:!0,uint32be:!1,int8:!1,int16le:!0,int16be:!1,int32le:!0,int32be:!1,int64be:!1,int64le:!0,uint64be:!1,uint64le:!0,floatle:!0,floatbe:!1,doublele:!0,doublebe:!1};let Fe=class sr{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new sr}primitiveGenerateN(t,n){const r=b0[t],i=y0[t];n.pushCode(`${n.generateVariable(this.varName)} = dataView.get${r}(offset, ${i});`),n.pushCode(`offset += ${ir[t]};`)}primitiveN(t,n,r){return this.setNextParser(t,n,r)}useThisEndian(t){return t+this.endian.toLowerCase()}uint8(t,n={}){return this.primitiveN("uint8",t,n)}uint16(t,n={}){return this.primitiveN(this.useThisEndian("uint16"),t,n)}uint16le(t,n={}){return this.primitiveN("uint16le",t,n)}uint16be(t,n={}){return this.primitiveN("uint16be",t,n)}uint32(t,n={}){return this.primitiveN(this.useThisEndian("uint32"),t,n)}uint32le(t,n={}){return this.primitiveN("uint32le",t,n)}uint32be(t,n={}){return this.primitiveN("uint32be",t,n)}int8(t,n={}){return this.primitiveN("int8",t,n)}int16(t,n={}){return this.primitiveN(this.useThisEndian("int16"),t,n)}int16le(t,n={}){return this.primitiveN("int16le",t,n)}int16be(t,n={}){return this.primitiveN("int16be",t,n)}int32(t,n={}){return this.primitiveN(this.useThisEndian("int32"),t,n)}int32le(t,n={}){return this.primitiveN("int32le",t,n)}int32be(t,n={}){return this.primitiveN("int32be",t,n)}bigIntVersionCheck(){if(!DataView.prototype.getBigInt64)throw new Error("BigInt64 is unsupported on this runtime")}int64(t,n={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("int64"),t,n)}int64be(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("int64be",t,n)}int64le(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("int64le",t,n)}uint64(t,n={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("uint64"),t,n)}uint64be(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("uint64be",t,n)}uint64le(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("uint64le",t,n)}floatle(t,n={}){return this.primitiveN("floatle",t,n)}floatbe(t,n={}){return this.primitiveN("floatbe",t,n)}doublele(t,n={}){return this.primitiveN("doublele",t,n)}doublebe(t,n={}){return this.primitiveN("doublebe",t,n)}bitN(t,n,r){return r.length=t,this.setNextParser("bit",n,r)}bit1(t,n={}){return this.bitN(1,t,n)}bit2(t,n={}){return this.bitN(2,t,n)}bit3(t,n={}){return this.bitN(3,t,n)}bit4(t,n={}){return this.bitN(4,t,n)}bit5(t,n={}){return this.bitN(5,t,n)}bit6(t,n={}){return this.bitN(6,t,n)}bit7(t,n={}){return this.bitN(7,t,n)}bit8(t,n={}){return this.bitN(8,t,n)}bit9(t,n={}){return this.bitN(9,t,n)}bit10(t,n={}){return this.bitN(10,t,n)}bit11(t,n={}){return this.bitN(11,t,n)}bit12(t,n={}){return this.bitN(12,t,n)}bit13(t,n={}){return this.bitN(13,t,n)}bit14(t,n={}){return this.bitN(14,t,n)}bit15(t,n={}){return this.bitN(15,t,n)}bit16(t,n={}){return this.bitN(16,t,n)}bit17(t,n={}){return this.bitN(17,t,n)}bit18(t,n={}){return this.bitN(18,t,n)}bit19(t,n={}){return this.bitN(19,t,n)}bit20(t,n={}){return this.bitN(20,t,n)}bit21(t,n={}){return this.bitN(21,t,n)}bit22(t,n={}){return this.bitN(22,t,n)}bit23(t,n={}){return this.bitN(23,t,n)}bit24(t,n={}){return this.bitN(24,t,n)}bit25(t,n={}){return this.bitN(25,t,n)}bit26(t,n={}){return this.bitN(26,t,n)}bit27(t,n={}){return this.bitN(27,t,n)}bit28(t,n={}){return this.bitN(28,t,n)}bit29(t,n={}){return this.bitN(29,t,n)}bit30(t,n={}){return this.bitN(30,t,n)}bit31(t,n={}){return this.bitN(31,t,n)}bit32(t,n={}){return this.bitN(32,t,n)}namely(t){return rr.set(t,this),this.alias=t,this}skip(t,n={}){return this.seek(t,n)}seek(t,n={}){if(n.assert)throw new Error("assert option on seek is not allowed.");return this.setNextParser("seek","",{length:t})}string(t,n){if(!n.zeroTerminated&&!n.length&&!n.greedy)throw new Error("One of length, zeroTerminated, or greedy must be defined for string.");if((n.zeroTerminated||n.length)&&n.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(n.stripNull&&!(n.length||n.greedy))throw new Error("length or greedy must be defined if stripNull is enabled.");return n.encoding=n.encoding||"utf8",this.setNextParser("string",t,n)}buffer(t,n){if(!n.length&&!n.readUntil)throw new Error("length or readUntil must be defined for buffer.");return this.setNextParser("buffer",t,n)}wrapped(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.wrapper||!n.type)throw new Error("Both wrapper and type must be defined for wrapped.");if(!n.length&&!n.readUntil)throw new Error("length or readUntil must be defined for wrapped.");return this.setNextParser("wrapper",t,n)}array(t,n){if(!n.readUntil&&!n.length&&!n.lengthInBytes)throw new Error("One of readUntil, length and lengthInBytes must be defined for array.");if(!n.type)throw new Error("type is required for array.");if(typeof n.type=="string"&&!rr.has(n.type)&&!(n.type in ir))throw new Error(`Array element type "${n.type}" is unkown.`);return this.setNextParser("array",t,n)}choice(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n)throw new Error("tag and choices are are required for choice.");if(!n.tag)throw new Error("tag is requird for choice.");if(!n.choices)throw new Error("choices is required for choice.");for(const r in n.choices){const i=parseInt(r,10),a=n.choices[i];if(isNaN(i))throw new Error(`Choice key "${r}" is not a number.`);if(typeof a=="string"&&!rr.has(a)&&!(a in ir))throw new Error(`Choice type "${a}" is unkown.`)}return this.setNextParser("choice",t,n)}nest(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.type)throw new Error("type is required for nest.");if(!(n.type instanceof sr)&&!rr.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof sr)&&!t)throw new Error("type must be a Parser object if the variable name is omitted.");return this.setNextParser("nest",t,n)}pointer(t,n){if(!n.offset)throw new Error("offset is required for pointer.");if(!n.type)throw new Error("type is required for pointer.");if(typeof n.type=="string"&&!(n.type in ir)&&!rr.has(n.type))throw new Error(`Pointer type "${n.type}" is unkown.`);return this.setNextParser("pointer",t,n)}saveOffset(t,n={}){return this.setNextParser("saveOffset",t,n)}endianness(t){switch(t.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error('endianness must be one of "little" or "big"')}return this}endianess(t){return this.endianness(t)}useContextVars(t=!0){return this.useContextVariables=t,this}create(t){if(!(t instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=t,this}getContext(t){const n=new qY(t,this.useContextVariables);return n.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(n),n.pushCode(`return ${Co+this.alias}(0).result;`)):this.addRawCode(n),n}getCode(){const t="imports";return this.getContext(t).code}addRawCode(t){t.pushCode("var offset = 0;"),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("vars.$parent = null;"),t.pushCode("vars.$root = vars;"),this.generate(t),this.resolveReferences(t),t.pushCode("delete vars.$parent;"),t.pushCode("delete vars.$root;"),t.pushCode("return vars;")}addAliasedCode(t){return t.pushCode(`function ${Co+this.alias}(offset, context) {`),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"),t.pushCode("vars = Object.assign(vars, ctx);"),this.generate(t),t.markResolved(this.alias),this.resolveReferences(t),t.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"),t.pushCode("return { offset: offset, result: vars };"),t.pushCode("}"),t}resolveReferences(t){const n=t.getUnresolvedReferences();t.markRequested(n),n.forEach(r=>{var i;(i=rr.get(r))===null||i===void 0||i.addAliasedCode(t)})}compile(){const t="imports",n=this.getContext(t);this.compiled=new Function(t,"TextDecoder",`return function (buffer, constructorFn) { ${n.code} };`)(n.imports,TextDecoder)}sizeOf(){let t=NaN;if(Object.keys(ir).indexOf(this.type)>=0)t=ir[this.type];else if(this.type==="string"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="buffer"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="array"&&typeof this.options.length=="number"){let n=NaN;typeof this.options.type=="string"?n=ir[this.options.type]:this.options.type instanceof sr&&(n=this.options.type.sizeOf()),t=this.options.length*n}else this.type==="seek"?t=this.options.length:this.type==="nest"?t=this.options.type.sizeOf():this.type||(t=0);return this.next&&(t+=this.next.sizeOf()),t}parse(t){return this.compiled||this.compile(),this.compiled(t,this.constructorFn)}setNextParser(t,n,r){const i=new sr;return i.type=t,i.varName=n,i.options=r,i.endian=this.endian,this.head?this.head.next=i:this.next=i,this.head=i,this}generate(t){if(this.type){switch(this.type){case"uint8":case"uint16le":case"uint16be":case"uint32le":case"uint32be":case"int8":case"int16le":case"int16be":case"int32le":case"int32be":case"int64be":case"int64le":case"uint64be":case"uint64le":case"floatle":case"floatbe":case"doublele":case"doublebe":this.primitiveGenerateN(this.type,t);break;case"bit":this.generateBit(t);break;case"string":this.generateString(t);break;case"buffer":this.generateBuffer(t);break;case"seek":this.generateSeek(t);break;case"nest":this.generateNest(t);break;case"array":this.generateArray(t);break;case"choice":this.generateChoice(t);break;case"pointer":this.generatePointer(t);break;case"saveOffset":this.generateSaveOffset(t);break;case"wrapper":this.generateWrapper(t);break}this.type!=="bit"&&this.generateAssert(t)}const n=t.generateVariable(this.varName);return this.options.formatter&&this.type!=="bit"&&this.generateFormatter(t,n,this.options.formatter),this.generateNext(t)}generateAssert(t){if(!this.options.assert)return;const n=t.generateVariable(this.varName);switch(typeof this.options.assert){case"function":{const r=t.addImport(this.options.assert);t.pushCode(`if (!${r}.call(vars, ${n})) {`)}break;case"number":t.pushCode(`if (${this.options.assert} !== ${n}) {`);break;case"string":t.pushCode(`if (${JSON.stringify(this.options.assert)} !== ${n}) {`);break;default:throw new Error("assert option must be a string, number or a function.")}t.generateError(`"Assertion error: ${n} is " + ${JSON.stringify(this.options.assert.toString())}`),t.pushCode("}")}generateNext(t){return this.next&&(t=this.next.generate(t)),t}generateBit(t){const n=JSON.parse(JSON.stringify(this));if(n.options=this.options,n.generateAssert=this.generateAssert.bind(this),n.generateFormatter=this.generateFormatter.bind(this),n.varName=t.generateVariable(n.varName),t.bitFields.push(n),!this.next||this.next&&["bit","nest"].indexOf(this.next.type)<0){const r=t.generateTmpVariable();t.pushCode(`var ${r} = 0;`);const i=(u=0)=>{let f=0;for(let h=u;h<t.bitFields.length;h++){const d=t.bitFields[h].options.length;if(f+d>32)break;f+=d}return f},a=u=>(u<=8?(t.pushCode(`${r} = dataView.getUint8(offset);`),u=8):u<=16?(t.pushCode(`${r} = dataView.getUint16(offset);`),u=16):u<=24?(t.pushCode(`${r} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`),u=24):(t.pushCode(`${r} = dataView.getUint32(offset);`),u=32),t.pushCode(`offset += ${u/8};`),u);let o=0;const s=this.endian==="be";let c=0,l=0;t.bitFields.forEach((u,f)=>{let h=u.options.length;if(h>l){if(l){const g=-1>>>32-l;t.pushCode(`${u.varName} = (${r} & 0x${g.toString(16)}) << ${h-l};`),h-=l}o=0,l=c=a(i(f)-l)}const d=s?c-o-h:o,p=-1>>>32-h;t.pushCode(`${u.varName} ${h<u.options.length?"|=":"="} ${r} >> ${d} & 0x${p.toString(16)};`),u.options.length===32&&t.pushCode(`${u.varName} >>>= 0`),u.options.assert&&u.generateAssert(t),u.options.formatter&&u.generateFormatter(t,u.varName,u.options.formatter),o+=h,l-=h}),t.bitFields=[]}}generateSeek(t){const n=t.generateOption(this.options.length);t.pushCode(`offset += ${n};`)}generateString(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable(),i=this.options.encoding,a=i.toLowerCase()==="hex",o='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){const s=this.options.length;t.pushCode(`var ${r} = offset;`),t.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${r} < ${s});`);const c=`offset - ${r} < ${s} ? offset - 1 : offset`;t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, ${c}), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, ${c}));`)}else if(this.options.length){const s=t.generateOption(this.options.length);t.pushCode(a?`${n} = Array.from(buffer.subarray(offset, offset + ${s}), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(offset, offset + ${s}));`),t.pushCode(`offset += ${s};`)}else this.options.zeroTerminated?(t.pushCode(`var ${r} = offset;`),t.pushCode("while(dataView.getUint8(offset++) !== 0);"),t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, offset - 1), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset - 1));`)):this.options.greedy&&(t.pushCode(`var ${r} = offset;`),t.pushCode("while(buffer.length > offset++);"),t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, offset), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset));`));this.options.stripNull&&t.pushCode(`${n} = ${n}.replace(/\\x00+$/g, '')`)}generateBuffer(t){const n=t.generateVariable(this.varName);if(typeof this.options.readUntil=="function"){const r=this.options.readUntil,i=t.generateTmpVariable(),a=t.generateTmpVariable();t.pushCode(`var ${i} = offset;`),t.pushCode(`var ${a} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${a} = dataView.getUint8(offset);`);const o=t.addImport(r);t.pushCode(`if (${o}.call(${t.generateVariable()}, ${a}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${n} = buffer.subarray(${i}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${n} = buffer.subarray(offset);`);else{const r=t.generateOption(this.options.length);t.pushCode(`${n} = buffer.subarray(offset, offset + ${r});`),t.pushCode(`offset += ${r};`)}this.options.clone&&t.pushCode(`${n} = buffer.constructor.from(${n});`)}generateArray(t){const n=t.generateOption(this.options.length),r=t.generateOption(this.options.lengthInBytes),i=this.options.type,a=t.generateTmpVariable(),o=t.generateVariable(this.varName),s=t.generateTmpVariable(),c=this.options.key,l=typeof c=="string";if(l?t.pushCode(`${o} = {};`):t.pushCode(`${o} = [];`),typeof this.options.readUntil=="function"?t.pushCode("do {"):this.options.readUntil==="eof"?t.pushCode(`for (var ${a} = 0; offset < buffer.length; ${a}++) {`):r!==void 0?t.pushCode(`for (var ${a} = offset + ${r}; offset < ${a}; ) {`):t.pushCode(`for (var ${a} = ${n}; ${a} > 0; ${a}--) {`),typeof i=="string")if(rr.get(i)){const u=t.generateTmpVariable();if(t.pushCode(`var ${u} = ${Co+i}(offset, {`),t.useContextVariables){const f=t.generateVariable();t.pushCode(`$parent: ${f},`),t.pushCode(`$root: ${f}.$root,`),!this.options.readUntil&&r===void 0&&t.pushCode(`$index: ${n} - ${a},`)}t.pushCode("});"),t.pushCode(`var ${s} = ${u}.result; offset = ${u}.offset;`),i!==this.alias&&t.addReference(i)}else{const u=b0[i],f=y0[i];t.pushCode(`var ${s} = dataView.get${u}(offset, ${f});`),t.pushCode(`offset += ${ir[i]};`)}else if(i instanceof sr){t.pushCode(`var ${s} = {};`);const u=t.generateVariable();t.pushScope(s),t.useContextVariables&&(t.pushCode(`${s}.$parent = ${u};`),t.pushCode(`${s}.$root = ${u}.$root;`),!this.options.readUntil&&r===void 0&&t.pushCode(`${s}.$index = ${n} - ${a};`)),i.generate(t),t.useContextVariables&&(t.pushCode(`delete ${s}.$parent;`),t.pushCode(`delete ${s}.$root;`),t.pushCode(`delete ${s}.$index;`)),t.popScope()}if(l?t.pushCode(`${o}[${s}.${c}] = ${s};`):t.pushCode(`${o}.push(${s});`),t.pushCode("}"),typeof this.options.readUntil=="function"){const u=this.options.readUntil,f=t.addImport(u);t.pushCode(`while (!${f}.call(${t.generateVariable()}, ${s}, buffer.subarray(offset)));`)}}generateChoiceCase(t,n,r){if(typeof r=="string"){const i=t.generateVariable(this.varName);if(rr.has(r)){const a=t.generateTmpVariable();t.pushCode(`var ${a} = ${Co+r}(offset, {`),t.useContextVariables&&(t.pushCode(`$parent: ${i}.$parent,`),t.pushCode(`$root: ${i}.$root,`)),t.pushCode("});"),t.pushCode(`${i} = ${a}.result; offset = ${a}.offset;`),r!==this.alias&&t.addReference(r)}else{const a=b0[r],o=y0[r];t.pushCode(`${i} = dataView.get${a}(offset, ${o});`),t.pushCode(`offset += ${ir[r]}`)}}else r instanceof sr&&(t.pushPath(n),r.generate(t),t.popPath(n))}generateChoice(t){const n=t.generateOption(this.options.tag),r=t.generateVariable(this.varName);if(this.varName&&(t.pushCode(`${r} = {};`),t.useContextVariables)){const i=t.generateVariable();t.pushCode(`${r}.$parent = ${i};`),t.pushCode(`${r}.$root = ${i}.$root;`)}t.pushCode(`switch(${n}) {`);for(const i in this.options.choices){const a=parseInt(i,10),o=this.options.choices[a];t.pushCode(`case ${a}:`),this.generateChoiceCase(t,this.varName,o),t.pushCode("break;")}t.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(t,this.varName,this.options.defaultChoice):t.generateError(`"Met undefined tag value " + ${n} + " at choice"`),t.pushCode("}"),this.varName&&t.useContextVariables&&(t.pushCode(`delete ${r}.$parent;`),t.pushCode(`delete ${r}.$root;`))}generateNest(t){const n=t.generateVariable(this.varName);if(this.options.type instanceof sr){if(this.varName&&(t.pushCode(`${n} = {};`),t.useContextVariables)){const r=t.generateVariable();t.pushCode(`${n}.$parent = ${r};`),t.pushCode(`${n}.$root = ${r}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),this.varName&&t.useContextVariables&&t.useContextVariables&&(t.pushCode(`delete ${n}.$parent;`),t.pushCode(`delete ${n}.$root;`))}else if(rr.has(this.options.type)){const r=t.generateTmpVariable();if(t.pushCode(`var ${r} = ${Co+this.options.type}(offset, {`),t.useContextVariables){const i=t.generateVariable();t.pushCode(`$parent: ${i},`),t.pushCode(`$root: ${i}.$root,`)}t.pushCode("});"),t.pushCode(`${n} = ${r}.result; offset = ${r}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}}generateWrapper(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable();if(typeof this.options.readUntil=="function"){const c=this.options.readUntil,l=t.generateTmpVariable(),u=t.generateTmpVariable();t.pushCode(`var ${l} = offset;`),t.pushCode(`var ${u} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${u} = dataView.getUint8(offset);`);const f=t.addImport(c);t.pushCode(`if (${f}.call(${t.generateVariable()}, ${u}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${r} = buffer.subarray(${l}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${r} = buffer.subarray(offset);`);else{const c=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${c});`),t.pushCode(`offset += ${c};`)}this.options.clone&&t.pushCode(`${r} = buffer.constructor.from(${r});`);const i=t.generateTmpVariable(),a=t.generateTmpVariable(),o=t.generateTmpVariable(),s=t.addImport(this.options.wrapper);if(t.pushCode(`${r} = ${s}.call(this, ${r}).subarray(0);`),t.pushCode(`var ${i} = buffer;`),t.pushCode(`var ${a} = offset;`),t.pushCode(`var ${o} = dataView;`),t.pushCode(`buffer = ${r};`),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof sr)this.varName&&t.pushCode(`${n} = {};`),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(rr.has(this.options.type)){const c=t.generateTmpVariable();t.pushCode(`var ${c} = ${Co+this.options.type}(0);`),t.pushCode(`${n} = ${c}.result;`),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode(`buffer = ${i};`),t.pushCode(`dataView = ${o};`),t.pushCode(`offset = ${a};`)}generateFormatter(t,n,r){if(typeof r=="function"){const i=t.addImport(r);t.pushCode(`${n} = ${i}.call(${t.generateVariable()}, ${n});`)}}generatePointer(t){const n=this.options.type,r=t.generateOption(this.options.offset),i=t.generateTmpVariable(),a=t.generateVariable(this.varName);if(t.pushCode(`var ${i} = offset;`),t.pushCode(`offset = ${r};`),this.options.type instanceof sr){if(t.pushCode(`${a} = {};`),t.useContextVariables){const o=t.generateVariable();t.pushCode(`${a}.$parent = ${o};`),t.pushCode(`${a}.$root = ${o}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode(`delete ${a}.$parent;`),t.pushCode(`delete ${a}.$root;`))}else if(rr.has(this.options.type)){const o=t.generateTmpVariable();if(t.pushCode(`var ${o} = ${Co+this.options.type}(offset, {`),t.useContextVariables){const s=t.generateVariable();t.pushCode(`$parent: ${s},`),t.pushCode(`$root: ${s}.$root,`)}t.pushCode("});"),t.pushCode(`${a} = ${o}.result; offset = ${o}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(ir).indexOf(this.options.type)>=0){const o=b0[n],s=y0[n];t.pushCode(`${a} = dataView.get${o}(offset, ${s});`),t.pushCode(`offset += ${ir[n]};`)}t.pushCode(`offset = ${i};`)}generateSaveOffset(t){const n=t.generateVariable(this.varName);t.pushCode(`${n} = offset`)}};var a5={},gy={},ko={},Iu={};Object.defineProperty(Iu,"__esModule",{value:!0});function my(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function by(e,t,n){return t&&o5(e.prototype,t),n&&o5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function WY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yy(e,t)}function $s(e){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$s(e)}function yy(e,t){return yy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},yy(e,t)}function YY(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ru(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZY(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ru(e)}function QY(e){var t=YY();return function(){var r=$s(e),i;if(t){var a=$s(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return ZY(this,i)}}function XY(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=$s(e),e!==null););return e}function v0(){return typeof Reflect<"u"&&Reflect.get?v0=Reflect.get.bind():v0=function(t,n,r){var i=XY(t,n);if(i){var a=Object.getOwnPropertyDescriptor(i,n);return a.get?a.get.call(arguments.length<3?t:r):a.value}},v0.apply(this,arguments)}var s5=function(){function e(){my(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return by(e,[{key:"addEventListener",value:function(n,r,i){n in this.listeners||(this.listeners[n]=[]),this.listeners[n].push({callback:r,options:i})}},{key:"removeEventListener",value:function(n,r){if(n in this.listeners){for(var i=this.listeners[n],a=0,o=i.length;a<o;a++)if(i[a].callback===r){i.splice(a,1);return}}}},{key:"dispatchEvent",value:function(n){if(n.type in this.listeners){for(var r=this.listeners[n.type],i=r.slice(),a=0,o=i.length;a<o;a++){var s=i[a];try{s.callback.call(this,n)}catch(c){Promise.resolve().then(function(){throw c})}s.options&&s.options.once&&this.removeEventListener(n.type,s.callback)}return!n.defaultPrevented}}}]),e}(),vy=function(e){WY(n,e);var t=QY(n);function n(){var r;return my(this,n),r=t.call(this),r.listeners||s5.call(Ru(r)),Object.defineProperty(Ru(r),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(Ru(r),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(Ru(r),"reason",{value:void 0,writable:!0,configurable:!0}),r}return by(n,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(i){i.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,i)),v0($s(n.prototype),"dispatchEvent",this).call(this,i)}}]),n}(s5),c5=function(){function e(){my(this,e),Object.defineProperty(this,"signal",{value:new vy,writable:!0,configurable:!0})}return by(e,[{key:"abort",value:function(n){var r;try{r=new Event("abort")}catch{typeof document<"u"?document.createEvent?(r=document.createEvent("Event"),r.initEvent("abort",!1,!1)):(r=document.createEventObject(),r.type="abort"):r={type:"abort",bubbles:!1,cancelable:!1}}var i=n;if(i===void 0)if(typeof document>"u")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch{i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(r)}},{key:"toString",value:function(){return"[object AbortController]"}}]),e}();typeof Symbol<"u"&&Symbol.toStringTag&&(c5.prototype[Symbol.toStringTag]="AbortController",vy.prototype[Symbol.toStringTag]="AbortSignal");function KY(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function JY(e){typeof e=="function"&&(e={fetch:e});var t=e,n=t.fetch,r=t.Request,i=r===void 0?n.Request:r,a=t.AbortController,o=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,s=o===void 0?!1:o;if(!KY({fetch:n,Request:i,AbortController:a,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:n,Request:c};var c=i;(c&&!c.prototype.hasOwnProperty("signal")||s)&&(c=function(h,d){var p;d&&d.signal&&(p=d.signal,delete d.signal);var g=new i(h,d);return p&&Object.defineProperty(g,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),g},c.prototype=i.prototype);var l=n,u=function(h,d){var p=c&&c.prototype.isPrototypeOf(h)?h.signal:d?d.signal:void 0;if(p){var g;try{g=new DOMException("Aborted","AbortError")}catch{g=new Error("Aborted"),g.name="AbortError"}if(p.aborted)return Promise.reject(g);var b=new Promise(function(y,w){p.addEventListener("abort",function(){return w(g)},{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([b,l(h,d)])}return l(h,d)};return{fetch:u,Request:c}}Iu.AbortController=c5,Iu.AbortSignal=vy,Iu.abortableFetch=JY,Object.defineProperty(ko,"__esModule",{value:!0}),ko.AbortSignal=ko.AbortController=void 0;const l5=Iu;var w0=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")};let eZ=typeof w0().AbortController>"u"?l5.AbortController:w0().AbortController;ko.AbortController=eZ;let tZ=typeof w0().AbortController>"u"?l5.AbortSignal:w0().AbortSignal;ko.AbortSignal=tZ;var wy={};Object.defineProperty(wy,"__esModule",{value:!0});const nZ=ko;class rZ{}class iZ{constructor(){this.signals=new Set,this.abortController=new nZ.AbortController}addSignal(t=new rZ){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(t),t.aborted?this.handleAborted(t):typeof t.addEventListener=="function"&&t.addEventListener("abort",()=>{this.handleAborted(t)})}handleAborted(t){this.signals.delete(t),this.signals.size===0&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}wy.default=iZ;var xy={};Object.defineProperty(xy,"__esModule",{value:!0});class aZ{constructor(){this.callbacks=new Set}addCallback(t=()=>{}){this.callbacks.add(t),t(this.currentMessage)}callback(t){this.currentMessage=t,this.callbacks.forEach(n=>{n(t)})}}xy.default=aZ;var u5=Zd&&Zd.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gy,"__esModule",{value:!0});const oZ=ko,sZ=u5(wy),cZ=u5(xy);class x0{constructor({fill:t,cache:n}){if(typeof t!="function")throw new TypeError("must pass a fill function");if(typeof n!="object")throw new TypeError("must pass a cache object");if(typeof n.get!="function"||typeof n.set!="function"||typeof n.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=n,this.fillCallback=t}static isAbortException(t){return t.name==="AbortError"||t.code==="ERR_ABORTED"||t.message==="AbortError: aborted"||t.message==="Error: aborted"}evict(t,n){this.cache.get(t)===n&&this.cache.delete(t)}fill(t,n,r,i){const a=new sZ.default,o=new cZ.default;o.addCallback(i);const s={aborter:a,promise:this.fillCallback(n,a.signal,c=>{o.callback(c)}),settled:!1,statusReporter:o,get aborted(){return this.aborter.signal.aborted}};s.aborter.addSignal(r),s.aborter.signal.addEventListener("abort",()=>{s.settled||this.evict(t,s)}),s.promise.then(()=>{s.settled=!0},()=>{s.settled=!0,this.evict(t,s)}).catch(c=>{throw console.error(c),c}),this.cache.set(t,s)}static checkSinglePromise(t,n){function r(){if(n&&n.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return t.then(i=>(r(),i),i=>{throw r(),i})}has(t){return this.cache.has(t)}get(t,n,r,i){if(!r&&n instanceof oZ.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const a=this.cache.get(t);return a?a.aborted&&!a.settled?(this.evict(t,a),this.get(t,n,r,i)):a.settled?a.promise:(a.aborter.addSignal(r),a.statusReporter.addCallback(i),x0.checkSinglePromise(a.promise,r)):(this.fill(t,n,r,i),x0.checkSinglePromise(this.cache.get(t).promise,r))}delete(t){const n=this.cache.get(t);n&&(n.settled||n.aborter.abort(),this.cache.delete(t))}clear(){const t=this.cache.keys();let n=0;for(let r=t.next();!r.done;r=t.next())this.delete(r.value),n+=1;return n}}gy.default=x0;var lZ=Zd&&Zd.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a5,"__esModule",{value:!0});const uZ=lZ(gy);var A0=a5.default=uZ.default;class fZ{constructor(t={}){if(!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=t.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(t,n){this.cache.set(t,n),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t)){const n=this.oldCache.get(t);return this.oldCache.delete(t),this._set(t,n),n}}set(t,n){return this.cache.has(t)?this.cache.set(t,n):this._set(t,n),this}has(t){return this.cache.has(t)||this.oldCache.has(t)}peek(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t))return this.oldCache.get(t)}delete(t){const n=this.cache.delete(t);return n&&this._size--,this.oldCache.delete(t)||n}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache)yield t;for(const t of this.oldCache){const[n]=t;this.cache.has(n)||(yield t)}}get size(){let t=0;for(const n of this.oldCache.keys())this.cache.has(n)||t++;return this._size+t}}var hZ=fZ;const E0=uu(hZ);class ta{constructor(t,n){this.ranges=arguments.length===2?[{min:t,max:n}]:0 in t?Object.assign({},t):[t]}min(){return this.ranges[0].min}max(){return this.ranges[this.ranges.length-1].max}contains(t){for(let n=0;n<this.ranges.length;n+=1){const r=this.ranges[n];if(r.min<=t&&r.max>=t)return!0}return!1}isContiguous(){return this.ranges.length>1}getRanges(){return this.ranges.map(t=>new ta(t.min,t.max))}toString(){return this.ranges.map(t=>`[${t.min}-${t.max}]`).join(",")}union(t){const n=this.getRanges().concat(t.getRanges()).sort(this.rangeOrder),r=[];let i=n[0];for(let a=1;a<n.length;a+=1){const o=n[a];o.min()>i.max()+1?(r.push(i),i=o):o.max()>i.max()&&(i=new ta(i.min(),o.max()))}return r.push(i),r.length===1?r[0]:new ta(r)}intersection(t){let n=this,r=t;const i=this.ranges(),a=r.ranges(),o=i.length,s=a.length;let c=0,l=0;const u=[];for(;c<o&&l<s;){n=i[c],r=a[l];const f=Math.max(n.min(),r.min()),h=Math.min(n.max(),r.max());h>=f&&u.push(new ta(f,h)),n.max()>r.max()?l+=1:c+=1}if(u.length===0)throw new Error("found range of length 0");return u.length===1?u[0]:new ta(u)}coverage(){let t=0;const n=this.ranges();for(const r of n)t+=r.max()-r.min()+1;return t}rangeOrder(t,n){let r=t,i=n;return arguments.length<2&&(i=r,r=this),r.min()<i.min()?-1:r.min()>i.min()?1:r.max()<i.max()?-1:i.max()>r.max()?1:0}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const dZ=4,f5=0,h5=1,pZ=2;function Hs(e){let t=e.length;for(;--t>=0;)e[t]=0}const gZ=0,d5=1,mZ=2,bZ=3,yZ=258,Ay=29,Du=256,Bu=Du+1+Ay,Gs=30,Ey=19,p5=2*Bu+1,To=15,Sy=16,vZ=7,_y=256,g5=16,m5=17,b5=18,Cy=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]),S0=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]),wZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),y5=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xZ=512,ti=new Array((Bu+2)*2);Hs(ti);const Fu=new Array(Gs*2);Hs(Fu);const Pu=new Array(xZ);Hs(Pu);const Mu=new Array(yZ-bZ+1);Hs(Mu);const ky=new Array(Ay);Hs(ky);const _0=new Array(Gs);Hs(_0);function Ty(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let v5,w5,x5;function Iy(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const A5=e=>e<256?Pu[e]:Pu[256+(e>>>7)],Ou=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},cn=(e,t,n)=>{e.bi_valid>Sy-n?(e.bi_buf|=t<<e.bi_valid&65535,Ou(e,e.bi_buf),e.bi_buf=t>>Sy-e.bi_valid,e.bi_valid+=n-Sy):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},kr=(e,t,n)=>{cn(e,n[t*2],n[t*2+1])},E5=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},AZ=e=>{e.bi_valid===16?(Ou(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},EZ=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,u,f,h,d,p,g=0;for(h=0;h<=To;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<p5;l++)u=e.heap[l],h=n[n[u*2+1]*2+1]+1,h>c&&(h=c,g++),n[u*2+1]=h,!(u>r)&&(e.bl_count[h]++,d=0,u>=s&&(d=o[u-s]),p=n[u*2],e.opt_len+=p*(h+d),a&&(e.static_len+=p*(i[u*2+1]+d)));if(g!==0){do{for(h=c-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(h=c;h!==0;h--)for(u=e.bl_count[h];u!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),u--)}},S5=(e,t,n)=>{const r=new Array(To+1);let i=0,a,o;for(a=1;a<=To;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let s=e[o*2+1];s!==0&&(e[o*2]=E5(r[s]++,s))}},SZ=()=>{let e,t,n,r,i;const a=new Array(To+1);for(n=0,r=0;r<Ay-1;r++)for(ky[r]=n,e=0;e<1<<Cy[r];e++)Mu[n++]=r;for(Mu[n-1]=r,i=0,r=0;r<16;r++)for(_0[r]=i,e=0;e<1<<S0[r];e++)Pu[i++]=r;for(i>>=7;r<Gs;r++)for(_0[r]=i<<7,e=0;e<1<<S0[r]-7;e++)Pu[256+i++]=r;for(t=0;t<=To;t++)a[t]=0;for(e=0;e<=143;)ti[e*2+1]=8,e++,a[8]++;for(;e<=255;)ti[e*2+1]=9,e++,a[9]++;for(;e<=279;)ti[e*2+1]=7,e++,a[7]++;for(;e<=287;)ti[e*2+1]=8,e++,a[8]++;for(S5(ti,Bu+1,a),e=0;e<Gs;e++)Fu[e*2+1]=5,Fu[e*2]=E5(e,5);v5=new Ty(ti,Cy,Du+1,Bu,To),w5=new Ty(Fu,S0,0,Gs,To),x5=new Ty(new Array(0),wZ,0,Ey,vZ)},_5=e=>{let t;for(t=0;t<Bu;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Gs;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Ey;t++)e.bl_tree[t*2]=0;e.dyn_ltree[_y*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},C5=e=>{e.bi_valid>8?Ou(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},k5=(e,t,n,r)=>{const i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},Ry=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&k5(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!k5(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},T5=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?kr(e,i,t):(o=Mu[i],kr(e,o+Du+1,t),s=Cy[o],s!==0&&(i-=ky[o],cn(e,i,s)),r--,o=A5(r),kr(e,o,n),s=S0[o],s!==0&&(r-=_0[o],cn(e,r,s)));while(a<e.sym_next);kr(e,_y,t)},Dy=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems;let o,s,c=-1,l;for(e.heap_len=0,e.heap_max=p5,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)Ry(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ry(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,Ry(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],EZ(e,t),S5(n,c,e.bl_count)},I5=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[g5*2]++):s<=10?e.bl_tree[m5*2]++:e.bl_tree[b5*2]++,s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},R5=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do kr(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(kr(e,a,e.bl_tree),s--),kr(e,g5,e.bl_tree),cn(e,s-3,2)):s<=10?(kr(e,m5,e.bl_tree),cn(e,s-3,3)):(kr(e,b5,e.bl_tree),cn(e,s-11,7));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},_Z=e=>{let t;for(I5(e,e.dyn_ltree,e.l_desc.max_code),I5(e,e.dyn_dtree,e.d_desc.max_code),Dy(e,e.bl_desc),t=Ey-1;t>=3&&e.bl_tree[y5[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},CZ=(e,t,n,r)=>{let i;for(cn(e,t-257,5),cn(e,n-1,5),cn(e,r-4,4),i=0;i<r;i++)cn(e,e.bl_tree[y5[i]*2+1],3);R5(e,e.dyn_ltree,t-1),R5(e,e.dyn_dtree,n-1)},kZ=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return f5;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return h5;for(n=32;n<Du;n++)if(e.dyn_ltree[n*2]!==0)return h5;return f5};let D5=!1;const TZ=e=>{D5||(SZ(),D5=!0),e.l_desc=new Iy(e.dyn_ltree,v5),e.d_desc=new Iy(e.dyn_dtree,w5),e.bl_desc=new Iy(e.bl_tree,x5),e.bi_buf=0,e.bi_valid=0,_5(e)},B5=(e,t,n,r)=>{cn(e,(gZ<<1)+(r?1:0),3),C5(e),Ou(e,n),Ou(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},IZ=e=>{cn(e,d5<<1,3),kr(e,_y,ti),AZ(e)},RZ=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===pZ&&(e.strm.data_type=kZ(e)),Dy(e,e.l_desc),Dy(e,e.d_desc),o=_Z(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?B5(e,t,n,r):e.strategy===dZ||a===i?(cn(e,(d5<<1)+(r?1:0),3),T5(e,ti,Fu)):(cn(e,(mZ<<1)+(r?1:0),3),CZ(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),T5(e,e.dyn_ltree,e.dyn_dtree)),_5(e),r&&C5(e)},DZ=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Mu[n]+Du+1)*2]++,e.dyn_dtree[A5(t)*2]++),e.sym_next===e.sym_end);var BZ=TZ,FZ=B5,PZ=RZ,MZ=DZ,OZ=IZ,LZ={_tr_init:BZ,_tr_stored_block:FZ,_tr_flush_block:PZ,_tr_tally:MZ,_tr_align:OZ},Lu=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};const NZ=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},zZ=new Uint32Array(NZ());var Tt=(e,t,n,r)=>{const i=zZ,a=r+n;e^=-1;for(let o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1},Vs={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"},Nu={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:UZ,_tr_stored_block:By,_tr_flush_block:$Z,_tr_tally:na,_tr_align:HZ}=LZ,{Z_NO_FLUSH:ra,Z_PARTIAL_FLUSH:GZ,Z_FULL_FLUSH:VZ,Z_FINISH:Bn,Z_BLOCK:F5,Z_OK:Mt,Z_STREAM_END:P5,Z_STREAM_ERROR:Tr,Z_DATA_ERROR:jZ,Z_BUF_ERROR:Fy,Z_DEFAULT_COMPRESSION:qZ,Z_FILTERED:WZ,Z_HUFFMAN_ONLY:C0,Z_RLE:YZ,Z_FIXED:ZZ,Z_DEFAULT_STRATEGY:QZ,Z_UNKNOWN:XZ,Z_DEFLATED:k0}=Nu,KZ=9,JZ=15,eQ=8,tQ=29,Py=256+1+tQ,nQ=30,rQ=19,iQ=2*Py+1,aQ=15,ye=3,ia=258,Ir=ia+ye+1,oQ=32,js=42,My=57,Oy=69,Ly=73,Ny=91,zy=103,Io=113,zu=666,Yt=1,qs=2,Ro=3,Ws=4,sQ=3,Do=(e,t)=>(e.msg=Vs[t],t),M5=e=>e*2-(e>4?9:0),aa=e=>{let t=e.length;for(;--t>=0;)e[t]=0},cQ=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)};let oa=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const bn=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},yn=(e,t)=>{$Z(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,bn(e.strm)},Ce=(e,t)=>{e.pending_buf[e.pending++]=t},Uu=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Uy=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Lu(e.adler,t,i,n):e.state.wrap===2&&(e.adler=Tt(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},O5=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-Ir?e.strstart-(e.w_size-Ir):0,l=e.window,u=e.w_mask,f=e.prev,h=e.strstart+ia;let d=l[r+o-1],p=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+o]!==p||l[i+o-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(a=ia-(h-r),r=h-ia,a>o){if(e.match_start=t,o=a,a>=s)break;d=l[r+o-1],p=l[r+o]}}while((t=f[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},Ys=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ir)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),cQ(e),r+=t),e.strm.avail_in===0)break;if(n=Uy(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=ye)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=oa(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=oa(e,e.ins_h,e.window[i+ye-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<ye)););}while(e.lookahead<Ir&&e.strm.avail_in!==0)},L5=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==Bn||t===ra||r!==i+e.strm.avail_in)))break;o=t===Bn&&r===i+e.strm.avail_in?1:0,By(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,bn(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Uy(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?Ws:t!==ra&&t!==Bn&&e.strm.avail_in===0&&e.strstart===e.block_start?qs:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(Uy(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===Bn)&&t!==ra&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=t===Bn&&e.strm.avail_in===0&&r===i?1:0,By(e,e.block_start,r,o),e.block_start+=r,bn(e.strm)),o?Ro:Yt)},$y=(e,t)=>{let n,r;for(;;){if(e.lookahead<Ir){if(Ys(e),e.lookahead<Ir&&t===ra)return Yt;if(e.lookahead===0)break}if(n=0,e.lookahead>=ye&&(e.ins_h=oa(e,e.ins_h,e.window[e.strstart+ye-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Ir&&(e.match_length=O5(e,n)),e.match_length>=ye)if(r=na(e,e.strstart-e.match_start,e.match_length-ye),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ye){e.match_length--;do e.strstart++,e.ins_h=oa(e,e.ins_h,e.window[e.strstart+ye-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=oa(e,e.ins_h,e.window[e.strstart+1]);else r=na(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(yn(e,!1),e.strm.avail_out===0))return Yt}return e.insert=e.strstart<ye-1?e.strstart:ye-1,t===Bn?(yn(e,!0),e.strm.avail_out===0?Ro:Ws):e.sym_next&&(yn(e,!1),e.strm.avail_out===0)?Yt:qs},Zs=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<Ir){if(Ys(e),e.lookahead<Ir&&t===ra)return Yt;if(e.lookahead===0)break}if(n=0,e.lookahead>=ye&&(e.ins_h=oa(e,e.ins_h,e.window[e.strstart+ye-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=ye-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Ir&&(e.match_length=O5(e,n),e.match_length<=5&&(e.strategy===WZ||e.match_length===ye&&e.strstart-e.match_start>4096)&&(e.match_length=ye-1)),e.prev_length>=ye&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-ye,r=na(e,e.strstart-1-e.prev_match,e.prev_length-ye),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=oa(e,e.ins_h,e.window[e.strstart+ye-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=ye-1,e.strstart++,r&&(yn(e,!1),e.strm.avail_out===0))return Yt}else if(e.match_available){if(r=na(e,0,e.window[e.strstart-1]),r&&yn(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Yt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=na(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<ye-1?e.strstart:ye-1,t===Bn?(yn(e,!0),e.strm.avail_out===0?Ro:Ws):e.sym_next&&(yn(e,!1),e.strm.avail_out===0)?Yt:qs},lQ=(e,t)=>{let n,r,i,a;const o=e.window;for(;;){if(e.lookahead<=ia){if(Ys(e),e.lookahead<=ia&&t===ra)return Yt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=ye&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+ia;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=ia-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ye?(n=na(e,1,e.match_length-ye),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=na(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(yn(e,!1),e.strm.avail_out===0))return Yt}return e.insert=0,t===Bn?(yn(e,!0),e.strm.avail_out===0?Ro:Ws):e.sym_next&&(yn(e,!1),e.strm.avail_out===0)?Yt:qs},uQ=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Ys(e),e.lookahead===0)){if(t===ra)return Yt;break}if(e.match_length=0,n=na(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(yn(e,!1),e.strm.avail_out===0))return Yt}return e.insert=0,t===Bn?(yn(e,!0),e.strm.avail_out===0?Ro:Ws):e.sym_next&&(yn(e,!1),e.strm.avail_out===0)?Yt:qs};function Rr(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const $u=[new Rr(0,0,0,0,L5),new Rr(4,4,8,4,$y),new Rr(4,5,16,8,$y),new Rr(4,6,32,32,$y),new Rr(4,4,16,16,Zs),new Rr(8,16,32,32,Zs),new Rr(8,16,128,128,Zs),new Rr(8,32,128,256,Zs),new Rr(32,128,258,1024,Zs),new Rr(32,258,258,4096,Zs)],fQ=e=>{e.window_size=2*e.w_size,aa(e.head),e.max_lazy_match=$u[e.level].max_lazy,e.good_match=$u[e.level].good_length,e.nice_match=$u[e.level].nice_length,e.max_chain_length=$u[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ye-1,e.match_available=0,e.ins_h=0};function hQ(){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=k0,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(iQ*2),this.dyn_dtree=new Uint16Array((2*nQ+1)*2),this.bl_tree=new Uint16Array((2*rQ+1)*2),aa(this.dyn_ltree),aa(this.dyn_dtree),aa(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(aQ+1),this.heap=new Uint16Array(2*Py+1),aa(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Py+1),aa(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 Hu=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==js&&t.status!==My&&t.status!==Oy&&t.status!==Ly&&t.status!==Ny&&t.status!==zy&&t.status!==Io&&t.status!==zu?1:0},N5=e=>{if(Hu(e))return Do(e,Tr);e.total_in=e.total_out=0,e.data_type=XZ;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?My:t.wrap?js:Io,e.adler=t.wrap===2?0:1,t.last_flush=-2,UZ(t),Mt},z5=e=>{const t=N5(e);return t===Mt&&fQ(e.state),t},dQ=(e,t)=>Hu(e)||e.state.wrap!==2?Tr:(e.state.gzhead=t,Mt),U5=(e,t,n,r,i,a)=>{if(!e)return Tr;let o=1;if(t===qZ&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>KZ||n!==k0||r<8||r>15||t<0||t>9||a<0||a>ZZ||r===8&&o!==1)return Do(e,Tr);r===8&&(r=9);const s=new hQ;return e.state=s,s.strm=e,s.status=js,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+ye-1)/ye),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=a,s.method=n,z5(e)},pQ=(e,t)=>U5(e,t,k0,JZ,eQ,QZ),gQ=(e,t)=>{if(Hu(e)||t>F5||t<0)return e?Do(e,Tr):Tr;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===zu&&t!==Bn)return Do(e,e.avail_out===0?Fy:Tr);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(bn(e),e.avail_out===0)return n.last_flush=-1,Mt}else if(e.avail_in===0&&M5(t)<=M5(r)&&t!==Bn)return Do(e,Fy);if(n.status===zu&&e.avail_in!==0)return Do(e,Fy);if(n.status===js&&n.wrap===0&&(n.status=Io),n.status===js){let i=k0+(n.w_bits-8<<4)<<8,a=-1;if(n.strategy>=C0||n.level<2?a=0:n.level<6?a=1:n.level===6?a=2:a=3,i|=a<<6,n.strstart!==0&&(i|=oQ),i+=31-i%31,Uu(n,i),n.strstart!==0&&(Uu(n,e.adler>>>16),Uu(n,e.adler&65535)),e.adler=1,n.status=Io,bn(e),n.pending!==0)return n.last_flush=-1,Mt}if(n.status===My){if(e.adler=0,Ce(n,31),Ce(n,139),Ce(n,8),n.gzhead)Ce(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)),Ce(n,n.gzhead.time&255),Ce(n,n.gzhead.time>>8&255),Ce(n,n.gzhead.time>>16&255),Ce(n,n.gzhead.time>>24&255),Ce(n,n.level===9?2:n.strategy>=C0||n.level<2?4:0),Ce(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Ce(n,n.gzhead.extra.length&255),Ce(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Tt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Oy;else if(Ce(n,0),Ce(n,0),Ce(n,0),Ce(n,0),Ce(n,0),Ce(n,n.level===9?2:n.strategy>=C0||n.level<2?4:0),Ce(n,sQ),n.status=Io,bn(e),n.pending!==0)return n.last_flush=-1,Mt}if(n.status===Oy){if(n.gzhead.extra){let i=n.pending,a=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+a>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,bn(e),n.pending!==0)return n.last_flush=-1,Mt;i=0,a-=s}let o=new Uint8Array(n.gzhead.extra);n.pending_buf.set(o.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Ly}if(n.status===Ly){if(n.gzhead.name){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i)),bn(e),n.pending!==0)return n.last_flush=-1,Mt;i=0}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,Ce(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Ny}if(n.status===Ny){if(n.gzhead.comment){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i)),bn(e),n.pending!==0)return n.last_flush=-1,Mt;i=0}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,Ce(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=Tt(e.adler,n.pending_buf,n.pending-i,i))}n.status=zy}if(n.status===zy){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(bn(e),n.pending!==0))return n.last_flush=-1,Mt;Ce(n,e.adler&255),Ce(n,e.adler>>8&255),e.adler=0}if(n.status=Io,bn(e),n.pending!==0)return n.last_flush=-1,Mt}if(e.avail_in!==0||n.lookahead!==0||t!==ra&&n.status!==zu){let i=n.level===0?L5(n,t):n.strategy===C0?uQ(n,t):n.strategy===YZ?lQ(n,t):$u[n.level].func(n,t);if((i===Ro||i===Ws)&&(n.status=zu),i===Yt||i===Ro)return e.avail_out===0&&(n.last_flush=-1),Mt;if(i===qs&&(t===GZ?HZ(n):t!==F5&&(By(n,0,0,!1),t===VZ&&(aa(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),bn(e),e.avail_out===0))return n.last_flush=-1,Mt}return t!==Bn?Mt:n.wrap<=0?P5:(n.wrap===2?(Ce(n,e.adler&255),Ce(n,e.adler>>8&255),Ce(n,e.adler>>16&255),Ce(n,e.adler>>24&255),Ce(n,e.total_in&255),Ce(n,e.total_in>>8&255),Ce(n,e.total_in>>16&255),Ce(n,e.total_in>>24&255)):(Uu(n,e.adler>>>16),Uu(n,e.adler&65535)),bn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Mt:P5)},mQ=e=>{if(Hu(e))return Tr;const t=e.state.status;return e.state=null,t===Io?Do(e,jZ):Mt},bQ=(e,t)=>{let n=t.length;if(Hu(e))return Tr;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==js||r.lookahead)return Tr;if(i===1&&(e.adler=Lu(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(aa(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(t.subarray(n-r.w_size,n),0),t=c,n=r.w_size}const a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ys(r);r.lookahead>=ye;){let c=r.strstart,l=r.lookahead-(ye-1);do r.ins_h=oa(r,r.ins_h,r.window[c+ye-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--l);r.strstart=c,r.lookahead=ye-1,Ys(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ye-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,Mt};var yQ=pQ,vQ=U5,wQ=z5,xQ=N5,AQ=dQ,EQ=gQ,SQ=mQ,_Q=bQ,CQ="pako deflate (from Nodeca project)",Gu={deflateInit:yQ,deflateInit2:vQ,deflateReset:wQ,deflateResetKeep:xQ,deflateSetHeader:AQ,deflate:EQ,deflateEnd:SQ,deflateSetDictionary:_Q,deflateInfo:CQ};const kQ=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var TQ=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)kQ(n,r)&&(e[r]=n[r])}}return e},IQ=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,a=e.length;r<a;r++){let o=e[r];n.set(o,i),i+=o.length}return n},T0={assign:TQ,flattenChunks:IQ};let $5=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{$5=!1}const Vu=new Uint8Array(256);for(let e=0;e<256;e++)Vu[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Vu[254]=Vu[254]=1;var RQ=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};const DQ=(e,t)=>{if(t<65534&&e.subarray&&$5)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var BQ=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const a=new Array(n*2);for(i=0,r=0;r<n;){let o=e[r++];if(o<128){a[i++]=o;continue}let s=Vu[o];if(s>4){a[i++]=65533,r+=s-1;continue}for(o&=s===2?31:s===3?15:7;s>1&&r<n;)o=o<<6|e[r++]&63,s--;if(s>1){a[i++]=65533;continue}o<65536?a[i++]=o:(o-=65536,a[i++]=55296|o>>10&1023,a[i++]=56320|o&1023)}return DQ(a,i)},FQ=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Vu[e[n]]>t?n:t},ju={string2buf:RQ,buf2string:BQ,utf8border:FQ};function PQ(){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}var H5=PQ;const G5=Object.prototype.toString,{Z_NO_FLUSH:MQ,Z_SYNC_FLUSH:OQ,Z_FULL_FLUSH:LQ,Z_FINISH:NQ,Z_OK:I0,Z_STREAM_END:zQ,Z_DEFAULT_COMPRESSION:UQ,Z_DEFAULT_STRATEGY:$Q,Z_DEFLATED:HQ}=Nu;function Hy(e){this.options=T0.assign({level:UQ,method:HQ,chunkSize:16384,windowBits:15,memLevel:8,strategy:$Q},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H5,this.strm.avail_out=0;let n=Gu.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==I0)throw new Error(Vs[n]);if(t.header&&Gu.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=ju.string2buf(t.dictionary):G5.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Gu.deflateSetDictionary(this.strm,r),n!==I0)throw new Error(Vs[n]);this._dict_set=!0}}Hy.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,a;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?NQ:MQ,typeof e=="string"?n.input=ju.string2buf(e):G5.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===OQ||a===LQ)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Gu.deflate(n,a),i===zQ)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Gu.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===I0;if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0},Hy.prototype.onData=function(e){this.chunks.push(e)},Hy.prototype.onEnd=function(e){e===I0&&(this.result=T0.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const R0=16209,GQ=16191;var VQ=function(t,n){let r,i,a,o,s,c,l,u,f,h,d,p,g,b,y,w,A,x,C,_,I,D,M,G;const O=t.state;r=t.next_in,M=t.input,i=r+(t.avail_in-5),a=t.next_out,G=t.output,o=a-(n-t.avail_out),s=a+(t.avail_out-257),c=O.dmax,l=O.wsize,u=O.whave,f=O.wnext,h=O.window,d=O.hold,p=O.bits,g=O.lencode,b=O.distcode,y=(1<<O.lenbits)-1,w=(1<<O.distbits)-1;e:do{p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),A=g[d&y];t:for(;;){if(x=A>>>24,d>>>=x,p-=x,x=A>>>16&255,x===0)G[a++]=A&65535;else if(x&16){C=A&65535,x&=15,x&&(p<x&&(d+=M[r++]<<p,p+=8),C+=d&(1<<x)-1,d>>>=x,p-=x),p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),A=b[d&w];n:for(;;){if(x=A>>>24,d>>>=x,p-=x,x=A>>>16&255,x&16){if(_=A&65535,x&=15,p<x&&(d+=M[r++]<<p,p+=8,p<x&&(d+=M[r++]<<p,p+=8)),_+=d&(1<<x)-1,_>c){t.msg="invalid distance too far back",O.mode=R0;break e}if(d>>>=x,p-=x,x=a-o,_>x){if(x=_-x,x>u&&O.sane){t.msg="invalid distance too far back",O.mode=R0;break e}if(I=0,D=h,f===0){if(I+=l-x,x<C){C-=x;do G[a++]=h[I++];while(--x);I=a-_,D=G}}else if(f<x){if(I+=l+f-x,x-=f,x<C){C-=x;do G[a++]=h[I++];while(--x);if(I=0,f<C){x=f,C-=x;do G[a++]=h[I++];while(--x);I=a-_,D=G}}}else if(I+=f-x,x<C){C-=x;do G[a++]=h[I++];while(--x);I=a-_,D=G}for(;C>2;)G[a++]=D[I++],G[a++]=D[I++],G[a++]=D[I++],C-=3;C&&(G[a++]=D[I++],C>1&&(G[a++]=D[I++]))}else{I=a-_;do G[a++]=G[I++],G[a++]=G[I++],G[a++]=G[I++],C-=3;while(C>2);C&&(G[a++]=G[I++],C>1&&(G[a++]=G[I++]))}}else if(x&64){t.msg="invalid distance code",O.mode=R0;break e}else{A=b[(A&65535)+(d&(1<<x)-1)];continue n}break}}else if(x&64)if(x&32){O.mode=GQ;break e}else{t.msg="invalid literal/length code",O.mode=R0;break e}else{A=g[(A&65535)+(d&(1<<x)-1)];continue t}break}}while(r<i&&a<s);C=p>>3,r-=C,p-=C<<3,d&=(1<<p)-1,t.next_in=r,t.next_out=a,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=a<s?257+(s-a):257-(a-s),O.hold=d,O.bits=p};const Qs=15,V5=852,j5=592,q5=0,Gy=1,W5=2,jQ=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]),qQ=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]),WQ=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]),YQ=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 qu=(e,t,n,r,i,a,o,s)=>{const c=s.bits;let l=0,u=0,f=0,h=0,d=0,p=0,g=0,b=0,y=0,w=0,A,x,C,_,I,D=null,M;const G=new Uint16Array(Qs+1),O=new Uint16Array(Qs+1);let ae=null,se,ve,Pe;for(l=0;l<=Qs;l++)G[l]=0;for(u=0;u<r;u++)G[t[n+u]]++;for(d=c,h=Qs;h>=1&&G[h]===0;h--);if(d>h&&(d=h),h===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,s.bits=1,0;for(f=1;f<h&&G[f]===0;f++);for(d<f&&(d=f),b=1,l=1;l<=Qs;l++)if(b<<=1,b-=G[l],b<0)return-1;if(b>0&&(e===q5||h!==1))return-1;for(O[1]=0,l=1;l<Qs;l++)O[l+1]=O[l]+G[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[O[t[n+u]]++]=u);if(e===q5?(D=ae=o,M=20):e===Gy?(D=jQ,ae=qQ,M=257):(D=WQ,ae=YQ,M=0),w=0,u=0,l=f,I=a,p=d,g=0,C=-1,y=1<<d,_=y-1,e===Gy&&y>V5||e===W5&&y>j5)return 1;for(;;){se=l-g,o[u]+1<M?(ve=0,Pe=o[u]):o[u]>=M?(ve=ae[o[u]-M],Pe=D[o[u]-M]):(ve=32+64,Pe=0),A=1<<l-g,x=1<<p,f=x;do x-=A,i[I+(w>>g)+x]=se<<24|ve<<16|Pe|0;while(x!==0);for(A=1<<l-1;w&A;)A>>=1;if(A!==0?(w&=A-1,w+=A):w=0,u++,--G[l]===0){if(l===h)break;l=t[n+o[u]]}if(l>d&&(w&_)!==C){for(g===0&&(g=d),I+=f,p=l-g,b=1<<p;p+g<h&&(b-=G[p+g],!(b<=0));)p++,b<<=1;if(y+=1<<p,e===Gy&&y>V5||e===W5&&y>j5)return 1;C=w&_,i[C]=d<<24|p<<16|I-a|0}}return w!==0&&(i[I+w]=l-g<<24|64<<16|0),s.bits=d,0};const ZQ=0,Y5=1,Z5=2,{Z_FINISH:Q5,Z_BLOCK:QQ,Z_TREES:D0,Z_OK:Bo,Z_STREAM_END:XQ,Z_NEED_DICT:KQ,Z_STREAM_ERROR:Fn,Z_DATA_ERROR:X5,Z_MEM_ERROR:K5,Z_BUF_ERROR:JQ,Z_DEFLATED:J5}=Nu,B0=16180,e8=16181,t8=16182,n8=16183,r8=16184,i8=16185,a8=16186,o8=16187,s8=16188,c8=16189,F0=16190,ni=16191,Vy=16192,l8=16193,jy=16194,u8=16195,f8=16196,h8=16197,d8=16198,P0=16199,M0=16200,p8=16201,g8=16202,m8=16203,b8=16204,y8=16205,qy=16206,v8=16207,w8=16208,Je=16209,x8=16210,A8=16211,eX=852,tX=592,nX=15,E8=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function rX(){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 Fo=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<B0||t.mode>A8?1:0},S8=e=>{if(Fo(e))return Fn;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=B0,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(eX),t.distcode=t.distdyn=new Int32Array(tX),t.sane=1,t.back=-1,Bo},_8=e=>{if(Fo(e))return Fn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,S8(e)},C8=(e,t)=>{let n;if(Fo(e))return Fn;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Fn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,_8(e))},k8=(e,t)=>{if(!e)return Fn;const n=new rX;e.state=n,n.strm=e,n.window=null,n.mode=B0;const r=C8(e,t);return r!==Bo&&(e.state=null),r},iX=e=>k8(e,nX);let T8=!0,Wy,Yy;const aX=e=>{if(T8){Wy=new Int32Array(512),Yy=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(qu(Y5,e.lens,0,288,Wy,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;qu(Z5,e.lens,0,32,Yy,0,e.work,{bits:5}),T8=!1}e.lencode=Wy,e.lenbits=9,e.distcode=Yy,e.distbits=5},I8=(e,t,n,r)=>{let i;const a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},oX=(e,t)=>{let n,r,i,a,o,s,c,l,u,f,h,d,p,g,b=0,y,w,A,x,C,_,I,D;const M=new Uint8Array(4);let G,O;const ae=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Fo(e)||!e.output||!e.input&&e.avail_in!==0)return Fn;n=e.state,n.mode===ni&&(n.mode=Vy),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,f=s,h=c,D=Bo;e:for(;;)switch(n.mode){case B0:if(n.wrap===0){n.mode=Vy;break}for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=Tt(n.check,M,2,0),l=0,u=0,n.mode=e8;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Je;break}if((l&15)!==J5){e.msg="unknown compression method",n.mode=Je;break}if(l>>>=4,u-=4,I=(l&15)+8,n.wbits===0&&(n.wbits=I),I>15||I>n.wbits){e.msg="invalid window size",n.mode=Je;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?c8:ni,l=0,u=0;break;case e8:for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==J5){e.msg="unknown compression method",n.mode=Je;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Je;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Tt(n.check,M,2,0)),l=0,u=0,n.mode=t8;case t8:for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=Tt(n.check,M,4,0)),l=0,u=0,n.mode=n8;case n8:for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Tt(n.check,M,2,0)),l=0,u=0,n.mode=r8;case r8:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Tt(n.check,M,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=i8;case i8:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+d),I)),n.flags&512&&n.wrap&4&&(n.check=Tt(n.check,r,d,a)),s-=d,a+=d,n.length-=d),n.length))break e;n.length=0,n.mode=a8;case a8:if(n.flags&2048){if(s===0)break e;d=0;do I=r[a+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=Tt(n.check,r,d,a)),s-=d,a+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=o8;case o8:if(n.flags&4096){if(s===0)break e;d=0;do I=r[a+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=Tt(n.check,r,d,a)),s-=d,a+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=s8;case s8:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Je;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ni;break;case c8:for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=E8(l),l=0,u=0,n.mode=F0;case F0:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,KQ;e.adler=n.check=1,n.mode=ni;case ni:if(t===QQ||t===D0)break e;case Vy:if(n.last){l>>>=u&7,u-=u&7,n.mode=qy;break}for(;u<3;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=l8;break;case 1:if(aX(n),n.mode=P0,t===D0){l>>>=2,u-=2;break e}break;case 2:n.mode=f8;break;case 3:e.msg="invalid block type",n.mode=Je}l>>>=2,u-=2;break;case l8:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Je;break}if(n.length=l&65535,l=0,u=0,n.mode=jy,t===D0)break e;case jy:n.mode=u8;case u8:if(d=n.length,d){if(d>s&&(d=s),d>c&&(d=c),d===0)break e;i.set(r.subarray(a,a+d),o),s-=d,a+=d,c-=d,o+=d,n.length-=d;break}n.mode=ni;break;case f8:for(;u<14;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Je;break}n.have=0,n.mode=h8;case h8:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.lens[ae[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[ae[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=qu(ZQ,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid code lengths set",n.mode=Je;break}n.have=0,n.mode=d8;case d8:for(;n.have<n.nlen+n.ndist;){for(;b=n.lencode[l&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(A<16)l>>>=y,u-=y,n.lens[n.have++]=A;else{if(A===16){for(O=y+2;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(l>>>=y,u-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=Je;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,u-=2}else if(A===17){for(O=y+3;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=y,u-=y,I=0,d=3+(l&7),l>>>=3,u-=3}else{for(O=y+7;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=y,u-=y,I=0,d=11+(l&127),l>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Je;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===Je)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Je;break}if(n.lenbits=9,G={bits:n.lenbits},D=qu(Y5,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid literal/lengths set",n.mode=Je;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},D=qu(Z5,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,D){e.msg="invalid distances set",n.mode=Je;break}if(n.mode=P0,t===D0)break e;case P0:n.mode=M0;case M0:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,VQ(e,h),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===ni&&(n.back=-1);break}for(n.back=0;b=n.lencode[l&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(w&&!(w&240)){for(x=y,C=w,_=A;b=n.lencode[_+((l&(1<<x+C)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=x,u-=x,n.back+=x}if(l>>>=y,u-=y,n.back+=y,n.length=A,w===0){n.mode=y8;break}if(w&32){n.back=-1,n.mode=ni;break}if(w&64){e.msg="invalid literal/length code",n.mode=Je;break}n.extra=w&15,n.mode=p8;case p8:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=g8;case g8:for(;b=n.distcode[l&(1<<n.distbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(!(w&240)){for(x=y,C=w,_=A;b=n.distcode[_+((l&(1<<x+C)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}l>>>=x,u-=x,n.back+=x}if(l>>>=y,u-=y,n.back+=y,w&64){e.msg="invalid distance code",n.mode=Je;break}n.offset=A,n.extra=w&15,n.mode=m8;case m8:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Je;break}n.mode=b8;case b8:if(c===0)break e;if(d=h-c,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Je;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),g=n.window}else g=i,p=o-n.offset,d=n.length;d>c&&(d=c),c-=d,n.length-=d;do i[o++]=g[p++];while(--d);n.length===0&&(n.mode=M0);break;case y8:if(c===0)break e;i[o++]=n.length,c--,n.mode=M0;break;case qy:if(n.wrap){for(;u<32;){if(s===0)break e;s--,l|=r[a++]<<u,u+=8}if(h-=c,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?Tt(n.check,i,h,o-h):Lu(n.check,i,h,o-h)),h=c,n.wrap&4&&(n.flags?l:E8(l))!==n.check){e.msg="incorrect data check",n.mode=Je;break}l=0,u=0}n.mode=v8;case v8:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Je;break}l=0,u=0}n.mode=w8;case w8:D=XQ;break e;case Je:D=X5;break e;case x8:return K5;case A8:default:return Fn}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<Je&&(n.mode<qy||t!==Q5))&&I8(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?Tt(n.check,i,h,e.next_out-h):Lu(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===ni?128:0)+(n.mode===P0||n.mode===jy?256:0),(f===0&&h===0||t===Q5)&&D===Bo&&(D=JQ),D},sX=e=>{if(Fo(e))return Fn;let t=e.state;return t.window&&(t.window=null),e.state=null,Bo},cX=(e,t)=>{if(Fo(e))return Fn;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,Bo):Fn},lX=(e,t)=>{const n=t.length;let r,i,a;return Fo(e)||(r=e.state,r.wrap!==0&&r.mode!==F0)?Fn:r.mode===F0&&(i=1,i=Lu(i,t,n,0),i!==r.check)?X5:(a=I8(e,t,n,n),a?(r.mode=x8,K5):(r.havedict=1,Bo))};var uX=_8,fX=C8,hX=S8,dX=iX,pX=k8,gX=oX,mX=sX,bX=cX,yX=lX,vX="pako inflate (from Nodeca project)",ri={inflateReset:uX,inflateReset2:fX,inflateResetKeep:hX,inflateInit:dX,inflateInit2:pX,inflate:gX,inflateEnd:mX,inflateGetHeader:bX,inflateSetDictionary:yX,inflateInfo:vX};function wX(){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}var xX=wX;const R8=Object.prototype.toString,{Z_NO_FLUSH:AX,Z_FINISH:EX,Z_OK:Wu,Z_STREAM_END:Zy,Z_NEED_DICT:Qy,Z_STREAM_ERROR:SX,Z_DATA_ERROR:D8,Z_MEM_ERROR:_X}=Nu;function Yu(e){this.options=T0.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H5,this.strm.avail_out=0;let n=ri.inflateInit2(this.strm,t.windowBits);if(n!==Wu)throw new Error(Vs[n]);if(this.header=new xX,ri.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ju.string2buf(t.dictionary):R8.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ri.inflateSetDictionary(this.strm,t.dictionary),n!==Wu)))throw new Error(Vs[n])}Yu.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let a,o,s;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?EX:AX,R8.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=ri.inflate(n,o),a===Qy&&i&&(a=ri.inflateSetDictionary(n,i),a===Wu?a=ri.inflate(n,o):a===D8&&(a=Qy));n.avail_in>0&&a===Zy&&n.state.wrap>0&&e[n.next_in]!==0;)ri.inflateReset(n),a=ri.inflate(n,o);switch(a){case SX:case D8:case Qy:case _X:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===Zy))if(this.options.to==="string"){let c=ju.utf8border(n.output,n.next_out),l=n.next_out-c,u=ju.buf2string(n.output,c);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(c,c+l),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===Wu&&s===0)){if(a===Zy)return a=ri.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},Yu.prototype.onData=function(e){this.chunks.push(e)},Yu.prototype.onEnd=function(e){e===Wu&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=T0.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Xy(e,t){const n=new Yu(t);if(n.push(e),n.err)throw n.msg||Vs[n.err];return n.result}function CX(e,t){return t=t||{},t.raw=!0,Xy(e,t)}var kX=Yu,TX=Xy,IX=CX,RX=Xy,DX=Nu,BX={Inflate:kX,inflate:TX,inflateRaw:IX,ungzip:RX,constants:DX};const{Inflate:$ee,inflate:Hee,inflateRaw:FX,ungzip:Gee}=BX;var PX=FX;function MX(e){return PX(e.subarray(2))}let OX=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function LX(e){e.sort((i,a)=>Number(i.offset)-Number(a.offset));const t=[];let n,r;for(const i of e)n&&r&&Number(i.offset)-r<=2e3?(n.length=BigInt(Number(n.length)+Number(i.length)-r+Number(i.offset)),n.blocks.push(i)):t.push(n={blocks:[i],length:i.length,offset:i.offset}),r=Number(n.offset)+Number(n.length);return t}function O0(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new OX("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const NX=1,zX=2,UX=3;function Ky(e,t,n,r){return e<r&&t>=n}function $X(e){const t=e?"big":"little",n=new Fe().endianess(t).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),r=new Fe().endianess(t).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:new Fe().endianess(t).array("blocksToFetch",{length:"cnt",type:new Fe().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:new Fe().array("recurOffsets",{length:"cnt",type:new Fe().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),i=new Fe().endianess(t).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:new Fe().endianess(t).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:{[UX]:new Fe().array("items",{length:"itemCount",type:new Fe().floatle("score")}),[zX]:new Fe().array("items",{length:"itemCount",type:new Fe().endianess(t).int32("start").floatle("score")}),[NX]:new Fe().array("items",{length:"itemCount",type:new Fe().endianess(t).int32("start").int32("end").floatle("score")})}}),bigBedParser:i,summaryParser:n,leafParser:r}}class B8{constructor(t,n,r,i,a,o){if(this.bbi=t,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=i,this.isCompressed=a,this.blockType=o,this.featureCache=new A0({cache:new E0({maxSize:1e3}),fill:async(c,l)=>{const u=Number(c.length),f=Number(c.offset),{buffer:h}=await this.bbi.read(we.Buffer.alloc(u),0,u,f,{signal:l});return h}}),!(r>=0))throw new Error("invalid cirTreeOffset!");const s=$X(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}async readWigData(t,n,r,i,a){try{const{refsByName:o,bbi:s,cirTreeOffset:c,isBigEndian:l}=this,u=o[t];u===void 0&&i.complete();const f={chrId:u,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=s.read(we.Buffer.alloc(48),0,48,Number(c),a));const{buffer:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],g=0;const b=(x,C,_)=>{try{const I=x.subarray(C),D=this.leafParser.parse(I);if(D.blocksToFetch&&(p=p.concat(D.blocksToFetch.filter(M=>y(M)).map(M=>({offset:M.blockOffset,length:M.blockSize})))),D.recurOffsets){const M=D.recurOffsets.filter(G=>y(G)).map(G=>Number(G.blockOffset));M.length>0&&A(M,_+1)}}catch(I){i.error(I)}},y=x=>{const{startChrom:C,startBase:_,endChrom:I,endBase:D}=x;return(C<u||C===u&&_<=r)&&(I>u||I===u&&D>=n)},w=async(x,C,_)=>{try{const I=C.max()-C.min(),D=C.min(),M=await this.featureCache.get(`${I}_${D}`,{length:I,offset:D},a==null?void 0:a.signal);for(const G of x)C.contains(G)&&(b(M,G-D,_),g-=1,g===0&&this.readFeatures(i,p,{...a,request:f}))}catch(I){i.error(I)}},A=(x,C)=>{try{g+=x.length;const _=4+Number(d)*32;let I=new ta(x[0],x[0]+_);for(let D=1;D<x.length;D+=1){const M=new ta(x[D],x[D]+_);I=I.union(M)}I.getRanges().map(D=>w(x,D,C))}catch(_){i.error(_)}};return A([Number(c)+48],1)}catch(o){i.error(o)}}parseSummaryBlock(t,n,r){const i=[];let a=n;const o=new DataView(t.buffer,t.byteOffset,t.length);for(;a<t.byteLength;){const s=o.getUint32(a,!0);a+=4;const c=o.getUint32(a,!0);a+=4;const l=o.getUint32(a,!0);a+=4;const u=o.getUint32(a,!0);a+=4;const f=o.getFloat32(a,!0);a+=4;const h=o.getFloat32(a,!0);a+=4;const d=o.getFloat32(a,!0);a+=4,a+=4,(!r||s===r.chrId&&Ky(c,l,r.start,r.end))&&i.push({start:c,end:l,maxScore:h,minScore:f,summary:!0,score:d/(u||1)})}return i}parseBigBedBlock(t,n,r,i){const a=[];let o=n;for(;o<t.byteLength;){const s=this.bigBedParser.parse(t.subarray(o));s.uniqueId=`bb-${r+o}`,a.push(s),o+=s.offset}return i?a.filter(s=>Ky(s.start,s.end,i.start,i.end)):a}parseBigWigBlock(t,n,r){const i=t.subarray(n),a=new DataView(i.buffer,i.byteOffset,i.length);let o=0;o+=4;const s=a.getInt32(o,!0);o+=8;const c=a.getUint32(o,!0);o+=4;const l=a.getUint32(o,!0);o+=4;const u=a.getUint8(o);o+=2;const f=a.getUint16(o,!0);o+=2;const h=new Array(f);switch(u){case 1:{for(let d=0;d<f;d++){const p=a.getInt32(o,!0);o+=4;const g=a.getInt32(o,!0);o+=4;const b=a.getFloat32(o,!0);o+=4,h[d]={start:p,end:g,score:b}}break}case 2:{for(let d=0;d<f;d++){const p=a.getInt32(o,!0);o+=4;const g=a.getFloat32(o,!0);o+=4,h[d]={score:g,start:p,end:p+l}}break}case 3:{for(let d=0;d<f;d++){const p=a.getFloat32(o,!0);o+=4;const g=s+d*c;h[d]={score:p,start:g,end:g+l}}break}}return r?h.filter(d=>Ky(d.start,d.end,r.start,r.end)):h}async readFeatures(t,n,r={}){try{const{blockType:i,isCompressed:a}=this,{signal:o,request:s}=r,c=LX(n);O0(o),await Promise.all(c.map(async l=>{O0(o);const{length:u,offset:f}=l,h=await this.featureCache.get(`${u}_${f}`,l,o);for(const d of l.blocks){O0(o);let p=Number(d.offset)-Number(l.offset),g=h;switch(a&&(g=MX(h.subarray(p)),p=0),O0(o),i){case"summary":{t.next(this.parseSummaryBlock(g,p,s));break}case"bigwig":{t.next(this.parseBigWigBlock(g,p,s));break}case"bigbed":{t.next(this.parseBigBedBlock(g,p,Number(d.offset)*256,s));break}default:console.warn(`Don't know what to do with ${i}`)}}})),t.complete()}catch(i){t.error(i)}}}var Jy=function(e,t){return Jy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Jy(e,t)};function e2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Jy(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function HX(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})}function F8(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Zu(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function t2(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function n2(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function Xs(e){return this instanceof Xs?(this.v=e,this):new Xs(e)}function GX(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(h){r[h]&&(i[h]=function(d){return new Promise(function(p,g){a.push([h,d,p,g])>1||s(h,d)})})}function s(h,d){try{c(r[h](d))}catch(p){f(a[0][3],p)}}function c(h){h.value instanceof Xs?Promise.resolve(h.value.v).then(l,u):f(a[0][2],h)}function l(h){s("next",h)}function u(h){s("throw",h)}function f(h,d){h(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function VX(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Zu=="function"?Zu(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(s,c){o=e[a](o),i(s,c,o.done,o.value)})}}function i(a,o,s,c){Promise.resolve(c).then(function(l){a({value:l,done:s})},o)}}typeof SuppressedError=="function"&&SuppressedError;function vt(e){return typeof e=="function"}function P8(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var r2=P8(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
3274
3277
  `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
3275
- `):"",this.name="UnsubscriptionError",this.errors=n}});function M8(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var i2=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,a;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=Zu(o),c=s.next();!c.done;c=s.next()){var l=c.value;l.remove(this)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(vt(u))try{u()}catch(g){a=g instanceof r2?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=Zu(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{L8(p)}catch(g){a=a??[],g instanceof r2?a=n2(n2([],t2(a)),t2(g.errors)):a.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(a)throw new r2(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)L8(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&M8(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&M8(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();i2.EMPTY;function O8(e){return e instanceof i2||e&&"closed"in e&&vt(e.remove)&&vt(e.add)&&vt(e.unsubscribe)}function L8(e){vt(e)?e():e.unsubscribe()}var N8={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},z8={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,n2([e,t],t2(n)))},clearTimeout:function(e){var t=z8.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function U8(e){z8.setTimeout(function(){throw e})}function $8(){}function VX(e){e()}var a2=function(e){e2(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,O8(n)&&n.add(r)):r.destination=YX,r}return t.create=function(n,r,i){return new L0(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(i2),jX=Function.prototype.bind;function o2(e,t){return jX.call(e,t)}var qX=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){N0(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){N0(r)}else N0(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){N0(n)}},e}(),L0=function(e){e2(t,e);function t(n,r,i){var a=e.call(this)||this,o;if(vt(n)||!n)o={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;a&&N8.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return a.unsubscribe()},o={next:n.next&&o2(n.next,s),error:n.error&&o2(n.error,s),complete:n.complete&&o2(n.complete,s)}):o=n}return a.destination=new qX(o),a}return t}(a2);function N0(e){U8(e)}function WX(e){throw e}var YX={closed:!0,next:$8,error:WX,complete:$8},s2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function H8(e){return e}function ZX(e){return e.length===0?H8:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var Pn=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,a=XX(t)?t:new L0(t,n,r);return VX(function(){var o=i,s=o.operator,c=o.source;a.add(s?s.call(a,c):c?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=G8(n),new n(function(i,a){var o=new L0({next:function(s){try{t(s)}catch(c){a(c),o.unsubscribe()}},error:a,complete:i});r.subscribe(o)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[s2]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ZX(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=G8(t),new t(function(r,i){var a;n.subscribe(function(o){return a=o},function(o){return i(o)},function(){return r(a)})})},e.create=function(t){return new e(t)},e}();function G8(e){var t;return(t=e??N8.Promise)!==null&&t!==void 0?t:Promise}function QX(e){return e&&vt(e.next)&&vt(e.error)&&vt(e.complete)}function XX(e){return e&&e instanceof a2||QX(e)&&O8(e)}function KX(e){return vt(e==null?void 0:e.lift)}function Ks(e){return function(t){if(KX(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Qu(e,t,n,r,i){return new JX(e,t,n,r,i)}var JX=function(e){e2(t,e);function t(n,r,i,a,o,s){var c=e.call(this,n)||this;return c.onFinalize=o,c.shouldUnsubscribe=s,c._next=r?function(l){try{r(l)}catch(u){n.error(u)}}:e.prototype._next,c._error=a?function(l){try{a(l)}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(a2),eK=new Pn(function(e){return e.complete()});function tK(e){return e&&vt(e.schedule)}function V8(e){return e[e.length-1]}function nK(e){return tK(V8(e))?e.pop():void 0}function rK(e,t){return typeof V8(e)=="number"?e.pop():t}var j8=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function q8(e){return vt(e==null?void 0:e.then)}function W8(e){return vt(e[s2])}function Y8(e){return Symbol.asyncIterator&&vt(e==null?void 0:e[Symbol.asyncIterator])}function Z8(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function iK(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Q8=iK();function X8(e){return vt(e==null?void 0:e[Q8])}function K8(e){return HX(this,arguments,function(){var n,r,i,a;return F8(this,function(o){switch(o.label){case 0:n=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Xs(n.read())];case 3:return r=o.sent(),i=r.value,a=r.done,a?[4,Xs(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Xs(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function J8(e){return vt(e==null?void 0:e.getReader)}function Js(e){if(e instanceof Pn)return e;if(e!=null){if(W8(e))return aK(e);if(j8(e))return oK(e);if(q8(e))return sK(e);if(Y8(e))return ek(e);if(X8(e))return cK(e);if(J8(e))return lK(e)}throw Z8(e)}function aK(e){return new Pn(function(t){var n=e[s2]();if(vt(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function oK(e){return new Pn(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function sK(e){return new Pn(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,U8)})}function cK(e){return new Pn(function(t){var n,r;try{for(var i=Zu(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function ek(e){return new Pn(function(t){uK(e,t).catch(function(n){return t.error(n)})})}function lK(e){return ek(K8(e))}function uK(e,t){var n,r,i,a;return $X(this,void 0,void 0,function(){var o,s;return F8(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=GX(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function sa(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function tk(e,t){return t===void 0&&(t=0),Ks(function(n,r){n.subscribe(Qu(r,function(i){return sa(r,e,function(){return r.next(i)},t)},function(){return sa(r,e,function(){return r.complete()},t)},function(i){return sa(r,e,function(){return r.error(i)},t)}))})}function nk(e,t){return t===void 0&&(t=0),Ks(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function fK(e,t){return Js(e).pipe(nk(t),tk(t))}function hK(e,t){return Js(e).pipe(nk(t),tk(t))}function dK(e,t){return new Pn(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function pK(e,t){return new Pn(function(n){var r;return sa(n,t,function(){r=e[Q8](),sa(n,t,function(){var i,a,o;try{i=r.next(),a=i.value,o=i.done}catch(s){n.error(s);return}o?n.complete():n.next(a)},0,!0)}),function(){return vt(r==null?void 0:r.return)&&r.return()}})}function rk(e,t){if(!e)throw new Error("Iterable cannot be null");return new Pn(function(n){sa(n,t,function(){var r=e[Symbol.asyncIterator]();sa(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function gK(e,t){return rk(K8(e),t)}function mK(e,t){if(e!=null){if(W8(e))return fK(e,t);if(j8(e))return dK(e,t);if(q8(e))return hK(e,t);if(Y8(e))return rk(e,t);if(X8(e))return pK(e,t);if(J8(e))return gK(e,t)}throw Z8(e)}function bK(e,t){return t?mK(e,t):Js(e)}var yK=P8(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function ik(e,t){var n=typeof t=="object";return new Promise(function(r,i){var a=new L0({next:function(o){r(o),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new yK)}});e.subscribe(a)})}function ak(e,t){return Ks(function(n,r){var i=0;n.subscribe(Qu(r,function(a){r.next(e.call(t,a,i++))}))})}function vK(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,f=!1,h=function(){f&&!c.length&&!l&&t.complete()},d=function(g){return l<r?p(g):c.push(g)},p=function(g){a&&t.next(g),l++;var b=!1;Js(n(g,u++)).subscribe(Qu(t,function(y){i==null||i(y),a?d(y):t.next(y)},function(){b=!0},void 0,function(){if(b)try{l--;for(var y=function(){var w=c.shift();o?sa(t,o,function(){return p(w)}):p(w)};c.length&&l<r;)y();h()}catch(w){t.error(w)}}))};return e.subscribe(Qu(t,d,function(){f=!0,h()})),function(){s==null||s()}}function ok(e,t,n){return n===void 0&&(n=1/0),vt(t)?ok(function(r,i){return ak(function(a,o){return t(r,a,i,o)})(Js(e(r,i)))},n):(typeof t=="number"&&(n=t),Ks(function(r,i){return vK(r,i,e,n)}))}function wK(e){return e===void 0&&(e=1/0),ok(H8,e)}function xK(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=nK(e),r=rK(e,1/0),i=e;return i.length?i.length===1?Js(i[0]):wK(r)(bK(i,n)):eK}function AK(e,t,n,r,i){return function(a,o){var s=n,c=t,l=0;a.subscribe(Qu(o,function(u){var f=l++;c=s?e(c,u,f):(s=!0,u),r&&o.next(c)},i&&function(){s&&o.next(c),o.complete()}))}}function sk(e,t){return Ks(AK(e,t,arguments.length>=2,!1,!0))}var EK=function(e,t){return e.push(t),e};function SK(){return Ks(function(e,t){sk(EK,[])(e).subscribe(t)})}const ck=-2003829722,c2=-2021002517;function _K(e){return new TextDecoder().decode(e)}function lk(e){const t=e?"big":"little",n=new Fe().endianess(t).int32("magic").uint16("version").uint16("numZoomLevels").uint64("chromTreeOffset").uint64("unzoomedDataOffset").uint64("unzoomedIndexOffset").uint16("fieldCount").uint16("definedFieldCount").uint64("asOffset").uint64("totalSummaryOffset").uint32("uncompressBufSize").uint64("extHeaderOffset").array("zoomLevels",{length:"numZoomLevels",type:new Fe().endianess(t).uint32("reductionLevel").uint32("reserved").uint64("dataOffset").uint64("indexOffset")}),r=new Fe().endianess(t).uint64("basesCovered").doublele("scoreMin").doublele("scoreMax").doublele("scoreSum").doublele("scoreSumSquares"),i=new Fe().endianess(t).uint32("magic").uint32("blockSize").uint32("keySize").uint32("valSize").uint64("itemCount"),a=new Fe().endianess(t).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");return{chromTreeParser:i,totalSummaryParser:r,headerParser:n,isLeafNode:a}}class uk{getHeader(t){return this.headerP||(this.headerP=this._getHeader(t).catch(n=>{throw this.headerP=void 0,n})),this.headerP}constructor(t){const{filehandle:n,renameRefSeqs:r=o=>o,path:i,url:a}=t;if(this.renameRefSeqs=r,n)this.bbi=n;else if(a)this.bbi=new po(a);else if(i)this.bbi=new kt(i);else throw new Error("no file given")}async _getHeader(t){const n=await this._getMainHeader(t),r=await this._readChromTree(n,t);return{...n,...r}}async _getMainHeader(t,n=2e3){const{buffer:r}=await this.bbi.read(we.Buffer.alloc(n),0,n,0,t),i=this._isBigEndian(r),a=lk(i),o=a.headerParser.parse(r),{magic:s,asOffset:c,totalSummaryOffset:l}=o;if(o.fileType=s===c2?"bigbed":"bigwig",c>n||l>n)return this._getMainHeader(t,n*2);if(c){const u=Number(o.asOffset);o.autoSql=_K(r.subarray(u,r.indexOf(0,u)))}if(o.totalSummaryOffset>n-8*5)return this._getMainHeader(t,n*2);if(o.totalSummaryOffset){const u=r.subarray(Number(o.totalSummaryOffset)),f=a.totalSummaryParser.parse(u);o.totalSummary={...f,basesCovered:Number(f.basesCovered)}}return{...o,isBigEndian:i}}_isBigEndian(t){let n=t.readInt32LE(0);if(n===ck||n===c2)return!1;if(n=t.readInt32BE(0),n===ck||n===c2)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(t,n){const r=t.isBigEndian,i=r?"big":"little",a=[],o={};let s=Number(t.unzoomedDataOffset);const c=Number(t.chromTreeOffset);for(;s%4!==0;)s+=1;const l=s-c,{buffer:u}=await this.bbi.read(we.Buffer.alloc(l),0,l,Number(c),n),f=lk(r),{keySize:h}=f.chromTreeParser.parse(u),d=new Fe().endianess(i).string("key",{stripNull:!0,length:h}).uint32("refId").uint32("refSize").saveOffset("offset"),p=new Fe().endianess(i).skip(h).uint64("childOffset").saveOffset("offset"),g=32,b=async y=>{let w=y;if(w>=u.length)throw new Error("reading beyond end of buffer");const A=f.isLeafNode.parse(u.subarray(w)),{isLeafNode:x,cnt:C}=A;if(w+=A.offset,x)for(let _=0;_<C;_+=1){const I=d.parse(u.subarray(w));w+=I.offset;const{key:D,refId:M,refSize:G}=I,O={name:D,id:M,length:G};o[this.renameRefSeqs(D)]=M,a[M]=O}else{const _=[];for(let I=0;I<C;I+=1){const D=p.parse(u.subarray(w)),{childOffset:M}=D;w+=D.offset,_.push(b(Number(M)-Number(c)))}await Promise.all(_)}};return await b(g),{refsByName:o,refsByNumber:a}}async getUnzoomedView(t){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:i,isBigEndian:a,fileType:o}=await this.getHeader(t);return new B8(this.bbi,r,n,a,i>0,o)}async getFeatureStream(t,n,r,i){await this.getHeader(i);const a=this.renameRefSeqs(t);let o;const{basesPerSpan:s,scale:c}=i||{};return s?o=await this.getView(1/s,i):c?o=await this.getView(c,i):o=await this.getView(1,i),new Pn(l=>{o.readWigData(a,n,r,l,i)})}async getFeatures(t,n,r,i){const a=await this.getFeatureStream(t,n,r,i);return(await ik(a.pipe(SK()))).flat()}}class CK extends uk{async getView(t,n){const{zoomLevels:r,refsByName:i,fileSize:a,isBigEndian:o,uncompressBufSize:s}=await this.getHeader(n),c=1/t;let l=r.length;a||(l-=1);for(let u=l;u>=0;u-=1){const f=r[u];if(f&&f.reductionLevel<=2*c){const h=Number(f.indexOffset);return new B8(this.bbi,i,h,o,s>0,"summary")}}return this.getUnzoomedView(n)}}function kK(e){return e.filter(t=>!!t)}class TK extends uk{constructor(){super(...arguments),this.readIndicesCache=new A0({cache:new E0({maxSize:1}),fill:(t,n)=>this._readIndices({...t,signal:n})})}readIndices(t={}){const{signal:n,...r}=t;return this.readIndicesCache.get(JSON.stringify(r),t,n)}async getView(t,n){return this.getUnzoomedView(n)}async _readIndices(t){const{extHeaderOffset:n,isBigEndian:r}=await this.getHeader(t),{buffer:i}=await this.bbi.read(we.Buffer.alloc(64),0,64,Number(n)),a=r?"big":"little",o=new Fe().endianess(a).uint16("size").uint16("count").uint64("offset").parse(i),{count:s,offset:c}=o;if(s===0)return[];const l=20,u=l*s,{buffer:f}=await this.bbi.read(we.Buffer.alloc(u),0,u,Number(c)),h=new Fe().endianess(a).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),d=[];for(let p=0;p<s;p+=1)d.push(h.parse(f.subarray(p*l)));return d}async searchExtraIndexBlocks(t,n={}){const{isBigEndian:r}=await this.getHeader(n),i=await this.readIndices(n);if(i.length===0)return[];const a=i.map(async o=>{const{offset:s,field:c}=o,{buffer:l}=await this.bbi.read(we.Buffer.alloc(32),0,32,Number(s),n),u=r?"big":"little",f=new Fe().endianess(u).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),{blockSize:h,keySize:d,valSize:p}=f.parse(l),g=new Fe().endianess(u).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:new Fe().array("leafkeys",{length:"cnt",type:new Fe().endianess(u).string("key",{length:d,stripNull:!0}).uint64("offset")}),1:new Fe().array("keys",{length:"cnt",type:new Fe().endianess(u).string("key",{length:d,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),b=async w=>{const A=Number(w),x=4+h*(d+p),{buffer:C}=await this.bbi.read(we.Buffer.alloc(x),0,x,A,n),_=g.parse(C);if(_.leafkeys){let I;for(let D=0;D<_.leafkeys.length;D+=1){const{key:M}=_.leafkeys[D];if(t.localeCompare(M)<0&&I)return b(I);I=_.leafkeys[D].offset}return b(I)}for(let I=0;I<_.keys.length;I+=1)if(_.keys[I].key===t)return{..._.keys[I],field:c}},y=32;return b(Number(s)+y)});return kK(await Promise.all(a))}async searchExtraIndex(t,n={}){const r=await this.searchExtraIndexBlocks(t,n);if(r.length===0)return[];const i=await this.getUnzoomedView(n),a=r.map(s=>new Pn(c=>{i.readFeatures(c,[s],n)}).pipe(sk((c,l)=>c.concat(l)),ak(c=>{for(const l of c)l.field=s.field;return c})));return(await ik(xK(...a))).filter(s=>{var c;return((c=s.rest)===null||c===void 0?void 0:c.split(" ")[(s.field||0)-3])===t})}}const fk=Object.freeze(Object.defineProperty({__proto__:null,BigBed:TK,BigWig:CK},Symbol.toStringTag,{value:"Module"}));function IK(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function ec(e,t,n,r){this.message=e,this.expected=t,this.found=n,this.location=r,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ec)}IK(ec,Error),ec.buildMessage=function(e,t){var n={literal:function(l){return'"'+i(l.text)+'"'},class:function(l){var u="",f;for(f=0;f<l.parts.length;f++)u+=l.parts[f]instanceof Array?a(l.parts[f][0])+"-"+a(l.parts[f][1]):a(l.parts[f]);return"["+(l.inverted?"^":"")+u+"]"},any:function(l){return"any character"},end:function(l){return"end of input"},other:function(l){return l.description}};function r(l){return l.charCodeAt(0).toString(16).toUpperCase()}function i(l){return l.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function a(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function o(l){return n[l.type](l)}function s(l){var u=new Array(l.length),f,h;for(f=0;f<l.length;f++)u[f]=o(l[f]);if(u.sort(),u.length>0){for(f=1,h=1;f<u.length;f++)u[f-1]!==u[f]&&(u[h]=u[f],h++);u.length=h}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function c(l){return l?'"'+i(l)+'"':"end of input"}return"Expected "+s(e)+" but "+c(t)+" found."};function RK(e,t){t=t!==void 0?t:{};var n={},r={declaration:MT},i=MT,a="(",o=ze("(",!1),s=")",c=ze(")",!1),l=function(k,U,K,ee){return{type:k,name:U,comment:K,fields:ee}},u="simple",f=ze("simple",!1),h="object",d=ze("object",!1),p="table",g=ze("table",!1),b="auto",y=ze("auto",!1),w="primary",A=ze("primary",!1),x="index",C=ze("index",!1),_="unique",I=ze("unique",!1),D=function(k,U){return U},M=function(k,U){return k.name&&U.unshift(k),U},G="#",O=ze("#",!1),ae=";",se=ze(";",!1),ve=function(k,U,K){return{type:k,name:U,comment:K}},Pe="[",st=ze("[",!1),Ne="]",lt=ze("]",!1),tt=function(k,U,K,ee){return{type:k,size:U,name:K,comment:ee}},ut=function(k,U,K,ee){return{type:k,vals:U,name:K,comment:ee}},Te=",",Ie=ze(",",!1),Rt=function(k,U){return U.unshift(k),U},ln="int",Ve=ze("int",!1),N="uint",L=ze("uint",!1),W="short",j=ze("short",!1),Q="ushort",T=ze("ushort",!1),S="byte",V=ze("byte",!1),Y="ubyte",de=ze("ubyte",!1),ie="float",pe=ze("float",!1),un="char",fa=ze("char",!1),ha="string",da=ze("string",!1),Gt="lstring",fi=ze("lstring",!1),pa="enum",fn=ze("enum",!1),Br="double",E=ze("double",!1),m="bigint",v=ze("bigint",!1),R="set",P=ze("set",!1),z=function(k,U){return k+" "+U},q=/^[a-zA-Z_]/,ge=kf([["a","z"],["A","Z"],"_"],!1,!1),Ze=/^[a-zA-Z0-9_]/,$e=kf([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),nt=function(k){return DT()},Re=/^[^\n\r]/,CT=kf([`
3276
- `,"\r"],!0,!1),QJ=function(k){return k.join("").replace(/^"/,"").replace(/"$/,"")},XJ=BT("integer"),kT=/^[0-9]/,TT=kf([["0","9"]],!1,!1),KJ=function(){return parseInt(DT(),10)},JJ=BT("whitespace"),IT=/^[ \t\n\r]/,RT=kf([" "," ",`
3277
- `,"\r"],!1,!1),B=0,Zt=0,gp=[{line:1,column:1}],Fr=0,j2=[],ce=0,mp;if("startRule"in t){if(!(t.startRule in r))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');i=r[t.startRule]}function DT(){return e.substring(Zt,B)}function ze(k,U){return{type:"literal",text:k,ignoreCase:U}}function kf(k,U,K){return{type:"class",parts:k,inverted:U,ignoreCase:K}}function eee(){return{type:"end"}}function BT(k){return{type:"other",description:k}}function FT(k){var U=gp[k],K;if(U)return U;for(K=k-1;!gp[K];)K--;for(U=gp[K],U={line:U.line,column:U.column};K<k;)e.charCodeAt(K)===10?(U.line++,U.column=1):U.column++,K++;return gp[k]=U,U}function PT(k,U){var K=FT(k),ee=FT(U);return{start:{offset:k,line:K.line,column:K.column},end:{offset:U,line:ee.line,column:ee.column}}}function fe(k){B<Fr||(B>Fr&&(Fr=B,j2=[]),j2.push(k))}function tee(k,U,K){return new ec(ec.buildMessage(k,U),k,U,K)}function MT(){var k,U,K,ee,oe,je,rt,Nn,ga,hi,ma,di,ba,pi;return k=B,U=xe(),U!==n?(K=OT(),K!==n?(ee=xe(),ee!==n?(oe=LT(),oe!==n?(je=xe(),je!==n?(rt=bp(),rt!==n?(Nn=xe(),Nn!==n?(e.charCodeAt(B)===40?(ga=a,B++):(ga=n,ce===0&&fe(o)),ga!==n?(hi=xe(),hi!==n?(ma=nee(),ma!==n?(di=xe(),di!==n?(e.charCodeAt(B)===41?(ba=s,B++):(ba=n,ce===0&&fe(c)),ba!==n?(pi=xe(),pi!==n?(Zt=k,U=l(K,oe,rt,ma),k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n),k}function OT(){var k;return e.substr(B,6)===u?(k=u,B+=6):(k=n,ce===0&&fe(f)),k===n&&(e.substr(B,6)===h?(k=h,B+=6):(k=n,ce===0&&fe(d)),k===n&&(e.substr(B,5)===p?(k=p,B+=5):(k=n,ce===0&&fe(g)))),k}function LT(){var k,U,K,ee;return k=or(),k===n&&(k=B,U=or(),U!==n?(K=NT(),K!==n?(U=[U,K],k=U):(B=k,k=n)):(B=k,k=n),k===n&&(k=B,U=or(),U!==n?(e.substr(B,4)===b?(K=b,B+=4):(K=n,ce===0&&fe(y)),K!==n?(U=[U,K],k=U):(B=k,k=n)):(B=k,k=n),k===n&&(k=B,U=or(),U!==n?(K=NT(),K!==n?(e.substr(B,4)===b?(ee=b,B+=4):(ee=n,ce===0&&fe(y)),ee!==n?(U=[U,K,ee],k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)))),k}function NT(){var k;return e.substr(B,7)===w?(k=w,B+=7):(k=n,ce===0&&fe(A)),k===n&&(e.substr(B,5)===x?(k=x,B+=5):(k=n,ce===0&&fe(C)),k===n&&(e.substr(B,6)===_?(k=_,B+=6):(k=n,ce===0&&fe(I)))),k}function bp(){var k;return k=zT(),k===n&&(k=xe()),k}function nee(){var k,U,K,ee,oe,je,rt;if(k=B,U=q2(),U!==n)if(K=xe(),K!==n){for(ee=[],oe=B,je=xe(),je!==n?(rt=q2(),rt!==n?(Zt=oe,je=D(U,rt),oe=je):(B=oe,oe=n)):(B=oe,oe=n);oe!==n;)ee.push(oe),oe=B,je=xe(),je!==n?(rt=q2(),rt!==n?(Zt=oe,je=D(U,rt),oe=je):(B=oe,oe=n)):(B=oe,oe=n);ee!==n?(oe=xe(),oe!==n?(Zt=k,U=M(U,ee),k=U):(B=k,k=n)):(B=k,k=n)}else B=k,k=n;else B=k,k=n;return k}function ree(){var k;return e.charCodeAt(B)===35?(k=G,B++):(k=n,ce===0&&fe(O)),k}function iee(){var k,U,K,ee,oe;return k=B,U=xe(),U!==n?(K=ree(),K!==n?(ee=zT(),ee!==n?(oe=xe(),oe!==n?(U=[U,K,ee,oe],k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n),k}function q2(){var k,U,K,ee,oe,je,rt,Nn,ga,hi,ma,di,ba,pi;return k=B,U=W2(),U!==n?(K=xe(),K!==n?(ee=or(),ee!==n?(oe=xe(),oe!==n?(e.charCodeAt(B)===59?(je=ae,B++):(je=n,ce===0&&fe(se)),je!==n?(rt=xe(),rt!==n?(Nn=bp(),Nn!==n?(Zt=k,U=ve(U,ee,Nn),k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n),k===n&&(k=B,U=W2(),U!==n?(K=xe(),K!==n?(e.charCodeAt(B)===91?(ee=Pe,B++):(ee=n,ce===0&&fe(st)),ee!==n?(oe=xe(),oe!==n?(je=oee(),je!==n?(rt=xe(),rt!==n?(e.charCodeAt(B)===93?(Nn=Ne,B++):(Nn=n,ce===0&&fe(lt)),Nn!==n?(ga=xe(),ga!==n?(hi=or(),hi!==n?(ma=xe(),ma!==n?(e.charCodeAt(B)===59?(di=ae,B++):(di=n,ce===0&&fe(se)),di!==n?(ba=xe(),ba!==n?(pi=bp(),pi!==n?(Zt=k,U=tt(U,je,hi,pi),k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n),k===n&&(k=B,U=W2(),U!==n?(K=xe(),K!==n?(e.charCodeAt(B)===40?(ee=a,B++):(ee=n,ce===0&&fe(o)),ee!==n?(oe=xe(),oe!==n?(je=aee(),je!==n?(rt=xe(),rt!==n?(e.charCodeAt(B)===41?(Nn=s,B++):(Nn=n,ce===0&&fe(c)),Nn!==n?(ga=xe(),ga!==n?(hi=or(),hi!==n?(ma=xe(),ma!==n?(e.charCodeAt(B)===59?(di=ae,B++):(di=n,ce===0&&fe(se)),di!==n?(ba=xe(),ba!==n?(pi=bp(),pi!==n?(Zt=k,U=ut(U,je,hi,pi),k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n),k===n&&(k=iee()))),k}function aee(){var k,U,K,ee,oe,je,rt;if(k=B,U=or(),U!==n){for(K=[],ee=B,e.charCodeAt(B)===44?(oe=Te,B++):(oe=n,ce===0&&fe(Ie)),oe!==n?(je=xe(),je!==n?(rt=or(),rt!==n?(Zt=ee,oe=D(U,rt),ee=oe):(B=ee,ee=n)):(B=ee,ee=n)):(B=ee,ee=n);ee!==n;)K.push(ee),ee=B,e.charCodeAt(B)===44?(oe=Te,B++):(oe=n,ce===0&&fe(Ie)),oe!==n?(je=xe(),je!==n?(rt=or(),rt!==n?(Zt=ee,oe=D(U,rt),ee=oe):(B=ee,ee=n)):(B=ee,ee=n)):(B=ee,ee=n);K!==n?(Zt=k,U=Rt(U,K),k=U):(B=k,k=n)}else B=k,k=n;return k}function W2(){var k,U,K,ee;return e.substr(B,3)===ln?(k=ln,B+=3):(k=n,ce===0&&fe(Ve)),k===n&&(e.substr(B,4)===N?(k=N,B+=4):(k=n,ce===0&&fe(L)),k===n&&(e.substr(B,5)===W?(k=W,B+=5):(k=n,ce===0&&fe(j)),k===n&&(e.substr(B,6)===Q?(k=Q,B+=6):(k=n,ce===0&&fe(T)),k===n&&(e.substr(B,4)===S?(k=S,B+=4):(k=n,ce===0&&fe(V)),k===n&&(e.substr(B,5)===Y?(k=Y,B+=5):(k=n,ce===0&&fe(de)),k===n&&(e.substr(B,5)===ie?(k=ie,B+=5):(k=n,ce===0&&fe(pe)),k===n&&(e.substr(B,4)===un?(k=un,B+=4):(k=n,ce===0&&fe(fa)),k===n&&(e.substr(B,6)===ha?(k=ha,B+=6):(k=n,ce===0&&fe(da)),k===n&&(e.substr(B,7)===Gt?(k=Gt,B+=7):(k=n,ce===0&&fe(fi)),k===n&&(e.substr(B,4)===pa?(k=pa,B+=4):(k=n,ce===0&&fe(fn)),k===n&&(e.substr(B,6)===Br?(k=Br,B+=6):(k=n,ce===0&&fe(E)),k===n&&(e.substr(B,6)===m?(k=m,B+=6):(k=n,ce===0&&fe(v)),k===n&&(e.substr(B,3)===R?(k=R,B+=3):(k=n,ce===0&&fe(P)),k===n&&(k=B,U=OT(),U!==n?(K=xe(),K!==n?(ee=LT(),ee!==n?(Zt=k,U=z(U,ee),k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n))))))))))))))),k}function oee(){var k;return k=see(),k===n&&(k=or()),k}function or(){var k,U,K,ee,oe;if(k=B,U=B,q.test(e.charAt(B))?(K=e.charAt(B),B++):(K=n,ce===0&&fe(ge)),K!==n){for(ee=[],Ze.test(e.charAt(B))?(oe=e.charAt(B),B++):(oe=n,ce===0&&fe($e));oe!==n;)ee.push(oe),Ze.test(e.charAt(B))?(oe=e.charAt(B),B++):(oe=n,ce===0&&fe($e));ee!==n?(K=[K,ee],U=K):(B=U,U=n)}else B=U,U=n;return U!==n&&(Zt=k,U=nt()),k=U,k}function zT(){var k,U,K;for(k=B,U=[],Re.test(e.charAt(B))?(K=e.charAt(B),B++):(K=n,ce===0&&fe(CT));K!==n;)U.push(K),Re.test(e.charAt(B))?(K=e.charAt(B),B++):(K=n,ce===0&&fe(CT));return U!==n&&(Zt=k,U=QJ(U)),k=U,k}function see(){var k,U,K,ee;if(ce++,k=B,U=xe(),U!==n){if(K=[],kT.test(e.charAt(B))?(ee=e.charAt(B),B++):(ee=n,ce===0&&fe(TT)),ee!==n)for(;ee!==n;)K.push(ee),kT.test(e.charAt(B))?(ee=e.charAt(B),B++):(ee=n,ce===0&&fe(TT));else K=n;K!==n?(Zt=k,U=KJ(),k=U):(B=k,k=n)}else B=k,k=n;return ce--,k===n&&(U=n,ce===0&&fe(XJ)),k}function xe(){var k,U;for(ce++,k=[],IT.test(e.charAt(B))?(U=e.charAt(B),B++):(U=n,ce===0&&fe(RT));U!==n;)k.push(U),IT.test(e.charAt(B))?(U=e.charAt(B),B++):(U=n,ce===0&&fe(RT));return ce--,k===n&&(U=n,ce===0&&fe(JJ)),k}if(mp=i(),mp!==n&&B===e.length)return mp;throw mp!==n&&B<e.length&&fe(eee()),tee(j2,Fr<e.length?e.charAt(Fr):null,Fr<e.length?PT(Fr,Fr+1):PT(Fr,Fr))}var hk={SyntaxError:ec,parse:RK};const DK=uu(hk),l2=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
3278
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function M8(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var i2=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,a;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=Zu(o),c=s.next();!c.done;c=s.next()){var l=c.value;l.remove(this)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(vt(u))try{u()}catch(g){a=g instanceof r2?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=Zu(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{L8(p)}catch(g){a=a??[],g instanceof r2?a=n2(n2([],t2(a)),t2(g.errors)):a.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(a)throw new r2(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)L8(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&M8(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&M8(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();i2.EMPTY;function O8(e){return e instanceof i2||e&&"closed"in e&&vt(e.remove)&&vt(e.add)&&vt(e.unsubscribe)}function L8(e){vt(e)?e():e.unsubscribe()}var N8={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},z8={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,n2([e,t],t2(n)))},clearTimeout:function(e){var t=z8.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function U8(e){z8.setTimeout(function(){throw e})}function $8(){}function jX(e){e()}var a2=function(e){e2(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,O8(n)&&n.add(r)):r.destination=ZX,r}return t.create=function(n,r,i){return new L0(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(i2),qX=Function.prototype.bind;function o2(e,t){return qX.call(e,t)}var WX=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){N0(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){N0(r)}else N0(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){N0(n)}},e}(),L0=function(e){e2(t,e);function t(n,r,i){var a=e.call(this)||this,o;if(vt(n)||!n)o={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;a&&N8.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return a.unsubscribe()},o={next:n.next&&o2(n.next,s),error:n.error&&o2(n.error,s),complete:n.complete&&o2(n.complete,s)}):o=n}return a.destination=new WX(o),a}return t}(a2);function N0(e){U8(e)}function YX(e){throw e}var ZX={closed:!0,next:$8,error:YX,complete:$8},s2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function H8(e){return e}function QX(e){return e.length===0?H8:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var Pn=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,a=KX(t)?t:new L0(t,n,r);return jX(function(){var o=i,s=o.operator,c=o.source;a.add(s?s.call(a,c):c?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=G8(n),new n(function(i,a){var o=new L0({next:function(s){try{t(s)}catch(c){a(c),o.unsubscribe()}},error:a,complete:i});r.subscribe(o)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[s2]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return QX(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=G8(t),new t(function(r,i){var a;n.subscribe(function(o){return a=o},function(o){return i(o)},function(){return r(a)})})},e.create=function(t){return new e(t)},e}();function G8(e){var t;return(t=e??N8.Promise)!==null&&t!==void 0?t:Promise}function XX(e){return e&&vt(e.next)&&vt(e.error)&&vt(e.complete)}function KX(e){return e&&e instanceof a2||XX(e)&&O8(e)}function JX(e){return vt(e==null?void 0:e.lift)}function Ks(e){return function(t){if(JX(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Qu(e,t,n,r,i){return new eK(e,t,n,r,i)}var eK=function(e){e2(t,e);function t(n,r,i,a,o,s){var c=e.call(this,n)||this;return c.onFinalize=o,c.shouldUnsubscribe=s,c._next=r?function(l){try{r(l)}catch(u){n.error(u)}}:e.prototype._next,c._error=a?function(l){try{a(l)}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(a2),tK=new Pn(function(e){return e.complete()});function nK(e){return e&&vt(e.schedule)}function V8(e){return e[e.length-1]}function rK(e){return nK(V8(e))?e.pop():void 0}function iK(e,t){return typeof V8(e)=="number"?e.pop():t}var j8=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function q8(e){return vt(e==null?void 0:e.then)}function W8(e){return vt(e[s2])}function Y8(e){return Symbol.asyncIterator&&vt(e==null?void 0:e[Symbol.asyncIterator])}function Z8(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function aK(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Q8=aK();function X8(e){return vt(e==null?void 0:e[Q8])}function K8(e){return GX(this,arguments,function(){var n,r,i,a;return F8(this,function(o){switch(o.label){case 0:n=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Xs(n.read())];case 3:return r=o.sent(),i=r.value,a=r.done,a?[4,Xs(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Xs(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function J8(e){return vt(e==null?void 0:e.getReader)}function Js(e){if(e instanceof Pn)return e;if(e!=null){if(W8(e))return oK(e);if(j8(e))return sK(e);if(q8(e))return cK(e);if(Y8(e))return ek(e);if(X8(e))return lK(e);if(J8(e))return uK(e)}throw Z8(e)}function oK(e){return new Pn(function(t){var n=e[s2]();if(vt(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function sK(e){return new Pn(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function cK(e){return new Pn(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,U8)})}function lK(e){return new Pn(function(t){var n,r;try{for(var i=Zu(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function ek(e){return new Pn(function(t){fK(e,t).catch(function(n){return t.error(n)})})}function uK(e){return ek(K8(e))}function fK(e,t){var n,r,i,a;return HX(this,void 0,void 0,function(){var o,s;return F8(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=VX(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function sa(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function tk(e,t){return t===void 0&&(t=0),Ks(function(n,r){n.subscribe(Qu(r,function(i){return sa(r,e,function(){return r.next(i)},t)},function(){return sa(r,e,function(){return r.complete()},t)},function(i){return sa(r,e,function(){return r.error(i)},t)}))})}function nk(e,t){return t===void 0&&(t=0),Ks(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function hK(e,t){return Js(e).pipe(nk(t),tk(t))}function dK(e,t){return Js(e).pipe(nk(t),tk(t))}function pK(e,t){return new Pn(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function gK(e,t){return new Pn(function(n){var r;return sa(n,t,function(){r=e[Q8](),sa(n,t,function(){var i,a,o;try{i=r.next(),a=i.value,o=i.done}catch(s){n.error(s);return}o?n.complete():n.next(a)},0,!0)}),function(){return vt(r==null?void 0:r.return)&&r.return()}})}function rk(e,t){if(!e)throw new Error("Iterable cannot be null");return new Pn(function(n){sa(n,t,function(){var r=e[Symbol.asyncIterator]();sa(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function mK(e,t){return rk(K8(e),t)}function bK(e,t){if(e!=null){if(W8(e))return hK(e,t);if(j8(e))return pK(e,t);if(q8(e))return dK(e,t);if(Y8(e))return rk(e,t);if(X8(e))return gK(e,t);if(J8(e))return mK(e,t)}throw Z8(e)}function yK(e,t){return t?bK(e,t):Js(e)}var vK=P8(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function ik(e,t){var n=typeof t=="object";return new Promise(function(r,i){var a=new L0({next:function(o){r(o),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new vK)}});e.subscribe(a)})}function ak(e,t){return Ks(function(n,r){var i=0;n.subscribe(Qu(r,function(a){r.next(e.call(t,a,i++))}))})}function wK(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,f=!1,h=function(){f&&!c.length&&!l&&t.complete()},d=function(g){return l<r?p(g):c.push(g)},p=function(g){a&&t.next(g),l++;var b=!1;Js(n(g,u++)).subscribe(Qu(t,function(y){i==null||i(y),a?d(y):t.next(y)},function(){b=!0},void 0,function(){if(b)try{l--;for(var y=function(){var w=c.shift();o?sa(t,o,function(){return p(w)}):p(w)};c.length&&l<r;)y();h()}catch(w){t.error(w)}}))};return e.subscribe(Qu(t,d,function(){f=!0,h()})),function(){s==null||s()}}function ok(e,t,n){return n===void 0&&(n=1/0),vt(t)?ok(function(r,i){return ak(function(a,o){return t(r,a,i,o)})(Js(e(r,i)))},n):(typeof t=="number"&&(n=t),Ks(function(r,i){return wK(r,i,e,n)}))}function xK(e){return e===void 0&&(e=1/0),ok(H8,e)}function AK(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=rK(e),r=iK(e,1/0),i=e;return i.length?i.length===1?Js(i[0]):xK(r)(yK(i,n)):tK}function EK(e,t,n,r,i){return function(a,o){var s=n,c=t,l=0;a.subscribe(Qu(o,function(u){var f=l++;c=s?e(c,u,f):(s=!0,u),r&&o.next(c)},i&&function(){s&&o.next(c),o.complete()}))}}function sk(e,t){return Ks(EK(e,t,arguments.length>=2,!1,!0))}var SK=function(e,t){return e.push(t),e};function _K(){return Ks(function(e,t){sk(SK,[])(e).subscribe(t)})}const ck=-2003829722,c2=-2021002517;function CK(e){return new TextDecoder().decode(e)}function lk(e){const t=e?"big":"little",n=new Fe().endianess(t).int32("magic").uint16("version").uint16("numZoomLevels").uint64("chromTreeOffset").uint64("unzoomedDataOffset").uint64("unzoomedIndexOffset").uint16("fieldCount").uint16("definedFieldCount").uint64("asOffset").uint64("totalSummaryOffset").uint32("uncompressBufSize").uint64("extHeaderOffset").array("zoomLevels",{length:"numZoomLevels",type:new Fe().endianess(t).uint32("reductionLevel").uint32("reserved").uint64("dataOffset").uint64("indexOffset")}),r=new Fe().endianess(t).uint64("basesCovered").doublele("scoreMin").doublele("scoreMax").doublele("scoreSum").doublele("scoreSumSquares"),i=new Fe().endianess(t).uint32("magic").uint32("blockSize").uint32("keySize").uint32("valSize").uint64("itemCount"),a=new Fe().endianess(t).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");return{chromTreeParser:i,totalSummaryParser:r,headerParser:n,isLeafNode:a}}class uk{getHeader(t){return this.headerP||(this.headerP=this._getHeader(t).catch(n=>{throw this.headerP=void 0,n})),this.headerP}constructor(t){const{filehandle:n,renameRefSeqs:r=o=>o,path:i,url:a}=t;if(this.renameRefSeqs=r,n)this.bbi=n;else if(a)this.bbi=new po(a);else if(i)this.bbi=new kt(i);else throw new Error("no file given")}async _getHeader(t){const n=await this._getMainHeader(t),r=await this._readChromTree(n,t);return{...n,...r}}async _getMainHeader(t,n=2e3){const{buffer:r}=await this.bbi.read(we.Buffer.alloc(n),0,n,0,t),i=this._isBigEndian(r),a=lk(i),o=a.headerParser.parse(r),{magic:s,asOffset:c,totalSummaryOffset:l}=o;if(o.fileType=s===c2?"bigbed":"bigwig",c>n||l>n)return this._getMainHeader(t,n*2);if(c){const u=Number(o.asOffset);o.autoSql=CK(r.subarray(u,r.indexOf(0,u)))}if(o.totalSummaryOffset>n-8*5)return this._getMainHeader(t,n*2);if(o.totalSummaryOffset){const u=r.subarray(Number(o.totalSummaryOffset)),f=a.totalSummaryParser.parse(u);o.totalSummary={...f,basesCovered:Number(f.basesCovered)}}return{...o,isBigEndian:i}}_isBigEndian(t){let n=t.readInt32LE(0);if(n===ck||n===c2)return!1;if(n=t.readInt32BE(0),n===ck||n===c2)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(t,n){const r=t.isBigEndian,i=r?"big":"little",a=[],o={};let s=Number(t.unzoomedDataOffset);const c=Number(t.chromTreeOffset);for(;s%4!==0;)s+=1;const l=s-c,{buffer:u}=await this.bbi.read(we.Buffer.alloc(l),0,l,Number(c),n),f=lk(r),{keySize:h}=f.chromTreeParser.parse(u),d=new Fe().endianess(i).string("key",{stripNull:!0,length:h}).uint32("refId").uint32("refSize").saveOffset("offset"),p=new Fe().endianess(i).skip(h).uint64("childOffset").saveOffset("offset"),g=32,b=async y=>{let w=y;if(w>=u.length)throw new Error("reading beyond end of buffer");const A=f.isLeafNode.parse(u.subarray(w)),{isLeafNode:x,cnt:C}=A;if(w+=A.offset,x)for(let _=0;_<C;_+=1){const I=d.parse(u.subarray(w));w+=I.offset;const{key:D,refId:M,refSize:G}=I,O={name:D,id:M,length:G};o[this.renameRefSeqs(D)]=M,a[M]=O}else{const _=[];for(let I=0;I<C;I+=1){const D=p.parse(u.subarray(w)),{childOffset:M}=D;w+=D.offset,_.push(b(Number(M)-Number(c)))}await Promise.all(_)}};return await b(g),{refsByName:o,refsByNumber:a}}async getUnzoomedView(t){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:i,isBigEndian:a,fileType:o}=await this.getHeader(t);return new B8(this.bbi,r,n,a,i>0,o)}async getFeatureStream(t,n,r,i){await this.getHeader(i);const a=this.renameRefSeqs(t);let o;const{basesPerSpan:s,scale:c}=i||{};return s?o=await this.getView(1/s,i):c?o=await this.getView(c,i):o=await this.getView(1,i),new Pn(l=>{o.readWigData(a,n,r,l,i)})}async getFeatures(t,n,r,i){const a=await this.getFeatureStream(t,n,r,i);return(await ik(a.pipe(_K()))).flat()}}class kK extends uk{async getView(t,n){const{zoomLevels:r,refsByName:i,fileSize:a,isBigEndian:o,uncompressBufSize:s}=await this.getHeader(n),c=1/t;let l=r.length;a||(l-=1);for(let u=l;u>=0;u-=1){const f=r[u];if(f&&f.reductionLevel<=2*c){const h=Number(f.indexOffset);return new B8(this.bbi,i,h,o,s>0,"summary")}}return this.getUnzoomedView(n)}}function TK(e){return e.filter(t=>!!t)}class IK extends uk{constructor(){super(...arguments),this.readIndicesCache=new A0({cache:new E0({maxSize:1}),fill:(t,n)=>this._readIndices({...t,signal:n})})}readIndices(t={}){const{signal:n,...r}=t;return this.readIndicesCache.get(JSON.stringify(r),t,n)}async getView(t,n){return this.getUnzoomedView(n)}async _readIndices(t){const{extHeaderOffset:n,isBigEndian:r}=await this.getHeader(t),{buffer:i}=await this.bbi.read(we.Buffer.alloc(64),0,64,Number(n)),a=r?"big":"little",o=new Fe().endianess(a).uint16("size").uint16("count").uint64("offset").parse(i),{count:s,offset:c}=o;if(s===0)return[];const l=20,u=l*s,{buffer:f}=await this.bbi.read(we.Buffer.alloc(u),0,u,Number(c)),h=new Fe().endianess(a).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),d=[];for(let p=0;p<s;p+=1)d.push(h.parse(f.subarray(p*l)));return d}async searchExtraIndexBlocks(t,n={}){const{isBigEndian:r}=await this.getHeader(n),i=await this.readIndices(n);if(i.length===0)return[];const a=i.map(async o=>{const{offset:s,field:c}=o,{buffer:l}=await this.bbi.read(we.Buffer.alloc(32),0,32,Number(s),n),u=r?"big":"little",f=new Fe().endianess(u).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),{blockSize:h,keySize:d,valSize:p}=f.parse(l),g=new Fe().endianess(u).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:new Fe().array("leafkeys",{length:"cnt",type:new Fe().endianess(u).string("key",{length:d,stripNull:!0}).uint64("offset")}),1:new Fe().array("keys",{length:"cnt",type:new Fe().endianess(u).string("key",{length:d,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),b=async w=>{const A=Number(w),x=4+h*(d+p),{buffer:C}=await this.bbi.read(we.Buffer.alloc(x),0,x,A,n),_=g.parse(C);if(_.leafkeys){let I;for(let D=0;D<_.leafkeys.length;D+=1){const{key:M}=_.leafkeys[D];if(t.localeCompare(M)<0&&I)return b(I);I=_.leafkeys[D].offset}return b(I)}for(let I=0;I<_.keys.length;I+=1)if(_.keys[I].key===t)return{..._.keys[I],field:c}},y=32;return b(Number(s)+y)});return TK(await Promise.all(a))}async searchExtraIndex(t,n={}){const r=await this.searchExtraIndexBlocks(t,n);if(r.length===0)return[];const i=await this.getUnzoomedView(n),a=r.map(s=>new Pn(c=>{i.readFeatures(c,[s],n)}).pipe(sk((c,l)=>c.concat(l)),ak(c=>{for(const l of c)l.field=s.field;return c})));return(await ik(AK(...a))).filter(s=>{var c;return((c=s.rest)===null||c===void 0?void 0:c.split(" ")[(s.field||0)-3])===t})}}const fk=Object.freeze(Object.defineProperty({__proto__:null,BigBed:IK,BigWig:kK},Symbol.toStringTag,{value:"Module"}));function RK(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function ec(e,t,n,r){this.message=e,this.expected=t,this.found=n,this.location=r,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ec)}RK(ec,Error),ec.buildMessage=function(e,t){var n={literal:function(l){return'"'+i(l.text)+'"'},class:function(l){var u="",f;for(f=0;f<l.parts.length;f++)u+=l.parts[f]instanceof Array?a(l.parts[f][0])+"-"+a(l.parts[f][1]):a(l.parts[f]);return"["+(l.inverted?"^":"")+u+"]"},any:function(l){return"any character"},end:function(l){return"end of input"},other:function(l){return l.description}};function r(l){return l.charCodeAt(0).toString(16).toUpperCase()}function i(l){return l.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function a(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function o(l){return n[l.type](l)}function s(l){var u=new Array(l.length),f,h;for(f=0;f<l.length;f++)u[f]=o(l[f]);if(u.sort(),u.length>0){for(f=1,h=1;f<u.length;f++)u[f-1]!==u[f]&&(u[h]=u[f],h++);u.length=h}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function c(l){return l?'"'+i(l)+'"':"end of input"}return"Expected "+s(e)+" but "+c(t)+" found."};function DK(e,t){t=t!==void 0?t:{};var n={},r={declaration:MT},i=MT,a="(",o=ze("(",!1),s=")",c=ze(")",!1),l=function(k,U,K,ee){return{type:k,name:U,comment:K,fields:ee}},u="simple",f=ze("simple",!1),h="object",d=ze("object",!1),p="table",g=ze("table",!1),b="auto",y=ze("auto",!1),w="primary",A=ze("primary",!1),x="index",C=ze("index",!1),_="unique",I=ze("unique",!1),D=function(k,U){return U},M=function(k,U){return k.name&&U.unshift(k),U},G="#",O=ze("#",!1),ae=";",se=ze(";",!1),ve=function(k,U,K){return{type:k,name:U,comment:K}},Pe="[",st=ze("[",!1),Ne="]",lt=ze("]",!1),tt=function(k,U,K,ee){return{type:k,size:U,name:K,comment:ee}},ut=function(k,U,K,ee){return{type:k,vals:U,name:K,comment:ee}},Te=",",Ie=ze(",",!1),Rt=function(k,U){return U.unshift(k),U},ln="int",Ve=ze("int",!1),N="uint",L=ze("uint",!1),W="short",j=ze("short",!1),Q="ushort",T=ze("ushort",!1),S="byte",V=ze("byte",!1),Y="ubyte",de=ze("ubyte",!1),ie="float",pe=ze("float",!1),un="char",fa=ze("char",!1),ha="string",da=ze("string",!1),Gt="lstring",fi=ze("lstring",!1),pa="enum",fn=ze("enum",!1),Br="double",E=ze("double",!1),m="bigint",v=ze("bigint",!1),R="set",P=ze("set",!1),z=function(k,U){return k+" "+U},q=/^[a-zA-Z_]/,ge=kf([["a","z"],["A","Z"],"_"],!1,!1),Ze=/^[a-zA-Z0-9_]/,$e=kf([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),nt=function(k){return DT()},Re=/^[^\n\r]/,CT=kf([`
3279
+ `,"\r"],!0,!1),XJ=function(k){return k.join("").replace(/^"/,"").replace(/"$/,"")},KJ=BT("integer"),kT=/^[0-9]/,TT=kf([["0","9"]],!1,!1),JJ=function(){return parseInt(DT(),10)},eee=BT("whitespace"),IT=/^[ \t\n\r]/,RT=kf([" "," ",`
3280
+ `,"\r"],!1,!1),B=0,Zt=0,gp=[{line:1,column:1}],Fr=0,j2=[],ce=0,mp;if("startRule"in t){if(!(t.startRule in r))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');i=r[t.startRule]}function DT(){return e.substring(Zt,B)}function ze(k,U){return{type:"literal",text:k,ignoreCase:U}}function kf(k,U,K){return{type:"class",parts:k,inverted:U,ignoreCase:K}}function tee(){return{type:"end"}}function BT(k){return{type:"other",description:k}}function FT(k){var U=gp[k],K;if(U)return U;for(K=k-1;!gp[K];)K--;for(U=gp[K],U={line:U.line,column:U.column};K<k;)e.charCodeAt(K)===10?(U.line++,U.column=1):U.column++,K++;return gp[k]=U,U}function PT(k,U){var K=FT(k),ee=FT(U);return{start:{offset:k,line:K.line,column:K.column},end:{offset:U,line:ee.line,column:ee.column}}}function fe(k){B<Fr||(B>Fr&&(Fr=B,j2=[]),j2.push(k))}function nee(k,U,K){return new ec(ec.buildMessage(k,U),k,U,K)}function MT(){var k,U,K,ee,oe,je,rt,Nn,ga,hi,ma,di,ba,pi;return k=B,U=xe(),U!==n?(K=OT(),K!==n?(ee=xe(),ee!==n?(oe=LT(),oe!==n?(je=xe(),je!==n?(rt=bp(),rt!==n?(Nn=xe(),Nn!==n?(e.charCodeAt(B)===40?(ga=a,B++):(ga=n,ce===0&&fe(o)),ga!==n?(hi=xe(),hi!==n?(ma=ree(),ma!==n?(di=xe(),di!==n?(e.charCodeAt(B)===41?(ba=s,B++):(ba=n,ce===0&&fe(c)),ba!==n?(pi=xe(),pi!==n?(Zt=k,U=l(K,oe,rt,ma),k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n),k}function OT(){var k;return e.substr(B,6)===u?(k=u,B+=6):(k=n,ce===0&&fe(f)),k===n&&(e.substr(B,6)===h?(k=h,B+=6):(k=n,ce===0&&fe(d)),k===n&&(e.substr(B,5)===p?(k=p,B+=5):(k=n,ce===0&&fe(g)))),k}function LT(){var k,U,K,ee;return k=or(),k===n&&(k=B,U=or(),U!==n?(K=NT(),K!==n?(U=[U,K],k=U):(B=k,k=n)):(B=k,k=n),k===n&&(k=B,U=or(),U!==n?(e.substr(B,4)===b?(K=b,B+=4):(K=n,ce===0&&fe(y)),K!==n?(U=[U,K],k=U):(B=k,k=n)):(B=k,k=n),k===n&&(k=B,U=or(),U!==n?(K=NT(),K!==n?(e.substr(B,4)===b?(ee=b,B+=4):(ee=n,ce===0&&fe(y)),ee!==n?(U=[U,K,ee],k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)))),k}function NT(){var k;return e.substr(B,7)===w?(k=w,B+=7):(k=n,ce===0&&fe(A)),k===n&&(e.substr(B,5)===x?(k=x,B+=5):(k=n,ce===0&&fe(C)),k===n&&(e.substr(B,6)===_?(k=_,B+=6):(k=n,ce===0&&fe(I)))),k}function bp(){var k;return k=zT(),k===n&&(k=xe()),k}function ree(){var k,U,K,ee,oe,je,rt;if(k=B,U=q2(),U!==n)if(K=xe(),K!==n){for(ee=[],oe=B,je=xe(),je!==n?(rt=q2(),rt!==n?(Zt=oe,je=D(U,rt),oe=je):(B=oe,oe=n)):(B=oe,oe=n);oe!==n;)ee.push(oe),oe=B,je=xe(),je!==n?(rt=q2(),rt!==n?(Zt=oe,je=D(U,rt),oe=je):(B=oe,oe=n)):(B=oe,oe=n);ee!==n?(oe=xe(),oe!==n?(Zt=k,U=M(U,ee),k=U):(B=k,k=n)):(B=k,k=n)}else B=k,k=n;else B=k,k=n;return k}function iee(){var k;return e.charCodeAt(B)===35?(k=G,B++):(k=n,ce===0&&fe(O)),k}function aee(){var k,U,K,ee,oe;return k=B,U=xe(),U!==n?(K=iee(),K!==n?(ee=zT(),ee!==n?(oe=xe(),oe!==n?(U=[U,K,ee,oe],k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n),k}function q2(){var k,U,K,ee,oe,je,rt,Nn,ga,hi,ma,di,ba,pi;return k=B,U=W2(),U!==n?(K=xe(),K!==n?(ee=or(),ee!==n?(oe=xe(),oe!==n?(e.charCodeAt(B)===59?(je=ae,B++):(je=n,ce===0&&fe(se)),je!==n?(rt=xe(),rt!==n?(Nn=bp(),Nn!==n?(Zt=k,U=ve(U,ee,Nn),k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n),k===n&&(k=B,U=W2(),U!==n?(K=xe(),K!==n?(e.charCodeAt(B)===91?(ee=Pe,B++):(ee=n,ce===0&&fe(st)),ee!==n?(oe=xe(),oe!==n?(je=see(),je!==n?(rt=xe(),rt!==n?(e.charCodeAt(B)===93?(Nn=Ne,B++):(Nn=n,ce===0&&fe(lt)),Nn!==n?(ga=xe(),ga!==n?(hi=or(),hi!==n?(ma=xe(),ma!==n?(e.charCodeAt(B)===59?(di=ae,B++):(di=n,ce===0&&fe(se)),di!==n?(ba=xe(),ba!==n?(pi=bp(),pi!==n?(Zt=k,U=tt(U,je,hi,pi),k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n),k===n&&(k=B,U=W2(),U!==n?(K=xe(),K!==n?(e.charCodeAt(B)===40?(ee=a,B++):(ee=n,ce===0&&fe(o)),ee!==n?(oe=xe(),oe!==n?(je=oee(),je!==n?(rt=xe(),rt!==n?(e.charCodeAt(B)===41?(Nn=s,B++):(Nn=n,ce===0&&fe(c)),Nn!==n?(ga=xe(),ga!==n?(hi=or(),hi!==n?(ma=xe(),ma!==n?(e.charCodeAt(B)===59?(di=ae,B++):(di=n,ce===0&&fe(se)),di!==n?(ba=xe(),ba!==n?(pi=bp(),pi!==n?(Zt=k,U=ut(U,je,hi,pi),k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n)):(B=k,k=n),k===n&&(k=aee()))),k}function oee(){var k,U,K,ee,oe,je,rt;if(k=B,U=or(),U!==n){for(K=[],ee=B,e.charCodeAt(B)===44?(oe=Te,B++):(oe=n,ce===0&&fe(Ie)),oe!==n?(je=xe(),je!==n?(rt=or(),rt!==n?(Zt=ee,oe=D(U,rt),ee=oe):(B=ee,ee=n)):(B=ee,ee=n)):(B=ee,ee=n);ee!==n;)K.push(ee),ee=B,e.charCodeAt(B)===44?(oe=Te,B++):(oe=n,ce===0&&fe(Ie)),oe!==n?(je=xe(),je!==n?(rt=or(),rt!==n?(Zt=ee,oe=D(U,rt),ee=oe):(B=ee,ee=n)):(B=ee,ee=n)):(B=ee,ee=n);K!==n?(Zt=k,U=Rt(U,K),k=U):(B=k,k=n)}else B=k,k=n;return k}function W2(){var k,U,K,ee;return e.substr(B,3)===ln?(k=ln,B+=3):(k=n,ce===0&&fe(Ve)),k===n&&(e.substr(B,4)===N?(k=N,B+=4):(k=n,ce===0&&fe(L)),k===n&&(e.substr(B,5)===W?(k=W,B+=5):(k=n,ce===0&&fe(j)),k===n&&(e.substr(B,6)===Q?(k=Q,B+=6):(k=n,ce===0&&fe(T)),k===n&&(e.substr(B,4)===S?(k=S,B+=4):(k=n,ce===0&&fe(V)),k===n&&(e.substr(B,5)===Y?(k=Y,B+=5):(k=n,ce===0&&fe(de)),k===n&&(e.substr(B,5)===ie?(k=ie,B+=5):(k=n,ce===0&&fe(pe)),k===n&&(e.substr(B,4)===un?(k=un,B+=4):(k=n,ce===0&&fe(fa)),k===n&&(e.substr(B,6)===ha?(k=ha,B+=6):(k=n,ce===0&&fe(da)),k===n&&(e.substr(B,7)===Gt?(k=Gt,B+=7):(k=n,ce===0&&fe(fi)),k===n&&(e.substr(B,4)===pa?(k=pa,B+=4):(k=n,ce===0&&fe(fn)),k===n&&(e.substr(B,6)===Br?(k=Br,B+=6):(k=n,ce===0&&fe(E)),k===n&&(e.substr(B,6)===m?(k=m,B+=6):(k=n,ce===0&&fe(v)),k===n&&(e.substr(B,3)===R?(k=R,B+=3):(k=n,ce===0&&fe(P)),k===n&&(k=B,U=OT(),U!==n?(K=xe(),K!==n?(ee=LT(),ee!==n?(Zt=k,U=z(U,ee),k=U):(B=k,k=n)):(B=k,k=n)):(B=k,k=n))))))))))))))),k}function see(){var k;return k=cee(),k===n&&(k=or()),k}function or(){var k,U,K,ee,oe;if(k=B,U=B,q.test(e.charAt(B))?(K=e.charAt(B),B++):(K=n,ce===0&&fe(ge)),K!==n){for(ee=[],Ze.test(e.charAt(B))?(oe=e.charAt(B),B++):(oe=n,ce===0&&fe($e));oe!==n;)ee.push(oe),Ze.test(e.charAt(B))?(oe=e.charAt(B),B++):(oe=n,ce===0&&fe($e));ee!==n?(K=[K,ee],U=K):(B=U,U=n)}else B=U,U=n;return U!==n&&(Zt=k,U=nt()),k=U,k}function zT(){var k,U,K;for(k=B,U=[],Re.test(e.charAt(B))?(K=e.charAt(B),B++):(K=n,ce===0&&fe(CT));K!==n;)U.push(K),Re.test(e.charAt(B))?(K=e.charAt(B),B++):(K=n,ce===0&&fe(CT));return U!==n&&(Zt=k,U=XJ(U)),k=U,k}function cee(){var k,U,K,ee;if(ce++,k=B,U=xe(),U!==n){if(K=[],kT.test(e.charAt(B))?(ee=e.charAt(B),B++):(ee=n,ce===0&&fe(TT)),ee!==n)for(;ee!==n;)K.push(ee),kT.test(e.charAt(B))?(ee=e.charAt(B),B++):(ee=n,ce===0&&fe(TT));else K=n;K!==n?(Zt=k,U=JJ(),k=U):(B=k,k=n)}else B=k,k=n;return ce--,k===n&&(U=n,ce===0&&fe(KJ)),k}function xe(){var k,U;for(ce++,k=[],IT.test(e.charAt(B))?(U=e.charAt(B),B++):(U=n,ce===0&&fe(RT));U!==n;)k.push(U),IT.test(e.charAt(B))?(U=e.charAt(B),B++):(U=n,ce===0&&fe(RT));return ce--,k===n&&(U=n,ce===0&&fe(eee)),k}if(mp=i(),mp!==n&&B===e.length)return mp;throw mp!==n&&B<e.length&&fe(tee()),nee(j2,Fr<e.length?e.charAt(Fr):null,Fr<e.length?PT(Fr,Fr+1):PT(Fr,Fr))}var hk={SyntaxError:ec,parse:DK};const BK=uu(hk),l2=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
3278
3281
  "bigChain pairwise alignment"
3279
3282
  (
3280
3283
  string chrom; "Reference sequence chromosome or scaffold"
@@ -3433,17 +3436,17 @@ ${n}</textarea
3433
3436
  float score; "Floating point score."
3434
3437
  char[1] leftStatus; "Gap/break annotation for preceding block"
3435
3438
  char[1] rightStatus; "Gap/break annotation for following block"
3436
- )`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,hk.parse(t.trim())]));function u2(e){const t=["uint","int","float","long"];return{...e,fields:e.fields.map(n=>({...n,isArray:n.size&&n.type!=="char",arrayIsNumeric:n.size&&t.includes(n.type),isNumeric:!n.size&&t.includes(n.type)}))}}const BK={".":0,"-":-1,"+":1};function FK(e){var t;return e.length>=12&&!Number.isNaN(parseInt(e[9],10))&&((t=e[10])===null||t===void 0?void 0:t.split(",").filter(n=>!!n).length)===parseInt(e[9],10)}class PK{constructor(t={}){if(t.autoSql)this.autoSql=u2(DK.parse(t.autoSql));else if(t.type){if(!l2[t.type])throw new Error("Type not found");this.autoSql=u2(l2[t.type])}else this.autoSql=u2(l2.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(t,n={}){const{autoSql:r}=this,{uniqueId:i}=n,a=Array.isArray(t)?t:t.split(" ");let o={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&FK(a))for(let s=0;s<r.fields.length;s++){const c=r.fields[s];let l=a[s];const{isNumeric:u,isArray:f,arrayIsNumeric:h,name:d}=c;if(l==null)break;if(l!=="."){if(u){const p=Number(l);l=Number.isNaN(p)?l:p}else f&&(l=l.split(","),l[l.length-1]===""&&l.pop(),h&&(l=l.map(p=>Number(p))));o[d]=l}}else{const s=["chrom","chromStart","chromEnd","name"];o=Object.fromEntries(a.map((c,l)=>[s[l]||"field"+l,c])),o.chromStart=+o.chromStart,o.chromEnd=+o.chromEnd,Number.isNaN(Number.parseFloat(o.field4))||(o.score=+o.field4,delete o.field4),(o.field5==="+"||o.field5==="-")&&(o.strand=o.field5,delete o.field5)}return i&&(o.uniqueId=i),o.strand=BK[o.strand]||0,o.chrom=decodeURIComponent(o.chrom),o}}const MK=Object.freeze(Object.defineProperty({__proto__:null,default:PK},Symbol.toStringTag,{value:"Module"}));let dk=class{constructor(t,n){this.blockPosition=t,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}static min(...t){let n,r=0;for(;!n;r+=1)n=t[r];for(;r<t.length;r+=1)n.compareTo(t[r])>0&&(n=t[r]);return n}};function tc(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new dk(e[t+7]*1099511627776+e[t+6]*4294967296+e[t+5]*16777216+e[t+4]*65536+e[t+3]*256+e[t+2],e[t+1]<<8|e[t])}let pk=class{constructor(t,n,r,i){this.minv=t,this.maxv=n,this.bin=r,this._fetchedSize=i}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(t){return this.minv.compareTo(t.minv)||this.maxv.compareTo(t.maxv)||this.bin-t.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}};function OK(e){return new Promise(t=>setTimeout(t,e))}function LK(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}function NK(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new Error("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}function zK(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function UK(e={}){return"aborted"in e?{signal:e}:e}function gk(e,t){const n=[];let r;if(e.length===0)return e;e.sort((i,a)=>{const o=i.minv.blockPosition-a.minv.blockPosition;return o===0?i.minv.dataPosition-a.minv.dataPosition:o});for(const i of e)(!t||i.maxv.compareTo(t)>0)&&(r===void 0?(n.push(i),r=i):zK(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function mk(e,t){return{lineCount:LK(p0.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function z0(e,t){return e?e.compareTo(t)>0?t:e:t}function $K(e,t=n=>n){let n=0,r=0;const i=[],a={};for(let o=0;o<e.length;o+=1)if(!e[o]){if(r<o){let s=e.toString("utf8",r,o);s=t(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}let bk=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const HK=21578050;function GK(e,t){return e-e%t}function VK(e,t){return e-e%t+t}function jK(e,t){return t-=1,[[0,0],[1+(e>>26),1+(t>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}class nc extends bk{async lineCount(t,n){var r,i;return((i=(r=(await this.parse(n)).indices[t])===null||r===void 0?void 0:r.stats)===null||i===void 0?void 0:i.lineCount)||0}async _parse(t){const n=await this.filehandle.readFile(t);if(n.readUInt32LE(0)!==HK)throw new Error("Not a BAI file");const r=n.readInt32LE(4),a=((1<<(5+1)*3)-1)/7;let o=8,s;const c=new Array(r);for(let l=0;l<r;l++){const u=n.readInt32LE(o);let f;o+=4;const h={};for(let g=0;g<u;g+=1){const b=n.readUInt32LE(o);if(o+=4,b===a+1)o+=4,f=mk(n,o+16),o+=32;else{if(b>a+1)throw new Error("bai index contains too many bins, please use CSI");{const y=n.readInt32LE(o);o+=4;const w=new Array(y);for(let A=0;A<y;A++){const x=tc(n,o);o+=8;const C=tc(n,o);o+=8,s=z0(s,x),w[A]=new pk(x,C,b)}h[b]=w}}}const d=n.readInt32LE(o);o+=4;const p=new Array(d);for(let g=0;g<d;g++){const b=tc(n,o);o+=8,s=z0(s,b),p[g]=b}c[l]={binIndex:h,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:s,maxBlockSize:65536,indices:c,refCount:r}}async indexCov(t,n,r,i={}){const o=n!==void 0,c=(await this.parse(i)).indices[t];if(!c)return[];const{linearIndex:l=[],stats:u}=c;if(l.length===0)return[];const f=r===void 0?(l.length-1)*16384:VK(r,16384),h=n===void 0?0:GK(n,16384),d=o?new Array((f-h)/16384):new Array(l.length-1),p=l[l.length-1].blockPosition;if(f>(l.length-1)*16384)throw new Error("query outside of range of linear index");let g=l[h/16384].blockPosition;for(let b=h/16384,y=0;b<f/16384;b++,y++)d[y]={score:l[b+1].blockPosition-g,start:b*16384,end:b*16384+16384},g=l[b+1].blockPosition;return d.map(b=>({...b,score:b.score*((u==null?void 0:u.lineCount)||0)/p}))}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.indices[t];if(!o)return[];const s=jK(n,r),c=[];for(const[d,p]of s)for(let g=d;g<=p;g++)if(o.binIndex[g]){const b=o.binIndex[g];for(const y of b)c.push(y)}const l=o.linearIndex.length;let u;const f=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=f;d<=h;++d){const p=o.linearIndex[d];p&&(!u||p.compareTo(u)<0)&&(u=p)}return gk(c,u)}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}var ca=we.Buffer,f2=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(f2=new Int32Array(f2));function yk(e){if(ca.isBuffer(e))return e;var t=typeof ca.alloc=="function"&&typeof ca.from=="function";if(typeof e=="number")return t?ca.alloc(e):new ca(e);if(typeof e=="string")return t?ca.from(e):new ca(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function qK(e){var t=yk(4);return t.writeInt32BE(e,0),t}function h2(e,t){e=yk(e),ca.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=~~t^-1,r=0;r<e.length;r++)n=f2[(n^e[r])&255]^n>>>8;return n^-1}function d2(){return qK(h2.apply(null,arguments))}d2.signed=function(){return h2.apply(null,arguments)},d2.unsigned=function(){return h2.apply(null,arguments)>>>0};var WK=d2;const YK=uu(WK),ZK=21582659,QK=38359875;function XK(e,t){return e*2**t}function vk(e,t){return Math.floor(e/2**t)}let U0=class extends bk{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n){var r,i;return((i=(r=(await this.parse(n)).indices[t])===null||r===void 0?void 0:r.stats)===null||i===void 0?void 0:i.lineCount)||0}async indexCov(){return[]}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",a={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!a)throw new Error(`invalid Tabix preset format flags ${r}`);const o={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),c=s?String.fromCharCode(s):"",l=t.readInt32LE(n+20),u=t.readInt32LE(n+24);return{columnNumbers:o,coordinateType:i,metaValue:s,metaChar:c,skipLines:l,format:a,formatFlags:r,...$K(t.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await ea(n);let i;if(r.readUInt32LE(0)===ZK)i=1;else if(r.readUInt32LE(0)===QK)i=2;else throw new Error("Not a CSI file");this.minShift=r.readInt32LE(4),this.depth=r.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const a=r.readInt32LE(12),o=a>=30?this.parseAuxData(r,16):void 0,s=r.readInt32LE(16+a);let c=16+a+4,l;const u=new Array(s);for(let f=0;f<s;f++){const h=r.readInt32LE(c);c+=4;const d={};let p;for(let g=0;g<h;g++){const b=r.readUInt32LE(c);if(c+=4,b>this.maxBinNumber)p=mk(r,c+28),c+=28+16;else{l=z0(l,tc(r,c)),c+=8;const y=r.readInt32LE(c);c+=4;const w=new Array(y);for(let A=0;A<y;A+=1){const x=tc(r,c);c+=8;const C=tc(r,c);c+=8,l=z0(l,x),w[A]=new pk(x,C,b)}d[b]=w}}u[f]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:l,indices:u,refCount:s,csi:!0,maxBlockSize:65536,...o}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i),o=a==null?void 0:a.indices[t];if(!o)return[];const s=this.reg2bins(n,r);if(s.length===0)return[];const c=[];for(const[l,u]of s)for(let f=l;f<=u;f++)if(o.binIndex[f]){const h=o.binIndex[f];for(const d of h)c.push(d)}return gk(c,new dk(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,a=this.minShift+this.depth*3;const o=[];for(;r<=this.depth;a-=3,i+=XK(1,r*3),r+=1){const s=i+vk(t,a),c=i+vk(n,a);if(c-s+o.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);o.push([s,c])}return o}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}};const Mn={BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048},wk="=ACMGRSVTWYHKDBN".split(""),Xu="MIDNSHP=X???????".split("");class xk{constructor(t){this.data={},this._tagList=[],this._allTagsParsed=!1;const{bytes:n,fileOffset:r}=t,{byteArray:i,start:a}=n;this.data={},this.bytes=n,this._id=r,this._refID=i.readInt32LE(a+4),this.data.start=i.readInt32LE(a+8),this.flags=(i.readInt32LE(a+16)&4294901760)>>16}get(t){return this[t]?this.data[t]?this.data[t]:(this.data[t]=this[t](),this.data[t]):this._get(t.toLowerCase())}end(){return this.get("start")+this.get("length_on_ref")}seq_id(){return this._refID}_get(t){return t in this.data?this.data[t]:(this.data[t]=this._parseTag(t),this.data[t])}_tags(){this._parseAllTags();let t=["seq"];this.isSegmentUnmapped()||t.push("start","end","strand","score","qual","MQ","CIGAR","length_on_ref","template_length"),this.isPaired()&&t.push("next_segment_position","pair_orientation"),t=t.concat(this._tagList||[]);for(const r of Object.keys(this.data))r[0]!=="_"&&r!=="next_seq_id"&&t.push(r);const n={};return t.filter(r=>{if(r in this.data&&this.data[r]===void 0||r==="CG"||r==="cg")return!1;const i=r.toLowerCase(),a=n[i];return n[i]=!0,!a})}parent(){}children(){return this.get("subfeatures")}id(){return this._id}mq(){const t=(this.get("_bin_mq_nl")&65280)>>8;return t===255?void 0:t}score(){return this.get("mq")}qual(){var t;return(t=this.qualRaw())===null||t===void 0?void 0:t.join(" ")}qualRaw(){if(this.isSegmentUnmapped())return;const{start:t,byteArray:n}=this.bytes,r=t+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes"),i=this.get("seq_length");return n.subarray(r,r+i)}strand(){return this.isReverseComplemented()?-1:1}multi_segment_next_segment_strand(){if(!this.isMateUnmapped())return this.isMateReverseComplemented()?-1:1}name(){return this.get("_read_name")}_read_name(){const t=this.get("_l_read_name"),{byteArray:n,start:r}=this.bytes;return n.toString("ascii",r+36,r+36+t-1)}_parseTag(t){if(this._allTagsParsed)return;const{byteArray:n,start:r}=this.bytes;let i=this._tagOffset||r+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes")+this.get("seq_length");const a=this.bytes.end;let o;for(;i<a&&o!==t;){const s=String.fromCharCode(n[i],n[i+1]);o=s.toLowerCase();const c=String.fromCharCode(n[i+2]);i+=3;let l;switch(c){case"A":{l=String.fromCharCode(n[i]),i+=1;break}case"i":{l=n.readInt32LE(i),i+=4;break}case"I":{l=n.readUInt32LE(i),i+=4;break}case"c":{l=n.readInt8(i),i+=1;break}case"C":{l=n.readUInt8(i),i+=1;break}case"s":{l=n.readInt16LE(i),i+=2;break}case"S":{l=n.readUInt16LE(i),i+=2;break}case"f":{l=n.readFloatLE(i),i+=4;break}case"Z":case"H":{for(l="";i<=a;){const u=n[i++];if(u===0)break;l+=String.fromCharCode(u)}break}case"B":{l="";const u=n[i++],f=String.fromCharCode(u),h=n.readInt32LE(i);if(i+=4,f==="i")if(s==="CG")for(let d=0;d<h;d++){const p=n.readInt32LE(i),g=p>>4,b=Xu[p&15];l+=g+b,i+=4}else for(let d=0;d<h;d++)l+=n.readInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="I")if(s==="CG")for(let d=0;d<h;d++){const p=n.readUInt32LE(i),g=p>>4,b=Xu[p&15];l+=g+b,i+=4}else for(let d=0;d<h;d++)l+=n.readUInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="s")for(let d=0;d<h;d++)l+=n.readInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="S")for(let d=0;d<h;d++)l+=n.readUInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="c")for(let d=0;d<h;d++)l+=n.readInt8(i),d+1<h&&(l+=","),i+=1;if(f==="C")for(let d=0;d<h;d++)l+=n.readUInt8(i),d+1<h&&(l+=","),i+=1;if(f==="f")for(let d=0;d<h;d++)l+=n.readFloatLE(i),d+1<h&&(l+=","),i+=4;break}default:console.warn(`Unknown BAM tag type '${c}', tags may be incomplete`),l=void 0,i=a}if(this._tagOffset=i,this._tagList.push(s),o===t)return l;this.data[o]=l}this._allTagsParsed=!0}_parseAllTags(){this._parseTag("")}_parseCigar(t){return t.match(/\d+\D/g).map(n=>[n.match(/\D/)[0].toUpperCase(),Number.parseInt(n,10)])}isPaired(){return!!(this.flags&Mn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&Mn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&Mn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&Mn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&Mn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&Mn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&Mn.BAM_FREAD1)}isRead2(){return!!(this.flags&Mn.BAM_FREAD2)}isSecondary(){return!!(this.flags&Mn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&Mn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&Mn.BAM_FDUP)}isSupplementary(){return!!(this.flags&Mn.BAM_FSUPPLEMENTARY)}cigar(){if(this.isSegmentUnmapped())return;const{byteArray:t,start:n}=this.bytes,r=this.get("_n_cigar_op");let i=n+36+this.get("_l_read_name");const a=this.get("seq_length");let o="",s=0,c=t.readInt32LE(i),l=c>>4,u=Xu[c&15];if(u==="S"&&l===a)return i+=4,c=t.readInt32LE(i),l=c>>4,u=Xu[c&15],u!=="N"&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(let f=0;f<r;++f)c=t.readInt32LE(i),l=c>>4,u=Xu[c&15],o+=l+u,u!=="H"&&u!=="S"&&u!=="I"&&(s+=l),i+=4;return this.data.length_on_ref=s,o}_flags(){}length_on_ref(){return this.data.length_on_ref?this.data.length_on_ref:(this.get("cigar"),this.data.length_on_ref)}_n_cigar_op(){return this.get("_flag_nc")&65535}_l_read_name(){return this.get("_bin_mq_nl")&255}_seq_bytes(){return this.get("seq_length")+1>>1}getReadBases(){return this.seq()}seq(){const{byteArray:t,start:n}=this.bytes,r=n+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4,i=this.get("_seq_bytes"),a=this.get("seq_length");let o="",s=0;for(let c=0;c<i;++c){const l=t[r+c];o+=wk[(l&240)>>4],s++,s<a&&(o+=wk[l&15],s++)}return o}getPairOrientation(){if(!this.isSegmentUnmapped()&&!this.isMateUnmapped()&&this._refID===this._next_refid()){const t=this.isReverseComplemented()?"R":"F",n=this.isMateReverseComplemented()?"R":"F";let r=" ",i=" ";this.isRead1()?(r="1",i="2"):this.isRead2()&&(r="2",i="1");const a=[];return this.template_length()>0?(a[0]=t,a[1]=r,a[2]=n,a[3]=i):(a[2]=t,a[3]=r,a[0]=n,a[1]=i),a.join("")}return""}_bin_mq_nl(){return this.bytes.byteArray.readInt32LE(this.bytes.start+12)}_flag_nc(){return this.bytes.byteArray.readInt32LE(this.bytes.start+16)}seq_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+20)}_next_refid(){return this.bytes.byteArray.readInt32LE(this.bytes.start+24)}_next_pos(){return this.bytes.byteArray.readInt32LE(this.bytes.start+28)}template_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+32)}toJSON(){const t={};for(const n of Object.keys(this))n.charAt(0)==="_"||n==="bytes"||(t[n]=this[n]);return t}}function Ak(e){const t=e.split(/\r?\n/),n=[];for(const r of t){const[i,...a]=r.split(/\t/);i&&n.push({tag:i.slice(1),data:a.map(o=>{const[s,c]=o.split(":",2);return{tag:s,value:c}})})}return n}const Ek=21840194,Sk=65536;async function KK(e){let t=[];for await(const n of e)t=t.concat(n);return t}class JK{read(){throw new Error("never called")}stat(){throw new Error("never called")}readFile(){throw new Error("never called")}close(){throw new Error("never called")}}class _k{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:a,baiUrl:o,csiPath:s,csiFilehandle:c,csiUrl:l,htsget:u,yieldThreadTime:f=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new A0({cache:new E0({maxSize:50}),fill:async(d,p)=>{const{chunk:g,opts:b}=d,{data:y,cpositions:w,dpositions:A}=await this._readChunk({chunk:g,opts:{...b,signal:p}});return this.readBamFeatures(y,w,A,g)}}),this.renameRefSeq=h,t)this.bam=t;else if(n)this.bam=new kt(n);else if(r)this.bam=new po(r);else if(u)this.htsget=!0,this.bam=new JK;else throw new Error("unable to initialize bam");if(c)this.index=new U0({filehandle:c});else if(s)this.index=new U0({filehandle:new kt(s)});else if(l)this.index=new U0({filehandle:new po(l)});else if(a)this.index=new nc({filehandle:a});else if(i)this.index=new nc({filehandle:new kt(i)});else if(o)this.index=new nc({filehandle:new po(o)});else if(n)this.index=new nc({filehandle:new kt(`${n}.bai`)});else if(r)this.index=new nc({filehandle:new po(`${r}.bai`)});else if(u)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=f}async getHeaderPre(t){const n=UK(t);if(!this.index)return;const r=await this.index.parse(n),i=r.firstDataLine?r.firstDataLine.blockPosition+65535:void 0;let a;if(i){const u=i+Sk,f=await this.bam.read(we.Buffer.alloc(u),0,u,0,n);if(!f.bytesRead)throw new Error("Error reading header");a=f.buffer.subarray(0,Math.min(f.bytesRead,i))}else a=await this.bam.readFile(n);const o=await ea(a);if(o.readInt32LE(0)!==Ek)throw new Error("Not a BAM file");const s=o.readInt32LE(4);this.header=o.toString("utf8",8,8+s);const{chrToIndex:c,indexToChr:l}=await this._readRefSeqs(s+8,65535,n);return this.chrToIndex=c,this.indexToChr=l,Ak(this.header)}getHeader(t){return this.headerP||(this.headerP=this.getHeaderPre(t).catch(n=>{throw this.headerP=void 0,n})),this.headerP}async getHeaderText(t={}){return await this.getHeader(t),this.header}async _readRefSeqs(t,n,r){if(t>n)return this._readRefSeqs(t,n*2,r);const i=n+Sk,{bytesRead:a,buffer:o}=await this.bam.read(we.Buffer.alloc(i),0,n,0,r);if(!a)throw new Error("Error reading refseqs from header");const s=await ea(o.subarray(0,Math.min(a,n))),c=s.readInt32LE(t);let l=t+4;const u={},f=[];for(let h=0;h<c;h+=1){const d=s.readInt32LE(l),p=this.renameRefSeq(s.toString("utf8",l+4,l+4+d-1)),g=s.readInt32LE(l+d+4);if(u[p]=h,f.push({refName:p,length:g}),l=l+8+d,l>s.length)return console.warn(`BAM header is very big. Re-fetching ${n} bytes.`),this._readRefSeqs(t,n*2,r)}return{chrToIndex:u,indexToChr:f}}async getRecordsForRange(t,n,r,i){return KK(this.streamRecordsForRange(t,n,r,i))}async*streamRecordsForRange(t,n,r,i){var a;await this.getHeader(i);const o=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];if(o===void 0||!this.index)yield[];else{const s=await this.index.blocksForRange(o,n-1,r,i);yield*this._fetchChunkFeatures(s,o,n,r,i)}}async*_fetchChunkFeatures(t,n,r,i,a={}){const{viewAsPairs:o}=a,s=[];let c=!1;for(const l of t){const u=await this.featureCache.get(l.toString(),{chunk:l,opts:a},a.signal),f=[];for(const h of u)if(h.seq_id()===n)if(h.get("start")>=i){c=!0;break}else h.get("end")>=r&&f.push(h);if(s.push(f),yield f,c)break}NK(a.signal),o&&(yield this.fetchPairs(n,s,a))}async fetchPairs(t,n,r){const{pairAcrossChr:i,maxInsertSize:a=2e5}=r,o={},s={};n.map(h=>{const d={};for(const p of h){const g=p.name(),b=p.id();d[g]||(d[g]=0),d[g]++,s[b]=1}for(const[p,g]of Object.entries(d))g===1&&(o[p]=!0)});const c=[];n.map(h=>{for(const d of h){const p=d.name(),g=d.get("start"),b=d._next_pos(),y=d._next_refid();this.index&&o[p]&&(i||y===t&&Math.abs(g-b)<a)&&c.push(this.index.blocksForRange(y,b,b+1,r))}});const l=new Map,u=await Promise.all(c);for(const h of u.flat())l.has(h.toString())||l.set(h.toString(),h);return(await Promise.all([...l.values()].map(async h=>{const{data:d,cpositions:p,dpositions:g,chunk:b}=await this._readChunk({chunk:h,opts:r}),y=[];for(const w of await this.readBamFeatures(d,p,g,b))o[w.get("name")]&&!s[w.id()]&&y.push(w);return y}))).flat()}async _readRegion(t,n,r={}){const{bytesRead:i,buffer:a}=await this.bam.read(we.Buffer.alloc(n),0,n,t,r);return a.subarray(0,Math.min(i,n))}async _readChunk({chunk:t,opts:n}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n),{buffer:i,cpositions:a,dpositions:o}=await jC(r,t);return{data:i,cpositions:a,dpositions:o,chunk:t}}async readBamFeatures(t,n,r,i){let a=0;const o=[];let s=0,c=+Date.now();for(;a+4<t.length;){const l=t.readInt32LE(a),u=a+4+l-1;if(r){for(;a+i.minv.dataPosition>=r[s++];);s--}if(u<t.length){const f=new xk({bytes:{byteArray:t,start:a,end:u},fileOffset:n.length>0?n[s]*256+(a-r[s])+i.minv.dataPosition+1:YK.signed(t.slice(a,u))});o.push(f),this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime&&(await OK(1),c=+Date.now())}a=u+1}return o}async hasRefSeq(t){var n,r;const i=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return i===void 0?!1:(r=this.index)===null||r===void 0?void 0:r.hasRefSeq(i)}async lineCount(t){var n;const r=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return r===void 0||!this.index?0:this.index.lineCount(r)}async indexCov(t,n,r){var i;if(!this.index)return[];await this.index.parse();const a=(i=this.chrToIndex)===null||i===void 0?void 0:i[t];return a===void 0?[]:this.index.indexCov(a,n,r)}async blocksForRange(t,n,r,i){var a;if(!this.index)return[];await this.index.parse();const o=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];return o===void 0?[]:this.index.blocksForRange(o,n,r,i)}}async function Ck(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:a}=r;if(i.startsWith("data:"))return we.Buffer.from(i.split(",")[1],"base64");{const{referer:o,...s}=a,c=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...s}});if(!c.ok)throw new Error(`HTTP ${c.status} fetching ${i}: ${await c.text()}`);return we.Buffer.from(await c.arrayBuffer())}}));return we.Buffer.concat(await Promise.all(n.map(r=>ea(r))))}class eJ extends _k{constructor(t){super({htsget:!0}),this.baseUrl=t.baseUrl,this.trackId=t.trackId}async*streamRecordsForRange(t,n,r,i){var a;const s=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${t}&start=${n}&end=${r}&format=BAM`,c=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];if(c===void 0)yield[];else{const l=await fetch(s,{...i});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${s}: ${await l.text()}`);const u=await l.json(),f=await Ck(u.htsget.urls.slice(1),i);yield*this._fetchChunkFeatures([{buffer:f,_fetchedSize:void 0,bin:0,compareTo(){return 0},toUniqueString(){return`${t}_${n}_${r}`},fetchedSize(){return 0},minv:{dataPosition:0,blockPosition:0,compareTo:()=>0},maxv:{dataPosition:Number.MAX_SAFE_INTEGER,blockPosition:0,compareTo:()=>0},toString(){return`${t}_${n}_${r}`}}],c,n,r,i)}}async _readChunk({chunk:t}){if(!t.buffer)throw new Error("expected chunk.buffer in htsget");return{data:t.buffer,cpositions:[],dpositions:[],chunk:t}}async getHeader(t={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,r=await fetch(n,t);if(!r.ok)throw new Error(`HTTP ${r.status} fetching ${n}: ${await r.text()}`);const i=await r.json(),a=await Ck(i.htsget.urls,t);if(a.readInt32LE(0)!==Ek)throw new Error("Not a BAM file");const o=a.readInt32LE(4),s=a.toString("utf8",8,8+o),c=Ak(s),l=[],u={},f=c.filter(h=>h.tag==="SQ");for(const[h,d]of f.entries()){let p="",g=0;for(const b of d.data)b.tag==="SN"?p=b.value:b.tag==="LN"&&(g=+b.value);u[p]=h,l[h]={refName:p,length:g}}return this.chrToIndex=u,this.indexToChr=l,c}}const tJ=Object.freeze(Object.defineProperty({__proto__:null,BAI:nc,BamFile:_k,BamRecord:xk,CSI:U0,HtsgetFile:eJ},Symbol.toStringTag,{value:"Module"}));function kk(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class nJ extends Error{}function rc(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new nJ("aborted");throw t.code="ERR_ABORTED",t}}}function rJ(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function Tk(e,t){const n=[];let r=null;return e.length===0?e:(e.sort(function(i,a){const o=i.minv.blockPosition-a.minv.blockPosition;return o!==0?o:i.minv.dataPosition-a.minv.dataPosition}),e.forEach(i=>{(!t||i.maxv.compareTo(t)>0)&&(r===null?(n.push(i),r=i):rJ(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class p2{constructor(t,n){this.blockPosition=t,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}static min(...t){let n,r=0;for(;!n;r+=1)n=t[r];for(;r<t.length;r+=1)n.compareTo(t[r])>0&&(n=t[r]);return n}}function ic(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new p2(e[t+7]*1099511627776+e[t+6]*4294967296+e[t+5]*16777216+e[t+4]*65536+e[t+3]*256+e[t+2],e[t+1]<<8|e[t])}class $0{constructor(t,n,r,i=void 0){this.minv=t,this.maxv=n,this.bin=r,this._fetchedSize=i}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(t){return this.minv.compareTo(t.minv)||this.maxv.compareTo(t.maxv)||this.bin-t.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}class Ik{constructor({filehandle:t,renameRefSeqs:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}async getMetadata(t={}){const{indices:n,...r}=await this.parse(t);return r}_findFirstData(t,n){return t?t.compareTo(n)>0?n:t:n}async parse(t={}){return this.parseP||(this.parseP=this._parse(t).catch(n=>{throw this.parseP=void 0,n})),this.parseP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}const iJ=21578324,Rk=14;function aJ(e,t){return e+=1,t-=1,[[0,0],[1+(e>>26),1+(t>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}class H0 extends Ik{async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:o}=r.indices[i];return o?o.lineCount:-1}async _parse(t={}){const n=await this.filehandle.readFile(t),r=await ea(n);if(rc(t.signal),r.readUInt32LE(0)!==iJ)throw new Error("Not a TBI file");const i=r.readInt32LE(4),a=r.readInt32LE(8),o=a&65536?"zero-based-half-open":"1-based-closed",c={0:"generic",1:"SAM",2:"VCF"}[a&15];if(!c)throw new Error(`invalid Tabix preset format flags ${a}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},u=r.readInt32LE(24),f=5,h=((1<<(f+1)*3)-1)/7,d=2**(14+f*3),p=u?String.fromCharCode(u):null,g=r.readInt32LE(28),b=r.readInt32LE(32),{refNameToId:y,refIdToName:w}=this._parseNameBytes(r.slice(36,36+b));let A=36+b,x;return{indices:new Array(i).fill(0).map(()=>{const _=r.readInt32LE(A);A+=4;const I={};let D;for(let O=0;O<_;O+=1){const ae=r.readUInt32LE(A);if(A+=4,ae>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(ae===h+1){const se=r.readInt32LE(A);A+=4,se===2&&(D=this.parsePseudoBin(r,A)),A+=16*se}else{const se=r.readInt32LE(A);A+=4;const ve=new Array(se);for(let Pe=0;Pe<se;Pe+=1){const st=ic(r,A),Ne=ic(r,A+8);A+=16,x=this._findFirstData(x,st),ve[Pe]=new $0(st,Ne,ae)}I[ae]=ve}}const M=r.readInt32LE(A);A+=4;const G=new Array(M);for(let O=0;O<M;O+=1)G[O]=ic(r,A),A+=8,x=this._findFirstData(x,G[O]);return{binIndex:I,linearIndex:G,stats:D}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:g,firstDataLine:x,columnNumbers:l,coordinateType:o,format:c,refIdToName:w,refNameToId:y,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:kk(p0.fromBytesLE(t.slice(n+16,n+24),!0))}}_parseNameBytes(t){let n=0,r=0;const i=[],a={};for(let o=0;o<t.length;o+=1)if(!t[o]){if(r<o){let s=t.toString("utf8",r,o);s=this.renameRefSeq(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.refNameToId[t],s=a.indices[o];if(!s)return[];(s.linearIndex.length?s.linearIndex[n>>Rk>=s.linearIndex.length?s.linearIndex.length-1:n>>Rk]:new p2(0,0))||console.warn("querying outside of possible tabix range");const l=aJ(n,r),u=[];for(const[g,b]of l)for(let y=g;y<=b;y++)if(s.binIndex[y])for(const w of s.binIndex[y])u.push(new $0(w.minv,w.maxv,y));const f=s.linearIndex.length;let h=null;const d=Math.min(n>>14,f-1),p=Math.min(r>>14,f-1);for(let g=d;g<=p;++g){const b=s.linearIndex[g];b&&(!h||b.compareTo(h)<0)&&(h=b)}return Tk(u,h)}}const oJ=21582659,sJ=38359875;function cJ(e,t){return e*2**t}function Dk(e,t){return Math.floor(e/2**t)}class g2 extends Ik{constructor(t){super(t),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:o}=r.indices[i];return o?o.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",a={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!a)throw new Error(`invalid Tabix preset format flags ${r}`);const o={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),c=s?String.fromCharCode(s):null,l=t.readInt32LE(n+20),u=t.readInt32LE(n+24),{refIdToName:f,refNameToId:h}=this._parseNameBytes(t.slice(n+28,n+28+u));return{refIdToName:f,refNameToId:h,skipLines:l,metaChar:c,columnNumbers:o,format:a,coordinateType:i}}_parseNameBytes(t){let n=0,r=0;const i=[],a={};for(let o=0;o<t.length;o+=1)if(!t[o]){if(r<o){let s=t.toString("utf8",r,o);s=this.renameRefSeq(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}async _parse(t={}){const n=await ea(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===oJ)r=1;else if(n.readUInt32LE(0)===sJ)r=2;else throw new Error("Not a CSI file");this.minShift=n.readInt32LE(4),this.depth=n.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const i=2**(this.minShift+this.depth*3),a=n.readInt32LE(12),o=a&&a>=30?this.parseAuxData(n,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},s=n.readInt32LE(16+a);let c,l=16+a+4;const u=new Array(s).fill(0).map(()=>{const f=n.readInt32LE(l);l+=4;const h={};let d;for(let p=0;p<f;p+=1){const g=n.readUInt32LE(l);if(g>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=4+8+4+16+16;else{const b=ic(n,l+4);c=this._findFirstData(c,b);const y=n.readInt32LE(l+12);l+=16;const w=new Array(y);for(let A=0;A<y;A+=1){const x=ic(n,l),C=ic(n,l+8);l+=16,w[A]=new $0(x,C,g)}h[g]=w}}return{binIndex:h,stats:d}});return{...o,csi:!0,refCount:s,maxBlockSize:65536,firstDataLine:c,csiVersion:r,indices:u,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:kk(p0.fromBytesLE(t.slice(n+28,n+36),!0))}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.refNameToId[t],s=a.indices[o];if(!s)return[];const c=this.reg2bins(n,r),l=[];for(const[u,f]of c)for(let h=u;h<=f;h++)if(s.binIndex[h])for(const d of s.binIndex[h])l.push(new $0(d.minv,d.maxv,h));return Tk(l,new p2(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,a=this.minShift+this.depth*3;const o=[];for(;r<=this.depth;a-=3,i+=cJ(1,r*3),r+=1){const s=i+Dk(t,a),c=i+Dk(n,a);if(c-s+o.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);o.push([s,c])}return o}}const m2=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function lJ(e){return new Promise(t=>setTimeout(t,e))}class uJ{constructor({path:t,filehandle:n,tbiPath:r,tbiFilehandle:i,csiPath:a,csiFilehandle:o,yieldTime:s=500,chunkSizeLimit:c=5e7,renameRefSeqs:l=f=>f,chunkCacheSize:u=5*2**20}){if(n)this.filehandle=n;else if(t)this.filehandle=new kt(t);else throw new TypeError("must provide either filehandle or path");if(i)this.index=new H0({filehandle:i,renameRefSeqs:l});else if(o)this.index=new g2({filehandle:o,renameRefSeqs:l});else if(r)this.index=new H0({filehandle:new kt(r),renameRefSeqs:l});else if(a)this.index=new g2({filehandle:new kt(a),renameRefSeqs:l});else if(t)this.index=new H0({filehandle:new kt(`${t}.tbi`),renameRefSeqs:l});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, or csiPath");this.chunkSizeLimit=c,this.renameRefSeq=l,this.yieldTime=s,this.chunkCache=new A0({cache:new E0({maxSize:Math.floor(u/65536)}),fill:(f,h)=>this.readChunk(f,{signal:h})})}async getLines(t,n,r,i){var a;let o,s={},c;if(i===void 0)throw new TypeError("line callback must be provided");if(typeof i=="function"?c=i:(s=i,c=i.lineCallback,o=i.signal),t===void 0)throw new TypeError("must provide a reference sequence name");if(!c)throw new TypeError("line callback must be provided");const l=await this.index.getMetadata(s);rc(o);const u=n??0,f=r??l.maxRefLength;if(!(u<=f))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(u===f)return;const h=await this.index.blocksForRange(t,u,f,s);rc(o);for(const p of h){const g=p.fetchedSize();if(g>this.chunkSizeLimit)throw new Error(`Too much data. Chunk size ${g.toLocaleString()} bytes exceeds chunkSizeLimit of ${this.chunkSizeLimit.toLocaleString()}.`)}let d=Date.now();for(const p of h){let g;const{buffer:b,cpositions:y,dpositions:w}=await this.chunkCache.get(p.toString(),p,o);rc(o);let A=0,x=0;for(;A<b.length;){const C=b.indexOf(`
3437
- `,A);if(C===-1)break;const _=b.slice(A,C),I=(a=m2==null?void 0:m2.decode(_))!==null&&a!==void 0?a:_.toString();if(w){for(;A+p.minv.dataPosition>=w[x++];);x--}const{startCoordinate:D,overlaps:M}=this.checkLine(l,t,u,f,I);if(g!==void 0&&D!==void 0&&g>D)throw new Error(`Lines not sorted by start coordinate (${g} > ${D}), this file is not usable with Tabix.`);if(g=D,M)c(I.trim(),y[x]*256+(A-w[x])+p.minv.dataPosition+1);else if(D!==void 0&&D>=f)return;this.yieldTime&&d-Date.now()>this.yieldTime&&(d=Date.now(),rc(o),await lJ(1)),A=C+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:n,metaChar:r,maxBlockSize:i}=await this.getMetadata(t);rc(t.signal);const a=((n==null?void 0:n.blockPosition)||0)+i,o=await this._readRegion(0,a,t),s=await ea(o);if(r){let c=-1;const l=`
3438
- `.charCodeAt(0),u=r.charCodeAt(0);for(let f=0;f<s.length&&!(f===c+1&&s[f]!==u);f+=1)s[f]===l&&(c=f);return s.slice(0,c+1)}return s}async getHeader(t={}){return(await this.getHeaderBuffer(t)).toString("utf8")}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,n,r,i,a){const{columnNumbers:o,metaChar:s,coordinateType:c,format:l}=t;if(s&&a.startsWith(s))return{overlaps:!1};let{ref:u,start:f,end:h}=o;u||(u=0),f||(f=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(u,f,h);let p=1,g=0,b="",y=-1/0;for(let w=0;w<a.length+1;w+=1)if(a[w]===" "||w===a.length){if(p===u){if(this.renameRefSeq(a.slice(g,w))!==n)return{overlaps:!1}}else if(p===f){if(y=parseInt(a.slice(g,w),10),c==="1-based-closed"&&(y-=1),y>=i)return{startCoordinate:y,overlaps:!1};if((h===0||h===f)&&y+1<=r)return{startCoordinate:y,overlaps:!1}}else if(l==="VCF"&&p===4)b=a.slice(g,w);else if(p===h&&(l==="VCF"?this._getVcfEnd(y,b,a.slice(g,w)):parseInt(a.slice(g,w),10))<=r)return{overlaps:!1};if(g=w+1,p+=1,p>d)break}return{startCoordinate:y,overlaps:!0}}_getVcfEnd(t,n,r){let i=t+n.length;const a=r.includes("SVTYPE=TRA");if(r[0]!=="."&&!a){let o=";";for(let s=0;s<r.length;s+=1){if(o===";"&&r.slice(s,s+4)==="END="){let c=r.indexOf(";",s);c===-1&&(c=r.length),i=parseInt(r.slice(s+4,c),10);break}o=r[s]}}else if(a)return t+1;return i}async lineCount(t,n={}){return this.index.lineCount(t,n)}async _readRegion(t,n,r={}){const i=we.Buffer.alloc(n),{bytesRead:a,buffer:o}=await this.filehandle.read(i,0,n,t,r);return o.slice(0,a)}async readChunk(t,n={}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n);return jC(r,t)}}const fJ=Object.freeze(Object.defineProperty({__proto__:null,CSI:g2,TBI:H0,TabixIndexedFile:uJ},Symbol.toStringTag,{value:"Module"}));var b2={exports:{}},ac=typeof Reflect=="object"?Reflect:null,Bk=ac&&typeof ac.apply=="function"?ac.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},G0;ac&&typeof ac.ownKeys=="function"?G0=ac.ownKeys:Object.getOwnPropertySymbols?G0=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:G0=function(t){return Object.getOwnPropertyNames(t)};function hJ(e){console&&console.warn&&console.warn(e)}var Fk=Number.isNaN||function(t){return t!==t};function Le(){Le.init.call(this)}b2.exports=Le,b2.exports.once=mJ,Le.EventEmitter=Le,Le.prototype._events=void 0,Le.prototype._eventsCount=0,Le.prototype._maxListeners=void 0;var Pk=10;function V0(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Le,"defaultMaxListeners",{enumerable:!0,get:function(){return Pk},set:function(e){if(typeof e!="number"||e<0||Fk(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Pk=e}}),Le.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Le.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Fk(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Mk(e){return e._maxListeners===void 0?Le.defaultMaxListeners:e._maxListeners}Le.prototype.getMaxListeners=function(){return Mk(this)},Le.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=t==="error",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var o;if(n.length>0&&(o=n[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[t];if(c===void 0)return!1;if(typeof c=="function")Bk(c,this,n);else for(var l=c.length,u=Uk(c,l),r=0;r<l;++r)Bk(u[r],this,n);return!0};function Ok(e,t,n,r){var i,a,o;if(V0(n),a=e._events,a===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)o=a[t]=n,++e._eventsCount;else if(typeof o=="function"?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),i=Mk(e),i>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,hJ(s)}return e}Le.prototype.addListener=function(t,n){return Ok(this,t,n,!1)},Le.prototype.on=Le.prototype.addListener,Le.prototype.prependListener=function(t,n){return Ok(this,t,n,!0)};function dJ(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Lk(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=dJ.bind(r);return i.listener=n,r.wrapFn=i,i}Le.prototype.once=function(t,n){return V0(n),this.on(t,Lk(this,t,n)),this},Le.prototype.prependOnceListener=function(t,n){return V0(n),this.prependListener(t,Lk(this,t,n)),this},Le.prototype.removeListener=function(t,n){var r,i,a,o,s;if(V0(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(a=-1,o=r.length-1;o>=0;o--)if(r[o]===n||r[o].listener===n){s=r[o].listener,a=o;break}if(a<0)return this;a===0?r.shift():pJ(r,a),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this},Le.prototype.off=Le.prototype.removeListener,Le.prototype.removeAllListeners=function(t){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var a=Object.keys(r),o;for(i=0;i<a.length;++i)o=a[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(t,n[i]);return this};function Nk(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?gJ(i):Uk(i,i.length)}Le.prototype.listeners=function(t){return Nk(this,t,!0)},Le.prototype.rawListeners=function(t){return Nk(this,t,!1)},Le.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):zk.call(e,t)},Le.prototype.listenerCount=zk;function zk(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}Le.prototype.eventNames=function(){return this._eventsCount>0?G0(this._events):[]};function Uk(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function pJ(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function gJ(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function mJ(e,t){return new Promise(function(n,r){function i(o){e.removeListener(t,a),r(o)}function a(){typeof e.removeListener=="function"&&e.removeListener("error",i),n([].slice.call(arguments))}$k(e,t,a,{once:!0}),t!=="error"&&bJ(e,i,{once:!0})})}function bJ(e,t,n){typeof e.on=="function"&&$k(e,"error",t,n)}function $k(e,t,n,r){if(typeof e.on=="function")r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var y2=b2.exports,v2={exports:{}};typeof Object.create=="function"?v2.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:v2.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}};var oc=v2.exports,w2,Hk;function Gk(){return Hk||(Hk=1,w2=y2.EventEmitter),w2}const Vk=cq(zq);var x2,jk;function yJ(){if(jk)return x2;jk=1;function e(p,g){var b=Object.keys(p);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(p);g&&(y=y.filter(function(w){return Object.getOwnPropertyDescriptor(p,w).enumerable})),b.push.apply(b,y)}return b}function t(p){for(var g=1;g<arguments.length;g++){var b=arguments[g]!=null?arguments[g]:{};g%2?e(Object(b),!0).forEach(function(y){n(p,y,b[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(b)):e(Object(b)).forEach(function(y){Object.defineProperty(p,y,Object.getOwnPropertyDescriptor(b,y))})}return p}function n(p,g,b){return g=o(g),g in p?Object.defineProperty(p,g,{value:b,enumerable:!0,configurable:!0,writable:!0}):p[g]=b,p}function r(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function i(p,g){for(var b=0;b<g.length;b++){var y=g[b];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,o(y.key),y)}}function a(p,g,b){return g&&i(p.prototype,g),b&&i(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p}function o(p){var g=s(p,"string");return typeof g=="symbol"?g:String(g)}function s(p,g){if(typeof p!="object"||p===null)return p;var b=p[Symbol.toPrimitive];if(b!==void 0){var y=b.call(p,g||"default");if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(p)}var c=we,l=c.Buffer,u=Vk,f=u.inspect,h=f&&f.custom||"inspect";function d(p,g,b){l.prototype.copy.call(p,g,b)}return x2=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return a(p,[{key:"push",value:function(b){var y={data:b,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(b){var y={data:b,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var y=this.head,w=""+y.data;y=y.next;)w+=b+y.data;return w}},{key:"concat",value:function(b){if(this.length===0)return l.alloc(0);for(var y=l.allocUnsafe(b>>>0),w=this.head,A=0;w;)d(w.data,y,A),A+=w.data.length,w=w.next;return y}},{key:"consume",value:function(b,y){var w;return b<this.head.data.length?(w=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?w=this.shift():w=y?this._getString(b):this._getBuffer(b),w}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var y=this.head,w=1,A=y.data;for(b-=A.length;y=y.next;){var x=y.data,C=b>x.length?x.length:b;if(C===x.length?A+=x:A+=x.slice(0,b),b-=C,b===0){C===x.length?(++w,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=x.slice(C));break}++w}return this.length-=w,A}},{key:"_getBuffer",value:function(b){var y=l.allocUnsafe(b),w=this.head,A=1;for(w.data.copy(y),b-=w.data.length;w=w.next;){var x=w.data,C=b>x.length?x.length:b;if(x.copy(y,y.length-b,0,C),b-=C,b===0){C===x.length?(++A,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=x.slice(C));break}++A}return this.length-=A,y}},{key:h,value:function(b,y){return f(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),p}(),x2}var A2,qk;function Wk(){if(qk)return A2;qk=1;function e(o,s){var c=this,l=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return l||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,o)):process.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(f){!s&&f?c._writableState?c._writableState.errorEmitted?process.nextTick(n,c):(c._writableState.errorEmitted=!0,process.nextTick(t,c,f)):process.nextTick(t,c,f):s?(process.nextTick(n,c),s(f)):process.nextTick(n,c)}),this)}function t(o,s){i(o,s),n(o)}function n(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(o,s){o.emit("error",s)}function a(o,s){var c=o._readableState,l=o._writableState;c&&c.autoDestroy||l&&l.autoDestroy?o.destroy(s):o.emit("error",s)}return A2={destroy:e,undestroy:r,errorOrDestroy:a},A2}var E2={},Yk;function sc(){if(Yk)return E2;Yk=1;function e(s,c){s.prototype=Object.create(c.prototype),s.prototype.constructor=s,s.__proto__=c}var t={};function n(s,c,l){l||(l=Error);function u(h,d,p){return typeof c=="string"?c:c(h,d,p)}var f=function(h){e(d,h);function d(p,g,b){return h.call(this,u(p,g,b))||this}return d}(l);f.prototype.name=l.name,f.prototype.code=s,t[s]=f}function r(s,c){if(Array.isArray(s)){var l=s.length;return s=s.map(function(u){return String(u)}),l>2?"one of ".concat(c," ").concat(s.slice(0,l-1).join(", "),", or ")+s[l-1]:l===2?"one of ".concat(c," ").concat(s[0]," or ").concat(s[1]):"of ".concat(c," ").concat(s[0])}else return"of ".concat(c," ").concat(String(s))}function i(s,c,l){return s.substr(!l||l<0?0:+l,c.length)===c}function a(s,c,l){return(l===void 0||l>s.length)&&(l=s.length),s.substring(l-c.length,l)===c}function o(s,c,l){return typeof l!="number"&&(l=0),l+c.length>s.length?!1:s.indexOf(c,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,c){return'The value "'+c+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,c,l){var u;typeof c=="string"&&i(c,"not ")?(u="must not be",c=c.replace(/^not /,"")):u="must be";var f;if(a(s," argument"))f="The ".concat(s," ").concat(u," ").concat(r(c,"type"));else{var h=o(s,".")?"property":"argument";f='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(c,"type"))}return f+=". Received type ".concat(typeof l),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),E2.codes=t,E2}var S2,Zk;function Qk(){if(Zk)return S2;Zk=1;var e=sc().codes.ERR_INVALID_OPT_VALUE;function t(r,i,a){return r.highWaterMark!=null?r.highWaterMark:i?r[a]:null}function n(r,i,a,o){var s=t(i,o,a);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var c=o?a:"highWaterMark";throw new e(c,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return S2={getHighWaterMark:n},S2}var _2,Xk;function vJ(){if(Xk)return _2;Xk=1,_2=e;function e(n,r){if(t("noDeprecation"))return n;var i=!1;function a(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return n.apply(this,arguments)}return a}function t(n){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return _2}var C2,Kk;function Jk(){if(Kk)return C2;Kk=1,C2=D;function e(N){var L=this;this.next=null,this.entry=null,this.finish=function(){Ve(L,N)}}var t;D.WritableState=_;var n={deprecate:vJ()},r=Gk(),i=we.Buffer,a=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(N){return i.from(N)}function s(N){return i.isBuffer(N)||N instanceof a}var c=Wk(),l=Qk(),u=l.getHighWaterMark,f=sc().codes,h=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,A=f.ERR_UNKNOWN_ENCODING,x=c.errorOrDestroy;oc(D,r);function C(){}function _(N,L,W){t=t||cc(),N=N||{},typeof W!="boolean"&&(W=L instanceof t),this.objectMode=!!N.objectMode,W&&(this.objectMode=this.objectMode||!!N.writableObjectMode),this.highWaterMark=u(this,N,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=N.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=N.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){st(L,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=N.emitClose!==!1,this.autoDestroy=!!N.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}_.prototype.getBuffer=function(){for(var L=this.bufferedRequest,W=[];L;)W.push(L),L=L.next;return W},function(){try{Object.defineProperty(_.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(L){return I.call(this,L)?!0:this!==D?!1:L&&L._writableState instanceof _}})):I=function(L){return L instanceof this};function D(N){t=t||cc();var L=this instanceof t;if(!L&&!I.call(D,this))return new D(N);this._writableState=new _(N,this,L),this.writable=!0,N&&(typeof N.write=="function"&&(this._write=N.write),typeof N.writev=="function"&&(this._writev=N.writev),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.final=="function"&&(this._final=N.final)),r.call(this)}D.prototype.pipe=function(){x(this,new g)};function M(N,L){var W=new w;x(N,W),process.nextTick(L,W)}function G(N,L,W,j){var Q;return W===null?Q=new y:typeof W!="string"&&!L.objectMode&&(Q=new h("chunk",["string","Buffer"],W)),Q?(x(N,Q),process.nextTick(j,Q),!1):!0}D.prototype.write=function(N,L,W){var j=this._writableState,Q=!1,T=!j.objectMode&&s(N);return T&&!i.isBuffer(N)&&(N=o(N)),typeof L=="function"&&(W=L,L=null),T?L="buffer":L||(L=j.defaultEncoding),typeof W!="function"&&(W=C),j.ending?M(this,W):(T||G(this,j,N,W))&&(j.pendingcb++,Q=ae(this,j,T,N,L,W)),Q},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var N=this._writableState;N.corked&&(N.corked--,!N.writing&&!N.corked&&!N.bufferProcessing&&N.bufferedRequest&&tt(this,N))},D.prototype.setDefaultEncoding=function(L){if(typeof L=="string"&&(L=L.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((L+"").toLowerCase())>-1))throw new A(L);return this._writableState.defaultEncoding=L,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(N,L,W){return!N.objectMode&&N.decodeStrings!==!1&&typeof L=="string"&&(L=i.from(L,W)),L}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ae(N,L,W,j,Q,T){if(!W){var S=O(L,j,Q);j!==S&&(W=!0,Q="buffer",j=S)}var V=L.objectMode?1:j.length;L.length+=V;var Y=L.length<L.highWaterMark;if(Y||(L.needDrain=!0),L.writing||L.corked){var de=L.lastBufferedRequest;L.lastBufferedRequest={chunk:j,encoding:Q,isBuf:W,callback:T,next:null},de?de.next=L.lastBufferedRequest:L.bufferedRequest=L.lastBufferedRequest,L.bufferedRequestCount+=1}else se(N,L,!1,V,j,Q,T);return Y}function se(N,L,W,j,Q,T,S){L.writelen=j,L.writecb=S,L.writing=!0,L.sync=!0,L.destroyed?L.onwrite(new b("write")):W?N._writev(Q,L.onwrite):N._write(Q,T,L.onwrite),L.sync=!1}function ve(N,L,W,j,Q){--L.pendingcb,W?(process.nextTick(Q,j),process.nextTick(Rt,N,L),N._writableState.errorEmitted=!0,x(N,j)):(Q(j),N._writableState.errorEmitted=!0,x(N,j),Rt(N,L))}function Pe(N){N.writing=!1,N.writecb=null,N.length-=N.writelen,N.writelen=0}function st(N,L){var W=N._writableState,j=W.sync,Q=W.writecb;if(typeof Q!="function")throw new p;if(Pe(W),L)ve(N,W,j,L,Q);else{var T=ut(W)||N.destroyed;!T&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&tt(N,W),j?process.nextTick(Ne,N,W,T,Q):Ne(N,W,T,Q)}}function Ne(N,L,W,j){W||lt(N,L),L.pendingcb--,j(),Rt(N,L)}function lt(N,L){L.length===0&&L.needDrain&&(L.needDrain=!1,N.emit("drain"))}function tt(N,L){L.bufferProcessing=!0;var W=L.bufferedRequest;if(N._writev&&W&&W.next){var j=L.bufferedRequestCount,Q=new Array(j),T=L.corkedRequestsFree;T.entry=W;for(var S=0,V=!0;W;)Q[S]=W,W.isBuf||(V=!1),W=W.next,S+=1;Q.allBuffers=V,se(N,L,!0,L.length,Q,"",T.finish),L.pendingcb++,L.lastBufferedRequest=null,T.next?(L.corkedRequestsFree=T.next,T.next=null):L.corkedRequestsFree=new e(L),L.bufferedRequestCount=0}else{for(;W;){var Y=W.chunk,de=W.encoding,ie=W.callback,pe=L.objectMode?1:Y.length;if(se(N,L,!1,pe,Y,de,ie),W=W.next,L.bufferedRequestCount--,L.writing)break}W===null&&(L.lastBufferedRequest=null)}L.bufferedRequest=W,L.bufferProcessing=!1}D.prototype._write=function(N,L,W){W(new d("_write()"))},D.prototype._writev=null,D.prototype.end=function(N,L,W){var j=this._writableState;return typeof N=="function"?(W=N,N=null,L=null):typeof L=="function"&&(W=L,L=null),N!=null&&this.write(N,L),j.corked&&(j.corked=1,this.uncork()),j.ending||ln(this,j,W),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ut(N){return N.ending&&N.length===0&&N.bufferedRequest===null&&!N.finished&&!N.writing}function Te(N,L){N._final(function(W){L.pendingcb--,W&&x(N,W),L.prefinished=!0,N.emit("prefinish"),Rt(N,L)})}function Ie(N,L){!L.prefinished&&!L.finalCalled&&(typeof N._final=="function"&&!L.destroyed?(L.pendingcb++,L.finalCalled=!0,process.nextTick(Te,N,L)):(L.prefinished=!0,N.emit("prefinish")))}function Rt(N,L){var W=ut(L);if(W&&(Ie(N,L),L.pendingcb===0&&(L.finished=!0,N.emit("finish"),L.autoDestroy))){var j=N._readableState;(!j||j.autoDestroy&&j.endEmitted)&&N.destroy()}return W}function ln(N,L,W){L.ending=!0,Rt(N,L),W&&(L.finished?process.nextTick(W):N.once("finish",W)),L.ended=!0,N.writable=!1}function Ve(N,L,W){var j=N.entry;for(N.entry=null;j;){var Q=j.callback;L.pendingcb--,Q(W),j=j.next}L.corkedRequestsFree.next=N}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(L){this._writableState&&(this._writableState.destroyed=L)}}),D.prototype.destroy=c.destroy,D.prototype._undestroy=c.undestroy,D.prototype._destroy=function(N,L){L(N)},C2}var k2,eT;function cc(){if(eT)return k2;eT=1;var e=Object.keys||function(l){var u=[];for(var f in l)u.push(f);return u};k2=o;var t=oT(),n=Jk();oc(o,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var a=r[i];o.prototype[a]||(o.prototype[a]=n.prototype[a])}function o(l){if(!(this instanceof o))return new o(l);t.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(c,this)}function c(l){l.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),k2}var T2={},I2={exports:{}};(function(e,t){var n=we,r=n.Buffer;function i(o,s){for(var c in o)s[c]=o[c]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a);function a(o,s,c){return r(o,s,c)}i(r,a),a.from=function(o,s,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,c)},a.alloc=function(o,s,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=r(o);return s!==void 0?typeof c=="string"?l.fill(s,c):l.fill(s):l.fill(0),l},a.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},a.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)}})(I2,I2.exports);var wJ=I2.exports,R2=wJ.Buffer,tT=R2.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function xJ(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function AJ(e){var t=xJ(e);if(typeof t!="string"&&(R2.isEncoding===tT||!tT(e)))throw new Error("Unknown encoding: "+e);return t||e}var EJ=T2.StringDecoder=Ku;function Ku(e){this.encoding=AJ(e);var t;switch(this.encoding){case"utf16le":this.text=IJ,this.end=RJ,t=4;break;case"utf8":this.fillLast=CJ,t=4;break;case"base64":this.text=DJ,this.end=BJ,t=3;break;default:this.write=FJ,this.end=PJ;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=R2.allocUnsafe(t)}Ku.prototype.write=function(e){if(e.length===0)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},Ku.prototype.end=TJ,Ku.prototype.text=kJ,Ku.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function D2(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function SJ(e,t,n){var r=t.length-1;if(r<n)return 0;var i=D2(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=D2(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=D2(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function _J(e,t,n){if((t[0]&192)!==128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"�"}}function CJ(e){var t=this.lastTotal-this.lastNeed,n=_J(this,e);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function kJ(e,t){var n=SJ(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function TJ(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function IJ(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function RJ(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function DJ(e,t){var n=(e.length-t)%3;return n===0?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function BJ(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function FJ(e){return e.toString(this.encoding)}function PJ(e){return e&&e.length?this.write(e):""}var B2,nT;function F2(){if(nT)return B2;nT=1;var e=sc().codes.ERR_STREAM_PREMATURE_CLOSE;function t(a){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];a.apply(this,c)}}}function n(){}function r(a){return a.setHeader&&typeof a.abort=="function"}function i(a,o,s){if(typeof o=="function")return i(a,null,o);o||(o={}),s=t(s||n);var c=o.readable||o.readable!==!1&&a.readable,l=o.writable||o.writable!==!1&&a.writable,u=function(){a.writable||h()},f=a._writableState&&a._writableState.finished,h=function(){l=!1,f=!0,c||s.call(a)},d=a._readableState&&a._readableState.endEmitted,p=function(){c=!1,d=!0,l||s.call(a)},g=function(A){s.call(a,A)},b=function(){var A;if(c&&!d)return(!a._readableState||!a._readableState.ended)&&(A=new e),s.call(a,A);if(l&&!f)return(!a._writableState||!a._writableState.ended)&&(A=new e),s.call(a,A)},y=function(){a.req.on("finish",h)};return r(a)?(a.on("complete",h),a.on("abort",b),a.req?y():a.on("request",y)):l&&!a._writableState&&(a.on("end",u),a.on("close",u)),a.on("end",p),a.on("finish",h),o.error!==!1&&a.on("error",g),a.on("close",b),function(){a.removeListener("complete",h),a.removeListener("abort",b),a.removeListener("request",y),a.req&&a.req.removeListener("finish",h),a.removeListener("end",u),a.removeListener("close",u),a.removeListener("finish",h),a.removeListener("end",p),a.removeListener("error",g),a.removeListener("close",b)}}return B2=i,B2}var P2,rT;function MJ(){if(rT)return P2;rT=1;var e;function t(A,x,C){return x=n(x),x in A?Object.defineProperty(A,x,{value:C,enumerable:!0,configurable:!0,writable:!0}):A[x]=C,A}function n(A){var x=r(A,"string");return typeof x=="symbol"?x:String(x)}function r(A,x){if(typeof A!="object"||A===null)return A;var C=A[Symbol.toPrimitive];if(C!==void 0){var _=C.call(A,x||"default");if(typeof _!="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(A)}var i=F2(),a=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function h(A,x){return{value:A,done:x}}function d(A){var x=A[a];if(x!==null){var C=A[f].read();C!==null&&(A[l]=null,A[a]=null,A[o]=null,x(h(C,!1)))}}function p(A){process.nextTick(d,A)}function g(A,x){return function(C,_){A.then(function(){if(x[c]){C(h(void 0,!0));return}x[u](C,_)},_)}}var b=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var x=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[c])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(M,G){process.nextTick(function(){x[s]?G(x[s]):M(h(void 0,!0))})});var _=this[l],I;if(_)I=new Promise(g(_,this));else{var D=this[f].read();if(D!==null)return Promise.resolve(h(D,!1));I=new Promise(this[u])}return this[l]=I,I}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var x=this;return new Promise(function(C,_){x[f].destroy(null,function(I){if(I){_(I);return}C(h(void 0,!0))})})}),e),b),w=function(x){var C,_=Object.create(y,(C={},t(C,f,{value:x,writable:!0}),t(C,a,{value:null,writable:!0}),t(C,o,{value:null,writable:!0}),t(C,s,{value:null,writable:!0}),t(C,c,{value:x._readableState.endEmitted,writable:!0}),t(C,u,{value:function(D,M){var G=_[f].read();G?(_[l]=null,_[a]=null,_[o]=null,D(h(G,!1))):(_[a]=D,_[o]=M)},writable:!0}),C));return _[l]=null,i(x,function(I){if(I&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=_[o];D!==null&&(_[l]=null,_[a]=null,_[o]=null,D(I)),_[s]=I;return}var M=_[a];M!==null&&(_[l]=null,_[a]=null,_[o]=null,M(h(void 0,!0))),_[c]=!0}),x.on("readable",p.bind(null,_)),_};return P2=w,P2}var M2,iT;function OJ(){return iT||(iT=1,M2=function(){throw new Error("Readable.from is not available in the browser")}),M2}var O2,aT;function oT(){if(aT)return O2;aT=1,O2=M;var e;M.ReadableState=D,y2.EventEmitter;var t=function(S,V){return S.listeners(V).length},n=Gk(),r=we.Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(T){return r.from(T)}function o(T){return r.isBuffer(T)||T instanceof i}var s=Vk,c;s&&s.debuglog?c=s.debuglog("stream"):c=function(){};var l=yJ(),u=Wk(),f=Qk(),h=f.getHighWaterMark,d=sc().codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_STREAM_PUSH_AFTER_EOF,b=d.ERR_METHOD_NOT_IMPLEMENTED,y=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w,A,x;oc(M,n);var C=u.errorOrDestroy,_=["error","close","destroy","pause","resume"];function I(T,S,V){if(typeof T.prependListener=="function")return T.prependListener(S,V);!T._events||!T._events[S]?T.on(S,V):Array.isArray(T._events[S])?T._events[S].unshift(V):T._events[S]=[V,T._events[S]]}function D(T,S,V){e=e||cc(),T=T||{},typeof V!="boolean"&&(V=S instanceof e),this.objectMode=!!T.objectMode,V&&(this.objectMode=this.objectMode||!!T.readableObjectMode),this.highWaterMark=h(this,T,"readableHighWaterMark",V),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=T.emitClose!==!1,this.autoDestroy=!!T.autoDestroy,this.destroyed=!1,this.defaultEncoding=T.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,T.encoding&&(w||(w=T2.StringDecoder),this.decoder=new w(T.encoding),this.encoding=T.encoding)}function M(T){if(e=e||cc(),!(this instanceof M))return new M(T);var S=this instanceof e;this._readableState=new D(T,this,S),this.readable=!0,T&&(typeof T.read=="function"&&(this._read=T.read),typeof T.destroy=="function"&&(this._destroy=T.destroy)),n.call(this)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(S){this._readableState&&(this._readableState.destroyed=S)}}),M.prototype.destroy=u.destroy,M.prototype._undestroy=u.undestroy,M.prototype._destroy=function(T,S){S(T)},M.prototype.push=function(T,S){var V=this._readableState,Y;return V.objectMode?Y=!0:typeof T=="string"&&(S=S||V.defaultEncoding,S!==V.encoding&&(T=r.from(T,S),S=""),Y=!0),G(this,T,S,!1,Y)},M.prototype.unshift=function(T){return G(this,T,null,!0,!1)};function G(T,S,V,Y,de){c("readableAddChunk",S);var ie=T._readableState;if(S===null)ie.reading=!1,st(T,ie);else{var pe;if(de||(pe=ae(ie,S)),pe)C(T,pe);else if(ie.objectMode||S&&S.length>0)if(typeof S!="string"&&!ie.objectMode&&Object.getPrototypeOf(S)!==r.prototype&&(S=a(S)),Y)ie.endEmitted?C(T,new y):O(T,ie,S,!0);else if(ie.ended)C(T,new g);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!V?(S=ie.decoder.write(S),ie.objectMode||S.length!==0?O(T,ie,S,!1):tt(T,ie)):O(T,ie,S,!1)}else Y||(ie.reading=!1,tt(T,ie))}return!ie.ended&&(ie.length<ie.highWaterMark||ie.length===0)}function O(T,S,V,Y){S.flowing&&S.length===0&&!S.sync?(S.awaitDrain=0,T.emit("data",V)):(S.length+=S.objectMode?1:V.length,Y?S.buffer.unshift(V):S.buffer.push(V),S.needReadable&&Ne(T)),tt(T,S)}function ae(T,S){var V;return!o(S)&&typeof S!="string"&&S!==void 0&&!T.objectMode&&(V=new p("chunk",["string","Buffer","Uint8Array"],S)),V}M.prototype.isPaused=function(){return this._readableState.flowing===!1},M.prototype.setEncoding=function(T){w||(w=T2.StringDecoder);var S=new w(T);this._readableState.decoder=S,this._readableState.encoding=this._readableState.decoder.encoding;for(var V=this._readableState.buffer.head,Y="";V!==null;)Y+=S.write(V.data),V=V.next;return this._readableState.buffer.clear(),Y!==""&&this._readableState.buffer.push(Y),this._readableState.length=Y.length,this};var se=1073741824;function ve(T){return T>=se?T=se:(T--,T|=T>>>1,T|=T>>>2,T|=T>>>4,T|=T>>>8,T|=T>>>16,T++),T}function Pe(T,S){return T<=0||S.length===0&&S.ended?0:S.objectMode?1:T!==T?S.flowing&&S.length?S.buffer.head.data.length:S.length:(T>S.highWaterMark&&(S.highWaterMark=ve(T)),T<=S.length?T:S.ended?S.length:(S.needReadable=!0,0))}M.prototype.read=function(T){c("read",T),T=parseInt(T,10);var S=this._readableState,V=T;if(T!==0&&(S.emittedReadable=!1),T===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return c("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?W(this):Ne(this),null;if(T=Pe(T,S),T===0&&S.ended)return S.length===0&&W(this),null;var Y=S.needReadable;c("need readable",Y),(S.length===0||S.length-T<S.highWaterMark)&&(Y=!0,c("length less than watermark",Y)),S.ended||S.reading?(Y=!1,c("reading or ended",Y)):Y&&(c("do read"),S.reading=!0,S.sync=!0,S.length===0&&(S.needReadable=!0),this._read(S.highWaterMark),S.sync=!1,S.reading||(T=Pe(V,S)));var de;return T>0?de=L(T,S):de=null,de===null?(S.needReadable=S.length<=S.highWaterMark,T=0):(S.length-=T,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),V!==T&&S.ended&&W(this)),de!==null&&this.emit("data",de),de};function st(T,S){if(c("onEofChunk"),!S.ended){if(S.decoder){var V=S.decoder.end();V&&V.length&&(S.buffer.push(V),S.length+=S.objectMode?1:V.length)}S.ended=!0,S.sync?Ne(T):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,lt(T)))}}function Ne(T){var S=T._readableState;c("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(c("emitReadable",S.flowing),S.emittedReadable=!0,process.nextTick(lt,T))}function lt(T){var S=T._readableState;c("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(T.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,N(T)}function tt(T,S){S.readingMore||(S.readingMore=!0,process.nextTick(ut,T,S))}function ut(T,S){for(;!S.reading&&!S.ended&&(S.length<S.highWaterMark||S.flowing&&S.length===0);){var V=S.length;if(c("maybeReadMore read 0"),T.read(0),V===S.length)break}S.readingMore=!1}M.prototype._read=function(T){C(this,new b("_read()"))},M.prototype.pipe=function(T,S){var V=this,Y=this._readableState;switch(Y.pipesCount){case 0:Y.pipes=T;break;case 1:Y.pipes=[Y.pipes,T];break;default:Y.pipes.push(T);break}Y.pipesCount+=1,c("pipe count=%d opts=%j",Y.pipesCount,S);var de=(!S||S.end!==!1)&&T!==process.stdout&&T!==process.stderr,ie=de?un:Br;Y.endEmitted?process.nextTick(ie):V.once("end",ie),T.on("unpipe",pe);function pe(E,m){c("onunpipe"),E===V&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,da())}function un(){c("onend"),T.end()}var fa=Te(V);T.on("drain",fa);var ha=!1;function da(){c("cleanup"),T.removeListener("close",pa),T.removeListener("finish",fn),T.removeListener("drain",fa),T.removeListener("error",fi),T.removeListener("unpipe",pe),V.removeListener("end",un),V.removeListener("end",Br),V.removeListener("data",Gt),ha=!0,Y.awaitDrain&&(!T._writableState||T._writableState.needDrain)&&fa()}V.on("data",Gt);function Gt(E){c("ondata");var m=T.write(E);c("dest.write",m),m===!1&&((Y.pipesCount===1&&Y.pipes===T||Y.pipesCount>1&&Q(Y.pipes,T)!==-1)&&!ha&&(c("false write response, pause",Y.awaitDrain),Y.awaitDrain++),V.pause())}function fi(E){c("onerror",E),Br(),T.removeListener("error",fi),t(T,"error")===0&&C(T,E)}I(T,"error",fi);function pa(){T.removeListener("finish",fn),Br()}T.once("close",pa);function fn(){c("onfinish"),T.removeListener("close",pa),Br()}T.once("finish",fn);function Br(){c("unpipe"),V.unpipe(T)}return T.emit("pipe",V),Y.flowing||(c("pipe resume"),V.resume()),T};function Te(T){return function(){var V=T._readableState;c("pipeOnDrain",V.awaitDrain),V.awaitDrain&&V.awaitDrain--,V.awaitDrain===0&&t(T,"data")&&(V.flowing=!0,N(T))}}M.prototype.unpipe=function(T){var S=this._readableState,V={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return T&&T!==S.pipes?this:(T||(T=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,T&&T.emit("unpipe",this,V),this);if(!T){var Y=S.pipes,de=S.pipesCount;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var ie=0;ie<de;ie++)Y[ie].emit("unpipe",this,{hasUnpiped:!1});return this}var pe=Q(S.pipes,T);return pe===-1?this:(S.pipes.splice(pe,1),S.pipesCount-=1,S.pipesCount===1&&(S.pipes=S.pipes[0]),T.emit("unpipe",this,V),this)},M.prototype.on=function(T,S){var V=n.prototype.on.call(this,T,S),Y=this._readableState;return T==="data"?(Y.readableListening=this.listenerCount("readable")>0,Y.flowing!==!1&&this.resume()):T==="readable"&&!Y.endEmitted&&!Y.readableListening&&(Y.readableListening=Y.needReadable=!0,Y.flowing=!1,Y.emittedReadable=!1,c("on readable",Y.length,Y.reading),Y.length?Ne(this):Y.reading||process.nextTick(Rt,this)),V},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(T,S){var V=n.prototype.removeListener.call(this,T,S);return T==="readable"&&process.nextTick(Ie,this),V},M.prototype.removeAllListeners=function(T){var S=n.prototype.removeAllListeners.apply(this,arguments);return(T==="readable"||T===void 0)&&process.nextTick(Ie,this),S};function Ie(T){var S=T._readableState;S.readableListening=T.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:T.listenerCount("data")>0&&T.resume()}function Rt(T){c("readable nexttick read 0"),T.read(0)}M.prototype.resume=function(){var T=this._readableState;return T.flowing||(c("resume"),T.flowing=!T.readableListening,ln(this,T)),T.paused=!1,this};function ln(T,S){S.resumeScheduled||(S.resumeScheduled=!0,process.nextTick(Ve,T,S))}function Ve(T,S){c("resume",S.reading),S.reading||T.read(0),S.resumeScheduled=!1,T.emit("resume"),N(T),S.flowing&&!S.reading&&T.read(0)}M.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function N(T){var S=T._readableState;for(c("flow",S.flowing);S.flowing&&T.read()!==null;);}M.prototype.wrap=function(T){var S=this,V=this._readableState,Y=!1;T.on("end",function(){if(c("wrapped end"),V.decoder&&!V.ended){var pe=V.decoder.end();pe&&pe.length&&S.push(pe)}S.push(null)}),T.on("data",function(pe){if(c("wrapped data"),V.decoder&&(pe=V.decoder.write(pe)),!(V.objectMode&&pe==null)&&!(!V.objectMode&&(!pe||!pe.length))){var un=S.push(pe);un||(Y=!0,T.pause())}});for(var de in T)this[de]===void 0&&typeof T[de]=="function"&&(this[de]=function(un){return function(){return T[un].apply(T,arguments)}}(de));for(var ie=0;ie<_.length;ie++)T.on(_[ie],this.emit.bind(this,_[ie]));return this._read=function(pe){c("wrapped _read",pe),Y&&(Y=!1,T.resume())},this},typeof Symbol=="function"&&(M.prototype[Symbol.asyncIterator]=function(){return A===void 0&&(A=MJ()),A(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(S){this._readableState&&(this._readableState.flowing=S)}}),M._fromList=L,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function L(T,S){if(S.length===0)return null;var V;return S.objectMode?V=S.buffer.shift():!T||T>=S.length?(S.decoder?V=S.buffer.join(""):S.buffer.length===1?V=S.buffer.first():V=S.buffer.concat(S.length),S.buffer.clear()):V=S.buffer.consume(T,S.decoder),V}function W(T){var S=T._readableState;c("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,process.nextTick(j,S,T))}function j(T,S){if(c("endReadableNT",T.endEmitted,T.length),!T.endEmitted&&T.length===0&&(T.endEmitted=!0,S.readable=!1,S.emit("end"),T.autoDestroy)){var V=S._writableState;(!V||V.autoDestroy&&V.finished)&&S.destroy()}}typeof Symbol=="function"&&(M.from=function(T,S){return x===void 0&&(x=OJ()),x(M,T,S)});function Q(T,S){for(var V=0,Y=T.length;V<Y;V++)if(T[V]===S)return V;return-1}return O2}var L2,sT;function cT(){if(sT)return L2;sT=1,L2=s;var e=sc().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,a=cc();oc(s,a);function o(u,f){var h=this._transformState;h.transforming=!1;var d=h.writecb;if(d===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),d(u);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);a.call(this,u),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",c)}function c(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){l(u,f,h)}):l(this,null,null)}s.prototype.push=function(u,f){return this._transformState.needTransform=!1,a.prototype.push.call(this,u,f)},s.prototype._transform=function(u,f,h){h(new t("_transform()"))},s.prototype._write=function(u,f,h){var d=this._transformState;if(d.writecb=h,d.writechunk=u,d.writeencoding=f,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},s.prototype._read=function(u){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},s.prototype._destroy=function(u,f){a.prototype._destroy.call(this,u,function(h){f(h)})};function l(u,f,h){if(f)return u.emit("error",f);if(h!=null&&u.push(h),u._writableState.length)throw new i;if(u._transformState.transforming)throw new r;return u.push(null)}return L2}var N2,lT;function LJ(){if(lT)return N2;lT=1,N2=t;var e=cT();oc(t,e);function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return t.prototype._transform=function(n,r,i){i(null,n)},N2}var z2,uT;function NJ(){if(uT)return z2;uT=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=sc().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function a(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,d,p,g){g=t(g);var b=!1;h.on("close",function(){b=!0}),e===void 0&&(e=F2()),e(h,{readable:d,writable:p},function(w){if(w)return g(w);b=!0,g()});var y=!1;return function(w){if(!b&&!y){if(y=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();g(w||new i("pipe"))}}}function c(h){h()}function l(h,d){return h.pipe(d)}function u(h){return!h.length||typeof h[h.length-1]!="function"?a:h.pop()}function f(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var g=u(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var b,y=d.map(function(w,A){var x=A<d.length-1,C=A>0;return s(w,x,C,function(_){b||(b=_),_&&y.forEach(c),!x&&(y.forEach(c),g(b))})});return d.reduce(l)}return z2=f,z2}var fT=On,U2=y2.EventEmitter,zJ=oc;zJ(On,U2),On.Readable=oT(),On.Writable=Jk(),On.Duplex=cc(),On.Transform=cT(),On.PassThrough=LJ(),On.finished=F2(),On.pipeline=NJ(),On.Stream=On;function On(){U2.call(this)}On.prototype.pipe=function(e,t){var n=this;function r(u){e.writable&&e.write(u)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",o),n.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function c(u){if(l(),U2.listenerCount(this,"error")===0)throw u}n.on("error",c),e.on("error",c);function l(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",o),n.removeListener("close",s),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e};function Ju(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function hT(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function ef(e){return hT(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function ii(e){return hT(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function dT(e){if(!(e&&e.length)||e===".")return{};const t={};return e.replace(/\r?\n$/,"").split(";").forEach(n=>{const r=n.split("=",2);if(!(r[1]&&r[1].length))return;r[0]=r[0].trim();let i=t[r[0].trim()];i||(i=[],t[r[0]]=i),i.push(...r[1].split(",").map(a=>a.trim()).map(Ju))}),t}function pT(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&Ju(t[0]),source:t[1]&&Ju(t[1]),type:t[2]&&Ju(t[2]),start:t[3]===null?null:parseInt(t[3],10),end:t[4]===null?null:parseInt(t[4],10),score:t[5]===null?null:parseFloat(t[5]),strand:t[6],phase:t[7],attributes:t[8]===null?null:dT(t[8])}}function gT(e){const t=/^\s*##\s*(\S+)\s*(.*)/.exec(e);if(!t)return null;const[,n]=t;let[,,r]=t;const i={directive:n};if(r.length&&(r=r.replace(/\r?\n$/,""),i.value=r),n==="sequence-region"){const a=r.split(/\s+/,3);return{...i,seq_id:a[0],start:a[1]&&a[1].replace(/\D/g,""),end:a[2]&&a[2].replace(/\D/g,"")}}else if(n==="genome-build"){const[a,o]=r.split(/\s+/,2);return{...i,source:a,buildName:o}}return i}function mT(e){const t=[];return Object.entries(e).forEach(([n,r])=>{if(!r)return;let i;r.hasOwnProperty("toString")?i=ef(r.toString()):Array.isArray(r)?i=r.map(ef).join(","):i=ef(r),t.push(`${ef(n)}=${i}`)}),t.length?t.join(";"):"."}function UJ(e,t){const n=e.attributes===null||e.attributes===void 0?".":mT(e.attributes),i=`${[e.seq_id===null?".":ii(e.seq_id),e.source===null?".":ii(e.source),e.type===null?".":ii(e.type),e.start===null?".":ii(e.start),e.end===null?".":ii(e.end),e.score===null?".":ii(e.score),e.strand===null?".":ii(e.strand),e.phase===null?".":ii(e.phase),n].join(" ")}
3439
- `;return t[i]?"":(t[i]=!0,i)}function j0(e,t){if(Array.isArray(e))return e.map(r=>j0(r,t)).join("");const n=[UJ(e,t)];return $J(e)&&n.push(...e.child_features.map(r=>j0(r,t)),...e.derived_features.map(r=>j0(r,t))),n.join("")}function bT(e){return j0(e,{})}function yT(e){let t=`##${e.directive}`;return e.value&&(t+=` ${e.value}`),t+=`
3439
+ )`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,hk.parse(t.trim())]));function u2(e){const t=["uint","int","float","long"];return{...e,fields:e.fields.map(n=>({...n,isArray:n.size&&n.type!=="char",arrayIsNumeric:n.size&&t.includes(n.type),isNumeric:!n.size&&t.includes(n.type)}))}}const FK={".":0,"-":-1,"+":1};function PK(e){var t;return e.length>=12&&!Number.isNaN(parseInt(e[9],10))&&((t=e[10])===null||t===void 0?void 0:t.split(",").filter(n=>!!n).length)===parseInt(e[9],10)}class MK{constructor(t={}){if(t.autoSql)this.autoSql=u2(BK.parse(t.autoSql));else if(t.type){if(!l2[t.type])throw new Error("Type not found");this.autoSql=u2(l2[t.type])}else this.autoSql=u2(l2.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(t,n={}){const{autoSql:r}=this,{uniqueId:i}=n,a=Array.isArray(t)?t:t.split(" ");let o={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&PK(a))for(let s=0;s<r.fields.length;s++){const c=r.fields[s];let l=a[s];const{isNumeric:u,isArray:f,arrayIsNumeric:h,name:d}=c;if(l==null)break;if(l!=="."){if(u){const p=Number(l);l=Number.isNaN(p)?l:p}else f&&(l=l.split(","),l[l.length-1]===""&&l.pop(),h&&(l=l.map(p=>Number(p))));o[d]=l}}else{const s=["chrom","chromStart","chromEnd","name"];o=Object.fromEntries(a.map((c,l)=>[s[l]||"field"+l,c])),o.chromStart=+o.chromStart,o.chromEnd=+o.chromEnd,Number.isNaN(Number.parseFloat(o.field4))||(o.score=+o.field4,delete o.field4),(o.field5==="+"||o.field5==="-")&&(o.strand=o.field5,delete o.field5)}return i&&(o.uniqueId=i),o.strand=FK[o.strand]||0,o.chrom=decodeURIComponent(o.chrom),o}}const OK=Object.freeze(Object.defineProperty({__proto__:null,default:MK},Symbol.toStringTag,{value:"Module"}));let dk=class{constructor(t,n){this.blockPosition=t,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}static min(...t){let n,r=0;for(;!n;r+=1)n=t[r];for(;r<t.length;r+=1)n.compareTo(t[r])>0&&(n=t[r]);return n}};function tc(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new dk(e[t+7]*1099511627776+e[t+6]*4294967296+e[t+5]*16777216+e[t+4]*65536+e[t+3]*256+e[t+2],e[t+1]<<8|e[t])}let pk=class{constructor(t,n,r,i){this.minv=t,this.maxv=n,this.bin=r,this._fetchedSize=i}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(t){return this.minv.compareTo(t.minv)||this.maxv.compareTo(t.maxv)||this.bin-t.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}};function LK(e){return new Promise(t=>setTimeout(t,e))}function NK(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}function zK(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new Error("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}function UK(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function $K(e={}){return"aborted"in e?{signal:e}:e}function gk(e,t){const n=[];let r;if(e.length===0)return e;e.sort((i,a)=>{const o=i.minv.blockPosition-a.minv.blockPosition;return o===0?i.minv.dataPosition-a.minv.dataPosition:o});for(const i of e)(!t||i.maxv.compareTo(t)>0)&&(r===void 0?(n.push(i),r=i):UK(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function mk(e,t){return{lineCount:NK(p0.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function z0(e,t){return e?e.compareTo(t)>0?t:e:t}function HK(e,t=n=>n){let n=0,r=0;const i=[],a={};for(let o=0;o<e.length;o+=1)if(!e[o]){if(r<o){let s=e.toString("utf8",r,o);s=t(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}let bk=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const GK=21578050;function VK(e,t){return e-e%t}function jK(e,t){return e-e%t+t}function qK(e,t){return t-=1,[[0,0],[1+(e>>26),1+(t>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}class nc extends bk{async lineCount(t,n){var r,i;return((i=(r=(await this.parse(n)).indices[t])===null||r===void 0?void 0:r.stats)===null||i===void 0?void 0:i.lineCount)||0}async _parse(t){const n=await this.filehandle.readFile(t);if(n.readUInt32LE(0)!==GK)throw new Error("Not a BAI file");const r=n.readInt32LE(4),a=((1<<(5+1)*3)-1)/7;let o=8,s;const c=new Array(r);for(let l=0;l<r;l++){const u=n.readInt32LE(o);let f;o+=4;const h={};for(let g=0;g<u;g+=1){const b=n.readUInt32LE(o);if(o+=4,b===a+1)o+=4,f=mk(n,o+16),o+=32;else{if(b>a+1)throw new Error("bai index contains too many bins, please use CSI");{const y=n.readInt32LE(o);o+=4;const w=new Array(y);for(let A=0;A<y;A++){const x=tc(n,o);o+=8;const C=tc(n,o);o+=8,s=z0(s,x),w[A]=new pk(x,C,b)}h[b]=w}}}const d=n.readInt32LE(o);o+=4;const p=new Array(d);for(let g=0;g<d;g++){const b=tc(n,o);o+=8,s=z0(s,b),p[g]=b}c[l]={binIndex:h,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:s,maxBlockSize:65536,indices:c,refCount:r}}async indexCov(t,n,r,i={}){const o=n!==void 0,c=(await this.parse(i)).indices[t];if(!c)return[];const{linearIndex:l=[],stats:u}=c;if(l.length===0)return[];const f=r===void 0?(l.length-1)*16384:jK(r,16384),h=n===void 0?0:VK(n,16384),d=o?new Array((f-h)/16384):new Array(l.length-1),p=l[l.length-1].blockPosition;if(f>(l.length-1)*16384)throw new Error("query outside of range of linear index");let g=l[h/16384].blockPosition;for(let b=h/16384,y=0;b<f/16384;b++,y++)d[y]={score:l[b+1].blockPosition-g,start:b*16384,end:b*16384+16384},g=l[b+1].blockPosition;return d.map(b=>({...b,score:b.score*((u==null?void 0:u.lineCount)||0)/p}))}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.indices[t];if(!o)return[];const s=qK(n,r),c=[];for(const[d,p]of s)for(let g=d;g<=p;g++)if(o.binIndex[g]){const b=o.binIndex[g];for(const y of b)c.push(y)}const l=o.linearIndex.length;let u;const f=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=f;d<=h;++d){const p=o.linearIndex[d];p&&(!u||p.compareTo(u)<0)&&(u=p)}return gk(c,u)}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}var ca=we.Buffer,f2=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(f2=new Int32Array(f2));function yk(e){if(ca.isBuffer(e))return e;var t=typeof ca.alloc=="function"&&typeof ca.from=="function";if(typeof e=="number")return t?ca.alloc(e):new ca(e);if(typeof e=="string")return t?ca.from(e):new ca(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function WK(e){var t=yk(4);return t.writeInt32BE(e,0),t}function h2(e,t){e=yk(e),ca.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=~~t^-1,r=0;r<e.length;r++)n=f2[(n^e[r])&255]^n>>>8;return n^-1}function d2(){return WK(h2.apply(null,arguments))}d2.signed=function(){return h2.apply(null,arguments)},d2.unsigned=function(){return h2.apply(null,arguments)>>>0};var YK=d2;const ZK=uu(YK),QK=21582659,XK=38359875;function KK(e,t){return e*2**t}function vk(e,t){return Math.floor(e/2**t)}let U0=class extends bk{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n){var r,i;return((i=(r=(await this.parse(n)).indices[t])===null||r===void 0?void 0:r.stats)===null||i===void 0?void 0:i.lineCount)||0}async indexCov(){return[]}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",a={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!a)throw new Error(`invalid Tabix preset format flags ${r}`);const o={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),c=s?String.fromCharCode(s):"",l=t.readInt32LE(n+20),u=t.readInt32LE(n+24);return{columnNumbers:o,coordinateType:i,metaValue:s,metaChar:c,skipLines:l,format:a,formatFlags:r,...HK(t.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await ea(n);let i;if(r.readUInt32LE(0)===QK)i=1;else if(r.readUInt32LE(0)===XK)i=2;else throw new Error("Not a CSI file");this.minShift=r.readInt32LE(4),this.depth=r.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const a=r.readInt32LE(12),o=a>=30?this.parseAuxData(r,16):void 0,s=r.readInt32LE(16+a);let c=16+a+4,l;const u=new Array(s);for(let f=0;f<s;f++){const h=r.readInt32LE(c);c+=4;const d={};let p;for(let g=0;g<h;g++){const b=r.readUInt32LE(c);if(c+=4,b>this.maxBinNumber)p=mk(r,c+28),c+=28+16;else{l=z0(l,tc(r,c)),c+=8;const y=r.readInt32LE(c);c+=4;const w=new Array(y);for(let A=0;A<y;A+=1){const x=tc(r,c);c+=8;const C=tc(r,c);c+=8,l=z0(l,x),w[A]=new pk(x,C,b)}d[b]=w}}u[f]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:l,indices:u,refCount:s,csi:!0,maxBlockSize:65536,...o}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i),o=a==null?void 0:a.indices[t];if(!o)return[];const s=this.reg2bins(n,r);if(s.length===0)return[];const c=[];for(const[l,u]of s)for(let f=l;f<=u;f++)if(o.binIndex[f]){const h=o.binIndex[f];for(const d of h)c.push(d)}return gk(c,new dk(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,a=this.minShift+this.depth*3;const o=[];for(;r<=this.depth;a-=3,i+=KK(1,r*3),r+=1){const s=i+vk(t,a),c=i+vk(n,a);if(c-s+o.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);o.push([s,c])}return o}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}};const Mn={BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048},wk="=ACMGRSVTWYHKDBN".split(""),Xu="MIDNSHP=X???????".split("");class xk{constructor(t){this.data={},this._tagList=[],this._allTagsParsed=!1;const{bytes:n,fileOffset:r}=t,{byteArray:i,start:a}=n;this.data={},this.bytes=n,this._id=r,this._refID=i.readInt32LE(a+4),this.data.start=i.readInt32LE(a+8),this.flags=(i.readInt32LE(a+16)&4294901760)>>16}get(t){return this[t]?this.data[t]?this.data[t]:(this.data[t]=this[t](),this.data[t]):this._get(t.toLowerCase())}end(){return this.get("start")+this.get("length_on_ref")}seq_id(){return this._refID}_get(t){return t in this.data?this.data[t]:(this.data[t]=this._parseTag(t),this.data[t])}_tags(){this._parseAllTags();let t=["seq"];this.isSegmentUnmapped()||t.push("start","end","strand","score","qual","MQ","CIGAR","length_on_ref","template_length"),this.isPaired()&&t.push("next_segment_position","pair_orientation"),t=t.concat(this._tagList||[]);for(const r of Object.keys(this.data))r[0]!=="_"&&r!=="next_seq_id"&&t.push(r);const n={};return t.filter(r=>{if(r in this.data&&this.data[r]===void 0||r==="CG"||r==="cg")return!1;const i=r.toLowerCase(),a=n[i];return n[i]=!0,!a})}parent(){}children(){return this.get("subfeatures")}id(){return this._id}mq(){const t=(this.get("_bin_mq_nl")&65280)>>8;return t===255?void 0:t}score(){return this.get("mq")}qual(){var t;return(t=this.qualRaw())===null||t===void 0?void 0:t.join(" ")}qualRaw(){if(this.isSegmentUnmapped())return;const{start:t,byteArray:n}=this.bytes,r=t+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes"),i=this.get("seq_length");return n.subarray(r,r+i)}strand(){return this.isReverseComplemented()?-1:1}multi_segment_next_segment_strand(){if(!this.isMateUnmapped())return this.isMateReverseComplemented()?-1:1}name(){return this.get("_read_name")}_read_name(){const t=this.get("_l_read_name"),{byteArray:n,start:r}=this.bytes;return n.toString("ascii",r+36,r+36+t-1)}_parseTag(t){if(this._allTagsParsed)return;const{byteArray:n,start:r}=this.bytes;let i=this._tagOffset||r+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes")+this.get("seq_length");const a=this.bytes.end;let o;for(;i<a&&o!==t;){const s=String.fromCharCode(n[i],n[i+1]);o=s.toLowerCase();const c=String.fromCharCode(n[i+2]);i+=3;let l;switch(c){case"A":{l=String.fromCharCode(n[i]),i+=1;break}case"i":{l=n.readInt32LE(i),i+=4;break}case"I":{l=n.readUInt32LE(i),i+=4;break}case"c":{l=n.readInt8(i),i+=1;break}case"C":{l=n.readUInt8(i),i+=1;break}case"s":{l=n.readInt16LE(i),i+=2;break}case"S":{l=n.readUInt16LE(i),i+=2;break}case"f":{l=n.readFloatLE(i),i+=4;break}case"Z":case"H":{for(l="";i<=a;){const u=n[i++];if(u===0)break;l+=String.fromCharCode(u)}break}case"B":{l="";const u=n[i++],f=String.fromCharCode(u),h=n.readInt32LE(i);if(i+=4,f==="i")if(s==="CG")for(let d=0;d<h;d++){const p=n.readInt32LE(i),g=p>>4,b=Xu[p&15];l+=g+b,i+=4}else for(let d=0;d<h;d++)l+=n.readInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="I")if(s==="CG")for(let d=0;d<h;d++){const p=n.readUInt32LE(i),g=p>>4,b=Xu[p&15];l+=g+b,i+=4}else for(let d=0;d<h;d++)l+=n.readUInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="s")for(let d=0;d<h;d++)l+=n.readInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="S")for(let d=0;d<h;d++)l+=n.readUInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="c")for(let d=0;d<h;d++)l+=n.readInt8(i),d+1<h&&(l+=","),i+=1;if(f==="C")for(let d=0;d<h;d++)l+=n.readUInt8(i),d+1<h&&(l+=","),i+=1;if(f==="f")for(let d=0;d<h;d++)l+=n.readFloatLE(i),d+1<h&&(l+=","),i+=4;break}default:console.warn(`Unknown BAM tag type '${c}', tags may be incomplete`),l=void 0,i=a}if(this._tagOffset=i,this._tagList.push(s),o===t)return l;this.data[o]=l}this._allTagsParsed=!0}_parseAllTags(){this._parseTag("")}_parseCigar(t){return t.match(/\d+\D/g).map(n=>[n.match(/\D/)[0].toUpperCase(),Number.parseInt(n,10)])}isPaired(){return!!(this.flags&Mn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&Mn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&Mn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&Mn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&Mn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&Mn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&Mn.BAM_FREAD1)}isRead2(){return!!(this.flags&Mn.BAM_FREAD2)}isSecondary(){return!!(this.flags&Mn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&Mn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&Mn.BAM_FDUP)}isSupplementary(){return!!(this.flags&Mn.BAM_FSUPPLEMENTARY)}cigar(){if(this.isSegmentUnmapped())return;const{byteArray:t,start:n}=this.bytes,r=this.get("_n_cigar_op");let i=n+36+this.get("_l_read_name");const a=this.get("seq_length");let o="",s=0,c=t.readInt32LE(i),l=c>>4,u=Xu[c&15];if(u==="S"&&l===a)return i+=4,c=t.readInt32LE(i),l=c>>4,u=Xu[c&15],u!=="N"&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(let f=0;f<r;++f)c=t.readInt32LE(i),l=c>>4,u=Xu[c&15],o+=l+u,u!=="H"&&u!=="S"&&u!=="I"&&(s+=l),i+=4;return this.data.length_on_ref=s,o}_flags(){}length_on_ref(){return this.data.length_on_ref?this.data.length_on_ref:(this.get("cigar"),this.data.length_on_ref)}_n_cigar_op(){return this.get("_flag_nc")&65535}_l_read_name(){return this.get("_bin_mq_nl")&255}_seq_bytes(){return this.get("seq_length")+1>>1}getReadBases(){return this.seq()}seq(){const{byteArray:t,start:n}=this.bytes,r=n+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4,i=this.get("_seq_bytes"),a=this.get("seq_length");let o="",s=0;for(let c=0;c<i;++c){const l=t[r+c];o+=wk[(l&240)>>4],s++,s<a&&(o+=wk[l&15],s++)}return o}getPairOrientation(){if(!this.isSegmentUnmapped()&&!this.isMateUnmapped()&&this._refID===this._next_refid()){const t=this.isReverseComplemented()?"R":"F",n=this.isMateReverseComplemented()?"R":"F";let r=" ",i=" ";this.isRead1()?(r="1",i="2"):this.isRead2()&&(r="2",i="1");const a=[];return this.template_length()>0?(a[0]=t,a[1]=r,a[2]=n,a[3]=i):(a[2]=t,a[3]=r,a[0]=n,a[1]=i),a.join("")}return""}_bin_mq_nl(){return this.bytes.byteArray.readInt32LE(this.bytes.start+12)}_flag_nc(){return this.bytes.byteArray.readInt32LE(this.bytes.start+16)}seq_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+20)}_next_refid(){return this.bytes.byteArray.readInt32LE(this.bytes.start+24)}_next_pos(){return this.bytes.byteArray.readInt32LE(this.bytes.start+28)}template_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+32)}toJSON(){const t={};for(const n of Object.keys(this))n.charAt(0)==="_"||n==="bytes"||(t[n]=this[n]);return t}}function Ak(e){const t=e.split(/\r?\n/),n=[];for(const r of t){const[i,...a]=r.split(/\t/);i&&n.push({tag:i.slice(1),data:a.map(o=>{const[s,c]=o.split(":",2);return{tag:s,value:c}})})}return n}const Ek=21840194,Sk=65536;async function JK(e){let t=[];for await(const n of e)t=t.concat(n);return t}class eJ{read(){throw new Error("never called")}stat(){throw new Error("never called")}readFile(){throw new Error("never called")}close(){throw new Error("never called")}}class _k{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:a,baiUrl:o,csiPath:s,csiFilehandle:c,csiUrl:l,htsget:u,yieldThreadTime:f=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new A0({cache:new E0({maxSize:50}),fill:async(d,p)=>{const{chunk:g,opts:b}=d,{data:y,cpositions:w,dpositions:A}=await this._readChunk({chunk:g,opts:{...b,signal:p}});return this.readBamFeatures(y,w,A,g)}}),this.renameRefSeq=h,t)this.bam=t;else if(n)this.bam=new kt(n);else if(r)this.bam=new po(r);else if(u)this.htsget=!0,this.bam=new eJ;else throw new Error("unable to initialize bam");if(c)this.index=new U0({filehandle:c});else if(s)this.index=new U0({filehandle:new kt(s)});else if(l)this.index=new U0({filehandle:new po(l)});else if(a)this.index=new nc({filehandle:a});else if(i)this.index=new nc({filehandle:new kt(i)});else if(o)this.index=new nc({filehandle:new po(o)});else if(n)this.index=new nc({filehandle:new kt(`${n}.bai`)});else if(r)this.index=new nc({filehandle:new po(`${r}.bai`)});else if(u)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=f}async getHeaderPre(t){const n=$K(t);if(!this.index)return;const r=await this.index.parse(n),i=r.firstDataLine?r.firstDataLine.blockPosition+65535:void 0;let a;if(i){const u=i+Sk,f=await this.bam.read(we.Buffer.alloc(u),0,u,0,n);if(!f.bytesRead)throw new Error("Error reading header");a=f.buffer.subarray(0,Math.min(f.bytesRead,i))}else a=await this.bam.readFile(n);const o=await ea(a);if(o.readInt32LE(0)!==Ek)throw new Error("Not a BAM file");const s=o.readInt32LE(4);this.header=o.toString("utf8",8,8+s);const{chrToIndex:c,indexToChr:l}=await this._readRefSeqs(s+8,65535,n);return this.chrToIndex=c,this.indexToChr=l,Ak(this.header)}getHeader(t){return this.headerP||(this.headerP=this.getHeaderPre(t).catch(n=>{throw this.headerP=void 0,n})),this.headerP}async getHeaderText(t={}){return await this.getHeader(t),this.header}async _readRefSeqs(t,n,r){if(t>n)return this._readRefSeqs(t,n*2,r);const i=n+Sk,{bytesRead:a,buffer:o}=await this.bam.read(we.Buffer.alloc(i),0,n,0,r);if(!a)throw new Error("Error reading refseqs from header");const s=await ea(o.subarray(0,Math.min(a,n))),c=s.readInt32LE(t);let l=t+4;const u={},f=[];for(let h=0;h<c;h+=1){const d=s.readInt32LE(l),p=this.renameRefSeq(s.toString("utf8",l+4,l+4+d-1)),g=s.readInt32LE(l+d+4);if(u[p]=h,f.push({refName:p,length:g}),l=l+8+d,l>s.length)return console.warn(`BAM header is very big. Re-fetching ${n} bytes.`),this._readRefSeqs(t,n*2,r)}return{chrToIndex:u,indexToChr:f}}async getRecordsForRange(t,n,r,i){return JK(this.streamRecordsForRange(t,n,r,i))}async*streamRecordsForRange(t,n,r,i){var a;await this.getHeader(i);const o=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];if(o===void 0||!this.index)yield[];else{const s=await this.index.blocksForRange(o,n-1,r,i);yield*this._fetchChunkFeatures(s,o,n,r,i)}}async*_fetchChunkFeatures(t,n,r,i,a={}){const{viewAsPairs:o}=a,s=[];let c=!1;for(const l of t){const u=await this.featureCache.get(l.toString(),{chunk:l,opts:a},a.signal),f=[];for(const h of u)if(h.seq_id()===n)if(h.get("start")>=i){c=!0;break}else h.get("end")>=r&&f.push(h);if(s.push(f),yield f,c)break}zK(a.signal),o&&(yield this.fetchPairs(n,s,a))}async fetchPairs(t,n,r){const{pairAcrossChr:i,maxInsertSize:a=2e5}=r,o={},s={};n.map(h=>{const d={};for(const p of h){const g=p.name(),b=p.id();d[g]||(d[g]=0),d[g]++,s[b]=1}for(const[p,g]of Object.entries(d))g===1&&(o[p]=!0)});const c=[];n.map(h=>{for(const d of h){const p=d.name(),g=d.get("start"),b=d._next_pos(),y=d._next_refid();this.index&&o[p]&&(i||y===t&&Math.abs(g-b)<a)&&c.push(this.index.blocksForRange(y,b,b+1,r))}});const l=new Map,u=await Promise.all(c);for(const h of u.flat())l.has(h.toString())||l.set(h.toString(),h);return(await Promise.all([...l.values()].map(async h=>{const{data:d,cpositions:p,dpositions:g,chunk:b}=await this._readChunk({chunk:h,opts:r}),y=[];for(const w of await this.readBamFeatures(d,p,g,b))o[w.get("name")]&&!s[w.id()]&&y.push(w);return y}))).flat()}async _readRegion(t,n,r={}){const{bytesRead:i,buffer:a}=await this.bam.read(we.Buffer.alloc(n),0,n,t,r);return a.subarray(0,Math.min(i,n))}async _readChunk({chunk:t,opts:n}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n),{buffer:i,cpositions:a,dpositions:o}=await jC(r,t);return{data:i,cpositions:a,dpositions:o,chunk:t}}async readBamFeatures(t,n,r,i){let a=0;const o=[];let s=0,c=+Date.now();for(;a+4<t.length;){const l=t.readInt32LE(a),u=a+4+l-1;if(r){for(;a+i.minv.dataPosition>=r[s++];);s--}if(u<t.length){const f=new xk({bytes:{byteArray:t,start:a,end:u},fileOffset:n.length>0?n[s]*256+(a-r[s])+i.minv.dataPosition+1:ZK.signed(t.slice(a,u))});o.push(f),this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime&&(await LK(1),c=+Date.now())}a=u+1}return o}async hasRefSeq(t){var n,r;const i=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return i===void 0?!1:(r=this.index)===null||r===void 0?void 0:r.hasRefSeq(i)}async lineCount(t){var n;const r=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return r===void 0||!this.index?0:this.index.lineCount(r)}async indexCov(t,n,r){var i;if(!this.index)return[];await this.index.parse();const a=(i=this.chrToIndex)===null||i===void 0?void 0:i[t];return a===void 0?[]:this.index.indexCov(a,n,r)}async blocksForRange(t,n,r,i){var a;if(!this.index)return[];await this.index.parse();const o=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];return o===void 0?[]:this.index.blocksForRange(o,n,r,i)}}async function Ck(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:a}=r;if(i.startsWith("data:"))return we.Buffer.from(i.split(",")[1],"base64");{const{referer:o,...s}=a,c=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...s}});if(!c.ok)throw new Error(`HTTP ${c.status} fetching ${i}: ${await c.text()}`);return we.Buffer.from(await c.arrayBuffer())}}));return we.Buffer.concat(await Promise.all(n.map(r=>ea(r))))}class tJ extends _k{constructor(t){super({htsget:!0}),this.baseUrl=t.baseUrl,this.trackId=t.trackId}async*streamRecordsForRange(t,n,r,i){var a;const s=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${t}&start=${n}&end=${r}&format=BAM`,c=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];if(c===void 0)yield[];else{const l=await fetch(s,{...i});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${s}: ${await l.text()}`);const u=await l.json(),f=await Ck(u.htsget.urls.slice(1),i);yield*this._fetchChunkFeatures([{buffer:f,_fetchedSize:void 0,bin:0,compareTo(){return 0},toUniqueString(){return`${t}_${n}_${r}`},fetchedSize(){return 0},minv:{dataPosition:0,blockPosition:0,compareTo:()=>0},maxv:{dataPosition:Number.MAX_SAFE_INTEGER,blockPosition:0,compareTo:()=>0},toString(){return`${t}_${n}_${r}`}}],c,n,r,i)}}async _readChunk({chunk:t}){if(!t.buffer)throw new Error("expected chunk.buffer in htsget");return{data:t.buffer,cpositions:[],dpositions:[],chunk:t}}async getHeader(t={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,r=await fetch(n,t);if(!r.ok)throw new Error(`HTTP ${r.status} fetching ${n}: ${await r.text()}`);const i=await r.json(),a=await Ck(i.htsget.urls,t);if(a.readInt32LE(0)!==Ek)throw new Error("Not a BAM file");const o=a.readInt32LE(4),s=a.toString("utf8",8,8+o),c=Ak(s),l=[],u={},f=c.filter(h=>h.tag==="SQ");for(const[h,d]of f.entries()){let p="",g=0;for(const b of d.data)b.tag==="SN"?p=b.value:b.tag==="LN"&&(g=+b.value);u[p]=h,l[h]={refName:p,length:g}}return this.chrToIndex=u,this.indexToChr=l,c}}const nJ=Object.freeze(Object.defineProperty({__proto__:null,BAI:nc,BamFile:_k,BamRecord:xk,CSI:U0,HtsgetFile:tJ},Symbol.toStringTag,{value:"Module"}));function kk(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class rJ extends Error{}function rc(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new rJ("aborted");throw t.code="ERR_ABORTED",t}}}function iJ(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function Tk(e,t){const n=[];let r=null;return e.length===0?e:(e.sort(function(i,a){const o=i.minv.blockPosition-a.minv.blockPosition;return o!==0?o:i.minv.dataPosition-a.minv.dataPosition}),e.forEach(i=>{(!t||i.maxv.compareTo(t)>0)&&(r===null?(n.push(i),r=i):iJ(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class p2{constructor(t,n){this.blockPosition=t,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}static min(...t){let n,r=0;for(;!n;r+=1)n=t[r];for(;r<t.length;r+=1)n.compareTo(t[r])>0&&(n=t[r]);return n}}function ic(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new p2(e[t+7]*1099511627776+e[t+6]*4294967296+e[t+5]*16777216+e[t+4]*65536+e[t+3]*256+e[t+2],e[t+1]<<8|e[t])}class $0{constructor(t,n,r,i=void 0){this.minv=t,this.maxv=n,this.bin=r,this._fetchedSize=i}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(t){return this.minv.compareTo(t.minv)||this.maxv.compareTo(t.maxv)||this.bin-t.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}class Ik{constructor({filehandle:t,renameRefSeqs:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}async getMetadata(t={}){const{indices:n,...r}=await this.parse(t);return r}_findFirstData(t,n){return t?t.compareTo(n)>0?n:t:n}async parse(t={}){return this.parseP||(this.parseP=this._parse(t).catch(n=>{throw this.parseP=void 0,n})),this.parseP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}const aJ=21578324,Rk=14;function oJ(e,t){return e+=1,t-=1,[[0,0],[1+(e>>26),1+(t>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}class H0 extends Ik{async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:o}=r.indices[i];return o?o.lineCount:-1}async _parse(t={}){const n=await this.filehandle.readFile(t),r=await ea(n);if(rc(t.signal),r.readUInt32LE(0)!==aJ)throw new Error("Not a TBI file");const i=r.readInt32LE(4),a=r.readInt32LE(8),o=a&65536?"zero-based-half-open":"1-based-closed",c={0:"generic",1:"SAM",2:"VCF"}[a&15];if(!c)throw new Error(`invalid Tabix preset format flags ${a}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},u=r.readInt32LE(24),f=5,h=((1<<(f+1)*3)-1)/7,d=2**(14+f*3),p=u?String.fromCharCode(u):null,g=r.readInt32LE(28),b=r.readInt32LE(32),{refNameToId:y,refIdToName:w}=this._parseNameBytes(r.slice(36,36+b));let A=36+b,x;return{indices:new Array(i).fill(0).map(()=>{const _=r.readInt32LE(A);A+=4;const I={};let D;for(let O=0;O<_;O+=1){const ae=r.readUInt32LE(A);if(A+=4,ae>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(ae===h+1){const se=r.readInt32LE(A);A+=4,se===2&&(D=this.parsePseudoBin(r,A)),A+=16*se}else{const se=r.readInt32LE(A);A+=4;const ve=new Array(se);for(let Pe=0;Pe<se;Pe+=1){const st=ic(r,A),Ne=ic(r,A+8);A+=16,x=this._findFirstData(x,st),ve[Pe]=new $0(st,Ne,ae)}I[ae]=ve}}const M=r.readInt32LE(A);A+=4;const G=new Array(M);for(let O=0;O<M;O+=1)G[O]=ic(r,A),A+=8,x=this._findFirstData(x,G[O]);return{binIndex:I,linearIndex:G,stats:D}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:g,firstDataLine:x,columnNumbers:l,coordinateType:o,format:c,refIdToName:w,refNameToId:y,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:kk(p0.fromBytesLE(t.slice(n+16,n+24),!0))}}_parseNameBytes(t){let n=0,r=0;const i=[],a={};for(let o=0;o<t.length;o+=1)if(!t[o]){if(r<o){let s=t.toString("utf8",r,o);s=this.renameRefSeq(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.refNameToId[t],s=a.indices[o];if(!s)return[];(s.linearIndex.length?s.linearIndex[n>>Rk>=s.linearIndex.length?s.linearIndex.length-1:n>>Rk]:new p2(0,0))||console.warn("querying outside of possible tabix range");const l=oJ(n,r),u=[];for(const[g,b]of l)for(let y=g;y<=b;y++)if(s.binIndex[y])for(const w of s.binIndex[y])u.push(new $0(w.minv,w.maxv,y));const f=s.linearIndex.length;let h=null;const d=Math.min(n>>14,f-1),p=Math.min(r>>14,f-1);for(let g=d;g<=p;++g){const b=s.linearIndex[g];b&&(!h||b.compareTo(h)<0)&&(h=b)}return Tk(u,h)}}const sJ=21582659,cJ=38359875;function lJ(e,t){return e*2**t}function Dk(e,t){return Math.floor(e/2**t)}class g2 extends Ik{constructor(t){super(t),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:o}=r.indices[i];return o?o.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",a={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!a)throw new Error(`invalid Tabix preset format flags ${r}`);const o={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),c=s?String.fromCharCode(s):null,l=t.readInt32LE(n+20),u=t.readInt32LE(n+24),{refIdToName:f,refNameToId:h}=this._parseNameBytes(t.slice(n+28,n+28+u));return{refIdToName:f,refNameToId:h,skipLines:l,metaChar:c,columnNumbers:o,format:a,coordinateType:i}}_parseNameBytes(t){let n=0,r=0;const i=[],a={};for(let o=0;o<t.length;o+=1)if(!t[o]){if(r<o){let s=t.toString("utf8",r,o);s=this.renameRefSeq(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}async _parse(t={}){const n=await ea(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===sJ)r=1;else if(n.readUInt32LE(0)===cJ)r=2;else throw new Error("Not a CSI file");this.minShift=n.readInt32LE(4),this.depth=n.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const i=2**(this.minShift+this.depth*3),a=n.readInt32LE(12),o=a&&a>=30?this.parseAuxData(n,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},s=n.readInt32LE(16+a);let c,l=16+a+4;const u=new Array(s).fill(0).map(()=>{const f=n.readInt32LE(l);l+=4;const h={};let d;for(let p=0;p<f;p+=1){const g=n.readUInt32LE(l);if(g>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=4+8+4+16+16;else{const b=ic(n,l+4);c=this._findFirstData(c,b);const y=n.readInt32LE(l+12);l+=16;const w=new Array(y);for(let A=0;A<y;A+=1){const x=ic(n,l),C=ic(n,l+8);l+=16,w[A]=new $0(x,C,g)}h[g]=w}}return{binIndex:h,stats:d}});return{...o,csi:!0,refCount:s,maxBlockSize:65536,firstDataLine:c,csiVersion:r,indices:u,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:kk(p0.fromBytesLE(t.slice(n+28,n+36),!0))}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.refNameToId[t],s=a.indices[o];if(!s)return[];const c=this.reg2bins(n,r),l=[];for(const[u,f]of c)for(let h=u;h<=f;h++)if(s.binIndex[h])for(const d of s.binIndex[h])l.push(new $0(d.minv,d.maxv,h));return Tk(l,new p2(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,a=this.minShift+this.depth*3;const o=[];for(;r<=this.depth;a-=3,i+=lJ(1,r*3),r+=1){const s=i+Dk(t,a),c=i+Dk(n,a);if(c-s+o.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);o.push([s,c])}return o}}const m2=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function uJ(e){return new Promise(t=>setTimeout(t,e))}class fJ{constructor({path:t,filehandle:n,tbiPath:r,tbiFilehandle:i,csiPath:a,csiFilehandle:o,yieldTime:s=500,chunkSizeLimit:c=5e7,renameRefSeqs:l=f=>f,chunkCacheSize:u=5*2**20}){if(n)this.filehandle=n;else if(t)this.filehandle=new kt(t);else throw new TypeError("must provide either filehandle or path");if(i)this.index=new H0({filehandle:i,renameRefSeqs:l});else if(o)this.index=new g2({filehandle:o,renameRefSeqs:l});else if(r)this.index=new H0({filehandle:new kt(r),renameRefSeqs:l});else if(a)this.index=new g2({filehandle:new kt(a),renameRefSeqs:l});else if(t)this.index=new H0({filehandle:new kt(`${t}.tbi`),renameRefSeqs:l});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, or csiPath");this.chunkSizeLimit=c,this.renameRefSeq=l,this.yieldTime=s,this.chunkCache=new A0({cache:new E0({maxSize:Math.floor(u/65536)}),fill:(f,h)=>this.readChunk(f,{signal:h})})}async getLines(t,n,r,i){var a;let o,s={},c;if(i===void 0)throw new TypeError("line callback must be provided");if(typeof i=="function"?c=i:(s=i,c=i.lineCallback,o=i.signal),t===void 0)throw new TypeError("must provide a reference sequence name");if(!c)throw new TypeError("line callback must be provided");const l=await this.index.getMetadata(s);rc(o);const u=n??0,f=r??l.maxRefLength;if(!(u<=f))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(u===f)return;const h=await this.index.blocksForRange(t,u,f,s);rc(o);for(const p of h){const g=p.fetchedSize();if(g>this.chunkSizeLimit)throw new Error(`Too much data. Chunk size ${g.toLocaleString()} bytes exceeds chunkSizeLimit of ${this.chunkSizeLimit.toLocaleString()}.`)}let d=Date.now();for(const p of h){let g;const{buffer:b,cpositions:y,dpositions:w}=await this.chunkCache.get(p.toString(),p,o);rc(o);let A=0,x=0;for(;A<b.length;){const C=b.indexOf(`
3440
+ `,A);if(C===-1)break;const _=b.slice(A,C),I=(a=m2==null?void 0:m2.decode(_))!==null&&a!==void 0?a:_.toString();if(w){for(;A+p.minv.dataPosition>=w[x++];);x--}const{startCoordinate:D,overlaps:M}=this.checkLine(l,t,u,f,I);if(g!==void 0&&D!==void 0&&g>D)throw new Error(`Lines not sorted by start coordinate (${g} > ${D}), this file is not usable with Tabix.`);if(g=D,M)c(I.trim(),y[x]*256+(A-w[x])+p.minv.dataPosition+1);else if(D!==void 0&&D>=f)return;this.yieldTime&&d-Date.now()>this.yieldTime&&(d=Date.now(),rc(o),await uJ(1)),A=C+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:n,metaChar:r,maxBlockSize:i}=await this.getMetadata(t);rc(t.signal);const a=((n==null?void 0:n.blockPosition)||0)+i,o=await this._readRegion(0,a,t),s=await ea(o);if(r){let c=-1;const l=`
3441
+ `.charCodeAt(0),u=r.charCodeAt(0);for(let f=0;f<s.length&&!(f===c+1&&s[f]!==u);f+=1)s[f]===l&&(c=f);return s.slice(0,c+1)}return s}async getHeader(t={}){return(await this.getHeaderBuffer(t)).toString("utf8")}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,n,r,i,a){const{columnNumbers:o,metaChar:s,coordinateType:c,format:l}=t;if(s&&a.startsWith(s))return{overlaps:!1};let{ref:u,start:f,end:h}=o;u||(u=0),f||(f=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(u,f,h);let p=1,g=0,b="",y=-1/0;for(let w=0;w<a.length+1;w+=1)if(a[w]===" "||w===a.length){if(p===u){if(this.renameRefSeq(a.slice(g,w))!==n)return{overlaps:!1}}else if(p===f){if(y=parseInt(a.slice(g,w),10),c==="1-based-closed"&&(y-=1),y>=i)return{startCoordinate:y,overlaps:!1};if((h===0||h===f)&&y+1<=r)return{startCoordinate:y,overlaps:!1}}else if(l==="VCF"&&p===4)b=a.slice(g,w);else if(p===h&&(l==="VCF"?this._getVcfEnd(y,b,a.slice(g,w)):parseInt(a.slice(g,w),10))<=r)return{overlaps:!1};if(g=w+1,p+=1,p>d)break}return{startCoordinate:y,overlaps:!0}}_getVcfEnd(t,n,r){let i=t+n.length;const a=r.includes("SVTYPE=TRA");if(r[0]!=="."&&!a){let o=";";for(let s=0;s<r.length;s+=1){if(o===";"&&r.slice(s,s+4)==="END="){let c=r.indexOf(";",s);c===-1&&(c=r.length),i=parseInt(r.slice(s+4,c),10);break}o=r[s]}}else if(a)return t+1;return i}async lineCount(t,n={}){return this.index.lineCount(t,n)}async _readRegion(t,n,r={}){const i=we.Buffer.alloc(n),{bytesRead:a,buffer:o}=await this.filehandle.read(i,0,n,t,r);return o.slice(0,a)}async readChunk(t,n={}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n);return jC(r,t)}}const hJ=Object.freeze(Object.defineProperty({__proto__:null,CSI:g2,TBI:H0,TabixIndexedFile:fJ},Symbol.toStringTag,{value:"Module"}));var b2={exports:{}},ac=typeof Reflect=="object"?Reflect:null,Bk=ac&&typeof ac.apply=="function"?ac.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},G0;ac&&typeof ac.ownKeys=="function"?G0=ac.ownKeys:Object.getOwnPropertySymbols?G0=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:G0=function(t){return Object.getOwnPropertyNames(t)};function dJ(e){console&&console.warn&&console.warn(e)}var Fk=Number.isNaN||function(t){return t!==t};function Le(){Le.init.call(this)}b2.exports=Le,b2.exports.once=bJ,Le.EventEmitter=Le,Le.prototype._events=void 0,Le.prototype._eventsCount=0,Le.prototype._maxListeners=void 0;var Pk=10;function V0(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Le,"defaultMaxListeners",{enumerable:!0,get:function(){return Pk},set:function(e){if(typeof e!="number"||e<0||Fk(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Pk=e}}),Le.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Le.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Fk(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Mk(e){return e._maxListeners===void 0?Le.defaultMaxListeners:e._maxListeners}Le.prototype.getMaxListeners=function(){return Mk(this)},Le.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=t==="error",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var o;if(n.length>0&&(o=n[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[t];if(c===void 0)return!1;if(typeof c=="function")Bk(c,this,n);else for(var l=c.length,u=Uk(c,l),r=0;r<l;++r)Bk(u[r],this,n);return!0};function Ok(e,t,n,r){var i,a,o;if(V0(n),a=e._events,a===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)o=a[t]=n,++e._eventsCount;else if(typeof o=="function"?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),i=Mk(e),i>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,dJ(s)}return e}Le.prototype.addListener=function(t,n){return Ok(this,t,n,!1)},Le.prototype.on=Le.prototype.addListener,Le.prototype.prependListener=function(t,n){return Ok(this,t,n,!0)};function pJ(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Lk(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=pJ.bind(r);return i.listener=n,r.wrapFn=i,i}Le.prototype.once=function(t,n){return V0(n),this.on(t,Lk(this,t,n)),this},Le.prototype.prependOnceListener=function(t,n){return V0(n),this.prependListener(t,Lk(this,t,n)),this},Le.prototype.removeListener=function(t,n){var r,i,a,o,s;if(V0(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(a=-1,o=r.length-1;o>=0;o--)if(r[o]===n||r[o].listener===n){s=r[o].listener,a=o;break}if(a<0)return this;a===0?r.shift():gJ(r,a),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this},Le.prototype.off=Le.prototype.removeListener,Le.prototype.removeAllListeners=function(t){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var a=Object.keys(r),o;for(i=0;i<a.length;++i)o=a[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(t,n[i]);return this};function Nk(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?mJ(i):Uk(i,i.length)}Le.prototype.listeners=function(t){return Nk(this,t,!0)},Le.prototype.rawListeners=function(t){return Nk(this,t,!1)},Le.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):zk.call(e,t)},Le.prototype.listenerCount=zk;function zk(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}Le.prototype.eventNames=function(){return this._eventsCount>0?G0(this._events):[]};function Uk(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function gJ(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function mJ(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function bJ(e,t){return new Promise(function(n,r){function i(o){e.removeListener(t,a),r(o)}function a(){typeof e.removeListener=="function"&&e.removeListener("error",i),n([].slice.call(arguments))}$k(e,t,a,{once:!0}),t!=="error"&&yJ(e,i,{once:!0})})}function yJ(e,t,n){typeof e.on=="function"&&$k(e,"error",t,n)}function $k(e,t,n,r){if(typeof e.on=="function")r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var y2=b2.exports,v2={exports:{}};typeof Object.create=="function"?v2.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:v2.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}};var oc=v2.exports,w2,Hk;function Gk(){return Hk||(Hk=1,w2=y2.EventEmitter),w2}const Vk=lq(Uq);var x2,jk;function vJ(){if(jk)return x2;jk=1;function e(p,g){var b=Object.keys(p);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(p);g&&(y=y.filter(function(w){return Object.getOwnPropertyDescriptor(p,w).enumerable})),b.push.apply(b,y)}return b}function t(p){for(var g=1;g<arguments.length;g++){var b=arguments[g]!=null?arguments[g]:{};g%2?e(Object(b),!0).forEach(function(y){n(p,y,b[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(b)):e(Object(b)).forEach(function(y){Object.defineProperty(p,y,Object.getOwnPropertyDescriptor(b,y))})}return p}function n(p,g,b){return g=o(g),g in p?Object.defineProperty(p,g,{value:b,enumerable:!0,configurable:!0,writable:!0}):p[g]=b,p}function r(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function i(p,g){for(var b=0;b<g.length;b++){var y=g[b];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,o(y.key),y)}}function a(p,g,b){return g&&i(p.prototype,g),b&&i(p,b),Object.defineProperty(p,"prototype",{writable:!1}),p}function o(p){var g=s(p,"string");return typeof g=="symbol"?g:String(g)}function s(p,g){if(typeof p!="object"||p===null)return p;var b=p[Symbol.toPrimitive];if(b!==void 0){var y=b.call(p,g||"default");if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(p)}var c=we,l=c.Buffer,u=Vk,f=u.inspect,h=f&&f.custom||"inspect";function d(p,g,b){l.prototype.copy.call(p,g,b)}return x2=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return a(p,[{key:"push",value:function(b){var y={data:b,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(b){var y={data:b,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var y=this.head,w=""+y.data;y=y.next;)w+=b+y.data;return w}},{key:"concat",value:function(b){if(this.length===0)return l.alloc(0);for(var y=l.allocUnsafe(b>>>0),w=this.head,A=0;w;)d(w.data,y,A),A+=w.data.length,w=w.next;return y}},{key:"consume",value:function(b,y){var w;return b<this.head.data.length?(w=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?w=this.shift():w=y?this._getString(b):this._getBuffer(b),w}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var y=this.head,w=1,A=y.data;for(b-=A.length;y=y.next;){var x=y.data,C=b>x.length?x.length:b;if(C===x.length?A+=x:A+=x.slice(0,b),b-=C,b===0){C===x.length?(++w,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=x.slice(C));break}++w}return this.length-=w,A}},{key:"_getBuffer",value:function(b){var y=l.allocUnsafe(b),w=this.head,A=1;for(w.data.copy(y),b-=w.data.length;w=w.next;){var x=w.data,C=b>x.length?x.length:b;if(x.copy(y,y.length-b,0,C),b-=C,b===0){C===x.length?(++A,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=x.slice(C));break}++A}return this.length-=A,y}},{key:h,value:function(b,y){return f(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),p}(),x2}var A2,qk;function Wk(){if(qk)return A2;qk=1;function e(o,s){var c=this,l=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return l||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,o)):process.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(f){!s&&f?c._writableState?c._writableState.errorEmitted?process.nextTick(n,c):(c._writableState.errorEmitted=!0,process.nextTick(t,c,f)):process.nextTick(t,c,f):s?(process.nextTick(n,c),s(f)):process.nextTick(n,c)}),this)}function t(o,s){i(o,s),n(o)}function n(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(o,s){o.emit("error",s)}function a(o,s){var c=o._readableState,l=o._writableState;c&&c.autoDestroy||l&&l.autoDestroy?o.destroy(s):o.emit("error",s)}return A2={destroy:e,undestroy:r,errorOrDestroy:a},A2}var E2={},Yk;function sc(){if(Yk)return E2;Yk=1;function e(s,c){s.prototype=Object.create(c.prototype),s.prototype.constructor=s,s.__proto__=c}var t={};function n(s,c,l){l||(l=Error);function u(h,d,p){return typeof c=="string"?c:c(h,d,p)}var f=function(h){e(d,h);function d(p,g,b){return h.call(this,u(p,g,b))||this}return d}(l);f.prototype.name=l.name,f.prototype.code=s,t[s]=f}function r(s,c){if(Array.isArray(s)){var l=s.length;return s=s.map(function(u){return String(u)}),l>2?"one of ".concat(c," ").concat(s.slice(0,l-1).join(", "),", or ")+s[l-1]:l===2?"one of ".concat(c," ").concat(s[0]," or ").concat(s[1]):"of ".concat(c," ").concat(s[0])}else return"of ".concat(c," ").concat(String(s))}function i(s,c,l){return s.substr(!l||l<0?0:+l,c.length)===c}function a(s,c,l){return(l===void 0||l>s.length)&&(l=s.length),s.substring(l-c.length,l)===c}function o(s,c,l){return typeof l!="number"&&(l=0),l+c.length>s.length?!1:s.indexOf(c,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,c){return'The value "'+c+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,c,l){var u;typeof c=="string"&&i(c,"not ")?(u="must not be",c=c.replace(/^not /,"")):u="must be";var f;if(a(s," argument"))f="The ".concat(s," ").concat(u," ").concat(r(c,"type"));else{var h=o(s,".")?"property":"argument";f='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(c,"type"))}return f+=". Received type ".concat(typeof l),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),E2.codes=t,E2}var S2,Zk;function Qk(){if(Zk)return S2;Zk=1;var e=sc().codes.ERR_INVALID_OPT_VALUE;function t(r,i,a){return r.highWaterMark!=null?r.highWaterMark:i?r[a]:null}function n(r,i,a,o){var s=t(i,o,a);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var c=o?a:"highWaterMark";throw new e(c,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return S2={getHighWaterMark:n},S2}var _2,Xk;function wJ(){if(Xk)return _2;Xk=1,_2=e;function e(n,r){if(t("noDeprecation"))return n;var i=!1;function a(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return n.apply(this,arguments)}return a}function t(n){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return _2}var C2,Kk;function Jk(){if(Kk)return C2;Kk=1,C2=D;function e(N){var L=this;this.next=null,this.entry=null,this.finish=function(){Ve(L,N)}}var t;D.WritableState=_;var n={deprecate:wJ()},r=Gk(),i=we.Buffer,a=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(N){return i.from(N)}function s(N){return i.isBuffer(N)||N instanceof a}var c=Wk(),l=Qk(),u=l.getHighWaterMark,f=sc().codes,h=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,A=f.ERR_UNKNOWN_ENCODING,x=c.errorOrDestroy;oc(D,r);function C(){}function _(N,L,W){t=t||cc(),N=N||{},typeof W!="boolean"&&(W=L instanceof t),this.objectMode=!!N.objectMode,W&&(this.objectMode=this.objectMode||!!N.writableObjectMode),this.highWaterMark=u(this,N,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=N.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=N.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){st(L,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=N.emitClose!==!1,this.autoDestroy=!!N.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}_.prototype.getBuffer=function(){for(var L=this.bufferedRequest,W=[];L;)W.push(L),L=L.next;return W},function(){try{Object.defineProperty(_.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(L){return I.call(this,L)?!0:this!==D?!1:L&&L._writableState instanceof _}})):I=function(L){return L instanceof this};function D(N){t=t||cc();var L=this instanceof t;if(!L&&!I.call(D,this))return new D(N);this._writableState=new _(N,this,L),this.writable=!0,N&&(typeof N.write=="function"&&(this._write=N.write),typeof N.writev=="function"&&(this._writev=N.writev),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.final=="function"&&(this._final=N.final)),r.call(this)}D.prototype.pipe=function(){x(this,new g)};function M(N,L){var W=new w;x(N,W),process.nextTick(L,W)}function G(N,L,W,j){var Q;return W===null?Q=new y:typeof W!="string"&&!L.objectMode&&(Q=new h("chunk",["string","Buffer"],W)),Q?(x(N,Q),process.nextTick(j,Q),!1):!0}D.prototype.write=function(N,L,W){var j=this._writableState,Q=!1,T=!j.objectMode&&s(N);return T&&!i.isBuffer(N)&&(N=o(N)),typeof L=="function"&&(W=L,L=null),T?L="buffer":L||(L=j.defaultEncoding),typeof W!="function"&&(W=C),j.ending?M(this,W):(T||G(this,j,N,W))&&(j.pendingcb++,Q=ae(this,j,T,N,L,W)),Q},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var N=this._writableState;N.corked&&(N.corked--,!N.writing&&!N.corked&&!N.bufferProcessing&&N.bufferedRequest&&tt(this,N))},D.prototype.setDefaultEncoding=function(L){if(typeof L=="string"&&(L=L.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((L+"").toLowerCase())>-1))throw new A(L);return this._writableState.defaultEncoding=L,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(N,L,W){return!N.objectMode&&N.decodeStrings!==!1&&typeof L=="string"&&(L=i.from(L,W)),L}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ae(N,L,W,j,Q,T){if(!W){var S=O(L,j,Q);j!==S&&(W=!0,Q="buffer",j=S)}var V=L.objectMode?1:j.length;L.length+=V;var Y=L.length<L.highWaterMark;if(Y||(L.needDrain=!0),L.writing||L.corked){var de=L.lastBufferedRequest;L.lastBufferedRequest={chunk:j,encoding:Q,isBuf:W,callback:T,next:null},de?de.next=L.lastBufferedRequest:L.bufferedRequest=L.lastBufferedRequest,L.bufferedRequestCount+=1}else se(N,L,!1,V,j,Q,T);return Y}function se(N,L,W,j,Q,T,S){L.writelen=j,L.writecb=S,L.writing=!0,L.sync=!0,L.destroyed?L.onwrite(new b("write")):W?N._writev(Q,L.onwrite):N._write(Q,T,L.onwrite),L.sync=!1}function ve(N,L,W,j,Q){--L.pendingcb,W?(process.nextTick(Q,j),process.nextTick(Rt,N,L),N._writableState.errorEmitted=!0,x(N,j)):(Q(j),N._writableState.errorEmitted=!0,x(N,j),Rt(N,L))}function Pe(N){N.writing=!1,N.writecb=null,N.length-=N.writelen,N.writelen=0}function st(N,L){var W=N._writableState,j=W.sync,Q=W.writecb;if(typeof Q!="function")throw new p;if(Pe(W),L)ve(N,W,j,L,Q);else{var T=ut(W)||N.destroyed;!T&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&tt(N,W),j?process.nextTick(Ne,N,W,T,Q):Ne(N,W,T,Q)}}function Ne(N,L,W,j){W||lt(N,L),L.pendingcb--,j(),Rt(N,L)}function lt(N,L){L.length===0&&L.needDrain&&(L.needDrain=!1,N.emit("drain"))}function tt(N,L){L.bufferProcessing=!0;var W=L.bufferedRequest;if(N._writev&&W&&W.next){var j=L.bufferedRequestCount,Q=new Array(j),T=L.corkedRequestsFree;T.entry=W;for(var S=0,V=!0;W;)Q[S]=W,W.isBuf||(V=!1),W=W.next,S+=1;Q.allBuffers=V,se(N,L,!0,L.length,Q,"",T.finish),L.pendingcb++,L.lastBufferedRequest=null,T.next?(L.corkedRequestsFree=T.next,T.next=null):L.corkedRequestsFree=new e(L),L.bufferedRequestCount=0}else{for(;W;){var Y=W.chunk,de=W.encoding,ie=W.callback,pe=L.objectMode?1:Y.length;if(se(N,L,!1,pe,Y,de,ie),W=W.next,L.bufferedRequestCount--,L.writing)break}W===null&&(L.lastBufferedRequest=null)}L.bufferedRequest=W,L.bufferProcessing=!1}D.prototype._write=function(N,L,W){W(new d("_write()"))},D.prototype._writev=null,D.prototype.end=function(N,L,W){var j=this._writableState;return typeof N=="function"?(W=N,N=null,L=null):typeof L=="function"&&(W=L,L=null),N!=null&&this.write(N,L),j.corked&&(j.corked=1,this.uncork()),j.ending||ln(this,j,W),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ut(N){return N.ending&&N.length===0&&N.bufferedRequest===null&&!N.finished&&!N.writing}function Te(N,L){N._final(function(W){L.pendingcb--,W&&x(N,W),L.prefinished=!0,N.emit("prefinish"),Rt(N,L)})}function Ie(N,L){!L.prefinished&&!L.finalCalled&&(typeof N._final=="function"&&!L.destroyed?(L.pendingcb++,L.finalCalled=!0,process.nextTick(Te,N,L)):(L.prefinished=!0,N.emit("prefinish")))}function Rt(N,L){var W=ut(L);if(W&&(Ie(N,L),L.pendingcb===0&&(L.finished=!0,N.emit("finish"),L.autoDestroy))){var j=N._readableState;(!j||j.autoDestroy&&j.endEmitted)&&N.destroy()}return W}function ln(N,L,W){L.ending=!0,Rt(N,L),W&&(L.finished?process.nextTick(W):N.once("finish",W)),L.ended=!0,N.writable=!1}function Ve(N,L,W){var j=N.entry;for(N.entry=null;j;){var Q=j.callback;L.pendingcb--,Q(W),j=j.next}L.corkedRequestsFree.next=N}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(L){this._writableState&&(this._writableState.destroyed=L)}}),D.prototype.destroy=c.destroy,D.prototype._undestroy=c.undestroy,D.prototype._destroy=function(N,L){L(N)},C2}var k2,eT;function cc(){if(eT)return k2;eT=1;var e=Object.keys||function(l){var u=[];for(var f in l)u.push(f);return u};k2=o;var t=oT(),n=Jk();oc(o,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var a=r[i];o.prototype[a]||(o.prototype[a]=n.prototype[a])}function o(l){if(!(this instanceof o))return new o(l);t.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(c,this)}function c(l){l.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),k2}var T2={},I2={exports:{}};(function(e,t){var n=we,r=n.Buffer;function i(o,s){for(var c in o)s[c]=o[c]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a);function a(o,s,c){return r(o,s,c)}i(r,a),a.from=function(o,s,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,c)},a.alloc=function(o,s,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=r(o);return s!==void 0?typeof c=="string"?l.fill(s,c):l.fill(s):l.fill(0),l},a.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},a.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)}})(I2,I2.exports);var xJ=I2.exports,R2=xJ.Buffer,tT=R2.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function AJ(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function EJ(e){var t=AJ(e);if(typeof t!="string"&&(R2.isEncoding===tT||!tT(e)))throw new Error("Unknown encoding: "+e);return t||e}var SJ=T2.StringDecoder=Ku;function Ku(e){this.encoding=EJ(e);var t;switch(this.encoding){case"utf16le":this.text=RJ,this.end=DJ,t=4;break;case"utf8":this.fillLast=kJ,t=4;break;case"base64":this.text=BJ,this.end=FJ,t=3;break;default:this.write=PJ,this.end=MJ;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=R2.allocUnsafe(t)}Ku.prototype.write=function(e){if(e.length===0)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},Ku.prototype.end=IJ,Ku.prototype.text=TJ,Ku.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function D2(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function _J(e,t,n){var r=t.length-1;if(r<n)return 0;var i=D2(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=D2(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=D2(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function CJ(e,t,n){if((t[0]&192)!==128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"�"}}function kJ(e){var t=this.lastTotal-this.lastNeed,n=CJ(this,e);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function TJ(e,t){var n=_J(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function IJ(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function RJ(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function DJ(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function BJ(e,t){var n=(e.length-t)%3;return n===0?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function FJ(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function PJ(e){return e.toString(this.encoding)}function MJ(e){return e&&e.length?this.write(e):""}var B2,nT;function F2(){if(nT)return B2;nT=1;var e=sc().codes.ERR_STREAM_PREMATURE_CLOSE;function t(a){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];a.apply(this,c)}}}function n(){}function r(a){return a.setHeader&&typeof a.abort=="function"}function i(a,o,s){if(typeof o=="function")return i(a,null,o);o||(o={}),s=t(s||n);var c=o.readable||o.readable!==!1&&a.readable,l=o.writable||o.writable!==!1&&a.writable,u=function(){a.writable||h()},f=a._writableState&&a._writableState.finished,h=function(){l=!1,f=!0,c||s.call(a)},d=a._readableState&&a._readableState.endEmitted,p=function(){c=!1,d=!0,l||s.call(a)},g=function(A){s.call(a,A)},b=function(){var A;if(c&&!d)return(!a._readableState||!a._readableState.ended)&&(A=new e),s.call(a,A);if(l&&!f)return(!a._writableState||!a._writableState.ended)&&(A=new e),s.call(a,A)},y=function(){a.req.on("finish",h)};return r(a)?(a.on("complete",h),a.on("abort",b),a.req?y():a.on("request",y)):l&&!a._writableState&&(a.on("end",u),a.on("close",u)),a.on("end",p),a.on("finish",h),o.error!==!1&&a.on("error",g),a.on("close",b),function(){a.removeListener("complete",h),a.removeListener("abort",b),a.removeListener("request",y),a.req&&a.req.removeListener("finish",h),a.removeListener("end",u),a.removeListener("close",u),a.removeListener("finish",h),a.removeListener("end",p),a.removeListener("error",g),a.removeListener("close",b)}}return B2=i,B2}var P2,rT;function OJ(){if(rT)return P2;rT=1;var e;function t(A,x,C){return x=n(x),x in A?Object.defineProperty(A,x,{value:C,enumerable:!0,configurable:!0,writable:!0}):A[x]=C,A}function n(A){var x=r(A,"string");return typeof x=="symbol"?x:String(x)}function r(A,x){if(typeof A!="object"||A===null)return A;var C=A[Symbol.toPrimitive];if(C!==void 0){var _=C.call(A,x||"default");if(typeof _!="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(A)}var i=F2(),a=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function h(A,x){return{value:A,done:x}}function d(A){var x=A[a];if(x!==null){var C=A[f].read();C!==null&&(A[l]=null,A[a]=null,A[o]=null,x(h(C,!1)))}}function p(A){process.nextTick(d,A)}function g(A,x){return function(C,_){A.then(function(){if(x[c]){C(h(void 0,!0));return}x[u](C,_)},_)}}var b=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var x=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[c])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(M,G){process.nextTick(function(){x[s]?G(x[s]):M(h(void 0,!0))})});var _=this[l],I;if(_)I=new Promise(g(_,this));else{var D=this[f].read();if(D!==null)return Promise.resolve(h(D,!1));I=new Promise(this[u])}return this[l]=I,I}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var x=this;return new Promise(function(C,_){x[f].destroy(null,function(I){if(I){_(I);return}C(h(void 0,!0))})})}),e),b),w=function(x){var C,_=Object.create(y,(C={},t(C,f,{value:x,writable:!0}),t(C,a,{value:null,writable:!0}),t(C,o,{value:null,writable:!0}),t(C,s,{value:null,writable:!0}),t(C,c,{value:x._readableState.endEmitted,writable:!0}),t(C,u,{value:function(D,M){var G=_[f].read();G?(_[l]=null,_[a]=null,_[o]=null,D(h(G,!1))):(_[a]=D,_[o]=M)},writable:!0}),C));return _[l]=null,i(x,function(I){if(I&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=_[o];D!==null&&(_[l]=null,_[a]=null,_[o]=null,D(I)),_[s]=I;return}var M=_[a];M!==null&&(_[l]=null,_[a]=null,_[o]=null,M(h(void 0,!0))),_[c]=!0}),x.on("readable",p.bind(null,_)),_};return P2=w,P2}var M2,iT;function LJ(){return iT||(iT=1,M2=function(){throw new Error("Readable.from is not available in the browser")}),M2}var O2,aT;function oT(){if(aT)return O2;aT=1,O2=M;var e;M.ReadableState=D,y2.EventEmitter;var t=function(S,V){return S.listeners(V).length},n=Gk(),r=we.Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(T){return r.from(T)}function o(T){return r.isBuffer(T)||T instanceof i}var s=Vk,c;s&&s.debuglog?c=s.debuglog("stream"):c=function(){};var l=vJ(),u=Wk(),f=Qk(),h=f.getHighWaterMark,d=sc().codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_STREAM_PUSH_AFTER_EOF,b=d.ERR_METHOD_NOT_IMPLEMENTED,y=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w,A,x;oc(M,n);var C=u.errorOrDestroy,_=["error","close","destroy","pause","resume"];function I(T,S,V){if(typeof T.prependListener=="function")return T.prependListener(S,V);!T._events||!T._events[S]?T.on(S,V):Array.isArray(T._events[S])?T._events[S].unshift(V):T._events[S]=[V,T._events[S]]}function D(T,S,V){e=e||cc(),T=T||{},typeof V!="boolean"&&(V=S instanceof e),this.objectMode=!!T.objectMode,V&&(this.objectMode=this.objectMode||!!T.readableObjectMode),this.highWaterMark=h(this,T,"readableHighWaterMark",V),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=T.emitClose!==!1,this.autoDestroy=!!T.autoDestroy,this.destroyed=!1,this.defaultEncoding=T.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,T.encoding&&(w||(w=T2.StringDecoder),this.decoder=new w(T.encoding),this.encoding=T.encoding)}function M(T){if(e=e||cc(),!(this instanceof M))return new M(T);var S=this instanceof e;this._readableState=new D(T,this,S),this.readable=!0,T&&(typeof T.read=="function"&&(this._read=T.read),typeof T.destroy=="function"&&(this._destroy=T.destroy)),n.call(this)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(S){this._readableState&&(this._readableState.destroyed=S)}}),M.prototype.destroy=u.destroy,M.prototype._undestroy=u.undestroy,M.prototype._destroy=function(T,S){S(T)},M.prototype.push=function(T,S){var V=this._readableState,Y;return V.objectMode?Y=!0:typeof T=="string"&&(S=S||V.defaultEncoding,S!==V.encoding&&(T=r.from(T,S),S=""),Y=!0),G(this,T,S,!1,Y)},M.prototype.unshift=function(T){return G(this,T,null,!0,!1)};function G(T,S,V,Y,de){c("readableAddChunk",S);var ie=T._readableState;if(S===null)ie.reading=!1,st(T,ie);else{var pe;if(de||(pe=ae(ie,S)),pe)C(T,pe);else if(ie.objectMode||S&&S.length>0)if(typeof S!="string"&&!ie.objectMode&&Object.getPrototypeOf(S)!==r.prototype&&(S=a(S)),Y)ie.endEmitted?C(T,new y):O(T,ie,S,!0);else if(ie.ended)C(T,new g);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!V?(S=ie.decoder.write(S),ie.objectMode||S.length!==0?O(T,ie,S,!1):tt(T,ie)):O(T,ie,S,!1)}else Y||(ie.reading=!1,tt(T,ie))}return!ie.ended&&(ie.length<ie.highWaterMark||ie.length===0)}function O(T,S,V,Y){S.flowing&&S.length===0&&!S.sync?(S.awaitDrain=0,T.emit("data",V)):(S.length+=S.objectMode?1:V.length,Y?S.buffer.unshift(V):S.buffer.push(V),S.needReadable&&Ne(T)),tt(T,S)}function ae(T,S){var V;return!o(S)&&typeof S!="string"&&S!==void 0&&!T.objectMode&&(V=new p("chunk",["string","Buffer","Uint8Array"],S)),V}M.prototype.isPaused=function(){return this._readableState.flowing===!1},M.prototype.setEncoding=function(T){w||(w=T2.StringDecoder);var S=new w(T);this._readableState.decoder=S,this._readableState.encoding=this._readableState.decoder.encoding;for(var V=this._readableState.buffer.head,Y="";V!==null;)Y+=S.write(V.data),V=V.next;return this._readableState.buffer.clear(),Y!==""&&this._readableState.buffer.push(Y),this._readableState.length=Y.length,this};var se=1073741824;function ve(T){return T>=se?T=se:(T--,T|=T>>>1,T|=T>>>2,T|=T>>>4,T|=T>>>8,T|=T>>>16,T++),T}function Pe(T,S){return T<=0||S.length===0&&S.ended?0:S.objectMode?1:T!==T?S.flowing&&S.length?S.buffer.head.data.length:S.length:(T>S.highWaterMark&&(S.highWaterMark=ve(T)),T<=S.length?T:S.ended?S.length:(S.needReadable=!0,0))}M.prototype.read=function(T){c("read",T),T=parseInt(T,10);var S=this._readableState,V=T;if(T!==0&&(S.emittedReadable=!1),T===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return c("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?W(this):Ne(this),null;if(T=Pe(T,S),T===0&&S.ended)return S.length===0&&W(this),null;var Y=S.needReadable;c("need readable",Y),(S.length===0||S.length-T<S.highWaterMark)&&(Y=!0,c("length less than watermark",Y)),S.ended||S.reading?(Y=!1,c("reading or ended",Y)):Y&&(c("do read"),S.reading=!0,S.sync=!0,S.length===0&&(S.needReadable=!0),this._read(S.highWaterMark),S.sync=!1,S.reading||(T=Pe(V,S)));var de;return T>0?de=L(T,S):de=null,de===null?(S.needReadable=S.length<=S.highWaterMark,T=0):(S.length-=T,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),V!==T&&S.ended&&W(this)),de!==null&&this.emit("data",de),de};function st(T,S){if(c("onEofChunk"),!S.ended){if(S.decoder){var V=S.decoder.end();V&&V.length&&(S.buffer.push(V),S.length+=S.objectMode?1:V.length)}S.ended=!0,S.sync?Ne(T):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,lt(T)))}}function Ne(T){var S=T._readableState;c("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(c("emitReadable",S.flowing),S.emittedReadable=!0,process.nextTick(lt,T))}function lt(T){var S=T._readableState;c("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(T.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,N(T)}function tt(T,S){S.readingMore||(S.readingMore=!0,process.nextTick(ut,T,S))}function ut(T,S){for(;!S.reading&&!S.ended&&(S.length<S.highWaterMark||S.flowing&&S.length===0);){var V=S.length;if(c("maybeReadMore read 0"),T.read(0),V===S.length)break}S.readingMore=!1}M.prototype._read=function(T){C(this,new b("_read()"))},M.prototype.pipe=function(T,S){var V=this,Y=this._readableState;switch(Y.pipesCount){case 0:Y.pipes=T;break;case 1:Y.pipes=[Y.pipes,T];break;default:Y.pipes.push(T);break}Y.pipesCount+=1,c("pipe count=%d opts=%j",Y.pipesCount,S);var de=(!S||S.end!==!1)&&T!==process.stdout&&T!==process.stderr,ie=de?un:Br;Y.endEmitted?process.nextTick(ie):V.once("end",ie),T.on("unpipe",pe);function pe(E,m){c("onunpipe"),E===V&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,da())}function un(){c("onend"),T.end()}var fa=Te(V);T.on("drain",fa);var ha=!1;function da(){c("cleanup"),T.removeListener("close",pa),T.removeListener("finish",fn),T.removeListener("drain",fa),T.removeListener("error",fi),T.removeListener("unpipe",pe),V.removeListener("end",un),V.removeListener("end",Br),V.removeListener("data",Gt),ha=!0,Y.awaitDrain&&(!T._writableState||T._writableState.needDrain)&&fa()}V.on("data",Gt);function Gt(E){c("ondata");var m=T.write(E);c("dest.write",m),m===!1&&((Y.pipesCount===1&&Y.pipes===T||Y.pipesCount>1&&Q(Y.pipes,T)!==-1)&&!ha&&(c("false write response, pause",Y.awaitDrain),Y.awaitDrain++),V.pause())}function fi(E){c("onerror",E),Br(),T.removeListener("error",fi),t(T,"error")===0&&C(T,E)}I(T,"error",fi);function pa(){T.removeListener("finish",fn),Br()}T.once("close",pa);function fn(){c("onfinish"),T.removeListener("close",pa),Br()}T.once("finish",fn);function Br(){c("unpipe"),V.unpipe(T)}return T.emit("pipe",V),Y.flowing||(c("pipe resume"),V.resume()),T};function Te(T){return function(){var V=T._readableState;c("pipeOnDrain",V.awaitDrain),V.awaitDrain&&V.awaitDrain--,V.awaitDrain===0&&t(T,"data")&&(V.flowing=!0,N(T))}}M.prototype.unpipe=function(T){var S=this._readableState,V={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return T&&T!==S.pipes?this:(T||(T=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,T&&T.emit("unpipe",this,V),this);if(!T){var Y=S.pipes,de=S.pipesCount;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var ie=0;ie<de;ie++)Y[ie].emit("unpipe",this,{hasUnpiped:!1});return this}var pe=Q(S.pipes,T);return pe===-1?this:(S.pipes.splice(pe,1),S.pipesCount-=1,S.pipesCount===1&&(S.pipes=S.pipes[0]),T.emit("unpipe",this,V),this)},M.prototype.on=function(T,S){var V=n.prototype.on.call(this,T,S),Y=this._readableState;return T==="data"?(Y.readableListening=this.listenerCount("readable")>0,Y.flowing!==!1&&this.resume()):T==="readable"&&!Y.endEmitted&&!Y.readableListening&&(Y.readableListening=Y.needReadable=!0,Y.flowing=!1,Y.emittedReadable=!1,c("on readable",Y.length,Y.reading),Y.length?Ne(this):Y.reading||process.nextTick(Rt,this)),V},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(T,S){var V=n.prototype.removeListener.call(this,T,S);return T==="readable"&&process.nextTick(Ie,this),V},M.prototype.removeAllListeners=function(T){var S=n.prototype.removeAllListeners.apply(this,arguments);return(T==="readable"||T===void 0)&&process.nextTick(Ie,this),S};function Ie(T){var S=T._readableState;S.readableListening=T.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:T.listenerCount("data")>0&&T.resume()}function Rt(T){c("readable nexttick read 0"),T.read(0)}M.prototype.resume=function(){var T=this._readableState;return T.flowing||(c("resume"),T.flowing=!T.readableListening,ln(this,T)),T.paused=!1,this};function ln(T,S){S.resumeScheduled||(S.resumeScheduled=!0,process.nextTick(Ve,T,S))}function Ve(T,S){c("resume",S.reading),S.reading||T.read(0),S.resumeScheduled=!1,T.emit("resume"),N(T),S.flowing&&!S.reading&&T.read(0)}M.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function N(T){var S=T._readableState;for(c("flow",S.flowing);S.flowing&&T.read()!==null;);}M.prototype.wrap=function(T){var S=this,V=this._readableState,Y=!1;T.on("end",function(){if(c("wrapped end"),V.decoder&&!V.ended){var pe=V.decoder.end();pe&&pe.length&&S.push(pe)}S.push(null)}),T.on("data",function(pe){if(c("wrapped data"),V.decoder&&(pe=V.decoder.write(pe)),!(V.objectMode&&pe==null)&&!(!V.objectMode&&(!pe||!pe.length))){var un=S.push(pe);un||(Y=!0,T.pause())}});for(var de in T)this[de]===void 0&&typeof T[de]=="function"&&(this[de]=function(un){return function(){return T[un].apply(T,arguments)}}(de));for(var ie=0;ie<_.length;ie++)T.on(_[ie],this.emit.bind(this,_[ie]));return this._read=function(pe){c("wrapped _read",pe),Y&&(Y=!1,T.resume())},this},typeof Symbol=="function"&&(M.prototype[Symbol.asyncIterator]=function(){return A===void 0&&(A=OJ()),A(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(S){this._readableState&&(this._readableState.flowing=S)}}),M._fromList=L,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function L(T,S){if(S.length===0)return null;var V;return S.objectMode?V=S.buffer.shift():!T||T>=S.length?(S.decoder?V=S.buffer.join(""):S.buffer.length===1?V=S.buffer.first():V=S.buffer.concat(S.length),S.buffer.clear()):V=S.buffer.consume(T,S.decoder),V}function W(T){var S=T._readableState;c("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,process.nextTick(j,S,T))}function j(T,S){if(c("endReadableNT",T.endEmitted,T.length),!T.endEmitted&&T.length===0&&(T.endEmitted=!0,S.readable=!1,S.emit("end"),T.autoDestroy)){var V=S._writableState;(!V||V.autoDestroy&&V.finished)&&S.destroy()}}typeof Symbol=="function"&&(M.from=function(T,S){return x===void 0&&(x=LJ()),x(M,T,S)});function Q(T,S){for(var V=0,Y=T.length;V<Y;V++)if(T[V]===S)return V;return-1}return O2}var L2,sT;function cT(){if(sT)return L2;sT=1,L2=s;var e=sc().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,a=cc();oc(s,a);function o(u,f){var h=this._transformState;h.transforming=!1;var d=h.writecb;if(d===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),d(u);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);a.call(this,u),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",c)}function c(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){l(u,f,h)}):l(this,null,null)}s.prototype.push=function(u,f){return this._transformState.needTransform=!1,a.prototype.push.call(this,u,f)},s.prototype._transform=function(u,f,h){h(new t("_transform()"))},s.prototype._write=function(u,f,h){var d=this._transformState;if(d.writecb=h,d.writechunk=u,d.writeencoding=f,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},s.prototype._read=function(u){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},s.prototype._destroy=function(u,f){a.prototype._destroy.call(this,u,function(h){f(h)})};function l(u,f,h){if(f)return u.emit("error",f);if(h!=null&&u.push(h),u._writableState.length)throw new i;if(u._transformState.transforming)throw new r;return u.push(null)}return L2}var N2,lT;function NJ(){if(lT)return N2;lT=1,N2=t;var e=cT();oc(t,e);function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return t.prototype._transform=function(n,r,i){i(null,n)},N2}var z2,uT;function zJ(){if(uT)return z2;uT=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=sc().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function a(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,d,p,g){g=t(g);var b=!1;h.on("close",function(){b=!0}),e===void 0&&(e=F2()),e(h,{readable:d,writable:p},function(w){if(w)return g(w);b=!0,g()});var y=!1;return function(w){if(!b&&!y){if(y=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();g(w||new i("pipe"))}}}function c(h){h()}function l(h,d){return h.pipe(d)}function u(h){return!h.length||typeof h[h.length-1]!="function"?a:h.pop()}function f(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var g=u(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var b,y=d.map(function(w,A){var x=A<d.length-1,C=A>0;return s(w,x,C,function(_){b||(b=_),_&&y.forEach(c),!x&&(y.forEach(c),g(b))})});return d.reduce(l)}return z2=f,z2}var fT=On,U2=y2.EventEmitter,UJ=oc;UJ(On,U2),On.Readable=oT(),On.Writable=Jk(),On.Duplex=cc(),On.Transform=cT(),On.PassThrough=NJ(),On.finished=F2(),On.pipeline=zJ(),On.Stream=On;function On(){U2.call(this)}On.prototype.pipe=function(e,t){var n=this;function r(u){e.writable&&e.write(u)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",o),n.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function c(u){if(l(),U2.listenerCount(this,"error")===0)throw u}n.on("error",c),e.on("error",c);function l(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",o),n.removeListener("close",s),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e};function Ju(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function hT(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function ef(e){return hT(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function ii(e){return hT(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function dT(e){if(!(e&&e.length)||e===".")return{};const t={};return e.replace(/\r?\n$/,"").split(";").forEach(n=>{const r=n.split("=",2);if(!(r[1]&&r[1].length))return;r[0]=r[0].trim();let i=t[r[0].trim()];i||(i=[],t[r[0]]=i),i.push(...r[1].split(",").map(a=>a.trim()).map(Ju))}),t}function pT(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&Ju(t[0]),source:t[1]&&Ju(t[1]),type:t[2]&&Ju(t[2]),start:t[3]===null?null:parseInt(t[3],10),end:t[4]===null?null:parseInt(t[4],10),score:t[5]===null?null:parseFloat(t[5]),strand:t[6],phase:t[7],attributes:t[8]===null?null:dT(t[8])}}function gT(e){const t=/^\s*##\s*(\S+)\s*(.*)/.exec(e);if(!t)return null;const[,n]=t;let[,,r]=t;const i={directive:n};if(r.length&&(r=r.replace(/\r?\n$/,""),i.value=r),n==="sequence-region"){const a=r.split(/\s+/,3);return{...i,seq_id:a[0],start:a[1]&&a[1].replace(/\D/g,""),end:a[2]&&a[2].replace(/\D/g,"")}}else if(n==="genome-build"){const[a,o]=r.split(/\s+/,2);return{...i,source:a,buildName:o}}return i}function mT(e){const t=[];return Object.entries(e).forEach(([n,r])=>{if(!r)return;let i;r.hasOwnProperty("toString")?i=ef(r.toString()):Array.isArray(r)?i=r.map(ef).join(","):i=ef(r),t.push(`${ef(n)}=${i}`)}),t.length?t.join(";"):"."}function $J(e,t){const n=e.attributes===null||e.attributes===void 0?".":mT(e.attributes),i=`${[e.seq_id===null?".":ii(e.seq_id),e.source===null?".":ii(e.source),e.type===null?".":ii(e.type),e.start===null?".":ii(e.start),e.end===null?".":ii(e.end),e.score===null?".":ii(e.score),e.strand===null?".":ii(e.strand),e.phase===null?".":ii(e.phase),n].join(" ")}
3442
+ `;return t[i]?"":(t[i]=!0,i)}function j0(e,t){if(Array.isArray(e))return e.map(r=>j0(r,t)).join("");const n=[$J(e,t)];return HJ(e)&&n.push(...e.child_features.map(r=>j0(r,t)),...e.derived_features.map(r=>j0(r,t))),n.join("")}function bT(e){return j0(e,{})}function yT(e){let t=`##${e.directive}`;return e.value&&(t+=` ${e.value}`),t+=`
3440
3443
  `,t}function vT(e){return`# ${e.comment}
3441
3444
  `}function $2(e){return`>${e.id}${e.description?` ${e.description}`:""}
3442
3445
  ${e.sequence}
3443
3446
  `}function q0(e){function t(n){return"attributes"in n?bT(n):"directive"in n?yT(n):"sequence"in n?$2(n):"comment"in n?vT(n):`# (invalid item found during format)
3444
- `}return Array.isArray(e)?e.map(t):t(e)}function $J(e){return e.child_features!==void 0&&e.derived_features!==void 0}const HJ=Object.freeze(Object.defineProperty({__proto__:null,escape:ef,escapeColumn:ii,formatAttributes:mT,formatComment:vT,formatDirective:yT,formatFeature:bT,formatItem:q0,formatSequence:$2,parseAttributes:dT,parseDirective:gT,parseFeature:pT,unescape:Ju},Symbol.toStringTag,{value:"Module"})),wT={Parent:"child_features",Derives_from:"derived_features"};class xT{constructor(t){this.seqCallback=t,this.currentSequence=void 0}addLine(t){const n=/^>\s*(\S+)\s*(.*)/.exec(t);n?(this._flush(),this.currentSequence={id:n[1],sequence:""},n[2]&&(this.currentSequence.description=n[2].trim())):this.currentSequence&&/\S/.test(t)&&(this.currentSequence.sequence+=t.replace(/\s/g,""))}_flush(){this.currentSequence&&this.seqCallback(this.currentSequence)}finish(){this._flush()}}class AT{constructor(t){this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};const n=()=>{};this.featureCallback=t.featureCallback||n,this.endCallback=t.endCallback||n,this.commentCallback=t.commentCallback||n,this.errorCallback=t.errorCallback||n,this.directiveCallback=t.directiveCallback||n,this.sequenceCallback=t.sequenceCallback||n,this.disableDerivesFromReferences=t.disableDerivesFromReferences||!1,this.bufferSize=t.bufferSize===void 0?1e3:t.bufferSize}addLine(t){if(this.fastaParser){this.fastaParser.addLine(t);return}if(this.eof)return;if(this.lineNumber+=1,/^\s*[^#\s>]/.test(t)){this._bufferLine(t);return}const n=/^\s*(#+)(.*)/.exec(t);if(n){const[,r]=n;let[,,i]=n;if(r.length===3)this._emitAllUnderConstructionFeatures();else if(r.length===2){const a=gT(t);a&&(a.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new xT(this.sequenceCallback)):this._emitItem(a))}else i=i.replace(/\s*/,""),this._emitItem({comment:i})}else if(!/^\s*$/.test(t))if(/^\s*>/.test(t))this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new xT(this.sequenceCallback),this.fastaParser.addLine(t);else{const r=t.replace(/\r?\n?$/g,"");throw new Error(`GFF3 parse error. Cannot parse '${r}'.`)}}finish(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}_emitItem(t){Array.isArray(t)?this.featureCallback(t):"directive"in t?this.directiveCallback(t):"comment"in t&&this.commentCallback(t)}_enforceBufferSizeLimit(t=0){const n=r=>{r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach(a=>{delete this._underConstructionById[a],delete this._completedReferences[a]}),r.forEach(a=>{a.child_features&&a.child_features.forEach(o=>n(o)),a.derived_features&&a.derived_features.forEach(o=>n(o))}))};for(;this._underConstructionTopLevel.length+t>this.bufferSize;){const r=this._underConstructionTopLevel.shift();r&&(this._emitItem(r),n(r))}}_emitAllUnderConstructionFeatures(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${Object.keys(this._underConstructionOrphans)}`)}_bufferLine(t){var n,r,i;const o={...pT(t),child_features:[],derived_features:[]},s=((n=o.attributes)===null||n===void 0?void 0:n.ID)||[],c=((r=o.attributes)===null||r===void 0?void 0:r.Parent)||[],l=this.disableDerivesFromReferences?[]:((i=o.attributes)===null||i===void 0?void 0:i.Derives_from)||[];if(!s.length&&!c.length&&!l.length){this._emitItem([o]);return}let u;s.forEach(f=>{const h=this._underConstructionById[f];h?(h[h.length-1].type!==o.type&&this._parseError(`multi-line feature "${f}" has inconsistent types: "${o.type}", "${h[h.length-1].type}"`),h.push(o),u=h):(u=[o],this._enforceBufferSizeLimit(1),!c.length&&!l.length&&this._underConstructionTopLevel.push(u),this._underConstructionById[f]=u,this._resolveReferencesTo(u,f))}),this._resolveReferencesFrom(u||[o],{Parent:c,Derives_from:l},s)}_resolveReferencesTo(t,n){const r=this._underConstructionOrphans[n];r&&(t.forEach(i=>{i.child_features.push(...r.Parent)}),t.forEach(i=>{i.derived_features.push(...r.Derives_from)}),delete this._underConstructionOrphans[n])}_parseError(t){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${t}`)}_resolveReferencesFrom(t,n,r){function i(a,o,s){let c=a[o];c||(c={},a[o]=c);const l=c[s]||!1;return c[s]=!0,l}n.Parent.forEach(a=>{const o=this._underConstructionById[a];if(o){const s=wT.Parent;r.filter(c=>i(this._completedReferences,c,`Parent,${a}`)).length||o.forEach(c=>{c[s].push(t)})}else{let s=this._underConstructionOrphans[a];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[a]=s),s.Parent.push(t)}}),n.Derives_from.forEach(a=>{const o=this._underConstructionById[a];if(o){const s=wT.Derives_from;r.filter(c=>i(this._completedReferences,c,`Derives_from,${a}`)).length||o.forEach(c=>{c[s].push(t)})}else{let s=this._underConstructionOrphans[a];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[a]=s),s.Derives_from.push(t)}})}}function H2(e){process&&process.nextTick?process.nextTick(e):e()}function ET(e){const t={encoding:"utf8",parseFeatures:!0,parseDirectives:!1,parseSequences:!0,parseComments:!1,bufferSize:1e3,disableDerivesFromReferences:!1,...e};return e.parseAll&&(t.parseFeatures=!0,t.parseDirectives=!0,t.parseComments=!0,t.parseSequences=!0),t}class GJ extends fT.Transform{constructor(t={}){super({objectMode:!0}),this.textBuffer="";const n=ET(t);this.encoding=t.encoding||"utf8",this.decoder=new EJ;const r=this.push.bind(this);this.parser=new AT({featureCallback:n.parseFeatures?r:void 0,directiveCallback:n.parseDirectives?r:void 0,commentCallback:n.parseComments?r:void 0,sequenceCallback:n.parseSequences?r:void 0,errorCallback:i=>this.emit("error",i),bufferSize:n.bufferSize,disableDerivesFromReferences:n.disableDerivesFromReferences})}_addLine(t){t&&this.parser.addLine(t)}_nextText(t){const n=(this.textBuffer+t).split(/\r?\n/);this.textBuffer=n.pop()||"",n.forEach(r=>this._addLine(r))}_transform(t,n,r){this._nextText(this.decoder.write(t)),H2(r)}_flush(t){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),H2(t)}}function VJ(e={}){return new GJ(e)}function jJ(e,t={}){if(!e)return[];const n=ET(t),r=[],i=r.push.bind(r),a=new AT({featureCallback:n.parseFeatures?i:void 0,directiveCallback:n.parseDirectives?i:void 0,commentCallback:n.parseComments?i:void 0,sequenceCallback:n.parseSequences?i:void 0,disableDerivesFromReferences:n.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:o=>{throw o}});return e.split(/\r?\n/).forEach(a.addLine.bind(a)),a.finish(),r}function qJ(e){const t=[],n=[];e.forEach(i=>{"sequence"in i?n.push(i):t.push(i)});let r=t.map(q0).join("");return n.length&&(r+=`##FASTA
3447
+ `}return Array.isArray(e)?e.map(t):t(e)}function HJ(e){return e.child_features!==void 0&&e.derived_features!==void 0}const GJ=Object.freeze(Object.defineProperty({__proto__:null,escape:ef,escapeColumn:ii,formatAttributes:mT,formatComment:vT,formatDirective:yT,formatFeature:bT,formatItem:q0,formatSequence:$2,parseAttributes:dT,parseDirective:gT,parseFeature:pT,unescape:Ju},Symbol.toStringTag,{value:"Module"})),wT={Parent:"child_features",Derives_from:"derived_features"};class xT{constructor(t){this.seqCallback=t,this.currentSequence=void 0}addLine(t){const n=/^>\s*(\S+)\s*(.*)/.exec(t);n?(this._flush(),this.currentSequence={id:n[1],sequence:""},n[2]&&(this.currentSequence.description=n[2].trim())):this.currentSequence&&/\S/.test(t)&&(this.currentSequence.sequence+=t.replace(/\s/g,""))}_flush(){this.currentSequence&&this.seqCallback(this.currentSequence)}finish(){this._flush()}}class AT{constructor(t){this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};const n=()=>{};this.featureCallback=t.featureCallback||n,this.endCallback=t.endCallback||n,this.commentCallback=t.commentCallback||n,this.errorCallback=t.errorCallback||n,this.directiveCallback=t.directiveCallback||n,this.sequenceCallback=t.sequenceCallback||n,this.disableDerivesFromReferences=t.disableDerivesFromReferences||!1,this.bufferSize=t.bufferSize===void 0?1e3:t.bufferSize}addLine(t){if(this.fastaParser){this.fastaParser.addLine(t);return}if(this.eof)return;if(this.lineNumber+=1,/^\s*[^#\s>]/.test(t)){this._bufferLine(t);return}const n=/^\s*(#+)(.*)/.exec(t);if(n){const[,r]=n;let[,,i]=n;if(r.length===3)this._emitAllUnderConstructionFeatures();else if(r.length===2){const a=gT(t);a&&(a.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new xT(this.sequenceCallback)):this._emitItem(a))}else i=i.replace(/\s*/,""),this._emitItem({comment:i})}else if(!/^\s*$/.test(t))if(/^\s*>/.test(t))this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new xT(this.sequenceCallback),this.fastaParser.addLine(t);else{const r=t.replace(/\r?\n?$/g,"");throw new Error(`GFF3 parse error. Cannot parse '${r}'.`)}}finish(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}_emitItem(t){Array.isArray(t)?this.featureCallback(t):"directive"in t?this.directiveCallback(t):"comment"in t&&this.commentCallback(t)}_enforceBufferSizeLimit(t=0){const n=r=>{r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach(a=>{delete this._underConstructionById[a],delete this._completedReferences[a]}),r.forEach(a=>{a.child_features&&a.child_features.forEach(o=>n(o)),a.derived_features&&a.derived_features.forEach(o=>n(o))}))};for(;this._underConstructionTopLevel.length+t>this.bufferSize;){const r=this._underConstructionTopLevel.shift();r&&(this._emitItem(r),n(r))}}_emitAllUnderConstructionFeatures(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${Object.keys(this._underConstructionOrphans)}`)}_bufferLine(t){var n,r,i;const o={...pT(t),child_features:[],derived_features:[]},s=((n=o.attributes)===null||n===void 0?void 0:n.ID)||[],c=((r=o.attributes)===null||r===void 0?void 0:r.Parent)||[],l=this.disableDerivesFromReferences?[]:((i=o.attributes)===null||i===void 0?void 0:i.Derives_from)||[];if(!s.length&&!c.length&&!l.length){this._emitItem([o]);return}let u;s.forEach(f=>{const h=this._underConstructionById[f];h?(h[h.length-1].type!==o.type&&this._parseError(`multi-line feature "${f}" has inconsistent types: "${o.type}", "${h[h.length-1].type}"`),h.push(o),u=h):(u=[o],this._enforceBufferSizeLimit(1),!c.length&&!l.length&&this._underConstructionTopLevel.push(u),this._underConstructionById[f]=u,this._resolveReferencesTo(u,f))}),this._resolveReferencesFrom(u||[o],{Parent:c,Derives_from:l},s)}_resolveReferencesTo(t,n){const r=this._underConstructionOrphans[n];r&&(t.forEach(i=>{i.child_features.push(...r.Parent)}),t.forEach(i=>{i.derived_features.push(...r.Derives_from)}),delete this._underConstructionOrphans[n])}_parseError(t){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${t}`)}_resolveReferencesFrom(t,n,r){function i(a,o,s){let c=a[o];c||(c={},a[o]=c);const l=c[s]||!1;return c[s]=!0,l}n.Parent.forEach(a=>{const o=this._underConstructionById[a];if(o){const s=wT.Parent;r.filter(c=>i(this._completedReferences,c,`Parent,${a}`)).length||o.forEach(c=>{c[s].push(t)})}else{let s=this._underConstructionOrphans[a];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[a]=s),s.Parent.push(t)}}),n.Derives_from.forEach(a=>{const o=this._underConstructionById[a];if(o){const s=wT.Derives_from;r.filter(c=>i(this._completedReferences,c,`Derives_from,${a}`)).length||o.forEach(c=>{c[s].push(t)})}else{let s=this._underConstructionOrphans[a];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[a]=s),s.Derives_from.push(t)}})}}function H2(e){process&&process.nextTick?process.nextTick(e):e()}function ET(e){const t={encoding:"utf8",parseFeatures:!0,parseDirectives:!1,parseSequences:!0,parseComments:!1,bufferSize:1e3,disableDerivesFromReferences:!1,...e};return e.parseAll&&(t.parseFeatures=!0,t.parseDirectives=!0,t.parseComments=!0,t.parseSequences=!0),t}class VJ extends fT.Transform{constructor(t={}){super({objectMode:!0}),this.textBuffer="";const n=ET(t);this.encoding=t.encoding||"utf8",this.decoder=new SJ;const r=this.push.bind(this);this.parser=new AT({featureCallback:n.parseFeatures?r:void 0,directiveCallback:n.parseDirectives?r:void 0,commentCallback:n.parseComments?r:void 0,sequenceCallback:n.parseSequences?r:void 0,errorCallback:i=>this.emit("error",i),bufferSize:n.bufferSize,disableDerivesFromReferences:n.disableDerivesFromReferences})}_addLine(t){t&&this.parser.addLine(t)}_nextText(t){const n=(this.textBuffer+t).split(/\r?\n/);this.textBuffer=n.pop()||"",n.forEach(r=>this._addLine(r))}_transform(t,n,r){this._nextText(this.decoder.write(t)),H2(r)}_flush(t){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),H2(t)}}function jJ(e={}){return new VJ(e)}function qJ(e,t={}){if(!e)return[];const n=ET(t),r=[],i=r.push.bind(r),a=new AT({featureCallback:n.parseFeatures?i:void 0,directiveCallback:n.parseDirectives?i:void 0,commentCallback:n.parseComments?i:void 0,sequenceCallback:n.parseSequences?i:void 0,disableDerivesFromReferences:n.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:o=>{throw o}});return e.split(/\r?\n/).forEach(a.addLine.bind(a)),a.finish(),r}function WJ(e){const t=[],n=[];e.forEach(i=>{"sequence"in i?n.push(i):t.push(i)});let r=t.map(q0).join("");return n.length&&(r+=`##FASTA
3445
3448
  `,r+=n.map($2).join("")),r}class ST extends fT.Transform{constructor(t={}){super(Object.assign(t,{objectMode:!0})),this.linesSinceLastSyncMark=0,this.haveWeEmittedData=!1,this.fastaMode=!1,this.minLinesBetweenSyncMarks=t.minSyncLines||100,this.insertVersionDirective=t.insertVersionDirective||!1}_transform(t,n,r){let i;if(!this.haveWeEmittedData&&this.insertVersionDirective){const a=Array.isArray(t)?t[0]:t;"directive"in a&&a.directive!=="gff-version"&&this.push(`##gff-version 3
3446
3449
  `)}if("sequence"in t&&!this.fastaMode&&(this.push(`##FASTA
3447
3450
  `),this.fastaMode=!0),Array.isArray(t)?i=t.map(q0).join(""):i=q0(t),this.push(i),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
3448
3451
  `),this.linesSinceLastSyncMark=0;else{let a=0;for(let o=0;o<i.length;o+=1)i[o]===`
3449
- `&&(a+=1);this.linesSinceLastSyncMark+=a}this.haveWeEmittedData=!0,H2(r)}}function WJ(e={}){return new ST(e)}function YJ(e,t,n={}){const r={insertVersionDirective:!0,...n};return new Promise((i,a)=>{e.pipe(new ST(r)).on("end",()=>i(null)).on("error",a).pipe(t)})}const ZJ=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:VJ,parseStringSync:jJ,formatSync:qJ,formatStream:WJ,formatFile:YJ,util:HJ}},Symbol.toStringTag,{value:"Module"}));me.GenomeSpy=KE,me.GenomeSpyApp=u6,me.embed=Iq,me.html=$,me.icon=Z_,me.loadSpec=f6,Object.defineProperty(me,Symbol.toStringTag,{value:"Module"})});
3452
+ `&&(a+=1);this.linesSinceLastSyncMark+=a}this.haveWeEmittedData=!0,H2(r)}}function YJ(e={}){return new ST(e)}function ZJ(e,t,n={}){const r={insertVersionDirective:!0,...n};return new Promise((i,a)=>{e.pipe(new ST(r)).on("end",()=>i(null)).on("error",a).pipe(t)})}const QJ=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:jJ,parseStringSync:qJ,formatSync:WJ,formatStream:YJ,formatFile:ZJ,util:GJ}},Symbol.toStringTag,{value:"Module"}));me.GenomeSpy=KE,me.GenomeSpyApp=u6,me.embed=Rq,me.html=$,me.icon=Z_,me.loadSpec=f6,Object.defineProperty(me,Symbol.toStringTag,{value:"Module"})});