@genome-spy/app 0.48.0 → 0.48.1

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 +989 -960
  2. package/dist/index.js +104 -99
  3. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(ye,ke){typeof exports=="object"&&typeof module<"u"?ke(exports):typeof define=="function"&&define.amd?define(["exports"],ke):(ye=typeof globalThis<"u"?globalThis:ye||self,ke(ye.genomeSpyApp={}))})(this,function(ye){"use strict";var ane=Object.defineProperty;var one=(ye,ke,Me)=>ke in ye?ane(ye,ke,{enumerable:!0,configurable:!0,writable:!0,value:Me}):ye[ke]=Me;var jt=(ye,ke,Me)=>(one(ye,typeof ke!="symbol"?ke+"":ke,Me),Me),Vv=(ye,ke,Me)=>{if(!ke.has(ye))throw TypeError("Cannot "+Me)};var B=(ye,ke,Me)=>(Vv(ye,ke,"read from private field"),Me?Me.call(ye):ke.get(ye)),H=(ye,ke,Me)=>{if(ke.has(ye))throw TypeError("Cannot add the same private member more than once");ke instanceof WeakSet?ke.add(ye):ke.set(ye,Me)},ie=(ye,ke,Me,ts)=>(Vv(ye,ke,"write to private field"),ts?ts.call(ye,Me):ke.set(ye,Me),Me);var QI=(ye,ke,Me,ts)=>({set _(ph){ie(ye,ke,ph,Me)},get _(){return B(ye,ke,ts)}}),Y=(ye,ke,Me)=>(Vv(ye,ke,"access private method"),Me);var PI,wa,Sl,_l,Sf,_f,Cf,Bp,KI,Fp,JI,pi,kf,jv,Tf,qv,Vo,ch,Cl,Mp,eR,gi,kl,An,If,Rf,Wv,Nv,sne,cr,_i,Df,Yv,Pp,tR,Op,nR,Bf,Zv,Ff,Qv,Tl,gg,mi,Jo,Mf,Xv,Lp,rR,zv,lne,Pf,Kv,Of,Jv,Il,Lf,Nf,jo,uh,zf,ew,Uf,$f,tw,Hf,nw,Rl,Dl,Bl,Gf,Fl,Ml,Vf,rw,jf,iw,qo,qf,Wf,Yf,bi,Wo,xa,Aa,Pl,Ol,En,Yo,Ll,yi,es,Np,iR,Zo,fh,Zf,aw,Qf,ow,Xf,sw,zp,aR,Nl,mg,Up,oR,zl,Kf,Ea,Qo,Ul,$l,bg,$p,sR,Hp,lR,Gp,cR,Hl,vi,Sa,Jf,Vp,uR,jp,fR,eh,lw,qp,hR,tt,Wp,dR,Yp,pR,Zp,gR,Qp,mR,Xo,dh,Xp,bR,Kp,yR,Vn,_a,Ko,Gl,Vl,wi,jl,It,th,cw,lt,Gt,nh,ql,rh,Jp,vR,eg,wR,tg,xR,ih,uw,ng,AR,rg,ER,ig,SR,ag,_R,og,CR,sg,kR,lg,TR,Wl,yg,ah,oh,sh,fw,cg,IR,ug,RR,fg,DR;function ke(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 Me(e,t,n){return e.fields=t||[],e.fname=n,e}function ts(e){return e==null?null:e.fname}function ph(e){return e==null?null:e.fields}function BR(e){return e.length===1?FR(e[0]):MR(e)}const FR=e=>function(t){return t[e]},MR=e=>{const t=e.length;return function(n){for(let r=0;r<t;++r)n=n[e[r]];return n}};function ot(e){throw Error(e)}function PR(e){const t=[],n=e.length;let r=null,i=0,a="",o,s,l;e=e+"";function c(){t.push(a+e.substring(o,s)),a="",o=s+1}for(o=s=0;s<n;++s)if(l=e[s],l==="\\")a+=e.substring(o,s++),o=s;else if(l===r)c(),r=null,i=-1;else{if(r)continue;o===i&&l==='"'||o===i&&l==="'"?(o=s+1,r=l):l==="."&&!i?s>o?c():o=s+1:l==="["?(s>o&&c(),i=o=s+1):l==="]"&&(i||ot("Access path missing open bracket: "+e),i>0&&c(),i=0,o=s+1)}return i&&ot("Access path missing closing bracket: "+e),r&&ot("Access path missing closing quote: "+e),s>o&&(s++,c()),t}function gh(e,t,n){const r=PR(e);return e=r.length===1?r[0]:e,Me((n&&n.get||BR)(r),[e],t||e)}gh("id");const mh=Me(e=>e,[],"identity");Me(()=>0,[],"zero"),Me(()=>1,[],"one"),Me(()=>!0,[],"true"),Me(()=>!1,[],"false");var Lt=Array.isArray;function qt(e){return e===Object(e)}function qn(e){return e[e.length-1]}function Yl(e){return e==null||e===""?null:+e}const hw=e=>t=>e*Math.exp(t),dw=e=>t=>Math.log(e*t),OR=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),LR=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,bh=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function vg(e,t,n,r){const i=n(e[0]),a=n(qn(e)),o=(a-i)*t;return[r(i-o),r(a-o)]}function NR(e,t){return vg(e,t,Yl,mh)}function zR(e,t){var n=Math.sign(e[0]);return vg(e,t,dw(n),hw(n))}function UR(e,t,n){return vg(e,t,bh(n),bh(1/n))}function yh(e,t,n,r,i){const a=r(e[0]),o=r(qn(e)),s=t!=null?r(t):(a+o)/2;return[i(s+(a-s)*n),i(s+(o-s)*n)]}function wg(e,t,n){return yh(e,t,n,Yl,mh)}function pw(e,t,n){const r=Math.sign(e[0]);return yh(e,t,n,dw(r),hw(r))}function xg(e,t,n,r){return yh(e,t,n,bh(r),bh(1/r))}function $R(e,t,n,r){return yh(e,t,n,OR(r),LR(r))}function Ag(e){return e!=null?Lt(e)?e:[e]:[]}function HR(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 Jt(e){return typeof e=="function"}const GR="descending";function gw(e,t,n){n=n||{},t=Ag(t)||[];const r=[],i=[],a={},o=n.comparator||VR;return Ag(e).forEach((s,l)=>{s!=null&&(r.push(t[l]===GR?-1:1),i.push(s=Jt(s)?s:gh(s,null,n)),(ph(s)||[]).forEach(c=>a[c]=1))}),i.length===0?null:Me(o(i,r),Object.keys(a))}const mw=(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),VR=(e,t)=>e.length===1?jR(e[0],t[0]):qR(e,t,e.length),jR=(e,t)=>function(n,r){return mw(e(n),e(r))*t},qR=(e,t,n)=>(t.push(0),function(r,i){let a,o=0,s=-1;for(;o===0&&++s<n;)a=e[s],o=mw(a(r),a(i));return o*t[s]});function WR(e){return Jt(e)?e:()=>e}function Eg(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 YR=Object.prototype.hasOwnProperty;function ns(e,t){return YR.call(e,t)}function Zl(e){return typeof e=="boolean"}function ZR(e){return Object.prototype.toString.call(e)==="[object Date]"}function QR(e){return e&&Jt(e[Symbol.iterator])}function ft(e){return typeof e=="number"}function XR(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Ue(e){return typeof e=="string"}function bw(e,t){const n=e[0],r=qn(e),i=+t;return i?i===1?r:n+i*(r-n):n}function vh(e){return e&&qn(e)-e[0]||0}function wh(e){return Lt(e)?"["+e.map(wh)+"]":qt(e)||Ue(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function KR(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const JR=e=>ft(e)||ZR(e)?e:Date.parse(e);function eD(e,t){return t=t||JR,e==null||e===""?null:t(e)}function tD(e){return e==null||e===""?null:e+""}function xh(e){const t={},n=e.length;for(let r=0;r<n;++r)t[e[r]]=!0;return t}var yw={},Sg={},_g=34,Ql=10,Cg=13;function vw(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function nD(e,t){var n=vw(e);return function(r,i){return t(n(r),i,e)}}function ww(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 en(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function rD(e){return e<0?"-"+en(-e,6):e>9999?"+"+en(e,6):en(e,4)}function iD(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":rD(e.getUTCFullYear())+"-"+en(e.getUTCMonth()+1,2)+"-"+en(e.getUTCDate(),2)+(i?"T"+en(t,2)+":"+en(n,2)+":"+en(r,2)+"."+en(i,3)+"Z":r?"T"+en(t,2)+":"+en(n,2)+":"+en(r,2)+"Z":n||t?"T"+en(t,2)+":"+en(n,2)+"Z":"")}function xw(e){var t=new RegExp('["'+e+`
1
+ (function(ye,ke){typeof exports=="object"&&typeof module<"u"?ke(exports):typeof define=="function"&&define.amd?define(["exports"],ke):(ye=typeof globalThis<"u"?globalThis:ye||self,ke(ye.genomeSpyApp={}))})(this,function(ye){"use strict";var ine=Object.defineProperty;var ane=(ye,ke,Me)=>ke in ye?ine(ye,ke,{enumerable:!0,configurable:!0,writable:!0,value:Me}):ye[ke]=Me;var jt=(ye,ke,Me)=>(ane(ye,typeof ke!="symbol"?ke+"":ke,Me),Me),Vv=(ye,ke,Me)=>{if(!ke.has(ye))throw TypeError("Cannot "+Me)};var B=(ye,ke,Me)=>(Vv(ye,ke,"read from private field"),Me?Me.call(ye):ke.get(ye)),H=(ye,ke,Me)=>{if(ke.has(ye))throw TypeError("Cannot add the same private member more than once");ke instanceof WeakSet?ke.add(ye):ke.set(ye,Me)},ie=(ye,ke,Me,ts)=>(Vv(ye,ke,"write to private field"),ts?ts.call(ye,Me):ke.set(ye,Me),Me);var QI=(ye,ke,Me,ts)=>({set _(ph){ie(ye,ke,ph,Me)},get _(){return B(ye,ke,ts)}}),Y=(ye,ke,Me)=>(Vv(ye,ke,"access private method"),Me);var PI,wa,Sl,_l,Sf,_f,Cf,Bp,KI,Fp,JI,pi,kf,jv,Tf,qv,Vo,ch,Cl,Mp,eR,gi,kl,An,If,Rf,Wv,Nv,one,cr,_i,Df,Yv,Pp,tR,Op,nR,Bf,Zv,Ff,Qv,Tl,gg,mi,Jo,Mf,Xv,Lp,rR,zv,sne,Pf,Kv,Of,Jv,Il,Lf,Nf,jo,uh,zf,ew,Uf,$f,tw,Hf,nw,Rl,Dl,Bl,Gf,Fl,Ml,Vf,rw,jf,iw,qo,qf,Wf,Yf,bi,Wo,xa,Aa,Pl,Ol,En,Yo,Ll,yi,es,Np,iR,Zo,fh,Zf,aw,Qf,ow,Xf,sw,zp,aR,Nl,mg,Up,oR,zl,Kf,Ea,Qo,Ul,$l,bg,$p,sR,Hp,lR,Gp,cR,Hl,vi,Sa,Jf,Vp,uR,jp,fR,eh,lw,qp,hR,tt,Wp,dR,Yp,pR,Zp,gR,Qp,mR,Xo,dh,Xp,bR,Kp,yR,Vn,_a,Ko,Gl,Vl,wi,jl,It,th,cw,lt,Gt,nh,ql,rh,Jp,vR,eg,wR,tg,xR,ih,uw,ng,AR,rg,ER,ig,SR,ag,_R,og,CR,sg,kR,lg,TR,Wl,yg,ah,oh,sh,fw,cg,IR,ug,RR,fg,DR;function ke(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 Me(e,t,n){return e.fields=t||[],e.fname=n,e}function ts(e){return e==null?null:e.fname}function ph(e){return e==null?null:e.fields}function BR(e){return e.length===1?FR(e[0]):MR(e)}const FR=e=>function(t){return t[e]},MR=e=>{const t=e.length;return function(n){for(let r=0;r<t;++r)n=n[e[r]];return n}};function ot(e){throw Error(e)}function PR(e){const t=[],n=e.length;let r=null,i=0,a="",o,s,l;e=e+"";function c(){t.push(a+e.substring(o,s)),a="",o=s+1}for(o=s=0;s<n;++s)if(l=e[s],l==="\\")a+=e.substring(o,s++),o=s;else if(l===r)c(),r=null,i=-1;else{if(r)continue;o===i&&l==='"'||o===i&&l==="'"?(o=s+1,r=l):l==="."&&!i?s>o?c():o=s+1:l==="["?(s>o&&c(),i=o=s+1):l==="]"&&(i||ot("Access path missing open bracket: "+e),i>0&&c(),i=0,o=s+1)}return i&&ot("Access path missing closing bracket: "+e),r&&ot("Access path missing closing quote: "+e),s>o&&(s++,c()),t}function gh(e,t,n){const r=PR(e);return e=r.length===1?r[0]:e,Me((n&&n.get||BR)(r),[e],t||e)}gh("id");const mh=Me(e=>e,[],"identity");Me(()=>0,[],"zero"),Me(()=>1,[],"one"),Me(()=>!0,[],"true"),Me(()=>!1,[],"false");var Lt=Array.isArray;function qt(e){return e===Object(e)}function qn(e){return e[e.length-1]}function Yl(e){return e==null||e===""?null:+e}const hw=e=>t=>e*Math.exp(t),dw=e=>t=>Math.log(e*t),OR=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),LR=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,bh=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function vg(e,t,n,r){const i=n(e[0]),a=n(qn(e)),o=(a-i)*t;return[r(i-o),r(a-o)]}function NR(e,t){return vg(e,t,Yl,mh)}function zR(e,t){var n=Math.sign(e[0]);return vg(e,t,dw(n),hw(n))}function UR(e,t,n){return vg(e,t,bh(n),bh(1/n))}function yh(e,t,n,r,i){const a=r(e[0]),o=r(qn(e)),s=t!=null?r(t):(a+o)/2;return[i(s+(a-s)*n),i(s+(o-s)*n)]}function wg(e,t,n){return yh(e,t,n,Yl,mh)}function pw(e,t,n){const r=Math.sign(e[0]);return yh(e,t,n,dw(r),hw(r))}function xg(e,t,n,r){return yh(e,t,n,bh(r),bh(1/r))}function $R(e,t,n,r){return yh(e,t,n,OR(r),LR(r))}function Ag(e){return e!=null?Lt(e)?e:[e]:[]}function HR(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 Jt(e){return typeof e=="function"}const GR="descending";function gw(e,t,n){n=n||{},t=Ag(t)||[];const r=[],i=[],a={},o=n.comparator||VR;return Ag(e).forEach((s,l)=>{s!=null&&(r.push(t[l]===GR?-1:1),i.push(s=Jt(s)?s:gh(s,null,n)),(ph(s)||[]).forEach(c=>a[c]=1))}),i.length===0?null:Me(o(i,r),Object.keys(a))}const mw=(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),VR=(e,t)=>e.length===1?jR(e[0],t[0]):qR(e,t,e.length),jR=(e,t)=>function(n,r){return mw(e(n),e(r))*t},qR=(e,t,n)=>(t.push(0),function(r,i){let a,o=0,s=-1;for(;o===0&&++s<n;)a=e[s],o=mw(a(r),a(i));return o*t[s]});function WR(e){return Jt(e)?e:()=>e}function Eg(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 YR=Object.prototype.hasOwnProperty;function ns(e,t){return YR.call(e,t)}function Zl(e){return typeof e=="boolean"}function ZR(e){return Object.prototype.toString.call(e)==="[object Date]"}function QR(e){return e&&Jt(e[Symbol.iterator])}function ft(e){return typeof e=="number"}function XR(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Ue(e){return typeof e=="string"}function bw(e,t){const n=e[0],r=qn(e),i=+t;return i?i===1?r:n+i*(r-n):n}function vh(e){return e&&qn(e)-e[0]||0}function wh(e){return Lt(e)?"["+e.map(wh)+"]":qt(e)||Ue(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function KR(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const JR=e=>ft(e)||ZR(e)?e:Date.parse(e);function eD(e,t){return t=t||JR,e==null||e===""?null:t(e)}function tD(e){return e==null||e===""?null:e+""}function xh(e){const t={},n=e.length;for(let r=0;r<n;++r)t[e[r]]=!0;return t}var yw={},Sg={},_g=34,Ql=10,Cg=13;function vw(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function nD(e,t){var n=vw(e);return function(r,i){return t(n(r),i,e)}}function ww(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 en(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function rD(e){return e<0?"-"+en(-e,6):e>9999?"+"+en(e,6):en(e,4)}function iD(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":rD(e.getUTCFullYear())+"-"+en(e.getUTCMonth()+1,2)+"-"+en(e.getUTCDate(),2)+(i?"T"+en(t,2)+":"+en(n,2)+":"+en(r,2)+"."+en(i,3)+"Z":r?"T"+en(t,2)+":"+en(n,2)+":"+en(r,2)+"Z":n||t?"T"+en(t,2)+":"+en(n,2)+"Z":"")}function xw(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?nD(b,h):vw(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)===Ql&&--p,f.charCodeAt(p-1)===Cg&&--p;function x(){if(w)return Sg;if(A)return A=!1,yw;var _,T=g,D;if(f.charCodeAt(T)===_g){for(;g++<p&&f.charCodeAt(g)!==_g||f.charCodeAt(++g)===_g;);return(_=g)>=p?w=!0:(D=f.charCodeAt(g++))===Ql?A=!0:D===Cg&&(A=!0,f.charCodeAt(g)===Ql&&++g),f.slice(T+1,_-1).replace(/""/g,'"')}for(;g<p;){if((D=f.charCodeAt(_=g++))===Ql)A=!0;else if(D===Cg)A=!0,f.charCodeAt(g)===Ql&&++g;else if(D!==n)continue;return f.slice(T,_)}return w=!0,f.slice(T,p)}for(;(y=x())!==Sg;){for(var E=[];y!==yw&&y!==Sg;)E.push(y),y=x();h&&(E=h(E,b++))==null||d.push(E)}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=ww(f)),[h.map(u).join(e)].concat(a(f,h)).join(`
3
3
  `)}function s(f,h){return h==null&&(h=ww(f)),a(f,h).join(`
4
4
  `)}function l(f){return f.map(c).join(`
@@ -280,8 +280,8 @@ void main(void) {
280
280
  vec4 cornerRadii = vec4(
281
281
  uCornerRadiusTopRight,
282
282
  uCornerRadiusBottomRight,
283
- uCornerRadiusBottomLeft,
284
- uCornerRadiusTopLeft
283
+ uCornerRadiusTopLeft,
284
+ uCornerRadiusBottomLeft
285
285
  );
286
286
 
287
287
  float x = getScaled_x();
@@ -818,10 +818,10 @@ bool setupPicking() {
818
818
 
819
819
  ^^^ ${l}`:""}`}).join(`
820
820
  `)}function iz(e,t,n){const r=e.createProgram();e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r);function i(){let a,o;if(!e.getProgramParameter(r,e.LINK_STATUS)){a=e.getProgramInfoLog(r);for(const l of[t,n])e.getShaderParameter(l,e.COMPILE_STATUS)||(a=e.getShaderInfoLog(l),o=rz(e.getShaderSource(l),a,0)+`
821
- Error compiling: ${a}`,e.deleteShader(l));e.deleteProgram(r)}if(a)return{message:a,detail:o}}return{program:r,getProgramErrors:i}}function eu(e,t,n,r){return r?Z3(e,r,n,t):r=Zc(e,{...t,src:n}),r}function XE(...e){const t={get(n,r,i){for(const a of e){const s=a()[r];if(s!==void 0)return s}},has(n,r,i){for(const a of e){const o=a();if(r in o)return!0}return!1}};return new Proxy({},t)}function az(e){return Ue(e)||ft(e)||Zl(e)}class io extends Error{constructor(t,n){super(t),this.name="ViewError",this.view=n}}const oz="SAMPLE_FACET_UNIFORM",KE="SAMPLE_FACET_TEXTURE";class tu{constructor(t){H(this,pi,[]);this.unitView=t,this.encoders=void 0,this.bufferInfo=void 0,this.programInfo=void 0,this.vertexArrayInfo=void 0,this.viewUniformInfo=void 0,this.markUniformInfo=void 0,this.markUniformsAltered=!0,this.rangeMap=new sz,this.defaultProperties={get clip(){return["x","y"].map(n=>t.getScaleResolution(n)).some(n=>(n==null?void 0:n.isZoomable())??!1)},xOffset:0,yOffset:0,minBufferSize:0},this.properties=XE(typeof this.unitView.spec.mark=="object"?()=>this.unitView.spec.mark:()=>({}),()=>this.defaultProperties)}get opaque(){return!1}getAttributes(){throw new Error("Not implemented!")}getSupportedChannels(){return["sample","facetIndex","x","y","color","opacity","search","uniqueId"]}getDefaultEncoding(){const t={sample:void 0,uniqueId:void 0};return this.isPickingParticipant()&&(t.uniqueId={field:"_uniqueId"}),t}fixEncoding(t){return t}setupExprRefsNeedingGraphicsUpdate(t){const n=this.getSupportedChannels(),r={};for(const a of t){const o=this.properties[a];if(o&&Wt(o)){const s=this.unitView.paramMediator.createExpression(o.expr);s.addListener(()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()}),n.includes(a)||Object.defineProperty(r,a,{get(){return s()}})}}const i=this.properties;this.properties=XE(()=>r,()=>i)}get encoding(){return Nd(this,"encoding",()=>{var o;const t=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=s=>{const l=this.properties[s];return az(l)||Wt(l)?{value:l}:void 0},i=Object.fromEntries(this.getSupportedChannels().map(s=>[s,r(s)]).filter(s=>kn(s[1]))),a=this.fixEncoding({...t,...i,...n});for(const s of Object.keys(a))this.getSupportedChannels().includes(s)||delete a[s];return a.x&&((o=a.x).buildIndex??(o.buildIndex=!0)),a})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=DM(this)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return KE;if(this.unitView.getLayoutAncestors().find(t=>"samples"in t.spec))return oz}createAndLinkShaders(t,n,r=[]){const i=this.getAttributes(),a="// view: "+this.unitView.getPathString();let o=[];const s=new Set,l=HE(this.encoders),c=this.getSampleFacetMode();c&&r.push(`#define ${c}`);const u=[];for(const b of i){let y;if(b in this.encoding)y=b;else continue;const w=this.encoding[y];if(w)if(kn(w))if(Wt(w.value)){const{uniformName:A,uniformGlsl:x,scaleGlsl:E,adjuster:_}=FN(y);o.push(E),u.push(x),B(this,pi).push(()=>{this.registerMarkUniformValue(A,w.value,_)})}else o.push(BN(y,w.value));else{const A=dn(w)&&w.resolutionChannel||y,x=Ka(A)?this.unitView.getScaleResolution(A):null,E=Zr(w)?l.get([w.field,!0]):[y],_=MN(y,x,w,E!=null&&E.includes(y)?E:[y]);if(o.push(_.glsl),u.push(_.domainUniform),u.push(_.rangeUniform),s.add(_.attributeGlsl),_.rangeUniform&&B(this,pi).push(()=>{const T=this.createMarkUniformSetter(_.rangeName),D=()=>T(VE(x.scale,y));x.addEventListener("range",D),D()}),_.markUniformGlsl){if(!$c(w))throw new Error("Bug!");const T=this.encoders[y],D=T.indexer,G=Od(T.scale.type)&&k1(T.scale.domain()),N=D||(G?$E:oe=>+oe);u.push(_.markUniformGlsl),B(this,pi).push(()=>{this.registerMarkUniformValue(_.attributeName,w.datum,N)})}_.domainUniform&&B(this,pi).push(()=>{const T=this.createMarkUniformSetter(_.domainUniformName),D=x.scale,P=()=>{const G=Qn(D.type)?[0,D.domain().length]:D.domain();T(Od(D.type)?NN(G):G)};x.addEventListener("domain",P),P()})}}const f=`precision highp float;
821
+ Error compiling: ${a}`,e.deleteShader(l));e.deleteProgram(r)}if(a)return{message:a,detail:o}}return{program:r,getProgramErrors:i}}function eu(e,t,n,r){return r?Z3(e,r,n,t):r=Zc(e,{...t,src:n}),r}function XE(...e){const t={get(n,r,i){for(const a of e){const s=a()[r];if(s!==void 0)return s}},has(n,r,i){for(const a of e){const o=a();if(r in o)return!0}return!1}};return new Proxy({},t)}function az(e){return Ue(e)||ft(e)||Zl(e)}class io extends Error{constructor(t,n){super(t),this.name="ViewError",this.view=n}}const oz="SAMPLE_FACET_UNIFORM",KE="SAMPLE_FACET_TEXTURE";class tu{constructor(t){H(this,pi,[]);this.unitView=t,this.encoders=void 0,this.bufferInfo=void 0,this.bytesPerElement=new Map,this.programInfo=void 0,this.vertexArrayInfo=void 0,this.viewUniformInfo=void 0,this.markUniformInfo=void 0,this.markUniformsAltered=!0,this.rangeMap=new sz,this.defaultProperties={get clip(){return["x","y"].map(n=>t.getScaleResolution(n)).some(n=>(n==null?void 0:n.isZoomable())??!1)},xOffset:0,yOffset:0,minBufferSize:0},this.properties=XE(typeof this.unitView.spec.mark=="object"?()=>this.unitView.spec.mark:()=>({}),()=>this.defaultProperties)}get opaque(){return!1}getAttributes(){throw new Error("Not implemented!")}getSupportedChannels(){return["sample","facetIndex","x","y","color","opacity","search","uniqueId"]}getDefaultEncoding(){const t={sample:void 0,uniqueId:void 0};return this.isPickingParticipant()&&(t.uniqueId={field:"_uniqueId"}),t}fixEncoding(t){return t}setupExprRefsNeedingGraphicsUpdate(t){const n=this.getSupportedChannels(),r={};for(const a of t){const o=this.properties[a];if(o&&Wt(o)){const s=this.unitView.paramMediator.createExpression(o.expr);s.addListener(()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()}),n.includes(a)||Object.defineProperty(r,a,{get(){return s()}})}}const i=this.properties;this.properties=XE(()=>r,()=>i)}get encoding(){return Nd(this,"encoding",()=>{var o;const t=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=s=>{const l=this.properties[s];return az(l)||Wt(l)?{value:l}:void 0},i=Object.fromEntries(this.getSupportedChannels().map(s=>[s,r(s)]).filter(s=>kn(s[1]))),a=this.fixEncoding({...t,...i,...n});for(const s of Object.keys(a))this.getSupportedChannels().includes(s)||delete a[s];return a.x&&((o=a.x).buildIndex??(o.buildIndex=!0)),a})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=DM(this)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return KE;if(this.unitView.getLayoutAncestors().find(t=>"samples"in t.spec))return oz}createAndLinkShaders(t,n,r=[]){const i=this.getAttributes(),a="// view: "+this.unitView.getPathString();let o=[];const s=new Set,l=HE(this.encoders),c=this.getSampleFacetMode();c&&r.push(`#define ${c}`);const u=[];for(const b of i){let y;if(b in this.encoding)y=b;else continue;const w=this.encoding[y];if(w)if(kn(w))if(Wt(w.value)){const{uniformName:A,uniformGlsl:x,scaleGlsl:E,adjuster:_}=FN(y);o.push(E),u.push(x),B(this,pi).push(()=>{this.registerMarkUniformValue(A,w.value,_)})}else o.push(BN(y,w.value));else{const A=dn(w)&&w.resolutionChannel||y,x=Ka(A)?this.unitView.getScaleResolution(A):null,E=Zr(w)?l.get([w.field,!0]):[y],_=MN(y,x,w,E!=null&&E.includes(y)?E:[y]);if(o.push(_.glsl),u.push(_.domainUniform),u.push(_.rangeUniform),s.add(_.attributeGlsl),_.rangeUniform&&B(this,pi).push(()=>{const T=this.createMarkUniformSetter(_.rangeName),D=()=>T(VE(x.scale,y));x.addEventListener("range",D),D()}),_.markUniformGlsl){if(!$c(w))throw new Error("Bug!");const T=this.encoders[y],D=T.indexer,G=Od(T.scale.type)&&k1(T.scale.domain()),N=D||(G?$E:oe=>+oe);u.push(_.markUniformGlsl),B(this,pi).push(()=>{this.registerMarkUniformValue(_.attributeName,w.datum,N)})}_.domainUniform&&B(this,pi).push(()=>{const T=this.createMarkUniformSetter(_.domainUniformName),D=x.scale,P=()=>{const G=Qn(D.type)?[0,D.domain().length]:D.domain();T(Od(D.type)?NN(G):G)};x.addEventListener("domain",P),P()})}}const f=`precision highp float;
822
822
  precision highp int;`,h=b=>b.replace("#pragma markUniforms",u.join(`
823
823
  `));r=r.map(h),t=h(t),n=h(n);const d=[f,a,...r,WE,YN,[...s].join(`
824
- `),...o,ZN,QN,t],p=[f,a,...r,WE,XN,n],g=this.gl;this.programStatus=iz(g,this.glHelper.compileShader(g.VERTEX_SHADER,d),this.glHelper.compileShader(g.FRAGMENT_SHADER,p))}finalizeGraphicsInitialization(){const t=this.programStatus.getProgramErrors();if(t){t.detail&&console.warn(t.detail);const n=new Error("Cannot create shader program: "+t.message);throw n.view=this.unitView,n}this.programInfo=nN(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=AE(this.gl,this.programInfo,"View"),this.markUniformInfo=AE(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),Cs(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of B(this,pi))n();ie(this,pi,void 0)}createMarkUniformSetter(t){const n=this.markUniformInfo.setters[t];if(!n)throw new Error(`Uniform "${t}" not found int the Mark block!`);return r=>{n(r),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(t,n,r=i=>i){const i=this.createMarkUniformSetter(t),a=o=>{if(o==null)throw new Error(`Trying to set null/undefined value for uniform: ${t}${Wt(n)?`Expr: ${n.expr}`:""}`);i(o)};if(Wt(n)){const o=this.unitView.paramMediator.createExpression(n.expr),s=()=>a(r(o(null)));o.addListener(s),s()}else a(r(n))}deleteGraphicsData(){const t=this.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),t.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let n=0;n<8;n++)t.disableVertexAttribArray(n);Object.values(this.bufferInfo.attribs).forEach(n=>this.gl.deleteBuffer(n.buffer)),this.bufferInfo.indices&&this.gl.deleteBuffer(this.bufferInfo.indices),this.bufferInfo=void 0}}updateBufferInfo(t){if(this.gl.bindVertexArray(null),this.bufferInfo&&t.vertexCount<=this.bufferInfo.allocatedVertices)for(const[n,r]of Object.entries(t.arrays))r.data&&gP(this.gl,this.bufferInfo.attribs[n],r.data,0);else this.deleteGraphicsData(),this.bufferInfo=yP(this.gl,t.arrays,{numElements:t.vertexCount}),this.bufferInfo.allocatedVertices=t.allocatedVertices}get glHelper(){return this.getContext().glHelper}get gl(){return this.glHelper.gl}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}isReady(){return this.bufferInfo&&this.programInfo}isPickingParticipant(){if(this.properties.tooltip===null)return!1;for(const t of this.unitView.getLayoutAncestors())if(!t.isPickingSupported())return!1;return!0}bindOrSetMarkUniformBlock(){this.markUniformsAltered?(SE(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):EE(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(t){const n=this.glHelper,r=this.gl,i=[];i.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=xN(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[o,s]of Object.entries(this.encoding))if(dn(s)){const l=dn(s)&&s.resolutionChannel||o;if(Ka(l)){const c=this.unitView.getScaleResolution(l),u=n.rangeTextures.get(c);u&&i.push(()=>Cs(this.programInfo,{[C1+o]:u}))}}this.getSampleFacetMode()==KE&&i.push(()=>{let o;for(const s of this.unitView.getLayoutAncestors())if(o=s.getSampleFacetTexture(),o)break;if(!o)throw new Error("No facet texture available. This is bug.");Cs(this.programInfo,{uSampleFacetTexture:o})});const a=(t.picking??!1)&&this.isPickingParticipant();return i.push(()=>Qc(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:a})),this.opaque||t.picking?i.push(()=>r.disable(r.BLEND)):i.push(()=>r.enable(r.BLEND)),i}prepareSampleFacetRendering(t){const n=t.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(n&&r){const i=n.locSize?n.locSize.location:0,a=n.locSize?n.locSize.size:1;if(i>1||i+a<0)return!1;const o=n.targetLocSize?n.targetLocSize.location:i,s=n.targetLocSize?n.targetLocSize.size:a;this.gl.uniform4f(r.location,i,a,o,s)}return!0}render(t){}createRenderCallback(t,n){var f;if(!this.bufferInfo)throw new io(`${this.getType()} mark has no data. This is bug.`,this.unitView);const r=this;let i;const a=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,o=a&&_t(a.type),s=["index","locus"].includes(a==null?void 0:a.type)?-1:0,l=[0,0];i=h=>{if(o&&h.xIndex){const d=a.domain(),p=h.xIndex(d[0]+s,d[1],l),g=p[0],b=p[1]-g;b>0&&t(g,b)}else t(h.offset,h.count)};const c=this.rangeMap.get(void 0).count==0?n.facetId:void 0,u=this.rangeMap.get(c);return n.sampleFacetRenderingOptions?function(){u.count&&r.prepareSampleFacetRendering(n)&&i(u)}:function(){u.count&&i(u)}}setViewport(t,n){t=t.flatten();const r=this.unitView.context.devicePixelRatio,i=this.gl,a=this.properties,o=this.glHelper.getLogicalCanvasSize(),s=.5,l=(a.xOffset??0)+s,c=(a.yOffset??0)+s;let u,f=t;if(a.clip!=="never"&&(a.clip||n)){let h=0,d=0,p;if(n){if(f=t.intersect(n).flatten(),!f.isDefined())return!1;p=[t.width/f.width,t.height/f.height],d=Math.max(0,t.y2-n.y2),h=Math.min(0,t.x-n.x)}else p=[1,1];const g=[f.x,o.height-f.y2,f.width,f.height].map(A=>A*r),b=g.map(A=>Math.round(A)),[y,w]=g.map((A,x)=>A-b[x]);i.viewport(...b),i.scissor(...b),i.enable(i.SCISSOR_TEST),u={uViewOffset:[(l+h+y/r)/f.width,-(c+d-w/r)/f.height],uViewScale:p}}else{if(!t.isDefined())return!1;i.viewport(0,0,o.width*r,o.height*r),i.disable(i.SCISSOR_TEST),u={uViewOffset:[(t.x+l)/o.width,(o.height-t.y-c-t.height)/o.height],uViewScale:[t.width/o.width,t.height/o.height]}}return Qc(this.viewUniformInfo,{...u,uViewportSize:[t.width,t.height],uDevicePixelRatio:r}),SE(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(t,n){}}pi=new WeakMap;class sz extends Ur{constructor(){super([],JSON.stringify)}get(t){let n=super.get(t);return n===void 0&&(n={offset:0,count:0,xIndex:void 0},super.set(t,n)),n}migrateEntries(t){for(const[n,r]of this.entries())t.has(n)||(r.offset=0,r.count=0,r.xIndex=void 0);for(const[n,r]of t.entries())Object.assign(this.get(n),r)}}function B1(e,t){const n=PM(t);let r=e[t]&&{...e[t]},i=e[n]&&{...e[n]};if(!(kn(r)||kn(i))){if(r){if(!dn(e[t]))return;if(i){if(r.type!="quantitative"){const a=(1-(r.band||1))/2;r.band=a,i.band=-a}}else if(r.type=="quantitative")i={datum:0};else{i={...r};const a=(1-(r.band??1))/2;r.band=0+a,i.band=1-a}}else r={value:0},i={value:1};e[t]=r,e[n]=i}}function JE(e,t){e.stroke||(t?e.stroke={value:null}:e.stroke={resolutionChannel:"color",...e.color}),kn(e.stroke)&&e.stroke.value===null&&(e.strokeWidth={value:0}),e.strokeOpacity||(e.strokeOpacity={resolutionChannel:"opacity",...e.opacity})}function e4(e,t){kn(e.fill)&&e.fill.value===null?e.fillOpacity={value:0}:e.fill||(e.fill={resolutionChannel:"color",...e.color},!t&&!e.fillOpacity&&(e.fillOpacity={value:0})),e.fillOpacity||(t?e.fillOpacity={resolutionChannel:"opacity",...e.opacity}:e.fillOpacity={value:0})}class lz extends tu{constructor(n){super(n);H(this,kf);H(this,Tf);Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x2:void 0,y2:void 0,filled:!0,color:"#4c78a8",opacity:1,strokeWidth:3,cornerRadius:0,minWidth:.5,minHeight:.5,minOpacity:1,tessellationZoomThreshold:10,tessellationTiles:35}))}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}get opaque(){return Nd(this,"opaque",()=>!Y(this,kf,jv).call(this)&&!Y(this,Tf,qv).call(this)&&kn(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return B1(n,"x"),B1(n,"y"),JE(n,this.properties.filled),e4(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];Y(this,kf,jv).call(this)&&n.push("ROUNDED_CORNERS"),Y(this,Tf,qv).call(this)&&n.push("STROKED"),this.createAndLinkShaders(CN,kN,[TN,...n.map(r=>"#define "+r)])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uMinWidth",n.minWidth),this.registerMarkUniformValue("uMinHeight",n.minHeight),this.registerMarkUniformValue("uMinOpacity",n.minOpacity),this.registerMarkUniformValue("uCornerRadiusTopRight",n.cornerRadiusTopRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomRight",n.cornerRadiusBottomRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusTopLeft",n.cornerRadiusTopLeft??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomLeft",n.cornerRadiusBottomLeft??n.cornerRadius??0)}updateGraphicsData(){const n=this.unitView.getCollector(),r=n.getItemCount(),i=new GN({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});i.addBatches(n.facetBatches);const a=i.toArrays();this.rangeMap.migrateEntries(a.rangeMap),this.updateBufferInfo(a)}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>to(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,a)=>{Md(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,a,i)},n)}findDatumAt(n,r){n=Nt(n);const i=this.unitView.getCollector().facetBatches.get(n);if(!i)return;const a=this.encoders,o=a.x.scale.type;if(Qn(o)){const s=a.x.accessor;return i.find(l=>r==s(l))}else{const s=a.x.accessor,l=a.x2.accessor;return i.find(c=>r>=s(c)&&r<l(c))}}}kf=new WeakSet,jv=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},Tf=new WeakSet,qv=function(){const n=this.encoding.strokeWidth;return!(kn(n)&&!n.value)};const cz=`out float vRadius;
824
+ `),...o,ZN,QN,t],p=[f,a,...r,WE,XN,n],g=this.gl;this.programStatus=iz(g,this.glHelper.compileShader(g.VERTEX_SHADER,d),this.glHelper.compileShader(g.FRAGMENT_SHADER,p))}finalizeGraphicsInitialization(){const t=this.programStatus.getProgramErrors();if(t){t.detail&&console.warn(t.detail);const n=new Error("Cannot create shader program: "+t.message);throw n.view=this.unitView,n}this.programInfo=nN(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=AE(this.gl,this.programInfo,"View"),this.markUniformInfo=AE(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),Cs(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of B(this,pi))n();ie(this,pi,void 0)}createMarkUniformSetter(t){const n=this.markUniformInfo.setters[t];if(!n)throw new Error(`Uniform "${t}" not found int the Mark block!`);return r=>{n(r),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(t,n,r=i=>i){const i=this.createMarkUniformSetter(t),a=o=>{if(o==null)throw new Error(`Trying to set null/undefined value for uniform: ${t}${Wt(n)?`Expr: ${n.expr}`:""}`);i(o)};if(Wt(n)){const o=this.unitView.paramMediator.createExpression(n.expr),s=()=>a(r(o(null)));o.addListener(s),s()}else a(r(n))}deleteGraphicsData(){const t=this.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),t.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let n=0;n<8;n++)t.disableVertexAttribArray(n);Object.values(this.bufferInfo.attribs).forEach(n=>this.gl.deleteBuffer(n.buffer)),this.bufferInfo.indices&&this.gl.deleteBuffer(this.bufferInfo.indices),this.bufferInfo=void 0}}updateBufferInfo(t){if(this.gl.bindVertexArray(null),this.bufferInfo&&t.vertexCount<=this.bufferInfo.allocatedVertices)for(const[n,r]of Object.entries(t.arrays))r.data&&gP(this.gl,this.bufferInfo.attribs[n],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=yP(this.gl,t.arrays,{numElements:t.vertexCount}),this.bufferInfo.allocatedVertices=t.allocatedVertices;for(const[n,r]of Object.entries(t.arrays))this.bytesPerElement.set(n,r.data.BYTES_PER_ELEMENT)}}get glHelper(){return this.getContext().glHelper}get gl(){return this.glHelper.gl}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}isReady(){return this.bufferInfo&&this.programInfo}isPickingParticipant(){if(this.properties.tooltip===null)return!1;for(const t of this.unitView.getLayoutAncestors())if(!t.isPickingSupported())return!1;return!0}bindOrSetMarkUniformBlock(){this.markUniformsAltered?(SE(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):EE(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(t){const n=this.glHelper,r=this.gl,i=[];i.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=xN(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[o,s]of Object.entries(this.encoding))if(dn(s)){const l=dn(s)&&s.resolutionChannel||o;if(Ka(l)){const c=this.unitView.getScaleResolution(l),u=n.rangeTextures.get(c);u&&i.push(()=>Cs(this.programInfo,{[C1+o]:u}))}}this.getSampleFacetMode()==KE&&i.push(()=>{let o;for(const s of this.unitView.getLayoutAncestors())if(o=s.getSampleFacetTexture(),o)break;if(!o)throw new Error("No facet texture available. This is bug.");Cs(this.programInfo,{uSampleFacetTexture:o})});const a=(t.picking??!1)&&this.isPickingParticipant();return i.push(()=>Qc(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:a})),this.opaque||t.picking?i.push(()=>r.disable(r.BLEND)):i.push(()=>r.enable(r.BLEND)),i}prepareSampleFacetRendering(t){const n=t.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(n&&r){const i=n.locSize?n.locSize.location:0,a=n.locSize?n.locSize.size:1;if(i>1||i+a<0)return!1;const o=n.targetLocSize?n.targetLocSize.location:i,s=n.targetLocSize?n.targetLocSize.size:a;this.gl.uniform4f(r.location,i,a,o,s)}return!0}render(t){}createRenderCallback(t,n){var f;if(!this.bufferInfo)throw new io(`${this.getType()} mark has no data. This is bug.`,this.unitView);const r=this;let i;const a=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,o=a&&_t(a.type),s=["index","locus"].includes(a==null?void 0:a.type)?-1:0,l=[0,0];i=h=>{if(o&&h.xIndex){const d=a.domain(),p=h.xIndex(d[0]+s,d[1],l),g=p[0],b=p[1]-g;b>0&&t(g,b)}else t(h.offset,h.count)};const c=this.rangeMap.get(void 0).count==0?n.facetId:void 0,u=this.rangeMap.get(c);return n.sampleFacetRenderingOptions?function(){u.count&&r.prepareSampleFacetRendering(n)&&i(u)}:function(){u.count&&i(u)}}setViewport(t,n){t=t.flatten();const r=this.unitView.context.devicePixelRatio,i=this.gl,a=this.properties,o=this.glHelper.getLogicalCanvasSize(),s=.5,l=(a.xOffset??0)+s,c=(a.yOffset??0)+s;let u,f=t;if(a.clip!=="never"&&(a.clip||n)){let h=0,d=0,p;if(n){if(f=t.intersect(n).flatten(),!f.isDefined())return!1;p=[t.width/f.width,t.height/f.height],d=Math.max(0,t.y2-n.y2),h=Math.min(0,t.x-n.x)}else p=[1,1];const g=[f.x,o.height-f.y2,f.width,f.height].map(A=>A*r),b=g.map(A=>Math.round(A)),[y,w]=g.map((A,x)=>A-b[x]);i.viewport(...b),i.scissor(...b),i.enable(i.SCISSOR_TEST),u={uViewOffset:[(l+h+y/r)/f.width,-(c+d-w/r)/f.height],uViewScale:p}}else{if(!t.isDefined())return!1;i.viewport(0,0,o.width*r,o.height*r),i.disable(i.SCISSOR_TEST),u={uViewOffset:[(t.x+l)/o.width,(o.height-t.y-c-t.height)/o.height],uViewScale:[t.width/o.width,t.height/o.height]}}return Qc(this.viewUniformInfo,{...u,uViewportSize:[t.width,t.height],uDevicePixelRatio:r}),SE(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(t,n){}}pi=new WeakMap;class sz extends Ur{constructor(){super([],JSON.stringify)}get(t){let n=super.get(t);return n===void 0&&(n={offset:0,count:0,xIndex:void 0},super.set(t,n)),n}migrateEntries(t){for(const[n,r]of this.entries())t.has(n)||(r.offset=0,r.count=0,r.xIndex=void 0);for(const[n,r]of t.entries())Object.assign(this.get(n),r)}}function B1(e,t){const n=PM(t);let r=e[t]&&{...e[t]},i=e[n]&&{...e[n]};if(!(kn(r)||kn(i))){if(r){if(!dn(e[t]))return;if(i){if(r.type!="quantitative"){const a=(1-(r.band||1))/2;r.band=a,i.band=-a}}else if(r.type=="quantitative")i={datum:0};else{i={...r};const a=(1-(r.band??1))/2;r.band=0+a,i.band=1-a}}else r={value:0},i={value:1};e[t]=r,e[n]=i}}function JE(e,t){e.stroke||(t?e.stroke={value:null}:e.stroke={resolutionChannel:"color",...e.color}),kn(e.stroke)&&e.stroke.value===null&&(e.strokeWidth={value:0}),e.strokeOpacity||(e.strokeOpacity={resolutionChannel:"opacity",...e.opacity})}function e4(e,t){kn(e.fill)&&e.fill.value===null?e.fillOpacity={value:0}:e.fill||(e.fill={resolutionChannel:"color",...e.color},!t&&!e.fillOpacity&&(e.fillOpacity={value:0})),e.fillOpacity||(t?e.fillOpacity={resolutionChannel:"opacity",...e.opacity}:e.fillOpacity={value:0})}class lz extends tu{constructor(n){super(n);H(this,kf);H(this,Tf);Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x2:void 0,y2:void 0,filled:!0,color:"#4c78a8",opacity:1,strokeWidth:3,cornerRadius:0,minWidth:.5,minHeight:.5,minOpacity:1,tessellationZoomThreshold:10,tessellationTiles:35}))}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}get opaque(){return Nd(this,"opaque",()=>!Y(this,kf,jv).call(this)&&!Y(this,Tf,qv).call(this)&&kn(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return B1(n,"x"),B1(n,"y"),JE(n,this.properties.filled),e4(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];Y(this,kf,jv).call(this)&&n.push("ROUNDED_CORNERS"),Y(this,Tf,qv).call(this)&&n.push("STROKED"),this.createAndLinkShaders(CN,kN,[TN,...n.map(r=>"#define "+r)])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uMinWidth",n.minWidth),this.registerMarkUniformValue("uMinHeight",n.minHeight),this.registerMarkUniformValue("uMinOpacity",n.minOpacity),this.registerMarkUniformValue("uCornerRadiusTopRight",n.cornerRadiusTopRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomRight",n.cornerRadiusBottomRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusTopLeft",n.cornerRadiusTopLeft??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomLeft",n.cornerRadiusBottomLeft??n.cornerRadius??0)}updateGraphicsData(){const n=this.unitView.getCollector(),r=n.getItemCount(),i=new GN({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});i.addBatches(n.facetBatches);const a=i.toArrays();this.rangeMap.migrateEntries(a.rangeMap),this.updateBufferInfo(a)}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>to(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,a)=>{Md(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,a,i)},n)}findDatumAt(n,r){n=Nt(n);const i=this.unitView.getCollector().facetBatches.get(n);if(!i)return;const a=this.encoders,o=a.x.scale.type;if(Qn(o)){const s=a.x.accessor;return i.find(l=>r==s(l))}else{const s=a.x.accessor,l=a.x2.accessor;return i.find(c=>r>=s(c)&&r<l(c))}}}kf=new WeakSet,jv=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},Tf=new WeakSet,qv=function(){const n=this.encoding.strokeWidth;return!(kn(n)&&!n.value)};const cz=`out float vRadius;
825
825
  out float vRadiusWithPadding;
826
826
  out lowp vec4 vFillColor;
827
827
  out lowp vec4 vStrokeColor;
@@ -1211,9 +1211,7 @@ void main(void) {
1211
1211
 
1212
1212
  #pragma markUniforms
1213
1213
  };
1214
- `;class yz extends tu{constructor(t){super(t),this.dashTextureSize=0,Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x2:void 0,y2:void 0,size:1,color:"black",opacity:1,minLength:0,strokeDash:null,strokeDashOffset:0,strokeCap:"butt"}))}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){if(!(t.x&&t.y&&t.x2&&t.y2))if(t.x&&t.x2&&!t.y)t.y={value:.5},t.y2=t.y;else if(t.y&&t.y2&&!t.x)t.x={value:.5},t.x2=t.x;else if(t.x&&!t.y)t.y={value:0},t.y2={value:1},t.x2=t.x;else if(t.y&&!t.x)t.x={value:0},t.x2={value:1},t.y2=t.y;else if(t.x&&t.y&&t.y2)t.x2=t.x;else if(t.y&&t.x&&t.x2)t.y2=t.y;else if(t.y&&t.x)if(!t.x2&&dn(t.y)&&t.y.type=="quantitative")t.x2=t.x,t.y2={datum:0};else if(!t.y2&&dn(t.x)&&t.x.type=="quantitative")t.y2=t.y,t.x2={datum:0};else throw new Error("A bug!");else throw new Error("Invalid x and y encodings for rule mark: "+JSON.stringify(t));return t}async initializeGraphics(){if(await super.initializeGraphics(),this.properties.strokeDash){const t=this.gl,n=vz(this.properties.strokeDash);this.dashTexture=Zc(t,{mag:t.NEAREST,min:t.NEAREST,internalFormat:t.R8,format:t.RED,src:n,height:1}),this.dashTextureSize=n.length}this.createAndLinkShaders(gz,mz,[bz])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uMinLength",t.minLength),this.registerMarkUniformValue("uStrokeCap",t.strokeCap??"butt",n=>["butt","square","round"].indexOf(n)),Qc(this.markUniformInfo,{uDashTextureSize:+this.dashTextureSize}),this.markUniformsAltered=!0}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new VN({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(n,this.properties.minBufferSize||0)});r.addBatches(t.facetBatches);const i=r.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),this.dashTexture&&n.push(()=>Cs(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>to(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Md(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,i,r),t)}}function vz(e){if(e.length==0||e.length%2||e.findIndex(a=>Math.round(a)!=a||a<1||a>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(e));const t=e.reduce((a,o)=>a+o),n=new Uint8Array(t);let r=!0,i=0;for(let a of e){for(;a;)n[i++]=r&&255||0,a--;r=!r}return n}const wz=`in vec2 strip;
1215
-
1216
- out vec4 vColor;
1214
+ `;class yz extends tu{constructor(t){super(t),this.dashTextureSize=0,Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x2:void 0,y2:void 0,size:1,color:"black",opacity:1,minLength:0,strokeDash:null,strokeDashOffset:0,strokeCap:"butt"}))}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){if(!(t.x&&t.y&&t.x2&&t.y2))if(t.x&&t.x2&&!t.y)t.y={value:.5},t.y2=t.y;else if(t.y&&t.y2&&!t.x)t.x={value:.5},t.x2=t.x;else if(t.x&&!t.y)t.y={value:0},t.y2={value:1},t.x2=t.x;else if(t.y&&!t.x)t.x={value:0},t.x2={value:1},t.y2=t.y;else if(t.x&&t.y&&t.y2)t.x2=t.x;else if(t.y&&t.x&&t.x2)t.y2=t.y;else if(t.y&&t.x)if(!t.x2&&dn(t.y)&&t.y.type=="quantitative")t.x2=t.x,t.y2={datum:0};else if(!t.y2&&dn(t.x)&&t.x.type=="quantitative")t.y2=t.y,t.x2={datum:0};else throw new Error("A bug!");else throw new Error("Invalid x and y encodings for rule mark: "+JSON.stringify(t));return t}async initializeGraphics(){if(await super.initializeGraphics(),this.properties.strokeDash){const t=this.gl,n=vz(this.properties.strokeDash);this.dashTexture=Zc(t,{mag:t.NEAREST,min:t.NEAREST,internalFormat:t.R8,format:t.RED,src:n,height:1}),this.dashTextureSize=n.length}this.createAndLinkShaders(gz,mz,[bz])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uMinLength",t.minLength),this.registerMarkUniformValue("uStrokeCap",t.strokeCap??"butt",n=>["butt","square","round"].indexOf(n)),Qc(this.markUniformInfo,{uDashTextureSize:+this.dashTextureSize}),this.markUniformsAltered=!0}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new VN({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(n,this.properties.minBufferSize||0)});r.addBatches(t.facetBatches);const i=r.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),this.dashTexture&&n.push(()=>Cs(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>to(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Md(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,i,r),t)}}function vz(e){if(e.length==0||e.length%2||e.findIndex(a=>Math.round(a)!=a||a<1||a>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(e));const t=e.reduce((a,o)=>a+o),n=new Uint8Array(t);let r=!0,i=0;for(let a of e){for(;a;)n[i++]=r&&255||0,a--;r=!r}return n}const wz=`out vec4 vColor;
1217
1215
 
1218
1216
  /** Stroke width */
1219
1217
  out float vSize;
@@ -1341,6 +1339,11 @@ void main(void) {
1341
1339
  p4 = b;
1342
1340
  }
1343
1341
 
1342
+ vec2 strip = vec2(
1343
+ float(gl_VertexID / 2) / float(uSegmentBreaks),
1344
+ float(gl_VertexID % 2) - 0.5
1345
+ );
1346
+
1344
1347
  // Make segments shorter near the endpoints to make the tightly bent attachment points smoother
1345
1348
  float t = smoothstep(0.0, 1.0, strip.x);
1346
1349
 
@@ -1440,9 +1443,11 @@ void main(void) {
1440
1443
  // In pixels
1441
1444
  uniform vec2 uArcFadingDistance;
1442
1445
 
1446
+ uniform int uSegmentBreaks;
1447
+
1443
1448
  #pragma markUniforms
1444
1449
  };
1445
- `,Ez=["arc","dome","diagonal","line"],Sz=["vertical","horizontal"];class _z extends tu{constructor(t){super(t),Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x:0,x2:void 0,y:0,y2:void 0,size:1,color:"black",opacity:1,segments:101,arcHeightFactor:1,minArcHeight:1.5,minPickingSize:3,clampApex:!1,maxChordLength:5e4,arcFadingDistance:!1,linkShape:"arc",orient:"vertical"})),this._baseInstanceExt=this.gl.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","height","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){return t.x2||(dn(t.x)?t.x2={datum:0}:t.x2=t.x),t.y2||(dn(t.y)?t.y2={datum:0}:t.y2=t.y),t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(wz,xz,[Az])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uArcFadingDistance",t.arcFadingDistance,n=>n||[0,0]),this.registerMarkUniformValue("uArcHeightFactor",t.arcHeightFactor),this.registerMarkUniformValue("uMinArcHeight",t.minArcHeight),this.registerMarkUniformValue("uMinPickingSize",t.minPickingSize),this.registerMarkUniformValue("uShape",t.linkShape,n=>Ez.indexOf(n)),this.registerMarkUniformValue("uOrient",t.orient,n=>Sz.indexOf(n)),this.registerMarkUniformValue("uClampApex",t.clampApex,n=>!!n),this.registerMarkUniformValue("uMaxChordLength",t.maxChordLength)}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new qN({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});r.addBatches(t.facetBatches);const i=r.toArrays();i.arrays.strip={data:Cz(this.properties.segments),numComponents:2},this.rangeMap.migrateEntries(i.rangeMap),this.arrays=Object.fromEntries(Object.entries(i.arrays).map(([a,o])=>[a,{...o,data:void 0}])),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),this._baseInstanceExt?n.push(()=>to(this.gl,this.programInfo,this.vertexArrayInfo)):n.push(()=>this.gl.bindVertexArray(null)),n}render(t){const n=this.gl,r=(this.properties.segments+1)*2;return this._baseInstanceExt?this.createRenderCallback((i,a)=>{this._baseInstanceExt.drawArraysInstancedBaseInstanceWEBGL(n.TRIANGLE_STRIP,0,r,a,i)},t):this.createRenderCallback((i,a)=>{for(const o of Object.entries(this.bufferInfo.attribs)){const[s,l]=o;l.buffer&&l.numComponents&&l.divisor&&(l.offset=i*this.arrays[s].numComponents*4)}to(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,r,a)},t)}}function Cz(e){let t=0;const n=[];for(;t<=e;t++)n.push(t/e,.5),n.push(t/e,-.5);return new Float32Array(n)}const kz=`in mediump vec2 vertexCoord;
1450
+ `,Ez=["arc","dome","diagonal","line"],Sz=["vertical","horizontal"];class _z extends tu{constructor(t){super(t),Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x:0,x2:void 0,y:0,y2:void 0,size:1,color:"black",opacity:1,segments:101,arcHeightFactor:1,minArcHeight:1.5,minPickingSize:3,clampApex:!1,maxChordLength:5e4,arcFadingDistance:!1,linkShape:"arc",orient:"vertical"})),this._baseInstanceExt=this.gl.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","height","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){return t.x2||(dn(t.x)?t.x2={datum:0}:t.x2=t.x),t.y2||(dn(t.y)?t.y2={datum:0}:t.y2=t.y),t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(wz,xz,[Az])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uArcFadingDistance",t.arcFadingDistance,n=>n||[0,0]),this.registerMarkUniformValue("uArcHeightFactor",t.arcHeightFactor),this.registerMarkUniformValue("uMinArcHeight",t.minArcHeight),this.registerMarkUniformValue("uMinPickingSize",t.minPickingSize),this.registerMarkUniformValue("uShape",t.linkShape,n=>Ez.indexOf(n)),this.registerMarkUniformValue("uOrient",t.orient,n=>Sz.indexOf(n)),this.registerMarkUniformValue("uClampApex",t.clampApex,n=>!!n),this.registerMarkUniformValue("uMaxChordLength",t.maxChordLength),this.registerMarkUniformValue("uSegmentBreaks",t.segments,n=>n+1)}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new qN({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});r.addBatches(t.facetBatches);const i=r.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.arrays=Object.fromEntries(Object.entries(i.arrays).map(([a,o])=>[a,{...o,data:void 0}])),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),this._baseInstanceExt?n.push(()=>to(this.gl,this.programInfo,this.vertexArrayInfo)):n.push(()=>this.gl.bindVertexArray(null)),n}render(t){const n=this.gl;return this._baseInstanceExt?this.createRenderCallback((r,i)=>{this._baseInstanceExt.drawArraysInstancedBaseInstanceWEBGL(n.TRIANGLE_STRIP,0,this.markUniformInfo.uniforms.uSegmentBreaks[0]*2,i,r)},t):this.createRenderCallback((r,i)=>{for(const a of Object.entries(this.bufferInfo.attribs)){const[o,s]=a;s.buffer&&s.numComponents&&s.divisor&&(s.offset=r*this.arrays[o].numComponents*this.bytesPerElement.get(o))}to(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,this.markUniformInfo.uniforms.uSegmentBreaks[0]*2,i)},t)}}const Cz=`in mediump vec2 vertexCoord;
1446
1451
  in lowp vec2 textureCoord;
1447
1452
 
1448
1453
  // Width of the text (all letters)
@@ -1664,7 +1669,7 @@ void main(void) {
1664
1669
 
1665
1670
  setupPicking();
1666
1671
  }
1667
- `,Tz=`uniform sampler2D uTexture;
1672
+ `,kz=`uniform sampler2D uTexture;
1668
1673
 
1669
1674
  in vec2 vTexCoord;
1670
1675
  in float vEdgeFadeOpacity;
@@ -1703,7 +1708,7 @@ void main() {
1703
1708
  fragColor = vPickingColor;
1704
1709
  }
1705
1710
  }
1706
- `,Iz=`layout(std140) uniform Mark {
1711
+ `,Tz=`layout(std140) uniform Mark {
1707
1712
  uniform mediump float uSdfNumerator;
1708
1713
 
1709
1714
  uniform mediump vec2 uD; // dx & dy
@@ -1725,7 +1730,7 @@ void main() {
1725
1730
 
1726
1731
  #pragma markUniforms
1727
1732
  };
1728
- `,Rz={left:-1,center:0,right:1},Dz={top:-1,middle:0,bottom:1,alphabetic:1};class Bz extends tu{constructor(t){super(t),Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x:.5,y:.5,x2:void 0,y2:void 0,text:"",size:11,color:"black",opacity:1,font:void 0,fontStyle:void 0,fontWeight:void 0,align:"center",baseline:"middle",dx:0,dy:0,angle:0,fitToBand:!1,squeeze:!0,paddingX:0,paddingY:0,flushX:!0,flushY:!0,logoLetters:!1,viewportEdgeFadeWidthTop:0,viewportEdgeFadeWidthRight:0,viewportEdgeFadeWidthBottom:0,viewportEdgeFadeWidthLeft:0,viewportEdgeFadeDistanceTop:-1/0,viewportEdgeFadeDistanceRight:-1/0,viewportEdgeFadeDistanceBottom:-1/0,viewportEdgeFadeDistanceLeft:-1/0})),this.font=this.properties.font?t.context.fontManager.getFont(this.properties.font,this.properties.fontStyle,this.properties.fontWeight):t.context.fontManager.getDefaultFont(),this.setupExprRefsNeedingGraphicsUpdate(["text","fitToBand","logoLetters"])}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","color","size","opacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size","text","angle"]}fixEncoding(t){for(const n of bs)this.properties.fitToBand&&B1(t,n);return t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(kz,Tz,[Iz])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uSdfNumerator",{expr:"devicePixelRatio"},n=>{let r=.35;return this.properties.logoLetters&&(r/=2),this.font.metrics.common.base/(n/r)}),this.registerMarkUniformValue("uPaddingX",t.paddingX),this.registerMarkUniformValue("uPaddingY",t.paddingY),this.registerMarkUniformValue("uFlushX",t.flushX,n=>!!n),this.registerMarkUniformValue("uFlushY",t.flushY,n=>!!n),this.registerMarkUniformValue("uSqueeze",t.squeeze,n=>!!n),Qc(this.markUniformInfo,{uAlign:[Rz[t.align],Dz[t.baseline]],uD:[t.dx,-t.dy],uLogoLetter:!!t.logoLetters,uViewportEdgeFadeWidth:[t.viewportEdgeFadeWidthTop,t.viewportEdgeFadeWidthRight,t.viewportEdgeFadeWidthBottom,t.viewportEdgeFadeWidthLeft],uViewportEdgeFadeDistance:[t.viewportEdgeFadeDistanceTop,t.viewportEdgeFadeDistanceRight,t.viewportEdgeFadeDistanceBottom,t.viewportEdgeFadeDistanceLeft]})}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getData(),r=this.encoding,i=this.encoders.text.accessor||this.encoders.text;let a=0;const o="format"in r.text?pt(r.text.format):c=>c;for(const c of n){const u=o(i(c)),f=Ue(u)?u:u===null?"":""+u;a+=f&&f.length||0}const s=new WN({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(a,this.properties.minBufferSize||1024)});s.addBatches(t.facetBatches);const l=s.toArrays();this.rangeMap.migrateEntries(l.rangeMap),this.updateBufferInfo(l)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>{Cs(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>to(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Md(n,this.vertexArrayInfo,n.TRIANGLES,i,r),t)}}const i4=1;function M1(){let e=[0,1],t=[0,1],n=1,r=1,i=0,a=0,o=.5,s=0;const c=u=>(u+o-e[0])/n*r+t[0];return c.invert=u=>(u-t[0])/r*n+e[0]-o,c.domain=function(u){if(arguments.length){e=Eh(u),n=e[1]-e[0];const f=e[0]===0&&e[0]===0;if(n<i4&&!f){n=i4;const h=(e[0]+e[1])/2;e[0]=h-n/2,e[1]=h+n/2}return c}else return e.slice()},c.range=function(u){return arguments.length?(t=[...u],r=t[1]-t[0],c):t},c.numberingOffset=function(u){return arguments.length?(s=u,c):s},c.padding=function(u){return arguments.length?(a=u,i=Math.min(1,u),c):i},c.paddingInner=function(u){return arguments.length?(i=Math.min(1,u),c):i},c.paddingOuter=function(u){return arguments.length?(a=u,c):a},c.align=function(u){return arguments.length?(o=Math.max(0,Math.min(1,u)),c):o},c.step=()=>r/n,c.bandwidth=()=>c.step(),c.ticks=u=>{const f=c.align(),h=c.numberingOffset();return Jl(e[0]-f+h,e[1]-f+h,Math.min(u,Math.ceil(n))).filter(Number.isInteger).map(d=>d-s)},c.tickFormat=(u,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const d=Ci(e[0],e[1],Math.min(u,Math.ceil(n)))<1e5?pt(","):pt(".3s");return p=>d(p+s)},c.copy=()=>M1().domain(e).range(t).paddingInner(i).paddingOuter(a).numberingOffset(s),c}function Fz(){const e=M1().numberingOffset(1);let t;e.genome=function(r){return arguments.length?(t=r,e):t},e.ticks=r=>{if(!t)return[];const i=e.domain(),a=e.numberingOffset(),[o,s]=[Math.max(i[0],0),Math.min(i[1],t.totalSize-1)].map(u=>t.toChromosome(u)),l=Math.max(1,Ci(i[0],i[1],r)),c=[];for(let u=o.index;u<=s.index;u++){const f=t.chromosomes[u],h=Math.max(f.continuousStart+l,i[0]-(i[0]-f.continuousStart)%l),d=Math.min(f.continuousEnd-l/4,i[1]+1);for(let p=h;p<=d;p+=l){const g=p-a;g>=i[0]&&g<i[1]&&c.push(g)}}return c},e.tickFormat=(r,i)=>{if(!t)return;if(i)throw new Error("Locus scale's tickFormat does not support a specifier!");const a=e.domain(),o=a[1]-a[0],s=e.numberingOffset(),c=Ci(a[0],a[1],Math.min(r,Math.ceil(o)))<1e6?pt(","):pt(".3s"),u=f=>f-t.toChromosome(f).continuousStart;return f=>c(u(f)+s)};const n=e.copy;return e.copy=()=>n().genome(t),e}function Mz(e){return e.type=="locus"}function zd(e,t,n){if(n=n||[],e.some(o=>o===null)){if(e.every(o=>o===null))return null;throw console.warn(e),new Error("Cannot merge objects with nulls!")}const r={},i=(o,s)=>o===s||Ts(o)&&Ts(s)||Ts(o)&&s===!0||o===!0&&qt(s),a=o=>{for(let s in o){const l=o[s];if(!n.includes(s)&&l!==void 0)if(r[s]!==void 0&&!i(r[s],l))console.warn(`Conflicting property ${s} of ${t}: (${JSON.stringify(r[s])} and ${JSON.stringify(o[s])}). Using ${JSON.stringify(r[s])}.`);else{const c=r[s];if(Ts(c))Ts(l)&&(r[s]=zd([c,l],s));else if(Ts(l)){if(!(c===!0||c===void 0))throw new Error("Bug in merge! Target is: "+c);r[s]=zd([{},l],s)}else r[s]=l}}};for(const o of e)a(o);return r}function Ts(e){return qt(e)&&!Array.isArray(e)}/*!
1733
+ `,Iz={left:-1,center:0,right:1},Rz={top:-1,middle:0,bottom:1,alphabetic:1};class Dz extends tu{constructor(t){super(t),Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x:.5,y:.5,x2:void 0,y2:void 0,text:"",size:11,color:"black",opacity:1,font:void 0,fontStyle:void 0,fontWeight:void 0,align:"center",baseline:"middle",dx:0,dy:0,angle:0,fitToBand:!1,squeeze:!0,paddingX:0,paddingY:0,flushX:!0,flushY:!0,logoLetters:!1,viewportEdgeFadeWidthTop:0,viewportEdgeFadeWidthRight:0,viewportEdgeFadeWidthBottom:0,viewportEdgeFadeWidthLeft:0,viewportEdgeFadeDistanceTop:-1/0,viewportEdgeFadeDistanceRight:-1/0,viewportEdgeFadeDistanceBottom:-1/0,viewportEdgeFadeDistanceLeft:-1/0})),this.font=this.properties.font?t.context.fontManager.getFont(this.properties.font,this.properties.fontStyle,this.properties.fontWeight):t.context.fontManager.getDefaultFont(),this.setupExprRefsNeedingGraphicsUpdate(["text","fitToBand","logoLetters"])}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","color","size","opacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size","text","angle"]}fixEncoding(t){for(const n of bs)this.properties.fitToBand&&B1(t,n);return t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(Cz,kz,[Tz])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uSdfNumerator",{expr:"devicePixelRatio"},n=>{let r=.35;return this.properties.logoLetters&&(r/=2),this.font.metrics.common.base/(n/r)}),this.registerMarkUniformValue("uPaddingX",t.paddingX),this.registerMarkUniformValue("uPaddingY",t.paddingY),this.registerMarkUniformValue("uFlushX",t.flushX,n=>!!n),this.registerMarkUniformValue("uFlushY",t.flushY,n=>!!n),this.registerMarkUniformValue("uSqueeze",t.squeeze,n=>!!n),Qc(this.markUniformInfo,{uAlign:[Iz[t.align],Rz[t.baseline]],uD:[t.dx,-t.dy],uLogoLetter:!!t.logoLetters,uViewportEdgeFadeWidth:[t.viewportEdgeFadeWidthTop,t.viewportEdgeFadeWidthRight,t.viewportEdgeFadeWidthBottom,t.viewportEdgeFadeWidthLeft],uViewportEdgeFadeDistance:[t.viewportEdgeFadeDistanceTop,t.viewportEdgeFadeDistanceRight,t.viewportEdgeFadeDistanceBottom,t.viewportEdgeFadeDistanceLeft]})}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getData(),r=this.encoding,i=this.encoders.text.accessor||this.encoders.text;let a=0;const o="format"in r.text?pt(r.text.format):c=>c;for(const c of n){const u=o(i(c)),f=Ue(u)?u:u===null?"":""+u;a+=f&&f.length||0}const s=new WN({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(a,this.properties.minBufferSize||1024)});s.addBatches(t.facetBatches);const l=s.toArrays();this.rangeMap.migrateEntries(l.rangeMap),this.updateBufferInfo(l)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>{Cs(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>to(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Md(n,this.vertexArrayInfo,n.TRIANGLES,i,r),t)}}const i4=1;function M1(){let e=[0,1],t=[0,1],n=1,r=1,i=0,a=0,o=.5,s=0;const c=u=>(u+o-e[0])/n*r+t[0];return c.invert=u=>(u-t[0])/r*n+e[0]-o,c.domain=function(u){if(arguments.length){e=Eh(u),n=e[1]-e[0];const f=e[0]===0&&e[0]===0;if(n<i4&&!f){n=i4;const h=(e[0]+e[1])/2;e[0]=h-n/2,e[1]=h+n/2}return c}else return e.slice()},c.range=function(u){return arguments.length?(t=[...u],r=t[1]-t[0],c):t},c.numberingOffset=function(u){return arguments.length?(s=u,c):s},c.padding=function(u){return arguments.length?(a=u,i=Math.min(1,u),c):i},c.paddingInner=function(u){return arguments.length?(i=Math.min(1,u),c):i},c.paddingOuter=function(u){return arguments.length?(a=u,c):a},c.align=function(u){return arguments.length?(o=Math.max(0,Math.min(1,u)),c):o},c.step=()=>r/n,c.bandwidth=()=>c.step(),c.ticks=u=>{const f=c.align(),h=c.numberingOffset();return Jl(e[0]-f+h,e[1]-f+h,Math.min(u,Math.ceil(n))).filter(Number.isInteger).map(d=>d-s)},c.tickFormat=(u,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const d=Ci(e[0],e[1],Math.min(u,Math.ceil(n)))<1e5?pt(","):pt(".3s");return p=>d(p+s)},c.copy=()=>M1().domain(e).range(t).paddingInner(i).paddingOuter(a).numberingOffset(s),c}function Bz(){const e=M1().numberingOffset(1);let t;e.genome=function(r){return arguments.length?(t=r,e):t},e.ticks=r=>{if(!t)return[];const i=e.domain(),a=e.numberingOffset(),[o,s]=[Math.max(i[0],0),Math.min(i[1],t.totalSize-1)].map(u=>t.toChromosome(u)),l=Math.max(1,Ci(i[0],i[1],r)),c=[];for(let u=o.index;u<=s.index;u++){const f=t.chromosomes[u],h=Math.max(f.continuousStart+l,i[0]-(i[0]-f.continuousStart)%l),d=Math.min(f.continuousEnd-l/4,i[1]+1);for(let p=h;p<=d;p+=l){const g=p-a;g>=i[0]&&g<i[1]&&c.push(g)}}return c},e.tickFormat=(r,i)=>{if(!t)return;if(i)throw new Error("Locus scale's tickFormat does not support a specifier!");const a=e.domain(),o=a[1]-a[0],s=e.numberingOffset(),c=Ci(a[0],a[1],Math.min(r,Math.ceil(o)))<1e6?pt(","):pt(".3s"),u=f=>f-t.toChromosome(f).continuousStart;return f=>c(u(f)+s)};const n=e.copy;return e.copy=()=>n().genome(t),e}function Fz(e){return e.type=="locus"}function zd(e,t,n){if(n=n||[],e.some(o=>o===null)){if(e.every(o=>o===null))return null;throw console.warn(e),new Error("Cannot merge objects with nulls!")}const r={},i=(o,s)=>o===s||Ts(o)&&Ts(s)||Ts(o)&&s===!0||o===!0&&qt(s),a=o=>{for(let s in o){const l=o[s];if(!n.includes(s)&&l!==void 0)if(r[s]!==void 0&&!i(r[s],l))console.warn(`Conflicting property ${s} of ${t}: (${JSON.stringify(r[s])} and ${JSON.stringify(o[s])}). Using ${JSON.stringify(r[s])}.`);else{const c=r[s];if(Ts(c))Ts(l)&&(r[s]=zd([c,l],s));else if(Ts(l)){if(!(c===!0||c===void 0))throw new Error("Bug in merge! Target is: "+c);r[s]=zd([{},l],s)}else r[s]=l}}};for(const o of e)a(o);return r}function Ts(e){return qt(e)&&!Array.isArray(e)}/*!
1729
1734
  * Adapted from vega-encode:
1730
1735
  * https://github.com/vega/vega/blob/master/packages/vega-encode/src/ticks.js
1731
1736
  *
@@ -1733,7 +1738,7 @@ void main() {
1733
1738
  * All rights reserved.
1734
1739
  *
1735
1740
  * BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
1736
- */function a4(e,t,n){return ft(t)&&n!=null&&(t=Math.min(t,~~(vh(e.domain())/n)||1)),qt(t)&&(t.step,t=t.interval),t}function o4(e,t,n){var r=e.range(),i=Math.floor(r[0]),a=Math.ceil(qn(r));if(i>a&&(r=a,a=i,i=r),t=t.filter(function(s){return s=e(s),i<=s&&s<=a}),n>0&&t.length>1){for(var o=[t[0],qn(t)];t.length>n&&t.length>=3;)t=t.filter(function(s,l){return!(l%2)});t.length<3&&(t=o)}return t}function Pz(e,t){return e.bins?o4(e,Oz(e.bins,t)):e.ticks?e.ticks(t):e.domain()}function Oz(e,t){var n=e.length,r=~~(n/(t||n));return r<2?e.slice():e.filter(function(i,a){return!(a%r)})}function Lz(e,t,n){var r=e.tickFormat?e.tickFormat(t,n):n?pt(n):String;if(f3(e.type)){var i=zz(n);r=e.bins?i:Nz(r,i)}return r}function Nz(e,t){return function(n){return e(n)?t(n):""}}function zz(e){var t=Ti(e||",");if(t.precision==null){switch(t.precision=12,t.type){case"%":t.precision-=2;break;case"e":t.precision-=1;break}return Uz(pt(t),pt(".1f")(1)[1])}else return pt(t)}function Uz(e,t){return function(n){var r=e(n),i=r.indexOf(t),a,o;if(i<0)return r;for(a=$z(r,i),o=a<r.length?r.slice(a):"";--a>i;)if(r[a]!=="0"){++a;break}return r.slice(0,a)+o}}function $z(e,t){var n=e.lastIndexOf("e"),r;if(n>0)return n;for(n=e.length;--n>t;)if(r=e.charCodeAt(n),r>=48&&r<=57)return n+1}/*!
1741
+ */function a4(e,t,n){return ft(t)&&n!=null&&(t=Math.min(t,~~(vh(e.domain())/n)||1)),qt(t)&&(t.step,t=t.interval),t}function o4(e,t,n){var r=e.range(),i=Math.floor(r[0]),a=Math.ceil(qn(r));if(i>a&&(r=a,a=i,i=r),t=t.filter(function(s){return s=e(s),i<=s&&s<=a}),n>0&&t.length>1){for(var o=[t[0],qn(t)];t.length>n&&t.length>=3;)t=t.filter(function(s,l){return!(l%2)});t.length<3&&(t=o)}return t}function Mz(e,t){return e.bins?o4(e,Pz(e.bins,t)):e.ticks?e.ticks(t):e.domain()}function Pz(e,t){var n=e.length,r=~~(n/(t||n));return r<2?e.slice():e.filter(function(i,a){return!(a%r)})}function Oz(e,t,n){var r=e.tickFormat?e.tickFormat(t,n):n?pt(n):String;if(f3(e.type)){var i=Nz(n);r=e.bins?i:Lz(r,i)}return r}function Lz(e,t){return function(n){return e(n)?t(n):""}}function Nz(e){var t=Ti(e||",");if(t.precision==null){switch(t.precision=12,t.type){case"%":t.precision-=2;break;case"e":t.precision-=1;break}return zz(pt(t),pt(".1f")(1)[1])}else return pt(t)}function zz(e,t){return function(n){var r=e(n),i=r.indexOf(t),a,o;if(i<0)return r;for(a=Uz(r,i),o=a<r.length?r.slice(a):"";--a>i;)if(r[a]!=="0"){++a;break}return r.slice(0,a)+o}}function Uz(e,t){var n=e.lastIndexOf("e"),r;if(n>0)return n;for(n=e.length;--n>t;)if(r=e.charCodeAt(n),r>=48&&r<=57)return n+1}/*!
1737
1742
  * Adapted from vega-encode:
1738
1743
  * https://github.com/vega/vega/blob/master/packages/vega-encode/src/Scale.js
1739
1744
  *
@@ -1741,11 +1746,11 @@ void main() {
1741
1746
  * All rights reserved.
1742
1747
  *
1743
1748
  * BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
1744
- */const Hz="locus",Gz="index";var Vz=5;function jz(e){const t=e.type;return!e.bins&&(t===gs||t===Oc||t===Lc)}function s4(e){return _t(e)&&![xr,Gz,Hz].includes(e)}function l4(e){return e||{warn:(t,...n)=>console.warn(t,...n)}}var qz=xh(["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 c4(e,t,n){n=l4(n);for(const r in e)if(!qz[r]){if(r==="padding"&&s4(t.type))continue;Jt(t[r])?t[r](e[r]):n.warn("Unsupported scale property: "+r)}eU(t,e,Jz(t,e,Qz(t,e,n)))}function Wz(e,t){const n=Yz(e),r=Ie(n);if(!r)throw new Error("Unknown scale type: "+n);const i=r();return!e.domain&&_t(i.type)&&(e.domain=[0,0]),c4(e,i,t),i}function Yz(e){var t=e.type,n="",r;return t===xr?xr+"-"+gs:(Zz(e)&&(r=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=r===2?xr+"-":r===3?ms+"-":""),(n+t||gs).toLowerCase())}function Zz(e){const t=e.type;return _t(t)&&t!==r3&&t!==i3&&(e.scheme||e.range&&e.range.length&&e.range.every(Ue))}function Qz(e,t,n){if(!e.domain)return 0;n=l4(n);var r=Xz(e,t.domainRaw,n);if(r>-1)return r;var i=t.domain,a=e.type,o=t.zero||t.zero===void 0&&jz(e),s,l;return i?(s4(a)&&t.padding&&i[0]!==qn(i)&&(i=Kz(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&&(l=t.domainMid,(l<i[0]||l>i[s])&&n.warn("Scale domainMid exceeds domain min or max.",l),i.splice(s,0,l))),e.domain(u4(a,i,n)),a===Gm&&e.unknown(t.domainImplicit?um:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&a4(e,t.nice)||null),i.length):0}function Xz(e,t,n){return t?(e.domain(u4(e.type,t,n)),t.length):-1}function Kz(e,t,n,r,i,a){n??(n=[0,1]);var o=Math.abs(qn(n)-n[0]),s=o/(o-2*r),l=e===Li?pw(t,null,s):e===Lc?xg(t,null,s,.5):e===Oc?xg(t,null,s,i||1):e===od?$R(t,null,s,a||1):wg(t,null,s);return t=t.slice(),t[0]=l[0],t[t.length-1]=l[1],t}function u4(e,t,n){if(f3(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: "+wh(t))}return t}function Jz(e,t,n){let r=t.bins;if(r&&!Lt(r)){const i=(r.start==null||r.stop==null)&&e.domain(),a=r.start==null?i[0]:r.start,o=r.stop==null?qn(i):r.stop,s=r.step;s||ot("Scale bins parameter missing step property."),r=ki(a,o+s,s)}return r?e.bins=r:e.bins&&delete e.bins,e.type===jm&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function eU(e,t,n){var r=e.type,i=t.round||!1,a=t.range;if(t.rangeStep!=null)a=tU(r,t,n);else if(t.scheme&&(a=nU(r,t,n),Jt(a))){if(e.interpolator)return e.interpolator(a);ot(`Scale type ${r} does not support interpolating color schemes.`)}if(a&&ld(r))return e.interpolator(cd(P1(a,t.reverse),t.interpolate,t.interpolateGamma));a&&t.interpolate&&e.interpolate?e.interpolate(h3(t.interpolate,t.interpolateGamma)):Jt(e.round)?e.round(i):Jt(e.rangeRound)&&e.interpolate(i?Mc:Pi),a&&e.range(P1(a,t.reverse))}function tU(e,t,n){e!==s3&&e!==Vm&&ot("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===Vm?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*$m(n,i,r)]}function nU(e,t,n){var r=t.schemeExtent,i,a;return Lt(t.scheme)?a=cd(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),a=Wm(i),a||ot(`Unrecognized scheme name: ${t.scheme}`)),n=e===o3?n+1:e===jm?n-1:e===Hm||e===a3?+t.schemeCount||Vz:n,ld(e)?f4(a,r,t.reverse):Jt(a)?_M(f4(a,r),n):e===Gm?a:a.slice(0,n)}function f4(e,t,n){return Jt(e)&&(t||n)?SM(e,P1(t||[0,1],n)):e}function P1(e,t){return t?e.slice().reverse():e}const O1=pt(",d");function rU(e){return e.chrom+":"+O1(Math.floor(e.pos+1))}function h4(e){return!ft(e)&&"chrom"in e?rU(e):""+e}function iU(e,t){return e.chrom+":"+O1(Math.floor(e.pos+1))+"-"+(e.chrom!=t.chrom?t.chrom+":":"")+O1(Math.ceil(t.pos))}const aU="https://genomespy.app/data/genomes/";class oU{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=aU;try{this.setChromSizes(sU(await mc({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=zr(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 iU(...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 sU(e){return oD(e).filter(t=>/^chr[0-9A-Z]+$/.test(t[0])).map(([t,n])=>({name:t,size:parseInt(n)}))}function Ud(e){return qt(e)&&"chrom"in e}function lU(e){return e.every(Ud)}class nu extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof nu&&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 L1 extends nu{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 d4 extends nu{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 p4 extends d4{constructor(){super(),this.type="nominal"}}class cU extends nu{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 g4={quantitative:L1,index:L1,locus:L1,nominal:p4,ordinal:d4};function m4(e,t){if(e=="quantitative"&&uU(t)){const n=new cU(t);return n.type=e,n}else if(g4[e]){const n=new g4[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function uU(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function fU(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function hU(e){return--e*e*e+1}function dU(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function pU(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function gU(e){return 1-pU(e)}function mU(e,t,n){return e*Math.pow(t/e,n)}Ie("index",M1,["continuous"]),Ie("locus",Fz,["continuous"]),Ie("null",ud,[]);const b4="quantitative",N1="ordinal",z1="nominal",y4="locus",bU="index";class yU{constructor(t){H(this,Rf);H(this,Nv);H(this,cr);H(this,Df);H(this,Pp);H(this,Op);H(this,Bf);H(this,Ff);H(this,Tl);H(this,mi);H(this,Mf);H(this,Lp);H(this,zv);H(this,Pf);H(this,gi,void 0);H(this,kl,{domain:new Set,range:new Set});H(this,An,void 0);H(this,If,new Set);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){B(this,kl)[t].add(n)}removeEventListener(t,n){B(this,kl)[t].delete(n)}pushUnitView(t,n){var o;const r=Ym(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&&!Gc(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})}getConfiguredDomain(){return Y(this,Pf,Kv).call(this,t=>Gc(t.channel)?void 0:t.view.getConfiguredDomain(t.channel))}getDataDomain(){return Y(this,Pf,Kv).call(this,t=>Gc(t.channel)?void 0:t.view.extractDataDomain(t.channel))}reconfigure(){const t=B(this,An);if(!t||t.type=="null")return;const n=Y(this,Pp,tR).call(this),r=t.domain(),i=Y(this,Bf,Zv).call(this);if(c4({...i,range:void 0},t),t.props=i,Y(this,Ff,Qv).call(this),_t(t.type)&&ie(this,gi,Y(this,Mf,Xv).call(this)),!n){Y(this,cr,_i).call(this,"domain");return}const a=t.domain();em(a,r)||(this.isZoomable()?t.domain(r):Y(this,mi,Jo).call(this)?(t.domain(r),this.zoomTo(a,500)):Y(this,cr,_i).call(this,"domain"))}get scale(){if(B(this,An))return B(this,An);const t=Y(this,Bf,Zv).call(this),n=Wz({...t,range:void 0});n.props=t,ie(this,An,n),Y(this,Ff,Qv).call(this),Mz(n)&&n.genome(this.getGenome()),_t(n.type)&&ie(this,gi,Y(this,Mf,Xv).call(this));const r=n.range;if(r){const i=()=>Y(this,cr,_i).call(this,"range");n.range=function(a){if(arguments.length)r(a),i();else return r()},i()}return n}getDomain(){return this.scale.domain()}getComplexDomain(){var t;return((t=this.getGenome())==null?void 0:t.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return Y(this,mi,Jo).call(this)&&em(Y(this,Tl,gg).call(this),this.getDomain())}isZoomable(){return Y(this,mi,Jo).call(this)&&!!this.scale.props.zoom}zoom(t,n,r){if(!Y(this,mi,Jo).call(this))return!1;const i=this.scale,a=i.domain();let o=[...a],s=i.invert(n);switch(i.props.reverse&&(r=-r),"align"in i&&(s+=i.align()),i.type){case"linear":case"index":case"locus":o=NR(o,r||0),o=wg(o,s,t);break;case"log":o=zR(o,r||0),o=pw(o,s,t);break;case"pow":case"sqrt":{const l=i;o=UR(o,r||0,l.exponent()),o=xg(o,s,t,l.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return B(this,gi)&&(o=HR(o,B(this,gi)[0],B(this,gi)[1])),[0,1].some(l=>o[l]!=a[l])?(i.domain(o),Y(this,cr,_i).call(this,"domain"),!0):!1}async zoomTo(t,n=!1){var s;if(Zl(n)&&(n=n?700:0),!Y(this,mi,Jo).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.scale,o=a.domain();if(n>0&&o.length==2){const l=o[1]-o[0],c=o[0]+l/2,u=r[1]-r[0],f=r[0]+u/2;await i.transition({duration:n,easingFunction:dU,onUpdate:h=>{const d=mU(l,u,h),p=(l-d)/(l-u),g=p*f+(1-p)*c;a.domain([g-d/2,g+d/2]),Y(this,cr,_i).call(this,"domain")}}),a.domain(r),Y(this,cr,_i).call(this,"domain")}else a.domain(r),i==null||i.requestRender(),Y(this,cr,_i).call(this,"domain")}resetZoom(){if(!Y(this,mi,Jo).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=Y(this,Tl,gg).call(this);return[0,1].some(r=>n[r]!=t[r])?(B(this,An).domain(n),Y(this,cr,_i).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?vh(B(this,gi))/vh(this.scale.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.scale;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 Ud(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&lU(t)?this.getGenome().toContinuousInterval(t):t}}gi=new WeakMap,kl=new WeakMap,An=new WeakMap,If=new WeakMap,Rf=new WeakSet,Wv=function(){return this.members[0].view},Nv=new WeakSet,sne=function(){return B(this,Rf,Wv).context},cr=new WeakSet,_i=function(t){for(const n of B(this,kl)[t].values())n({type:t,scaleResolution:this})},Df=new WeakSet,Yv=function(){return!!this.getConfiguredDomain()},Pp=new WeakSet,tR=function(){const t=B(this,An);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},Op=new WeakSet,nR=function(){const t=this.members.map(n=>Ym(n.view,n.channel).scale).filter(n=>n!==void 0);return zd(t,"scale",["domain"])},Bf=new WeakSet,Zv=function(){const t=Y(this,Op,nR).call(this);if(t===null||t.type=="null")return{type:"null"};const n={...Y(this,Lp,rR).call(this,this.type),...t};n.type||(n.type=vU(this.channel,this.type));const r=Y(this,Tl,gg).call(this);return r&&r.length>0?n.domain=r:Qn(n.type)&&(n.domain=new p4),!n.domain&&n.domainMid!==void 0&&(n.domain=[n.domainMin??0,n.domainMax??1]),this.channel=="y"&&Qn(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),wU(n,this.channel),n},Ff=new WeakSet,Qv=function(){const t=B(this,An).props,n=t.range;if(B(this,If).forEach(i=>i.invalidate()),!n||!Lt(n))return;const r=(i,a)=>a?i.slice().reverse():i;if(n.some(Wt)){let i;const a=()=>{B(this,An).range(r(i.map(o=>o()),t.reverse))};i=n.map(o=>{if(Wt(o)){const s=B(this,Rf,Wv).paramMediator.createExpression(o.expr);return s.addListener(a),B(this,If).add(s),()=>s(null)}else return()=>o}),a()}else B(this,An).range(r(n,t.reverse))},Tl=new WeakSet,gg=function(){return this.getConfiguredDomain()??(this.type==y4?this.getGenome().getExtent():this.getDataDomain())},mi=new WeakSet,Jo=function(){const t=this.scale.type;return _t(t)},Mf=new WeakSet,Xv=function(){const t=this.scale.props,n=t.zoom;if(xU(n)&&Lt(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():B(this,An).domain()},Lp=new WeakSet,rR=function(t){const n=this.channel,r={};return Y(this,Df,Yv).call(this)&&(r.zero=!1),Hc(n)?r.nice=!Y(this,Df,Yv).call(this):zi(n)?r.scheme=t==z1?"tableau10":t==N1?"blues":"viridis":dd(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r},zv=new WeakSet,lne=function(){return this.members.map(t=>t.view.getPathString()).join(", ")},Pf=new WeakSet,Kv=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 vU(e,t){if(t==bU||t==y4){if(b3(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][[z1,N1,b4].indexOf(t)]:t==b4?"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 wU(e,t){Hc(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&_t(e.type)&&(e.clamp=!0)}function xU(e){return qt(e)}function U1(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of Nt(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function $1(...e){for(const t of e)if(t!==void 0)return t}class AU{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=_n(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 Nd(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:zd(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=a=>{var s;const o=Ym(a.view,a.channel);if(!kn(o))return{member:a,explicitTitle:$1("axis"in o?(s=o.axis)==null?void 0:s.title:void 0,o.title),implicitTitle:$1(Zr(o)?o.field:void 0,hd(o)?o.expr:void 0)}},n=this.members.map(t),r=n.filter(a=>{var o;if(Gc(a.member.channel)&&!a.explicitTitle){const s=Xa(a.member.channel);return((o=n.find(l=>l.member.view==a.member.view&&l.member.channel==s))==null?void 0:o.explicitTitle)===void 0}return!0}),i=new Set(r.map(a=>$1(a.explicitTitle,a.implicitTitle)).filter(Ue));return i.size?[...i].join(", "):null}}function ru(e,t,{spacing:n,devicePixelRatio:r,offset:i,reverse:a}={}){n=n||0,i=i||0;let o=0,s=0;for(const p of e)o+=Is(p.px)+(H1(p)?0:n),s+=Is(p.grow);o-=n;const l=Math.max(0,t-o),c=r!==void 0?p=>Math.round(p*r)/r:p=>p,u=[],f=[],h=p=>{const g=u.length;if(!g)return;const b=(p?n:0)*(a?-1:1);d-=b;for(let y=0;y<g;y++)f.push({location:d+(y+1)/(g+1)*b,size:0});d+=b,u.length=0};let d=a?Math.max(t,o):0+i;if(e.length==1&&H1(e[0]))return[{location:d,size:0}];for(let p=0;p<e.length;p++){const g=e[p];if(H1(g))u.push(g);else{h(f.length>0);const b=Is(g.px)+(s?Is(g.grow)/s*l:0);a&&(d-=b),f.push({location:c(d),size:c(b)}),a?d-=n:d+=b+n}}return d+=a?n:-n,h(!1),f}function EU(e){let t=0,n=0;for(const r of e)t=Math.max(t,r.px??0),n=Math.max(n,r.grow??0);return{px:t,grow:n}}function SU(e){const t={px:0,grow:0};for(const n of e)t.px+=Is(n.px),t.grow+=Is(n.grow);return t}const Uv=class Uv{constructor(t,n){H(this,Of);this.width=t,this.height=n}addPadding(t){return Y(this,Of,Jv).call(this,t.width,t.height)}subtractPadding(t){return Y(this,Of,Jv).call(this,-t.width,-t.height)}};Of=new WeakSet,Jv=function(t,n){return new Uv({px:(this.width.px??0)+t,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Kr=Uv;const iu=Object.freeze({px:0,grow:0}),v4=new Kr(iu,iu);function H1(e){return!e.px&&!e.grow}function Is(e){return e||0}function _U(e){return e&&(ft(e.px)||ft(e.grow))}function w4(e){if(_4(e))throw new Error("parseSizeDef does not accept step-based sizes.");if(_U(e))return e;if(ft(e))return{px:e,grow:0};if(e==="container")return{px:0,grow:1};if(!e)return{px:0,grow:1};throw new Error(`Invalid sizeDef: ${e}`)}function CU(e,t,n){return{get location(){const r=n();switch(r){case 0:return e.location;case 1:return t.location;default:return r*t.location+(1-r)*e.location}},get size(){const r=n();switch(r){case 0:return e.size;case 1:return t.size;default:return r*t.size+(1-r)*e.size}}}}function kU(e,t){const n=ft(t)?()=>t:t;return{get location(){return e.location+n()},get size(){return e.size}}}function TU(e,t){const n=ft(t)?()=>t:t;return{get location(){return e.location*n()},get size(){return e.size*n()}}}function x4(e,t){return t>=e.location&&t<e.location+e.size}class Ct{constructor(t,n,r,i){this.top=t||0,this.right=n||0,this.bottom=r||0,this.left=i||0}get width(){return this.left+this.right}get height(){return this.top+this.bottom}expand(t){return t<=0?this:new Ct(this.top+t,this.right+t,this.bottom+t,this.left+t)}add(t){return new Ct(this.top+t.top,this.right+t.right,this.bottom+t.bottom,this.left+t.left)}subtract(t){return new Ct(this.top-t.top,this.right-t.right,this.bottom-t.bottom,this.left-t.left)}union(t){return new Ct(Math.max(this.top,t.top),Math.max(this.right,t.right),Math.max(this.bottom,t.bottom),Math.max(this.left,t.left))}getHorizontal(){return new Ct(0,this.right,0,this.left)}getVertical(){return new Ct(this.top,0,this.bottom,0)}get horizontalTotal(){return this.left+this.right}get verticalTotal(){return this.top+this.bottom}static createFromConfig(t){return typeof t=="number"?this.createUniformPadding(t):t?this.createFromRecord(t):G1}static createFromRecord(t){return new Ct(t.top,t.right,t.bottom,t.left)}static zero(){return G1}static createUniformPadding(t){return new Ct(t,t,t,t)}}const G1=Ct.createUniformPadding(0);Object.freeze(G1);const IU=/^([A-Za-z]+:)?\/\//;function RU(e,t){if(t&&IU.test(t))return t;const n=e();return n&&t?n.endsWith("/")?n+t:n+"/"+t:n??t}const A4="VISIT_SKIP",ao="VISIT_STOP",E4=e=>e;class S4{constructor(t,n,r,i,a,o={}){H(this,jo);H(this,zf);H(this,Il,{});H(this,Lf,{});H(this,Nf,{});jt(this,"opacityFunction",E4);jt(this,"facetCoords",new Ur([],JSON.stringify));if(!t)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=r,this.dataParent=i,this.name=t.name||a,this.spec=t,this.resolutions={scale:{},axis:{}},YE(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...o},this.needsAxes={x:!1,y:!1},this.paramMediator=new RM(()=>{var s;return(s=this.dataParent)==null?void 0:s.paramMediator}),t.params)for(const s of t.params)this.paramMediator.registerParam(s)}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>Ct.createFromConfig(this.spec.padding))}getOverhang(){return Ct.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Kr(Y(this,jo,uh).call(this,"width"),Y(this,jo,uh).call(this,"height")):v4)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return v4;const t=this.getSize();return new Kr(Y(this,jo,uh).call(this,"viewportWidth")??t.width,Y(this,jo,uh).call(this,"viewportHeight")??t.height)}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(t=>t.isConfiguredVisible())}getEffectiveOpacity(){var t;return this.opacityFunction(((t=this.layoutParent)==null?void 0:t.getEffectiveOpacity())??1)}getPathString(){return this.getLayoutAncestors().map(t=>t.name).reverse().join("/")}getLayoutAncestors(){return Y(this,zf,ew).call(this,"layoutParent")}getDataAncestors(){return Y(this,zf,ew).call(this,"dataParent")}handleBroadcast(t){for(const n of B(this,Il)[t.type]||[])n(t)}_addBroadcastHandler(t,n){let r=B(this,Il)[t];r||(r=[],B(this,Il)[t]=r),r.push(n)}handleInteractionEvent(t,n,r){const i=r?B(this,Lf):B(this,Nf);for(const a of i[n.type]||[])a(t,n)}addInteractionEventListener(t,n,r){const i=r?B(this,Lf):B(this,Nf);let a=i[t];a||(a=[],i[t]=a),a.push(n)}visit(t){try{const n=t(this);if(t.postOrder&&t.postOrder(this),n!==ao)return n}catch(n){throw n.view=this,n}}getDescendants(){const t=[];return this.visit(n=>{t.push(n)}),t}configureViewOpacity(){(!this.opacityFunction||this.opacityFunction===E4)&&(this.opacityFunction=BU(this))}onBeforeRender(){}render(t,n,r={}){r.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(r.facetId,r.clipRect?n.intersect(r.clipRect):n)}getEncoding(){const t=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...t,...n};for(const[i,a]of Object.entries(r))a===null&&delete r[i];return r}getFacetAccessor(t){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(t){var r;const n=this.getEncoding().sample;return Zr(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(t){const n=Xa(t);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(t){const n=Xa(t);return this.getDataAncestors().map(r=>r.resolutions.axis[n]).find(r=>r)}getConfiguredResolution(t,n){var r,i;return(i=(r=this.spec.resolve)==null?void 0:r[n])==null?void 0:i[t]}getConfiguredOrDefaultResolution(t,n){return this.getConfiguredResolution(t,n)??this.getConfiguredResolution("default",n)??this.getDefaultResolution(t,n)}getDefaultResolution(t,n){return"independent"}getBaseUrl(){return RU(()=>{var t;return(t=this.dataParent)==null?void 0:t.getBaseUrl()},this.spec.baseUrl)}isPickingSupported(){return!0}getTitleText(){const t=this.spec.title;if(t)return Ue(t)?t:Wt(t.text)?this.paramMediator.evaluateAndGet(t.text.expr):t.text}_cache(t,n){return Nd(this,t,n)}_invalidateCacheByPrefix(t,n="self"){switch(n){case"self":Kc(this,t);break;case"ancestors":for(const r of this.getLayoutAncestors())Kc(r,t);break;case"progeny":this.visit(r=>Kc(r,t));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(t){}}Il=new WeakMap,Lf=new WeakMap,Nf=new WeakMap,jo=new WeakSet,uh=function(t){var i;let n=this.spec[t];const r=t=="viewportWidth"||t=="viewportHeight";if(_4(n)){if(r)throw new io(`Cannot use step-based size with "${t}"!`,this);const a=n.step,o=(i=this.getScaleResolution(t=="width"?"x":"y"))==null?void 0:i.scale;if(o){let s=0;if(Qn(o.type))s=o.domain().length;else if(["locus","index"].includes(o.type)){const c=o.domain();s=_n(c)-c[0]}else throw new io(`Cannot use step-based size with "${o.type}" scale!`,this);const l=o;return s=$m(s,l.paddingInner(),l.paddingOuter()),{px:s*a,grow:0}}else throw new io("Cannot use 'step' size with missing scale!",this)}else return(n&&w4(n))??(r?void 0:{px:0,grow:1})},zf=new WeakSet,ew=function(t){const n=[];let r=this;do n.push(r),r=r[t];while(r);return n};function DU(e){return"unitsPerPixel"in e}function BU(e){const t=e.spec.opacity;if(t!==void 0){if(ft(t))return n=>n*t;if(DU(t)){const n=a=>{var s;const o=(s=e.getScaleResolution(a))==null?void 0:s.scale;if(["linear","index","locus"].includes(o==null?void 0:o.type))return o},r=t.channel?n(t.channel):n("x")??n("y");if(!r)throw new io("Cannot find a resolved quantitative scale for dynamic opacity!",e);const i=Fm().domain(t.unitsPerPixel).range(t.values).clamp(!0);return a=>{const s=vh(r.domain())/1e3;return i(s)*a}}else if(Wt(t)){const n=e.paramMediator.createExpression(t.expr);return n.addListener(()=>e.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const _4=e=>!!(e!=null&&e.step),FU={point:pz,rect:lz,rule:yz,link:_z,text:Bz};class bt extends S4{constructor(n,r,i,a,o,s){super(n,r,i,a,o,s);H(this,$f);H(this,Uf,void 0);this.spec=n;const l=FU[this.getMarkType()];if(l)this.mark=new l(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),ie(this,Uf,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(c=>{var u;return(u=this.getScaleResolution(c))==null?void 0:u.addEventListener("domain",()=>B(this,Uf).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0}}render(n,r,i={}){super.render(n,r,i),this.isConfiguredVisible()&&(n.pushView(this,r),n.renderMark(this.mark,i),n.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}resolve(n){n||(this.resolve("scale"),this.resolve("axis"));const r=this.mark.encoding;for(const[i,a]of Object.entries(r)){if(!dn(a))continue;const o=Xa(a.resolutionChannel??i);if(!Ka(o)||n=="axis"&&!Hc(o))continue;let s=this;for(;(s.getConfiguredOrDefaultResolution(o,n)=="forced"||s.dataParent&&["shared","excluded","forced"].includes(s.dataParent.getConfiguredOrDefaultResolution(o,n)))&&s.getConfiguredOrDefaultResolution(o,n)!="excluded";)s=s.dataParent;if(n=="axis"&&Hc(i)&&b3(o))s.resolutions[n][o]||(s.resolutions[n][o]=new AU(o)),s.resolutions[n][o].pushUnitView(this,i);else if(n=="scale"&&Ka(i)){if(!s.resolutions[n][o]){const l=new yU(o);s.resolutions[n][o]=l,l.addEventListener("range",c=>{var u;(u=this.context.glHelper)==null||u.createRangeTexture(c.scaleResolution,!0)})}s.resolutions[n][o].pushUnitView(this,i)}}}getAccessor(n){return this._cache("accessor/"+n,()=>{const r=this.mark.encoding;if(r&&r[n])return this.context.accessorFactory.createAccessor(r[n])})}getFacetAccessor(n){const r=this.getAccessor("sample");return r||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}getConfiguredDomain(n){const r=Y(this,$f,tw).call(this,n),i=r&&r.scale&&r.scale.domain;if(i){const a=this.getScaleResolution(r.resolutionChannel??n);return m4(r.type??"nominal",a.fromComplexInterval(i))}}extractDataDomain(n){const i=Y(this,$f,tw).call(this,n).type??"nominal",a=l=>{let c;const u=this.mark.encoding[l];if(u){const f=this.context.accessorFactory.createAccessor(u);if(f)if(c=m4(i),f.constant)c.extend(f({}));else{const h=this.getCollector();h!=null&&h.completed&&h.visitData(d=>c.extend(f(d)))}}return c};let o=a(n);const s=Zm[n];if(s){const l=a(s);l&&o.extendAll(l)}return o}getZoomLevel(){const n=r=>{var i;return((i=this.getScaleResolution(r))==null?void 0:i.getZoomLevel())??1};return bs.map(n).reduce((r,i)=>r*i,1)}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0),n.target=this,!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return n=="x"?"shared":"independent"}}Uf=new WeakMap,$f=new WeakSet,tw=function(n){if(Gc(n))throw new Error(`getDomain(${n}), must only be called for primary channels!`);const r=this.mark.encoding[n];if(!dn(r))throw new Error("The channel has no scale, cannot get domain!");return r};function*V1(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of V1(r,[...t,n]))yield i;else yield[[...t,n],r]}class au extends st{constructor(n){super();H(this,Hf);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=void 0,this._init()}get behavior(){return F1}_init(){this._data=[],this.facetBatches=new Ur([],JSON.stringify),this.facetBatches.set(void 0,this._data)}reset(){super.reset(),this._init()}handle(n){this._data.push(n)}beginBatch(n){hz(n)&&(this._data=[],this.facetBatches.set(Nt(n.facetId),this._data))}complete(){var a,o;const n=(a=this.params)==null?void 0:a.sort,r=n?gw(n.field,n.order):void 0,i=s=>{r&&s.sort(r)};if((o=this.params.groupby)!=null&&o.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const s=this.params.groupby.map(c=>Le(c)),l=s.length>1?Kl(this._data,...s):MU(this._data,s[0]);this.facetBatches.clear();for(const[c,u]of V1(l))this.facetBatches.set(c,u)}for(const s of this.facetBatches.values())i(s);Y(this,Hf,nw).call(this),super.complete();for(const s of this.observers)s(this)}repropagate(){for(const n of this.children)n.reset();Y(this,Hf,nw).call(this);for(const n of this.children)n.complete()}getData(){switch(this._checkStatus(),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const n=this.facetBatches;return{[Symbol.iterator]:function*(){for(const i of n.values())for(let a=0;a<i.length;a++)yield i[a]}}}}}visitData(n){this._checkStatus();for(const r of this.facetBatches.values())for(let i=0;i<r.length;i++)n(r[i])}getItemCount(){let n=0;for(const r of this.facetBatches.values())n+=r.length;return n}_checkStatus(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")}}Hf=new WeakSet,nw=function(){if(this.children.length)for(const[n,r]of this.facetBatches.entries()){if(n){const i={type:"facet",facetId:n};for(const a of this.children)a.beginBatch(i)}for(const i of r)this._propagate(i)}};function MU(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 ou{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 l=this.ids[o],c=this.values[o];const u=this.values[s];if(s<this.length&&u<c&&(o=s,l=this.ids[s],c=u),c>=r)break;this.ids[a]=l,this.values[a]=c,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 PU extends st{get behavior(){return Sr}constructor(t){super(),this.params=t,this.startAccessor=Le(t.start),this.endAccessor=Le(t.end),this.chromAccessor=t.chrom?Le(t.chrom):n=>{},this.weightAccessor=t.weight?Le(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 ou}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 l,c,u,f=0,h=NaN;const d=this.ends;d.clear();const p=y=>{this._propagate(y),l=null},g=(y,w,A)=>{if(y==w)return;let x=!1;l&&(l[t]===A?(l[n]=w,x=!0):l[t]!=0&&p(l)),x||(l=this.createSegment(y,w,A,u))},b=()=>{let y=0;for(;(y=d.peekValue())!==void 0;)g(h,y,f),h=y,f-=d.pop();h=NaN,l&&p(l)};this.handle=y=>{const w=i(y);let A=0;for(;(A=d.peekValue())!==void 0&&A<w;)g(h,A,f),h=A,f-=d.pop();if(r){let E=o(y);E!==c&&(b(),u=E,c=u)}isNaN(h)||g(h,w,f),h=w;const x=s(y);f+=x,d.push(x,a(y))},this.complete=()=>{b(),super.complete()},this.beginBatch=y=>{b(),c=null,super.beginBatch(y)}}}function OU(e,t,n=0,r=e.length){const i=new ou,a=r-n;let o;for(o=0;o<t&&o<a;o++)i.push(o,e[n+o]);for(;o<a;o++){const c=e[n+o];c>=i.peekValue()&&(i.push(o,c),i.pop())}const s=[];let l;for(;(l=i.pop())!==void 0;)s.push(n+l);return s.reverse()}class LU{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 NU extends st{get behavior(){return F1}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=Le(this.params.pos),this.posBisector=Ah(this.posAccessor),this.scoreAccessor=Le(this.params.score),this.widthAccessor=Le(this.params.width),this.laneAccessor=this.params.lane?Le(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 LU(200));this.schedule(),super.complete()}_filterAndPropagate(){var o;super.reset();const t=this.resolution.scale,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=OU(this._scores,i,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of a){const l=this._data[s],c=t(this.posAccessor(l))*n,u=this.widthAccessor(l)/2+this.padding;this.reservationMaps.get(this.laneAccessor(l)).reserve(c-u,c+u)&&this._propagate(l)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class zU extends st{constructor(t,n){super(n),this.params=t,this.predicate=void 0}initialize(){this.predicate=this.paramMediator.createExpression(this.params.expr),this.predicate.addListener(()=>this.repropagate())}handle(t){this.predicate(t)&&this._propagate(t)}}class UU extends st{get behavior(){return Sr}constructor(t){super();const n=t.index;if(t.fields){const r=Nt(t.fields).map(a=>Le(a)),i=Nt(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((l,c)=>l(a)??[]),s=o[0].length;for(let l=0;l<s;l++){const c=Object.assign({},a);for(let u=0;u<r.length;u++)c[i[u]]=l<o[u].length?o[u][l]:null;n&&(c[n]=l),this._propagate(c)}}}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 $U="0".charCodeAt(0);function*HU(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-$U}yield r}class GU extends st{get behavior(){return Sr}constructor(t){super();const n=Le(t.exons??"exons"),r=Le(t.start??"start"),[i,a]=t.as||["exonStart","exonEnd"];this.handle=o=>{let s=r(o),l=s,c=!0;const u=n(o);for(const f of HU(u)){if(c)l=s+f;else{s=l+f;const h=Object.assign({},o);h[i]=l,h[a]=s,this._propagate(h)}c=!c}}}}class VU extends st{get behavior(){return Sr}constructor(t){super();const n=Nt(t.field).map(a=>Le(a)),r=Nt(t.separator),i=Nt(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(l=>!l(a)))return;const o=n.map((l,c)=>l(a).split(r[c]));jU(o,a);const s=o[0].length;for(let l=0;l<s;l++){const c=Object.assign({},a);for(let u=0;u<n.length;u++)c[i[u]]=o[u][l];this._propagate(c)}}}}function jU(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 qU extends st{get behavior(){return qi}constructor(t,n){super(n),this.params=t,this.as=t.as,this.fn=void 0}initialize(){this.fn=this.paramMediator.createExpression(this.params.expr),this.fn.addListener(()=>this.repropagate())}handle(t){t[this.as]=this.fn(t),this._propagate(t)}}class C4 extends st{get behavior(){return qi}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=Le(t.chrom),o=Nt(t.pos).map(p=>Le(p)),s=Nt(t.as);if(o.length!=s.length)throw new Error('The number of "pos" and "as" elements must be equal!');const l=Nt(t.offset);let c;if(l.length==0)c=new Array(o.length).fill(0);else if(l.length==1)c=new Array(o.length).fill(l[0]);else if(l.length==o.length)c=l;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) - ${c[g]};`).join(`
1745
- `));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 k4={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 WU extends st{get behavior(){return qi}constructor(t){super();const n=R1(k4),r=Le(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 YU=65536;class ZU extends st{get behavior(){return qi}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=Le(t.start),a=Le(t.end);if(!t.preference!=!t.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(t.preference){const o=new Float64Array(YU),s=Le(t.preference),l=t.preferredOrder;let c=1/0;this.handle=u=>{const f=i(u);f<c&&o.fill(-1/0),c=f;const h=l.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 ou,s=new ou;let l=-1/0,c=0;this.handle=u=>{const f=i(u);for(;o.length&&(o.peekValue()<=f||f<l);){const d=o.pop();s.push(d,d)}l=f;let h=s.pop();h===void 0&&(h=c++),u[n]=h,this._propagate(u),o.push(h,a(u)+r)}}}}class QU extends st{get behavior(){return Sr}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=>Le(i)),r=t.as?t.as:n.map(ts);this.handle=i=>{const a={};for(let o=0;o<n.length;o++)a[r[o]]=n[o](i);this._propagate(a)}}}class XU extends st{get behavior(){return qi}constructor(t){super();const n=new RegExp(t.regex),r=typeof t.as=="string"?[t.as]:t.as,i=Le(t.field);this.handle=a=>{const o=i(a);if(Ue(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 l=0;l<r.length;l++)a[r[l]]=s[l+1]}else if(t.skipInvalidInput)for(let l=0;l<r.length;l++)a[r[l]]=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 KU extends st{get behavior(){return Sr}constructor(t){super();const n=Nt(t.columnRegex).map(h=>new RegExp(h)),r=Nt(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,l;const c=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 E=p.get(x);E||(E=[],p.set(x,E)),E[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}]]`)];l=new Function("datum","sampleId","attrs",`return {
1749
+ */const $z="locus",Hz="index";var Gz=5;function Vz(e){const t=e.type;return!e.bins&&(t===gs||t===Oc||t===Lc)}function s4(e){return _t(e)&&![xr,Hz,$z].includes(e)}function l4(e){return e||{warn:(t,...n)=>console.warn(t,...n)}}var jz=xh(["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 c4(e,t,n){n=l4(n);for(const r in e)if(!jz[r]){if(r==="padding"&&s4(t.type))continue;Jt(t[r])?t[r](e[r]):n.warn("Unsupported scale property: "+r)}Jz(t,e,Kz(t,e,Zz(t,e,n)))}function qz(e,t){const n=Wz(e),r=Ie(n);if(!r)throw new Error("Unknown scale type: "+n);const i=r();return!e.domain&&_t(i.type)&&(e.domain=[0,0]),c4(e,i,t),i}function Wz(e){var t=e.type,n="",r;return t===xr?xr+"-"+gs:(Yz(e)&&(r=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=r===2?xr+"-":r===3?ms+"-":""),(n+t||gs).toLowerCase())}function Yz(e){const t=e.type;return _t(t)&&t!==r3&&t!==i3&&(e.scheme||e.range&&e.range.length&&e.range.every(Ue))}function Zz(e,t,n){if(!e.domain)return 0;n=l4(n);var r=Qz(e,t.domainRaw,n);if(r>-1)return r;var i=t.domain,a=e.type,o=t.zero||t.zero===void 0&&Vz(e),s,l;return i?(s4(a)&&t.padding&&i[0]!==qn(i)&&(i=Xz(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&&(l=t.domainMid,(l<i[0]||l>i[s])&&n.warn("Scale domainMid exceeds domain min or max.",l),i.splice(s,0,l))),e.domain(u4(a,i,n)),a===Gm&&e.unknown(t.domainImplicit?um:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&a4(e,t.nice)||null),i.length):0}function Qz(e,t,n){return t?(e.domain(u4(e.type,t,n)),t.length):-1}function Xz(e,t,n,r,i,a){n??(n=[0,1]);var o=Math.abs(qn(n)-n[0]),s=o/(o-2*r),l=e===Li?pw(t,null,s):e===Lc?xg(t,null,s,.5):e===Oc?xg(t,null,s,i||1):e===od?$R(t,null,s,a||1):wg(t,null,s);return t=t.slice(),t[0]=l[0],t[t.length-1]=l[1],t}function u4(e,t,n){if(f3(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: "+wh(t))}return t}function Kz(e,t,n){let r=t.bins;if(r&&!Lt(r)){const i=(r.start==null||r.stop==null)&&e.domain(),a=r.start==null?i[0]:r.start,o=r.stop==null?qn(i):r.stop,s=r.step;s||ot("Scale bins parameter missing step property."),r=ki(a,o+s,s)}return r?e.bins=r:e.bins&&delete e.bins,e.type===jm&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function Jz(e,t,n){var r=e.type,i=t.round||!1,a=t.range;if(t.rangeStep!=null)a=eU(r,t,n);else if(t.scheme&&(a=tU(r,t,n),Jt(a))){if(e.interpolator)return e.interpolator(a);ot(`Scale type ${r} does not support interpolating color schemes.`)}if(a&&ld(r))return e.interpolator(cd(P1(a,t.reverse),t.interpolate,t.interpolateGamma));a&&t.interpolate&&e.interpolate?e.interpolate(h3(t.interpolate,t.interpolateGamma)):Jt(e.round)?e.round(i):Jt(e.rangeRound)&&e.interpolate(i?Mc:Pi),a&&e.range(P1(a,t.reverse))}function eU(e,t,n){e!==s3&&e!==Vm&&ot("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===Vm?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*$m(n,i,r)]}function tU(e,t,n){var r=t.schemeExtent,i,a;return Lt(t.scheme)?a=cd(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),a=Wm(i),a||ot(`Unrecognized scheme name: ${t.scheme}`)),n=e===o3?n+1:e===jm?n-1:e===Hm||e===a3?+t.schemeCount||Gz:n,ld(e)?f4(a,r,t.reverse):Jt(a)?_M(f4(a,r),n):e===Gm?a:a.slice(0,n)}function f4(e,t,n){return Jt(e)&&(t||n)?SM(e,P1(t||[0,1],n)):e}function P1(e,t){return t?e.slice().reverse():e}const O1=pt(",d");function nU(e){return e.chrom+":"+O1(Math.floor(e.pos+1))}function h4(e){return!ft(e)&&"chrom"in e?nU(e):""+e}function rU(e,t){return e.chrom+":"+O1(Math.floor(e.pos+1))+"-"+(e.chrom!=t.chrom?t.chrom+":":"")+O1(Math.ceil(t.pos))}const iU="https://genomespy.app/data/genomes/";class aU{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=iU;try{this.setChromSizes(oU(await mc({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=zr(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 rU(...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 oU(e){return oD(e).filter(t=>/^chr[0-9A-Z]+$/.test(t[0])).map(([t,n])=>({name:t,size:parseInt(n)}))}function Ud(e){return qt(e)&&"chrom"in e}function sU(e){return e.every(Ud)}class nu extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof nu&&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 L1 extends nu{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 d4 extends nu{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 p4 extends d4{constructor(){super(),this.type="nominal"}}class lU extends nu{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 g4={quantitative:L1,index:L1,locus:L1,nominal:p4,ordinal:d4};function m4(e,t){if(e=="quantitative"&&cU(t)){const n=new lU(t);return n.type=e,n}else if(g4[e]){const n=new g4[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function cU(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function uU(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function fU(e){return--e*e*e+1}function hU(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function dU(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function pU(e){return 1-dU(e)}function gU(e,t,n){return e*Math.pow(t/e,n)}Ie("index",M1,["continuous"]),Ie("locus",Bz,["continuous"]),Ie("null",ud,[]);const b4="quantitative",N1="ordinal",z1="nominal",y4="locus",mU="index";class bU{constructor(t){H(this,Rf);H(this,Nv);H(this,cr);H(this,Df);H(this,Pp);H(this,Op);H(this,Bf);H(this,Ff);H(this,Tl);H(this,mi);H(this,Mf);H(this,Lp);H(this,zv);H(this,Pf);H(this,gi,void 0);H(this,kl,{domain:new Set,range:new Set});H(this,An,void 0);H(this,If,new Set);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){B(this,kl)[t].add(n)}removeEventListener(t,n){B(this,kl)[t].delete(n)}pushUnitView(t,n){var o;const r=Ym(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&&!Gc(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})}getConfiguredDomain(){return Y(this,Pf,Kv).call(this,t=>Gc(t.channel)?void 0:t.view.getConfiguredDomain(t.channel))}getDataDomain(){return Y(this,Pf,Kv).call(this,t=>Gc(t.channel)?void 0:t.view.extractDataDomain(t.channel))}reconfigure(){const t=B(this,An);if(!t||t.type=="null")return;const n=Y(this,Pp,tR).call(this),r=t.domain(),i=Y(this,Bf,Zv).call(this);if(c4({...i,range:void 0},t),t.props=i,Y(this,Ff,Qv).call(this),_t(t.type)&&ie(this,gi,Y(this,Mf,Xv).call(this)),!n){Y(this,cr,_i).call(this,"domain");return}const a=t.domain();em(a,r)||(this.isZoomable()?t.domain(r):Y(this,mi,Jo).call(this)?(t.domain(r),this.zoomTo(a,500)):Y(this,cr,_i).call(this,"domain"))}get scale(){if(B(this,An))return B(this,An);const t=Y(this,Bf,Zv).call(this),n=qz({...t,range:void 0});n.props=t,ie(this,An,n),Y(this,Ff,Qv).call(this),Fz(n)&&n.genome(this.getGenome()),_t(n.type)&&ie(this,gi,Y(this,Mf,Xv).call(this));const r=n.range;if(r){const i=()=>Y(this,cr,_i).call(this,"range");n.range=function(a){if(arguments.length)r(a),i();else return r()},i()}return n}getDomain(){return this.scale.domain()}getComplexDomain(){var t;return((t=this.getGenome())==null?void 0:t.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return Y(this,mi,Jo).call(this)&&em(Y(this,Tl,gg).call(this),this.getDomain())}isZoomable(){return Y(this,mi,Jo).call(this)&&!!this.scale.props.zoom}zoom(t,n,r){if(!Y(this,mi,Jo).call(this))return!1;const i=this.scale,a=i.domain();let o=[...a],s=i.invert(n);switch(i.props.reverse&&(r=-r),"align"in i&&(s+=i.align()),i.type){case"linear":case"index":case"locus":o=NR(o,r||0),o=wg(o,s,t);break;case"log":o=zR(o,r||0),o=pw(o,s,t);break;case"pow":case"sqrt":{const l=i;o=UR(o,r||0,l.exponent()),o=xg(o,s,t,l.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return B(this,gi)&&(o=HR(o,B(this,gi)[0],B(this,gi)[1])),[0,1].some(l=>o[l]!=a[l])?(i.domain(o),Y(this,cr,_i).call(this,"domain"),!0):!1}async zoomTo(t,n=!1){var s;if(Zl(n)&&(n=n?700:0),!Y(this,mi,Jo).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.scale,o=a.domain();if(n>0&&o.length==2){const l=o[1]-o[0],c=o[0]+l/2,u=r[1]-r[0],f=r[0]+u/2;await i.transition({duration:n,easingFunction:hU,onUpdate:h=>{const d=gU(l,u,h),p=(l-d)/(l-u),g=p*f+(1-p)*c;a.domain([g-d/2,g+d/2]),Y(this,cr,_i).call(this,"domain")}}),a.domain(r),Y(this,cr,_i).call(this,"domain")}else a.domain(r),i==null||i.requestRender(),Y(this,cr,_i).call(this,"domain")}resetZoom(){if(!Y(this,mi,Jo).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=Y(this,Tl,gg).call(this);return[0,1].some(r=>n[r]!=t[r])?(B(this,An).domain(n),Y(this,cr,_i).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?vh(B(this,gi))/vh(this.scale.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.scale;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 Ud(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&sU(t)?this.getGenome().toContinuousInterval(t):t}}gi=new WeakMap,kl=new WeakMap,An=new WeakMap,If=new WeakMap,Rf=new WeakSet,Wv=function(){return this.members[0].view},Nv=new WeakSet,one=function(){return B(this,Rf,Wv).context},cr=new WeakSet,_i=function(t){for(const n of B(this,kl)[t].values())n({type:t,scaleResolution:this})},Df=new WeakSet,Yv=function(){return!!this.getConfiguredDomain()},Pp=new WeakSet,tR=function(){const t=B(this,An);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},Op=new WeakSet,nR=function(){const t=this.members.map(n=>Ym(n.view,n.channel).scale).filter(n=>n!==void 0);return zd(t,"scale",["domain"])},Bf=new WeakSet,Zv=function(){const t=Y(this,Op,nR).call(this);if(t===null||t.type=="null")return{type:"null"};const n={...Y(this,Lp,rR).call(this,this.type),...t};n.type||(n.type=yU(this.channel,this.type));const r=Y(this,Tl,gg).call(this);return r&&r.length>0?n.domain=r:Qn(n.type)&&(n.domain=new p4),!n.domain&&n.domainMid!==void 0&&(n.domain=[n.domainMin??0,n.domainMax??1]),this.channel=="y"&&Qn(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),vU(n,this.channel),n},Ff=new WeakSet,Qv=function(){const t=B(this,An).props,n=t.range;if(B(this,If).forEach(i=>i.invalidate()),!n||!Lt(n))return;const r=(i,a)=>a?i.slice().reverse():i;if(n.some(Wt)){let i;const a=()=>{B(this,An).range(r(i.map(o=>o()),t.reverse))};i=n.map(o=>{if(Wt(o)){const s=B(this,Rf,Wv).paramMediator.createExpression(o.expr);return s.addListener(a),B(this,If).add(s),()=>s(null)}else return()=>o}),a()}else B(this,An).range(r(n,t.reverse))},Tl=new WeakSet,gg=function(){return this.getConfiguredDomain()??(this.type==y4?this.getGenome().getExtent():this.getDataDomain())},mi=new WeakSet,Jo=function(){const t=this.scale.type;return _t(t)},Mf=new WeakSet,Xv=function(){const t=this.scale.props,n=t.zoom;if(wU(n)&&Lt(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():B(this,An).domain()},Lp=new WeakSet,rR=function(t){const n=this.channel,r={};return Y(this,Df,Yv).call(this)&&(r.zero=!1),Hc(n)?r.nice=!Y(this,Df,Yv).call(this):zi(n)?r.scheme=t==z1?"tableau10":t==N1?"blues":"viridis":dd(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r},zv=new WeakSet,sne=function(){return this.members.map(t=>t.view.getPathString()).join(", ")},Pf=new WeakSet,Kv=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 yU(e,t){if(t==mU||t==y4){if(b3(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][[z1,N1,b4].indexOf(t)]:t==b4?"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 vU(e,t){Hc(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&_t(e.type)&&(e.clamp=!0)}function wU(e){return qt(e)}function U1(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of Nt(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function $1(...e){for(const t of e)if(t!==void 0)return t}class xU{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=_n(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 Nd(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:zd(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=a=>{var s;const o=Ym(a.view,a.channel);if(!kn(o))return{member:a,explicitTitle:$1("axis"in o?(s=o.axis)==null?void 0:s.title:void 0,o.title),implicitTitle:$1(Zr(o)?o.field:void 0,hd(o)?o.expr:void 0)}},n=this.members.map(t),r=n.filter(a=>{var o;if(Gc(a.member.channel)&&!a.explicitTitle){const s=Xa(a.member.channel);return((o=n.find(l=>l.member.view==a.member.view&&l.member.channel==s))==null?void 0:o.explicitTitle)===void 0}return!0}),i=new Set(r.map(a=>$1(a.explicitTitle,a.implicitTitle)).filter(Ue));return i.size?[...i].join(", "):null}}function ru(e,t,{spacing:n,devicePixelRatio:r,offset:i,reverse:a}={}){n=n||0,i=i||0;let o=0,s=0;for(const p of e)o+=Is(p.px)+(H1(p)?0:n),s+=Is(p.grow);o-=n;const l=Math.max(0,t-o),c=r!==void 0?p=>Math.round(p*r)/r:p=>p,u=[],f=[],h=p=>{const g=u.length;if(!g)return;const b=(p?n:0)*(a?-1:1);d-=b;for(let y=0;y<g;y++)f.push({location:d+(y+1)/(g+1)*b,size:0});d+=b,u.length=0};let d=a?Math.max(t,o):0+i;if(e.length==1&&H1(e[0]))return[{location:d,size:0}];for(let p=0;p<e.length;p++){const g=e[p];if(H1(g))u.push(g);else{h(f.length>0);const b=Is(g.px)+(s?Is(g.grow)/s*l:0);a&&(d-=b),f.push({location:c(d),size:c(b)}),a?d-=n:d+=b+n}}return d+=a?n:-n,h(!1),f}function AU(e){let t=0,n=0;for(const r of e)t=Math.max(t,r.px??0),n=Math.max(n,r.grow??0);return{px:t,grow:n}}function EU(e){const t={px:0,grow:0};for(const n of e)t.px+=Is(n.px),t.grow+=Is(n.grow);return t}const Uv=class Uv{constructor(t,n){H(this,Of);this.width=t,this.height=n}addPadding(t){return Y(this,Of,Jv).call(this,t.width,t.height)}subtractPadding(t){return Y(this,Of,Jv).call(this,-t.width,-t.height)}};Of=new WeakSet,Jv=function(t,n){return new Uv({px:(this.width.px??0)+t,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Kr=Uv;const iu=Object.freeze({px:0,grow:0}),v4=new Kr(iu,iu);function H1(e){return!e.px&&!e.grow}function Is(e){return e||0}function SU(e){return e&&(ft(e.px)||ft(e.grow))}function w4(e){if(_4(e))throw new Error("parseSizeDef does not accept step-based sizes.");if(SU(e))return e;if(ft(e))return{px:e,grow:0};if(e==="container")return{px:0,grow:1};if(!e)return{px:0,grow:1};throw new Error(`Invalid sizeDef: ${e}`)}function _U(e,t,n){return{get location(){const r=n();switch(r){case 0:return e.location;case 1:return t.location;default:return r*t.location+(1-r)*e.location}},get size(){const r=n();switch(r){case 0:return e.size;case 1:return t.size;default:return r*t.size+(1-r)*e.size}}}}function CU(e,t){const n=ft(t)?()=>t:t;return{get location(){return e.location+n()},get size(){return e.size}}}function kU(e,t){const n=ft(t)?()=>t:t;return{get location(){return e.location*n()},get size(){return e.size*n()}}}function x4(e,t){return t>=e.location&&t<e.location+e.size}class Ct{constructor(t,n,r,i){this.top=t||0,this.right=n||0,this.bottom=r||0,this.left=i||0}get width(){return this.left+this.right}get height(){return this.top+this.bottom}expand(t){return t<=0?this:new Ct(this.top+t,this.right+t,this.bottom+t,this.left+t)}add(t){return new Ct(this.top+t.top,this.right+t.right,this.bottom+t.bottom,this.left+t.left)}subtract(t){return new Ct(this.top-t.top,this.right-t.right,this.bottom-t.bottom,this.left-t.left)}union(t){return new Ct(Math.max(this.top,t.top),Math.max(this.right,t.right),Math.max(this.bottom,t.bottom),Math.max(this.left,t.left))}getHorizontal(){return new Ct(0,this.right,0,this.left)}getVertical(){return new Ct(this.top,0,this.bottom,0)}get horizontalTotal(){return this.left+this.right}get verticalTotal(){return this.top+this.bottom}static createFromConfig(t){return typeof t=="number"?this.createUniformPadding(t):t?this.createFromRecord(t):G1}static createFromRecord(t){return new Ct(t.top,t.right,t.bottom,t.left)}static zero(){return G1}static createUniformPadding(t){return new Ct(t,t,t,t)}}const G1=Ct.createUniformPadding(0);Object.freeze(G1);const TU=/^([A-Za-z]+:)?\/\//;function IU(e,t){if(t&&TU.test(t))return t;const n=e();return n&&t?n.endsWith("/")?n+t:n+"/"+t:n??t}const A4="VISIT_SKIP",ao="VISIT_STOP",E4=e=>e;class S4{constructor(t,n,r,i,a,o={}){H(this,jo);H(this,zf);H(this,Il,{});H(this,Lf,{});H(this,Nf,{});jt(this,"opacityFunction",E4);jt(this,"facetCoords",new Ur([],JSON.stringify));if(!t)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=r,this.dataParent=i,this.name=t.name||a,this.spec=t,this.resolutions={scale:{},axis:{}},YE(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...o},this.needsAxes={x:!1,y:!1},this.paramMediator=new RM(()=>{var s;return(s=this.dataParent)==null?void 0:s.paramMediator}),t.params)for(const s of t.params)this.paramMediator.registerParam(s)}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>Ct.createFromConfig(this.spec.padding))}getOverhang(){return Ct.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Kr(Y(this,jo,uh).call(this,"width"),Y(this,jo,uh).call(this,"height")):v4)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return v4;const t=this.getSize();return new Kr(Y(this,jo,uh).call(this,"viewportWidth")??t.width,Y(this,jo,uh).call(this,"viewportHeight")??t.height)}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(t=>t.isConfiguredVisible())}getEffectiveOpacity(){var t;return this.opacityFunction(((t=this.layoutParent)==null?void 0:t.getEffectiveOpacity())??1)}getPathString(){return this.getLayoutAncestors().map(t=>t.name).reverse().join("/")}getLayoutAncestors(){return Y(this,zf,ew).call(this,"layoutParent")}getDataAncestors(){return Y(this,zf,ew).call(this,"dataParent")}handleBroadcast(t){for(const n of B(this,Il)[t.type]||[])n(t)}_addBroadcastHandler(t,n){let r=B(this,Il)[t];r||(r=[],B(this,Il)[t]=r),r.push(n)}handleInteractionEvent(t,n,r){const i=r?B(this,Lf):B(this,Nf);for(const a of i[n.type]||[])a(t,n)}addInteractionEventListener(t,n,r){const i=r?B(this,Lf):B(this,Nf);let a=i[t];a||(a=[],i[t]=a),a.push(n)}visit(t){try{const n=t(this);if(t.postOrder&&t.postOrder(this),n!==ao)return n}catch(n){throw n.view=this,n}}getDescendants(){const t=[];return this.visit(n=>{t.push(n)}),t}configureViewOpacity(){(!this.opacityFunction||this.opacityFunction===E4)&&(this.opacityFunction=DU(this))}onBeforeRender(){}render(t,n,r={}){r.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(r.facetId,r.clipRect?n.intersect(r.clipRect):n)}getEncoding(){const t=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...t,...n};for(const[i,a]of Object.entries(r))a===null&&delete r[i];return r}getFacetAccessor(t){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(t){var r;const n=this.getEncoding().sample;return Zr(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(t){const n=Xa(t);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(t){const n=Xa(t);return this.getDataAncestors().map(r=>r.resolutions.axis[n]).find(r=>r)}getConfiguredResolution(t,n){var r,i;return(i=(r=this.spec.resolve)==null?void 0:r[n])==null?void 0:i[t]}getConfiguredOrDefaultResolution(t,n){return this.getConfiguredResolution(t,n)??this.getConfiguredResolution("default",n)??this.getDefaultResolution(t,n)}getDefaultResolution(t,n){return"independent"}getBaseUrl(){return IU(()=>{var t;return(t=this.dataParent)==null?void 0:t.getBaseUrl()},this.spec.baseUrl)}isPickingSupported(){return!0}getTitleText(){const t=this.spec.title;if(t)return Ue(t)?t:Wt(t.text)?this.paramMediator.evaluateAndGet(t.text.expr):t.text}_cache(t,n){return Nd(this,t,n)}_invalidateCacheByPrefix(t,n="self"){switch(n){case"self":Kc(this,t);break;case"ancestors":for(const r of this.getLayoutAncestors())Kc(r,t);break;case"progeny":this.visit(r=>Kc(r,t));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(t){}}Il=new WeakMap,Lf=new WeakMap,Nf=new WeakMap,jo=new WeakSet,uh=function(t){var i;let n=this.spec[t];const r=t=="viewportWidth"||t=="viewportHeight";if(_4(n)){if(r)throw new io(`Cannot use step-based size with "${t}"!`,this);const a=n.step,o=(i=this.getScaleResolution(t=="width"?"x":"y"))==null?void 0:i.scale;if(o){let s=0;if(Qn(o.type))s=o.domain().length;else if(["locus","index"].includes(o.type)){const c=o.domain();s=_n(c)-c[0]}else throw new io(`Cannot use step-based size with "${o.type}" scale!`,this);const l=o;return s=$m(s,l.paddingInner(),l.paddingOuter()),{px:s*a,grow:0}}else throw new io("Cannot use 'step' size with missing scale!",this)}else return(n&&w4(n))??(r?void 0:{px:0,grow:1})},zf=new WeakSet,ew=function(t){const n=[];let r=this;do n.push(r),r=r[t];while(r);return n};function RU(e){return"unitsPerPixel"in e}function DU(e){const t=e.spec.opacity;if(t!==void 0){if(ft(t))return n=>n*t;if(RU(t)){const n=a=>{var s;const o=(s=e.getScaleResolution(a))==null?void 0:s.scale;if(["linear","index","locus"].includes(o==null?void 0:o.type))return o},r=t.channel?n(t.channel):n("x")??n("y");if(!r)throw new io("Cannot find a resolved quantitative scale for dynamic opacity!",e);const i=Fm().domain(t.unitsPerPixel).range(t.values).clamp(!0);return a=>{const s=vh(r.domain())/1e3;return i(s)*a}}else if(Wt(t)){const n=e.paramMediator.createExpression(t.expr);return n.addListener(()=>e.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const _4=e=>!!(e!=null&&e.step),BU={point:pz,rect:lz,rule:yz,link:_z,text:Dz};class bt extends S4{constructor(n,r,i,a,o,s){super(n,r,i,a,o,s);H(this,$f);H(this,Uf,void 0);this.spec=n;const l=BU[this.getMarkType()];if(l)this.mark=new l(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),ie(this,Uf,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(c=>{var u;return(u=this.getScaleResolution(c))==null?void 0:u.addEventListener("domain",()=>B(this,Uf).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0}}render(n,r,i={}){super.render(n,r,i),this.isConfiguredVisible()&&(n.pushView(this,r),n.renderMark(this.mark,i),n.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}resolve(n){n||(this.resolve("scale"),this.resolve("axis"));const r=this.mark.encoding;for(const[i,a]of Object.entries(r)){if(!dn(a))continue;const o=Xa(a.resolutionChannel??i);if(!Ka(o)||n=="axis"&&!Hc(o))continue;let s=this;for(;(s.getConfiguredOrDefaultResolution(o,n)=="forced"||s.dataParent&&["shared","excluded","forced"].includes(s.dataParent.getConfiguredOrDefaultResolution(o,n)))&&s.getConfiguredOrDefaultResolution(o,n)!="excluded";)s=s.dataParent;if(n=="axis"&&Hc(i)&&b3(o))s.resolutions[n][o]||(s.resolutions[n][o]=new xU(o)),s.resolutions[n][o].pushUnitView(this,i);else if(n=="scale"&&Ka(i)){if(!s.resolutions[n][o]){const l=new bU(o);s.resolutions[n][o]=l,l.addEventListener("range",c=>{var u;(u=this.context.glHelper)==null||u.createRangeTexture(c.scaleResolution,!0)})}s.resolutions[n][o].pushUnitView(this,i)}}}getAccessor(n){return this._cache("accessor/"+n,()=>{const r=this.mark.encoding;if(r&&r[n])return this.context.accessorFactory.createAccessor(r[n])})}getFacetAccessor(n){const r=this.getAccessor("sample");return r||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}getConfiguredDomain(n){const r=Y(this,$f,tw).call(this,n),i=r&&r.scale&&r.scale.domain;if(i){const a=this.getScaleResolution(r.resolutionChannel??n);return m4(r.type??"nominal",a.fromComplexInterval(i))}}extractDataDomain(n){const i=Y(this,$f,tw).call(this,n).type??"nominal",a=l=>{let c;const u=this.mark.encoding[l];if(u){const f=this.context.accessorFactory.createAccessor(u);if(f)if(c=m4(i),f.constant)c.extend(f({}));else{const h=this.getCollector();h!=null&&h.completed&&h.visitData(d=>c.extend(f(d)))}}return c};let o=a(n);const s=Zm[n];if(s){const l=a(s);l&&o.extendAll(l)}return o}getZoomLevel(){const n=r=>{var i;return((i=this.getScaleResolution(r))==null?void 0:i.getZoomLevel())??1};return bs.map(n).reduce((r,i)=>r*i,1)}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0),n.target=this,!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return n=="x"?"shared":"independent"}}Uf=new WeakMap,$f=new WeakSet,tw=function(n){if(Gc(n))throw new Error(`getDomain(${n}), must only be called for primary channels!`);const r=this.mark.encoding[n];if(!dn(r))throw new Error("The channel has no scale, cannot get domain!");return r};function*V1(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of V1(r,[...t,n]))yield i;else yield[[...t,n],r]}class au extends st{constructor(n){super();H(this,Hf);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=void 0,this._init()}get behavior(){return F1}_init(){this._data=[],this.facetBatches=new Ur([],JSON.stringify),this.facetBatches.set(void 0,this._data)}reset(){super.reset(),this._init()}handle(n){this._data.push(n)}beginBatch(n){hz(n)&&(this._data=[],this.facetBatches.set(Nt(n.facetId),this._data))}complete(){var a,o;const n=(a=this.params)==null?void 0:a.sort,r=n?gw(n.field,n.order):void 0,i=s=>{r&&s.sort(r)};if((o=this.params.groupby)!=null&&o.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const s=this.params.groupby.map(c=>Le(c)),l=s.length>1?Kl(this._data,...s):FU(this._data,s[0]);this.facetBatches.clear();for(const[c,u]of V1(l))this.facetBatches.set(c,u)}for(const s of this.facetBatches.values())i(s);Y(this,Hf,nw).call(this),super.complete();for(const s of this.observers)s(this)}repropagate(){for(const n of this.children)n.reset();Y(this,Hf,nw).call(this);for(const n of this.children)n.complete()}getData(){switch(this._checkStatus(),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const n=this.facetBatches;return{[Symbol.iterator]:function*(){for(const i of n.values())for(let a=0;a<i.length;a++)yield i[a]}}}}}visitData(n){this._checkStatus();for(const r of this.facetBatches.values())for(let i=0;i<r.length;i++)n(r[i])}getItemCount(){let n=0;for(const r of this.facetBatches.values())n+=r.length;return n}_checkStatus(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")}}Hf=new WeakSet,nw=function(){if(this.children.length)for(const[n,r]of this.facetBatches.entries()){if(n){const i={type:"facet",facetId:n};for(const a of this.children)a.beginBatch(i)}for(const i of r)this._propagate(i)}};function FU(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 ou{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 l=this.ids[o],c=this.values[o];const u=this.values[s];if(s<this.length&&u<c&&(o=s,l=this.ids[s],c=u),c>=r)break;this.ids[a]=l,this.values[a]=c,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 MU extends st{get behavior(){return Sr}constructor(t){super(),this.params=t,this.startAccessor=Le(t.start),this.endAccessor=Le(t.end),this.chromAccessor=t.chrom?Le(t.chrom):n=>{},this.weightAccessor=t.weight?Le(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 ou}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 l,c,u,f=0,h=NaN;const d=this.ends;d.clear();const p=y=>{this._propagate(y),l=null},g=(y,w,A)=>{if(y==w)return;let x=!1;l&&(l[t]===A?(l[n]=w,x=!0):l[t]!=0&&p(l)),x||(l=this.createSegment(y,w,A,u))},b=()=>{let y=0;for(;(y=d.peekValue())!==void 0;)g(h,y,f),h=y,f-=d.pop();h=NaN,l&&p(l)};this.handle=y=>{const w=i(y);let A=0;for(;(A=d.peekValue())!==void 0&&A<w;)g(h,A,f),h=A,f-=d.pop();if(r){let E=o(y);E!==c&&(b(),u=E,c=u)}isNaN(h)||g(h,w,f),h=w;const x=s(y);f+=x,d.push(x,a(y))},this.complete=()=>{b(),super.complete()},this.beginBatch=y=>{b(),c=null,super.beginBatch(y)}}}function PU(e,t,n=0,r=e.length){const i=new ou,a=r-n;let o;for(o=0;o<t&&o<a;o++)i.push(o,e[n+o]);for(;o<a;o++){const c=e[n+o];c>=i.peekValue()&&(i.push(o,c),i.pop())}const s=[];let l;for(;(l=i.pop())!==void 0;)s.push(n+l);return s.reverse()}class OU{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 LU extends st{get behavior(){return F1}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=Le(this.params.pos),this.posBisector=Ah(this.posAccessor),this.scoreAccessor=Le(this.params.score),this.widthAccessor=Le(this.params.width),this.laneAccessor=this.params.lane?Le(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 OU(200));this.schedule(),super.complete()}_filterAndPropagate(){var o;super.reset();const t=this.resolution.scale,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=PU(this._scores,i,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of a){const l=this._data[s],c=t(this.posAccessor(l))*n,u=this.widthAccessor(l)/2+this.padding;this.reservationMaps.get(this.laneAccessor(l)).reserve(c-u,c+u)&&this._propagate(l)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class NU extends st{constructor(t,n){super(n),this.params=t,this.predicate=void 0}initialize(){this.predicate=this.paramMediator.createExpression(this.params.expr),this.predicate.addListener(()=>this.repropagate())}handle(t){this.predicate(t)&&this._propagate(t)}}class zU extends st{get behavior(){return Sr}constructor(t){super();const n=t.index;if(t.fields){const r=Nt(t.fields).map(a=>Le(a)),i=Nt(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((l,c)=>l(a)??[]),s=o[0].length;for(let l=0;l<s;l++){const c=Object.assign({},a);for(let u=0;u<r.length;u++)c[i[u]]=l<o[u].length?o[u][l]:null;n&&(c[n]=l),this._propagate(c)}}}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 UU="0".charCodeAt(0);function*$U(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-UU}yield r}class HU extends st{get behavior(){return Sr}constructor(t){super();const n=Le(t.exons??"exons"),r=Le(t.start??"start"),[i,a]=t.as||["exonStart","exonEnd"];this.handle=o=>{let s=r(o),l=s,c=!0;const u=n(o);for(const f of $U(u)){if(c)l=s+f;else{s=l+f;const h=Object.assign({},o);h[i]=l,h[a]=s,this._propagate(h)}c=!c}}}}class GU extends st{get behavior(){return Sr}constructor(t){super();const n=Nt(t.field).map(a=>Le(a)),r=Nt(t.separator),i=Nt(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(l=>!l(a)))return;const o=n.map((l,c)=>l(a).split(r[c]));VU(o,a);const s=o[0].length;for(let l=0;l<s;l++){const c=Object.assign({},a);for(let u=0;u<n.length;u++)c[i[u]]=o[u][l];this._propagate(c)}}}}function VU(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 jU extends st{get behavior(){return qi}constructor(t,n){super(n),this.params=t,this.as=t.as,this.fn=void 0}initialize(){this.fn=this.paramMediator.createExpression(this.params.expr),this.fn.addListener(()=>this.repropagate())}handle(t){t[this.as]=this.fn(t),this._propagate(t)}}class C4 extends st{get behavior(){return qi}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=Le(t.chrom),o=Nt(t.pos).map(p=>Le(p)),s=Nt(t.as);if(o.length!=s.length)throw new Error('The number of "pos" and "as" elements must be equal!');const l=Nt(t.offset);let c;if(l.length==0)c=new Array(o.length).fill(0);else if(l.length==1)c=new Array(o.length).fill(l[0]);else if(l.length==o.length)c=l;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) - ${c[g]};`).join(`
1750
+ `));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 k4={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 qU extends st{get behavior(){return qi}constructor(t){super();const n=R1(k4),r=Le(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 WU=65536;class YU extends st{get behavior(){return qi}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=Le(t.start),a=Le(t.end);if(!t.preference!=!t.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(t.preference){const o=new Float64Array(WU),s=Le(t.preference),l=t.preferredOrder;let c=1/0;this.handle=u=>{const f=i(u);f<c&&o.fill(-1/0),c=f;const h=l.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 ou,s=new ou;let l=-1/0,c=0;this.handle=u=>{const f=i(u);for(;o.length&&(o.peekValue()<=f||f<l);){const d=o.pop();s.push(d,d)}l=f;let h=s.pop();h===void 0&&(h=c++),u[n]=h,this._propagate(u),o.push(h,a(u)+r)}}}}class ZU extends st{get behavior(){return Sr}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=>Le(i)),r=t.as?t.as:n.map(ts);this.handle=i=>{const a={};for(let o=0;o<n.length;o++)a[r[o]]=n[o](i);this._propagate(a)}}}class QU extends st{get behavior(){return qi}constructor(t){super();const n=new RegExp(t.regex),r=typeof t.as=="string"?[t.as]:t.as,i=Le(t.field);this.handle=a=>{const o=i(a);if(Ue(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 l=0;l<r.length;l++)a[r[l]]=s[l+1]}else if(t.skipInvalidInput)for(let l=0;l<r.length;l++)a[r[l]]=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 XU extends st{get behavior(){return Sr}constructor(t){super();const n=Nt(t.columnRegex).map(h=>new RegExp(h)),r=Nt(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,l;const c=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 E=p.get(x);E||(E=[],p.set(x,E)),E[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}]]`)];l=new Function("datum","sampleId","attrs",`return {
1746
1751
  `+g.join(`,
1747
1752
  `)+`
1748
- };`)},u=h=>{o||c(h);for(let d=0;d<o.length;d++){const[p,g]=o[d],b=l(h,p,g);this._propagate(b)}},f=h=>{c(h),u(h),this.handle=u};this.handle=f,this.beginBatch=h=>{t4(h)&&(this.handle=f),super.beginBatch(h)}}}class JU extends st{get behavior(){return qi}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?gw(t.sort.field,t.sort.order):void 0,i=t.field?Le(t.field):()=>1,a=t.groupby.map(u=>Le(u)),o=xD(this.buffer,u=>a.map(f=>f(u)).join()).map(u=>u[1]);let s=u=>!0;if(t.baseField){const u=Le(t.baseField);s=f=>u(f)!==null}let l,c;switch(t.offset){case"normalize":l=(u,f)=>u/f,c=(u,f)=>_h(u,f);break;case"center":l=(u,f)=>u-f/2,c=(u,f)=>_h(u,f);break;case"information":{const u=Math.log2(t.cardinality??4);l=(f,h)=>f/h,c=(f,h)=>{const p=_h(f,w=>+!s(w)),g=_h(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:l=(u,f)=>u,c=(u,f)=>1}for(const u of o){r&&u.sort(r);const f=c(u,i);let h=0;for(const d of u){const p=h+i(d);s(d)&&(d[n[0]]=l(h,f),d[n[1]]=l(p,f),this._propagate(d),h=p)}}super.complete()}}class e$ extends st{get behavior(){return Sr}constructor(t){super();const n=Le(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 l=0;l<s.length;l++){const c=Object.assign({},o);c[r]=l,c[i]=s.charAt(l),this._propagate(c)}}}}class t$ extends st{get behavior(){return Sr}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=>Le(a)),i=Kl(this.buffer,...r);for(const[a,o]of V1(i)){const s={count:o.length};for(let l=0;l<n.length;l++)s[n[l]]=a[l];this._propagate(s)}super.complete()}}const n$="_uniqueId",T4=1e4,I4=[null];class R4 extends st{get behavior(){return qi}constructor(t){super(),this.params=t,this.as=t.as??n$,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%T4==0&&(this._id=this._getBlock()*T4),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const t=I4.length;return I4[t]=this,this._blocks.push(t),this._usedBlocks++,t}}const D4={aggregate:t$,collect:au,coverage:PU,filterScoredLabels:NU,filter:zU,flatten:UU,flattenCompressedExons:GU,flattenDelimited:VU,flattenSequence:e$,formula:qU,identifier:R4,linearizeGenomicCoordinate:C4,measureText:WU,pileup:ZU,project:QU,regexExtract:XU,regexFold:KU,sample:n4,stack:JU};function r$(e,t){const n=D4[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function B4(e){if(!P4(e)&&!M4(e))return;const t={...e.format};if(t.type??(t.type=M4(e)&&i$(hn(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 i$(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const F4=e=>typeof e!="object"?a$:o$,a$=e=>({data:e}),o$=e=>e;function M4(e){return"url"in e}class Rs extends st{constructor(n){super();jt(this,"view");this.view=n}get identifier(){}setLoadingStatus(n,r){this.view.context.setDataLoadingStatus(this.view,n,r)}get paramMediator(){return this.view.paramMediator}handle(n){throw new Error("Source does not handle incoming data!")}async load(){}repropagate(){this.load()}}function P4(e){return"values"in e}class s$ extends Rs{constructor(t,n){var r;if(super(n),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=F4(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=fx(t,B4(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 l$(e){return"url"in e}class c$ extends Rs{constructor(t,n){super(n),this.params=fd(n.paramMediator,t,()=>this.load()),this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}async load(){const t=hn(this.params.url),n=Array.isArray(t)?t:[t];if(n.length===0||!n[0]){this.reset(),this.complete();return}const r=async a=>mc({baseURL:this.baseUrl}).load(a).catch(o=>{throw new Error(`${a}: ${o.message}`)}),i=(a,o)=>{try{const s=fx(a,B4(this.params));this.beginBatch({type:"file",url:o});for(const l of s)this._propagate(l)}catch(s){throw new Error(`Cannot parse: ${o}: ${s.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(n.map(a=>r(a).then(i))),this.setLoadingStatus("complete")}catch(a){this.setLoadingStatus("error",a.message)}this.complete()}}function u$(e){return"sequence"in e}class f$ extends Rs{constructor(t,n){if(super(n),this.sequence=fd(n.paramMediator,t.sequence,()=>this.loadSynchronously()),!("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=hn(this.sequence.as)??"data",n=hn(this.sequence.start)??0,r=hn(this.sequence.step)??1,i=hn(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let a=n;a<i;a+=r)this._propagate({[t]:a});this.complete()}async load(){this.loadSynchronously()}}class j1 extends Rs{constructor(n,r){super(n);jt(this,"initializedPromise",Promise.resolve());if(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 bt||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()}onDomainChanged(n,r){}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(),U1(this.view)}}class h$ extends j1{constructor(n,r){const i={axis:{},...n};super(r,i.channel);jt(this,"ticks",[]);this.params=n}onDomainChanged(){const n=this.scaleResolution.scale,r=this.params.axis,i=this.getAxisLength(),a=c=>25+60*cm(100,700,c),o=ft(r.tickCount)?r.tickCount:Math.round(i/a(i)),s=a4(n,o,r.tickMinStep),l=r.values?o4(n,r.values,s):Pz(n,s);if(!em(l,this.ticks)){this.ticks=l;const c=Lz(n,o,r.format);this.publishData([l.map(u=>({value:u,label:c(u)}))])}}}class d$ extends j1{constructor(t,n){super(n,t.channel)}async load(){this.publishData([this.genome.chromosomes])}}function oo(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}function so(e,t,n=!0){let r,i=o=>{};return function(...s){return new Promise((l,c)=>{const u=()=>{clearTimeout(r),i=f=>{},l(e(...s))};n&&i("debounced"),clearTimeout(r),i=c,r=window.setTimeout(u,typeof t=="function"?t():t)})}}class su extends j1{constructor(){super(...arguments);H(this,Rl,new AbortController);H(this,Dl,[0,0]);H(this,Bl,[0,0]);H(this,Gf,0);jt(this,"params")}setupDebouncing(n){const r=()=>hn(n.debounce),i=n.debounceMode;if(i=="domain")this.onDomainChanged=so(this.onDomainChanged.bind(this),r,!1);else if(i=="window")this.loadInterval=so(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+i)}onDomainChanged(n){var i;ie(this,Bl,n);const r=hn((i=this.params)==null?void 0:i.windowSize)??-1;n[1]-n[0]>r||this.callIfWindowsChanged(n,r,async a=>{await this.initializedPromise,this.loadInterval(a)})}reloadLastDomain(){const n=B(this,Bl);ie(this,Bl,[0,0]),ie(this,Dl,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){B(this,Rl).abort(),this.setLoadingStatus("loading"),ie(this,Rl,new AbortController);const i=B(this,Rl).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("complete"),o}catch(o){if(!i.aborted)throw this.setLoadingStatus("error",o.message),o}}callIfWindowsChanged(n,r,i){const a=[Math.max(Math.floor(n[0]/r)*r,0),Math.min(Math.ceil(n[1]/r)*r,this.genome.totalSize)],o=B(this,Dl);(r!==B(this,Gf)||a[0]<o[0]||a[1]>o[1])&&(ie(this,Dl,a),ie(this,Gf,r),i(a))}}Rl=new WeakMap,Dl=new WeakMap,Bl=new WeakMap,Gf=new WeakMap;class p$ extends su{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(()=>E6),Promise.resolve().then(()=>LQ),Promise.resolve().then(()=>Mu)]).then(([{Buffer:a},{IndexedFasta:o},{RemoteFile:s}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=a));const l=c=>new s(oo(c,this.view.getBaseUrl()));this.fasta=new o({fasta:l(this.params.url),fai:l(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 g$ extends su{constructor(n,r){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},a=fd(r.paramMediator,i,o=>{o.includes("url")?Y(this,Vf,rw).call(this).then(()=>this.reloadLastDomain()):o.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,a.channel);H(this,Vf);H(this,Fl,[]);H(this,Ml,void 0);if(this.params=a,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),Y(this,Vf,rw).call(this)}async onDomainChanged(n){await this.initializedPromise;const r=this.getAxisLength()||700,i=m$(n,r,B(this,Fl)),a=Math.max(i*r,5e3);this.callIfWindowsChanged(n,a,o=>this.loadInterval(o,i))}async loadInterval(n,r){const i=.5/r/hn(this.params.pixelsPerBin),a=await this.discretizeAndLoad(n,(o,s)=>B(this,Ml).getFeatures(o.chrom,o.startPos,o.endPos,{scale:i,signal:s}).then(l=>l.map(c=>({chrom:o.chrom,start:c.start,end:c.end,score:c.score}))));a&&this.publishData(a)}}Fl=new WeakMap,Ml=new WeakMap,Vf=new WeakSet,rw=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>xT),Promise.resolve().then(()=>Mu)]).then(([{BigWig:i},{RemoteFile:a}])=>{ie(this,Ml,new i({filehandle:new a(oo(hn(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),B(this,Ml).getHeader().then(o=>{ie(this,Fl,o.zoomLevels.map(s=>s.reductionLevel).reverse()),B(this,Fl).push(1),this.setLoadingStatus("complete"),n()}).catch(o=>{this.load(),this.setLoadingStatus("error",`${hn(this.params.url)}: ${o.message}`),r(o)})})}),this.initializedPromise};function m$(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class b$ extends su{constructor(n,r){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},a=fd(r.paramMediator,i,o=>{o.includes("url")?Y(this,jf,iw).call(this).then(()=>this.reloadLastDomain()):o.includes("windowSize")&&this.reloadLastDomain()});super(r,a.channel);H(this,jf);jt(this,"parser");jt(this,"bbi");jt(this,"parseLine");if(this.params=a,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),Y(this,jf,iw).call(this)}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)}}jf=new WeakSet,iw=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>Bee),Promise.resolve().then(()=>xT),Promise.resolve().then(()=>Mu)]).then(([i,{BigBed:a},{RemoteFile:o}])=>{const s=i.default;this.bbi=new a({filehandle:new o(oo(hn(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async l=>{this.parser=new s({autoSql:l.autoSql});try{const c=y$(this.parser);this.parseLine=(u,f)=>c(u,f.start,f.end,f.rest)}catch{this.parseLine=(u,f)=>this.parser.parseLine(`${u} ${f.start} ${f.end} ${f.rest}`)}this.setLoadingStatus("complete"),n()}).catch(l=>{this.load(),this.setLoadingStatus("error",`${hn(this.params.url)}: ${l.message}`),r(l)})})}),this.initializedPromise};function y$(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),l="0".charCodeAt(0),c="-".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===c&&(x=-1,n++,A=r.charCodeAt(n));do{if(A===s){n++;break}w=w*10+A-l,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(`
1753
+ };`)},u=h=>{o||c(h);for(let d=0;d<o.length;d++){const[p,g]=o[d],b=l(h,p,g);this._propagate(b)}},f=h=>{c(h),u(h),this.handle=u};this.handle=f,this.beginBatch=h=>{t4(h)&&(this.handle=f),super.beginBatch(h)}}}class KU extends st{get behavior(){return qi}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?gw(t.sort.field,t.sort.order):void 0,i=t.field?Le(t.field):()=>1,a=t.groupby.map(u=>Le(u)),o=xD(this.buffer,u=>a.map(f=>f(u)).join()).map(u=>u[1]);let s=u=>!0;if(t.baseField){const u=Le(t.baseField);s=f=>u(f)!==null}let l,c;switch(t.offset){case"normalize":l=(u,f)=>u/f,c=(u,f)=>_h(u,f);break;case"center":l=(u,f)=>u-f/2,c=(u,f)=>_h(u,f);break;case"information":{const u=Math.log2(t.cardinality??4);l=(f,h)=>f/h,c=(f,h)=>{const p=_h(f,w=>+!s(w)),g=_h(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:l=(u,f)=>u,c=(u,f)=>1}for(const u of o){r&&u.sort(r);const f=c(u,i);let h=0;for(const d of u){const p=h+i(d);s(d)&&(d[n[0]]=l(h,f),d[n[1]]=l(p,f),this._propagate(d),h=p)}}super.complete()}}class JU extends st{get behavior(){return Sr}constructor(t){super();const n=Le(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 l=0;l<s.length;l++){const c=Object.assign({},o);c[r]=l,c[i]=s.charAt(l),this._propagate(c)}}}}class e$ extends st{get behavior(){return Sr}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=>Le(a)),i=Kl(this.buffer,...r);for(const[a,o]of V1(i)){const s={count:o.length};for(let l=0;l<n.length;l++)s[n[l]]=a[l];this._propagate(s)}super.complete()}}const t$="_uniqueId",T4=1e4,I4=[null];class R4 extends st{get behavior(){return qi}constructor(t){super(),this.params=t,this.as=t.as??t$,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%T4==0&&(this._id=this._getBlock()*T4),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const t=I4.length;return I4[t]=this,this._blocks.push(t),this._usedBlocks++,t}}const D4={aggregate:e$,collect:au,coverage:MU,filterScoredLabels:LU,filter:NU,flatten:zU,flattenCompressedExons:HU,flattenDelimited:GU,flattenSequence:JU,formula:jU,identifier:R4,linearizeGenomicCoordinate:C4,measureText:qU,pileup:YU,project:ZU,regexExtract:QU,regexFold:XU,sample:n4,stack:KU};function n$(e,t){const n=D4[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function B4(e){if(!P4(e)&&!M4(e))return;const t={...e.format};if(t.type??(t.type=M4(e)&&r$(hn(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 r$(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const F4=e=>typeof e!="object"?i$:a$,i$=e=>({data:e}),a$=e=>e;function M4(e){return"url"in e}class Rs extends st{constructor(n){super();jt(this,"view");this.view=n}get identifier(){}setLoadingStatus(n,r){this.view.context.setDataLoadingStatus(this.view,n,r)}get paramMediator(){return this.view.paramMediator}handle(n){throw new Error("Source does not handle incoming data!")}async load(){}repropagate(){this.load()}}function P4(e){return"values"in e}class o$ extends Rs{constructor(t,n){var r;if(super(n),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=F4(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=fx(t,B4(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 s$(e){return"url"in e}class l$ extends Rs{constructor(t,n){super(n),this.params=fd(n.paramMediator,t,()=>this.load()),this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}async load(){const t=hn(this.params.url),n=Array.isArray(t)?t:[t];if(n.length===0||!n[0]){this.reset(),this.complete();return}const r=async a=>mc({baseURL:this.baseUrl}).load(a).catch(o=>{throw new Error(`${a}: ${o.message}`)}),i=(a,o)=>{try{const s=fx(a,B4(this.params));this.beginBatch({type:"file",url:o});for(const l of s)this._propagate(l)}catch(s){throw new Error(`Cannot parse: ${o}: ${s.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(n.map(a=>r(a).then(i))),this.setLoadingStatus("complete")}catch(a){this.setLoadingStatus("error",a.message)}this.complete()}}function c$(e){return"sequence"in e}class u$ extends Rs{constructor(t,n){if(super(n),this.sequence=fd(n.paramMediator,t.sequence,()=>this.loadSynchronously()),!("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=hn(this.sequence.as)??"data",n=hn(this.sequence.start)??0,r=hn(this.sequence.step)??1,i=hn(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let a=n;a<i;a+=r)this._propagate({[t]:a});this.complete()}async load(){this.loadSynchronously()}}class j1 extends Rs{constructor(n,r){super(n);jt(this,"initializedPromise",Promise.resolve());if(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 bt||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()}onDomainChanged(n,r){}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(),U1(this.view)}}class f$ extends j1{constructor(n,r){const i={axis:{},...n};super(r,i.channel);jt(this,"ticks",[]);this.params=n}onDomainChanged(){const n=this.scaleResolution.scale,r=this.params.axis,i=this.getAxisLength(),a=c=>25+60*cm(100,700,c),o=ft(r.tickCount)?r.tickCount:Math.round(i/a(i)),s=a4(n,o,r.tickMinStep),l=r.values?o4(n,r.values,s):Mz(n,s);if(!em(l,this.ticks)){this.ticks=l;const c=Oz(n,o,r.format);this.publishData([l.map(u=>({value:u,label:c(u)}))])}}}class h$ extends j1{constructor(t,n){super(n,t.channel)}async load(){this.publishData([this.genome.chromosomes])}}function oo(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}function so(e,t,n=!0){let r,i=o=>{};return function(...s){return new Promise((l,c)=>{const u=()=>{clearTimeout(r),i=f=>{},l(e(...s))};n&&i("debounced"),clearTimeout(r),i=c,r=window.setTimeout(u,typeof t=="function"?t():t)})}}class su extends j1{constructor(){super(...arguments);H(this,Rl,new AbortController);H(this,Dl,[0,0]);H(this,Bl,[0,0]);H(this,Gf,0);jt(this,"params")}setupDebouncing(n){const r=()=>hn(n.debounce),i=n.debounceMode;if(i=="domain")this.onDomainChanged=so(this.onDomainChanged.bind(this),r,!1);else if(i=="window")this.loadInterval=so(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+i)}onDomainChanged(n){var i;ie(this,Bl,n);const r=hn((i=this.params)==null?void 0:i.windowSize)??-1;n[1]-n[0]>r||this.callIfWindowsChanged(n,r,async a=>{await this.initializedPromise,this.loadInterval(a)})}reloadLastDomain(){const n=B(this,Bl);ie(this,Bl,[0,0]),ie(this,Dl,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){B(this,Rl).abort(),this.setLoadingStatus("loading"),ie(this,Rl,new AbortController);const i=B(this,Rl).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("complete"),o}catch(o){if(!i.aborted)throw this.setLoadingStatus("error",o.message),o}}callIfWindowsChanged(n,r,i){const a=[Math.max(Math.floor(n[0]/r)*r,0),Math.min(Math.ceil(n[1]/r)*r,this.genome.totalSize)],o=B(this,Dl);(r!==B(this,Gf)||a[0]<o[0]||a[1]>o[1])&&(ie(this,Dl,a),ie(this,Gf,r),i(a))}}Rl=new WeakMap,Dl=new WeakMap,Bl=new WeakMap,Gf=new WeakMap;class d$ extends su{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(()=>E6),Promise.resolve().then(()=>OQ),Promise.resolve().then(()=>Mu)]).then(([{Buffer:a},{IndexedFasta:o},{RemoteFile:s}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=a));const l=c=>new s(oo(c,this.view.getBaseUrl()));this.fasta=new o({fasta:l(this.params.url),fai:l(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 p$ extends su{constructor(n,r){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},a=fd(r.paramMediator,i,o=>{o.includes("url")?Y(this,Vf,rw).call(this).then(()=>this.reloadLastDomain()):o.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,a.channel);H(this,Vf);H(this,Fl,[]);H(this,Ml,void 0);if(this.params=a,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),Y(this,Vf,rw).call(this)}async onDomainChanged(n){await this.initializedPromise;const r=this.getAxisLength()||700,i=g$(n,r,B(this,Fl)),a=Math.max(i*r,5e3);this.callIfWindowsChanged(n,a,o=>this.loadInterval(o,i))}async loadInterval(n,r){const i=.5/r/hn(this.params.pixelsPerBin),a=await this.discretizeAndLoad(n,(o,s)=>B(this,Ml).getFeatures(o.chrom,o.startPos,o.endPos,{scale:i,signal:s}).then(l=>l.map(c=>({chrom:o.chrom,start:c.start,end:c.end,score:c.score}))));a&&this.publishData(a)}}Fl=new WeakMap,Ml=new WeakMap,Vf=new WeakSet,rw=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>xT),Promise.resolve().then(()=>Mu)]).then(([{BigWig:i},{RemoteFile:a}])=>{ie(this,Ml,new i({filehandle:new a(oo(hn(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),B(this,Ml).getHeader().then(o=>{ie(this,Fl,o.zoomLevels.map(s=>s.reductionLevel).reverse()),B(this,Fl).push(1),this.setLoadingStatus("complete"),n()}).catch(o=>{this.load(),this.setLoadingStatus("error",`${hn(this.params.url)}: ${o.message}`),r(o)})})}),this.initializedPromise};function g$(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class m$ extends su{constructor(n,r){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},a=fd(r.paramMediator,i,o=>{o.includes("url")?Y(this,jf,iw).call(this).then(()=>this.reloadLastDomain()):o.includes("windowSize")&&this.reloadLastDomain()});super(r,a.channel);H(this,jf);jt(this,"parser");jt(this,"bbi");jt(this,"parseLine");if(this.params=a,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),Y(this,jf,iw).call(this)}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)}}jf=new WeakSet,iw=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>Dee),Promise.resolve().then(()=>xT),Promise.resolve().then(()=>Mu)]).then(([i,{BigBed:a},{RemoteFile:o}])=>{const s=i.default;this.bbi=new a({filehandle:new o(oo(hn(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async l=>{this.parser=new s({autoSql:l.autoSql});try{const c=b$(this.parser);this.parseLine=(u,f)=>c(u,f.start,f.end,f.rest)}catch{this.parseLine=(u,f)=>this.parser.parseLine(`${u} ${f.start} ${f.end} ${f.rest}`)}this.setLoadingStatus("complete"),n()}).catch(l=>{this.load(),this.setLoadingStatus("error",`${hn(this.params.url)}: ${l.message}`),r(l)})})}),this.initializedPromise};function b$(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),l="0".charCodeAt(0),c="-".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===c&&(x=-1,n++,A=r.charCodeAt(n));do{if(A===s){n++;break}w=w*10+A-l,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(`
1749
1754
  const emptyString = "";
1750
1755
  return function makeTemplate(chrom, chromStart, chromEnd) {
1751
1756
  return {
@@ -1755,22 +1760,22 @@ void main() {
1755
1760
  ${h.join(`,
1756
1761
  `)}
1757
1762
  }
1758
- };`)(),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=v$(p,50).map((w,A)=>Function("parseInt","parseString",`return function parseFieldChunk${A}(d) {
1763
+ };`)(),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=y$(p,50).map((w,A)=>Function("parseInt","parseString",`return function parseFieldChunk${A}(d) {
1759
1764
  ${w.join(`
1760
1765
  `)}
1761
- }`)(f,u));function b(w){r=w,i=w.length,n=0}function y(w,A,x,E){b(E),a=d(w,A,x);for(const _ of g)_(a);return a}return y}function v$(e,t){return Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t))}class w$ extends su{constructor(n,r){const i={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,i.channel);H(this,qo,void 0);jt(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(()=>Kee),Promise.resolve().then(()=>Mu)]).then(([{BamFile:o},{RemoteFile:s}])=>{const l=c=>new s(oo(c,this.view.getBaseUrl()));ie(this,qo,new o({bamFilehandle:l(this.params.url),baiFilehandle:l(this.params.indexUrl??this.params.url+".bai")})),B(this,qo).getHeader().then(c=>{var h,d;const u=this.genome.hasChrPrefix(),f=(d=(h=B(this,qo).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)=>B(this,qo).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)}}qo=new WeakMap;class x$ extends su{constructor(n,r){const i={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",...n};super(r,i.channel);H(this,qf,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(()=>E6),Promise.resolve().then(()=>lte),Promise.resolve().then(()=>Mu)]).then(([{Buffer:o},{TabixIndexedFile:s},{RemoteFile:l}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const c=u=>new l(oo(u,this.view.getBaseUrl()));ie(this,qf,new s({filehandle:c(this.params.url),tbiFilehandle:c(this.params.indexUrl??this.params.url+".tbi")})),a()})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>{const o=[];return await B(this,qf).getLines(i.chrom,i.startPos,i.endPos,{lineCallback:s=>{o.push(s)},signal:a}),this._parseFeatures(o)});r&&this.publishData(r)}_parseFeatures(n){return[]}}qf=new WeakMap;class A$ extends x${constructor(n,r){super(n,r);H(this,Wf,void 0);Promise.resolve().then(()=>qte).then(i=>{ie(this,Wf,i.default)})}_parseFeatures(n){var i;return(i=B(this,Wf))==null?void 0:i.parseStringSync(n.join(`
1762
- `),{parseSequences:!1})}}Wf=new WeakMap;function O4(e,t){if(P4(e))return new s$(e,t);if(l$(e))return new c$(e,t);if(u$(e))return new f$(e,t);if(E$(e))return D$(e.lazy,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function E$(e){return"lazy"in e}function S$(e){return(e==null?void 0:e.type)=="axisTicks"}function _$(e){return(e==null?void 0:e.type)=="axisGenome"}function C$(e){return(e==null?void 0:e.type)=="indexedFasta"}function k$(e){return(e==null?void 0:e.type)=="bigwig"}function T$(e){return(e==null?void 0:e.type)=="bigbed"}function I$(e){return(e==null?void 0:e.type)=="bam"}function R$(e){return(e==null?void 0:e.type)=="gff3"}function D$(e,t){if(S$(e))return new h$(e,t);if(_$(e))return new d$(e,t);if(C$(e))return new p$(e,t);if(k$(e))return new g$(e,t);if(T$(e))return new b$(e,t);if(I$(e))return new w$(e,t);if(R$(e))return new A$(e,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function B$(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(`,
1763
- `)+" };");return n.properties=t,n}class $d extends st{get behavior(){return Sr}constructor(){super();const t=n=>{const r=B$(n);this.handle=i=>this._propagate(r(i)),this.handle(n)};this.handle=t,this.beginBatch=n=>{t4(n)&&(this.handle=t),super.beginBatch(n)}}}function F$(e){return"name"in e}class L4 extends Rs{constructor(n,r,i){super(r);H(this,Yf,void 0);this.provider=i,this.params=n}get identifier(){return this.params.name}updateDynamicData(n){ie(this,Yf,n),this.loadSynchronously()}loadSynchronously(){const n=B(this,Yf)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(n))n.length>0&&(r=F4(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()}}Yf=new WeakMap;class N4{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 L4&&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 z4(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 U4(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=U4(o,t,n);if(s==="stop")return s}return(a=t.postOrder)==null?void 0:a.call(t,e)}function $4(e,t){return U4(e,t,n=>n.children)}function H4(e,t){const n=[];let r;const i=t??new N4,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 l(f,h){for(const d of f){let p;try{p=r$(d,h)}catch(g){throw console.warn(g),new Error(`Cannot initialize "${d.type}" transform: ${g}`)}p.behavior&qi&&s(new $d),s(p)}}const c=f=>{if(n.push(r),f.spec.data){const h=F$(f.spec.data)?new L4(f.spec.data,f,f.context.getNamedDataFromProvider):O4(f.spec.data,f);r=h,i.addDataSource(h,f)}if(f.spec.transform&&l(f.spec.transform,f),f instanceof bt){if(!r)throw new Error(`A unit view (${f.getPathString()}) has no (inherited) data source`);const h=M$(f);if(h){a.push(h.rewrite);for(const p of h.transforms)s(p)}f.mark.isPickingParticipant()&&(s(new $d),s(new R4({type:"identifier"})));const d=new au({type:"collect",groupby:f.getFacetFields(),sort:P$(f,h==null?void 0:h.rewrittenEncoding)});o(d),i.addCollector(d,f)}},u=z4(e.getDescendants(),f=>f.dataParent);for(const f of u)$4(f,{preOrder:h=>c(h.ref),postOrder:()=>{r=n.pop()}});return a.forEach(f=>f()),i}function M$(e){var a;const t=[],n={},r=[];for(const[o,s]of Object.entries(e.getEncoding())){const l=o;Hc(l)&&m3(s)&&r.push({channel:l,chromPosDef:s})}const i=Kl(r,o=>Xa(o.channel),o=>o.chromPosDef.chrom);for(const[o,s]of i.entries())for(const[l,c]of s.entries()){const u=[],f=[],h=[];for(const{channel:d,chromPosDef:p}of c){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 $d),t.push(new C4({type:"linearizeGenomicCoordinate",channel:o,chrom:l,pos:u,offset:h,as:f},e))}return t.length?{transforms:t,rewrittenEncoding:n,rewrite:()=>{e.spec.encoding={...e.spec.encoding,...n},KN(e.mark,"encoding")}}:void 0}function P$(e,t){var r;const n={...e.getEncoding(),...t}.x;if(dn(n)&&(r=e.getScaleResolution("x"))!=null&&r.isZoomable()){if(Zr(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!$c(n)){if(hd(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function O$(e,...t){let n=e;for(const a of t)n.addChild(a),n=a;let r;n instanceof au?r=n:(r=new au,n.addChild(r));let i;return e instanceof Rs?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 G4(e,t=void 0){if(e.parent!==t)return!1;for(const n of e.children)if(!G4(n,e))return!1;return!0}function q1(e,t=!1){if(e.behavior&F1&&(t=!0),e instanceof $d)if(t)t=!1;else{const n=e.children[0];e.excise(),n&&q1(n,t);return}e.behavior&Sr&&(t=!1);for(let n=0,r=e.children.length;n<r;n++)q1(e.children[n],t||r>1)}function L$(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 N$(e){if(q1(e),!G4(e))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function z$(e){for(const t of e.dataSources)N$(t);L$(e)}function V4(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 U$(e){for(const t of bs){const n=e.getScaleResolution(t);n&&!n.name&&n.isZoomable()&&(n.name=`${t}_at_root`)}}function $$(e){const t=[];return e.visit(n=>{if(n instanceof bt){const r=n.getEncoding();for(const[i,a]of Object.entries(r))Zr(a)&&"type"in a&&t.push({view:n,channel:i,field:a.field,type:a.type});return A4}}),t}async function H$(e,t,n){var i;const r=e.import;if("url"in r){const a=mc({baseURL:t}),o=r.url,s=JSON.parse(await a.load(o).catch(l=>{throw new Error(`Could not load imported view spec: ${o}
1764
- Reason: ${l.message}`)}));if(n.isViewSpec(s))return s.baseUrl=(i=o.match(/^[^?#]*\//))==null?void 0:i[0],s;throw new Error(`The imported spec "${o}" is not a view spec: ${JSON.stringify(e)}`)}else throw new Error("Not an url import: "+JSON.stringify(r))}function j4(e){const t=[];return e.visit(n=>{t.push(n)}),new Set([...AD(t,n=>n.length,n=>n.name)].filter(([n,r])=>r==1&&n!==void 0).map(([n,r])=>n))}const G$=e=>!/^(layer|concat)\d+$/.test(e);function q4(e){return e.getSize().addPadding(e.getOverhang())}function V$(e){const t=n=>n.grow>0?void 0:n.px;return{width:t(e.width),height:t(e.height)}}function Jr(e){return()=>e}const ur=class ur{static create(t,n,r,i){return new ur(Jr(t),Jr(n),Jr(r),Jr(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"?Jr(i):typeof i=="function"?i:this._passThrough(r)};return new ur(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new ur(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 ur(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 ur(()=>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 ur(()=>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 ur(Jr(this.x),Jr(this.y),Jr(this.width),Jr(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)}`}};jt(ur,"ZERO",ur.create(0,0,0,0));let Jn=ur;class W4{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class Y4 extends W4{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=Kl(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(c=>r(c)));let l;for(const c of s){const u=c.coords;u.equals(l)||this.batch.push(r(()=>{n=o.setViewport(u,c.clipRect)})),this.batch.push(i(c.callback)),l=c.coords}}}}class j$ extends W4{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 q${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 Wi{static fromMouseEvent(t){return new Wi(t.clientX,t.clientY)}constructor(t,n){this.x=t,this.y=n}subtract(t){return new Wi(this.x-t.x,this.y-t.y)}add(t){return new Wi(this.x-t.x,this.y-t.y)}multiply(t){return new Wi(this.x*t,this.y*t)}get length(){return Math.sqrt(this.x**2+this.y**2)}equals(t){return t?t===this||t.x===this.x&&t.y===this.y:!1}}const W$=e=>new Promise(t=>setTimeout(t,e));function Hd(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),l=typeof e.from=="number"?e.from:0,c=typeof e.to=="number"?e.to:1,u=e.easingFunction||(g=>g),f=g=>(g-o)/(s-o),h=g=>g*(c-l)+l,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"):W$(e.delay).then(r):r()}class Y${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 Hd({requestAnimationFrame:n=>this.requestTransition(n),...t})}}function W1(e,t,n,r,i=0){let a=0,o=!0,s=i,l=s;function c(f){if(o)return;const h=f-a;a=f,s=l+(s-l)*Math.pow(2,-h/n),t(s),Math.abs(l-s)<r?(s=l,t(s),o=!0,e.requestRender()):e.requestTransition(d=>c(d))}function u(f){l=f,o&&(o=!1,a=+document.timeline.currentTime,c(a))}return u.stop=()=>{o=!0},u}class Z${constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new oU(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 Q$="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+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fIdtAGuG/IDMYDFsEIwCz44noaOLPv5GYgOlpgkGorKSzjWPHlHbZLAGwH9a0RBpgWehBNNoPebK+pAbU1LAeDAaDwZDLKzBEYiiRCCTiTZU3pjsRh4upqmL/fo4epaODR4vFMs88Q1kZgQCxGLZ9DXIdGbhDZy579mAwGAyGrMnloxAhPhSPBw4n7lYjV2tZFBWhCKC+Xsv/x5xuLy1FtsxlRwAgF05BBevBYDAYTAqojETZc4m25xLRKDMzSAC2b6ekhCeS88sCoOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",X$={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class K${constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new Ur([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:R1(k4),texture:t?this._createTextureNow(Q$):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(Ue(r)&&(r=X$[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=eH(r,n),a=this.fontRepository+Z4(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=>R1(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=Z4(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=>J$(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)=>{Zc(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=Zc(n,{src:t,min:n.LINEAR},(s,l,c)=>{s?o(s):a(l)})});return this._promises.push(i),r}}function Z4(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function J$(e){const t=e.split(`
1765
- `),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 eH(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 tH(e,t){const n=[];let r;for(const i of e.split(`
1766
- `))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 nH{constructor(t,n){this.animator=t,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=W1(t,r=>{var a;const i=r-this.lastValue;this.lastValue=r,(a=this.callback)==null||a.call(this,i)},40,.1)}cancel(){this.targetValue=bw([this.lastValue,this.targetValue],.3),this.smoother(this.targetValue)}setMomentum(t,n){if(this.disabled){n(t);return}this.callback=n;const r=Wr(this.targetValue+t-this.lastValue,-this.maxDistance,this.maxDistance);this.targetValue=this.lastValue+r,this.smoother(this.targetValue)}}function rH(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 Q4=new Map;async function iH(e,t,n){const r=e.symbol;let i=Q4.get(r)??await sH(e.symbol);return i?(Q4.set(r,i),U`
1766
+ }`)(f,u));function b(w){r=w,i=w.length,n=0}function y(w,A,x,E){b(E),a=d(w,A,x);for(const _ of g)_(a);return a}return y}function y$(e,t){return Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t))}class v$ extends su{constructor(n,r){const i={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,i.channel);H(this,qo,void 0);jt(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(()=>Xee),Promise.resolve().then(()=>Mu)]).then(([{BamFile:o},{RemoteFile:s}])=>{const l=c=>new s(oo(c,this.view.getBaseUrl()));ie(this,qo,new o({bamFilehandle:l(this.params.url),baiFilehandle:l(this.params.indexUrl??this.params.url+".bai")})),B(this,qo).getHeader().then(c=>{var h,d;const u=this.genome.hasChrPrefix(),f=(d=(h=B(this,qo).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)=>B(this,qo).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)}}qo=new WeakMap;class w$ extends su{constructor(n,r){const i={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",...n};super(r,i.channel);H(this,qf,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(()=>E6),Promise.resolve().then(()=>ste),Promise.resolve().then(()=>Mu)]).then(([{Buffer:o},{TabixIndexedFile:s},{RemoteFile:l}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const c=u=>new l(oo(u,this.view.getBaseUrl()));ie(this,qf,new s({filehandle:c(this.params.url),tbiFilehandle:c(this.params.indexUrl??this.params.url+".tbi")})),a()})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>{const o=[];return await B(this,qf).getLines(i.chrom,i.startPos,i.endPos,{lineCallback:s=>{o.push(s)},signal:a}),this._parseFeatures(o)});r&&this.publishData(r)}_parseFeatures(n){return[]}}qf=new WeakMap;class x$ extends w${constructor(n,r){super(n,r);H(this,Wf,void 0);Promise.resolve().then(()=>jte).then(i=>{ie(this,Wf,i.default)})}_parseFeatures(n){var i;return(i=B(this,Wf))==null?void 0:i.parseStringSync(n.join(`
1767
+ `),{parseSequences:!1})}}Wf=new WeakMap;function O4(e,t){if(P4(e))return new o$(e,t);if(s$(e))return new l$(e,t);if(c$(e))return new u$(e,t);if(A$(e))return R$(e.lazy,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function A$(e){return"lazy"in e}function E$(e){return(e==null?void 0:e.type)=="axisTicks"}function S$(e){return(e==null?void 0:e.type)=="axisGenome"}function _$(e){return(e==null?void 0:e.type)=="indexedFasta"}function C$(e){return(e==null?void 0:e.type)=="bigwig"}function k$(e){return(e==null?void 0:e.type)=="bigbed"}function T$(e){return(e==null?void 0:e.type)=="bam"}function I$(e){return(e==null?void 0:e.type)=="gff3"}function R$(e,t){if(E$(e))return new f$(e,t);if(S$(e))return new h$(e,t);if(_$(e))return new d$(e,t);if(C$(e))return new p$(e,t);if(k$(e))return new m$(e,t);if(T$(e))return new v$(e,t);if(I$(e))return new x$(e,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function D$(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(`,
1768
+ `)+" };");return n.properties=t,n}class $d extends st{get behavior(){return Sr}constructor(){super();const t=n=>{const r=D$(n);this.handle=i=>this._propagate(r(i)),this.handle(n)};this.handle=t,this.beginBatch=n=>{t4(n)&&(this.handle=t),super.beginBatch(n)}}}function B$(e){return"name"in e}class L4 extends Rs{constructor(n,r,i){super(r);H(this,Yf,void 0);this.provider=i,this.params=n}get identifier(){return this.params.name}updateDynamicData(n){ie(this,Yf,n),this.loadSynchronously()}loadSynchronously(){const n=B(this,Yf)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(n))n.length>0&&(r=F4(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()}}Yf=new WeakMap;class N4{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 L4&&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 z4(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 U4(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=U4(o,t,n);if(s==="stop")return s}return(a=t.postOrder)==null?void 0:a.call(t,e)}function $4(e,t){return U4(e,t,n=>n.children)}function H4(e,t){const n=[];let r;const i=t??new N4,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 l(f,h){for(const d of f){let p;try{p=n$(d,h)}catch(g){throw console.warn(g),new Error(`Cannot initialize "${d.type}" transform: ${g}`)}p.behavior&qi&&s(new $d),s(p)}}const c=f=>{if(n.push(r),f.spec.data){const h=B$(f.spec.data)?new L4(f.spec.data,f,f.context.getNamedDataFromProvider):O4(f.spec.data,f);r=h,i.addDataSource(h,f)}if(f.spec.transform&&l(f.spec.transform,f),f instanceof bt){if(!r)throw new Error(`A unit view (${f.getPathString()}) has no (inherited) data source`);const h=F$(f);if(h){a.push(h.rewrite);for(const p of h.transforms)s(p)}f.mark.isPickingParticipant()&&(s(new $d),s(new R4({type:"identifier"})));const d=new au({type:"collect",groupby:f.getFacetFields(),sort:M$(f,h==null?void 0:h.rewrittenEncoding)});o(d),i.addCollector(d,f)}},u=z4(e.getDescendants(),f=>f.dataParent);for(const f of u)$4(f,{preOrder:h=>c(h.ref),postOrder:()=>{r=n.pop()}});return a.forEach(f=>f()),i}function F$(e){var a;const t=[],n={},r=[];for(const[o,s]of Object.entries(e.getEncoding())){const l=o;Hc(l)&&m3(s)&&r.push({channel:l,chromPosDef:s})}const i=Kl(r,o=>Xa(o.channel),o=>o.chromPosDef.chrom);for(const[o,s]of i.entries())for(const[l,c]of s.entries()){const u=[],f=[],h=[];for(const{channel:d,chromPosDef:p}of c){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 $d),t.push(new C4({type:"linearizeGenomicCoordinate",channel:o,chrom:l,pos:u,offset:h,as:f},e))}return t.length?{transforms:t,rewrittenEncoding:n,rewrite:()=>{e.spec.encoding={...e.spec.encoding,...n},KN(e.mark,"encoding")}}:void 0}function M$(e,t){var r;const n={...e.getEncoding(),...t}.x;if(dn(n)&&(r=e.getScaleResolution("x"))!=null&&r.isZoomable()){if(Zr(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!$c(n)){if(hd(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function P$(e,...t){let n=e;for(const a of t)n.addChild(a),n=a;let r;n instanceof au?r=n:(r=new au,n.addChild(r));let i;return e instanceof Rs?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 G4(e,t=void 0){if(e.parent!==t)return!1;for(const n of e.children)if(!G4(n,e))return!1;return!0}function q1(e,t=!1){if(e.behavior&F1&&(t=!0),e instanceof $d)if(t)t=!1;else{const n=e.children[0];e.excise(),n&&q1(n,t);return}e.behavior&Sr&&(t=!1);for(let n=0,r=e.children.length;n<r;n++)q1(e.children[n],t||r>1)}function O$(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 L$(e){if(q1(e),!G4(e))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function N$(e){for(const t of e.dataSources)L$(t);O$(e)}function V4(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 z$(e){for(const t of bs){const n=e.getScaleResolution(t);n&&!n.name&&n.isZoomable()&&(n.name=`${t}_at_root`)}}function U$(e){const t=[];return e.visit(n=>{if(n instanceof bt){const r=n.getEncoding();for(const[i,a]of Object.entries(r))Zr(a)&&"type"in a&&t.push({view:n,channel:i,field:a.field,type:a.type});return A4}}),t}async function $$(e,t,n){var i;const r=e.import;if("url"in r){const a=mc({baseURL:t}),o=r.url,s=JSON.parse(await a.load(o).catch(l=>{throw new Error(`Could not load imported view spec: ${o}
1769
+ Reason: ${l.message}`)}));if(n.isViewSpec(s))return s.baseUrl=(i=o.match(/^[^?#]*\//))==null?void 0:i[0],s;throw new Error(`The imported spec "${o}" is not a view spec: ${JSON.stringify(e)}`)}else throw new Error("Not an url import: "+JSON.stringify(r))}function j4(e){const t=[];return e.visit(n=>{t.push(n)}),new Set([...AD(t,n=>n.length,n=>n.name)].filter(([n,r])=>r==1&&n!==void 0).map(([n,r])=>n))}const H$=e=>!/^(layer|concat)\d+$/.test(e);function q4(e){return e.getSize().addPadding(e.getOverhang())}function G$(e){const t=n=>n.grow>0?void 0:n.px;return{width:t(e.width),height:t(e.height)}}function Jr(e){return()=>e}const ur=class ur{static create(t,n,r,i){return new ur(Jr(t),Jr(n),Jr(r),Jr(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"?Jr(i):typeof i=="function"?i:this._passThrough(r)};return new ur(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new ur(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 ur(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 ur(()=>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 ur(()=>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 ur(Jr(this.x),Jr(this.y),Jr(this.width),Jr(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)}`}};jt(ur,"ZERO",ur.create(0,0,0,0));let Jn=ur;class W4{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class Y4 extends W4{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=Kl(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(c=>r(c)));let l;for(const c of s){const u=c.coords;u.equals(l)||this.batch.push(r(()=>{n=o.setViewport(u,c.clipRect)})),this.batch.push(i(c.callback)),l=c.coords}}}}class V$ extends W4{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 j${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 Wi{static fromMouseEvent(t){return new Wi(t.clientX,t.clientY)}constructor(t,n){this.x=t,this.y=n}subtract(t){return new Wi(this.x-t.x,this.y-t.y)}add(t){return new Wi(this.x-t.x,this.y-t.y)}multiply(t){return new Wi(this.x*t,this.y*t)}get length(){return Math.sqrt(this.x**2+this.y**2)}equals(t){return t?t===this||t.x===this.x&&t.y===this.y:!1}}const q$=e=>new Promise(t=>setTimeout(t,e));function Hd(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),l=typeof e.from=="number"?e.from:0,c=typeof e.to=="number"?e.to:1,u=e.easingFunction||(g=>g),f=g=>(g-o)/(s-o),h=g=>g*(c-l)+l,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"):q$(e.delay).then(r):r()}class W${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 Hd({requestAnimationFrame:n=>this.requestTransition(n),...t})}}function W1(e,t,n,r,i){let a=0,o=!0,s=structuredClone(i),l=s;function c(h,d,p,g){return d+(h-d)*Math.pow(2,-p/g)}function u(h){if(o)return;const d=h-a;a=h;for(const g of Object.keys(l))s[g]=c(s[g],l[g],d,n);t(s);let p=-1/0;for(const g of Object.keys(l))p=Math.max(p,Math.abs(l[g]-s[g]));p<r?(s=l,t(s),o=!0,e.requestRender()):e.requestTransition(g=>u(g))}function f(h){l=h,o&&(o=!1,a=+document.timeline.currentTime,u(a))}return f.stop=()=>{o=!0},f}class Y${constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new aU(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 Z$="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMhERycB36XD+hX0/DuzSlsnw3OfyilcwAA/vn/yzQQMoUHg9r59hhn7Oz/njH9ncJAiAXNj9P2qTxdhARETufgDYNs4fsH/Cv2jL53nzm1lcZH2dngKCP/Gnn/LTEiXg+Tw/Q+btvJ1+/vlPfvYz/v1vEwA26w4fs8lm4R4GgIiIAmB5GdvGnmbuh9Rq8MIXcuMGpVJ6AFhEXNwneOI//OfnSz8fL49/jI+9lJcecjjJJD15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VAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",Q$={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class X${constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new Ur([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:R1(k4),texture:t?this._createTextureNow(Z$):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(Ue(r)&&(r=Q$[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=J$(r,n),a=this.fontRepository+Z4(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=>R1(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=Z4(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=>K$(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)=>{Zc(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=Zc(n,{src:t,min:n.LINEAR},(s,l,c)=>{s?o(s):a(l)})});return this._promises.push(i),r}}function Z4(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function K$(e){const t=e.split(`
1770
+ `),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 J$(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 eH(e,t){const n=[];let r;for(const i of e.split(`
1771
+ `))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 tH{constructor(t,n){this.animator=t,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=W1(t,r=>{var a;const i=r.x-this.lastValue;this.lastValue=r.x,(a=this.callback)==null||a.call(this,i)},40,.1,{x:0})}cancel(){this.targetValue=bw([this.lastValue,this.targetValue],.3),this.smoother({x:this.targetValue})}setMomentum(t,n){if(this.disabled){n(t);return}this.callback=n;const r=Wr(this.targetValue+t-this.lastValue,-this.maxDistance,this.maxDistance);this.targetValue=this.lastValue+r,this.smoother({x:this.targetValue})}}function nH(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 Q4=new Map;async function rH(e,t,n){const r=e.symbol;let i=Q4.get(r)??await oH(e.symbol);return i?(Q4.set(r,i),U`
1767
1772
  <div class="title">
1768
1773
  <strong>${i.name}</strong>
1769
1774
  ${i.description}
1770
1775
  </div>
1771
1776
  <p class="summary">${i.summary}</p>
1772
1777
  <p class="source">Source: NCBI RefSeq Gene</p>
1773
- `):null}async function aH(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 oH=so(aH,500);function sH(e){return oH(e)}const lH=pt(".4~r"),cH=pt(".4~e");function Y1(e){return e==null?U` <span class="na">NA</span> `:Ue(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)?cH(e):lH(e):Zl(e)?e?"True":"False":Lt(e)?U`${e.map((t,n)=>[Y1(t),n<e.length-1?", ":he])}`:"?"+typeof e+" "+e}async function uH(e,t,n){const r=(l,c)=>{var u;for(const[f,h]of Object.entries(t.encoders))if((u=h==null?void 0:h.accessor)!=null&&u.fields.includes(l))switch(f){case"color":case"fill":case"stroke":return U`
1778
+ `):null}async function iH(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 aH=so(iH,500);function oH(e){return aH(e)}const sH=pt(".4~r"),lH=pt(".4~e");function Y1(e){return e==null?U` <span class="na">NA</span> `:Ue(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)?lH(e):sH(e):Zl(e)?e?"True":"False":Lt(e)?U`${e.map((t,n)=>[Y1(t),n<e.length-1?", ":he])}`:"?"+typeof e+" "+e}async function cH(e,t,n){const r=(l,c)=>{var u;for(const[f,h]of Object.entries(t.encoders))if((u=h==null?void 0:h.accessor)!=null&&u.fields.includes(l))switch(f){case"color":case"fill":case"stroke":return U`
1774
1779
  <span
1775
1780
  class="color-legend"
1776
1781
  style=${`background-color: ${h(c)}`}
@@ -1788,7 +1793,7 @@ Reason: ${l.message}`)}));if(n.isViewSpec(s))return s.baseUrl=(i=o.match(/^[^?#]
1788
1793
  <div class="title">
1789
1794
  <strong>${o}</strong>
1790
1795
  </div>
1791
- `:"";return U`${s}${a}`}class ei extends S4{constructor(t,n,r,i,a,o){super(t,n,r,i,a,o),this.spec=t}async initializeChildren(){}*[Symbol.iterator](){}replaceChild(t,n){throw new Error("Not implemented")}visit(t){let n;try{n=t(this)}catch(r){throw r.view=this,r}if(n===ao)return n;if(n!==A4){t.beforeChildren&&t.beforeChildren(this);for(const r of this){const i=r.visit(t);if(i===ao)return i}t.afterChildren&&t.afterChildren(this),t.postOrder&&t.postOrder(this)}}findDescendantByPath(t){for(const n of this)if(n.name===t[0]){if(t.length==1)return n;if(n instanceof ei)return n.findDescendantByPath(t.slice(1))}}findChildByName(t){for(const n of this)if(n.name===t)return n}findDescendantByName(t){let n;return this.visit(r=>{if(r.name==t)return n=r,ao}),n}getDefaultResolution(t,n){return"shared"}}class lo extends ei{constructor(n,r,i,a,o,s){super(n,r,i,a,o,s);H(this,bi,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){ie(this,bi,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!jd(i)&&!Vd(i))throw new io("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return B(this,bi).slice()}*[Symbol.iterator](){for(const n of B(this,bi))yield n}render(n,r,i={}){if(super.render(n,r,i),!!this.isConfiguredVisible()){n.pushView(this,r);for(const a of B(this,bi))a.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=B(this,bi).length-1;r>=0;r--)if(B(this,bi)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}bi=new WeakMap;class X4{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 fH="chromosome_ticks_and_labels",hH={x:"width",y:"height"};function Z1(e){return e=="x"?"y":"x"}const Gd={x:["bottom","top"],y:["left","right"]},Q1=Object.fromEntries(Object.entries(Gd).map(([e,t])=>t.map(n=>[n,e])).flat(1));function Yi(e){return Q1[e]}class X1 extends lo{constructor(t,n,r,i,a,o){const s=n=="locus",l={...s?pH:K4,...dH(n,t),...t};super(s?gH(l,n):J4(l,n),r,i,a,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=l}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return Q1[this.axisProps.orient]=="x"?new Kr(n,t):new Kr(t,n)}getPerpendicularSize(){return K1(this.axisProps)}isPickingSupported(){return!1}}function K1(e){const t=Yi(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 K4={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 dH(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 J4(e,t){const n={...e,extent:K1(e)},r=Yi(n.orient),i=Z1(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}}),l=()=>({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"}}}),c=()=>({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(c()),n.labels&&d.layer.push(l()),d},h={resolve:{scale:{[r]:"forced"}},[hH[Z1(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 pH={...K4,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 gH(e,t){const n={...e,extent:K1(e)},r=Yi(n.orient),i=Z1(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 l;switch(n.orient){case"bottom":case"top":l={};break;case"left":l={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":l={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:l={}}const c=J4({...e,...l},t);if(e.chromTicks||e.chromLabels){const u={name:fH,data:{lazy:{type:"axisGenome",channel:Yi(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;c.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))}c.layer.push(u)}return c}class mH extends lo{constructor(t,n,r,i,a,o){const l={...n=="locus"?bH:eS,...t};super(xH(l,n),r,i,a,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=l}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const eS={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},bH={...eS,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function yH(e,t){const n=e,r=Yi(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 vH(e,t){const n=e,r=Yi(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 wH(e,t){const n=e,r=Yi(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 xH(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(wH(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(vH(n,t)),n.grid&&n.gridOpacity>0&&r.push(yH(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Yi(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const tS={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"},AH={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},EH={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},SH={start:0,middle:.5,end:1},_H={start:"left",middle:"center",end:"right"};function CH(e){if(!e)return;const t=Ue(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":AH,overlay:EH}[t.style]??{},r={...tS,...n,...t};let i={},a={x:0,y:0};const o=SH[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={...tS,...i,...n,...t},l={xOffset:0,yOffset:0};switch(r.orient){case"top":l.yOffset=-s.offset;break;case"right":l.xOffset=s.offset;break;case"bottom":l.yOffset=s.offset;break;case"left":l.xOffset=-s.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...a,...l,text:s.text,align:s.align??_H[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}}}class kH{constructor(t){H(this,Wo,void 0);H(this,xa,0);H(this,Aa,0);ie(this,Wo,new Array(t))}push(t){B(this,Wo)[B(this,xa)]=t,ie(this,xa,(B(this,xa)+1)%this.size),ie(this,Aa,Math.min(B(this,Aa)+1,this.size))}get(){const t=B(this,Wo);return B(this,Aa)<this.size?t.slice(0,B(this,Aa)):t.slice(B(this,xa),this.size).concat(t.slice(0,B(this,xa)))}get size(){return B(this,Wo).length}get length(){return B(this,Aa)}}Wo=new WeakMap,xa=new WeakMap,Aa=new WeakMap;let co,nS=0;function rS(){return performance.now()-nS<50}function TH(e){return function(...t){nS=performance.now(),e(...t)}}function iS(e,t,n,r,i){if(n=TH(n),e.type=="wheel"){e.uiEvent.preventDefault();const a=e.uiEvent,o=a.deltaMode?120:1;if(a.deltaX===0&&a.deltaY===0)return;let{x:s,y:l}=e.point;if(co==null||co.stop(),r){const c=r.mark.encoders;c.x&&!c.x2&&!c.x.constantValue&&(s=+c.x(r.datum)*t.width+t.x),c.y&&!c.y2&&!c.y.constantValue&&(l=(1-+c.y(r.datum))*t.height+t.y)}Math.abs(a.deltaX)<Math.abs(a.deltaY)?n({x:s,y:l,xDelta:0,yDelta:0,zDelta:a.deltaY*o/300}):n({x:s,y:l,xDelta:-a.deltaX*o,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){co&&co.stop();const a=new kH(30),o=e.uiEvent;o.preventDefault();let s=Wi.fromMouseEvent(o);const l=f=>{const h=Wi.fromMouseEvent(f);a.push({point:h,timestamp:performance.now()});const d=h.subtract(s);n({x:s.x,y:s.y,xDelta:d.x,yDelta:d.y,zDelta:0}),s=h},c=()=>{const h=performance.now(),d=a.get().filter(w=>h-w.timestamp<160);if(d.length<5||!i||IH(d))return;const p=d.at(-1),g=d[0],b=p.point.subtract(g.point).multiply(1/(p.timestamp-g.timestamp));let y=s.x;co=W1(i,w=>{n({x:w,y:s.y,xDelta:y-w,yDelta:0,zDelta:0}),y=w},150,.5,y),co(s.x-b.x*250)},u=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",u),c()};document.addEventListener("mouseup",u,!1),document.addEventListener("mousemove",l,!1)}}function IH(e){const t=e[Math.floor(e.length/2)],n=t.point.subtract(e[0].point).multiply(t.timestamp-e[0].timestamp),r=e.at(-1).point.subtract(t.point).multiply(e.at(-1).timestamp-t.timestamp),i=n.length,a=r.length,o=.4;return a/i<o}class RH extends ei{constructor(n,r,i,a,o,s,l){super(n,r,i,a,o,l);H(this,yi);H(this,Np);H(this,Zo);H(this,Zf);H(this,Qf);H(this,Xf);H(this,zp);H(this,Nl);H(this,Up);H(this,Pl,1/0);H(this,Ol,10);H(this,En,[]);H(this,Yo,{});H(this,Ll,0);this.spec=n,ie(this,Ol,n.spacing??10),ie(this,Pl,s),ie(this,En,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),B(this,En).push(new eb(n,this,B(this,Ll))),QI(this,Ll)._++}setChildren(n){ie(this,En,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=B(this,En).findIndex(a=>a.view==n);if(i>=0)B(this,En)[i]=new eb(r,this,B(this,Ll));else throw new Error("Not my child view!")}get children(){return B(this,En).map(n=>n.view)}get childCount(){return B(this,En).length}async createAxes(){const n=[];for(const r of bs){const i=this.resolutions.axis[r];if(i){const a=i.getAxisProps();if(a){const o={title:i.getTitle(),orient:Gd[r][0],...a},s=new X1(o,i.scaleResolution.type,this.context,this,this);n.push(s.initializeChildren()),B(this,Yo)[r]=s}}}return Promise.all([...n,...B(this,En).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of B(this,En))yield*n.getChildren();for(const n of Object.values(B(this,Yo)))yield n}getOverhang(){return Y(this,zp,aR).call(this).union(Y(this,Nl,mg).call(this))}getSize(){return this._cache("size",()=>new Kr(Y(this,Qf,ow).call(this,"column"),Y(this,Qf,ow).call(this,"row")).addPadding(Y(this,Nl,mg).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(Y(this,Nl,mg).call(this)),n.pushView(this,r);const a={devicePixelRatio:this.context.devicePixelRatio},o=ru(Y(this,Zf,aw).call(this,"column"),r.width,a),s=ru(Y(this,Zf,aw).call(this,"row"),r.height,a),l=new X4(B(this,yi,es).length,B(this,Pl)??1/0),c=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,f]of B(this,yi,es).entries()){const{view:h,axes:d,gridLines:p,background:g,backgroundStroke:b,title:y}=f,[w,A]=l.getCellCoords(u),x=o[Y(this,Xf,sw).call(this,"column",w)],E=s[Y(this,Xf,sw).call(this,"row",A)],_=h.getViewportSize(),T=h.getSize(),D=h.getOverhang(),P=x.location-D.left,G=E.location-D.top,N=(je,L)=>(je[L].grow?(L=="width"?x:E).size:je[L].px)+D[L],oe=N(_,"width"),ue=N(_,"height"),ne=N(T,"width"),pe=N(T,"height"),Re=f.scrollbars.horizontal,xe=f.scrollbars.vertical,nt=Re?()=>c(Re.viewportOffset):()=>0,rt=xe?()=>c(xe.viewportOffset):()=>0,ut=new Jn(()=>r.x+P,()=>r.y+G,()=>oe,()=>ue),De=h.isScrollable(),Be=De?new Jn(()=>r.x+P-nt(),()=>r.y+G-rt(),()=>ne,()=>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 je of Object.values(p))je.render(n,ut,i);const cn=BH(h)||De;cn&&h.render(n,Be,{...i,clipRect:Rt}),b==null||b.render(n,Rt,{...i,clipRect:void 0});for(const[je,L]of Object.entries(d)){const O=je=="left"||je=="right"?"vertical":"horizontal",Z=f.scrollbars[O],q=Z?ut.modify(O=="vertical"?{y:()=>Be.y,height:pe}:{x:()=>Be.x,width:ne}):ut,X=J1(q,je,L);let I=i.clipRect;Z&&(I=X.intersect(I).intersect(Z?ut.modify(O=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),L.render(n,X,{...i,clipRect:I})}for(const je of Object.values(B(this,Yo))){const O=je.axisProps.orient;(O=="left"&&w==0||O=="right"&&w==l.nCols-1||O=="top"&&A==0||O=="bottom"&&A==l.nRows-1)&&je.render(n,J1(ut.shrink(f.view.getOverhang()),O,je),i)}cn||h.render(n,Be,i);for(const je of Object.values(f.scrollbars))je.updateScrollbar(ut,Be),je.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=B(this,yi,es).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 bt||i instanceof lo)&&iS(n,r.coords,a=>Y(this,Up,oR).call(this,r.coords,r.view,a),this.context.getCurrentHover(),this.context.animator)),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}Pl=new WeakMap,Ol=new WeakMap,En=new WeakMap,Yo=new WeakMap,Ll=new WeakMap,yi=new WeakSet,es=function(){return B(this,En).filter(n=>n.view.isConfiguredVisible())},Np=new WeakSet,iR=function(){return new X4(B(this,yi,es).length,B(this,Pl)??1/0)},Zo=new WeakSet,fh=function(n){const r=n=="column"?"width":"height",i=(a,o)=>a.map(s=>{const c=B(this,yi,es)[s].getOverhangAndPadding();return n=="column"?o?c.right:c.left:o?c.bottom:c.top}).reduce((s,l)=>Math.max(s,l),0);return this._cache(`size/directionSizes/${n}`,()=>B(this,Np,iR)[n=="column"?"colIndices":"rowIndices"].map(a=>({axisBefore:i(a,0),axisAfter:i(a,1),view:EU(a.map(o=>B(this,yi,es)[o].view.getViewportSize()[r]))})))},Zf=new WeakSet,aw=function(n){const r=Y(this,Zo,fh).call(this,n),i=[];i.push(iu);for(const[a,o]of r.entries())a>0&&i.push({px:B(this,Ol),grow:0}),(a==0||this.wrappingFacet)&&i.push(iu),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(iu);return i},Qf=new WeakSet,ow=function(n){let r=0,i=0;const a=n=="row"?this.spec.height:this.spec.width;if(a||a===0)return w4(a);const o=Y(this,Zo,fh).call(this,n);for(const[s,l]of o.entries())s>0&&(i+=B(this,Ol)),(s==0||this.wrappingFacet)&&(i+=0),i+=l.axisBefore,i+=l.view.px??0,r+=l.view.grow??0,i+=l.axisAfter,(s==o.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},Xf=new WeakSet,sw=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},zp=new WeakSet,aR=function(){const n=Y(this,Zo,fh).call(this,"column"),r=Y(this,Zo,fh).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)},Nl=new WeakSet,mg=function(){const n=r=>{const i=Q1[r],a=B(this,Yo)[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"))},Up=new WeakSet,oR=function(n,r,i){for(const[a,o]of Object.entries(DH(r))){if(o.size<=0)continue;const s=n.normalizePoint(i.x,i.y),l=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),c={x:l.x-s.x,y:l.y-s.y};for(const u of o)u.zoom(2**i.zDelta,a=="y"?1-s[a]:s[a],a=="x"?c.x:-c.y)}this.context.animator.requestRender()};function aS(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 oS(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 DH(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 BH(e){let t=!0;return e.visit(n=>{n instanceof bt&&t&&(t=n.mark.properties.clip===!0)}),t}function J1(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 eb{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=Jn.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,a="view"in i?i==null?void 0:i.view:void 0,o=aS(a);o&&(this.background=new bt(o,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const s=oS(a);s&&(this.backgroundStroke=new bt(s,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const l=CH(t.spec.title);if(l){const c=new bt(l,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=c}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new sS(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new sS(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,l)=>{const c=s.getAxisProps();if(c===null)return;const u=c?{...c}:{};if(!u.orient){for(const f of Gd[l])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()),!Gd[l].includes(u.orient))throw new Error(`Invalid axis orientation "${u.orient}" on channel "${l}"!`);return u},a=async(s,l,c)=>{const u=i(s,l);if(u){if(n[u.orient])throw new Error(`An axis with the orient "${u.orient}" already exists!`);const f=new X1(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,c);n[u.orient]=f,await f.initializeChildren()}},o=async(s,l,c)=>{const u=i(s,l);if(u&&(u.grid||u.chromGrid)){const f=new mH(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,c);r[u.orient]=f,await f.initializeChildren()}};for(const s of["x","y"])if(t.needsAxes[s]){const l=t.resolutions.axis[s];if(!l)continue;await a(l,s,t)}for(const s of["x","y"])if(t.needsAxes[s]){const l=t.getAxisResolution(s);if(!l)continue;await o(l,s,t)}if(t instanceof lo){for(const s of t)for(const[l,c]of Object.entries(s.resolutions.axis)){const u=c.getAxisProps();u&&u.orient&&await a(c,l,s)}for(const s of t)for(const[l,c]of Object.entries(s.resolutions.axis)){const u=c.getAxisProps();u&&!u.orient&&await a(c,l,s)}}[...Object.values(n),...Object.values(r)].forEach(s=>s.visit(l=>{l instanceof bt&&l.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 sS extends bt{constructor(n,r){const i={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},n.layoutParent.context,n.layoutParent,n.view,"scrollbar-"+r,{blockEncodingInheritance:!0});H(this,zl,void 0);H(this,Kf,Jn.ZERO);H(this,Ea,0);H(this,Qo,0);jt(this,"viewportOffset",0);this.config=i,ie(this,zl,r),this.interpolateViewportOffset=W1(this.context.animator,a=>{this.viewportOffset=a},50,.4,this.viewportOffset),this.addInteractionEventListener("mousedown",(a,o)=>{if(o.stopPropagation(),B(this,Ea)<=0)return;const s=d=>r=="vertical"?d.clientY:d.clientX,l=o.uiEvent;l.preventDefault();const c=this.scrollOffset,u=s(l),f=d=>{const p=Wr(s(d)-u+c,0,B(this,Ea));this.interpolateViewportOffset(p/B(this,Ea)*B(this,Qo))},h=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h)};document.addEventListener("mouseup",h,!1),document.addEventListener("mousemove",f,!1)})}get scrollOffset(){return this.viewportOffset/B(this,Qo)*B(this,Ea)}render(n,r,i){super.render(n,B(this,Kf),i)}updateScrollbar(n,r){const i=this.config.scrollbarPadding,a=this.config.scrollbarSize,o=B(this,zl)=="horizontal"?"width":"height",s=Math.min(1,n[o]/r[o]),l=n[o]-2*i,c=s*l;ie(this,Ea,l-c),ie(this,Qo,r[o]-n[o]),this.viewportOffset=Wr(this.viewportOffset,0,B(this,Qo)),ie(this,Kf,B(this,zl)=="vertical"?new Jn(()=>n.x+n.width-a-i,()=>n.y+i+this.scrollOffset,()=>a,()=>c):new Jn(()=>n.x+i+this.scrollOffset,()=>n.y+n.height-a-i,()=>c,()=>a))}}zl=new WeakMap,Kf=new WeakMap,Ea=new WeakMap,Qo=new WeakMap;class Ds extends RH{constructor(t,n,r,i,a){super(t,n,r,i,a,tb(t)?t.columns:qd(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=tb(t)?t.concat:qd(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":qd(this.spec)&&t==="x"||uS(this.spec)&&t==="y"?"shared":"independent"}}const lS="viewRoot";class FH{constructor(t={}){H(this,Ul,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,a,o,s,l)=>new r(i,a,o,s,i.name??l);this.addViewType(jd,n(lo)),this.addViewType(Vd,n(bt)),this.addViewType(qd,n(Ds)),this.addViewType(uS,n(Ds)),this.addViewType(tb,n(Ds)),this.addViewType(fS,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){B(this,Ul).set(t,n)}createView(t,n,r,i,a){for(const[o,s]of B(this,Ul))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=[...B(this,Ul).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(OH(t)){let c;if("url"in t.import)if(this.options.allowImport)c=await H$(t,i.getBaseUrl(),n);else throw new io("Importing views is not allowed!",r);else if("template"in t.import)c=cS(t.import.template,i);else throw new Error("Invalid import: "+JSON.stringify(t));o==null||o(c),MH(c,t),s=c}else s=t;!i&&this.options.wrapRoot&&(Vd(s)||jd(s))&&a===lS&&(s={name:"implicitRoot",vconcat:[s]});const l=this.createView(s,n,r,i,a);return l instanceof ei&&await l.initializeChildren(),l}}Ul=new WeakMap;function cS(e,t){var r,i;const n=(i=(r=t.spec)==null?void 0:r.templates)==null?void 0:i[e];if(n)return structuredClone(n);if(t.dataParent)return cS(e,t.dataParent);throw new Error(`Cannot find template "${e}" in current view or its ancestors!`)}function MH(e,t){t.name!=null&&(e.name=t.name);const n=Lt(t.params)?t.params:qt(t.params)?Object.entries(t.params).map(([r,i])=>({name:r,value:i})):[];if(n.length){e.params??(e.params=[]);for(const r of n){const i=e.params.findIndex(a=>a.name==r.name);i>=0&&(e.params[i]=r)}for(const r of n)e.params.some(i=>i.name==r.name)||e.params.push(r)}}function Vd(e){return"mark"in e&&(Ue(e.mark)||qt(e.mark))}function jd(e){return"layer"in e&&qt(e.layer)}function PH(e){return e&&(Vd(e)||jd(e))&&"aggregateSamples"in e}function OH(e){return"import"in e}function qd(e){return"vconcat"in e&&Lt(e.vconcat)}function uS(e){return"hconcat"in e&&Lt(e.hconcat)}function tb(e){return"concat"in e&&Lt(e.concat)}function fS(e){return"samples"in e&&qt(e.samples)&&"spec"in e&&qt(e.spec)}function hS(e){const t=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of e.paramConfigs.values()){const i=r.bind;if(!i||!("input"in i))continue;const a=r.name,o=e.getSetter(a),s=e.getValue(a),l=i.name??a,c=i.debounce?so(o,i.debounce,!1):o,u=`${t}-param-${a}`;if(i.input=="range")n.push(U`<label for=${u}>${l}</label>
1796
+ `:"";return U`${s}${a}`}class ei extends S4{constructor(t,n,r,i,a,o){super(t,n,r,i,a,o),this.spec=t}async initializeChildren(){}*[Symbol.iterator](){}replaceChild(t,n){throw new Error("Not implemented")}visit(t){let n;try{n=t(this)}catch(r){throw r.view=this,r}if(n===ao)return n;if(n!==A4){t.beforeChildren&&t.beforeChildren(this);for(const r of this){const i=r.visit(t);if(i===ao)return i}t.afterChildren&&t.afterChildren(this),t.postOrder&&t.postOrder(this)}}findDescendantByPath(t){for(const n of this)if(n.name===t[0]){if(t.length==1)return n;if(n instanceof ei)return n.findDescendantByPath(t.slice(1))}}findChildByName(t){for(const n of this)if(n.name===t)return n}findDescendantByName(t){let n;return this.visit(r=>{if(r.name==t)return n=r,ao}),n}getDefaultResolution(t,n){return"shared"}}class lo extends ei{constructor(n,r,i,a,o,s){super(n,r,i,a,o,s);H(this,bi,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){ie(this,bi,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!jd(i)&&!Vd(i))throw new io("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return B(this,bi).slice()}*[Symbol.iterator](){for(const n of B(this,bi))yield n}render(n,r,i={}){if(super.render(n,r,i),!!this.isConfiguredVisible()){n.pushView(this,r);for(const a of B(this,bi))a.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=B(this,bi).length-1;r>=0;r--)if(B(this,bi)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}bi=new WeakMap;class X4{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 uH="chromosome_ticks_and_labels",fH={x:"width",y:"height"};function Z1(e){return e=="x"?"y":"x"}const Gd={x:["bottom","top"],y:["left","right"]},Q1=Object.fromEntries(Object.entries(Gd).map(([e,t])=>t.map(n=>[n,e])).flat(1));function Yi(e){return Q1[e]}class X1 extends lo{constructor(t,n,r,i,a,o){const s=n=="locus",l={...s?dH:K4,...hH(n,t),...t};super(s?pH(l,n):J4(l,n),r,i,a,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=l}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return Q1[this.axisProps.orient]=="x"?new Kr(n,t):new Kr(t,n)}getPerpendicularSize(){return K1(this.axisProps)}isPickingSupported(){return!1}}function K1(e){const t=Yi(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 K4={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 hH(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 J4(e,t){const n={...e,extent:K1(e)},r=Yi(n.orient),i=Z1(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}}),l=()=>({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"}}}),c=()=>({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(c()),n.labels&&d.layer.push(l()),d},h={resolve:{scale:{[r]:"forced"}},[fH[Z1(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 dH={...K4,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 pH(e,t){const n={...e,extent:K1(e)},r=Yi(n.orient),i=Z1(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 l;switch(n.orient){case"bottom":case"top":l={};break;case"left":l={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":l={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:l={}}const c=J4({...e,...l},t);if(e.chromTicks||e.chromLabels){const u={name:uH,data:{lazy:{type:"axisGenome",channel:Yi(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;c.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))}c.layer.push(u)}return c}class gH extends lo{constructor(t,n,r,i,a,o){const l={...n=="locus"?mH:eS,...t};super(wH(l,n),r,i,a,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=l}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const eS={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},mH={...eS,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function bH(e,t){const n=e,r=Yi(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 yH(e,t){const n=e,r=Yi(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 vH(e,t){const n=e,r=Yi(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 wH(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(vH(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(yH(n,t)),n.grid&&n.gridOpacity>0&&r.push(bH(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Yi(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const tS={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"},xH={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},AH={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},EH={start:0,middle:.5,end:1},SH={start:"left",middle:"center",end:"right"};function _H(e){if(!e)return;const t=Ue(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":xH,overlay:AH}[t.style]??{},r={...tS,...n,...t};let i={},a={x:0,y:0};const o=EH[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={...tS,...i,...n,...t},l={xOffset:0,yOffset:0};switch(r.orient){case"top":l.yOffset=-s.offset;break;case"right":l.xOffset=s.offset;break;case"bottom":l.yOffset=s.offset;break;case"left":l.xOffset=-s.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...a,...l,text:s.text,align:s.align??SH[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}}}class CH{constructor(t){H(this,Wo,void 0);H(this,xa,0);H(this,Aa,0);ie(this,Wo,new Array(t))}push(t){B(this,Wo)[B(this,xa)]=t,ie(this,xa,(B(this,xa)+1)%this.size),ie(this,Aa,Math.min(B(this,Aa)+1,this.size))}get(){const t=B(this,Wo);return B(this,Aa)<this.size?t.slice(0,B(this,Aa)):t.slice(B(this,xa),this.size).concat(t.slice(0,B(this,xa)))}get size(){return B(this,Wo).length}get length(){return B(this,Aa)}}Wo=new WeakMap,xa=new WeakMap,Aa=new WeakMap;let co,nS=0;function rS(){return performance.now()-nS<50}function kH(e){return function(...t){nS=performance.now(),e(...t)}}function iS(e,t,n,r,i){if(n=kH(n),e.type=="wheel"){e.uiEvent.preventDefault();const a=e.uiEvent,o=a.deltaMode?120:1;if(!a.deltaX&&!a.deltaY)return;co==null||co.stop();let{x:s,y:l}=e.point;if(r){const c=r.mark.encoders;c.x&&!c.x2&&!c.x.constantValue&&(s=+c.x(r.datum)*t.width+t.x),c.y&&!c.y2&&!c.y.constantValue&&(l=(1-+c.y(r.datum))*t.height+t.y)}Math.abs(a.deltaX)<Math.abs(a.deltaY)?n({x:s,y:l,xDelta:0,yDelta:0,zDelta:a.deltaY*o/300}):n({x:s,y:l,xDelta:-a.deltaX*o,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){co&&co.stop();const a=new CH(30),o=e.uiEvent;o.preventDefault();let s=Wi.fromMouseEvent(o);const l=f=>{const h=Wi.fromMouseEvent(f);a.push({point:h,timestamp:performance.now()});const d=h.subtract(s);n({x:s.x,y:s.y,xDelta:d.x,yDelta:d.y,zDelta:0}),s=h},c=()=>{const h=performance.now(),d=a.get().filter(A=>h-A.timestamp<160);if(d.length<5||!i||TH(d))return;const p=d.at(-1),g=d[0],b=p.point.subtract(g.point).multiply(1/(p.timestamp-g.timestamp));let y=s.x,w=s.y;co=W1(i,A=>{n({x:A.x,y:A.y,xDelta:y-A.x,yDelta:w-A.y,zDelta:0}),y=A.x,w=A.y},150,.5,{x:y,y:w}),co({x:s.x-b.x*250,y:s.y-b.y*250})},u=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",u),c()};document.addEventListener("mouseup",u,!1),document.addEventListener("mousemove",l,!1)}}function TH(e){const t=e[Math.floor(e.length/2)],n=t.point.subtract(e[0].point).multiply(t.timestamp-e[0].timestamp),r=e.at(-1).point.subtract(t.point).multiply(e.at(-1).timestamp-t.timestamp),i=n.length,a=r.length,o=.4;return a/i<o}class IH extends ei{constructor(n,r,i,a,o,s,l){super(n,r,i,a,o,l);H(this,yi);H(this,Np);H(this,Zo);H(this,Zf);H(this,Qf);H(this,Xf);H(this,zp);H(this,Nl);H(this,Up);H(this,Pl,1/0);H(this,Ol,10);H(this,En,[]);H(this,Yo,{});H(this,Ll,0);this.spec=n,ie(this,Ol,n.spacing??10),ie(this,Pl,s),ie(this,En,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),B(this,En).push(new eb(n,this,B(this,Ll))),QI(this,Ll)._++}setChildren(n){ie(this,En,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=B(this,En).findIndex(a=>a.view==n);if(i>=0)B(this,En)[i]=new eb(r,this,B(this,Ll));else throw new Error("Not my child view!")}get children(){return B(this,En).map(n=>n.view)}get childCount(){return B(this,En).length}async createAxes(){const n=[];for(const r of bs){const i=this.resolutions.axis[r];if(i){const a=i.getAxisProps();if(a){const o={title:i.getTitle(),orient:Gd[r][0],...a},s=new X1(o,i.scaleResolution.type,this.context,this,this);n.push(s.initializeChildren()),B(this,Yo)[r]=s}}}return Promise.all([...n,...B(this,En).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of B(this,En))yield*n.getChildren();for(const n of Object.values(B(this,Yo)))yield n}getOverhang(){return Y(this,zp,aR).call(this).union(Y(this,Nl,mg).call(this))}getSize(){return this._cache("size",()=>new Kr(Y(this,Qf,ow).call(this,"column"),Y(this,Qf,ow).call(this,"row")).addPadding(Y(this,Nl,mg).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(Y(this,Nl,mg).call(this)),n.pushView(this,r);const a={devicePixelRatio:this.context.devicePixelRatio},o=ru(Y(this,Zf,aw).call(this,"column"),r.width,a),s=ru(Y(this,Zf,aw).call(this,"row"),r.height,a),l=new X4(B(this,yi,es).length,B(this,Pl)??1/0),c=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,f]of B(this,yi,es).entries()){const{view:h,axes:d,gridLines:p,background:g,backgroundStroke:b,title:y}=f,[w,A]=l.getCellCoords(u),x=o[Y(this,Xf,sw).call(this,"column",w)],E=s[Y(this,Xf,sw).call(this,"row",A)],_=h.getViewportSize(),T=h.getSize(),D=h.getOverhang(),P=x.location-D.left,G=E.location-D.top,N=(je,L)=>(je[L].grow?(L=="width"?x:E).size:je[L].px)+D[L],oe=N(_,"width"),ue=N(_,"height"),ne=N(T,"width"),pe=N(T,"height"),Re=f.scrollbars.horizontal,xe=f.scrollbars.vertical,nt=Re?()=>c(Re.viewportOffset):()=>0,rt=xe?()=>c(xe.viewportOffset):()=>0,ut=new Jn(()=>r.x+P,()=>r.y+G,()=>oe,()=>ue),De=h.isScrollable(),Be=De?new Jn(()=>r.x+P-nt(),()=>r.y+G-rt(),()=>ne,()=>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 je of Object.values(p))je.render(n,ut,i);const cn=DH(h)||De;cn&&h.render(n,Be,{...i,clipRect:Rt}),b==null||b.render(n,Rt,{...i,clipRect:void 0});for(const[je,L]of Object.entries(d)){const O=je=="left"||je=="right"?"vertical":"horizontal",Z=f.scrollbars[O],q=Z?ut.modify(O=="vertical"?{y:()=>Be.y,height:pe}:{x:()=>Be.x,width:ne}):ut,X=J1(q,je,L);let I=i.clipRect;Z&&(I=X.intersect(I).intersect(Z?ut.modify(O=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),L.render(n,X,{...i,clipRect:I})}for(const je of Object.values(B(this,Yo))){const O=je.axisProps.orient;(O=="left"&&w==0||O=="right"&&w==l.nCols-1||O=="top"&&A==0||O=="bottom"&&A==l.nRows-1)&&je.render(n,J1(ut.shrink(f.view.getOverhang()),O,je),i)}cn||h.render(n,Be,i);for(const je of Object.values(f.scrollbars))je.updateScrollbar(ut,Be),je.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=B(this,yi,es).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 bt||i instanceof lo)&&iS(n,r.coords,a=>Y(this,Up,oR).call(this,r.coords,r.view,a),this.context.getCurrentHover(),this.context.animator)),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}Pl=new WeakMap,Ol=new WeakMap,En=new WeakMap,Yo=new WeakMap,Ll=new WeakMap,yi=new WeakSet,es=function(){return B(this,En).filter(n=>n.view.isConfiguredVisible())},Np=new WeakSet,iR=function(){return new X4(B(this,yi,es).length,B(this,Pl)??1/0)},Zo=new WeakSet,fh=function(n){const r=n=="column"?"width":"height",i=(a,o)=>a.map(s=>{const c=B(this,yi,es)[s].getOverhangAndPadding();return n=="column"?o?c.right:c.left:o?c.bottom:c.top}).reduce((s,l)=>Math.max(s,l),0);return this._cache(`size/directionSizes/${n}`,()=>B(this,Np,iR)[n=="column"?"colIndices":"rowIndices"].map(a=>({axisBefore:i(a,0),axisAfter:i(a,1),view:AU(a.map(o=>B(this,yi,es)[o].view.getViewportSize()[r]))})))},Zf=new WeakSet,aw=function(n){const r=Y(this,Zo,fh).call(this,n),i=[];i.push(iu);for(const[a,o]of r.entries())a>0&&i.push({px:B(this,Ol),grow:0}),(a==0||this.wrappingFacet)&&i.push(iu),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(iu);return i},Qf=new WeakSet,ow=function(n){let r=0,i=0;const a=n=="row"?this.spec.height:this.spec.width;if(a||a===0)return w4(a);const o=Y(this,Zo,fh).call(this,n);for(const[s,l]of o.entries())s>0&&(i+=B(this,Ol)),(s==0||this.wrappingFacet)&&(i+=0),i+=l.axisBefore,i+=l.view.px??0,r+=l.view.grow??0,i+=l.axisAfter,(s==o.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},Xf=new WeakSet,sw=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},zp=new WeakSet,aR=function(){const n=Y(this,Zo,fh).call(this,"column"),r=Y(this,Zo,fh).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)},Nl=new WeakSet,mg=function(){const n=r=>{const i=Q1[r],a=B(this,Yo)[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"))},Up=new WeakSet,oR=function(n,r,i){for(const[a,o]of Object.entries(RH(r))){if(o.size<=0)continue;const s=n.normalizePoint(i.x,i.y),l=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),c={x:l.x-s.x,y:l.y-s.y};for(const u of o)u.zoom(2**i.zDelta,a=="y"?1-s[a]:s[a],a=="x"?c.x:-c.y)}this.context.animator.requestRender()};function aS(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 oS(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 RH(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 DH(e){let t=!0;return e.visit(n=>{n instanceof bt&&t&&(t=n.mark.properties.clip===!0)}),t}function J1(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 eb{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=Jn.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,a="view"in i?i==null?void 0:i.view:void 0,o=aS(a);o&&(this.background=new bt(o,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const s=oS(a);s&&(this.backgroundStroke=new bt(s,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const l=_H(t.spec.title);if(l){const c=new bt(l,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=c}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new sS(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new sS(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,l)=>{const c=s.getAxisProps();if(c===null)return;const u=c?{...c}:{};if(!u.orient){for(const f of Gd[l])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()),!Gd[l].includes(u.orient))throw new Error(`Invalid axis orientation "${u.orient}" on channel "${l}"!`);return u},a=async(s,l,c)=>{const u=i(s,l);if(u){if(n[u.orient])throw new Error(`An axis with the orient "${u.orient}" already exists!`);const f=new X1(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,c);n[u.orient]=f,await f.initializeChildren()}},o=async(s,l,c)=>{const u=i(s,l);if(u&&(u.grid||u.chromGrid)){const f=new gH(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,c);r[u.orient]=f,await f.initializeChildren()}};for(const s of["x","y"])if(t.needsAxes[s]){const l=t.resolutions.axis[s];if(!l)continue;await a(l,s,t)}for(const s of["x","y"])if(t.needsAxes[s]){const l=t.getAxisResolution(s);if(!l)continue;await o(l,s,t)}if(t instanceof lo){for(const s of t)for(const[l,c]of Object.entries(s.resolutions.axis)){const u=c.getAxisProps();u&&u.orient&&await a(c,l,s)}for(const s of t)for(const[l,c]of Object.entries(s.resolutions.axis)){const u=c.getAxisProps();u&&!u.orient&&await a(c,l,s)}}[...Object.values(n),...Object.values(r)].forEach(s=>s.visit(l=>{l instanceof bt&&l.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 sS extends bt{constructor(n,r){const i={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},n.layoutParent.context,n.layoutParent,n.view,"scrollbar-"+r,{blockEncodingInheritance:!0});H(this,zl,void 0);H(this,Kf,Jn.ZERO);H(this,Ea,0);H(this,Qo,0);jt(this,"viewportOffset",0);this.config=i,ie(this,zl,r),this.interpolateViewportOffset=W1(this.context.animator,a=>{this.viewportOffset=a.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(a,o)=>{if(o.stopPropagation(),B(this,Ea)<=0)return;const s=d=>r=="vertical"?d.clientY:d.clientX,l=o.uiEvent;l.preventDefault();const c=this.scrollOffset,u=s(l),f=d=>{const p=Wr(s(d)-u+c,0,B(this,Ea));this.interpolateViewportOffset({x:p/B(this,Ea)*B(this,Qo)})},h=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h)};document.addEventListener("mouseup",h,!1),document.addEventListener("mousemove",f,!1)})}get scrollOffset(){return this.viewportOffset/B(this,Qo)*B(this,Ea)}render(n,r,i){super.render(n,B(this,Kf),i)}updateScrollbar(n,r){const i=this.config.scrollbarPadding,a=this.config.scrollbarSize,o=B(this,zl)=="horizontal"?"width":"height",s=Math.min(1,n[o]/r[o]),l=n[o]-2*i,c=s*l;ie(this,Ea,l-c),ie(this,Qo,r[o]-n[o]),this.viewportOffset=Wr(this.viewportOffset,0,B(this,Qo)),ie(this,Kf,B(this,zl)=="vertical"?new Jn(()=>n.x+n.width-a-i,()=>n.y+i+this.scrollOffset,()=>a,()=>c):new Jn(()=>n.x+i+this.scrollOffset,()=>n.y+n.height-a-i,()=>c,()=>a))}}zl=new WeakMap,Kf=new WeakMap,Ea=new WeakMap,Qo=new WeakMap;class Ds extends IH{constructor(t,n,r,i,a){super(t,n,r,i,a,tb(t)?t.columns:qd(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=tb(t)?t.concat:qd(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":qd(this.spec)&&t==="x"||uS(this.spec)&&t==="y"?"shared":"independent"}}const lS="viewRoot";class BH{constructor(t={}){H(this,Ul,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,a,o,s,l)=>new r(i,a,o,s,i.name??l);this.addViewType(jd,n(lo)),this.addViewType(Vd,n(bt)),this.addViewType(qd,n(Ds)),this.addViewType(uS,n(Ds)),this.addViewType(tb,n(Ds)),this.addViewType(fS,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){B(this,Ul).set(t,n)}createView(t,n,r,i,a){for(const[o,s]of B(this,Ul))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=[...B(this,Ul).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(PH(t)){let c;if("url"in t.import)if(this.options.allowImport)c=await $$(t,i.getBaseUrl(),n);else throw new io("Importing views is not allowed!",r);else if("template"in t.import)c=cS(t.import.template,i);else throw new Error("Invalid import: "+JSON.stringify(t));o==null||o(c),FH(c,t),s=c}else s=t;!i&&this.options.wrapRoot&&(Vd(s)||jd(s))&&a===lS&&(s={name:"implicitRoot",vconcat:[s]});const l=this.createView(s,n,r,i,a);return l instanceof ei&&await l.initializeChildren(),l}}Ul=new WeakMap;function cS(e,t){var r,i;const n=(i=(r=t.spec)==null?void 0:r.templates)==null?void 0:i[e];if(n)return structuredClone(n);if(t.dataParent)return cS(e,t.dataParent);throw new Error(`Cannot find template "${e}" in current view or its ancestors!`)}function FH(e,t){t.name!=null&&(e.name=t.name);const n=Lt(t.params)?t.params:qt(t.params)?Object.entries(t.params).map(([r,i])=>({name:r,value:i})):[];if(n.length){e.params??(e.params=[]);for(const r of n){const i=e.params.findIndex(a=>a.name==r.name);i>=0&&(e.params[i]=r)}for(const r of n)e.params.some(i=>i.name==r.name)||e.params.push(r)}}function Vd(e){return"mark"in e&&(Ue(e.mark)||qt(e.mark))}function jd(e){return"layer"in e&&qt(e.layer)}function MH(e){return e&&(Vd(e)||jd(e))&&"aggregateSamples"in e}function PH(e){return"import"in e}function qd(e){return"vconcat"in e&&Lt(e.vconcat)}function uS(e){return"hconcat"in e&&Lt(e.hconcat)}function tb(e){return"concat"in e&&Lt(e.concat)}function fS(e){return"samples"in e&&qt(e.samples)&&"spec"in e&&qt(e.spec)}function hS(e){const t=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of e.paramConfigs.values()){const i=r.bind;if(!i||!("input"in i))continue;const a=r.name,o=e.getSetter(a),s=e.getValue(a),l=i.name??a,c=i.debounce?so(o,i.debounce,!1):o,u=`${t}-param-${a}`;if(i.input=="range")n.push(U`<label for=${u}>${l}</label>
1792
1797
  <div>
1793
1798
  <input
1794
1799
  id=${u}
@@ -1838,7 +1843,7 @@ Reason: ${l.message}`)}));if(n.isViewSpec(s))return s.baseUrl=(i=o.match(/^[^?#]
1838
1843
  @focus=${f=>f.target.select()}
1839
1844
  @input=${f=>{c(i.input=="number"?f.target.valueAsNumber:f.target.value)}}
1840
1845
  />
1841
- </div>`);else throw new Error("Unsupported input type: "+i.input);i.description&&n.push(U`<div class="description">${i.description}</div>`)}return n}ux("fasta",tH);class dS{constructor(t,n,r={}){H(this,$l);H(this,$p);H(this,Hp);H(this,Gp);this.container=t,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=n,this.accessorFactory=new LM,this.viewFactory=new FH,this.namedDataProviders=[],this.animator=new Y$(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=i=>i.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new nH(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:uH,refseqgene:iH,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._loadingViews=new Map,this._inputBindingContainer=void 0}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),U1(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.status=="loading"||r.status=="error");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(U`<div style=${Uh(o)}>
1846
+ </div>`);else throw new Error("Unsupported input type: "+i.input);i.description&&n.push(U`<div class="description">${i.description}</div>`)}return n}ux("fasta",eH);class dS{constructor(t,n,r={}){H(this,$l);H(this,$p);H(this,Hp);H(this,Gp);this.container=t,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=n,this.accessorFactory=new LM,this.viewFactory=new BH,this.namedDataProviders=[],this.animator=new W$(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=i=>i.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new tH(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:cH,refseqgene:rH,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._loadingViews=new Map,this._inputBindingContainer=void 0}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),U1(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.status=="loading"||r.status=="error");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(U`<div style=${Uh(o)}>
1842
1847
  <div class=${i.status}>
1843
1848
  ${i.status=="error"?U`<span
1844
1849
  >Loading
@@ -1848,13 +1853,13 @@ Reason: ${l.message}`)}));if(n.isViewSpec(s))return s.baseUrl=(i=o.match(/^[^?#]
1848
1853
  <span>Loading...</span>
1849
1854
  `}
1850
1855
  </div>
1851
- </div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),Bt(t,this.loadingIndicatorsElement)}destroy(){var n;const t=B(this,$l,bg);this.container.classList.remove("genome-spy"),t.classList.remove("loading");for(const[r,i]of this._keyboardListeners)for(const a of i)document.removeEventListener(r,a);for(this._destructionCallbacks.forEach(r=>r()),this._glHelper.finalize(),(n=this._inputBindingContainer)==null||n.remove();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new Z$(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new N4,accessorFactory:this.accessorFactory,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new K$(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(l,c,u)=>{this._loadingViews.set(l,{status:c,detail:u}),this._updateLoadingIndicators()},addKeyboardListener:(l,c)=>{document.addEventListener(l,c);let u=this._keyboardListeners.get(l);u||(u=[],this._keyboardListeners.set(l,u)),u.push(c)},addBroadcastListener(l,c){const u=t._extraBroadcastListeners;let f=u.get(l);f||(f=new Set,u.set(l,f)),f.add(c)},removeBroadcastListener(l,c){var f;(f=t._extraBroadcastListeners.get(l))==null||f.delete(c)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:l=>t.viewFactory.isViewSpec(l),createView:function(l,c,u,f){return t.viewFactory.createView(l,n,c,u,f)},createOrImportView:async function(l,c,u,f,h){return t.viewFactory.createOrImportView(l,n,c,u,f,h)}},r=this.spec;r.datasets&&this.registerNamedDataProvider(l=>r.datasets[l]),this.viewRoot=await n.createOrImportView(r,null,null,lS),B(this,$l,bg).style.flexGrow=q4(this.viewRoot).height.grow>0?"1":"0",Y(this,$p,sR).call(this),V4(this.viewRoot),U$(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(l=>l.configureViewOpacity()),this._glHelper.invalidateSize(),Y(this,Hp,lR).call(this);const a=i.filter(l=>l instanceof bt),o=H4(this.viewRoot,n.dataFlow);z$(o),this.broadcast("dataFlowBuilt",o),a.forEach(l=>l.mark.initializeEncoders());const s=Promise.all(a.map(l=>l.mark.initializeGraphics()));for(const l of a)o.addObserver(c=>{l.mark.initializeData(),l.mark.updateGraphicsData(),n.animator.requestRender()},l);await n.fontManager.waitUntilReady(),o.initialize(),await Promise.all(o.dataSources.map(l=>l.load())),U1(this.viewRoot),this.broadcast("dataLoaded"),await s;for(const l of a)l.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(l=>Kc(l,"size")),this._glHelper.invalidateSize()}async launch(){try{return Y(this,Gp,cR).call(this),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),LH(this.container,n),!1}finally{B(this,$l,bg).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const t=this._glHelper.canvas;let n=performance.now();const r=i=>{var s;const a=performance.now(),o=a-n<200;if(i instanceof MouseEvent){const l=t.getBoundingClientRect(),c=new Wi(i.clientX-l.left-t.clientLeft,i.clientY-l.top-t.clientTop);i.type=="mousemove"&&!o&&(this.tooltip.handleMouseMove(i),this._tooltipUpdateRequested=!1,i.buttons==0&&!rS()&&(this.renderPickingFramebuffer(),this._handlePicking(c.x,c.y)));const u=f=>{this.viewRoot.propagateInteractionEvent(new q$(c,f)),this._tooltipUpdateRequested||this.tooltip.clear()};if(i.type!="wheel"&&this._wheelInertia.cancel(),(i.type=="mousedown"||i.type=="mouseup")&&!rS())this.renderPickingFramebuffer();else if(i.type=="wheel"){n=a,this._tooltipUpdateRequested=!1;const f=i;if(Math.abs(f.deltaX)>Math.abs(f.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const h=rH(f);this._wheelInertia.setMomentum(f.deltaY*(f.deltaMode?80:1),d=>{const p=new WheelEvent("wheel",{...h,deltaMode:0,deltaX:0,deltaY:d});u(p)}),f.preventDefault();return}}if(i.type=="click"){const f=this._currentHover?{type:i.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(h=>h.name).reverse(),datum:this._currentHover.datum}:{type:i.type,viewPath:null,datum:null};(s=this._eventListeners.get("click"))==null||s.forEach(h=>h(f))}u(i)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(i=>t.addEventListener(i,r)),t.addEventListener("mousedown",()=>{document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),t.addEventListener("dragstart",i=>i.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 bt){if(o.mark.isPickingParticipant()&&[...o.facetCoords.values()].some(s=>s.containsPoint(t,n))){const s=o.mark.encoders.uniqueId.accessor;o.getCollector().visitData(l=>{s(l)==i&&(this._currentHover={mark:o.mark,datum:l,uniqueId:i})})}if(this._currentHover)return ao}}),this._currentHover){const o=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async s=>{if(!o.isPickingParticipant())return;const l=o.properties.tooltip;if(l!==null){const c=(l==null?void 0:l.handler)??"default",u=this.tooltipHandlers[c];if(!u)throw new Error("No such tooltip handler: "+c);return u(s,o,l==null?void 0:l.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 Y4({picking:!1},this._glHelper),this._pickingContext=new Y4({picking:!0},this._glHelper),t.render(new j$(this._renderingContext,this._pickingContext),Jn.create(0,0,n.width,n.height)),this._updateLoadingIndicators(),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 bt&&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}}$l=new WeakSet,bg=function(){return this.container.querySelector(".canvas-wrapper")},$p=new WeakSet,sR=function(){const t=[];this.viewRoot.visit(r=>{const i=r.paramMediator;t.push(...hS(i))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!t.length)){if(this._inputBindingContainer=Wd("div",{className:"gs-input-bindings"}),n=="default")this.container.appendChild(this._inputBindingContainer);else if(n instanceof HTMLElement)n.appendChild(this._inputBindingContainer);else throw new Error("Invalid inputBindingContainer");t.length&&Bt(U`<div class="gs-input-binding">${t}</div>`,this._inputBindingContainer)}},Hp=new WeakSet,lR=function(){const t=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",window.devicePixelRatio),n=()=>{this._glHelper.invalidateSize(),t(window.devicePixelRatio),this.computeLayout(),this.renderAll()},r=new ResizeObserver(n);r.observe(this.container),this._destructionCallbacks.push(()=>r.disconnect());let i=null;const a=()=>{i!=null&&(i(),n());const o=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);o.addEventListener("change",a),i=()=>{o.removeEventListener("change",a)}};a(),i&&this._destructionCallbacks.push(i)},Gp=new WeakSet,cR=function(){this.container.classList.add("genome-spy");const t=document.createElement("style");t.innerHTML=q7,this.container.appendChild(t);const n=Wd("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new nz(n,()=>this.viewRoot?V$(q4(this.viewRoot)):{width:void 0,height:void 0},this.spec.background,{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=Wd("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=Wd("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new W7(n),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function LH(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)}function Wd(e,t){const n=document.createElement(e);for(const[r,i]of Object.entries(t))["innerHTML","innerText","className"].includes(r)&&(n[r]=i),n.setAttribute(r,i);return n}const NH="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";/**
1856
+ </div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),Bt(t,this.loadingIndicatorsElement)}destroy(){var n;const t=B(this,$l,bg);this.container.classList.remove("genome-spy"),t.classList.remove("loading");for(const[r,i]of this._keyboardListeners)for(const a of i)document.removeEventListener(r,a);for(this._destructionCallbacks.forEach(r=>r()),this._glHelper.finalize(),(n=this._inputBindingContainer)==null||n.remove();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new Y$(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new N4,accessorFactory:this.accessorFactory,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new X$(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(l,c,u)=>{this._loadingViews.set(l,{status:c,detail:u}),this._updateLoadingIndicators()},addKeyboardListener:(l,c)=>{document.addEventListener(l,c);let u=this._keyboardListeners.get(l);u||(u=[],this._keyboardListeners.set(l,u)),u.push(c)},addBroadcastListener(l,c){const u=t._extraBroadcastListeners;let f=u.get(l);f||(f=new Set,u.set(l,f)),f.add(c)},removeBroadcastListener(l,c){var f;(f=t._extraBroadcastListeners.get(l))==null||f.delete(c)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:l=>t.viewFactory.isViewSpec(l),createView:function(l,c,u,f){return t.viewFactory.createView(l,n,c,u,f)},createOrImportView:async function(l,c,u,f,h){return t.viewFactory.createOrImportView(l,n,c,u,f,h)}},r=this.spec;r.datasets&&this.registerNamedDataProvider(l=>r.datasets[l]),this.viewRoot=await n.createOrImportView(r,null,null,lS),B(this,$l,bg).style.flexGrow=q4(this.viewRoot).height.grow>0?"1":"0",Y(this,$p,sR).call(this),V4(this.viewRoot),z$(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(l=>l.configureViewOpacity()),this._glHelper.invalidateSize(),Y(this,Hp,lR).call(this);const a=i.filter(l=>l instanceof bt),o=H4(this.viewRoot,n.dataFlow);N$(o),this.broadcast("dataFlowBuilt",o),a.forEach(l=>l.mark.initializeEncoders());const s=Promise.all(a.map(l=>l.mark.initializeGraphics()));for(const l of a)o.addObserver(c=>{l.mark.initializeData(),l.mark.updateGraphicsData(),n.animator.requestRender()},l);await n.fontManager.waitUntilReady(),o.initialize(),await Promise.all(o.dataSources.map(l=>l.load())),U1(this.viewRoot),this.broadcast("dataLoaded"),await s;for(const l of a)l.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(l=>Kc(l,"size")),this._glHelper.invalidateSize()}async launch(){try{return Y(this,Gp,cR).call(this),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),OH(this.container,n),!1}finally{B(this,$l,bg).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const t=this._glHelper.canvas;let n=performance.now();const r=i=>{var s;const a=performance.now(),o=a-n<200;if(i instanceof MouseEvent){const l=t.getBoundingClientRect(),c=new Wi(i.clientX-l.left-t.clientLeft,i.clientY-l.top-t.clientTop);i.type=="mousemove"&&!o&&(this.tooltip.handleMouseMove(i),this._tooltipUpdateRequested=!1,i.buttons==0&&!rS()&&(this.renderPickingFramebuffer(),this._handlePicking(c.x,c.y)));const u=f=>{this.viewRoot.propagateInteractionEvent(new j$(c,f)),this._tooltipUpdateRequested||this.tooltip.clear()};if(i.type!="wheel"&&this._wheelInertia.cancel(),(i.type=="mousedown"||i.type=="mouseup")&&!rS())this.renderPickingFramebuffer();else if(i.type=="wheel"){n=a,this._tooltipUpdateRequested=!1;const f=i;if(Math.abs(f.deltaX)>Math.abs(f.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const h=nH(f);this._wheelInertia.setMomentum(f.deltaY*(f.deltaMode?80:1),d=>{const p=new WheelEvent("wheel",{...h,deltaMode:0,deltaX:0,deltaY:d});u(p)}),f.preventDefault();return}}if(i.type=="click"){const f=this._currentHover?{type:i.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(h=>h.name).reverse(),datum:this._currentHover.datum}:{type:i.type,viewPath:null,datum:null};(s=this._eventListeners.get("click"))==null||s.forEach(h=>h(f))}u(i)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(i=>t.addEventListener(i,r)),t.addEventListener("mousedown",()=>{document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),t.addEventListener("dragstart",i=>i.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 bt){if(o.mark.isPickingParticipant()&&[...o.facetCoords.values()].some(s=>s.containsPoint(t,n))){const s=o.mark.encoders.uniqueId.accessor;o.getCollector().visitData(l=>{s(l)==i&&(this._currentHover={mark:o.mark,datum:l,uniqueId:i})})}if(this._currentHover)return ao}}),this._currentHover){const o=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async s=>{if(!o.isPickingParticipant())return;const l=o.properties.tooltip;if(l!==null){const c=(l==null?void 0:l.handler)??"default",u=this.tooltipHandlers[c];if(!u)throw new Error("No such tooltip handler: "+c);return u(s,o,l==null?void 0:l.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 Y4({picking:!1},this._glHelper),this._pickingContext=new Y4({picking:!0},this._glHelper),t.render(new V$(this._renderingContext,this._pickingContext),Jn.create(0,0,n.width,n.height)),this._updateLoadingIndicators(),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 bt&&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}}$l=new WeakSet,bg=function(){return this.container.querySelector(".canvas-wrapper")},$p=new WeakSet,sR=function(){const t=[];this.viewRoot.visit(r=>{const i=r.paramMediator;t.push(...hS(i))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!t.length)){if(this._inputBindingContainer=Wd("div",{className:"gs-input-bindings"}),n=="default")this.container.appendChild(this._inputBindingContainer);else if(n instanceof HTMLElement)n.appendChild(this._inputBindingContainer);else throw new Error("Invalid inputBindingContainer");t.length&&Bt(U`<div class="gs-input-binding">${t}</div>`,this._inputBindingContainer)}},Hp=new WeakSet,lR=function(){const t=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",window.devicePixelRatio),n=()=>{this._glHelper.invalidateSize(),t(window.devicePixelRatio),this.computeLayout(),this.renderAll()},r=new ResizeObserver(n);r.observe(this.container),this._destructionCallbacks.push(()=>r.disconnect());let i=null;const a=()=>{i!=null&&(i(),n());const o=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);o.addEventListener("change",a),i=()=>{o.removeEventListener("change",a)}};a(),i&&this._destructionCallbacks.push(i)},Gp=new WeakSet,cR=function(){this.container.classList.add("genome-spy");const t=document.createElement("style");t.innerHTML=q7,this.container.appendChild(t);const n=Wd("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new nz(n,()=>this.viewRoot?G$(q4(this.viewRoot)):{width:void 0,height:void 0},this.spec.background,{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=Wd("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=Wd("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new W7(n),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function OH(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)}function Wd(e,t){const n=document.createElement(e);for(const[r,i]of Object.entries(t))["innerHTML","innerText","className"].includes(r)&&(n[r]=i),n.setAttribute(r,i);return n}const LH="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";/**
1852
1857
  * @license
1853
1858
  * Copyright 2018 Google LLC
1854
1859
  * SPDX-License-Identifier: BSD-3-Clause
1855
- */const nb=$a(class extends us{constructor(e){var t;if(super(e),e.type!==mr.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.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!((r=this.nt)!=null&&r.has(a))&&this.st.add(a);return this.render(t)}const n=e.element.classList;for(const a of this.st)a in t||(n.remove(a),this.st.delete(a));for(const a in t){const o=!!t[a];o===this.st.has(a)||(i=this.nt)!=null&&i.has(a)||(o?(n.add(a),this.st.add(a)):(n.remove(a),this.st.delete(a)))}return Dt}});var zH={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"]},Yd=zH,UH={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"]},$H=UH,HH={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"]},GH=HH,pS={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"]},VH={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"]},jH=VH,qH={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"]},WH=qH,uo={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"]},lu={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"]},gS={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"]},YH={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"]},ZH=YH,QH={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"]},XH={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"]},KH=XH,mS={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"]},JH={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"]},bS=JH,eG={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"]},tG=eG,nG={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"]},rG=nG,iG={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"]},aG=iG,oG={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"]},sG=oG,lG={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"]},cG=lG,yS={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"]},uG={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"]},fG={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"]},hG={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"]},dG={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"]},pG=dG,gG={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"]},rb={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 vS(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?vS(Object(n),!0).forEach(function(r){yt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zd(e){"@babel/helpers - typeof";return Zd=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},Zd(e)}function mG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wS(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 bG(e,t,n){return t&&wS(e.prototype,t),n&&wS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ib(e,t){return vG(e)||xG(e,t)||xS(e,t)||EG()}function cu(e){return yG(e)||wG(e)||xS(e)||AG()}function yG(e){if(Array.isArray(e))return ab(e)}function vG(e){if(Array.isArray(e))return e}function wG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xG(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(l){a=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function xS(e,t){if(e){if(typeof e=="string")return ab(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 ab(e,t)}}function ab(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 AG(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1856
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1857
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var AS=function(){},ob={},ES={},SS=null,_S={mark:AS,measure:AS};try{typeof window<"u"&&(ob=window),typeof document<"u"&&(ES=document),typeof MutationObserver<"u"&&(SS=MutationObserver),typeof performance<"u"&&(_S=performance)}catch{}var SG=ob.navigator||{},CS=SG.userAgent,kS=CS===void 0?"":CS,Zi=ob,Ye=ES,TS=SS,Qd=_S;Zi.document;var ti=!!Ye.documentElement&&!!Ye.head&&typeof Ye.addEventListener=="function"&&typeof Ye.createElement=="function",IS=~kS.indexOf("MSIE")||~kS.indexOf("Trident/"),Xd,Kd,Jd,e0,t0,ni="___FONT_AWESOME___",sb=16,RS="fa",DS="svg-inline--fa",fo="data-fa-i2svg",lb="data-fa-pseudo-element",_G="data-fa-pseudo-element-pending",cb="data-prefix",ub="data-icon",BS="fontawesome-i2svg",CG="async",kG=["HTML","HEAD","STYLE","SCRIPT"],FS=function(){try{return!0}catch{return!1}}(),Ze="classic",ct="sharp",fb=[Ze,ct];function uu(e){return new Proxy(e,{get:function(n,r){return r in n?n[r]:n[Ze]}})}var fu=uu((Xd={},yt(Xd,Ze,{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"}),yt(Xd,ct,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light"}),Xd)),hu=uu((Kd={},yt(Kd,Ze,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),yt(Kd,ct,{solid:"fass",regular:"fasr",light:"fasl"}),Kd)),du=uu((Jd={},yt(Jd,Ze,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),yt(Jd,ct,{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light"}),Jd)),TG=uu((e0={},yt(e0,Ze,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),yt(e0,ct,{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl"}),e0)),IG=/fa(s|r|l|t|d|b|k|ss|sr|sl)?[\-\ ]/,MS="fa-layers-text",RG=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,DG=uu((t0={},yt(t0,Ze,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),yt(t0,ct,{900:"fass",400:"fasr",300:"fasl"}),t0)),PS=[1,2,3,4,5,6,7,8,9,10],BG=PS.concat([11,12,13,14,15,16,17,18,19,20]),FG=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],ho={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},pu=new Set;Object.keys(hu[Ze]).map(pu.add.bind(pu)),Object.keys(hu[ct]).map(pu.add.bind(pu));var MG=[].concat(fb,cu(pu),["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",ho.GROUP,ho.SWAP_OPACITY,ho.PRIMARY,ho.SECONDARY]).concat(PS.map(function(e){return"".concat(e,"x")})).concat(BG.map(function(e){return"w-".concat(e)})),gu=Zi.FontAwesomeConfig||{};function PG(e){var t=Ye.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function OG(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(Ye&&typeof Ye.querySelector=="function"){var LG=[["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"]];LG.forEach(function(e){var t=ib(e,2),n=t[0],r=t[1],i=OG(PG(n));i!=null&&(gu[r]=i)})}var OS={styleDefault:"solid",familyDefault:"classic",cssPrefix:RS,replacementClass:DS,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};gu.familyPrefix&&(gu.cssPrefix=gu.familyPrefix);var Bs=te(te({},OS),gu);Bs.autoReplaceSvg||(Bs.observeMutations=!1);var ae={};Object.keys(OS).forEach(function(e){Object.defineProperty(ae,e,{enumerable:!0,set:function(n){Bs[e]=n,mu.forEach(function(r){return r(ae)})},get:function(){return Bs[e]}})}),Object.defineProperty(ae,"familyPrefix",{enumerable:!0,set:function(t){Bs.cssPrefix=t,mu.forEach(function(n){return n(ae)})},get:function(){return Bs.cssPrefix}}),Zi.FontAwesomeConfig=ae;var mu=[];function NG(e){return mu.push(e),function(){mu.splice(mu.indexOf(e),1)}}var Qi=sb,_r={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function zG(e){if(!(!e||!ti)){var t=Ye.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=Ye.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 Ye.head.insertBefore(t,r),e}}var UG="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function bu(){for(var e=12,t="";e-- >0;)t+=UG[Math.random()*62|0];return t}function Fs(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function hb(e){return e.classList?Fs(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function LS(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function $G(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(LS(e[n]),'" ')},"").trim()}function n0(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function db(e){return e.size!==_r.size||e.x!==_r.x||e.y!==_r.y||e.rotate!==_r.rotate||e.flipX||e.flipY}function HG(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)"),l={transform:"".concat(a," ").concat(o," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function GG(e){var t=e.transform,n=e.width,r=n===void 0?sb:n,i=e.height,a=i===void 0?sb:i,o=e.startCentered,s=o===void 0?!1:o,l="";return s&&IS?l+="translate(".concat(t.x/Qi-r/2,"em, ").concat(t.y/Qi-a/2,"em) "):s?l+="translate(calc(-50% + ".concat(t.x/Qi,"em), calc(-50% + ").concat(t.y/Qi,"em)) "):l+="translate(".concat(t.x/Qi,"em, ").concat(t.y/Qi,"em) "),l+="scale(".concat(t.size/Qi*(t.flipX?-1:1),", ").concat(t.size/Qi*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var VG=`:root, :host {
1860
+ */const nb=$a(class extends us{constructor(e){var t;if(super(e),e.type!==mr.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.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!((r=this.nt)!=null&&r.has(a))&&this.st.add(a);return this.render(t)}const n=e.element.classList;for(const a of this.st)a in t||(n.remove(a),this.st.delete(a));for(const a in t){const o=!!t[a];o===this.st.has(a)||(i=this.nt)!=null&&i.has(a)||(o?(n.add(a),this.st.add(a)):(n.remove(a),this.st.delete(a)))}return Dt}});var NH={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"]},Yd=NH,zH={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"]},UH=zH,$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"]},HH=$H,pS={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"]},GH={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"]},VH=GH,jH={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"]},qH=jH,uo={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"]},lu={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"]},gS={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"]},WH={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"]},YH=WH,ZH={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"]},QH={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"]},XH=QH,mS={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"]},KH={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"]},bS=KH,JH={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"]},eG=JH,tG={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"]},nG=tG,rG={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"]},iG=rG,aG={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"]},oG=aG,sG={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"]},lG=sG,yS={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"]},cG={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"]},uG={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"]},fG={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"]},hG={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"]},dG=hG,pG={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"]},rb={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 vS(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?vS(Object(n),!0).forEach(function(r){yt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zd(e){"@babel/helpers - typeof";return Zd=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},Zd(e)}function gG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wS(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 mG(e,t,n){return t&&wS(e.prototype,t),n&&wS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ib(e,t){return yG(e)||wG(e,t)||xS(e,t)||AG()}function cu(e){return bG(e)||vG(e)||xS(e)||xG()}function bG(e){if(Array.isArray(e))return ab(e)}function yG(e){if(Array.isArray(e))return e}function vG(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wG(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(l){a=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function xS(e,t){if(e){if(typeof e=="string")return ab(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 ab(e,t)}}function ab(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 xG(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1861
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1862
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var AS=function(){},ob={},ES={},SS=null,_S={mark:AS,measure:AS};try{typeof window<"u"&&(ob=window),typeof document<"u"&&(ES=document),typeof MutationObserver<"u"&&(SS=MutationObserver),typeof performance<"u"&&(_S=performance)}catch{}var EG=ob.navigator||{},CS=EG.userAgent,kS=CS===void 0?"":CS,Zi=ob,Ye=ES,TS=SS,Qd=_S;Zi.document;var ti=!!Ye.documentElement&&!!Ye.head&&typeof Ye.addEventListener=="function"&&typeof Ye.createElement=="function",IS=~kS.indexOf("MSIE")||~kS.indexOf("Trident/"),Xd,Kd,Jd,e0,t0,ni="___FONT_AWESOME___",sb=16,RS="fa",DS="svg-inline--fa",fo="data-fa-i2svg",lb="data-fa-pseudo-element",SG="data-fa-pseudo-element-pending",cb="data-prefix",ub="data-icon",BS="fontawesome-i2svg",_G="async",CG=["HTML","HEAD","STYLE","SCRIPT"],FS=function(){try{return!0}catch{return!1}}(),Ze="classic",ct="sharp",fb=[Ze,ct];function uu(e){return new Proxy(e,{get:function(n,r){return r in n?n[r]:n[Ze]}})}var fu=uu((Xd={},yt(Xd,Ze,{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"}),yt(Xd,ct,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light"}),Xd)),hu=uu((Kd={},yt(Kd,Ze,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),yt(Kd,ct,{solid:"fass",regular:"fasr",light:"fasl"}),Kd)),du=uu((Jd={},yt(Jd,Ze,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),yt(Jd,ct,{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light"}),Jd)),kG=uu((e0={},yt(e0,Ze,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),yt(e0,ct,{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl"}),e0)),TG=/fa(s|r|l|t|d|b|k|ss|sr|sl)?[\-\ ]/,MS="fa-layers-text",IG=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,RG=uu((t0={},yt(t0,Ze,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),yt(t0,ct,{900:"fass",400:"fasr",300:"fasl"}),t0)),PS=[1,2,3,4,5,6,7,8,9,10],DG=PS.concat([11,12,13,14,15,16,17,18,19,20]),BG=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],ho={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},pu=new Set;Object.keys(hu[Ze]).map(pu.add.bind(pu)),Object.keys(hu[ct]).map(pu.add.bind(pu));var FG=[].concat(fb,cu(pu),["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",ho.GROUP,ho.SWAP_OPACITY,ho.PRIMARY,ho.SECONDARY]).concat(PS.map(function(e){return"".concat(e,"x")})).concat(DG.map(function(e){return"w-".concat(e)})),gu=Zi.FontAwesomeConfig||{};function MG(e){var t=Ye.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function PG(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(Ye&&typeof Ye.querySelector=="function"){var OG=[["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"]];OG.forEach(function(e){var t=ib(e,2),n=t[0],r=t[1],i=PG(MG(n));i!=null&&(gu[r]=i)})}var OS={styleDefault:"solid",familyDefault:"classic",cssPrefix:RS,replacementClass:DS,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};gu.familyPrefix&&(gu.cssPrefix=gu.familyPrefix);var Bs=te(te({},OS),gu);Bs.autoReplaceSvg||(Bs.observeMutations=!1);var ae={};Object.keys(OS).forEach(function(e){Object.defineProperty(ae,e,{enumerable:!0,set:function(n){Bs[e]=n,mu.forEach(function(r){return r(ae)})},get:function(){return Bs[e]}})}),Object.defineProperty(ae,"familyPrefix",{enumerable:!0,set:function(t){Bs.cssPrefix=t,mu.forEach(function(n){return n(ae)})},get:function(){return Bs.cssPrefix}}),Zi.FontAwesomeConfig=ae;var mu=[];function LG(e){return mu.push(e),function(){mu.splice(mu.indexOf(e),1)}}var Qi=sb,_r={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function NG(e){if(!(!e||!ti)){var t=Ye.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=Ye.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 Ye.head.insertBefore(t,r),e}}var zG="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function bu(){for(var e=12,t="";e-- >0;)t+=zG[Math.random()*62|0];return t}function Fs(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function hb(e){return e.classList?Fs(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function LS(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function UG(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(LS(e[n]),'" ')},"").trim()}function n0(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function db(e){return e.size!==_r.size||e.x!==_r.x||e.y!==_r.y||e.rotate!==_r.rotate||e.flipX||e.flipY}function $G(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)"),l={transform:"".concat(a," ").concat(o," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function HG(e){var t=e.transform,n=e.width,r=n===void 0?sb:n,i=e.height,a=i===void 0?sb:i,o=e.startCentered,s=o===void 0?!1:o,l="";return s&&IS?l+="translate(".concat(t.x/Qi-r/2,"em, ").concat(t.y/Qi-a/2,"em) "):s?l+="translate(calc(-50% + ".concat(t.x/Qi,"em), calc(-50% + ").concat(t.y/Qi,"em)) "):l+="translate(".concat(t.x/Qi,"em, ").concat(t.y/Qi,"em) "),l+="scale(".concat(t.size/Qi*(t.flipX?-1:1),", ").concat(t.size/Qi*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var GG=`:root, :host {
1858
1863
  --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";
1859
1864
  --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";
1860
1865
  --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";
@@ -2610,17 +2615,17 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2610
2615
  .fad.fa-inverse,
2611
2616
  .fa-duotone.fa-inverse {
2612
2617
  color: var(--fa-inverse, #fff);
2613
- }`;function NS(){var e=RS,t=DS,n=ae.cssPrefix,r=ae.replacementClass,i=VG;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 zS=!1;function pb(){ae.autoAddCss&&!zS&&(zG(NS()),zS=!0)}var jG={mixout:function(){return{dom:{css:NS,insertCss:pb}}},hooks:function(){return{beforeDOMElementCreation:function(){pb()},beforeI2svg:function(){pb()}}}},ri=Zi||{};ri[ni]||(ri[ni]={}),ri[ni].styles||(ri[ni].styles={}),ri[ni].hooks||(ri[ni].hooks={}),ri[ni].shims||(ri[ni].shims=[]);var er=ri[ni],US=[],qG=function e(){Ye.removeEventListener("DOMContentLoaded",e),r0=1,US.map(function(t){return t()})},r0=!1;ti&&(r0=(Ye.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Ye.readyState),r0||Ye.addEventListener("DOMContentLoaded",qG));function WG(e){ti&&(r0?setTimeout(e,0):US.push(e))}function yu(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"?LS(e):"<".concat(t," ").concat($G(r),">").concat(a.map(yu).join(""),"</").concat(t,">")}function $S(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var YG=function(t,n){return function(r,i,a,o){return t.call(n,r,i,a,o)}},gb=function(t,n,r,i){var a=Object.keys(t),o=a.length,s=i!==void 0?YG(n,i):n,l,c,u;for(r===void 0?(l=1,u=t[a[0]]):(l=0,u=r);l<o;l++)c=a[l],u=s(u,t[c],c,t);return u};function ZG(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 mb(e){var t=ZG(e);return t.length===1?t[0].toString(16):null}function QG(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 HS(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 bb(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,a=HS(t);typeof er.hooks.addPack=="function"&&!i?er.hooks.addPack(e,HS(t)):er.styles[e]=te(te({},er.styles[e]||{}),a),e==="fas"&&bb("fa",t)}var i0,a0,o0,Ms=er.styles,XG=er.shims,KG=(i0={},yt(i0,Ze,Object.values(du[Ze])),yt(i0,ct,Object.values(du[ct])),i0),yb=null,GS={},VS={},jS={},qS={},WS={},JG=(a0={},yt(a0,Ze,Object.keys(fu[Ze])),yt(a0,ct,Object.keys(fu[ct])),a0);function eV(e){return~MG.indexOf(e)}function tV(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!eV(i)?i:null}var YS=function(){var t=function(a){return gb(Ms,function(o,s,l){return o[l]=gb(s,a,{}),o},{})};GS=t(function(i,a,o){if(a[3]&&(i[a[3]]=o),a[2]){var s=a[2].filter(function(l){return typeof l=="number"});s.forEach(function(l){i[l.toString(16)]=o})}return i}),VS=t(function(i,a,o){if(i[o]=o,a[2]){var s=a[2].filter(function(l){return typeof l=="string"});s.forEach(function(l){i[l]=o})}return i}),WS=t(function(i,a,o){var s=a[2];return i[o]=o,s.forEach(function(l){i[l]=o}),i});var n="far"in Ms||ae.autoFetchSvg,r=gb(XG,function(i,a){var o=a[0],s=a[1],l=a[2];return s==="far"&&!n&&(s="fas"),typeof o=="string"&&(i.names[o]={prefix:s,iconName:l}),typeof o=="number"&&(i.unicodes[o.toString(16)]={prefix:s,iconName:l}),i},{names:{},unicodes:{}});jS=r.names,qS=r.unicodes,yb=s0(ae.styleDefault,{family:ae.familyDefault})};NG(function(e){yb=s0(e.styleDefault,{family:ae.familyDefault})}),YS();function vb(e,t){return(GS[e]||{})[t]}function nV(e,t){return(VS[e]||{})[t]}function po(e,t){return(WS[e]||{})[t]}function ZS(e){return jS[e]||{prefix:null,iconName:null}}function rV(e){var t=qS[e],n=vb("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Xi(){return yb}var wb=function(){return{prefix:null,iconName:null,rest:[]}};function s0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Ze:n,i=fu[r][e],a=hu[r][e]||hu[r][i],o=e in er.styles?e:null;return a||o||null}var QS=(o0={},yt(o0,Ze,Object.keys(du[Ze])),yt(o0,ct,Object.keys(du[ct])),o0);function l0(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,a=(t={},yt(t,Ze,"".concat(ae.cssPrefix,"-").concat(Ze)),yt(t,ct,"".concat(ae.cssPrefix,"-").concat(ct)),t),o=null,s=Ze;(e.includes(a[Ze])||e.some(function(c){return QS[Ze].includes(c)}))&&(s=Ze),(e.includes(a[ct])||e.some(function(c){return QS[ct].includes(c)}))&&(s=ct);var l=e.reduce(function(c,u){var f=tV(ae.cssPrefix,u);if(Ms[u]?(u=KG[s].includes(u)?TG[s][u]:u,o=u,c.prefix=u):JG[s].indexOf(u)>-1?(o=u,c.prefix=s0(u,{family:s})):f?c.iconName=f:u!==ae.replacementClass&&u!==a[Ze]&&u!==a[ct]&&c.rest.push(u),!i&&c.prefix&&c.iconName){var h=o==="fa"?ZS(c.iconName):{},d=po(c.prefix,c.iconName);h.prefix&&(o=null),c.iconName=h.iconName||d||c.iconName,c.prefix=h.prefix||c.prefix,c.prefix==="far"&&!Ms.far&&Ms.fas&&!ae.autoFetchSvg&&(c.prefix="fas")}return c},wb());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&s===ct&&(Ms.fass||ae.autoFetchSvg)&&(l.prefix="fass",l.iconName=po(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||o==="fa")&&(l.prefix=Xi()||"fas"),l}var iV=function(){function e(){mG(this,e),this.definitions={}}return bG(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]),bb(s,o[s]);var l=du[Ze][s];l&&bb(l,o[s]),YS()})}},{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,l=o.iconName,c=o.icon,u=c[2];n[s]||(n[s]={}),u.length>0&&u.forEach(function(f){typeof f=="string"&&(n[s][f]=c)}),n[s][l]=c}),n}}]),e}(),XS=[],Ps={},Os={},aV=Object.keys(Os);function oV(e,t){var n=t.mixoutsTo;return XS=e,Ps={},Object.keys(Os).forEach(function(r){aV.indexOf(r)===-1&&delete Os[r]}),XS.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(o){typeof i[o]=="function"&&(n[o]=i[o]),Zd(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){Ps[o]||(Ps[o]=[]),Ps[o].push(a[o])})}r.provides&&r.provides(Os)}),n}function xb(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=Ps[e]||[];return a.forEach(function(o){t=o.apply(null,[t].concat(r))}),t}function go(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=Ps[e]||[];i.forEach(function(a){a.apply(null,n)})}function ii(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Os[e]?Os[e].apply(null,t):void 0}function Ab(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,n=e.prefix||Xi();if(t)return t=po(n,t)||t,$S(KS.definitions,n,t)||$S(er.styles,n,t)}var KS=new iV,sV=function(){ae.autoReplaceSvg=!1,ae.observeMutations=!1,go("noAuto")},lV={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ti?(go("beforeI2svg",t),ii("pseudoElements2svg",t),ii("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;ae.autoReplaceSvg===!1&&(ae.autoReplaceSvg=!0),ae.observeMutations=!0,WG(function(){uV({autoReplaceSvgRoot:n}),go("watch",t)})}},cV={icon:function(t){if(t===null)return null;if(Zd(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:po(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=s0(t[0]);return{prefix:r,iconName:po(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(ae.cssPrefix,"-"))>-1||t.match(IG))){var i=l0(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Xi(),iconName:po(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var a=Xi();return{prefix:a,iconName:po(a,t)||t}}}},pn={noAuto:sV,config:ae,dom:lV,parse:cV,library:KS,findIconDefinition:Ab,toHtml:yu},uV=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?Ye:n;(Object.keys(er.styles).length>0||ae.autoFetchSvg)&&ti&&ae.autoReplaceSvg&&pn.dom.i2svg({node:r})};function c0(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return yu(r)})}}),Object.defineProperty(e,"node",{get:function(){if(ti){var r=Ye.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function fV(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,a=e.styles,o=e.transform;if(db(o)&&n.found&&!r.found){var s=n.width,l=n.height,c={x:s/l/2,y:.5};i.style=n0(te(te({},a),{},{"transform-origin":"".concat(c.x+o.x/16,"em ").concat(c.y+o.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function hV(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,a=e.symbol,o=a===!0?"".concat(t,"-").concat(ae.cssPrefix,"-").concat(n):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:te(te({},i),{},{id:o}),children:r}]}]}function Eb(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,a=e.iconName,o=e.transform,s=e.symbol,l=e.title,c=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=[ae.replacementClass,a?"".concat(ae.cssPrefix,"-").concat(a):""].filter(function(P){return f.classes.indexOf(P)===-1}).filter(function(P){return P!==""||!!P}).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[fo]=""),l&&(A.children.push({tag:"title",attributes:{id:A.attributes["aria-labelledby"]||"title-".concat(u||bu())},children:[l]}),delete A.attributes.title);var E=te(te({},A),{},{prefix:i,iconName:a,main:n,mask:r,maskId:c,transform:o,symbol:s,styles:te(te({},x),f.styles)}),_=r.found&&n.found?ii("generateAbstractMask",E)||{children:[],attributes:{}}:ii("generateAbstractIcon",E)||{children:[],attributes:{}},T=_.children,D=_.attributes;return E.children=T,E.attributes=D,s?hV(E):fV(E)}function JS(e){var t=e.content,n=e.width,r=e.height,i=e.transform,a=e.title,o=e.extra,s=e.watchable,l=s===void 0?!1:s,c=te(te(te({},o.attributes),a?{title:a}:{}),{},{class:o.classes.join(" ")});l&&(c[fo]="");var u=te({},o.styles);db(i)&&(u.transform=GG({transform:i,startCentered:!0,width:n,height:r}),u["-webkit-transform"]=u.transform);var f=n0(u);f.length>0&&(c.style=f);var h=[];return h.push({tag:"span",attributes:c,children:[t]}),a&&h.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),h}function dV(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=n0(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 Sb=er.styles;function _b(e){var t=e[0],n=e[1],r=e.slice(4),i=ib(r,1),a=i[0],o=null;return Array.isArray(a)?o={tag:"g",attributes:{class:"".concat(ae.cssPrefix,"-").concat(ho.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ae.cssPrefix,"-").concat(ho.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(ae.cssPrefix,"-").concat(ho.PRIMARY),fill:"currentColor",d:a[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:a}},{found:!0,width:t,height:n,icon:o}}var pV={found:!1,width:512,height:512};function gV(e,t){!FS&&!ae.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Cb(e,t){var n=t;return t==="fa"&&ae.styleDefault!==null&&(t=Xi()),new Promise(function(r,i){if(ii("missingIconAbstract"),n==="fa"){var a=ZS(e)||{};e=a.iconName||e,t=a.prefix||t}if(e&&t&&Sb[t]&&Sb[t][e]){var o=Sb[t][e];return r(_b(o))}gV(e,t),r(te(te({},pV),{},{icon:ae.showMissingIcons&&e?ii("missingIconAbstract")||{}:{}}))})}var e_=function(){},kb=ae.measurePerformance&&Qd&&Qd.mark&&Qd.measure?Qd:{mark:e_,measure:e_},vu='FA "6.4.2"',mV=function(t){return kb.mark("".concat(vu," ").concat(t," begins")),function(){return t_(t)}},t_=function(t){kb.mark("".concat(vu," ").concat(t," ends")),kb.measure("".concat(vu," ").concat(t),"".concat(vu," ").concat(t," begins"),"".concat(vu," ").concat(t," ends"))},Tb={begin:mV,end:t_},u0=function(){};function n_(e){var t=e.getAttribute?e.getAttribute(fo):null;return typeof t=="string"}function bV(e){var t=e.getAttribute?e.getAttribute(cb):null,n=e.getAttribute?e.getAttribute(ub):null;return t&&n}function yV(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(ae.replacementClass)}function vV(){if(ae.autoReplaceSvg===!0)return f0.replace;var e=f0[ae.autoReplaceSvg];return e||f0.replace}function wV(e){return Ye.createElementNS("http://www.w3.org/2000/svg",e)}function xV(e){return Ye.createElement(e)}function r_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?wV:xV:n;if(typeof e=="string")return Ye.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(r_(o,{ceFn:r}))}),i}function AV(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var f0={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(r_(i),n)}),n.getAttribute(fo)===null&&ae.keepOriginalSource){var r=Ye.createComment(AV(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~hb(n).indexOf(ae.replacementClass))return f0.replace(t);var i=new RegExp("".concat(ae.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var a=r[0].attributes.class.split(" ").reduce(function(s,l){return l===ae.replacementClass||l.match(i)?s.toSvg.push(l):s.toNode.push(l),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 yu(s)}).join(`
2614
- `);n.setAttribute(fo,""),n.innerHTML=o}};function i_(e){e()}function a_(e,t){var n=typeof t=="function"?t:u0;if(e.length===0)n();else{var r=i_;ae.mutateApproach===CG&&(r=Zi.requestAnimationFrame||i_),r(function(){var i=vV(),a=Tb.begin("mutate");e.map(i),a(),n()})}}var Ib=!1;function o_(){Ib=!0}function Rb(){Ib=!1}var h0=null;function s_(e){if(TS&&ae.observeMutations){var t=e.treeCallback,n=t===void 0?u0:t,r=e.nodeCallback,i=r===void 0?u0:r,a=e.pseudoElementsCallback,o=a===void 0?u0:a,s=e.observeMutationsRoot,l=s===void 0?Ye:s;h0=new TS(function(c){if(!Ib){var u=Xi();Fs(c).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!n_(f.addedNodes[0])&&(ae.searchPseudoElements&&o(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&ae.searchPseudoElements&&o(f.target.parentNode),f.type==="attributes"&&n_(f.target)&&~FG.indexOf(f.attributeName))if(f.attributeName==="class"&&bV(f.target)){var h=l0(hb(f.target)),d=h.prefix,p=h.iconName;f.target.setAttribute(cb,d||u),p&&f.target.setAttribute(ub,p)}else yV(f.target)&&i(f.target)})}}),ti&&h0.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function EV(){h0&&h0.disconnect()}function SV(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 _V(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=l0(hb(e));return i.prefix||(i.prefix=Xi()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=nV(i.prefix,e.innerText)||vb(i.prefix,mb(e.innerText))),!i.iconName&&ae.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function CV(e){var t=Fs(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 ae.autoA11y&&(n?t["aria-labelledby"]="".concat(ae.replacementClass,"-title-").concat(r||bu()):(t["aria-hidden"]="true",t.focusable="false")),t}function kV(){return{iconName:null,title:null,titleId:null,prefix:null,transform:_r,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function l_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=_V(e),r=n.iconName,i=n.prefix,a=n.rest,o=CV(e),s=xb("parseNodeAttributes",{},e),l=t.styleParser?SV(e):[];return te({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:_r,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:a,styles:l,attributes:o}},s)}var TV=er.styles;function c_(e){var t=ae.autoReplaceSvg==="nest"?l_(e,{styleParser:!1}):l_(e);return~t.extra.classes.indexOf(MS)?ii("generateLayersText",e,t):ii("generateSvgReplacementMutation",e,t)}var Ki=new Set;fb.map(function(e){Ki.add("fa-".concat(e))}),Object.keys(fu[Ze]).map(Ki.add.bind(Ki)),Object.keys(fu[ct]).map(Ki.add.bind(Ki)),Ki=cu(Ki);function u_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!ti)return Promise.resolve();var n=Ye.documentElement.classList,r=function(f){return n.add("".concat(BS,"-").concat(f))},i=function(f){return n.remove("".concat(BS,"-").concat(f))},a=ae.autoFetchSvg?Ki:fb.map(function(u){return"fa-".concat(u)}).concat(Object.keys(TV));a.includes("fa")||a.push("fa");var o=[".".concat(MS,":not([").concat(fo,"])")].concat(a.map(function(u){return".".concat(u,":not([").concat(fo,"])")})).join(", ");if(o.length===0)return Promise.resolve();var s=[];try{s=Fs(e.querySelectorAll(o))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();var l=Tb.begin("onTree"),c=s.reduce(function(u,f){try{var h=c_(f);h&&u.push(h)}catch(d){FS||d.name==="MissingIcon"&&console.error(d)}return u},[]);return new Promise(function(u,f){Promise.all(c).then(function(h){a_(h,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),u()})}).catch(function(h){l(),f(h)})})}function IV(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;c_(e).then(function(n){n&&a_([n],t)})}function RV(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:Ab(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:Ab(i||{})),e(r,te(te({},n),{},{mask:i}))}}var DV=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?_r:r,a=n.symbol,o=a===void 0?!1:a,s=n.mask,l=s===void 0?null:s,c=n.maskId,u=c===void 0?null:c,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 E=t.prefix,_=t.iconName,T=t.icon;return c0(te({type:"icon"},t),function(){return go("beforeDOMElementCreation",{iconDefinition:t,params:n}),ae.autoA11y&&(h?w["aria-labelledby"]="".concat(ae.replacementClass,"-title-").concat(p||bu()):(w["aria-hidden"]="true",w.focusable="false")),Eb({icons:{main:_b(T),mask:l?_b(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:E,iconName:_,transform:te(te({},_r),i),symbol:o,title:h,maskId:u,titleId:p,extra:{attributes:w,styles:x,classes:b}})})}},BV={mixout:function(){return{icon:RV(DV)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=u_,n.nodeCallback=IV,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?Ye:r,a=n.callback,o=a===void 0?function(){}:a;return u_(i,o)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,a=r.title,o=r.titleId,s=r.prefix,l=r.transform,c=r.symbol,u=r.mask,f=r.maskId,h=r.extra;return new Promise(function(d,p){Promise.all([Cb(i,s),u.iconName?Cb(u.iconName,u.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(g){var b=ib(g,2),y=b[0],w=b[1];d([n,Eb({icons:{main:y,mask:w},prefix:s,iconName:i,transform:l,symbol:c,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,l=n0(s);l.length>0&&(i.style=l);var c;return db(o)&&(c=ii("generateAbstractTransformGrouping",{main:a,transform:o,containerWidth:a.width,iconWidth:a.width})),r.push(c||a.icon),{children:r,attributes:i}}}},FV={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 c0({type:"layer"},function(){go("beforeDOMElementCreation",{assembler:n,params:r});var o=[];return n(function(s){Array.isArray(s)?s.map(function(l){o=o.concat(l.abstract)}):o=o.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(ae.cssPrefix,"-layers")].concat(cu(a)).join(" ")},children:o}]})}}}},MV={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,l=r.attributes,c=l===void 0?{}:l,u=r.styles,f=u===void 0?{}:u;return c0({type:"counter",content:n},function(){return go("beforeDOMElementCreation",{content:n,params:r}),dV({content:n.toString(),title:a,extra:{attributes:c,styles:f,classes:["".concat(ae.cssPrefix,"-layers-counter")].concat(cu(s))}})})}}}},PV={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,a=i===void 0?_r:i,o=r.title,s=o===void 0?null:o,l=r.classes,c=l===void 0?[]:l,u=r.attributes,f=u===void 0?{}:u,h=r.styles,d=h===void 0?{}:h;return c0({type:"text",content:n},function(){return go("beforeDOMElementCreation",{content:n,params:r}),JS({content:n,transform:te(te({},_r),a),title:s,extra:{attributes:f,styles:d,classes:["".concat(ae.cssPrefix,"-layers-text")].concat(cu(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,a=r.transform,o=r.extra,s=null,l=null;if(IS){var c=parseInt(getComputedStyle(n).fontSize,10),u=n.getBoundingClientRect();s=u.width/c,l=u.height/c}return ae.autoA11y&&!i&&(o.attributes["aria-hidden"]="true"),Promise.resolve([n,JS({content:n.innerHTML,width:s,height:l,transform:a,title:i,extra:o,watchable:!0})])}}},OV=new RegExp('"',"ug"),f_=[1105920,1112319];function LV(e){var t=e.replace(OV,""),n=QG(t,0),r=n>=f_[0]&&n<=f_[1],i=t.length===2?t[0]===t[1]:!1;return{value:mb(i?t[0]:t),isSecondary:r||i}}function h_(e,t){var n="".concat(_G).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var a=Fs(e.children),o=a.filter(function(T){return T.getAttribute(lb)===t})[0],s=Zi.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(RG),c=s.getPropertyValue("font-weight"),u=s.getPropertyValue("content");if(o&&!l)return e.removeChild(o),r();if(l&&u!=="none"&&u!==""){var f=s.getPropertyValue("content"),h=~["Sharp"].indexOf(l[2])?ct:Ze,d=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?hu[h][l[2].toLowerCase()]:DG[h][c],p=LV(f),g=p.value,b=p.isSecondary,y=l[0].startsWith("FontAwesome"),w=vb(d,g),A=w;if(y){var x=rV(g);x.iconName&&x.prefix&&(w=x.iconName,d=x.prefix)}if(w&&!b&&(!o||o.getAttribute(cb)!==d||o.getAttribute(ub)!==A)){e.setAttribute(n,A),o&&e.removeChild(o);var E=kV(),_=E.extra;_.attributes[lb]=t,Cb(w,d).then(function(T){var D=Eb(te(te({},E),{},{icons:{main:T,mask:wb()},prefix:d,iconName:A,extra:_,watchable:!0})),P=Ye.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(P,e.firstChild):e.appendChild(P),P.outerHTML=D.map(function(G){return yu(G)}).join(`
2615
- `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function NV(e){return Promise.all([h_(e,"::before"),h_(e,"::after")])}function zV(e){return e.parentNode!==document.head&&!~kG.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(lb)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function d_(e){if(ti)return new Promise(function(t,n){var r=Fs(e.querySelectorAll("*")).filter(zV).map(NV),i=Tb.begin("searchPseudoElements");o_(),Promise.all(r).then(function(){i(),Rb(),t()}).catch(function(){i(),Rb(),n()})})}var UV={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=d_,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?Ye:r;ae.searchPseudoElements&&d_(i)}}},p_=!1,$V={mixout:function(){return{dom:{unwatch:function(){o_(),p_=!0}}}},hooks:function(){return{bootstrap:function(){s_(xb("mutationObserverCallbacks",{}))},noAuto:function(){EV()},watch:function(n){var r=n.observeMutationsRoot;p_?Rb():s_(xb("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},g_=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)},HV={mixout:function(){return{parse:{transform:function(n){return g_(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=g_(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)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="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(l," ").concat(c," ").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)}]}]}}}},Db={x:0,y:0,width:"100%",height:"100%"};function m_(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 GV(e){return e.tag==="g"?e.children:[e]}var VV={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),a=i?l0(i.split(" ").map(function(o){return o.trim()})):wb();return a.prefix||(a.prefix=Xi()),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,l=n.transform,c=a.width,u=a.icon,f=o.width,h=o.icon,d=HG({transform:l,containerWidth:f,iconWidth:c}),p={tag:"rect",attributes:te(te({},Db),{},{fill:"white"})},g=u.children?{children:u.children.map(m_)}:{},b={tag:"g",attributes:te({},d.inner),children:[m_(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||bu()),A="clip-".concat(s||bu()),x={tag:"mask",attributes:te(te({},Db),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[p,y]},E={tag:"defs",children:[{tag:"clipPath",attributes:{id:A},children:GV(h)},x]};return r.push(E,{tag:"rect",attributes:te({fill:"currentColor","clip-path":"url(#".concat(A,")"),mask:"url(#".concat(w,")")},Db)}),{children:r,attributes:i}}}},jV={provides:function(t){var n=!1;Zi.matchMedia&&(n=Zi.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}}}},qV={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}}}},WV=[jG,BV,FV,MV,PV,UV,$V,HV,VV,jV,qV];oV(WV,{mixoutsTo:pn}),pn.noAuto,pn.config,pn.library,pn.dom,pn.parse,pn.findIconDefinition,pn.toHtml;var $e=pn.icon;pn.layer,pn.text,pn.counter;/**
2618
+ }`;function NS(){var e=RS,t=DS,n=ae.cssPrefix,r=ae.replacementClass,i=GG;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 zS=!1;function pb(){ae.autoAddCss&&!zS&&(NG(NS()),zS=!0)}var VG={mixout:function(){return{dom:{css:NS,insertCss:pb}}},hooks:function(){return{beforeDOMElementCreation:function(){pb()},beforeI2svg:function(){pb()}}}},ri=Zi||{};ri[ni]||(ri[ni]={}),ri[ni].styles||(ri[ni].styles={}),ri[ni].hooks||(ri[ni].hooks={}),ri[ni].shims||(ri[ni].shims=[]);var er=ri[ni],US=[],jG=function e(){Ye.removeEventListener("DOMContentLoaded",e),r0=1,US.map(function(t){return t()})},r0=!1;ti&&(r0=(Ye.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Ye.readyState),r0||Ye.addEventListener("DOMContentLoaded",jG));function qG(e){ti&&(r0?setTimeout(e,0):US.push(e))}function yu(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"?LS(e):"<".concat(t," ").concat(UG(r),">").concat(a.map(yu).join(""),"</").concat(t,">")}function $S(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var WG=function(t,n){return function(r,i,a,o){return t.call(n,r,i,a,o)}},gb=function(t,n,r,i){var a=Object.keys(t),o=a.length,s=i!==void 0?WG(n,i):n,l,c,u;for(r===void 0?(l=1,u=t[a[0]]):(l=0,u=r);l<o;l++)c=a[l],u=s(u,t[c],c,t);return u};function YG(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 mb(e){var t=YG(e);return t.length===1?t[0].toString(16):null}function ZG(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 HS(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 bb(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,a=HS(t);typeof er.hooks.addPack=="function"&&!i?er.hooks.addPack(e,HS(t)):er.styles[e]=te(te({},er.styles[e]||{}),a),e==="fas"&&bb("fa",t)}var i0,a0,o0,Ms=er.styles,QG=er.shims,XG=(i0={},yt(i0,Ze,Object.values(du[Ze])),yt(i0,ct,Object.values(du[ct])),i0),yb=null,GS={},VS={},jS={},qS={},WS={},KG=(a0={},yt(a0,Ze,Object.keys(fu[Ze])),yt(a0,ct,Object.keys(fu[ct])),a0);function JG(e){return~FG.indexOf(e)}function eV(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!JG(i)?i:null}var YS=function(){var t=function(a){return gb(Ms,function(o,s,l){return o[l]=gb(s,a,{}),o},{})};GS=t(function(i,a,o){if(a[3]&&(i[a[3]]=o),a[2]){var s=a[2].filter(function(l){return typeof l=="number"});s.forEach(function(l){i[l.toString(16)]=o})}return i}),VS=t(function(i,a,o){if(i[o]=o,a[2]){var s=a[2].filter(function(l){return typeof l=="string"});s.forEach(function(l){i[l]=o})}return i}),WS=t(function(i,a,o){var s=a[2];return i[o]=o,s.forEach(function(l){i[l]=o}),i});var n="far"in Ms||ae.autoFetchSvg,r=gb(QG,function(i,a){var o=a[0],s=a[1],l=a[2];return s==="far"&&!n&&(s="fas"),typeof o=="string"&&(i.names[o]={prefix:s,iconName:l}),typeof o=="number"&&(i.unicodes[o.toString(16)]={prefix:s,iconName:l}),i},{names:{},unicodes:{}});jS=r.names,qS=r.unicodes,yb=s0(ae.styleDefault,{family:ae.familyDefault})};LG(function(e){yb=s0(e.styleDefault,{family:ae.familyDefault})}),YS();function vb(e,t){return(GS[e]||{})[t]}function tV(e,t){return(VS[e]||{})[t]}function po(e,t){return(WS[e]||{})[t]}function ZS(e){return jS[e]||{prefix:null,iconName:null}}function nV(e){var t=qS[e],n=vb("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Xi(){return yb}var wb=function(){return{prefix:null,iconName:null,rest:[]}};function s0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Ze:n,i=fu[r][e],a=hu[r][e]||hu[r][i],o=e in er.styles?e:null;return a||o||null}var QS=(o0={},yt(o0,Ze,Object.keys(du[Ze])),yt(o0,ct,Object.keys(du[ct])),o0);function l0(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,a=(t={},yt(t,Ze,"".concat(ae.cssPrefix,"-").concat(Ze)),yt(t,ct,"".concat(ae.cssPrefix,"-").concat(ct)),t),o=null,s=Ze;(e.includes(a[Ze])||e.some(function(c){return QS[Ze].includes(c)}))&&(s=Ze),(e.includes(a[ct])||e.some(function(c){return QS[ct].includes(c)}))&&(s=ct);var l=e.reduce(function(c,u){var f=eV(ae.cssPrefix,u);if(Ms[u]?(u=XG[s].includes(u)?kG[s][u]:u,o=u,c.prefix=u):KG[s].indexOf(u)>-1?(o=u,c.prefix=s0(u,{family:s})):f?c.iconName=f:u!==ae.replacementClass&&u!==a[Ze]&&u!==a[ct]&&c.rest.push(u),!i&&c.prefix&&c.iconName){var h=o==="fa"?ZS(c.iconName):{},d=po(c.prefix,c.iconName);h.prefix&&(o=null),c.iconName=h.iconName||d||c.iconName,c.prefix=h.prefix||c.prefix,c.prefix==="far"&&!Ms.far&&Ms.fas&&!ae.autoFetchSvg&&(c.prefix="fas")}return c},wb());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&s===ct&&(Ms.fass||ae.autoFetchSvg)&&(l.prefix="fass",l.iconName=po(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||o==="fa")&&(l.prefix=Xi()||"fas"),l}var rV=function(){function e(){gG(this,e),this.definitions={}}return mG(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]),bb(s,o[s]);var l=du[Ze][s];l&&bb(l,o[s]),YS()})}},{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,l=o.iconName,c=o.icon,u=c[2];n[s]||(n[s]={}),u.length>0&&u.forEach(function(f){typeof f=="string"&&(n[s][f]=c)}),n[s][l]=c}),n}}]),e}(),XS=[],Ps={},Os={},iV=Object.keys(Os);function aV(e,t){var n=t.mixoutsTo;return XS=e,Ps={},Object.keys(Os).forEach(function(r){iV.indexOf(r)===-1&&delete Os[r]}),XS.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(o){typeof i[o]=="function"&&(n[o]=i[o]),Zd(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){Ps[o]||(Ps[o]=[]),Ps[o].push(a[o])})}r.provides&&r.provides(Os)}),n}function xb(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=Ps[e]||[];return a.forEach(function(o){t=o.apply(null,[t].concat(r))}),t}function go(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=Ps[e]||[];i.forEach(function(a){a.apply(null,n)})}function ii(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Os[e]?Os[e].apply(null,t):void 0}function Ab(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,n=e.prefix||Xi();if(t)return t=po(n,t)||t,$S(KS.definitions,n,t)||$S(er.styles,n,t)}var KS=new rV,oV=function(){ae.autoReplaceSvg=!1,ae.observeMutations=!1,go("noAuto")},sV={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ti?(go("beforeI2svg",t),ii("pseudoElements2svg",t),ii("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;ae.autoReplaceSvg===!1&&(ae.autoReplaceSvg=!0),ae.observeMutations=!0,qG(function(){cV({autoReplaceSvgRoot:n}),go("watch",t)})}},lV={icon:function(t){if(t===null)return null;if(Zd(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:po(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=s0(t[0]);return{prefix:r,iconName:po(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(ae.cssPrefix,"-"))>-1||t.match(TG))){var i=l0(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Xi(),iconName:po(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var a=Xi();return{prefix:a,iconName:po(a,t)||t}}}},pn={noAuto:oV,config:ae,dom:sV,parse:lV,library:KS,findIconDefinition:Ab,toHtml:yu},cV=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?Ye:n;(Object.keys(er.styles).length>0||ae.autoFetchSvg)&&ti&&ae.autoReplaceSvg&&pn.dom.i2svg({node:r})};function c0(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return yu(r)})}}),Object.defineProperty(e,"node",{get:function(){if(ti){var r=Ye.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function uV(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,a=e.styles,o=e.transform;if(db(o)&&n.found&&!r.found){var s=n.width,l=n.height,c={x:s/l/2,y:.5};i.style=n0(te(te({},a),{},{"transform-origin":"".concat(c.x+o.x/16,"em ").concat(c.y+o.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function fV(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,a=e.symbol,o=a===!0?"".concat(t,"-").concat(ae.cssPrefix,"-").concat(n):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:te(te({},i),{},{id:o}),children:r}]}]}function Eb(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,a=e.iconName,o=e.transform,s=e.symbol,l=e.title,c=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=[ae.replacementClass,a?"".concat(ae.cssPrefix,"-").concat(a):""].filter(function(P){return f.classes.indexOf(P)===-1}).filter(function(P){return P!==""||!!P}).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[fo]=""),l&&(A.children.push({tag:"title",attributes:{id:A.attributes["aria-labelledby"]||"title-".concat(u||bu())},children:[l]}),delete A.attributes.title);var E=te(te({},A),{},{prefix:i,iconName:a,main:n,mask:r,maskId:c,transform:o,symbol:s,styles:te(te({},x),f.styles)}),_=r.found&&n.found?ii("generateAbstractMask",E)||{children:[],attributes:{}}:ii("generateAbstractIcon",E)||{children:[],attributes:{}},T=_.children,D=_.attributes;return E.children=T,E.attributes=D,s?fV(E):uV(E)}function JS(e){var t=e.content,n=e.width,r=e.height,i=e.transform,a=e.title,o=e.extra,s=e.watchable,l=s===void 0?!1:s,c=te(te(te({},o.attributes),a?{title:a}:{}),{},{class:o.classes.join(" ")});l&&(c[fo]="");var u=te({},o.styles);db(i)&&(u.transform=HG({transform:i,startCentered:!0,width:n,height:r}),u["-webkit-transform"]=u.transform);var f=n0(u);f.length>0&&(c.style=f);var h=[];return h.push({tag:"span",attributes:c,children:[t]}),a&&h.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),h}function hV(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=n0(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 Sb=er.styles;function _b(e){var t=e[0],n=e[1],r=e.slice(4),i=ib(r,1),a=i[0],o=null;return Array.isArray(a)?o={tag:"g",attributes:{class:"".concat(ae.cssPrefix,"-").concat(ho.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ae.cssPrefix,"-").concat(ho.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(ae.cssPrefix,"-").concat(ho.PRIMARY),fill:"currentColor",d:a[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:a}},{found:!0,width:t,height:n,icon:o}}var dV={found:!1,width:512,height:512};function pV(e,t){!FS&&!ae.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Cb(e,t){var n=t;return t==="fa"&&ae.styleDefault!==null&&(t=Xi()),new Promise(function(r,i){if(ii("missingIconAbstract"),n==="fa"){var a=ZS(e)||{};e=a.iconName||e,t=a.prefix||t}if(e&&t&&Sb[t]&&Sb[t][e]){var o=Sb[t][e];return r(_b(o))}pV(e,t),r(te(te({},dV),{},{icon:ae.showMissingIcons&&e?ii("missingIconAbstract")||{}:{}}))})}var e_=function(){},kb=ae.measurePerformance&&Qd&&Qd.mark&&Qd.measure?Qd:{mark:e_,measure:e_},vu='FA "6.4.2"',gV=function(t){return kb.mark("".concat(vu," ").concat(t," begins")),function(){return t_(t)}},t_=function(t){kb.mark("".concat(vu," ").concat(t," ends")),kb.measure("".concat(vu," ").concat(t),"".concat(vu," ").concat(t," begins"),"".concat(vu," ").concat(t," ends"))},Tb={begin:gV,end:t_},u0=function(){};function n_(e){var t=e.getAttribute?e.getAttribute(fo):null;return typeof t=="string"}function mV(e){var t=e.getAttribute?e.getAttribute(cb):null,n=e.getAttribute?e.getAttribute(ub):null;return t&&n}function bV(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(ae.replacementClass)}function yV(){if(ae.autoReplaceSvg===!0)return f0.replace;var e=f0[ae.autoReplaceSvg];return e||f0.replace}function vV(e){return Ye.createElementNS("http://www.w3.org/2000/svg",e)}function wV(e){return Ye.createElement(e)}function r_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?vV:wV:n;if(typeof e=="string")return Ye.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(r_(o,{ceFn:r}))}),i}function xV(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var f0={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(r_(i),n)}),n.getAttribute(fo)===null&&ae.keepOriginalSource){var r=Ye.createComment(xV(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~hb(n).indexOf(ae.replacementClass))return f0.replace(t);var i=new RegExp("".concat(ae.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var a=r[0].attributes.class.split(" ").reduce(function(s,l){return l===ae.replacementClass||l.match(i)?s.toSvg.push(l):s.toNode.push(l),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 yu(s)}).join(`
2619
+ `);n.setAttribute(fo,""),n.innerHTML=o}};function i_(e){e()}function a_(e,t){var n=typeof t=="function"?t:u0;if(e.length===0)n();else{var r=i_;ae.mutateApproach===_G&&(r=Zi.requestAnimationFrame||i_),r(function(){var i=yV(),a=Tb.begin("mutate");e.map(i),a(),n()})}}var Ib=!1;function o_(){Ib=!0}function Rb(){Ib=!1}var h0=null;function s_(e){if(TS&&ae.observeMutations){var t=e.treeCallback,n=t===void 0?u0:t,r=e.nodeCallback,i=r===void 0?u0:r,a=e.pseudoElementsCallback,o=a===void 0?u0:a,s=e.observeMutationsRoot,l=s===void 0?Ye:s;h0=new TS(function(c){if(!Ib){var u=Xi();Fs(c).forEach(function(f){if(f.type==="childList"&&f.addedNodes.length>0&&!n_(f.addedNodes[0])&&(ae.searchPseudoElements&&o(f.target),n(f.target)),f.type==="attributes"&&f.target.parentNode&&ae.searchPseudoElements&&o(f.target.parentNode),f.type==="attributes"&&n_(f.target)&&~BG.indexOf(f.attributeName))if(f.attributeName==="class"&&mV(f.target)){var h=l0(hb(f.target)),d=h.prefix,p=h.iconName;f.target.setAttribute(cb,d||u),p&&f.target.setAttribute(ub,p)}else bV(f.target)&&i(f.target)})}}),ti&&h0.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function AV(){h0&&h0.disconnect()}function EV(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 SV(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=l0(hb(e));return i.prefix||(i.prefix=Xi()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=tV(i.prefix,e.innerText)||vb(i.prefix,mb(e.innerText))),!i.iconName&&ae.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function _V(e){var t=Fs(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 ae.autoA11y&&(n?t["aria-labelledby"]="".concat(ae.replacementClass,"-title-").concat(r||bu()):(t["aria-hidden"]="true",t.focusable="false")),t}function CV(){return{iconName:null,title:null,titleId:null,prefix:null,transform:_r,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function l_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=SV(e),r=n.iconName,i=n.prefix,a=n.rest,o=_V(e),s=xb("parseNodeAttributes",{},e),l=t.styleParser?EV(e):[];return te({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:_r,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:a,styles:l,attributes:o}},s)}var kV=er.styles;function c_(e){var t=ae.autoReplaceSvg==="nest"?l_(e,{styleParser:!1}):l_(e);return~t.extra.classes.indexOf(MS)?ii("generateLayersText",e,t):ii("generateSvgReplacementMutation",e,t)}var Ki=new Set;fb.map(function(e){Ki.add("fa-".concat(e))}),Object.keys(fu[Ze]).map(Ki.add.bind(Ki)),Object.keys(fu[ct]).map(Ki.add.bind(Ki)),Ki=cu(Ki);function u_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!ti)return Promise.resolve();var n=Ye.documentElement.classList,r=function(f){return n.add("".concat(BS,"-").concat(f))},i=function(f){return n.remove("".concat(BS,"-").concat(f))},a=ae.autoFetchSvg?Ki:fb.map(function(u){return"fa-".concat(u)}).concat(Object.keys(kV));a.includes("fa")||a.push("fa");var o=[".".concat(MS,":not([").concat(fo,"])")].concat(a.map(function(u){return".".concat(u,":not([").concat(fo,"])")})).join(", ");if(o.length===0)return Promise.resolve();var s=[];try{s=Fs(e.querySelectorAll(o))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();var l=Tb.begin("onTree"),c=s.reduce(function(u,f){try{var h=c_(f);h&&u.push(h)}catch(d){FS||d.name==="MissingIcon"&&console.error(d)}return u},[]);return new Promise(function(u,f){Promise.all(c).then(function(h){a_(h,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),u()})}).catch(function(h){l(),f(h)})})}function TV(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;c_(e).then(function(n){n&&a_([n],t)})}function IV(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:Ab(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:Ab(i||{})),e(r,te(te({},n),{},{mask:i}))}}var RV=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?_r:r,a=n.symbol,o=a===void 0?!1:a,s=n.mask,l=s===void 0?null:s,c=n.maskId,u=c===void 0?null:c,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 E=t.prefix,_=t.iconName,T=t.icon;return c0(te({type:"icon"},t),function(){return go("beforeDOMElementCreation",{iconDefinition:t,params:n}),ae.autoA11y&&(h?w["aria-labelledby"]="".concat(ae.replacementClass,"-title-").concat(p||bu()):(w["aria-hidden"]="true",w.focusable="false")),Eb({icons:{main:_b(T),mask:l?_b(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:E,iconName:_,transform:te(te({},_r),i),symbol:o,title:h,maskId:u,titleId:p,extra:{attributes:w,styles:x,classes:b}})})}},DV={mixout:function(){return{icon:IV(RV)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=u_,n.nodeCallback=TV,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?Ye:r,a=n.callback,o=a===void 0?function(){}:a;return u_(i,o)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,a=r.title,o=r.titleId,s=r.prefix,l=r.transform,c=r.symbol,u=r.mask,f=r.maskId,h=r.extra;return new Promise(function(d,p){Promise.all([Cb(i,s),u.iconName?Cb(u.iconName,u.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(g){var b=ib(g,2),y=b[0],w=b[1];d([n,Eb({icons:{main:y,mask:w},prefix:s,iconName:i,transform:l,symbol:c,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,l=n0(s);l.length>0&&(i.style=l);var c;return db(o)&&(c=ii("generateAbstractTransformGrouping",{main:a,transform:o,containerWidth:a.width,iconWidth:a.width})),r.push(c||a.icon),{children:r,attributes:i}}}},BV={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 c0({type:"layer"},function(){go("beforeDOMElementCreation",{assembler:n,params:r});var o=[];return n(function(s){Array.isArray(s)?s.map(function(l){o=o.concat(l.abstract)}):o=o.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(ae.cssPrefix,"-layers")].concat(cu(a)).join(" ")},children:o}]})}}}},FV={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,l=r.attributes,c=l===void 0?{}:l,u=r.styles,f=u===void 0?{}:u;return c0({type:"counter",content:n},function(){return go("beforeDOMElementCreation",{content:n,params:r}),hV({content:n.toString(),title:a,extra:{attributes:c,styles:f,classes:["".concat(ae.cssPrefix,"-layers-counter")].concat(cu(s))}})})}}}},MV={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,a=i===void 0?_r:i,o=r.title,s=o===void 0?null:o,l=r.classes,c=l===void 0?[]:l,u=r.attributes,f=u===void 0?{}:u,h=r.styles,d=h===void 0?{}:h;return c0({type:"text",content:n},function(){return go("beforeDOMElementCreation",{content:n,params:r}),JS({content:n,transform:te(te({},_r),a),title:s,extra:{attributes:f,styles:d,classes:["".concat(ae.cssPrefix,"-layers-text")].concat(cu(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,a=r.transform,o=r.extra,s=null,l=null;if(IS){var c=parseInt(getComputedStyle(n).fontSize,10),u=n.getBoundingClientRect();s=u.width/c,l=u.height/c}return ae.autoA11y&&!i&&(o.attributes["aria-hidden"]="true"),Promise.resolve([n,JS({content:n.innerHTML,width:s,height:l,transform:a,title:i,extra:o,watchable:!0})])}}},PV=new RegExp('"',"ug"),f_=[1105920,1112319];function OV(e){var t=e.replace(PV,""),n=ZG(t,0),r=n>=f_[0]&&n<=f_[1],i=t.length===2?t[0]===t[1]:!1;return{value:mb(i?t[0]:t),isSecondary:r||i}}function h_(e,t){var n="".concat(SG).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var a=Fs(e.children),o=a.filter(function(T){return T.getAttribute(lb)===t})[0],s=Zi.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(IG),c=s.getPropertyValue("font-weight"),u=s.getPropertyValue("content");if(o&&!l)return e.removeChild(o),r();if(l&&u!=="none"&&u!==""){var f=s.getPropertyValue("content"),h=~["Sharp"].indexOf(l[2])?ct:Ze,d=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?hu[h][l[2].toLowerCase()]:RG[h][c],p=OV(f),g=p.value,b=p.isSecondary,y=l[0].startsWith("FontAwesome"),w=vb(d,g),A=w;if(y){var x=nV(g);x.iconName&&x.prefix&&(w=x.iconName,d=x.prefix)}if(w&&!b&&(!o||o.getAttribute(cb)!==d||o.getAttribute(ub)!==A)){e.setAttribute(n,A),o&&e.removeChild(o);var E=CV(),_=E.extra;_.attributes[lb]=t,Cb(w,d).then(function(T){var D=Eb(te(te({},E),{},{icons:{main:T,mask:wb()},prefix:d,iconName:A,extra:_,watchable:!0})),P=Ye.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(P,e.firstChild):e.appendChild(P),P.outerHTML=D.map(function(G){return yu(G)}).join(`
2620
+ `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function LV(e){return Promise.all([h_(e,"::before"),h_(e,"::after")])}function NV(e){return e.parentNode!==document.head&&!~CG.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(lb)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function d_(e){if(ti)return new Promise(function(t,n){var r=Fs(e.querySelectorAll("*")).filter(NV).map(LV),i=Tb.begin("searchPseudoElements");o_(),Promise.all(r).then(function(){i(),Rb(),t()}).catch(function(){i(),Rb(),n()})})}var zV={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=d_,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?Ye:r;ae.searchPseudoElements&&d_(i)}}},p_=!1,UV={mixout:function(){return{dom:{unwatch:function(){o_(),p_=!0}}}},hooks:function(){return{bootstrap:function(){s_(xb("mutationObserverCallbacks",{}))},noAuto:function(){AV()},watch:function(n){var r=n.observeMutationsRoot;p_?Rb():s_(xb("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},g_=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)},$V={mixout:function(){return{parse:{transform:function(n){return g_(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=g_(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)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="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(l," ").concat(c," ").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)}]}]}}}},Db={x:0,y:0,width:"100%",height:"100%"};function m_(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 HV(e){return e.tag==="g"?e.children:[e]}var GV={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),a=i?l0(i.split(" ").map(function(o){return o.trim()})):wb();return a.prefix||(a.prefix=Xi()),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,l=n.transform,c=a.width,u=a.icon,f=o.width,h=o.icon,d=$G({transform:l,containerWidth:f,iconWidth:c}),p={tag:"rect",attributes:te(te({},Db),{},{fill:"white"})},g=u.children?{children:u.children.map(m_)}:{},b={tag:"g",attributes:te({},d.inner),children:[m_(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||bu()),A="clip-".concat(s||bu()),x={tag:"mask",attributes:te(te({},Db),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[p,y]},E={tag:"defs",children:[{tag:"clipPath",attributes:{id:A},children:HV(h)},x]};return r.push(E,{tag:"rect",attributes:te({fill:"currentColor","clip-path":"url(#".concat(A,")"),mask:"url(#".concat(w,")")},Db)}),{children:r,attributes:i}}}},VV={provides:function(t){var n=!1;Zi.matchMedia&&(n=Zi.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}}}},jV={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}}}},qV=[VG,DV,BV,FV,MV,zV,UV,$V,GV,VV,jV];aV(qV,{mixoutsTo:pn}),pn.noAuto,pn.config,pn.library,pn.dom,pn.parse,pn.findIconDefinition,pn.toHtml;var $e=pn.icon;pn.layer,pn.text,pn.counter;/**
2616
2621
  * @license
2617
2622
  * Copyright 2020 Google LLC
2618
2623
  * SPDX-License-Identifier: BSD-3-Clause
2619
- */const{I:YV}=G7,ZV=e=>e===null||typeof e!="object"&&typeof e!="function",b_=e=>e.strings===void 0,y_=()=>document.createComment(""),wu=(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(y_(),i),s=r.insertBefore(y_(),i);n=new YV(o,s,e,e.options)}else{const o=n._$AB.nextSibling,s=n._$AM,l=s!==e;if(l){let c;(a=n._$AQ)==null||a.call(n,e),n._$AM=e,n._$AP!==void 0&&(c=e._$AU)!==s._$AU&&n._$AP(c)}if(o!==i||l){let c=n._$AA;for(;c!==o;){const u=c.nextSibling;r.insertBefore(c,i),c=u}}}return n},mo=(e,t,n=e)=>(e._$AI(t,n),e),QV={},v_=(e,t=QV)=>e._$AH=t,XV=e=>e._$AH,Bb=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}};/**
2624
+ */const{I:WV}=G7,YV=e=>e===null||typeof e!="object"&&typeof e!="function",b_=e=>e.strings===void 0,y_=()=>document.createComment(""),wu=(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(y_(),i),s=r.insertBefore(y_(),i);n=new WV(o,s,e,e.options)}else{const o=n._$AB.nextSibling,s=n._$AM,l=s!==e;if(l){let c;(a=n._$AQ)==null||a.call(n,e),n._$AM=e,n._$AP!==void 0&&(c=e._$AU)!==s._$AU&&n._$AP(c)}if(o!==i||l){let c=n._$AA;for(;c!==o;){const u=c.nextSibling;r.insertBefore(c,i),c=u}}}return n},mo=(e,t,n=e)=>(e._$AI(t,n),e),ZV={},v_=(e,t=ZV)=>e._$AH=t,QV=e=>e._$AH,Bb=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}};/**
2620
2625
  * @license
2621
2626
  * Copyright 2017 Google LLC
2622
2627
  * SPDX-License-Identifier: BSD-3-Clause
2623
- */const w_=(e,t,n)=>{const r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},KV=$a(class extends us{constructor(e){if(super(e),e.type!==mr.CHILD)throw Error("repeat() can only be used in text expressions")}dt(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.dt(e,t,n).values}update(e,[t,n,r]){const i=XV(e),{values:a,keys:o}=this.dt(t,n,r);if(!Array.isArray(i))return this.ut=o,a;const s=this.ut??(this.ut=[]),l=[];let c,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])l[d]=mo(i[f],a[d]),f++,d++;else if(s[h]===o[p])l[p]=mo(i[h],a[p]),h--,p--;else if(s[f]===o[p])l[p]=mo(i[f],a[p]),wu(e,l[p+1],i[f]),f++,p--;else if(s[h]===o[d])l[d]=mo(i[h],a[d]),wu(e,i[f],i[h]),h--,d++;else if(c===void 0&&(c=w_(o,d,p),u=w_(s,f,h)),c.has(s[f]))if(c.has(s[h])){const g=u.get(o[d]),b=g!==void 0?i[g]:null;if(b===null){const y=wu(e,i[f]);mo(y,a[d]),l[d]=y}else l[d]=mo(b,a[d]),wu(e,i[f],b),i[g]=null;d++}else Bb(i[h]),h--;else Bb(i[f]),f++;for(;d<=p;){const g=wu(e,l[p+1]);mo(g,a[d]),l[d++]=g}for(;f<=h;){const g=i[f++];g!==null&&Bb(g)}return this.ut=o,v_(e,l),Dt}}),x_="close-dialog";function JV(){return new CustomEvent(x_,{bubbles:!0})}function bo(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),Bt(U`<div class="backdrop"></div>
2628
+ */const w_=(e,t,n)=>{const r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},XV=$a(class extends us{constructor(e){if(super(e),e.type!==mr.CHILD)throw Error("repeat() can only be used in text expressions")}dt(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.dt(e,t,n).values}update(e,[t,n,r]){const i=QV(e),{values:a,keys:o}=this.dt(t,n,r);if(!Array.isArray(i))return this.ut=o,a;const s=this.ut??(this.ut=[]),l=[];let c,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])l[d]=mo(i[f],a[d]),f++,d++;else if(s[h]===o[p])l[p]=mo(i[h],a[p]),h--,p--;else if(s[f]===o[p])l[p]=mo(i[f],a[p]),wu(e,l[p+1],i[f]),f++,p--;else if(s[h]===o[d])l[d]=mo(i[h],a[d]),wu(e,i[f],i[h]),h--,d++;else if(c===void 0&&(c=w_(o,d,p),u=w_(s,f,h)),c.has(s[f]))if(c.has(s[h])){const g=u.get(o[d]),b=g!==void 0?i[g]:null;if(b===null){const y=wu(e,i[f]);mo(y,a[d]),l[d]=y}else l[d]=mo(b,a[d]),wu(e,i[f],b),i[g]=null;d++}else Bb(i[h]),h--;else Bb(i[f]),f++;for(;d<=p;){const g=wu(e,l[p+1]);mo(g,a[d]),l[d++]=g}for(;f<=h;){const g=i[f++];g!==null&&Bb(g)}return this.ut=o,v_(e,l),Dt}}),x_="close-dialog";function KV(){return new CustomEvent(x_,{bubbles:!0})}function bo(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),Bt(U`<div class="backdrop"></div>
2624
2629
  <div class="content"></div>`,n);const i=()=>{n.querySelector(".backdrop").addEventListener("transitionend",()=>n.remove()),n.classList.remove("visible"),document.body.classList.remove(Ha)};return n.addEventListener("keydown",a=>{a.stopPropagation()}),n.addEventListener(x_,i),t.appendChild(n),window.requestAnimationFrame(()=>n.classList.add("visible")),e!="tour"&&document.body.classList.add(Ha),{content:n.querySelector(".content"),close:i}}function gn(e,t={}){const n=bo(),r=t.title;return t.okLabel??(t.okLabel="OK"),new Promise((i,a)=>{const o=()=>{n.close(),i(!0)},s=U`
2625
2630
  ${r?U`<div class="modal-title">${r}</div>`:he}
2626
2631
  <div class="modal-body" style="max-width: 700px">
@@ -2665,7 +2670,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2665
2670
  <div class="histogram-extent">
2666
2671
  ${n.domain().map(a=>U`<div>${a}</div>`)}
2667
2672
  </div>
2668
- </div>`}}Hl=new WeakMap,vi=new WeakMap,Sa=new WeakMap,Jf=new WeakMap,Vp=new WeakSet,uR=function(n){if(performance.now()<B(this,Jf)+200)return;const r=n.target,i=Px(r,n);Y(this,eh,lw).call(this,"add",0,i[0]/r.offsetWidth)},jp=new WeakSet,fR=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",tj(n,(l,c)=>{Y(this,eh,lw).call(this,"adjust",r,(o+l)/s)},()=>{ie(this,Jf,performance.now()),this.style.cursor=""})},eh=new WeakSet,lw=function(n,r,i){i=Wr(i,0,1),this.dispatchEvent(new ej(n,r,+B(this,Sa).invert(i*100).toPrecision(3)))},qp=new WeakSet,hR=function(){const n=B(this,vi),r=B(this,Sa),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],l=[!1,...this.operators.map(u=>["lte","gt"].includes(u)),!0],c=["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=rj(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=c(g);p=nj(f,s[b],s[b+1],!l[b],l[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},jt(A_,"properties",{values:{attribute:!1},thresholds:{attribute:!1},operators:{attribute:!1},colors:{attribute:!1},showThresholdNumbers:{}}),customElements.define("genome-spy-histogram",A_);class ej extends Event{constructor(t,n,r){super(t),this.index=n,this.value=r}}function tj(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 nj(e,t,n,r=!0,i=!1){const a=r?l=>l>=t:l=>l>t,o=i?l=>l<=n:l=>l<n;let s=0;for(let l=0;l<e.length;l++){const c=e[l];a(c)&&o(c)&&s++}return s}function rj(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 E_=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b"];function ij(e,t){var r;const n=(r=e.scale)==null?void 0:r.type;Qn(n)?oj(e,t):_t(n)||Ni(n)?sj(e,t):e.type==="identifier"?aj(e,t):gn("Not implemented (yet).")}function aj(e,t){S_(t.getSamples().map(n=>n.id),e,t)}function oj(e,t){const n=e.scale,r=i=>U`<span
2673
+ </div>`}}Hl=new WeakMap,vi=new WeakMap,Sa=new WeakMap,Jf=new WeakMap,Vp=new WeakSet,uR=function(n){if(performance.now()<B(this,Jf)+200)return;const r=n.target,i=Px(r,n);Y(this,eh,lw).call(this,"add",0,i[0]/r.offsetWidth)},jp=new WeakSet,fR=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",ej(n,(l,c)=>{Y(this,eh,lw).call(this,"adjust",r,(o+l)/s)},()=>{ie(this,Jf,performance.now()),this.style.cursor=""})},eh=new WeakSet,lw=function(n,r,i){i=Wr(i,0,1),this.dispatchEvent(new JV(n,r,+B(this,Sa).invert(i*100).toPrecision(3)))},qp=new WeakSet,hR=function(){const n=B(this,vi),r=B(this,Sa),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],l=[!1,...this.operators.map(u=>["lte","gt"].includes(u)),!0],c=["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=nj(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=c(g);p=tj(f,s[b],s[b+1],!l[b],l[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},jt(A_,"properties",{values:{attribute:!1},thresholds:{attribute:!1},operators:{attribute:!1},colors:{attribute:!1},showThresholdNumbers:{}}),customElements.define("genome-spy-histogram",A_);class JV extends Event{constructor(t,n,r){super(t),this.index=n,this.value=r}}function ej(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 tj(e,t,n,r=!0,i=!1){const a=r?l=>l>=t:l=>l>t,o=i?l=>l<=n:l=>l<n;let s=0;for(let l=0;l<e.length;l++){const c=e[l];a(c)&&o(c)&&s++}return s}function nj(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 E_=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b"];function rj(e,t){var r;const n=(r=e.scale)==null?void 0:r.type;Qn(n)?aj(e,t):_t(n)||Ni(n)?oj(e,t):e.type==="identifier"?ij(e,t):gn("Not implemented (yet).")}function ij(e,t){S_(t.getSamples().map(n=>n.id),e,t)}function aj(e,t){const n=e.scale,r=i=>U`<span
2669
2674
  class="color"
2670
2675
  style=${Uh({backgroundColor:n(i).toString()})}
2671
2676
  ></span>`;S_(n.domain(),e,t,r)}function S_(e,t,n,r=i=>he){const i=n.provenance.storeHelper.getDispatcher(),a=new Set(__(t,n.leafSamples,n.sampleHierarchy)),o=e.filter(x=>a.has(x)).map((x,E)=>({index:E,value:x,stringValue:`${x}`,lowerCaseValue:`${x}`.toLowerCase()})),s=bo(),l=U`
@@ -2703,7 +2708,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2703
2708
  @input=${p}
2704
2709
  @keydown=${y}
2705
2710
  >
2706
- ${KV(x,T=>T.value,T=>U`<li>
2711
+ ${XV(x,T=>T.value,T=>U`<li>
2707
2712
  <label class="checkbox">
2708
2713
  ${r(T.value)}
2709
2714
  <input
@@ -2719,7 +2724,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2719
2724
  <div>Nothing found</div>
2720
2725
  </div>`:x.length==1&&o.length>1?U`<div class="search-note">
2721
2726
  <div>
2722
- ${$e(fG).node[0]} Hit enter to select the
2727
+ ${$e(uG).node[0]} Hit enter to select the
2723
2728
  exact match
2724
2729
  </div>
2725
2730
  </div>`:he}
@@ -2730,7 +2735,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2730
2735
  </small>
2731
2736
  </div>`;Bt(U`${l}
2732
2737
  <div class="modal-body">${E}</div>
2733
- ${w()}`,s.content);const _=s.content.querySelector(".gs-checkbox-list");_.style.minHeight=`${_.offsetHeight}px`}A(),b()}function sj(e,t){var b;const n=t.provenance.storeHelper.getDispatcher();let r="lt",i;const a=bo(),o=U`
2738
+ ${w()}`,s.content);const _=s.content.querySelector(".gs-checkbox-list");_.style.minHeight=`${_.offsetHeight}px`}A(),b()}function oj(e,t){var b;const n=t.provenance.storeHelper.getDispatcher();let r="lt",i;const a=bo(),o=U`
2734
2739
  <div class="modal-title">Filter by <em>${e.name}</em></div>
2735
2740
  `,s=y=>{n(t.actions.filterByQuantitative({attribute:e.attribute,operator:r,operand:i})),a.close()},l=()=>U` <div class="modal-buttons">
2736
2741
  <button class="btn btn-cancel" @click=${()=>a.close()}>
@@ -2750,7 +2755,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2750
2755
  >Retain samples where <em>${e.name}</em> is</label
2751
2756
  >
2752
2757
  <div class="btn-group" role="group">
2753
- ${Object.entries(lj).map(([y,w])=>U`<button
2758
+ ${Object.entries(sj).map(([y,w])=>U`<button
2754
2759
  class=${nb({btn:!0,chosen:y==r})}
2755
2760
  .value=${y}
2756
2761
  @click=${c}
@@ -2777,11 +2782,11 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2777
2782
  </div>
2778
2783
  `;function g(){Bt(U`${o}
2779
2784
  <div class="modal-body">${p()}</div>
2780
- ${l()}`,a.content)}g(),(b=a.content.querySelector("input[type='text']"))==null||b.focus()}const lj={lt:["<","less than"],lte:["≤","less than or equal to"],eq:["=","equal to"],gte:["≥","greater than or equal to"],gt:[">","greater than"]};function __(e,t,n){const r=e.accessor;return t.map(i=>r(i,n))}function Mt(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 cj=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")(),C_=cj,Fb=()=>Math.random().toString(36).substring(7).split("").join("."),uj={INIT:`@@redux/INIT${Fb()}`,REPLACE:`@@redux/REPLACE${Fb()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fb()}`},d0=uj;function Mb(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 k_(e,t,n){if(typeof e!="function")throw new Error(Mt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Mt(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Mt(1));return n(k_)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,l=!1;function c(){o===a&&(o=new Map,a.forEach((b,y)=>{o.set(y,b)}))}function u(){if(l)throw new Error(Mt(3));return i}function f(b){if(typeof b!="function")throw new Error(Mt(4));if(l)throw new Error(Mt(5));let y=!0;c();const w=s++;return o.set(w,b),function(){if(y){if(l)throw new Error(Mt(6));y=!1,c(),o.delete(w),a=null}}}function h(b){if(!Mb(b))throw new Error(Mt(7));if(typeof b.type>"u")throw new Error(Mt(8));if(typeof b.type!="string")throw new Error(Mt(17));if(l)throw new Error(Mt(9));try{l=!0,i=r(i,b)}finally{l=!1}return(a=o).forEach(w=>{w()}),b}function d(b){if(typeof b!="function")throw new Error(Mt(10));r=b,h({type:d0.REPLACE})}function p(){const b=f;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Mt(11));function w(){const x=y;x.next&&x.next(u())}return w(),{unsubscribe:b(w)}},[C_](){return this}}}return h({type:d0.INIT}),{dispatch:h,subscribe:f,getState:u,replaceReducer:d,[C_]:p}}function fj(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:d0.INIT})>"u")throw new Error(Mt(12));if(typeof n(void 0,{type:d0.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Mt(13))})}function Pb(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{fj(n)}catch(a){i=a}return function(o={},s){if(i)throw i;let l=!1;const c={};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(Mt(14));c[f]=p,l=l||p!==d}return l=l||r.length!==Object.keys(o).length,l?c:o}}function p0(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function hj(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(Mt(15))};const o={getState:i.getState,dispatch:(l,...c)=>a(l,...c)},s=e.map(l=>l(o));return a=p0(...s)(i.dispatch),{...i,dispatch:a}}}function dj(e){return Mb(e)&&"type"in e&&typeof e.type=="string"}var T_=Symbol.for("immer-nothing"),I_=Symbol.for("immer-draftable"),mn=Symbol.for("immer-state");function tr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ls=Object.getPrototypeOf;function Ji(e){return!!e&&!!e[mn]}function ai(e){var t;return e?R_(e)||Array.isArray(e)||!!e[I_]||!!((t=e.constructor)!=null&&t[I_])||m0(e)||b0(e):!1}var pj=Object.prototype.constructor.toString();function R_(e){if(!e||typeof e!="object")return!1;const t=Ls(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)===pj}function xu(e,t){g0(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function g0(e){const t=e[mn];return t?t.type_:Array.isArray(e)?1:m0(e)?2:b0(e)?3:0}function Ob(e,t){return g0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function D_(e,t,n){const r=g0(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function gj(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function m0(e){return e instanceof Map}function b0(e){return e instanceof Set}function yo(e){return e.copy_||e.base_}function Lb(e,t){if(m0(e))return new Map(e);if(b0(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&R_(e))return Ls(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[mn];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(Ls(e),n)}function Nb(e,t=!1){return y0(e)||Ji(e)||!ai(e)||(g0(e)>1&&(e.set=e.add=e.clear=e.delete=mj),Object.freeze(e),t&&xu(e,(n,r)=>Nb(r,!0))),e}function mj(){tr(2)}function y0(e){return Object.isFrozen(e)}var bj={};function vo(e){const t=bj[e];return t||tr(0,e),t}var Au;function B_(){return Au}function yj(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function F_(e,t){t&&(vo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zb(e){Ub(e),e.drafts_.forEach(vj),e.drafts_=null}function Ub(e){e===Au&&(Au=e.parent_)}function M_(e){return Au=yj(Au,e)}function vj(e){const t=e[mn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function P_(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[mn].modified_&&(zb(t),tr(4)),ai(e)&&(e=v0(t,e),t.parent_||w0(t,e)),t.patches_&&vo("Patches").generateReplacementPatches_(n[mn].base_,e,t.patches_,t.inversePatches_)):e=v0(t,n,[]),zb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==T_?e:void 0}function v0(e,t,n){if(y0(t))return t;const r=t[mn];if(!r)return xu(t,(i,a)=>O_(e,r,t,i,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return w0(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),xu(a,(s,l)=>O_(e,r,i,s,l,n,o)),w0(e,i,!1),n&&e.patches_&&vo("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function O_(e,t,n,r,i,a,o){if(Ji(i)){const s=a&&t&&t.type_!==3&&!Ob(t.assigned_,r)?a.concat(r):void 0,l=v0(e,i,s);if(D_(n,r,l),Ji(l))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(ai(i)&&!y0(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;v0(e,i),(!t||!t.scope_.parent_)&&w0(e,i)}}function w0(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Nb(t,n)}function wj(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:B_(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=$b;n&&(i=[r],a=Eu);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var $b={get(e,t){if(t===mn)return e;const n=yo(e);if(!Ob(n,t))return xj(e,n,t);const r=n[t];return e.finalized_||!ai(r)?r:r===Hb(e.base_,t)?(Vb(e),e.copy_[t]=jb(r,e)):r},has(e,t){return t in yo(e)},ownKeys(e){return Reflect.ownKeys(yo(e))},set(e,t,n){const r=L_(yo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Hb(yo(e),t),a=i==null?void 0:i[mn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(gj(n,i)&&(n!==void 0||Ob(e.base_,t)))return!0;Vb(e),Gb(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 Hb(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Vb(e),Gb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=yo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){tr(11)},getPrototypeOf(e){return Ls(e.base_)},setPrototypeOf(){tr(12)}},Eu={};xu($b,(e,t)=>{Eu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Eu.deleteProperty=function(e,t){return Eu.set.call(this,e,t,void 0)},Eu.set=function(e,t,n){return $b.set.call(this,e[0],t,n,e[0])};function Hb(e,t){const n=e[mn];return(n?yo(n):e)[t]}function xj(e,t,n){var i;const r=L_(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function L_(e,t){if(!(t in e))return;let n=Ls(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ls(n)}}function Gb(e){e.modified_||(e.modified_=!0,e.parent_&&Gb(e.parent_))}function Vb(e){e.copy_||(e.copy_=Lb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Aj=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(l=a,...c){return o.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&tr(6),r!==void 0&&typeof r!="function"&&tr(7);let i;if(ai(t)){const a=M_(this),o=jb(t,void 0);let s=!0;try{i=n(o),s=!1}finally{s?zb(a):Ub(a)}return F_(a,r),P_(i,a)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===T_&&(i=void 0),this.autoFreeze_&&Nb(i,!0),r){const a=[],o=[];vo("Patches").generateReplacementPatches_(t,i,a,o),r(a,o)}return i}else tr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,l=>t(l,...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){ai(e)||tr(8),Ji(e)&&(e=N_(e));const t=M_(this),n=jb(e,void 0);return n[mn].isManual_=!0,Ub(t),n}finishDraft(e,t){const n=e&&e[mn];(!n||!n.isManual_)&&tr(9);const{scope_:r}=n;return F_(r,t),P_(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=vo("Patches").applyPatches_;return Ji(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jb(e,t){const n=m0(e)?vo("MapSet").proxyMap_(e,t):b0(e)?vo("MapSet").proxySet_(e,t):wj(e,t);return(t?t.scope_:B_()).drafts_.push(n),n}function N_(e){return Ji(e)||tr(10,e),z_(e)}function z_(e){if(!ai(e)||y0(e))return e;const t=e[mn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Lb(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Lb(e,!0);return xu(n,(r,i)=>{D_(n,r,z_(i))}),t&&(t.finalized_=!1),n}var bn=new Aj,U_=bn.produce;bn.produceWithPatches.bind(bn),bn.setAutoFreeze.bind(bn),bn.setUseStrictShallowCopy.bind(bn),bn.applyPatches.bind(bn),bn.createDraft.bind(bn),bn.finishDraft.bind(bn);function Ej(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Sj(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 $_=e=>Array.isArray(e)?e:[e];function _j(e){const t=Array.isArray(e[0])?e[0]:e;return Sj(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Cj(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var kj=class{constructor(e){this.value=e}deref(){return this.value}},Tj=WeakRef??kj,Ij=0,H_=1;function x0(){return{s:Ij,v:void 0,o:null,p:null}}function qb(e,t={}){let n=x0();const{resultEqualityCheck:r}=t;let i,a=0;function o(){let s=n;const{length:l}=arguments;for(let f=0,h=l;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=x0(),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=x0(),p.set(d,s)):s=g}}const c=s;let u;if(s.s===H_?u=s.v:(u=e.apply(null,arguments),a++),c.s=H_,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 Tj(u):u}return c.v=u,u}return o.clearCache=()=>{n=x0(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function G_(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e;return(...i)=>{let a=0,o=0,s,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),Ej(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:f,memoizeOptions:h=[],argsMemoize:d=qb,argsMemoizeOptions:p=[],devModeChecks:g={}}=u,b=$_(h),y=$_(p),w=_j(i),A=f(function(){return a++,c.apply(null,arguments)},...b),x=d(function(){o++;const _=Cj(w,arguments);return s=A.apply(null,_),s},...y);return Object.assign(x,{resultFunc:c,memoizedResultFunc:A,dependencies:w,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:d})}}var Rj=G_(qb);function V_(e){return({dispatch:n,getState:r})=>i=>a=>typeof a=="function"?a(n,r,e):i(a)}var Dj=V_(),Bj=V_,Fj=(...e)=>{const t=G_(...e);return(...n)=>{const r=t(...n),i=(a,...o)=>r(Ji(a)?N_(a):a,...o);return Object.assign(i,r),i}};Fj(qb);var Mj=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?p0:p0.apply(null,arguments)};function Su(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(nr(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=>dj(r)&&r.type===e,n}var j_=class hh extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,hh.prototype)}static get[Symbol.species](){return hh}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new hh(...t[0].concat(this)):new hh(...t.concat(this))}};function q_(e){return ai(e)?U_(e,()=>{}):e}function W_(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(nr(10));const r=n.insert(t,e);return e.set(t,r),r}function Pj(e){return typeof e=="boolean"}var Oj=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new j_;return n&&(Pj(n)?o.push(Dj):o.push(Bj(n.extraArgument))),o},Lj="RTK_autoBatch",Y_=e=>t=>{setTimeout(t,e)},Nj=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Y_(10),zj=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,o=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?Nj:e.type==="callback"?e.queueNotification:Y_(e.timeout),c=()=>{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[Lj]),a=!i,a&&(o||(o=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},Uj=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new j_(e);return r&&i.push(zj(typeof r=="object"?r:void 0)),i},$j=!0;function Hj(e){const t=Oj(),{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(Mb(n))s=Pb(n);else throw new Error(nr(1));let l;typeof r=="function"?l=r(t):l=t();let c=p0;i&&(c=Mj({trace:!$j,...typeof i=="object"&&i}));const u=hj(...l),f=Uj(u);let h=typeof o=="function"?o(f):f();const d=c(...h);return k_(s,a,d)}function Z_(e){const t={},n=[];let r;const i={addCase(a,o){const s=typeof a=="string"?a:a.type;if(!s)throw new Error(nr(28));if(s in t)throw new Error(nr(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 Gj(e){return typeof e=="function"}function Vj(e,t){let[n,r,i]=Z_(t),a;if(Gj(e))a=()=>q_(e());else{const s=q_(e);a=()=>s}function o(s=a(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,f)=>{if(f)if(Ji(u)){const d=f(u,l);return d===void 0?u:d}else{if(ai(u))return U_(u,h=>f(h,l));{const h=f(u,l);if(h===void 0){if(u===null)return u;throw new Error(nr(9))}return h}}return u},s)}return o.getInitialState=a,o}var jj=Symbol.for("rtk-slice-createasyncthunk");function qj(e,t){return`${e}/${t}`}function Wj({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[jj];return function(i){const{name:a,reducerPath:o=a}=i;if(!a)throw new Error(nr(11));typeof process<"u";const s=(typeof i.reducers=="function"?i.reducers(Zj()):i.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(b,y){const w=typeof b=="string"?b:b.type;if(!w)throw new Error(nr(12));if(w in c.sliceCaseReducersByType)throw new Error(nr(13));return c.sliceCaseReducersByType[w]=y,u},addMatcher(b,y){return c.sliceMatchers.push({matcher:b,reducer:y}),u},exposeAction(b,y){return c.actionCreators[b]=y,u},exposeCaseReducer(b,y){return c.sliceCaseReducersByName[b]=y,u}};l.forEach(b=>{const y=s[b],w={reducerName:b,type:qj(a,b),createNotation:typeof i.reducers=="function"};Xj(y)?Jj(w,y,u,t):Qj(w,y,u)});function f(){const[b={},y=[],w=void 0]=typeof i.extraReducers=="function"?Z_(i.extraReducers):[i.extraReducers],A={...b,...c.sliceCaseReducersByType};return Vj(i.initialState,x=>{for(let E in A)x.addCase(E,A[E]);for(let E of c.sliceMatchers)x.addMatcher(E.matcher,E.reducer);for(let E of y)x.addMatcher(E.matcher,E.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:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState(){return p||(p=f()),p.getInitialState()},getSelectors(b=h){const y=W_(d,this,{insert:()=>new WeakMap});return W_(y,b,{insert:()=>{const w={};for(const[A,x]of Object.entries(i.selectors??{}))w[A]=Yj(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 Yj(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 Q_=Wj();function Zj(){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 Qj({type:e,reducerName:t,createNotation:n},r,i){let a,o;if("reducer"in r){if(n&&!Kj(r))throw new Error(nr(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Su(e,o):Su(e))}function Xj(e){return e._reducerDefinitionType==="asyncThunk"}function Kj(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Jj({type:e,reducerName:t},n,r,i){if(!i)throw new Error(nr(18));const{payloadCreator:a,fulfilled:o,pending:s,rejected:l,settled:c,options:u}=n,f=i(e,a,u);r.exposeAction(t,f),o&&r.addCase(f.fulfilled,o),s&&r.addCase(f.pending,s),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(t,{fulfilled:o||A0,pending:s||A0,rejected:l||A0,settled:c||A0})}function A0(){}var Wb="listenerMiddleware";Su(`${Wb}/add`),Su(`${Wb}/removeAll`),Su(`${Wb}/remove`);function nr(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 eq(e,t){var n=e+"",r=t+"";return n<r?-1:n==r?0:1}var tq=[].forEach;function nq(e,t,n){if(typeof t!="function")throw new TypeError(t+" is not a function");var r,i=[],a=[],o=[];tq.call(e,function(l,c,u){if(r=t(l,c,u),r===void 0)return void o.push(l);if(n===void 0&&typeof r=="symbol")throw new TypeError("Can't convert symbol to string");i.push(c),a[c]=r}),n===void 0&&(n=eq),i.sort(function(l,c){return n(a[l],a[c])});var s=i.map(function(l){return e[l]}).concat(o);return s.length!=e.length&&(s.length=e.length),s}function rq(e,t){const n=i=>i.copy().range(ki(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 iq(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 aq(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 oq(e,t,n=!1){return nq(e,t,(r,i)=>(n&&([r,i]=[i,r]),r<i?-1:r>i?1:0))}const sq={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 lq(e,t,n,r){const i=sq[n];return e.filter(a=>i(t(a),r))}function X_(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 cq(e,t){const n=r=>r!=null;return e.filter(r=>n(t(r)))}/**
2785
+ ${l()}`,a.content)}g(),(b=a.content.querySelector("input[type='text']"))==null||b.focus()}const sj={lt:["<","less than"],lte:["≤","less than or equal to"],eq:["=","equal to"],gte:["≥","greater than or equal to"],gt:[">","greater than"]};function __(e,t,n){const r=e.accessor;return t.map(i=>r(i,n))}function Mt(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 lj=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")(),C_=lj,Fb=()=>Math.random().toString(36).substring(7).split("").join("."),cj={INIT:`@@redux/INIT${Fb()}`,REPLACE:`@@redux/REPLACE${Fb()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fb()}`},d0=cj;function Mb(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 k_(e,t,n){if(typeof e!="function")throw new Error(Mt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Mt(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Mt(1));return n(k_)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,l=!1;function c(){o===a&&(o=new Map,a.forEach((b,y)=>{o.set(y,b)}))}function u(){if(l)throw new Error(Mt(3));return i}function f(b){if(typeof b!="function")throw new Error(Mt(4));if(l)throw new Error(Mt(5));let y=!0;c();const w=s++;return o.set(w,b),function(){if(y){if(l)throw new Error(Mt(6));y=!1,c(),o.delete(w),a=null}}}function h(b){if(!Mb(b))throw new Error(Mt(7));if(typeof b.type>"u")throw new Error(Mt(8));if(typeof b.type!="string")throw new Error(Mt(17));if(l)throw new Error(Mt(9));try{l=!0,i=r(i,b)}finally{l=!1}return(a=o).forEach(w=>{w()}),b}function d(b){if(typeof b!="function")throw new Error(Mt(10));r=b,h({type:d0.REPLACE})}function p(){const b=f;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Mt(11));function w(){const x=y;x.next&&x.next(u())}return w(),{unsubscribe:b(w)}},[C_](){return this}}}return h({type:d0.INIT}),{dispatch:h,subscribe:f,getState:u,replaceReducer:d,[C_]:p}}function uj(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:d0.INIT})>"u")throw new Error(Mt(12));if(typeof n(void 0,{type:d0.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Mt(13))})}function Pb(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{uj(n)}catch(a){i=a}return function(o={},s){if(i)throw i;let l=!1;const c={};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(Mt(14));c[f]=p,l=l||p!==d}return l=l||r.length!==Object.keys(o).length,l?c:o}}function p0(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function fj(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(Mt(15))};const o={getState:i.getState,dispatch:(l,...c)=>a(l,...c)},s=e.map(l=>l(o));return a=p0(...s)(i.dispatch),{...i,dispatch:a}}}function hj(e){return Mb(e)&&"type"in e&&typeof e.type=="string"}var T_=Symbol.for("immer-nothing"),I_=Symbol.for("immer-draftable"),mn=Symbol.for("immer-state");function tr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ls=Object.getPrototypeOf;function Ji(e){return!!e&&!!e[mn]}function ai(e){var t;return e?R_(e)||Array.isArray(e)||!!e[I_]||!!((t=e.constructor)!=null&&t[I_])||m0(e)||b0(e):!1}var dj=Object.prototype.constructor.toString();function R_(e){if(!e||typeof e!="object")return!1;const t=Ls(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)===dj}function xu(e,t){g0(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function g0(e){const t=e[mn];return t?t.type_:Array.isArray(e)?1:m0(e)?2:b0(e)?3:0}function Ob(e,t){return g0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function D_(e,t,n){const r=g0(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function pj(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function m0(e){return e instanceof Map}function b0(e){return e instanceof Set}function yo(e){return e.copy_||e.base_}function Lb(e,t){if(m0(e))return new Map(e);if(b0(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&R_(e))return Ls(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[mn];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(Ls(e),n)}function Nb(e,t=!1){return y0(e)||Ji(e)||!ai(e)||(g0(e)>1&&(e.set=e.add=e.clear=e.delete=gj),Object.freeze(e),t&&xu(e,(n,r)=>Nb(r,!0))),e}function gj(){tr(2)}function y0(e){return Object.isFrozen(e)}var mj={};function vo(e){const t=mj[e];return t||tr(0,e),t}var Au;function B_(){return Au}function bj(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function F_(e,t){t&&(vo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zb(e){Ub(e),e.drafts_.forEach(yj),e.drafts_=null}function Ub(e){e===Au&&(Au=e.parent_)}function M_(e){return Au=bj(Au,e)}function yj(e){const t=e[mn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function P_(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[mn].modified_&&(zb(t),tr(4)),ai(e)&&(e=v0(t,e),t.parent_||w0(t,e)),t.patches_&&vo("Patches").generateReplacementPatches_(n[mn].base_,e,t.patches_,t.inversePatches_)):e=v0(t,n,[]),zb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==T_?e:void 0}function v0(e,t,n){if(y0(t))return t;const r=t[mn];if(!r)return xu(t,(i,a)=>O_(e,r,t,i,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return w0(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),xu(a,(s,l)=>O_(e,r,i,s,l,n,o)),w0(e,i,!1),n&&e.patches_&&vo("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function O_(e,t,n,r,i,a,o){if(Ji(i)){const s=a&&t&&t.type_!==3&&!Ob(t.assigned_,r)?a.concat(r):void 0,l=v0(e,i,s);if(D_(n,r,l),Ji(l))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(ai(i)&&!y0(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;v0(e,i),(!t||!t.scope_.parent_)&&w0(e,i)}}function w0(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Nb(t,n)}function vj(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:B_(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=$b;n&&(i=[r],a=Eu);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var $b={get(e,t){if(t===mn)return e;const n=yo(e);if(!Ob(n,t))return wj(e,n,t);const r=n[t];return e.finalized_||!ai(r)?r:r===Hb(e.base_,t)?(Vb(e),e.copy_[t]=jb(r,e)):r},has(e,t){return t in yo(e)},ownKeys(e){return Reflect.ownKeys(yo(e))},set(e,t,n){const r=L_(yo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Hb(yo(e),t),a=i==null?void 0:i[mn];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(pj(n,i)&&(n!==void 0||Ob(e.base_,t)))return!0;Vb(e),Gb(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 Hb(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Vb(e),Gb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=yo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){tr(11)},getPrototypeOf(e){return Ls(e.base_)},setPrototypeOf(){tr(12)}},Eu={};xu($b,(e,t)=>{Eu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Eu.deleteProperty=function(e,t){return Eu.set.call(this,e,t,void 0)},Eu.set=function(e,t,n){return $b.set.call(this,e[0],t,n,e[0])};function Hb(e,t){const n=e[mn];return(n?yo(n):e)[t]}function wj(e,t,n){var i;const r=L_(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function L_(e,t){if(!(t in e))return;let n=Ls(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ls(n)}}function Gb(e){e.modified_||(e.modified_=!0,e.parent_&&Gb(e.parent_))}function Vb(e){e.copy_||(e.copy_=Lb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var xj=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(l=a,...c){return o.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&tr(6),r!==void 0&&typeof r!="function"&&tr(7);let i;if(ai(t)){const a=M_(this),o=jb(t,void 0);let s=!0;try{i=n(o),s=!1}finally{s?zb(a):Ub(a)}return F_(a,r),P_(i,a)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===T_&&(i=void 0),this.autoFreeze_&&Nb(i,!0),r){const a=[],o=[];vo("Patches").generateReplacementPatches_(t,i,a,o),r(a,o)}return i}else tr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,l=>t(l,...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){ai(e)||tr(8),Ji(e)&&(e=N_(e));const t=M_(this),n=jb(e,void 0);return n[mn].isManual_=!0,Ub(t),n}finishDraft(e,t){const n=e&&e[mn];(!n||!n.isManual_)&&tr(9);const{scope_:r}=n;return F_(r,t),P_(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=vo("Patches").applyPatches_;return Ji(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jb(e,t){const n=m0(e)?vo("MapSet").proxyMap_(e,t):b0(e)?vo("MapSet").proxySet_(e,t):vj(e,t);return(t?t.scope_:B_()).drafts_.push(n),n}function N_(e){return Ji(e)||tr(10,e),z_(e)}function z_(e){if(!ai(e)||y0(e))return e;const t=e[mn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Lb(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Lb(e,!0);return xu(n,(r,i)=>{D_(n,r,z_(i))}),t&&(t.finalized_=!1),n}var bn=new xj,U_=bn.produce;bn.produceWithPatches.bind(bn),bn.setAutoFreeze.bind(bn),bn.setUseStrictShallowCopy.bind(bn),bn.applyPatches.bind(bn),bn.createDraft.bind(bn),bn.finishDraft.bind(bn);function Aj(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Ej(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 $_=e=>Array.isArray(e)?e:[e];function Sj(e){const t=Array.isArray(e[0])?e[0]:e;return Ej(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _j(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Cj=class{constructor(e){this.value=e}deref(){return this.value}},kj=WeakRef??Cj,Tj=0,H_=1;function x0(){return{s:Tj,v:void 0,o:null,p:null}}function qb(e,t={}){let n=x0();const{resultEqualityCheck:r}=t;let i,a=0;function o(){let s=n;const{length:l}=arguments;for(let f=0,h=l;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=x0(),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=x0(),p.set(d,s)):s=g}}const c=s;let u;if(s.s===H_?u=s.v:(u=e.apply(null,arguments),a++),c.s=H_,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 kj(u):u}return c.v=u,u}return o.clearCache=()=>{n=x0(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function G_(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e;return(...i)=>{let a=0,o=0,s,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),Aj(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:f,memoizeOptions:h=[],argsMemoize:d=qb,argsMemoizeOptions:p=[],devModeChecks:g={}}=u,b=$_(h),y=$_(p),w=Sj(i),A=f(function(){return a++,c.apply(null,arguments)},...b),x=d(function(){o++;const _=_j(w,arguments);return s=A.apply(null,_),s},...y);return Object.assign(x,{resultFunc:c,memoizedResultFunc:A,dependencies:w,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:d})}}var Ij=G_(qb);function V_(e){return({dispatch:n,getState:r})=>i=>a=>typeof a=="function"?a(n,r,e):i(a)}var Rj=V_(),Dj=V_,Bj=(...e)=>{const t=G_(...e);return(...n)=>{const r=t(...n),i=(a,...o)=>r(Ji(a)?N_(a):a,...o);return Object.assign(i,r),i}};Bj(qb);var Fj=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?p0:p0.apply(null,arguments)};function Su(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(nr(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=>hj(r)&&r.type===e,n}var j_=class hh extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,hh.prototype)}static get[Symbol.species](){return hh}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new hh(...t[0].concat(this)):new hh(...t.concat(this))}};function q_(e){return ai(e)?U_(e,()=>{}):e}function W_(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(nr(10));const r=n.insert(t,e);return e.set(t,r),r}function Mj(e){return typeof e=="boolean"}var Pj=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new j_;return n&&(Mj(n)?o.push(Rj):o.push(Dj(n.extraArgument))),o},Oj="RTK_autoBatch",Y_=e=>t=>{setTimeout(t,e)},Lj=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Y_(10),Nj=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,o=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?Lj:e.type==="callback"?e.queueNotification:Y_(e.timeout),c=()=>{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[Oj]),a=!i,a&&(o||(o=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},zj=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new j_(e);return r&&i.push(Nj(typeof r=="object"?r:void 0)),i},Uj=!0;function $j(e){const t=Pj(),{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(Mb(n))s=Pb(n);else throw new Error(nr(1));let l;typeof r=="function"?l=r(t):l=t();let c=p0;i&&(c=Fj({trace:!Uj,...typeof i=="object"&&i}));const u=fj(...l),f=zj(u);let h=typeof o=="function"?o(f):f();const d=c(...h);return k_(s,a,d)}function Z_(e){const t={},n=[];let r;const i={addCase(a,o){const s=typeof a=="string"?a:a.type;if(!s)throw new Error(nr(28));if(s in t)throw new Error(nr(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 Hj(e){return typeof e=="function"}function Gj(e,t){let[n,r,i]=Z_(t),a;if(Hj(e))a=()=>q_(e());else{const s=q_(e);a=()=>s}function o(s=a(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,f)=>{if(f)if(Ji(u)){const d=f(u,l);return d===void 0?u:d}else{if(ai(u))return U_(u,h=>f(h,l));{const h=f(u,l);if(h===void 0){if(u===null)return u;throw new Error(nr(9))}return h}}return u},s)}return o.getInitialState=a,o}var Vj=Symbol.for("rtk-slice-createasyncthunk");function jj(e,t){return`${e}/${t}`}function qj({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Vj];return function(i){const{name:a,reducerPath:o=a}=i;if(!a)throw new Error(nr(11));typeof process<"u";const s=(typeof i.reducers=="function"?i.reducers(Yj()):i.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(b,y){const w=typeof b=="string"?b:b.type;if(!w)throw new Error(nr(12));if(w in c.sliceCaseReducersByType)throw new Error(nr(13));return c.sliceCaseReducersByType[w]=y,u},addMatcher(b,y){return c.sliceMatchers.push({matcher:b,reducer:y}),u},exposeAction(b,y){return c.actionCreators[b]=y,u},exposeCaseReducer(b,y){return c.sliceCaseReducersByName[b]=y,u}};l.forEach(b=>{const y=s[b],w={reducerName:b,type:jj(a,b),createNotation:typeof i.reducers=="function"};Qj(y)?Kj(w,y,u,t):Zj(w,y,u)});function f(){const[b={},y=[],w=void 0]=typeof i.extraReducers=="function"?Z_(i.extraReducers):[i.extraReducers],A={...b,...c.sliceCaseReducersByType};return Gj(i.initialState,x=>{for(let E in A)x.addCase(E,A[E]);for(let E of c.sliceMatchers)x.addMatcher(E.matcher,E.reducer);for(let E of y)x.addMatcher(E.matcher,E.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:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState(){return p||(p=f()),p.getInitialState()},getSelectors(b=h){const y=W_(d,this,{insert:()=>new WeakMap});return W_(y,b,{insert:()=>{const w={};for(const[A,x]of Object.entries(i.selectors??{}))w[A]=Wj(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 Wj(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 Q_=qj();function Yj(){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 Zj({type:e,reducerName:t,createNotation:n},r,i){let a,o;if("reducer"in r){if(n&&!Xj(r))throw new Error(nr(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Su(e,o):Su(e))}function Qj(e){return e._reducerDefinitionType==="asyncThunk"}function Xj(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Kj({type:e,reducerName:t},n,r,i){if(!i)throw new Error(nr(18));const{payloadCreator:a,fulfilled:o,pending:s,rejected:l,settled:c,options:u}=n,f=i(e,a,u);r.exposeAction(t,f),o&&r.addCase(f.fulfilled,o),s&&r.addCase(f.pending,s),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(t,{fulfilled:o||A0,pending:s||A0,rejected:l||A0,settled:c||A0})}function A0(){}var Wb="listenerMiddleware";Su(`${Wb}/add`),Su(`${Wb}/removeAll`),Su(`${Wb}/remove`);function nr(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 Jj(e,t){var n=e+"",r=t+"";return n<r?-1:n==r?0:1}var eq=[].forEach;function tq(e,t,n){if(typeof t!="function")throw new TypeError(t+" is not a function");var r,i=[],a=[],o=[];eq.call(e,function(l,c,u){if(r=t(l,c,u),r===void 0)return void o.push(l);if(n===void 0&&typeof r=="symbol")throw new TypeError("Can't convert symbol to string");i.push(c),a[c]=r}),n===void 0&&(n=Jj),i.sort(function(l,c){return n(a[l],a[c])});var s=i.map(function(l){return e[l]}).concat(o);return s.length!=e.length&&(s.length=e.length),s}function nq(e,t){const n=i=>i.copy().range(ki(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 rq(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 iq(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 aq(e,t,n=!1){return tq(e,t,(r,i)=>(n&&([r,i]=[i,r]),r<i?-1:r>i?1:0))}const oq={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 sq(e,t,n,r){const i=oq[n];return e.filter(a=>i(t(a),r))}function X_(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 lq(e,t){const n=r=>r!=null;return e.filter(r=>n(t(r)))}/**
2781
2786
  * @license
2782
2787
  * Copyright 2021 Google LLC
2783
2788
  * SPDX-License-Identifier: BSD-3-Clause
2784
- */function*uq(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 K_="setSamples",J_="sortBy",eC="retainFirstOfEach",tC="retainFirstNCategories",nC="filterByNominal",rC="filterByQuantitative",iC="removeUndefined",aC="groupByNominal",oC="groupToQuartiles",sC="groupByThresholds",lC="removeGroup",cC="retainMatched",Ns="sampleView";function fq(){return{sampleData:void 0,groupMetadata:[],rootGroup:{name:"ROOT",title:"Root",samples:[]}}}function hq(e){const t=(n,r)=>{const i=e(n.attribute).accessor;return a=>i(a,r)};return Q_({name:Ns,initialState:fq(),reducers:{[K_]:(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}},[J_]:(n,r)=>{wo(n,i=>oq(i,rq(t(r.payload,n),e(r.payload.attribute)),!1))},[eC]:(n,r)=>{wo(n,i=>iq(i,t(r.payload,n)))},[tC]:(n,r)=>{wo(n,i=>aq(i,t(r.payload,n),r.payload.n))},[rC]:(n,r)=>{wo(n,i=>lq(i,t(r.payload,n),r.payload.operator,r.payload.operand))},[nC]:(n,r)=>{wo(n,i=>X_(i,t(r.payload,n),r.payload.remove?"remove":"retain",r.payload.values))},[iC]:(n,r)=>{wo(n,i=>cq(i,t(r.payload,n)))},[aC]:(n,r)=>{var a;const i=(a=e(r.payload.attribute).scale)==null?void 0:a.domain();Yb(n,o=>pC(o,t(r.payload,n),i)),n.groupMetadata.push({attribute:r.payload.attribute})},[oC]:(n,r)=>{Yb(n,i=>mq(i,t(r.payload,n))),n.groupMetadata.push({attribute:r.payload.attribute})},[sC]:(n,r)=>{Yb(n,i=>gq(i,t(r.payload,n),r.payload.thresholds)),n.groupMetadata.push({attribute:r.payload.attribute})},[lC]:(n,r)=>{const i=n.rootGroup;E0(i)&&mC(i,r.payload.path)},[cC]:(n,r)=>{const i=t(r.payload,n),a=[];for(const s of Zb(n))if(s.samples.length>0){const l=new Set;for(const c of s.samples)l.add(i(c));a.push(l)}const o=[];for(const s of a[0]){let l=!0;for(let c=1;c<a.length&&l;c++)l=a[c].has(s);l&&o.push(s)}wo(n,s=>X_(s,i,"retain",o))}}})}function wo(e,t){for(const n of Zb(e))n.samples=t(n.samples)}function Yb(e,t){for(const n of Zb(e))t(n)}function Zb(e){return Qb(e).map(t=>_n(t))}function uC(e){return e.provenance.present[Ns]}function Qb(e){const t=[],n=[],r=i=>{if(t.push(i),E0(i))for(const a of i.groups)r(a);else n.push([...t]);t.pop()};return r(e.rootGroup),n}function fC(e){return"samples"in e}function E0(e){return"groups"in e}function*Xb(e){if(yield[e],E0(e))for(const t of e.groups)for(const n of Xb(t))yield[e,...n]}const dq=pt(".4"),hC={lt:"<",lte:"≤",eq:"=",gte:"≥",gt:">"};function dC(e){return U`{${e.map((t,n)=>U`${n>0?", ":""}<strong>${t}</strong>`)}}`}function pq(e,t){if(!e.type.startsWith(Ns))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)||U` <em>${i}</em> `,o={attributeName:i};switch(e.type.substring(Ns.length+1)){case K_:return{...o,title:"The initial state",icon:gG};case J_:return{...o,title:"Sort by",provenanceTitle:U` Sort by ${a} `,icon:WH};case eC:return{...o,title:U`
2789
+ */function*cq(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 K_="setSamples",J_="sortBy",eC="retainFirstOfEach",tC="retainFirstNCategories",nC="filterByNominal",rC="filterByQuantitative",iC="removeUndefined",aC="groupByNominal",oC="groupToQuartiles",sC="groupByThresholds",lC="removeGroup",cC="retainMatched",Ns="sampleView";function uq(){return{sampleData:void 0,groupMetadata:[],rootGroup:{name:"ROOT",title:"Root",samples:[]}}}function fq(e){const t=(n,r)=>{const i=e(n.attribute).accessor;return a=>i(a,r)};return Q_({name:Ns,initialState:uq(),reducers:{[K_]:(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}},[J_]:(n,r)=>{wo(n,i=>aq(i,nq(t(r.payload,n),e(r.payload.attribute)),!1))},[eC]:(n,r)=>{wo(n,i=>rq(i,t(r.payload,n)))},[tC]:(n,r)=>{wo(n,i=>iq(i,t(r.payload,n),r.payload.n))},[rC]:(n,r)=>{wo(n,i=>sq(i,t(r.payload,n),r.payload.operator,r.payload.operand))},[nC]:(n,r)=>{wo(n,i=>X_(i,t(r.payload,n),r.payload.remove?"remove":"retain",r.payload.values))},[iC]:(n,r)=>{wo(n,i=>lq(i,t(r.payload,n)))},[aC]:(n,r)=>{var a;const i=(a=e(r.payload.attribute).scale)==null?void 0:a.domain();Yb(n,o=>pC(o,t(r.payload,n),i)),n.groupMetadata.push({attribute:r.payload.attribute})},[oC]:(n,r)=>{Yb(n,i=>gq(i,t(r.payload,n))),n.groupMetadata.push({attribute:r.payload.attribute})},[sC]:(n,r)=>{Yb(n,i=>pq(i,t(r.payload,n),r.payload.thresholds)),n.groupMetadata.push({attribute:r.payload.attribute})},[lC]:(n,r)=>{const i=n.rootGroup;E0(i)&&mC(i,r.payload.path)},[cC]:(n,r)=>{const i=t(r.payload,n),a=[];for(const s of Zb(n))if(s.samples.length>0){const l=new Set;for(const c of s.samples)l.add(i(c));a.push(l)}const o=[];for(const s of a[0]){let l=!0;for(let c=1;c<a.length&&l;c++)l=a[c].has(s);l&&o.push(s)}wo(n,s=>X_(s,i,"retain",o))}}})}function wo(e,t){for(const n of Zb(e))n.samples=t(n.samples)}function Yb(e,t){for(const n of Zb(e))t(n)}function Zb(e){return Qb(e).map(t=>_n(t))}function uC(e){return e.provenance.present[Ns]}function Qb(e){const t=[],n=[],r=i=>{if(t.push(i),E0(i))for(const a of i.groups)r(a);else n.push([...t]);t.pop()};return r(e.rootGroup),n}function fC(e){return"samples"in e}function E0(e){return"groups"in e}function*Xb(e){if(yield[e],E0(e))for(const t of e.groups)for(const n of Xb(t))yield[e,...n]}const hq=pt(".4"),hC={lt:"<",lte:"≤",eq:"=",gte:"≥",gt:">"};function dC(e){return U`{${e.map((t,n)=>U`${n>0?", ":""}<strong>${t}</strong>`)}}`}function dq(e,t){if(!e.type.startsWith(Ns))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)||U` <em>${i}</em> `,o={attributeName:i};switch(e.type.substring(Ns.length+1)){case K_:return{...o,title:"The initial state",icon:pG};case J_:return{...o,title:"Sort by",provenanceTitle:U` Sort by ${a} `,icon:qH};case eC:return{...o,title:U`
2785
2790
  Retain the first sample of each
2786
2791
  <em>${i}</em>
2787
2792
  `,provenanceTitle:U`
@@ -2802,7 +2807,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2802
2807
  <span class="operator"
2803
2808
  >${hC[n.operator]}</span
2804
2809
  >
2805
- <strong>${dq(n.operand)}</strong>
2810
+ <strong>${hq(n.operand)}</strong>
2806
2811
  `;return{...o,title:l(U` <em>${i}</em> `),provenanceTitle:l(a),icon:uo}}case iC:return{...o,title:"Remove samples having missing attribute",provenanceTitle:U`
2807
2812
  Remove samples having missing ${a}
2808
2813
  `,icon:Yd};case aC:return{...o,title:"Group by",provenanceTitle:U` Group by ${a} `,icon:lu};case oC:return{...o,title:"Group by quartiles",provenanceTitle:U`
@@ -2813,13 +2818,13 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2813
2818
  on ${a}
2814
2819
  `,icon:lu};case lC:return{title:"Remove group",provenanceTitle:U`
2815
2820
  Remove group
2816
- ${uq(n.path.map(l=>U`<strong>${l}</strong>`)," / ")}
2821
+ ${cq(n.path.map(l=>U`<strong>${l}</strong>`)," / ")}
2817
2822
  `,icon:Yd};case cC:return{...o,title:U`
2818
2823
  Retain group-wise matched samples using
2819
2824
  <em>${i}</em>
2820
2825
  `,provenanceTitle:U`
2821
2826
  Retain group-wise matched samples using ${a}
2822
- `,icon:uo};default:return{...o,title:JSON.stringify(e),icon:gS}}}function pC(e,t,n,r){if(r&&!n)throw new Error("Custom labels need explicit group order!");const i=Kl(e.samples,t),a=n?n.map(l=>[l,i.get(l)]).filter(l=>l[1]):[...i],s=e;s.groups=a.map(([l,c],u)=>({name:""+l,title:r?r[u]:l,samples:c})),delete e.samples}function gC(e,t,n){const r=o=>`Group ${o+1}`,i=ki(n.length-1).reverse(),a=bC(t,n.slice(1,n.length-1));pC(e,o=>r(a(o)),i.map(r),i.map(o=>vC(n[o],n[o+1])))}function gq(e,t,n){gC(e,t,[{operator:"lt",operand:-1/0},...n,{operator:"lte",operand:1/0}])}function mq(e,t){const n=yq(bq(e.samples,t,[0,.25,.5,.75,1]));n.length==1&&n.push(n[0]),gC(e,t,n.map((r,i,a)=>({operator:i==a.length-1?"lte":"lt",operand:r})))}function mC(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];E0(r)&&mC(r,[...t].splice(1))}}}function bC(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 bq(e,t,n){const r=SD(e.map(t).filter(i=>ft(i)&&!isNaN(i)));return n.map(i=>Rg(r,i))}function yq(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 yC=pt(".3~r"),vC=(e,t)=>`${e.operator=="lt"?"[":"("}${yC(e.operand)}, ${yC(t.operand)}${t.operator=="lte"?"]":")"}`;function vq(e,t){const n=t.provenance.storeHelper.getDispatcher(),r=[],i=bo(),a=U`
2827
+ `,icon:uo};default:return{...o,title:JSON.stringify(e),icon:gS}}}function pC(e,t,n,r){if(r&&!n)throw new Error("Custom labels need explicit group order!");const i=Kl(e.samples,t),a=n?n.map(l=>[l,i.get(l)]).filter(l=>l[1]):[...i],s=e;s.groups=a.map(([l,c],u)=>({name:""+l,title:r?r[u]:l,samples:c})),delete e.samples}function gC(e,t,n){const r=o=>`Group ${o+1}`,i=ki(n.length-1).reverse(),a=bC(t,n.slice(1,n.length-1));pC(e,o=>r(a(o)),i.map(r),i.map(o=>vC(n[o],n[o+1])))}function pq(e,t,n){gC(e,t,[{operator:"lt",operand:-1/0},...n,{operator:"lte",operand:1/0}])}function gq(e,t){const n=bq(mq(e.samples,t,[0,.25,.5,.75,1]));n.length==1&&n.push(n[0]),gC(e,t,n.map((r,i,a)=>({operator:i==a.length-1?"lte":"lt",operand:r})))}function mC(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];E0(r)&&mC(r,[...t].splice(1))}}}function bC(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 mq(e,t,n){const r=SD(e.map(t).filter(i=>ft(i)&&!isNaN(i)));return n.map(i=>Rg(r,i))}function bq(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 yC=pt(".3~r"),vC=(e,t)=>`${e.operator=="lt"?"[":"("}${yC(e.operand)}, ${yC(t.operand)}${t.operator=="lte"?"]":")"}`;function yq(e,t){const n=t.provenance.storeHelper.getDispatcher(),r=[],i=bo(),a=U`
2823
2828
  <div class="modal-title">
2824
2829
  Group by threshold on <em>${e.name}</em>
2825
2830
  </div>
@@ -2830,12 +2835,12 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2830
2835
 
2831
2836
  <button
2832
2837
  class="btn btn-primary"
2833
- ?disabled=${!wq(r)}
2838
+ ?disabled=${!vq(r)}
2834
2839
  @click=${()=>o()}
2835
2840
  >
2836
2841
  ${$e(lu).node[0]} Group
2837
2842
  </button>
2838
- </div>`,l=(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),c=(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=l(+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=l(b.value,b.index),g()},d=b=>{r.splice(b,1),g()},p=xq(e,t.leafSamples,t.sampleHierarchy);function g(){const b=()=>{const w=[{operand:-1/0,operator:"lt"},...r,{operand:1/0,operator:"lte"}],A=bC(_=>_,w),x=[];for(let _=1;_<w.length;_++)x.push(0);for(const _ of p)x[A(_)-1]++;const E=[];for(let _=1;_<w.length;_++)E.push({index:_-1,name:_,interval:vC(w[_-1],w[_]),n:x[_-1]});return U`<table class="threshold-groups">
2843
+ </div>`,l=(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),c=(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=l(+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=l(b.value,b.index),g()},d=b=>{r.splice(b,1),g()},p=wq(e,t.leafSamples,t.sampleHierarchy);function g(){const b=()=>{const w=[{operand:-1/0,operator:"lt"},...r,{operand:1/0,operator:"lte"}],A=bC(_=>_,w),x=[];for(let _=1;_<w.length;_++)x.push(0);for(const _ of p)x[A(_)-1]++;const E=[];for(let _=1;_<w.length;_++)E.push({index:_-1,name:_,interval:vC(w[_-1],w[_]),n:x[_-1]});return U`<table class="threshold-groups">
2839
2844
  <thead>
2840
2845
  <tr>
2841
2846
  <th>Group</th>
@@ -2903,7 +2908,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2903
2908
  </div>
2904
2909
  `;Bt(U`${a}
2905
2910
  <div class="modal-body">${y}</div>
2906
- ${s()}`,i.content)}g()}function wq(e){return e.length}function xq(e,t,n){const r=e.accessor;return t.map(i=>r(i,n))}function Aq(e,t){const n=t.provenance.storeHelper.getDispatcher();let r=5;const i=bo(),a=U`
2911
+ ${s()}`,i.content)}g()}function vq(e){return e.length}function wq(e,t,n){const r=e.accessor;return t.map(i=>r(i,n))}function xq(e,t){const n=t.provenance.storeHelper.getDispatcher();let r=5;const i=bo(),a=U`
2907
2912
  <div class="modal-title">
2908
2913
  Retain first n categories of <em>${e.title}</em>
2909
2914
  </div>
@@ -2927,18 +2932,18 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2927
2932
  </div>
2928
2933
  `;function c(){Bt(U`${a}
2929
2934
  <div class="modal-body">${l}</div>
2930
- ${s()}`,i.content)}c(),i.content.querySelector("input").focus()}function Kb(e,t,n,r){const i=r.actions,a=t.attribute,o=r.sampleHierarchy,s=r.provenance.storeHelper.getDispatcher(),l=[];e&&l.push({label:e,type:"header"});const c=(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)=>l.push(...h.map(d=>c(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})),l.push(c(i.retainFirstNCategories({attribute:a,n:void 0}),!1,()=>Aq(t,r)))),u(i.filterByNominal({attribute:a,values:[n]}),i.filterByNominal({attribute:a,remove:!0,values:[n]})),f!="identifier"&&l.push(c(i.retainMatched({attribute:a}),!o.groupMetadata.length))):(u(i.groupToQuartiles({attribute:a})),l.push({icon:lu,label:"Group by thresholds...",callback:()=>vq(t,r)}),Eq(n)?u(i.filterByQuantitative({attribute:a,operator:"gte",operand:+n}),i.filterByQuantitative({attribute:a,operator:"lte",operand:+n})):u(i.removeUndefined({attribute:a}))),l.push({icon:uo,label:"Advanced filter...",callback:()=>ij(t,r)}),l}function Eq(e){return e!=null&&e!==""&&!(typeof e=="number"&&isNaN(e))}const Tn={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"},xo={undo(){return{type:Tn.UNDO}},redo(){return{type:Tn.REDO}},jumpToFuture(e){return{type:Tn.JUMP_TO_FUTURE,index:e}},jumpToPast(e){return{type:Tn.JUMP_TO_PAST,index:e}},jump(e){return{type:Tn.JUMP,index:e}},clearHistory(){return{type:Tn.CLEAR_HISTORY}}};function wC(e,t=[]){return Array.isArray(e)?e:typeof e=="string"?[e]:t}function Sq(e){return typeof e.present<"u"&&typeof e.future<"u"&&typeof e.past<"u"&&Array.isArray(e.future)&&Array.isArray(e.past)}function Ao(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 S0,In;const Jb={prevState:"#9E9E9E",action:"#03A9F4",nextState:"#4CAF50"};function _q(){In={header:[],prev:[],action:[],next:[],msgs:[]}}function Cq(){const{header:e,prev:t,next:n,action:r,msgs:i}=In;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 ey(e,t,n){return[`%c${e}`,`color: ${t}; font-weight: bold`,n]}function kq(e,t){_q(),S0&&(console.group?(In.header=["%credux-undo","font-style: italic","action",e.type],In.action=ey("action",Jb.action,e),In.prev=ey("prev history",Jb.prevState,t)):(In.header=["redux-undo action",e.type],In.action=["action",e],In.prev=["prev history",t]))}function rr(e){S0&&(console.group?In.next=ey("next history",Jb.nextState,e):In.next=["next history",e],Cq())}function Ht(...e){S0&&(In.msgs=In.msgs.concat([...e,`
2931
- `]))}function Tq(e){S0=e}function ty(e,t){const n=Ao([],e,[]);return t&&(n._latestUnfiltered=null),n}function Iq(e,t,n,r){const i=e.past.length+1;Ht("inserting",t),Ht("new free: ",n-i);const{past:a,_latestUnfiltered:o}=e,s=n&&n<=i,l=a.slice(s?1:0),c=o!=null?[...l,o]:l;return Ao(c,t,[],r)}function xC(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 Ao(a,o,s)}function AC(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 Ao(a,s,o)}function ny(e,t){return t>0?xC(e,t-1):t<0?AC(e,e.past.length+t):e}function Rq(e,t){return t.indexOf(e)>-1?e:!e}function Dq(e,t={}){Tq(t.debug);const n={limit:void 0,filter:()=>!0,groupBy:()=>null,undoType:Tn.UNDO,redoType:Tn.REDO,jumpToPastType:Tn.JUMP_TO_PAST,jumpToFutureType:Tn.JUMP_TO_FUTURE,jumpType:Tn.JUMP,neverSkipReducer:!1,ignoreInitialState:!1,syncFilter:!1,...t,initTypes:wC(t.initTypes,["@@redux-undo/INIT"]),clearHistoryType:wC(t.clearHistoryType,[Tn.CLEAR_HISTORY])},r=n.neverSkipReducer?(a,o,...s)=>({...a,present:e(a.present,o,...s)}):a=>a;let i;return(a=i,o={},...s)=>{kq(o,a);let l=a;if(!i)if(Ht("history is uninitialized"),a===void 0){const u=e(a,{type:"@@redux-undo/CREATE_HISTORY"},...s);return l=ty(u,n.ignoreInitialState),Ht("do not set initialState on probe actions"),rr(l),l}else Sq(a)?(l=i=n.ignoreInitialState?a:Ao(a.past,a.present,a.future),Ht("initialHistory initialized: initialState is a history",i)):(l=i=ty(a,n.ignoreInitialState),Ht("initialHistory initialized: initialState is not a history",i));let c;switch(o.type){case void 0:return l;case n.undoType:return c=ny(l,-1),Ht("perform undo"),rr(c),r(c,o,...s);case n.redoType:return c=ny(l,1),Ht("perform redo"),rr(c),r(c,o,...s);case n.jumpToPastType:return c=AC(l,o.index),Ht(`perform jumpToPast to ${o.index}`),rr(c),r(c,o,...s);case n.jumpToFutureType:return c=xC(l,o.index),Ht(`perform jumpToFuture to ${o.index}`),rr(c),r(c,o,...s);case n.jumpType:return c=ny(l,o.index),Ht(`perform jump to ${o.index}`),rr(c),r(c,o,...s);case Rq(o.type,n.clearHistoryType):return c=ty(l.present,n.ignoreInitialState),Ht("perform clearHistory"),rr(c),r(c,o,...s);default:if(c=e(l.present,o,...s),n.initTypes.some(f=>f===o.type))return Ht("reset history due to init action"),rr(i),i;if(l._latestUnfiltered===c)return l;if(typeof n.filter=="function"&&!n.filter(o,c,l)){const f=Ao(l.past,c,l.future,l.group);return n.syncFilter||(f._latestUnfiltered=l._latestUnfiltered),Ht("filter ignored action, not storing it in past"),rr(f),f}const u=n.groupBy(o,c,l);if(u!=null&&u===l.group){const f=Ao(l.past,c,l.future,l.group);return Ht("groupBy grouped the action with the previous action"),rr(f),f}return l=Iq(l,c,n.limit,u),Ht("inserted new state into history"),rr(l),l}}}const EC=Math.min,_u=Math.max,_0=Math.round,ea=e=>({x:e,y:e}),Bq={left:"right",right:"left",bottom:"top",top:"bottom"},Fq={start:"end",end:"start"};function ry(e,t){return typeof e=="function"?e(t):e}function zs(e){return e.split("-")[0]}function C0(e){return e.split("-")[1]}function Mq(e){return e==="x"?"y":"x"}function SC(e){return e==="y"?"height":"width"}function iy(e){return["top","bottom"].includes(zs(e))?"y":"x"}function _C(e){return Mq(iy(e))}function Pq(e,t,n){n===void 0&&(n=!1);const r=C0(e),i=_C(e),a=SC(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=k0(o)),[o,k0(o)]}function Oq(e){const t=k0(e);return[ay(e),t,ay(t)]}function ay(e){return e.replace(/start|end/g,t=>Fq[t])}function Lq(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:o;default:return[]}}function Nq(e,t,n,r){const i=C0(e);let a=Lq(zs(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(ay)))),a}function k0(e){return e.replace(/left|right|bottom|top/g,t=>Bq[t])}function zq(e){return{top:0,right:0,bottom:0,left:0,...e}}function Uq(e){return typeof e!="number"?zq(e):{top:e,right:e,bottom:e,left:e}}function T0(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function CC(e,t,n){let{reference:r,floating:i}=e;const a=iy(t),o=_C(t),s=SC(o),l=zs(t),c=a==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[s]/2-i[s]/2;let d;switch(l){case"top":d={x:u,y:r.y-i.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(C0(t)){case"start":d[o]-=h*(n&&c?-1:1);break;case"end":d[o]+=h*(n&&c?-1:1);break}return d}const $q=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:f}=CC(c,r,l),h=r,d={},p=0;for(let g=0;g<s.length;g++){const{name:b,fn:y}=s[g],{x:w,y:A,data:x,reset:E}=await y({x:u,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:d,rects:c,platform:o,elements:{reference:e,floating:t}});u=w??u,f=A??f,d={...d,[b]:{...d[b],...x}},E&&p<=50&&(p++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:u,y:f}=CC(c,h,l)),g=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:d}};async function Hq(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=ry(t,e),p=Uq(d),b=s[h?f==="floating"?"reference":"floating":f],y=T0(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),w=f==="floating"?{...o.floating,x:r,y:i}:o.reference,A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),x=await(a.isElement==null?void 0:a.isElement(A))?await(a.getScale==null?void 0:a.getScale(A))||{x:1,y:1}:{x:1,y:1},E=T0(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:A,strategy:l}):w);return{top:(y.top-E.top+p.top)/x.y,bottom:(E.bottom-y.bottom+p.bottom)/x.y,left:(y.left-E.left+p.left)/x.x,right:(E.right-y.right+p.right)/x.x}}const Gq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...b}=ry(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=zs(i),w=zs(s)===s,A=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=h||(w||!g?[k0(s)]:Oq(s));!h&&p!=="none"&&x.push(...Nq(s,g,p,A));const E=[s,...x],_=await Hq(t,b),T=[];let D=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&T.push(_[y]),f){const oe=Pq(i,o,A);T.push(_[oe[0]],_[oe[1]])}if(D=[...D,{placement:i,overflows:T}],!T.every(oe=>oe<=0)){var P,G;const oe=(((P=a.flip)==null?void 0:P.index)||0)+1,ue=E[oe];if(ue)return{data:{index:oe,overflows:D},reset:{placement:ue}};let ne=(G=D.filter(pe=>pe.overflows[0]<=0).sort((pe,Re)=>pe.overflows[1]-Re.overflows[1])[0])==null?void 0:G.placement;if(!ne)switch(d){case"bestFit":{var N;const pe=(N=D.map(Re=>[Re.placement,Re.overflows.filter(xe=>xe>0).reduce((xe,nt)=>xe+nt,0)]).sort((Re,xe)=>Re[1]-xe[1])[0])==null?void 0:N[0];pe&&(ne=pe);break}case"initialPlacement":ne=s;break}if(i!==ne)return{reset:{placement:ne}}}return{}}}};async function Vq(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zs(n),s=C0(n),l=iy(n)==="y",c=["left","top"].includes(o)?-1:1,u=a&&l?-1:1,f=ry(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof p=="number"&&(d=s==="end"?p*-1:p),l?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const jq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await Vq(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}};function ta(e){return kC(e)?(e.nodeName||"").toLowerCase():"#document"}function yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function na(e){var t;return(t=(kC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kC(e){return e instanceof Node||e instanceof yn(e).Node}function oi(e){return e instanceof Element||e instanceof yn(e).Element}function Cr(e){return e instanceof HTMLElement||e instanceof yn(e).HTMLElement}function TC(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yn(e).ShadowRoot}function Cu(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function qq(e){return["table","td","th"].includes(ta(e))}function oy(e){const t=sy(),n=Rn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function IC(e){let t=Us(e);for(;Cr(t)&&!I0(t);){if(oy(t))return t;t=Us(t)}return null}function sy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function I0(e){return["html","body","#document"].includes(ta(e))}function Rn(e){return yn(e).getComputedStyle(e)}function R0(e){return oi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Us(e){if(ta(e)==="html")return e;const t=e.assignedSlot||e.parentNode||TC(e)&&e.host||na(e);return TC(t)?t.host:t}function RC(e){const t=Us(e);return I0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cr(t)&&Cu(t)?t:RC(t)}function ly(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=RC(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=yn(i);return a?t.concat(o,o.visualViewport||[],Cu(i)?i:[],o.frameElement&&n?ly(o.frameElement):[]):t.concat(i,ly(i,[],n))}function DC(e){const t=Rn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Cr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=_0(n)!==a||_0(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function BC(e){return oi(e)?e:e.contextElement}function $s(e){const t=BC(e);if(!Cr(t))return ea(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=DC(t);let o=(a?_0(n.width):n.width)/r,s=(a?_0(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const Wq=ea(0);function FC(e){const t=yn(e);return!sy()||!t.visualViewport?Wq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yn(e)?!1:t}function ku(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=BC(e);let o=ea(1);t&&(r?oi(r)&&(o=$s(r)):o=$s(e));const s=Yq(a,n,r)?FC(a):ea(0);let l=(i.left+s.x)/o.x,c=(i.top+s.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(a){const h=yn(a),d=r&&oi(r)?yn(r):r;let p=h.frameElement;for(;p&&r&&d!==h;){const g=$s(p),b=p.getBoundingClientRect(),y=Rn(p),w=b.left+(p.clientLeft+parseFloat(y.paddingLeft))*g.x,A=b.top+(p.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=w,c+=A,p=yn(p).frameElement}}return T0({width:u,height:f,x:l,y:c})}const Zq=[":popover-open",":modal"];function MC(e){let t=!1,n=0,r=0;function i(a){try{t=t||e.matches(a)}catch{}}if(Zq.forEach(a=>{i(a)}),t){const a=IC(e);if(a){const o=a.getBoundingClientRect();n=o.x,r=o.y}}return[t,n,r]}function Qq(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=na(r),[o]=t?MC(t.floating):[!1];if(r===a||o)return n;let s={scrollLeft:0,scrollTop:0},l=ea(1);const c=ea(0),u=Cr(r);if((u||!u&&i!=="fixed")&&((ta(r)!=="body"||Cu(a))&&(s=R0(r)),Cr(r))){const f=ku(r);l=$s(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-s.scrollLeft*l.x+c.x,y:n.y*l.y-s.scrollTop*l.y+c.y}}function Xq(e){return Array.from(e.getClientRects())}function PC(e){return ku(na(e)).left+R0(e).scrollLeft}function Kq(e){const t=na(e),n=R0(e),r=e.ownerDocument.body,i=_u(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_u(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+PC(e);const s=-n.scrollTop;return Rn(r).direction==="rtl"&&(o+=_u(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function Jq(e,t){const n=yn(e),r=na(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const c=sy();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s,y:l}}function eW(e,t){const n=ku(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Cr(e)?$s(e):ea(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=r*a.y;return{width:o,height:s,x:l,y:c}}function OC(e,t,n){let r;if(t==="viewport")r=Jq(e,n);else if(t==="document")r=Kq(na(e));else if(oi(t))r=eW(t,n);else{const i=FC(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return T0(r)}function LC(e,t){const n=Us(e);return n===t||!oi(n)||I0(n)?!1:Rn(n).position==="fixed"||LC(n,t)}function tW(e,t){const n=t.get(e);if(n)return n;let r=ly(e,[],!1).filter(s=>oi(s)&&ta(s)!=="body"),i=null;const a=Rn(e).position==="fixed";let o=a?Us(e):e;for(;oi(o)&&!I0(o);){const s=Rn(o),l=oy(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Cu(o)&&!l&&LC(e,o))?r=r.filter(u=>u!==o):i=s,o=Us(o)}return t.set(e,r),r}function nW(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?tW(t,this._c):[].concat(n),r],s=o[0],l=o.reduce((c,u)=>{const f=OC(t,u,i);return c.top=_u(f.top,c.top),c.right=EC(f.right,c.right),c.bottom=EC(f.bottom,c.bottom),c.left=_u(f.left,c.left),c},OC(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function rW(e){const{width:t,height:n}=DC(e);return{width:t,height:n}}function iW(e,t,n,r){const i=Cr(t),a=na(t),o=n==="fixed",s=ku(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=ea(0);if(i||!i&&!o)if((ta(t)!=="body"||Cu(a))&&(l=R0(t)),i){const g=ku(t,!0,o,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else a&&(c.x=PC(a));let u=s.left+l.scrollLeft-c.x,f=s.top+l.scrollTop-c.y;const[h,d,p]=MC(r);return h&&(u+=d,f+=p,i&&(u+=t.clientLeft,f+=t.clientTop)),{x:u,y:f,width:s.width,height:s.height}}function NC(e,t){return!Cr(e)||Rn(e).position==="fixed"?null:t?t(e):e.offsetParent}function zC(e,t){const n=yn(e);if(!Cr(e))return n;let r=NC(e,t);for(;r&&qq(r)&&Rn(r).position==="static";)r=NC(r,t);return r&&(ta(r)==="html"||ta(r)==="body"&&Rn(r).position==="static"&&!oy(r))?n:r||IC(e)||n}const aW=async function(e){const t=this.getOffsetParent||zC,n=this.getDimensions;return{reference:iW(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function oW(e){return Rn(e).direction==="rtl"}const sW={convertOffsetParentRelativeRectToViewportRelativeRect:Qq,getDocumentElement:na,getClippingRect:nW,getOffsetParent:zC,getElementRects:aW,getClientRects:Xq,getDimensions:rW,getScale:$s,isElement:oi,isRTL:oW},UC=Gq,lW=(e,t,n)=>{const r=new Map,i={platform:sW,...n},a={...i.platform,_c:r};return $q(e,t,{...i,platform:a})};let Dn;const Hs=[],cy=so(e=>e(),150,!1),uy={type:"divider"};function Tu(e){if((e==null?void 0:e.type)=="contextmenu"){e.preventDefault();return}Dn&&(Dn.remove(),Dn=void 0,document.body.classList.remove(Ha))}function $C(e){var t;if(!(e<1)){for(let n=e;n<Hs.length;n++)(t=Hs[n])==null||t.remove(),Hs[n]=void 0;for(const n of Hs[e-1].querySelectorAll("li.active"))n.classList.remove("active")}}const cW=()=>U`<li class="menu-divider"></li>`,uW=e=>U` <li class="menu-header">${e.label||"-"}</li> `,fW=(e,t)=>U`
2935
+ ${s()}`,i.content)}c(),i.content.querySelector("input").focus()}function Kb(e,t,n,r){const i=r.actions,a=t.attribute,o=r.sampleHierarchy,s=r.provenance.storeHelper.getDispatcher(),l=[];e&&l.push({label:e,type:"header"});const c=(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)=>l.push(...h.map(d=>c(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})),l.push(c(i.retainFirstNCategories({attribute:a,n:void 0}),!1,()=>xq(t,r)))),u(i.filterByNominal({attribute:a,values:[n]}),i.filterByNominal({attribute:a,remove:!0,values:[n]})),f!="identifier"&&l.push(c(i.retainMatched({attribute:a}),!o.groupMetadata.length))):(u(i.groupToQuartiles({attribute:a})),l.push({icon:lu,label:"Group by thresholds...",callback:()=>yq(t,r)}),Aq(n)?u(i.filterByQuantitative({attribute:a,operator:"gte",operand:+n}),i.filterByQuantitative({attribute:a,operator:"lte",operand:+n})):u(i.removeUndefined({attribute:a}))),l.push({icon:uo,label:"Advanced filter...",callback:()=>rj(t,r)}),l}function Aq(e){return e!=null&&e!==""&&!(typeof e=="number"&&isNaN(e))}const Tn={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"},xo={undo(){return{type:Tn.UNDO}},redo(){return{type:Tn.REDO}},jumpToFuture(e){return{type:Tn.JUMP_TO_FUTURE,index:e}},jumpToPast(e){return{type:Tn.JUMP_TO_PAST,index:e}},jump(e){return{type:Tn.JUMP,index:e}},clearHistory(){return{type:Tn.CLEAR_HISTORY}}};function wC(e,t=[]){return Array.isArray(e)?e:typeof e=="string"?[e]:t}function Eq(e){return typeof e.present<"u"&&typeof e.future<"u"&&typeof e.past<"u"&&Array.isArray(e.future)&&Array.isArray(e.past)}function Ao(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 S0,In;const Jb={prevState:"#9E9E9E",action:"#03A9F4",nextState:"#4CAF50"};function Sq(){In={header:[],prev:[],action:[],next:[],msgs:[]}}function _q(){const{header:e,prev:t,next:n,action:r,msgs:i}=In;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 ey(e,t,n){return[`%c${e}`,`color: ${t}; font-weight: bold`,n]}function Cq(e,t){Sq(),S0&&(console.group?(In.header=["%credux-undo","font-style: italic","action",e.type],In.action=ey("action",Jb.action,e),In.prev=ey("prev history",Jb.prevState,t)):(In.header=["redux-undo action",e.type],In.action=["action",e],In.prev=["prev history",t]))}function rr(e){S0&&(console.group?In.next=ey("next history",Jb.nextState,e):In.next=["next history",e],_q())}function Ht(...e){S0&&(In.msgs=In.msgs.concat([...e,`
2936
+ `]))}function kq(e){S0=e}function ty(e,t){const n=Ao([],e,[]);return t&&(n._latestUnfiltered=null),n}function Tq(e,t,n,r){const i=e.past.length+1;Ht("inserting",t),Ht("new free: ",n-i);const{past:a,_latestUnfiltered:o}=e,s=n&&n<=i,l=a.slice(s?1:0),c=o!=null?[...l,o]:l;return Ao(c,t,[],r)}function xC(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 Ao(a,o,s)}function AC(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 Ao(a,s,o)}function ny(e,t){return t>0?xC(e,t-1):t<0?AC(e,e.past.length+t):e}function Iq(e,t){return t.indexOf(e)>-1?e:!e}function Rq(e,t={}){kq(t.debug);const n={limit:void 0,filter:()=>!0,groupBy:()=>null,undoType:Tn.UNDO,redoType:Tn.REDO,jumpToPastType:Tn.JUMP_TO_PAST,jumpToFutureType:Tn.JUMP_TO_FUTURE,jumpType:Tn.JUMP,neverSkipReducer:!1,ignoreInitialState:!1,syncFilter:!1,...t,initTypes:wC(t.initTypes,["@@redux-undo/INIT"]),clearHistoryType:wC(t.clearHistoryType,[Tn.CLEAR_HISTORY])},r=n.neverSkipReducer?(a,o,...s)=>({...a,present:e(a.present,o,...s)}):a=>a;let i;return(a=i,o={},...s)=>{Cq(o,a);let l=a;if(!i)if(Ht("history is uninitialized"),a===void 0){const u=e(a,{type:"@@redux-undo/CREATE_HISTORY"},...s);return l=ty(u,n.ignoreInitialState),Ht("do not set initialState on probe actions"),rr(l),l}else Eq(a)?(l=i=n.ignoreInitialState?a:Ao(a.past,a.present,a.future),Ht("initialHistory initialized: initialState is a history",i)):(l=i=ty(a,n.ignoreInitialState),Ht("initialHistory initialized: initialState is not a history",i));let c;switch(o.type){case void 0:return l;case n.undoType:return c=ny(l,-1),Ht("perform undo"),rr(c),r(c,o,...s);case n.redoType:return c=ny(l,1),Ht("perform redo"),rr(c),r(c,o,...s);case n.jumpToPastType:return c=AC(l,o.index),Ht(`perform jumpToPast to ${o.index}`),rr(c),r(c,o,...s);case n.jumpToFutureType:return c=xC(l,o.index),Ht(`perform jumpToFuture to ${o.index}`),rr(c),r(c,o,...s);case n.jumpType:return c=ny(l,o.index),Ht(`perform jump to ${o.index}`),rr(c),r(c,o,...s);case Iq(o.type,n.clearHistoryType):return c=ty(l.present,n.ignoreInitialState),Ht("perform clearHistory"),rr(c),r(c,o,...s);default:if(c=e(l.present,o,...s),n.initTypes.some(f=>f===o.type))return Ht("reset history due to init action"),rr(i),i;if(l._latestUnfiltered===c)return l;if(typeof n.filter=="function"&&!n.filter(o,c,l)){const f=Ao(l.past,c,l.future,l.group);return n.syncFilter||(f._latestUnfiltered=l._latestUnfiltered),Ht("filter ignored action, not storing it in past"),rr(f),f}const u=n.groupBy(o,c,l);if(u!=null&&u===l.group){const f=Ao(l.past,c,l.future,l.group);return Ht("groupBy grouped the action with the previous action"),rr(f),f}return l=Tq(l,c,n.limit,u),Ht("inserted new state into history"),rr(l),l}}}const EC=Math.min,_u=Math.max,_0=Math.round,ea=e=>({x:e,y:e}),Dq={left:"right",right:"left",bottom:"top",top:"bottom"},Bq={start:"end",end:"start"};function ry(e,t){return typeof e=="function"?e(t):e}function zs(e){return e.split("-")[0]}function C0(e){return e.split("-")[1]}function Fq(e){return e==="x"?"y":"x"}function SC(e){return e==="y"?"height":"width"}function iy(e){return["top","bottom"].includes(zs(e))?"y":"x"}function _C(e){return Fq(iy(e))}function Mq(e,t,n){n===void 0&&(n=!1);const r=C0(e),i=_C(e),a=SC(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=k0(o)),[o,k0(o)]}function Pq(e){const t=k0(e);return[ay(e),t,ay(t)]}function ay(e){return e.replace(/start|end/g,t=>Bq[t])}function Oq(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:o;default:return[]}}function Lq(e,t,n,r){const i=C0(e);let a=Oq(zs(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(ay)))),a}function k0(e){return e.replace(/left|right|bottom|top/g,t=>Dq[t])}function Nq(e){return{top:0,right:0,bottom:0,left:0,...e}}function zq(e){return typeof e!="number"?Nq(e):{top:e,right:e,bottom:e,left:e}}function T0(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function CC(e,t,n){let{reference:r,floating:i}=e;const a=iy(t),o=_C(t),s=SC(o),l=zs(t),c=a==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[s]/2-i[s]/2;let d;switch(l){case"top":d={x:u,y:r.y-i.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(C0(t)){case"start":d[o]-=h*(n&&c?-1:1);break;case"end":d[o]+=h*(n&&c?-1:1);break}return d}const Uq=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:f}=CC(c,r,l),h=r,d={},p=0;for(let g=0;g<s.length;g++){const{name:b,fn:y}=s[g],{x:w,y:A,data:x,reset:E}=await y({x:u,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:d,rects:c,platform:o,elements:{reference:e,floating:t}});u=w??u,f=A??f,d={...d,[b]:{...d[b],...x}},E&&p<=50&&(p++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:u,y:f}=CC(c,h,l)),g=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:d}};async function $q(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=ry(t,e),p=zq(d),b=s[h?f==="floating"?"reference":"floating":f],y=T0(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),w=f==="floating"?{...o.floating,x:r,y:i}:o.reference,A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),x=await(a.isElement==null?void 0:a.isElement(A))?await(a.getScale==null?void 0:a.getScale(A))||{x:1,y:1}:{x:1,y:1},E=T0(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:A,strategy:l}):w);return{top:(y.top-E.top+p.top)/x.y,bottom:(E.bottom-y.bottom+p.bottom)/x.y,left:(y.left-E.left+p.left)/x.x,right:(E.right-y.right+p.right)/x.x}}const Hq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...b}=ry(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=zs(i),w=zs(s)===s,A=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=h||(w||!g?[k0(s)]:Pq(s));!h&&p!=="none"&&x.push(...Lq(s,g,p,A));const E=[s,...x],_=await $q(t,b),T=[];let D=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&T.push(_[y]),f){const oe=Mq(i,o,A);T.push(_[oe[0]],_[oe[1]])}if(D=[...D,{placement:i,overflows:T}],!T.every(oe=>oe<=0)){var P,G;const oe=(((P=a.flip)==null?void 0:P.index)||0)+1,ue=E[oe];if(ue)return{data:{index:oe,overflows:D},reset:{placement:ue}};let ne=(G=D.filter(pe=>pe.overflows[0]<=0).sort((pe,Re)=>pe.overflows[1]-Re.overflows[1])[0])==null?void 0:G.placement;if(!ne)switch(d){case"bestFit":{var N;const pe=(N=D.map(Re=>[Re.placement,Re.overflows.filter(xe=>xe>0).reduce((xe,nt)=>xe+nt,0)]).sort((Re,xe)=>Re[1]-xe[1])[0])==null?void 0:N[0];pe&&(ne=pe);break}case"initialPlacement":ne=s;break}if(i!==ne)return{reset:{placement:ne}}}return{}}}};async function Gq(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zs(n),s=C0(n),l=iy(n)==="y",c=["left","top"].includes(o)?-1:1,u=a&&l?-1:1,f=ry(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof p=="number"&&(d=s==="end"?p*-1:p),l?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const Vq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await Gq(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}};function ta(e){return kC(e)?(e.nodeName||"").toLowerCase():"#document"}function yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function na(e){var t;return(t=(kC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kC(e){return e instanceof Node||e instanceof yn(e).Node}function oi(e){return e instanceof Element||e instanceof yn(e).Element}function Cr(e){return e instanceof HTMLElement||e instanceof yn(e).HTMLElement}function TC(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yn(e).ShadowRoot}function Cu(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function jq(e){return["table","td","th"].includes(ta(e))}function oy(e){const t=sy(),n=Rn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function IC(e){let t=Us(e);for(;Cr(t)&&!I0(t);){if(oy(t))return t;t=Us(t)}return null}function sy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function I0(e){return["html","body","#document"].includes(ta(e))}function Rn(e){return yn(e).getComputedStyle(e)}function R0(e){return oi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Us(e){if(ta(e)==="html")return e;const t=e.assignedSlot||e.parentNode||TC(e)&&e.host||na(e);return TC(t)?t.host:t}function RC(e){const t=Us(e);return I0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cr(t)&&Cu(t)?t:RC(t)}function ly(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=RC(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=yn(i);return a?t.concat(o,o.visualViewport||[],Cu(i)?i:[],o.frameElement&&n?ly(o.frameElement):[]):t.concat(i,ly(i,[],n))}function DC(e){const t=Rn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Cr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=_0(n)!==a||_0(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function BC(e){return oi(e)?e:e.contextElement}function $s(e){const t=BC(e);if(!Cr(t))return ea(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=DC(t);let o=(a?_0(n.width):n.width)/r,s=(a?_0(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const qq=ea(0);function FC(e){const t=yn(e);return!sy()||!t.visualViewport?qq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Wq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yn(e)?!1:t}function ku(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=BC(e);let o=ea(1);t&&(r?oi(r)&&(o=$s(r)):o=$s(e));const s=Wq(a,n,r)?FC(a):ea(0);let l=(i.left+s.x)/o.x,c=(i.top+s.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(a){const h=yn(a),d=r&&oi(r)?yn(r):r;let p=h.frameElement;for(;p&&r&&d!==h;){const g=$s(p),b=p.getBoundingClientRect(),y=Rn(p),w=b.left+(p.clientLeft+parseFloat(y.paddingLeft))*g.x,A=b.top+(p.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=w,c+=A,p=yn(p).frameElement}}return T0({width:u,height:f,x:l,y:c})}const Yq=[":popover-open",":modal"];function MC(e){let t=!1,n=0,r=0;function i(a){try{t=t||e.matches(a)}catch{}}if(Yq.forEach(a=>{i(a)}),t){const a=IC(e);if(a){const o=a.getBoundingClientRect();n=o.x,r=o.y}}return[t,n,r]}function Zq(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=na(r),[o]=t?MC(t.floating):[!1];if(r===a||o)return n;let s={scrollLeft:0,scrollTop:0},l=ea(1);const c=ea(0),u=Cr(r);if((u||!u&&i!=="fixed")&&((ta(r)!=="body"||Cu(a))&&(s=R0(r)),Cr(r))){const f=ku(r);l=$s(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-s.scrollLeft*l.x+c.x,y:n.y*l.y-s.scrollTop*l.y+c.y}}function Qq(e){return Array.from(e.getClientRects())}function PC(e){return ku(na(e)).left+R0(e).scrollLeft}function Xq(e){const t=na(e),n=R0(e),r=e.ownerDocument.body,i=_u(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_u(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+PC(e);const s=-n.scrollTop;return Rn(r).direction==="rtl"&&(o+=_u(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function Kq(e,t){const n=yn(e),r=na(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const c=sy();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s,y:l}}function Jq(e,t){const n=ku(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Cr(e)?$s(e):ea(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=r*a.y;return{width:o,height:s,x:l,y:c}}function OC(e,t,n){let r;if(t==="viewport")r=Kq(e,n);else if(t==="document")r=Xq(na(e));else if(oi(t))r=Jq(t,n);else{const i=FC(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return T0(r)}function LC(e,t){const n=Us(e);return n===t||!oi(n)||I0(n)?!1:Rn(n).position==="fixed"||LC(n,t)}function eW(e,t){const n=t.get(e);if(n)return n;let r=ly(e,[],!1).filter(s=>oi(s)&&ta(s)!=="body"),i=null;const a=Rn(e).position==="fixed";let o=a?Us(e):e;for(;oi(o)&&!I0(o);){const s=Rn(o),l=oy(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Cu(o)&&!l&&LC(e,o))?r=r.filter(u=>u!==o):i=s,o=Us(o)}return t.set(e,r),r}function tW(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?eW(t,this._c):[].concat(n),r],s=o[0],l=o.reduce((c,u)=>{const f=OC(t,u,i);return c.top=_u(f.top,c.top),c.right=EC(f.right,c.right),c.bottom=EC(f.bottom,c.bottom),c.left=_u(f.left,c.left),c},OC(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function nW(e){const{width:t,height:n}=DC(e);return{width:t,height:n}}function rW(e,t,n,r){const i=Cr(t),a=na(t),o=n==="fixed",s=ku(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=ea(0);if(i||!i&&!o)if((ta(t)!=="body"||Cu(a))&&(l=R0(t)),i){const g=ku(t,!0,o,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else a&&(c.x=PC(a));let u=s.left+l.scrollLeft-c.x,f=s.top+l.scrollTop-c.y;const[h,d,p]=MC(r);return h&&(u+=d,f+=p,i&&(u+=t.clientLeft,f+=t.clientTop)),{x:u,y:f,width:s.width,height:s.height}}function NC(e,t){return!Cr(e)||Rn(e).position==="fixed"?null:t?t(e):e.offsetParent}function zC(e,t){const n=yn(e);if(!Cr(e))return n;let r=NC(e,t);for(;r&&jq(r)&&Rn(r).position==="static";)r=NC(r,t);return r&&(ta(r)==="html"||ta(r)==="body"&&Rn(r).position==="static"&&!oy(r))?n:r||IC(e)||n}const iW=async function(e){const t=this.getOffsetParent||zC,n=this.getDimensions;return{reference:rW(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function aW(e){return Rn(e).direction==="rtl"}const oW={convertOffsetParentRelativeRectToViewportRelativeRect:Zq,getDocumentElement:na,getClippingRect:tW,getOffsetParent:zC,getElementRects:iW,getClientRects:Qq,getDimensions:nW,getScale:$s,isElement:oi,isRTL:aW},UC=Hq,sW=(e,t,n)=>{const r=new Map,i={platform:oW,...n},a={...i.platform,_c:r};return Uq(e,t,{...i,platform:a})};let Dn;const Hs=[],cy=so(e=>e(),150,!1),uy={type:"divider"};function Tu(e){if((e==null?void 0:e.type)=="contextmenu"){e.preventDefault();return}Dn&&(Dn.remove(),Dn=void 0,document.body.classList.remove(Ha))}function $C(e){var t;if(!(e<1)){for(let n=e;n<Hs.length;n++)(t=Hs[n])==null||t.remove(),Hs[n]=void 0;for(const n of Hs[e-1].querySelectorAll("li.active"))n.classList.remove("active")}}const lW=()=>U`<li class="menu-divider"></li>`,cW=e=>U` <li class="menu-header">${e.label||"-"}</li> `,uW=(e,t)=>U`
2932
2937
  <li>
2933
2938
  <div
2934
2939
  class="submenu-item"
2935
- @mouseenter=${n=>cy(()=>{const r=n.target.closest("li"),i=typeof e.submenu=="function"?e.submenu():e.submenu;pW(i,r,t+1),n.stopPropagation()})}
2940
+ @mouseenter=${n=>cy(()=>{const r=n.target.closest("li"),i=typeof e.submenu=="function"?e.submenu():e.submenu;dW(i,r,t+1),n.stopPropagation()})}
2936
2941
  @mouseleave=${()=>cy(()=>$C(t+1))}
2937
2942
  >
2938
2943
  ${e.customContent?e.customContent:U`<span>${e.label}</span>`}
2939
2944
  </div>
2940
2945
  </li>
2941
- `,hW=e=>U`
2946
+ `,fW=e=>U`
2942
2947
  <li>
2943
2948
  <a
2944
2949
  class="choice-item"
@@ -2955,17 +2960,17 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2955
2960
  class="menu-ellipsis"
2956
2961
  @click=${e.ellipsisCallback}
2957
2962
  >
2958
- ${$e(sG).node[0]}
2963
+ ${$e(oG).node[0]}
2959
2964
  </a>`:he}
2960
2965
  </li>
2961
- `,dW=e=>U`
2966
+ `,hW=e=>U`
2962
2967
  <li>
2963
2968
  <span class="disabled-item">
2964
2969
  ${e.icon?$e(e.icon).node[0]:""}
2965
2970
  ${e.label||"-"}</span
2966
2971
  >
2967
2972
  </li>
2968
- `;function fy(e,t=1){switch(e.type){case"divider":return cW();case"header":return uW(e);default:return e.submenu?fW(e,t):e.customContent?e.customContent:e.callback?hW(e):dW(e)}}function pW(e,t,n){HC(e,t,n,"right-start"),t.classList.add("active")}function HC(e,t,n,r){const i=document.createElement("ul");i.classList.add("gs-context-menu"),i.addEventListener("mouseenter",()=>{cy(()=>{})}),i.addEventListener("mouseup",o=>o.stopPropagation()),i.addEventListener("click",o=>o.stopPropagation()),Bt(e.map(o=>fy(o,n)),i),Dn.appendChild(i),$C(n),Hs[n]=i,r??(r="right-start");const a=!/^(top|bottom)/.test(r);lW(t,i,{placement:r,middleware:n<1&&a?[jq(2),UC()]:[UC()]}).then(({x:o,y:s})=>{const l=i.querySelector(":scope > li");l&&a&&(s-=l.getBoundingClientRect().top),i.style.left=`${o}px`,i.style.top=`${s}px`})}let GC;function gW(){const e=document.body,t=performance.now();Dn=document.createElement("div"),Dn.classList.add("gs-context-menu-backdrop"),Dn.addEventListener("click",Tu),Dn.addEventListener("contextmenu",Tu),Dn.addEventListener("mouseup",()=>{performance.now()-t>500&&Tu()},{once:!0}),e.appendChild(Dn),document.body.classList.add(Ha)}function hy(e,t,n){n??(n="bottom-start"),Dn&&GC!==t&&Tu(),GC=t,Dn?Bt(e.items.map(i=>fy(i,0)),Hs[0]):(gW(),HC(e.items,t,0,n))}function dy(e,t){hy(e,mW(t),"right-start"),t.preventDefault()}function mW(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 py={NOMINAL:"nominal",ORDINAL:"ordinal",QUANTITATIVE:"quantitative"},D0="SAMPLE_ATTRIBUTE",VC="SAMPLE_NAME",bW=/^attribute-(.*)$/;class jC extends Ds{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");H(this,Wp);H(this,Yp);H(this,Zp);H(this,Qp);H(this,Xo);H(this,Xp);H(this,tt,void 0);ie(this,tt,n),this._attributeHighlighState={backgroundOpacity:1,currentAttribute:void 0,abortController:new AbortController},B(this,tt).compositeAttributeInfoSource.addAttributeInfoSource(D0,i=>this.children.map(Y(this,Xo,dh).bind(this)).find(a=>a&&a.name==i.specifier)),B(this,tt).compositeAttributeInfoSource.addAttributeInfoSource(VC,i=>qC),this.addInteractionEventListener("contextmenu",this.handleContextMenu.bind(this)),this.addInteractionEventListener("mousemove",(i,a)=>{var c;const o=a.target,s=B(this,tt).findSampleForMouseEvent(i,a),l=o&&((c=Y(this,Xo,dh).call(this,o))==null?void 0:c.name)||void 0;if(s){const u=JSON.stringify([s.id,l]);this.context.updateTooltip(u,f=>Promise.resolve(Y(this,Xp,bR).call(this,f)))}this._handleAttributeHighlight(l)}),_n([...B(this,tt).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:B(this,tt).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:fU,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=B(this,tt).sampleHierarchy.sampleData)==null?void 0:r.entities[n]}handleContextMenu(n,r){const i=r.uiEvent,a=B(this,tt).findSampleForMouseEvent(n,r);if(!a){i.preventDefault();return}const o=[B(this,tt).makePeekMenuItem(),uy],s=Y(this,Xo,dh).call(this,r.target);if(s){const l=a.attributes[s.name];o.push(...Kb(U`Attribute: <strong>${s.name}</strong>`,s,l,B(this,tt)))}else o.push(...Kb(U`Sample: <strong>${a.displayName}</strong>`,qC,a.id,B(this,tt)));dy({items:o},i)}setSamples(n){if(this.childCount)throw new Error("Children are already created!");this._createViews();const r=this.context.dataFlow;H4(this,r);const i=r.findDataSourceByKey(this);i.visit(o=>o.initialize());const a=[];this.visit(o=>{if(o instanceof bt){const s=o.mark;s.initializeEncoders(),a.push(s.initializeGraphics().then(l=>s)),r.addObserver(l=>{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(vW(B(this,tt).spec.samples),this,this));for(const r of this.getAttributeNames()){const i=this.context.createView(Y(this,Zp,gR).call(this,r),this,this);i.opacityFunction=a=>a*Y(this,Wp,dR).call(this,r),n.push(i)}this.setChildren(n);for(const r of this.getDescendants())r instanceof bt&&r.name.startsWith("title")&&typeof r.spec.mark!="string"&&(r.spec.mark.clip="never");V4(this)}getAttributeNames(){return this._cache("attributeNames",()=>[...B(this,tt).getSamples().flatMap(i=>Object.keys(i.attributes)).reduce((i,a)=>i.add(a),new Set)])}getAttributeInfo(n){return Y(this,Xo,dh).call(this,Y(this,Qp,mR).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==N1||a.type==z1)&&B(this,tt).getSamples().find(s=>s.attributes[a.name]==r)){const s=B(this,tt).actions.filterByNominal({attribute:{type:D0,specifier:i},values:[r]}),l=B(this,tt).provenance.getPresentState().lastAction,c=B(this,tt).actions.filterByNominal.match(l)&&!l.payload.remove&&l.payload.attribute.type==D0&&l.payload.attribute.specifier==i&&l.payload.values.length==1;return B(this,tt).provenance.storeHelper.dispatch(c?[xo.undo(),s]:s),!0}}return!1}isPickingSupported(){return!1}}tt=new WeakMap,Wp=new WeakSet,dR=function(n){const r=this._attributeHighlighState;return n==r.currentAttribute?1:r.backgroundOpacity},Yp=new WeakSet,pR=function(n){var r,i;return(i=(r=B(this,tt).spec.samples)==null?void 0:r.attributes)==null?void 0:i[n]},Zp=new WeakSet,gR=function(n){const r=Y(this,Yp,pR).call(this,n);let i=r?r.type:void 0;if(!i){const a=B(this,tt).getSamples();switch(sx(a.map(o=>o.attributes[n]))){case"integer":case"number":i=py.QUANTITATIVE;break;default:i=py.NOMINAL}}return yW(n,{...r||{},type:i},B(this,tt).spec.samples)},Qp=new WeakSet,mR=function(n){return this.children[this.getAttributeNames().indexOf(n)+1]},Xo=new WeakSet,dh=function(n){const r=n==null?void 0:n.name.match(bW);if(r){const i=n.getScaleResolution("color"),a=r[1];return{name:a,attribute:{type:D0,specifier:a},accessor:(o,s)=>s.sampleData.entities[o].attributes[a],type:i.type,scale:i.scale,title:U`<em class="attribute">${a}</em>`}}},Xp=new WeakSet,bR=function(n){const[r,i]=JSON.parse(n),a=this.getSample(r),o=(l,c)=>wW(c)?this.getAttributeInfo(l).scale(c):"transparent",s=U`
2973
+ `;function fy(e,t=1){switch(e.type){case"divider":return lW();case"header":return cW(e);default:return e.submenu?uW(e,t):e.customContent?e.customContent:e.callback?fW(e):hW(e)}}function dW(e,t,n){HC(e,t,n,"right-start"),t.classList.add("active")}function HC(e,t,n,r){const i=document.createElement("ul");i.classList.add("gs-context-menu"),i.addEventListener("mouseenter",()=>{cy(()=>{})}),i.addEventListener("mouseup",o=>o.stopPropagation()),i.addEventListener("click",o=>o.stopPropagation()),Bt(e.map(o=>fy(o,n)),i),Dn.appendChild(i),$C(n),Hs[n]=i,r??(r="right-start");const a=!/^(top|bottom)/.test(r);sW(t,i,{placement:r,middleware:n<1&&a?[Vq(2),UC()]:[UC()]}).then(({x:o,y:s})=>{const l=i.querySelector(":scope > li");l&&a&&(s-=l.getBoundingClientRect().top),i.style.left=`${o}px`,i.style.top=`${s}px`})}let GC;function pW(){const e=document.body,t=performance.now();Dn=document.createElement("div"),Dn.classList.add("gs-context-menu-backdrop"),Dn.addEventListener("click",Tu),Dn.addEventListener("contextmenu",Tu),Dn.addEventListener("mouseup",()=>{performance.now()-t>500&&Tu()},{once:!0}),e.appendChild(Dn),document.body.classList.add(Ha)}function hy(e,t,n){n??(n="bottom-start"),Dn&&GC!==t&&Tu(),GC=t,Dn?Bt(e.items.map(i=>fy(i,0)),Hs[0]):(pW(),HC(e.items,t,0,n))}function dy(e,t){hy(e,gW(t),"right-start"),t.preventDefault()}function gW(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 py={NOMINAL:"nominal",ORDINAL:"ordinal",QUANTITATIVE:"quantitative"},D0="SAMPLE_ATTRIBUTE",VC="SAMPLE_NAME",mW=/^attribute-(.*)$/;class jC extends Ds{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");H(this,Wp);H(this,Yp);H(this,Zp);H(this,Qp);H(this,Xo);H(this,Xp);H(this,tt,void 0);ie(this,tt,n),this._attributeHighlighState={backgroundOpacity:1,currentAttribute:void 0,abortController:new AbortController},B(this,tt).compositeAttributeInfoSource.addAttributeInfoSource(D0,i=>this.children.map(Y(this,Xo,dh).bind(this)).find(a=>a&&a.name==i.specifier)),B(this,tt).compositeAttributeInfoSource.addAttributeInfoSource(VC,i=>qC),this.addInteractionEventListener("contextmenu",this.handleContextMenu.bind(this)),this.addInteractionEventListener("mousemove",(i,a)=>{var c;const o=a.target,s=B(this,tt).findSampleForMouseEvent(i,a),l=o&&((c=Y(this,Xo,dh).call(this,o))==null?void 0:c.name)||void 0;if(s){const u=JSON.stringify([s.id,l]);this.context.updateTooltip(u,f=>Promise.resolve(Y(this,Xp,bR).call(this,f)))}this._handleAttributeHighlight(l)}),_n([...B(this,tt).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:B(this,tt).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:uU,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=B(this,tt).sampleHierarchy.sampleData)==null?void 0:r.entities[n]}handleContextMenu(n,r){const i=r.uiEvent,a=B(this,tt).findSampleForMouseEvent(n,r);if(!a){i.preventDefault();return}const o=[B(this,tt).makePeekMenuItem(),uy],s=Y(this,Xo,dh).call(this,r.target);if(s){const l=a.attributes[s.name];o.push(...Kb(U`Attribute: <strong>${s.name}</strong>`,s,l,B(this,tt)))}else o.push(...Kb(U`Sample: <strong>${a.displayName}</strong>`,qC,a.id,B(this,tt)));dy({items:o},i)}setSamples(n){if(this.childCount)throw new Error("Children are already created!");this._createViews();const r=this.context.dataFlow;H4(this,r);const i=r.findDataSourceByKey(this);i.visit(o=>o.initialize());const a=[];this.visit(o=>{if(o instanceof bt){const s=o.mark;s.initializeEncoders(),a.push(s.initializeGraphics().then(l=>s)),r.addObserver(l=>{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(yW(B(this,tt).spec.samples),this,this));for(const r of this.getAttributeNames()){const i=this.context.createView(Y(this,Zp,gR).call(this,r),this,this);i.opacityFunction=a=>a*Y(this,Wp,dR).call(this,r),n.push(i)}this.setChildren(n);for(const r of this.getDescendants())r instanceof bt&&r.name.startsWith("title")&&typeof r.spec.mark!="string"&&(r.spec.mark.clip="never");V4(this)}getAttributeNames(){return this._cache("attributeNames",()=>[...B(this,tt).getSamples().flatMap(i=>Object.keys(i.attributes)).reduce((i,a)=>i.add(a),new Set)])}getAttributeInfo(n){return Y(this,Xo,dh).call(this,Y(this,Qp,mR).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==N1||a.type==z1)&&B(this,tt).getSamples().find(s=>s.attributes[a.name]==r)){const s=B(this,tt).actions.filterByNominal({attribute:{type:D0,specifier:i},values:[r]}),l=B(this,tt).provenance.getPresentState().lastAction,c=B(this,tt).actions.filterByNominal.match(l)&&!l.payload.remove&&l.payload.attribute.type==D0&&l.payload.attribute.specifier==i&&l.payload.values.length==1;return B(this,tt).provenance.storeHelper.dispatch(c?[xo.undo(),s]:s),!0}}return!1}isPickingSupported(){return!1}}tt=new WeakMap,Wp=new WeakSet,dR=function(n){const r=this._attributeHighlighState;return n==r.currentAttribute?1:r.backgroundOpacity},Yp=new WeakSet,pR=function(n){var r,i;return(i=(r=B(this,tt).spec.samples)==null?void 0:r.attributes)==null?void 0:i[n]},Zp=new WeakSet,gR=function(n){const r=Y(this,Yp,pR).call(this,n);let i=r?r.type:void 0;if(!i){const a=B(this,tt).getSamples();switch(sx(a.map(o=>o.attributes[n]))){case"integer":case"number":i=py.QUANTITATIVE;break;default:i=py.NOMINAL}}return bW(n,{...r||{},type:i},B(this,tt).spec.samples)},Qp=new WeakSet,mR=function(n){return this.children[this.getAttributeNames().indexOf(n)+1]},Xo=new WeakSet,dh=function(n){const r=n==null?void 0:n.name.match(mW);if(r){const i=n.getScaleResolution("color"),a=r[1];return{name:a,attribute:{type:D0,specifier:a},accessor:(o,s)=>s.sampleData.entities[o].attributes[a],type:i.type,scale:i.scale,title:U`<em class="attribute">${a}</em>`}}},Xp=new WeakSet,bR=function(n){const[r,i]=JSON.parse(n),a=this.getSample(r),o=(l,c)=>vW(c)?this.getAttributeInfo(l).scale(c):"transparent",s=U`
2969
2974
  <table class="attributes">
2970
2975
  ${Object.entries(a.attributes).map(([l,c])=>U`
2971
2976
  <tr class=${nb({hovered:l==i})}>
@@ -2983,24 +2988,24 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2983
2988
  <strong>${a.displayName||a.id}</strong>
2984
2989
  </div>
2985
2990
  ${s}
2986
- `};function yW(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==py.QUANTITATIVE&&(i.encoding.x={field:`attributes["${e}"]`,type:t.type,scale:t.barScale,axis:null}),i}function vW(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 wW(e){return e!==""&&!(typeof e=="number"&&isNaN(e))&&e!==null}const qC=Object.freeze({name:"sample",attribute:{type:VC},accessor:e=>e,type:"identifier",scale:void 0});class xW extends lo{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:ki(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");H(this,Kp);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 l=s.datum._rawGroup;let c;for(const d of Xb(this.sampleView.sampleHierarchy.rootGroup))if(d.at(-1)===l){c=d.slice(1);break}const u=n.actions.removeGroup({path:c.map(d=>d.name)}),f=n.provenance.getActionInfo(u),h=n.provenance.storeHelper.getDispatcher();dy({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 l of n)a.push(1-(l.locSize.location+l.locSize.size)/r),a.push(1-l.locSize.location/r);i.scale.range(a)}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=Y(this,Kp,yR).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(),_n([...this.getLayoutAncestors()]).visit(s=>Kc(s,"size"))}}Kp=new WeakSet,yR=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?Ue(i)?i:(Bt(i,n),n.textContent.replace(/\s+/g," ").trim()):"unknown"})};class AW{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 B0(e,t,n){let r=n&&e(n);return i=>{const a=e(i);a!==r&&(t(a,r),r=a)}}class EW{constructor(t){H(this,th);H(this,Vn,0);H(this,_a,0);H(this,Ko,0);H(this,Gl,void 0);H(this,Vl,void 0);H(this,wi,void 0);H(this,jl,void 0);H(this,It,void 0);ie(this,It,t)}isCloseup(){return B(this,Vn)===1}resetLocations(){ie(this,wi,void 0)}reset(){ie(this,Vn,0),this.resetLocations()}handleWheelEvent(t){ie(this,_a,Wr(B(this,_a)+t.deltaY,0,B(this,Ko)-B(this,It).getHeight()))}togglePeek(t,n,r){if(B(this,Vn)>0&&B(this,Vn)<1||t!==void 0&&t==!!B(this,Vn))return;const i=B(this,It).viewContext,a=B(this,It).getHeight(),o={requestAnimationFrame:s=>i.animator.requestTransition(s),onUpdate:s=>{ie(this,Vn,Math.pow(s,2)),Y(this,th,cw).call(this),i.animator.requestRender()},from:B(this,Vn)};if(B(this,Vn)==0){let s;if(r)s=(c=>c.location+c.size/2)(B(this,jl).samples.find(c=>c.key==r).locSize);else{const l=this.getSummaryAt(n);l&&(s=B(this,jl).summaries[l.index].locSize.location-(l.location.locSize.location-n))}s?ie(this,_a,s-n):ie(this,_a,(B(this,Ko)-a)/2),B(this,Ko)>a?Hd({...o,to:1,duration:500,easingFunction:gU}):Hd({...o,from:0,to:1,duration:300,easingFunction:c=>(1-Math.pow(c*2-1,2))*.5})}else Hd({...o,to:0,duration:400,easingFunction:hU})}getLocations(){if(B(this,wi))return B(this,wi);const t=B(this,It).getHeight();if(!t)return;const n=B(this,It).getSampleHierarchy(),r=Qb(n),i=B(this,It).getSummaryHeight(),a=WC(r,{viewHeight:t,groupSpacing:5,summaryHeight:i}),o=WC(r,{sampleHeight:35,groupSpacing:15,summaryHeight:i}),s=()=>-B(this,_a),l=()=>B(this,Vn);ie(this,jl,o),ie(this,Ko,o.summaries.map(f=>f.locSize.location+f.locSize.size).reduce((f,h)=>Math.max(f,h),0));const c=(f,h)=>{const d=[];for(let p=0;p<f.length;p++){const g=f[p].key;d.push({key:g,locSize:CU(f[p].locSize,kU(h[p].locSize,s),l)})}return d},u=c(a.groups,o.groups);return ie(this,wi,{samples:c(a.samples,o.samples),summaries:c(a.summaries,o.summaries),groups:u}),Y(this,th,cw).call(this),B(this,wi)}getGroupBackgroundRects(t){const n=this.getLocations().groups,r=n.map(s=>s.key.depth).reduce((s,l)=>Math.max(s,l),0),i=n.filter(s=>s.key.depth==r),a=B(this,It).getSummaryHeight();t=t.flatten();const o=B(this,It).isStickySummaries()&&a>0?t.shrink(new Ct(a,0,0,0)):t;return[...i.values()].map(s=>{const l=()=>{const c=s.locSize.location;return t.y+c+a};return{coords:t.modify({y:l,height:()=>s.locSize.size-a}).intersect(o),clipRect:o}})}updateFacetTexture(){const t=B(this,It).getSampleHierarchy().sampleData;if(!B(this,Vl)){const a=t&&Object.values(t.entities);ie(this,Vl,new Float32Array(Math.ceil(a.length*2/4)*4))}const n=B(this,Vl);n.fill(0);const r=t==null?void 0:t.entities;if(r){const a=this.getLocations().samples,o=B(this,It).getHeight();for(const s of a){const l=r[s.key].indexNumber;n[l*2+0]=s.locSize.location/o,n[l*2+1]=s.locSize.size/o}}const i=B(this,It).viewContext.glHelper.gl;ie(this,Gl,eu(i,{internalFormat:i.RG32F,format:i.RG,height:1},n,B(this,Gl)))}getFacetTexture(){return B(this,Gl)}getSummaryAt(t){const n=this.getLocations().summaries,r=n.findIndex(i=>x4(i.locSize,t));return r>=0?{index:r,location:n[r]}:void 0}clipBySummary(t){if(B(this,It).isStickySummaries()){const n=B(this,It).getSummaryHeight();if(n>0)return t.modify({y:()=>t.y+n,height:()=>t.height-n})}return t}}Vn=new WeakMap,_a=new WeakMap,Ko=new WeakMap,Gl=new WeakMap,Vl=new WeakMap,wi=new WeakMap,jl=new WeakMap,It=new WeakMap,th=new WeakSet,cw=function(){var n;const t=((n=B(this,wi).samples[0])==null?void 0:n.locSize.size)??0;B(this,It).onLocationUpdate({sampleHeight:t})};function WC(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=>_n(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}),l=[];ru(o.map(h=>s(h.samples)),t,{spacing:r}).forEach((h,d)=>{l.push({key:o[d].path,locSize:h})});const c=[];for(const[h,d]of o.entries()){const p={grow:1},g=d.samples;ru(g.map(b=>p),Math.max(0,l[h].locSize.size-i),{offset:l[h].locSize.location+i}).forEach((b,y)=>{const{size:w,location:A}=b,x=w*.1*cm(15,22,w);b.location=A+x,b.size=w-2*x,c.push({key:g[y],locSize:b})})}function*u(){const h=[];for(const d of l){const p=d.key,g=_n(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:c,summaries:l,groups:f}}function SW(e,t){return t.find(n=>x4(n.locSize,e))}function _W(e,t){const n=t.specifier,r=e.findDescendantByName(n.view),i=r.getScaleResolution("x");let a;if(Ud(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,l]=Object.entries(r.getEncoding()).find(([f,h])=>"field"in h&&h.field==n.field),c=Ka(s)?r.getScaleResolution(s).scale:void 0;return{name:n.field,attribute:t,title:U` <em class="attribute">${n.field}</em>
2991
+ `};function bW(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==py.QUANTITATIVE&&(i.encoding.x={field:`attributes["${e}"]`,type:t.type,scale:t.barScale,axis:null}),i}function yW(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 vW(e){return e!==""&&!(typeof e=="number"&&isNaN(e))&&e!==null}const qC=Object.freeze({name:"sample",attribute:{type:VC},accessor:e=>e,type:"identifier",scale:void 0});class wW extends lo{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:ki(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");H(this,Kp);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 l=s.datum._rawGroup;let c;for(const d of Xb(this.sampleView.sampleHierarchy.rootGroup))if(d.at(-1)===l){c=d.slice(1);break}const u=n.actions.removeGroup({path:c.map(d=>d.name)}),f=n.provenance.getActionInfo(u),h=n.provenance.storeHelper.getDispatcher();dy({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 l of n)a.push(1-(l.locSize.location+l.locSize.size)/r),a.push(1-l.locSize.location/r);i.scale.range(a)}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=Y(this,Kp,yR).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(),_n([...this.getLayoutAncestors()]).visit(s=>Kc(s,"size"))}}Kp=new WeakSet,yR=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?Ue(i)?i:(Bt(i,n),n.textContent.replace(/\s+/g," ").trim()):"unknown"})};class xW{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 B0(e,t,n){let r=n&&e(n);return i=>{const a=e(i);a!==r&&(t(a,r),r=a)}}class AW{constructor(t){H(this,th);H(this,Vn,0);H(this,_a,0);H(this,Ko,0);H(this,Gl,void 0);H(this,Vl,void 0);H(this,wi,void 0);H(this,jl,void 0);H(this,It,void 0);ie(this,It,t)}isCloseup(){return B(this,Vn)===1}resetLocations(){ie(this,wi,void 0)}reset(){ie(this,Vn,0),this.resetLocations()}handleWheelEvent(t){ie(this,_a,Wr(B(this,_a)+t.deltaY,0,B(this,Ko)-B(this,It).getHeight()))}togglePeek(t,n,r){if(B(this,Vn)>0&&B(this,Vn)<1||t!==void 0&&t==!!B(this,Vn))return;const i=B(this,It).viewContext,a=B(this,It).getHeight(),o={requestAnimationFrame:s=>i.animator.requestTransition(s),onUpdate:s=>{ie(this,Vn,Math.pow(s,2)),Y(this,th,cw).call(this),i.animator.requestRender()},from:B(this,Vn)};if(B(this,Vn)==0){let s;if(r)s=(c=>c.location+c.size/2)(B(this,jl).samples.find(c=>c.key==r).locSize);else{const l=this.getSummaryAt(n);l&&(s=B(this,jl).summaries[l.index].locSize.location-(l.location.locSize.location-n))}s?ie(this,_a,s-n):ie(this,_a,(B(this,Ko)-a)/2),B(this,Ko)>a?Hd({...o,to:1,duration:500,easingFunction:pU}):Hd({...o,from:0,to:1,duration:300,easingFunction:c=>(1-Math.pow(c*2-1,2))*.5})}else Hd({...o,to:0,duration:400,easingFunction:fU})}getLocations(){if(B(this,wi))return B(this,wi);const t=B(this,It).getHeight();if(!t)return;const n=B(this,It).getSampleHierarchy(),r=Qb(n),i=B(this,It).getSummaryHeight(),a=WC(r,{viewHeight:t,groupSpacing:5,summaryHeight:i}),o=WC(r,{sampleHeight:35,groupSpacing:15,summaryHeight:i}),s=()=>-B(this,_a),l=()=>B(this,Vn);ie(this,jl,o),ie(this,Ko,o.summaries.map(f=>f.locSize.location+f.locSize.size).reduce((f,h)=>Math.max(f,h),0));const c=(f,h)=>{const d=[];for(let p=0;p<f.length;p++){const g=f[p].key;d.push({key:g,locSize:_U(f[p].locSize,CU(h[p].locSize,s),l)})}return d},u=c(a.groups,o.groups);return ie(this,wi,{samples:c(a.samples,o.samples),summaries:c(a.summaries,o.summaries),groups:u}),Y(this,th,cw).call(this),B(this,wi)}getGroupBackgroundRects(t){const n=this.getLocations().groups,r=n.map(s=>s.key.depth).reduce((s,l)=>Math.max(s,l),0),i=n.filter(s=>s.key.depth==r),a=B(this,It).getSummaryHeight();t=t.flatten();const o=B(this,It).isStickySummaries()&&a>0?t.shrink(new Ct(a,0,0,0)):t;return[...i.values()].map(s=>{const l=()=>{const c=s.locSize.location;return t.y+c+a};return{coords:t.modify({y:l,height:()=>s.locSize.size-a}).intersect(o),clipRect:o}})}updateFacetTexture(){const t=B(this,It).getSampleHierarchy().sampleData;if(!B(this,Vl)){const a=t&&Object.values(t.entities);ie(this,Vl,new Float32Array(Math.ceil(a.length*2/4)*4))}const n=B(this,Vl);n.fill(0);const r=t==null?void 0:t.entities;if(r){const a=this.getLocations().samples,o=B(this,It).getHeight();for(const s of a){const l=r[s.key].indexNumber;n[l*2+0]=s.locSize.location/o,n[l*2+1]=s.locSize.size/o}}const i=B(this,It).viewContext.glHelper.gl;ie(this,Gl,eu(i,{internalFormat:i.RG32F,format:i.RG,height:1},n,B(this,Gl)))}getFacetTexture(){return B(this,Gl)}getSummaryAt(t){const n=this.getLocations().summaries,r=n.findIndex(i=>x4(i.locSize,t));return r>=0?{index:r,location:n[r]}:void 0}clipBySummary(t){if(B(this,It).isStickySummaries()){const n=B(this,It).getSummaryHeight();if(n>0)return t.modify({y:()=>t.y+n,height:()=>t.height-n})}return t}}Vn=new WeakMap,_a=new WeakMap,Ko=new WeakMap,Gl=new WeakMap,Vl=new WeakMap,wi=new WeakMap,jl=new WeakMap,It=new WeakMap,th=new WeakSet,cw=function(){var n;const t=((n=B(this,wi).samples[0])==null?void 0:n.locSize.size)??0;B(this,It).onLocationUpdate({sampleHeight:t})};function WC(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=>_n(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}),l=[];ru(o.map(h=>s(h.samples)),t,{spacing:r}).forEach((h,d)=>{l.push({key:o[d].path,locSize:h})});const c=[];for(const[h,d]of o.entries()){const p={grow:1},g=d.samples;ru(g.map(b=>p),Math.max(0,l[h].locSize.size-i),{offset:l[h].locSize.location+i}).forEach((b,y)=>{const{size:w,location:A}=b,x=w*.1*cm(15,22,w);b.location=A+x,b.size=w-2*x,c.push({key:g[y],locSize:b})})}function*u(){const h=[];for(const d of l){const p=d.key,g=_n(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:c,summaries:l,groups:f}}function EW(e,t){return t.find(n=>x4(n.locSize,e))}function SW(e,t){const n=t.specifier,r=e.findDescendantByName(n.view),i=r.getScaleResolution("x");let a;if(Ud(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,l]=Object.entries(r.getEncoding()).find(([f,h])=>"field"in h&&h.field==n.field),c=Ka(s)?r.getScaleResolution(s).scale:void 0;return{name:n.field,attribute:t,title:U` <em class="attribute">${n.field}</em>
2987
2992
  <span class="viewTitle">(${r.getTitleText()??r.name})</span>
2988
2993
  ${Ud(n.locus)?U`at
2989
2994
  <span class="locus"
2990
2995
  >${h4(n.locus)}</span
2991
- >`:U`<span class="scalar">of ${a}</span>`}`,accessor:o,type:"type"in l?l.type:void 0,scale:c}}const YC="VALUE_AT_LOCUS";class gy extends ei{constructor(n,r,i,a,o,s){super(n,r,i,a,o);H(this,Jp);H(this,eg);H(this,tg);H(this,ih);H(this,ng);H(this,rg);H(this,ig);H(this,lt,void 0);H(this,Gt,void 0);H(this,nh,-1);H(this,ql,!1);H(this,rh,void 0);this.provenance=s,this.spec=n,ie(this,ql,n.stickySummaries??!0),this.compositeAttributeInfoSource=new AW,this.childCoords=Jn.ZERO,this.sidebarCoords=Jn.ZERO,ie(this,rh,this.paramMediator.allocateSetter("height",0)),this.locationManager=new EW({getSampleHierarchy:()=>this.sampleHierarchy,getHeight:()=>this.childCoords.height,getSummaryHeight:()=>B(this,lt).summaryViews.getSize().height.px,onLocationUpdate:({sampleHeight:f})=>{this.groupPanel.updateGroups(),B(this,rh).call(this,f)},viewContext:this.context,isStickySummaries:()=>B(this,ql)}),this.provenance.storeHelper.subscribe(B0(f=>uC(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(B0(f=>uC(f).sampleData,f=>{const h=f&&Object.values(f.entities);h&&(this.metadataView.setSamples(h),this.groupPanel.updateGroups())})),this.compositeAttributeInfoSource.addAttributeInfoSource(YC,f=>_W(this,f)),this._addBroadcastHandler("dataLoaded",()=>Y(this,eg,wR).call(this)),this._addBroadcastHandler("layout",()=>{this.locationManager.resetLocations()}),this.addInteractionEventListener("mousemove",(f,h)=>{ie(this,nh,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&&Y(this,ih,uw).call(this)}),r.addKeyboardListener("keyup",f=>{f.code=="KeyE"&&this.locationManager.togglePeek(!1)});const l=f=>this.compositeAttributeInfoSource.getAttributeInfo(f),c=hq(l);this.provenance.addReducer(c.name,c.reducer),this.provenance.addActionInfoSource(f=>pq(f,l)),this.actions=c.actions;const u=Rj(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&&Y(this,Jp,vR).call(this)}async initializeChildren(){ie(this,lt,new TW(this.context.createView(this.spec.spec,this,this,"sample-facets"),this,0,this.spec.view)),ie(this,Gt,new Ds({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 xW(this,B(this,Gt)),this.metadataView=new jC(this,B(this,Gt)),B(this,Gt).setChildren([this.groupPanel,this.metadataView]),B(this,lt).view instanceof ei&&await B(this,lt).view.initializeChildren(),B(this,lt).summaryViews instanceof ei&&await B(this,lt).summaryViews.initializeChildren(),await B(this,lt).createAxes(),await Y(this,ig,SR).call(this),await B(this,lt).summaryViews.createAxes(),await this.groupPanel.initializeChildren(),await this.metadataView.initializeChildren(),B(this,lt).view.addInteractionEventListener("contextmenu",Y(this,ng,AR).bind(this))}getOverhang(){let n=B(this,Gt).isConfiguredVisible()?B(this,Gt).getSize().width.px+B(this,Gt).getPadding().horizontalTotal:0;return new Ct(0,0,0,n).add(B(this,lt).getOverhang())}getSize(){return this._cache("size/size2",()=>{const n=super.getSize(),r=a=>a.getSize().addPadding(a.getOverhang()).addPadding(a.getPadding()),i=SU([B(this,Gt),B(this,lt).view].map(a=>r(a).width));return new Kr(i,n.height)})}*[Symbol.iterator](){yield B(this,Gt),yield*B(this,lt).getChildren()}get sampleHierarchy(){return this.provenance.getPresentState()[Ns]}get leafSamples(){return Qb(this.sampleHierarchy).map(r=>r.at(-1)).map(r=>r.samples).flat()}getSampleAt(n){const r=SW(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(B(this,lt).getOverhang()),n.pushView(this,r);const a=ru([B(this,Gt).isConfiguredVisible()?B(this,Gt).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]),B(this,Gt).render(n,this.sidebarCoords,i),Y(this,tg,xR).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:hG}:{label:"Open closeup",callback:()=>Y(this,ih,uw).call(this),icon:pG},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)&&(B(this,lt).view.propagateInteractionEvent(n),iS(n,this.childCoords,r=>Y(this,rg,ER).call(this,this.childCoords,B(this,lt).view,r),this.context.getCurrentHover(),this.context.animator)),this.sidebarCoords.containsPoint(n.point.x,n.point.y)&&B(this,Gt).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"}}}lt=new WeakMap,Gt=new WeakMap,nh=new WeakMap,ql=new WeakMap,rh=new WeakMap,Jp=new WeakSet,vR=function(){if(!this.spec.samples.data)throw new Error("SampleView has no explicit sample metadata specified! Cannot load anything.");const{dataSource:n,collector:r}=O$(O4(this.spec.samples.data,this),new CW);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)},eg=new WeakSet,wR=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!")},tg=new WeakSet,xR=function(n,r,i={}){var g,b,y,w;const a=B(this,lt),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 E of Object.values(a.gridLines))E.render(n,A,{...i,clipRect:x})}const s=1/r.height,l=()=>s,c=this.locationManager.clipBySummary(r),u=this.locationManager.getLocations(),f=u.samples.map(A=>({...i,sampleFacetRenderingOptions:{locSize:TU(A.locSize,l)},facetId:[A.key],clipRect:c}));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,J1(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 E=()=>{const T=x.locSize.location;let D=r.y+T;return B(this,ql)?D+Wr(-T,0,x.locSize.size-p):D},_=r.modify({y:E,height:p}).expand(d);h.render(n,_,{...i,facetId:[A],firstFacet:A==0})}},ih=new WeakSet,uw=function(){var i;const n=B(this,nh),r=(i=this.getSampleAt(n))==null?void 0:i.id;this.locationManager.togglePeek(void 0,n,r)},ng=new WeakSet,AR=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=B(this,lt).view,l=s.getScaleResolution("x"),c=l.invertToComplex(a),u=j4(this.getLayoutAncestors().at(-1)),f=(g=s.getAxisResolution("x"))==null?void 0:g.getTitle(),h=$$(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(),uy,{label:l.type==="locus"?`Locus: ${h4(c)}`:`${f?f+": ":""}${c}`,type:"header"},uy],p="";for(const[y,w]of h.entries()){const A={view:w.view.name,field:w.field,locus:c},x=this.compositeAttributeInfoSource.getAttributeInfo({type:YC,specifier:A}),E=w.view.getTitleText()??w.view.spec.name;E!=p&&(y>0&&d.push({type:"divider"}),d.push({label:E,type:"header"}),p=E);const _=l.scale,T="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:Kb(null,x,T,this)})}dy({items:d},i)},rg=new WeakSet,ER=function(n,r,i){const a=B(this,lt).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()},ig=new WeakSet,SR=async function(){const n=[];for(const r of B(this,lt).view.getDescendants()){const i=r.spec;if(PH(i))for(const a of i.aggregateSamples){a.transform=[{type:"mergeFacets"},...a.transform??[]],a.encoding={...a.encoding??{},sample:null};const o=this.context.createView(a,this,r,"summaryView");o instanceof ei&&await o.initializeChildren(),o.getFacetFields=s=>{},n.push(o)}}B(this,lt).summaryViews.setChildren(n)};class CW extends st{constructor(){super(),this.reset()}reset(){this._index=0}handle(t){this._propagate({id:t.sample,displayName:t.displayName||t.sample,indexNumber:this._index++,attributes:kW(t)})}}function kW(e){const t=Object.assign({},e);return delete t.sample,delete t.displayName,t}class TW extends eb{constructor(t,n,r,i){super(t,n,r),this.groupBackground=void 0,this.groupBackgroundStroke=void 0;const a=aS(i);a&&(this.groupBackground=new bt(a,n.context,n,t,"sample-group-background-"+r,{blockEncodingInheritance:!0}));const o=oS(i);o&&(this.groupBackgroundStroke=new bt(o,n.context,n,t,"sample-group-background-stroke-"+r,{blockEncodingInheritance:!0})),this.summaryViews=new Ds({configurableVisibility:!1,resolve:{axis:{x:"shared"},scale:{x:"shared"}},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 IW=(e,t)=>t.some(n=>e instanceof n);let ZC,QC;function RW(){return ZC||(ZC=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function DW(){return QC||(QC=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const XC=new WeakMap,my=new WeakMap,KC=new WeakMap,by=new WeakMap,yy=new WeakMap;function BW(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{n(ra(e.result)),i()},o=()=>{r(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return t.then(n=>{n instanceof IDBCursor&&XC.set(n,e)}).catch(()=>{}),yy.set(t,e),t}function FW(e){if(my.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)});my.set(e,t)}let vy={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return my.get(e);if(t==="objectStoreNames")return e.objectStoreNames||KC.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return ra(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 MW(e){vy=e(vy)}function PW(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(wy(this),t,...n);return KC.set(r,t.sort?t.sort():[t]),ra(r)}:DW().includes(e)?function(...t){return e.apply(wy(this),t),ra(XC.get(this))}:function(...t){return ra(e.apply(wy(this),t))}}function OW(e){return typeof e=="function"?PW(e):(e instanceof IDBTransaction&&FW(e),IW(e,RW())?new Proxy(e,vy):e)}function ra(e){if(e instanceof IDBRequest)return BW(e);if(by.has(e))return by.get(e);const t=OW(e);return t!==e&&(by.set(e,t),yy.set(t,e)),t}const wy=e=>yy.get(e);function LW(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=ra(o);return r&&o.addEventListener("upgradeneeded",l=>{r(ra(o.result),l.oldVersion,l.newVersion,ra(o.transaction),l)}),n&&o.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const NW=["get","getKey","getAll","getAllKeys","count"],zW=["put","add","delete","clear"],xy=new Map;function JC(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(xy.get(t))return xy.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=zW.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||NW.includes(n)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(s.shift())),(await Promise.all([c[n](...s),i&&l.done]))[0]};return xy.set(t,a),a}MW(e=>({...e,get:(t,n,r)=>JC(t,n)||e.get(t,n,r),has:(t,n)=>!!JC(t,n)||e.has(t,n)}));class e6{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 Iu="bookmarks";class UW extends e6{constructor(t){super(),this.specId=t,this._db=void 0}async _getDB(){if(!this._db){const t=`GenomeSpy: ${this.specId}`;this._db=LW(t,1,{upgrade(n,r,i,a){n.createObjectStore(Iu,{keyPath:"name"})},blocked(){},blocking(){},terminated(){}})}return this._db}isReadonly(){return!1}async put(t,n){const i=(await this._getDB()).transaction(Iu,"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(Iu,t)}async getNames(){return(await this._getDB()).getAllKeys(Iu)}async get(t){return(await this._getDB()).get(Iu,t)}}/**
2996
+ >`:U`<span class="scalar">of ${a}</span>`}`,accessor:o,type:"type"in l?l.type:void 0,scale:c}}const YC="VALUE_AT_LOCUS";class gy extends ei{constructor(n,r,i,a,o,s){super(n,r,i,a,o);H(this,Jp);H(this,eg);H(this,tg);H(this,ih);H(this,ng);H(this,rg);H(this,ig);H(this,lt,void 0);H(this,Gt,void 0);H(this,nh,-1);H(this,ql,!1);H(this,rh,void 0);this.provenance=s,this.spec=n,ie(this,ql,n.stickySummaries??!0),this.compositeAttributeInfoSource=new xW,this.childCoords=Jn.ZERO,this.sidebarCoords=Jn.ZERO,ie(this,rh,this.paramMediator.allocateSetter("height",0)),this.locationManager=new AW({getSampleHierarchy:()=>this.sampleHierarchy,getHeight:()=>this.childCoords.height,getSummaryHeight:()=>B(this,lt).summaryViews.getSize().height.px,onLocationUpdate:({sampleHeight:f})=>{this.groupPanel.updateGroups(),B(this,rh).call(this,f)},viewContext:this.context,isStickySummaries:()=>B(this,ql)}),this.provenance.storeHelper.subscribe(B0(f=>uC(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(B0(f=>uC(f).sampleData,f=>{const h=f&&Object.values(f.entities);h&&(this.metadataView.setSamples(h),this.groupPanel.updateGroups())})),this.compositeAttributeInfoSource.addAttributeInfoSource(YC,f=>SW(this,f)),this._addBroadcastHandler("dataLoaded",()=>Y(this,eg,wR).call(this)),this._addBroadcastHandler("layout",()=>{this.locationManager.resetLocations()}),this.addInteractionEventListener("mousemove",(f,h)=>{ie(this,nh,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&&Y(this,ih,uw).call(this)}),r.addKeyboardListener("keyup",f=>{f.code=="KeyE"&&this.locationManager.togglePeek(!1)});const l=f=>this.compositeAttributeInfoSource.getAttributeInfo(f),c=fq(l);this.provenance.addReducer(c.name,c.reducer),this.provenance.addActionInfoSource(f=>dq(f,l)),this.actions=c.actions;const u=Ij(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&&Y(this,Jp,vR).call(this)}async initializeChildren(){ie(this,lt,new kW(this.context.createView(this.spec.spec,this,this,"sample-facets"),this,0,this.spec.view)),ie(this,Gt,new Ds({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 wW(this,B(this,Gt)),this.metadataView=new jC(this,B(this,Gt)),B(this,Gt).setChildren([this.groupPanel,this.metadataView]),B(this,lt).view instanceof ei&&await B(this,lt).view.initializeChildren(),B(this,lt).summaryViews instanceof ei&&await B(this,lt).summaryViews.initializeChildren(),await B(this,lt).createAxes(),await Y(this,ig,SR).call(this),await B(this,lt).summaryViews.createAxes(),await this.groupPanel.initializeChildren(),await this.metadataView.initializeChildren(),B(this,lt).view.addInteractionEventListener("contextmenu",Y(this,ng,AR).bind(this))}getOverhang(){let n=B(this,Gt).isConfiguredVisible()?B(this,Gt).getSize().width.px+B(this,Gt).getPadding().horizontalTotal:0;return new Ct(0,0,0,n).add(B(this,lt).getOverhang())}getSize(){return this._cache("size/size2",()=>{const n=super.getSize(),r=a=>a.getSize().addPadding(a.getOverhang()).addPadding(a.getPadding()),i=EU([B(this,Gt),B(this,lt).view].map(a=>r(a).width));return new Kr(i,n.height)})}*[Symbol.iterator](){yield B(this,Gt),yield*B(this,lt).getChildren()}get sampleHierarchy(){return this.provenance.getPresentState()[Ns]}get leafSamples(){return Qb(this.sampleHierarchy).map(r=>r.at(-1)).map(r=>r.samples).flat()}getSampleAt(n){const r=EW(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(B(this,lt).getOverhang()),n.pushView(this,r);const a=ru([B(this,Gt).isConfiguredVisible()?B(this,Gt).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]),B(this,Gt).render(n,this.sidebarCoords,i),Y(this,tg,xR).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:fG}:{label:"Open closeup",callback:()=>Y(this,ih,uw).call(this),icon:dG},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)&&(B(this,lt).view.propagateInteractionEvent(n),iS(n,this.childCoords,r=>Y(this,rg,ER).call(this,this.childCoords,B(this,lt).view,r),this.context.getCurrentHover(),this.context.animator)),this.sidebarCoords.containsPoint(n.point.x,n.point.y)&&B(this,Gt).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"}}}lt=new WeakMap,Gt=new WeakMap,nh=new WeakMap,ql=new WeakMap,rh=new WeakMap,Jp=new WeakSet,vR=function(){if(!this.spec.samples.data)throw new Error("SampleView has no explicit sample metadata specified! Cannot load anything.");const{dataSource:n,collector:r}=P$(O4(this.spec.samples.data,this),new _W);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)},eg=new WeakSet,wR=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!")},tg=new WeakSet,xR=function(n,r,i={}){var g,b,y,w;const a=B(this,lt),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 E of Object.values(a.gridLines))E.render(n,A,{...i,clipRect:x})}const s=1/r.height,l=()=>s,c=this.locationManager.clipBySummary(r),u=this.locationManager.getLocations(),f=u.samples.map(A=>({...i,sampleFacetRenderingOptions:{locSize:kU(A.locSize,l)},facetId:[A.key],clipRect:c}));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,J1(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 E=()=>{const T=x.locSize.location;let D=r.y+T;return B(this,ql)?D+Wr(-T,0,x.locSize.size-p):D},_=r.modify({y:E,height:p}).expand(d);h.render(n,_,{...i,facetId:[A],firstFacet:A==0})}},ih=new WeakSet,uw=function(){var i;const n=B(this,nh),r=(i=this.getSampleAt(n))==null?void 0:i.id;this.locationManager.togglePeek(void 0,n,r)},ng=new WeakSet,AR=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=B(this,lt).view,l=s.getScaleResolution("x"),c=l.invertToComplex(a),u=j4(this.getLayoutAncestors().at(-1)),f=(g=s.getAxisResolution("x"))==null?void 0:g.getTitle(),h=U$(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(),uy,{label:l.type==="locus"?`Locus: ${h4(c)}`:`${f?f+": ":""}${c}`,type:"header"},uy],p="";for(const[y,w]of h.entries()){const A={view:w.view.name,field:w.field,locus:c},x=this.compositeAttributeInfoSource.getAttributeInfo({type:YC,specifier:A}),E=w.view.getTitleText()??w.view.spec.name;E!=p&&(y>0&&d.push({type:"divider"}),d.push({label:E,type:"header"}),p=E);const _=l.scale,T="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:Kb(null,x,T,this)})}dy({items:d},i)},rg=new WeakSet,ER=function(n,r,i){const a=B(this,lt).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()},ig=new WeakSet,SR=async function(){const n=[];for(const r of B(this,lt).view.getDescendants()){const i=r.spec;if(MH(i))for(const a of i.aggregateSamples){a.transform=[{type:"mergeFacets"},...a.transform??[]],a.encoding={...a.encoding??{},sample:null};const o=this.context.createView(a,this,r,"summaryView");o instanceof ei&&await o.initializeChildren(),o.getFacetFields=s=>{},n.push(o)}}B(this,lt).summaryViews.setChildren(n)};class _W extends st{constructor(){super(),this.reset()}reset(){this._index=0}handle(t){this._propagate({id:t.sample,displayName:t.displayName||t.sample,indexNumber:this._index++,attributes:CW(t)})}}function CW(e){const t=Object.assign({},e);return delete t.sample,delete t.displayName,t}class kW extends eb{constructor(t,n,r,i){super(t,n,r),this.groupBackground=void 0,this.groupBackgroundStroke=void 0;const a=aS(i);a&&(this.groupBackground=new bt(a,n.context,n,t,"sample-group-background-"+r,{blockEncodingInheritance:!0}));const o=oS(i);o&&(this.groupBackgroundStroke=new bt(o,n.context,n,t,"sample-group-background-stroke-"+r,{blockEncodingInheritance:!0})),this.summaryViews=new Ds({configurableVisibility:!1,resolve:{axis:{x:"shared"},scale:{x:"shared"}},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 TW=(e,t)=>t.some(n=>e instanceof n);let ZC,QC;function IW(){return ZC||(ZC=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function RW(){return QC||(QC=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const XC=new WeakMap,my=new WeakMap,KC=new WeakMap,by=new WeakMap,yy=new WeakMap;function DW(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{n(ra(e.result)),i()},o=()=>{r(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return t.then(n=>{n instanceof IDBCursor&&XC.set(n,e)}).catch(()=>{}),yy.set(t,e),t}function BW(e){if(my.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)});my.set(e,t)}let vy={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return my.get(e);if(t==="objectStoreNames")return e.objectStoreNames||KC.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return ra(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 FW(e){vy=e(vy)}function MW(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(wy(this),t,...n);return KC.set(r,t.sort?t.sort():[t]),ra(r)}:RW().includes(e)?function(...t){return e.apply(wy(this),t),ra(XC.get(this))}:function(...t){return ra(e.apply(wy(this),t))}}function PW(e){return typeof e=="function"?MW(e):(e instanceof IDBTransaction&&BW(e),TW(e,IW())?new Proxy(e,vy):e)}function ra(e){if(e instanceof IDBRequest)return DW(e);if(by.has(e))return by.get(e);const t=PW(e);return t!==e&&(by.set(e,t),yy.set(t,e)),t}const wy=e=>yy.get(e);function OW(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=ra(o);return r&&o.addEventListener("upgradeneeded",l=>{r(ra(o.result),l.oldVersion,l.newVersion,ra(o.transaction),l)}),n&&o.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const LW=["get","getKey","getAll","getAllKeys","count"],NW=["put","add","delete","clear"],xy=new Map;function JC(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(xy.get(t))return xy.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=NW.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||LW.includes(n)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(s.shift())),(await Promise.all([c[n](...s),i&&l.done]))[0]};return xy.set(t,a),a}FW(e=>({...e,get:(t,n,r)=>JC(t,n)||e.get(t,n,r),has:(t,n)=>!!JC(t,n)||e.has(t,n)}));class e6{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 Iu="bookmarks";class zW extends e6{constructor(t){super(),this.specId=t,this._db=void 0}async _getDB(){if(!this._db){const t=`GenomeSpy: ${this.specId}`;this._db=OW(t,1,{upgrade(n,r,i,a){n.createObjectStore(Iu,{keyPath:"name"})},blocked(){},blocking(){},terminated(){}})}return this._db}isReadonly(){return!1}async put(t,n){const i=(await this._getDB()).transaction(Iu,"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(Iu,t)}async getNames(){return(await this._getDB()).getAllKeys(Iu)}async get(t){return(await this._getDB()).get(Iu,t)}}/**
2992
2997
  * @license
2993
2998
  * Copyright 2017 Google LLC
2994
2999
  * SPDX-License-Identifier: BSD-3-Clause
2995
- */const Ru=(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),Ru(i,t);return!0},F0=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)},t6=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),GW(t)}};function $W(e){this._$AN!==void 0?(F0(this),this._$AM=e,t6(this)):this._$AM=e}function HW(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++)Ru(r[a],!1),F0(r[a]);else r!=null&&(Ru(r,!1),F0(r));else Ru(this,e)}const GW=e=>{e.type==mr.CHILD&&(e._$AP??(e._$AP=HW),e._$AQ??(e._$AQ=$W))};class n6 extends us{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,n,r){super._$AT(t,n,r),t6(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&&(Ru(this,t),F0(this))}setValue(t){if(b_(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(){}}/**
3000
+ */const Ru=(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),Ru(i,t);return!0},F0=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)},t6=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),HW(t)}};function UW(e){this._$AN!==void 0?(F0(this),this._$AM=e,t6(this)):this._$AM=e}function $W(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++)Ru(r[a],!1),F0(r[a]);else r!=null&&(Ru(r,!1),F0(r));else Ru(this,e)}const HW=e=>{e.type==mr.CHILD&&(e._$AP??(e._$AP=$W),e._$AQ??(e._$AQ=UW))};class n6 extends us{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,n,r){super._$AT(t,n,r),t6(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&&(Ru(this,t),F0(this))}setValue(t){if(b_(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(){}}/**
2996
3001
  * @license
2997
3002
  * Copyright 2020 Google LLC
2998
3003
  * SPDX-License-Identifier: BSD-3-Clause
2999
- */const Ay=()=>new VW;let VW=class{};const Ey=new WeakMap,Sy=$a(class extends n6{render(e){return he}update(e,[t]){var r;const n=t!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=t,this.ht=(r=e.options)==null?void 0:r.host,this.rt(this.ct=e.element)),he}rt(e){if(typeof this.Y=="function"){const t=this.ht??globalThis;let n=Ey.get(t);n===void 0&&(n=new WeakMap,Ey.set(t,n)),n.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),n.set(this.Y,e),e!==void 0&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){var e,t;return typeof this.Y=="function"?(e=Ey.get(this.ht??globalThis))==null?void 0:e.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});/**
3004
+ */const Ay=()=>new GW;let GW=class{};const Ey=new WeakMap,Sy=$a(class extends n6{render(e){return he}update(e,[t]){var r;const n=t!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=t,this.ht=(r=e.options)==null?void 0:r.host,this.rt(this.ct=e.element)),he}rt(e){if(typeof this.Y=="function"){const t=this.ht??globalThis;let n=Ey.get(t);n===void 0&&(n=new WeakMap,Ey.set(t,n)),n.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),n.set(this.Y,e),e!==void 0&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){var e,t;return typeof this.Y=="function"?(e=Ey.get(this.ht??globalThis))==null?void 0:e.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});/**
3000
3005
  * @license
3001
3006
  * Copyright 2018 Google LLC
3002
3007
  * SPDX-License-Identifier: BSD-3-Clause
3003
- */const jW={},qW=$a(class extends us{constructor(){super(...arguments),this.ot=jW}render(e,t){return t()}update(e,[t,n]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,i)=>r===this.ot[i]))return Dt}else if(this.ot===t)return Dt;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,n)}});class WW extends gr{constructor(){super(),this.inputRef=Ay(),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){if(!(t.target instanceof HTMLInputElement))switch(t.code){case"KeyF":t.metaKey||t.altKey||t.ctrlKey||(t.preventDefault(),this.inputRef.value.focus());break}}_initializeGenome(){const t=r6(this.genomeSpy.viewRoot);t&&(this._genomeResolution=t,this._genome=this.genomeSpy.genomeStore.getGenome(),this.getDefaultValue=()=>this._genome.formatInterval(t.getDomain()),t.addEventListener("domain",so(()=>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"),l=i.getScaleResolution("x");if(!(!o||!s||!(l!=null&&l.isZoomable()))){for(const c of((r=i.getCollector())==null?void 0:r.getData())??[])if(n.compare(a(c),t)===0){const u=wg([o(c),s(c)],null,1.2);return await l.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 jC&&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){YW(t,this._inputField).then(()=>{this._inputField.blur(),this.search(t)})}_getSearchHelp(){var r,i;const t=[];t.push(U`
3008
+ */const VW={},jW=$a(class extends us{constructor(){super(...arguments),this.ot=VW}render(e,t){return t()}update(e,[t,n]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,i)=>r===this.ot[i]))return Dt}else if(this.ot===t)return Dt;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,n)}});class qW extends gr{constructor(){super(),this.inputRef=Ay(),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){if(!(t.target instanceof HTMLInputElement))switch(t.code){case"KeyF":t.metaKey||t.altKey||t.ctrlKey||(t.preventDefault(),this.inputRef.value.focus());break}}_initializeGenome(){const t=r6(this.genomeSpy.viewRoot);t&&(this._genomeResolution=t,this._genome=this.genomeSpy.genomeStore.getGenome(),this.getDefaultValue=()=>this._genome.formatInterval(t.getDomain()),t.addEventListener("domain",so(()=>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"),l=i.getScaleResolution("x");if(!(!o||!s||!(l!=null&&l.isZoomable()))){for(const c of((r=i.getCollector())==null?void 0:r.getData())??[])if(n.compare(a(c),t)===0){const u=wg([o(c),s(c)],null,1.2);return await l.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 jC&&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){WW(t,this._inputField).then(()=>{this._inputField.blur(),this.search(t)})}_getSearchHelp(){var r,i;const t=[];t.push(U`
3004
3009
  <p>Focus to a specific range. Examples:</p>
3005
3010
  <ul>
3006
3011
  <!-- TODO: Display only when using a genomic coordinate system-->
@@ -3035,13 +3040,13 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3035
3040
  @blur=${this._onSearchFocused}
3036
3041
  ${Sy(this.inputRef)}
3037
3042
  />
3038
- ${qW([123],()=>this._getSearchHelp())}
3043
+ ${jW([123],()=>this._getSearchHelp())}
3039
3044
  </div>
3040
- `}}customElements.define("genome-spy-search-field",WW);function YW(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 r6(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,ao}}),t}const i6="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",a6={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.48.0",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":"^1.6.1","@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.48.0","@reduxjs/toolkit":"^1.8.4",idb:"^7.1.1",lit:"^3.1.2","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:"64cd3335607b2608db3c85c74a4fb571302e77d0"};/**
3045
+ `}}customElements.define("genome-spy-search-field",qW);function WW(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 r6(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,ao}}),t}const i6="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",a6={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.48.1",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":"^1.6.1","@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.48.1","@reduxjs/toolkit":"^1.8.4",idb:"^7.1.1",lit:"^3.1.2","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:"f2e023ce43cf18091cb81140f5be1f59887271df"};/**
3041
3046
  * @license
3042
3047
  * Copyright 2020 Google LLC
3043
3048
  * SPDX-License-Identifier: BSD-3-Clause
3044
- */const ZW=$a(class extends us{constructor(e){if(super(e),e.type!==mr.PROPERTY&&e.type!==mr.ATTRIBUTE&&e.type!==mr.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!b_(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===Dt||t===he)return t;const n=e.element,r=e.name;if(e.type===mr.PROPERTY){if(t===n[r])return Dt}else if(e.type===mr.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(r))return Dt}else if(e.type===mr.ATTRIBUTE&&n.getAttribute(r)===t+"")return Dt;return v_(e),t}});function o6(e,t){return new CustomEvent("query-dependency",{detail:{name:e,setter:t},bubbles:!0})}function QW(e){if(!(e!=null&&e.length))throw new Error("Can't nest an empty array!");const t=s6(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=s6(i),r.children.push(a)),r=a}}return t.children[0]}const s6=e=>({item:e,children:[]}),_y={visibilities:{}},Gs=Q_({name:"viewSettings",initialState:_y,reducers:{setVisibility:(e,t)=>{e.visibilities[t.payload.name]=t.payload.visibility},restoreDefaultVisibility:(e,t)=>{delete e.visibilities[t.payload]},restoreDefaultVisibilities:(e,t)=>_y,setViewSettings:(e,t)=>({..._y,...t.payload?t.payload:{}})}});class XW extends gr{constructor(){super();H(this,ag);H(this,og);H(this,sg);H(this,lg);H(this,Wl);this.app=void 0,this.nestedPaths=void 0,this.sateWatcher=B0(n=>n.viewSettings,(n,r)=>this.requestUpdate()),this.style.display="none",this.buttonRef=Ay()}connectedCallback(){super.connectedCallback(),this.dispatchEvent(o6("app",n=>{this.app=n})),this.app.addInitializationListener(()=>{Y(this,sg,kR).call(this),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}render(){return U`
3049
+ */const YW=$a(class extends us{constructor(e){if(super(e),e.type!==mr.PROPERTY&&e.type!==mr.ATTRIBUTE&&e.type!==mr.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!b_(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===Dt||t===he)return t;const n=e.element,r=e.name;if(e.type===mr.PROPERTY){if(t===n[r])return Dt}else if(e.type===mr.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(r))return Dt}else if(e.type===mr.ATTRIBUTE&&n.getAttribute(r)===t+"")return Dt;return v_(e),t}});function o6(e,t){return new CustomEvent("query-dependency",{detail:{name:e,setter:t},bubbles:!0})}function ZW(e){if(!(e!=null&&e.length))throw new Error("Can't nest an empty array!");const t=s6(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=s6(i),r.children.push(a)),r=a}}return t.children[0]}const s6=e=>({item:e,children:[]}),_y={visibilities:{}},Gs=Q_({name:"viewSettings",initialState:_y,reducers:{setVisibility:(e,t)=>{e.visibilities[t.payload.name]=t.payload.visibility},restoreDefaultVisibility:(e,t)=>{delete e.visibilities[t.payload]},restoreDefaultVisibilities:(e,t)=>_y,setViewSettings:(e,t)=>({..._y,...t.payload?t.payload:{}})}});class QW extends gr{constructor(){super();H(this,ag);H(this,og);H(this,sg);H(this,lg);H(this,Wl);this.app=void 0,this.nestedPaths=void 0,this.sateWatcher=B0(n=>n.viewSettings,(n,r)=>this.requestUpdate()),this.style.display="none",this.buttonRef=Ay()}connectedCallback(){super.connectedCallback(),this.dispatchEvent(o6("app",n=>{this.app=n})),this.app.addInitializationListener(()=>{Y(this,sg,kR).call(this),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}render(){return U`
3045
3050
  <div class="dropdown bookmark-dropdown">
3046
3051
  <button
3047
3052
  ${Sy(this.buttonRef)}
@@ -3049,20 +3054,20 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3049
3054
  title="Toggle view visibilities"
3050
3055
  @click=${Y(this,Wl,yg).bind(this)}
3051
3056
  >
3052
- ${$e(aG).node[0]}
3057
+ ${$e(iG).node[0]}
3053
3058
  </button>
3054
3059
  </div>
3055
- `}getVisibilities(){return this.app.storeHelper.state.viewSettings.visibilities}}ag=new WeakSet,_R=function(n,r){const i=n.target.checked;this.app.storeHelper.dispatch(i!=r.isVisibleInSpec()?Gs.actions.setVisibility({name:r.name,visibility:i}):Gs.actions.restoreDefaultVisibility(r.name)),this.requestUpdate(),Y(this,Wl,yg).call(this),n.stopPropagation()},og=new WeakSet,CR=function(){this.app.storeHelper.dispatch(Gs.actions.restoreDefaultVisibilities()),Y(this,Wl,yg).call(this)},sg=new WeakSet,kR=function(){const n=this.app.genomeSpy.viewRoot;if(!n)return;const r=[];for(const a of z4(n.getDescendants(),o=>o.dataParent))$4(a,{preOrder:o=>{const s=o.ref;if(s instanceof X1)return"skip";r.push(s)}});const i=r.filter(a=>G$(a.name)&&l6(a)).map(a=>[...a.getDataAncestors()].reverse());this.nestedPaths=QW(i)},lg=new WeakSet,TR=function(){const n=this.getVisibilities(),r=this.app.genomeSpy.viewRoot,i=j4(r),a=[],o=(s,l=-1)=>{const c=s.item,u=n[c.name]??c.isVisibleInSpec();let f;if([...c.paramMediator.paramConfigs.values()].some(h=>h.bind)&&(f=()=>[{label:"Parameters",type:"header"},{type:"divider"},{customContent:U`<div class="gs-input-binding">
3060
+ `}getVisibilities(){return this.app.storeHelper.state.viewSettings.visibilities}}ag=new WeakSet,_R=function(n,r){const i=n.target.checked;this.app.storeHelper.dispatch(i!=r.isVisibleInSpec()?Gs.actions.setVisibility({name:r.name,visibility:i}):Gs.actions.restoreDefaultVisibility(r.name)),this.requestUpdate(),Y(this,Wl,yg).call(this),n.stopPropagation()},og=new WeakSet,CR=function(){this.app.storeHelper.dispatch(Gs.actions.restoreDefaultVisibilities()),Y(this,Wl,yg).call(this)},sg=new WeakSet,kR=function(){const n=this.app.genomeSpy.viewRoot;if(!n)return;const r=[];for(const a of z4(n.getDescendants(),o=>o.dataParent))$4(a,{preOrder:o=>{const s=o.ref;if(s instanceof X1)return"skip";r.push(s)}});const i=r.filter(a=>H$(a.name)&&l6(a)).map(a=>[...a.getDataAncestors()].reverse());this.nestedPaths=ZW(i)},lg=new WeakSet,TR=function(){const n=this.getVisibilities(),r=this.app.genomeSpy.viewRoot,i=j4(r),a=[],o=(s,l=-1)=>{const c=s.item,u=n[c.name]??c.isVisibleInSpec();let f;if([...c.paramMediator.paramConfigs.values()].some(h=>h.bind)&&(f=()=>[{label:"Parameters",type:"header"},{type:"divider"},{customContent:U`<div class="gs-input-binding">
3056
3061
  ${hS(c.paramMediator)}
3057
3062
  </div>`}]),l>=0){const h=U` <label class="checkbox"
3058
3063
  ><input
3059
3064
  style=${`margin-left: ${l*1.5}em;`}
3060
3065
  type="checkbox"
3061
3066
  ?disabled=${!i.has(c.name)||!l6(c)}
3062
- .checked=${ZW(u)}
3067
+ .checked=${YW(u)}
3063
3068
  @change=${d=>Y(this,ag,_R).call(this,d,c)}
3064
3069
  />${c.getTitleText()??c.name}
3065
- </label>`;a.push({customContent:f?h:U`<li>${h}</li>`,submenu:f})}if(u){l++;for(const h of s.children)o(h,l)}};return o(this.nestedPaths),a},Wl=new WeakSet,yg=function(){const n=Y(this,lg,TR).call(this),r=!Object.keys(this.getVisibilities()).length;hy({items:[{label:"View visibility",type:"header"},{label:"Restore defaults",callback:r?void 0:()=>Y(this,og,CR).call(this)},{type:"divider"},...n]},this.buttonRef.value,"bottom-start")};const l6=e=>e.spec.configurableVisibility??!(e.layoutParent&&e.layoutParent instanceof lo);customElements.define("genome-spy-view-visibility",XW);const Cy=new Set;function c6(e){const n=e.currentTarget.parentNode,r=!n.classList.contains("show");for(const i of Cy)i.classList.remove("show"),document.body.classList.remove(Ha);return Cy.clear(),e.stopPropagation(),r?(Cy.add(n),n.classList.add("show"),document.body.classList.add(Ha),window.addEventListener("click",i=>{n.classList.contains("show")&&(n.classList.remove("show"),document.body.classList.remove(Ha),i.preventDefault())},{once:!0})):window.dispatchEvent(new MouseEvent("click")),r}class KW extends gr{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 he;const a=this.provenance.getActionInfo(r);return a?U`
3070
+ </label>`;a.push({customContent:f?h:U`<li>${h}</li>`,submenu:f})}if(u){l++;for(const h of s.children)o(h,l)}};return o(this.nestedPaths),a},Wl=new WeakSet,yg=function(){const n=Y(this,lg,TR).call(this),r=!Object.keys(this.getVisibilities()).length;hy({items:[{label:"View visibility",type:"header"},{label:"Restore defaults",callback:r?void 0:()=>Y(this,og,CR).call(this)},{type:"divider"},...n]},this.buttonRef.value,"bottom-start")};const l6=e=>e.spec.configurableVisibility??!(e.layoutParent&&e.layoutParent instanceof lo);customElements.define("genome-spy-view-visibility",QW);const Cy=new Set;function c6(e){const n=e.currentTarget.parentNode,r=!n.classList.contains("show");for(const i of Cy)i.classList.remove("show"),document.body.classList.remove(Ha);return Cy.clear(),e.stopPropagation(),r?(Cy.add(n),n.classList.add("show"),document.body.classList.add(Ha),window.addEventListener("click",i=>{n.classList.contains("show")&&(n.classList.remove("show"),document.body.classList.remove(Ha),i.preventDefault())},{once:!0})):window.dispatchEvent(new MouseEvent("click")),r}class XW extends gr{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 he;const a=this.provenance.getActionInfo(r);return a?U`
3066
3071
  <li>
3067
3072
  <a
3068
3073
  @click=${()=>this.provenance.activateState(i)}
@@ -3080,7 +3085,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3080
3085
  ?disabled=${this.provenance.isEmpty()}
3081
3086
  @click=${c6}
3082
3087
  >
3083
- ${$e(cG).node[0]}
3088
+ ${$e(lG).node[0]}
3084
3089
  </button>
3085
3090
  <ol class="gs-dropdown-menu provenance-menu">
3086
3091
  ${this.provenance.getFullActionHistory().map(t)}
@@ -3097,7 +3102,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3097
3102
  ?disabled=${!this.provenance.isUndoable()}
3098
3103
  @click=${()=>this.provenance.undo()}
3099
3104
  >
3100
- ${$e(tG).node[0]}
3105
+ ${$e(eG).node[0]}
3101
3106
  </button>
3102
3107
  ${n()}
3103
3108
  <button
@@ -3106,19 +3111,19 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3106
3111
  ?disabled=${!this.provenance.isRedoable()}
3107
3112
  @click=${()=>this.provenance.redo()}
3108
3113
  >
3109
- ${$e(KH).node[0]}
3114
+ ${$e(XH).node[0]}
3110
3115
  </button>
3111
3116
  </div>
3112
- `}}customElements.define("genome-spy-provenance-buttons",KW);/**
3117
+ `}}customElements.define("genome-spy-provenance-buttons",XW);/**
3113
3118
  * @license
3114
3119
  * Copyright 2021 Google LLC
3115
3120
  * SPDX-License-Identifier: BSD-3-Clause
3116
- */class JW{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}let eY=class{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??(this.Z=new Promise(t=>this.q=t))}resume(){var t;(t=this.q)==null||t.call(this),this.Z=this.q=void 0}};/**
3121
+ */class KW{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}let JW=class{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??(this.Z=new Promise(t=>this.q=t))}resume(){var t;(t=this.q)==null||t.call(this),this.Z=this.q=void 0}};/**
3117
3122
  * @license
3118
3123
  * Copyright 2017 Google LLC
3119
3124
  * SPDX-License-Identifier: BSD-3-Clause
3120
- */const u6=e=>!ZV(e)&&typeof e.then=="function",f6=1073741823,tY=$a(class extends n6{constructor(){super(...arguments),this._$Cwt=f6,this._$Cbt=[],this._$CK=new JW(this),this._$CX=new eY}render(...t){return t.find(n=>!u6(n))??Dt}update(t,n){const r=this._$Cbt;let i=r.length;this._$Cbt=n;const a=this._$CK,o=this._$CX;this.isConnected||this.disconnected();for(let s=0;s<n.length&&!(s>this._$Cwt);s++){const l=n[s];if(!u6(l))return this._$Cwt=s,l;s<i&&l===r[s]||(this._$Cwt=f6,i=0,Promise.resolve(l).then(async c=>{for(;o.get();)await o.get();const u=a.deref();if(u!==void 0){const f=u._$Cbt.indexOf(l);f>-1&&f<u._$Cwt&&(u._$Cwt=f,u.setValue(c))}}))}return Dt}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}});var nY={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function h6(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function Du(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ky(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,l=[],c="",u=t||{},f=0;function h(p){var g=nY[p[1]||""],b=l[l.length-1]==p;return g?g[1]?(b?l.pop():l.push(p),g[0|b]):g[0]:p}function d(){for(var p="";l.length;)p+=h(l[l.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()+'"':"")+">"+h6(Du(o).replace(/^\n+|\n+$/g,""))+"</code></pre>":(o=i[6])?(o.match(/\./)&&(i[5]=i[5].replace(/^\d+/gm,"")),a=ky(h6(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="'+Du(i[8])+'" alt="'+Du(i[7])+'">':i[10]?(c=c.replace("<a>",'<a href="'+Du(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))+">"+ky(i[12]||i[15],u)+"</"+o+">":i[16]?n="<code>"+Du(i[16])+"</code>":(i[17]||i[1])&&(n=h(i[17]||"--"))),c+=r,c+=n;return(c+e.substring(f)+d()).replace(/^\n+|\n+$/g,"")}function rY(e,t={}){const n=ky(e),r=new DOMParser().parseFromString(`<!DOCTYPE html><html><body><div>${n}</div></body></html>`,"text/html");r.normalize(),d6(r.body);for(const a of r.querySelectorAll("a[href]"))a.setAttribute("target","blank"),a.setAttribute("rel","noopener noreferrer"),a.setAttribute("href",oo(a.getAttribute("href"),t.baseUrl));for(const a of r.querySelectorAll("img[src]"))a.setAttribute("src",oo(a.getAttribute("src"),t.baseUrl));const i=r.body.removeChild(r.querySelector("body > div"));return i.className="snarkdown",i}function d6(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--;)d6(e.childNodes[t])}}function iY(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 M0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function Bu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function aY(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 Ty={exports:{}};Ty.exports,function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",a={};function o(l,c){if(!a[l]){a[l]={};for(var u=0;u<l.length;u++)a[l][l.charAt(u)]=u}return a[l][c]}var s={compressToBase64:function(l){if(l==null)return"";var c=s._compress(l,6,function(u){return r.charAt(u)});switch(c.length%4){default:case 0:return c;case 1:return c+"===";case 2:return c+"==";case 3:return c+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:s._decompress(l.length,32,function(c){return o(r,l.charAt(c))})},compressToUTF16:function(l){return l==null?"":s._compress(l,15,function(c){return n(c+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:s._decompress(l.length,16384,function(c){return l.charCodeAt(c)-32})},compressToUint8Array:function(l){for(var c=s.compress(l),u=new Uint8Array(c.length*2),f=0,h=c.length;f<h;f++){var d=c.charCodeAt(f);u[f*2]=d>>>8,u[f*2+1]=d%256}return u},decompressFromUint8Array:function(l){if(l==null)return s.decompress(l);for(var c=new Array(l.length/2),u=0,f=c.length;u<f;u++)c[u]=l[u*2]*256+l[u*2+1];var h=[];return c.forEach(function(d){h.push(n(d))}),s.decompress(h.join(""))},compressToEncodedURIComponent:function(l){return l==null?"":s._compress(l,6,function(c){return i.charAt(c)})},decompressFromEncodedURIComponent:function(l){return l==null?"":l==""?null:(l=l.replace(/ /g,"+"),s._decompress(l.length,32,function(c){return o(i,l.charAt(c))}))},compress:function(l){return s._compress(l,16,function(c){return n(c)})},_compress:function(l,c,u){if(l==null)return"";var f,h,d={},p={},g="",b="",y="",w=2,A=3,x=2,E=[],_=0,T=0,D;for(D=0;D<l.length;D+=1)if(g=l.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,T==c-1?(T=0,E.push(u(_)),_=0):T++;for(h=y.charCodeAt(0),f=0;f<8;f++)_=_<<1|h&1,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=h>>1}else{for(h=1,f=0;f<x;f++)_=_<<1|h,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=0;for(h=y.charCodeAt(0),f=0;f<16;f++)_=_<<1|h&1,T==c-1?(T=0,E.push(u(_)),_=0):T++,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,T==c-1?(T=0,E.push(u(_)),_=0):T++,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,T==c-1?(T=0,E.push(u(_)),_=0):T++;for(h=y.charCodeAt(0),f=0;f<8;f++)_=_<<1|h&1,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=h>>1}else{for(h=1,f=0;f<x;f++)_=_<<1|h,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=0;for(h=y.charCodeAt(0),f=0;f<16;f++)_=_<<1|h&1,T==c-1?(T=0,E.push(u(_)),_=0):T++,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,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=h>>1;w--,w==0&&(w=Math.pow(2,x),x++)}for(h=2,f=0;f<x;f++)_=_<<1|h&1,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=h>>1;for(;;)if(_=_<<1,T==c-1){E.push(u(_));break}else T++;return E.join("")},decompress:function(l){return l==null?"":l==""?null:s._decompress(l.length,32768,function(c){return l.charCodeAt(c)})},_decompress:function(l,c,u){var f=[],h=4,d=4,p=3,g="",b=[],y,w,A,x,E,_,T,D={val:u(0),position:c,index:1};for(y=0;y<3;y+=1)f[y]=y;for(A=0,E=Math.pow(2,2),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;switch(A){case 0:for(A=0,E=Math.pow(2,8),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;T=n(A);break;case 1:for(A=0,E=Math.pow(2,16),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;T=n(A);break;case 2:return""}for(f[3]=T,w=T,b.push(T);;){if(D.index>l)return"";for(A=0,E=Math.pow(2,p),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;switch(T=A){case 0:for(A=0,E=Math.pow(2,8),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;f[d++]=n(A),T=d-1,h--;break;case 1:for(A=0,E=Math.pow(2,16),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;f[d++]=n(A),T=d-1,h--;break;case 2:return b.join("")}if(h==0&&(h=Math.pow(2,p),p++),f[T])g=f[T];else if(T===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)}(Ty);var p6=Ty.exports;function oY(){const e=typeof process<"u"?require("util").TextEncoder:TextEncoder;return new e}let g6;function sY(){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 lY(e){g6??(g6=sY());let t=-1;const n=oY().encode(e);for(let r=0;r<n.length;r++)t=t>>>8^g6[(t^n[r])&255];return(t^-1)>>>0}function m6(e){return("00000000"+lY(e).toString(16)).slice(-8)}function b6(e){const t=p6.compressToEncodedURIComponent(JSON.stringify(e));return"#"+t+m6(t)}function cY(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(m6(t)!==n)throw new Error("The state string in the URL is corrupted.");return JSON.parse(p6.decompressFromEncodedURIComponent(t))}let Eo;function uY(e){for(const t of e.genomeSpy.getNamedScaleResolutions().values())t.isZoomable()&&t.resetZoom();e.storeHelper.dispatch([...e.provenance.isUndoable()?[xo.jumpToPast(0)]:[],Gs.actions.restoreDefaultVisibilities()])}async function Iy(e,t){try{e.actions&&t.provenance.dispatchBookmark(e.actions),t.storeHelper.dispatch(Gs.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),gn(U`<p>Cannot restore the state:</p>
3121
- <p>${n}</p>`),t.provenance.activateState(0)}}async function Fu(e,t,n={}){await Iy(e,t),(Eo||e.notes||n.mode=="shared"&&(e.name||e.notes))&&await fY(e,t,n)}async function fY(e,t,n={}){Eo??(Eo=bo("tour",t.appContainer)),await hY(e,t,n)}async function hY(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"}`,l=e.notes?rY(e.notes,{baseUrl:t.genomeSpy.spec.baseUrl}):U`<span class="no-notes">No notes provided</span>`,c=async()=>{if(Eo==null||Eo.close(),Eo=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}`);Iy(b,t)}else g===null||uY(t)}},u=async g=>{const b=await r.get(i[g]);Fu(b,t,n),t.appContainer.querySelector("canvas").focus()},f=async()=>{if(await Ry(t.localBookmarkDatabase,e,"add"))try{await t.localBookmarkDatabase.put(e)}catch(g){console.warn(g),gn(`Cannot import bookmark: ${g}`)}},h=U` <button class="btn" @click=${c}>
3125
+ */const u6=e=>!YV(e)&&typeof e.then=="function",f6=1073741823,eY=$a(class extends n6{constructor(){super(...arguments),this._$Cwt=f6,this._$Cbt=[],this._$CK=new KW(this),this._$CX=new JW}render(...t){return t.find(n=>!u6(n))??Dt}update(t,n){const r=this._$Cbt;let i=r.length;this._$Cbt=n;const a=this._$CK,o=this._$CX;this.isConnected||this.disconnected();for(let s=0;s<n.length&&!(s>this._$Cwt);s++){const l=n[s];if(!u6(l))return this._$Cwt=s,l;s<i&&l===r[s]||(this._$Cwt=f6,i=0,Promise.resolve(l).then(async c=>{for(;o.get();)await o.get();const u=a.deref();if(u!==void 0){const f=u._$Cbt.indexOf(l);f>-1&&f<u._$Cwt&&(u._$Cwt=f,u.setValue(c))}}))}return Dt}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}});var tY={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function h6(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function Du(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ky(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,l=[],c="",u=t||{},f=0;function h(p){var g=tY[p[1]||""],b=l[l.length-1]==p;return g?g[1]?(b?l.pop():l.push(p),g[0|b]):g[0]:p}function d(){for(var p="";l.length;)p+=h(l[l.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()+'"':"")+">"+h6(Du(o).replace(/^\n+|\n+$/g,""))+"</code></pre>":(o=i[6])?(o.match(/\./)&&(i[5]=i[5].replace(/^\d+/gm,"")),a=ky(h6(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="'+Du(i[8])+'" alt="'+Du(i[7])+'">':i[10]?(c=c.replace("<a>",'<a href="'+Du(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))+">"+ky(i[12]||i[15],u)+"</"+o+">":i[16]?n="<code>"+Du(i[16])+"</code>":(i[17]||i[1])&&(n=h(i[17]||"--"))),c+=r,c+=n;return(c+e.substring(f)+d()).replace(/^\n+|\n+$/g,"")}function nY(e,t={}){const n=ky(e),r=new DOMParser().parseFromString(`<!DOCTYPE html><html><body><div>${n}</div></body></html>`,"text/html");r.normalize(),d6(r.body);for(const a of r.querySelectorAll("a[href]"))a.setAttribute("target","blank"),a.setAttribute("rel","noopener noreferrer"),a.setAttribute("href",oo(a.getAttribute("href"),t.baseUrl));for(const a of r.querySelectorAll("img[src]"))a.setAttribute("src",oo(a.getAttribute("src"),t.baseUrl));const i=r.body.removeChild(r.querySelector("body > div"));return i.className="snarkdown",i}function d6(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--;)d6(e.childNodes[t])}}function rY(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 M0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function Bu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function iY(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 Ty={exports:{}};Ty.exports,function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",a={};function o(l,c){if(!a[l]){a[l]={};for(var u=0;u<l.length;u++)a[l][l.charAt(u)]=u}return a[l][c]}var s={compressToBase64:function(l){if(l==null)return"";var c=s._compress(l,6,function(u){return r.charAt(u)});switch(c.length%4){default:case 0:return c;case 1:return c+"===";case 2:return c+"==";case 3:return c+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:s._decompress(l.length,32,function(c){return o(r,l.charAt(c))})},compressToUTF16:function(l){return l==null?"":s._compress(l,15,function(c){return n(c+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:s._decompress(l.length,16384,function(c){return l.charCodeAt(c)-32})},compressToUint8Array:function(l){for(var c=s.compress(l),u=new Uint8Array(c.length*2),f=0,h=c.length;f<h;f++){var d=c.charCodeAt(f);u[f*2]=d>>>8,u[f*2+1]=d%256}return u},decompressFromUint8Array:function(l){if(l==null)return s.decompress(l);for(var c=new Array(l.length/2),u=0,f=c.length;u<f;u++)c[u]=l[u*2]*256+l[u*2+1];var h=[];return c.forEach(function(d){h.push(n(d))}),s.decompress(h.join(""))},compressToEncodedURIComponent:function(l){return l==null?"":s._compress(l,6,function(c){return i.charAt(c)})},decompressFromEncodedURIComponent:function(l){return l==null?"":l==""?null:(l=l.replace(/ /g,"+"),s._decompress(l.length,32,function(c){return o(i,l.charAt(c))}))},compress:function(l){return s._compress(l,16,function(c){return n(c)})},_compress:function(l,c,u){if(l==null)return"";var f,h,d={},p={},g="",b="",y="",w=2,A=3,x=2,E=[],_=0,T=0,D;for(D=0;D<l.length;D+=1)if(g=l.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,T==c-1?(T=0,E.push(u(_)),_=0):T++;for(h=y.charCodeAt(0),f=0;f<8;f++)_=_<<1|h&1,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=h>>1}else{for(h=1,f=0;f<x;f++)_=_<<1|h,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=0;for(h=y.charCodeAt(0),f=0;f<16;f++)_=_<<1|h&1,T==c-1?(T=0,E.push(u(_)),_=0):T++,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,T==c-1?(T=0,E.push(u(_)),_=0):T++,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,T==c-1?(T=0,E.push(u(_)),_=0):T++;for(h=y.charCodeAt(0),f=0;f<8;f++)_=_<<1|h&1,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=h>>1}else{for(h=1,f=0;f<x;f++)_=_<<1|h,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=0;for(h=y.charCodeAt(0),f=0;f<16;f++)_=_<<1|h&1,T==c-1?(T=0,E.push(u(_)),_=0):T++,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,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=h>>1;w--,w==0&&(w=Math.pow(2,x),x++)}for(h=2,f=0;f<x;f++)_=_<<1|h&1,T==c-1?(T=0,E.push(u(_)),_=0):T++,h=h>>1;for(;;)if(_=_<<1,T==c-1){E.push(u(_));break}else T++;return E.join("")},decompress:function(l){return l==null?"":l==""?null:s._decompress(l.length,32768,function(c){return l.charCodeAt(c)})},_decompress:function(l,c,u){var f=[],h=4,d=4,p=3,g="",b=[],y,w,A,x,E,_,T,D={val:u(0),position:c,index:1};for(y=0;y<3;y+=1)f[y]=y;for(A=0,E=Math.pow(2,2),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;switch(A){case 0:for(A=0,E=Math.pow(2,8),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;T=n(A);break;case 1:for(A=0,E=Math.pow(2,16),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;T=n(A);break;case 2:return""}for(f[3]=T,w=T,b.push(T);;){if(D.index>l)return"";for(A=0,E=Math.pow(2,p),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;switch(T=A){case 0:for(A=0,E=Math.pow(2,8),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;f[d++]=n(A),T=d-1,h--;break;case 1:for(A=0,E=Math.pow(2,16),_=1;_!=E;)x=D.val&D.position,D.position>>=1,D.position==0&&(D.position=c,D.val=u(D.index++)),A|=(x>0?1:0)*_,_<<=1;f[d++]=n(A),T=d-1,h--;break;case 2:return b.join("")}if(h==0&&(h=Math.pow(2,p),p++),f[T])g=f[T];else if(T===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)}(Ty);var p6=Ty.exports;function aY(){const e=typeof process<"u"?require("util").TextEncoder:TextEncoder;return new e}let g6;function oY(){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 sY(e){g6??(g6=oY());let t=-1;const n=aY().encode(e);for(let r=0;r<n.length;r++)t=t>>>8^g6[(t^n[r])&255];return(t^-1)>>>0}function m6(e){return("00000000"+sY(e).toString(16)).slice(-8)}function b6(e){const t=p6.compressToEncodedURIComponent(JSON.stringify(e));return"#"+t+m6(t)}function lY(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(m6(t)!==n)throw new Error("The state string in the URL is corrupted.");return JSON.parse(p6.decompressFromEncodedURIComponent(t))}let Eo;function cY(e){for(const t of e.genomeSpy.getNamedScaleResolutions().values())t.isZoomable()&&t.resetZoom();e.storeHelper.dispatch([...e.provenance.isUndoable()?[xo.jumpToPast(0)]:[],Gs.actions.restoreDefaultVisibilities()])}async function Iy(e,t){try{e.actions&&t.provenance.dispatchBookmark(e.actions),t.storeHelper.dispatch(Gs.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),gn(U`<p>Cannot restore the state:</p>
3126
+ <p>${n}</p>`),t.provenance.activateState(0)}}async function Fu(e,t,n={}){await Iy(e,t),(Eo||e.notes||n.mode=="shared"&&(e.name||e.notes))&&await uY(e,t,n)}async function uY(e,t,n={}){Eo??(Eo=bo("tour",t.appContainer)),await fY(e,t,n)}async function fY(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"}`,l=e.notes?nY(e.notes,{baseUrl:t.genomeSpy.spec.baseUrl}):U`<span class="no-notes">No notes provided</span>`,c=async()=>{if(Eo==null||Eo.close(),Eo=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}`);Iy(b,t)}else g===null||cY(t)}},u=async g=>{const b=await r.get(i[g]);Fu(b,t,n),t.appContainer.querySelector("canvas").focus()},f=async()=>{if(await Ry(t.localBookmarkDatabase,e,"add"))try{await t.localBookmarkDatabase.put(e)}catch(g){console.warn(g),gn(`Cannot import bookmark: ${g}`)}},h=U` <button class="btn" @click=${c}>
3122
3127
  ${n.mode=="tour"?"End tour":"Close"}
3123
3128
  </button>
3124
3129
  ${n.mode=="shared"&&t.localBookmarkDatabase?U`
@@ -3131,17 +3136,17 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3131
3136
  @click=${()=>u(a-1)}
3132
3137
  ?disabled=${a<=0}
3133
3138
  >
3134
- ${$e(rG).node[0]} Previous
3139
+ ${$e(nG).node[0]} Previous
3135
3140
  </button>
3136
3141
  <button
3137
3142
  class="btn"
3138
3143
  @click=${()=>u(a+1)}
3139
3144
  ?disabled=${a>=i.length-1}
3140
3145
  >
3141
- Next ${$e($H).node[0]}
3146
+ Next ${$e(UH).node[0]}
3142
3147
  </button>`:he}`,p=U`
3143
3148
  <button title="Collapse" class="btn collapse" @click=${g=>g.target.closest(".gs-modal").classList.toggle("collapsed")}>
3144
- ${$e(uG).node[0]}
3149
+ ${$e(cG).node[0]}
3145
3150
  </button>
3146
3151
  <div class="modal-title">${s}</div>
3147
3152
  <div class="modal-body markdown" style="max-width: 600px">
@@ -3150,7 +3155,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3150
3155
  <div class="modal-buttons">${h}</div>
3151
3156
  `;Bt(p,Eo.content)}function y6(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(" ","-"):b6(e));gn(U`
3152
3157
  <div class="gs-tabs" style="width: 600px">
3153
- <ul class="tabs" @click=${iY}>
3158
+ <ul class="tabs" @click=${rY}>
3154
3159
  <li class="active-tab"><button>URL</button></li>
3155
3160
  <li><button>JSON</button></li>
3156
3161
  </ul>
@@ -3163,7 +3168,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
3163
3168
  type="text"
3164
3169
  .value=${i}
3165
3170
  />
3166
- <button @click=${o=>navigator.clipboard.writeText(i).then(()=>o.target.dispatchEvent(JV())).catch(()=>gn("Failed to copy!"))}>Copy</button>
3171
+ <button @click=${o=>navigator.clipboard.writeText(i).then(()=>o.target.dispatchEvent(KV())).catch(()=>gn("Failed to copy!"))}>Copy</button>
3167
3172
  </div>
3168
3173
  <small
3169
3174
  >The bookmark URL contains all the bookmarked data,
@@ -3188,7 +3193,7 @@ ${n}</textarea
3188
3193
  <div class="modal-body" style="width: 500px">
3189
3194
  ${n=="edit"?U`
3190
3195
  <div class="gs-alert warning">
3191
- ${$e(GH).node[0]} The current
3196
+ ${$e(HH).node[0]} The current
3192
3197
  visualization state will be updated to the bookmark
3193
3198
  you are editing.
3194
3199
  </div>
@@ -3246,7 +3251,7 @@ ${n}</textarea
3246
3251
  </div>
3247
3252
  `,a=t.name,o=()=>!!t.name,s=bo();return new Promise(l=>{const c=()=>{s.close(),l(!1)},u=async()=>{if(!o()){gn("Name is missing!",{title:"Error"});return}let h=!0;e&&!(n&&t.name==a)&&await e.get(t.name)&&(h=await gn(U`A bookmark with the name
3248
3253
  <em>${t.name}</em> already exists. It will be
3249
- overwritten.`,{title:"Bookmark already exists",cancelButton:!0})),h&&(s.close(),l(!0))},f=()=>{s.close(),l(!0)};Bt(i(c,n=="share"?f:u),s.content),s.content.querySelector("#bookmark-title").focus()})}function v6(e){if(e!==void 0&&(e=e.trim(),e.length))return e}class dY extends gr{constructor(){super(),this.app=void 0}connectedCallback(){super.connectedCallback(),this.dispatchEvent(o6("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 Ry(void 0,t,"share")&&y6(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 Ry(t,a,i?"edit":"add"))try{await t.put(a,r==null?void 0:r.name),this.requestUpdate()}catch(o){gn(`${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=()=>gn(U`The bookmark <em>${n}</em> will be deleted.`,{title:"Are you sure?",cancelButton:!0}).then(async l=>{l&&(await t.delete(n),this.requestUpdate())}),o=[],s=t==this.app.globalBookmarkDatabase;s||(o.push({label:"Edit and replace...",icon:QH,callback:()=>this._addBookmark(t,n)}),o.push({label:"Delete",icon:mS,callback:a})),o.push({label:"Share...",icon:rb,callback:async()=>y6(await t.get(n),s)}),hy({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=>fy(a)):he}_getBookmarks(){const t=(n,r)=>n?tY(this._makeBookmarkMenuItems(n,r),U`Loading...`):he;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?U` <li>
3254
+ overwritten.`,{title:"Bookmark already exists",cancelButton:!0})),h&&(s.close(),l(!0))},f=()=>{s.close(),l(!0)};Bt(i(c,n=="share"?f:u),s.content),s.content.querySelector("#bookmark-title").focus()})}function v6(e){if(e!==void 0&&(e=e.trim(),e.length))return e}class hY extends gr{constructor(){super(),this.app=void 0}connectedCallback(){super.connectedCallback(),this.dispatchEvent(o6("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 Ry(void 0,t,"share")&&y6(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 Ry(t,a,i?"edit":"add"))try{await t.put(a,r==null?void 0:r.name),this.requestUpdate()}catch(o){gn(`${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=()=>gn(U`The bookmark <em>${n}</em> will be deleted.`,{title:"Are you sure?",cancelButton:!0}).then(async l=>{l&&(await t.delete(n),this.requestUpdate())}),o=[],s=t==this.app.globalBookmarkDatabase;s||(o.push({label:"Edit and replace...",icon:ZH,callback:()=>this._addBookmark(t,n)}),o.push({label:"Delete",icon:mS,callback:a})),o.push({label:"Share...",icon:rb,callback:async()=>y6(await t.get(n),s)}),hy({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=>fy(a)):he}_getBookmarks(){const t=(n,r)=>n?eY(this._makeBookmarkMenuItems(n,r),U`Loading...`):he;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?U` <li>
3250
3255
  <a @click=${()=>this._addBookmark(t)}
3251
3256
  >Add bookmark...</a
3252
3257
  >
@@ -3274,7 +3279,7 @@ ${n}</textarea
3274
3279
  ${$e(rb).node[0]}
3275
3280
  </button>
3276
3281
  </div>
3277
- `}}customElements.define("genome-spy-bookmark-button",dY);class pY extends gr{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(U`
3282
+ `}}customElements.define("genome-spy-bookmark-button",hY);class dY extends gr{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(U`
3278
3283
  <genome-spy-provenance-buttons
3279
3284
  .provenance=${t}
3280
3285
  ></genome-spy-provenance-buttons>
@@ -3305,7 +3310,7 @@ ${n}</textarea
3305
3310
  title="Fullscreen"
3306
3311
  @click=${()=>this.app.toggleFullScreen()}
3307
3312
  >
3308
- ${$e(jH).node[0]}
3313
+ ${$e(VH).node[0]}
3309
3314
  </button>
3310
3315
  `:he}
3311
3316
 
@@ -3314,7 +3319,7 @@ ${n}</textarea
3314
3319
  title="Help"
3315
3320
  @click=${()=>window.open("https://genomespy.app/docs/sample-collections/analyzing/","_blank")}
3316
3321
  >
3317
- ${$e(ZH).node[0]}
3322
+ ${$e(YH).node[0]}
3318
3323
  </button>
3319
3324
  `),n}render(){const t=this.app.genomeSpy;return U`
3320
3325
  <nav class="gs-toolbar">
@@ -3329,25 +3334,25 @@ ${n}</textarea
3329
3334
  `:he}
3330
3335
  ${this._getToolButtons()}
3331
3336
  </nav>
3332
- `}}customElements.define("genome-spy-toolbar",pY);class gY{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=>Ue(o)&&a.type.startsWith(o)),i=(a,o)=>r(o)?o:a??null;this._reducer=Dq(Pb({...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()?[xo.jumpToPast(0)]:[],...t])}isRedoable(){return this.isEnabled()&&this._provenanceState.future.length>0}redo(){this.storeHelper.dispatch(xo.redo())}isUndoable(){return this.isEnabled()&&this._provenanceState.past.length>0}undo(){this.storeHelper.dispatch(xo.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(xo.jumpToPast(t)):t>n&&this.storeHelper.dispatch(xo.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 mY(e,t,n=r=>+r){const r=e.length,i=new ou,a=new Array(r).fill(0);for(const[s,l]of e.entries())l.length&&i.push(s,n(l[0]));let o=0;for(;(o=i.pop())!==void 0;){const s=e[o];let l=a[o];const c=s[l++];if(t(c),l<s.length){const u=n(s[l]);i.push(o,u),a[o]=l}}}const bY="sampleCount";class yY extends st{constructor(n,r){super();H(this,sh);H(this,cg);H(this,ug);H(this,fg);H(this,ah,!0);H(this,oh,void 0);this.view=r;const i=r.context.animator;if(this.provenance=vY(r),!this.provenance)throw new Error("No SampleView was found!");this.provenance.storeHelper.subscribe(a=>{B(this,sh,fw)&&(B(this,ah)&&(ie(this,ah,!1),this.reset(),this.complete()),i.requestTransition(()=>{this.reset(),this.complete()}))})}initialize(){ie(this,oh,this.paramMediator.allocateSetter(bY,0,!0));const n=this.view.getEncoding().x;if(Zr(n))this.xAccessor=Le(n.field);else throw new Error("Sample summarization requires a FieldDef. This is not a FieldDef: "+JSON.stringify(n))}handle(n){}get paramMediator(){return this.view.paramMediator}complete(){B(this,sh,fw)?(Y(this,ug,RR).call(this,this.provenance.getPresentState()[Ns]),super.complete(),Y(this,fg,DR).call(this)):super.complete()}beginBatch(n,r){if(r)for(const i of this.children)i.beginBatch(n)}setParent(n){super.setParent(n)}}ah=new WeakMap,oh=new WeakMap,sh=new WeakSet,fw=function(){return this.view.isConfiguredVisible()},cg=new WeakSet,IR=function(){if(this.parent instanceof au)return this.parent;throw new Error("MergeFacetsTransform must be a direct child of a Collector")},ug=new WeakSet,RR=function(n){const r=[...Xb(n.rootGroup)].filter(i=>fC(_n(i)));for(const[i,a]of r.entries()){const o=_n(a);if(fC(o)){this.beginBatch({type:"facet",facetId:[i]},!0),B(this,oh).call(this,o.samples.length);const s=o.samples,l=Y(this,cg,IR).call(this);mY(s.map(c=>l.facetBatches.get([c])??[]),c=>this._propagate(c),this.xAccessor)}}},fg=new WeakSet,DR=function(){const n=new Set;this.view.visit(r=>{if(r instanceof bt&&r.mark.encoding.y){const i=r.getScaleResolution("y");i&&n.add(i)}});for(const r of n)r.reconfigure()};function vY(e){for(const t of e.getLayoutAncestors())if(t instanceof gy)return t.provenance}var wY="BATCHING_REDUCER.BATCH";function xY(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wY;return{type:t,meta:{batch:!0},payload:e}}function AY(e){return function t(n,r){return r&&r.meta&&r.meta.batch?r.payload.reduce(t,n):e(n,r)}}class EY{constructor(t){this._reducers=t??{},this.store=Hj({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(AY(Pb(this._reducers)))}subscribe(t){this._listeners.add(t)}unsubscribe(t){this._listeners.delete(t)}dispatch(t){Array.isArray(t)?this.store.dispatch(xY(t)):this.store.dispatch(t)}getDispatcher(){return t=>this.dispatch(t)}}class SY extends e6{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)}}D4.mergeFacets=yY;class w6{constructor(t,n,r={}){const i=this;this.config=n,r.inputBindingContainer="none",this.storeHelper=new EY,this.storeHelper.addReducer("viewSettings",Gs.reducer),this.provenance=new gY(this.storeHelper),this._initializationListeners=[],this.toolbarRef=Ay(),this.appContainer=t,this._configureContainer(),this.localBookmarkDatabase=typeof n.specId=="string"?new UW(n.specId):void 0,this.globalBookmarkDatabase=void 0,Bt(U`<div class="genome-spy-app">
3337
+ `}}customElements.define("genome-spy-toolbar",dY);class pY{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=>Ue(o)&&a.type.startsWith(o)),i=(a,o)=>r(o)?o:a??null;this._reducer=Rq(Pb({...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()?[xo.jumpToPast(0)]:[],...t])}isRedoable(){return this.isEnabled()&&this._provenanceState.future.length>0}redo(){this.storeHelper.dispatch(xo.redo())}isUndoable(){return this.isEnabled()&&this._provenanceState.past.length>0}undo(){this.storeHelper.dispatch(xo.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(xo.jumpToPast(t)):t>n&&this.storeHelper.dispatch(xo.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 gY(e,t,n=r=>+r){const r=e.length,i=new ou,a=new Array(r).fill(0);for(const[s,l]of e.entries())l.length&&i.push(s,n(l[0]));let o=0;for(;(o=i.pop())!==void 0;){const s=e[o];let l=a[o];const c=s[l++];if(t(c),l<s.length){const u=n(s[l]);i.push(o,u),a[o]=l}}}const mY="sampleCount";class bY extends st{constructor(n,r){super();H(this,sh);H(this,cg);H(this,ug);H(this,fg);H(this,ah,!0);H(this,oh,void 0);this.view=r;const i=r.context.animator;if(this.provenance=yY(r),!this.provenance)throw new Error("No SampleView was found!");this.provenance.storeHelper.subscribe(a=>{B(this,sh,fw)&&(B(this,ah)&&(ie(this,ah,!1),this.reset(),this.complete()),i.requestTransition(()=>{this.reset(),this.complete()}))})}initialize(){ie(this,oh,this.paramMediator.allocateSetter(mY,0,!0));const n=this.view.getEncoding().x;if(Zr(n))this.xAccessor=Le(n.field);else throw new Error("Sample summarization requires a FieldDef. This is not a FieldDef: "+JSON.stringify(n))}handle(n){}get paramMediator(){return this.view.paramMediator}complete(){B(this,sh,fw)?(Y(this,ug,RR).call(this,this.provenance.getPresentState()[Ns]),super.complete(),Y(this,fg,DR).call(this)):super.complete()}beginBatch(n,r){if(r)for(const i of this.children)i.beginBatch(n)}setParent(n){super.setParent(n)}}ah=new WeakMap,oh=new WeakMap,sh=new WeakSet,fw=function(){return this.view.isConfiguredVisible()},cg=new WeakSet,IR=function(){if(this.parent instanceof au)return this.parent;throw new Error("MergeFacetsTransform must be a direct child of a Collector")},ug=new WeakSet,RR=function(n){const r=[...Xb(n.rootGroup)].filter(i=>fC(_n(i)));for(const[i,a]of r.entries()){const o=_n(a);if(fC(o)){this.beginBatch({type:"facet",facetId:[i]},!0),B(this,oh).call(this,o.samples.length);const s=o.samples,l=Y(this,cg,IR).call(this);gY(s.map(c=>l.facetBatches.get([c])??[]),c=>this._propagate(c),this.xAccessor)}}},fg=new WeakSet,DR=function(){const n=new Set;this.view.visit(r=>{if(r instanceof bt&&r.mark.encoding.y){const i=r.getScaleResolution("y");i&&n.add(i)}});for(const r of n)r.reconfigure()};function yY(e){for(const t of e.getLayoutAncestors())if(t instanceof gy)return t.provenance}var vY="BATCHING_REDUCER.BATCH";function wY(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vY;return{type:t,meta:{batch:!0},payload:e}}function xY(e){return function t(n,r){return r&&r.meta&&r.meta.batch?r.payload.reduce(t,n):e(n,r)}}class AY{constructor(t){this._reducers=t??{},this.store=$j({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(xY(Pb(this._reducers)))}subscribe(t){this._listeners.add(t)}unsubscribe(t){this._listeners.delete(t)}dispatch(t){Array.isArray(t)?this.store.dispatch(wY(t)):this.store.dispatch(t)}getDispatcher(){return t=>this.dispatch(t)}}class EY extends e6{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)}}D4.mergeFacets=bY;class w6{constructor(t,n,r={}){const i=this;this.config=n,r.inputBindingContainer="none",this.storeHelper=new AY,this.storeHelper.addReducer("viewSettings",Gs.reducer),this.provenance=new pY(this.storeHelper),this._initializationListeners=[],this.toolbarRef=Ay(),this.appContainer=t,this._configureContainer(),this.localBookmarkDatabase=typeof n.specId=="string"?new zW(n.specId):void 0,this.globalBookmarkDatabase=void 0,Bt(U`<div class="genome-spy-app">
3333
3338
  <genome-spy-toolbar
3334
3339
  ${Sy(i.toolbarRef)}
3335
3340
  .app=${i}
3336
3341
  ></genome-spy-toolbar>
3337
3342
  <div class="genome-spy-container"></div>
3338
- </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 dS(a("genome-spy-container"),this.config,r),this.genomeSpy.viewFactory.addViewType(fS,(s,l,c,u,f)=>new gy(s,l,c,u,f,this.provenance));const o=this.genomeSpy.viewVisibilityPredicate;this.genomeSpy.viewVisibilityPredicate=s=>{var l;return((l=this.storeHelper.state.viewSettings)==null?void 0:l.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?mc({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(B0(s=>{var l;return(l=s.viewSettings)==null?void 0:l.visibilities},(s,l)=>{this.genomeSpy.viewRoot._invalidateCacheByPrefix("size","progeny");const c=this.genomeSpy.viewRoot.context;c.requestLayoutReflow(),c.animator.requestRender()},this.storeHelper.store.getState()));try{const s=await t;s.length&&(this.globalBookmarkDatabase=new SY(s))}catch(s){throw new Error(`Cannot load remote bookmarks: ${s}`)}try{await this._restoreStateFromUrlOrBookmark()}catch(s){gn(s.toString())}this.storeHelper.subscribe(()=>{this._updateStateToUrl()}),window.addEventListener("hashchange",()=>this._restoreStateFromUrl().catch(s=>gn(s.toString())),!1);const r=so(()=>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=Nt(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 Iy(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?b6(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(l=>l.replaceAll(" ","-")==n);if(s){const l=await o.get(s);if(!l)throw new Error(`No such bookmark: ${s}`);return await Fu(l,this,{mode:"tour",database:o}),!0}else throw new Error(`No such bookmark: ${n}`)}}if(t&&t.length>0)try{const a=cY(t);return Fu(a,this,{mode:"shared"}),!0}catch(a){console.error(a),gn(U`<p>Cannot restore the state:</p>
3339
- <p>${a}</p>`)}return!1}_configureContainer(){this.isFullPage()?(this.appContainer.style.margin="0",this.appContainer.style.padding="0",this.appContainer.style.overflow="hidden",_Y(NH)):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 gy)return t=r,ao}),t}}function _Y(e){const t=document.querySelector("head"),n=document.createElement("link");n.setAttribute("rel","shortcut icon"),n.setAttribute("href",e),t.appendChild(n)}async function CY(e,t,n={}){let r;if(Ue(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=qt(t)?t:await x6(t);a.baseUrl??(a.baseUrl=""),a.width??(a.width="container"),a.padding??(a.padding=10),n={powerPreference:"high-performance",...n};const o=new w6(r,a,n);i=o.genomeSpy,kY(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 l=s.get(a);l||(l=new Set,s.set(a,l)),l.add(o)},removeEventListener(a,o){var l;(l=i._eventListeners.get(a))==null||l.delete(o)},getScaleResolutionByName(a){return i.getNamedScaleResolutions().get(a)},updateNamedData:i.updateNamedData.bind(i)}}function kY(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function x6(e){let t;try{t=JSON.parse(await mc().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 Ae={},P0={};P0.byteLength=RY,P0.toByteArray=BY,P0.fromByteArray=PY;for(var kr=[],Bn=[],TY=typeof Uint8Array<"u"?Uint8Array:Array,Dy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vs=0,IY=Dy.length;Vs<IY;++Vs)kr[Vs]=Dy[Vs],Bn[Dy.charCodeAt(Vs)]=Vs;Bn["-".charCodeAt(0)]=62,Bn["_".charCodeAt(0)]=63;function A6(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 RY(e){var t=A6(e),n=t[0],r=t[1];return(n+r)*3/4-r}function DY(e,t,n){return(t+n)*3/4-n}function BY(e){var t,n=A6(e),r=n[0],i=n[1],a=new TY(DY(e,r,i)),o=0,s=i>0?r-4:r,l;for(l=0;l<s;l+=4)t=Bn[e.charCodeAt(l)]<<18|Bn[e.charCodeAt(l+1)]<<12|Bn[e.charCodeAt(l+2)]<<6|Bn[e.charCodeAt(l+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=Bn[e.charCodeAt(l)]<<2|Bn[e.charCodeAt(l+1)]>>4,a[o++]=t&255),i===1&&(t=Bn[e.charCodeAt(l)]<<10|Bn[e.charCodeAt(l+1)]<<4|Bn[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function FY(e){return kr[e>>18&63]+kr[e>>12&63]+kr[e>>6&63]+kr[e&63]}function MY(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(FY(r));return i.join("")}function PY(e){for(var t,n=e.length,r=n%3,i=[],a=16383,o=0,s=n-r;o<s;o+=a)i.push(MY(e,o,o+a>s?s:o+a));return r===1?(t=e[n-1],i.push(kr[t>>2]+kr[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(kr[t>>10]+kr[t>>4&63]+kr[t<<2&63]+"=")),i.join("")}var By={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */By.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,l=(1<<s)-1,c=l>>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-c;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-c}return(d?-1:1)*o*Math.pow(2,a-r)},By.write=function(e,t,n,r,i,a){var o,s,l,c=a*8-i-1,u=(1<<c)-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*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(t*l-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,c+=i;c>0;e[n+d]=o&255,d+=p,o/=256,c-=8);e[n+d-p]|=g*128};/*!
3343
+ </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 dS(a("genome-spy-container"),this.config,r),this.genomeSpy.viewFactory.addViewType(fS,(s,l,c,u,f)=>new gy(s,l,c,u,f,this.provenance));const o=this.genomeSpy.viewVisibilityPredicate;this.genomeSpy.viewVisibilityPredicate=s=>{var l;return((l=this.storeHelper.state.viewSettings)==null?void 0:l.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?mc({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(B0(s=>{var l;return(l=s.viewSettings)==null?void 0:l.visibilities},(s,l)=>{this.genomeSpy.viewRoot._invalidateCacheByPrefix("size","progeny");const c=this.genomeSpy.viewRoot.context;c.requestLayoutReflow(),c.animator.requestRender()},this.storeHelper.store.getState()));try{const s=await t;s.length&&(this.globalBookmarkDatabase=new EY(s))}catch(s){throw new Error(`Cannot load remote bookmarks: ${s}`)}try{await this._restoreStateFromUrlOrBookmark()}catch(s){gn(s.toString())}this.storeHelper.subscribe(()=>{this._updateStateToUrl()}),window.addEventListener("hashchange",()=>this._restoreStateFromUrl().catch(s=>gn(s.toString())),!1);const r=so(()=>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=Nt(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 Iy(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?b6(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(l=>l.replaceAll(" ","-")==n);if(s){const l=await o.get(s);if(!l)throw new Error(`No such bookmark: ${s}`);return await Fu(l,this,{mode:"tour",database:o}),!0}else throw new Error(`No such bookmark: ${n}`)}}if(t&&t.length>0)try{const a=lY(t);return Fu(a,this,{mode:"shared"}),!0}catch(a){console.error(a),gn(U`<p>Cannot restore the state:</p>
3344
+ <p>${a}</p>`)}return!1}_configureContainer(){this.isFullPage()?(this.appContainer.style.margin="0",this.appContainer.style.padding="0",this.appContainer.style.overflow="hidden",SY(LH)):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 gy)return t=r,ao}),t}}function SY(e){const t=document.querySelector("head"),n=document.createElement("link");n.setAttribute("rel","shortcut icon"),n.setAttribute("href",e),t.appendChild(n)}async function _Y(e,t,n={}){let r;if(Ue(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=qt(t)?t:await x6(t);a.baseUrl??(a.baseUrl=""),a.width??(a.width="container"),a.padding??(a.padding=10),n={powerPreference:"high-performance",...n};const o=new w6(r,a,n);i=o.genomeSpy,CY(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 l=s.get(a);l||(l=new Set,s.set(a,l)),l.add(o)},removeEventListener(a,o){var l;(l=i._eventListeners.get(a))==null||l.delete(o)},getScaleResolutionByName(a){return i.getNamedScaleResolutions().get(a)},updateNamedData:i.updateNamedData.bind(i)}}function CY(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function x6(e){let t;try{t=JSON.parse(await mc().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 Ae={},P0={};P0.byteLength=IY,P0.toByteArray=DY,P0.fromByteArray=MY;for(var kr=[],Bn=[],kY=typeof Uint8Array<"u"?Uint8Array:Array,Dy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vs=0,TY=Dy.length;Vs<TY;++Vs)kr[Vs]=Dy[Vs],Bn[Dy.charCodeAt(Vs)]=Vs;Bn["-".charCodeAt(0)]=62,Bn["_".charCodeAt(0)]=63;function A6(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 IY(e){var t=A6(e),n=t[0],r=t[1];return(n+r)*3/4-r}function RY(e,t,n){return(t+n)*3/4-n}function DY(e){var t,n=A6(e),r=n[0],i=n[1],a=new kY(RY(e,r,i)),o=0,s=i>0?r-4:r,l;for(l=0;l<s;l+=4)t=Bn[e.charCodeAt(l)]<<18|Bn[e.charCodeAt(l+1)]<<12|Bn[e.charCodeAt(l+2)]<<6|Bn[e.charCodeAt(l+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=Bn[e.charCodeAt(l)]<<2|Bn[e.charCodeAt(l+1)]>>4,a[o++]=t&255),i===1&&(t=Bn[e.charCodeAt(l)]<<10|Bn[e.charCodeAt(l+1)]<<4|Bn[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function BY(e){return kr[e>>18&63]+kr[e>>12&63]+kr[e>>6&63]+kr[e&63]}function FY(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(BY(r));return i.join("")}function MY(e){for(var t,n=e.length,r=n%3,i=[],a=16383,o=0,s=n-r;o<s;o+=a)i.push(FY(e,o,o+a>s?s:o+a));return r===1?(t=e[n-1],i.push(kr[t>>2]+kr[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(kr[t>>10]+kr[t>>4&63]+kr[t<<2&63]+"=")),i.join("")}var By={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */By.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,l=(1<<s)-1,c=l>>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-c;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-c}return(d?-1:1)*o*Math.pow(2,a-r)},By.write=function(e,t,n,r,i,a){var o,s,l,c=a*8-i-1,u=(1<<c)-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*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(t*l-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,c+=i;c>0;e[n+d]=o&255,d+=p,o/=256,c-=8);e[n+d-p]|=g*128};/*!
3340
3345
  * The buffer module from node.js, for the browser.
3341
3346
  *
3342
3347
  * @author Feross Aboukhadijeh <https://feross.org>
3343
3348
  * @license MIT
3344
- */(function(e){const t=P0,n=By,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 S=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(S,m),S.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(S){if(S>i)throw new RangeError('The value "'+S+'" is invalid for option "size"');const m=new Uint8Array(S);return Object.setPrototypeOf(m,s.prototype),m}function s(S,m,v){if(typeof S=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(S)}return l(S,m,v)}s.poolSize=8192;function l(S,m,v){if(typeof S=="string")return h(S,m);if(ArrayBuffer.isView(S))return p(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(Vt(S,ArrayBuffer)||S&&Vt(S.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Vt(S,SharedArrayBuffer)||S&&Vt(S.buffer,SharedArrayBuffer)))return g(S,m,v);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const R=S.valueOf&&S.valueOf();if(R!=null&&R!==S)return s.from(R,m,v);const M=b(S);if(M)return M;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return s.from(S[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 S)}s.from=function(S,m,v){return l(S,m,v)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function u(S,m,v){return c(S),S<=0?o(S):m!==void 0?typeof v=="string"?o(S).fill(m,v):o(S).fill(m):o(S)}s.alloc=function(S,m,v){return u(S,m,v)};function f(S){return c(S),o(S<0?0:y(S)|0)}s.allocUnsafe=function(S){return f(S)},s.allocUnsafeSlow=function(S){return f(S)};function h(S,m){if((typeof m!="string"||m==="")&&(m="utf8"),!s.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const v=A(S,m)|0;let R=o(v);const M=R.write(S,m);return M!==v&&(R=R.slice(0,M)),R}function d(S){const m=S.length<0?0:y(S.length)|0,v=o(m);for(let R=0;R<m;R+=1)v[R]=S[R]&255;return v}function p(S){if(Vt(S,Uint8Array)){const m=new Uint8Array(S);return g(m.buffer,m.byteOffset,m.byteLength)}return d(S)}function g(S,m,v){if(m<0||S.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(S.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(S):v===void 0?R=new Uint8Array(S,m):R=new Uint8Array(S,m,v),Object.setPrototypeOf(R,s.prototype),R}function b(S){if(s.isBuffer(S)){const m=y(S.length)|0,v=o(m);return v.length===0||S.copy(v,0,0,m),v}if(S.length!==void 0)return typeof S.length!="number"||xi(S.length)?o(0):d(S);if(S.type==="Buffer"&&Array.isArray(S.data))return d(S.data)}function y(S){if(S>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return S|0}function w(S){return+S!=S&&(S=0),s.alloc(+S)}s.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==s.prototype},s.compare=function(m,v){if(Vt(m,Uint8Array)&&(m=s.from(m,m.offset,m.byteLength)),Vt(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,M=v.length;for(let z=0,W=Math.min(R,M);z<W;++z)if(m[z]!==v[z]){R=m[z],M=v[z];break}return R<M?-1:M<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 M=s.allocUnsafe(v);let z=0;for(R=0;R<m.length;++R){let W=m[R];if(Vt(W,Uint8Array))z+W.length>M.length?(s.isBuffer(W)||(W=s.from(W)),W.copy(M,z)):Uint8Array.prototype.set.call(M,W,z);else if(s.isBuffer(W))W.copy(M,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=W.length}return M};function A(S,m){if(s.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||Vt(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const v=S.length,R=arguments.length>2&&arguments[2]===!0;if(!R&&v===0)return 0;let M=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return me(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return ka(S).length;default:if(M)return R?-1:me(S).length;m=(""+m).toLowerCase(),M=!0}}s.byteLength=A;function x(S,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(S||(S="utf8");;)switch(S){case"hex":return rt(this,m,v);case"utf8":case"utf-8":return ne(this,m,v);case"ascii":return xe(this,m,v);case"latin1":case"binary":return nt(this,m,v);case"base64":return ue(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: "+S);S=(S+"").toLowerCase(),R=!0}}s.prototype._isBuffer=!0;function E(S,m,v){const R=S[m];S[m]=S[v],S[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)E(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)E(this,v,v+3),E(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)E(this,v,v+7),E(this,v+1,v+6),E(this,v+2,v+5),E(this,v+3,v+4);return this},s.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?ne(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,M,z){if(Vt(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),M===void 0&&(M=0),z===void 0&&(z=this.length),v<0||R>m.length||M<0||z>this.length)throw new RangeError("out of range index");if(M>=z&&v>=R)return 0;if(M>=z)return-1;if(v>=R)return 1;if(v>>>=0,R>>>=0,M>>>=0,z>>>=0,this===m)return 0;let W=z-M,be=R-v;const Qe=Math.min(W,be),He=this.slice(M,z),it=m.slice(v,R);for(let Fe=0;Fe<Qe;++Fe)if(He[Fe]!==it[Fe]){W=He[Fe],be=it[Fe];break}return W<be?-1:be<W?1:0};function _(S,m,v,R,M){if(S.length===0)return-1;if(typeof v=="string"?(R=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,xi(v)&&(v=M?0:S.length-1),v<0&&(v=S.length+v),v>=S.length){if(M)return-1;v=S.length-1}else if(v<0)if(M)v=0;else return-1;if(typeof m=="string"&&(m=s.from(m,R)),s.isBuffer(m))return m.length===0?-1:T(S,m,v,R,M);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?M?Uint8Array.prototype.indexOf.call(S,m,v):Uint8Array.prototype.lastIndexOf.call(S,m,v):T(S,[m],v,R,M);throw new TypeError("val must be string, number or Buffer")}function T(S,m,v,R,M){let z=1,W=S.length,be=m.length;if(R!==void 0&&(R=String(R).toLowerCase(),R==="ucs2"||R==="ucs-2"||R==="utf16le"||R==="utf-16le")){if(S.length<2||m.length<2)return-1;z=2,W/=2,be/=2,v/=2}function Qe(it,Fe){return z===1?it[Fe]:it.readUInt16BE(Fe*z)}let He;if(M){let it=-1;for(He=v;He<W;He++)if(Qe(S,He)===Qe(m,it===-1?0:He-it)){if(it===-1&&(it=He),He-it+1===be)return it*z}else it!==-1&&(He-=He-it),it=-1}else for(v+be>W&&(v=W-be),He=v;He>=0;He--){let it=!0;for(let Fe=0;Fe<be;Fe++)if(Qe(S,He+Fe)!==Qe(m,Fe)){it=!1;break}if(it)return He}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(S,m,v,R){v=Number(v)||0;const M=S.length-v;R?(R=Number(R),R>M&&(R=M)):R=M;const z=m.length;R>z/2&&(R=z/2);let W;for(W=0;W<R;++W){const be=parseInt(m.substr(W*2,2),16);if(xi(be))return W;S[v+W]=be}return W}function P(S,m,v,R){return Ta(me(m,S.length-v),S,v,R)}function G(S,m,v,R){return Ta(un(m),S,v,R)}function N(S,m,v,R){return Ta(ka(m),S,v,R)}function oe(S,m,v,R){return Ta(Ca(m,S.length-v),S,v,R)}s.prototype.write=function(m,v,R,M){if(v===void 0)M="utf8",R=this.length,v=0;else if(R===void 0&&typeof v=="string")M=v,R=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(R)?(R=R>>>0,M===void 0&&(M="utf8")):(M=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");M||(M="utf8");let W=!1;for(;;)switch(M){case"hex":return D(this,m,v,R);case"utf8":case"utf-8":return P(this,m,v,R);case"ascii":case"latin1":case"binary":return G(this,m,v,R);case"base64":return N(this,m,v,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,m,v,R);default:if(W)throw new TypeError("Unknown encoding: "+M);M=(""+M).toLowerCase(),W=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ue(S,m,v){return m===0&&v===S.length?t.fromByteArray(S):t.fromByteArray(S.slice(m,v))}function ne(S,m,v){v=Math.min(S.length,v);const R=[];let M=m;for(;M<v;){const z=S[M];let W=null,be=z>239?4:z>223?3:z>191?2:1;if(M+be<=v){let Qe,He,it,Fe;switch(be){case 1:z<128&&(W=z);break;case 2:Qe=S[M+1],(Qe&192)===128&&(Fe=(z&31)<<6|Qe&63,Fe>127&&(W=Fe));break;case 3:Qe=S[M+1],He=S[M+2],(Qe&192)===128&&(He&192)===128&&(Fe=(z&15)<<12|(Qe&63)<<6|He&63,Fe>2047&&(Fe<55296||Fe>57343)&&(W=Fe));break;case 4:Qe=S[M+1],He=S[M+2],it=S[M+3],(Qe&192)===128&&(He&192)===128&&(it&192)===128&&(Fe=(z&15)<<18|(Qe&63)<<12|(He&63)<<6|it&63,Fe>65535&&Fe<1114112&&(W=Fe))}}W===null?(W=65533,be=1):W>65535&&(W-=65536,R.push(W>>>10&1023|55296),W=56320|W&1023),R.push(W),M+=be}return Re(R)}const pe=4096;function Re(S){const m=S.length;if(m<=pe)return String.fromCharCode.apply(String,S);let v="",R=0;for(;R<m;)v+=String.fromCharCode.apply(String,S.slice(R,R+=pe));return v}function xe(S,m,v){let R="";v=Math.min(S.length,v);for(let M=m;M<v;++M)R+=String.fromCharCode(S[M]&127);return R}function nt(S,m,v){let R="";v=Math.min(S.length,v);for(let M=m;M<v;++M)R+=String.fromCharCode(S[M]);return R}function rt(S,m,v){const R=S.length;(!m||m<0)&&(m=0),(!v||v<0||v>R)&&(v=R);let M="";for(let z=m;z<v;++z)M+=Ia[S[z]];return M}function ut(S,m,v){const R=S.slice(m,v);let M="";for(let z=0;z<R.length-1;z+=2)M+=String.fromCharCode(R[z]+R[z+1]*256);return M}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 M=this.subarray(m,v);return Object.setPrototypeOf(M,s.prototype),M};function De(S,m,v){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+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||De(m,v,this.length);let M=this[m],z=1,W=0;for(;++W<v&&(z*=256);)M+=this[m+W]*z;return M},s.prototype.readUintBE=s.prototype.readUIntBE=function(m,v,R){m=m>>>0,v=v>>>0,R||De(m,v,this.length);let M=this[m+--v],z=1;for(;v>0&&(z*=256);)M+=this[m+--v]*z;return M},s.prototype.readUint8=s.prototype.readUInt8=function(m,v){return m=m>>>0,v||De(m,1,this.length),this[m]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(m,v){return m=m>>>0,v||De(m,2,this.length),this[m]|this[m+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(m,v){return m=m>>>0,v||De(m,2,this.length),this[m]<<8|this[m+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(m,v){return m=m>>>0,v||De(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||De(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,j(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Q(m,this.length-8);const M=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(M)+(BigInt(z)<<BigInt(32))}),s.prototype.readBigUInt64BE=fn(function(m){m=m>>>0,j(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Q(m,this.length-8);const M=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(M)<<BigInt(32))+BigInt(z)}),s.prototype.readIntLE=function(m,v,R){m=m>>>0,v=v>>>0,R||De(m,v,this.length);let M=this[m],z=1,W=0;for(;++W<v&&(z*=256);)M+=this[m+W]*z;return z*=128,M>=z&&(M-=Math.pow(2,8*v)),M},s.prototype.readIntBE=function(m,v,R){m=m>>>0,v=v>>>0,R||De(m,v,this.length);let M=v,z=1,W=this[m+--M];for(;M>0&&(z*=256);)W+=this[m+--M]*z;return z*=128,W>=z&&(W-=Math.pow(2,8*v)),W},s.prototype.readInt8=function(m,v){return m=m>>>0,v||De(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},s.prototype.readInt16LE=function(m,v){m=m>>>0,v||De(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||De(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||De(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||De(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,j(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Q(m,this.length-8);const M=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(R<<24);return(BigInt(M)<<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,j(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Q(m,this.length-8);const M=(v<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(M)<<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||De(m,4,this.length),n.read(this,m,!0,23,4)},s.prototype.readFloatBE=function(m,v){return m=m>>>0,v||De(m,4,this.length),n.read(this,m,!1,23,4)},s.prototype.readDoubleLE=function(m,v){return m=m>>>0,v||De(m,8,this.length),n.read(this,m,!0,52,8)},s.prototype.readDoubleBE=function(m,v){return m=m>>>0,v||De(m,8,this.length),n.read(this,m,!1,52,8)};function Be(S,m,v,R,M,z){if(!s.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>M||m<z)throw new RangeError('"value" argument is out of bounds');if(v+R>S.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(m,v,R,M){if(m=+m,v=v>>>0,R=R>>>0,!M){const be=Math.pow(2,8*R)-1;Be(this,m,v,R,be,0)}let z=1,W=0;for(this[v]=m&255;++W<R&&(z*=256);)this[v+W]=m/z&255;return v+R},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(m,v,R,M){if(m=+m,v=v>>>0,R=R>>>0,!M){const be=Math.pow(2,8*R)-1;Be(this,m,v,R,be,0)}let z=R-1,W=1;for(this[v+z]=m&255;--z>=0&&(W*=256);)this[v+z]=m/W&255;return v+R},s.prototype.writeUint8=s.prototype.writeUInt8=function(m,v,R){return m=+m,v=v>>>0,R||Be(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||Be(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||Be(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||Be(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||Be(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(S,m,v,R,M){C(m,R,M,S,v,7);let z=Number(m&BigInt(4294967295));S[v++]=z,z=z>>8,S[v++]=z,z=z>>8,S[v++]=z,z=z>>8,S[v++]=z;let W=Number(m>>BigInt(32)&BigInt(4294967295));return S[v++]=W,W=W>>8,S[v++]=W,W=W>>8,S[v++]=W,W=W>>8,S[v++]=W,v}function cn(S,m,v,R,M){C(m,R,M,S,v,7);let z=Number(m&BigInt(4294967295));S[v+7]=z,z=z>>8,S[v+6]=z,z=z>>8,S[v+5]=z,z=z>>8,S[v+4]=z;let W=Number(m>>BigInt(32)&BigInt(4294967295));return S[v+3]=W,W=W>>8,S[v+2]=W,W=W>>8,S[v+1]=W,W=W>>8,S[v]=W,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 cn(this,m,v,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(m,v,R,M){if(m=+m,v=v>>>0,!M){const Qe=Math.pow(2,8*R-1);Be(this,m,v,R,Qe-1,-Qe)}let z=0,W=1,be=0;for(this[v]=m&255;++z<R&&(W*=256);)m<0&&be===0&&this[v+z-1]!==0&&(be=1),this[v+z]=(m/W>>0)-be&255;return v+R},s.prototype.writeIntBE=function(m,v,R,M){if(m=+m,v=v>>>0,!M){const Qe=Math.pow(2,8*R-1);Be(this,m,v,R,Qe-1,-Qe)}let z=R-1,W=1,be=0;for(this[v+z]=m&255;--z>=0&&(W*=256);)m<0&&be===0&&this[v+z+1]!==0&&(be=1),this[v+z]=(m/W>>0)-be&255;return v+R},s.prototype.writeInt8=function(m,v,R){return m=+m,v=v>>>0,R||Be(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||Be(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||Be(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||Be(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||Be(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 cn(this,m,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function je(S,m,v,R,M,z){if(v+R>S.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function L(S,m,v,R,M){return m=+m,v=v>>>0,M||je(S,m,v,4),n.write(S,m,v,R,23,4),v+4}s.prototype.writeFloatLE=function(m,v,R){return L(this,m,v,!0,R)},s.prototype.writeFloatBE=function(m,v,R){return L(this,m,v,!1,R)};function O(S,m,v,R,M){return m=+m,v=v>>>0,M||je(S,m,v,8),n.write(S,m,v,R,52,8),v+8}s.prototype.writeDoubleLE=function(m,v,R){return O(this,m,v,!0,R)},s.prototype.writeDoubleBE=function(m,v,R){return O(this,m,v,!1,R)},s.prototype.copy=function(m,v,R,M){if(!s.isBuffer(m))throw new TypeError("argument should be a Buffer");if(R||(R=0),!M&&M!==0&&(M=this.length),v>=m.length&&(v=m.length),v||(v=0),M>0&&M<R&&(M=R),M===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(M<0)throw new RangeError("sourceEnd out of bounds");M>this.length&&(M=this.length),m.length-v<M-R&&(M=m.length-v+R);const z=M-R;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,R,M):Uint8Array.prototype.set.call(m,this.subarray(R,M),v),z},s.prototype.fill=function(m,v,R,M){if(typeof m=="string"){if(typeof v=="string"?(M=v,v=0,R=this.length):typeof R=="string"&&(M=R,R=this.length),M!==void 0&&typeof M!="string")throw new TypeError("encoding must be a string");if(typeof M=="string"&&!s.isEncoding(M))throw new TypeError("Unknown encoding: "+M);if(m.length===1){const W=m.charCodeAt(0);(M==="utf8"&&W<128||M==="latin1")&&(m=W)}}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 W=s.isBuffer(m)?m:s.from(m,M),be=W.length;if(be===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(z=0;z<R-v;++z)this[z+v]=W[z%be]}return this};const Z={};function q(S,m,v){Z[S]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(M){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:M,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}q("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),q("ERR_INVALID_ARG_TYPE",function(S,m){return`The "${S}" argument must be of type number. Received type ${typeof m}`},TypeError),q("ERR_OUT_OF_RANGE",function(S,m,v){let R=`The value of "${S}" is out of range.`,M=v;return Number.isInteger(v)&&Math.abs(v)>2**32?M=X(String(v)):typeof v=="bigint"&&(M=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(M=X(M)),M+="n"),R+=` It must be ${m}. Received ${M}`,R},RangeError);function X(S){let m="",v=S.length;const R=S[0]==="-"?1:0;for(;v>=R+4;v-=3)m=`_${S.slice(v-3,v)}${m}`;return`${S.slice(0,v)}${m}`}function I(S,m,v){j(m,"offset"),(S[m]===void 0||S[m+v]===void 0)&&Q(m,S.length-(v+1))}function C(S,m,v,R,M,z){if(S>v||S<m){const W=typeof m=="bigint"?"n":"";let be;throw z>3?m===0||m===BigInt(0)?be=`>= 0${W} and < 2${W} ** ${(z+1)*8}${W}`:be=`>= -(2${W} ** ${(z+1)*8-1}${W}) and < 2 ** ${(z+1)*8-1}${W}`:be=`>= ${m}${W} and <= ${v}${W}`,new Z.ERR_OUT_OF_RANGE("value",be,S)}I(R,M,z)}function j(S,m){if(typeof S!="number")throw new Z.ERR_INVALID_ARG_TYPE(m,"number",S)}function Q(S,m,v){throw Math.floor(S)!==S?(j(S,v),new Z.ERR_OUT_OF_RANGE(v||"offset","an integer",S)):m<0?new Z.ERR_BUFFER_OUT_OF_BOUNDS:new Z.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${m}`,S)}const ge=/[^+/0-9A-Za-z-_]/g;function se(S){if(S=S.split("=")[0],S=S.trim().replace(ge,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function me(S,m){m=m||1/0;let v;const R=S.length;let M=null;const z=[];for(let W=0;W<R;++W){if(v=S.charCodeAt(W),v>55295&&v<57344){if(!M){if(v>56319){(m-=3)>-1&&z.push(239,191,189);continue}else if(W+1===R){(m-=3)>-1&&z.push(239,191,189);continue}M=v;continue}if(v<56320){(m-=3)>-1&&z.push(239,191,189),M=v;continue}v=(M-55296<<10|v-56320)+65536}else M&&(m-=3)>-1&&z.push(239,191,189);if(M=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(S){const m=[];for(let v=0;v<S.length;++v)m.push(S.charCodeAt(v)&255);return m}function Ca(S,m){let v,R,M;const z=[];for(let W=0;W<S.length&&!((m-=2)<0);++W)v=S.charCodeAt(W),R=v>>8,M=v%256,z.push(M),z.push(R);return z}function ka(S){return t.toByteArray(se(S))}function Ta(S,m,v,R){let M;for(M=0;M<R&&!(M+v>=m.length||M>=S.length);++M)m[M+v]=S[M];return M}function Vt(S,m){return S instanceof m||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===m.name}function xi(S){return S!==S}const Ia=function(){const S="0123456789abcdef",m=new Array(256);for(let v=0;v<16;++v){const R=v*16;for(let M=0;M<16;++M)m[R+M]=S[v]+S[M]}return m}();function fn(S){return typeof BigInt>"u"?Lr:S}function Lr(){throw new Error("BigInt not supported")}})(Ae);const E6=ke({__proto__:null,default:Bu(Ae)},[Ae]),kt={},OY=Object.freeze(Object.defineProperty({__proto__:null,default:kt},Symbol.toStringTag,{value:"Module"})),Fy=typeof window<"u"?window:typeof self<"u"?self:{fetch:void 0};class So{async getBufferFromResponse(t){if(typeof t.buffer=="function")return t.buffer();if(typeof t.arrayBuffer=="function"){const n=await t.arrayBuffer();return Ae.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||Fy.fetch&&Fy.fetch.bind(Fy);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:l={}}=a;r<1/0?o.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(o.range=`bytes=${i}-`);const c={...this.baseOverrides,...l,headers:{...o,...l.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s},u=await this.fetch(this.url,c);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},l=await this.fetch(this.url,s);if(!l)throw new Error("generic-filehandle failed to fetch");if(l.status!==200)throw Object.assign(new Error(`HTTP ${l.status} fetching ${this.url}`),{status:l.status});if(n==="utf8")return l.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(l)}async stat(){if(!this._stat){const t=Ae.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 S6(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 LY(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 NY{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 S6(this.blob.slice(a,o)),l=Ae.Buffer.from(s);return{bytesRead:l.copy(t,n),buffer:l}}async readFile(t){let n;if(typeof t=="string"?n=t:n=t&&t.encoding,n==="utf8")return LY(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await S6(this.blob);return Ae.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function _6(e,t={}){return new So(e,t)}function zY(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return _6(e,r);if(t!==void 0)return new kt(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const Mu=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:NY,LocalFile:kt,RemoteFile:So,fromUrl:_6,open:zY},Symbol.toStringTag,{value:"Module"}));var si={};(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 l in s)n(s,l)&&(a[l]=s[l])}}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,l,c){if(o.subarray&&a.subarray){a.set(o.subarray(s,s+l),c);return}for(var u=0;u<l;u++)a[c+u]=o[s+u]},flattenChunks:function(a){var o,s,l,c,u,f;for(l=0,o=0,s=a.length;o<s;o++)l+=a[o].length;for(f=new Uint8Array(l),c=0,o=0,s=a.length;o<s;o++)u=a[o],f.set(u,c),c+=u.length;return f}},i={arraySet:function(a,o,s,l,c){for(var u=0;u<l;u++)a[c+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)})(si);var Pu={},Tr={},js={},UY=si,$Y=4,C6=0,k6=1,HY=2;function qs(e){for(var t=e.length;--t>=0;)e[t]=0}var GY=0,T6=1,VY=2,jY=3,qY=258,My=29,Ou=256,Lu=Ou+1+My,Ws=30,Py=19,I6=2*Lu+1,_o=15,Oy=16,WY=7,Ly=256,R6=16,D6=17,B6=18,Ny=[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],O0=[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],YY=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],F6=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ZY=512,li=new Array((Lu+2)*2);qs(li);var Nu=new Array(Ws*2);qs(Nu);var zu=new Array(ZY);qs(zu);var Uu=new Array(qY-jY+1);qs(Uu);var zy=new Array(My);qs(zy);var L0=new Array(Ws);qs(L0);function Uy(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 M6,P6,O6;function $y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function L6(e){return e<256?zu[e]:zu[256+(e>>>7)]}function $u(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>Oy-n?(e.bi_buf|=t<<e.bi_valid&65535,$u(e,e.bi_buf),e.bi_buf=t>>Oy-e.bi_valid,e.bi_valid+=n-Oy):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Ir(e,t,n){an(e,n[t*2],n[t*2+1])}function N6(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function QY(e){e.bi_valid===16?($u(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 XY(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,l=t.stat_desc.max_length,c,u,f,h,d,p,g=0;for(h=0;h<=_o;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<I6;c++)u=e.heap[c],h=n[n[u*2+1]*2+1]+1,h>l&&(h=l,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=l-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[l]--,g-=2}while(g>0);for(h=l;h!==0;h--)for(u=e.bl_count[h];u!==0;)f=e.heap[--c],!(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 z6(e,t,n){var r=new Array(_o+1),i=0,a,o;for(a=1;a<=_o;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]=N6(r[s]++,s))}}function KY(){var e,t,n,r,i,a=new Array(_o+1);for(n=0,r=0;r<My-1;r++)for(zy[r]=n,e=0;e<1<<Ny[r];e++)Uu[n++]=r;for(Uu[n-1]=r,i=0,r=0;r<16;r++)for(L0[r]=i,e=0;e<1<<O0[r];e++)zu[i++]=r;for(i>>=7;r<Ws;r++)for(L0[r]=i<<7,e=0;e<1<<O0[r]-7;e++)zu[256+i++]=r;for(t=0;t<=_o;t++)a[t]=0;for(e=0;e<=143;)li[e*2+1]=8,e++,a[8]++;for(;e<=255;)li[e*2+1]=9,e++,a[9]++;for(;e<=279;)li[e*2+1]=7,e++,a[7]++;for(;e<=287;)li[e*2+1]=8,e++,a[8]++;for(z6(li,Lu+1,a),e=0;e<Ws;e++)Nu[e*2+1]=5,Nu[e*2]=N6(e,5);M6=new Uy(li,Ny,Ou+1,Lu,_o),P6=new Uy(Nu,O0,0,Ws,_o),O6=new Uy(new Array(0),YY,0,Py,WY)}function U6(e){var t;for(t=0;t<Lu;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ws;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Py;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Ly*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function $6(e){e.bi_valid>8?$u(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 JY(e,t,n,r){$6(e),r&&($u(e,n),$u(e,~n)),UY.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function H6(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 Hy(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&H6(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!H6(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function G6(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?Ir(e,i,t):(o=Uu[i],Ir(e,o+Ou+1,t),s=Ny[o],s!==0&&(i-=zy[o],an(e,i,s)),r--,o=L6(r),Ir(e,o,n),s=O0[o],s!==0&&(r-=L0[o],an(e,r,s)));while(a<e.last_lit);Ir(e,Ly,t)}function Gy(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,l=-1,c;for(e.heap_len=0,e.heap_max=I6,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=l=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,n[c*2]=1,e.depth[c]=0,e.opt_len--,i&&(e.static_len-=r[c*2+1]);for(t.max_code=l,o=e.heap_len>>1;o>=1;o--)Hy(e,n,o);c=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Hy(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[c*2]=n[o*2]+n[s*2],e.depth[c]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=c,e.heap[1]=c++,Hy(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],XY(e,t),z6(n,l,e.bl_count)}function V6(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,l=7,c=4;for(o===0&&(l=138,c=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<l&&a===o)&&(s<c?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[R6*2]++):s<=10?e.bl_tree[D6*2]++:e.bl_tree[B6*2]++,s=0,i=a,o===0?(l=138,c=3):a===o?(l=6,c=3):(l=7,c=4))}function j6(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,l=7,c=4;for(o===0&&(l=138,c=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<l&&a===o)){if(s<c)do Ir(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Ir(e,a,e.bl_tree),s--),Ir(e,R6,e.bl_tree),an(e,s-3,2)):s<=10?(Ir(e,D6,e.bl_tree),an(e,s-3,3)):(Ir(e,B6,e.bl_tree),an(e,s-11,7));s=0,i=a,o===0?(l=138,c=3):a===o?(l=6,c=3):(l=7,c=4)}}function eZ(e){var t;for(V6(e,e.dyn_ltree,e.l_desc.max_code),V6(e,e.dyn_dtree,e.d_desc.max_code),Gy(e,e.bl_desc),t=Py-1;t>=3&&e.bl_tree[F6[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function tZ(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[F6[i]*2+1],3);j6(e,e.dyn_ltree,t-1),j6(e,e.dyn_dtree,n-1)}function nZ(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return C6;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return k6;for(n=32;n<Ou;n++)if(e.dyn_ltree[n*2]!==0)return k6;return C6}var q6=!1;function rZ(e){q6||(KY(),q6=!0),e.l_desc=new $y(e.dyn_ltree,M6),e.d_desc=new $y(e.dyn_dtree,P6),e.bl_desc=new $y(e.bl_tree,O6),e.bi_buf=0,e.bi_valid=0,U6(e)}function W6(e,t,n,r){an(e,(GY<<1)+(r?1:0),3),JY(e,t,n,!0)}function iZ(e){an(e,T6<<1,3),Ir(e,Ly,li),QY(e)}function aZ(e,t,n,r){var i,a,o=0;e.level>0?(e.strm.data_type===HY&&(e.strm.data_type=nZ(e)),Gy(e,e.l_desc),Gy(e,e.d_desc),o=eZ(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?W6(e,t,n,r):e.strategy===$Y||a===i?(an(e,(T6<<1)+(r?1:0),3),G6(e,li,Nu)):(an(e,(VY<<1)+(r?1:0),3),tZ(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),G6(e,e.dyn_ltree,e.dyn_dtree)),U6(e),r&&$6(e)}function oZ(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[(Uu[n]+Ou+1)*2]++,e.dyn_dtree[L6(t)*2]++),e.last_lit===e.lit_bufsize-1}js._tr_init=rZ,js._tr_stored_block=W6,js._tr_flush_block=aZ,js._tr_tally=oZ,js._tr_align=iZ;function sZ(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 Y6=sZ;function lZ(){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 cZ=lZ();function uZ(e,t,n,r){var i=cZ,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=uZ,Vy={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"},Qt=si,Fn=js,Q6=Y6,ia=Z6,fZ=Vy,Co=0,hZ=1,dZ=3,aa=4,X6=5,Rr=0,K6=1,Mn=-2,pZ=-3,jy=-5,gZ=-1,mZ=1,N0=2,bZ=3,yZ=4,vZ=0,wZ=2,z0=8,xZ=9,AZ=15,EZ=8,SZ=29,_Z=256,qy=_Z+1+SZ,CZ=30,kZ=19,TZ=2*qy+1,IZ=15,ve=3,oa=258,ir=oa+ve+1,RZ=32,U0=42,Wy=69,$0=73,H0=91,G0=103,ko=113,Hu=666,vt=1,Gu=2,To=3,Ys=4,DZ=3;function sa(e,t){return e.msg=fZ[t],t}function J6(e){return(e<<1)-(e>4?9:0)}function la(e){for(var t=e.length;--t>=0;)e[t]=0}function ca(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Qt.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){Fn._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ca(e.strm)}function Ce(e,t){e.pending_buf[e.pending++]=t}function Vu(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function BZ(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Qt.arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=Q6(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ia(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function e5(e,t){var n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-ir?e.strstart-(e.w_size-ir):0,c=e.window,u=e.w_mask,f=e.prev,h=e.strstart+oa,d=c[r+o-1],p=c[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(c[i+o]!==p||c[i+o-1]!==d||c[i]!==c[r]||c[++i]!==c[r+1])){r+=2,i++;do;while(c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&r<h);if(a=oa-(h-r),r=h-oa,a>o){if(e.match_start=t,o=a,a>=s)break;d=c[r+o-1],p=c[r+o]}}while((t=f[t&u])>l&&--n!==0);return o<=e.lookahead?o:e.lookahead}function Io(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-ir)){Qt.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=BZ(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=ve)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+ve-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<ve)););}while(e.lookahead<ir&&e.strm.avail_in!==0)}function FZ(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Io(e),e.lookahead===0&&t===Co)return vt;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-ir&&(Pt(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===aa?(Pt(e,!0),e.strm.avail_out===0?To:Ys):(e.strstart>e.block_start&&(Pt(e,!1),e.strm.avail_out===0),vt)}function Yy(e,t){for(var n,r;;){if(e.lookahead<ir){if(Io(e),e.lookahead<ir&&t===Co)return vt;if(e.lookahead===0)break}if(n=0,e.lookahead>=ve&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ve-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-ir&&(e.match_length=e5(e,n)),e.match_length>=ve)if(r=Fn._tr_tally(e,e.strstart-e.match_start,e.match_length-ve),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ve){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ve-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=Fn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Pt(e,!1),e.strm.avail_out===0))return vt}return e.insert=e.strstart<ve-1?e.strstart:ve-1,t===aa?(Pt(e,!0),e.strm.avail_out===0?To:Ys):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?vt:Gu}function Zs(e,t){for(var n,r,i;;){if(e.lookahead<ir){if(Io(e),e.lookahead<ir&&t===Co)return vt;if(e.lookahead===0)break}if(n=0,e.lookahead>=ve&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ve-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=ve-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-ir&&(e.match_length=e5(e,n),e.match_length<=5&&(e.strategy===mZ||e.match_length===ve&&e.strstart-e.match_start>4096)&&(e.match_length=ve-1)),e.prev_length>=ve&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-ve,r=Fn._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-ve),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+ve-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=ve-1,e.strstart++,r&&(Pt(e,!1),e.strm.avail_out===0))return vt}else if(e.match_available){if(r=Fn._tr_tally(e,0,e.window[e.strstart-1]),r&&Pt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return vt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Fn._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<ve-1?e.strstart:ve-1,t===aa?(Pt(e,!0),e.strm.avail_out===0?To:Ys):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?vt:Gu}function MZ(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=oa){if(Io(e),e.lookahead<=oa&&t===Co)return vt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=ve&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+oa;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=oa-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ve?(n=Fn._tr_tally(e,1,e.match_length-ve),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Fn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Pt(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===aa?(Pt(e,!0),e.strm.avail_out===0?To:Ys):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?vt:Gu}function PZ(e,t){for(var n;;){if(e.lookahead===0&&(Io(e),e.lookahead===0)){if(t===Co)return vt;break}if(e.match_length=0,n=Fn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Pt(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===aa?(Pt(e,!0),e.strm.avail_out===0?To:Ys):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?vt:Gu}function Dr(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 Qs;Qs=[new Dr(0,0,0,0,FZ),new Dr(4,4,8,4,Yy),new Dr(4,5,16,8,Yy),new Dr(4,6,32,32,Yy),new Dr(4,4,16,16,Zs),new Dr(8,16,32,32,Zs),new Dr(8,16,128,128,Zs),new Dr(8,32,128,256,Zs),new Dr(32,128,258,1024,Zs),new Dr(32,258,258,4096,Zs)];function OZ(e){e.window_size=2*e.w_size,la(e.head),e.max_lazy_match=Qs[e.level].max_lazy,e.good_match=Qs[e.level].good_length,e.nice_match=Qs[e.level].nice_length,e.max_chain_length=Qs[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ve-1,e.match_available=0,e.ins_h=0}function LZ(){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=z0,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 Qt.Buf16(TZ*2),this.dyn_dtree=new Qt.Buf16((2*CZ+1)*2),this.bl_tree=new Qt.Buf16((2*kZ+1)*2),la(this.dyn_ltree),la(this.dyn_dtree),la(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Qt.Buf16(IZ+1),this.heap=new Qt.Buf16(2*qy+1),la(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Qt.Buf16(2*qy+1),la(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 t5(e){var t;return!e||!e.state?sa(e,Mn):(e.total_in=e.total_out=0,e.data_type=wZ,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?U0:ko,e.adler=t.wrap===2?0:1,t.last_flush=Co,Fn._tr_init(t),Rr)}function n5(e){var t=t5(e);return t===Rr&&OZ(e.state),t}function NZ(e,t){return!e||!e.state||e.state.wrap!==2?Mn:(e.state.gzhead=t,Rr)}function r5(e,t,n,r,i,a){if(!e)return Mn;var o=1;if(t===gZ&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>xZ||n!==z0||r<8||r>15||t<0||t>9||a<0||a>yZ)return sa(e,Mn);r===8&&(r=9);var s=new LZ;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+ve-1)/ve),s.window=new Qt.Buf8(s.w_size*2),s.head=new Qt.Buf16(s.hash_size),s.prev=new Qt.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Qt.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,n5(e)}function zZ(e,t){return r5(e,t,z0,AZ,EZ,vZ)}function UZ(e,t){var n,r,i,a;if(!e||!e.state||t>X6||t<0)return e?sa(e,Mn):Mn;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===Hu&&t!==aa)return sa(e,e.avail_out===0?jy:Mn);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===U0)if(r.wrap===2)e.adler=0,Ce(r,31),Ce(r,139),Ce(r,8),r.gzhead?(Ce(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)),Ce(r,r.gzhead.time&255),Ce(r,r.gzhead.time>>8&255),Ce(r,r.gzhead.time>>16&255),Ce(r,r.gzhead.time>>24&255),Ce(r,r.level===9?2:r.strategy>=N0||r.level<2?4:0),Ce(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(Ce(r,r.gzhead.extra.length&255),Ce(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=ia(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Wy):(Ce(r,0),Ce(r,0),Ce(r,0),Ce(r,0),Ce(r,0),Ce(r,r.level===9?2:r.strategy>=N0||r.level<2?4:0),Ce(r,DZ),r.status=ko);else{var o=z0+(r.w_bits-8<<4)<<8,s=-1;r.strategy>=N0||r.level<2?s=0:r.level<6?s=1:r.level===6?s=2:s=3,o|=s<<6,r.strstart!==0&&(o|=RZ),o+=31-o%31,r.status=ko,Vu(r,o),r.strstart!==0&&(Vu(r,e.adler>>>16),Vu(r,e.adler&65535)),e.adler=1}if(r.status===Wy)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=ia(e.adler,r.pending_buf,r.pending-i,i)),ca(e),i=r.pending,r.pending===r.pending_buf_size));)Ce(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=ia(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=$0)}else r.status=$0;if(r.status===$0)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=ia(e.adler,r.pending_buf,r.pending-i,i)),ca(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,Ce(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=ia(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=H0)}else r.status=H0;if(r.status===H0)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=ia(e.adler,r.pending_buf,r.pending-i,i)),ca(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,Ce(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=ia(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=G0)}else r.status=G0;if(r.status===G0&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&ca(e),r.pending+2<=r.pending_buf_size&&(Ce(r,e.adler&255),Ce(r,e.adler>>8&255),e.adler=0,r.status=ko)):r.status=ko),r.pending!==0){if(ca(e),e.avail_out===0)return r.last_flush=-1,Rr}else if(e.avail_in===0&&J6(t)<=J6(n)&&t!==aa)return sa(e,jy);if(r.status===Hu&&e.avail_in!==0)return sa(e,jy);if(e.avail_in!==0||r.lookahead!==0||t!==Co&&r.status!==Hu){var l=r.strategy===N0?PZ(r,t):r.strategy===bZ?MZ(r,t):Qs[r.level].func(r,t);if((l===To||l===Ys)&&(r.status=Hu),l===vt||l===To)return e.avail_out===0&&(r.last_flush=-1),Rr;if(l===Gu&&(t===hZ?Fn._tr_align(r):t!==X6&&(Fn._tr_stored_block(r,0,0,!1),t===dZ&&(la(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),ca(e),e.avail_out===0))return r.last_flush=-1,Rr}return t!==aa?Rr:r.wrap<=0?K6:(r.wrap===2?(Ce(r,e.adler&255),Ce(r,e.adler>>8&255),Ce(r,e.adler>>16&255),Ce(r,e.adler>>24&255),Ce(r,e.total_in&255),Ce(r,e.total_in>>8&255),Ce(r,e.total_in>>16&255),Ce(r,e.total_in>>24&255)):(Vu(r,e.adler>>>16),Vu(r,e.adler&65535)),ca(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Rr:K6)}function $Z(e){var t;return!e||!e.state?Mn:(t=e.state.status,t!==U0&&t!==Wy&&t!==$0&&t!==H0&&t!==G0&&t!==ko&&t!==Hu?sa(e,Mn):(e.state=null,t===ko?sa(e,pZ):Rr))}function HZ(e,t){var n=t.length,r,i,a,o,s,l,c,u;if(!e||!e.state||(r=e.state,o=r.wrap,o===2||o===1&&r.status!==U0||r.lookahead))return Mn;for(o===1&&(e.adler=Q6(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(o===0&&(la(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new Qt.Buf8(r.w_size),Qt.arraySet(u,t,n-r.w_size,r.w_size,0),t=u,n=r.w_size),s=e.avail_in,l=e.next_in,c=e.input,e.avail_in=n,e.next_in=0,e.input=t,Io(r);r.lookahead>=ve;){i=r.strstart,a=r.lookahead-(ve-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+ve-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=ve-1,Io(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ve-1,r.match_available=0,e.next_in=l,e.input=c,e.avail_in=s,r.wrap=o,Rr}Tr.deflateInit=zZ,Tr.deflateInit2=r5,Tr.deflateReset=n5,Tr.deflateResetKeep=t5,Tr.deflateSetHeader=NZ,Tr.deflate=UZ,Tr.deflateEnd=$Z,Tr.deflateSetDictionary=HZ,Tr.deflateInfo="pako deflate (from Nodeca project)";var Ro={},V0=si,i5=!0,a5=!0;try{String.fromCharCode.apply(null,[0])}catch{i5=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a5=!1}for(var ju=new V0.Buf8(256),ua=0;ua<256;ua++)ju[ua]=ua>=252?6:ua>=248?5:ua>=240?4:ua>=224?3:ua>=192?2:1;ju[254]=ju[254]=1,Ro.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 V0.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 o5(e,t){if(t<65534&&(e.subarray&&a5||!e.subarray&&i5))return String.fromCharCode.apply(null,V0.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}Ro.buf2binstring=function(e){return o5(e,e.length)},Ro.binstring2buf=function(e){for(var t=new V0.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},Ro.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=ju[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 o5(s,r)},Ro.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+ju[e[n]]>t?n:t};function GZ(){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 s5=GZ,qu=Tr,Wu=si,Zy=Ro,Qy=Vy,VZ=s5,l5=Object.prototype.toString,jZ=0,Xy=4,Xs=0,c5=1,u5=2,qZ=-1,WZ=0,YZ=8;function Do(e){if(!(this instanceof Do))return new Do(e);this.options=Wu.assign({level:qZ,method:YZ,chunkSize:16384,windowBits:15,memLevel:8,strategy:WZ,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 VZ,this.strm.avail_out=0;var n=qu.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Xs)throw new Error(Qy[n]);if(t.header&&qu.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=Zy.string2buf(t.dictionary):l5.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=qu.deflateSetDictionary(this.strm,r),n!==Xs)throw new Error(Qy[n]);this._dict_set=!0}}Do.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?Xy:jZ,typeof e=="string"?n.input=Zy.string2buf(e):l5.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 Wu.Buf8(r),n.next_out=0,n.avail_out=r),i=qu.deflate(n,a),i!==c5&&i!==Xs)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(a===Xy||a===u5))&&(this.options.to==="string"?this.onData(Zy.buf2binstring(Wu.shrinkBuf(n.output,n.next_out))):this.onData(Wu.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==c5);return a===Xy?(i=qu.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Xs):(a===u5&&(this.onEnd(Xs),n.avail_out=0),!0)},Do.prototype.onData=function(e){this.chunks.push(e)},Do.prototype.onEnd=function(e){e===Xs&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Wu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ky(e,t){var n=new Do(t);if(n.push(e,!0),n.err)throw n.msg||Qy[n.err];return n.result}function ZZ(e,t){return t=t||{},t.raw=!0,Ky(e,t)}function QZ(e,t){return t=t||{},t.gzip=!0,Ky(e,t)}Pu.Deflate=Do,Pu.deflate=Ky,Pu.deflateRaw=ZZ,Pu.gzip=QZ;var Yu={},ar={},j0=30,XZ=12,KZ=function(t,n){var r,i,a,o,s,l,c,u,f,h,d,p,g,b,y,w,A,x,E,_,T,D,P,G,N;r=t.state,i=t.next_in,G=t.input,a=i+(t.avail_in-5),o=t.next_out,N=t.output,s=o-(n-t.avail_out),l=o+(t.avail_out-257),c=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(E=x>>>24,p>>>=E,g-=E,E=x>>>16&255,E===0)N[o++]=x&65535;else if(E&16){_=x&65535,E&=15,E&&(g<E&&(p+=G[i++]<<g,g+=8),_+=p&(1<<E)-1,p>>>=E,g-=E),g<15&&(p+=G[i++]<<g,g+=8,p+=G[i++]<<g,g+=8),x=y[p&A];n:for(;;){if(E=x>>>24,p>>>=E,g-=E,E=x>>>16&255,E&16){if(T=x&65535,E&=15,g<E&&(p+=G[i++]<<g,g+=8,g<E&&(p+=G[i++]<<g,g+=8)),T+=p&(1<<E)-1,T>c){t.msg="invalid distance too far back",r.mode=j0;break e}if(p>>>=E,g-=E,E=o-s,T>E){if(E=T-E,E>f&&r.sane){t.msg="invalid distance too far back",r.mode=j0;break e}if(D=0,P=d,h===0){if(D+=u-E,E<_){_-=E;do N[o++]=d[D++];while(--E);D=o-T,P=N}}else if(h<E){if(D+=u+h-E,E-=h,E<_){_-=E;do N[o++]=d[D++];while(--E);if(D=0,h<_){E=h,_-=E;do N[o++]=d[D++];while(--E);D=o-T,P=N}}}else if(D+=h-E,E<_){_-=E;do N[o++]=d[D++];while(--E);D=o-T,P=N}for(;_>2;)N[o++]=P[D++],N[o++]=P[D++],N[o++]=P[D++],_-=3;_&&(N[o++]=P[D++],_>1&&(N[o++]=P[D++]))}else{D=o-T;do N[o++]=N[D++],N[o++]=N[D++],N[o++]=N[D++],_-=3;while(_>2);_&&(N[o++]=N[D++],_>1&&(N[o++]=N[D++]))}}else if(E&64){t.msg="invalid distance code",r.mode=j0;break e}else{x=y[(x&65535)+(p&(1<<E)-1)];continue n}break}}else if(E&64)if(E&32){r.mode=XZ;break e}else{t.msg="invalid literal/length code",r.mode=j0;break e}else{x=b[(x&65535)+(p&(1<<E)-1)];continue t}break}}while(i<a&&o<l);_=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<l?257+(l-o):257-(o-l),r.hold=p,r.bits=g},f5=si,Ks=15,h5=852,d5=592,p5=0,Jy=1,g5=2,JZ=[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],eQ=[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],tQ=[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],nQ=[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],rQ=function(t,n,r,i,a,o,s,l){var c=l.bits,u=0,f=0,h=0,d=0,p=0,g=0,b=0,y=0,w=0,A=0,x,E,_,T,D,P=null,G=0,N,oe=new f5.Buf16(Ks+1),ue=new f5.Buf16(Ks+1),ne=null,pe=0,Re,xe,nt;for(u=0;u<=Ks;u++)oe[u]=0;for(f=0;f<i;f++)oe[n[r+f]]++;for(p=c,d=Ks;d>=1&&oe[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,l.bits=1,0;for(h=1;h<d&&oe[h]===0;h++);for(p<h&&(p=h),y=1,u=1;u<=Ks;u++)if(y<<=1,y-=oe[u],y<0)return-1;if(y>0&&(t===p5||d!==1))return-1;for(ue[1]=0,u=1;u<Ks;u++)ue[u+1]=ue[u]+oe[u];for(f=0;f<i;f++)n[r+f]!==0&&(s[ue[n[r+f]]++]=f);if(t===p5?(P=ne=s,N=19):t===Jy?(P=JZ,G-=257,ne=eQ,pe-=257,N=256):(P=tQ,ne=nQ,N=-1),A=0,f=0,u=h,D=o,g=p,b=0,_=-1,w=1<<p,T=w-1,t===Jy&&w>h5||t===g5&&w>d5)return 1;for(;;){Re=u-b,s[f]<N?(xe=0,nt=s[f]):s[f]>N?(xe=ne[pe+s[f]],nt=P[G+s[f]]):(xe=32+64,nt=0),x=1<<u-b,E=1<<g,h=E;do E-=x,a[D+(A>>b)+E]=Re<<24|xe<<16|nt|0;while(E!==0);for(x=1<<u-1;A&x;)x>>=1;if(x!==0?(A&=x-1,A+=x):A=0,f++,--oe[u]===0){if(u===d)break;u=n[r+s[f]]}if(u>p&&(A&T)!==_){for(b===0&&(b=p),D+=h,g=u-b,y=1<<g;g+b<d&&(y-=oe[g+b],!(y<=0));)g++,y<<=1;if(w+=1<<g,t===Jy&&w>h5||t===g5&&w>d5)return 1;_=A&T,a[_]=p<<24|g<<16|D-o|0}}return A!==0&&(a[D+A]=u-b<<24|64<<16|0),l.bits=p,0},vn=si,e2=Y6,Br=Z6,iQ=KZ,Zu=rQ,aQ=0,m5=1,b5=2,y5=4,oQ=5,q0=6,Bo=0,sQ=1,lQ=2,Pn=-2,v5=-3,w5=-4,cQ=-5,x5=8,A5=1,E5=2,S5=3,_5=4,C5=5,k5=6,T5=7,I5=8,R5=9,D5=10,W0=11,ci=12,t2=13,B5=14,n2=15,F5=16,M5=17,P5=18,O5=19,Y0=20,Z0=21,L5=22,N5=23,z5=24,U5=25,$5=26,r2=27,H5=28,G5=29,Je=30,V5=31,uQ=32,fQ=852,hQ=592,dQ=15,pQ=dQ;function j5(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function gQ(){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 vn.Buf16(320),this.work=new vn.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function q5(e){var t;return!e||!e.state?Pn:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=A5,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new vn.Buf32(fQ),t.distcode=t.distdyn=new vn.Buf32(hQ),t.sane=1,t.back=-1,Bo)}function W5(e){var t;return!e||!e.state?Pn:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,q5(e))}function Y5(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))?Pn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,W5(e))}function Z5(e,t){var n,r;return e?(r=new gQ,e.state=r,r.window=null,n=Y5(e,t),n!==Bo&&(e.state=null),n):Pn}function mQ(e){return Z5(e,pQ)}var Q5=!0,i2,a2;function bQ(e){if(Q5){var t;for(i2=new vn.Buf32(512),a2=new vn.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(Zu(m5,e.lens,0,288,i2,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Zu(b5,e.lens,0,32,a2,0,e.work,{bits:5}),Q5=!1}e.lencode=i2,e.lenbits=9,e.distcode=a2,e.distbits=5}function X5(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 vn.Buf8(a.wsize)),r>=a.wsize?(vn.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),vn.arraySet(a.window,t,n-r,i,a.wnext),r-=i,r?(vn.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 yQ(e,t){var n,r,i,a,o,s,l,c,u,f,h,d,p,g,b=0,y,w,A,x,E,_,T,D,P=new vn.Buf8(4),G,N,oe=[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 Pn;n=e.state,n.mode===ci&&(n.mode=t2),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,u=n.bits,f=s,h=l,D=Bo;e:for(;;)switch(n.mode){case A5:if(n.wrap===0){n.mode=t2;break}for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.wrap&2&&c===35615){n.check=0,P[0]=c&255,P[1]=c>>>8&255,n.check=Br(n.check,P,2,0),c=0,u=0,n.mode=E5;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=Je;break}if((c&15)!==x5){e.msg="unknown compression method",n.mode=Je;break}if(c>>>=4,u-=4,T=(c&15)+8,n.wbits===0)n.wbits=T;else if(T>n.wbits){e.msg="invalid window size",n.mode=Je;break}n.dmax=1<<T,e.adler=n.check=1,n.mode=c&512?D5:ci,c=0,u=0;break;case E5:for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.flags=c,(n.flags&255)!==x5){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=c>>8&1),n.flags&512&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Br(n.check,P,2,0)),c=0,u=0,n.mode=S5;case S5:for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.head&&(n.head.time=c),n.flags&512&&(P[0]=c&255,P[1]=c>>>8&255,P[2]=c>>>16&255,P[3]=c>>>24&255,n.check=Br(n.check,P,4,0)),c=0,u=0,n.mode=_5;case _5:for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Br(n.check,P,2,0)),c=0,u=0,n.mode=C5;case C5:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Br(n.check,P,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=k5;case k5:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(T=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),vn.arraySet(n.head.extra,r,a,d,T)),n.flags&512&&(n.check=Br(n.check,r,d,a)),s-=d,a+=d,n.length-=d),n.length))break e;n.length=0,n.mode=T5;case T5:if(n.flags&2048){if(s===0)break e;d=0;do T=r[a+d++],n.head&&T&&n.length<65536&&(n.head.name+=String.fromCharCode(T));while(T&&d<s);if(n.flags&512&&(n.check=Br(n.check,r,d,a)),s-=d,a+=d,T)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=I5;case I5:if(n.flags&4096){if(s===0)break e;d=0;do T=r[a+d++],n.head&&T&&n.length<65536&&(n.head.comment+=String.fromCharCode(T));while(T&&d<s);if(n.flags&512&&(n.check=Br(n.check,r,d,a)),s-=d,a+=d,T)break e}else n.head&&(n.head.comment=null);n.mode=R5;case R5:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(c!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Je;break}c=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ci;break;case D5:for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}e.adler=n.check=j5(c),c=0,u=0,n.mode=W0;case W0:if(n.havedict===0)return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,lQ;e.adler=n.check=1,n.mode=ci;case ci:if(t===oQ||t===q0)break e;case t2:if(n.last){c>>>=u&7,u-=u&7,n.mode=r2;break}for(;u<3;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}switch(n.last=c&1,c>>>=1,u-=1,c&3){case 0:n.mode=B5;break;case 1:if(bQ(n),n.mode=Y0,t===q0){c>>>=2,u-=2;break e}break;case 2:n.mode=M5;break;case 3:e.msg="invalid block type",n.mode=Je}c>>>=2,u-=2;break;case B5:for(c>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Je;break}if(n.length=c&65535,c=0,u=0,n.mode=n2,t===q0)break e;case n2:n.mode=F5;case F5:if(d=n.length,d){if(d>s&&(d=s),d>l&&(d=l),d===0)break e;vn.arraySet(i,r,a,d,o),s-=d,a+=d,l-=d,o+=d,n.length-=d;break}n.mode=ci;break;case M5:for(;u<14;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.nlen=(c&31)+257,c>>>=5,u-=5,n.ndist=(c&31)+1,c>>>=5,u-=5,n.ncode=(c&15)+4,c>>>=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=P5;case P5:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.lens[oe[n.have++]]=c&7,c>>>=3,u-=3}for(;n.have<19;)n.lens[oe[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=Zu(aQ,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=O5;case O5:for(;n.have<n.nlen+n.ndist;){for(;b=n.lencode[c&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(A<16)c>>>=y,u-=y,n.lens[n.have++]=A;else{if(A===16){for(N=y+2;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(c>>>=y,u-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=Je;break}T=n.lens[n.have-1],d=3+(c&3),c>>>=2,u-=2}else if(A===17){for(N=y+3;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=y,u-=y,T=0,d=3+(c&7),c>>>=3,u-=3}else{for(N=y+7;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=y,u-=y,T=0,d=11+(c&127),c>>>=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++]=T}}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=Zu(m5,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=Zu(b5,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=Y0,t===q0)break e;case Y0:n.mode=Z0;case Z0:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,iQ(e,h),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,u=n.bits,n.mode===ci&&(n.back=-1);break}for(n.back=0;b=n.lencode[c&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(w&&!(w&240)){for(x=y,E=w,_=A;b=n.lencode[_+((c&(1<<x+E)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=x,u-=x,n.back+=x}if(c>>>=y,u-=y,n.back+=y,n.length=A,w===0){n.mode=$5;break}if(w&32){n.back=-1,n.mode=ci;break}if(w&64){e.msg="invalid literal/length code",n.mode=Je;break}n.extra=w&15,n.mode=L5;case L5:if(n.extra){for(N=n.extra;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=N5;case N5:for(;b=n.distcode[c&(1<<n.distbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(!(w&240)){for(x=y,E=w,_=A;b=n.distcode[_+((c&(1<<x+E)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=x,u-=x,n.back+=x}if(c>>>=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=z5;case z5:if(n.extra){for(N=n.extra;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=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=U5;case U5:if(l===0)break e;if(d=h-l,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>l&&(d=l),l-=d,n.length-=d;do i[o++]=g[p++];while(--d);n.length===0&&(n.mode=Z0);break;case $5:if(l===0)break e;i[o++]=n.length,l--,n.mode=Z0;break;case r2:if(n.wrap){for(;u<32;){if(s===0)break e;s--,c|=r[a++]<<u,u+=8}if(h-=l,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?Br(n.check,i,h,o-h):e2(n.check,i,h,o-h)),h=l,(n.flags?c:j5(c))!==n.check){e.msg="incorrect data check",n.mode=Je;break}c=0,u=0}n.mode=H5;case H5:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(c!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Je;break}c=0,u=0}n.mode=G5;case G5:D=sQ;break e;case Je:D=v5;break e;case V5:return w5;case uQ:default:return Pn}return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<Je&&(n.mode<r2||t!==y5))&&X5(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?Br(n.check,i,h,e.next_out-h):e2(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===ci?128:0)+(n.mode===Y0||n.mode===n2?256:0),(f===0&&h===0||t===y5)&&D===Bo&&(D=cQ),D}function vQ(e){if(!e||!e.state)return Pn;var t=e.state;return t.window&&(t.window=null),e.state=null,Bo}function wQ(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?Pn:(n.head=t,t.done=!1,Bo)}function xQ(e,t){var n=t.length,r,i,a;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==W0)?Pn:r.mode===W0&&(i=1,i=e2(i,t,n,0),i!==r.check)?v5:(a=X5(e,t,n,n),a?(r.mode=V5,w5):(r.havedict=1,Bo))}ar.inflateReset=W5,ar.inflateReset2=Y5,ar.inflateResetKeep=q5,ar.inflateInit=mQ,ar.inflateInit2=Z5,ar.inflate=yQ,ar.inflateEnd=vQ,ar.inflateGetHeader=wQ,ar.inflateSetDictionary=xQ,ar.inflateInfo="pako inflate (from Nodeca project)";var K5={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 AQ(){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 EQ=AQ,Js=ar,Qu=si,Q0=Ro,ht=K5,o2=Vy,SQ=s5,_Q=EQ,J5=Object.prototype.toString;function Fo(e){if(!(this instanceof Fo))return new Fo(e);this.options=Qu.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 SQ,this.strm.avail_out=0;var n=Js.inflateInit2(this.strm,t.windowBits);if(n!==ht.Z_OK)throw new Error(o2[n]);if(this.header=new _Q,Js.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Q0.string2buf(t.dictionary):J5.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Js.inflateSetDictionary(this.strm,t.dictionary),n!==ht.Z_OK)))throw new Error(o2[n])}Fo.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s,l,c,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=Q0.binstring2buf(e):J5.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 Qu.Buf8(r),n.next_out=0,n.avail_out=r),a=Js.inflate(n,ht.Z_NO_FLUSH),a===ht.Z_NEED_DICT&&i&&(a=Js.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=Q0.utf8border(n.output,n.next_out),l=n.next_out-s,c=Q0.buf2string(n.output,s),n.next_out=l,n.avail_out=r-l,l&&Qu.arraySet(n.output,n.output,s,l,0),this.onData(c)):this.onData(Qu.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=Js.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)},Fo.prototype.onData=function(e){this.chunks.push(e)},Fo.prototype.onEnd=function(e){e===ht.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Qu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function s2(e,t){var n=new Fo(t);if(n.push(e,!0),n.err)throw n.msg||o2[n.err];return n.result}function CQ(e,t){return t=t||{},t.raw=!0,s2(e,t)}Yu.Inflate=Fo,Yu.inflate=s2,Yu.inflateRaw=CQ,Yu.ungzip=s2;var kQ=si.assign,TQ=Pu,IQ=Yu,RQ=K5,ek={};kQ(ek,TQ,IQ,RQ);var X0=ek;async function fa(e){try{let t,n=0,r=0;const i=[];let a=0,o;do{const l=e.subarray(n);if(o=new X0.Inflate,{strm:t}=o,o.push(l,X0.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 l=0,c=0;l<i.length;l++)s.set(i[l],c),c+=i[l].length;return Ae.Buffer.from(s)}catch(t){throw`${t}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function tk(e,t){try{let n;const{minv:r,maxv:i}=t;let a=r.blockPosition,o=r.dataPosition;const s=[],l=[],c=[];let u=0,f=0;do{const p=e.subarray(a-r.blockPosition),g=new X0.Inflate;if({strm:n}=g,g.push(p,X0.Z_SYNC_FLUSH),g.err)throw new Error(g.msg);const b=g.result;s.push(b);let y=b.length;l.push(a),c.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),l.push(a),c.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:Ae.Buffer.from(h),cpositions:l,dpositions:c}}catch(n){throw`${n}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):n}}var DQ=Ge,On=null;try{On=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 Ge(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}Ge.prototype.__isLong__,Object.defineProperty(Ge.prototype,"__isLong__",{value:!0});function on(e){return(e&&e.__isLong__)===!0}Ge.isLong=on;var nk={},rk={};function Mo(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=rk[e],r)?r:(n=Ve(e,(e|0)<0?-1:0,!0),i&&(rk[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=nk[e],r)?r:(n=Ve(e,e<0?-1:0,!1),i&&(nk[e]=n),n))}Ge.fromInt=Mo;function Ln(e,t){if(isNaN(e))return t?Po:Nn;if(t){if(e<0)return Po;if(e>=ak)return uk}else{if(e<=-ok)return sn;if(e+1>=ok)return ck}return e<0?Ln(-e,t).neg():Ve(e%el|0,e/el|0,t)}Ge.fromNumber=Ln;function Ve(e,t,n){return new Ge(e,t,n)}Ge.fromBits=Ve;var K0=Math.pow;function l2(e,t,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return Nn;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 l2(e.substring(1),t,n).neg();for(var i=Ln(K0(n,8)),a=Nn,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),l=parseInt(e.substring(o,o+s),n);if(s<8){var c=Ln(K0(n,s));a=a.mul(c).add(Ln(l))}else a=a.mul(i),a=a.add(Ln(l))}return a.unsigned=t,a}Ge.fromString=l2;function or(e,t){return typeof e=="number"?Ln(e,t):typeof e=="string"?l2(e,t):Ve(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Ge.fromValue=or;var ik=65536,BQ=1<<24,el=ik*ik,ak=el*el,ok=ak/2,sk=Mo(BQ),Nn=Mo(0);Ge.ZERO=Nn;var Po=Mo(0,!0);Ge.UZERO=Po;var tl=Mo(1);Ge.ONE=tl;var lk=Mo(1,!0);Ge.UONE=lk;var c2=Mo(-1);Ge.NEG_ONE=c2;var ck=Ve(-1,2147483647,!1);Ge.MAX_VALUE=ck;var uk=Ve(-1,-1,!0);Ge.MAX_UNSIGNED_VALUE=uk;var sn=Ve(0,-2147483648,!1);Ge.MIN_VALUE=sn;var K=Ge.prototype;K.toInt=function(){return this.unsigned?this.low>>>0:this.low},K.toNumber=function(){return this.unsigned?(this.high>>>0)*el+(this.low>>>0):this.high*el+(this.low>>>0)},K.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=Ln(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=Ln(K0(t,6),this.unsigned),o=this,s="";;){var l=o.div(a),c=o.sub(l.mul(a)).toInt()>>>0,u=c.toString(t);if(o=l,o.isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},K.getHighBits=function(){return this.high},K.getHighBitsUnsigned=function(){return this.high>>>0},K.getLowBits=function(){return this.low},K.getLowBitsUnsigned=function(){return this.low>>>0},K.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},K.isZero=function(){return this.high===0&&this.low===0},K.eqz=K.isZero,K.isNegative=function(){return!this.unsigned&&this.high<0},K.isPositive=function(){return this.unsigned||this.high>=0},K.isOdd=function(){return(this.low&1)===1},K.isEven=function(){return(this.low&1)===0},K.equals=function(t){return on(t)||(t=or(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},K.eq=K.equals,K.notEquals=function(t){return!this.eq(t)},K.neq=K.notEquals,K.ne=K.notEquals,K.lessThan=function(t){return this.comp(t)<0},K.lt=K.lessThan,K.lessThanOrEqual=function(t){return this.comp(t)<=0},K.lte=K.lessThanOrEqual,K.le=K.lessThanOrEqual,K.greaterThan=function(t){return this.comp(t)>0},K.gt=K.greaterThan,K.greaterThanOrEqual=function(t){return this.comp(t)>=0},K.gte=K.greaterThanOrEqual,K.ge=K.greaterThanOrEqual,K.compare=function(t){if(on(t)||(t=or(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},K.comp=K.compare,K.negate=function(){return!this.unsigned&&this.eq(sn)?sn:this.not().add(tl)},K.neg=K.negate,K.add=function(t){on(t)||(t=or(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,l=t.low>>>16,c=t.low&65535,u=0,f=0,h=0,d=0;return d+=a+c,h+=d>>>16,d&=65535,h+=i+l,f+=h>>>16,h&=65535,f+=r+s,u+=f>>>16,f&=65535,u+=n+o,u&=65535,Ve(h<<16|d,u<<16|f,this.unsigned)},K.subtract=function(t){return on(t)||(t=or(t)),this.add(t.neg())},K.sub=K.subtract,K.multiply=function(t){if(this.isZero())return Nn;if(on(t)||(t=or(t)),On){var n=On.mul(this.low,this.high,t.low,t.high);return Ve(n,On.get_high(),this.unsigned)}if(t.isZero())return Nn;if(this.eq(sn))return t.isOdd()?sn:Nn;if(t.eq(sn))return this.isOdd()?sn:Nn;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(sk)&&t.lt(sk))return Ln(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,l=t.high&65535,c=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*c,h+=d>>>16,d&=65535,h+=i*u,f+=h>>>16,h&=65535,h+=a*c,f+=h>>>16,h&=65535,h+=o*l,f+=h>>>16,h&=65535,f+=r*u+i*c+a*l+o*s,f&=65535,Ve(d<<16|p,f<<16|h,this.unsigned)},K.mul=K.multiply,K.divide=function(t){if(on(t)||(t=or(t)),t.isZero())throw Error("division by zero");if(On){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?On.div_u:On.div_s)(this.low,this.high,t.low,t.high);return Ve(n,On.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Po:Nn;var r,i,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Po;if(t.gt(this.shru(1)))return lk;a=Po}else{if(this.eq(sn)){if(t.eq(tl)||t.eq(c2))return sn;if(t.eq(sn))return tl;var o=this.shr(1);return r=o.div(t).shl(1),r.eq(Nn)?t.isNegative()?tl:c2:(i=this.sub(t.mul(r)),a=r.add(i.div(t)),a)}else if(t.eq(sn))return this.unsigned?Po:Nn;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=Nn}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),l=s<=48?1:K0(2,s-48),c=Ln(r),u=c.mul(t);u.isNegative()||u.gt(i);)r-=l,c=Ln(r,this.unsigned),u=c.mul(t);c.isZero()&&(c=tl),a=a.add(c),i=i.sub(u)}return a},K.div=K.divide,K.modulo=function(t){if(on(t)||(t=or(t)),On){var n=(this.unsigned?On.rem_u:On.rem_s)(this.low,this.high,t.low,t.high);return Ve(n,On.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},K.mod=K.modulo,K.rem=K.modulo,K.not=function(){return Ve(~this.low,~this.high,this.unsigned)},K.and=function(t){return on(t)||(t=or(t)),Ve(this.low&t.low,this.high&t.high,this.unsigned)},K.or=function(t){return on(t)||(t=or(t)),Ve(this.low|t.low,this.high|t.high,this.unsigned)},K.xor=function(t){return on(t)||(t=or(t)),Ve(this.low^t.low,this.high^t.high,this.unsigned)},K.shiftLeft=function(t){return on(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ve(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Ve(0,this.low<<t-32,this.unsigned)},K.shl=K.shiftLeft,K.shiftRight=function(t){return on(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ve(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Ve(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},K.shr=K.shiftRight,K.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 Ve(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?Ve(n,0,this.unsigned):Ve(n>>>t-32,0,this.unsigned)},K.shru=K.shiftRightUnsigned,K.shr_u=K.shiftRightUnsigned,K.toSigned=function(){return this.unsigned?Ve(this.low,this.high,!1):this},K.toUnsigned=function(){return this.unsigned?this:Ve(this.low,this.high,!0)},K.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},K.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]},K.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]},Ge.fromBytes=function(t,n,r){return r?Ge.fromBytesLE(t,n):Ge.fromBytesBE(t,n)},Ge.fromBytesLE=function(t,n){return new Ge(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Ge.fromBytesBE=function(t,n){return new Ge(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};const J0=Bu(DQ),ep=1;class FQ{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=J0.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=Ae.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=Ae.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[ep],g=d?d[ep]:1/0;return p<=n&&g>n?0:p<n?-1:1};let s=0,l=i.length-1,c=Math.floor(i.length/2),u=o(i[c],i[c+1]);for(;u!==0;)u>0?l=c-1:u<0&&(s=c+1),c=Math.ceil((l-s)/2)+s,u=o(i[c],i[c+1]);a.push(i[c]);let f=c+1;for(;f<i.length&&(a.push(i[f]),!(i[f][ep]>=r));f+=1);return a[a.length-1][ep]<r&&a.push([]),a}}class fk{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 FQ({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=Ae.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 fa(t.slice(0,a))}async read(t,n,r,i){const a=await this.gzi.getRelevantBlocksForRead(r,i),o=Ae.Buffer.allocUnsafe(32768*2);let s=n,l=0;for(let c=0;c<a.length-1;c+=1){const u=await this._readAndUncompressBlock(o,a[c],a[c+1]),[,f]=a[c],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,l+=d-h)}return{bytesRead:l,buffer:t}}}function hk(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function MQ(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 dk{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=MQ(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=hk(t,n),s=hk(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 l=Buffer.allocUnsafe(s);return await this.fasta.read(l,0,s,o,i),l.toString("utf8").replace(/\s+/g,"")}}class PQ extends dk{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 fk({filehandle:t,gziFilehandle:a}):n&&o&&(this.fasta=new fk({path:n,gziPath:o}))}}function pk(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
3345
- `),[i,...a]=n.split(" "),o=r.join("").replace(/\s/g,"");return{id:i,description:a.join(" "),sequence:o}})}class OQ{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 pk(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 LQ=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:PQ,FetchableSmallFasta:OQ,IndexedFasta:dk,parseSmallFasta:pk},Symbol.toStringTag,{value:"Module"})),tp=BigInt(32);function NQ(e,t,n){const r=+!!n,i=+!n;return BigInt(e.getInt32(t,n)*i+e.getInt32(t+4,n)*r)<<tp|BigInt(e.getUint32(t,n)*r+e.getUint32(t+4,n)*i)}function zQ(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)<<tp|BigInt(r*a+i*o)}function UQ(e,t,n,r){const i=Number(n>>tp),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 $Q(e,t,n,r){const i=Number(n>>tp),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 NQ(this,e,t)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(e,t){return zQ(this,e,t)}),"setBigInt64"in DataView||(DataView.prototype.setBigInt64=function(e,t,n){UQ(this,e,t,n)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,n){$Q(this,e,t,n)});class HQ{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+`
3346
- `}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 sr=new Map,Oo="___parser_",lr={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},np={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"},rp={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 Oe=class hr{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new hr}primitiveGenerateN(t,n){const r=np[t],i=rp[t];n.pushCode(`${n.generateVariable(this.varName)} = dataView.get${r}(offset, ${i});`),n.pushCode(`offset += ${lr[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 sr.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"&&!sr.has(n.type)&&!(n.type in lr))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"&&!sr.has(a)&&!(a in lr))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 hr)&&!sr.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof hr)&&!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 lr)&&!sr.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 HQ(t,this.useContextVariables);return n.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(n),n.pushCode(`return ${Oo+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 ${Oo+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=sr.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(lr).indexOf(this.type)>=0)t=lr[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=lr[this.options.type]:this.options.type instanceof hr&&(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 hr;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 l=0,c=0;t.bitFields.forEach((u,f)=>{let h=u.options.length;if(h>c){if(c){const g=-1>>>32-c;t.pushCode(`${u.varName} = (${r} & 0x${g.toString(16)}) << ${h-c};`),h-=c}o=0,c=l=a(i(f)-c)}const d=s?l-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,c-=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 l=`offset - ${r} < ${s} ? offset - 1 : offset`;t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, ${l}), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, ${l}));`)}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(),l=this.options.key,c=typeof l=="string";if(c?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(sr.get(i)){const u=t.generateTmpVariable();if(t.pushCode(`var ${u} = ${Oo+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=np[i],f=rp[i];t.pushCode(`var ${s} = dataView.get${u}(offset, ${f});`),t.pushCode(`offset += ${lr[i]};`)}else if(i instanceof hr){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(c?t.pushCode(`${o}[${s}.${l}] = ${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(sr.has(r)){const a=t.generateTmpVariable();t.pushCode(`var ${a} = ${Oo+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=np[r],o=rp[r];t.pushCode(`${i} = dataView.get${a}(offset, ${o});`),t.pushCode(`offset += ${lr[r]}`)}}else r instanceof hr&&(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 hr){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(sr.has(this.options.type)){const r=t.generateTmpVariable();if(t.pushCode(`var ${r} = ${Oo+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 l=this.options.readUntil,c=t.generateTmpVariable(),u=t.generateTmpVariable();t.pushCode(`var ${c} = offset;`),t.pushCode(`var ${u} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${u} = dataView.getUint8(offset);`);const f=t.addImport(l);t.pushCode(`if (${f}.call(${t.generateVariable()}, ${u}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${r} = buffer.subarray(${c}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${r} = buffer.subarray(offset);`);else{const l=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${l});`),t.pushCode(`offset += ${l};`)}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 hr)this.varName&&t.pushCode(`${n} = {};`),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(sr.has(this.options.type)){const l=t.generateTmpVariable();t.pushCode(`var ${l} = ${Oo+this.options.type}(0);`),t.pushCode(`${n} = ${l}.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 hr){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(sr.has(this.options.type)){const o=t.generateTmpVariable();if(t.pushCode(`var ${o} = ${Oo+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(lr).indexOf(this.options.type)>=0){const o=np[n],s=rp[n];t.pushCode(`${a} = dataView.get${o}(offset, ${s});`),t.pushCode(`offset += ${lr[n]};`)}t.pushCode(`offset = ${i};`)}generateSaveOffset(t){const n=t.generateVariable(this.varName);t.pushCode(`${n} = offset`)}};var gk={},u2={},Lo={},Xu={};Object.defineProperty(Xu,"__esModule",{value:!0});function f2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mk(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 h2(e,t,n){return t&&mk(e.prototype,t),n&&mk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function GQ(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&&d2(e,t)}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nl(e)}function d2(e,t){return d2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},d2(e,t)}function VQ(){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 Ku(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jQ(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 Ku(e)}function qQ(e){var t=VQ();return function(){var r=nl(e),i;if(t){var a=nl(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return jQ(this,i)}}function WQ(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=nl(e),e!==null););return e}function ip(){return typeof Reflect<"u"&&Reflect.get?ip=Reflect.get.bind():ip=function(t,n,r){var i=WQ(t,n);if(i){var a=Object.getOwnPropertyDescriptor(i,n);return a.get?a.get.call(arguments.length<3?t:r):a.value}},ip.apply(this,arguments)}var bk=function(){function e(){f2(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return h2(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(l){Promise.resolve().then(function(){throw l})}s.options&&s.options.once&&this.removeEventListener(n.type,s.callback)}return!n.defaultPrevented}}}]),e}(),p2=function(e){GQ(n,e);var t=qQ(n);function n(){var r;return f2(this,n),r=t.call(this),r.listeners||bk.call(Ku(r)),Object.defineProperty(Ku(r),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(Ku(r),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(Ku(r),"reason",{value:void 0,writable:!0,configurable:!0}),r}return h2(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)),ip(nl(n.prototype),"dispatchEvent",this).call(this,i)}}]),n}(bk),yk=function(){function e(){f2(this,e),Object.defineProperty(this,"signal",{value:new p2,writable:!0,configurable:!0})}return h2(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&&(yk.prototype[Symbol.toStringTag]="AbortController",p2.prototype[Symbol.toStringTag]="AbortSignal");function YQ(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 ZQ(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(!YQ({fetch:n,Request:i,AbortController:a,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:n,Request:l};var l=i;(l&&!l.prototype.hasOwnProperty("signal")||s)&&(l=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},l.prototype=i.prototype);var c=n,u=function(h,d){var p=l&&l.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,c(h,d)])}return c(h,d)};return{fetch:u,Request:l}}Xu.AbortController=yk,Xu.AbortSignal=p2,Xu.abortableFetch=ZQ,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.AbortSignal=Lo.AbortController=void 0;const vk=Xu;var ap=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 QQ=typeof ap().AbortController>"u"?vk.AbortController:ap().AbortController;Lo.AbortController=QQ;let XQ=typeof ap().AbortController>"u"?vk.AbortSignal:ap().AbortSignal;Lo.AbortSignal=XQ;var g2={};Object.defineProperty(g2,"__esModule",{value:!0});const KQ=Lo;class JQ{}class eX{constructor(){this.signals=new Set,this.abortController=new KQ.AbortController}addSignal(t=new JQ){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()}}g2.default=eX;var m2={};Object.defineProperty(m2,"__esModule",{value:!0});class tX{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)})}}m2.default=tX;var wk=M0&&M0.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u2,"__esModule",{value:!0});const nX=Lo,rX=wk(g2),iX=wk(m2);class op{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 rX.default,o=new iX.default;o.addCallback(i);const s={aborter:a,promise:this.fillCallback(n,a.signal,l=>{o.callback(l)}),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(l=>{throw console.error(l),l}),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 nX.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),op.checkSinglePromise(a.promise,r)):(this.fill(t,n,r,i),op.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}}u2.default=op;var aX=M0&&M0.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gk,"__esModule",{value:!0});const oX=aX(u2);var sp=gk.default=oX.default;class sX{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 lX=sX;const lp=Bu(lX);class ha{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 ha(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 ha(i.min(),o.max()))}return r.push(i),r.length===1?r[0]:new ha(r)}intersection(t){let n=this,r=t;const i=this.ranges(),a=r.ranges(),o=i.length,s=a.length;let l=0,c=0;const u=[];for(;l<o&&c<s;){n=i[l],r=a[c];const f=Math.max(n.min(),r.min()),h=Math.min(n.max(),r.max());h>=f&&u.push(new ha(f,h)),n.max()>r.max()?c+=1:l+=1}if(u.length===0)throw new Error("found range of length 0");return u.length===1?u[0]:new ha(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 cX=4,xk=0,Ak=1,uX=2;function rl(e){let t=e.length;for(;--t>=0;)e[t]=0}const fX=0,Ek=1,hX=2,dX=3,pX=258,b2=29,Ju=256,ef=Ju+1+b2,il=30,y2=19,Sk=2*ef+1,No=15,v2=16,gX=7,w2=256,_k=16,Ck=17,kk=18,x2=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]),cp=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]),mX=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Tk=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),bX=512,ui=new Array((ef+2)*2);rl(ui);const tf=new Array(il*2);rl(tf);const nf=new Array(bX);rl(nf);const rf=new Array(pX-dX+1);rl(rf);const A2=new Array(b2);rl(A2);const up=new Array(il);rl(up);function E2(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 Ik,Rk,Dk;function S2(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const Bk=e=>e<256?nf[e]:nf[256+(e>>>7)],af=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},ln=(e,t,n)=>{e.bi_valid>v2-n?(e.bi_buf|=t<<e.bi_valid&65535,af(e,e.bi_buf),e.bi_buf=t>>v2-e.bi_valid,e.bi_valid+=n-v2):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},Fr=(e,t,n)=>{ln(e,n[t*2],n[t*2+1])},Fk=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},yX=e=>{e.bi_valid===16?(af(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)},vX=(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,l=t.stat_desc.max_length;let c,u,f,h,d,p,g=0;for(h=0;h<=No;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<Sk;c++)u=e.heap[c],h=n[n[u*2+1]*2+1]+1,h>l&&(h=l,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=l-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[l]--,g-=2}while(g>0);for(h=l;h!==0;h--)for(u=e.bl_count[h];u!==0;)f=e.heap[--c],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),u--)}},Mk=(e,t,n)=>{const r=new Array(No+1);let i=0,a,o;for(a=1;a<=No;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]=Fk(r[s]++,s))}},wX=()=>{let e,t,n,r,i;const a=new Array(No+1);for(n=0,r=0;r<b2-1;r++)for(A2[r]=n,e=0;e<1<<x2[r];e++)rf[n++]=r;for(rf[n-1]=r,i=0,r=0;r<16;r++)for(up[r]=i,e=0;e<1<<cp[r];e++)nf[i++]=r;for(i>>=7;r<il;r++)for(up[r]=i<<7,e=0;e<1<<cp[r]-7;e++)nf[256+i++]=r;for(t=0;t<=No;t++)a[t]=0;for(e=0;e<=143;)ui[e*2+1]=8,e++,a[8]++;for(;e<=255;)ui[e*2+1]=9,e++,a[9]++;for(;e<=279;)ui[e*2+1]=7,e++,a[7]++;for(;e<=287;)ui[e*2+1]=8,e++,a[8]++;for(Mk(ui,ef+1,a),e=0;e<il;e++)tf[e*2+1]=5,tf[e*2]=Fk(e,5);Ik=new E2(ui,x2,Ju+1,ef,No),Rk=new E2(tf,cp,0,il,No),Dk=new E2(new Array(0),mX,0,y2,gX)},Pk=e=>{let t;for(t=0;t<ef;t++)e.dyn_ltree[t*2]=0;for(t=0;t<il;t++)e.dyn_dtree[t*2]=0;for(t=0;t<y2;t++)e.bl_tree[t*2]=0;e.dyn_ltree[w2*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Ok=e=>{e.bi_valid>8?af(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Lk=(e,t,n,r)=>{const i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},_2=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&Lk(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Lk(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},Nk=(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?Fr(e,i,t):(o=rf[i],Fr(e,o+Ju+1,t),s=x2[o],s!==0&&(i-=A2[o],ln(e,i,s)),r--,o=Bk(r),Fr(e,o,n),s=cp[o],s!==0&&(r-=up[o],ln(e,r,s)));while(a<e.sym_next);Fr(e,w2,t)},C2=(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,l=-1,c;for(e.heap_len=0,e.heap_max=Sk,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=l=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,n[c*2]=1,e.depth[c]=0,e.opt_len--,i&&(e.static_len-=r[c*2+1]);for(t.max_code=l,o=e.heap_len>>1;o>=1;o--)_2(e,n,o);c=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],_2(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[c*2]=n[o*2]+n[s*2],e.depth[c]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=c,e.heap[1]=c++,_2(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],vX(e,t),Mk(n,l,e.bl_count)},zk=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,l=7,c=4;for(o===0&&(l=138,c=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<l&&a===o)&&(s<c?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[_k*2]++):s<=10?e.bl_tree[Ck*2]++:e.bl_tree[kk*2]++,s=0,i=a,o===0?(l=138,c=3):a===o?(l=6,c=3):(l=7,c=4))},Uk=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,l=7,c=4;for(o===0&&(l=138,c=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<l&&a===o)){if(s<c)do Fr(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Fr(e,a,e.bl_tree),s--),Fr(e,_k,e.bl_tree),ln(e,s-3,2)):s<=10?(Fr(e,Ck,e.bl_tree),ln(e,s-3,3)):(Fr(e,kk,e.bl_tree),ln(e,s-11,7));s=0,i=a,o===0?(l=138,c=3):a===o?(l=6,c=3):(l=7,c=4)}},xX=e=>{let t;for(zk(e,e.dyn_ltree,e.l_desc.max_code),zk(e,e.dyn_dtree,e.d_desc.max_code),C2(e,e.bl_desc),t=y2-1;t>=3&&e.bl_tree[Tk[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},AX=(e,t,n,r)=>{let i;for(ln(e,t-257,5),ln(e,n-1,5),ln(e,r-4,4),i=0;i<r;i++)ln(e,e.bl_tree[Tk[i]*2+1],3);Uk(e,e.dyn_ltree,t-1),Uk(e,e.dyn_dtree,n-1)},EX=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return xk;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Ak;for(n=32;n<Ju;n++)if(e.dyn_ltree[n*2]!==0)return Ak;return xk};let $k=!1;const SX=e=>{$k||(wX(),$k=!0),e.l_desc=new S2(e.dyn_ltree,Ik),e.d_desc=new S2(e.dyn_dtree,Rk),e.bl_desc=new S2(e.bl_tree,Dk),e.bi_buf=0,e.bi_valid=0,Pk(e)},Hk=(e,t,n,r)=>{ln(e,(fX<<1)+(r?1:0),3),Ok(e),af(e,n),af(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},_X=e=>{ln(e,Ek<<1,3),Fr(e,w2,ui),yX(e)},CX=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===uX&&(e.strm.data_type=EX(e)),C2(e,e.l_desc),C2(e,e.d_desc),o=xX(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?Hk(e,t,n,r):e.strategy===cX||a===i?(ln(e,(Ek<<1)+(r?1:0),3),Nk(e,ui,tf)):(ln(e,(hX<<1)+(r?1:0),3),AX(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Nk(e,e.dyn_ltree,e.dyn_dtree)),Pk(e),r&&Ok(e)},kX=(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[(rf[n]+Ju+1)*2]++,e.dyn_dtree[Bk(t)*2]++),e.sym_next===e.sym_end);var TX=SX,IX=Hk,RX=CX,DX=kX,BX=_X,FX={_tr_init:TX,_tr_stored_block:IX,_tr_flush_block:RX,_tr_tally:DX,_tr_align:BX},of=(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 MX=()=>{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},PX=new Uint32Array(MX());var Tt=(e,t,n,r)=>{const i=PX,a=r+n;e^=-1;for(let o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1},al={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"},sf={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:OX,_tr_stored_block:k2,_tr_flush_block:LX,_tr_tally:da,_tr_align:NX}=FX,{Z_NO_FLUSH:pa,Z_PARTIAL_FLUSH:zX,Z_FULL_FLUSH:UX,Z_FINISH:zn,Z_BLOCK:Gk,Z_OK:Ot,Z_STREAM_END:Vk,Z_STREAM_ERROR:Mr,Z_DATA_ERROR:$X,Z_BUF_ERROR:T2,Z_DEFAULT_COMPRESSION:HX,Z_FILTERED:GX,Z_HUFFMAN_ONLY:fp,Z_RLE:VX,Z_FIXED:jX,Z_DEFAULT_STRATEGY:qX,Z_UNKNOWN:WX,Z_DEFLATED:hp}=sf,YX=9,ZX=15,QX=8,XX=29,I2=256+1+XX,KX=30,JX=19,eK=2*I2+1,tK=15,we=3,ga=258,Pr=ga+we+1,nK=32,ol=42,R2=57,D2=69,B2=73,F2=91,M2=103,zo=113,lf=666,Xt=1,sl=2,Uo=3,ll=4,rK=3,$o=(e,t)=>(e.msg=al[t],t),jk=e=>e*2-(e>4?9:0),ma=e=>{let t=e.length;for(;--t>=0;)e[t]=0},iK=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 ba=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const wn=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))},xn=(e,t)=>{LX(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,wn(e.strm)},Te=(e,t)=>{e.pending_buf[e.pending++]=t},cf=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},P2=(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=of(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)},qk=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-Pr?e.strstart-(e.w_size-Pr):0,c=e.window,u=e.w_mask,f=e.prev,h=e.strstart+ga;let d=c[r+o-1],p=c[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(c[i+o]!==p||c[i+o-1]!==d||c[i]!==c[r]||c[++i]!==c[r+1])){r+=2,i++;do;while(c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&r<h);if(a=ga-(h-r),r=h-ga,a>o){if(e.match_start=t,o=a,a>=s)break;d=c[r+o-1],p=c[r+o]}}while((t=f[t&u])>l&&--n!==0);return o<=e.lookahead?o:e.lookahead},cl=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Pr)&&(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),iK(e),r+=t),e.strm.avail_in===0)break;if(n=P2(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=we)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=ba(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=ba(e,e.ins_h,e.window[i+we-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<we)););}while(e.lookahead<Pr&&e.strm.avail_in!==0)},Wk=(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!==zn||t===pa||r!==i+e.strm.avail_in)))break;o=t===zn&&r===i+e.strm.avail_in?1:0,k2(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,wn(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&&(P2(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?ll:t!==pa&&t!==zn&&e.strm.avail_in===0&&e.strstart===e.block_start?sl:(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&&(P2(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===zn)&&t!==pa&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=t===zn&&e.strm.avail_in===0&&r===i?1:0,k2(e,e.block_start,r,o),e.block_start+=r,wn(e.strm)),o?Uo:Xt)},O2=(e,t)=>{let n,r;for(;;){if(e.lookahead<Pr){if(cl(e),e.lookahead<Pr&&t===pa)return Xt;if(e.lookahead===0)break}if(n=0,e.lookahead>=we&&(e.ins_h=ba(e,e.ins_h,e.window[e.strstart+we-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-Pr&&(e.match_length=qk(e,n)),e.match_length>=we)if(r=da(e,e.strstart-e.match_start,e.match_length-we),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=we){e.match_length--;do e.strstart++,e.ins_h=ba(e,e.ins_h,e.window[e.strstart+we-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=ba(e,e.ins_h,e.window[e.strstart+1]);else r=da(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(xn(e,!1),e.strm.avail_out===0))return Xt}return e.insert=e.strstart<we-1?e.strstart:we-1,t===zn?(xn(e,!0),e.strm.avail_out===0?Uo:ll):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?Xt:sl},ul=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<Pr){if(cl(e),e.lookahead<Pr&&t===pa)return Xt;if(e.lookahead===0)break}if(n=0,e.lookahead>=we&&(e.ins_h=ba(e,e.ins_h,e.window[e.strstart+we-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=we-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Pr&&(e.match_length=qk(e,n),e.match_length<=5&&(e.strategy===GX||e.match_length===we&&e.strstart-e.match_start>4096)&&(e.match_length=we-1)),e.prev_length>=we&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-we,r=da(e,e.strstart-1-e.prev_match,e.prev_length-we),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=ba(e,e.ins_h,e.window[e.strstart+we-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=we-1,e.strstart++,r&&(xn(e,!1),e.strm.avail_out===0))return Xt}else if(e.match_available){if(r=da(e,0,e.window[e.strstart-1]),r&&xn(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Xt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=da(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<we-1?e.strstart:we-1,t===zn?(xn(e,!0),e.strm.avail_out===0?Uo:ll):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?Xt:sl},aK=(e,t)=>{let n,r,i,a;const o=e.window;for(;;){if(e.lookahead<=ga){if(cl(e),e.lookahead<=ga&&t===pa)return Xt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=we&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+ga;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=ga-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=we?(n=da(e,1,e.match_length-we),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=da(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(xn(e,!1),e.strm.avail_out===0))return Xt}return e.insert=0,t===zn?(xn(e,!0),e.strm.avail_out===0?Uo:ll):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?Xt:sl},oK=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(cl(e),e.lookahead===0)){if(t===pa)return Xt;break}if(e.match_length=0,n=da(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(xn(e,!1),e.strm.avail_out===0))return Xt}return e.insert=0,t===zn?(xn(e,!0),e.strm.avail_out===0?Uo:ll):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?Xt:sl};function Or(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 uf=[new Or(0,0,0,0,Wk),new Or(4,4,8,4,O2),new Or(4,5,16,8,O2),new Or(4,6,32,32,O2),new Or(4,4,16,16,ul),new Or(8,16,32,32,ul),new Or(8,16,128,128,ul),new Or(8,32,128,256,ul),new Or(32,128,258,1024,ul),new Or(32,258,258,4096,ul)],sK=e=>{e.window_size=2*e.w_size,ma(e.head),e.max_lazy_match=uf[e.level].max_lazy,e.good_match=uf[e.level].good_length,e.nice_match=uf[e.level].nice_length,e.max_chain_length=uf[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=we-1,e.match_available=0,e.ins_h=0};function lK(){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=hp,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(eK*2),this.dyn_dtree=new Uint16Array((2*KX+1)*2),this.bl_tree=new Uint16Array((2*JX+1)*2),ma(this.dyn_ltree),ma(this.dyn_dtree),ma(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(tK+1),this.heap=new Uint16Array(2*I2+1),ma(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*I2+1),ma(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 ff=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ol&&t.status!==R2&&t.status!==D2&&t.status!==B2&&t.status!==F2&&t.status!==M2&&t.status!==zo&&t.status!==lf?1:0},Yk=e=>{if(ff(e))return $o(e,Mr);e.total_in=e.total_out=0,e.data_type=WX;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?R2:t.wrap?ol:zo,e.adler=t.wrap===2?0:1,t.last_flush=-2,OX(t),Ot},Zk=e=>{const t=Yk(e);return t===Ot&&sK(e.state),t},cK=(e,t)=>ff(e)||e.state.wrap!==2?Mr:(e.state.gzhead=t,Ot),Qk=(e,t,n,r,i,a)=>{if(!e)return Mr;let o=1;if(t===HX&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>YX||n!==hp||r<8||r>15||t<0||t>9||a<0||a>jX||r===8&&o!==1)return $o(e,Mr);r===8&&(r=9);const s=new lK;return e.state=s,s.strm=e,s.status=ol,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+we-1)/we),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,Zk(e)},uK=(e,t)=>Qk(e,t,hp,ZX,QX,qX),fK=(e,t)=>{if(ff(e)||t>Gk||t<0)return e?$o(e,Mr):Mr;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===lf&&t!==zn)return $o(e,e.avail_out===0?T2:Mr);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(wn(e),e.avail_out===0)return n.last_flush=-1,Ot}else if(e.avail_in===0&&jk(t)<=jk(r)&&t!==zn)return $o(e,T2);if(n.status===lf&&e.avail_in!==0)return $o(e,T2);if(n.status===ol&&n.wrap===0&&(n.status=zo),n.status===ol){let i=hp+(n.w_bits-8<<4)<<8,a=-1;if(n.strategy>=fp||n.level<2?a=0:n.level<6?a=1:n.level===6?a=2:a=3,i|=a<<6,n.strstart!==0&&(i|=nK),i+=31-i%31,cf(n,i),n.strstart!==0&&(cf(n,e.adler>>>16),cf(n,e.adler&65535)),e.adler=1,n.status=zo,wn(e),n.pending!==0)return n.last_flush=-1,Ot}if(n.status===R2){if(e.adler=0,Te(n,31),Te(n,139),Te(n,8),n.gzhead)Te(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)),Te(n,n.gzhead.time&255),Te(n,n.gzhead.time>>8&255),Te(n,n.gzhead.time>>16&255),Te(n,n.gzhead.time>>24&255),Te(n,n.level===9?2:n.strategy>=fp||n.level<2?4:0),Te(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Te(n,n.gzhead.extra.length&255),Te(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=D2;else if(Te(n,0),Te(n,0),Te(n,0),Te(n,0),Te(n,0),Te(n,n.level===9?2:n.strategy>=fp||n.level<2?4:0),Te(n,rK),n.status=zo,wn(e),n.pending!==0)return n.last_flush=-1,Ot}if(n.status===D2){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,wn(e),n.pending!==0)return n.last_flush=-1,Ot;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=B2}if(n.status===B2){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)),wn(e),n.pending!==0)return n.last_flush=-1,Ot;i=0}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,Te(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=F2}if(n.status===F2){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)),wn(e),n.pending!==0)return n.last_flush=-1,Ot;i=0}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,Te(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=M2}if(n.status===M2){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(wn(e),n.pending!==0))return n.last_flush=-1,Ot;Te(n,e.adler&255),Te(n,e.adler>>8&255),e.adler=0}if(n.status=zo,wn(e),n.pending!==0)return n.last_flush=-1,Ot}if(e.avail_in!==0||n.lookahead!==0||t!==pa&&n.status!==lf){let i=n.level===0?Wk(n,t):n.strategy===fp?oK(n,t):n.strategy===VX?aK(n,t):uf[n.level].func(n,t);if((i===Uo||i===ll)&&(n.status=lf),i===Xt||i===Uo)return e.avail_out===0&&(n.last_flush=-1),Ot;if(i===sl&&(t===zX?NX(n):t!==Gk&&(k2(n,0,0,!1),t===UX&&(ma(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),wn(e),e.avail_out===0))return n.last_flush=-1,Ot}return t!==zn?Ot:n.wrap<=0?Vk:(n.wrap===2?(Te(n,e.adler&255),Te(n,e.adler>>8&255),Te(n,e.adler>>16&255),Te(n,e.adler>>24&255),Te(n,e.total_in&255),Te(n,e.total_in>>8&255),Te(n,e.total_in>>16&255),Te(n,e.total_in>>24&255)):(cf(n,e.adler>>>16),cf(n,e.adler&65535)),wn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ot:Vk)},hK=e=>{if(ff(e))return Mr;const t=e.state.status;return e.state=null,t===zo?$o(e,$X):Ot},dK=(e,t)=>{let n=t.length;if(ff(e))return Mr;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==ol||r.lookahead)return Mr;if(i===1&&(e.adler=of(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(ma(r.head),r.strstart=0,r.block_start=0,r.insert=0);let l=new Uint8Array(r.w_size);l.set(t.subarray(n-r.w_size,n),0),t=l,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,cl(r);r.lookahead>=we;){let l=r.strstart,c=r.lookahead-(we-1);do r.ins_h=ba(r,r.ins_h,r.window[l+we-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++;while(--c);r.strstart=l,r.lookahead=we-1,cl(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=we-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,Ot};var pK=uK,gK=Qk,mK=Zk,bK=Yk,yK=cK,vK=fK,wK=hK,xK=dK,AK="pako deflate (from Nodeca project)",hf={deflateInit:pK,deflateInit2:gK,deflateReset:mK,deflateResetKeep:bK,deflateSetHeader:yK,deflate:vK,deflateEnd:wK,deflateSetDictionary:xK,deflateInfo:AK};const EK=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var SK=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)EK(n,r)&&(e[r]=n[r])}}return e},_K=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},dp={assign:SK,flattenChunks:_K};let Xk=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Xk=!1}const df=new Uint8Array(256);for(let e=0;e<256;e++)df[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;df[254]=df[254]=1;var CK=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 kK=(e,t)=>{if(t<65534&&e.subarray&&Xk)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 TK=(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=df[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 kK(a,i)},IK=(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+df[e[n]]>t?n:t},pf={string2buf:CK,buf2string:TK,utf8border:IK};function RK(){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 Kk=RK;const Jk=Object.prototype.toString,{Z_NO_FLUSH:DK,Z_SYNC_FLUSH:BK,Z_FULL_FLUSH:FK,Z_FINISH:MK,Z_OK:pp,Z_STREAM_END:PK,Z_DEFAULT_COMPRESSION:OK,Z_DEFAULT_STRATEGY:LK,Z_DEFLATED:NK}=sf;function L2(e){this.options=dp.assign({level:OK,method:NK,chunkSize:16384,windowBits:15,memLevel:8,strategy:LK},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 Kk,this.strm.avail_out=0;let n=hf.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==pp)throw new Error(al[n]);if(t.header&&hf.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=pf.string2buf(t.dictionary):Jk.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=hf.deflateSetDictionary(this.strm,r),n!==pp)throw new Error(al[n]);this._dict_set=!0}}L2.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?MK:DK,typeof e=="string"?n.input=pf.string2buf(e):Jk.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===BK||a===FK)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=hf.deflate(n,a),i===PK)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=hf.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===pp;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},L2.prototype.onData=function(e){this.chunks.push(e)},L2.prototype.onEnd=function(e){e===pp&&(this.result=dp.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const gp=16209,zK=16191;var UK=function(t,n){let r,i,a,o,s,l,c,u,f,h,d,p,g,b,y,w,A,x,E,_,T,D,P,G;const N=t.state;r=t.next_in,P=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),l=N.dmax,c=N.wsize,u=N.whave,f=N.wnext,h=N.window,d=N.hold,p=N.bits,g=N.lencode,b=N.distcode,y=(1<<N.lenbits)-1,w=(1<<N.distbits)-1;e:do{p<15&&(d+=P[r++]<<p,p+=8,d+=P[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){E=A&65535,x&=15,x&&(p<x&&(d+=P[r++]<<p,p+=8),E+=d&(1<<x)-1,d>>>=x,p-=x),p<15&&(d+=P[r++]<<p,p+=8,d+=P[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+=P[r++]<<p,p+=8,p<x&&(d+=P[r++]<<p,p+=8)),_+=d&(1<<x)-1,_>l){t.msg="invalid distance too far back",N.mode=gp;break e}if(d>>>=x,p-=x,x=a-o,_>x){if(x=_-x,x>u&&N.sane){t.msg="invalid distance too far back",N.mode=gp;break e}if(T=0,D=h,f===0){if(T+=c-x,x<E){E-=x;do G[a++]=h[T++];while(--x);T=a-_,D=G}}else if(f<x){if(T+=c+f-x,x-=f,x<E){E-=x;do G[a++]=h[T++];while(--x);if(T=0,f<E){x=f,E-=x;do G[a++]=h[T++];while(--x);T=a-_,D=G}}}else if(T+=f-x,x<E){E-=x;do G[a++]=h[T++];while(--x);T=a-_,D=G}for(;E>2;)G[a++]=D[T++],G[a++]=D[T++],G[a++]=D[T++],E-=3;E&&(G[a++]=D[T++],E>1&&(G[a++]=D[T++]))}else{T=a-_;do G[a++]=G[T++],G[a++]=G[T++],G[a++]=G[T++],E-=3;while(E>2);E&&(G[a++]=G[T++],E>1&&(G[a++]=G[T++]))}}else if(x&64){t.msg="invalid distance code",N.mode=gp;break e}else{A=b[(A&65535)+(d&(1<<x)-1)];continue n}break}}else if(x&64)if(x&32){N.mode=zK;break e}else{t.msg="invalid literal/length code",N.mode=gp;break e}else{A=g[(A&65535)+(d&(1<<x)-1)];continue t}break}}while(r<i&&a<s);E=p>>3,r-=E,p-=E<<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),N.hold=d,N.bits=p};const fl=15,e8=852,t8=592,n8=0,N2=1,r8=2,$K=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]),HK=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]),GK=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]),VK=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 gf=(e,t,n,r,i,a,o,s)=>{const l=s.bits;let c=0,u=0,f=0,h=0,d=0,p=0,g=0,b=0,y=0,w=0,A,x,E,_,T,D=null,P;const G=new Uint16Array(fl+1),N=new Uint16Array(fl+1);let oe=null,ue,ne,pe;for(c=0;c<=fl;c++)G[c]=0;for(u=0;u<r;u++)G[t[n+u]]++;for(d=l,h=fl;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,c=1;c<=fl;c++)if(b<<=1,b-=G[c],b<0)return-1;if(b>0&&(e===n8||h!==1))return-1;for(N[1]=0,c=1;c<fl;c++)N[c+1]=N[c]+G[c];for(u=0;u<r;u++)t[n+u]!==0&&(o[N[t[n+u]]++]=u);if(e===n8?(D=oe=o,P=20):e===N2?(D=$K,oe=HK,P=257):(D=GK,oe=VK,P=0),w=0,u=0,c=f,T=a,p=d,g=0,E=-1,y=1<<d,_=y-1,e===N2&&y>e8||e===r8&&y>t8)return 1;for(;;){ue=c-g,o[u]+1<P?(ne=0,pe=o[u]):o[u]>=P?(ne=oe[o[u]-P],pe=D[o[u]-P]):(ne=32+64,pe=0),A=1<<c-g,x=1<<p,f=x;do x-=A,i[T+(w>>g)+x]=ue<<24|ne<<16|pe|0;while(x!==0);for(A=1<<c-1;w&A;)A>>=1;if(A!==0?(w&=A-1,w+=A):w=0,u++,--G[c]===0){if(c===h)break;c=t[n+o[u]]}if(c>d&&(w&_)!==E){for(g===0&&(g=d),T+=f,p=c-g,b=1<<p;p+g<h&&(b-=G[p+g],!(b<=0));)p++,b<<=1;if(y+=1<<p,e===N2&&y>e8||e===r8&&y>t8)return 1;E=w&_,i[E]=d<<24|p<<16|T-a|0}}return w!==0&&(i[T+w]=c-g<<24|64<<16|0),s.bits=d,0};const jK=0,i8=1,a8=2,{Z_FINISH:o8,Z_BLOCK:qK,Z_TREES:mp,Z_OK:Ho,Z_STREAM_END:WK,Z_NEED_DICT:YK,Z_STREAM_ERROR:Un,Z_DATA_ERROR:s8,Z_MEM_ERROR:l8,Z_BUF_ERROR:ZK,Z_DEFLATED:c8}=sf,bp=16180,u8=16181,f8=16182,h8=16183,d8=16184,p8=16185,g8=16186,m8=16187,b8=16188,y8=16189,yp=16190,fi=16191,z2=16192,v8=16193,U2=16194,w8=16195,x8=16196,A8=16197,E8=16198,vp=16199,wp=16200,S8=16201,_8=16202,C8=16203,k8=16204,T8=16205,$2=16206,I8=16207,R8=16208,et=16209,D8=16210,B8=16211,QK=852,XK=592,KK=15,F8=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function JK(){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 Go=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<bp||t.mode>B8?1:0},M8=e=>{if(Go(e))return Un;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=bp,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(QK),t.distcode=t.distdyn=new Int32Array(XK),t.sane=1,t.back=-1,Ho},P8=e=>{if(Go(e))return Un;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,M8(e)},O8=(e,t)=>{let n;if(Go(e))return Un;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Un:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,P8(e))},L8=(e,t)=>{if(!e)return Un;const n=new JK;e.state=n,n.strm=e,n.window=null,n.mode=bp;const r=O8(e,t);return r!==Ho&&(e.state=null),r},eJ=e=>L8(e,KK);let N8=!0,H2,G2;const tJ=e=>{if(N8){H2=new Int32Array(512),G2=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(gf(i8,e.lens,0,288,H2,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;gf(a8,e.lens,0,32,G2,0,e.work,{bits:5}),N8=!1}e.lencode=H2,e.lenbits=9,e.distcode=G2,e.distbits=5},z8=(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},nJ=(e,t)=>{let n,r,i,a,o,s,l,c,u,f,h,d,p,g,b=0,y,w,A,x,E,_,T,D;const P=new Uint8Array(4);let G,N;const oe=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Go(e)||!e.output||!e.input&&e.avail_in!==0)return Un;n=e.state,n.mode===fi&&(n.mode=z2),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,u=n.bits,f=s,h=l,D=Ho;e:for(;;)switch(n.mode){case bp:if(n.wrap===0){n.mode=z2;break}for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.wrap&2&&c===35615){n.wbits===0&&(n.wbits=15),n.check=0,P[0]=c&255,P[1]=c>>>8&255,n.check=Tt(n.check,P,2,0),c=0,u=0,n.mode=u8;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=et;break}if((c&15)!==c8){e.msg="unknown compression method",n.mode=et;break}if(c>>>=4,u-=4,T=(c&15)+8,n.wbits===0&&(n.wbits=T),T>15||T>n.wbits){e.msg="invalid window size",n.mode=et;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=c&512?y8:fi,c=0,u=0;break;case u8:for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.flags=c,(n.flags&255)!==c8){e.msg="unknown compression method",n.mode=et;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=et;break}n.head&&(n.head.text=c>>8&1),n.flags&512&&n.wrap&4&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Tt(n.check,P,2,0)),c=0,u=0,n.mode=f8;case f8:for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.head&&(n.head.time=c),n.flags&512&&n.wrap&4&&(P[0]=c&255,P[1]=c>>>8&255,P[2]=c>>>16&255,P[3]=c>>>24&255,n.check=Tt(n.check,P,4,0)),c=0,u=0,n.mode=h8;case h8:for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&n.wrap&4&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Tt(n.check,P,2,0)),c=0,u=0,n.mode=d8;case d8:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&n.wrap&4&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Tt(n.check,P,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=p8;case p8:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(T=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),T)),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=g8;case g8:if(n.flags&2048){if(s===0)break e;d=0;do T=r[a+d++],n.head&&T&&n.length<65536&&(n.head.name+=String.fromCharCode(T));while(T&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=Tt(n.check,r,d,a)),s-=d,a+=d,T)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=m8;case m8:if(n.flags&4096){if(s===0)break e;d=0;do T=r[a+d++],n.head&&T&&n.length<65536&&(n.head.comment+=String.fromCharCode(T));while(T&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=Tt(n.check,r,d,a)),s-=d,a+=d,T)break e}else n.head&&(n.head.comment=null);n.mode=b8;case b8:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.wrap&4&&c!==(n.check&65535)){e.msg="header crc mismatch",n.mode=et;break}c=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=fi;break;case y8:for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}e.adler=n.check=F8(c),c=0,u=0,n.mode=yp;case yp:if(n.havedict===0)return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,YK;e.adler=n.check=1,n.mode=fi;case fi:if(t===qK||t===mp)break e;case z2:if(n.last){c>>>=u&7,u-=u&7,n.mode=$2;break}for(;u<3;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}switch(n.last=c&1,c>>>=1,u-=1,c&3){case 0:n.mode=v8;break;case 1:if(tJ(n),n.mode=vp,t===mp){c>>>=2,u-=2;break e}break;case 2:n.mode=x8;break;case 3:e.msg="invalid block type",n.mode=et}c>>>=2,u-=2;break;case v8:for(c>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=et;break}if(n.length=c&65535,c=0,u=0,n.mode=U2,t===mp)break e;case U2:n.mode=w8;case w8:if(d=n.length,d){if(d>s&&(d=s),d>l&&(d=l),d===0)break e;i.set(r.subarray(a,a+d),o),s-=d,a+=d,l-=d,o+=d,n.length-=d;break}n.mode=fi;break;case x8:for(;u<14;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.nlen=(c&31)+257,c>>>=5,u-=5,n.ndist=(c&31)+1,c>>>=5,u-=5,n.ncode=(c&15)+4,c>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=et;break}n.have=0,n.mode=A8;case A8:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.lens[oe[n.have++]]=c&7,c>>>=3,u-=3}for(;n.have<19;)n.lens[oe[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=gf(jK,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid code lengths set",n.mode=et;break}n.have=0,n.mode=E8;case E8:for(;n.have<n.nlen+n.ndist;){for(;b=n.lencode[c&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(A<16)c>>>=y,u-=y,n.lens[n.have++]=A;else{if(A===16){for(N=y+2;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(c>>>=y,u-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=et;break}T=n.lens[n.have-1],d=3+(c&3),c>>>=2,u-=2}else if(A===17){for(N=y+3;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=y,u-=y,T=0,d=3+(c&7),c>>>=3,u-=3}else{for(N=y+7;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=y,u-=y,T=0,d=11+(c&127),c>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=et;break}for(;d--;)n.lens[n.have++]=T}}if(n.mode===et)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=et;break}if(n.lenbits=9,G={bits:n.lenbits},D=gf(i8,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid literal/lengths set",n.mode=et;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},D=gf(a8,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,D){e.msg="invalid distances set",n.mode=et;break}if(n.mode=vp,t===mp)break e;case vp:n.mode=wp;case wp:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,UK(e,h),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,u=n.bits,n.mode===fi&&(n.back=-1);break}for(n.back=0;b=n.lencode[c&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(w&&!(w&240)){for(x=y,E=w,_=A;b=n.lencode[_+((c&(1<<x+E)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=x,u-=x,n.back+=x}if(c>>>=y,u-=y,n.back+=y,n.length=A,w===0){n.mode=T8;break}if(w&32){n.back=-1,n.mode=fi;break}if(w&64){e.msg="invalid literal/length code",n.mode=et;break}n.extra=w&15,n.mode=S8;case S8:if(n.extra){for(N=n.extra;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=_8;case _8:for(;b=n.distcode[c&(1<<n.distbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(!(w&240)){for(x=y,E=w,_=A;b=n.distcode[_+((c&(1<<x+E)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=x,u-=x,n.back+=x}if(c>>>=y,u-=y,n.back+=y,w&64){e.msg="invalid distance code",n.mode=et;break}n.offset=A,n.extra=w&15,n.mode=C8;case C8:if(n.extra){for(N=n.extra;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=et;break}n.mode=k8;case k8:if(l===0)break e;if(d=h-l,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=et;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>l&&(d=l),l-=d,n.length-=d;do i[o++]=g[p++];while(--d);n.length===0&&(n.mode=wp);break;case T8:if(l===0)break e;i[o++]=n.length,l--,n.mode=wp;break;case $2:if(n.wrap){for(;u<32;){if(s===0)break e;s--,c|=r[a++]<<u,u+=8}if(h-=l,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?Tt(n.check,i,h,o-h):of(n.check,i,h,o-h)),h=l,n.wrap&4&&(n.flags?c:F8(c))!==n.check){e.msg="incorrect data check",n.mode=et;break}c=0,u=0}n.mode=I8;case I8:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.wrap&4&&c!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=et;break}c=0,u=0}n.mode=R8;case R8:D=WK;break e;case et:D=s8;break e;case D8:return l8;case B8:default:return Un}return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<et&&(n.mode<$2||t!==o8))&&z8(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):of(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===fi?128:0)+(n.mode===vp||n.mode===U2?256:0),(f===0&&h===0||t===o8)&&D===Ho&&(D=ZK),D},rJ=e=>{if(Go(e))return Un;let t=e.state;return t.window&&(t.window=null),e.state=null,Ho},iJ=(e,t)=>{if(Go(e))return Un;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,Ho):Un},aJ=(e,t)=>{const n=t.length;let r,i,a;return Go(e)||(r=e.state,r.wrap!==0&&r.mode!==yp)?Un:r.mode===yp&&(i=1,i=of(i,t,n,0),i!==r.check)?s8:(a=z8(e,t,n,n),a?(r.mode=D8,l8):(r.havedict=1,Ho))};var oJ=P8,sJ=O8,lJ=M8,cJ=eJ,uJ=L8,fJ=nJ,hJ=rJ,dJ=iJ,pJ=aJ,gJ="pako inflate (from Nodeca project)",hi={inflateReset:oJ,inflateReset2:sJ,inflateResetKeep:lJ,inflateInit:cJ,inflateInit2:uJ,inflate:fJ,inflateEnd:hJ,inflateGetHeader:dJ,inflateSetDictionary:pJ,inflateInfo:gJ};function mJ(){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 bJ=mJ;const U8=Object.prototype.toString,{Z_NO_FLUSH:yJ,Z_FINISH:vJ,Z_OK:mf,Z_STREAM_END:V2,Z_NEED_DICT:j2,Z_STREAM_ERROR:wJ,Z_DATA_ERROR:$8,Z_MEM_ERROR:xJ}=sf;function bf(e){this.options=dp.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 Kk,this.strm.avail_out=0;let n=hi.inflateInit2(this.strm,t.windowBits);if(n!==mf)throw new Error(al[n]);if(this.header=new bJ,hi.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=pf.string2buf(t.dictionary):U8.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=hi.inflateSetDictionary(this.strm,t.dictionary),n!==mf)))throw new Error(al[n])}bf.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?vJ:yJ,U8.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=hi.inflate(n,o),a===j2&&i&&(a=hi.inflateSetDictionary(n,i),a===mf?a=hi.inflate(n,o):a===$8&&(a=j2));n.avail_in>0&&a===V2&&n.state.wrap>0&&e[n.next_in]!==0;)hi.inflateReset(n),a=hi.inflate(n,o);switch(a){case wJ:case $8:case j2:case xJ:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===V2))if(this.options.to==="string"){let l=pf.utf8border(n.output,n.next_out),c=n.next_out-l,u=pf.buf2string(n.output,l);n.next_out=c,n.avail_out=r-c,c&&n.output.set(n.output.subarray(l,l+c),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===mf&&s===0)){if(a===V2)return a=hi.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},bf.prototype.onData=function(e){this.chunks.push(e)},bf.prototype.onEnd=function(e){e===mf&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=dp.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function q2(e,t){const n=new bf(t);if(n.push(e),n.err)throw n.msg||al[n.err];return n.result}function AJ(e,t){return t=t||{},t.raw=!0,q2(e,t)}var EJ=bf,SJ=q2,_J=AJ,CJ=q2,kJ=sf,TJ={Inflate:EJ,inflate:SJ,inflateRaw:_J,ungzip:CJ,constants:kJ};const{Inflate:Lne,inflate:Nne,inflateRaw:IJ,ungzip:zne}=TJ;var RJ=IJ;function DJ(e){return RJ(e.subarray(2))}let BJ=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function FJ(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 xp(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new BJ("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const MJ=1,PJ=2,OJ=3;function W2(e,t,n,r){return e<r&&t>=n}function LJ(e){const t=e?"big":"little",n=new Oe().endianess(t).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),r=new Oe().endianess(t).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:new Oe().endianess(t).array("blocksToFetch",{length:"cnt",type:new Oe().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:new Oe().array("recurOffsets",{length:"cnt",type:new Oe().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),i=new Oe().endianess(t).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:new Oe().endianess(t).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:{[OJ]:new Oe().array("items",{length:"itemCount",type:new Oe().floatle("score")}),[PJ]:new Oe().array("items",{length:"itemCount",type:new Oe().endianess(t).int32("start").floatle("score")}),[MJ]:new Oe().array("items",{length:"itemCount",type:new Oe().endianess(t).int32("start").int32("end").floatle("score")})}}),bigBedParser:i,summaryParser:n,leafParser:r}}class H8{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 sp({cache:new lp({maxSize:1e3}),fill:async(l,c)=>{const u=Number(l.length),f=Number(l.offset),{buffer:h}=await this.bbi.read(Ae.Buffer.alloc(u),0,u,f,{signal:c});return h}}),!(r>=0))throw new Error("invalid cirTreeOffset!");const s=LJ(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}async readWigData(t,n,r,i,a){try{const{refsByName:o,bbi:s,cirTreeOffset:l,isBigEndian:c}=this,u=o[t];u===void 0&&i.complete();const f={chrId:u,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=s.read(Ae.Buffer.alloc(48),0,48,Number(l),a));const{buffer:h}=await this.cirTreePromise,d=c?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],g=0;const b=(x,E,_)=>{try{const T=x.subarray(E),D=this.leafParser.parse(T);if(D.blocksToFetch&&(p=p.concat(D.blocksToFetch.filter(P=>y(P)).map(P=>({offset:P.blockOffset,length:P.blockSize})))),D.recurOffsets){const P=D.recurOffsets.filter(G=>y(G)).map(G=>Number(G.blockOffset));P.length>0&&A(P,_+1)}}catch(T){i.error(T)}},y=x=>{const{startChrom:E,startBase:_,endChrom:T,endBase:D}=x;return(E<u||E===u&&_<=r)&&(T>u||T===u&&D>=n)},w=async(x,E,_)=>{try{const T=E.max()-E.min(),D=E.min(),P=await this.featureCache.get(`${T}_${D}`,{length:T,offset:D},a==null?void 0:a.signal);for(const G of x)E.contains(G)&&(b(P,G-D,_),g-=1,g===0&&this.readFeatures(i,p,{...a,request:f}))}catch(T){i.error(T)}},A=(x,E)=>{try{g+=x.length;const _=4+Number(d)*32;let T=new ha(x[0],x[0]+_);for(let D=1;D<x.length;D+=1){const P=new ha(x[D],x[D]+_);T=T.union(P)}T.getRanges().map(D=>w(x,D,E))}catch(_){i.error(_)}};return A([Number(l)+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 l=o.getUint32(a,!0);a+=4;const c=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&&W2(l,c,r.start,r.end))&&i.push({start:l,end:c,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=>W2(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 l=a.getUint32(o,!0);o+=4;const c=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+c}}break}case 3:{for(let d=0;d<f;d++){const p=a.getFloat32(o,!0);o+=4;const g=s+d*l;h[d]={score:p,start:g,end:g+c}}break}}return r?h.filter(d=>W2(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,l=FJ(n);xp(o),await Promise.all(l.map(async c=>{xp(o);const{length:u,offset:f}=c,h=await this.featureCache.get(`${u}_${f}`,c,o);for(const d of c.blocks){xp(o);let p=Number(d.offset)-Number(c.offset),g=h;switch(a&&(g=DJ(h.subarray(p)),p=0),xp(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 Y2=function(e,t){return Y2=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])},Y2(e,t)};function Z2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Y2(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function NJ(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{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}function G8(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(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function yf(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 Q2(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 X2(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 hl(e){return this instanceof hl?(this.v=e,this):new hl(e)}function zJ(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{l(r[h](d))}catch(p){f(a[0][3],p)}}function l(h){h.value instanceof hl?Promise.resolve(h.value.v).then(c,u):f(a[0][2],h)}function c(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 UJ(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 yf=="function"?yf(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,l){o=e[a](o),i(s,l,o.done,o.value)})}}function i(a,o,s,l){Promise.resolve(l).then(function(c){a({value:c,done:s})},o)}}typeof SuppressedError=="function"&&SuppressedError;function wt(e){return typeof e=="function"}function V8(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 K2=V8(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
3349
+ */(function(e){const t=P0,n=By,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 S=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(S,m),S.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(S){if(S>i)throw new RangeError('The value "'+S+'" is invalid for option "size"');const m=new Uint8Array(S);return Object.setPrototypeOf(m,s.prototype),m}function s(S,m,v){if(typeof S=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(S)}return l(S,m,v)}s.poolSize=8192;function l(S,m,v){if(typeof S=="string")return h(S,m);if(ArrayBuffer.isView(S))return p(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(Vt(S,ArrayBuffer)||S&&Vt(S.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Vt(S,SharedArrayBuffer)||S&&Vt(S.buffer,SharedArrayBuffer)))return g(S,m,v);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const R=S.valueOf&&S.valueOf();if(R!=null&&R!==S)return s.from(R,m,v);const M=b(S);if(M)return M;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return s.from(S[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 S)}s.from=function(S,m,v){return l(S,m,v)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function u(S,m,v){return c(S),S<=0?o(S):m!==void 0?typeof v=="string"?o(S).fill(m,v):o(S).fill(m):o(S)}s.alloc=function(S,m,v){return u(S,m,v)};function f(S){return c(S),o(S<0?0:y(S)|0)}s.allocUnsafe=function(S){return f(S)},s.allocUnsafeSlow=function(S){return f(S)};function h(S,m){if((typeof m!="string"||m==="")&&(m="utf8"),!s.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const v=A(S,m)|0;let R=o(v);const M=R.write(S,m);return M!==v&&(R=R.slice(0,M)),R}function d(S){const m=S.length<0?0:y(S.length)|0,v=o(m);for(let R=0;R<m;R+=1)v[R]=S[R]&255;return v}function p(S){if(Vt(S,Uint8Array)){const m=new Uint8Array(S);return g(m.buffer,m.byteOffset,m.byteLength)}return d(S)}function g(S,m,v){if(m<0||S.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(S.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(S):v===void 0?R=new Uint8Array(S,m):R=new Uint8Array(S,m,v),Object.setPrototypeOf(R,s.prototype),R}function b(S){if(s.isBuffer(S)){const m=y(S.length)|0,v=o(m);return v.length===0||S.copy(v,0,0,m),v}if(S.length!==void 0)return typeof S.length!="number"||xi(S.length)?o(0):d(S);if(S.type==="Buffer"&&Array.isArray(S.data))return d(S.data)}function y(S){if(S>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return S|0}function w(S){return+S!=S&&(S=0),s.alloc(+S)}s.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==s.prototype},s.compare=function(m,v){if(Vt(m,Uint8Array)&&(m=s.from(m,m.offset,m.byteLength)),Vt(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,M=v.length;for(let z=0,W=Math.min(R,M);z<W;++z)if(m[z]!==v[z]){R=m[z],M=v[z];break}return R<M?-1:M<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 M=s.allocUnsafe(v);let z=0;for(R=0;R<m.length;++R){let W=m[R];if(Vt(W,Uint8Array))z+W.length>M.length?(s.isBuffer(W)||(W=s.from(W)),W.copy(M,z)):Uint8Array.prototype.set.call(M,W,z);else if(s.isBuffer(W))W.copy(M,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=W.length}return M};function A(S,m){if(s.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||Vt(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const v=S.length,R=arguments.length>2&&arguments[2]===!0;if(!R&&v===0)return 0;let M=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return me(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return ka(S).length;default:if(M)return R?-1:me(S).length;m=(""+m).toLowerCase(),M=!0}}s.byteLength=A;function x(S,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(S||(S="utf8");;)switch(S){case"hex":return rt(this,m,v);case"utf8":case"utf-8":return ne(this,m,v);case"ascii":return xe(this,m,v);case"latin1":case"binary":return nt(this,m,v);case"base64":return ue(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: "+S);S=(S+"").toLowerCase(),R=!0}}s.prototype._isBuffer=!0;function E(S,m,v){const R=S[m];S[m]=S[v],S[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)E(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)E(this,v,v+3),E(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)E(this,v,v+7),E(this,v+1,v+6),E(this,v+2,v+5),E(this,v+3,v+4);return this},s.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?ne(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,M,z){if(Vt(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),M===void 0&&(M=0),z===void 0&&(z=this.length),v<0||R>m.length||M<0||z>this.length)throw new RangeError("out of range index");if(M>=z&&v>=R)return 0;if(M>=z)return-1;if(v>=R)return 1;if(v>>>=0,R>>>=0,M>>>=0,z>>>=0,this===m)return 0;let W=z-M,be=R-v;const Qe=Math.min(W,be),He=this.slice(M,z),it=m.slice(v,R);for(let Fe=0;Fe<Qe;++Fe)if(He[Fe]!==it[Fe]){W=He[Fe],be=it[Fe];break}return W<be?-1:be<W?1:0};function _(S,m,v,R,M){if(S.length===0)return-1;if(typeof v=="string"?(R=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,xi(v)&&(v=M?0:S.length-1),v<0&&(v=S.length+v),v>=S.length){if(M)return-1;v=S.length-1}else if(v<0)if(M)v=0;else return-1;if(typeof m=="string"&&(m=s.from(m,R)),s.isBuffer(m))return m.length===0?-1:T(S,m,v,R,M);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?M?Uint8Array.prototype.indexOf.call(S,m,v):Uint8Array.prototype.lastIndexOf.call(S,m,v):T(S,[m],v,R,M);throw new TypeError("val must be string, number or Buffer")}function T(S,m,v,R,M){let z=1,W=S.length,be=m.length;if(R!==void 0&&(R=String(R).toLowerCase(),R==="ucs2"||R==="ucs-2"||R==="utf16le"||R==="utf-16le")){if(S.length<2||m.length<2)return-1;z=2,W/=2,be/=2,v/=2}function Qe(it,Fe){return z===1?it[Fe]:it.readUInt16BE(Fe*z)}let He;if(M){let it=-1;for(He=v;He<W;He++)if(Qe(S,He)===Qe(m,it===-1?0:He-it)){if(it===-1&&(it=He),He-it+1===be)return it*z}else it!==-1&&(He-=He-it),it=-1}else for(v+be>W&&(v=W-be),He=v;He>=0;He--){let it=!0;for(let Fe=0;Fe<be;Fe++)if(Qe(S,He+Fe)!==Qe(m,Fe)){it=!1;break}if(it)return He}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(S,m,v,R){v=Number(v)||0;const M=S.length-v;R?(R=Number(R),R>M&&(R=M)):R=M;const z=m.length;R>z/2&&(R=z/2);let W;for(W=0;W<R;++W){const be=parseInt(m.substr(W*2,2),16);if(xi(be))return W;S[v+W]=be}return W}function P(S,m,v,R){return Ta(me(m,S.length-v),S,v,R)}function G(S,m,v,R){return Ta(un(m),S,v,R)}function N(S,m,v,R){return Ta(ka(m),S,v,R)}function oe(S,m,v,R){return Ta(Ca(m,S.length-v),S,v,R)}s.prototype.write=function(m,v,R,M){if(v===void 0)M="utf8",R=this.length,v=0;else if(R===void 0&&typeof v=="string")M=v,R=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(R)?(R=R>>>0,M===void 0&&(M="utf8")):(M=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");M||(M="utf8");let W=!1;for(;;)switch(M){case"hex":return D(this,m,v,R);case"utf8":case"utf-8":return P(this,m,v,R);case"ascii":case"latin1":case"binary":return G(this,m,v,R);case"base64":return N(this,m,v,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,m,v,R);default:if(W)throw new TypeError("Unknown encoding: "+M);M=(""+M).toLowerCase(),W=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ue(S,m,v){return m===0&&v===S.length?t.fromByteArray(S):t.fromByteArray(S.slice(m,v))}function ne(S,m,v){v=Math.min(S.length,v);const R=[];let M=m;for(;M<v;){const z=S[M];let W=null,be=z>239?4:z>223?3:z>191?2:1;if(M+be<=v){let Qe,He,it,Fe;switch(be){case 1:z<128&&(W=z);break;case 2:Qe=S[M+1],(Qe&192)===128&&(Fe=(z&31)<<6|Qe&63,Fe>127&&(W=Fe));break;case 3:Qe=S[M+1],He=S[M+2],(Qe&192)===128&&(He&192)===128&&(Fe=(z&15)<<12|(Qe&63)<<6|He&63,Fe>2047&&(Fe<55296||Fe>57343)&&(W=Fe));break;case 4:Qe=S[M+1],He=S[M+2],it=S[M+3],(Qe&192)===128&&(He&192)===128&&(it&192)===128&&(Fe=(z&15)<<18|(Qe&63)<<12|(He&63)<<6|it&63,Fe>65535&&Fe<1114112&&(W=Fe))}}W===null?(W=65533,be=1):W>65535&&(W-=65536,R.push(W>>>10&1023|55296),W=56320|W&1023),R.push(W),M+=be}return Re(R)}const pe=4096;function Re(S){const m=S.length;if(m<=pe)return String.fromCharCode.apply(String,S);let v="",R=0;for(;R<m;)v+=String.fromCharCode.apply(String,S.slice(R,R+=pe));return v}function xe(S,m,v){let R="";v=Math.min(S.length,v);for(let M=m;M<v;++M)R+=String.fromCharCode(S[M]&127);return R}function nt(S,m,v){let R="";v=Math.min(S.length,v);for(let M=m;M<v;++M)R+=String.fromCharCode(S[M]);return R}function rt(S,m,v){const R=S.length;(!m||m<0)&&(m=0),(!v||v<0||v>R)&&(v=R);let M="";for(let z=m;z<v;++z)M+=Ia[S[z]];return M}function ut(S,m,v){const R=S.slice(m,v);let M="";for(let z=0;z<R.length-1;z+=2)M+=String.fromCharCode(R[z]+R[z+1]*256);return M}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 M=this.subarray(m,v);return Object.setPrototypeOf(M,s.prototype),M};function De(S,m,v){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+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||De(m,v,this.length);let M=this[m],z=1,W=0;for(;++W<v&&(z*=256);)M+=this[m+W]*z;return M},s.prototype.readUintBE=s.prototype.readUIntBE=function(m,v,R){m=m>>>0,v=v>>>0,R||De(m,v,this.length);let M=this[m+--v],z=1;for(;v>0&&(z*=256);)M+=this[m+--v]*z;return M},s.prototype.readUint8=s.prototype.readUInt8=function(m,v){return m=m>>>0,v||De(m,1,this.length),this[m]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(m,v){return m=m>>>0,v||De(m,2,this.length),this[m]|this[m+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(m,v){return m=m>>>0,v||De(m,2,this.length),this[m]<<8|this[m+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(m,v){return m=m>>>0,v||De(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||De(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,j(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Q(m,this.length-8);const M=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(M)+(BigInt(z)<<BigInt(32))}),s.prototype.readBigUInt64BE=fn(function(m){m=m>>>0,j(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Q(m,this.length-8);const M=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(M)<<BigInt(32))+BigInt(z)}),s.prototype.readIntLE=function(m,v,R){m=m>>>0,v=v>>>0,R||De(m,v,this.length);let M=this[m],z=1,W=0;for(;++W<v&&(z*=256);)M+=this[m+W]*z;return z*=128,M>=z&&(M-=Math.pow(2,8*v)),M},s.prototype.readIntBE=function(m,v,R){m=m>>>0,v=v>>>0,R||De(m,v,this.length);let M=v,z=1,W=this[m+--M];for(;M>0&&(z*=256);)W+=this[m+--M]*z;return z*=128,W>=z&&(W-=Math.pow(2,8*v)),W},s.prototype.readInt8=function(m,v){return m=m>>>0,v||De(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},s.prototype.readInt16LE=function(m,v){m=m>>>0,v||De(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||De(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||De(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||De(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,j(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Q(m,this.length-8);const M=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(R<<24);return(BigInt(M)<<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,j(m,"offset");const v=this[m],R=this[m+7];(v===void 0||R===void 0)&&Q(m,this.length-8);const M=(v<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(M)<<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||De(m,4,this.length),n.read(this,m,!0,23,4)},s.prototype.readFloatBE=function(m,v){return m=m>>>0,v||De(m,4,this.length),n.read(this,m,!1,23,4)},s.prototype.readDoubleLE=function(m,v){return m=m>>>0,v||De(m,8,this.length),n.read(this,m,!0,52,8)},s.prototype.readDoubleBE=function(m,v){return m=m>>>0,v||De(m,8,this.length),n.read(this,m,!1,52,8)};function Be(S,m,v,R,M,z){if(!s.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>M||m<z)throw new RangeError('"value" argument is out of bounds');if(v+R>S.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(m,v,R,M){if(m=+m,v=v>>>0,R=R>>>0,!M){const be=Math.pow(2,8*R)-1;Be(this,m,v,R,be,0)}let z=1,W=0;for(this[v]=m&255;++W<R&&(z*=256);)this[v+W]=m/z&255;return v+R},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(m,v,R,M){if(m=+m,v=v>>>0,R=R>>>0,!M){const be=Math.pow(2,8*R)-1;Be(this,m,v,R,be,0)}let z=R-1,W=1;for(this[v+z]=m&255;--z>=0&&(W*=256);)this[v+z]=m/W&255;return v+R},s.prototype.writeUint8=s.prototype.writeUInt8=function(m,v,R){return m=+m,v=v>>>0,R||Be(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||Be(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||Be(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||Be(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||Be(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(S,m,v,R,M){C(m,R,M,S,v,7);let z=Number(m&BigInt(4294967295));S[v++]=z,z=z>>8,S[v++]=z,z=z>>8,S[v++]=z,z=z>>8,S[v++]=z;let W=Number(m>>BigInt(32)&BigInt(4294967295));return S[v++]=W,W=W>>8,S[v++]=W,W=W>>8,S[v++]=W,W=W>>8,S[v++]=W,v}function cn(S,m,v,R,M){C(m,R,M,S,v,7);let z=Number(m&BigInt(4294967295));S[v+7]=z,z=z>>8,S[v+6]=z,z=z>>8,S[v+5]=z,z=z>>8,S[v+4]=z;let W=Number(m>>BigInt(32)&BigInt(4294967295));return S[v+3]=W,W=W>>8,S[v+2]=W,W=W>>8,S[v+1]=W,W=W>>8,S[v]=W,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 cn(this,m,v,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(m,v,R,M){if(m=+m,v=v>>>0,!M){const Qe=Math.pow(2,8*R-1);Be(this,m,v,R,Qe-1,-Qe)}let z=0,W=1,be=0;for(this[v]=m&255;++z<R&&(W*=256);)m<0&&be===0&&this[v+z-1]!==0&&(be=1),this[v+z]=(m/W>>0)-be&255;return v+R},s.prototype.writeIntBE=function(m,v,R,M){if(m=+m,v=v>>>0,!M){const Qe=Math.pow(2,8*R-1);Be(this,m,v,R,Qe-1,-Qe)}let z=R-1,W=1,be=0;for(this[v+z]=m&255;--z>=0&&(W*=256);)m<0&&be===0&&this[v+z+1]!==0&&(be=1),this[v+z]=(m/W>>0)-be&255;return v+R},s.prototype.writeInt8=function(m,v,R){return m=+m,v=v>>>0,R||Be(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||Be(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||Be(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||Be(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||Be(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 cn(this,m,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function je(S,m,v,R,M,z){if(v+R>S.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function L(S,m,v,R,M){return m=+m,v=v>>>0,M||je(S,m,v,4),n.write(S,m,v,R,23,4),v+4}s.prototype.writeFloatLE=function(m,v,R){return L(this,m,v,!0,R)},s.prototype.writeFloatBE=function(m,v,R){return L(this,m,v,!1,R)};function O(S,m,v,R,M){return m=+m,v=v>>>0,M||je(S,m,v,8),n.write(S,m,v,R,52,8),v+8}s.prototype.writeDoubleLE=function(m,v,R){return O(this,m,v,!0,R)},s.prototype.writeDoubleBE=function(m,v,R){return O(this,m,v,!1,R)},s.prototype.copy=function(m,v,R,M){if(!s.isBuffer(m))throw new TypeError("argument should be a Buffer");if(R||(R=0),!M&&M!==0&&(M=this.length),v>=m.length&&(v=m.length),v||(v=0),M>0&&M<R&&(M=R),M===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(M<0)throw new RangeError("sourceEnd out of bounds");M>this.length&&(M=this.length),m.length-v<M-R&&(M=m.length-v+R);const z=M-R;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,R,M):Uint8Array.prototype.set.call(m,this.subarray(R,M),v),z},s.prototype.fill=function(m,v,R,M){if(typeof m=="string"){if(typeof v=="string"?(M=v,v=0,R=this.length):typeof R=="string"&&(M=R,R=this.length),M!==void 0&&typeof M!="string")throw new TypeError("encoding must be a string");if(typeof M=="string"&&!s.isEncoding(M))throw new TypeError("Unknown encoding: "+M);if(m.length===1){const W=m.charCodeAt(0);(M==="utf8"&&W<128||M==="latin1")&&(m=W)}}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 W=s.isBuffer(m)?m:s.from(m,M),be=W.length;if(be===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(z=0;z<R-v;++z)this[z+v]=W[z%be]}return this};const Z={};function q(S,m,v){Z[S]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(M){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:M,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}q("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),q("ERR_INVALID_ARG_TYPE",function(S,m){return`The "${S}" argument must be of type number. Received type ${typeof m}`},TypeError),q("ERR_OUT_OF_RANGE",function(S,m,v){let R=`The value of "${S}" is out of range.`,M=v;return Number.isInteger(v)&&Math.abs(v)>2**32?M=X(String(v)):typeof v=="bigint"&&(M=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(M=X(M)),M+="n"),R+=` It must be ${m}. Received ${M}`,R},RangeError);function X(S){let m="",v=S.length;const R=S[0]==="-"?1:0;for(;v>=R+4;v-=3)m=`_${S.slice(v-3,v)}${m}`;return`${S.slice(0,v)}${m}`}function I(S,m,v){j(m,"offset"),(S[m]===void 0||S[m+v]===void 0)&&Q(m,S.length-(v+1))}function C(S,m,v,R,M,z){if(S>v||S<m){const W=typeof m=="bigint"?"n":"";let be;throw z>3?m===0||m===BigInt(0)?be=`>= 0${W} and < 2${W} ** ${(z+1)*8}${W}`:be=`>= -(2${W} ** ${(z+1)*8-1}${W}) and < 2 ** ${(z+1)*8-1}${W}`:be=`>= ${m}${W} and <= ${v}${W}`,new Z.ERR_OUT_OF_RANGE("value",be,S)}I(R,M,z)}function j(S,m){if(typeof S!="number")throw new Z.ERR_INVALID_ARG_TYPE(m,"number",S)}function Q(S,m,v){throw Math.floor(S)!==S?(j(S,v),new Z.ERR_OUT_OF_RANGE(v||"offset","an integer",S)):m<0?new Z.ERR_BUFFER_OUT_OF_BOUNDS:new Z.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${m}`,S)}const ge=/[^+/0-9A-Za-z-_]/g;function se(S){if(S=S.split("=")[0],S=S.trim().replace(ge,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function me(S,m){m=m||1/0;let v;const R=S.length;let M=null;const z=[];for(let W=0;W<R;++W){if(v=S.charCodeAt(W),v>55295&&v<57344){if(!M){if(v>56319){(m-=3)>-1&&z.push(239,191,189);continue}else if(W+1===R){(m-=3)>-1&&z.push(239,191,189);continue}M=v;continue}if(v<56320){(m-=3)>-1&&z.push(239,191,189),M=v;continue}v=(M-55296<<10|v-56320)+65536}else M&&(m-=3)>-1&&z.push(239,191,189);if(M=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(S){const m=[];for(let v=0;v<S.length;++v)m.push(S.charCodeAt(v)&255);return m}function Ca(S,m){let v,R,M;const z=[];for(let W=0;W<S.length&&!((m-=2)<0);++W)v=S.charCodeAt(W),R=v>>8,M=v%256,z.push(M),z.push(R);return z}function ka(S){return t.toByteArray(se(S))}function Ta(S,m,v,R){let M;for(M=0;M<R&&!(M+v>=m.length||M>=S.length);++M)m[M+v]=S[M];return M}function Vt(S,m){return S instanceof m||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===m.name}function xi(S){return S!==S}const Ia=function(){const S="0123456789abcdef",m=new Array(256);for(let v=0;v<16;++v){const R=v*16;for(let M=0;M<16;++M)m[R+M]=S[v]+S[M]}return m}();function fn(S){return typeof BigInt>"u"?Lr:S}function Lr(){throw new Error("BigInt not supported")}})(Ae);const E6=ke({__proto__:null,default:Bu(Ae)},[Ae]),kt={},PY=Object.freeze(Object.defineProperty({__proto__:null,default:kt},Symbol.toStringTag,{value:"Module"})),Fy=typeof window<"u"?window:typeof self<"u"?self:{fetch:void 0};class So{async getBufferFromResponse(t){if(typeof t.buffer=="function")return t.buffer();if(typeof t.arrayBuffer=="function"){const n=await t.arrayBuffer();return Ae.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||Fy.fetch&&Fy.fetch.bind(Fy);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:l={}}=a;r<1/0?o.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(o.range=`bytes=${i}-`);const c={...this.baseOverrides,...l,headers:{...o,...l.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s},u=await this.fetch(this.url,c);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},l=await this.fetch(this.url,s);if(!l)throw new Error("generic-filehandle failed to fetch");if(l.status!==200)throw Object.assign(new Error(`HTTP ${l.status} fetching ${this.url}`),{status:l.status});if(n==="utf8")return l.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(l)}async stat(){if(!this._stat){const t=Ae.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 S6(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 OY(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 LY{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 S6(this.blob.slice(a,o)),l=Ae.Buffer.from(s);return{bytesRead:l.copy(t,n),buffer:l}}async readFile(t){let n;if(typeof t=="string"?n=t:n=t&&t.encoding,n==="utf8")return OY(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await S6(this.blob);return Ae.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function _6(e,t={}){return new So(e,t)}function NY(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return _6(e,r);if(t!==void 0)return new kt(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const Mu=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:LY,LocalFile:kt,RemoteFile:So,fromUrl:_6,open:NY},Symbol.toStringTag,{value:"Module"}));var si={};(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 l in s)n(s,l)&&(a[l]=s[l])}}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,l,c){if(o.subarray&&a.subarray){a.set(o.subarray(s,s+l),c);return}for(var u=0;u<l;u++)a[c+u]=o[s+u]},flattenChunks:function(a){var o,s,l,c,u,f;for(l=0,o=0,s=a.length;o<s;o++)l+=a[o].length;for(f=new Uint8Array(l),c=0,o=0,s=a.length;o<s;o++)u=a[o],f.set(u,c),c+=u.length;return f}},i={arraySet:function(a,o,s,l,c){for(var u=0;u<l;u++)a[c+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)})(si);var Pu={},Tr={},js={},zY=si,UY=4,C6=0,k6=1,$Y=2;function qs(e){for(var t=e.length;--t>=0;)e[t]=0}var HY=0,T6=1,GY=2,VY=3,jY=258,My=29,Ou=256,Lu=Ou+1+My,Ws=30,Py=19,I6=2*Lu+1,_o=15,Oy=16,qY=7,Ly=256,R6=16,D6=17,B6=18,Ny=[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],O0=[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],WY=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],F6=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],YY=512,li=new Array((Lu+2)*2);qs(li);var Nu=new Array(Ws*2);qs(Nu);var zu=new Array(YY);qs(zu);var Uu=new Array(jY-VY+1);qs(Uu);var zy=new Array(My);qs(zy);var L0=new Array(Ws);qs(L0);function Uy(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 M6,P6,O6;function $y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function L6(e){return e<256?zu[e]:zu[256+(e>>>7)]}function $u(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>Oy-n?(e.bi_buf|=t<<e.bi_valid&65535,$u(e,e.bi_buf),e.bi_buf=t>>Oy-e.bi_valid,e.bi_valid+=n-Oy):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Ir(e,t,n){an(e,n[t*2],n[t*2+1])}function N6(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function ZY(e){e.bi_valid===16?($u(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 QY(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,l=t.stat_desc.max_length,c,u,f,h,d,p,g=0;for(h=0;h<=_o;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<I6;c++)u=e.heap[c],h=n[n[u*2+1]*2+1]+1,h>l&&(h=l,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=l-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[l]--,g-=2}while(g>0);for(h=l;h!==0;h--)for(u=e.bl_count[h];u!==0;)f=e.heap[--c],!(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 z6(e,t,n){var r=new Array(_o+1),i=0,a,o;for(a=1;a<=_o;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]=N6(r[s]++,s))}}function XY(){var e,t,n,r,i,a=new Array(_o+1);for(n=0,r=0;r<My-1;r++)for(zy[r]=n,e=0;e<1<<Ny[r];e++)Uu[n++]=r;for(Uu[n-1]=r,i=0,r=0;r<16;r++)for(L0[r]=i,e=0;e<1<<O0[r];e++)zu[i++]=r;for(i>>=7;r<Ws;r++)for(L0[r]=i<<7,e=0;e<1<<O0[r]-7;e++)zu[256+i++]=r;for(t=0;t<=_o;t++)a[t]=0;for(e=0;e<=143;)li[e*2+1]=8,e++,a[8]++;for(;e<=255;)li[e*2+1]=9,e++,a[9]++;for(;e<=279;)li[e*2+1]=7,e++,a[7]++;for(;e<=287;)li[e*2+1]=8,e++,a[8]++;for(z6(li,Lu+1,a),e=0;e<Ws;e++)Nu[e*2+1]=5,Nu[e*2]=N6(e,5);M6=new Uy(li,Ny,Ou+1,Lu,_o),P6=new Uy(Nu,O0,0,Ws,_o),O6=new Uy(new Array(0),WY,0,Py,qY)}function U6(e){var t;for(t=0;t<Lu;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ws;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Py;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Ly*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function $6(e){e.bi_valid>8?$u(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 KY(e,t,n,r){$6(e),r&&($u(e,n),$u(e,~n)),zY.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function H6(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 Hy(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&H6(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!H6(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function G6(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?Ir(e,i,t):(o=Uu[i],Ir(e,o+Ou+1,t),s=Ny[o],s!==0&&(i-=zy[o],an(e,i,s)),r--,o=L6(r),Ir(e,o,n),s=O0[o],s!==0&&(r-=L0[o],an(e,r,s)));while(a<e.last_lit);Ir(e,Ly,t)}function Gy(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,l=-1,c;for(e.heap_len=0,e.heap_max=I6,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=l=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,n[c*2]=1,e.depth[c]=0,e.opt_len--,i&&(e.static_len-=r[c*2+1]);for(t.max_code=l,o=e.heap_len>>1;o>=1;o--)Hy(e,n,o);c=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Hy(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[c*2]=n[o*2]+n[s*2],e.depth[c]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=c,e.heap[1]=c++,Hy(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],QY(e,t),z6(n,l,e.bl_count)}function V6(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,l=7,c=4;for(o===0&&(l=138,c=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<l&&a===o)&&(s<c?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[R6*2]++):s<=10?e.bl_tree[D6*2]++:e.bl_tree[B6*2]++,s=0,i=a,o===0?(l=138,c=3):a===o?(l=6,c=3):(l=7,c=4))}function j6(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,l=7,c=4;for(o===0&&(l=138,c=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<l&&a===o)){if(s<c)do Ir(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Ir(e,a,e.bl_tree),s--),Ir(e,R6,e.bl_tree),an(e,s-3,2)):s<=10?(Ir(e,D6,e.bl_tree),an(e,s-3,3)):(Ir(e,B6,e.bl_tree),an(e,s-11,7));s=0,i=a,o===0?(l=138,c=3):a===o?(l=6,c=3):(l=7,c=4)}}function JY(e){var t;for(V6(e,e.dyn_ltree,e.l_desc.max_code),V6(e,e.dyn_dtree,e.d_desc.max_code),Gy(e,e.bl_desc),t=Py-1;t>=3&&e.bl_tree[F6[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function eZ(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[F6[i]*2+1],3);j6(e,e.dyn_ltree,t-1),j6(e,e.dyn_dtree,n-1)}function tZ(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return C6;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return k6;for(n=32;n<Ou;n++)if(e.dyn_ltree[n*2]!==0)return k6;return C6}var q6=!1;function nZ(e){q6||(XY(),q6=!0),e.l_desc=new $y(e.dyn_ltree,M6),e.d_desc=new $y(e.dyn_dtree,P6),e.bl_desc=new $y(e.bl_tree,O6),e.bi_buf=0,e.bi_valid=0,U6(e)}function W6(e,t,n,r){an(e,(HY<<1)+(r?1:0),3),KY(e,t,n,!0)}function rZ(e){an(e,T6<<1,3),Ir(e,Ly,li),ZY(e)}function iZ(e,t,n,r){var i,a,o=0;e.level>0?(e.strm.data_type===$Y&&(e.strm.data_type=tZ(e)),Gy(e,e.l_desc),Gy(e,e.d_desc),o=JY(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?W6(e,t,n,r):e.strategy===UY||a===i?(an(e,(T6<<1)+(r?1:0),3),G6(e,li,Nu)):(an(e,(GY<<1)+(r?1:0),3),eZ(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),G6(e,e.dyn_ltree,e.dyn_dtree)),U6(e),r&&$6(e)}function aZ(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[(Uu[n]+Ou+1)*2]++,e.dyn_dtree[L6(t)*2]++),e.last_lit===e.lit_bufsize-1}js._tr_init=nZ,js._tr_stored_block=W6,js._tr_flush_block=iZ,js._tr_tally=aZ,js._tr_align=rZ;function oZ(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 Y6=oZ;function sZ(){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 lZ=sZ();function cZ(e,t,n,r){var i=lZ,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=cZ,Vy={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"},Qt=si,Fn=js,Q6=Y6,ia=Z6,uZ=Vy,Co=0,fZ=1,hZ=3,aa=4,X6=5,Rr=0,K6=1,Mn=-2,dZ=-3,jy=-5,pZ=-1,gZ=1,N0=2,mZ=3,bZ=4,yZ=0,vZ=2,z0=8,wZ=9,xZ=15,AZ=8,EZ=29,SZ=256,qy=SZ+1+EZ,_Z=30,CZ=19,kZ=2*qy+1,TZ=15,ve=3,oa=258,ir=oa+ve+1,IZ=32,U0=42,Wy=69,$0=73,H0=91,G0=103,ko=113,Hu=666,vt=1,Gu=2,To=3,Ys=4,RZ=3;function sa(e,t){return e.msg=uZ[t],t}function J6(e){return(e<<1)-(e>4?9:0)}function la(e){for(var t=e.length;--t>=0;)e[t]=0}function ca(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Qt.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){Fn._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ca(e.strm)}function Ce(e,t){e.pending_buf[e.pending++]=t}function Vu(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function DZ(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Qt.arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=Q6(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ia(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function e5(e,t){var n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-ir?e.strstart-(e.w_size-ir):0,c=e.window,u=e.w_mask,f=e.prev,h=e.strstart+oa,d=c[r+o-1],p=c[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(c[i+o]!==p||c[i+o-1]!==d||c[i]!==c[r]||c[++i]!==c[r+1])){r+=2,i++;do;while(c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&r<h);if(a=oa-(h-r),r=h-oa,a>o){if(e.match_start=t,o=a,a>=s)break;d=c[r+o-1],p=c[r+o]}}while((t=f[t&u])>l&&--n!==0);return o<=e.lookahead?o:e.lookahead}function Io(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-ir)){Qt.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=DZ(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=ve)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+ve-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<ve)););}while(e.lookahead<ir&&e.strm.avail_in!==0)}function BZ(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Io(e),e.lookahead===0&&t===Co)return vt;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-ir&&(Pt(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===aa?(Pt(e,!0),e.strm.avail_out===0?To:Ys):(e.strstart>e.block_start&&(Pt(e,!1),e.strm.avail_out===0),vt)}function Yy(e,t){for(var n,r;;){if(e.lookahead<ir){if(Io(e),e.lookahead<ir&&t===Co)return vt;if(e.lookahead===0)break}if(n=0,e.lookahead>=ve&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ve-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-ir&&(e.match_length=e5(e,n)),e.match_length>=ve)if(r=Fn._tr_tally(e,e.strstart-e.match_start,e.match_length-ve),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ve){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ve-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=Fn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Pt(e,!1),e.strm.avail_out===0))return vt}return e.insert=e.strstart<ve-1?e.strstart:ve-1,t===aa?(Pt(e,!0),e.strm.avail_out===0?To:Ys):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?vt:Gu}function Zs(e,t){for(var n,r,i;;){if(e.lookahead<ir){if(Io(e),e.lookahead<ir&&t===Co)return vt;if(e.lookahead===0)break}if(n=0,e.lookahead>=ve&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ve-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=ve-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-ir&&(e.match_length=e5(e,n),e.match_length<=5&&(e.strategy===gZ||e.match_length===ve&&e.strstart-e.match_start>4096)&&(e.match_length=ve-1)),e.prev_length>=ve&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-ve,r=Fn._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-ve),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+ve-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=ve-1,e.strstart++,r&&(Pt(e,!1),e.strm.avail_out===0))return vt}else if(e.match_available){if(r=Fn._tr_tally(e,0,e.window[e.strstart-1]),r&&Pt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return vt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Fn._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<ve-1?e.strstart:ve-1,t===aa?(Pt(e,!0),e.strm.avail_out===0?To:Ys):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?vt:Gu}function FZ(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=oa){if(Io(e),e.lookahead<=oa&&t===Co)return vt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=ve&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+oa;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=oa-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ve?(n=Fn._tr_tally(e,1,e.match_length-ve),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Fn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Pt(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===aa?(Pt(e,!0),e.strm.avail_out===0?To:Ys):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?vt:Gu}function MZ(e,t){for(var n;;){if(e.lookahead===0&&(Io(e),e.lookahead===0)){if(t===Co)return vt;break}if(e.match_length=0,n=Fn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Pt(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===aa?(Pt(e,!0),e.strm.avail_out===0?To:Ys):e.last_lit&&(Pt(e,!1),e.strm.avail_out===0)?vt:Gu}function Dr(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 Qs;Qs=[new Dr(0,0,0,0,BZ),new Dr(4,4,8,4,Yy),new Dr(4,5,16,8,Yy),new Dr(4,6,32,32,Yy),new Dr(4,4,16,16,Zs),new Dr(8,16,32,32,Zs),new Dr(8,16,128,128,Zs),new Dr(8,32,128,256,Zs),new Dr(32,128,258,1024,Zs),new Dr(32,258,258,4096,Zs)];function PZ(e){e.window_size=2*e.w_size,la(e.head),e.max_lazy_match=Qs[e.level].max_lazy,e.good_match=Qs[e.level].good_length,e.nice_match=Qs[e.level].nice_length,e.max_chain_length=Qs[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ve-1,e.match_available=0,e.ins_h=0}function OZ(){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=z0,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 Qt.Buf16(kZ*2),this.dyn_dtree=new Qt.Buf16((2*_Z+1)*2),this.bl_tree=new Qt.Buf16((2*CZ+1)*2),la(this.dyn_ltree),la(this.dyn_dtree),la(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Qt.Buf16(TZ+1),this.heap=new Qt.Buf16(2*qy+1),la(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Qt.Buf16(2*qy+1),la(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 t5(e){var t;return!e||!e.state?sa(e,Mn):(e.total_in=e.total_out=0,e.data_type=vZ,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?U0:ko,e.adler=t.wrap===2?0:1,t.last_flush=Co,Fn._tr_init(t),Rr)}function n5(e){var t=t5(e);return t===Rr&&PZ(e.state),t}function LZ(e,t){return!e||!e.state||e.state.wrap!==2?Mn:(e.state.gzhead=t,Rr)}function r5(e,t,n,r,i,a){if(!e)return Mn;var o=1;if(t===pZ&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>wZ||n!==z0||r<8||r>15||t<0||t>9||a<0||a>bZ)return sa(e,Mn);r===8&&(r=9);var s=new OZ;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+ve-1)/ve),s.window=new Qt.Buf8(s.w_size*2),s.head=new Qt.Buf16(s.hash_size),s.prev=new Qt.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Qt.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,n5(e)}function NZ(e,t){return r5(e,t,z0,xZ,AZ,yZ)}function zZ(e,t){var n,r,i,a;if(!e||!e.state||t>X6||t<0)return e?sa(e,Mn):Mn;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===Hu&&t!==aa)return sa(e,e.avail_out===0?jy:Mn);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===U0)if(r.wrap===2)e.adler=0,Ce(r,31),Ce(r,139),Ce(r,8),r.gzhead?(Ce(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)),Ce(r,r.gzhead.time&255),Ce(r,r.gzhead.time>>8&255),Ce(r,r.gzhead.time>>16&255),Ce(r,r.gzhead.time>>24&255),Ce(r,r.level===9?2:r.strategy>=N0||r.level<2?4:0),Ce(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(Ce(r,r.gzhead.extra.length&255),Ce(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=ia(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Wy):(Ce(r,0),Ce(r,0),Ce(r,0),Ce(r,0),Ce(r,0),Ce(r,r.level===9?2:r.strategy>=N0||r.level<2?4:0),Ce(r,RZ),r.status=ko);else{var o=z0+(r.w_bits-8<<4)<<8,s=-1;r.strategy>=N0||r.level<2?s=0:r.level<6?s=1:r.level===6?s=2:s=3,o|=s<<6,r.strstart!==0&&(o|=IZ),o+=31-o%31,r.status=ko,Vu(r,o),r.strstart!==0&&(Vu(r,e.adler>>>16),Vu(r,e.adler&65535)),e.adler=1}if(r.status===Wy)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=ia(e.adler,r.pending_buf,r.pending-i,i)),ca(e),i=r.pending,r.pending===r.pending_buf_size));)Ce(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=ia(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=$0)}else r.status=$0;if(r.status===$0)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=ia(e.adler,r.pending_buf,r.pending-i,i)),ca(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,Ce(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=ia(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=H0)}else r.status=H0;if(r.status===H0)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=ia(e.adler,r.pending_buf,r.pending-i,i)),ca(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,Ce(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=ia(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=G0)}else r.status=G0;if(r.status===G0&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&ca(e),r.pending+2<=r.pending_buf_size&&(Ce(r,e.adler&255),Ce(r,e.adler>>8&255),e.adler=0,r.status=ko)):r.status=ko),r.pending!==0){if(ca(e),e.avail_out===0)return r.last_flush=-1,Rr}else if(e.avail_in===0&&J6(t)<=J6(n)&&t!==aa)return sa(e,jy);if(r.status===Hu&&e.avail_in!==0)return sa(e,jy);if(e.avail_in!==0||r.lookahead!==0||t!==Co&&r.status!==Hu){var l=r.strategy===N0?MZ(r,t):r.strategy===mZ?FZ(r,t):Qs[r.level].func(r,t);if((l===To||l===Ys)&&(r.status=Hu),l===vt||l===To)return e.avail_out===0&&(r.last_flush=-1),Rr;if(l===Gu&&(t===fZ?Fn._tr_align(r):t!==X6&&(Fn._tr_stored_block(r,0,0,!1),t===hZ&&(la(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),ca(e),e.avail_out===0))return r.last_flush=-1,Rr}return t!==aa?Rr:r.wrap<=0?K6:(r.wrap===2?(Ce(r,e.adler&255),Ce(r,e.adler>>8&255),Ce(r,e.adler>>16&255),Ce(r,e.adler>>24&255),Ce(r,e.total_in&255),Ce(r,e.total_in>>8&255),Ce(r,e.total_in>>16&255),Ce(r,e.total_in>>24&255)):(Vu(r,e.adler>>>16),Vu(r,e.adler&65535)),ca(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Rr:K6)}function UZ(e){var t;return!e||!e.state?Mn:(t=e.state.status,t!==U0&&t!==Wy&&t!==$0&&t!==H0&&t!==G0&&t!==ko&&t!==Hu?sa(e,Mn):(e.state=null,t===ko?sa(e,dZ):Rr))}function $Z(e,t){var n=t.length,r,i,a,o,s,l,c,u;if(!e||!e.state||(r=e.state,o=r.wrap,o===2||o===1&&r.status!==U0||r.lookahead))return Mn;for(o===1&&(e.adler=Q6(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(o===0&&(la(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new Qt.Buf8(r.w_size),Qt.arraySet(u,t,n-r.w_size,r.w_size,0),t=u,n=r.w_size),s=e.avail_in,l=e.next_in,c=e.input,e.avail_in=n,e.next_in=0,e.input=t,Io(r);r.lookahead>=ve;){i=r.strstart,a=r.lookahead-(ve-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+ve-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=ve-1,Io(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ve-1,r.match_available=0,e.next_in=l,e.input=c,e.avail_in=s,r.wrap=o,Rr}Tr.deflateInit=NZ,Tr.deflateInit2=r5,Tr.deflateReset=n5,Tr.deflateResetKeep=t5,Tr.deflateSetHeader=LZ,Tr.deflate=zZ,Tr.deflateEnd=UZ,Tr.deflateSetDictionary=$Z,Tr.deflateInfo="pako deflate (from Nodeca project)";var Ro={},V0=si,i5=!0,a5=!0;try{String.fromCharCode.apply(null,[0])}catch{i5=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a5=!1}for(var ju=new V0.Buf8(256),ua=0;ua<256;ua++)ju[ua]=ua>=252?6:ua>=248?5:ua>=240?4:ua>=224?3:ua>=192?2:1;ju[254]=ju[254]=1,Ro.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 V0.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 o5(e,t){if(t<65534&&(e.subarray&&a5||!e.subarray&&i5))return String.fromCharCode.apply(null,V0.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}Ro.buf2binstring=function(e){return o5(e,e.length)},Ro.binstring2buf=function(e){for(var t=new V0.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},Ro.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=ju[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 o5(s,r)},Ro.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+ju[e[n]]>t?n:t};function HZ(){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 s5=HZ,qu=Tr,Wu=si,Zy=Ro,Qy=Vy,GZ=s5,l5=Object.prototype.toString,VZ=0,Xy=4,Xs=0,c5=1,u5=2,jZ=-1,qZ=0,WZ=8;function Do(e){if(!(this instanceof Do))return new Do(e);this.options=Wu.assign({level:jZ,method:WZ,chunkSize:16384,windowBits:15,memLevel:8,strategy:qZ,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 GZ,this.strm.avail_out=0;var n=qu.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Xs)throw new Error(Qy[n]);if(t.header&&qu.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=Zy.string2buf(t.dictionary):l5.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=qu.deflateSetDictionary(this.strm,r),n!==Xs)throw new Error(Qy[n]);this._dict_set=!0}}Do.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?Xy:VZ,typeof e=="string"?n.input=Zy.string2buf(e):l5.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 Wu.Buf8(r),n.next_out=0,n.avail_out=r),i=qu.deflate(n,a),i!==c5&&i!==Xs)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(a===Xy||a===u5))&&(this.options.to==="string"?this.onData(Zy.buf2binstring(Wu.shrinkBuf(n.output,n.next_out))):this.onData(Wu.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==c5);return a===Xy?(i=qu.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Xs):(a===u5&&(this.onEnd(Xs),n.avail_out=0),!0)},Do.prototype.onData=function(e){this.chunks.push(e)},Do.prototype.onEnd=function(e){e===Xs&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Wu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ky(e,t){var n=new Do(t);if(n.push(e,!0),n.err)throw n.msg||Qy[n.err];return n.result}function YZ(e,t){return t=t||{},t.raw=!0,Ky(e,t)}function ZZ(e,t){return t=t||{},t.gzip=!0,Ky(e,t)}Pu.Deflate=Do,Pu.deflate=Ky,Pu.deflateRaw=YZ,Pu.gzip=ZZ;var Yu={},ar={},j0=30,QZ=12,XZ=function(t,n){var r,i,a,o,s,l,c,u,f,h,d,p,g,b,y,w,A,x,E,_,T,D,P,G,N;r=t.state,i=t.next_in,G=t.input,a=i+(t.avail_in-5),o=t.next_out,N=t.output,s=o-(n-t.avail_out),l=o+(t.avail_out-257),c=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(E=x>>>24,p>>>=E,g-=E,E=x>>>16&255,E===0)N[o++]=x&65535;else if(E&16){_=x&65535,E&=15,E&&(g<E&&(p+=G[i++]<<g,g+=8),_+=p&(1<<E)-1,p>>>=E,g-=E),g<15&&(p+=G[i++]<<g,g+=8,p+=G[i++]<<g,g+=8),x=y[p&A];n:for(;;){if(E=x>>>24,p>>>=E,g-=E,E=x>>>16&255,E&16){if(T=x&65535,E&=15,g<E&&(p+=G[i++]<<g,g+=8,g<E&&(p+=G[i++]<<g,g+=8)),T+=p&(1<<E)-1,T>c){t.msg="invalid distance too far back",r.mode=j0;break e}if(p>>>=E,g-=E,E=o-s,T>E){if(E=T-E,E>f&&r.sane){t.msg="invalid distance too far back",r.mode=j0;break e}if(D=0,P=d,h===0){if(D+=u-E,E<_){_-=E;do N[o++]=d[D++];while(--E);D=o-T,P=N}}else if(h<E){if(D+=u+h-E,E-=h,E<_){_-=E;do N[o++]=d[D++];while(--E);if(D=0,h<_){E=h,_-=E;do N[o++]=d[D++];while(--E);D=o-T,P=N}}}else if(D+=h-E,E<_){_-=E;do N[o++]=d[D++];while(--E);D=o-T,P=N}for(;_>2;)N[o++]=P[D++],N[o++]=P[D++],N[o++]=P[D++],_-=3;_&&(N[o++]=P[D++],_>1&&(N[o++]=P[D++]))}else{D=o-T;do N[o++]=N[D++],N[o++]=N[D++],N[o++]=N[D++],_-=3;while(_>2);_&&(N[o++]=N[D++],_>1&&(N[o++]=N[D++]))}}else if(E&64){t.msg="invalid distance code",r.mode=j0;break e}else{x=y[(x&65535)+(p&(1<<E)-1)];continue n}break}}else if(E&64)if(E&32){r.mode=QZ;break e}else{t.msg="invalid literal/length code",r.mode=j0;break e}else{x=b[(x&65535)+(p&(1<<E)-1)];continue t}break}}while(i<a&&o<l);_=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<l?257+(l-o):257-(o-l),r.hold=p,r.bits=g},f5=si,Ks=15,h5=852,d5=592,p5=0,Jy=1,g5=2,KZ=[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],JZ=[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],eQ=[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],tQ=[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],nQ=function(t,n,r,i,a,o,s,l){var c=l.bits,u=0,f=0,h=0,d=0,p=0,g=0,b=0,y=0,w=0,A=0,x,E,_,T,D,P=null,G=0,N,oe=new f5.Buf16(Ks+1),ue=new f5.Buf16(Ks+1),ne=null,pe=0,Re,xe,nt;for(u=0;u<=Ks;u++)oe[u]=0;for(f=0;f<i;f++)oe[n[r+f]]++;for(p=c,d=Ks;d>=1&&oe[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,l.bits=1,0;for(h=1;h<d&&oe[h]===0;h++);for(p<h&&(p=h),y=1,u=1;u<=Ks;u++)if(y<<=1,y-=oe[u],y<0)return-1;if(y>0&&(t===p5||d!==1))return-1;for(ue[1]=0,u=1;u<Ks;u++)ue[u+1]=ue[u]+oe[u];for(f=0;f<i;f++)n[r+f]!==0&&(s[ue[n[r+f]]++]=f);if(t===p5?(P=ne=s,N=19):t===Jy?(P=KZ,G-=257,ne=JZ,pe-=257,N=256):(P=eQ,ne=tQ,N=-1),A=0,f=0,u=h,D=o,g=p,b=0,_=-1,w=1<<p,T=w-1,t===Jy&&w>h5||t===g5&&w>d5)return 1;for(;;){Re=u-b,s[f]<N?(xe=0,nt=s[f]):s[f]>N?(xe=ne[pe+s[f]],nt=P[G+s[f]]):(xe=32+64,nt=0),x=1<<u-b,E=1<<g,h=E;do E-=x,a[D+(A>>b)+E]=Re<<24|xe<<16|nt|0;while(E!==0);for(x=1<<u-1;A&x;)x>>=1;if(x!==0?(A&=x-1,A+=x):A=0,f++,--oe[u]===0){if(u===d)break;u=n[r+s[f]]}if(u>p&&(A&T)!==_){for(b===0&&(b=p),D+=h,g=u-b,y=1<<g;g+b<d&&(y-=oe[g+b],!(y<=0));)g++,y<<=1;if(w+=1<<g,t===Jy&&w>h5||t===g5&&w>d5)return 1;_=A&T,a[_]=p<<24|g<<16|D-o|0}}return A!==0&&(a[D+A]=u-b<<24|64<<16|0),l.bits=p,0},vn=si,e2=Y6,Br=Z6,rQ=XZ,Zu=nQ,iQ=0,m5=1,b5=2,y5=4,aQ=5,q0=6,Bo=0,oQ=1,sQ=2,Pn=-2,v5=-3,w5=-4,lQ=-5,x5=8,A5=1,E5=2,S5=3,_5=4,C5=5,k5=6,T5=7,I5=8,R5=9,D5=10,W0=11,ci=12,t2=13,B5=14,n2=15,F5=16,M5=17,P5=18,O5=19,Y0=20,Z0=21,L5=22,N5=23,z5=24,U5=25,$5=26,r2=27,H5=28,G5=29,Je=30,V5=31,cQ=32,uQ=852,fQ=592,hQ=15,dQ=hQ;function j5(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function pQ(){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 vn.Buf16(320),this.work=new vn.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function q5(e){var t;return!e||!e.state?Pn:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=A5,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new vn.Buf32(uQ),t.distcode=t.distdyn=new vn.Buf32(fQ),t.sane=1,t.back=-1,Bo)}function W5(e){var t;return!e||!e.state?Pn:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,q5(e))}function Y5(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))?Pn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,W5(e))}function Z5(e,t){var n,r;return e?(r=new pQ,e.state=r,r.window=null,n=Y5(e,t),n!==Bo&&(e.state=null),n):Pn}function gQ(e){return Z5(e,dQ)}var Q5=!0,i2,a2;function mQ(e){if(Q5){var t;for(i2=new vn.Buf32(512),a2=new vn.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(Zu(m5,e.lens,0,288,i2,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Zu(b5,e.lens,0,32,a2,0,e.work,{bits:5}),Q5=!1}e.lencode=i2,e.lenbits=9,e.distcode=a2,e.distbits=5}function X5(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 vn.Buf8(a.wsize)),r>=a.wsize?(vn.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),vn.arraySet(a.window,t,n-r,i,a.wnext),r-=i,r?(vn.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 bQ(e,t){var n,r,i,a,o,s,l,c,u,f,h,d,p,g,b=0,y,w,A,x,E,_,T,D,P=new vn.Buf8(4),G,N,oe=[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 Pn;n=e.state,n.mode===ci&&(n.mode=t2),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,u=n.bits,f=s,h=l,D=Bo;e:for(;;)switch(n.mode){case A5:if(n.wrap===0){n.mode=t2;break}for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.wrap&2&&c===35615){n.check=0,P[0]=c&255,P[1]=c>>>8&255,n.check=Br(n.check,P,2,0),c=0,u=0,n.mode=E5;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=Je;break}if((c&15)!==x5){e.msg="unknown compression method",n.mode=Je;break}if(c>>>=4,u-=4,T=(c&15)+8,n.wbits===0)n.wbits=T;else if(T>n.wbits){e.msg="invalid window size",n.mode=Je;break}n.dmax=1<<T,e.adler=n.check=1,n.mode=c&512?D5:ci,c=0,u=0;break;case E5:for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.flags=c,(n.flags&255)!==x5){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=c>>8&1),n.flags&512&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Br(n.check,P,2,0)),c=0,u=0,n.mode=S5;case S5:for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.head&&(n.head.time=c),n.flags&512&&(P[0]=c&255,P[1]=c>>>8&255,P[2]=c>>>16&255,P[3]=c>>>24&255,n.check=Br(n.check,P,4,0)),c=0,u=0,n.mode=_5;case _5:for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Br(n.check,P,2,0)),c=0,u=0,n.mode=C5;case C5:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Br(n.check,P,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=k5;case k5:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(T=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),vn.arraySet(n.head.extra,r,a,d,T)),n.flags&512&&(n.check=Br(n.check,r,d,a)),s-=d,a+=d,n.length-=d),n.length))break e;n.length=0,n.mode=T5;case T5:if(n.flags&2048){if(s===0)break e;d=0;do T=r[a+d++],n.head&&T&&n.length<65536&&(n.head.name+=String.fromCharCode(T));while(T&&d<s);if(n.flags&512&&(n.check=Br(n.check,r,d,a)),s-=d,a+=d,T)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=I5;case I5:if(n.flags&4096){if(s===0)break e;d=0;do T=r[a+d++],n.head&&T&&n.length<65536&&(n.head.comment+=String.fromCharCode(T));while(T&&d<s);if(n.flags&512&&(n.check=Br(n.check,r,d,a)),s-=d,a+=d,T)break e}else n.head&&(n.head.comment=null);n.mode=R5;case R5:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(c!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Je;break}c=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ci;break;case D5:for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}e.adler=n.check=j5(c),c=0,u=0,n.mode=W0;case W0:if(n.havedict===0)return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,sQ;e.adler=n.check=1,n.mode=ci;case ci:if(t===aQ||t===q0)break e;case t2:if(n.last){c>>>=u&7,u-=u&7,n.mode=r2;break}for(;u<3;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}switch(n.last=c&1,c>>>=1,u-=1,c&3){case 0:n.mode=B5;break;case 1:if(mQ(n),n.mode=Y0,t===q0){c>>>=2,u-=2;break e}break;case 2:n.mode=M5;break;case 3:e.msg="invalid block type",n.mode=Je}c>>>=2,u-=2;break;case B5:for(c>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Je;break}if(n.length=c&65535,c=0,u=0,n.mode=n2,t===q0)break e;case n2:n.mode=F5;case F5:if(d=n.length,d){if(d>s&&(d=s),d>l&&(d=l),d===0)break e;vn.arraySet(i,r,a,d,o),s-=d,a+=d,l-=d,o+=d,n.length-=d;break}n.mode=ci;break;case M5:for(;u<14;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.nlen=(c&31)+257,c>>>=5,u-=5,n.ndist=(c&31)+1,c>>>=5,u-=5,n.ncode=(c&15)+4,c>>>=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=P5;case P5:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.lens[oe[n.have++]]=c&7,c>>>=3,u-=3}for(;n.have<19;)n.lens[oe[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=Zu(iQ,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=O5;case O5:for(;n.have<n.nlen+n.ndist;){for(;b=n.lencode[c&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(A<16)c>>>=y,u-=y,n.lens[n.have++]=A;else{if(A===16){for(N=y+2;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(c>>>=y,u-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=Je;break}T=n.lens[n.have-1],d=3+(c&3),c>>>=2,u-=2}else if(A===17){for(N=y+3;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=y,u-=y,T=0,d=3+(c&7),c>>>=3,u-=3}else{for(N=y+7;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=y,u-=y,T=0,d=11+(c&127),c>>>=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++]=T}}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=Zu(m5,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=Zu(b5,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=Y0,t===q0)break e;case Y0:n.mode=Z0;case Z0:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,rQ(e,h),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,u=n.bits,n.mode===ci&&(n.back=-1);break}for(n.back=0;b=n.lencode[c&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(w&&!(w&240)){for(x=y,E=w,_=A;b=n.lencode[_+((c&(1<<x+E)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=x,u-=x,n.back+=x}if(c>>>=y,u-=y,n.back+=y,n.length=A,w===0){n.mode=$5;break}if(w&32){n.back=-1,n.mode=ci;break}if(w&64){e.msg="invalid literal/length code",n.mode=Je;break}n.extra=w&15,n.mode=L5;case L5:if(n.extra){for(N=n.extra;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=N5;case N5:for(;b=n.distcode[c&(1<<n.distbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(!(w&240)){for(x=y,E=w,_=A;b=n.distcode[_+((c&(1<<x+E)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=x,u-=x,n.back+=x}if(c>>>=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=z5;case z5:if(n.extra){for(N=n.extra;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=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=U5;case U5:if(l===0)break e;if(d=h-l,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>l&&(d=l),l-=d,n.length-=d;do i[o++]=g[p++];while(--d);n.length===0&&(n.mode=Z0);break;case $5:if(l===0)break e;i[o++]=n.length,l--,n.mode=Z0;break;case r2:if(n.wrap){for(;u<32;){if(s===0)break e;s--,c|=r[a++]<<u,u+=8}if(h-=l,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?Br(n.check,i,h,o-h):e2(n.check,i,h,o-h)),h=l,(n.flags?c:j5(c))!==n.check){e.msg="incorrect data check",n.mode=Je;break}c=0,u=0}n.mode=H5;case H5:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(c!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Je;break}c=0,u=0}n.mode=G5;case G5:D=oQ;break e;case Je:D=v5;break e;case V5:return w5;case cQ:default:return Pn}return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<Je&&(n.mode<r2||t!==y5))&&X5(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?Br(n.check,i,h,e.next_out-h):e2(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===ci?128:0)+(n.mode===Y0||n.mode===n2?256:0),(f===0&&h===0||t===y5)&&D===Bo&&(D=lQ),D}function yQ(e){if(!e||!e.state)return Pn;var t=e.state;return t.window&&(t.window=null),e.state=null,Bo}function vQ(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?Pn:(n.head=t,t.done=!1,Bo)}function wQ(e,t){var n=t.length,r,i,a;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==W0)?Pn:r.mode===W0&&(i=1,i=e2(i,t,n,0),i!==r.check)?v5:(a=X5(e,t,n,n),a?(r.mode=V5,w5):(r.havedict=1,Bo))}ar.inflateReset=W5,ar.inflateReset2=Y5,ar.inflateResetKeep=q5,ar.inflateInit=gQ,ar.inflateInit2=Z5,ar.inflate=bQ,ar.inflateEnd=yQ,ar.inflateGetHeader=vQ,ar.inflateSetDictionary=wQ,ar.inflateInfo="pako inflate (from Nodeca project)";var K5={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 xQ(){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 AQ=xQ,Js=ar,Qu=si,Q0=Ro,ht=K5,o2=Vy,EQ=s5,SQ=AQ,J5=Object.prototype.toString;function Fo(e){if(!(this instanceof Fo))return new Fo(e);this.options=Qu.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 EQ,this.strm.avail_out=0;var n=Js.inflateInit2(this.strm,t.windowBits);if(n!==ht.Z_OK)throw new Error(o2[n]);if(this.header=new SQ,Js.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Q0.string2buf(t.dictionary):J5.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Js.inflateSetDictionary(this.strm,t.dictionary),n!==ht.Z_OK)))throw new Error(o2[n])}Fo.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s,l,c,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=Q0.binstring2buf(e):J5.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 Qu.Buf8(r),n.next_out=0,n.avail_out=r),a=Js.inflate(n,ht.Z_NO_FLUSH),a===ht.Z_NEED_DICT&&i&&(a=Js.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=Q0.utf8border(n.output,n.next_out),l=n.next_out-s,c=Q0.buf2string(n.output,s),n.next_out=l,n.avail_out=r-l,l&&Qu.arraySet(n.output,n.output,s,l,0),this.onData(c)):this.onData(Qu.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=Js.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)},Fo.prototype.onData=function(e){this.chunks.push(e)},Fo.prototype.onEnd=function(e){e===ht.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Qu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function s2(e,t){var n=new Fo(t);if(n.push(e,!0),n.err)throw n.msg||o2[n.err];return n.result}function _Q(e,t){return t=t||{},t.raw=!0,s2(e,t)}Yu.Inflate=Fo,Yu.inflate=s2,Yu.inflateRaw=_Q,Yu.ungzip=s2;var CQ=si.assign,kQ=Pu,TQ=Yu,IQ=K5,ek={};CQ(ek,kQ,TQ,IQ);var X0=ek;async function fa(e){try{let t,n=0,r=0;const i=[];let a=0,o;do{const l=e.subarray(n);if(o=new X0.Inflate,{strm:t}=o,o.push(l,X0.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 l=0,c=0;l<i.length;l++)s.set(i[l],c),c+=i[l].length;return Ae.Buffer.from(s)}catch(t){throw`${t}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function tk(e,t){try{let n;const{minv:r,maxv:i}=t;let a=r.blockPosition,o=r.dataPosition;const s=[],l=[],c=[];let u=0,f=0;do{const p=e.subarray(a-r.blockPosition),g=new X0.Inflate;if({strm:n}=g,g.push(p,X0.Z_SYNC_FLUSH),g.err)throw new Error(g.msg);const b=g.result;s.push(b);let y=b.length;l.push(a),c.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),l.push(a),c.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:Ae.Buffer.from(h),cpositions:l,dpositions:c}}catch(n){throw`${n}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):n}}var RQ=Ge,On=null;try{On=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 Ge(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}Ge.prototype.__isLong__,Object.defineProperty(Ge.prototype,"__isLong__",{value:!0});function on(e){return(e&&e.__isLong__)===!0}Ge.isLong=on;var nk={},rk={};function Mo(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=rk[e],r)?r:(n=Ve(e,(e|0)<0?-1:0,!0),i&&(rk[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=nk[e],r)?r:(n=Ve(e,e<0?-1:0,!1),i&&(nk[e]=n),n))}Ge.fromInt=Mo;function Ln(e,t){if(isNaN(e))return t?Po:Nn;if(t){if(e<0)return Po;if(e>=ak)return uk}else{if(e<=-ok)return sn;if(e+1>=ok)return ck}return e<0?Ln(-e,t).neg():Ve(e%el|0,e/el|0,t)}Ge.fromNumber=Ln;function Ve(e,t,n){return new Ge(e,t,n)}Ge.fromBits=Ve;var K0=Math.pow;function l2(e,t,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return Nn;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 l2(e.substring(1),t,n).neg();for(var i=Ln(K0(n,8)),a=Nn,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),l=parseInt(e.substring(o,o+s),n);if(s<8){var c=Ln(K0(n,s));a=a.mul(c).add(Ln(l))}else a=a.mul(i),a=a.add(Ln(l))}return a.unsigned=t,a}Ge.fromString=l2;function or(e,t){return typeof e=="number"?Ln(e,t):typeof e=="string"?l2(e,t):Ve(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Ge.fromValue=or;var ik=65536,DQ=1<<24,el=ik*ik,ak=el*el,ok=ak/2,sk=Mo(DQ),Nn=Mo(0);Ge.ZERO=Nn;var Po=Mo(0,!0);Ge.UZERO=Po;var tl=Mo(1);Ge.ONE=tl;var lk=Mo(1,!0);Ge.UONE=lk;var c2=Mo(-1);Ge.NEG_ONE=c2;var ck=Ve(-1,2147483647,!1);Ge.MAX_VALUE=ck;var uk=Ve(-1,-1,!0);Ge.MAX_UNSIGNED_VALUE=uk;var sn=Ve(0,-2147483648,!1);Ge.MIN_VALUE=sn;var K=Ge.prototype;K.toInt=function(){return this.unsigned?this.low>>>0:this.low},K.toNumber=function(){return this.unsigned?(this.high>>>0)*el+(this.low>>>0):this.high*el+(this.low>>>0)},K.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=Ln(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=Ln(K0(t,6),this.unsigned),o=this,s="";;){var l=o.div(a),c=o.sub(l.mul(a)).toInt()>>>0,u=c.toString(t);if(o=l,o.isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},K.getHighBits=function(){return this.high},K.getHighBitsUnsigned=function(){return this.high>>>0},K.getLowBits=function(){return this.low},K.getLowBitsUnsigned=function(){return this.low>>>0},K.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},K.isZero=function(){return this.high===0&&this.low===0},K.eqz=K.isZero,K.isNegative=function(){return!this.unsigned&&this.high<0},K.isPositive=function(){return this.unsigned||this.high>=0},K.isOdd=function(){return(this.low&1)===1},K.isEven=function(){return(this.low&1)===0},K.equals=function(t){return on(t)||(t=or(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},K.eq=K.equals,K.notEquals=function(t){return!this.eq(t)},K.neq=K.notEquals,K.ne=K.notEquals,K.lessThan=function(t){return this.comp(t)<0},K.lt=K.lessThan,K.lessThanOrEqual=function(t){return this.comp(t)<=0},K.lte=K.lessThanOrEqual,K.le=K.lessThanOrEqual,K.greaterThan=function(t){return this.comp(t)>0},K.gt=K.greaterThan,K.greaterThanOrEqual=function(t){return this.comp(t)>=0},K.gte=K.greaterThanOrEqual,K.ge=K.greaterThanOrEqual,K.compare=function(t){if(on(t)||(t=or(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},K.comp=K.compare,K.negate=function(){return!this.unsigned&&this.eq(sn)?sn:this.not().add(tl)},K.neg=K.negate,K.add=function(t){on(t)||(t=or(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,l=t.low>>>16,c=t.low&65535,u=0,f=0,h=0,d=0;return d+=a+c,h+=d>>>16,d&=65535,h+=i+l,f+=h>>>16,h&=65535,f+=r+s,u+=f>>>16,f&=65535,u+=n+o,u&=65535,Ve(h<<16|d,u<<16|f,this.unsigned)},K.subtract=function(t){return on(t)||(t=or(t)),this.add(t.neg())},K.sub=K.subtract,K.multiply=function(t){if(this.isZero())return Nn;if(on(t)||(t=or(t)),On){var n=On.mul(this.low,this.high,t.low,t.high);return Ve(n,On.get_high(),this.unsigned)}if(t.isZero())return Nn;if(this.eq(sn))return t.isOdd()?sn:Nn;if(t.eq(sn))return this.isOdd()?sn:Nn;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(sk)&&t.lt(sk))return Ln(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,l=t.high&65535,c=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*c,h+=d>>>16,d&=65535,h+=i*u,f+=h>>>16,h&=65535,h+=a*c,f+=h>>>16,h&=65535,h+=o*l,f+=h>>>16,h&=65535,f+=r*u+i*c+a*l+o*s,f&=65535,Ve(d<<16|p,f<<16|h,this.unsigned)},K.mul=K.multiply,K.divide=function(t){if(on(t)||(t=or(t)),t.isZero())throw Error("division by zero");if(On){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?On.div_u:On.div_s)(this.low,this.high,t.low,t.high);return Ve(n,On.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Po:Nn;var r,i,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Po;if(t.gt(this.shru(1)))return lk;a=Po}else{if(this.eq(sn)){if(t.eq(tl)||t.eq(c2))return sn;if(t.eq(sn))return tl;var o=this.shr(1);return r=o.div(t).shl(1),r.eq(Nn)?t.isNegative()?tl:c2:(i=this.sub(t.mul(r)),a=r.add(i.div(t)),a)}else if(t.eq(sn))return this.unsigned?Po:Nn;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=Nn}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),l=s<=48?1:K0(2,s-48),c=Ln(r),u=c.mul(t);u.isNegative()||u.gt(i);)r-=l,c=Ln(r,this.unsigned),u=c.mul(t);c.isZero()&&(c=tl),a=a.add(c),i=i.sub(u)}return a},K.div=K.divide,K.modulo=function(t){if(on(t)||(t=or(t)),On){var n=(this.unsigned?On.rem_u:On.rem_s)(this.low,this.high,t.low,t.high);return Ve(n,On.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},K.mod=K.modulo,K.rem=K.modulo,K.not=function(){return Ve(~this.low,~this.high,this.unsigned)},K.and=function(t){return on(t)||(t=or(t)),Ve(this.low&t.low,this.high&t.high,this.unsigned)},K.or=function(t){return on(t)||(t=or(t)),Ve(this.low|t.low,this.high|t.high,this.unsigned)},K.xor=function(t){return on(t)||(t=or(t)),Ve(this.low^t.low,this.high^t.high,this.unsigned)},K.shiftLeft=function(t){return on(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ve(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Ve(0,this.low<<t-32,this.unsigned)},K.shl=K.shiftLeft,K.shiftRight=function(t){return on(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ve(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Ve(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},K.shr=K.shiftRight,K.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 Ve(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?Ve(n,0,this.unsigned):Ve(n>>>t-32,0,this.unsigned)},K.shru=K.shiftRightUnsigned,K.shr_u=K.shiftRightUnsigned,K.toSigned=function(){return this.unsigned?Ve(this.low,this.high,!1):this},K.toUnsigned=function(){return this.unsigned?this:Ve(this.low,this.high,!0)},K.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},K.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]},K.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]},Ge.fromBytes=function(t,n,r){return r?Ge.fromBytesLE(t,n):Ge.fromBytesBE(t,n)},Ge.fromBytesLE=function(t,n){return new Ge(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Ge.fromBytesBE=function(t,n){return new Ge(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};const J0=Bu(RQ),ep=1;class BQ{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=J0.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=Ae.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=Ae.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[ep],g=d?d[ep]:1/0;return p<=n&&g>n?0:p<n?-1:1};let s=0,l=i.length-1,c=Math.floor(i.length/2),u=o(i[c],i[c+1]);for(;u!==0;)u>0?l=c-1:u<0&&(s=c+1),c=Math.ceil((l-s)/2)+s,u=o(i[c],i[c+1]);a.push(i[c]);let f=c+1;for(;f<i.length&&(a.push(i[f]),!(i[f][ep]>=r));f+=1);return a[a.length-1][ep]<r&&a.push([]),a}}class fk{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 BQ({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=Ae.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 fa(t.slice(0,a))}async read(t,n,r,i){const a=await this.gzi.getRelevantBlocksForRead(r,i),o=Ae.Buffer.allocUnsafe(32768*2);let s=n,l=0;for(let c=0;c<a.length-1;c+=1){const u=await this._readAndUncompressBlock(o,a[c],a[c+1]),[,f]=a[c],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,l+=d-h)}return{bytesRead:l,buffer:t}}}function hk(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function FQ(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 dk{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=FQ(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=hk(t,n),s=hk(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 l=Buffer.allocUnsafe(s);return await this.fasta.read(l,0,s,o,i),l.toString("utf8").replace(/\s+/g,"")}}class MQ extends dk{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 fk({filehandle:t,gziFilehandle:a}):n&&o&&(this.fasta=new fk({path:n,gziPath:o}))}}function pk(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
3350
+ `),[i,...a]=n.split(" "),o=r.join("").replace(/\s/g,"");return{id:i,description:a.join(" "),sequence:o}})}class PQ{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 pk(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 OQ=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:MQ,FetchableSmallFasta:PQ,IndexedFasta:dk,parseSmallFasta:pk},Symbol.toStringTag,{value:"Module"})),tp=BigInt(32);function LQ(e,t,n){const r=+!!n,i=+!n;return BigInt(e.getInt32(t,n)*i+e.getInt32(t+4,n)*r)<<tp|BigInt(e.getUint32(t,n)*r+e.getUint32(t+4,n)*i)}function NQ(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)<<tp|BigInt(r*a+i*o)}function zQ(e,t,n,r){const i=Number(n>>tp),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 UQ(e,t,n,r){const i=Number(n>>tp),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 LQ(this,e,t)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(e,t){return NQ(this,e,t)}),"setBigInt64"in DataView||(DataView.prototype.setBigInt64=function(e,t,n){zQ(this,e,t,n)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,n){UQ(this,e,t,n)});class $Q{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+`
3351
+ `}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 sr=new Map,Oo="___parser_",lr={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},np={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"},rp={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 Oe=class hr{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new hr}primitiveGenerateN(t,n){const r=np[t],i=rp[t];n.pushCode(`${n.generateVariable(this.varName)} = dataView.get${r}(offset, ${i});`),n.pushCode(`offset += ${lr[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 sr.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"&&!sr.has(n.type)&&!(n.type in lr))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"&&!sr.has(a)&&!(a in lr))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 hr)&&!sr.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof hr)&&!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 lr)&&!sr.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 $Q(t,this.useContextVariables);return n.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(n),n.pushCode(`return ${Oo+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 ${Oo+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=sr.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(lr).indexOf(this.type)>=0)t=lr[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=lr[this.options.type]:this.options.type instanceof hr&&(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 hr;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 l=0,c=0;t.bitFields.forEach((u,f)=>{let h=u.options.length;if(h>c){if(c){const g=-1>>>32-c;t.pushCode(`${u.varName} = (${r} & 0x${g.toString(16)}) << ${h-c};`),h-=c}o=0,c=l=a(i(f)-c)}const d=s?l-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,c-=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 l=`offset - ${r} < ${s} ? offset - 1 : offset`;t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, ${l}), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, ${l}));`)}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(),l=this.options.key,c=typeof l=="string";if(c?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(sr.get(i)){const u=t.generateTmpVariable();if(t.pushCode(`var ${u} = ${Oo+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=np[i],f=rp[i];t.pushCode(`var ${s} = dataView.get${u}(offset, ${f});`),t.pushCode(`offset += ${lr[i]};`)}else if(i instanceof hr){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(c?t.pushCode(`${o}[${s}.${l}] = ${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(sr.has(r)){const a=t.generateTmpVariable();t.pushCode(`var ${a} = ${Oo+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=np[r],o=rp[r];t.pushCode(`${i} = dataView.get${a}(offset, ${o});`),t.pushCode(`offset += ${lr[r]}`)}}else r instanceof hr&&(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 hr){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(sr.has(this.options.type)){const r=t.generateTmpVariable();if(t.pushCode(`var ${r} = ${Oo+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 l=this.options.readUntil,c=t.generateTmpVariable(),u=t.generateTmpVariable();t.pushCode(`var ${c} = offset;`),t.pushCode(`var ${u} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${u} = dataView.getUint8(offset);`);const f=t.addImport(l);t.pushCode(`if (${f}.call(${t.generateVariable()}, ${u}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${r} = buffer.subarray(${c}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${r} = buffer.subarray(offset);`);else{const l=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${l});`),t.pushCode(`offset += ${l};`)}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 hr)this.varName&&t.pushCode(`${n} = {};`),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(sr.has(this.options.type)){const l=t.generateTmpVariable();t.pushCode(`var ${l} = ${Oo+this.options.type}(0);`),t.pushCode(`${n} = ${l}.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 hr){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(sr.has(this.options.type)){const o=t.generateTmpVariable();if(t.pushCode(`var ${o} = ${Oo+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(lr).indexOf(this.options.type)>=0){const o=np[n],s=rp[n];t.pushCode(`${a} = dataView.get${o}(offset, ${s});`),t.pushCode(`offset += ${lr[n]};`)}t.pushCode(`offset = ${i};`)}generateSaveOffset(t){const n=t.generateVariable(this.varName);t.pushCode(`${n} = offset`)}};var gk={},u2={},Lo={},Xu={};Object.defineProperty(Xu,"__esModule",{value:!0});function f2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mk(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 h2(e,t,n){return t&&mk(e.prototype,t),n&&mk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function HQ(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&&d2(e,t)}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nl(e)}function d2(e,t){return d2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},d2(e,t)}function GQ(){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 Ku(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VQ(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 Ku(e)}function jQ(e){var t=GQ();return function(){var r=nl(e),i;if(t){var a=nl(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return VQ(this,i)}}function qQ(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=nl(e),e!==null););return e}function ip(){return typeof Reflect<"u"&&Reflect.get?ip=Reflect.get.bind():ip=function(t,n,r){var i=qQ(t,n);if(i){var a=Object.getOwnPropertyDescriptor(i,n);return a.get?a.get.call(arguments.length<3?t:r):a.value}},ip.apply(this,arguments)}var bk=function(){function e(){f2(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return h2(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(l){Promise.resolve().then(function(){throw l})}s.options&&s.options.once&&this.removeEventListener(n.type,s.callback)}return!n.defaultPrevented}}}]),e}(),p2=function(e){HQ(n,e);var t=jQ(n);function n(){var r;return f2(this,n),r=t.call(this),r.listeners||bk.call(Ku(r)),Object.defineProperty(Ku(r),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(Ku(r),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(Ku(r),"reason",{value:void 0,writable:!0,configurable:!0}),r}return h2(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)),ip(nl(n.prototype),"dispatchEvent",this).call(this,i)}}]),n}(bk),yk=function(){function e(){f2(this,e),Object.defineProperty(this,"signal",{value:new p2,writable:!0,configurable:!0})}return h2(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&&(yk.prototype[Symbol.toStringTag]="AbortController",p2.prototype[Symbol.toStringTag]="AbortSignal");function WQ(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 YQ(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(!WQ({fetch:n,Request:i,AbortController:a,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:n,Request:l};var l=i;(l&&!l.prototype.hasOwnProperty("signal")||s)&&(l=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},l.prototype=i.prototype);var c=n,u=function(h,d){var p=l&&l.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,c(h,d)])}return c(h,d)};return{fetch:u,Request:l}}Xu.AbortController=yk,Xu.AbortSignal=p2,Xu.abortableFetch=YQ,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.AbortSignal=Lo.AbortController=void 0;const vk=Xu;var ap=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 ZQ=typeof ap().AbortController>"u"?vk.AbortController:ap().AbortController;Lo.AbortController=ZQ;let QQ=typeof ap().AbortController>"u"?vk.AbortSignal:ap().AbortSignal;Lo.AbortSignal=QQ;var g2={};Object.defineProperty(g2,"__esModule",{value:!0});const XQ=Lo;class KQ{}class JQ{constructor(){this.signals=new Set,this.abortController=new XQ.AbortController}addSignal(t=new KQ){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()}}g2.default=JQ;var m2={};Object.defineProperty(m2,"__esModule",{value:!0});class eX{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)})}}m2.default=eX;var wk=M0&&M0.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u2,"__esModule",{value:!0});const tX=Lo,nX=wk(g2),rX=wk(m2);class op{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 nX.default,o=new rX.default;o.addCallback(i);const s={aborter:a,promise:this.fillCallback(n,a.signal,l=>{o.callback(l)}),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(l=>{throw console.error(l),l}),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 tX.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),op.checkSinglePromise(a.promise,r)):(this.fill(t,n,r,i),op.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}}u2.default=op;var iX=M0&&M0.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gk,"__esModule",{value:!0});const aX=iX(u2);var sp=gk.default=aX.default;class oX{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 sX=oX;const lp=Bu(sX);class ha{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 ha(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 ha(i.min(),o.max()))}return r.push(i),r.length===1?r[0]:new ha(r)}intersection(t){let n=this,r=t;const i=this.ranges(),a=r.ranges(),o=i.length,s=a.length;let l=0,c=0;const u=[];for(;l<o&&c<s;){n=i[l],r=a[c];const f=Math.max(n.min(),r.min()),h=Math.min(n.max(),r.max());h>=f&&u.push(new ha(f,h)),n.max()>r.max()?c+=1:l+=1}if(u.length===0)throw new Error("found range of length 0");return u.length===1?u[0]:new ha(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 lX=4,xk=0,Ak=1,cX=2;function rl(e){let t=e.length;for(;--t>=0;)e[t]=0}const uX=0,Ek=1,fX=2,hX=3,dX=258,b2=29,Ju=256,ef=Ju+1+b2,il=30,y2=19,Sk=2*ef+1,No=15,v2=16,pX=7,w2=256,_k=16,Ck=17,kk=18,x2=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]),cp=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]),gX=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Tk=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),mX=512,ui=new Array((ef+2)*2);rl(ui);const tf=new Array(il*2);rl(tf);const nf=new Array(mX);rl(nf);const rf=new Array(dX-hX+1);rl(rf);const A2=new Array(b2);rl(A2);const up=new Array(il);rl(up);function E2(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 Ik,Rk,Dk;function S2(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const Bk=e=>e<256?nf[e]:nf[256+(e>>>7)],af=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},ln=(e,t,n)=>{e.bi_valid>v2-n?(e.bi_buf|=t<<e.bi_valid&65535,af(e,e.bi_buf),e.bi_buf=t>>v2-e.bi_valid,e.bi_valid+=n-v2):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},Fr=(e,t,n)=>{ln(e,n[t*2],n[t*2+1])},Fk=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},bX=e=>{e.bi_valid===16?(af(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)},yX=(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,l=t.stat_desc.max_length;let c,u,f,h,d,p,g=0;for(h=0;h<=No;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<Sk;c++)u=e.heap[c],h=n[n[u*2+1]*2+1]+1,h>l&&(h=l,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=l-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[l]--,g-=2}while(g>0);for(h=l;h!==0;h--)for(u=e.bl_count[h];u!==0;)f=e.heap[--c],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),u--)}},Mk=(e,t,n)=>{const r=new Array(No+1);let i=0,a,o;for(a=1;a<=No;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]=Fk(r[s]++,s))}},vX=()=>{let e,t,n,r,i;const a=new Array(No+1);for(n=0,r=0;r<b2-1;r++)for(A2[r]=n,e=0;e<1<<x2[r];e++)rf[n++]=r;for(rf[n-1]=r,i=0,r=0;r<16;r++)for(up[r]=i,e=0;e<1<<cp[r];e++)nf[i++]=r;for(i>>=7;r<il;r++)for(up[r]=i<<7,e=0;e<1<<cp[r]-7;e++)nf[256+i++]=r;for(t=0;t<=No;t++)a[t]=0;for(e=0;e<=143;)ui[e*2+1]=8,e++,a[8]++;for(;e<=255;)ui[e*2+1]=9,e++,a[9]++;for(;e<=279;)ui[e*2+1]=7,e++,a[7]++;for(;e<=287;)ui[e*2+1]=8,e++,a[8]++;for(Mk(ui,ef+1,a),e=0;e<il;e++)tf[e*2+1]=5,tf[e*2]=Fk(e,5);Ik=new E2(ui,x2,Ju+1,ef,No),Rk=new E2(tf,cp,0,il,No),Dk=new E2(new Array(0),gX,0,y2,pX)},Pk=e=>{let t;for(t=0;t<ef;t++)e.dyn_ltree[t*2]=0;for(t=0;t<il;t++)e.dyn_dtree[t*2]=0;for(t=0;t<y2;t++)e.bl_tree[t*2]=0;e.dyn_ltree[w2*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Ok=e=>{e.bi_valid>8?af(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Lk=(e,t,n,r)=>{const i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},_2=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&Lk(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Lk(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},Nk=(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?Fr(e,i,t):(o=rf[i],Fr(e,o+Ju+1,t),s=x2[o],s!==0&&(i-=A2[o],ln(e,i,s)),r--,o=Bk(r),Fr(e,o,n),s=cp[o],s!==0&&(r-=up[o],ln(e,r,s)));while(a<e.sym_next);Fr(e,w2,t)},C2=(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,l=-1,c;for(e.heap_len=0,e.heap_max=Sk,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=l=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,n[c*2]=1,e.depth[c]=0,e.opt_len--,i&&(e.static_len-=r[c*2+1]);for(t.max_code=l,o=e.heap_len>>1;o>=1;o--)_2(e,n,o);c=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],_2(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[c*2]=n[o*2]+n[s*2],e.depth[c]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=c,e.heap[1]=c++,_2(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],yX(e,t),Mk(n,l,e.bl_count)},zk=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,l=7,c=4;for(o===0&&(l=138,c=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<l&&a===o)&&(s<c?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[_k*2]++):s<=10?e.bl_tree[Ck*2]++:e.bl_tree[kk*2]++,s=0,i=a,o===0?(l=138,c=3):a===o?(l=6,c=3):(l=7,c=4))},Uk=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,l=7,c=4;for(o===0&&(l=138,c=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<l&&a===o)){if(s<c)do Fr(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Fr(e,a,e.bl_tree),s--),Fr(e,_k,e.bl_tree),ln(e,s-3,2)):s<=10?(Fr(e,Ck,e.bl_tree),ln(e,s-3,3)):(Fr(e,kk,e.bl_tree),ln(e,s-11,7));s=0,i=a,o===0?(l=138,c=3):a===o?(l=6,c=3):(l=7,c=4)}},wX=e=>{let t;for(zk(e,e.dyn_ltree,e.l_desc.max_code),zk(e,e.dyn_dtree,e.d_desc.max_code),C2(e,e.bl_desc),t=y2-1;t>=3&&e.bl_tree[Tk[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},xX=(e,t,n,r)=>{let i;for(ln(e,t-257,5),ln(e,n-1,5),ln(e,r-4,4),i=0;i<r;i++)ln(e,e.bl_tree[Tk[i]*2+1],3);Uk(e,e.dyn_ltree,t-1),Uk(e,e.dyn_dtree,n-1)},AX=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return xk;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Ak;for(n=32;n<Ju;n++)if(e.dyn_ltree[n*2]!==0)return Ak;return xk};let $k=!1;const EX=e=>{$k||(vX(),$k=!0),e.l_desc=new S2(e.dyn_ltree,Ik),e.d_desc=new S2(e.dyn_dtree,Rk),e.bl_desc=new S2(e.bl_tree,Dk),e.bi_buf=0,e.bi_valid=0,Pk(e)},Hk=(e,t,n,r)=>{ln(e,(uX<<1)+(r?1:0),3),Ok(e),af(e,n),af(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},SX=e=>{ln(e,Ek<<1,3),Fr(e,w2,ui),bX(e)},_X=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===cX&&(e.strm.data_type=AX(e)),C2(e,e.l_desc),C2(e,e.d_desc),o=wX(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?Hk(e,t,n,r):e.strategy===lX||a===i?(ln(e,(Ek<<1)+(r?1:0),3),Nk(e,ui,tf)):(ln(e,(fX<<1)+(r?1:0),3),xX(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Nk(e,e.dyn_ltree,e.dyn_dtree)),Pk(e),r&&Ok(e)},CX=(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[(rf[n]+Ju+1)*2]++,e.dyn_dtree[Bk(t)*2]++),e.sym_next===e.sym_end);var kX=EX,TX=Hk,IX=_X,RX=CX,DX=SX,BX={_tr_init:kX,_tr_stored_block:TX,_tr_flush_block:IX,_tr_tally:RX,_tr_align:DX},of=(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 FX=()=>{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},MX=new Uint32Array(FX());var Tt=(e,t,n,r)=>{const i=MX,a=r+n;e^=-1;for(let o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1},al={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"},sf={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:PX,_tr_stored_block:k2,_tr_flush_block:OX,_tr_tally:da,_tr_align:LX}=BX,{Z_NO_FLUSH:pa,Z_PARTIAL_FLUSH:NX,Z_FULL_FLUSH:zX,Z_FINISH:zn,Z_BLOCK:Gk,Z_OK:Ot,Z_STREAM_END:Vk,Z_STREAM_ERROR:Mr,Z_DATA_ERROR:UX,Z_BUF_ERROR:T2,Z_DEFAULT_COMPRESSION:$X,Z_FILTERED:HX,Z_HUFFMAN_ONLY:fp,Z_RLE:GX,Z_FIXED:VX,Z_DEFAULT_STRATEGY:jX,Z_UNKNOWN:qX,Z_DEFLATED:hp}=sf,WX=9,YX=15,ZX=8,QX=29,I2=256+1+QX,XX=30,KX=19,JX=2*I2+1,eK=15,we=3,ga=258,Pr=ga+we+1,tK=32,ol=42,R2=57,D2=69,B2=73,F2=91,M2=103,zo=113,lf=666,Xt=1,sl=2,Uo=3,ll=4,nK=3,$o=(e,t)=>(e.msg=al[t],t),jk=e=>e*2-(e>4?9:0),ma=e=>{let t=e.length;for(;--t>=0;)e[t]=0},rK=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 ba=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const wn=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))},xn=(e,t)=>{OX(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,wn(e.strm)},Te=(e,t)=>{e.pending_buf[e.pending++]=t},cf=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},P2=(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=of(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)},qk=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-Pr?e.strstart-(e.w_size-Pr):0,c=e.window,u=e.w_mask,f=e.prev,h=e.strstart+ga;let d=c[r+o-1],p=c[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(c[i+o]!==p||c[i+o-1]!==d||c[i]!==c[r]||c[++i]!==c[r+1])){r+=2,i++;do;while(c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&r<h);if(a=ga-(h-r),r=h-ga,a>o){if(e.match_start=t,o=a,a>=s)break;d=c[r+o-1],p=c[r+o]}}while((t=f[t&u])>l&&--n!==0);return o<=e.lookahead?o:e.lookahead},cl=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Pr)&&(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),rK(e),r+=t),e.strm.avail_in===0)break;if(n=P2(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=we)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=ba(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=ba(e,e.ins_h,e.window[i+we-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<we)););}while(e.lookahead<Pr&&e.strm.avail_in!==0)},Wk=(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!==zn||t===pa||r!==i+e.strm.avail_in)))break;o=t===zn&&r===i+e.strm.avail_in?1:0,k2(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,wn(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&&(P2(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?ll:t!==pa&&t!==zn&&e.strm.avail_in===0&&e.strstart===e.block_start?sl:(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&&(P2(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===zn)&&t!==pa&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=t===zn&&e.strm.avail_in===0&&r===i?1:0,k2(e,e.block_start,r,o),e.block_start+=r,wn(e.strm)),o?Uo:Xt)},O2=(e,t)=>{let n,r;for(;;){if(e.lookahead<Pr){if(cl(e),e.lookahead<Pr&&t===pa)return Xt;if(e.lookahead===0)break}if(n=0,e.lookahead>=we&&(e.ins_h=ba(e,e.ins_h,e.window[e.strstart+we-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-Pr&&(e.match_length=qk(e,n)),e.match_length>=we)if(r=da(e,e.strstart-e.match_start,e.match_length-we),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=we){e.match_length--;do e.strstart++,e.ins_h=ba(e,e.ins_h,e.window[e.strstart+we-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=ba(e,e.ins_h,e.window[e.strstart+1]);else r=da(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(xn(e,!1),e.strm.avail_out===0))return Xt}return e.insert=e.strstart<we-1?e.strstart:we-1,t===zn?(xn(e,!0),e.strm.avail_out===0?Uo:ll):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?Xt:sl},ul=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<Pr){if(cl(e),e.lookahead<Pr&&t===pa)return Xt;if(e.lookahead===0)break}if(n=0,e.lookahead>=we&&(e.ins_h=ba(e,e.ins_h,e.window[e.strstart+we-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=we-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Pr&&(e.match_length=qk(e,n),e.match_length<=5&&(e.strategy===HX||e.match_length===we&&e.strstart-e.match_start>4096)&&(e.match_length=we-1)),e.prev_length>=we&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-we,r=da(e,e.strstart-1-e.prev_match,e.prev_length-we),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=ba(e,e.ins_h,e.window[e.strstart+we-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=we-1,e.strstart++,r&&(xn(e,!1),e.strm.avail_out===0))return Xt}else if(e.match_available){if(r=da(e,0,e.window[e.strstart-1]),r&&xn(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Xt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=da(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<we-1?e.strstart:we-1,t===zn?(xn(e,!0),e.strm.avail_out===0?Uo:ll):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?Xt:sl},iK=(e,t)=>{let n,r,i,a;const o=e.window;for(;;){if(e.lookahead<=ga){if(cl(e),e.lookahead<=ga&&t===pa)return Xt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=we&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+ga;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=ga-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=we?(n=da(e,1,e.match_length-we),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=da(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(xn(e,!1),e.strm.avail_out===0))return Xt}return e.insert=0,t===zn?(xn(e,!0),e.strm.avail_out===0?Uo:ll):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?Xt:sl},aK=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(cl(e),e.lookahead===0)){if(t===pa)return Xt;break}if(e.match_length=0,n=da(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(xn(e,!1),e.strm.avail_out===0))return Xt}return e.insert=0,t===zn?(xn(e,!0),e.strm.avail_out===0?Uo:ll):e.sym_next&&(xn(e,!1),e.strm.avail_out===0)?Xt:sl};function Or(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 uf=[new Or(0,0,0,0,Wk),new Or(4,4,8,4,O2),new Or(4,5,16,8,O2),new Or(4,6,32,32,O2),new Or(4,4,16,16,ul),new Or(8,16,32,32,ul),new Or(8,16,128,128,ul),new Or(8,32,128,256,ul),new Or(32,128,258,1024,ul),new Or(32,258,258,4096,ul)],oK=e=>{e.window_size=2*e.w_size,ma(e.head),e.max_lazy_match=uf[e.level].max_lazy,e.good_match=uf[e.level].good_length,e.nice_match=uf[e.level].nice_length,e.max_chain_length=uf[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=we-1,e.match_available=0,e.ins_h=0};function sK(){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=hp,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(JX*2),this.dyn_dtree=new Uint16Array((2*XX+1)*2),this.bl_tree=new Uint16Array((2*KX+1)*2),ma(this.dyn_ltree),ma(this.dyn_dtree),ma(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(eK+1),this.heap=new Uint16Array(2*I2+1),ma(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*I2+1),ma(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 ff=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ol&&t.status!==R2&&t.status!==D2&&t.status!==B2&&t.status!==F2&&t.status!==M2&&t.status!==zo&&t.status!==lf?1:0},Yk=e=>{if(ff(e))return $o(e,Mr);e.total_in=e.total_out=0,e.data_type=qX;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?R2:t.wrap?ol:zo,e.adler=t.wrap===2?0:1,t.last_flush=-2,PX(t),Ot},Zk=e=>{const t=Yk(e);return t===Ot&&oK(e.state),t},lK=(e,t)=>ff(e)||e.state.wrap!==2?Mr:(e.state.gzhead=t,Ot),Qk=(e,t,n,r,i,a)=>{if(!e)return Mr;let o=1;if(t===$X&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>WX||n!==hp||r<8||r>15||t<0||t>9||a<0||a>VX||r===8&&o!==1)return $o(e,Mr);r===8&&(r=9);const s=new sK;return e.state=s,s.strm=e,s.status=ol,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+we-1)/we),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,Zk(e)},cK=(e,t)=>Qk(e,t,hp,YX,ZX,jX),uK=(e,t)=>{if(ff(e)||t>Gk||t<0)return e?$o(e,Mr):Mr;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===lf&&t!==zn)return $o(e,e.avail_out===0?T2:Mr);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(wn(e),e.avail_out===0)return n.last_flush=-1,Ot}else if(e.avail_in===0&&jk(t)<=jk(r)&&t!==zn)return $o(e,T2);if(n.status===lf&&e.avail_in!==0)return $o(e,T2);if(n.status===ol&&n.wrap===0&&(n.status=zo),n.status===ol){let i=hp+(n.w_bits-8<<4)<<8,a=-1;if(n.strategy>=fp||n.level<2?a=0:n.level<6?a=1:n.level===6?a=2:a=3,i|=a<<6,n.strstart!==0&&(i|=tK),i+=31-i%31,cf(n,i),n.strstart!==0&&(cf(n,e.adler>>>16),cf(n,e.adler&65535)),e.adler=1,n.status=zo,wn(e),n.pending!==0)return n.last_flush=-1,Ot}if(n.status===R2){if(e.adler=0,Te(n,31),Te(n,139),Te(n,8),n.gzhead)Te(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)),Te(n,n.gzhead.time&255),Te(n,n.gzhead.time>>8&255),Te(n,n.gzhead.time>>16&255),Te(n,n.gzhead.time>>24&255),Te(n,n.level===9?2:n.strategy>=fp||n.level<2?4:0),Te(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Te(n,n.gzhead.extra.length&255),Te(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=D2;else if(Te(n,0),Te(n,0),Te(n,0),Te(n,0),Te(n,0),Te(n,n.level===9?2:n.strategy>=fp||n.level<2?4:0),Te(n,nK),n.status=zo,wn(e),n.pending!==0)return n.last_flush=-1,Ot}if(n.status===D2){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,wn(e),n.pending!==0)return n.last_flush=-1,Ot;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=B2}if(n.status===B2){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)),wn(e),n.pending!==0)return n.last_flush=-1,Ot;i=0}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,Te(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=F2}if(n.status===F2){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)),wn(e),n.pending!==0)return n.last_flush=-1,Ot;i=0}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,Te(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=M2}if(n.status===M2){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(wn(e),n.pending!==0))return n.last_flush=-1,Ot;Te(n,e.adler&255),Te(n,e.adler>>8&255),e.adler=0}if(n.status=zo,wn(e),n.pending!==0)return n.last_flush=-1,Ot}if(e.avail_in!==0||n.lookahead!==0||t!==pa&&n.status!==lf){let i=n.level===0?Wk(n,t):n.strategy===fp?aK(n,t):n.strategy===GX?iK(n,t):uf[n.level].func(n,t);if((i===Uo||i===ll)&&(n.status=lf),i===Xt||i===Uo)return e.avail_out===0&&(n.last_flush=-1),Ot;if(i===sl&&(t===NX?LX(n):t!==Gk&&(k2(n,0,0,!1),t===zX&&(ma(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),wn(e),e.avail_out===0))return n.last_flush=-1,Ot}return t!==zn?Ot:n.wrap<=0?Vk:(n.wrap===2?(Te(n,e.adler&255),Te(n,e.adler>>8&255),Te(n,e.adler>>16&255),Te(n,e.adler>>24&255),Te(n,e.total_in&255),Te(n,e.total_in>>8&255),Te(n,e.total_in>>16&255),Te(n,e.total_in>>24&255)):(cf(n,e.adler>>>16),cf(n,e.adler&65535)),wn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ot:Vk)},fK=e=>{if(ff(e))return Mr;const t=e.state.status;return e.state=null,t===zo?$o(e,UX):Ot},hK=(e,t)=>{let n=t.length;if(ff(e))return Mr;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==ol||r.lookahead)return Mr;if(i===1&&(e.adler=of(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(ma(r.head),r.strstart=0,r.block_start=0,r.insert=0);let l=new Uint8Array(r.w_size);l.set(t.subarray(n-r.w_size,n),0),t=l,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,cl(r);r.lookahead>=we;){let l=r.strstart,c=r.lookahead-(we-1);do r.ins_h=ba(r,r.ins_h,r.window[l+we-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++;while(--c);r.strstart=l,r.lookahead=we-1,cl(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=we-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,Ot};var dK=cK,pK=Qk,gK=Zk,mK=Yk,bK=lK,yK=uK,vK=fK,wK=hK,xK="pako deflate (from Nodeca project)",hf={deflateInit:dK,deflateInit2:pK,deflateReset:gK,deflateResetKeep:mK,deflateSetHeader:bK,deflate:yK,deflateEnd:vK,deflateSetDictionary:wK,deflateInfo:xK};const AK=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var EK=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)AK(n,r)&&(e[r]=n[r])}}return e},SK=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},dp={assign:EK,flattenChunks:SK};let Xk=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Xk=!1}const df=new Uint8Array(256);for(let e=0;e<256;e++)df[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;df[254]=df[254]=1;var _K=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 CK=(e,t)=>{if(t<65534&&e.subarray&&Xk)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 kK=(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=df[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 CK(a,i)},TK=(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+df[e[n]]>t?n:t},pf={string2buf:_K,buf2string:kK,utf8border:TK};function IK(){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 Kk=IK;const Jk=Object.prototype.toString,{Z_NO_FLUSH:RK,Z_SYNC_FLUSH:DK,Z_FULL_FLUSH:BK,Z_FINISH:FK,Z_OK:pp,Z_STREAM_END:MK,Z_DEFAULT_COMPRESSION:PK,Z_DEFAULT_STRATEGY:OK,Z_DEFLATED:LK}=sf;function L2(e){this.options=dp.assign({level:PK,method:LK,chunkSize:16384,windowBits:15,memLevel:8,strategy:OK},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 Kk,this.strm.avail_out=0;let n=hf.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==pp)throw new Error(al[n]);if(t.header&&hf.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=pf.string2buf(t.dictionary):Jk.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=hf.deflateSetDictionary(this.strm,r),n!==pp)throw new Error(al[n]);this._dict_set=!0}}L2.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?FK:RK,typeof e=="string"?n.input=pf.string2buf(e):Jk.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===DK||a===BK)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=hf.deflate(n,a),i===MK)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=hf.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===pp;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},L2.prototype.onData=function(e){this.chunks.push(e)},L2.prototype.onEnd=function(e){e===pp&&(this.result=dp.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const gp=16209,NK=16191;var zK=function(t,n){let r,i,a,o,s,l,c,u,f,h,d,p,g,b,y,w,A,x,E,_,T,D,P,G;const N=t.state;r=t.next_in,P=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),l=N.dmax,c=N.wsize,u=N.whave,f=N.wnext,h=N.window,d=N.hold,p=N.bits,g=N.lencode,b=N.distcode,y=(1<<N.lenbits)-1,w=(1<<N.distbits)-1;e:do{p<15&&(d+=P[r++]<<p,p+=8,d+=P[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){E=A&65535,x&=15,x&&(p<x&&(d+=P[r++]<<p,p+=8),E+=d&(1<<x)-1,d>>>=x,p-=x),p<15&&(d+=P[r++]<<p,p+=8,d+=P[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+=P[r++]<<p,p+=8,p<x&&(d+=P[r++]<<p,p+=8)),_+=d&(1<<x)-1,_>l){t.msg="invalid distance too far back",N.mode=gp;break e}if(d>>>=x,p-=x,x=a-o,_>x){if(x=_-x,x>u&&N.sane){t.msg="invalid distance too far back",N.mode=gp;break e}if(T=0,D=h,f===0){if(T+=c-x,x<E){E-=x;do G[a++]=h[T++];while(--x);T=a-_,D=G}}else if(f<x){if(T+=c+f-x,x-=f,x<E){E-=x;do G[a++]=h[T++];while(--x);if(T=0,f<E){x=f,E-=x;do G[a++]=h[T++];while(--x);T=a-_,D=G}}}else if(T+=f-x,x<E){E-=x;do G[a++]=h[T++];while(--x);T=a-_,D=G}for(;E>2;)G[a++]=D[T++],G[a++]=D[T++],G[a++]=D[T++],E-=3;E&&(G[a++]=D[T++],E>1&&(G[a++]=D[T++]))}else{T=a-_;do G[a++]=G[T++],G[a++]=G[T++],G[a++]=G[T++],E-=3;while(E>2);E&&(G[a++]=G[T++],E>1&&(G[a++]=G[T++]))}}else if(x&64){t.msg="invalid distance code",N.mode=gp;break e}else{A=b[(A&65535)+(d&(1<<x)-1)];continue n}break}}else if(x&64)if(x&32){N.mode=NK;break e}else{t.msg="invalid literal/length code",N.mode=gp;break e}else{A=g[(A&65535)+(d&(1<<x)-1)];continue t}break}}while(r<i&&a<s);E=p>>3,r-=E,p-=E<<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),N.hold=d,N.bits=p};const fl=15,e8=852,t8=592,n8=0,N2=1,r8=2,UK=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]),$K=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]),HK=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]),GK=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 gf=(e,t,n,r,i,a,o,s)=>{const l=s.bits;let c=0,u=0,f=0,h=0,d=0,p=0,g=0,b=0,y=0,w=0,A,x,E,_,T,D=null,P;const G=new Uint16Array(fl+1),N=new Uint16Array(fl+1);let oe=null,ue,ne,pe;for(c=0;c<=fl;c++)G[c]=0;for(u=0;u<r;u++)G[t[n+u]]++;for(d=l,h=fl;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,c=1;c<=fl;c++)if(b<<=1,b-=G[c],b<0)return-1;if(b>0&&(e===n8||h!==1))return-1;for(N[1]=0,c=1;c<fl;c++)N[c+1]=N[c]+G[c];for(u=0;u<r;u++)t[n+u]!==0&&(o[N[t[n+u]]++]=u);if(e===n8?(D=oe=o,P=20):e===N2?(D=UK,oe=$K,P=257):(D=HK,oe=GK,P=0),w=0,u=0,c=f,T=a,p=d,g=0,E=-1,y=1<<d,_=y-1,e===N2&&y>e8||e===r8&&y>t8)return 1;for(;;){ue=c-g,o[u]+1<P?(ne=0,pe=o[u]):o[u]>=P?(ne=oe[o[u]-P],pe=D[o[u]-P]):(ne=32+64,pe=0),A=1<<c-g,x=1<<p,f=x;do x-=A,i[T+(w>>g)+x]=ue<<24|ne<<16|pe|0;while(x!==0);for(A=1<<c-1;w&A;)A>>=1;if(A!==0?(w&=A-1,w+=A):w=0,u++,--G[c]===0){if(c===h)break;c=t[n+o[u]]}if(c>d&&(w&_)!==E){for(g===0&&(g=d),T+=f,p=c-g,b=1<<p;p+g<h&&(b-=G[p+g],!(b<=0));)p++,b<<=1;if(y+=1<<p,e===N2&&y>e8||e===r8&&y>t8)return 1;E=w&_,i[E]=d<<24|p<<16|T-a|0}}return w!==0&&(i[T+w]=c-g<<24|64<<16|0),s.bits=d,0};const VK=0,i8=1,a8=2,{Z_FINISH:o8,Z_BLOCK:jK,Z_TREES:mp,Z_OK:Ho,Z_STREAM_END:qK,Z_NEED_DICT:WK,Z_STREAM_ERROR:Un,Z_DATA_ERROR:s8,Z_MEM_ERROR:l8,Z_BUF_ERROR:YK,Z_DEFLATED:c8}=sf,bp=16180,u8=16181,f8=16182,h8=16183,d8=16184,p8=16185,g8=16186,m8=16187,b8=16188,y8=16189,yp=16190,fi=16191,z2=16192,v8=16193,U2=16194,w8=16195,x8=16196,A8=16197,E8=16198,vp=16199,wp=16200,S8=16201,_8=16202,C8=16203,k8=16204,T8=16205,$2=16206,I8=16207,R8=16208,et=16209,D8=16210,B8=16211,ZK=852,QK=592,XK=15,F8=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function KK(){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 Go=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<bp||t.mode>B8?1:0},M8=e=>{if(Go(e))return Un;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=bp,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(ZK),t.distcode=t.distdyn=new Int32Array(QK),t.sane=1,t.back=-1,Ho},P8=e=>{if(Go(e))return Un;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,M8(e)},O8=(e,t)=>{let n;if(Go(e))return Un;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Un:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,P8(e))},L8=(e,t)=>{if(!e)return Un;const n=new KK;e.state=n,n.strm=e,n.window=null,n.mode=bp;const r=O8(e,t);return r!==Ho&&(e.state=null),r},JK=e=>L8(e,XK);let N8=!0,H2,G2;const eJ=e=>{if(N8){H2=new Int32Array(512),G2=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(gf(i8,e.lens,0,288,H2,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;gf(a8,e.lens,0,32,G2,0,e.work,{bits:5}),N8=!1}e.lencode=H2,e.lenbits=9,e.distcode=G2,e.distbits=5},z8=(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},tJ=(e,t)=>{let n,r,i,a,o,s,l,c,u,f,h,d,p,g,b=0,y,w,A,x,E,_,T,D;const P=new Uint8Array(4);let G,N;const oe=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Go(e)||!e.output||!e.input&&e.avail_in!==0)return Un;n=e.state,n.mode===fi&&(n.mode=z2),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,u=n.bits,f=s,h=l,D=Ho;e:for(;;)switch(n.mode){case bp:if(n.wrap===0){n.mode=z2;break}for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.wrap&2&&c===35615){n.wbits===0&&(n.wbits=15),n.check=0,P[0]=c&255,P[1]=c>>>8&255,n.check=Tt(n.check,P,2,0),c=0,u=0,n.mode=u8;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=et;break}if((c&15)!==c8){e.msg="unknown compression method",n.mode=et;break}if(c>>>=4,u-=4,T=(c&15)+8,n.wbits===0&&(n.wbits=T),T>15||T>n.wbits){e.msg="invalid window size",n.mode=et;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=c&512?y8:fi,c=0,u=0;break;case u8:for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.flags=c,(n.flags&255)!==c8){e.msg="unknown compression method",n.mode=et;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=et;break}n.head&&(n.head.text=c>>8&1),n.flags&512&&n.wrap&4&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Tt(n.check,P,2,0)),c=0,u=0,n.mode=f8;case f8:for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.head&&(n.head.time=c),n.flags&512&&n.wrap&4&&(P[0]=c&255,P[1]=c>>>8&255,P[2]=c>>>16&255,P[3]=c>>>24&255,n.check=Tt(n.check,P,4,0)),c=0,u=0,n.mode=h8;case h8:for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&n.wrap&4&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Tt(n.check,P,2,0)),c=0,u=0,n.mode=d8;case d8:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&n.wrap&4&&(P[0]=c&255,P[1]=c>>>8&255,n.check=Tt(n.check,P,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=p8;case p8:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(T=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),T)),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=g8;case g8:if(n.flags&2048){if(s===0)break e;d=0;do T=r[a+d++],n.head&&T&&n.length<65536&&(n.head.name+=String.fromCharCode(T));while(T&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=Tt(n.check,r,d,a)),s-=d,a+=d,T)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=m8;case m8:if(n.flags&4096){if(s===0)break e;d=0;do T=r[a+d++],n.head&&T&&n.length<65536&&(n.head.comment+=String.fromCharCode(T));while(T&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=Tt(n.check,r,d,a)),s-=d,a+=d,T)break e}else n.head&&(n.head.comment=null);n.mode=b8;case b8:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.wrap&4&&c!==(n.check&65535)){e.msg="header crc mismatch",n.mode=et;break}c=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=fi;break;case y8:for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}e.adler=n.check=F8(c),c=0,u=0,n.mode=yp;case yp:if(n.havedict===0)return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,WK;e.adler=n.check=1,n.mode=fi;case fi:if(t===jK||t===mp)break e;case z2:if(n.last){c>>>=u&7,u-=u&7,n.mode=$2;break}for(;u<3;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}switch(n.last=c&1,c>>>=1,u-=1,c&3){case 0:n.mode=v8;break;case 1:if(eJ(n),n.mode=vp,t===mp){c>>>=2,u-=2;break e}break;case 2:n.mode=x8;break;case 3:e.msg="invalid block type",n.mode=et}c>>>=2,u-=2;break;case v8:for(c>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=et;break}if(n.length=c&65535,c=0,u=0,n.mode=U2,t===mp)break e;case U2:n.mode=w8;case w8:if(d=n.length,d){if(d>s&&(d=s),d>l&&(d=l),d===0)break e;i.set(r.subarray(a,a+d),o),s-=d,a+=d,l-=d,o+=d,n.length-=d;break}n.mode=fi;break;case x8:for(;u<14;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.nlen=(c&31)+257,c>>>=5,u-=5,n.ndist=(c&31)+1,c>>>=5,u-=5,n.ncode=(c&15)+4,c>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=et;break}n.have=0,n.mode=A8;case A8:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.lens[oe[n.have++]]=c&7,c>>>=3,u-=3}for(;n.have<19;)n.lens[oe[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=gf(VK,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid code lengths set",n.mode=et;break}n.have=0,n.mode=E8;case E8:for(;n.have<n.nlen+n.ndist;){for(;b=n.lencode[c&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(A<16)c>>>=y,u-=y,n.lens[n.have++]=A;else{if(A===16){for(N=y+2;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(c>>>=y,u-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=et;break}T=n.lens[n.have-1],d=3+(c&3),c>>>=2,u-=2}else if(A===17){for(N=y+3;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=y,u-=y,T=0,d=3+(c&7),c>>>=3,u-=3}else{for(N=y+7;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=y,u-=y,T=0,d=11+(c&127),c>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=et;break}for(;d--;)n.lens[n.have++]=T}}if(n.mode===et)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=et;break}if(n.lenbits=9,G={bits:n.lenbits},D=gf(i8,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid literal/lengths set",n.mode=et;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},D=gf(a8,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,D){e.msg="invalid distances set",n.mode=et;break}if(n.mode=vp,t===mp)break e;case vp:n.mode=wp;case wp:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,zK(e,h),o=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,c=n.hold,u=n.bits,n.mode===fi&&(n.back=-1);break}for(n.back=0;b=n.lencode[c&(1<<n.lenbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(w&&!(w&240)){for(x=y,E=w,_=A;b=n.lencode[_+((c&(1<<x+E)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=x,u-=x,n.back+=x}if(c>>>=y,u-=y,n.back+=y,n.length=A,w===0){n.mode=T8;break}if(w&32){n.back=-1,n.mode=fi;break}if(w&64){e.msg="invalid literal/length code",n.mode=et;break}n.extra=w&15,n.mode=S8;case S8:if(n.extra){for(N=n.extra;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=_8;case _8:for(;b=n.distcode[c&(1<<n.distbits)-1],y=b>>>24,w=b>>>16&255,A=b&65535,!(y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(!(w&240)){for(x=y,E=w,_=A;b=n.distcode[_+((c&(1<<x+E)-1)>>x)],y=b>>>24,w=b>>>16&255,A=b&65535,!(x+y<=u);){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}c>>>=x,u-=x,n.back+=x}if(c>>>=y,u-=y,n.back+=y,w&64){e.msg="invalid distance code",n.mode=et;break}n.offset=A,n.extra=w&15,n.mode=C8;case C8:if(n.extra){for(N=n.extra;u<N;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=et;break}n.mode=k8;case k8:if(l===0)break e;if(d=h-l,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=et;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>l&&(d=l),l-=d,n.length-=d;do i[o++]=g[p++];while(--d);n.length===0&&(n.mode=wp);break;case T8:if(l===0)break e;i[o++]=n.length,l--,n.mode=wp;break;case $2:if(n.wrap){for(;u<32;){if(s===0)break e;s--,c|=r[a++]<<u,u+=8}if(h-=l,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?Tt(n.check,i,h,o-h):of(n.check,i,h,o-h)),h=l,n.wrap&4&&(n.flags?c:F8(c))!==n.check){e.msg="incorrect data check",n.mode=et;break}c=0,u=0}n.mode=I8;case I8:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,c+=r[a++]<<u,u+=8}if(n.wrap&4&&c!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=et;break}c=0,u=0}n.mode=R8;case R8:D=qK;break e;case et:D=s8;break e;case D8:return l8;case B8:default:return Un}return e.next_out=o,e.avail_out=l,e.next_in=a,e.avail_in=s,n.hold=c,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<et&&(n.mode<$2||t!==o8))&&z8(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):of(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===fi?128:0)+(n.mode===vp||n.mode===U2?256:0),(f===0&&h===0||t===o8)&&D===Ho&&(D=YK),D},nJ=e=>{if(Go(e))return Un;let t=e.state;return t.window&&(t.window=null),e.state=null,Ho},rJ=(e,t)=>{if(Go(e))return Un;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,Ho):Un},iJ=(e,t)=>{const n=t.length;let r,i,a;return Go(e)||(r=e.state,r.wrap!==0&&r.mode!==yp)?Un:r.mode===yp&&(i=1,i=of(i,t,n,0),i!==r.check)?s8:(a=z8(e,t,n,n),a?(r.mode=D8,l8):(r.havedict=1,Ho))};var aJ=P8,oJ=O8,sJ=M8,lJ=JK,cJ=L8,uJ=tJ,fJ=nJ,hJ=rJ,dJ=iJ,pJ="pako inflate (from Nodeca project)",hi={inflateReset:aJ,inflateReset2:oJ,inflateResetKeep:sJ,inflateInit:lJ,inflateInit2:cJ,inflate:uJ,inflateEnd:fJ,inflateGetHeader:hJ,inflateSetDictionary:dJ,inflateInfo:pJ};function gJ(){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 mJ=gJ;const U8=Object.prototype.toString,{Z_NO_FLUSH:bJ,Z_FINISH:yJ,Z_OK:mf,Z_STREAM_END:V2,Z_NEED_DICT:j2,Z_STREAM_ERROR:vJ,Z_DATA_ERROR:$8,Z_MEM_ERROR:wJ}=sf;function bf(e){this.options=dp.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 Kk,this.strm.avail_out=0;let n=hi.inflateInit2(this.strm,t.windowBits);if(n!==mf)throw new Error(al[n]);if(this.header=new mJ,hi.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=pf.string2buf(t.dictionary):U8.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=hi.inflateSetDictionary(this.strm,t.dictionary),n!==mf)))throw new Error(al[n])}bf.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?yJ:bJ,U8.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=hi.inflate(n,o),a===j2&&i&&(a=hi.inflateSetDictionary(n,i),a===mf?a=hi.inflate(n,o):a===$8&&(a=j2));n.avail_in>0&&a===V2&&n.state.wrap>0&&e[n.next_in]!==0;)hi.inflateReset(n),a=hi.inflate(n,o);switch(a){case vJ:case $8:case j2:case wJ:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===V2))if(this.options.to==="string"){let l=pf.utf8border(n.output,n.next_out),c=n.next_out-l,u=pf.buf2string(n.output,l);n.next_out=c,n.avail_out=r-c,c&&n.output.set(n.output.subarray(l,l+c),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===mf&&s===0)){if(a===V2)return a=hi.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},bf.prototype.onData=function(e){this.chunks.push(e)},bf.prototype.onEnd=function(e){e===mf&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=dp.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function q2(e,t){const n=new bf(t);if(n.push(e),n.err)throw n.msg||al[n.err];return n.result}function xJ(e,t){return t=t||{},t.raw=!0,q2(e,t)}var AJ=bf,EJ=q2,SJ=xJ,_J=q2,CJ=sf,kJ={Inflate:AJ,inflate:EJ,inflateRaw:SJ,ungzip:_J,constants:CJ};const{Inflate:One,inflate:Lne,inflateRaw:TJ,ungzip:Nne}=kJ;var IJ=TJ;function RJ(e){return IJ(e.subarray(2))}let DJ=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function BJ(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 xp(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new DJ("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const FJ=1,MJ=2,PJ=3;function W2(e,t,n,r){return e<r&&t>=n}function OJ(e){const t=e?"big":"little",n=new Oe().endianess(t).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),r=new Oe().endianess(t).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:new Oe().endianess(t).array("blocksToFetch",{length:"cnt",type:new Oe().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:new Oe().array("recurOffsets",{length:"cnt",type:new Oe().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),i=new Oe().endianess(t).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:new Oe().endianess(t).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:{[PJ]:new Oe().array("items",{length:"itemCount",type:new Oe().floatle("score")}),[MJ]:new Oe().array("items",{length:"itemCount",type:new Oe().endianess(t).int32("start").floatle("score")}),[FJ]:new Oe().array("items",{length:"itemCount",type:new Oe().endianess(t).int32("start").int32("end").floatle("score")})}}),bigBedParser:i,summaryParser:n,leafParser:r}}class H8{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 sp({cache:new lp({maxSize:1e3}),fill:async(l,c)=>{const u=Number(l.length),f=Number(l.offset),{buffer:h}=await this.bbi.read(Ae.Buffer.alloc(u),0,u,f,{signal:c});return h}}),!(r>=0))throw new Error("invalid cirTreeOffset!");const s=OJ(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}async readWigData(t,n,r,i,a){try{const{refsByName:o,bbi:s,cirTreeOffset:l,isBigEndian:c}=this,u=o[t];u===void 0&&i.complete();const f={chrId:u,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=s.read(Ae.Buffer.alloc(48),0,48,Number(l),a));const{buffer:h}=await this.cirTreePromise,d=c?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],g=0;const b=(x,E,_)=>{try{const T=x.subarray(E),D=this.leafParser.parse(T);if(D.blocksToFetch&&(p=p.concat(D.blocksToFetch.filter(P=>y(P)).map(P=>({offset:P.blockOffset,length:P.blockSize})))),D.recurOffsets){const P=D.recurOffsets.filter(G=>y(G)).map(G=>Number(G.blockOffset));P.length>0&&A(P,_+1)}}catch(T){i.error(T)}},y=x=>{const{startChrom:E,startBase:_,endChrom:T,endBase:D}=x;return(E<u||E===u&&_<=r)&&(T>u||T===u&&D>=n)},w=async(x,E,_)=>{try{const T=E.max()-E.min(),D=E.min(),P=await this.featureCache.get(`${T}_${D}`,{length:T,offset:D},a==null?void 0:a.signal);for(const G of x)E.contains(G)&&(b(P,G-D,_),g-=1,g===0&&this.readFeatures(i,p,{...a,request:f}))}catch(T){i.error(T)}},A=(x,E)=>{try{g+=x.length;const _=4+Number(d)*32;let T=new ha(x[0],x[0]+_);for(let D=1;D<x.length;D+=1){const P=new ha(x[D],x[D]+_);T=T.union(P)}T.getRanges().map(D=>w(x,D,E))}catch(_){i.error(_)}};return A([Number(l)+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 l=o.getUint32(a,!0);a+=4;const c=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&&W2(l,c,r.start,r.end))&&i.push({start:l,end:c,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=>W2(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 l=a.getUint32(o,!0);o+=4;const c=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+c}}break}case 3:{for(let d=0;d<f;d++){const p=a.getFloat32(o,!0);o+=4;const g=s+d*l;h[d]={score:p,start:g,end:g+c}}break}}return r?h.filter(d=>W2(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,l=BJ(n);xp(o),await Promise.all(l.map(async c=>{xp(o);const{length:u,offset:f}=c,h=await this.featureCache.get(`${u}_${f}`,c,o);for(const d of c.blocks){xp(o);let p=Number(d.offset)-Number(c.offset),g=h;switch(a&&(g=RJ(h.subarray(p)),p=0),xp(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 Y2=function(e,t){return Y2=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])},Y2(e,t)};function Z2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Y2(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function LJ(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{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}function G8(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(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function yf(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 Q2(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 X2(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 hl(e){return this instanceof hl?(this.v=e,this):new hl(e)}function NJ(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{l(r[h](d))}catch(p){f(a[0][3],p)}}function l(h){h.value instanceof hl?Promise.resolve(h.value.v).then(c,u):f(a[0][2],h)}function c(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 zJ(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 yf=="function"?yf(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,l){o=e[a](o),i(s,l,o.done,o.value)})}}function i(a,o,s,l){Promise.resolve(l).then(function(c){a({value:c,done:s})},o)}}typeof SuppressedError=="function"&&SuppressedError;function wt(e){return typeof e=="function"}function V8(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 K2=V8(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
3347
3352
  `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
3348
- `):"",this.name="UnsubscriptionError",this.errors=n}});function j8(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var J2=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=yf(o),l=s.next();!l.done;l=s.next()){var c=l.value;c.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(wt(u))try{u()}catch(g){a=g instanceof K2?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=yf(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{W8(p)}catch(g){a=a??[],g instanceof K2?a=X2(X2([],Q2(a)),Q2(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 K2(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)W8(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)&&j8(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&j8(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();J2.EMPTY;function q8(e){return e instanceof J2||e&&"closed"in e&&wt(e.remove)&&wt(e.add)&&wt(e.unsubscribe)}function W8(e){wt(e)?e():e.unsubscribe()}var Y8={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,X2([e,t],Q2(n)))},clearTimeout:function(e){var t=Z8.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Q8(e){Z8.setTimeout(function(){throw e})}function X8(){}function $J(e){e()}var ev=function(e){Z2(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,q8(n)&&n.add(r)):r.destination=jJ,r}return t.create=function(n,r,i){return new Ap(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}(J2),HJ=Function.prototype.bind;function tv(e,t){return HJ.call(e,t)}var GJ=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){Ep(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Ep(r)}else Ep(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Ep(n)}},e}(),Ap=function(e){Z2(t,e);function t(n,r,i){var a=e.call(this)||this,o;if(wt(n)||!n)o={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;a&&Y8.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return a.unsubscribe()},o={next:n.next&&tv(n.next,s),error:n.error&&tv(n.error,s),complete:n.complete&&tv(n.complete,s)}):o=n}return a.destination=new GJ(o),a}return t}(ev);function Ep(e){Q8(e)}function VJ(e){throw e}var jJ={closed:!0,next:X8,error:VJ,complete:X8},nv=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function K8(e){return e}function qJ(e){return e.length===0?K8:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var $n=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=YJ(t)?t:new Ap(t,n,r);return $J(function(){var o=i,s=o.operator,l=o.source;a.add(s?s.call(a,l):l?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=J8(n),new n(function(i,a){var o=new Ap({next:function(s){try{t(s)}catch(l){a(l),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[nv]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return qJ(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=J8(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 J8(e){var t;return(t=e??Y8.Promise)!==null&&t!==void 0?t:Promise}function WJ(e){return e&&wt(e.next)&&wt(e.error)&&wt(e.complete)}function YJ(e){return e&&e instanceof ev||WJ(e)&&q8(e)}function ZJ(e){return wt(e==null?void 0:e.lift)}function dl(e){return function(t){if(ZJ(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 vf(e,t,n,r,i){return new QJ(e,t,n,r,i)}var QJ=function(e){Z2(t,e);function t(n,r,i,a,o,s){var l=e.call(this,n)||this;return l.onFinalize=o,l.shouldUnsubscribe=s,l._next=r?function(c){try{r(c)}catch(u){n.error(u)}}:e.prototype._next,l._error=a?function(c){try{a(c)}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,l}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}(ev),XJ=new $n(function(e){return e.complete()});function KJ(e){return e&&wt(e.schedule)}function eT(e){return e[e.length-1]}function JJ(e){return KJ(eT(e))?e.pop():void 0}function eee(e,t){return typeof eT(e)=="number"?e.pop():t}var tT=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function nT(e){return wt(e==null?void 0:e.then)}function rT(e){return wt(e[nv])}function iT(e){return Symbol.asyncIterator&&wt(e==null?void 0:e[Symbol.asyncIterator])}function aT(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 tee(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var oT=tee();function sT(e){return wt(e==null?void 0:e[oT])}function lT(e){return zJ(this,arguments,function(){var n,r,i,a;return G8(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,hl(n.read())];case 3:return r=o.sent(),i=r.value,a=r.done,a?[4,hl(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,hl(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 cT(e){return wt(e==null?void 0:e.getReader)}function pl(e){if(e instanceof $n)return e;if(e!=null){if(rT(e))return nee(e);if(tT(e))return ree(e);if(nT(e))return iee(e);if(iT(e))return uT(e);if(sT(e))return aee(e);if(cT(e))return oee(e)}throw aT(e)}function nee(e){return new $n(function(t){var n=e[nv]();if(wt(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ree(e){return new $n(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function iee(e){return new $n(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,Q8)})}function aee(e){return new $n(function(t){var n,r;try{for(var i=yf(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 uT(e){return new $n(function(t){see(e,t).catch(function(n){return t.error(n)})})}function oee(e){return uT(lT(e))}function see(e,t){var n,r,i,a;return NJ(this,void 0,void 0,function(){var o,s;return G8(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=UJ(e),l.label=1;case 1:return[4,n.next()];case 2:if(r=l.sent(),!!r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:l.sent(),l.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 ya(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 fT(e,t){return t===void 0&&(t=0),dl(function(n,r){n.subscribe(vf(r,function(i){return ya(r,e,function(){return r.next(i)},t)},function(){return ya(r,e,function(){return r.complete()},t)},function(i){return ya(r,e,function(){return r.error(i)},t)}))})}function hT(e,t){return t===void 0&&(t=0),dl(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function lee(e,t){return pl(e).pipe(hT(t),fT(t))}function cee(e,t){return pl(e).pipe(hT(t),fT(t))}function uee(e,t){return new $n(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function fee(e,t){return new $n(function(n){var r;return ya(n,t,function(){r=e[oT](),ya(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 wt(r==null?void 0:r.return)&&r.return()}})}function dT(e,t){if(!e)throw new Error("Iterable cannot be null");return new $n(function(n){ya(n,t,function(){var r=e[Symbol.asyncIterator]();ya(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function hee(e,t){return dT(lT(e),t)}function dee(e,t){if(e!=null){if(rT(e))return lee(e,t);if(tT(e))return uee(e,t);if(nT(e))return cee(e,t);if(iT(e))return dT(e,t);if(sT(e))return fee(e,t);if(cT(e))return hee(e,t)}throw aT(e)}function pee(e,t){return t?dee(e,t):pl(e)}var gee=V8(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function pT(e,t){var n=typeof t=="object";return new Promise(function(r,i){var a=new Ap({next:function(o){r(o),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new gee)}});e.subscribe(a)})}function gT(e,t){return dl(function(n,r){var i=0;n.subscribe(vf(r,function(a){r.next(e.call(t,a,i++))}))})}function mee(e,t,n,r,i,a,o,s){var l=[],c=0,u=0,f=!1,h=function(){f&&!l.length&&!c&&t.complete()},d=function(g){return c<r?p(g):l.push(g)},p=function(g){a&&t.next(g),c++;var b=!1;pl(n(g,u++)).subscribe(vf(t,function(y){i==null||i(y),a?d(y):t.next(y)},function(){b=!0},void 0,function(){if(b)try{c--;for(var y=function(){var w=l.shift();o?ya(t,o,function(){return p(w)}):p(w)};l.length&&c<r;)y();h()}catch(w){t.error(w)}}))};return e.subscribe(vf(t,d,function(){f=!0,h()})),function(){s==null||s()}}function mT(e,t,n){return n===void 0&&(n=1/0),wt(t)?mT(function(r,i){return gT(function(a,o){return t(r,a,i,o)})(pl(e(r,i)))},n):(typeof t=="number"&&(n=t),dl(function(r,i){return mee(r,i,e,n)}))}function bee(e){return e===void 0&&(e=1/0),mT(K8,e)}function yee(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=JJ(e),r=eee(e,1/0),i=e;return i.length?i.length===1?pl(i[0]):bee(r)(pee(i,n)):XJ}function vee(e,t,n,r,i){return function(a,o){var s=n,l=t,c=0;a.subscribe(vf(o,function(u){var f=c++;l=s?e(l,u,f):(s=!0,u),r&&o.next(l)},i&&function(){s&&o.next(l),o.complete()}))}}function bT(e,t){return dl(vee(e,t,arguments.length>=2,!1,!0))}var wee=function(e,t){return e.push(t),e};function xee(){return dl(function(e,t){bT(wee,[])(e).subscribe(t)})}const yT=-2003829722,rv=-2021002517;function Aee(e){return new TextDecoder().decode(e)}function vT(e){const t=e?"big":"little",n=new Oe().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 Oe().endianess(t).uint32("reductionLevel").uint32("reserved").uint64("dataOffset").uint64("indexOffset")}),r=new Oe().endianess(t).uint64("basesCovered").doublele("scoreMin").doublele("scoreMax").doublele("scoreSum").doublele("scoreSumSquares"),i=new Oe().endianess(t).uint32("magic").uint32("blockSize").uint32("keySize").uint32("valSize").uint64("itemCount"),a=new Oe().endianess(t).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");return{chromTreeParser:i,totalSummaryParser:r,headerParser:n,isLeafNode:a}}class wT{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 So(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(Ae.Buffer.alloc(n),0,n,0,t),i=this._isBigEndian(r),a=vT(i),o=a.headerParser.parse(r),{magic:s,asOffset:l,totalSummaryOffset:c}=o;if(o.fileType=s===rv?"bigbed":"bigwig",l>n||c>n)return this._getMainHeader(t,n*2);if(l){const u=Number(o.asOffset);o.autoSql=Aee(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===yT||n===rv)return!1;if(n=t.readInt32BE(0),n===yT||n===rv)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 l=Number(t.chromTreeOffset);for(;s%4!==0;)s+=1;const c=s-l,{buffer:u}=await this.bbi.read(Ae.Buffer.alloc(c),0,c,Number(l),n),f=vT(r),{keySize:h}=f.chromTreeParser.parse(u),d=new Oe().endianess(i).string("key",{stripNull:!0,length:h}).uint32("refId").uint32("refSize").saveOffset("offset"),p=new Oe().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:E}=A;if(w+=A.offset,x)for(let _=0;_<E;_+=1){const T=d.parse(u.subarray(w));w+=T.offset;const{key:D,refId:P,refSize:G}=T,N={name:D,id:P,length:G};o[this.renameRefSeqs(D)]=P,a[P]=N}else{const _=[];for(let T=0;T<E;T+=1){const D=p.parse(u.subarray(w)),{childOffset:P}=D;w+=D.offset,_.push(b(Number(P)-Number(l)))}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 H8(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:l}=i||{};return s?o=await this.getView(1/s,i):l?o=await this.getView(l,i):o=await this.getView(1,i),new $n(c=>{o.readWigData(a,n,r,c,i)})}async getFeatures(t,n,r,i){const a=await this.getFeatureStream(t,n,r,i);return(await pT(a.pipe(xee()))).flat()}}class Eee extends wT{async getView(t,n){const{zoomLevels:r,refsByName:i,fileSize:a,isBigEndian:o,uncompressBufSize:s}=await this.getHeader(n),l=1/t;let c=r.length;a||(c-=1);for(let u=c;u>=0;u-=1){const f=r[u];if(f&&f.reductionLevel<=2*l){const h=Number(f.indexOffset);return new H8(this.bbi,i,h,o,s>0,"summary")}}return this.getUnzoomedView(n)}}function See(e){return e.filter(t=>!!t)}class _ee extends wT{constructor(){super(...arguments),this.readIndicesCache=new sp({cache:new lp({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(Ae.Buffer.alloc(64),0,64,Number(n)),a=r?"big":"little",o=new Oe().endianess(a).uint16("size").uint16("count").uint64("offset").parse(i),{count:s,offset:l}=o;if(s===0)return[];const c=20,u=c*s,{buffer:f}=await this.bbi.read(Ae.Buffer.alloc(u),0,u,Number(l)),h=new Oe().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*c)));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:l}=o,{buffer:c}=await this.bbi.read(Ae.Buffer.alloc(32),0,32,Number(s),n),u=r?"big":"little",f=new Oe().endianess(u).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),{blockSize:h,keySize:d,valSize:p}=f.parse(c),g=new Oe().endianess(u).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:new Oe().array("leafkeys",{length:"cnt",type:new Oe().endianess(u).string("key",{length:d,stripNull:!0}).uint64("offset")}),1:new Oe().array("keys",{length:"cnt",type:new Oe().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:E}=await this.bbi.read(Ae.Buffer.alloc(x),0,x,A,n),_=g.parse(E);if(_.leafkeys){let T;for(let D=0;D<_.leafkeys.length;D+=1){const{key:P}=_.leafkeys[D];if(t.localeCompare(P)<0&&T)return b(T);T=_.leafkeys[D].offset}return b(T)}for(let T=0;T<_.keys.length;T+=1)if(_.keys[T].key===t)return{..._.keys[T],field:l}},y=32;return b(Number(s)+y)});return See(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 $n(l=>{i.readFeatures(l,[s],n)}).pipe(bT((l,c)=>l.concat(c)),gT(l=>{for(const c of l)c.field=s.field;return l})));return(await pT(yee(...a))).filter(s=>{var l;return((l=s.rest)===null||l===void 0?void 0:l.split(" ")[(s.field||0)-3])===t})}}const xT=Object.freeze(Object.defineProperty({__proto__:null,BigBed:_ee,BigWig:Eee},Symbol.toStringTag,{value:"Module"}));function Cee(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function gl(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,gl)}Cee(gl,Error),gl.buildMessage=function(e,t){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var u="",f;for(f=0;f<c.parts.length;f++)u+=c.parts[f]instanceof Array?a(c.parts[f][0])+"-"+a(c.parts[f][1]):a(c.parts[f]);return"["+(c.inverted?"^":"")+u+"]"},any:function(c){return"any character"},end:function(c){return"end of input"},other:function(c){return c.description}};function r(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.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(c){return c.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(c){return n[c.type](c)}function s(c){var u=new Array(c.length),f,h;for(f=0;f<c.length;f++)u[f]=o(c[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 l(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+s(e)+" but "+l(t)+" found."};function kee(e,t){t=t!==void 0?t:{};var n={},r={declaration:jI},i=jI,a="(",o=ze("(",!1),s=")",l=ze(")",!1),c=function(k,$,J,ee){return{type:k,name:$,comment:J,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",E=ze("index",!1),_="unique",T=ze("unique",!1),D=function(k,$){return $},P=function(k,$){return k.name&&$.unshift(k),$},G="#",N=ze("#",!1),oe=";",ue=ze(";",!1),ne=function(k,$,J){return{type:k,name:$,comment:J}},pe="[",Re=ze("[",!1),xe="]",nt=ze("]",!1),rt=function(k,$,J,ee){return{type:k,size:$,name:J,comment:ee}},ut=function(k,$,J,ee){return{type:k,vals:$,name:J,comment:ee}},De=",",Be=ze(",",!1),Rt=function(k,$){return $.unshift(k),$},cn="int",je=ze("int",!1),L="uint",O=ze("uint",!1),Z="short",q=ze("short",!1),X="ushort",I=ze("ushort",!1),C="byte",j=ze("byte",!1),Q="ubyte",ge=ze("ubyte",!1),se="float",me=ze("float",!1),un="char",Ca=ze("char",!1),ka="string",Ta=ze("string",!1),Vt="lstring",xi=ze("lstring",!1),Ia="enum",fn=ze("enum",!1),Lr="double",S=ze("double",!1),m="bigint",v=ze("bigint",!1),R="set",M=ze("set",!1),z=function(k,$){return k+" "+$},W=/^[a-zA-Z_]/,be=lh([["a","z"],["A","Z"],"_"],!1,!1),Qe=/^[a-zA-Z0-9_]/,He=lh([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),it=function(k){return $I()},Fe=/^[^\n\r]/,OI=lh([`
3349
- `,"\r"],!0,!1),Wte=function(k){return k.join("").replace(/^"/,"").replace(/"$/,"")},Yte=HI("integer"),LI=/^[0-9]/,NI=lh([["0","9"]],!1,!1),Zte=function(){return parseInt($I(),10)},Qte=HI("whitespace"),zI=/^[ \t\n\r]/,UI=lh([" "," ",`
3350
- `,"\r"],!1,!1),F=0,Kt=0,hg=[{line:1,column:1}],Nr=0,$v=[],ce=0,dg;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 $I(){return e.substring(Kt,F)}function ze(k,$){return{type:"literal",text:k,ignoreCase:$}}function lh(k,$,J){return{type:"class",parts:k,inverted:$,ignoreCase:J}}function Xte(){return{type:"end"}}function HI(k){return{type:"other",description:k}}function GI(k){var $=hg[k],J;if($)return $;for(J=k-1;!hg[J];)J--;for($=hg[J],$={line:$.line,column:$.column};J<k;)e.charCodeAt(J)===10?($.line++,$.column=1):$.column++,J++;return hg[k]=$,$}function VI(k,$){var J=GI(k),ee=GI($);return{start:{offset:k,line:J.line,column:J.column},end:{offset:$,line:ee.line,column:ee.column}}}function fe(k){F<Nr||(F>Nr&&(Nr=F,$v=[]),$v.push(k))}function Kte(k,$,J){return new gl(gl.buildMessage(k,$),k,$,J)}function jI(){var k,$,J,ee,le,qe,at,jn,Ra,Ai,Da,Ei,Ba,Si;return k=F,$=Ee(),$!==n?(J=qI(),J!==n?(ee=Ee(),ee!==n?(le=WI(),le!==n?(qe=Ee(),qe!==n?(at=pg(),at!==n?(jn=Ee(),jn!==n?(e.charCodeAt(F)===40?(Ra=a,F++):(Ra=n,ce===0&&fe(o)),Ra!==n?(Ai=Ee(),Ai!==n?(Da=Jte(),Da!==n?(Ei=Ee(),Ei!==n?(e.charCodeAt(F)===41?(Ba=s,F++):(Ba=n,ce===0&&fe(l)),Ba!==n?(Si=Ee(),Si!==n?(Kt=k,$=c(J,le,at,Da),k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n),k}function qI(){var k;return e.substr(F,6)===u?(k=u,F+=6):(k=n,ce===0&&fe(f)),k===n&&(e.substr(F,6)===h?(k=h,F+=6):(k=n,ce===0&&fe(d)),k===n&&(e.substr(F,5)===p?(k=p,F+=5):(k=n,ce===0&&fe(g)))),k}function WI(){var k,$,J,ee;return k=fr(),k===n&&(k=F,$=fr(),$!==n?(J=YI(),J!==n?($=[$,J],k=$):(F=k,k=n)):(F=k,k=n),k===n&&(k=F,$=fr(),$!==n?(e.substr(F,4)===b?(J=b,F+=4):(J=n,ce===0&&fe(y)),J!==n?($=[$,J],k=$):(F=k,k=n)):(F=k,k=n),k===n&&(k=F,$=fr(),$!==n?(J=YI(),J!==n?(e.substr(F,4)===b?(ee=b,F+=4):(ee=n,ce===0&&fe(y)),ee!==n?($=[$,J,ee],k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)))),k}function YI(){var k;return e.substr(F,7)===w?(k=w,F+=7):(k=n,ce===0&&fe(A)),k===n&&(e.substr(F,5)===x?(k=x,F+=5):(k=n,ce===0&&fe(E)),k===n&&(e.substr(F,6)===_?(k=_,F+=6):(k=n,ce===0&&fe(T)))),k}function pg(){var k;return k=ZI(),k===n&&(k=Ee()),k}function Jte(){var k,$,J,ee,le,qe,at;if(k=F,$=Hv(),$!==n)if(J=Ee(),J!==n){for(ee=[],le=F,qe=Ee(),qe!==n?(at=Hv(),at!==n?(Kt=le,qe=D($,at),le=qe):(F=le,le=n)):(F=le,le=n);le!==n;)ee.push(le),le=F,qe=Ee(),qe!==n?(at=Hv(),at!==n?(Kt=le,qe=D($,at),le=qe):(F=le,le=n)):(F=le,le=n);ee!==n?(le=Ee(),le!==n?(Kt=k,$=P($,ee),k=$):(F=k,k=n)):(F=k,k=n)}else F=k,k=n;else F=k,k=n;return k}function ene(){var k;return e.charCodeAt(F)===35?(k=G,F++):(k=n,ce===0&&fe(N)),k}function tne(){var k,$,J,ee,le;return k=F,$=Ee(),$!==n?(J=ene(),J!==n?(ee=ZI(),ee!==n?(le=Ee(),le!==n?($=[$,J,ee,le],k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n),k}function Hv(){var k,$,J,ee,le,qe,at,jn,Ra,Ai,Da,Ei,Ba,Si;return k=F,$=Gv(),$!==n?(J=Ee(),J!==n?(ee=fr(),ee!==n?(le=Ee(),le!==n?(e.charCodeAt(F)===59?(qe=oe,F++):(qe=n,ce===0&&fe(ue)),qe!==n?(at=Ee(),at!==n?(jn=pg(),jn!==n?(Kt=k,$=ne($,ee,jn),k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n),k===n&&(k=F,$=Gv(),$!==n?(J=Ee(),J!==n?(e.charCodeAt(F)===91?(ee=pe,F++):(ee=n,ce===0&&fe(Re)),ee!==n?(le=Ee(),le!==n?(qe=rne(),qe!==n?(at=Ee(),at!==n?(e.charCodeAt(F)===93?(jn=xe,F++):(jn=n,ce===0&&fe(nt)),jn!==n?(Ra=Ee(),Ra!==n?(Ai=fr(),Ai!==n?(Da=Ee(),Da!==n?(e.charCodeAt(F)===59?(Ei=oe,F++):(Ei=n,ce===0&&fe(ue)),Ei!==n?(Ba=Ee(),Ba!==n?(Si=pg(),Si!==n?(Kt=k,$=rt($,qe,Ai,Si),k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n),k===n&&(k=F,$=Gv(),$!==n?(J=Ee(),J!==n?(e.charCodeAt(F)===40?(ee=a,F++):(ee=n,ce===0&&fe(o)),ee!==n?(le=Ee(),le!==n?(qe=nne(),qe!==n?(at=Ee(),at!==n?(e.charCodeAt(F)===41?(jn=s,F++):(jn=n,ce===0&&fe(l)),jn!==n?(Ra=Ee(),Ra!==n?(Ai=fr(),Ai!==n?(Da=Ee(),Da!==n?(e.charCodeAt(F)===59?(Ei=oe,F++):(Ei=n,ce===0&&fe(ue)),Ei!==n?(Ba=Ee(),Ba!==n?(Si=pg(),Si!==n?(Kt=k,$=ut($,qe,Ai,Si),k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n),k===n&&(k=tne()))),k}function nne(){var k,$,J,ee,le,qe,at;if(k=F,$=fr(),$!==n){for(J=[],ee=F,e.charCodeAt(F)===44?(le=De,F++):(le=n,ce===0&&fe(Be)),le!==n?(qe=Ee(),qe!==n?(at=fr(),at!==n?(Kt=ee,le=D($,at),ee=le):(F=ee,ee=n)):(F=ee,ee=n)):(F=ee,ee=n);ee!==n;)J.push(ee),ee=F,e.charCodeAt(F)===44?(le=De,F++):(le=n,ce===0&&fe(Be)),le!==n?(qe=Ee(),qe!==n?(at=fr(),at!==n?(Kt=ee,le=D($,at),ee=le):(F=ee,ee=n)):(F=ee,ee=n)):(F=ee,ee=n);J!==n?(Kt=k,$=Rt($,J),k=$):(F=k,k=n)}else F=k,k=n;return k}function Gv(){var k,$,J,ee;return e.substr(F,3)===cn?(k=cn,F+=3):(k=n,ce===0&&fe(je)),k===n&&(e.substr(F,4)===L?(k=L,F+=4):(k=n,ce===0&&fe(O)),k===n&&(e.substr(F,5)===Z?(k=Z,F+=5):(k=n,ce===0&&fe(q)),k===n&&(e.substr(F,6)===X?(k=X,F+=6):(k=n,ce===0&&fe(I)),k===n&&(e.substr(F,4)===C?(k=C,F+=4):(k=n,ce===0&&fe(j)),k===n&&(e.substr(F,5)===Q?(k=Q,F+=5):(k=n,ce===0&&fe(ge)),k===n&&(e.substr(F,5)===se?(k=se,F+=5):(k=n,ce===0&&fe(me)),k===n&&(e.substr(F,4)===un?(k=un,F+=4):(k=n,ce===0&&fe(Ca)),k===n&&(e.substr(F,6)===ka?(k=ka,F+=6):(k=n,ce===0&&fe(Ta)),k===n&&(e.substr(F,7)===Vt?(k=Vt,F+=7):(k=n,ce===0&&fe(xi)),k===n&&(e.substr(F,4)===Ia?(k=Ia,F+=4):(k=n,ce===0&&fe(fn)),k===n&&(e.substr(F,6)===Lr?(k=Lr,F+=6):(k=n,ce===0&&fe(S)),k===n&&(e.substr(F,6)===m?(k=m,F+=6):(k=n,ce===0&&fe(v)),k===n&&(e.substr(F,3)===R?(k=R,F+=3):(k=n,ce===0&&fe(M)),k===n&&(k=F,$=qI(),$!==n?(J=Ee(),J!==n?(ee=WI(),ee!==n?(Kt=k,$=z($,ee),k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n))))))))))))))),k}function rne(){var k;return k=ine(),k===n&&(k=fr()),k}function fr(){var k,$,J,ee,le;if(k=F,$=F,W.test(e.charAt(F))?(J=e.charAt(F),F++):(J=n,ce===0&&fe(be)),J!==n){for(ee=[],Qe.test(e.charAt(F))?(le=e.charAt(F),F++):(le=n,ce===0&&fe(He));le!==n;)ee.push(le),Qe.test(e.charAt(F))?(le=e.charAt(F),F++):(le=n,ce===0&&fe(He));ee!==n?(J=[J,ee],$=J):(F=$,$=n)}else F=$,$=n;return $!==n&&(Kt=k,$=it()),k=$,k}function ZI(){var k,$,J;for(k=F,$=[],Fe.test(e.charAt(F))?(J=e.charAt(F),F++):(J=n,ce===0&&fe(OI));J!==n;)$.push(J),Fe.test(e.charAt(F))?(J=e.charAt(F),F++):(J=n,ce===0&&fe(OI));return $!==n&&(Kt=k,$=Wte($)),k=$,k}function ine(){var k,$,J,ee;if(ce++,k=F,$=Ee(),$!==n){if(J=[],LI.test(e.charAt(F))?(ee=e.charAt(F),F++):(ee=n,ce===0&&fe(NI)),ee!==n)for(;ee!==n;)J.push(ee),LI.test(e.charAt(F))?(ee=e.charAt(F),F++):(ee=n,ce===0&&fe(NI));else J=n;J!==n?(Kt=k,$=Zte(),k=$):(F=k,k=n)}else F=k,k=n;return ce--,k===n&&($=n,ce===0&&fe(Yte)),k}function Ee(){var k,$;for(ce++,k=[],zI.test(e.charAt(F))?($=e.charAt(F),F++):($=n,ce===0&&fe(UI));$!==n;)k.push($),zI.test(e.charAt(F))?($=e.charAt(F),F++):($=n,ce===0&&fe(UI));return ce--,k===n&&($=n,ce===0&&fe(Qte)),k}if(dg=i(),dg!==n&&F===e.length)return dg;throw dg!==n&&F<e.length&&fe(Xte()),Kte($v,Nr<e.length?e.charAt(Nr):null,Nr<e.length?VI(Nr,Nr+1):VI(Nr,Nr))}var AT={SyntaxError:gl,parse:kee};const Tee=Bu(AT),iv=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
3353
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function j8(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var J2=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=yf(o),l=s.next();!l.done;l=s.next()){var c=l.value;c.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;if(wt(u))try{u()}catch(g){a=g instanceof K2?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=yf(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{W8(p)}catch(g){a=a??[],g instanceof K2?a=X2(X2([],Q2(a)),Q2(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 K2(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)W8(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)&&j8(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&j8(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();J2.EMPTY;function q8(e){return e instanceof J2||e&&"closed"in e&&wt(e.remove)&&wt(e.add)&&wt(e.unsubscribe)}function W8(e){wt(e)?e():e.unsubscribe()}var Y8={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,X2([e,t],Q2(n)))},clearTimeout:function(e){var t=Z8.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Q8(e){Z8.setTimeout(function(){throw e})}function X8(){}function UJ(e){e()}var ev=function(e){Z2(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,q8(n)&&n.add(r)):r.destination=VJ,r}return t.create=function(n,r,i){return new Ap(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}(J2),$J=Function.prototype.bind;function tv(e,t){return $J.call(e,t)}var HJ=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){Ep(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Ep(r)}else Ep(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Ep(n)}},e}(),Ap=function(e){Z2(t,e);function t(n,r,i){var a=e.call(this)||this,o;if(wt(n)||!n)o={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;a&&Y8.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return a.unsubscribe()},o={next:n.next&&tv(n.next,s),error:n.error&&tv(n.error,s),complete:n.complete&&tv(n.complete,s)}):o=n}return a.destination=new HJ(o),a}return t}(ev);function Ep(e){Q8(e)}function GJ(e){throw e}var VJ={closed:!0,next:X8,error:GJ,complete:X8},nv=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function K8(e){return e}function jJ(e){return e.length===0?K8:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var $n=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=WJ(t)?t:new Ap(t,n,r);return UJ(function(){var o=i,s=o.operator,l=o.source;a.add(s?s.call(a,l):l?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=J8(n),new n(function(i,a){var o=new Ap({next:function(s){try{t(s)}catch(l){a(l),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[nv]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return jJ(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=J8(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 J8(e){var t;return(t=e??Y8.Promise)!==null&&t!==void 0?t:Promise}function qJ(e){return e&&wt(e.next)&&wt(e.error)&&wt(e.complete)}function WJ(e){return e&&e instanceof ev||qJ(e)&&q8(e)}function YJ(e){return wt(e==null?void 0:e.lift)}function dl(e){return function(t){if(YJ(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 vf(e,t,n,r,i){return new ZJ(e,t,n,r,i)}var ZJ=function(e){Z2(t,e);function t(n,r,i,a,o,s){var l=e.call(this,n)||this;return l.onFinalize=o,l.shouldUnsubscribe=s,l._next=r?function(c){try{r(c)}catch(u){n.error(u)}}:e.prototype._next,l._error=a?function(c){try{a(c)}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,l}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}(ev),QJ=new $n(function(e){return e.complete()});function XJ(e){return e&&wt(e.schedule)}function eT(e){return e[e.length-1]}function KJ(e){return XJ(eT(e))?e.pop():void 0}function JJ(e,t){return typeof eT(e)=="number"?e.pop():t}var tT=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function nT(e){return wt(e==null?void 0:e.then)}function rT(e){return wt(e[nv])}function iT(e){return Symbol.asyncIterator&&wt(e==null?void 0:e[Symbol.asyncIterator])}function aT(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 eee(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var oT=eee();function sT(e){return wt(e==null?void 0:e[oT])}function lT(e){return NJ(this,arguments,function(){var n,r,i,a;return G8(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,hl(n.read())];case 3:return r=o.sent(),i=r.value,a=r.done,a?[4,hl(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,hl(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 cT(e){return wt(e==null?void 0:e.getReader)}function pl(e){if(e instanceof $n)return e;if(e!=null){if(rT(e))return tee(e);if(tT(e))return nee(e);if(nT(e))return ree(e);if(iT(e))return uT(e);if(sT(e))return iee(e);if(cT(e))return aee(e)}throw aT(e)}function tee(e){return new $n(function(t){var n=e[nv]();if(wt(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function nee(e){return new $n(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function ree(e){return new $n(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,Q8)})}function iee(e){return new $n(function(t){var n,r;try{for(var i=yf(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 uT(e){return new $n(function(t){oee(e,t).catch(function(n){return t.error(n)})})}function aee(e){return uT(lT(e))}function oee(e,t){var n,r,i,a;return LJ(this,void 0,void 0,function(){var o,s;return G8(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=zJ(e),l.label=1;case 1:return[4,n.next()];case 2:if(r=l.sent(),!!r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:l.sent(),l.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 ya(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 fT(e,t){return t===void 0&&(t=0),dl(function(n,r){n.subscribe(vf(r,function(i){return ya(r,e,function(){return r.next(i)},t)},function(){return ya(r,e,function(){return r.complete()},t)},function(i){return ya(r,e,function(){return r.error(i)},t)}))})}function hT(e,t){return t===void 0&&(t=0),dl(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function see(e,t){return pl(e).pipe(hT(t),fT(t))}function lee(e,t){return pl(e).pipe(hT(t),fT(t))}function cee(e,t){return new $n(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function uee(e,t){return new $n(function(n){var r;return ya(n,t,function(){r=e[oT](),ya(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 wt(r==null?void 0:r.return)&&r.return()}})}function dT(e,t){if(!e)throw new Error("Iterable cannot be null");return new $n(function(n){ya(n,t,function(){var r=e[Symbol.asyncIterator]();ya(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function fee(e,t){return dT(lT(e),t)}function hee(e,t){if(e!=null){if(rT(e))return see(e,t);if(tT(e))return cee(e,t);if(nT(e))return lee(e,t);if(iT(e))return dT(e,t);if(sT(e))return uee(e,t);if(cT(e))return fee(e,t)}throw aT(e)}function dee(e,t){return t?hee(e,t):pl(e)}var pee=V8(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function pT(e,t){var n=typeof t=="object";return new Promise(function(r,i){var a=new Ap({next:function(o){r(o),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new pee)}});e.subscribe(a)})}function gT(e,t){return dl(function(n,r){var i=0;n.subscribe(vf(r,function(a){r.next(e.call(t,a,i++))}))})}function gee(e,t,n,r,i,a,o,s){var l=[],c=0,u=0,f=!1,h=function(){f&&!l.length&&!c&&t.complete()},d=function(g){return c<r?p(g):l.push(g)},p=function(g){a&&t.next(g),c++;var b=!1;pl(n(g,u++)).subscribe(vf(t,function(y){i==null||i(y),a?d(y):t.next(y)},function(){b=!0},void 0,function(){if(b)try{c--;for(var y=function(){var w=l.shift();o?ya(t,o,function(){return p(w)}):p(w)};l.length&&c<r;)y();h()}catch(w){t.error(w)}}))};return e.subscribe(vf(t,d,function(){f=!0,h()})),function(){s==null||s()}}function mT(e,t,n){return n===void 0&&(n=1/0),wt(t)?mT(function(r,i){return gT(function(a,o){return t(r,a,i,o)})(pl(e(r,i)))},n):(typeof t=="number"&&(n=t),dl(function(r,i){return gee(r,i,e,n)}))}function mee(e){return e===void 0&&(e=1/0),mT(K8,e)}function bee(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=KJ(e),r=JJ(e,1/0),i=e;return i.length?i.length===1?pl(i[0]):mee(r)(dee(i,n)):QJ}function yee(e,t,n,r,i){return function(a,o){var s=n,l=t,c=0;a.subscribe(vf(o,function(u){var f=c++;l=s?e(l,u,f):(s=!0,u),r&&o.next(l)},i&&function(){s&&o.next(l),o.complete()}))}}function bT(e,t){return dl(yee(e,t,arguments.length>=2,!1,!0))}var vee=function(e,t){return e.push(t),e};function wee(){return dl(function(e,t){bT(vee,[])(e).subscribe(t)})}const yT=-2003829722,rv=-2021002517;function xee(e){return new TextDecoder().decode(e)}function vT(e){const t=e?"big":"little",n=new Oe().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 Oe().endianess(t).uint32("reductionLevel").uint32("reserved").uint64("dataOffset").uint64("indexOffset")}),r=new Oe().endianess(t).uint64("basesCovered").doublele("scoreMin").doublele("scoreMax").doublele("scoreSum").doublele("scoreSumSquares"),i=new Oe().endianess(t).uint32("magic").uint32("blockSize").uint32("keySize").uint32("valSize").uint64("itemCount"),a=new Oe().endianess(t).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");return{chromTreeParser:i,totalSummaryParser:r,headerParser:n,isLeafNode:a}}class wT{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 So(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(Ae.Buffer.alloc(n),0,n,0,t),i=this._isBigEndian(r),a=vT(i),o=a.headerParser.parse(r),{magic:s,asOffset:l,totalSummaryOffset:c}=o;if(o.fileType=s===rv?"bigbed":"bigwig",l>n||c>n)return this._getMainHeader(t,n*2);if(l){const u=Number(o.asOffset);o.autoSql=xee(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===yT||n===rv)return!1;if(n=t.readInt32BE(0),n===yT||n===rv)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 l=Number(t.chromTreeOffset);for(;s%4!==0;)s+=1;const c=s-l,{buffer:u}=await this.bbi.read(Ae.Buffer.alloc(c),0,c,Number(l),n),f=vT(r),{keySize:h}=f.chromTreeParser.parse(u),d=new Oe().endianess(i).string("key",{stripNull:!0,length:h}).uint32("refId").uint32("refSize").saveOffset("offset"),p=new Oe().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:E}=A;if(w+=A.offset,x)for(let _=0;_<E;_+=1){const T=d.parse(u.subarray(w));w+=T.offset;const{key:D,refId:P,refSize:G}=T,N={name:D,id:P,length:G};o[this.renameRefSeqs(D)]=P,a[P]=N}else{const _=[];for(let T=0;T<E;T+=1){const D=p.parse(u.subarray(w)),{childOffset:P}=D;w+=D.offset,_.push(b(Number(P)-Number(l)))}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 H8(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:l}=i||{};return s?o=await this.getView(1/s,i):l?o=await this.getView(l,i):o=await this.getView(1,i),new $n(c=>{o.readWigData(a,n,r,c,i)})}async getFeatures(t,n,r,i){const a=await this.getFeatureStream(t,n,r,i);return(await pT(a.pipe(wee()))).flat()}}class Aee extends wT{async getView(t,n){const{zoomLevels:r,refsByName:i,fileSize:a,isBigEndian:o,uncompressBufSize:s}=await this.getHeader(n),l=1/t;let c=r.length;a||(c-=1);for(let u=c;u>=0;u-=1){const f=r[u];if(f&&f.reductionLevel<=2*l){const h=Number(f.indexOffset);return new H8(this.bbi,i,h,o,s>0,"summary")}}return this.getUnzoomedView(n)}}function Eee(e){return e.filter(t=>!!t)}class See extends wT{constructor(){super(...arguments),this.readIndicesCache=new sp({cache:new lp({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(Ae.Buffer.alloc(64),0,64,Number(n)),a=r?"big":"little",o=new Oe().endianess(a).uint16("size").uint16("count").uint64("offset").parse(i),{count:s,offset:l}=o;if(s===0)return[];const c=20,u=c*s,{buffer:f}=await this.bbi.read(Ae.Buffer.alloc(u),0,u,Number(l)),h=new Oe().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*c)));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:l}=o,{buffer:c}=await this.bbi.read(Ae.Buffer.alloc(32),0,32,Number(s),n),u=r?"big":"little",f=new Oe().endianess(u).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),{blockSize:h,keySize:d,valSize:p}=f.parse(c),g=new Oe().endianess(u).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:new Oe().array("leafkeys",{length:"cnt",type:new Oe().endianess(u).string("key",{length:d,stripNull:!0}).uint64("offset")}),1:new Oe().array("keys",{length:"cnt",type:new Oe().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:E}=await this.bbi.read(Ae.Buffer.alloc(x),0,x,A,n),_=g.parse(E);if(_.leafkeys){let T;for(let D=0;D<_.leafkeys.length;D+=1){const{key:P}=_.leafkeys[D];if(t.localeCompare(P)<0&&T)return b(T);T=_.leafkeys[D].offset}return b(T)}for(let T=0;T<_.keys.length;T+=1)if(_.keys[T].key===t)return{..._.keys[T],field:l}},y=32;return b(Number(s)+y)});return Eee(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 $n(l=>{i.readFeatures(l,[s],n)}).pipe(bT((l,c)=>l.concat(c)),gT(l=>{for(const c of l)c.field=s.field;return l})));return(await pT(bee(...a))).filter(s=>{var l;return((l=s.rest)===null||l===void 0?void 0:l.split(" ")[(s.field||0)-3])===t})}}const xT=Object.freeze(Object.defineProperty({__proto__:null,BigBed:See,BigWig:Aee},Symbol.toStringTag,{value:"Module"}));function _ee(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function gl(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,gl)}_ee(gl,Error),gl.buildMessage=function(e,t){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var u="",f;for(f=0;f<c.parts.length;f++)u+=c.parts[f]instanceof Array?a(c.parts[f][0])+"-"+a(c.parts[f][1]):a(c.parts[f]);return"["+(c.inverted?"^":"")+u+"]"},any:function(c){return"any character"},end:function(c){return"end of input"},other:function(c){return c.description}};function r(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.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(c){return c.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(c){return n[c.type](c)}function s(c){var u=new Array(c.length),f,h;for(f=0;f<c.length;f++)u[f]=o(c[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 l(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+s(e)+" but "+l(t)+" found."};function Cee(e,t){t=t!==void 0?t:{};var n={},r={declaration:jI},i=jI,a="(",o=ze("(",!1),s=")",l=ze(")",!1),c=function(k,$,J,ee){return{type:k,name:$,comment:J,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",E=ze("index",!1),_="unique",T=ze("unique",!1),D=function(k,$){return $},P=function(k,$){return k.name&&$.unshift(k),$},G="#",N=ze("#",!1),oe=";",ue=ze(";",!1),ne=function(k,$,J){return{type:k,name:$,comment:J}},pe="[",Re=ze("[",!1),xe="]",nt=ze("]",!1),rt=function(k,$,J,ee){return{type:k,size:$,name:J,comment:ee}},ut=function(k,$,J,ee){return{type:k,vals:$,name:J,comment:ee}},De=",",Be=ze(",",!1),Rt=function(k,$){return $.unshift(k),$},cn="int",je=ze("int",!1),L="uint",O=ze("uint",!1),Z="short",q=ze("short",!1),X="ushort",I=ze("ushort",!1),C="byte",j=ze("byte",!1),Q="ubyte",ge=ze("ubyte",!1),se="float",me=ze("float",!1),un="char",Ca=ze("char",!1),ka="string",Ta=ze("string",!1),Vt="lstring",xi=ze("lstring",!1),Ia="enum",fn=ze("enum",!1),Lr="double",S=ze("double",!1),m="bigint",v=ze("bigint",!1),R="set",M=ze("set",!1),z=function(k,$){return k+" "+$},W=/^[a-zA-Z_]/,be=lh([["a","z"],["A","Z"],"_"],!1,!1),Qe=/^[a-zA-Z0-9_]/,He=lh([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),it=function(k){return $I()},Fe=/^[^\n\r]/,OI=lh([`
3354
+ `,"\r"],!0,!1),qte=function(k){return k.join("").replace(/^"/,"").replace(/"$/,"")},Wte=HI("integer"),LI=/^[0-9]/,NI=lh([["0","9"]],!1,!1),Yte=function(){return parseInt($I(),10)},Zte=HI("whitespace"),zI=/^[ \t\n\r]/,UI=lh([" "," ",`
3355
+ `,"\r"],!1,!1),F=0,Kt=0,hg=[{line:1,column:1}],Nr=0,$v=[],ce=0,dg;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 $I(){return e.substring(Kt,F)}function ze(k,$){return{type:"literal",text:k,ignoreCase:$}}function lh(k,$,J){return{type:"class",parts:k,inverted:$,ignoreCase:J}}function Qte(){return{type:"end"}}function HI(k){return{type:"other",description:k}}function GI(k){var $=hg[k],J;if($)return $;for(J=k-1;!hg[J];)J--;for($=hg[J],$={line:$.line,column:$.column};J<k;)e.charCodeAt(J)===10?($.line++,$.column=1):$.column++,J++;return hg[k]=$,$}function VI(k,$){var J=GI(k),ee=GI($);return{start:{offset:k,line:J.line,column:J.column},end:{offset:$,line:ee.line,column:ee.column}}}function fe(k){F<Nr||(F>Nr&&(Nr=F,$v=[]),$v.push(k))}function Xte(k,$,J){return new gl(gl.buildMessage(k,$),k,$,J)}function jI(){var k,$,J,ee,le,qe,at,jn,Ra,Ai,Da,Ei,Ba,Si;return k=F,$=Ee(),$!==n?(J=qI(),J!==n?(ee=Ee(),ee!==n?(le=WI(),le!==n?(qe=Ee(),qe!==n?(at=pg(),at!==n?(jn=Ee(),jn!==n?(e.charCodeAt(F)===40?(Ra=a,F++):(Ra=n,ce===0&&fe(o)),Ra!==n?(Ai=Ee(),Ai!==n?(Da=Kte(),Da!==n?(Ei=Ee(),Ei!==n?(e.charCodeAt(F)===41?(Ba=s,F++):(Ba=n,ce===0&&fe(l)),Ba!==n?(Si=Ee(),Si!==n?(Kt=k,$=c(J,le,at,Da),k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n),k}function qI(){var k;return e.substr(F,6)===u?(k=u,F+=6):(k=n,ce===0&&fe(f)),k===n&&(e.substr(F,6)===h?(k=h,F+=6):(k=n,ce===0&&fe(d)),k===n&&(e.substr(F,5)===p?(k=p,F+=5):(k=n,ce===0&&fe(g)))),k}function WI(){var k,$,J,ee;return k=fr(),k===n&&(k=F,$=fr(),$!==n?(J=YI(),J!==n?($=[$,J],k=$):(F=k,k=n)):(F=k,k=n),k===n&&(k=F,$=fr(),$!==n?(e.substr(F,4)===b?(J=b,F+=4):(J=n,ce===0&&fe(y)),J!==n?($=[$,J],k=$):(F=k,k=n)):(F=k,k=n),k===n&&(k=F,$=fr(),$!==n?(J=YI(),J!==n?(e.substr(F,4)===b?(ee=b,F+=4):(ee=n,ce===0&&fe(y)),ee!==n?($=[$,J,ee],k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)))),k}function YI(){var k;return e.substr(F,7)===w?(k=w,F+=7):(k=n,ce===0&&fe(A)),k===n&&(e.substr(F,5)===x?(k=x,F+=5):(k=n,ce===0&&fe(E)),k===n&&(e.substr(F,6)===_?(k=_,F+=6):(k=n,ce===0&&fe(T)))),k}function pg(){var k;return k=ZI(),k===n&&(k=Ee()),k}function Kte(){var k,$,J,ee,le,qe,at;if(k=F,$=Hv(),$!==n)if(J=Ee(),J!==n){for(ee=[],le=F,qe=Ee(),qe!==n?(at=Hv(),at!==n?(Kt=le,qe=D($,at),le=qe):(F=le,le=n)):(F=le,le=n);le!==n;)ee.push(le),le=F,qe=Ee(),qe!==n?(at=Hv(),at!==n?(Kt=le,qe=D($,at),le=qe):(F=le,le=n)):(F=le,le=n);ee!==n?(le=Ee(),le!==n?(Kt=k,$=P($,ee),k=$):(F=k,k=n)):(F=k,k=n)}else F=k,k=n;else F=k,k=n;return k}function Jte(){var k;return e.charCodeAt(F)===35?(k=G,F++):(k=n,ce===0&&fe(N)),k}function ene(){var k,$,J,ee,le;return k=F,$=Ee(),$!==n?(J=Jte(),J!==n?(ee=ZI(),ee!==n?(le=Ee(),le!==n?($=[$,J,ee,le],k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n),k}function Hv(){var k,$,J,ee,le,qe,at,jn,Ra,Ai,Da,Ei,Ba,Si;return k=F,$=Gv(),$!==n?(J=Ee(),J!==n?(ee=fr(),ee!==n?(le=Ee(),le!==n?(e.charCodeAt(F)===59?(qe=oe,F++):(qe=n,ce===0&&fe(ue)),qe!==n?(at=Ee(),at!==n?(jn=pg(),jn!==n?(Kt=k,$=ne($,ee,jn),k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n),k===n&&(k=F,$=Gv(),$!==n?(J=Ee(),J!==n?(e.charCodeAt(F)===91?(ee=pe,F++):(ee=n,ce===0&&fe(Re)),ee!==n?(le=Ee(),le!==n?(qe=nne(),qe!==n?(at=Ee(),at!==n?(e.charCodeAt(F)===93?(jn=xe,F++):(jn=n,ce===0&&fe(nt)),jn!==n?(Ra=Ee(),Ra!==n?(Ai=fr(),Ai!==n?(Da=Ee(),Da!==n?(e.charCodeAt(F)===59?(Ei=oe,F++):(Ei=n,ce===0&&fe(ue)),Ei!==n?(Ba=Ee(),Ba!==n?(Si=pg(),Si!==n?(Kt=k,$=rt($,qe,Ai,Si),k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n),k===n&&(k=F,$=Gv(),$!==n?(J=Ee(),J!==n?(e.charCodeAt(F)===40?(ee=a,F++):(ee=n,ce===0&&fe(o)),ee!==n?(le=Ee(),le!==n?(qe=tne(),qe!==n?(at=Ee(),at!==n?(e.charCodeAt(F)===41?(jn=s,F++):(jn=n,ce===0&&fe(l)),jn!==n?(Ra=Ee(),Ra!==n?(Ai=fr(),Ai!==n?(Da=Ee(),Da!==n?(e.charCodeAt(F)===59?(Ei=oe,F++):(Ei=n,ce===0&&fe(ue)),Ei!==n?(Ba=Ee(),Ba!==n?(Si=pg(),Si!==n?(Kt=k,$=ut($,qe,Ai,Si),k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n)):(F=k,k=n),k===n&&(k=ene()))),k}function tne(){var k,$,J,ee,le,qe,at;if(k=F,$=fr(),$!==n){for(J=[],ee=F,e.charCodeAt(F)===44?(le=De,F++):(le=n,ce===0&&fe(Be)),le!==n?(qe=Ee(),qe!==n?(at=fr(),at!==n?(Kt=ee,le=D($,at),ee=le):(F=ee,ee=n)):(F=ee,ee=n)):(F=ee,ee=n);ee!==n;)J.push(ee),ee=F,e.charCodeAt(F)===44?(le=De,F++):(le=n,ce===0&&fe(Be)),le!==n?(qe=Ee(),qe!==n?(at=fr(),at!==n?(Kt=ee,le=D($,at),ee=le):(F=ee,ee=n)):(F=ee,ee=n)):(F=ee,ee=n);J!==n?(Kt=k,$=Rt($,J),k=$):(F=k,k=n)}else F=k,k=n;return k}function Gv(){var k,$,J,ee;return e.substr(F,3)===cn?(k=cn,F+=3):(k=n,ce===0&&fe(je)),k===n&&(e.substr(F,4)===L?(k=L,F+=4):(k=n,ce===0&&fe(O)),k===n&&(e.substr(F,5)===Z?(k=Z,F+=5):(k=n,ce===0&&fe(q)),k===n&&(e.substr(F,6)===X?(k=X,F+=6):(k=n,ce===0&&fe(I)),k===n&&(e.substr(F,4)===C?(k=C,F+=4):(k=n,ce===0&&fe(j)),k===n&&(e.substr(F,5)===Q?(k=Q,F+=5):(k=n,ce===0&&fe(ge)),k===n&&(e.substr(F,5)===se?(k=se,F+=5):(k=n,ce===0&&fe(me)),k===n&&(e.substr(F,4)===un?(k=un,F+=4):(k=n,ce===0&&fe(Ca)),k===n&&(e.substr(F,6)===ka?(k=ka,F+=6):(k=n,ce===0&&fe(Ta)),k===n&&(e.substr(F,7)===Vt?(k=Vt,F+=7):(k=n,ce===0&&fe(xi)),k===n&&(e.substr(F,4)===Ia?(k=Ia,F+=4):(k=n,ce===0&&fe(fn)),k===n&&(e.substr(F,6)===Lr?(k=Lr,F+=6):(k=n,ce===0&&fe(S)),k===n&&(e.substr(F,6)===m?(k=m,F+=6):(k=n,ce===0&&fe(v)),k===n&&(e.substr(F,3)===R?(k=R,F+=3):(k=n,ce===0&&fe(M)),k===n&&(k=F,$=qI(),$!==n?(J=Ee(),J!==n?(ee=WI(),ee!==n?(Kt=k,$=z($,ee),k=$):(F=k,k=n)):(F=k,k=n)):(F=k,k=n))))))))))))))),k}function nne(){var k;return k=rne(),k===n&&(k=fr()),k}function fr(){var k,$,J,ee,le;if(k=F,$=F,W.test(e.charAt(F))?(J=e.charAt(F),F++):(J=n,ce===0&&fe(be)),J!==n){for(ee=[],Qe.test(e.charAt(F))?(le=e.charAt(F),F++):(le=n,ce===0&&fe(He));le!==n;)ee.push(le),Qe.test(e.charAt(F))?(le=e.charAt(F),F++):(le=n,ce===0&&fe(He));ee!==n?(J=[J,ee],$=J):(F=$,$=n)}else F=$,$=n;return $!==n&&(Kt=k,$=it()),k=$,k}function ZI(){var k,$,J;for(k=F,$=[],Fe.test(e.charAt(F))?(J=e.charAt(F),F++):(J=n,ce===0&&fe(OI));J!==n;)$.push(J),Fe.test(e.charAt(F))?(J=e.charAt(F),F++):(J=n,ce===0&&fe(OI));return $!==n&&(Kt=k,$=qte($)),k=$,k}function rne(){var k,$,J,ee;if(ce++,k=F,$=Ee(),$!==n){if(J=[],LI.test(e.charAt(F))?(ee=e.charAt(F),F++):(ee=n,ce===0&&fe(NI)),ee!==n)for(;ee!==n;)J.push(ee),LI.test(e.charAt(F))?(ee=e.charAt(F),F++):(ee=n,ce===0&&fe(NI));else J=n;J!==n?(Kt=k,$=Yte(),k=$):(F=k,k=n)}else F=k,k=n;return ce--,k===n&&($=n,ce===0&&fe(Wte)),k}function Ee(){var k,$;for(ce++,k=[],zI.test(e.charAt(F))?($=e.charAt(F),F++):($=n,ce===0&&fe(UI));$!==n;)k.push($),zI.test(e.charAt(F))?($=e.charAt(F),F++):($=n,ce===0&&fe(UI));return ce--,k===n&&($=n,ce===0&&fe(Zte)),k}if(dg=i(),dg!==n&&F===e.length)return dg;throw dg!==n&&F<e.length&&fe(Qte()),Xte($v,Nr<e.length?e.charAt(Nr):null,Nr<e.length?VI(Nr,Nr+1):VI(Nr,Nr))}var AT={SyntaxError:gl,parse:Cee};const kee=Bu(AT),iv=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
3351
3356
  "bigChain pairwise alignment"
3352
3357
  (
3353
3358
  string chrom; "Reference sequence chromosome or scaffold"
@@ -3506,17 +3511,17 @@ ${n}</textarea
3506
3511
  float score; "Floating point score."
3507
3512
  char[1] leftStatus; "Gap/break annotation for preceding block"
3508
3513
  char[1] rightStatus; "Gap/break annotation for following block"
3509
- )`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,AT.parse(t.trim())]));function av(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 Iee={".":0,"-":-1,"+":1};function Ree(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 Dee{constructor(t={}){if(t.autoSql)this.autoSql=av(Tee.parse(t.autoSql));else if(t.type){if(!iv[t.type])throw new Error("Type not found");this.autoSql=av(iv[t.type])}else this.autoSql=av(iv.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&&Ree(a))for(let s=0;s<r.fields.length;s++){const l=r.fields[s];let c=a[s];const{isNumeric:u,isArray:f,arrayIsNumeric:h,name:d}=l;if(c==null)break;if(c!=="."){if(u){const p=Number(c);c=Number.isNaN(p)?c:p}else f&&(c=c.split(","),c[c.length-1]===""&&c.pop(),h&&(c=c.map(p=>Number(p))));o[d]=c}}else{const s=["chrom","chromStart","chromEnd","name"];o=Object.fromEntries(a.map((l,c)=>[s[c]||"field"+c,l])),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=Iee[o.strand]||0,o.chrom=decodeURIComponent(o.chrom),o}}const Bee=Object.freeze(Object.defineProperty({__proto__:null,default:Dee},Symbol.toStringTag,{value:"Module"}));let ET=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 ml(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new ET(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 ST=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 Fee(e){return new Promise(t=>setTimeout(t,e))}function Mee(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}function Pee(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 Oee(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function Lee(e={}){return"aborted"in e?{signal:e}:e}function _T(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):Oee(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function CT(e,t){return{lineCount:Mee(J0.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function Sp(e,t){return e?e.compareTo(t)>0?t:e:t}function Nee(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 kT=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const zee=21578050;function Uee(e,t){return e-e%t}function $ee(e,t){return e-e%t+t}function Hee(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 bl extends kT{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)!==zee)throw new Error("Not a BAI file");const r=n.readInt32LE(4),a=((1<<(5+1)*3)-1)/7;let o=8,s;const l=new Array(r);for(let c=0;c<r;c++){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=CT(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=ml(n,o);o+=8;const E=ml(n,o);o+=8,s=Sp(s,x),w[A]=new ST(x,E,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=ml(n,o);o+=8,s=Sp(s,b),p[g]=b}l[c]={binIndex:h,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:s,maxBlockSize:65536,indices:l,refCount:r}}async indexCov(t,n,r,i={}){const o=n!==void 0,l=(await this.parse(i)).indices[t];if(!l)return[];const{linearIndex:c=[],stats:u}=l;if(c.length===0)return[];const f=r===void 0?(c.length-1)*16384:$ee(r,16384),h=n===void 0?0:Uee(n,16384),d=o?new Array((f-h)/16384):new Array(c.length-1),p=c[c.length-1].blockPosition;if(f>(c.length-1)*16384)throw new Error("query outside of range of linear index");let g=c[h/16384].blockPosition;for(let b=h/16384,y=0;b<f/16384;b++,y++)d[y]={score:c[b+1].blockPosition-g,start:b*16384,end:b*16384+16384},g=c[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=Hee(n,r),l=[];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)l.push(y)}const c=o.linearIndex.length;let u;const f=Math.min(n>>14,c-1),h=Math.min(r>>14,c-1);for(let d=f;d<=h;++d){const p=o.linearIndex[d];p&&(!u||p.compareTo(u)<0)&&(u=p)}return _T(l,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 va=Ae.Buffer,ov=[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"&&(ov=new Int32Array(ov));function TT(e){if(va.isBuffer(e))return e;var t=typeof va.alloc=="function"&&typeof va.from=="function";if(typeof e=="number")return t?va.alloc(e):new va(e);if(typeof e=="string")return t?va.from(e):new va(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function Gee(e){var t=TT(4);return t.writeInt32BE(e,0),t}function sv(e,t){e=TT(e),va.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=~~t^-1,r=0;r<e.length;r++)n=ov[(n^e[r])&255]^n>>>8;return n^-1}function lv(){return Gee(sv.apply(null,arguments))}lv.signed=function(){return sv.apply(null,arguments)},lv.unsigned=function(){return sv.apply(null,arguments)>>>0};var Vee=lv;const jee=Bu(Vee),qee=21582659,Wee=38359875;function Yee(e,t){return e*2**t}function IT(e,t){return Math.floor(e/2**t)}let _p=class extends kT{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),l=s?String.fromCharCode(s):"",c=t.readInt32LE(n+20),u=t.readInt32LE(n+24);return{columnNumbers:o,coordinateType:i,metaValue:s,metaChar:l,skipLines:c,format:a,formatFlags:r,...Nee(t.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await fa(n);let i;if(r.readUInt32LE(0)===qee)i=1;else if(r.readUInt32LE(0)===Wee)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 l=16+a+4,c;const u=new Array(s);for(let f=0;f<s;f++){const h=r.readInt32LE(l);l+=4;const d={};let p;for(let g=0;g<h;g++){const b=r.readUInt32LE(l);if(l+=4,b>this.maxBinNumber)p=CT(r,l+28),l+=28+16;else{c=Sp(c,ml(r,l)),l+=8;const y=r.readInt32LE(l);l+=4;const w=new Array(y);for(let A=0;A<y;A+=1){const x=ml(r,l);l+=8;const E=ml(r,l);l+=8,c=Sp(c,x),w[A]=new ST(x,E,b)}d[b]=w}}u[f]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:c,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 l=[];for(const[c,u]of s)for(let f=c;f<=u;f++)if(o.binIndex[f]){const h=o.binIndex[f];for(const d of h)l.push(d)}return _T(l,new ET(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+=Yee(1,r*3),r+=1){const s=i+IT(t,a),l=i+IT(n,a);if(l-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,l])}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 Hn={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},RT="=ACMGRSVTWYHKDBN".split(""),wf="MIDNSHP=X???????".split("");class DT{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 l=String.fromCharCode(n[i+2]);i+=3;let c;switch(l){case"A":{c=String.fromCharCode(n[i]),i+=1;break}case"i":{c=n.readInt32LE(i),i+=4;break}case"I":{c=n.readUInt32LE(i),i+=4;break}case"c":{c=n.readInt8(i),i+=1;break}case"C":{c=n.readUInt8(i),i+=1;break}case"s":{c=n.readInt16LE(i),i+=2;break}case"S":{c=n.readUInt16LE(i),i+=2;break}case"f":{c=n.readFloatLE(i),i+=4;break}case"Z":case"H":{for(c="";i<=a;){const u=n[i++];if(u===0)break;c+=String.fromCharCode(u)}break}case"B":{c="";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=wf[p&15];c+=g+b,i+=4}else for(let d=0;d<h;d++)c+=n.readInt32LE(i),d+1<h&&(c+=","),i+=4;if(f==="I")if(s==="CG")for(let d=0;d<h;d++){const p=n.readUInt32LE(i),g=p>>4,b=wf[p&15];c+=g+b,i+=4}else for(let d=0;d<h;d++)c+=n.readUInt32LE(i),d+1<h&&(c+=","),i+=4;if(f==="s")for(let d=0;d<h;d++)c+=n.readInt16LE(i),d+1<h&&(c+=","),i+=2;if(f==="S")for(let d=0;d<h;d++)c+=n.readUInt16LE(i),d+1<h&&(c+=","),i+=2;if(f==="c")for(let d=0;d<h;d++)c+=n.readInt8(i),d+1<h&&(c+=","),i+=1;if(f==="C")for(let d=0;d<h;d++)c+=n.readUInt8(i),d+1<h&&(c+=","),i+=1;if(f==="f")for(let d=0;d<h;d++)c+=n.readFloatLE(i),d+1<h&&(c+=","),i+=4;break}default:console.warn(`Unknown BAM tag type '${l}', tags may be incomplete`),c=void 0,i=a}if(this._tagOffset=i,this._tagList.push(s),o===t)return c;this.data[o]=c}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&Hn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&Hn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&Hn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&Hn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&Hn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&Hn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&Hn.BAM_FREAD1)}isRead2(){return!!(this.flags&Hn.BAM_FREAD2)}isSecondary(){return!!(this.flags&Hn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&Hn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&Hn.BAM_FDUP)}isSupplementary(){return!!(this.flags&Hn.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,l=t.readInt32LE(i),c=l>>4,u=wf[l&15];if(u==="S"&&c===a)return i+=4,l=t.readInt32LE(i),c=l>>4,u=wf[l&15],u!=="N"&&console.warn("CG tag with no N tag"),this.data.length_on_ref=c,this.get("CG");for(let f=0;f<r;++f)l=t.readInt32LE(i),c=l>>4,u=wf[l&15],o+=c+u,u!=="H"&&u!=="S"&&u!=="I"&&(s+=c),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 l=0;l<i;++l){const c=t[r+l];o+=RT[(c&240)>>4],s++,s<a&&(o+=RT[c&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 BT(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,l]=o.split(":",2);return{tag:s,value:l}})})}return n}const FT=21840194,MT=65536;async function Zee(e){let t=[];for await(const n of e)t=t.concat(n);return t}class Qee{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 PT{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:a,baiUrl:o,csiPath:s,csiFilehandle:l,csiUrl:c,htsget:u,yieldThreadTime:f=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new sp({cache:new lp({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 So(r);else if(u)this.htsget=!0,this.bam=new Qee;else throw new Error("unable to initialize bam");if(l)this.index=new _p({filehandle:l});else if(s)this.index=new _p({filehandle:new kt(s)});else if(c)this.index=new _p({filehandle:new So(c)});else if(a)this.index=new bl({filehandle:a});else if(i)this.index=new bl({filehandle:new kt(i)});else if(o)this.index=new bl({filehandle:new So(o)});else if(n)this.index=new bl({filehandle:new kt(`${n}.bai`)});else if(r)this.index=new bl({filehandle:new So(`${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=Lee(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+MT,f=await this.bam.read(Ae.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 fa(a);if(o.readInt32LE(0)!==FT)throw new Error("Not a BAM file");const s=o.readInt32LE(4);this.header=o.toString("utf8",8,8+s);const{chrToIndex:l,indexToChr:c}=await this._readRefSeqs(s+8,65535,n);return this.chrToIndex=l,this.indexToChr=c,BT(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+MT,{bytesRead:a,buffer:o}=await this.bam.read(Ae.Buffer.alloc(i),0,n,0,r);if(!a)throw new Error("Error reading refseqs from header");const s=await fa(o.subarray(0,Math.min(a,n))),l=s.readInt32LE(t);let c=t+4;const u={},f=[];for(let h=0;h<l;h+=1){const d=s.readInt32LE(c),p=this.renameRefSeq(s.toString("utf8",c+4,c+4+d-1)),g=s.readInt32LE(c+d+4);if(u[p]=h,f.push({refName:p,length:g}),c=c+8+d,c>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 Zee(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 l=!1;for(const c of t){const u=await this.featureCache.get(c.toString(),{chunk:c,opts:a},a.signal),f=[];for(const h of u)if(h.seq_id()===n)if(h.get("start")>=i){l=!0;break}else h.get("end")>=r&&f.push(h);if(s.push(f),yield f,l)break}Pee(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 l=[];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)&&l.push(this.index.blocksForRange(y,b,b+1,r))}});const c=new Map,u=await Promise.all(l);for(const h of u.flat())c.has(h.toString())||c.set(h.toString(),h);return(await Promise.all([...c.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(Ae.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 tk(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,l=+Date.now();for(;a+4<t.length;){const c=t.readInt32LE(a),u=a+4+c-1;if(r){for(;a+i.minv.dataPosition>=r[s++];);s--}if(u<t.length){const f=new DT({bytes:{byteArray:t,start:a,end:u},fileOffset:n.length>0?n[s]*256+(a-r[s])+i.minv.dataPosition+1:jee.signed(t.slice(a,u))});o.push(f),this.yieldThreadTime&&+Date.now()-l>this.yieldThreadTime&&(await Fee(1),l=+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 OT(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:a}=r;if(i.startsWith("data:"))return Ae.Buffer.from(i.split(",")[1],"base64");{const{referer:o,...s}=a,l=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...s}});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${i}: ${await l.text()}`);return Ae.Buffer.from(await l.arrayBuffer())}}));return Ae.Buffer.concat(await Promise.all(n.map(r=>fa(r))))}class Xee extends PT{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`,l=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];if(l===void 0)yield[];else{const c=await fetch(s,{...i});if(!c.ok)throw new Error(`HTTP ${c.status} fetching ${s}: ${await c.text()}`);const u=await c.json(),f=await OT(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}`}}],l,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 OT(i.htsget.urls,t);if(a.readInt32LE(0)!==FT)throw new Error("Not a BAM file");const o=a.readInt32LE(4),s=a.toString("utf8",8,8+o),l=BT(s),c=[],u={},f=l.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,c[h]={refName:p,length:g}}return this.chrToIndex=u,this.indexToChr=c,l}}const Kee=Object.freeze(Object.defineProperty({__proto__:null,BAI:bl,BamFile:PT,BamRecord:DT,CSI:_p,HtsgetFile:Xee},Symbol.toStringTag,{value:"Module"}));function LT(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class Jee extends Error{}function yl(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new Jee("aborted");throw t.code="ERR_ABORTED",t}}}function ete(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function NT(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):ete(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class cv{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 vl(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new cv(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 Cp{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 zT{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 tte=21578324,UT=14;function nte(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 kp extends zT{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 fa(n);if(yl(t.signal),r.readUInt32LE(0)!==tte)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",l={0:"generic",1:"SAM",2:"VCF"}[a&15];if(!l)throw new Error(`invalid Tabix preset format flags ${a}`);const c={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 T={};let D;for(let N=0;N<_;N+=1){const oe=r.readUInt32LE(A);if(A+=4,oe>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(oe===h+1){const ue=r.readInt32LE(A);A+=4,ue===2&&(D=this.parsePseudoBin(r,A)),A+=16*ue}else{const ue=r.readInt32LE(A);A+=4;const ne=new Array(ue);for(let pe=0;pe<ue;pe+=1){const Re=vl(r,A),xe=vl(r,A+8);A+=16,x=this._findFirstData(x,Re),ne[pe]=new Cp(Re,xe,oe)}T[oe]=ne}}const P=r.readInt32LE(A);A+=4;const G=new Array(P);for(let N=0;N<P;N+=1)G[N]=vl(r,A),A+=8,x=this._findFirstData(x,G[N]);return{binIndex:T,linearIndex:G,stats:D}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:g,firstDataLine:x,columnNumbers:c,coordinateType:o,format:l,refIdToName:w,refNameToId:y,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:LT(J0.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>>UT>=s.linearIndex.length?s.linearIndex.length-1:n>>UT]:new cv(0,0))||console.warn("querying outside of possible tabix range");const c=nte(n,r),u=[];for(const[g,b]of c)for(let y=g;y<=b;y++)if(s.binIndex[y])for(const w of s.binIndex[y])u.push(new Cp(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 NT(u,h)}}const rte=21582659,ite=38359875;function ate(e,t){return e*2**t}function $T(e,t){return Math.floor(e/2**t)}class uv extends zT{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),l=s?String.fromCharCode(s):null,c=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:c,metaChar:l,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 fa(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===rte)r=1;else if(n.readUInt32LE(0)===ite)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 l,c=16+a+4;const u=new Array(s).fill(0).map(()=>{const f=n.readInt32LE(c);c+=4;const h={};let d;for(let p=0;p<f;p+=1){const g=n.readUInt32LE(c);if(g>this.maxBinNumber)d=this.parsePseudoBin(n,c+4),c+=4+8+4+16+16;else{const b=vl(n,c+4);l=this._findFirstData(l,b);const y=n.readInt32LE(c+12);c+=16;const w=new Array(y);for(let A=0;A<y;A+=1){const x=vl(n,c),E=vl(n,c+8);c+=16,w[A]=new Cp(x,E,g)}h[g]=w}}return{binIndex:h,stats:d}});return{...o,csi:!0,refCount:s,maxBlockSize:65536,firstDataLine:l,csiVersion:r,indices:u,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:LT(J0.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 l=this.reg2bins(n,r),c=[];for(const[u,f]of l)for(let h=u;h<=f;h++)if(s.binIndex[h])for(const d of s.binIndex[h])c.push(new Cp(d.minv,d.maxv,h));return NT(c,new cv(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+=ate(1,r*3),r+=1){const s=i+$T(t,a),l=i+$T(n,a);if(l-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,l])}return o}}const fv=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function ote(e){return new Promise(t=>setTimeout(t,e))}class ste{constructor({path:t,filehandle:n,tbiPath:r,tbiFilehandle:i,csiPath:a,csiFilehandle:o,yieldTime:s=500,chunkSizeLimit:l=5e7,renameRefSeqs:c=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 kp({filehandle:i,renameRefSeqs:c});else if(o)this.index=new uv({filehandle:o,renameRefSeqs:c});else if(r)this.index=new kp({filehandle:new kt(r),renameRefSeqs:c});else if(a)this.index=new uv({filehandle:new kt(a),renameRefSeqs:c});else if(t)this.index=new kp({filehandle:new kt(`${t}.tbi`),renameRefSeqs:c});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, or csiPath");this.chunkSizeLimit=l,this.renameRefSeq=c,this.yieldTime=s,this.chunkCache=new sp({cache:new lp({maxSize:Math.floor(u/65536)}),fill:(f,h)=>this.readChunk(f,{signal:h})})}async getLines(t,n,r,i){var a;let o,s={},l;if(i===void 0)throw new TypeError("line callback must be provided");if(typeof i=="function"?l=i:(s=i,l=i.lineCallback,o=i.signal),t===void 0)throw new TypeError("must provide a reference sequence name");if(!l)throw new TypeError("line callback must be provided");const c=await this.index.getMetadata(s);yl(o);const u=n??0,f=r??c.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);yl(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);yl(o);let A=0,x=0;for(;A<b.length;){const E=b.indexOf(`
3510
- `,A);if(E===-1)break;const _=b.slice(A,E),T=(a=fv==null?void 0:fv.decode(_))!==null&&a!==void 0?a:_.toString();if(w){for(;A+p.minv.dataPosition>=w[x++];);x--}const{startCoordinate:D,overlaps:P}=this.checkLine(c,t,u,f,T);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,P)l(T.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(),yl(o),await ote(1)),A=E+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:n,metaChar:r,maxBlockSize:i}=await this.getMetadata(t);yl(t.signal);const a=((n==null?void 0:n.blockPosition)||0)+i,o=await this._readRegion(0,a,t),s=await fa(o);if(r){let l=-1;const c=`
3511
- `.charCodeAt(0),u=r.charCodeAt(0);for(let f=0;f<s.length&&!(f===l+1&&s[f]!==u);f+=1)s[f]===c&&(l=f);return s.slice(0,l+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:l,format:c}=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),c==="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),l==="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(c==="VCF"&&p===4)b=a.slice(g,w);else if(p===h&&(c==="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 l=r.indexOf(";",s);l===-1&&(l=r.length),i=parseInt(r.slice(s+4,l),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=Ae.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 tk(r,t)}}const lte=Object.freeze(Object.defineProperty({__proto__:null,CSI:uv,TBI:kp,TabixIndexedFile:ste},Symbol.toStringTag,{value:"Module"}));var hv={exports:{}},wl=typeof Reflect=="object"?Reflect:null,HT=wl&&typeof wl.apply=="function"?wl.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},Tp;wl&&typeof wl.ownKeys=="function"?Tp=wl.ownKeys:Object.getOwnPropertySymbols?Tp=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Tp=function(t){return Object.getOwnPropertyNames(t)};function cte(e){console&&console.warn&&console.warn(e)}var GT=Number.isNaN||function(t){return t!==t};function Ne(){Ne.init.call(this)}hv.exports=Ne,hv.exports.once=dte,Ne.EventEmitter=Ne,Ne.prototype._events=void 0,Ne.prototype._eventsCount=0,Ne.prototype._maxListeners=void 0;var VT=10;function Ip(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Ne,"defaultMaxListeners",{enumerable:!0,get:function(){return VT},set:function(e){if(typeof e!="number"||e<0||GT(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");VT=e}}),Ne.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},Ne.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||GT(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 jT(e){return e._maxListeners===void 0?Ne.defaultMaxListeners:e._maxListeners}Ne.prototype.getMaxListeners=function(){return jT(this)},Ne.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 l=a[t];if(l===void 0)return!1;if(typeof l=="function")HT(l,this,n);else for(var c=l.length,u=QT(l,c),r=0;r<c;++r)HT(u[r],this,n);return!0};function qT(e,t,n,r){var i,a,o;if(Ip(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=jT(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,cte(s)}return e}Ne.prototype.addListener=function(t,n){return qT(this,t,n,!1)},Ne.prototype.on=Ne.prototype.addListener,Ne.prototype.prependListener=function(t,n){return qT(this,t,n,!0)};function ute(){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 WT(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=ute.bind(r);return i.listener=n,r.wrapFn=i,i}Ne.prototype.once=function(t,n){return Ip(n),this.on(t,WT(this,t,n)),this},Ne.prototype.prependOnceListener=function(t,n){return Ip(n),this.prependListener(t,WT(this,t,n)),this},Ne.prototype.removeListener=function(t,n){var r,i,a,o,s;if(Ip(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():fte(r,a),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this},Ne.prototype.off=Ne.prototype.removeListener,Ne.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 YT(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?hte(i):QT(i,i.length)}Ne.prototype.listeners=function(t){return YT(this,t,!0)},Ne.prototype.rawListeners=function(t){return YT(this,t,!1)},Ne.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):ZT.call(e,t)},Ne.prototype.listenerCount=ZT;function ZT(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}Ne.prototype.eventNames=function(){return this._eventsCount>0?Tp(this._events):[]};function QT(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function fte(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function hte(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function dte(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))}XT(e,t,a,{once:!0}),t!=="error"&&pte(e,i,{once:!0})})}function pte(e,t,n){typeof e.on=="function"&&XT(e,"error",t,n)}function XT(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 dv=hv.exports,pv={exports:{}};typeof Object.create=="function"?pv.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:pv.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 xl=pv.exports,gv,KT;function JT(){return KT||(KT=1,gv=dv.EventEmitter),gv}const eI=aY(OY);var mv,tI;function gte(){if(tI)return mv;tI=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 l=Ae,c=l.Buffer,u=eI,f=u.inspect,h=f&&f.custom||"inspect";function d(p,g,b){c.prototype.copy.call(p,g,b)}return mv=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 c.alloc(0);for(var y=c.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,E=b>x.length?x.length:b;if(E===x.length?A+=x:A+=x.slice(0,b),b-=E,b===0){E===x.length?(++w,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=x.slice(E));break}++w}return this.length-=w,A}},{key:"_getBuffer",value:function(b){var y=c.allocUnsafe(b),w=this.head,A=1;for(w.data.copy(y),b-=w.data.length;w=w.next;){var x=w.data,E=b>x.length?x.length:b;if(x.copy(y,y.length-b,0,E),b-=E,b===0){E===x.length?(++A,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=x.slice(E));break}++A}return this.length-=A,y}},{key:h,value:function(b,y){return f(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),p}(),mv}var bv,nI;function rI(){if(nI)return bv;nI=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||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?l._writableState?l._writableState.errorEmitted?process.nextTick(n,l):(l._writableState.errorEmitted=!0,process.nextTick(t,l,f)):process.nextTick(t,l,f):s?(process.nextTick(n,l),s(f)):process.nextTick(n,l)}),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 l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return bv={destroy:e,undestroy:r,errorOrDestroy:a},bv}var yv={},iI;function Al(){if(iI)return yv;iI=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var t={};function n(s,l,c){c||(c=Error);function u(h,d,p){return typeof l=="string"?l:l(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}(c);f.prototype.name=c.name,f.prototype.code=s,t[s]=f}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function i(s,l,c){return s.substr(!c||c<0?0:+c,l.length)===l}function a(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&i(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var f;if(a(s," argument"))f="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var h=o(s,".")?"property":"argument";f='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(l,"type"))}return f+=". Received type ".concat(typeof c),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"),yv.codes=t,yv}var vv,aI;function oI(){if(aI)return vv;aI=1;var e=Al().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 l=o?a:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return vv={getHighWaterMark:n},vv}var wv,sI;function mte(){if(sI)return wv;sI=1,wv=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 wv}var xv,lI;function cI(){if(lI)return xv;lI=1,xv=D;function e(L){var O=this;this.next=null,this.entry=null,this.finish=function(){je(O,L)}}var t;D.WritableState=_;var n={deprecate:mte()},r=JT(),i=Ae.Buffer,a=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(L){return i.from(L)}function s(L){return i.isBuffer(L)||L instanceof a}var l=rI(),c=oI(),u=c.getHighWaterMark,f=Al().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=l.errorOrDestroy;xl(D,r);function E(){}function _(L,O,Z){t=t||El(),L=L||{},typeof Z!="boolean"&&(Z=O instanceof t),this.objectMode=!!L.objectMode,Z&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=u(this,L,"writableHighWaterMark",Z),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=L.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X){Re(O,X)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}_.prototype.getBuffer=function(){for(var O=this.bufferedRequest,Z=[];O;)Z.push(O),O=O.next;return Z},function(){try{Object.defineProperty(_.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var T;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(O){return T.call(this,O)?!0:this!==D?!1:O&&O._writableState instanceof _}})):T=function(O){return O instanceof this};function D(L){t=t||El();var O=this instanceof t;if(!O&&!T.call(D,this))return new D(L);this._writableState=new _(L,this,O),this.writable=!0,L&&(typeof L.write=="function"&&(this._write=L.write),typeof L.writev=="function"&&(this._writev=L.writev),typeof L.destroy=="function"&&(this._destroy=L.destroy),typeof L.final=="function"&&(this._final=L.final)),r.call(this)}D.prototype.pipe=function(){x(this,new g)};function P(L,O){var Z=new w;x(L,Z),process.nextTick(O,Z)}function G(L,O,Z,q){var X;return Z===null?X=new y:typeof Z!="string"&&!O.objectMode&&(X=new h("chunk",["string","Buffer"],Z)),X?(x(L,X),process.nextTick(q,X),!1):!0}D.prototype.write=function(L,O,Z){var q=this._writableState,X=!1,I=!q.objectMode&&s(L);return I&&!i.isBuffer(L)&&(L=o(L)),typeof O=="function"&&(Z=O,O=null),I?O="buffer":O||(O=q.defaultEncoding),typeof Z!="function"&&(Z=E),q.ending?P(this,Z):(I||G(this,q,L,Z))&&(q.pendingcb++,X=oe(this,q,I,L,O,Z)),X},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var L=this._writableState;L.corked&&(L.corked--,!L.writing&&!L.corked&&!L.bufferProcessing&&L.bufferedRequest&&rt(this,L))},D.prototype.setDefaultEncoding=function(O){if(typeof O=="string"&&(O=O.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((O+"").toLowerCase())>-1))throw new A(O);return this._writableState.defaultEncoding=O,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function N(L,O,Z){return!L.objectMode&&L.decodeStrings!==!1&&typeof O=="string"&&(O=i.from(O,Z)),O}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function oe(L,O,Z,q,X,I){if(!Z){var C=N(O,q,X);q!==C&&(Z=!0,X="buffer",q=C)}var j=O.objectMode?1:q.length;O.length+=j;var Q=O.length<O.highWaterMark;if(Q||(O.needDrain=!0),O.writing||O.corked){var ge=O.lastBufferedRequest;O.lastBufferedRequest={chunk:q,encoding:X,isBuf:Z,callback:I,next:null},ge?ge.next=O.lastBufferedRequest:O.bufferedRequest=O.lastBufferedRequest,O.bufferedRequestCount+=1}else ue(L,O,!1,j,q,X,I);return Q}function ue(L,O,Z,q,X,I,C){O.writelen=q,O.writecb=C,O.writing=!0,O.sync=!0,O.destroyed?O.onwrite(new b("write")):Z?L._writev(X,O.onwrite):L._write(X,I,O.onwrite),O.sync=!1}function ne(L,O,Z,q,X){--O.pendingcb,Z?(process.nextTick(X,q),process.nextTick(Rt,L,O),L._writableState.errorEmitted=!0,x(L,q)):(X(q),L._writableState.errorEmitted=!0,x(L,q),Rt(L,O))}function pe(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}function Re(L,O){var Z=L._writableState,q=Z.sync,X=Z.writecb;if(typeof X!="function")throw new p;if(pe(Z),O)ne(L,Z,q,O,X);else{var I=ut(Z)||L.destroyed;!I&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&rt(L,Z),q?process.nextTick(xe,L,Z,I,X):xe(L,Z,I,X)}}function xe(L,O,Z,q){Z||nt(L,O),O.pendingcb--,q(),Rt(L,O)}function nt(L,O){O.length===0&&O.needDrain&&(O.needDrain=!1,L.emit("drain"))}function rt(L,O){O.bufferProcessing=!0;var Z=O.bufferedRequest;if(L._writev&&Z&&Z.next){var q=O.bufferedRequestCount,X=new Array(q),I=O.corkedRequestsFree;I.entry=Z;for(var C=0,j=!0;Z;)X[C]=Z,Z.isBuf||(j=!1),Z=Z.next,C+=1;X.allBuffers=j,ue(L,O,!0,O.length,X,"",I.finish),O.pendingcb++,O.lastBufferedRequest=null,I.next?(O.corkedRequestsFree=I.next,I.next=null):O.corkedRequestsFree=new e(O),O.bufferedRequestCount=0}else{for(;Z;){var Q=Z.chunk,ge=Z.encoding,se=Z.callback,me=O.objectMode?1:Q.length;if(ue(L,O,!1,me,Q,ge,se),Z=Z.next,O.bufferedRequestCount--,O.writing)break}Z===null&&(O.lastBufferedRequest=null)}O.bufferedRequest=Z,O.bufferProcessing=!1}D.prototype._write=function(L,O,Z){Z(new d("_write()"))},D.prototype._writev=null,D.prototype.end=function(L,O,Z){var q=this._writableState;return typeof L=="function"?(Z=L,L=null,O=null):typeof O=="function"&&(Z=O,O=null),L!=null&&this.write(L,O),q.corked&&(q.corked=1,this.uncork()),q.ending||cn(this,q,Z),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ut(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function De(L,O){L._final(function(Z){O.pendingcb--,Z&&x(L,Z),O.prefinished=!0,L.emit("prefinish"),Rt(L,O)})}function Be(L,O){!O.prefinished&&!O.finalCalled&&(typeof L._final=="function"&&!O.destroyed?(O.pendingcb++,O.finalCalled=!0,process.nextTick(De,L,O)):(O.prefinished=!0,L.emit("prefinish")))}function Rt(L,O){var Z=ut(O);if(Z&&(Be(L,O),O.pendingcb===0&&(O.finished=!0,L.emit("finish"),O.autoDestroy))){var q=L._readableState;(!q||q.autoDestroy&&q.endEmitted)&&L.destroy()}return Z}function cn(L,O,Z){O.ending=!0,Rt(L,O),Z&&(O.finished?process.nextTick(Z):L.once("finish",Z)),O.ended=!0,L.writable=!1}function je(L,O,Z){var q=L.entry;for(L.entry=null;q;){var X=q.callback;O.pendingcb--,X(Z),q=q.next}O.corkedRequestsFree.next=L}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(O){this._writableState&&(this._writableState.destroyed=O)}}),D.prototype.destroy=l.destroy,D.prototype._undestroy=l.undestroy,D.prototype._destroy=function(L,O){O(L)},xv}var Av,uI;function El(){if(uI)return Av;uI=1;var e=Object.keys||function(c){var u=[];for(var f in c)u.push(f);return u};Av=o;var t=mI(),n=cI();xl(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(c){if(!(this instanceof o))return new o(c);t.call(this,c),n.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.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(l,this)}function l(c){c.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)}}),Av}var Ev={},Sv={exports:{}};(function(e,t){var n=Ae,r=n.Buffer;function i(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a);function a(o,s,l){return r(o,s,l)}i(r,a),a.from=function(o,s,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,l)},a.alloc=function(o,s,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=r(o);return s!==void 0?typeof l=="string"?c.fill(s,l):c.fill(s):c.fill(0),c},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)}})(Sv,Sv.exports);var bte=Sv.exports,_v=bte.Buffer,fI=_v.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 yte(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 vte(e){var t=yte(e);if(typeof t!="string"&&(_v.isEncoding===fI||!fI(e)))throw new Error("Unknown encoding: "+e);return t||e}var wte=Ev.StringDecoder=xf;function xf(e){this.encoding=vte(e);var t;switch(this.encoding){case"utf16le":this.text=Cte,this.end=kte,t=4;break;case"utf8":this.fillLast=Ete,t=4;break;case"base64":this.text=Tte,this.end=Ite,t=3;break;default:this.write=Rte,this.end=Dte;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_v.allocUnsafe(t)}xf.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||""},xf.prototype.end=_te,xf.prototype.text=Ste,xf.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 Cv(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function xte(e,t,n){var r=t.length-1;if(r<n)return 0;var i=Cv(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=Cv(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=Cv(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function Ate(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 Ete(e){var t=this.lastTotal-this.lastNeed,n=Ate(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 Ste(e,t){var n=xte(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 _te(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function Cte(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 kte(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 Tte(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 Ite(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Rte(e){return e.toString(this.encoding)}function Dte(e){return e&&e.length?this.write(e):""}var kv,hI;function Tv(){if(hI)return kv;hI=1;var e=Al().codes.ERR_STREAM_PREMATURE_CLOSE;function t(a){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];a.apply(this,l)}}}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 l=o.readable||o.readable!==!1&&a.readable,c=o.writable||o.writable!==!1&&a.writable,u=function(){a.writable||h()},f=a._writableState&&a._writableState.finished,h=function(){c=!1,f=!0,l||s.call(a)},d=a._readableState&&a._readableState.endEmitted,p=function(){l=!1,d=!0,c||s.call(a)},g=function(A){s.call(a,A)},b=function(){var A;if(l&&!d)return(!a._readableState||!a._readableState.ended)&&(A=new e),s.call(a,A);if(c&&!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)):c&&!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 kv=i,kv}var Iv,dI;function Bte(){if(dI)return Iv;dI=1;var e;function t(A,x,E){return x=n(x),x in A?Object.defineProperty(A,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):A[x]=E,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 E=A[Symbol.toPrimitive];if(E!==void 0){var _=E.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=Tv(),a=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=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 E=A[f].read();E!==null&&(A[c]=null,A[a]=null,A[o]=null,x(h(E,!1)))}}function p(A){process.nextTick(d,A)}function g(A,x){return function(E,_){A.then(function(){if(x[l]){E(h(void 0,!0));return}x[u](E,_)},_)}}var b=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var x=this,E=this[s];if(E!==null)return Promise.reject(E);if(this[l])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(P,G){process.nextTick(function(){x[s]?G(x[s]):P(h(void 0,!0))})});var _=this[c],T;if(_)T=new Promise(g(_,this));else{var D=this[f].read();if(D!==null)return Promise.resolve(h(D,!1));T=new Promise(this[u])}return this[c]=T,T}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var x=this;return new Promise(function(E,_){x[f].destroy(null,function(T){if(T){_(T);return}E(h(void 0,!0))})})}),e),b),w=function(x){var E,_=Object.create(y,(E={},t(E,f,{value:x,writable:!0}),t(E,a,{value:null,writable:!0}),t(E,o,{value:null,writable:!0}),t(E,s,{value:null,writable:!0}),t(E,l,{value:x._readableState.endEmitted,writable:!0}),t(E,u,{value:function(D,P){var G=_[f].read();G?(_[c]=null,_[a]=null,_[o]=null,D(h(G,!1))):(_[a]=D,_[o]=P)},writable:!0}),E));return _[c]=null,i(x,function(T){if(T&&T.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=_[o];D!==null&&(_[c]=null,_[a]=null,_[o]=null,D(T)),_[s]=T;return}var P=_[a];P!==null&&(_[c]=null,_[a]=null,_[o]=null,P(h(void 0,!0))),_[l]=!0}),x.on("readable",p.bind(null,_)),_};return Iv=w,Iv}var Rv,pI;function Fte(){return pI||(pI=1,Rv=function(){throw new Error("Readable.from is not available in the browser")}),Rv}var Dv,gI;function mI(){if(gI)return Dv;gI=1,Dv=P;var e;P.ReadableState=D,dv.EventEmitter;var t=function(C,j){return C.listeners(j).length},n=JT(),r=Ae.Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(I){return r.from(I)}function o(I){return r.isBuffer(I)||I instanceof i}var s=eI,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=gte(),u=rI(),f=oI(),h=f.getHighWaterMark,d=Al().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;xl(P,n);var E=u.errorOrDestroy,_=["error","close","destroy","pause","resume"];function T(I,C,j){if(typeof I.prependListener=="function")return I.prependListener(C,j);!I._events||!I._events[C]?I.on(C,j):Array.isArray(I._events[C])?I._events[C].unshift(j):I._events[C]=[j,I._events[C]]}function D(I,C,j){e=e||El(),I=I||{},typeof j!="boolean"&&(j=C instanceof e),this.objectMode=!!I.objectMode,j&&(this.objectMode=this.objectMode||!!I.readableObjectMode),this.highWaterMark=h(this,I,"readableHighWaterMark",j),this.buffer=new c,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=I.emitClose!==!1,this.autoDestroy=!!I.autoDestroy,this.destroyed=!1,this.defaultEncoding=I.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,I.encoding&&(w||(w=Ev.StringDecoder),this.decoder=new w(I.encoding),this.encoding=I.encoding)}function P(I){if(e=e||El(),!(this instanceof P))return new P(I);var C=this instanceof e;this._readableState=new D(I,this,C),this.readable=!0,I&&(typeof I.read=="function"&&(this._read=I.read),typeof I.destroy=="function"&&(this._destroy=I.destroy)),n.call(this)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(C){this._readableState&&(this._readableState.destroyed=C)}}),P.prototype.destroy=u.destroy,P.prototype._undestroy=u.undestroy,P.prototype._destroy=function(I,C){C(I)},P.prototype.push=function(I,C){var j=this._readableState,Q;return j.objectMode?Q=!0:typeof I=="string"&&(C=C||j.defaultEncoding,C!==j.encoding&&(I=r.from(I,C),C=""),Q=!0),G(this,I,C,!1,Q)},P.prototype.unshift=function(I){return G(this,I,null,!0,!1)};function G(I,C,j,Q,ge){l("readableAddChunk",C);var se=I._readableState;if(C===null)se.reading=!1,Re(I,se);else{var me;if(ge||(me=oe(se,C)),me)E(I,me);else if(se.objectMode||C&&C.length>0)if(typeof C!="string"&&!se.objectMode&&Object.getPrototypeOf(C)!==r.prototype&&(C=a(C)),Q)se.endEmitted?E(I,new y):N(I,se,C,!0);else if(se.ended)E(I,new g);else{if(se.destroyed)return!1;se.reading=!1,se.decoder&&!j?(C=se.decoder.write(C),se.objectMode||C.length!==0?N(I,se,C,!1):rt(I,se)):N(I,se,C,!1)}else Q||(se.reading=!1,rt(I,se))}return!se.ended&&(se.length<se.highWaterMark||se.length===0)}function N(I,C,j,Q){C.flowing&&C.length===0&&!C.sync?(C.awaitDrain=0,I.emit("data",j)):(C.length+=C.objectMode?1:j.length,Q?C.buffer.unshift(j):C.buffer.push(j),C.needReadable&&xe(I)),rt(I,C)}function oe(I,C){var j;return!o(C)&&typeof C!="string"&&C!==void 0&&!I.objectMode&&(j=new p("chunk",["string","Buffer","Uint8Array"],C)),j}P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(I){w||(w=Ev.StringDecoder);var C=new w(I);this._readableState.decoder=C,this._readableState.encoding=this._readableState.decoder.encoding;for(var j=this._readableState.buffer.head,Q="";j!==null;)Q+=C.write(j.data),j=j.next;return this._readableState.buffer.clear(),Q!==""&&this._readableState.buffer.push(Q),this._readableState.length=Q.length,this};var ue=1073741824;function ne(I){return I>=ue?I=ue:(I--,I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I++),I}function pe(I,C){return I<=0||C.length===0&&C.ended?0:C.objectMode?1:I!==I?C.flowing&&C.length?C.buffer.head.data.length:C.length:(I>C.highWaterMark&&(C.highWaterMark=ne(I)),I<=C.length?I:C.ended?C.length:(C.needReadable=!0,0))}P.prototype.read=function(I){l("read",I),I=parseInt(I,10);var C=this._readableState,j=I;if(I!==0&&(C.emittedReadable=!1),I===0&&C.needReadable&&((C.highWaterMark!==0?C.length>=C.highWaterMark:C.length>0)||C.ended))return l("read: emitReadable",C.length,C.ended),C.length===0&&C.ended?Z(this):xe(this),null;if(I=pe(I,C),I===0&&C.ended)return C.length===0&&Z(this),null;var Q=C.needReadable;l("need readable",Q),(C.length===0||C.length-I<C.highWaterMark)&&(Q=!0,l("length less than watermark",Q)),C.ended||C.reading?(Q=!1,l("reading or ended",Q)):Q&&(l("do read"),C.reading=!0,C.sync=!0,C.length===0&&(C.needReadable=!0),this._read(C.highWaterMark),C.sync=!1,C.reading||(I=pe(j,C)));var ge;return I>0?ge=O(I,C):ge=null,ge===null?(C.needReadable=C.length<=C.highWaterMark,I=0):(C.length-=I,C.awaitDrain=0),C.length===0&&(C.ended||(C.needReadable=!0),j!==I&&C.ended&&Z(this)),ge!==null&&this.emit("data",ge),ge};function Re(I,C){if(l("onEofChunk"),!C.ended){if(C.decoder){var j=C.decoder.end();j&&j.length&&(C.buffer.push(j),C.length+=C.objectMode?1:j.length)}C.ended=!0,C.sync?xe(I):(C.needReadable=!1,C.emittedReadable||(C.emittedReadable=!0,nt(I)))}}function xe(I){var C=I._readableState;l("emitReadable",C.needReadable,C.emittedReadable),C.needReadable=!1,C.emittedReadable||(l("emitReadable",C.flowing),C.emittedReadable=!0,process.nextTick(nt,I))}function nt(I){var C=I._readableState;l("emitReadable_",C.destroyed,C.length,C.ended),!C.destroyed&&(C.length||C.ended)&&(I.emit("readable"),C.emittedReadable=!1),C.needReadable=!C.flowing&&!C.ended&&C.length<=C.highWaterMark,L(I)}function rt(I,C){C.readingMore||(C.readingMore=!0,process.nextTick(ut,I,C))}function ut(I,C){for(;!C.reading&&!C.ended&&(C.length<C.highWaterMark||C.flowing&&C.length===0);){var j=C.length;if(l("maybeReadMore read 0"),I.read(0),j===C.length)break}C.readingMore=!1}P.prototype._read=function(I){E(this,new b("_read()"))},P.prototype.pipe=function(I,C){var j=this,Q=this._readableState;switch(Q.pipesCount){case 0:Q.pipes=I;break;case 1:Q.pipes=[Q.pipes,I];break;default:Q.pipes.push(I);break}Q.pipesCount+=1,l("pipe count=%d opts=%j",Q.pipesCount,C);var ge=(!C||C.end!==!1)&&I!==process.stdout&&I!==process.stderr,se=ge?un:Lr;Q.endEmitted?process.nextTick(se):j.once("end",se),I.on("unpipe",me);function me(S,m){l("onunpipe"),S===j&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,Ta())}function un(){l("onend"),I.end()}var Ca=De(j);I.on("drain",Ca);var ka=!1;function Ta(){l("cleanup"),I.removeListener("close",Ia),I.removeListener("finish",fn),I.removeListener("drain",Ca),I.removeListener("error",xi),I.removeListener("unpipe",me),j.removeListener("end",un),j.removeListener("end",Lr),j.removeListener("data",Vt),ka=!0,Q.awaitDrain&&(!I._writableState||I._writableState.needDrain)&&Ca()}j.on("data",Vt);function Vt(S){l("ondata");var m=I.write(S);l("dest.write",m),m===!1&&((Q.pipesCount===1&&Q.pipes===I||Q.pipesCount>1&&X(Q.pipes,I)!==-1)&&!ka&&(l("false write response, pause",Q.awaitDrain),Q.awaitDrain++),j.pause())}function xi(S){l("onerror",S),Lr(),I.removeListener("error",xi),t(I,"error")===0&&E(I,S)}T(I,"error",xi);function Ia(){I.removeListener("finish",fn),Lr()}I.once("close",Ia);function fn(){l("onfinish"),I.removeListener("close",Ia),Lr()}I.once("finish",fn);function Lr(){l("unpipe"),j.unpipe(I)}return I.emit("pipe",j),Q.flowing||(l("pipe resume"),j.resume()),I};function De(I){return function(){var j=I._readableState;l("pipeOnDrain",j.awaitDrain),j.awaitDrain&&j.awaitDrain--,j.awaitDrain===0&&t(I,"data")&&(j.flowing=!0,L(I))}}P.prototype.unpipe=function(I){var C=this._readableState,j={hasUnpiped:!1};if(C.pipesCount===0)return this;if(C.pipesCount===1)return I&&I!==C.pipes?this:(I||(I=C.pipes),C.pipes=null,C.pipesCount=0,C.flowing=!1,I&&I.emit("unpipe",this,j),this);if(!I){var Q=C.pipes,ge=C.pipesCount;C.pipes=null,C.pipesCount=0,C.flowing=!1;for(var se=0;se<ge;se++)Q[se].emit("unpipe",this,{hasUnpiped:!1});return this}var me=X(C.pipes,I);return me===-1?this:(C.pipes.splice(me,1),C.pipesCount-=1,C.pipesCount===1&&(C.pipes=C.pipes[0]),I.emit("unpipe",this,j),this)},P.prototype.on=function(I,C){var j=n.prototype.on.call(this,I,C),Q=this._readableState;return I==="data"?(Q.readableListening=this.listenerCount("readable")>0,Q.flowing!==!1&&this.resume()):I==="readable"&&!Q.endEmitted&&!Q.readableListening&&(Q.readableListening=Q.needReadable=!0,Q.flowing=!1,Q.emittedReadable=!1,l("on readable",Q.length,Q.reading),Q.length?xe(this):Q.reading||process.nextTick(Rt,this)),j},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(I,C){var j=n.prototype.removeListener.call(this,I,C);return I==="readable"&&process.nextTick(Be,this),j},P.prototype.removeAllListeners=function(I){var C=n.prototype.removeAllListeners.apply(this,arguments);return(I==="readable"||I===void 0)&&process.nextTick(Be,this),C};function Be(I){var C=I._readableState;C.readableListening=I.listenerCount("readable")>0,C.resumeScheduled&&!C.paused?C.flowing=!0:I.listenerCount("data")>0&&I.resume()}function Rt(I){l("readable nexttick read 0"),I.read(0)}P.prototype.resume=function(){var I=this._readableState;return I.flowing||(l("resume"),I.flowing=!I.readableListening,cn(this,I)),I.paused=!1,this};function cn(I,C){C.resumeScheduled||(C.resumeScheduled=!0,process.nextTick(je,I,C))}function je(I,C){l("resume",C.reading),C.reading||I.read(0),C.resumeScheduled=!1,I.emit("resume"),L(I),C.flowing&&!C.reading&&I.read(0)}P.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function L(I){var C=I._readableState;for(l("flow",C.flowing);C.flowing&&I.read()!==null;);}P.prototype.wrap=function(I){var C=this,j=this._readableState,Q=!1;I.on("end",function(){if(l("wrapped end"),j.decoder&&!j.ended){var me=j.decoder.end();me&&me.length&&C.push(me)}C.push(null)}),I.on("data",function(me){if(l("wrapped data"),j.decoder&&(me=j.decoder.write(me)),!(j.objectMode&&me==null)&&!(!j.objectMode&&(!me||!me.length))){var un=C.push(me);un||(Q=!0,I.pause())}});for(var ge in I)this[ge]===void 0&&typeof I[ge]=="function"&&(this[ge]=function(un){return function(){return I[un].apply(I,arguments)}}(ge));for(var se=0;se<_.length;se++)I.on(_[se],this.emit.bind(this,_[se]));return this._read=function(me){l("wrapped _read",me),Q&&(Q=!1,I.resume())},this},typeof Symbol=="function"&&(P.prototype[Symbol.asyncIterator]=function(){return A===void 0&&(A=Bte()),A(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(C){this._readableState&&(this._readableState.flowing=C)}}),P._fromList=O,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function O(I,C){if(C.length===0)return null;var j;return C.objectMode?j=C.buffer.shift():!I||I>=C.length?(C.decoder?j=C.buffer.join(""):C.buffer.length===1?j=C.buffer.first():j=C.buffer.concat(C.length),C.buffer.clear()):j=C.buffer.consume(I,C.decoder),j}function Z(I){var C=I._readableState;l("endReadable",C.endEmitted),C.endEmitted||(C.ended=!0,process.nextTick(q,C,I))}function q(I,C){if(l("endReadableNT",I.endEmitted,I.length),!I.endEmitted&&I.length===0&&(I.endEmitted=!0,C.readable=!1,C.emit("end"),I.autoDestroy)){var j=C._writableState;(!j||j.autoDestroy&&j.finished)&&C.destroy()}}typeof Symbol=="function"&&(P.from=function(I,C){return x===void 0&&(x=Fte()),x(P,I,C)});function X(I,C){for(var j=0,Q=I.length;j<Q;j++)if(I[j]===C)return j;return-1}return Dv}var Bv,bI;function yI(){if(bI)return Bv;bI=1,Bv=s;var e=Al().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=El();xl(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",l)}function l(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){c(u,f,h)}):c(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 c(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 Bv}var Fv,vI;function Mte(){if(vI)return Fv;vI=1,Fv=t;var e=yI();xl(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)},Fv}var Mv,wI;function Pte(){if(wI)return Mv;wI=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=Al().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=Tv()),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 l(h){h()}function c(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,E=A>0;return s(w,x,E,function(_){b||(b=_),_&&y.forEach(l),!x&&(y.forEach(l),g(b))})});return d.reduce(c)}return Mv=f,Mv}var xI=Gn,Pv=dv.EventEmitter,Ote=xl;Ote(Gn,Pv),Gn.Readable=mI(),Gn.Writable=cI(),Gn.Duplex=El(),Gn.Transform=yI(),Gn.PassThrough=Mte(),Gn.finished=Tv(),Gn.pipeline=Pte(),Gn.Stream=Gn;function Gn(){Pv.call(this)}Gn.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 l(u){if(c(),Pv.listenerCount(this,"error")===0)throw u}n.on("error",l),e.on("error",l);function c(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",o),n.removeListener("close",s),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e};function Af(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function AI(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function Ef(e){return AI(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function di(e){return AI(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function EI(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(Af))}),t}function SI(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&Af(t[0]),source:t[1]&&Af(t[1]),type:t[2]&&Af(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:EI(t[8])}}function _I(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 CI(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 Lte(e,t){const n=e.attributes===null||e.attributes===void 0?".":CI(e.attributes),i=`${[e.seq_id===null?".":di(e.seq_id),e.source===null?".":di(e.source),e.type===null?".":di(e.type),e.start===null?".":di(e.start),e.end===null?".":di(e.end),e.score===null?".":di(e.score),e.strand===null?".":di(e.strand),e.phase===null?".":di(e.phase),n].join(" ")}
3512
- `;return t[i]?"":(t[i]=!0,i)}function Rp(e,t){if(Array.isArray(e))return e.map(r=>Rp(r,t)).join("");const n=[Lte(e,t)];return Nte(e)&&n.push(...e.child_features.map(r=>Rp(r,t)),...e.derived_features.map(r=>Rp(r,t))),n.join("")}function kI(e){return Rp(e,{})}function TI(e){let t=`##${e.directive}`;return e.value&&(t+=` ${e.value}`),t+=`
3514
+ )`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,AT.parse(t.trim())]));function av(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 Tee={".":0,"-":-1,"+":1};function Iee(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 Ree{constructor(t={}){if(t.autoSql)this.autoSql=av(kee.parse(t.autoSql));else if(t.type){if(!iv[t.type])throw new Error("Type not found");this.autoSql=av(iv[t.type])}else this.autoSql=av(iv.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&&Iee(a))for(let s=0;s<r.fields.length;s++){const l=r.fields[s];let c=a[s];const{isNumeric:u,isArray:f,arrayIsNumeric:h,name:d}=l;if(c==null)break;if(c!=="."){if(u){const p=Number(c);c=Number.isNaN(p)?c:p}else f&&(c=c.split(","),c[c.length-1]===""&&c.pop(),h&&(c=c.map(p=>Number(p))));o[d]=c}}else{const s=["chrom","chromStart","chromEnd","name"];o=Object.fromEntries(a.map((l,c)=>[s[c]||"field"+c,l])),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=Tee[o.strand]||0,o.chrom=decodeURIComponent(o.chrom),o}}const Dee=Object.freeze(Object.defineProperty({__proto__:null,default:Ree},Symbol.toStringTag,{value:"Module"}));let ET=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 ml(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new ET(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 ST=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 Bee(e){return new Promise(t=>setTimeout(t,e))}function Fee(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}function Mee(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 Pee(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function Oee(e={}){return"aborted"in e?{signal:e}:e}function _T(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):Pee(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function CT(e,t){return{lineCount:Fee(J0.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function Sp(e,t){return e?e.compareTo(t)>0?t:e:t}function Lee(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 kT=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const Nee=21578050;function zee(e,t){return e-e%t}function Uee(e,t){return e-e%t+t}function $ee(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 bl extends kT{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)!==Nee)throw new Error("Not a BAI file");const r=n.readInt32LE(4),a=((1<<(5+1)*3)-1)/7;let o=8,s;const l=new Array(r);for(let c=0;c<r;c++){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=CT(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=ml(n,o);o+=8;const E=ml(n,o);o+=8,s=Sp(s,x),w[A]=new ST(x,E,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=ml(n,o);o+=8,s=Sp(s,b),p[g]=b}l[c]={binIndex:h,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:s,maxBlockSize:65536,indices:l,refCount:r}}async indexCov(t,n,r,i={}){const o=n!==void 0,l=(await this.parse(i)).indices[t];if(!l)return[];const{linearIndex:c=[],stats:u}=l;if(c.length===0)return[];const f=r===void 0?(c.length-1)*16384:Uee(r,16384),h=n===void 0?0:zee(n,16384),d=o?new Array((f-h)/16384):new Array(c.length-1),p=c[c.length-1].blockPosition;if(f>(c.length-1)*16384)throw new Error("query outside of range of linear index");let g=c[h/16384].blockPosition;for(let b=h/16384,y=0;b<f/16384;b++,y++)d[y]={score:c[b+1].blockPosition-g,start:b*16384,end:b*16384+16384},g=c[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=$ee(n,r),l=[];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)l.push(y)}const c=o.linearIndex.length;let u;const f=Math.min(n>>14,c-1),h=Math.min(r>>14,c-1);for(let d=f;d<=h;++d){const p=o.linearIndex[d];p&&(!u||p.compareTo(u)<0)&&(u=p)}return _T(l,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 va=Ae.Buffer,ov=[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"&&(ov=new Int32Array(ov));function TT(e){if(va.isBuffer(e))return e;var t=typeof va.alloc=="function"&&typeof va.from=="function";if(typeof e=="number")return t?va.alloc(e):new va(e);if(typeof e=="string")return t?va.from(e):new va(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function Hee(e){var t=TT(4);return t.writeInt32BE(e,0),t}function sv(e,t){e=TT(e),va.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=~~t^-1,r=0;r<e.length;r++)n=ov[(n^e[r])&255]^n>>>8;return n^-1}function lv(){return Hee(sv.apply(null,arguments))}lv.signed=function(){return sv.apply(null,arguments)},lv.unsigned=function(){return sv.apply(null,arguments)>>>0};var Gee=lv;const Vee=Bu(Gee),jee=21582659,qee=38359875;function Wee(e,t){return e*2**t}function IT(e,t){return Math.floor(e/2**t)}let _p=class extends kT{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),l=s?String.fromCharCode(s):"",c=t.readInt32LE(n+20),u=t.readInt32LE(n+24);return{columnNumbers:o,coordinateType:i,metaValue:s,metaChar:l,skipLines:c,format:a,formatFlags:r,...Lee(t.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await fa(n);let i;if(r.readUInt32LE(0)===jee)i=1;else if(r.readUInt32LE(0)===qee)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 l=16+a+4,c;const u=new Array(s);for(let f=0;f<s;f++){const h=r.readInt32LE(l);l+=4;const d={};let p;for(let g=0;g<h;g++){const b=r.readUInt32LE(l);if(l+=4,b>this.maxBinNumber)p=CT(r,l+28),l+=28+16;else{c=Sp(c,ml(r,l)),l+=8;const y=r.readInt32LE(l);l+=4;const w=new Array(y);for(let A=0;A<y;A+=1){const x=ml(r,l);l+=8;const E=ml(r,l);l+=8,c=Sp(c,x),w[A]=new ST(x,E,b)}d[b]=w}}u[f]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:c,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 l=[];for(const[c,u]of s)for(let f=c;f<=u;f++)if(o.binIndex[f]){const h=o.binIndex[f];for(const d of h)l.push(d)}return _T(l,new ET(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+=Wee(1,r*3),r+=1){const s=i+IT(t,a),l=i+IT(n,a);if(l-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,l])}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 Hn={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},RT="=ACMGRSVTWYHKDBN".split(""),wf="MIDNSHP=X???????".split("");class DT{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 l=String.fromCharCode(n[i+2]);i+=3;let c;switch(l){case"A":{c=String.fromCharCode(n[i]),i+=1;break}case"i":{c=n.readInt32LE(i),i+=4;break}case"I":{c=n.readUInt32LE(i),i+=4;break}case"c":{c=n.readInt8(i),i+=1;break}case"C":{c=n.readUInt8(i),i+=1;break}case"s":{c=n.readInt16LE(i),i+=2;break}case"S":{c=n.readUInt16LE(i),i+=2;break}case"f":{c=n.readFloatLE(i),i+=4;break}case"Z":case"H":{for(c="";i<=a;){const u=n[i++];if(u===0)break;c+=String.fromCharCode(u)}break}case"B":{c="";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=wf[p&15];c+=g+b,i+=4}else for(let d=0;d<h;d++)c+=n.readInt32LE(i),d+1<h&&(c+=","),i+=4;if(f==="I")if(s==="CG")for(let d=0;d<h;d++){const p=n.readUInt32LE(i),g=p>>4,b=wf[p&15];c+=g+b,i+=4}else for(let d=0;d<h;d++)c+=n.readUInt32LE(i),d+1<h&&(c+=","),i+=4;if(f==="s")for(let d=0;d<h;d++)c+=n.readInt16LE(i),d+1<h&&(c+=","),i+=2;if(f==="S")for(let d=0;d<h;d++)c+=n.readUInt16LE(i),d+1<h&&(c+=","),i+=2;if(f==="c")for(let d=0;d<h;d++)c+=n.readInt8(i),d+1<h&&(c+=","),i+=1;if(f==="C")for(let d=0;d<h;d++)c+=n.readUInt8(i),d+1<h&&(c+=","),i+=1;if(f==="f")for(let d=0;d<h;d++)c+=n.readFloatLE(i),d+1<h&&(c+=","),i+=4;break}default:console.warn(`Unknown BAM tag type '${l}', tags may be incomplete`),c=void 0,i=a}if(this._tagOffset=i,this._tagList.push(s),o===t)return c;this.data[o]=c}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&Hn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&Hn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&Hn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&Hn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&Hn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&Hn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&Hn.BAM_FREAD1)}isRead2(){return!!(this.flags&Hn.BAM_FREAD2)}isSecondary(){return!!(this.flags&Hn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&Hn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&Hn.BAM_FDUP)}isSupplementary(){return!!(this.flags&Hn.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,l=t.readInt32LE(i),c=l>>4,u=wf[l&15];if(u==="S"&&c===a)return i+=4,l=t.readInt32LE(i),c=l>>4,u=wf[l&15],u!=="N"&&console.warn("CG tag with no N tag"),this.data.length_on_ref=c,this.get("CG");for(let f=0;f<r;++f)l=t.readInt32LE(i),c=l>>4,u=wf[l&15],o+=c+u,u!=="H"&&u!=="S"&&u!=="I"&&(s+=c),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 l=0;l<i;++l){const c=t[r+l];o+=RT[(c&240)>>4],s++,s<a&&(o+=RT[c&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 BT(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,l]=o.split(":",2);return{tag:s,value:l}})})}return n}const FT=21840194,MT=65536;async function Yee(e){let t=[];for await(const n of e)t=t.concat(n);return t}class Zee{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 PT{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:a,baiUrl:o,csiPath:s,csiFilehandle:l,csiUrl:c,htsget:u,yieldThreadTime:f=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new sp({cache:new lp({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 So(r);else if(u)this.htsget=!0,this.bam=new Zee;else throw new Error("unable to initialize bam");if(l)this.index=new _p({filehandle:l});else if(s)this.index=new _p({filehandle:new kt(s)});else if(c)this.index=new _p({filehandle:new So(c)});else if(a)this.index=new bl({filehandle:a});else if(i)this.index=new bl({filehandle:new kt(i)});else if(o)this.index=new bl({filehandle:new So(o)});else if(n)this.index=new bl({filehandle:new kt(`${n}.bai`)});else if(r)this.index=new bl({filehandle:new So(`${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=Oee(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+MT,f=await this.bam.read(Ae.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 fa(a);if(o.readInt32LE(0)!==FT)throw new Error("Not a BAM file");const s=o.readInt32LE(4);this.header=o.toString("utf8",8,8+s);const{chrToIndex:l,indexToChr:c}=await this._readRefSeqs(s+8,65535,n);return this.chrToIndex=l,this.indexToChr=c,BT(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+MT,{bytesRead:a,buffer:o}=await this.bam.read(Ae.Buffer.alloc(i),0,n,0,r);if(!a)throw new Error("Error reading refseqs from header");const s=await fa(o.subarray(0,Math.min(a,n))),l=s.readInt32LE(t);let c=t+4;const u={},f=[];for(let h=0;h<l;h+=1){const d=s.readInt32LE(c),p=this.renameRefSeq(s.toString("utf8",c+4,c+4+d-1)),g=s.readInt32LE(c+d+4);if(u[p]=h,f.push({refName:p,length:g}),c=c+8+d,c>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 Yee(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 l=!1;for(const c of t){const u=await this.featureCache.get(c.toString(),{chunk:c,opts:a},a.signal),f=[];for(const h of u)if(h.seq_id()===n)if(h.get("start")>=i){l=!0;break}else h.get("end")>=r&&f.push(h);if(s.push(f),yield f,l)break}Mee(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 l=[];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)&&l.push(this.index.blocksForRange(y,b,b+1,r))}});const c=new Map,u=await Promise.all(l);for(const h of u.flat())c.has(h.toString())||c.set(h.toString(),h);return(await Promise.all([...c.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(Ae.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 tk(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,l=+Date.now();for(;a+4<t.length;){const c=t.readInt32LE(a),u=a+4+c-1;if(r){for(;a+i.minv.dataPosition>=r[s++];);s--}if(u<t.length){const f=new DT({bytes:{byteArray:t,start:a,end:u},fileOffset:n.length>0?n[s]*256+(a-r[s])+i.minv.dataPosition+1:Vee.signed(t.slice(a,u))});o.push(f),this.yieldThreadTime&&+Date.now()-l>this.yieldThreadTime&&(await Bee(1),l=+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 OT(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:a}=r;if(i.startsWith("data:"))return Ae.Buffer.from(i.split(",")[1],"base64");{const{referer:o,...s}=a,l=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...s}});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${i}: ${await l.text()}`);return Ae.Buffer.from(await l.arrayBuffer())}}));return Ae.Buffer.concat(await Promise.all(n.map(r=>fa(r))))}class Qee extends PT{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`,l=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];if(l===void 0)yield[];else{const c=await fetch(s,{...i});if(!c.ok)throw new Error(`HTTP ${c.status} fetching ${s}: ${await c.text()}`);const u=await c.json(),f=await OT(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}`}}],l,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 OT(i.htsget.urls,t);if(a.readInt32LE(0)!==FT)throw new Error("Not a BAM file");const o=a.readInt32LE(4),s=a.toString("utf8",8,8+o),l=BT(s),c=[],u={},f=l.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,c[h]={refName:p,length:g}}return this.chrToIndex=u,this.indexToChr=c,l}}const Xee=Object.freeze(Object.defineProperty({__proto__:null,BAI:bl,BamFile:PT,BamRecord:DT,CSI:_p,HtsgetFile:Qee},Symbol.toStringTag,{value:"Module"}));function LT(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class Kee extends Error{}function yl(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new Kee("aborted");throw t.code="ERR_ABORTED",t}}}function Jee(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function NT(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):Jee(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class cv{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 vl(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new cv(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 Cp{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 zT{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 ete=21578324,UT=14;function tte(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 kp extends zT{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 fa(n);if(yl(t.signal),r.readUInt32LE(0)!==ete)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",l={0:"generic",1:"SAM",2:"VCF"}[a&15];if(!l)throw new Error(`invalid Tabix preset format flags ${a}`);const c={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 T={};let D;for(let N=0;N<_;N+=1){const oe=r.readUInt32LE(A);if(A+=4,oe>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(oe===h+1){const ue=r.readInt32LE(A);A+=4,ue===2&&(D=this.parsePseudoBin(r,A)),A+=16*ue}else{const ue=r.readInt32LE(A);A+=4;const ne=new Array(ue);for(let pe=0;pe<ue;pe+=1){const Re=vl(r,A),xe=vl(r,A+8);A+=16,x=this._findFirstData(x,Re),ne[pe]=new Cp(Re,xe,oe)}T[oe]=ne}}const P=r.readInt32LE(A);A+=4;const G=new Array(P);for(let N=0;N<P;N+=1)G[N]=vl(r,A),A+=8,x=this._findFirstData(x,G[N]);return{binIndex:T,linearIndex:G,stats:D}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:g,firstDataLine:x,columnNumbers:c,coordinateType:o,format:l,refIdToName:w,refNameToId:y,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:LT(J0.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>>UT>=s.linearIndex.length?s.linearIndex.length-1:n>>UT]:new cv(0,0))||console.warn("querying outside of possible tabix range");const c=tte(n,r),u=[];for(const[g,b]of c)for(let y=g;y<=b;y++)if(s.binIndex[y])for(const w of s.binIndex[y])u.push(new Cp(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 NT(u,h)}}const nte=21582659,rte=38359875;function ite(e,t){return e*2**t}function $T(e,t){return Math.floor(e/2**t)}class uv extends zT{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),l=s?String.fromCharCode(s):null,c=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:c,metaChar:l,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 fa(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===nte)r=1;else if(n.readUInt32LE(0)===rte)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 l,c=16+a+4;const u=new Array(s).fill(0).map(()=>{const f=n.readInt32LE(c);c+=4;const h={};let d;for(let p=0;p<f;p+=1){const g=n.readUInt32LE(c);if(g>this.maxBinNumber)d=this.parsePseudoBin(n,c+4),c+=4+8+4+16+16;else{const b=vl(n,c+4);l=this._findFirstData(l,b);const y=n.readInt32LE(c+12);c+=16;const w=new Array(y);for(let A=0;A<y;A+=1){const x=vl(n,c),E=vl(n,c+8);c+=16,w[A]=new Cp(x,E,g)}h[g]=w}}return{binIndex:h,stats:d}});return{...o,csi:!0,refCount:s,maxBlockSize:65536,firstDataLine:l,csiVersion:r,indices:u,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:LT(J0.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 l=this.reg2bins(n,r),c=[];for(const[u,f]of l)for(let h=u;h<=f;h++)if(s.binIndex[h])for(const d of s.binIndex[h])c.push(new Cp(d.minv,d.maxv,h));return NT(c,new cv(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+=ite(1,r*3),r+=1){const s=i+$T(t,a),l=i+$T(n,a);if(l-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,l])}return o}}const fv=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function ate(e){return new Promise(t=>setTimeout(t,e))}class ote{constructor({path:t,filehandle:n,tbiPath:r,tbiFilehandle:i,csiPath:a,csiFilehandle:o,yieldTime:s=500,chunkSizeLimit:l=5e7,renameRefSeqs:c=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 kp({filehandle:i,renameRefSeqs:c});else if(o)this.index=new uv({filehandle:o,renameRefSeqs:c});else if(r)this.index=new kp({filehandle:new kt(r),renameRefSeqs:c});else if(a)this.index=new uv({filehandle:new kt(a),renameRefSeqs:c});else if(t)this.index=new kp({filehandle:new kt(`${t}.tbi`),renameRefSeqs:c});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, or csiPath");this.chunkSizeLimit=l,this.renameRefSeq=c,this.yieldTime=s,this.chunkCache=new sp({cache:new lp({maxSize:Math.floor(u/65536)}),fill:(f,h)=>this.readChunk(f,{signal:h})})}async getLines(t,n,r,i){var a;let o,s={},l;if(i===void 0)throw new TypeError("line callback must be provided");if(typeof i=="function"?l=i:(s=i,l=i.lineCallback,o=i.signal),t===void 0)throw new TypeError("must provide a reference sequence name");if(!l)throw new TypeError("line callback must be provided");const c=await this.index.getMetadata(s);yl(o);const u=n??0,f=r??c.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);yl(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);yl(o);let A=0,x=0;for(;A<b.length;){const E=b.indexOf(`
3515
+ `,A);if(E===-1)break;const _=b.slice(A,E),T=(a=fv==null?void 0:fv.decode(_))!==null&&a!==void 0?a:_.toString();if(w){for(;A+p.minv.dataPosition>=w[x++];);x--}const{startCoordinate:D,overlaps:P}=this.checkLine(c,t,u,f,T);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,P)l(T.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(),yl(o),await ate(1)),A=E+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:n,metaChar:r,maxBlockSize:i}=await this.getMetadata(t);yl(t.signal);const a=((n==null?void 0:n.blockPosition)||0)+i,o=await this._readRegion(0,a,t),s=await fa(o);if(r){let l=-1;const c=`
3516
+ `.charCodeAt(0),u=r.charCodeAt(0);for(let f=0;f<s.length&&!(f===l+1&&s[f]!==u);f+=1)s[f]===c&&(l=f);return s.slice(0,l+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:l,format:c}=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),c==="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),l==="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(c==="VCF"&&p===4)b=a.slice(g,w);else if(p===h&&(c==="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 l=r.indexOf(";",s);l===-1&&(l=r.length),i=parseInt(r.slice(s+4,l),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=Ae.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 tk(r,t)}}const ste=Object.freeze(Object.defineProperty({__proto__:null,CSI:uv,TBI:kp,TabixIndexedFile:ote},Symbol.toStringTag,{value:"Module"}));var hv={exports:{}},wl=typeof Reflect=="object"?Reflect:null,HT=wl&&typeof wl.apply=="function"?wl.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},Tp;wl&&typeof wl.ownKeys=="function"?Tp=wl.ownKeys:Object.getOwnPropertySymbols?Tp=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Tp=function(t){return Object.getOwnPropertyNames(t)};function lte(e){console&&console.warn&&console.warn(e)}var GT=Number.isNaN||function(t){return t!==t};function Ne(){Ne.init.call(this)}hv.exports=Ne,hv.exports.once=hte,Ne.EventEmitter=Ne,Ne.prototype._events=void 0,Ne.prototype._eventsCount=0,Ne.prototype._maxListeners=void 0;var VT=10;function Ip(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Ne,"defaultMaxListeners",{enumerable:!0,get:function(){return VT},set:function(e){if(typeof e!="number"||e<0||GT(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");VT=e}}),Ne.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},Ne.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||GT(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 jT(e){return e._maxListeners===void 0?Ne.defaultMaxListeners:e._maxListeners}Ne.prototype.getMaxListeners=function(){return jT(this)},Ne.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 l=a[t];if(l===void 0)return!1;if(typeof l=="function")HT(l,this,n);else for(var c=l.length,u=QT(l,c),r=0;r<c;++r)HT(u[r],this,n);return!0};function qT(e,t,n,r){var i,a,o;if(Ip(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=jT(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,lte(s)}return e}Ne.prototype.addListener=function(t,n){return qT(this,t,n,!1)},Ne.prototype.on=Ne.prototype.addListener,Ne.prototype.prependListener=function(t,n){return qT(this,t,n,!0)};function cte(){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 WT(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=cte.bind(r);return i.listener=n,r.wrapFn=i,i}Ne.prototype.once=function(t,n){return Ip(n),this.on(t,WT(this,t,n)),this},Ne.prototype.prependOnceListener=function(t,n){return Ip(n),this.prependListener(t,WT(this,t,n)),this},Ne.prototype.removeListener=function(t,n){var r,i,a,o,s;if(Ip(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():ute(r,a),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this},Ne.prototype.off=Ne.prototype.removeListener,Ne.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 YT(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?fte(i):QT(i,i.length)}Ne.prototype.listeners=function(t){return YT(this,t,!0)},Ne.prototype.rawListeners=function(t){return YT(this,t,!1)},Ne.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):ZT.call(e,t)},Ne.prototype.listenerCount=ZT;function ZT(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}Ne.prototype.eventNames=function(){return this._eventsCount>0?Tp(this._events):[]};function QT(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function ute(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function fte(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function hte(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))}XT(e,t,a,{once:!0}),t!=="error"&&dte(e,i,{once:!0})})}function dte(e,t,n){typeof e.on=="function"&&XT(e,"error",t,n)}function XT(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 dv=hv.exports,pv={exports:{}};typeof Object.create=="function"?pv.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:pv.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 xl=pv.exports,gv,KT;function JT(){return KT||(KT=1,gv=dv.EventEmitter),gv}const eI=iY(PY);var mv,tI;function pte(){if(tI)return mv;tI=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 l=Ae,c=l.Buffer,u=eI,f=u.inspect,h=f&&f.custom||"inspect";function d(p,g,b){c.prototype.copy.call(p,g,b)}return mv=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 c.alloc(0);for(var y=c.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,E=b>x.length?x.length:b;if(E===x.length?A+=x:A+=x.slice(0,b),b-=E,b===0){E===x.length?(++w,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=x.slice(E));break}++w}return this.length-=w,A}},{key:"_getBuffer",value:function(b){var y=c.allocUnsafe(b),w=this.head,A=1;for(w.data.copy(y),b-=w.data.length;w=w.next;){var x=w.data,E=b>x.length?x.length:b;if(x.copy(y,y.length-b,0,E),b-=E,b===0){E===x.length?(++A,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=x.slice(E));break}++A}return this.length-=A,y}},{key:h,value:function(b,y){return f(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),p}(),mv}var bv,nI;function rI(){if(nI)return bv;nI=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||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?l._writableState?l._writableState.errorEmitted?process.nextTick(n,l):(l._writableState.errorEmitted=!0,process.nextTick(t,l,f)):process.nextTick(t,l,f):s?(process.nextTick(n,l),s(f)):process.nextTick(n,l)}),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 l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return bv={destroy:e,undestroy:r,errorOrDestroy:a},bv}var yv={},iI;function Al(){if(iI)return yv;iI=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var t={};function n(s,l,c){c||(c=Error);function u(h,d,p){return typeof l=="string"?l:l(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}(c);f.prototype.name=c.name,f.prototype.code=s,t[s]=f}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function i(s,l,c){return s.substr(!c||c<0?0:+c,l.length)===l}function a(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&i(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var f;if(a(s," argument"))f="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var h=o(s,".")?"property":"argument";f='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(l,"type"))}return f+=". Received type ".concat(typeof c),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"),yv.codes=t,yv}var vv,aI;function oI(){if(aI)return vv;aI=1;var e=Al().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 l=o?a:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return vv={getHighWaterMark:n},vv}var wv,sI;function gte(){if(sI)return wv;sI=1,wv=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 wv}var xv,lI;function cI(){if(lI)return xv;lI=1,xv=D;function e(L){var O=this;this.next=null,this.entry=null,this.finish=function(){je(O,L)}}var t;D.WritableState=_;var n={deprecate:gte()},r=JT(),i=Ae.Buffer,a=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(L){return i.from(L)}function s(L){return i.isBuffer(L)||L instanceof a}var l=rI(),c=oI(),u=c.getHighWaterMark,f=Al().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=l.errorOrDestroy;xl(D,r);function E(){}function _(L,O,Z){t=t||El(),L=L||{},typeof Z!="boolean"&&(Z=O instanceof t),this.objectMode=!!L.objectMode,Z&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=u(this,L,"writableHighWaterMark",Z),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=L.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X){Re(O,X)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}_.prototype.getBuffer=function(){for(var O=this.bufferedRequest,Z=[];O;)Z.push(O),O=O.next;return Z},function(){try{Object.defineProperty(_.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var T;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(O){return T.call(this,O)?!0:this!==D?!1:O&&O._writableState instanceof _}})):T=function(O){return O instanceof this};function D(L){t=t||El();var O=this instanceof t;if(!O&&!T.call(D,this))return new D(L);this._writableState=new _(L,this,O),this.writable=!0,L&&(typeof L.write=="function"&&(this._write=L.write),typeof L.writev=="function"&&(this._writev=L.writev),typeof L.destroy=="function"&&(this._destroy=L.destroy),typeof L.final=="function"&&(this._final=L.final)),r.call(this)}D.prototype.pipe=function(){x(this,new g)};function P(L,O){var Z=new w;x(L,Z),process.nextTick(O,Z)}function G(L,O,Z,q){var X;return Z===null?X=new y:typeof Z!="string"&&!O.objectMode&&(X=new h("chunk",["string","Buffer"],Z)),X?(x(L,X),process.nextTick(q,X),!1):!0}D.prototype.write=function(L,O,Z){var q=this._writableState,X=!1,I=!q.objectMode&&s(L);return I&&!i.isBuffer(L)&&(L=o(L)),typeof O=="function"&&(Z=O,O=null),I?O="buffer":O||(O=q.defaultEncoding),typeof Z!="function"&&(Z=E),q.ending?P(this,Z):(I||G(this,q,L,Z))&&(q.pendingcb++,X=oe(this,q,I,L,O,Z)),X},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var L=this._writableState;L.corked&&(L.corked--,!L.writing&&!L.corked&&!L.bufferProcessing&&L.bufferedRequest&&rt(this,L))},D.prototype.setDefaultEncoding=function(O){if(typeof O=="string"&&(O=O.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((O+"").toLowerCase())>-1))throw new A(O);return this._writableState.defaultEncoding=O,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function N(L,O,Z){return!L.objectMode&&L.decodeStrings!==!1&&typeof O=="string"&&(O=i.from(O,Z)),O}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function oe(L,O,Z,q,X,I){if(!Z){var C=N(O,q,X);q!==C&&(Z=!0,X="buffer",q=C)}var j=O.objectMode?1:q.length;O.length+=j;var Q=O.length<O.highWaterMark;if(Q||(O.needDrain=!0),O.writing||O.corked){var ge=O.lastBufferedRequest;O.lastBufferedRequest={chunk:q,encoding:X,isBuf:Z,callback:I,next:null},ge?ge.next=O.lastBufferedRequest:O.bufferedRequest=O.lastBufferedRequest,O.bufferedRequestCount+=1}else ue(L,O,!1,j,q,X,I);return Q}function ue(L,O,Z,q,X,I,C){O.writelen=q,O.writecb=C,O.writing=!0,O.sync=!0,O.destroyed?O.onwrite(new b("write")):Z?L._writev(X,O.onwrite):L._write(X,I,O.onwrite),O.sync=!1}function ne(L,O,Z,q,X){--O.pendingcb,Z?(process.nextTick(X,q),process.nextTick(Rt,L,O),L._writableState.errorEmitted=!0,x(L,q)):(X(q),L._writableState.errorEmitted=!0,x(L,q),Rt(L,O))}function pe(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}function Re(L,O){var Z=L._writableState,q=Z.sync,X=Z.writecb;if(typeof X!="function")throw new p;if(pe(Z),O)ne(L,Z,q,O,X);else{var I=ut(Z)||L.destroyed;!I&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&rt(L,Z),q?process.nextTick(xe,L,Z,I,X):xe(L,Z,I,X)}}function xe(L,O,Z,q){Z||nt(L,O),O.pendingcb--,q(),Rt(L,O)}function nt(L,O){O.length===0&&O.needDrain&&(O.needDrain=!1,L.emit("drain"))}function rt(L,O){O.bufferProcessing=!0;var Z=O.bufferedRequest;if(L._writev&&Z&&Z.next){var q=O.bufferedRequestCount,X=new Array(q),I=O.corkedRequestsFree;I.entry=Z;for(var C=0,j=!0;Z;)X[C]=Z,Z.isBuf||(j=!1),Z=Z.next,C+=1;X.allBuffers=j,ue(L,O,!0,O.length,X,"",I.finish),O.pendingcb++,O.lastBufferedRequest=null,I.next?(O.corkedRequestsFree=I.next,I.next=null):O.corkedRequestsFree=new e(O),O.bufferedRequestCount=0}else{for(;Z;){var Q=Z.chunk,ge=Z.encoding,se=Z.callback,me=O.objectMode?1:Q.length;if(ue(L,O,!1,me,Q,ge,se),Z=Z.next,O.bufferedRequestCount--,O.writing)break}Z===null&&(O.lastBufferedRequest=null)}O.bufferedRequest=Z,O.bufferProcessing=!1}D.prototype._write=function(L,O,Z){Z(new d("_write()"))},D.prototype._writev=null,D.prototype.end=function(L,O,Z){var q=this._writableState;return typeof L=="function"?(Z=L,L=null,O=null):typeof O=="function"&&(Z=O,O=null),L!=null&&this.write(L,O),q.corked&&(q.corked=1,this.uncork()),q.ending||cn(this,q,Z),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ut(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function De(L,O){L._final(function(Z){O.pendingcb--,Z&&x(L,Z),O.prefinished=!0,L.emit("prefinish"),Rt(L,O)})}function Be(L,O){!O.prefinished&&!O.finalCalled&&(typeof L._final=="function"&&!O.destroyed?(O.pendingcb++,O.finalCalled=!0,process.nextTick(De,L,O)):(O.prefinished=!0,L.emit("prefinish")))}function Rt(L,O){var Z=ut(O);if(Z&&(Be(L,O),O.pendingcb===0&&(O.finished=!0,L.emit("finish"),O.autoDestroy))){var q=L._readableState;(!q||q.autoDestroy&&q.endEmitted)&&L.destroy()}return Z}function cn(L,O,Z){O.ending=!0,Rt(L,O),Z&&(O.finished?process.nextTick(Z):L.once("finish",Z)),O.ended=!0,L.writable=!1}function je(L,O,Z){var q=L.entry;for(L.entry=null;q;){var X=q.callback;O.pendingcb--,X(Z),q=q.next}O.corkedRequestsFree.next=L}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(O){this._writableState&&(this._writableState.destroyed=O)}}),D.prototype.destroy=l.destroy,D.prototype._undestroy=l.undestroy,D.prototype._destroy=function(L,O){O(L)},xv}var Av,uI;function El(){if(uI)return Av;uI=1;var e=Object.keys||function(c){var u=[];for(var f in c)u.push(f);return u};Av=o;var t=mI(),n=cI();xl(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(c){if(!(this instanceof o))return new o(c);t.call(this,c),n.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.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(l,this)}function l(c){c.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)}}),Av}var Ev={},Sv={exports:{}};(function(e,t){var n=Ae,r=n.Buffer;function i(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a);function a(o,s,l){return r(o,s,l)}i(r,a),a.from=function(o,s,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,l)},a.alloc=function(o,s,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=r(o);return s!==void 0?typeof l=="string"?c.fill(s,l):c.fill(s):c.fill(0),c},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)}})(Sv,Sv.exports);var mte=Sv.exports,_v=mte.Buffer,fI=_v.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 bte(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 yte(e){var t=bte(e);if(typeof t!="string"&&(_v.isEncoding===fI||!fI(e)))throw new Error("Unknown encoding: "+e);return t||e}var vte=Ev.StringDecoder=xf;function xf(e){this.encoding=yte(e);var t;switch(this.encoding){case"utf16le":this.text=_te,this.end=Cte,t=4;break;case"utf8":this.fillLast=Ate,t=4;break;case"base64":this.text=kte,this.end=Tte,t=3;break;default:this.write=Ite,this.end=Rte;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_v.allocUnsafe(t)}xf.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||""},xf.prototype.end=Ste,xf.prototype.text=Ete,xf.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 Cv(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function wte(e,t,n){var r=t.length-1;if(r<n)return 0;var i=Cv(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=Cv(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=Cv(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function xte(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 Ate(e){var t=this.lastTotal-this.lastNeed,n=xte(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 Ete(e,t){var n=wte(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 Ste(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function _te(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 Cte(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 kte(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 Tte(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Ite(e){return e.toString(this.encoding)}function Rte(e){return e&&e.length?this.write(e):""}var kv,hI;function Tv(){if(hI)return kv;hI=1;var e=Al().codes.ERR_STREAM_PREMATURE_CLOSE;function t(a){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];a.apply(this,l)}}}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 l=o.readable||o.readable!==!1&&a.readable,c=o.writable||o.writable!==!1&&a.writable,u=function(){a.writable||h()},f=a._writableState&&a._writableState.finished,h=function(){c=!1,f=!0,l||s.call(a)},d=a._readableState&&a._readableState.endEmitted,p=function(){l=!1,d=!0,c||s.call(a)},g=function(A){s.call(a,A)},b=function(){var A;if(l&&!d)return(!a._readableState||!a._readableState.ended)&&(A=new e),s.call(a,A);if(c&&!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)):c&&!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 kv=i,kv}var Iv,dI;function Dte(){if(dI)return Iv;dI=1;var e;function t(A,x,E){return x=n(x),x in A?Object.defineProperty(A,x,{value:E,enumerable:!0,configurable:!0,writable:!0}):A[x]=E,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 E=A[Symbol.toPrimitive];if(E!==void 0){var _=E.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=Tv(),a=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=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 E=A[f].read();E!==null&&(A[c]=null,A[a]=null,A[o]=null,x(h(E,!1)))}}function p(A){process.nextTick(d,A)}function g(A,x){return function(E,_){A.then(function(){if(x[l]){E(h(void 0,!0));return}x[u](E,_)},_)}}var b=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var x=this,E=this[s];if(E!==null)return Promise.reject(E);if(this[l])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(P,G){process.nextTick(function(){x[s]?G(x[s]):P(h(void 0,!0))})});var _=this[c],T;if(_)T=new Promise(g(_,this));else{var D=this[f].read();if(D!==null)return Promise.resolve(h(D,!1));T=new Promise(this[u])}return this[c]=T,T}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var x=this;return new Promise(function(E,_){x[f].destroy(null,function(T){if(T){_(T);return}E(h(void 0,!0))})})}),e),b),w=function(x){var E,_=Object.create(y,(E={},t(E,f,{value:x,writable:!0}),t(E,a,{value:null,writable:!0}),t(E,o,{value:null,writable:!0}),t(E,s,{value:null,writable:!0}),t(E,l,{value:x._readableState.endEmitted,writable:!0}),t(E,u,{value:function(D,P){var G=_[f].read();G?(_[c]=null,_[a]=null,_[o]=null,D(h(G,!1))):(_[a]=D,_[o]=P)},writable:!0}),E));return _[c]=null,i(x,function(T){if(T&&T.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=_[o];D!==null&&(_[c]=null,_[a]=null,_[o]=null,D(T)),_[s]=T;return}var P=_[a];P!==null&&(_[c]=null,_[a]=null,_[o]=null,P(h(void 0,!0))),_[l]=!0}),x.on("readable",p.bind(null,_)),_};return Iv=w,Iv}var Rv,pI;function Bte(){return pI||(pI=1,Rv=function(){throw new Error("Readable.from is not available in the browser")}),Rv}var Dv,gI;function mI(){if(gI)return Dv;gI=1,Dv=P;var e;P.ReadableState=D,dv.EventEmitter;var t=function(C,j){return C.listeners(j).length},n=JT(),r=Ae.Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(I){return r.from(I)}function o(I){return r.isBuffer(I)||I instanceof i}var s=eI,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=pte(),u=rI(),f=oI(),h=f.getHighWaterMark,d=Al().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;xl(P,n);var E=u.errorOrDestroy,_=["error","close","destroy","pause","resume"];function T(I,C,j){if(typeof I.prependListener=="function")return I.prependListener(C,j);!I._events||!I._events[C]?I.on(C,j):Array.isArray(I._events[C])?I._events[C].unshift(j):I._events[C]=[j,I._events[C]]}function D(I,C,j){e=e||El(),I=I||{},typeof j!="boolean"&&(j=C instanceof e),this.objectMode=!!I.objectMode,j&&(this.objectMode=this.objectMode||!!I.readableObjectMode),this.highWaterMark=h(this,I,"readableHighWaterMark",j),this.buffer=new c,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=I.emitClose!==!1,this.autoDestroy=!!I.autoDestroy,this.destroyed=!1,this.defaultEncoding=I.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,I.encoding&&(w||(w=Ev.StringDecoder),this.decoder=new w(I.encoding),this.encoding=I.encoding)}function P(I){if(e=e||El(),!(this instanceof P))return new P(I);var C=this instanceof e;this._readableState=new D(I,this,C),this.readable=!0,I&&(typeof I.read=="function"&&(this._read=I.read),typeof I.destroy=="function"&&(this._destroy=I.destroy)),n.call(this)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(C){this._readableState&&(this._readableState.destroyed=C)}}),P.prototype.destroy=u.destroy,P.prototype._undestroy=u.undestroy,P.prototype._destroy=function(I,C){C(I)},P.prototype.push=function(I,C){var j=this._readableState,Q;return j.objectMode?Q=!0:typeof I=="string"&&(C=C||j.defaultEncoding,C!==j.encoding&&(I=r.from(I,C),C=""),Q=!0),G(this,I,C,!1,Q)},P.prototype.unshift=function(I){return G(this,I,null,!0,!1)};function G(I,C,j,Q,ge){l("readableAddChunk",C);var se=I._readableState;if(C===null)se.reading=!1,Re(I,se);else{var me;if(ge||(me=oe(se,C)),me)E(I,me);else if(se.objectMode||C&&C.length>0)if(typeof C!="string"&&!se.objectMode&&Object.getPrototypeOf(C)!==r.prototype&&(C=a(C)),Q)se.endEmitted?E(I,new y):N(I,se,C,!0);else if(se.ended)E(I,new g);else{if(se.destroyed)return!1;se.reading=!1,se.decoder&&!j?(C=se.decoder.write(C),se.objectMode||C.length!==0?N(I,se,C,!1):rt(I,se)):N(I,se,C,!1)}else Q||(se.reading=!1,rt(I,se))}return!se.ended&&(se.length<se.highWaterMark||se.length===0)}function N(I,C,j,Q){C.flowing&&C.length===0&&!C.sync?(C.awaitDrain=0,I.emit("data",j)):(C.length+=C.objectMode?1:j.length,Q?C.buffer.unshift(j):C.buffer.push(j),C.needReadable&&xe(I)),rt(I,C)}function oe(I,C){var j;return!o(C)&&typeof C!="string"&&C!==void 0&&!I.objectMode&&(j=new p("chunk",["string","Buffer","Uint8Array"],C)),j}P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(I){w||(w=Ev.StringDecoder);var C=new w(I);this._readableState.decoder=C,this._readableState.encoding=this._readableState.decoder.encoding;for(var j=this._readableState.buffer.head,Q="";j!==null;)Q+=C.write(j.data),j=j.next;return this._readableState.buffer.clear(),Q!==""&&this._readableState.buffer.push(Q),this._readableState.length=Q.length,this};var ue=1073741824;function ne(I){return I>=ue?I=ue:(I--,I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I++),I}function pe(I,C){return I<=0||C.length===0&&C.ended?0:C.objectMode?1:I!==I?C.flowing&&C.length?C.buffer.head.data.length:C.length:(I>C.highWaterMark&&(C.highWaterMark=ne(I)),I<=C.length?I:C.ended?C.length:(C.needReadable=!0,0))}P.prototype.read=function(I){l("read",I),I=parseInt(I,10);var C=this._readableState,j=I;if(I!==0&&(C.emittedReadable=!1),I===0&&C.needReadable&&((C.highWaterMark!==0?C.length>=C.highWaterMark:C.length>0)||C.ended))return l("read: emitReadable",C.length,C.ended),C.length===0&&C.ended?Z(this):xe(this),null;if(I=pe(I,C),I===0&&C.ended)return C.length===0&&Z(this),null;var Q=C.needReadable;l("need readable",Q),(C.length===0||C.length-I<C.highWaterMark)&&(Q=!0,l("length less than watermark",Q)),C.ended||C.reading?(Q=!1,l("reading or ended",Q)):Q&&(l("do read"),C.reading=!0,C.sync=!0,C.length===0&&(C.needReadable=!0),this._read(C.highWaterMark),C.sync=!1,C.reading||(I=pe(j,C)));var ge;return I>0?ge=O(I,C):ge=null,ge===null?(C.needReadable=C.length<=C.highWaterMark,I=0):(C.length-=I,C.awaitDrain=0),C.length===0&&(C.ended||(C.needReadable=!0),j!==I&&C.ended&&Z(this)),ge!==null&&this.emit("data",ge),ge};function Re(I,C){if(l("onEofChunk"),!C.ended){if(C.decoder){var j=C.decoder.end();j&&j.length&&(C.buffer.push(j),C.length+=C.objectMode?1:j.length)}C.ended=!0,C.sync?xe(I):(C.needReadable=!1,C.emittedReadable||(C.emittedReadable=!0,nt(I)))}}function xe(I){var C=I._readableState;l("emitReadable",C.needReadable,C.emittedReadable),C.needReadable=!1,C.emittedReadable||(l("emitReadable",C.flowing),C.emittedReadable=!0,process.nextTick(nt,I))}function nt(I){var C=I._readableState;l("emitReadable_",C.destroyed,C.length,C.ended),!C.destroyed&&(C.length||C.ended)&&(I.emit("readable"),C.emittedReadable=!1),C.needReadable=!C.flowing&&!C.ended&&C.length<=C.highWaterMark,L(I)}function rt(I,C){C.readingMore||(C.readingMore=!0,process.nextTick(ut,I,C))}function ut(I,C){for(;!C.reading&&!C.ended&&(C.length<C.highWaterMark||C.flowing&&C.length===0);){var j=C.length;if(l("maybeReadMore read 0"),I.read(0),j===C.length)break}C.readingMore=!1}P.prototype._read=function(I){E(this,new b("_read()"))},P.prototype.pipe=function(I,C){var j=this,Q=this._readableState;switch(Q.pipesCount){case 0:Q.pipes=I;break;case 1:Q.pipes=[Q.pipes,I];break;default:Q.pipes.push(I);break}Q.pipesCount+=1,l("pipe count=%d opts=%j",Q.pipesCount,C);var ge=(!C||C.end!==!1)&&I!==process.stdout&&I!==process.stderr,se=ge?un:Lr;Q.endEmitted?process.nextTick(se):j.once("end",se),I.on("unpipe",me);function me(S,m){l("onunpipe"),S===j&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,Ta())}function un(){l("onend"),I.end()}var Ca=De(j);I.on("drain",Ca);var ka=!1;function Ta(){l("cleanup"),I.removeListener("close",Ia),I.removeListener("finish",fn),I.removeListener("drain",Ca),I.removeListener("error",xi),I.removeListener("unpipe",me),j.removeListener("end",un),j.removeListener("end",Lr),j.removeListener("data",Vt),ka=!0,Q.awaitDrain&&(!I._writableState||I._writableState.needDrain)&&Ca()}j.on("data",Vt);function Vt(S){l("ondata");var m=I.write(S);l("dest.write",m),m===!1&&((Q.pipesCount===1&&Q.pipes===I||Q.pipesCount>1&&X(Q.pipes,I)!==-1)&&!ka&&(l("false write response, pause",Q.awaitDrain),Q.awaitDrain++),j.pause())}function xi(S){l("onerror",S),Lr(),I.removeListener("error",xi),t(I,"error")===0&&E(I,S)}T(I,"error",xi);function Ia(){I.removeListener("finish",fn),Lr()}I.once("close",Ia);function fn(){l("onfinish"),I.removeListener("close",Ia),Lr()}I.once("finish",fn);function Lr(){l("unpipe"),j.unpipe(I)}return I.emit("pipe",j),Q.flowing||(l("pipe resume"),j.resume()),I};function De(I){return function(){var j=I._readableState;l("pipeOnDrain",j.awaitDrain),j.awaitDrain&&j.awaitDrain--,j.awaitDrain===0&&t(I,"data")&&(j.flowing=!0,L(I))}}P.prototype.unpipe=function(I){var C=this._readableState,j={hasUnpiped:!1};if(C.pipesCount===0)return this;if(C.pipesCount===1)return I&&I!==C.pipes?this:(I||(I=C.pipes),C.pipes=null,C.pipesCount=0,C.flowing=!1,I&&I.emit("unpipe",this,j),this);if(!I){var Q=C.pipes,ge=C.pipesCount;C.pipes=null,C.pipesCount=0,C.flowing=!1;for(var se=0;se<ge;se++)Q[se].emit("unpipe",this,{hasUnpiped:!1});return this}var me=X(C.pipes,I);return me===-1?this:(C.pipes.splice(me,1),C.pipesCount-=1,C.pipesCount===1&&(C.pipes=C.pipes[0]),I.emit("unpipe",this,j),this)},P.prototype.on=function(I,C){var j=n.prototype.on.call(this,I,C),Q=this._readableState;return I==="data"?(Q.readableListening=this.listenerCount("readable")>0,Q.flowing!==!1&&this.resume()):I==="readable"&&!Q.endEmitted&&!Q.readableListening&&(Q.readableListening=Q.needReadable=!0,Q.flowing=!1,Q.emittedReadable=!1,l("on readable",Q.length,Q.reading),Q.length?xe(this):Q.reading||process.nextTick(Rt,this)),j},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(I,C){var j=n.prototype.removeListener.call(this,I,C);return I==="readable"&&process.nextTick(Be,this),j},P.prototype.removeAllListeners=function(I){var C=n.prototype.removeAllListeners.apply(this,arguments);return(I==="readable"||I===void 0)&&process.nextTick(Be,this),C};function Be(I){var C=I._readableState;C.readableListening=I.listenerCount("readable")>0,C.resumeScheduled&&!C.paused?C.flowing=!0:I.listenerCount("data")>0&&I.resume()}function Rt(I){l("readable nexttick read 0"),I.read(0)}P.prototype.resume=function(){var I=this._readableState;return I.flowing||(l("resume"),I.flowing=!I.readableListening,cn(this,I)),I.paused=!1,this};function cn(I,C){C.resumeScheduled||(C.resumeScheduled=!0,process.nextTick(je,I,C))}function je(I,C){l("resume",C.reading),C.reading||I.read(0),C.resumeScheduled=!1,I.emit("resume"),L(I),C.flowing&&!C.reading&&I.read(0)}P.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function L(I){var C=I._readableState;for(l("flow",C.flowing);C.flowing&&I.read()!==null;);}P.prototype.wrap=function(I){var C=this,j=this._readableState,Q=!1;I.on("end",function(){if(l("wrapped end"),j.decoder&&!j.ended){var me=j.decoder.end();me&&me.length&&C.push(me)}C.push(null)}),I.on("data",function(me){if(l("wrapped data"),j.decoder&&(me=j.decoder.write(me)),!(j.objectMode&&me==null)&&!(!j.objectMode&&(!me||!me.length))){var un=C.push(me);un||(Q=!0,I.pause())}});for(var ge in I)this[ge]===void 0&&typeof I[ge]=="function"&&(this[ge]=function(un){return function(){return I[un].apply(I,arguments)}}(ge));for(var se=0;se<_.length;se++)I.on(_[se],this.emit.bind(this,_[se]));return this._read=function(me){l("wrapped _read",me),Q&&(Q=!1,I.resume())},this},typeof Symbol=="function"&&(P.prototype[Symbol.asyncIterator]=function(){return A===void 0&&(A=Dte()),A(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(C){this._readableState&&(this._readableState.flowing=C)}}),P._fromList=O,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function O(I,C){if(C.length===0)return null;var j;return C.objectMode?j=C.buffer.shift():!I||I>=C.length?(C.decoder?j=C.buffer.join(""):C.buffer.length===1?j=C.buffer.first():j=C.buffer.concat(C.length),C.buffer.clear()):j=C.buffer.consume(I,C.decoder),j}function Z(I){var C=I._readableState;l("endReadable",C.endEmitted),C.endEmitted||(C.ended=!0,process.nextTick(q,C,I))}function q(I,C){if(l("endReadableNT",I.endEmitted,I.length),!I.endEmitted&&I.length===0&&(I.endEmitted=!0,C.readable=!1,C.emit("end"),I.autoDestroy)){var j=C._writableState;(!j||j.autoDestroy&&j.finished)&&C.destroy()}}typeof Symbol=="function"&&(P.from=function(I,C){return x===void 0&&(x=Bte()),x(P,I,C)});function X(I,C){for(var j=0,Q=I.length;j<Q;j++)if(I[j]===C)return j;return-1}return Dv}var Bv,bI;function yI(){if(bI)return Bv;bI=1,Bv=s;var e=Al().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=El();xl(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",l)}function l(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){c(u,f,h)}):c(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 c(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 Bv}var Fv,vI;function Fte(){if(vI)return Fv;vI=1,Fv=t;var e=yI();xl(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)},Fv}var Mv,wI;function Mte(){if(wI)return Mv;wI=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=Al().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=Tv()),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 l(h){h()}function c(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,E=A>0;return s(w,x,E,function(_){b||(b=_),_&&y.forEach(l),!x&&(y.forEach(l),g(b))})});return d.reduce(c)}return Mv=f,Mv}var xI=Gn,Pv=dv.EventEmitter,Pte=xl;Pte(Gn,Pv),Gn.Readable=mI(),Gn.Writable=cI(),Gn.Duplex=El(),Gn.Transform=yI(),Gn.PassThrough=Fte(),Gn.finished=Tv(),Gn.pipeline=Mte(),Gn.Stream=Gn;function Gn(){Pv.call(this)}Gn.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 l(u){if(c(),Pv.listenerCount(this,"error")===0)throw u}n.on("error",l),e.on("error",l);function c(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",o),n.removeListener("close",s),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e};function Af(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function AI(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function Ef(e){return AI(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function di(e){return AI(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function EI(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(Af))}),t}function SI(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&Af(t[0]),source:t[1]&&Af(t[1]),type:t[2]&&Af(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:EI(t[8])}}function _I(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 CI(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 Ote(e,t){const n=e.attributes===null||e.attributes===void 0?".":CI(e.attributes),i=`${[e.seq_id===null?".":di(e.seq_id),e.source===null?".":di(e.source),e.type===null?".":di(e.type),e.start===null?".":di(e.start),e.end===null?".":di(e.end),e.score===null?".":di(e.score),e.strand===null?".":di(e.strand),e.phase===null?".":di(e.phase),n].join(" ")}
3517
+ `;return t[i]?"":(t[i]=!0,i)}function Rp(e,t){if(Array.isArray(e))return e.map(r=>Rp(r,t)).join("");const n=[Ote(e,t)];return Lte(e)&&n.push(...e.child_features.map(r=>Rp(r,t)),...e.derived_features.map(r=>Rp(r,t))),n.join("")}function kI(e){return Rp(e,{})}function TI(e){let t=`##${e.directive}`;return e.value&&(t+=` ${e.value}`),t+=`
3513
3518
  `,t}function II(e){return`# ${e.comment}
3514
3519
  `}function Ov(e){return`>${e.id}${e.description?` ${e.description}`:""}
3515
3520
  ${e.sequence}
3516
3521
  `}function Dp(e){function t(n){return"attributes"in n?kI(n):"directive"in n?TI(n):"sequence"in n?Ov(n):"comment"in n?II(n):`# (invalid item found during format)
3517
- `}return Array.isArray(e)?e.map(t):t(e)}function Nte(e){return e.child_features!==void 0&&e.derived_features!==void 0}const zte=Object.freeze(Object.defineProperty({__proto__:null,escape:Ef,escapeColumn:di,formatAttributes:CI,formatComment:II,formatDirective:TI,formatFeature:kI,formatItem:Dp,formatSequence:Ov,parseAttributes:EI,parseDirective:_I,parseFeature:SI,unescape:Af},Symbol.toStringTag,{value:"Module"})),RI={Parent:"child_features",Derives_from:"derived_features"};class DI{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 BI{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=_I(t);a&&(a.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new DI(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 DI(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={...SI(t),child_features:[],derived_features:[]},s=((n=o.attributes)===null||n===void 0?void 0:n.ID)||[],l=((r=o.attributes)===null||r===void 0?void 0:r.Parent)||[],c=this.disableDerivesFromReferences?[]:((i=o.attributes)===null||i===void 0?void 0:i.Derives_from)||[];if(!s.length&&!l.length&&!c.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),!l.length&&!c.length&&this._underConstructionTopLevel.push(u),this._underConstructionById[f]=u,this._resolveReferencesTo(u,f))}),this._resolveReferencesFrom(u||[o],{Parent:l,Derives_from:c},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 l=a[o];l||(l={},a[o]=l);const c=l[s]||!1;return l[s]=!0,c}n.Parent.forEach(a=>{const o=this._underConstructionById[a];if(o){const s=RI.Parent;r.filter(l=>i(this._completedReferences,l,`Parent,${a}`)).length||o.forEach(l=>{l[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=RI.Derives_from;r.filter(l=>i(this._completedReferences,l,`Derives_from,${a}`)).length||o.forEach(l=>{l[s].push(t)})}else{let s=this._underConstructionOrphans[a];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[a]=s),s.Derives_from.push(t)}})}}function Lv(e){process&&process.nextTick?process.nextTick(e):e()}function FI(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 Ute extends xI.Transform{constructor(t={}){super({objectMode:!0}),this.textBuffer="";const n=FI(t);this.encoding=t.encoding||"utf8",this.decoder=new wte;const r=this.push.bind(this);this.parser=new BI({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)),Lv(r)}_flush(t){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),Lv(t)}}function $te(e={}){return new Ute(e)}function Hte(e,t={}){if(!e)return[];const n=FI(t),r=[],i=r.push.bind(r),a=new BI({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 Gte(e){const t=[],n=[];e.forEach(i=>{"sequence"in i?n.push(i):t.push(i)});let r=t.map(Dp).join("");return n.length&&(r+=`##FASTA
3522
+ `}return Array.isArray(e)?e.map(t):t(e)}function Lte(e){return e.child_features!==void 0&&e.derived_features!==void 0}const Nte=Object.freeze(Object.defineProperty({__proto__:null,escape:Ef,escapeColumn:di,formatAttributes:CI,formatComment:II,formatDirective:TI,formatFeature:kI,formatItem:Dp,formatSequence:Ov,parseAttributes:EI,parseDirective:_I,parseFeature:SI,unescape:Af},Symbol.toStringTag,{value:"Module"})),RI={Parent:"child_features",Derives_from:"derived_features"};class DI{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 BI{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=_I(t);a&&(a.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new DI(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 DI(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={...SI(t),child_features:[],derived_features:[]},s=((n=o.attributes)===null||n===void 0?void 0:n.ID)||[],l=((r=o.attributes)===null||r===void 0?void 0:r.Parent)||[],c=this.disableDerivesFromReferences?[]:((i=o.attributes)===null||i===void 0?void 0:i.Derives_from)||[];if(!s.length&&!l.length&&!c.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),!l.length&&!c.length&&this._underConstructionTopLevel.push(u),this._underConstructionById[f]=u,this._resolveReferencesTo(u,f))}),this._resolveReferencesFrom(u||[o],{Parent:l,Derives_from:c},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 l=a[o];l||(l={},a[o]=l);const c=l[s]||!1;return l[s]=!0,c}n.Parent.forEach(a=>{const o=this._underConstructionById[a];if(o){const s=RI.Parent;r.filter(l=>i(this._completedReferences,l,`Parent,${a}`)).length||o.forEach(l=>{l[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=RI.Derives_from;r.filter(l=>i(this._completedReferences,l,`Derives_from,${a}`)).length||o.forEach(l=>{l[s].push(t)})}else{let s=this._underConstructionOrphans[a];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[a]=s),s.Derives_from.push(t)}})}}function Lv(e){process&&process.nextTick?process.nextTick(e):e()}function FI(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 zte extends xI.Transform{constructor(t={}){super({objectMode:!0}),this.textBuffer="";const n=FI(t);this.encoding=t.encoding||"utf8",this.decoder=new vte;const r=this.push.bind(this);this.parser=new BI({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)),Lv(r)}_flush(t){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),Lv(t)}}function Ute(e={}){return new zte(e)}function $te(e,t={}){if(!e)return[];const n=FI(t),r=[],i=r.push.bind(r),a=new BI({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 Hte(e){const t=[],n=[];e.forEach(i=>{"sequence"in i?n.push(i):t.push(i)});let r=t.map(Dp).join("");return n.length&&(r+=`##FASTA
3518
3523
  `,r+=n.map(Ov).join("")),r}class MI extends xI.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
3519
3524
  `)}if("sequence"in t&&!this.fastaMode&&(this.push(`##FASTA
3520
3525
  `),this.fastaMode=!0),Array.isArray(t)?i=t.map(Dp).join(""):i=Dp(t),this.push(i),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
3521
3526
  `),this.linesSinceLastSyncMark=0;else{let a=0;for(let o=0;o<i.length;o+=1)i[o]===`
3522
- `&&(a+=1);this.linesSinceLastSyncMark+=a}this.haveWeEmittedData=!0,Lv(r)}}function Vte(e={}){return new MI(e)}function jte(e,t,n={}){const r={insertVersionDirective:!0,...n};return new Promise((i,a)=>{e.pipe(new MI(r)).on("end",()=>i(null)).on("error",a).pipe(t)})}const qte=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:$te,parseStringSync:Hte,formatSync:Gte,formatStream:Vte,formatFile:jte,util:zte}},Symbol.toStringTag,{value:"Module"}));ye.GenomeSpy=dS,ye.GenomeSpyApp=w6,ye.embed=CY,ye.html=U,ye.icon=i6,ye.loadSpec=x6,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});
3527
+ `&&(a+=1);this.linesSinceLastSyncMark+=a}this.haveWeEmittedData=!0,Lv(r)}}function Gte(e={}){return new MI(e)}function Vte(e,t,n={}){const r={insertVersionDirective:!0,...n};return new Promise((i,a)=>{e.pipe(new MI(r)).on("end",()=>i(null)).on("error",a).pipe(t)})}const jte=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:Ute,parseStringSync:$te,formatSync:Hte,formatStream:Gte,formatFile:Vte,util:Nte}},Symbol.toStringTag,{value:"Module"}));ye.GenomeSpy=dS,ye.GenomeSpyApp=w6,ye.embed=_Y,ye.html=U,ye.icon=i6,ye.loadSpec=x6,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});