@genome-spy/core 0.40.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/index.es.js +3615 -3460
- package/dist/bundle/index.js +69 -76
- package/dist/schema.json +196 -46
- package/dist/src/encoder/accessor.js +4 -2
- package/dist/src/genomeSpy.d.ts +2 -0
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +5 -0
- package/dist/src/gl/link.vertex.glsl.js +1 -1
- package/dist/src/gl/point.common.glsl.js +2 -0
- package/dist/src/gl/point.fragment.glsl.js +1 -1
- package/dist/src/gl/point.vertex.glsl.js +1 -1
- package/dist/src/gl/rect.vertex.glsl.js +1 -1
- package/dist/src/gl/rule.common.glsl.js +2 -0
- package/dist/src/gl/rule.fragment.glsl.js +1 -1
- package/dist/src/gl/rule.vertex.glsl.js +1 -1
- package/dist/src/gl/text.common.glsl.js +2 -0
- package/dist/src/gl/text.fragment.glsl.js +1 -1
- package/dist/src/gl/text.vertex.glsl.js +1 -1
- package/dist/src/marks/link.d.ts.map +1 -1
- package/dist/src/marks/link.js +28 -14
- package/dist/src/marks/mark.d.ts +34 -0
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +83 -1
- package/dist/src/marks/pointMark.d.ts.map +1 -1
- package/dist/src/marks/pointMark.js +21 -9
- package/dist/src/marks/rectMark.d.ts +1 -2
- package/dist/src/marks/rectMark.d.ts.map +1 -1
- package/dist/src/marks/rectMark.js +28 -17
- package/dist/src/marks/rule.d.ts.map +1 -1
- package/dist/src/marks/rule.js +17 -6
- package/dist/src/marks/text.d.ts.map +1 -1
- package/dist/src/marks/text.js +22 -7
- package/dist/src/paramBroker.d.ts +30 -0
- package/dist/src/paramBroker.d.ts.map +1 -0
- package/dist/src/paramBroker.js +102 -0
- package/dist/src/spec/mark.d.ts +27 -18
- package/dist/src/spec/view.d.ts +2 -1
- package/dist/src/types/viewContext.d.ts +2 -0
- package/dist/src/utils/expression.d.ts +12 -2
- package/dist/src/utils/expression.d.ts.map +1 -1
- package/dist/src/utils/expression.js +68 -9
- package/dist/src/utils/linearstep.d.ts +7 -0
- package/dist/src/utils/linearstep.d.ts.map +1 -0
- package/dist/src/utils/linearstep.js +10 -0
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +6 -0
- package/package.json +2 -2
package/dist/bundle/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
\r]`),n=e.charCodeAt(0);function r(c,h){var d,p,b=i(c,function(y,w){if(d)return d(y,w-1);p=y,d=h?
|
|
3
|
-
`)}function s(c,h){return h==null&&(h=
|
|
1
|
+
(function(ce,ve){typeof exports=="object"&&typeof module<"u"?ve(exports):typeof define=="function"&&define.amd?define(["exports"],ve):(ce=typeof globalThis<"u"?globalThis:ce||self,ve(ce.genomeSpyEmbed={}))})(this,function(ce){"use strict";var wz=Object.defineProperty;var vz=(ce,ve,Ce)=>ve in ce?wz(ce,ve,{enumerable:!0,configurable:!0,writable:!0,value:Ce}):ce[ve]=Ce;var St=(ce,ve,Ce)=>(vz(ce,typeof ve!="symbol"?ve+"":ve,Ce),Ce),Tg=(ce,ve,Ce)=>{if(!ve.has(ce))throw TypeError("Cannot "+Ce)};var $=(ce,ve,Ce)=>(Tg(ce,ve,"read from private field"),Ce?Ce.call(ce):ve.get(ce)),se=(ce,ve,Ce)=>{if(ve.has(ce))throw TypeError("Cannot add the same private member more than once");ve instanceof WeakSet?ve.add(ce):ve.set(ce,Ce)},Ct=(ce,ve,Ce,vo)=>(Tg(ce,ve,"write to private field"),vo?vo.call(ce,Ce):ve.set(ce,Ce),Ce);var $E=(ce,ve,Ce,vo)=>({set _(ef){Ct(ce,ve,ef,Ce)},get _(){return $(ce,ve,vo)}}),te=(ce,ve,Ce)=>(Tg(ce,ve,"access private method"),Ce);var Nl,Bg,Ol,Dg,zl,Rg,Ca,Ul,Gl,ho,Kl,Hl,Fg,pr,ka,yt,Xn,di,Bc,KE,Ia,Oc,gr,yo,Vl,Mg,Dc,JE,Sg,xz,jl,Pg,ql,Zl,mr,Ta,Ba,Jt,po,Da,br,wo,Rc,e_,go,Jl,Wl,Lg,Yl,Ng,Ql,Og,Fc,t_,Ra,zc,Mc,n_,Fa,Ma,mo,Xl,bo;function ve(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 o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ce(e,t,n){return e.fields=t||[],e.fname=n,e}function vo(e){return e==null?null:e.fname}function ef(e){return e==null?null:e.fields}function r_(e){return e.length===1?i_(e[0]):o_(e)}const i_=e=>function(t){return t[e]},o_=e=>{const t=e.length;return function(n){for(let r=0;r<t;++r)n=n[e[r]];return n}};function Qe(e){throw Error(e)}function a_(e){const t=[],n=e.length;let r=null,i=0,o="",a,s,f;e=e+"";function l(){t.push(o+e.substring(a,s)),o="",a=s+1}for(a=s=0;s<n;++s)if(f=e[s],f==="\\")o+=e.substring(a,s),o+=e.substring(++s,++s),a=s;else if(f===r)l(),r=null,i=-1;else{if(r)continue;a===i&&f==='"'||a===i&&f==="'"?(a=s+1,r=f):f==="."&&!i?s>a?l():a=s+1:f==="["?(s>a&&l(),i=a=s+1):f==="]"&&(i||Qe("Access path missing open bracket: "+e),i>0&&l(),i=0,a=s+1)}return i&&Qe("Access path missing closing bracket: "+e),r&&Qe("Access path missing closing quote: "+e),s>a&&(s++,l()),t}function tf(e,t,n){const r=a_(e);return e=r.length===1?r[0]:e,Ce((n&&n.get||r_)(r),[e],t||e)}tf("id");const nf=Ce(e=>e,[],"identity");Ce(()=>0,[],"zero"),Ce(()=>1,[],"one"),Ce(()=>!0,[],"true"),Ce(()=>!1,[],"false");var Ft=Array.isArray;function Mt(e){return e===Object(e)}function mn(e){return e[e.length-1]}function Pa(e){return e==null||e===""?null:+e}const zg=e=>t=>e*Math.exp(t),Ug=e=>t=>Math.log(e*t),s_=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),l_=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,rf=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function Uc(e,t,n,r){const i=n(e[0]),o=n(mn(e)),a=(o-i)*t;return[r(i-a),r(o-a)]}function f_(e,t){return Uc(e,t,Pa,nf)}function u_(e,t){var n=Math.sign(e[0]);return Uc(e,t,Ug(n),zg(n))}function c_(e,t,n){return Uc(e,t,rf(n),rf(1/n))}function of(e,t,n,r,i){const o=r(e[0]),a=r(mn(e)),s=t!=null?r(t):(o+a)/2;return[i(s+(o-s)*n),i(s+(a-s)*n)]}function Gg(e,t,n){return of(e,t,n,Pa,nf)}function Hg(e,t,n){const r=Math.sign(e[0]);return of(e,t,n,Ug(r),zg(r))}function Gc(e,t,n,r){return of(e,t,n,rf(r),rf(1/r))}function h_(e,t,n,r){return of(e,t,n,s_(r),l_(r))}function Hc(e){return e!=null?Ft(e)?e:[e]:[]}function d_(e,t,n){let r=e[0],i=e[1],o;return i<r&&(o=i,i=r,r=o),o=i-r,o>=n-t?[t,n]:[r=Math.min(Math.max(r,t),n-o),r+o]}function Pt(e){return typeof e=="function"}const p_="descending";function Vg(e,t,n){n=n||{},t=Hc(t)||[];const r=[],i=[],o={},a=n.comparator||g_;return Hc(e).forEach((s,f)=>{s!=null&&(r.push(t[f]===p_?-1:1),i.push(s=Pt(s)?s:tf(s,null,n)),(ef(s)||[]).forEach(l=>o[l]=1))}),i.length===0?null:Ce(a(i,r),Object.keys(o))}const jg=(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),g_=(e,t)=>e.length===1?m_(e[0],t[0]):b_(e,t,e.length),m_=(e,t)=>function(n,r){return jg(e(n),e(r))*t},b_=(e,t,n)=>(t.push(0),function(r,i){let o,a=0,s=-1;for(;a===0&&++s<n;)o=e[s],a=jg(o(r),o(i));return a*t[s]});function y_(e){return Pt(e)?e:()=>e}function Vc(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 w_=Object.prototype.hasOwnProperty;function pi(e,t){return w_.call(e,t)}function La(e){return typeof e=="boolean"}function v_(e){return Object.prototype.toString.call(e)==="[object Date]"}function x_(e){return e&&Pt(e[Symbol.iterator])}function kt(e){return typeof e=="number"}function A_(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Pe(e){return typeof e=="string"}function qg(e,t){const n=e[0],r=mn(e),i=+t;return i?i===1?r:n+i*(r-n):n}function af(e){return e&&mn(e)-e[0]||0}function sf(e){return Ft(e)?"["+e.map(sf)+"]":Mt(e)||Pe(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function E_(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const __=e=>kt(e)||v_(e)?e:Date.parse(e);function S_(e,t){return t=t||__,e==null||e===""?null:t(e)}function C_(e){return e==null||e===""?null:e+""}function lf(e){const t={},n=e.length;for(let r=0;r<n;++r)t[e[r]]=!0;return t}var Zg={},jc={},qc=34,Na=10,Zc=13;function Wg(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function k_(e,t){var n=Wg(e);return function(r,i){return t(n(r),i,e)}}function Yg(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 Lt(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function I_(e){return e<0?"-"+Lt(-e,6):e>9999?"+"+Lt(e,6):Lt(e,4)}function T_(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":I_(e.getUTCFullYear())+"-"+Lt(e.getUTCMonth()+1,2)+"-"+Lt(e.getUTCDate(),2)+(i?"T"+Lt(t,2)+":"+Lt(n,2)+":"+Lt(r,2)+"."+Lt(i,3)+"Z":r?"T"+Lt(t,2)+":"+Lt(n,2)+":"+Lt(r,2)+"Z":n||t?"T"+Lt(t,2)+":"+Lt(n,2)+"Z":"")}function Qg(e){var t=new RegExp('["'+e+`
|
|
2
|
+
\r]`),n=e.charCodeAt(0);function r(c,h){var d,p,b=i(c,function(y,w){if(d)return d(y,w-1);p=y,d=h?k_(y,h):Wg(y)});return b.columns=p||[],b}function i(c,h){var d=[],p=c.length,b=0,y=0,w,_=p<=0,C=!1;c.charCodeAt(p-1)===Na&&--p,c.charCodeAt(p-1)===Zc&&--p;function S(){if(_)return jc;if(C)return C=!1,Zg;var B,I=b,F;if(c.charCodeAt(I)===qc){for(;b++<p&&c.charCodeAt(b)!==qc||c.charCodeAt(++b)===qc;);return(B=b)>=p?_=!0:(F=c.charCodeAt(b++))===Na?C=!0:F===Zc&&(C=!0,c.charCodeAt(b)===Na&&++b),c.slice(I+1,B-1).replace(/""/g,'"')}for(;b<p;){if((F=c.charCodeAt(B=b++))===Na)C=!0;else if(F===Zc)C=!0,c.charCodeAt(b)===Na&&++b;else if(F!==n)continue;return c.slice(I,B)}return _=!0,c.slice(I,p)}for(;(w=S())!==jc;){for(var T=[];w!==Zg&&w!==jc;)T.push(w),w=S();h&&(T=h(T,y++))==null||d.push(T)}return d}function o(c,h){return c.map(function(d){return h.map(function(p){return u(d[p])}).join(e)})}function a(c,h){return h==null&&(h=Yg(c)),[h.map(u).join(e)].concat(o(c,h)).join(`
|
|
3
|
+
`)}function s(c,h){return h==null&&(h=Yg(c)),o(c,h).join(`
|
|
4
4
|
`)}function f(c){return c.map(l).join(`
|
|
5
|
-
`)}function l(c){return c.map(u).join(e)}function u(c){return c==null?"":c instanceof Date?g_(c):t.test(c+="")?'"'+c.replace(/"/g,'""')+'"':c}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:f,formatRow:l,formatValue:u}}var m_=Ng(" "),b_=m_.parseRows;function y_(e){return e}function w_(e){if(e==null)return y_;var t,n,r=e.scale[0],i=e.scale[1],o=e.translate[0],a=e.translate[1];return function(s,f){f||(t=n=0);var l=2,u=s.length,c=new Array(u);for(c[0]=(t+=s[0])*r+o,c[1]=(n+=s[1])*i+a;l<u;)c[l]=s[l],++l;return c}}function v_(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function x_(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return Og(e,n)})}:Og(e,t)}function Og(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,o=zg(e,t);return n==null&&r==null?{type:"Feature",properties:i,geometry:o}:r==null?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}function zg(e,t){var n=w_(e.transform),r=e.arcs;function i(u,c){c.length&&c.pop();for(var h=r[u<0?~u:u],d=0,p=h.length;d<p;++d)c.push(n(h[d],d));u<0&&v_(c,p)}function o(u){return n(u)}function a(u){for(var c=[],h=0,d=u.length;h<d;++h)i(u[h],c);return c.length<2&&c.push(c[0]),c}function s(u){for(var c=a(u);c.length<4;)c.push(c[0]);return c}function f(u){return u.map(s)}function l(u){var c=u.type,h;switch(c){case"GeometryCollection":return{type:c,geometries:u.geometries.map(l)};case"Point":h=o(u.coordinates);break;case"MultiPoint":h=u.coordinates.map(o);break;case"LineString":h=a(u.arcs);break;case"MultiLineString":h=u.arcs.map(a);break;case"Polygon":h=f(u.arcs);break;case"MultiPolygon":h=u.arcs.map(f);break;default:return null}return{type:c,coordinates:h}}return l(t)}function A_(e,t){var n={},r={},i={},o=[],a=-1;t.forEach(function(l,u){var c=e.arcs[l<0?~l:l],h;c.length<3&&!c[1][0]&&!c[1][1]&&(h=t[++a],t[a]=l,t[u]=h)}),t.forEach(function(l){var u=s(l),c=u[0],h=u[1],d,p;if(d=i[c])if(delete i[d.end],d.push(l),d.end=h,p=r[h]){delete r[p.start];var b=p===d?d:d.concat(p);r[b.start=d.start]=i[b.end=p.end]=b}else r[d.start]=i[d.end]=d;else if(d=r[h])if(delete r[d.start],d.unshift(l),d.start=c,p=i[c]){delete i[p.end];var y=p===d?d:p.concat(d);r[y.start=p.start]=i[y.end=d.end]=y}else r[d.start]=i[d.end]=d;else d=[l],r[d.start=c]=i[d.end=h]=d});function s(l){var u=e.arcs[l<0?~l:l],c=u[0],h;return e.transform?(h=[0,0],u.forEach(function(d){h[0]+=d[0],h[1]+=d[1]})):h=u[u.length-1],l<0?[h,c]:[c,h]}function f(l,u){for(var c in l){var h=l[c];delete u[h.start],delete h.start,delete h.end,h.forEach(function(d){n[d<0?~d:d]=1}),o.push(h)}}return f(i,r),f(r,i),t.forEach(function(l){n[l<0?~l:l]||o.push([l])}),o}function E_(e){return zg(e,__.apply(this,arguments))}function __(e,t,n){var r,i,o;if(arguments.length>1)r=S_(e,t,n);else for(i=0,r=new Array(o=e.arcs.length);i<o;++i)r[i]=i;return{type:"MultiLineString",arcs:A_(e,r)}}function S_(e,t,n){var r=[],i=[],o;function a(c){var h=c<0?~c:c;(i[h]||(i[h]=[])).push({i:c,g:o})}function s(c){c.forEach(a)}function f(c){c.forEach(s)}function l(c){c.forEach(f)}function u(c){switch(o=c,c.type){case"GeometryCollection":c.geometries.forEach(u);break;case"LineString":s(c.arcs);break;case"MultiLineString":case"Polygon":f(c.arcs);break;case"MultiPolygon":l(c.arcs);break}}return u(t),i.forEach(n==null?function(c){r.push(c[0].i)}:function(c){n(c[0].g,c[c.length-1].g)&&r.push(c[0].i)}),r}function Ra(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function C_(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ef(e){let t,n,r;e.length!==2?(t=Ra,n=(s,f)=>Ra(e(s),f),r=(s,f)=>e(s)-f):(t=e===Ra||e===C_?e:I_,n=e,r=e);function i(s,f,l=0,u=s.length){if(l<u){if(t(f,f)!==0)return u;do{const c=l+u>>>1;n(s[c],f)<0?l=c+1:u=c}while(l<u)}return l}function o(s,f,l=0,u=s.length){if(l<u){if(t(f,f)!==0)return u;do{const c=l+u>>>1;n(s[c],f)<=0?l=c+1:u=c}while(l<u)}return l}function a(s,f,l=0,u=s.length){const c=i(s,f,l,u-1);return c>l&&r(s[c-1],f)>-r(s[c],f)?c-1:c}return{left:i,center:a,right:o}}function I_(){return 0}function Ug(e){return e===null?NaN:+e}const Gg=ef(Ra),Oc=Gg.right;Gg.left,ef(Ug).center;const yo=Oc;function T_(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of e)(o=t(o,++i,e))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class mi extends Map{constructor(t,n=D_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Hg(this,t))}has(t){return super.has(Hg(this,t))}set(t,n){return super.set(k_(this,t),n)}delete(t){return super.delete(B_(this,t))}}function Hg({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function k_({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function B_({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function D_(e){return e!==null&&typeof e=="object"?e.valueOf():e}function zc(e){return e}function tf(e,...t){return Vg(e,zc,zc,t)}function F_(e,...t){return Vg(e,Array.from,zc,t)}function Vg(e,t,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new mi,f=r[a++];let l=-1;for(const u of o){const c=f(u,++l,o),h=s.get(c);h?h.push(u):s.set(c,[u])}for(const[u,c]of s)s.set(u,i(c,a));return t(s)}(e,0)}var Uc=Math.sqrt(50),Gc=Math.sqrt(10),Hc=Math.sqrt(2);function nf(e,t,n){var r,i=-1,o,a,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),(s=jg(e,t,n))===0||!isFinite(s))return[];if(s>0){let f=Math.round(e/s),l=Math.round(t/s);for(f*s<e&&++f,l*s>t&&--l,a=new Array(o=l-f+1);++i<o;)a[i]=(f+i)*s}else{s=-s;let f=Math.round(e*s),l=Math.round(t*s);for(f/s<e&&++f,l/s>t&&--l,a=new Array(o=l-f+1);++i<o;)a[i]=(f+i)/s}return r&&a.reverse(),a}function jg(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Uc?10:o>=Gc?5:o>=Hc?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Uc?10:o>=Gc?5:o>=Hc?2:1)}function bi(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Uc?i*=10:o>=Gc?i*=5:o>=Hc&&(i*=2),t<e?-i:i}function qg(e,t,n=Ug){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function Pa(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function rf(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function R_(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function of(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function wo(e){return e=of(Math.abs(e)),e?e[1]:NaN}function P_(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],f=0;i>0&&s>0&&(f+s+1>r&&(s=Math.max(1,r-f)),o.push(n.substring(i-=s,i+s)),!((f+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function M_(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var L_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Er(e){if(!(t=L_.exec(e)))throw new Error("invalid format: "+e);var t;return new Vc({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Er.prototype=Vc.prototype;function Vc(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Vc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function N_(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Zg;function O_(e,t){var n=of(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Zg=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+of(e,Math.max(0,t+o-1))[0]}function Wg(e,t){var n=of(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Yg={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:R_,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Wg(e*100,t),r:Wg,s:O_,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Qg(e){return e}var Xg=Array.prototype.map,$g=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function z_(e){var t=e.grouping===void 0||e.thousands===void 0?Qg:P_(Xg.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Qg:M_(Xg.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function l(c){c=Er(c);var h=c.fill,d=c.align,p=c.sign,b=c.symbol,y=c.zero,w=c.width,S=c.comma,C=c.precision,_=c.trim,k=c.type;k==="n"?(S=!0,k="g"):Yg[k]||(C===void 0&&(C=12),_=!0,k="g"),(y||h==="0"&&d==="=")&&(y=!0,h="0",d="=");var B=b==="$"?n:b==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",T=b==="$"?r:/[%p]/.test(k)?a:"",R=Yg[k],M=/[defgprs%]/.test(k);C=C===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function j(O){var ne=B,ae=T,pe,ke,Xe;if(k==="c")ae=R(O)+ae,O="";else{O=+O;var De=O<0||1/O<0;if(O=isNaN(O)?f:R(Math.abs(O),C),_&&(O=N_(O)),De&&+O==0&&p!=="+"&&(De=!1),ne=(De?p==="("?p:s:p==="-"||p==="("?"":p)+ne,ae=(k==="s"?$g[8+Zg/3]:"")+ae+(De&&p==="("?")":""),M){for(pe=-1,ke=O.length;++pe<ke;)if(Xe=O.charCodeAt(pe),48>Xe||Xe>57){ae=(Xe===46?i+O.slice(pe+1):O.slice(pe))+ae,O=O.slice(0,pe);break}}}S&&!y&&(O=t(O,1/0));var $e=ne.length+O.length+ae.length,qe=$e<w?new Array(w-$e+1).join(h):"";switch(S&&y&&(O=t(qe+O,qe.length?w-ae.length:1/0),qe=""),d){case"<":O=ne+O+ae+qe;break;case"=":O=ne+qe+O+ae;break;case"^":O=qe.slice(0,$e=qe.length>>1)+ne+O+ae+qe.slice($e);break;default:O=qe+ne+O+ae;break}return o(O)}return j.toString=function(){return c+""},j}function u(c,h){var d=l((c=Er(c),c.type="f",c)),p=Math.max(-8,Math.min(8,Math.floor(wo(h)/3)))*3,b=Math.pow(10,-p),y=$g[8+p/3];return function(w){return d(b*w)+y}}return{format:l,formatPrefix:u}}var af,pt,jc;U_({thousands:",",grouping:[3],currency:["$",""]});function U_(e){return af=z_(e),pt=af.format,jc=af.formatPrefix,af}function Kg(e){return Math.max(0,-wo(Math.abs(e)))}function Jg(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(wo(t)/3)))*3-wo(Math.abs(e)))}function em(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,wo(t)-wo(e))+1}var qc=new Date,Zc=new Date;function at(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var f=[],l;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return f;do f.push(l=new Date(+o)),t(o,s),e(o);while(l<o&&o<a);return f},i.filter=function(o){return at(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},n&&(i.count=function(o,a){return qc.setTime(+o),Zc.setTime(+a),e(qc),e(Zc),Math.floor(n(qc,Zc))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?function(a){return r(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var sf=at(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});sf.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?at(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):sf};const Wc=sf;sf.range;const er=1e3,en=er*60,tr=en*60,yi=tr*24,Yc=yi*7,tm=yi*30,Qc=yi*365;var nm=at(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*er)},function(e,t){return(t-e)/er},function(e){return e.getUTCSeconds()});const _r=nm;nm.range;var rm=at(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*er)},function(e,t){e.setTime(+e+t*en)},function(e,t){return(t-e)/en},function(e){return e.getMinutes()});const Xc=rm;rm.range;var im=at(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*er-e.getMinutes()*en)},function(e,t){e.setTime(+e+t*tr)},function(e,t){return(t-e)/tr},function(e){return e.getHours()});const $c=im;im.range;var om=at(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*en)/yi,e=>e.getDate()-1);const wi=om;om.range;function vi(e){return at(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*en)/Yc})}var Ma=vi(0),lf=vi(1),G_=vi(2),H_=vi(3),vo=vi(4),V_=vi(5),j_=vi(6);Ma.range,lf.range,G_.range,H_.range,vo.range,V_.range,j_.range;var am=at(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()});const ff=am;am.range;var Kc=at(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});Kc.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:at(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};const Sr=Kc;Kc.range;var sm=at(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*en)},function(e,t){return(t-e)/en},function(e){return e.getUTCMinutes()});const Jc=sm;sm.range;var lm=at(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*tr)},function(e,t){return(t-e)/tr},function(e){return e.getUTCHours()});const eh=lm;lm.range;var fm=at(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/yi},function(e){return e.getUTCDate()-1});const xi=fm;fm.range;function Ai(e){return at(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/Yc})}var La=Ai(0),uf=Ai(1),q_=Ai(2),Z_=Ai(3),xo=Ai(4),W_=Ai(5),Y_=Ai(6);La.range,uf.range,q_.range,Z_.range,xo.range,W_.range,Y_.range;var um=at(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()});const cf=um;um.range;var th=at(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});th.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:at(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};const Cr=th;th.range;function cm(e,t,n,r,i,o){const a=[[_r,1,er],[_r,5,5*er],[_r,15,15*er],[_r,30,30*er],[o,1,en],[o,5,5*en],[o,15,15*en],[o,30,30*en],[i,1,tr],[i,3,3*tr],[i,6,6*tr],[i,12,12*tr],[r,1,yi],[r,2,2*yi],[n,1,Yc],[t,1,tm],[t,3,3*tm],[e,1,Qc]];function s(l,u,c){const h=u<l;h&&([l,u]=[u,l]);const d=c&&typeof c.range=="function"?c:f(l,u,c),p=d?d.range(l,+u+1):[];return h?p.reverse():p}function f(l,u,c){const h=Math.abs(u-l)/c,d=ef(([,,y])=>y).right(a,h);if(d===a.length)return e.every(bi(l/Qc,u/Qc,c));if(d===0)return Wc.every(Math.max(bi(l,u,c),1));const[p,b]=a[h/a[d-1][2]<a[d][2]/h?d-1:d];return p.every(b)}return[s,f]}const[Q_,X_]=cm(Cr,cf,La,xi,eh,Jc),[$_,K_]=cm(Sr,ff,Ma,wi,$c,Xc),Na="year",Oa="quarter",za="month",Ua="week",Ga="date",hf="day",nh="dayofyear",Ha="hours",Va="minutes",ja="seconds",df="milliseconds";[Na,Oa,za,Ua,Ga,hf,nh,Ha,Va,ja,df].reduce((e,t,n)=>(e[t]=1+n,e),{});const J_={[Na]:Sr,[Oa]:ff.every(3),[za]:ff,[Ua]:Ma,[Ga]:wi,[hf]:wi,[nh]:wi,[Ha]:$c,[Va]:Xc,[ja]:_r,[df]:Wc},e4={[Na]:Cr,[Oa]:cf.every(3),[za]:cf,[Ua]:La,[Ga]:xi,[hf]:xi,[nh]:xi,[Ha]:eh,[Va]:Jc,[ja]:_r,[df]:Wc};function t4(e){return J_[e]}function n4(e){return e4[e]}function rh(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ih(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function qa(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function hm(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,f=e.shortMonths,l=Za(i),u=Wa(i),c=Za(o),h=Wa(o),d=Za(a),p=Wa(a),b=Za(s),y=Wa(s),w=Za(f),S=Wa(f),C={a:De,A:$e,b:qe,B:Ke,c:null,d:ym,e:ym,f:S4,g:M4,G:N4,H:A4,I:E4,j:_4,L:wm,m:C4,M:I4,p:Ee,q:_e,Q:Sm,s:Cm,S:T4,u:k4,U:B4,V:D4,w:F4,W:R4,x:null,X:null,y:P4,Y:L4,Z:O4,"%":_m},_={a:dt,A:Ht,b:Ne,B:L,c:null,d:xm,e:xm,f:H4,g:K4,G:eS,H:z4,I:U4,j:G4,L:Am,m:V4,M:j4,p:P,q,Q:Sm,s:Cm,S:q4,u:Z4,U:W4,V:Y4,w:Q4,W:X4,x:null,X:null,y:$4,Y:J4,Z:tS,"%":_m},k={a:j,A:O,b:ne,B:ae,c:pe,d:mm,e:mm,f:y4,g:gm,G:pm,H:bm,I:bm,j:p4,L:b4,m:d4,M:g4,p:M,q:h4,Q:v4,s:x4,S:m4,u:s4,U:l4,V:f4,w:a4,W:u4,x:ke,X:Xe,y:gm,Y:pm,Z:c4,"%":w4};C.x=B(n,C),C.X=B(r,C),C.c=B(t,C),_.x=B(n,_),_.X=B(r,_),_.c=B(t,_);function B(H,W){return function(E){var x=[],G=-1,Z=0,se=H.length,J,le,Vt;for(E instanceof Date||(E=new Date(+E));++G<se;)H.charCodeAt(G)===37&&(x.push(H.slice(Z,G)),(le=dm[J=H.charAt(++G)])!=null?J=H.charAt(++G):le=J==="e"?" ":"0",(Vt=W[J])&&(J=Vt(E,le)),x.push(J),Z=G+1);return x.push(H.slice(Z,G)),x.join("")}}function T(H,W){return function(E){var x=qa(1900,void 0,1),G=R(x,H,E+="",0),Z,se;if(G!=E.length)return null;if("Q"in x)return new Date(x.Q);if("s"in x)return new Date(x.s*1e3+("L"in x?x.L:0));if(W&&!("Z"in x)&&(x.Z=0),"p"in x&&(x.H=x.H%12+x.p*12),x.m===void 0&&(x.m="q"in x?x.q:0),"V"in x){if(x.V<1||x.V>53)return null;"w"in x||(x.w=1),"Z"in x?(Z=ih(qa(x.y,0,1)),se=Z.getUTCDay(),Z=se>4||se===0?uf.ceil(Z):uf(Z),Z=xi.offset(Z,(x.V-1)*7),x.y=Z.getUTCFullYear(),x.m=Z.getUTCMonth(),x.d=Z.getUTCDate()+(x.w+6)%7):(Z=rh(qa(x.y,0,1)),se=Z.getDay(),Z=se>4||se===0?lf.ceil(Z):lf(Z),Z=wi.offset(Z,(x.V-1)*7),x.y=Z.getFullYear(),x.m=Z.getMonth(),x.d=Z.getDate()+(x.w+6)%7)}else("W"in x||"U"in x)&&("w"in x||(x.w="u"in x?x.u%7:"W"in x?1:0),se="Z"in x?ih(qa(x.y,0,1)).getUTCDay():rh(qa(x.y,0,1)).getDay(),x.m=0,x.d="W"in x?(x.w+6)%7+x.W*7-(se+5)%7:x.w+x.U*7-(se+6)%7);return"Z"in x?(x.H+=x.Z/100|0,x.M+=x.Z%100,ih(x)):rh(x)}}function R(H,W,E,x){for(var G=0,Z=W.length,se=E.length,J,le;G<Z;){if(x>=se)return-1;if(J=W.charCodeAt(G++),J===37){if(J=W.charAt(G++),le=k[J in dm?W.charAt(G++):J],!le||(x=le(H,E,x))<0)return-1}else if(J!=E.charCodeAt(x++))return-1}return x}function M(H,W,E){var x=l.exec(W.slice(E));return x?(H.p=u.get(x[0].toLowerCase()),E+x[0].length):-1}function j(H,W,E){var x=d.exec(W.slice(E));return x?(H.w=p.get(x[0].toLowerCase()),E+x[0].length):-1}function O(H,W,E){var x=c.exec(W.slice(E));return x?(H.w=h.get(x[0].toLowerCase()),E+x[0].length):-1}function ne(H,W,E){var x=w.exec(W.slice(E));return x?(H.m=S.get(x[0].toLowerCase()),E+x[0].length):-1}function ae(H,W,E){var x=b.exec(W.slice(E));return x?(H.m=y.get(x[0].toLowerCase()),E+x[0].length):-1}function pe(H,W,E){return R(H,t,W,E)}function ke(H,W,E){return R(H,n,W,E)}function Xe(H,W,E){return R(H,r,W,E)}function De(H){return a[H.getDay()]}function $e(H){return o[H.getDay()]}function qe(H){return f[H.getMonth()]}function Ke(H){return s[H.getMonth()]}function Ee(H){return i[+(H.getHours()>=12)]}function _e(H){return 1+~~(H.getMonth()/3)}function dt(H){return a[H.getUTCDay()]}function Ht(H){return o[H.getUTCDay()]}function Ne(H){return f[H.getUTCMonth()]}function L(H){return s[H.getUTCMonth()]}function P(H){return i[+(H.getUTCHours()>=12)]}function q(H){return 1+~~(H.getUTCMonth()/3)}return{format:function(H){var W=B(H+="",C);return W.toString=function(){return H},W},parse:function(H){var W=T(H+="",!1);return W.toString=function(){return H},W},utcFormat:function(H){var W=B(H+="",_);return W.toString=function(){return H},W},utcParse:function(H){var W=T(H+="",!0);return W.toString=function(){return H},W}}}var dm={"-":"",_:" ",0:"0"},st=/^\s*\d+/,r4=/^%/,i4=/[\\^$*+?|[\]().{}]/g;function me(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function o4(e){return e.replace(i4,"\\$&")}function Za(e){return new RegExp("^(?:"+e.map(o4).join("|")+")","i")}function Wa(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function a4(e,t,n){var r=st.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function s4(e,t,n){var r=st.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function l4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function f4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function u4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function pm(e,t,n){var r=st.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function gm(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function c4(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function h4(e,t,n){var r=st.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function d4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function mm(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function p4(e,t,n){var r=st.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function bm(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function g4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function m4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function b4(e,t,n){var r=st.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function y4(e,t,n){var r=st.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function w4(e,t,n){var r=r4.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function v4(e,t,n){var r=st.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function x4(e,t,n){var r=st.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ym(e,t){return me(e.getDate(),t,2)}function A4(e,t){return me(e.getHours(),t,2)}function E4(e,t){return me(e.getHours()%12||12,t,2)}function _4(e,t){return me(1+wi.count(Sr(e),e),t,3)}function wm(e,t){return me(e.getMilliseconds(),t,3)}function S4(e,t){return wm(e,t)+"000"}function C4(e,t){return me(e.getMonth()+1,t,2)}function I4(e,t){return me(e.getMinutes(),t,2)}function T4(e,t){return me(e.getSeconds(),t,2)}function k4(e){var t=e.getDay();return t===0?7:t}function B4(e,t){return me(Ma.count(Sr(e)-1,e),t,2)}function vm(e){var t=e.getDay();return t>=4||t===0?vo(e):vo.ceil(e)}function D4(e,t){return e=vm(e),me(vo.count(Sr(e),e)+(Sr(e).getDay()===4),t,2)}function F4(e){return e.getDay()}function R4(e,t){return me(lf.count(Sr(e)-1,e),t,2)}function P4(e,t){return me(e.getFullYear()%100,t,2)}function M4(e,t){return e=vm(e),me(e.getFullYear()%100,t,2)}function L4(e,t){return me(e.getFullYear()%1e4,t,4)}function N4(e,t){var n=e.getDay();return e=n>=4||n===0?vo(e):vo.ceil(e),me(e.getFullYear()%1e4,t,4)}function O4(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+me(t/60|0,"0",2)+me(t%60,"0",2)}function xm(e,t){return me(e.getUTCDate(),t,2)}function z4(e,t){return me(e.getUTCHours(),t,2)}function U4(e,t){return me(e.getUTCHours()%12||12,t,2)}function G4(e,t){return me(1+xi.count(Cr(e),e),t,3)}function Am(e,t){return me(e.getUTCMilliseconds(),t,3)}function H4(e,t){return Am(e,t)+"000"}function V4(e,t){return me(e.getUTCMonth()+1,t,2)}function j4(e,t){return me(e.getUTCMinutes(),t,2)}function q4(e,t){return me(e.getUTCSeconds(),t,2)}function Z4(e){var t=e.getUTCDay();return t===0?7:t}function W4(e,t){return me(La.count(Cr(e)-1,e),t,2)}function Em(e){var t=e.getUTCDay();return t>=4||t===0?xo(e):xo.ceil(e)}function Y4(e,t){return e=Em(e),me(xo.count(Cr(e),e)+(Cr(e).getUTCDay()===4),t,2)}function Q4(e){return e.getUTCDay()}function X4(e,t){return me(uf.count(Cr(e)-1,e),t,2)}function $4(e,t){return me(e.getUTCFullYear()%100,t,2)}function K4(e,t){return e=Em(e),me(e.getUTCFullYear()%100,t,2)}function J4(e,t){return me(e.getUTCFullYear()%1e4,t,4)}function eS(e,t){var n=e.getUTCDay();return e=n>=4||n===0?xo(e):xo.ceil(e),me(e.getUTCFullYear()%1e4,t,4)}function tS(){return"+0000"}function _m(){return"%"}function Sm(e){return+e}function Cm(e){return Math.floor(+e/1e3)}var Ao,oh,Im,ah,Tm;nS({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function nS(e){return Ao=hm(e),oh=Ao.format,Im=Ao.parse,ah=Ao.utcFormat,Tm=Ao.utcParse,Ao}function Ya(e){const t={};return n=>t[n]||(t[n]=e(n))}function rS(e,t){return n=>{const r=e(n),i=r.indexOf(t);if(i<0)return r;let o=iS(r,i);const a=o<r.length?r.slice(o):"";for(;--o>i;)if(r[o]!=="0"){++o;break}return r.slice(0,o)+a}}function iS(e,t){let 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}function oS(e){const t=Ya(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(r){const i=Er(r||",");if(i.precision==null){switch(i.precision=12,i.type){case"%":i.precision-=2;break;case"e":i.precision-=1;break}return rS(t(i),t(".1f")(1)[1])}else return t(i)},formatSpan(r,i,o,a){a=Er(a??",f");const s=bi(r,i,o),f=Math.max(Math.abs(r),Math.abs(i));let l;if(a.precision==null)switch(a.type){case"s":return isNaN(l=Jg(s,f))||(a.precision=l),n(a,f);case"":case"e":case"g":case"p":case"r":{isNaN(l=em(s,f))||(a.precision=l-(a.type==="e"));break}case"f":case"%":{isNaN(l=Kg(s))||(a.precision=l-(a.type==="%")*2);break}}return t(a)}}}aS();function aS(){return oS({format:pt,formatPrefix:jc})}function km(e,t,n){n=n||{},Zt(n)||Ye("Invalid time multi-format specifier: ".concat(n));const r=t(ja),i=t(Va),o=t(Ha),a=t(Ga),s=t(Ua),f=t(za),l=t(Oa),u=t(Na),c=e(n[df]||".%L"),h=e(n[ja]||":%S"),d=e(n[Va]||"%I:%M"),p=e(n[Ha]||"%I %p"),b=e(n[Ga]||n[hf]||"%a %d"),y=e(n[Ua]||"%b %d"),w=e(n[za]||"%B"),S=e(n[Oa]||"%B"),C=e(n[Na]||"%Y");return _=>(r(_)<_?c:i(_)<_?h:o(_)<_?d:a(_)<_?p:f(_)<_?s(_)<_?b:y:u(_)<_?l(_)<_?w:S:C)(_)}function Bm(e){const t=Ya(e.format),n=Ya(e.utcFormat);return{timeFormat:r=>Qe(r)?t(r):km(t,t4,r),utcFormat:r=>Qe(r)?n(r):km(n,n4,r),timeParse:Ya(e.parse),utcParse:Ya(e.utcParse)}}let sh;sS();function sS(){return sh=Bm({format:oh,parse:Im,utcFormat:ah,utcParse:Tm})}function lS(e){return Bm(hm(e))}function fS(e){return arguments.length?sh=lS(e):sh}const uS=/^(data:|([A-Za-z]+:)?\/\/)/,cS=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,hS=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Dm="file://";function dS(e,t){return n=>({options:n||{},sanitize:gS,load:pS,fileAccess:!!t,file:mS(t),http:yS(e)})}async function pS(e,t){const n=await this.sanitize(e,t),r=n.href;return n.localFile?this.file(r):this.http(r,t)}async function gS(e,t){t=Pc({},this.options,t);const n=this.fileAccess,r={href:null};let i,o,a;const s=cS.test(e.replace(hS,""));(e==null||typeof e!="string"||!s)&&Ye("Sanitize failure, invalid URI: "+Kl(e));const f=uS.test(e);return(a=t.baseURL)&&!f&&(!e.startsWith("/")&&!a.endsWith("/")&&(e="/"+e),e=a+e),o=(i=e.startsWith(Dm))||t.mode==="file"||t.mode!=="http"&&!f&&n,i?e=e.slice(Dm.length):e.startsWith("//")&&(t.defaultProtocol==="file"?(e=e.slice(2),o=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(r,"localFile",{value:!!o}),r.href=e,t.target&&(r.target=t.target+""),t.rel&&(r.rel=t.rel+""),t.context==="image"&&t.crossOrigin&&(r.crossOrigin=t.crossOrigin+""),r}function mS(e){return e?t=>new Promise((n,r)=>{e.readFile(t,(i,o)=>{i?r(i):n(o)})}):bS}async function bS(){Ye("No file system access.")}function yS(e){return e?async function(t,n){const r=Pc({},this.options.http,n),i=n&&n.response,o=await e(t,r);return o.ok?Dt(o[i])?o[i]():o.text():Ye(o.status+""+o.statusText)}:wS}async function wS(){Ye("No HTTP fetch method available.")}const vS=e=>e!=null&&e===e,xS=e=>e==="true"||e==="false"||e===!0||e===!1,AS=e=>!Number.isNaN(Date.parse(e)),Fm=e=>!Number.isNaN(+e)&&!(e instanceof Date),ES=e=>Fm(e)&&Number.isInteger(+e),Rm={boolean:f_,integer:Da,number:Da,date:c_,string:h_,unknown:Wl},pf=[xS,ES,Fm,AS],_S=["boolean","integer","number","date"];function SS(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=pf.length,i=pf.map((o,a)=>a+1);for(let o=0,a=0,s,f;o<n;++o)for(f=t?e[o][t]:e[o],s=0;s<r;++s)if(i[s]&&vS(f)&&!pf[s](f)&&(i[s]=0,++a,a===pf.length))return"string";return _S[i.reduce((o,a)=>o===0?a:o,0)-1]}function CS(e,t){return t.reduce((n,r)=>(n[r]=SS(e,r),n),{})}function Pm(e){const t=function(n,r){const i={delimiter:e};return lh(n,r?Pc(r,i):i)};return t.responseType="text",t}function lh(e,t){return t.header&&(e=t.header.map(Kl).join(t.delimiter)+`
|
|
6
|
-
`+e),
|
|
5
|
+
`)}function l(c){return c.map(u).join(e)}function u(c){return c==null?"":c instanceof Date?T_(c):t.test(c+="")?'"'+c.replace(/"/g,'""')+'"':c}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:f,formatRow:l,formatValue:u}}var B_=Qg(" "),D_=B_.parseRows;function R_(e){return e}function F_(e){if(e==null)return R_;var t,n,r=e.scale[0],i=e.scale[1],o=e.translate[0],a=e.translate[1];return function(s,f){f||(t=n=0);var l=2,u=s.length,c=new Array(u);for(c[0]=(t+=s[0])*r+o,c[1]=(n+=s[1])*i+a;l<u;)c[l]=s[l],++l;return c}}function M_(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function P_(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return Xg(e,n)})}:Xg(e,t)}function Xg(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,o=$g(e,t);return n==null&&r==null?{type:"Feature",properties:i,geometry:o}:r==null?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}function $g(e,t){var n=F_(e.transform),r=e.arcs;function i(u,c){c.length&&c.pop();for(var h=r[u<0?~u:u],d=0,p=h.length;d<p;++d)c.push(n(h[d],d));u<0&&M_(c,p)}function o(u){return n(u)}function a(u){for(var c=[],h=0,d=u.length;h<d;++h)i(u[h],c);return c.length<2&&c.push(c[0]),c}function s(u){for(var c=a(u);c.length<4;)c.push(c[0]);return c}function f(u){return u.map(s)}function l(u){var c=u.type,h;switch(c){case"GeometryCollection":return{type:c,geometries:u.geometries.map(l)};case"Point":h=o(u.coordinates);break;case"MultiPoint":h=u.coordinates.map(o);break;case"LineString":h=a(u.arcs);break;case"MultiLineString":h=u.arcs.map(a);break;case"Polygon":h=f(u.arcs);break;case"MultiPolygon":h=u.arcs.map(f);break;default:return null}return{type:c,coordinates:h}}return l(t)}function L_(e,t){var n={},r={},i={},o=[],a=-1;t.forEach(function(l,u){var c=e.arcs[l<0?~l:l],h;c.length<3&&!c[1][0]&&!c[1][1]&&(h=t[++a],t[a]=l,t[u]=h)}),t.forEach(function(l){var u=s(l),c=u[0],h=u[1],d,p;if(d=i[c])if(delete i[d.end],d.push(l),d.end=h,p=r[h]){delete r[p.start];var b=p===d?d:d.concat(p);r[b.start=d.start]=i[b.end=p.end]=b}else r[d.start]=i[d.end]=d;else if(d=r[h])if(delete r[d.start],d.unshift(l),d.start=c,p=i[c]){delete i[p.end];var y=p===d?d:p.concat(d);r[y.start=p.start]=i[y.end=d.end]=y}else r[d.start]=i[d.end]=d;else d=[l],r[d.start=c]=i[d.end=h]=d});function s(l){var u=e.arcs[l<0?~l:l],c=u[0],h;return e.transform?(h=[0,0],u.forEach(function(d){h[0]+=d[0],h[1]+=d[1]})):h=u[u.length-1],l<0?[h,c]:[c,h]}function f(l,u){for(var c in l){var h=l[c];delete u[h.start],delete h.start,delete h.end,h.forEach(function(d){n[d<0?~d:d]=1}),o.push(h)}}return f(i,r),f(r,i),t.forEach(function(l){n[l<0?~l:l]||o.push([l])}),o}function N_(e){return $g(e,O_.apply(this,arguments))}function O_(e,t,n){var r,i,o;if(arguments.length>1)r=z_(e,t,n);else for(i=0,r=new Array(o=e.arcs.length);i<o;++i)r[i]=i;return{type:"MultiLineString",arcs:L_(e,r)}}function z_(e,t,n){var r=[],i=[],o;function a(c){var h=c<0?~c:c;(i[h]||(i[h]=[])).push({i:c,g:o})}function s(c){c.forEach(a)}function f(c){c.forEach(s)}function l(c){c.forEach(f)}function u(c){switch(o=c,c.type){case"GeometryCollection":c.geometries.forEach(u);break;case"LineString":s(c.arcs);break;case"MultiLineString":case"Polygon":f(c.arcs);break;case"MultiPolygon":l(c.arcs);break}}return u(t),i.forEach(n==null?function(c){r.push(c[0].i)}:function(c){n(c[0].g,c[c.length-1].g)&&r.push(c[0].i)}),r}function Oa(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function U_(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ff(e){let t,n,r;e.length!==2?(t=Oa,n=(s,f)=>Oa(e(s),f),r=(s,f)=>e(s)-f):(t=e===Oa||e===U_?e:G_,n=e,r=e);function i(s,f,l=0,u=s.length){if(l<u){if(t(f,f)!==0)return u;do{const c=l+u>>>1;n(s[c],f)<0?l=c+1:u=c}while(l<u)}return l}function o(s,f,l=0,u=s.length){if(l<u){if(t(f,f)!==0)return u;do{const c=l+u>>>1;n(s[c],f)<=0?l=c+1:u=c}while(l<u)}return l}function a(s,f,l=0,u=s.length){const c=i(s,f,l,u-1);return c>l&&r(s[c-1],f)>-r(s[c],f)?c-1:c}return{left:i,center:a,right:o}}function G_(){return 0}function Kg(e){return e===null?NaN:+e}const Jg=ff(Oa),Wc=Jg.right;Jg.left,ff(Kg).center;const xo=Wc;function H_(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of e)(o=t(o,++i,e))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class gi extends Map{constructor(t,n=q_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(em(this,t))}has(t){return super.has(em(this,t))}set(t,n){return super.set(V_(this,t),n)}delete(t){return super.delete(j_(this,t))}}function em({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function V_({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function j_({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function q_(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Yc(e){return e}function uf(e,...t){return tm(e,Yc,Yc,t)}function Z_(e,...t){return tm(e,Array.from,Yc,t)}function tm(e,t,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new gi,f=r[a++];let l=-1;for(const u of o){const c=f(u,++l,o),h=s.get(c);h?h.push(u):s.set(c,[u])}for(const[u,c]of s)s.set(u,i(c,a));return t(s)}(e,0)}var Qc=Math.sqrt(50),Xc=Math.sqrt(10),$c=Math.sqrt(2);function cf(e,t,n){var r,i=-1,o,a,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),(s=nm(e,t,n))===0||!isFinite(s))return[];if(s>0){let f=Math.round(e/s),l=Math.round(t/s);for(f*s<e&&++f,l*s>t&&--l,a=new Array(o=l-f+1);++i<o;)a[i]=(f+i)*s}else{s=-s;let f=Math.round(e*s),l=Math.round(t*s);for(f/s<e&&++f,l/s>t&&--l,a=new Array(o=l-f+1);++i<o;)a[i]=(f+i)/s}return r&&a.reverse(),a}function nm(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Qc?10:o>=Xc?5:o>=$c?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Qc?10:o>=Xc?5:o>=$c?2:1)}function mi(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Qc?i*=10:o>=Xc?i*=5:o>=$c&&(i*=2),t<e?-i:i}function rm(e,t,n=Kg){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function za(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function hf(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function W_(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function df(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ao(e){return e=df(Math.abs(e)),e?e[1]:NaN}function Y_(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],f=0;i>0&&s>0&&(f+s+1>r&&(s=Math.max(1,r-f)),o.push(n.substring(i-=s,i+s)),!((f+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function Q_(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var X_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ar(e){if(!(t=X_.exec(e)))throw new Error("invalid format: "+e);var t;return new Kc({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ar.prototype=Kc.prototype;function Kc(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Kc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $_(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var im;function K_(e,t){var n=df(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(im=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+df(e,Math.max(0,t+o-1))[0]}function om(e,t){var n=df(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const am={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:W_,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>om(e*100,t),r:om,s:K_,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function sm(e){return e}var lm=Array.prototype.map,fm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function J_(e){var t=e.grouping===void 0||e.thousands===void 0?sm:Y_(lm.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?sm:Q_(lm.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function l(c){c=Ar(c);var h=c.fill,d=c.align,p=c.sign,b=c.symbol,y=c.zero,w=c.width,_=c.comma,C=c.precision,S=c.trim,T=c.type;T==="n"?(_=!0,T="g"):am[T]||(C===void 0&&(C=12),S=!0,T="g"),(y||h==="0"&&d==="=")&&(y=!0,h="0",d="=");var B=b==="$"?n:b==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",I=b==="$"?r:/[%p]/.test(T)?a:"",F=am[T],P=/[defgprs%]/.test(T);C=C===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function j(O){var re=B,ae=I,pe,Te,Xe;if(T==="c")ae=F(O)+ae,O="";else{O=+O;var De=O<0||1/O<0;if(O=isNaN(O)?f:F(Math.abs(O),C),S&&(O=$_(O)),De&&+O==0&&p!=="+"&&(De=!1),re=(De?p==="("?p:s:p==="-"||p==="("?"":p)+re,ae=(T==="s"?fm[8+im/3]:"")+ae+(De&&p==="("?")":""),P){for(pe=-1,Te=O.length;++pe<Te;)if(Xe=O.charCodeAt(pe),48>Xe||Xe>57){ae=(Xe===46?i+O.slice(pe+1):O.slice(pe))+ae,O=O.slice(0,pe);break}}}_&&!y&&(O=t(O,1/0));var $e=re.length+O.length+ae.length,Ze=$e<w?new Array(w-$e+1).join(h):"";switch(_&&y&&(O=t(Ze+O,Ze.length?w-ae.length:1/0),Ze=""),d){case"<":O=re+O+ae+Ze;break;case"=":O=re+Ze+O+ae;break;case"^":O=Ze.slice(0,$e=Ze.length>>1)+re+O+ae+Ze.slice($e);break;default:O=Ze+re+O+ae;break}return o(O)}return j.toString=function(){return c+""},j}function u(c,h){var d=l((c=Ar(c),c.type="f",c)),p=Math.max(-8,Math.min(8,Math.floor(Ao(h)/3)))*3,b=Math.pow(10,-p),y=fm[8+p/3];return function(w){return d(b*w)+y}}return{format:l,formatPrefix:u}}var pf,pt,Jc;e4({thousands:",",grouping:[3],currency:["$",""]});function e4(e){return pf=J_(e),pt=pf.format,Jc=pf.formatPrefix,pf}function um(e){return Math.max(0,-Ao(Math.abs(e)))}function cm(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ao(t)/3)))*3-Ao(Math.abs(e)))}function hm(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ao(t)-Ao(e))+1}var eh=new Date,th=new Date;function at(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var f=[],l;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return f;do f.push(l=new Date(+o)),t(o,s),e(o);while(l<o&&o<a);return f},i.filter=function(o){return at(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},n&&(i.count=function(o,a){return eh.setTime(+o),th.setTime(+a),e(eh),e(th),Math.floor(n(eh,th))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?function(a){return r(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var gf=at(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});gf.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?at(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):gf};const nh=gf;gf.range;const Jn=1e3,en=Jn*60,er=en*60,bi=er*24,rh=bi*7,dm=bi*30,ih=bi*365;var pm=at(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*Jn)},function(e,t){return(t-e)/Jn},function(e){return e.getUTCSeconds()});const Er=pm;pm.range;var gm=at(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Jn)},function(e,t){e.setTime(+e+t*en)},function(e,t){return(t-e)/en},function(e){return e.getMinutes()});const oh=gm;gm.range;var mm=at(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Jn-e.getMinutes()*en)},function(e,t){e.setTime(+e+t*er)},function(e,t){return(t-e)/er},function(e){return e.getHours()});const ah=mm;mm.range;var bm=at(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*en)/bi,e=>e.getDate()-1);const yi=bm;bm.range;function wi(e){return at(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*en)/rh})}var Ua=wi(0),mf=wi(1),t4=wi(2),n4=wi(3),Eo=wi(4),r4=wi(5),i4=wi(6);Ua.range,mf.range,t4.range,n4.range,Eo.range,r4.range,i4.range;var ym=at(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()});const bf=ym;ym.range;var sh=at(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});sh.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:at(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};const _r=sh;sh.range;var wm=at(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*en)},function(e,t){return(t-e)/en},function(e){return e.getUTCMinutes()});const lh=wm;wm.range;var vm=at(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*er)},function(e,t){return(t-e)/er},function(e){return e.getUTCHours()});const fh=vm;vm.range;var xm=at(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/bi},function(e){return e.getUTCDate()-1});const vi=xm;xm.range;function xi(e){return at(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/rh})}var Ga=xi(0),yf=xi(1),o4=xi(2),a4=xi(3),_o=xi(4),s4=xi(5),l4=xi(6);Ga.range,yf.range,o4.range,a4.range,_o.range,s4.range,l4.range;var Am=at(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()});const wf=Am;Am.range;var uh=at(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});uh.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:at(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};const Sr=uh;uh.range;function Em(e,t,n,r,i,o){const a=[[Er,1,Jn],[Er,5,5*Jn],[Er,15,15*Jn],[Er,30,30*Jn],[o,1,en],[o,5,5*en],[o,15,15*en],[o,30,30*en],[i,1,er],[i,3,3*er],[i,6,6*er],[i,12,12*er],[r,1,bi],[r,2,2*bi],[n,1,rh],[t,1,dm],[t,3,3*dm],[e,1,ih]];function s(l,u,c){const h=u<l;h&&([l,u]=[u,l]);const d=c&&typeof c.range=="function"?c:f(l,u,c),p=d?d.range(l,+u+1):[];return h?p.reverse():p}function f(l,u,c){const h=Math.abs(u-l)/c,d=ff(([,,y])=>y).right(a,h);if(d===a.length)return e.every(mi(l/ih,u/ih,c));if(d===0)return nh.every(Math.max(mi(l,u,c),1));const[p,b]=a[h/a[d-1][2]<a[d][2]/h?d-1:d];return p.every(b)}return[s,f]}const[f4,u4]=Em(Sr,wf,Ga,vi,fh,lh),[c4,h4]=Em(_r,bf,Ua,yi,ah,oh),Ha="year",Va="quarter",ja="month",qa="week",Za="date",vf="day",ch="dayofyear",Wa="hours",Ya="minutes",Qa="seconds",xf="milliseconds";[Ha,Va,ja,qa,Za,vf,ch,Wa,Ya,Qa,xf].reduce((e,t,n)=>(e[t]=1+n,e),{});const d4={[Ha]:_r,[Va]:bf.every(3),[ja]:bf,[qa]:Ua,[Za]:yi,[vf]:yi,[ch]:yi,[Wa]:ah,[Ya]:oh,[Qa]:Er,[xf]:nh},p4={[Ha]:Sr,[Va]:wf.every(3),[ja]:wf,[qa]:Ga,[Za]:vi,[vf]:vi,[ch]:vi,[Wa]:fh,[Ya]:lh,[Qa]:Er,[xf]:nh};function g4(e){return d4[e]}function m4(e){return p4[e]}function hh(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function dh(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Xa(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function _m(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,f=e.shortMonths,l=$a(i),u=Ka(i),c=$a(o),h=Ka(o),d=$a(a),p=Ka(a),b=$a(s),y=Ka(s),w=$a(f),_=Ka(f),C={a:De,A:$e,b:Ze,B:Ke,c:null,d:Bm,e:Bm,f:z4,g:Q4,G:$4,H:L4,I:N4,j:O4,L:Dm,m:U4,M:G4,p:Ee,q:_e,Q:Nm,s:Om,S:H4,u:V4,U:j4,V:q4,w:Z4,W:W4,x:null,X:null,y:Y4,Y:X4,Z:K4,"%":Lm},S={a:dt,A:qt,b:Oe,B:L,c:null,d:Fm,e:Fm,f:nS,g:hS,G:pS,H:J4,I:eS,j:tS,L:Mm,m:rS,M:iS,p:M,q,Q:Nm,s:Om,S:oS,u:aS,U:sS,V:lS,w:fS,W:uS,x:null,X:null,y:cS,Y:dS,Z:gS,"%":Lm},T={a:j,A:O,b:re,B:ae,c:pe,d:Im,e:Im,f:R4,g:km,G:Cm,H:Tm,I:Tm,j:I4,L:D4,m:k4,M:T4,p:P,q:C4,Q:M4,s:P4,S:B4,u:x4,U:A4,V:E4,w:v4,W:_4,x:Te,X:Xe,y:km,Y:Cm,Z:S4,"%":F4};C.x=B(n,C),C.X=B(r,C),C.c=B(t,C),S.x=B(n,S),S.X=B(r,S),S.c=B(t,S);function B(H,W){return function(E){var x=[],G=-1,Z=0,le=H.length,J,fe,Zt;for(E instanceof Date||(E=new Date(+E));++G<le;)H.charCodeAt(G)===37&&(x.push(H.slice(Z,G)),(fe=Sm[J=H.charAt(++G)])!=null?J=H.charAt(++G):fe=J==="e"?" ":"0",(Zt=W[J])&&(J=Zt(E,fe)),x.push(J),Z=G+1);return x.push(H.slice(Z,G)),x.join("")}}function I(H,W){return function(E){var x=Xa(1900,void 0,1),G=F(x,H,E+="",0),Z,le;if(G!=E.length)return null;if("Q"in x)return new Date(x.Q);if("s"in x)return new Date(x.s*1e3+("L"in x?x.L:0));if(W&&!("Z"in x)&&(x.Z=0),"p"in x&&(x.H=x.H%12+x.p*12),x.m===void 0&&(x.m="q"in x?x.q:0),"V"in x){if(x.V<1||x.V>53)return null;"w"in x||(x.w=1),"Z"in x?(Z=dh(Xa(x.y,0,1)),le=Z.getUTCDay(),Z=le>4||le===0?yf.ceil(Z):yf(Z),Z=vi.offset(Z,(x.V-1)*7),x.y=Z.getUTCFullYear(),x.m=Z.getUTCMonth(),x.d=Z.getUTCDate()+(x.w+6)%7):(Z=hh(Xa(x.y,0,1)),le=Z.getDay(),Z=le>4||le===0?mf.ceil(Z):mf(Z),Z=yi.offset(Z,(x.V-1)*7),x.y=Z.getFullYear(),x.m=Z.getMonth(),x.d=Z.getDate()+(x.w+6)%7)}else("W"in x||"U"in x)&&("w"in x||(x.w="u"in x?x.u%7:"W"in x?1:0),le="Z"in x?dh(Xa(x.y,0,1)).getUTCDay():hh(Xa(x.y,0,1)).getDay(),x.m=0,x.d="W"in x?(x.w+6)%7+x.W*7-(le+5)%7:x.w+x.U*7-(le+6)%7);return"Z"in x?(x.H+=x.Z/100|0,x.M+=x.Z%100,dh(x)):hh(x)}}function F(H,W,E,x){for(var G=0,Z=W.length,le=E.length,J,fe;G<Z;){if(x>=le)return-1;if(J=W.charCodeAt(G++),J===37){if(J=W.charAt(G++),fe=T[J in Sm?W.charAt(G++):J],!fe||(x=fe(H,E,x))<0)return-1}else if(J!=E.charCodeAt(x++))return-1}return x}function P(H,W,E){var x=l.exec(W.slice(E));return x?(H.p=u.get(x[0].toLowerCase()),E+x[0].length):-1}function j(H,W,E){var x=d.exec(W.slice(E));return x?(H.w=p.get(x[0].toLowerCase()),E+x[0].length):-1}function O(H,W,E){var x=c.exec(W.slice(E));return x?(H.w=h.get(x[0].toLowerCase()),E+x[0].length):-1}function re(H,W,E){var x=w.exec(W.slice(E));return x?(H.m=_.get(x[0].toLowerCase()),E+x[0].length):-1}function ae(H,W,E){var x=b.exec(W.slice(E));return x?(H.m=y.get(x[0].toLowerCase()),E+x[0].length):-1}function pe(H,W,E){return F(H,t,W,E)}function Te(H,W,E){return F(H,n,W,E)}function Xe(H,W,E){return F(H,r,W,E)}function De(H){return a[H.getDay()]}function $e(H){return o[H.getDay()]}function Ze(H){return f[H.getMonth()]}function Ke(H){return s[H.getMonth()]}function Ee(H){return i[+(H.getHours()>=12)]}function _e(H){return 1+~~(H.getMonth()/3)}function dt(H){return a[H.getUTCDay()]}function qt(H){return o[H.getUTCDay()]}function Oe(H){return f[H.getUTCMonth()]}function L(H){return s[H.getUTCMonth()]}function M(H){return i[+(H.getUTCHours()>=12)]}function q(H){return 1+~~(H.getUTCMonth()/3)}return{format:function(H){var W=B(H+="",C);return W.toString=function(){return H},W},parse:function(H){var W=I(H+="",!1);return W.toString=function(){return H},W},utcFormat:function(H){var W=B(H+="",S);return W.toString=function(){return H},W},utcParse:function(H){var W=I(H+="",!0);return W.toString=function(){return H},W}}}var Sm={"-":"",_:" ",0:"0"},st=/^\s*\d+/,b4=/^%/,y4=/[\\^$*+?|[\]().{}]/g;function me(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function w4(e){return e.replace(y4,"\\$&")}function $a(e){return new RegExp("^(?:"+e.map(w4).join("|")+")","i")}function Ka(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function v4(e,t,n){var r=st.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function x4(e,t,n){var r=st.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function A4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function E4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function _4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Cm(e,t,n){var r=st.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function km(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function S4(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function C4(e,t,n){var r=st.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function k4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Im(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function I4(e,t,n){var r=st.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Tm(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function T4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function B4(e,t,n){var r=st.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function D4(e,t,n){var r=st.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function R4(e,t,n){var r=st.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function F4(e,t,n){var r=b4.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function M4(e,t,n){var r=st.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function P4(e,t,n){var r=st.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Bm(e,t){return me(e.getDate(),t,2)}function L4(e,t){return me(e.getHours(),t,2)}function N4(e,t){return me(e.getHours()%12||12,t,2)}function O4(e,t){return me(1+yi.count(_r(e),e),t,3)}function Dm(e,t){return me(e.getMilliseconds(),t,3)}function z4(e,t){return Dm(e,t)+"000"}function U4(e,t){return me(e.getMonth()+1,t,2)}function G4(e,t){return me(e.getMinutes(),t,2)}function H4(e,t){return me(e.getSeconds(),t,2)}function V4(e){var t=e.getDay();return t===0?7:t}function j4(e,t){return me(Ua.count(_r(e)-1,e),t,2)}function Rm(e){var t=e.getDay();return t>=4||t===0?Eo(e):Eo.ceil(e)}function q4(e,t){return e=Rm(e),me(Eo.count(_r(e),e)+(_r(e).getDay()===4),t,2)}function Z4(e){return e.getDay()}function W4(e,t){return me(mf.count(_r(e)-1,e),t,2)}function Y4(e,t){return me(e.getFullYear()%100,t,2)}function Q4(e,t){return e=Rm(e),me(e.getFullYear()%100,t,2)}function X4(e,t){return me(e.getFullYear()%1e4,t,4)}function $4(e,t){var n=e.getDay();return e=n>=4||n===0?Eo(e):Eo.ceil(e),me(e.getFullYear()%1e4,t,4)}function K4(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+me(t/60|0,"0",2)+me(t%60,"0",2)}function Fm(e,t){return me(e.getUTCDate(),t,2)}function J4(e,t){return me(e.getUTCHours(),t,2)}function eS(e,t){return me(e.getUTCHours()%12||12,t,2)}function tS(e,t){return me(1+vi.count(Sr(e),e),t,3)}function Mm(e,t){return me(e.getUTCMilliseconds(),t,3)}function nS(e,t){return Mm(e,t)+"000"}function rS(e,t){return me(e.getUTCMonth()+1,t,2)}function iS(e,t){return me(e.getUTCMinutes(),t,2)}function oS(e,t){return me(e.getUTCSeconds(),t,2)}function aS(e){var t=e.getUTCDay();return t===0?7:t}function sS(e,t){return me(Ga.count(Sr(e)-1,e),t,2)}function Pm(e){var t=e.getUTCDay();return t>=4||t===0?_o(e):_o.ceil(e)}function lS(e,t){return e=Pm(e),me(_o.count(Sr(e),e)+(Sr(e).getUTCDay()===4),t,2)}function fS(e){return e.getUTCDay()}function uS(e,t){return me(yf.count(Sr(e)-1,e),t,2)}function cS(e,t){return me(e.getUTCFullYear()%100,t,2)}function hS(e,t){return e=Pm(e),me(e.getUTCFullYear()%100,t,2)}function dS(e,t){return me(e.getUTCFullYear()%1e4,t,4)}function pS(e,t){var n=e.getUTCDay();return e=n>=4||n===0?_o(e):_o.ceil(e),me(e.getUTCFullYear()%1e4,t,4)}function gS(){return"+0000"}function Lm(){return"%"}function Nm(e){return+e}function Om(e){return Math.floor(+e/1e3)}var So,ph,zm,gh,Um;mS({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function mS(e){return So=_m(e),ph=So.format,zm=So.parse,gh=So.utcFormat,Um=So.utcParse,So}function Ja(e){const t={};return n=>t[n]||(t[n]=e(n))}function bS(e,t){return n=>{const r=e(n),i=r.indexOf(t);if(i<0)return r;let o=yS(r,i);const a=o<r.length?r.slice(o):"";for(;--o>i;)if(r[o]!=="0"){++o;break}return r.slice(0,o)+a}}function yS(e,t){let 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}function wS(e){const t=Ja(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(r){const i=Ar(r||",");if(i.precision==null){switch(i.precision=12,i.type){case"%":i.precision-=2;break;case"e":i.precision-=1;break}return bS(t(i),t(".1f")(1)[1])}else return t(i)},formatSpan(r,i,o,a){a=Ar(a??",f");const s=mi(r,i,o),f=Math.max(Math.abs(r),Math.abs(i));let l;if(a.precision==null)switch(a.type){case"s":return isNaN(l=cm(s,f))||(a.precision=l),n(a,f);case"":case"e":case"g":case"p":case"r":{isNaN(l=hm(s,f))||(a.precision=l-(a.type==="e"));break}case"f":case"%":{isNaN(l=um(s))||(a.precision=l-(a.type==="%")*2);break}}return t(a)}}}vS();function vS(){return wS({format:pt,formatPrefix:Jc})}function Gm(e,t,n){n=n||{},Mt(n)||Qe("Invalid time multi-format specifier: ".concat(n));const r=t(Qa),i=t(Ya),o=t(Wa),a=t(Za),s=t(qa),f=t(ja),l=t(Va),u=t(Ha),c=e(n[xf]||".%L"),h=e(n[Qa]||":%S"),d=e(n[Ya]||"%I:%M"),p=e(n[Wa]||"%I %p"),b=e(n[Za]||n[vf]||"%a %d"),y=e(n[qa]||"%b %d"),w=e(n[ja]||"%B"),_=e(n[Va]||"%B"),C=e(n[Ha]||"%Y");return S=>(r(S)<S?c:i(S)<S?h:o(S)<S?d:a(S)<S?p:f(S)<S?s(S)<S?b:y:u(S)<S?l(S)<S?w:_:C)(S)}function Hm(e){const t=Ja(e.format),n=Ja(e.utcFormat);return{timeFormat:r=>Pe(r)?t(r):Gm(t,g4,r),utcFormat:r=>Pe(r)?n(r):Gm(n,m4,r),timeParse:Ja(e.parse),utcParse:Ja(e.utcParse)}}let mh;xS();function xS(){return mh=Hm({format:ph,parse:zm,utcFormat:gh,utcParse:Um})}function AS(e){return Hm(_m(e))}function ES(e){return arguments.length?mh=AS(e):mh}const _S=/^(data:|([A-Za-z]+:)?\/\/)/,SS=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,CS=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Vm="file://";function kS(e,t){return n=>({options:n||{},sanitize:TS,load:IS,fileAccess:!!t,file:BS(t),http:RS(e)})}async function IS(e,t){const n=await this.sanitize(e,t),r=n.href;return n.localFile?this.file(r):this.http(r,t)}async function TS(e,t){t=Vc({},this.options,t);const n=this.fileAccess,r={href:null};let i,o,a;const s=SS.test(e.replace(CS,""));(e==null||typeof e!="string"||!s)&&Qe("Sanitize failure, invalid URI: "+sf(e));const f=_S.test(e);return(a=t.baseURL)&&!f&&(!e.startsWith("/")&&!a.endsWith("/")&&(e="/"+e),e=a+e),o=(i=e.startsWith(Vm))||t.mode==="file"||t.mode!=="http"&&!f&&n,i?e=e.slice(Vm.length):e.startsWith("//")&&(t.defaultProtocol==="file"?(e=e.slice(2),o=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(r,"localFile",{value:!!o}),r.href=e,t.target&&(r.target=t.target+""),t.rel&&(r.rel=t.rel+""),t.context==="image"&&t.crossOrigin&&(r.crossOrigin=t.crossOrigin+""),r}function BS(e){return e?t=>new Promise((n,r)=>{e.readFile(t,(i,o)=>{i?r(i):n(o)})}):DS}async function DS(){Qe("No file system access.")}function RS(e){return e?async function(t,n){const r=Vc({},this.options.http,n),i=n&&n.response,o=await e(t,r);return o.ok?Pt(o[i])?o[i]():o.text():Qe(o.status+""+o.statusText)}:FS}async function FS(){Qe("No HTTP fetch method available.")}const MS=e=>e!=null&&e===e,PS=e=>e==="true"||e==="false"||e===!0||e===!1,LS=e=>!Number.isNaN(Date.parse(e)),jm=e=>!Number.isNaN(+e)&&!(e instanceof Date),NS=e=>jm(e)&&Number.isInteger(+e),qm={boolean:E_,integer:Pa,number:Pa,date:S_,string:C_,unknown:nf},Af=[PS,NS,jm,LS],OS=["boolean","integer","number","date"];function zS(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=Af.length,i=Af.map((o,a)=>a+1);for(let o=0,a=0,s,f;o<n;++o)for(f=t?e[o][t]:e[o],s=0;s<r;++s)if(i[s]&&MS(f)&&!Af[s](f)&&(i[s]=0,++a,a===Af.length))return"string";return OS[i.reduce((o,a)=>o===0?a:o,0)-1]}function US(e,t){return t.reduce((n,r)=>(n[r]=zS(e,r),n),{})}function Zm(e){const t=function(n,r){const i={delimiter:e};return bh(n,r?Vc(r,i):i)};return t.responseType="text",t}function bh(e,t){return t.header&&(e=t.header.map(sf).join(t.delimiter)+`
|
|
6
|
+
`+e),Qg(t.delimiter).parse(e+"")}bh.responseType="text";function GS(e){return typeof Buffer=="function"&&Pt(Buffer.isBuffer)?Buffer.isBuffer(e):!1}function yh(e,t){const n=t&&t.property?tf(t.property):nf;return Mt(e)&&!GS(e)?HS(n(e),t):n(JSON.parse(e))}yh.responseType="json";function HS(e,t){return!Ft(e)&&x_(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}const VS={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function Wm(e,t){let n,r,i,o;return e=yh(e,t),t&&t.feature?(n=P_,i=t.feature):t&&t.mesh?(n=N_,i=t.mesh,o=VS[t.filter]):Qe("Missing TopoJSON feature or mesh parameter."),r=(r=e.objects[i])?n(e,r,o):Qe("Invalid TopoJSON object: "+i),r&&r.features||[r]}Wm.responseType="json";const wh={dsv:bh,csv:Zm(","),tsv:Zm(" "),json:yh,topojson:Wm};function Ym(e,t){return arguments.length>1?(wh[e]=t,this):pi(wh,e)?wh[e]:null}function Qm(e,t,n,r){t=t||{};const i=Ym(t.type||"json");return i||Qe("Unknown data format type: "+t.type),e=i(e,t),t.parse&&jS(e,t.parse,n,r),pi(e,"columns")&&delete e.columns,e}function jS(e,t,n,r){if(!e.length)return;const i=ES();n=n||i.timeParse,r=r||i.utcParse;let o=e.columns||Object.keys(e[0]),a,s,f,l,u,c;t==="auto"&&(t=US(e,o)),o=Object.keys(t);const h=o.map(d=>{const p=t[d];let b,y;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return b=p.split(/:(.+)?/,2),y=b[1],(y[0]==="'"&&y[y.length-1]==="'"||y[0]==='"'&&y[y.length-1]==='"')&&(y=y.slice(1,-1)),(b[0]==="utc"?r:n)(y);if(!qm[p])throw Error("Illegal format pattern: "+d+":"+p);return qm[p]});for(f=0,u=e.length,c=o.length;f<u;++f)for(a=e[f],l=0;l<c;++l)s=o[l],a[s]=h[l](a[s])}const Ef=kS(typeof fetch<"u"&&fetch,null);/**
|
|
7
7
|
* @license
|
|
8
8
|
* Copyright 2017 Google LLC
|
|
9
9
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
10
|
-
*/const
|
|
11
|
-
\f\r]`,
|
|
12
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
10
|
+
*/const es=globalThis,_f=es.trustedTypes,Xm=_f?_f.createPolicy("lit-html",{createHTML:e=>e}):void 0,$m="$lit$",Cr=`lit$${(Math.random()+"").slice(9)}$`,Km="?"+Cr,qS=`<${Km}>`,Ai=document,ts=()=>Ai.createComment(""),ns=e=>e===null||typeof e!="object"&&typeof e!="function",Jm=Array.isArray,ZS=e=>Jm(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",vh=`[
|
|
11
|
+
\f\r]`,rs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,e1=/-->/g,t1=/>/g,Ei=RegExp(`>|${vh}(?:([^\\s"'>=/]+)(${vh}*=${vh}*(?:[^
|
|
12
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),n1=/'/g,r1=/"/g,i1=/^(?:script|style|textarea|title)$/i,WS=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Dn=WS(1),is=Symbol.for("lit-noChange"),nt=Symbol.for("lit-nothing"),o1=new WeakMap,_i=Ai.createTreeWalker(Ai,129);function a1(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xm!==void 0?Xm.createHTML(t):t}const YS=(e,t)=>{const n=e.length-1,r=[];let i,o=t===2?"<svg>":"",a=rs;for(let s=0;s<n;s++){const f=e[s];let l,u,c=-1,h=0;for(;h<f.length&&(a.lastIndex=h,u=a.exec(f),u!==null);)h=a.lastIndex,a===rs?u[1]==="!--"?a=e1:u[1]!==void 0?a=t1:u[2]!==void 0?(i1.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=Ei):u[3]!==void 0&&(a=Ei):a===Ei?u[0]===">"?(a=i??rs,c=-1):u[1]===void 0?c=-2:(c=a.lastIndex-u[2].length,l=u[1],a=u[3]===void 0?Ei:u[3]==='"'?r1:n1):a===r1||a===n1?a=Ei:a===e1||a===t1?a=rs:(a=Ei,i=void 0);const d=a===Ei&&e[s+1].startsWith("/>")?" ":"";o+=a===rs?f+qS:c>=0?(r.push(l),f.slice(0,c)+$m+f.slice(c)+Cr+d):f+Cr+(c===-2?s:d)}return[a1(e,o+(e[n]||"<?>")+(t===2?"</svg>":"")),r]};class os{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let o=0,a=0;const s=t.length-1,f=this.parts,[l,u]=YS(t,n);if(this.el=os.createElement(l,r),_i.currentNode=this.el.content,n===2){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=_i.nextNode())!==null&&f.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(const c of i.getAttributeNames())if(c.endsWith($m)){const h=u[a++],d=i.getAttribute(c).split(Cr),p=/([.?@])?(.*)/.exec(h);f.push({type:1,index:o,name:p[2],strings:d,ctor:p[1]==="."?XS:p[1]==="?"?$S:p[1]==="@"?KS:Sf}),i.removeAttribute(c)}else c.startsWith(Cr)&&(f.push({type:6,index:o}),i.removeAttribute(c));if(i1.test(i.tagName)){const c=i.textContent.split(Cr),h=c.length-1;if(h>0){i.textContent=_f?_f.emptyScript:"";for(let d=0;d<h;d++)i.append(c[d],ts()),_i.nextNode(),f.push({type:2,index:++o});i.append(c[h],ts())}}}else if(i.nodeType===8)if(i.data===Km)f.push({type:2,index:o});else{let c=-1;for(;(c=i.data.indexOf(Cr,c+1))!==-1;)f.push({type:7,index:o}),c+=Cr.length-1}o++}}static createElement(t,n){const r=Ai.createElement("template");return r.innerHTML=t,r}}function Co(e,t,n=e,r){var a,s;if(t===is)return t;let i=r!==void 0?(a=n._$Co)==null?void 0:a[r]:n._$Cl;const o=ns(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((s=i==null?void 0:i._$AO)==null||s.call(i,!1),o===void 0?i=void 0:(i=new o(e),i._$AT(e,n,r)),r!==void 0?(n._$Co??(n._$Co=[]))[r]=i:n._$Cl=i),i!==void 0&&(t=Co(e,i._$AS(e,t.values),i,r)),t}class QS{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:n},parts:r}=this._$AD,i=((t==null?void 0:t.creationScope)??Ai).importNode(n,!0);_i.currentNode=i;let o=_i.nextNode(),a=0,s=0,f=r[0];for(;f!==void 0;){if(a===f.index){let l;f.type===2?l=new as(o,o.nextSibling,this,t):f.type===1?l=new f.ctor(o,f.name,f.strings,this,t):f.type===6&&(l=new JS(o,this,t)),this._$AV.push(l),f=r[++s]}a!==(f==null?void 0:f.index)&&(o=_i.nextNode(),a++)}return _i.currentNode=Ai,i}p(t){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,n),n+=r.strings.length-2):r._$AI(t[n])),n++}}class as{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,n,r,i){this.type=2,this._$AH=nt,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=r,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=Co(this,t,n),ns(t)?t===nt||t==null||t===""?(this._$AH!==nt&&this._$AR(),this._$AH=nt):t!==this._$AH&&t!==is&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):ZS(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==nt&&ns(this._$AH)?this._$AA.nextSibling.data=t:this.$(Ai.createTextNode(t)),this._$AH=t}g(t){var o;const{values:n,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=os.createElement(a1(r.h,r.h[0]),this.options)),r);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(n);else{const a=new QS(i,this),s=a.u(this.options);a.p(n),this.$(s),this._$AH=a}}_$AC(t){let n=o1.get(t.strings);return n===void 0&&o1.set(t.strings,n=new os(t)),n}T(t){Jm(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,i=0;for(const o of t)i===n.length?n.push(r=new as(this.k(ts()),this.k(ts()),this,this.options)):r=n[i],r._$AI(o),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(t=this._$AA.nextSibling,n){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,n);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var n;this._$AM===void 0&&(this._$Cv=t,(n=this._$AP)==null||n.call(this,t))}}let Sf=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,r,i,o){this.type=1,this._$AH=nt,this._$AN=void 0,this.element=t,this.name=n,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=nt}_$AI(t,n=this,r,i){const o=this.strings;let a=!1;if(o===void 0)t=Co(this,t,n,0),a=!ns(t)||t!==this._$AH&&t!==is,a&&(this._$AH=t);else{const s=t;let f,l;for(t=o[0],f=0;f<o.length-1;f++)l=Co(this,s[r+f],n,f),l===is&&(l=this._$AH[f]),a||(a=!ns(l)||l!==this._$AH[f]),l===nt?t=nt:t!==nt&&(t+=(l??"")+o[f+1]),this._$AH[f]=l}a&&!i&&this.O(t)}O(t){t===nt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class XS extends Sf{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===nt?void 0:t}}class $S extends Sf{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==nt)}}class KS extends Sf{constructor(t,n,r,i,o){super(t,n,r,i,o),this.type=5}_$AI(t,n=this){if((t=Co(this,t,n,0)??nt)===is)return;const r=this._$AH,i=t===nt&&r!==nt||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==nt&&(r===nt||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var n;typeof this._$AH=="function"?this._$AH.call(((n=this.options)==null?void 0:n.host)??this.element,t):this._$AH.handleEvent(t)}}class JS{constructor(t,n,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Co(this,t)}}const xh=es.litHtmlPolyfillSupport;xh==null||xh(os,as),(es.litHtmlVersions??(es.litHtmlVersions=[])).push("3.1.0");const s1=(e,t,n)=>{const r=(n==null?void 0:n.renderBefore)??t;let i=r._$litPart$;if(i===void 0){const o=(n==null?void 0:n.renderBefore)??null;r._$litPart$=i=new as(t.insertBefore(ts(),o),o,void 0,n??{})}return i._$AI(e),i},eC=`.genome-spy {
|
|
13
13
|
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
14
14
|
position: relative;
|
|
15
15
|
}
|
|
@@ -120,19 +120,19 @@
|
|
|
120
120
|
border: 1px solid red;
|
|
121
121
|
padding: 10px;
|
|
122
122
|
background: #fff0f0;
|
|
123
|
-
}`;function GS(e,t){var n=e.getBoundingClientRect();return[t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop]}function yf(e,t){return e.length==t.length&&e.every((n,r)=>e[r]===t[r])}function Wt(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function ns(e){return e[e.length-1]}class HS{constructor(t){this.container=t,this.element=document.createElement("div"),this.element.className="tooltip",this._visible=!0,this.container.appendChild(this.element),this._previousTooltipDatum=void 0,this.enabledStack=[!0],this._penaltyUntil=0,this._lastCoords=void 0,this._previousMove=0,this.clear()}set visible(t){t!=this._visible&&(this.element.style.display=t?null:"none",this._visible=t)}get visible(){return this._visible}get enabled(){return ns(this.enabledStack)??!0}pushEnabledState(t){this.enabledStack.push(t),t||(this.visible=!1)}popEnabledState(){this.enabledStack.pop()}handleMouseMove(t){this.mouseCoords=GS(this.container,t);const n=performance.now();!this.visible&&!this._isPenalty()&&n-this._previousMove>500&&(this._penaltyUntil=n+70),this._lastCoords&&VS(this.mouseCoords,this._lastCoords)>20&&(this._penaltyUntil=n+400),this._lastCoords=this.mouseCoords,this.visible&&this.updatePlacement(),this._previousMove=n}updatePlacement(){const[n,r]=this.mouseCoords;let i=n+20;i>this.container.clientWidth-this.element.offsetWidth&&(i=n-20-this.element.offsetWidth),this.element.style.left=i+"px",this.element.style.top=Math.min(r+20,this.container.clientHeight-this.element.offsetHeight)+"px"}setContent(t){if(!t||!this.enabled||this._isPenalty()){this.visible&&(Qm("",this.element),this.visible=!1),this._previousTooltipDatum=void 0;return}Qm(t,this.element),this.visible=!0,this.updatePlacement()}clear(){this._previousTooltipDatum=void 0,this.setContent(void 0)}updateWithDatum(t,n){t!==this._previousTooltipDatum&&(this._previousTooltipDatum=t,n||(n=r=>Promise.resolve(Fn` ${JSON.stringify(r)} `)),n(t).then(r=>this.setContent(r)).catch(r=>{if(r!=="debounced")throw r}))}_isPenalty(){return this._penaltyUntil&&this._penaltyUntil>performance.now()}}function VS(e,t){let n=0;for(let r=0;r<e.length;r++)n+=(e[r]-t[r])**2;return Math.sqrt(n)}const jS="RawCode",qS="Literal",ZS="Property",WS="Identifier",YS="ArrayExpression",QS="BinaryExpression",XS="CallExpression",$S="ConditionalExpression",KS="LogicalExpression",JS="MemberExpression",eC="ObjectExpression",tC="UnaryExpression";function yn(e){this.type=e}yn.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=nC(this),n=0,r=t.length;n<r;++n)if(t[n].visit(e))return 1};function nC(e){switch(e.type){case YS:return e.elements;case QS:case KS:return[e.left,e.right];case XS:return[e.callee].concat(e.arguments);case $S:return[e.test,e.consequent,e.alternate];case JS:return[e.object,e.property];case eC:return e.properties;case ZS:return[e.key,e.value];case tC:return[e.argument];case WS:case qS:case jS:default:return[]}}var Rn,K,U,wt,Ie,wf=1,rs=2,Ci=3,Tr=4,vf=5,Ii=6,Pt=7,is=8,rC=9;Rn={},Rn[wf]="Boolean",Rn[rs]="<end>",Rn[Ci]="Identifier",Rn[Tr]="Keyword",Rn[vf]="Null",Rn[Ii]="Numeric",Rn[Pt]="Punctuator",Rn[is]="String",Rn[rC]="RegularExpression";var iC="ArrayExpression",oC="BinaryExpression",aC="CallExpression",sC="ConditionalExpression",Xm="Identifier",lC="Literal",fC="LogicalExpression",uC="MemberExpression",cC="ObjectExpression",hC="Property",dC="UnaryExpression",lt="Unexpected token %0",pC="Unexpected number",gC="Unexpected string",mC="Unexpected identifier",bC="Unexpected reserved word",yC="Unexpected end of input",dh="Invalid regular expression",ph="Invalid regular expression: missing /",$m="Octal literals are not allowed in strict mode.",wC="Duplicate data property in object literal not allowed in strict mode",gt="ILLEGAL",os="Disabled.",vC=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),xC=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0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\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function xf(e,t){if(!e)throw new Error("ASSERT: "+t)}function nr(e){return e>=48&&e<=57}function gh(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function as(e){return"01234567".indexOf(e)>=0}function AC(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function ss(e){return e===10||e===13||e===8232||e===8233}function ls(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&vC.test(String.fromCharCode(e))}function Af(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&xC.test(String.fromCharCode(e))}const EC={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function Km(){for(;U<wt;){const e=K.charCodeAt(U);if(AC(e)||ss(e))++U;else break}}function mh(e){var t,n,r,i=0;for(n=e==="u"?4:2,t=0;t<n;++t)U<wt&&gh(K[U])?(r=K[U++],i=i*16+"0123456789abcdef".indexOf(r.toLowerCase())):be({},lt,gt);return String.fromCharCode(i)}function _C(){var e,t,n,r;for(e=K[U],t=0,e==="}"&&be({},lt,gt);U<wt&&(e=K[U++],!!gh(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&be({},lt,gt),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function Jm(){var e,t;for(e=K.charCodeAt(U++),t=String.fromCharCode(e),e===92&&(K.charCodeAt(U)!==117&&be({},lt,gt),++U,e=mh("u"),(!e||e==="\\"||!ls(e.charCodeAt(0)))&&be({},lt,gt),t=e);U<wt&&(e=K.charCodeAt(U),!!Af(e));)++U,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),K.charCodeAt(U)!==117&&be({},lt,gt),++U,e=mh("u"),(!e||e==="\\"||!Af(e.charCodeAt(0)))&&be({},lt,gt),t+=e);return t}function SC(){var e,t;for(e=U++;U<wt;){if(t=K.charCodeAt(U),t===92)return U=e,Jm();if(Af(t))++U;else break}return K.slice(e,U)}function CC(){var e,t,n;return e=U,t=K.charCodeAt(U)===92?Jm():SC(),t.length===1?n=Ci:EC.hasOwnProperty(t)?n=Tr:t==="null"?n=vf:t==="true"||t==="false"?n=wf:n=Ci,{type:n,value:t,start:e,end:U}}function bh(){var e=U,t=K.charCodeAt(U),n,r=K[U],i,o,a;switch(t){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++U,{type:Pt,value:String.fromCharCode(t),start:e,end:U};default:if(n=K.charCodeAt(U+1),n===61)switch(t){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return U+=2,{type:Pt,value:String.fromCharCode(t)+String.fromCharCode(n),start:e,end:U};case 33:case 61:return U+=2,K.charCodeAt(U)===61&&++U,{type:Pt,value:K.slice(e,U),start:e,end:U}}}if(a=K.substr(U,4),a===">>>=")return U+=4,{type:Pt,value:a,start:e,end:U};if(o=a.substr(0,3),o===">>>"||o==="<<="||o===">>=")return U+=3,{type:Pt,value:o,start:e,end:U};if(i=o.substr(0,2),r===i[1]&&"+-<>&|".indexOf(r)>=0||i==="=>")return U+=2,{type:Pt,value:i,start:e,end:U};if(i==="//"&&be({},lt,gt),"<>=!+-*%&|^/".indexOf(r)>=0)return++U,{type:Pt,value:r,start:e,end:U};be({},lt,gt)}function IC(e){let t="";for(;U<wt&&gh(K[U]);)t+=K[U++];return t.length===0&&be({},lt,gt),ls(K.charCodeAt(U))&&be({},lt,gt),{type:Ii,value:parseInt("0x"+t,16),start:e,end:U}}function TC(e){let t="0"+K[U++];for(;U<wt&&as(K[U]);)t+=K[U++];return(ls(K.charCodeAt(U))||nr(K.charCodeAt(U)))&&be({},lt,gt),{type:Ii,value:parseInt(t,8),octal:!0,start:e,end:U}}function e1(){var e,t,n;if(n=K[U],xf(nr(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=U,e="",n!=="."){if(e=K[U++],n=K[U],e==="0"){if(n==="x"||n==="X")return++U,IC(t);if(as(n))return TC(t);n&&nr(n.charCodeAt(0))&&be({},lt,gt)}for(;nr(K.charCodeAt(U));)e+=K[U++];n=K[U]}if(n==="."){for(e+=K[U++];nr(K.charCodeAt(U));)e+=K[U++];n=K[U]}if(n==="e"||n==="E")if(e+=K[U++],n=K[U],(n==="+"||n==="-")&&(e+=K[U++]),nr(K.charCodeAt(U)))for(;nr(K.charCodeAt(U));)e+=K[U++];else be({},lt,gt);return ls(K.charCodeAt(U))&&be({},lt,gt),{type:Ii,value:parseFloat(e),start:t,end:U}}function kC(){var e="",t,n,r,i,o=!1;for(t=K[U],xf(t==="'"||t==='"',"String literal must starts with a quote"),n=U,++U;U<wt;)if(r=K[U++],r===t){t="";break}else if(r==="\\")if(r=K[U++],!r||!ss(r.charCodeAt(0)))switch(r){case"u":case"x":K[U]==="{"?(++U,e+=_C()):e+=mh(r);break;case"n":e+=`
|
|
124
|
-
`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:
|
|
125
|
-
`&&++U;else{if(ss(r.charCodeAt(0)))break;e+=r}return t!==""&&be({},lt,gt),{type:is,value:e,octal:o,start:n,end:U}}function BC(e,t){let n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(r,i)=>{if(parseInt(i,16)<=1114111)return"x";be({},dh)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{be({},dh)}try{return new RegExp(e,t)}catch{return null}}function DC(){var e,t,n,r,i;for(e=K[U],xf(e==="/","Regular expression literal must start with a slash"),t=K[U++],n=!1,r=!1;U<wt;)if(e=K[U++],t+=e,e==="\\")e=K[U++],ss(e.charCodeAt(0))&&be({},ph),t+=e;else if(ss(e.charCodeAt(0)))be({},ph);else if(n)e==="]"&&(n=!1);else if(e==="/"){r=!0;break}else e==="["&&(n=!0);return r||be({},ph),i=t.substr(1,t.length-2),{value:i,literal:t}}function FC(){var e,t,n;for(t="",n="";U<wt&&(e=K[U],!!Af(e.charCodeAt(0)));)++U,e==="\\"&&U<wt?be({},lt,gt):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&be({},dh,n),{value:n,literal:t}}function RC(){var e,t,n,r;return Ie=null,Km(),e=U,t=DC(),n=FC(),r=BC(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:U}}function PC(e){return e.type===Ci||e.type===Tr||e.type===wf||e.type===vf}function t1(){if(Km(),U>=wt)return{type:rs,start:U,end:U};const e=K.charCodeAt(U);return ls(e)?CC():e===40||e===41||e===59?bh():e===39||e===34?kC():e===46?nr(K.charCodeAt(U+1))?e1():bh():nr(e)?e1():bh()}function Mt(){const e=Ie;return U=e.end,Ie=t1(),U=e.end,e}function n1(){const e=U;Ie=t1(),U=e}function MC(e){const t=new yn(iC);return t.elements=e,t}function r1(e,t,n){const r=new yn(e==="||"||e==="&&"?fC:oC);return r.operator=e,r.left=t,r.right=n,r}function LC(e,t){const n=new yn(aC);return n.callee=e,n.arguments=t,n}function NC(e,t,n){const r=new yn(sC);return r.test=e,r.consequent=t,r.alternate=n,r}function yh(e){const t=new yn(Xm);return t.name=e,t}function fs(e){const t=new yn(lC);return t.value=e.value,t.raw=K.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function i1(e,t,n){const r=new yn(uC);return r.computed=e==="[",r.object=t,r.property=n,r.computed||(n.member=!0),r}function OC(e){const t=new yn(cC);return t.properties=e,t}function o1(e,t,n){const r=new yn(hC);return r.key=t,r.value=n,r.kind=e,r}function zC(e,t){const n=new yn(dC);return n.operator=e,n.argument=t,n.prefix=!0,n}function be(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(o,a)=>(xf(a<r.length,"Message reference must be in range"),r[a]));throw n=new Error(i),n.index=U,n.description=i,n}function Ef(e){e.type===rs&&be(e,yC),e.type===Ii&&be(e,pC),e.type===is&&be(e,gC),e.type===Ci&&be(e,mC),e.type===Tr&&be(e,bC),be(e,lt,e.value)}function vt(e){const t=Mt();(t.type!==Pt||t.value!==e)&&Ef(t)}function ze(e){return Ie.type===Pt&&Ie.value===e}function wh(e){return Ie.type===Tr&&Ie.value===e}function UC(){const e=[];for(U=Ie.start,vt("[");!ze("]");)ze(",")?(Mt(),e.push(null)):(e.push(Ti()),ze("]")||vt(","));return Mt(),MC(e)}function a1(){U=Ie.start;const e=Mt();return e.type===is||e.type===Ii?(e.octal&&be(e,$m),fs(e)):yh(e.value)}function GC(){var e,t,n,r;if(U=Ie.start,e=Ie,e.type===Ci)return n=a1(),vt(":"),r=Ti(),o1("init",n,r);if(e.type===rs||e.type===Pt)Ef(e);else return t=a1(),vt(":"),r=Ti(),o1("init",t,r)}function HC(){var e=[],t,n,r,i={},o=String;for(U=Ie.start,vt("{");!ze("}");)t=GC(),t.key.type===Xm?n=t.key.name:n=o(t.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(i,r)?be({},wC):i[r]=!0,e.push(t),ze("}")||vt(",");return vt("}"),OC(e)}function VC(){vt("(");const e=vh();return vt(")"),e}const jC={if:1};function qC(){var e,t,n;if(ze("("))return VC();if(ze("["))return UC();if(ze("{"))return HC();if(e=Ie.type,U=Ie.start,e===Ci||jC[Ie.value])n=yh(Mt().value);else if(e===is||e===Ii)Ie.octal&&be(Ie,$m),n=fs(Mt());else{if(e===Tr)throw new Error(os);e===wf?(t=Mt(),t.value=t.value==="true",n=fs(t)):e===vf?(t=Mt(),t.value=null,n=fs(t)):ze("/")||ze("/=")?(n=fs(RC()),n1()):Ef(Mt())}return n}function ZC(){const e=[];if(vt("("),!ze(")"))for(;U<wt&&(e.push(Ti()),!ze(")"));)vt(",");return vt(")"),e}function WC(){U=Ie.start;const e=Mt();return PC(e)||Ef(e),yh(e.value)}function YC(){return vt("."),WC()}function QC(){vt("[");const e=vh();return vt("]"),e}function XC(){var e,t,n;for(e=qC();;)if(ze("."))n=YC(),e=i1(".",e,n);else if(ze("("))t=ZC(),e=LC(e,t);else if(ze("["))n=QC(),e=i1("[",e,n);else break;return e}function s1(){const e=XC();if(Ie.type===Pt&&(ze("++")||ze("--")))throw new Error(os);return e}function _f(){var e,t;if(Ie.type!==Pt&&Ie.type!==Tr)t=s1();else{if(ze("++")||ze("--"))throw new Error(os);if(ze("+")||ze("-")||ze("~")||ze("!"))e=Mt(),t=_f(),t=zC(e.value,t);else{if(wh("delete")||wh("void")||wh("typeof"))throw new Error(os);t=s1()}}return t}function l1(e){let t=0;if(e.type!==Pt&&e.type!==Tr)return 0;switch(e.value){case"||":t=1;break;case"&&":t=2;break;case"|":t=3;break;case"^":t=4;break;case"&":t=5;break;case"==":case"!=":case"===":case"!==":t=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function $C(){var e,t,n,r,i,o,a,s,f,l;if(e=Ie,f=_f(),r=Ie,i=l1(r),i===0)return f;for(r.prec=i,Mt(),t=[e,Ie],a=_f(),o=[f,r,a];(i=l1(Ie))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,f=o.pop(),t.pop(),n=r1(s,f,a),o.push(n);r=Mt(),r.prec=i,o.push(r),t.push(Ie),n=_f(),o.push(n)}for(l=o.length-1,n=o[l],t.pop();l>1;)t.pop(),n=r1(o[l-1].value,o[l-2],n),l-=2;return n}function Ti(){var e,t,n;return e=$C(),ze("?")&&(Mt(),t=Ti(),vt(":"),n=Ti(),e=NC(e,t,n)),e}function vh(){const e=Ti();if(ze(","))throw new Error(os);return e}function KC(e){K=e,U=0,wt=K.length,Ie=null,n1();const t=vh();if(Ie.type!==rs)throw new Error("Unexpect token after expression.");return t}var JC={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function e6(e){function t(a,s,f,l){let u=e(s[0]);return f&&(u=f+"("+u+")",f.lastIndexOf("new ",0)===0&&(u="("+u+")")),u+"."+a+(l<0?"":l===0?"()":"("+s.slice(1).map(e).join(",")+")")}function n(a,s,f){return l=>t(a,l,s,f)}const r="new Date",i="String",o="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(a){a.length<3&&Ye("Missing arguments to clamp function."),a.length>3&&Ye("Too many arguments to clamp function.");const s=a.map(e);return"Math.max("+s[1]+", Math.min("+s[2]+","+s[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:r,date:n("getDate",r,0),day:n("getDay",r,0),year:n("getFullYear",r,0),month:n("getMonth",r,0),hours:n("getHours",r,0),minutes:n("getMinutes",r,0),seconds:n("getSeconds",r,0),milliseconds:n("getMilliseconds",r,0),time:n("getTime",r,0),timezoneoffset:n("getTimezoneOffset",r,0),utcdate:n("getUTCDate",r,0),utcday:n("getUTCDay",r,0),utcyear:n("getUTCFullYear",r,0),utcmonth:n("getUTCMonth",r,0),utchours:n("getUTCHours",r,0),utcminutes:n("getUTCMinutes",r,0),utcseconds:n("getUTCSeconds",r,0),utcmilliseconds:n("getUTCMilliseconds",r,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",i,0),lower:n("toLowerCase",i,0),substring:n("substring",i),split:n("split",i),trim:n("trim",i,0),regexp:o,test:n("test",o),if:function(a){a.length<3&&Ye("Missing arguments to if function."),a.length>3&&Ye("Too many arguments to if function.");const s=a.map(e);return"("+s[0]+"?"+s[1]+":"+s[2]+")"}}}function t6(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function n6(e){e=e||{};const t=e.allowed?Jl(e.allowed):{},n=e.forbidden?Jl(e.forbidden):{},r=e.constants||JC,i=(e.functions||e6)(c),o=e.globalvar,a=e.fieldvar,s=Dt(o)?o:p=>`${o}["${p}"]`;let f={},l={},u=0;function c(p){if(Qe(p))return p;const b=h[p.type];return b==null&&Ye("Unsupported type: "+p.type),b(p)}const h={Literal:p=>p.raw,Identifier:p=>{const b=p.name;return u>0?b:gi(n,b)?Ye("Illegal identifier: "+b):gi(r,b)?r[b]:gi(t,b)?b:(f[b]=1,s(b))},MemberExpression:p=>{const b=!p.computed,y=c(p.object);b&&(u+=1);const w=c(p.property);return y===a&&(l[t6(w)]=1),b&&(u-=1),y+(b?"."+w:"["+w+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&Ye("Illegal callee type: "+p.callee.type);const b=p.callee.name,y=p.arguments,w=gi(i,b)&&i[b];return w||Ye("Unrecognized function: "+b),Dt(w)?w(y):w+"("+y.map(c).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(c).join(",")+"]",BinaryExpression:p=>"("+c(p.left)+" "+p.operator+" "+c(p.right)+")",UnaryExpression:p=>"("+p.operator+c(p.argument)+")",ConditionalExpression:p=>"("+c(p.test)+"?"+c(p.consequent)+":"+c(p.alternate)+")",LogicalExpression:p=>"("+c(p.left)+p.operator+c(p.right)+")",ObjectExpression:p=>"{"+p.properties.map(c).join(",")+"}",Property:p=>{u+=1;const b=c(p.key);return u-=1,b+":"+c(p.value)}};function d(p){const b={code:c(p),globals:Object.keys(f),fields:Object.keys(l)};return f={},l={},b}return d.functions=i,d.constants=r,d}function xh(e,t={}){const n=n6({forbidden:[],allowed:["datum"],globalvar:"globalObject",fieldvar:"datum"});try{const r=KC(e),i=n(r),o=Function("datum","globalObject",`"use strict"; return (${i.code});`),a=s=>o(s,t);return a.fields=i.fields,a}catch(r){throw new Error(`Invalid expression: ${e}, ${r.message}`)}}function Pn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function kr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Ah=Symbol("implicit");function Eh(){var e=new mi,t=[],n=[],r=Ah;function i(o){let a=e.get(o);if(a===void 0){if(r!==Ah)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new mi;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Eh(t,n).unknown(r)},Pn.apply(i,arguments),i}function _o(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function us(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Br(){}var ki=.7,So=1/ki,Co="\\s*([+-]?\\d+)\\s*",cs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",r6=/^#([0-9a-f]{3,8})$/,i6=new RegExp(`^rgb\\(${Co},${Co},${Co}\\)$`),o6=new RegExp(`^rgb\\(${Mn},${Mn},${Mn}\\)$`),a6=new RegExp(`^rgba\\(${Co},${Co},${Co},${cs}\\)$`),s6=new RegExp(`^rgba\\(${Mn},${Mn},${Mn},${cs}\\)$`),l6=new RegExp(`^hsl\\(${cs},${Mn},${Mn}\\)$`),f6=new RegExp(`^hsla\\(${cs},${Mn},${Mn},${cs}\\)$`),f1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};_o(Br,Dr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:u1,formatHex:u1,formatHex8:u6,formatHsl:c6,formatRgb:c1,toString:c1});function u1(){return this.rgb().formatHex()}function u6(){return this.rgb().formatHex8()}function c6(){return m1(this).formatHsl()}function c1(){return this.rgb().formatRgb()}function Dr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=r6.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?h1(t):n===3?new ft(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Sf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Sf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=i6.exec(e))?new ft(t[1],t[2],t[3],1):(t=o6.exec(e))?new ft(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=a6.exec(e))?Sf(t[1],t[2],t[3],t[4]):(t=s6.exec(e))?Sf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=l6.exec(e))?g1(t[1],t[2]/100,t[3]/100,1):(t=f6.exec(e))?g1(t[1],t[2]/100,t[3]/100,t[4]):f1.hasOwnProperty(e)?h1(f1[e]):e==="transparent"?new ft(NaN,NaN,NaN,0):null}function h1(e){return new ft(e>>16&255,e>>8&255,e&255,1)}function Sf(e,t,n,r){return r<=0&&(e=t=n=NaN),new ft(e,t,n,r)}function _h(e){return e instanceof Br||(e=Dr(e)),e?(e=e.rgb(),new ft(e.r,e.g,e.b,e.opacity)):new ft}function Cf(e,t,n,r){return arguments.length===1?_h(e):new ft(e,t,n,r??1)}function ft(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}_o(ft,Cf,us(Br,{brighter(e){return e=e==null?So:Math.pow(So,e),new ft(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ki:Math.pow(ki,e),new ft(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ft(Bi(this.r),Bi(this.g),Bi(this.b),If(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:d1,formatHex:d1,formatHex8:h6,formatRgb:p1,toString:p1}));function d1(){return`#${Di(this.r)}${Di(this.g)}${Di(this.b)}`}function h6(){return`#${Di(this.r)}${Di(this.g)}${Di(this.b)}${Di((isNaN(this.opacity)?1:this.opacity)*255)}`}function p1(){const e=If(this.opacity);return`${e===1?"rgb(":"rgba("}${Bi(this.r)}, ${Bi(this.g)}, ${Bi(this.b)}${e===1?")":`, ${e})`}`}function If(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Bi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Di(e){return e=Bi(e),(e<16?"0":"")+e.toString(16)}function g1(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new wn(e,t,n,r)}function m1(e){if(e instanceof wn)return new wn(e.h,e.s,e.l,e.opacity);if(e instanceof Br||(e=Dr(e)),!e)return new wn;if(e instanceof wn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,f=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=f<.5?o+i:2-o-i,a*=60):s=f>0&&f<1?0:a,new wn(a,s,f,e.opacity)}function Sh(e,t,n,r){return arguments.length===1?m1(e):new wn(e,t,n,r??1)}function wn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}_o(wn,Sh,us(Br,{brighter(e){return e=e==null?So:Math.pow(So,e),new wn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ki:Math.pow(ki,e),new wn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ft(Ch(e>=240?e-240:e+120,i,r),Ch(e,i,r),Ch(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new wn(b1(this.h),Tf(this.s),Tf(this.l),If(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=If(this.opacity);return`${e===1?"hsl(":"hsla("}${b1(this.h)}, ${Tf(this.s)*100}%, ${Tf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function b1(e){return e=(e||0)%360,e<0?e+360:e}function Tf(e){return Math.max(0,Math.min(1,e||0))}function Ch(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const y1=Math.PI/180,w1=180/Math.PI,kf=18,v1=.96422,x1=1,A1=.82521,E1=4/29,Io=6/29,_1=3*Io*Io,d6=Io*Io*Io;function S1(e){if(e instanceof Ln)return new Ln(e.l,e.a,e.b,e.opacity);if(e instanceof rr)return C1(e);e instanceof ft||(e=_h(e));var t=Dh(e.r),n=Dh(e.g),r=Dh(e.b),i=Th((.2225045*t+.7168786*n+.0606169*r)/x1),o,a;return t===n&&n===r?o=a=i:(o=Th((.4360747*t+.3850649*n+.1430804*r)/v1),a=Th((.0139322*t+.0971045*n+.7141733*r)/A1)),new Ln(116*i-16,500*(o-i),200*(i-a),e.opacity)}function Ih(e,t,n,r){return arguments.length===1?S1(e):new Ln(e,t,n,r??1)}function Ln(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}_o(Ln,Ih,us(Br,{brighter(e){return new Ln(this.l+kf*(e??1),this.a,this.b,this.opacity)},darker(e){return new Ln(this.l-kf*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=v1*kh(t),e=x1*kh(e),n=A1*kh(n),new ft(Bh(3.1338561*t-1.6168667*e-.4906146*n),Bh(-.9787684*t+1.9161415*e+.033454*n),Bh(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Th(e){return e>d6?Math.pow(e,1/3):e/_1+E1}function kh(e){return e>Io?e*e*e:_1*(e-E1)}function Bh(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Dh(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function p6(e){if(e instanceof rr)return new rr(e.h,e.c,e.l,e.opacity);if(e instanceof Ln||(e=S1(e)),e.a===0&&e.b===0)return new rr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*w1;return new rr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Fh(e,t,n,r){return arguments.length===1?p6(e):new rr(e,t,n,r??1)}function rr(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function C1(e){if(isNaN(e.h))return new Ln(e.l,0,0,e.opacity);var t=e.h*y1;return new Ln(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}_o(rr,Fh,us(Br,{brighter(e){return new rr(this.h,this.c,this.l+kf*(e??1),this.opacity)},darker(e){return new rr(this.h,this.c,this.l-kf*(e??1),this.opacity)},rgb(){return C1(this).rgb()}}));var I1=-.14861,Rh=1.78277,Ph=-.29227,Bf=-.90649,hs=1.97294,T1=hs*Bf,k1=hs*Rh,B1=Rh*Ph-Bf*I1;function g6(e){if(e instanceof Fi)return new Fi(e.h,e.s,e.l,e.opacity);e instanceof ft||(e=_h(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(B1*r+T1*t-k1*n)/(B1+T1-k1),o=r-i,a=(hs*(n-i)-Ph*o)/Bf,s=Math.sqrt(a*a+o*o)/(hs*i*(1-i)),f=s?Math.atan2(a,o)*w1-120:NaN;return new Fi(f<0?f+360:f,s,i,e.opacity)}function Mh(e,t,n,r){return arguments.length===1?g6(e):new Fi(e,t,n,r??1)}function Fi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}_o(Fi,Mh,us(Br,{brighter(e){return e=e==null?So:Math.pow(So,e),new Fi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ki:Math.pow(ki,e),new Fi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*y1,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new ft(255*(t+n*(I1*r+Rh*i)),255*(t+n*(Ph*r+Bf*i)),255*(t+n*(hs*r)),this.opacity)}}));function D1(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function F1(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return D1((n-r/t)*t,a,i,o,s)}}function R1(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return D1((n-r/t)*t,i,o,a,s)}}const Df=e=>()=>e;function P1(e,t){return function(n){return e+n*t}}function m6(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Ff(e,t){var n=t-e;return n?P1(e,n>180||n<-180?n-360*Math.round(n/360):n):Df(isNaN(e)?t:e)}function b6(e){return(e=+e)==1?ut:function(t,n){return n-t?m6(t,n,e):Df(isNaN(t)?n:t)}}function ut(e,t){var n=t-e;return n?P1(e,n):Df(isNaN(e)?t:e)}const Lh=function e(t){var n=b6(t);function r(i,o){var a=n((i=Cf(i)).r,(o=Cf(o)).r),s=n(i.g,o.g),f=n(i.b,o.b),l=ut(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=f(u),i.opacity=l(u),i+""}}return r.gamma=e,r}(1);function M1(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=Cf(t[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=e(r),i=e(i),o=e(o),s.opacity=1,function(f){return s.r=r(f),s.g=i(f),s.b=o(f),s+""}}}var y6=M1(F1),w6=M1(R1);function Nh(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function L1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function v6(e,t){return(L1(t)?Nh:N1)(e,t)}function N1(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Fr(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function O1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function vn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function z1(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Fr(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Oh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zh=new RegExp(Oh.source,"g");function x6(e){return function(){return e}}function A6(e){return function(t){return e(t)+""}}function U1(e,t){var n=Oh.lastIndex=zh.lastIndex=0,r,i,o,a=-1,s=[],f=[];for(e=e+"",t=t+"";(r=Oh.exec(e))&&(i=zh.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,f.push({i:a,x:vn(r,i)})),n=zh.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?f[0]?A6(f[0].x):x6(t):(t=f.length,function(l){for(var u=0,c;u<t;++u)s[(c=f[u]).i]=c.x(l);return s.join("")})}function Fr(e,t){var n=typeof t,r;return t==null||n==="boolean"?Df(t):(n==="number"?vn:n==="string"?(r=Dr(t))?(t=r,Lh):U1:t instanceof Dr?Lh:t instanceof Date?O1:L1(t)?Nh:Array.isArray(t)?N1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?z1:vn)(e,t)}function E6(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function _6(e,t){var n=Ff(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function ds(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var G1=180/Math.PI,Uh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function H1(e,t,n,r,i,o){var a,s,f;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(f=e*n+t*r)&&(n-=e*f,r-=t*f),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,f/=s),e*r<t*n&&(e=-e,t=-t,f=-f,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*G1,skewX:Math.atan(f)*G1,scaleX:a,scaleY:s}}var Rf;function S6(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Uh:H1(t.a,t.b,t.c,t.d,t.e,t.f)}function C6(e){return e==null||(Rf||(Rf=document.createElementNS("http://www.w3.org/2000/svg","g")),Rf.setAttribute("transform",e),!(e=Rf.transform.baseVal.consolidate()))?Uh:(e=e.matrix,H1(e.a,e.b,e.c,e.d,e.e,e.f))}function V1(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,u,c,h,d,p){if(l!==c||u!==h){var b=d.push("translate(",null,t,null,n);p.push({i:b-4,x:vn(l,c)},{i:b-2,x:vn(u,h)})}else(c||h)&&d.push("translate("+c+t+h+n)}function a(l,u,c,h){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),h.push({i:c.push(i(c)+"rotate(",null,r)-2,x:vn(l,u)})):u&&c.push(i(c)+"rotate("+u+r)}function s(l,u,c,h){l!==u?h.push({i:c.push(i(c)+"skewX(",null,r)-2,x:vn(l,u)}):u&&c.push(i(c)+"skewX("+u+r)}function f(l,u,c,h,d,p){if(l!==c||u!==h){var b=d.push(i(d)+"scale(",null,",",null,")");p.push({i:b-4,x:vn(l,c)},{i:b-2,x:vn(u,h)})}else(c!==1||h!==1)&&d.push(i(d)+"scale("+c+","+h+")")}return function(l,u){var c=[],h=[];return l=e(l),u=e(u),o(l.translateX,l.translateY,u.translateX,u.translateY,c,h),a(l.rotate,u.rotate,c,h),s(l.skewX,u.skewX,c,h),f(l.scaleX,l.scaleY,u.scaleX,u.scaleY,c,h),l=u=null,function(d){for(var p=-1,b=h.length,y;++p<b;)c[(y=h[p]).i]=y.x(d);return c.join("")}}}var I6=V1(S6,"px, ","px)","deg)"),T6=V1(C6,", ",")",")"),k6=1e-12;function j1(e){return((e=Math.exp(e))+1/e)/2}function B6(e){return((e=Math.exp(e))-1/e)/2}function D6(e){return((e=Math.exp(2*e))-1)/(e+1)}const F6=function e(t,n,r){function i(o,a){var s=o[0],f=o[1],l=o[2],u=a[0],c=a[1],h=a[2],d=u-s,p=c-f,b=d*d+p*p,y,w;if(b<k6)w=Math.log(h/l)/t,y=function(T){return[s+T*d,f+T*p,l*Math.exp(t*T*w)]};else{var S=Math.sqrt(b),C=(h*h-l*l+r*b)/(2*l*n*S),_=(h*h-l*l-r*b)/(2*h*n*S),k=Math.log(Math.sqrt(C*C+1)-C),B=Math.log(Math.sqrt(_*_+1)-_);w=(B-k)/t,y=function(T){var R=T*w,M=j1(k),j=l/(n*S)*(M*D6(t*R+k)-B6(k));return[s+j*d,f+j*p,l*M/j1(t*R+k)]}}return y.duration=w*1e3*t/Math.SQRT2,y}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,f=s*s;return e(a,s,f)},i}(Math.SQRT2,2,4);function q1(e){return function(t,n){var r=e((t=Sh(t)).h,(n=Sh(n)).h),i=ut(t.s,n.s),o=ut(t.l,n.l),a=ut(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const R6=q1(Ff);var P6=q1(ut);function M6(e,t){var n=ut((e=Ih(e)).l,(t=Ih(t)).l),r=ut(e.a,t.a),i=ut(e.b,t.b),o=ut(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=i(a),e.opacity=o(a),e+""}}function Z1(e){return function(t,n){var r=e((t=Fh(t)).h,(n=Fh(n)).h),i=ut(t.c,n.c),o=ut(t.l,n.l),a=ut(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const L6=Z1(Ff);var N6=Z1(ut);function W1(e){return function t(n){n=+n;function r(i,o){var a=e((i=Mh(i)).h,(o=Mh(o)).h),s=ut(i.s,o.s),f=ut(i.l,o.l),l=ut(i.opacity,o.opacity);return function(u){return i.h=a(u),i.s=s(u),i.l=f(Math.pow(u,n)),i.opacity=l(u),i+""}}return r.gamma=t,r}(1)}const O6=W1(Ff);var z6=W1(ut);function Gh(e,t){t===void 0&&(t=e,e=Fr);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function U6(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}const G6=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Fr,interpolateArray:v6,interpolateBasis:F1,interpolateBasisClosed:R1,interpolateCubehelix:O6,interpolateCubehelixLong:z6,interpolateDate:O1,interpolateDiscrete:E6,interpolateHcl:L6,interpolateHclLong:N6,interpolateHsl:R6,interpolateHslLong:P6,interpolateHue:_6,interpolateLab:M6,interpolateNumber:vn,interpolateNumberArray:Nh,interpolateObject:z1,interpolateRgb:Lh,interpolateRgbBasis:y6,interpolateRgbBasisClosed:w6,interpolateRound:ds,interpolateString:U1,interpolateTransformCss:I6,interpolateTransformSvg:T6,interpolateZoom:F6,piecewise:Gh,quantize:U6},Symbol.toStringTag,{value:"Module"}));function H6(e){return function(){return e}}function Hh(e){return+e}var Y1=[0,1];function Lt(e){return e}function Vh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:H6(isNaN(t)?NaN:.5)}function V6(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function j6(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Vh(i,r),o=n(a,o)):(r=Vh(r,i),o=n(o,a)),function(s){return o(r(s))}}function q6(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Vh(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var f=yo(e,s,1,r)-1;return o[f](i[f](s))}}function ps(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Pf(){var e=Y1,t=Y1,n=Fr,r,i,o,a=Lt,s,f,l;function u(){var h=Math.min(e.length,t.length);return a!==Lt&&(a=V6(e[0],e[h-1])),s=h>2?q6:j6,f=l=null,c}function c(h){return h==null||isNaN(h=+h)?o:(f||(f=s(e.map(r),t,n)))(r(a(h)))}return c.invert=function(h){return a(i((l||(l=s(t,e.map(r),vn)))(h)))},c.domain=function(h){return arguments.length?(e=Array.from(h,Hh),u()):e.slice()},c.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},c.rangeRound=function(h){return t=Array.from(h),n=ds,u()},c.clamp=function(h){return arguments.length?(a=h?!0:Lt,u()):a!==Lt},c.interpolate=function(h){return arguments.length?(n=h,u()):n},c.unknown=function(h){return arguments.length?(o=h,c):o},function(h,d){return r=h,i=d,u()}}function Q1(){return Pf()(Lt,Lt)}function X1(e,t,n,r){var i=bi(e,t,n),o;switch(r=Er(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Jg(i,a))&&(r.precision=o),jc(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=em(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Kg(i))&&(r.precision=o-(r.type==="%")*2);break}}return pt(r)}function Ri(e){var t=e.domain;return e.ticks=function(n){var r=t();return nf(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return X1(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],f,l,u=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);u-- >0;){if(l=jg(a,s,n),l===f)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;f=l}return e},e}function $1(){var e=Q1();return e.copy=function(){return ps(e,$1())},Pn.apply(e,arguments),Ri(e)}function K1(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Hh),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return K1(e).unknown(t)},e=arguments.length?Array.from(e,Hh):[0,1],Ri(n)}function J1(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function eb(e){return Math.log(e)}function tb(e){return Math.exp(e)}function Z6(e){return-Math.log(-e)}function W6(e){return-Math.exp(-e)}function Y6(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Q6(e){return e===10?Y6:e===Math.E?Math.exp:t=>Math.pow(e,t)}function X6(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function nb(e){return(t,n)=>-e(-t,n)}function jh(e){const t=e(eb,tb),n=t.domain;let r=10,i,o;function a(){return i=X6(r),o=Q6(r),n()[0]<0?(i=nb(i),o=nb(o),e(Z6,W6)):e(eb,tb),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const f=n();let l=f[0],u=f[f.length-1];const c=u<l;c&&([l,u]=[u,l]);let h=i(l),d=i(u),p,b;const y=s==null?10:+s;let w=[];if(!(r%1)&&d-h<y){if(h=Math.floor(h),d=Math.ceil(d),l>0){for(;h<=d;++h)for(p=1;p<r;++p)if(b=h<0?p/o(-h):p*o(h),!(b<l)){if(b>u)break;w.push(b)}}else for(;h<=d;++h)for(p=r-1;p>=1;--p)if(b=h>0?p/o(-h):p*o(h),!(b<l)){if(b>u)break;w.push(b)}w.length*2<y&&(w=nf(l,u,y))}else w=nf(h,d,Math.min(d-h,y)).map(o);return c?w.reverse():w},t.tickFormat=(s,f)=>{if(s==null&&(s=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=Er(f)).precision==null&&(f.trim=!0),f=pt(f)),s===1/0)return f;const l=Math.max(1,r*s/t.ticks().length);return u=>{let c=u/o(Math.round(i(u)));return c*r<r-.5&&(c*=r),c<=l?f(u):""}},t.nice=()=>n(J1(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function qh(){const e=jh(Pf()).domain([1,10]);return e.copy=()=>ps(e,qh()).base(e.base()),Pn.apply(e,arguments),e}function rb(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ib(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Zh(e){var t=1,n=e(rb(t),ib(t));return n.constant=function(r){return arguments.length?e(rb(t=+r),ib(t)):t},Ri(n)}function ob(){var e=Zh(Pf());return e.copy=function(){return ps(e,ob()).constant(e.constant())},Pn.apply(e,arguments)}function ab(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $6(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function K6(e){return e<0?-e*e:e*e}function Wh(e){var t=e(Lt,Lt),n=1;function r(){return n===1?e(Lt,Lt):n===.5?e($6,K6):e(ab(n),ab(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ri(t)}function Yh(){var e=Wh(Pf());return e.copy=function(){return ps(e,Yh()).exponent(e.exponent())},Pn.apply(e,arguments),e}function J6(){return Yh.apply(null,arguments).exponent(.5)}function sb(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=qg(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[yo(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Ra),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return sb().domain(e).range(t).unknown(r)},Pn.apply(o,arguments)}function lb(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(f){return f!=null&&f<=f?i[yo(r,f,0,n)]:o}function s(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return a}return a.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,s()):[e,t]},a.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,s()):i.slice()},a.invertExtent=function(f){var l=i.indexOf(f);return l<0?[NaN,NaN]:l<1?[e,r[0]]:l>=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(f){return arguments.length&&(o=f),a},a.thresholds=function(){return r.slice()},a.copy=function(){return lb().domain([e,t]).range(i).unknown(o)},Pn.apply(Ri(a),arguments)}function fb(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[yo(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return fb().domain(e).range(t).unknown(n)},Pn.apply(i,arguments)}function e8(e){return new Date(e)}function t8(e){return e instanceof Date?+e:+new Date(+e)}function Qh(e,t,n,r,i,o,a,s,f,l){var u=Q1(),c=u.invert,h=u.domain,d=l(".%L"),p=l(":%S"),b=l("%I:%M"),y=l("%I %p"),w=l("%a %d"),S=l("%b %d"),C=l("%B"),_=l("%Y");function k(B){return(f(B)<B?d:s(B)<B?p:a(B)<B?b:o(B)<B?y:r(B)<B?i(B)<B?w:S:n(B)<B?C:_)(B)}return u.invert=function(B){return new Date(c(B))},u.domain=function(B){return arguments.length?h(Array.from(B,t8)):h().map(e8)},u.ticks=function(B){var T=h();return e(T[0],T[T.length-1],B??10)},u.tickFormat=function(B,T){return T==null?k:l(T)},u.nice=function(B){var T=h();return(!B||typeof B.range!="function")&&(B=t(T[0],T[T.length-1],B??10)),B?h(J1(T,B)):u},u.copy=function(){return ps(u,Qh(e,t,n,r,i,o,a,s,f,l))},u}function n8(){return Pn.apply(Qh($_,K_,Sr,ff,Ma,wi,$c,Xc,_r,oh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function r8(){return Pn.apply(Qh(Q_,X_,Cr,cf,La,xi,eh,Jc,_r,ah).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Mf(){var e=0,t=1,n,r,i,o,a=Lt,s=!1,f;function l(c){return c==null||isNaN(c=+c)?f:a(i===0?.5:(c=(o(c)-n)*i,s?Math.max(0,Math.min(1,c)):c))}l.domain=function(c){return arguments.length?([e,t]=c,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(c){return arguments.length?(s=!!c,l):s},l.interpolator=function(c){return arguments.length?(a=c,l):a};function u(c){return function(h){var d,p;return arguments.length?([d,p]=h,a=c(d,p),l):[a(0),a(1)]}}return l.range=u(Fr),l.rangeRound=u(ds),l.unknown=function(c){return arguments.length?(f=c,l):f},function(c){return o=c,n=c(e),r=c(t),i=n===r?0:1/(r-n),l}}function Rr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Xh(){var e=Ri(Mf()(Lt));return e.copy=function(){return Rr(e,Xh())},kr.apply(e,arguments)}function ub(){var e=jh(Mf()).domain([1,10]);return e.copy=function(){return Rr(e,ub()).base(e.base())},kr.apply(e,arguments)}function cb(){var e=Zh(Mf());return e.copy=function(){return Rr(e,cb()).constant(e.constant())},kr.apply(e,arguments)}function $h(){var e=Wh(Mf());return e.copy=function(){return Rr(e,$h()).exponent(e.exponent())},kr.apply(e,arguments)}function i8(){return $h.apply(null,arguments).exponent(.5)}function Lf(){var e=0,t=.5,n=1,r=1,i,o,a,s,f,l=Lt,u,c=!1,h;function d(b){return isNaN(b=+b)?h:(b=.5+((b=+u(b))-o)*(r*b<r*o?s:f),l(c?Math.max(0,Math.min(1,b)):b))}d.domain=function(b){return arguments.length?([e,t,n]=b,i=u(e=+e),o=u(t=+t),a=u(n=+n),s=i===o?0:.5/(o-i),f=o===a?0:.5/(a-o),r=o<i?-1:1,d):[e,t,n]},d.clamp=function(b){return arguments.length?(c=!!b,d):c},d.interpolator=function(b){return arguments.length?(l=b,d):l};function p(b){return function(y){var w,S,C;return arguments.length?([w,S,C]=y,l=Gh(b,[w,S,C]),d):[l(0),l(.5),l(1)]}}return d.range=p(Fr),d.rangeRound=p(ds),d.unknown=function(b){return arguments.length?(h=b,d):h},function(b){return u=b,i=b(e),o=b(t),a=b(n),s=i===o?0:.5/(o-i),f=o===a?0:.5/(a-o),r=o<i?-1:1,d}}function hb(){var e=Ri(Lf()(Lt));return e.copy=function(){return Rr(e,hb())},kr.apply(e,arguments)}function db(){var e=jh(Lf()).domain([.1,1,10]);return e.copy=function(){return Rr(e,db()).base(e.base())},kr.apply(e,arguments)}function pb(){var e=Zh(Lf());return e.copy=function(){return Rr(e,pb()).constant(e.constant())},kr.apply(e,arguments)}function Kh(){var e=Wh(Lf());return e.copy=function(){return Rr(e,Kh()).exponent(e.exponent())},kr.apply(e,arguments)}function o8(){return Kh.apply(null,arguments).exponent(.5)}function Jh(e,t,n){const r=e-t+n*2;return e?r>0?r:1:0}const a8="identity",To="linear",Pr="log",gs="pow",ms="sqrt",Nf="symlog",gb="time",mb="utc",Nn="sequential",ko="diverging",ed="quantile",bb="quantize",yb="threshold",td="ordinal",nd="point",wb="band",rd="bin-ordinal",rt="continuous",bs="discrete",ys="discretizing",tn="interpolating",vb="temporal";function s8(e){return function(t){let n=t[0],r=t[1],i;return r<n&&(i=n,n=r,r=i),[e.invert(n),e.invert(r)]}}function l8(e){return function(t){const n=e.range();let r=t[0],i=t[1],o=-1,a,s,f,l;for(i<r&&(s=r,r=i,i=s),f=0,l=n.length;f<l;++f)n[f]>=r&&n[f]<=i&&(o<0&&(o=f),a=f);if(!(o<0))return r=e.invertExtent(n[o]),i=e.invertExtent(n[a]),[r[0]===void 0?r[1]:r[0],i[1]===void 0?i[0]:i[1]]}}function id(){const e=Eh().unknown(void 0),t=e.domain,n=e.range;let r=[0,1],i,o,a=!1,s=0,f=0,l=.5;delete e.unknown;function u(){const c=t().length,h=r[1]<r[0],d=r[1-h],p=Jh(c,s,f);let b=r[h-0];i=(d-b)/(p||1),a&&(i=Math.floor(i)),b+=(d-b-i*(c-s))*l,o=i*(1-s),a&&(b=Math.round(b),o=Math.round(o));const y=Pa(c).map(w=>b+i*w);return n(h?y.reverse():y)}return e.domain=function(c){return arguments.length?(t(c),u()):t()},e.range=function(c){return arguments.length?(r=[+c[0],+c[1]],u()):r.slice()},e.rangeRound=function(c){return r=[+c[0],+c[1]],a=!0,u()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(c){return arguments.length?(a=!!c,u()):a},e.padding=function(c){return arguments.length?(f=Math.max(0,Math.min(1,c)),s=f,u()):s},e.paddingInner=function(c){return arguments.length?(s=Math.max(0,Math.min(1,c)),u()):s},e.paddingOuter=function(c){return arguments.length?(f=Math.max(0,Math.min(1,c)),u()):f},e.align=function(c){return arguments.length?(l=Math.max(0,Math.min(1,c)),u()):l},e.invertRange=function(c){if(c[0]==null||c[1]==null)return;const h=r[1]<r[0],d=h?n().reverse():n(),p=d.length-1;let b=+c[0],y=+c[1],w,S,C;if(!(b!==b||y!==y)&&(y<b&&(C=b,b=y,y=C),!(y<d[0]||b>r[1-h])))return w=Math.max(0,Oc(d,b)-1),S=b===y?w:Oc(d,y)-1,b-d[w]>o+1e-10&&++w,h&&(C=w,w=p-S,S=p-C),w>S?void 0:t().slice(w,S+1)},e.invert=function(c){const h=e.invertRange([c,c]);return h&&h[0]},e.copy=function(){return id().domain(t()).range(r).round(a).paddingInner(s).paddingOuter(f).align(l)},u()}function xb(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return xb(t())},e}function f8(){return xb(id().paddingInner(1))}var u8=Array.prototype.map;function c8(e){return u8.call(e,Da)}const h8=Array.prototype.slice;function Ab(){let e=[],t=[];function n(r){return r==null||r!==r?void 0:t[(yo(e,r)-1)%t.length]}return n.domain=function(r){return arguments.length?(e=c8(r),n):e.slice()},n.range=function(r){return arguments.length?(t=h8.call(r),n):t.slice()},n.tickFormat=function(r,i){return X1(e[0],bn(e),r??10,i)},n.copy=function(){return Ab().domain(n.domain()).range(n.range())},n}const Of={};function d8(e,t,n){const r=function(){const o=t();return o.invertRange||(o.invertRange=o.invert?s8(o):o.invertExtent?l8(o):void 0),o.type=e,o};return r.metadata=Jl(Rc(n)),r}function Ae(e,t,n){return arguments.length>1?(Of[e]=d8(e,t,n),this):p8(e)?Of[e]:void 0}Ae(a8,K1),Ae(To,$1,rt),Ae(Pr,qh,[rt,Pr]),Ae(gs,Yh,rt),Ae(ms,J6,rt),Ae(Nf,ob,rt),Ae(gb,n8,[rt,vb]),Ae(mb,r8,[rt,vb]),Ae(Nn,Xh,[rt,tn]),Ae("".concat(Nn,"-").concat(To),Xh,[rt,tn]),Ae("".concat(Nn,"-").concat(Pr),ub,[rt,tn,Pr]),Ae("".concat(Nn,"-").concat(gs),$h,[rt,tn]),Ae("".concat(Nn,"-").concat(ms),i8,[rt,tn]),Ae("".concat(Nn,"-").concat(Nf),cb,[rt,tn]),Ae("".concat(ko,"-").concat(To),hb,[rt,tn]),Ae("".concat(ko,"-").concat(Pr),db,[rt,tn,Pr]),Ae("".concat(ko,"-").concat(gs),Kh,[rt,tn]),Ae("".concat(ko,"-").concat(ms),o8,[rt,tn]),Ae("".concat(ko,"-").concat(Nf),pb,[rt,tn]),Ae(ed,sb,[ys,ed]),Ae(bb,lb,ys),Ae(yb,fb,ys),Ae(rd,Ab,[bs,ys]),Ae(td,Eh,bs),Ae(wb,id,bs),Ae(nd,f8,bs);function p8(e){return gi(Of,e)}function ws(e,t){const n=Of[e];return n&&n.metadata[t]}function xt(e){return ws(e,rt)}function Mr(e){return ws(e,bs)}function Bo(e){return ws(e,ys)}function Eb(e){return ws(e,Pr)}function zf(e){return ws(e,tn)}function g8(e,t){const n=t[0],r=bn(t)-n;return function(i){return e(n+i*r)}}function Uf(e,t,n){return Gh(_b(t||"rgb",n),e)}function m8(e,t){const n=new Array(t),r=t+1;for(let i=0;i<t;)n[i]=e(++i/r);return n}function _b(e,t){const n=G6[b8(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function b8(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const y8={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},w8={category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"};function Sb(e){const t=e.length/6|0,n=new Array(t);for(let r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}function Cb(e,t){for(const n in e)od(n,t(e[n]))}const Ib={};Cb(w8,Sb),Cb(y8,e=>Uf(Sb(e)));function od(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(Ib[e]=t,this):Ib[e]}function v8(){let e=0;const t=new Map,n=r=>{let i=t.get(r);return i===void 0&&(i=e++,t.set(r,i)),i};return n.addAll=r=>{for(const i of r)n(i)},n.invert=r=>{for(const i of t.entries())if(i[1]==r)return i[0]},n.domain=()=>[...t.keys()],n}function Gf(){const e=t=>t;return e.invert=t=>t,e.copy=Gf,e.invertRange=()=>{},e.type="null",e}function x8(e,t){const n={};t||(t=e.encoding);for(const[r,i]of Object.entries(t)){if(!i)continue;const o=((Nt(i)&&i.resolutionChannel)??(Li(r)&&r))||void 0,a=e.unitView.getScaleResolution(o);n[r]=A8(t[r],a==null?void 0:a.getScale(),e.unitView.getAccessor(r),r)}return n}function A8(e,t,n,r){let i;if(xn(e)){const o=e.value;i=a=>o,i.constant=!0,i.constantValue=!0,i.accessor=void 0}else if(n)if(r=="text")i=o=>{},i.accessor=n,i.constant=n.constant;else{if(!t)if(!Li(r))t=Gf();else throw new Error(`Missing scale! "${r}": ${JSON.stringify(e)}`);if(i=o=>t(n(o)),Mr(t.type)){const o=v8();o.addAll(t.domain()),i.indexer=o}i.constant=n.constant,i.accessor=n,i.scale=t}else throw new Error(`Missing value or accessor (field, expr, datum) on channel "${r}": ${JSON.stringify(e)}`);return i.invert=t?o=>t.invert(o):o=>{throw new Error("No scale available, cannot invert: "+JSON.stringify(e))},i.channelDef=e,i.applyMetadata=o=>{for(const a in i)a in i&&(o[a]=i[a]);return o},i}function xn(e){return e&&"value"in e}function vs(e){return e&&"field"in e}function xs(e){return e&&"datum"in e}function Nt(e){return vs(e)||xs(e)||sd(e)||Tb(e)}function ad(e,t){const n=e.mark.encoding[t];if(Nt(n))return n;throw new Error("Not a channel def with scale!")}function Tb(e){return e&&"chrom"in e}function sd(e){return e&&"expr"in e}const Do=["x","y"],E8=["x2","y2"],_8=[...Do,...E8];function kb(e){return Do.includes(e)}function As(e){return _8.includes(e)}const ld={x:"x2",y:"y2"},Bb=Object.fromEntries(Object.entries(ld).map(e=>[e[1],e[0]]));function Es(e){return e in Bb}function S8(e){const t=ld[e];if(t)return t;throw new Error(`${e} has no secondary channel!`)}function Pi(e){return Bb[e]??e}function Mi(e){return["color","fill","stroke"].includes(Pi(e))}function Hf(e){return["shape","squeeze"].includes(e)}function Li(e){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(e)}function C8(e){switch(e){case"shape":return["circle","square","cross","diamond","triangle-up","triangle-right","triangle-down","triangle-left","tick-up","tick-right","tick-down","tick-left"]}}function Db(e){if(!Hf(e))throw new Error("Not a discrete channel: "+e);const t=new Map(C8(e).map((n,r)=>[n,r]));return n=>{const r=t.get(n);if(r!==void 0)return r;throw new Error(`Invalid value for "${e}" channel: ${n}`)}}function Re(e,t=e){if(/^[A-Za-z0-9_]+$/.test(e)){const n=new Function("datum",`return datum[${JSON.stringify(e)}]`);return Ce(n,[e],t)}else return Zl(e)}class I8{constructor(){this.accessorCreators=[],this.register(t=>{if(vs(t))try{const n=Re(t.field);return n.constant=!1,n.fields=ql(n),n}catch(n){throw new Error(`Invalid field definition: ${n.message}`)}}),this.register(t=>sd(t)?T8(t.expr):void 0),this.register(t=>{if(xs(t)){const r=i_(t.datum);return r.constant=!0,r.fields=[],r}})}register(t){this.accessorCreators.push(t)}createAccessor(t){for(const n of this.accessorCreators){const r=n(t);if(r)return r}}}function T8(e){const t=xh(e);return t.constant=t.fields.length==0,t}/* @license twgl.js 4.22.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
|
|
123
|
+
}`;function tC(e,t){var n=e.getBoundingClientRect();return[t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop]}function Cf(e,t){return e.length==t.length&&e.every((n,r)=>e[r]===t[r])}function Yt(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function ss(e){return e[e.length-1]}class nC{constructor(t){this.container=t,this.element=document.createElement("div"),this.element.className="tooltip",this._visible=!0,this.container.appendChild(this.element),this._previousTooltipDatum=void 0,this.enabledStack=[!0],this._penaltyUntil=0,this._lastCoords=void 0,this._previousMove=0,this.clear()}set visible(t){t!=this._visible&&(this.element.style.display=t?null:"none",this._visible=t)}get visible(){return this._visible}get enabled(){return ss(this.enabledStack)??!0}pushEnabledState(t){this.enabledStack.push(t),t||(this.visible=!1)}popEnabledState(){this.enabledStack.pop()}handleMouseMove(t){this.mouseCoords=tC(this.container,t);const n=performance.now();!this.visible&&!this._isPenalty()&&n-this._previousMove>500&&(this._penaltyUntil=n+70),this._lastCoords&&rC(this.mouseCoords,this._lastCoords)>20&&(this._penaltyUntil=n+400),this._lastCoords=this.mouseCoords,this.visible&&this.updatePlacement(),this._previousMove=n}updatePlacement(){const[n,r]=this.mouseCoords;let i=n+20;i>this.container.clientWidth-this.element.offsetWidth&&(i=n-20-this.element.offsetWidth),this.element.style.left=i+"px",this.element.style.top=Math.min(r+20,this.container.clientHeight-this.element.offsetHeight)+"px"}setContent(t){if(!t||!this.enabled||this._isPenalty()){this.visible&&(s1("",this.element),this.visible=!1),this._previousTooltipDatum=void 0;return}s1(t,this.element),this.visible=!0,this.updatePlacement()}clear(){this._previousTooltipDatum=void 0,this.setContent(void 0)}updateWithDatum(t,n){t!==this._previousTooltipDatum&&(this._previousTooltipDatum=t,n||(n=r=>Promise.resolve(Dn` ${JSON.stringify(r)} `)),n(t).then(r=>this.setContent(r)).catch(r=>{if(r!=="debounced")throw r}))}_isPenalty(){return this._penaltyUntil&&this._penaltyUntil>performance.now()}}function rC(e,t){let n=0;for(let r=0;r<e.length;r++)n+=(e[r]-t[r])**2;return Math.sqrt(n)}const iC="RawCode",oC="Literal",aC="Property",sC="Identifier",lC="ArrayExpression",fC="BinaryExpression",uC="CallExpression",cC="ConditionalExpression",hC="LogicalExpression",dC="MemberExpression",pC="ObjectExpression",gC="UnaryExpression";function bn(e){this.type=e}bn.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=mC(this),n=0,r=t.length;n<r;++n)if(t[n].visit(e))return 1};function mC(e){switch(e.type){case lC:return e.elements;case fC:case hC:return[e.left,e.right];case uC:return[e.callee].concat(e.arguments);case cC:return[e.test,e.consequent,e.alternate];case dC:return[e.object,e.property];case pC:return e.properties;case aC:return[e.key,e.value];case gC:return[e.argument];case sC:case oC:case iC:default:return[]}}var Rn,K,U,wt,ke,kf=1,ls=2,Si=3,kr=4,If=5,Ci=6,Nt=7,fs=8,bC=9;Rn={},Rn[kf]="Boolean",Rn[ls]="<end>",Rn[Si]="Identifier",Rn[kr]="Keyword",Rn[If]="Null",Rn[Ci]="Numeric",Rn[Nt]="Punctuator",Rn[fs]="String",Rn[bC]="RegularExpression";var yC="ArrayExpression",wC="BinaryExpression",vC="CallExpression",xC="ConditionalExpression",l1="Identifier",AC="Literal",EC="LogicalExpression",_C="MemberExpression",SC="ObjectExpression",CC="Property",kC="UnaryExpression",lt="Unexpected token %0",IC="Unexpected number",TC="Unexpected string",BC="Unexpected identifier",DC="Unexpected reserved word",RC="Unexpected end of input",Ah="Invalid regular expression",Eh="Invalid regular expression: missing /",f1="Octal literals are not allowed in strict mode.",FC="Duplicate data property in object literal not allowed in strict mode",gt="ILLEGAL",us="Disabled.",MC=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),PC=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\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\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function Tf(e,t){if(!e)throw new Error("ASSERT: "+t)}function tr(e){return e>=48&&e<=57}function _h(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function cs(e){return"01234567".indexOf(e)>=0}function LC(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function hs(e){return e===10||e===13||e===8232||e===8233}function ds(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&MC.test(String.fromCharCode(e))}function Bf(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&PC.test(String.fromCharCode(e))}const NC={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function u1(){for(;U<wt;){const e=K.charCodeAt(U);if(LC(e)||hs(e))++U;else break}}function Sh(e){var t,n,r,i=0;for(n=e==="u"?4:2,t=0;t<n;++t)U<wt&&_h(K[U])?(r=K[U++],i=i*16+"0123456789abcdef".indexOf(r.toLowerCase())):be({},lt,gt);return String.fromCharCode(i)}function OC(){var e,t,n,r;for(e=K[U],t=0,e==="}"&&be({},lt,gt);U<wt&&(e=K[U++],!!_h(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&be({},lt,gt),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function c1(){var e,t;for(e=K.charCodeAt(U++),t=String.fromCharCode(e),e===92&&(K.charCodeAt(U)!==117&&be({},lt,gt),++U,e=Sh("u"),(!e||e==="\\"||!ds(e.charCodeAt(0)))&&be({},lt,gt),t=e);U<wt&&(e=K.charCodeAt(U),!!Bf(e));)++U,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),K.charCodeAt(U)!==117&&be({},lt,gt),++U,e=Sh("u"),(!e||e==="\\"||!Bf(e.charCodeAt(0)))&&be({},lt,gt),t+=e);return t}function zC(){var e,t;for(e=U++;U<wt;){if(t=K.charCodeAt(U),t===92)return U=e,c1();if(Bf(t))++U;else break}return K.slice(e,U)}function UC(){var e,t,n;return e=U,t=K.charCodeAt(U)===92?c1():zC(),t.length===1?n=Si:NC.hasOwnProperty(t)?n=kr:t==="null"?n=If:t==="true"||t==="false"?n=kf:n=Si,{type:n,value:t,start:e,end:U}}function Ch(){var e=U,t=K.charCodeAt(U),n,r=K[U],i,o,a;switch(t){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++U,{type:Nt,value:String.fromCharCode(t),start:e,end:U};default:if(n=K.charCodeAt(U+1),n===61)switch(t){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return U+=2,{type:Nt,value:String.fromCharCode(t)+String.fromCharCode(n),start:e,end:U};case 33:case 61:return U+=2,K.charCodeAt(U)===61&&++U,{type:Nt,value:K.slice(e,U),start:e,end:U}}}if(a=K.substr(U,4),a===">>>=")return U+=4,{type:Nt,value:a,start:e,end:U};if(o=a.substr(0,3),o===">>>"||o==="<<="||o===">>=")return U+=3,{type:Nt,value:o,start:e,end:U};if(i=o.substr(0,2),r===i[1]&&"+-<>&|".indexOf(r)>=0||i==="=>")return U+=2,{type:Nt,value:i,start:e,end:U};if(i==="//"&&be({},lt,gt),"<>=!+-*%&|^/".indexOf(r)>=0)return++U,{type:Nt,value:r,start:e,end:U};be({},lt,gt)}function GC(e){let t="";for(;U<wt&&_h(K[U]);)t+=K[U++];return t.length===0&&be({},lt,gt),ds(K.charCodeAt(U))&&be({},lt,gt),{type:Ci,value:parseInt("0x"+t,16),start:e,end:U}}function HC(e){let t="0"+K[U++];for(;U<wt&&cs(K[U]);)t+=K[U++];return(ds(K.charCodeAt(U))||tr(K.charCodeAt(U)))&&be({},lt,gt),{type:Ci,value:parseInt(t,8),octal:!0,start:e,end:U}}function h1(){var e,t,n;if(n=K[U],Tf(tr(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=U,e="",n!=="."){if(e=K[U++],n=K[U],e==="0"){if(n==="x"||n==="X")return++U,GC(t);if(cs(n))return HC(t);n&&tr(n.charCodeAt(0))&&be({},lt,gt)}for(;tr(K.charCodeAt(U));)e+=K[U++];n=K[U]}if(n==="."){for(e+=K[U++];tr(K.charCodeAt(U));)e+=K[U++];n=K[U]}if(n==="e"||n==="E")if(e+=K[U++],n=K[U],(n==="+"||n==="-")&&(e+=K[U++]),tr(K.charCodeAt(U)))for(;tr(K.charCodeAt(U));)e+=K[U++];else be({},lt,gt);return ds(K.charCodeAt(U))&&be({},lt,gt),{type:Ci,value:parseFloat(e),start:t,end:U}}function VC(){var e="",t,n,r,i,o=!1;for(t=K[U],Tf(t==="'"||t==='"',"String literal must starts with a quote"),n=U,++U;U<wt;)if(r=K[U++],r===t){t="";break}else if(r==="\\")if(r=K[U++],!r||!hs(r.charCodeAt(0)))switch(r){case"u":case"x":K[U]==="{"?(++U,e+=OC()):e+=Sh(r);break;case"n":e+=`
|
|
124
|
+
`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:cs(r)?(i="01234567".indexOf(r),i!==0&&(o=!0),U<wt&&cs(K[U])&&(o=!0,i=i*8+"01234567".indexOf(K[U++]),"0123".indexOf(r)>=0&&U<wt&&cs(K[U])&&(i=i*8+"01234567".indexOf(K[U++]))),e+=String.fromCharCode(i)):e+=r;break}else r==="\r"&&K[U]===`
|
|
125
|
+
`&&++U;else{if(hs(r.charCodeAt(0)))break;e+=r}return t!==""&&be({},lt,gt),{type:fs,value:e,octal:o,start:n,end:U}}function jC(e,t){let n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(r,i)=>{if(parseInt(i,16)<=1114111)return"x";be({},Ah)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{be({},Ah)}try{return new RegExp(e,t)}catch{return null}}function qC(){var e,t,n,r,i;for(e=K[U],Tf(e==="/","Regular expression literal must start with a slash"),t=K[U++],n=!1,r=!1;U<wt;)if(e=K[U++],t+=e,e==="\\")e=K[U++],hs(e.charCodeAt(0))&&be({},Eh),t+=e;else if(hs(e.charCodeAt(0)))be({},Eh);else if(n)e==="]"&&(n=!1);else if(e==="/"){r=!0;break}else e==="["&&(n=!0);return r||be({},Eh),i=t.substr(1,t.length-2),{value:i,literal:t}}function ZC(){var e,t,n;for(t="",n="";U<wt&&(e=K[U],!!Bf(e.charCodeAt(0)));)++U,e==="\\"&&U<wt?be({},lt,gt):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&be({},Ah,n),{value:n,literal:t}}function WC(){var e,t,n,r;return ke=null,u1(),e=U,t=qC(),n=ZC(),r=jC(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:U}}function YC(e){return e.type===Si||e.type===kr||e.type===kf||e.type===If}function d1(){if(u1(),U>=wt)return{type:ls,start:U,end:U};const e=K.charCodeAt(U);return ds(e)?UC():e===40||e===41||e===59?Ch():e===39||e===34?VC():e===46?tr(K.charCodeAt(U+1))?h1():Ch():tr(e)?h1():Ch()}function Ot(){const e=ke;return U=e.end,ke=d1(),U=e.end,e}function p1(){const e=U;ke=d1(),U=e}function QC(e){const t=new bn(yC);return t.elements=e,t}function g1(e,t,n){const r=new bn(e==="||"||e==="&&"?EC:wC);return r.operator=e,r.left=t,r.right=n,r}function XC(e,t){const n=new bn(vC);return n.callee=e,n.arguments=t,n}function $C(e,t,n){const r=new bn(xC);return r.test=e,r.consequent=t,r.alternate=n,r}function kh(e){const t=new bn(l1);return t.name=e,t}function ps(e){const t=new bn(AC);return t.value=e.value,t.raw=K.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function m1(e,t,n){const r=new bn(_C);return r.computed=e==="[",r.object=t,r.property=n,r.computed||(n.member=!0),r}function KC(e){const t=new bn(SC);return t.properties=e,t}function b1(e,t,n){const r=new bn(CC);return r.key=t,r.value=n,r.kind=e,r}function JC(e,t){const n=new bn(kC);return n.operator=e,n.argument=t,n.prefix=!0,n}function be(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(o,a)=>(Tf(a<r.length,"Message reference must be in range"),r[a]));throw n=new Error(i),n.index=U,n.description=i,n}function Df(e){e.type===ls&&be(e,RC),e.type===Ci&&be(e,IC),e.type===fs&&be(e,TC),e.type===Si&&be(e,BC),e.type===kr&&be(e,DC),be(e,lt,e.value)}function vt(e){const t=Ot();(t.type!==Nt||t.value!==e)&&Df(t)}function Ue(e){return ke.type===Nt&&ke.value===e}function Ih(e){return ke.type===kr&&ke.value===e}function e6(){const e=[];for(U=ke.start,vt("[");!Ue("]");)Ue(",")?(Ot(),e.push(null)):(e.push(ki()),Ue("]")||vt(","));return Ot(),QC(e)}function y1(){U=ke.start;const e=Ot();return e.type===fs||e.type===Ci?(e.octal&&be(e,f1),ps(e)):kh(e.value)}function t6(){var e,t,n,r;if(U=ke.start,e=ke,e.type===Si)return n=y1(),vt(":"),r=ki(),b1("init",n,r);if(e.type===ls||e.type===Nt)Df(e);else return t=y1(),vt(":"),r=ki(),b1("init",t,r)}function n6(){var e=[],t,n,r,i={},o=String;for(U=ke.start,vt("{");!Ue("}");)t=t6(),t.key.type===l1?n=t.key.name:n=o(t.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(i,r)?be({},FC):i[r]=!0,e.push(t),Ue("}")||vt(",");return vt("}"),KC(e)}function r6(){vt("(");const e=Th();return vt(")"),e}const i6={if:1};function o6(){var e,t,n;if(Ue("("))return r6();if(Ue("["))return e6();if(Ue("{"))return n6();if(e=ke.type,U=ke.start,e===Si||i6[ke.value])n=kh(Ot().value);else if(e===fs||e===Ci)ke.octal&&be(ke,f1),n=ps(Ot());else{if(e===kr)throw new Error(us);e===kf?(t=Ot(),t.value=t.value==="true",n=ps(t)):e===If?(t=Ot(),t.value=null,n=ps(t)):Ue("/")||Ue("/=")?(n=ps(WC()),p1()):Df(Ot())}return n}function a6(){const e=[];if(vt("("),!Ue(")"))for(;U<wt&&(e.push(ki()),!Ue(")"));)vt(",");return vt(")"),e}function s6(){U=ke.start;const e=Ot();return YC(e)||Df(e),kh(e.value)}function l6(){return vt("."),s6()}function f6(){vt("[");const e=Th();return vt("]"),e}function u6(){var e,t,n;for(e=o6();;)if(Ue("."))n=l6(),e=m1(".",e,n);else if(Ue("("))t=a6(),e=XC(e,t);else if(Ue("["))n=f6(),e=m1("[",e,n);else break;return e}function w1(){const e=u6();if(ke.type===Nt&&(Ue("++")||Ue("--")))throw new Error(us);return e}function Rf(){var e,t;if(ke.type!==Nt&&ke.type!==kr)t=w1();else{if(Ue("++")||Ue("--"))throw new Error(us);if(Ue("+")||Ue("-")||Ue("~")||Ue("!"))e=Ot(),t=Rf(),t=JC(e.value,t);else{if(Ih("delete")||Ih("void")||Ih("typeof"))throw new Error(us);t=w1()}}return t}function v1(e){let t=0;if(e.type!==Nt&&e.type!==kr)return 0;switch(e.value){case"||":t=1;break;case"&&":t=2;break;case"|":t=3;break;case"^":t=4;break;case"&":t=5;break;case"==":case"!=":case"===":case"!==":t=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function c6(){var e,t,n,r,i,o,a,s,f,l;if(e=ke,f=Rf(),r=ke,i=v1(r),i===0)return f;for(r.prec=i,Ot(),t=[e,ke],a=Rf(),o=[f,r,a];(i=v1(ke))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,f=o.pop(),t.pop(),n=g1(s,f,a),o.push(n);r=Ot(),r.prec=i,o.push(r),t.push(ke),n=Rf(),o.push(n)}for(l=o.length-1,n=o[l],t.pop();l>1;)t.pop(),n=g1(o[l-1].value,o[l-2],n),l-=2;return n}function ki(){var e,t,n;return e=c6(),Ue("?")&&(Ot(),t=ki(),vt(":"),n=ki(),e=$C(e,t,n)),e}function Th(){const e=ki();if(Ue(","))throw new Error(us);return e}function h6(e){K=e,U=0,wt=K.length,ke=null,p1();const t=Th();if(ke.type!==ls)throw new Error("Unexpect token after expression.");return t}var d6={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function x1(e){function t(a,s,f,l){let u=e(s[0]);return f&&(u=f+"("+u+")",f.lastIndexOf("new ",0)===0&&(u="("+u+")")),u+"."+a+(l<0?"":l===0?"()":"("+s.slice(1).map(e).join(",")+")")}function n(a,s,f){return l=>t(a,l,s,f)}const r="new Date",i="String",o="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(a){a.length<3&&Qe("Missing arguments to clamp function."),a.length>3&&Qe("Too many arguments to clamp function.");const s=a.map(e);return"Math.max("+s[1]+", Math.min("+s[2]+","+s[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:r,date:n("getDate",r,0),day:n("getDay",r,0),year:n("getFullYear",r,0),month:n("getMonth",r,0),hours:n("getHours",r,0),minutes:n("getMinutes",r,0),seconds:n("getSeconds",r,0),milliseconds:n("getMilliseconds",r,0),time:n("getTime",r,0),timezoneoffset:n("getTimezoneOffset",r,0),utcdate:n("getUTCDate",r,0),utcday:n("getUTCDay",r,0),utcyear:n("getUTCFullYear",r,0),utcmonth:n("getUTCMonth",r,0),utchours:n("getUTCHours",r,0),utcminutes:n("getUTCMinutes",r,0),utcseconds:n("getUTCSeconds",r,0),utcmilliseconds:n("getUTCMilliseconds",r,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",i,0),lower:n("toLowerCase",i,0),substring:n("substring",i),split:n("split",i),trim:n("trim",i,0),regexp:o,test:n("test",o),if:function(a){a.length<3&&Qe("Missing arguments to if function."),a.length>3&&Qe("Too many arguments to if function.");const s=a.map(e);return"("+s[0]+"?"+s[1]+":"+s[2]+")"}}}function p6(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function g6(e){e=e||{};const t=e.allowed?lf(e.allowed):{},n=e.forbidden?lf(e.forbidden):{},r=e.constants||d6,i=(e.functions||x1)(c),o=e.globalvar,a=e.fieldvar,s=Pt(o)?o:p=>`${o}["${p}"]`;let f={},l={},u=0;function c(p){if(Pe(p))return p;const b=h[p.type];return b==null&&Qe("Unsupported type: "+p.type),b(p)}const h={Literal:p=>p.raw,Identifier:p=>{const b=p.name;return u>0?b:pi(n,b)?Qe("Illegal identifier: "+b):pi(r,b)?r[b]:pi(t,b)?b:(f[b]=1,s(b))},MemberExpression:p=>{const b=!p.computed,y=c(p.object);b&&(u+=1);const w=c(p.property);return y===a&&(l[p6(w)]=1),b&&(u-=1),y+(b?"."+w:"["+w+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&Qe("Illegal callee type: "+p.callee.type);const b=p.callee.name,y=p.arguments,w=pi(i,b)&&i[b];return w||Qe("Unrecognized function: "+b),Pt(w)?w(y):w+"("+y.map(c).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(c).join(",")+"]",BinaryExpression:p=>"("+c(p.left)+" "+p.operator+" "+c(p.right)+")",UnaryExpression:p=>"("+p.operator+c(p.argument)+")",ConditionalExpression:p=>"("+c(p.test)+"?"+c(p.consequent)+":"+c(p.alternate)+")",LogicalExpression:p=>"("+c(p.left)+p.operator+c(p.right)+")",ObjectExpression:p=>"{"+p.properties.map(c).join(",")+"}",Property:p=>{u+=1;const b=c(p.key);return u-=1,b+":"+c(p.value)}};function d(p){const b={code:c(p),globals:Object.keys(f),fields:Object.keys(l)};return f={},l={},b}return d.functions=i,d.constants=r,d}function A1(e,t,n){return n=(n-e)/(t-e),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function gs(e,t=0,n=1){return Math.max(t,Math.min(n,e))}function m6(e,t,n){return gs((n-e)/(t-e),0,1)}const E1={clamp:gs,isArray:Ft,isBoolean:La,isDefined(e){return e!==void 0},isNumber:kt,isObject:Mt,isRegExp:A_,isString:Pe,isValid(e){return e!=null&&e===e},lerp:qg,linearstep:m6,smoothstep:A1};function b6(e){const t=x1(e);for(const n in E1)t[n]=`this.${n}`;return t}const y6=g6({forbidden:[],allowed:["datum"],globalvar:"globalObject",fieldvar:"datum",functions:b6});function Ff(e,t={}){try{const n=h6(e),r=y6(n),i=Function("datum","globalObject",`"use strict"; return (${r.code});`).bind(E1),o=a=>i(a,t);return o.fields=r.fields,o.globals=r.globals,o.code=r.code,o}catch(n){throw new Error(`Invalid expression: ${e}, ${n.message}`)}}function Fn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ir(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Bh=Symbol("implicit");function Dh(){var e=new gi,t=[],n=[],r=Bh;function i(o){let a=e.get(o);if(a===void 0){if(r!==Bh)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new gi;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Dh(t,n).unknown(r)},Fn.apply(i,arguments),i}function ko(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ms(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Tr(){}var Ii=.7,Io=1/Ii,To="\\s*([+-]?\\d+)\\s*",bs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",w6=/^#([0-9a-f]{3,8})$/,v6=new RegExp(`^rgb\\(${To},${To},${To}\\)$`),x6=new RegExp(`^rgb\\(${Mn},${Mn},${Mn}\\)$`),A6=new RegExp(`^rgba\\(${To},${To},${To},${bs}\\)$`),E6=new RegExp(`^rgba\\(${Mn},${Mn},${Mn},${bs}\\)$`),_6=new RegExp(`^hsl\\(${bs},${Mn},${Mn}\\)$`),S6=new RegExp(`^hsla\\(${bs},${Mn},${Mn},${bs}\\)$`),_1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ko(Tr,Br,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:S1,formatHex:S1,formatHex8:C6,formatHsl:k6,formatRgb:C1,toString:C1});function S1(){return this.rgb().formatHex()}function C6(){return this.rgb().formatHex8()}function k6(){return D1(this).formatHsl()}function C1(){return this.rgb().formatRgb()}function Br(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=w6.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?k1(t):n===3?new ft(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Mf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Mf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=v6.exec(e))?new ft(t[1],t[2],t[3],1):(t=x6.exec(e))?new ft(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=A6.exec(e))?Mf(t[1],t[2],t[3],t[4]):(t=E6.exec(e))?Mf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_6.exec(e))?B1(t[1],t[2]/100,t[3]/100,1):(t=S6.exec(e))?B1(t[1],t[2]/100,t[3]/100,t[4]):_1.hasOwnProperty(e)?k1(_1[e]):e==="transparent"?new ft(NaN,NaN,NaN,0):null}function k1(e){return new ft(e>>16&255,e>>8&255,e&255,1)}function Mf(e,t,n,r){return r<=0&&(e=t=n=NaN),new ft(e,t,n,r)}function Rh(e){return e instanceof Tr||(e=Br(e)),e?(e=e.rgb(),new ft(e.r,e.g,e.b,e.opacity)):new ft}function Pf(e,t,n,r){return arguments.length===1?Rh(e):new ft(e,t,n,r??1)}function ft(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ko(ft,Pf,ms(Tr,{brighter(e){return e=e==null?Io:Math.pow(Io,e),new ft(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ii:Math.pow(Ii,e),new ft(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ft(Ti(this.r),Ti(this.g),Ti(this.b),Lf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:I1,formatHex:I1,formatHex8:I6,formatRgb:T1,toString:T1}));function I1(){return`#${Bi(this.r)}${Bi(this.g)}${Bi(this.b)}`}function I6(){return`#${Bi(this.r)}${Bi(this.g)}${Bi(this.b)}${Bi((isNaN(this.opacity)?1:this.opacity)*255)}`}function T1(){const e=Lf(this.opacity);return`${e===1?"rgb(":"rgba("}${Ti(this.r)}, ${Ti(this.g)}, ${Ti(this.b)}${e===1?")":`, ${e})`}`}function Lf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ti(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Bi(e){return e=Ti(e),(e<16?"0":"")+e.toString(16)}function B1(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new yn(e,t,n,r)}function D1(e){if(e instanceof yn)return new yn(e.h,e.s,e.l,e.opacity);if(e instanceof Tr||(e=Br(e)),!e)return new yn;if(e instanceof yn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,f=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=f<.5?o+i:2-o-i,a*=60):s=f>0&&f<1?0:a,new yn(a,s,f,e.opacity)}function Fh(e,t,n,r){return arguments.length===1?D1(e):new yn(e,t,n,r??1)}function yn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ko(yn,Fh,ms(Tr,{brighter(e){return e=e==null?Io:Math.pow(Io,e),new yn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ii:Math.pow(Ii,e),new yn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ft(Mh(e>=240?e-240:e+120,i,r),Mh(e,i,r),Mh(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new yn(R1(this.h),Nf(this.s),Nf(this.l),Lf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Lf(this.opacity);return`${e===1?"hsl(":"hsla("}${R1(this.h)}, ${Nf(this.s)*100}%, ${Nf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function R1(e){return e=(e||0)%360,e<0?e+360:e}function Nf(e){return Math.max(0,Math.min(1,e||0))}function Mh(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const F1=Math.PI/180,M1=180/Math.PI,Of=18,P1=.96422,L1=1,N1=.82521,O1=4/29,Bo=6/29,z1=3*Bo*Bo,T6=Bo*Bo*Bo;function U1(e){if(e instanceof Pn)return new Pn(e.l,e.a,e.b,e.opacity);if(e instanceof nr)return G1(e);e instanceof ft||(e=Rh(e));var t=zh(e.r),n=zh(e.g),r=zh(e.b),i=Lh((.2225045*t+.7168786*n+.0606169*r)/L1),o,a;return t===n&&n===r?o=a=i:(o=Lh((.4360747*t+.3850649*n+.1430804*r)/P1),a=Lh((.0139322*t+.0971045*n+.7141733*r)/N1)),new Pn(116*i-16,500*(o-i),200*(i-a),e.opacity)}function Ph(e,t,n,r){return arguments.length===1?U1(e):new Pn(e,t,n,r??1)}function Pn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ko(Pn,Ph,ms(Tr,{brighter(e){return new Pn(this.l+Of*(e??1),this.a,this.b,this.opacity)},darker(e){return new Pn(this.l-Of*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=P1*Nh(t),e=L1*Nh(e),n=N1*Nh(n),new ft(Oh(3.1338561*t-1.6168667*e-.4906146*n),Oh(-.9787684*t+1.9161415*e+.033454*n),Oh(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Lh(e){return e>T6?Math.pow(e,1/3):e/z1+O1}function Nh(e){return e>Bo?e*e*e:z1*(e-O1)}function Oh(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function zh(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function B6(e){if(e instanceof nr)return new nr(e.h,e.c,e.l,e.opacity);if(e instanceof Pn||(e=U1(e)),e.a===0&&e.b===0)return new nr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*M1;return new nr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Uh(e,t,n,r){return arguments.length===1?B6(e):new nr(e,t,n,r??1)}function nr(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function G1(e){if(isNaN(e.h))return new Pn(e.l,0,0,e.opacity);var t=e.h*F1;return new Pn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ko(nr,Uh,ms(Tr,{brighter(e){return new nr(this.h,this.c,this.l+Of*(e??1),this.opacity)},darker(e){return new nr(this.h,this.c,this.l-Of*(e??1),this.opacity)},rgb(){return G1(this).rgb()}}));var H1=-.14861,Gh=1.78277,Hh=-.29227,zf=-.90649,ys=1.97294,V1=ys*zf,j1=ys*Gh,q1=Gh*Hh-zf*H1;function D6(e){if(e instanceof Di)return new Di(e.h,e.s,e.l,e.opacity);e instanceof ft||(e=Rh(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(q1*r+V1*t-j1*n)/(q1+V1-j1),o=r-i,a=(ys*(n-i)-Hh*o)/zf,s=Math.sqrt(a*a+o*o)/(ys*i*(1-i)),f=s?Math.atan2(a,o)*M1-120:NaN;return new Di(f<0?f+360:f,s,i,e.opacity)}function Vh(e,t,n,r){return arguments.length===1?D6(e):new Di(e,t,n,r??1)}function Di(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ko(Di,Vh,ms(Tr,{brighter(e){return e=e==null?Io:Math.pow(Io,e),new Di(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ii:Math.pow(Ii,e),new Di(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*F1,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new ft(255*(t+n*(H1*r+Gh*i)),255*(t+n*(Hh*r+zf*i)),255*(t+n*(ys*r)),this.opacity)}}));function Z1(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function W1(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return Z1((n-r/t)*t,a,i,o,s)}}function Y1(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return Z1((n-r/t)*t,i,o,a,s)}}const Uf=e=>()=>e;function Q1(e,t){return function(n){return e+n*t}}function R6(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Gf(e,t){var n=t-e;return n?Q1(e,n>180||n<-180?n-360*Math.round(n/360):n):Uf(isNaN(e)?t:e)}function F6(e){return(e=+e)==1?ut:function(t,n){return n-t?R6(t,n,e):Uf(isNaN(t)?n:t)}}function ut(e,t){var n=t-e;return n?Q1(e,n):Uf(isNaN(e)?t:e)}const jh=function e(t){var n=F6(t);function r(i,o){var a=n((i=Pf(i)).r,(o=Pf(o)).r),s=n(i.g,o.g),f=n(i.b,o.b),l=ut(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=f(u),i.opacity=l(u),i+""}}return r.gamma=e,r}(1);function X1(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=Pf(t[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=e(r),i=e(i),o=e(o),s.opacity=1,function(f){return s.r=r(f),s.g=i(f),s.b=o(f),s+""}}}var M6=X1(W1),P6=X1(Y1);function qh(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function $1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function L6(e,t){return($1(t)?qh:K1)(e,t)}function K1(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Dr(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function J1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function wn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function eb(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Dr(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Zh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wh=new RegExp(Zh.source,"g");function N6(e){return function(){return e}}function O6(e){return function(t){return e(t)+""}}function tb(e,t){var n=Zh.lastIndex=Wh.lastIndex=0,r,i,o,a=-1,s=[],f=[];for(e=e+"",t=t+"";(r=Zh.exec(e))&&(i=Wh.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,f.push({i:a,x:wn(r,i)})),n=Wh.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?f[0]?O6(f[0].x):N6(t):(t=f.length,function(l){for(var u=0,c;u<t;++u)s[(c=f[u]).i]=c.x(l);return s.join("")})}function Dr(e,t){var n=typeof t,r;return t==null||n==="boolean"?Uf(t):(n==="number"?wn:n==="string"?(r=Br(t))?(t=r,jh):tb:t instanceof Br?jh:t instanceof Date?J1:$1(t)?qh:Array.isArray(t)?K1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?eb:wn)(e,t)}function z6(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function U6(e,t){var n=Gf(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function ws(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var nb=180/Math.PI,Yh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function rb(e,t,n,r,i,o){var a,s,f;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(f=e*n+t*r)&&(n-=e*f,r-=t*f),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,f/=s),e*r<t*n&&(e=-e,t=-t,f=-f,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*nb,skewX:Math.atan(f)*nb,scaleX:a,scaleY:s}}var Hf;function G6(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Yh:rb(t.a,t.b,t.c,t.d,t.e,t.f)}function H6(e){return e==null||(Hf||(Hf=document.createElementNS("http://www.w3.org/2000/svg","g")),Hf.setAttribute("transform",e),!(e=Hf.transform.baseVal.consolidate()))?Yh:(e=e.matrix,rb(e.a,e.b,e.c,e.d,e.e,e.f))}function ib(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,u,c,h,d,p){if(l!==c||u!==h){var b=d.push("translate(",null,t,null,n);p.push({i:b-4,x:wn(l,c)},{i:b-2,x:wn(u,h)})}else(c||h)&&d.push("translate("+c+t+h+n)}function a(l,u,c,h){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),h.push({i:c.push(i(c)+"rotate(",null,r)-2,x:wn(l,u)})):u&&c.push(i(c)+"rotate("+u+r)}function s(l,u,c,h){l!==u?h.push({i:c.push(i(c)+"skewX(",null,r)-2,x:wn(l,u)}):u&&c.push(i(c)+"skewX("+u+r)}function f(l,u,c,h,d,p){if(l!==c||u!==h){var b=d.push(i(d)+"scale(",null,",",null,")");p.push({i:b-4,x:wn(l,c)},{i:b-2,x:wn(u,h)})}else(c!==1||h!==1)&&d.push(i(d)+"scale("+c+","+h+")")}return function(l,u){var c=[],h=[];return l=e(l),u=e(u),o(l.translateX,l.translateY,u.translateX,u.translateY,c,h),a(l.rotate,u.rotate,c,h),s(l.skewX,u.skewX,c,h),f(l.scaleX,l.scaleY,u.scaleX,u.scaleY,c,h),l=u=null,function(d){for(var p=-1,b=h.length,y;++p<b;)c[(y=h[p]).i]=y.x(d);return c.join("")}}}var V6=ib(G6,"px, ","px)","deg)"),j6=ib(H6,", ",")",")"),q6=1e-12;function ob(e){return((e=Math.exp(e))+1/e)/2}function Z6(e){return((e=Math.exp(e))-1/e)/2}function W6(e){return((e=Math.exp(2*e))-1)/(e+1)}const Y6=function e(t,n,r){function i(o,a){var s=o[0],f=o[1],l=o[2],u=a[0],c=a[1],h=a[2],d=u-s,p=c-f,b=d*d+p*p,y,w;if(b<q6)w=Math.log(h/l)/t,y=function(I){return[s+I*d,f+I*p,l*Math.exp(t*I*w)]};else{var _=Math.sqrt(b),C=(h*h-l*l+r*b)/(2*l*n*_),S=(h*h-l*l-r*b)/(2*h*n*_),T=Math.log(Math.sqrt(C*C+1)-C),B=Math.log(Math.sqrt(S*S+1)-S);w=(B-T)/t,y=function(I){var F=I*w,P=ob(T),j=l/(n*_)*(P*W6(t*F+T)-Z6(T));return[s+j*d,f+j*p,l*P/ob(t*F+T)]}}return y.duration=w*1e3*t/Math.SQRT2,y}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,f=s*s;return e(a,s,f)},i}(Math.SQRT2,2,4);function ab(e){return function(t,n){var r=e((t=Fh(t)).h,(n=Fh(n)).h),i=ut(t.s,n.s),o=ut(t.l,n.l),a=ut(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const Q6=ab(Gf);var X6=ab(ut);function $6(e,t){var n=ut((e=Ph(e)).l,(t=Ph(t)).l),r=ut(e.a,t.a),i=ut(e.b,t.b),o=ut(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=i(a),e.opacity=o(a),e+""}}function sb(e){return function(t,n){var r=e((t=Uh(t)).h,(n=Uh(n)).h),i=ut(t.c,n.c),o=ut(t.l,n.l),a=ut(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const K6=sb(Gf);var J6=sb(ut);function lb(e){return function t(n){n=+n;function r(i,o){var a=e((i=Vh(i)).h,(o=Vh(o)).h),s=ut(i.s,o.s),f=ut(i.l,o.l),l=ut(i.opacity,o.opacity);return function(u){return i.h=a(u),i.s=s(u),i.l=f(Math.pow(u,n)),i.opacity=l(u),i+""}}return r.gamma=t,r}(1)}const e8=lb(Gf);var t8=lb(ut);function Qh(e,t){t===void 0&&(t=e,e=Dr);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function n8(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}const r8=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Dr,interpolateArray:L6,interpolateBasis:W1,interpolateBasisClosed:Y1,interpolateCubehelix:e8,interpolateCubehelixLong:t8,interpolateDate:J1,interpolateDiscrete:z6,interpolateHcl:K6,interpolateHclLong:J6,interpolateHsl:Q6,interpolateHslLong:X6,interpolateHue:U6,interpolateLab:$6,interpolateNumber:wn,interpolateNumberArray:qh,interpolateObject:eb,interpolateRgb:jh,interpolateRgbBasis:M6,interpolateRgbBasisClosed:P6,interpolateRound:ws,interpolateString:tb,interpolateTransformCss:V6,interpolateTransformSvg:j6,interpolateZoom:Y6,piecewise:Qh,quantize:n8},Symbol.toStringTag,{value:"Module"}));function i8(e){return function(){return e}}function Xh(e){return+e}var fb=[0,1];function zt(e){return e}function $h(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:i8(isNaN(t)?NaN:.5)}function o8(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function a8(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=$h(i,r),o=n(a,o)):(r=$h(r,i),o=n(o,a)),function(s){return o(r(s))}}function s8(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=$h(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var f=xo(e,s,1,r)-1;return o[f](i[f](s))}}function vs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Vf(){var e=fb,t=fb,n=Dr,r,i,o,a=zt,s,f,l;function u(){var h=Math.min(e.length,t.length);return a!==zt&&(a=o8(e[0],e[h-1])),s=h>2?s8:a8,f=l=null,c}function c(h){return h==null||isNaN(h=+h)?o:(f||(f=s(e.map(r),t,n)))(r(a(h)))}return c.invert=function(h){return a(i((l||(l=s(t,e.map(r),wn)))(h)))},c.domain=function(h){return arguments.length?(e=Array.from(h,Xh),u()):e.slice()},c.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},c.rangeRound=function(h){return t=Array.from(h),n=ws,u()},c.clamp=function(h){return arguments.length?(a=h?!0:zt,u()):a!==zt},c.interpolate=function(h){return arguments.length?(n=h,u()):n},c.unknown=function(h){return arguments.length?(o=h,c):o},function(h,d){return r=h,i=d,u()}}function ub(){return Vf()(zt,zt)}function cb(e,t,n,r){var i=mi(e,t,n),o;switch(r=Ar(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=cm(i,a))&&(r.precision=o),Jc(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=hm(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=um(i))&&(r.precision=o-(r.type==="%")*2);break}}return pt(r)}function Ri(e){var t=e.domain;return e.ticks=function(n){var r=t();return cf(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return cb(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],f,l,u=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);u-- >0;){if(l=nm(a,s,n),l===f)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;f=l}return e},e}function hb(){var e=ub();return e.copy=function(){return vs(e,hb())},Fn.apply(e,arguments),Ri(e)}function db(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Xh),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return db(e).unknown(t)},e=arguments.length?Array.from(e,Xh):[0,1],Ri(n)}function pb(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function gb(e){return Math.log(e)}function mb(e){return Math.exp(e)}function l8(e){return-Math.log(-e)}function f8(e){return-Math.exp(-e)}function u8(e){return isFinite(e)?+("1e"+e):e<0?0:e}function c8(e){return e===10?u8:e===Math.E?Math.exp:t=>Math.pow(e,t)}function h8(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function bb(e){return(t,n)=>-e(-t,n)}function Kh(e){const t=e(gb,mb),n=t.domain;let r=10,i,o;function a(){return i=h8(r),o=c8(r),n()[0]<0?(i=bb(i),o=bb(o),e(l8,f8)):e(gb,mb),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const f=n();let l=f[0],u=f[f.length-1];const c=u<l;c&&([l,u]=[u,l]);let h=i(l),d=i(u),p,b;const y=s==null?10:+s;let w=[];if(!(r%1)&&d-h<y){if(h=Math.floor(h),d=Math.ceil(d),l>0){for(;h<=d;++h)for(p=1;p<r;++p)if(b=h<0?p/o(-h):p*o(h),!(b<l)){if(b>u)break;w.push(b)}}else for(;h<=d;++h)for(p=r-1;p>=1;--p)if(b=h>0?p/o(-h):p*o(h),!(b<l)){if(b>u)break;w.push(b)}w.length*2<y&&(w=cf(l,u,y))}else w=cf(h,d,Math.min(d-h,y)).map(o);return c?w.reverse():w},t.tickFormat=(s,f)=>{if(s==null&&(s=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=Ar(f)).precision==null&&(f.trim=!0),f=pt(f)),s===1/0)return f;const l=Math.max(1,r*s/t.ticks().length);return u=>{let c=u/o(Math.round(i(u)));return c*r<r-.5&&(c*=r),c<=l?f(u):""}},t.nice=()=>n(pb(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function Jh(){const e=Kh(Vf()).domain([1,10]);return e.copy=()=>vs(e,Jh()).base(e.base()),Fn.apply(e,arguments),e}function yb(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function wb(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ed(e){var t=1,n=e(yb(t),wb(t));return n.constant=function(r){return arguments.length?e(yb(t=+r),wb(t)):t},Ri(n)}function vb(){var e=ed(Vf());return e.copy=function(){return vs(e,vb()).constant(e.constant())},Fn.apply(e,arguments)}function xb(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function d8(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function p8(e){return e<0?-e*e:e*e}function td(e){var t=e(zt,zt),n=1;function r(){return n===1?e(zt,zt):n===.5?e(d8,p8):e(xb(n),xb(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ri(t)}function nd(){var e=td(Vf());return e.copy=function(){return vs(e,nd()).exponent(e.exponent())},Fn.apply(e,arguments),e}function g8(){return nd.apply(null,arguments).exponent(.5)}function Ab(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=rm(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[xo(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Oa),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Ab().domain(e).range(t).unknown(r)},Fn.apply(o,arguments)}function Eb(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(f){return f!=null&&f<=f?i[xo(r,f,0,n)]:o}function s(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return a}return a.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,s()):[e,t]},a.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,s()):i.slice()},a.invertExtent=function(f){var l=i.indexOf(f);return l<0?[NaN,NaN]:l<1?[e,r[0]]:l>=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(f){return arguments.length&&(o=f),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Eb().domain([e,t]).range(i).unknown(o)},Fn.apply(Ri(a),arguments)}function _b(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[xo(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return _b().domain(e).range(t).unknown(n)},Fn.apply(i,arguments)}function m8(e){return new Date(e)}function b8(e){return e instanceof Date?+e:+new Date(+e)}function rd(e,t,n,r,i,o,a,s,f,l){var u=ub(),c=u.invert,h=u.domain,d=l(".%L"),p=l(":%S"),b=l("%I:%M"),y=l("%I %p"),w=l("%a %d"),_=l("%b %d"),C=l("%B"),S=l("%Y");function T(B){return(f(B)<B?d:s(B)<B?p:a(B)<B?b:o(B)<B?y:r(B)<B?i(B)<B?w:_:n(B)<B?C:S)(B)}return u.invert=function(B){return new Date(c(B))},u.domain=function(B){return arguments.length?h(Array.from(B,b8)):h().map(m8)},u.ticks=function(B){var I=h();return e(I[0],I[I.length-1],B??10)},u.tickFormat=function(B,I){return I==null?T:l(I)},u.nice=function(B){var I=h();return(!B||typeof B.range!="function")&&(B=t(I[0],I[I.length-1],B??10)),B?h(pb(I,B)):u},u.copy=function(){return vs(u,rd(e,t,n,r,i,o,a,s,f,l))},u}function y8(){return Fn.apply(rd(c4,h4,_r,bf,Ua,yi,ah,oh,Er,ph).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function w8(){return Fn.apply(rd(f4,u4,Sr,wf,Ga,vi,fh,lh,Er,gh).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function jf(){var e=0,t=1,n,r,i,o,a=zt,s=!1,f;function l(c){return c==null||isNaN(c=+c)?f:a(i===0?.5:(c=(o(c)-n)*i,s?Math.max(0,Math.min(1,c)):c))}l.domain=function(c){return arguments.length?([e,t]=c,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(c){return arguments.length?(s=!!c,l):s},l.interpolator=function(c){return arguments.length?(a=c,l):a};function u(c){return function(h){var d,p;return arguments.length?([d,p]=h,a=c(d,p),l):[a(0),a(1)]}}return l.range=u(Dr),l.rangeRound=u(ws),l.unknown=function(c){return arguments.length?(f=c,l):f},function(c){return o=c,n=c(e),r=c(t),i=n===r?0:1/(r-n),l}}function Rr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function id(){var e=Ri(jf()(zt));return e.copy=function(){return Rr(e,id())},Ir.apply(e,arguments)}function Sb(){var e=Kh(jf()).domain([1,10]);return e.copy=function(){return Rr(e,Sb()).base(e.base())},Ir.apply(e,arguments)}function Cb(){var e=ed(jf());return e.copy=function(){return Rr(e,Cb()).constant(e.constant())},Ir.apply(e,arguments)}function od(){var e=td(jf());return e.copy=function(){return Rr(e,od()).exponent(e.exponent())},Ir.apply(e,arguments)}function v8(){return od.apply(null,arguments).exponent(.5)}function qf(){var e=0,t=.5,n=1,r=1,i,o,a,s,f,l=zt,u,c=!1,h;function d(b){return isNaN(b=+b)?h:(b=.5+((b=+u(b))-o)*(r*b<r*o?s:f),l(c?Math.max(0,Math.min(1,b)):b))}d.domain=function(b){return arguments.length?([e,t,n]=b,i=u(e=+e),o=u(t=+t),a=u(n=+n),s=i===o?0:.5/(o-i),f=o===a?0:.5/(a-o),r=o<i?-1:1,d):[e,t,n]},d.clamp=function(b){return arguments.length?(c=!!b,d):c},d.interpolator=function(b){return arguments.length?(l=b,d):l};function p(b){return function(y){var w,_,C;return arguments.length?([w,_,C]=y,l=Qh(b,[w,_,C]),d):[l(0),l(.5),l(1)]}}return d.range=p(Dr),d.rangeRound=p(ws),d.unknown=function(b){return arguments.length?(h=b,d):h},function(b){return u=b,i=b(e),o=b(t),a=b(n),s=i===o?0:.5/(o-i),f=o===a?0:.5/(a-o),r=o<i?-1:1,d}}function kb(){var e=Ri(qf()(zt));return e.copy=function(){return Rr(e,kb())},Ir.apply(e,arguments)}function Ib(){var e=Kh(qf()).domain([.1,1,10]);return e.copy=function(){return Rr(e,Ib()).base(e.base())},Ir.apply(e,arguments)}function Tb(){var e=ed(qf());return e.copy=function(){return Rr(e,Tb()).constant(e.constant())},Ir.apply(e,arguments)}function ad(){var e=td(qf());return e.copy=function(){return Rr(e,ad()).exponent(e.exponent())},Ir.apply(e,arguments)}function x8(){return ad.apply(null,arguments).exponent(.5)}function sd(e,t,n){const r=e-t+n*2;return e?r>0?r:1:0}const A8="identity",Do="linear",Fr="log",xs="pow",As="sqrt",Zf="symlog",Bb="time",Db="utc",Ln="sequential",Ro="diverging",ld="quantile",Rb="quantize",Fb="threshold",fd="ordinal",ud="point",Mb="band",cd="bin-ordinal",rt="continuous",Es="discrete",_s="discretizing",tn="interpolating",Pb="temporal";function E8(e){return function(t){let n=t[0],r=t[1],i;return r<n&&(i=n,n=r,r=i),[e.invert(n),e.invert(r)]}}function _8(e){return function(t){const n=e.range();let r=t[0],i=t[1],o=-1,a,s,f,l;for(i<r&&(s=r,r=i,i=s),f=0,l=n.length;f<l;++f)n[f]>=r&&n[f]<=i&&(o<0&&(o=f),a=f);if(!(o<0))return r=e.invertExtent(n[o]),i=e.invertExtent(n[a]),[r[0]===void 0?r[1]:r[0],i[1]===void 0?i[0]:i[1]]}}function hd(){const e=Dh().unknown(void 0),t=e.domain,n=e.range;let r=[0,1],i,o,a=!1,s=0,f=0,l=.5;delete e.unknown;function u(){const c=t().length,h=r[1]<r[0],d=r[1-h],p=sd(c,s,f);let b=r[h-0];i=(d-b)/(p||1),a&&(i=Math.floor(i)),b+=(d-b-i*(c-s))*l,o=i*(1-s),a&&(b=Math.round(b),o=Math.round(o));const y=za(c).map(w=>b+i*w);return n(h?y.reverse():y)}return e.domain=function(c){return arguments.length?(t(c),u()):t()},e.range=function(c){return arguments.length?(r=[+c[0],+c[1]],u()):r.slice()},e.rangeRound=function(c){return r=[+c[0],+c[1]],a=!0,u()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(c){return arguments.length?(a=!!c,u()):a},e.padding=function(c){return arguments.length?(f=Math.max(0,Math.min(1,c)),s=f,u()):s},e.paddingInner=function(c){return arguments.length?(s=Math.max(0,Math.min(1,c)),u()):s},e.paddingOuter=function(c){return arguments.length?(f=Math.max(0,Math.min(1,c)),u()):f},e.align=function(c){return arguments.length?(l=Math.max(0,Math.min(1,c)),u()):l},e.invertRange=function(c){if(c[0]==null||c[1]==null)return;const h=r[1]<r[0],d=h?n().reverse():n(),p=d.length-1;let b=+c[0],y=+c[1],w,_,C;if(!(b!==b||y!==y)&&(y<b&&(C=b,b=y,y=C),!(y<d[0]||b>r[1-h])))return w=Math.max(0,Wc(d,b)-1),_=b===y?w:Wc(d,y)-1,b-d[w]>o+1e-10&&++w,h&&(C=w,w=p-_,_=p-C),w>_?void 0:t().slice(w,_+1)},e.invert=function(c){const h=e.invertRange([c,c]);return h&&h[0]},e.copy=function(){return hd().domain(t()).range(r).round(a).paddingInner(s).paddingOuter(f).align(l)},u()}function Lb(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return Lb(t())},e}function S8(){return Lb(hd().paddingInner(1))}var C8=Array.prototype.map;function k8(e){return C8.call(e,Pa)}const I8=Array.prototype.slice;function Nb(){let e=[],t=[];function n(r){return r==null||r!==r?void 0:t[(xo(e,r)-1)%t.length]}return n.domain=function(r){return arguments.length?(e=k8(r),n):e.slice()},n.range=function(r){return arguments.length?(t=I8.call(r),n):t.slice()},n.tickFormat=function(r,i){return cb(e[0],mn(e),r??10,i)},n.copy=function(){return Nb().domain(n.domain()).range(n.range())},n}const Wf={};function T8(e,t,n){const r=function(){const o=t();return o.invertRange||(o.invertRange=o.invert?E8(o):o.invertExtent?_8(o):void 0),o.type=e,o};return r.metadata=lf(Hc(n)),r}function Ae(e,t,n){return arguments.length>1?(Wf[e]=T8(e,t,n),this):B8(e)?Wf[e]:void 0}Ae(A8,db),Ae(Do,hb,rt),Ae(Fr,Jh,[rt,Fr]),Ae(xs,nd,rt),Ae(As,g8,rt),Ae(Zf,vb,rt),Ae(Bb,y8,[rt,Pb]),Ae(Db,w8,[rt,Pb]),Ae(Ln,id,[rt,tn]),Ae("".concat(Ln,"-").concat(Do),id,[rt,tn]),Ae("".concat(Ln,"-").concat(Fr),Sb,[rt,tn,Fr]),Ae("".concat(Ln,"-").concat(xs),od,[rt,tn]),Ae("".concat(Ln,"-").concat(As),v8,[rt,tn]),Ae("".concat(Ln,"-").concat(Zf),Cb,[rt,tn]),Ae("".concat(Ro,"-").concat(Do),kb,[rt,tn]),Ae("".concat(Ro,"-").concat(Fr),Ib,[rt,tn,Fr]),Ae("".concat(Ro,"-").concat(xs),ad,[rt,tn]),Ae("".concat(Ro,"-").concat(As),x8,[rt,tn]),Ae("".concat(Ro,"-").concat(Zf),Tb,[rt,tn]),Ae(ld,Ab,[_s,ld]),Ae(Rb,Eb,_s),Ae(Fb,_b,_s),Ae(cd,Nb,[Es,_s]),Ae(fd,Dh,Es),Ae(Mb,hd,Es),Ae(ud,S8,Es);function B8(e){return pi(Wf,e)}function Ss(e,t){const n=Wf[e];return n&&n.metadata[t]}function xt(e){return Ss(e,rt)}function Mr(e){return Ss(e,Es)}function Fo(e){return Ss(e,_s)}function Ob(e){return Ss(e,Fr)}function Yf(e){return Ss(e,tn)}function D8(e,t){const n=t[0],r=mn(t)-n;return function(i){return e(n+i*r)}}function Qf(e,t,n){return Qh(zb(t||"rgb",n),e)}function R8(e,t){const n=new Array(t),r=t+1;for(let i=0;i<t;)n[i]=e(++i/r);return n}function zb(e,t){const n=r8[F8(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function F8(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const M8={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},P8={category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"};function Ub(e){const t=e.length/6|0,n=new Array(t);for(let r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}function Gb(e,t){for(const n in e)dd(n,t(e[n]))}const Hb={};Gb(P8,Ub),Gb(M8,e=>Qf(Ub(e)));function dd(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(Hb[e]=t,this):Hb[e]}function L8(){let e=0;const t=new Map,n=r=>{let i=t.get(r);return i===void 0&&(i=e++,t.set(r,i)),i};return n.addAll=r=>{for(const i of r)n(i)},n.invert=r=>{for(const i of t.entries())if(i[1]==r)return i[0]},n.domain=()=>[...t.keys()],n}function Xf(){const e=t=>t;return e.invert=t=>t,e.copy=Xf,e.invertRange=()=>{},e.type="null",e}function N8(e,t){const n={};t||(t=e.encoding);for(const[r,i]of Object.entries(t)){if(!i)continue;const o=((Ut(i)&&i.resolutionChannel)??(Pi(r)&&r))||void 0,a=e.unitView.getScaleResolution(o);n[r]=O8(t[r],a==null?void 0:a.getScale(),e.unitView.getAccessor(r),r)}return n}function O8(e,t,n,r){let i;if(vn(e)){const o=e.value;i=a=>o,i.constant=!0,i.constantValue=!0,i.accessor=void 0}else if(n)if(r=="text")i=o=>{},i.accessor=n,i.constant=n.constant;else{if(!t)if(!Pi(r))t=Xf();else throw new Error(`Missing scale! "${r}": ${JSON.stringify(e)}`);if(i=o=>t(n(o)),Mr(t.type)){const o=L8();o.addAll(t.domain()),i.indexer=o}i.constant=n.constant,i.accessor=n,i.scale=t}else throw new Error(`Missing value or accessor (field, expr, datum) on channel "${r}": ${JSON.stringify(e)}`);return i.invert=t?o=>t.invert(o):o=>{throw new Error("No scale available, cannot invert: "+JSON.stringify(e))},i.channelDef=e,i.applyMetadata=o=>{for(const a in i)a in i&&(o[a]=i[a]);return o},i}function vn(e){return e&&"value"in e}function Cs(e){return e&&"field"in e}function ks(e){return e&&"datum"in e}function Ut(e){return Cs(e)||ks(e)||gd(e)||Vb(e)}function pd(e,t){const n=e.mark.encoding[t];if(Ut(n))return n;throw new Error("Not a channel def with scale!")}function Vb(e){return e&&"chrom"in e}function gd(e){return e&&"expr"in e}const Mo=["x","y"],z8=["x2","y2"],U8=[...Mo,...z8];function jb(e){return Mo.includes(e)}function Is(e){return U8.includes(e)}const md={x:"x2",y:"y2"},qb=Object.fromEntries(Object.entries(md).map(e=>[e[1],e[0]]));function Ts(e){return e in qb}function G8(e){const t=md[e];if(t)return t;throw new Error(`${e} has no secondary channel!`)}function Fi(e){return qb[e]??e}function Mi(e){return["color","fill","stroke"].includes(Fi(e))}function $f(e){return["shape","squeeze"].includes(e)}function Pi(e){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(e)}function H8(e){switch(e){case"shape":return["circle","square","cross","diamond","triangle-up","triangle-right","triangle-down","triangle-left","tick-up","tick-right","tick-down","tick-left"]}}function Zb(e){if(!$f(e))throw new Error("Not a discrete channel: "+e);const t=new Map(H8(e).map((n,r)=>[n,r]));return n=>{const r=t.get(n);if(r!==void 0)return r;throw new Error(`Invalid value for "${e}" channel: ${n}`)}}function Fe(e,t=e){if(/^[A-Za-z0-9_]+$/.test(e)){const n=new Function("datum",`return datum[${JSON.stringify(e)}]`);return Ce(n,[e],t)}else return tf(e)}class V8{constructor(){this.accessorCreators=[],this.register(t=>{if(Cs(t))try{const n=Fe(t.field);return n.constant=!1,n.fields=ef(n),n}catch(n){throw new Error(`Invalid field definition: ${n.message}`)}}),this.register(t=>gd(t)?j8(t.expr):void 0),this.register(t=>{if(ks(t)){const r=y_(t.datum);return r.constant=!0,r.fields=[],r}})}register(t){this.accessorCreators.push(t)}createAccessor(t){for(const n of this.accessorCreators){const r=n(t);if(r)return r}}}function j8(e){const n=Ff(e);return n.constant=n.fields.length==0,n}/* @license twgl.js 4.22.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
|
|
126
126
|
Available via the MIT license.
|
|
127
|
-
see: http://github.com/greggman/twgl.js for details */const fd=5120,_s=5121,ud=5122,cd=5123,hd=5124,dd=5125,pd=5126,k8=32819,B8=32820,D8=33635,F8=5131,R8=33640,P8=35899,M8=35902,L8=36269,N8=34042,Fb={};{const e=Fb;e[fd]=Int8Array,e[_s]=Uint8Array,e[ud]=Int16Array,e[cd]=Uint16Array,e[hd]=Int32Array,e[dd]=Uint32Array,e[pd]=Float32Array,e[k8]=Uint16Array,e[B8]=Uint16Array,e[D8]=Uint16Array,e[F8]=Uint16Array,e[R8]=Uint32Array,e[P8]=Uint32Array,e[M8]=Uint32Array,e[L8]=Uint32Array,e[N8]=Uint32Array}function gd(e){if(e instanceof Int8Array)return fd;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)return _s;if(e instanceof Int16Array)return ud;if(e instanceof Uint16Array)return cd;if(e instanceof Int32Array)return hd;if(e instanceof Uint32Array)return dd;if(e instanceof Float32Array)return pd;throw new Error("unsupported typed array type")}function O8(e){if(e===Int8Array)return fd;if(e===Uint8Array||e===Uint8ClampedArray)return _s;if(e===Int16Array)return ud;if(e===Uint16Array)return cd;if(e===Int32Array)return hd;if(e===Uint32Array)return dd;if(e===Float32Array)return pd;throw new Error("unsupported typed array type")}function z8(e){const t=Fb[e];if(!t)throw new Error("unknown gl type");return t}const Vf=typeof SharedArrayBuffer<"u"?function(t){return t&&t.buffer&&(t.buffer instanceof ArrayBuffer||t.buffer instanceof SharedArrayBuffer)}:function(t){return t&&t.buffer&&t.buffer instanceof ArrayBuffer};function U8(...e){console.error(...e)}function Rb(...e){console.warn(...e)}function G8(e,t){return typeof WebGLBuffer<"u"&&t instanceof WebGLBuffer}function Pb(e,t){return typeof WebGLRenderbuffer<"u"&&t instanceof WebGLRenderbuffer}function jf(e,t){return typeof WebGLTexture<"u"&&t instanceof WebGLTexture}function H8(e,t){return typeof WebGLSampler<"u"&&t instanceof WebGLSampler}const Mb=35044,On=34962,V8=34963,j8=34660,q8=5120,Z8=5121,W8=5122,Y8=5123,Q8=5124,X8=5125,$8=5126,Lb={attribPrefix:""};function Nb(e,t,n,r,i){e.bindBuffer(t,n),e.bufferData(t,r,i||Mb)}function Ob(e,t,n,r){if(G8(e,t))return t;n=n||On;const i=e.createBuffer();return Nb(e,n,i,t,r),i}function zb(e){return e==="indices"}function K8(e){return e instanceof Int8Array||e instanceof Uint8Array}function J8(e){return e===Int8Array||e===Uint8Array}function e5(e){return e.length?e:e.data}const t5=/coord|texture/i,n5=/color|colour/i;function Ub(e,t){let n;if(t5.test(e)?n=2:n5.test(e)?n=4:n=3,t%n>0)throw new Error(`Can not guess numComponents for attribute '${e}'. Tried ${n} but ${t} values is not evenly divisible by ${n}. You should specify it.`);return n}function r5(e,t){return e.numComponents||e.size||Ub(t,e5(e).length)}function md(e,t){if(Vf(e))return e;if(Vf(e.data))return e.data;Array.isArray(e)&&(e={data:e});let n=e.type;return n||(zb(t)?n=Uint16Array:n=Float32Array),new n(e.data)}function i5(e,t){const n={};return Object.keys(t).forEach(function(r){if(!zb(r)){const i=t[r],o=i.attrib||i.name||i.attribName||Lb.attribPrefix+r;if(i.value){if(!Array.isArray(i.value)&&!Vf(i.value))throw new Error("array.value is not array or typedarray");n[o]={value:i.value}}else{let a,s,f,l;if(i.buffer&&i.buffer instanceof WebGLBuffer)a=i.buffer,l=i.numComponents||i.size,s=i.type,f=i.normalize;else if(typeof i=="number"||typeof i.data=="number"){const u=i.data||i,c=i.type||Float32Array,h=u*c.BYTES_PER_ELEMENT;s=O8(c),f=i.normalize!==void 0?i.normalize:J8(c),l=i.numComponents||i.size||Ub(r,u),a=e.createBuffer(),e.bindBuffer(On,a),e.bufferData(On,h,i.drawType||Mb)}else{const u=md(i,r);a=Ob(e,u,void 0,i.drawType),s=gd(u),f=i.normalize!==void 0?i.normalize:K8(u),l=r5(i,r)}n[o]={buffer:a,numComponents:l,type:s,normalize:f,stride:i.stride||0,offset:i.offset||0,divisor:i.divisor===void 0?void 0:i.divisor,drawType:i.drawType}}}}),e.bindBuffer(On,null),n}function o5(e,t,n,r){n=md(n),r!==void 0?(e.bindBuffer(On,t.buffer),e.bufferSubData(On,r,n)):Nb(e,On,t.buffer,n,t.drawType)}function a5(e,t){return t===q8||t===Z8?1:t===W8||t===Y8?2:t===Q8||t===X8||t===$8?4:0}const bd=["position","positions","a_position"];function s5(e,t){let n,r;for(r=0;r<bd.length&&(n=bd[r],!(n in t||(n=Lb.attribPrefix+n,n in t)));++r);r===bd.length&&(n=Object.keys(t)[0]);const i=t[n];e.bindBuffer(On,i.buffer);const o=e.getBufferParameter(On,j8);e.bindBuffer(On,null);const a=a5(e,i.type),s=o/a,f=i.numComponents||i.size,l=s/f;if(l%1!==0)throw new Error(`numComponents ${f} not correct for length ${length}`);return l}function l5(e,t,n){const r=i5(e,t),i=Object.assign({},n||{});i.attribs=Object.assign({},n?n.attribs:{},r);const o=t.indices;if(o){const a=md(o,"indices");i.indices=Ob(e,a,V8),i.numElements=a.length,i.elementType=gd(a)}else i.numElements||(i.numElements=s5(e,i.attribs));return i}function Fo(e){return!!e.texStorage2D}const yd=function(){const e={},t={};function n(r){const i=r.constructor.name;if(!e[i]){for(const o in r)if(typeof r[o]=="number"){const a=t[r[o]];t[r[o]]=a?`${a} | ${o}`:o}e[i]=!0}}return function(i,o){return n(i),t[o]||(typeof o=="number"?`0x${o.toString(16)}`:o)}}(),Lr={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},Ro=Vf,Gb=function(){let e;return function(){return e=e||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),e}}(),Hb=6406,zn=6407,Ge=6408,Vb=6409,jb=6410,Ss=6402,qb=34041,qf=33071,f5=9728,u5=9729,ir=3553,or=34067,Nr=32879,Or=35866,Zf=34069,c5=34070,h5=34071,d5=34072,p5=34073,g5=34074,wd=10241,vd=10240,Wf=10242,Yf=10243,Zb=32882,m5=33082,b5=33083,y5=33084,w5=33085,xd=3317,Wb=3314,Yb=32878,Qb=3316,Xb=3315,$b=32877,v5=37443,x5=37441,A5=37440,E5=33321,_5=36756,S5=33325,C5=33326,I5=33330,T5=33329,k5=33338,B5=33337,D5=33340,F5=33339,R5=33323,P5=36757,M5=33327,L5=33328,N5=33336,O5=33335,z5=33332,U5=33331,G5=33334,H5=33333,V5=32849,j5=35905,q5=36194,Z5=36758,W5=35898,Y5=35901,Q5=34843,X5=34837,$5=36221,K5=36239,J5=36215,eI=36233,tI=36209,nI=36227,rI=32856,iI=35907,oI=36759,aI=32855,sI=32854,lI=32857,fI=34842,uI=34836,cI=36220,hI=36238,dI=36975,pI=36214,gI=36232,mI=36226,bI=36208,yI=33189,wI=33190,vI=36012,xI=36013,AI=35056,zr=5120,He=5121,Qf=5122,Po=5123,Xf=5124,Ni=5125,At=5126,Kb=32819,Jb=32820,e2=33635,An=5131,Cs=36193,Ad=33640,EI=35899,_I=35902,SI=36269,CI=34042,$f=33319,Mo=33320,Kf=6403,Lo=36244,No=36248,Oi=36249;let Ed;function Jf(e){if(!Ed){const t={};t[Hb]={textureFormat:Hb,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[He,An,Cs,At]},t[Vb]={textureFormat:Vb,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[He,An,Cs,At]},t[jb]={textureFormat:jb,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[He,An,Cs,At]},t[zn]={textureFormat:zn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[He,An,Cs,At,e2]},t[Ge]={textureFormat:Ge,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[He,An,Cs,At,Kb,Jb]},t[Ss]={textureFormat:Ss,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Ni,Po]},t[E5]={textureFormat:Kf,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[He]},t[_5]={textureFormat:Kf,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[zr]},t[S5]={textureFormat:Kf,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[At,An]},t[C5]={textureFormat:Kf,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[At]},t[I5]={textureFormat:Lo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[He]},t[T5]={textureFormat:Lo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[zr]},t[z5]={textureFormat:Lo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Po]},t[U5]={textureFormat:Lo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Qf]},t[G5]={textureFormat:Lo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ni]},t[H5]={textureFormat:Lo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Xf]},t[R5]={textureFormat:$f,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[He]},t[P5]={textureFormat:$f,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[zr]},t[M5]={textureFormat:$f,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[At,An]},t[L5]={textureFormat:$f,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[At]},t[N5]={textureFormat:Mo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[He]},t[O5]={textureFormat:Mo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[zr]},t[k5]={textureFormat:Mo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Po]},t[B5]={textureFormat:Mo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Qf]},t[D5]={textureFormat:Mo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Ni]},t[F5]={textureFormat:Mo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Xf]},t[V5]={textureFormat:zn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[He]},t[j5]={textureFormat:zn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[He]},t[q5]={textureFormat:zn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[He,e2]},t[Z5]={textureFormat:zn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[zr]},t[W5]={textureFormat:zn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[At,An,EI]},t[Y5]={textureFormat:zn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[At,An,_I]},t[Q5]={textureFormat:zn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[At,An]},t[X5]={textureFormat:zn,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[At]},t[$5]={textureFormat:No,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[He]},t[K5]={textureFormat:No,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[zr]},t[J5]={textureFormat:No,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Po]},t[eI]={textureFormat:No,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Qf]},t[tI]={textureFormat:No,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Ni]},t[nI]={textureFormat:No,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Xf]},t[rI]={textureFormat:Ge,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[He]},t[iI]={textureFormat:Ge,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[He]},t[oI]={textureFormat:Ge,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[zr]},t[aI]={textureFormat:Ge,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[He,Jb,Ad]},t[sI]={textureFormat:Ge,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[He,Kb]},t[lI]={textureFormat:Ge,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Ad]},t[fI]={textureFormat:Ge,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[At,An]},t[uI]={textureFormat:Ge,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[At]},t[cI]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[He]},t[hI]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[zr]},t[dI]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ad]},t[pI]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Po]},t[gI]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Qf]},t[mI]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Xf]},t[bI]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Ni]},t[yI]={textureFormat:Ss,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Po,Ni]},t[wI]={textureFormat:Ss,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ni]},t[vI]={textureFormat:Ss,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[At]},t[AI]={textureFormat:qb,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[CI]},t[xI]={textureFormat:qb,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[SI]},Object.keys(t).forEach(function(n){const r=t[n];r.bytesPerElementMap={},r.bytesPerElement.forEach(function(i,o){const a=r.type[o];r.bytesPerElementMap[a]=i})}),Ed=t}return Ed[e]}function II(e,t){const n=Jf(e);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[t];if(r===void 0)throw"unknown internal format";return r}function Oo(e){const t=Jf(e);if(!t)throw"unknown internal format";return{format:t.textureFormat,type:t.type[0]}}function t2(e){return(e&e-1)===0}function TI(e,t,n,r){if(!Fo(e))return t2(t)&&t2(n);const i=Jf(r);if(!i)throw"unknown internal format";return i.colorRenderable&&i.textureFilterable}function kI(e){const t=Jf(e);if(!t)throw"unknown internal format";return t.textureFilterable}function n2(e,t,n){return Ro(t)?gd(t):n||He}function eu(e,t,n,r,i){if(i%1!==0)throw"can't guess dimensions";if(!n&&!r){const o=Math.sqrt(i/(t===or?6:1));o%1===0?(n=o,r=o):(n=i,r=1)}else if(r){if(!n&&(n=i/r,n%1))throw"can't guess dimensions"}else if(r=i/n,r%1)throw"can't guess dimensions";return{width:n,height:r}}function zo(e,t){t.colorspaceConversion!==void 0&&e.pixelStorei(v5,t.colorspaceConversion),t.premultiplyAlpha!==void 0&&e.pixelStorei(x5,t.premultiplyAlpha),t.flipY!==void 0&&e.pixelStorei(A5,t.flipY)}function r2(e){e.pixelStorei(xd,4),Fo(e)&&(e.pixelStorei(Wb,0),e.pixelStorei(Yb,0),e.pixelStorei(Qb,0),e.pixelStorei(Xb,0),e.pixelStorei($b,0))}function BI(e,t,n,r){r.minMag&&(n.call(e,t,wd,r.minMag),n.call(e,t,vd,r.minMag)),r.min&&n.call(e,t,wd,r.min),r.mag&&n.call(e,t,vd,r.mag),r.wrap&&(n.call(e,t,Wf,r.wrap),n.call(e,t,Yf,r.wrap),(t===Nr||H8(e,t))&&n.call(e,t,Zb,r.wrap)),r.wrapR&&n.call(e,t,Zb,r.wrapR),r.wrapS&&n.call(e,t,Wf,r.wrapS),r.wrapT&&n.call(e,t,Yf,r.wrapT),r.minLod&&n.call(e,t,m5,r.minLod),r.maxLod&&n.call(e,t,b5,r.maxLod),r.baseLevel&&n.call(e,t,y5,r.baseLevel),r.maxLevel&&n.call(e,t,w5,r.maxLevel)}function i2(e,t,n){const r=n.target||ir;e.bindTexture(r,t),BI(e,r,e.texParameteri,n)}function DI(e){return e=e||Lr.textureColor,Ro(e)?e:new Uint8Array([e[0]*255,e[1]*255,e[2]*255,e[3]*255])}function _d(e,t,n,r,i,o){n=n||Lr.textureOptions,o=o||Ge;const a=n.target||ir;if(r=r||n.width,i=i||n.height,e.bindTexture(a,t),TI(e,r,i,o))e.generateMipmap(a);else{const s=kI(o)?u5:f5;e.texParameteri(a,wd,s),e.texParameteri(a,vd,s),e.texParameteri(a,Wf,qf),e.texParameteri(a,Yf,qf)}}function Is(e){return e.auto===!0||e.auto===void 0&&e.level===void 0}function Sd(e,t){return t=t||{},t.cubeFaceOrder||[Zf,c5,h5,d5,p5,g5]}function Cd(e,t){const r=Sd(e,t).map(function(i,o){return{face:i,ndx:o}});return r.sort(function(i,o){return i.face-o.face}),r}function o2(e,t,n,r){r=r||Lr.textureOptions;const i=r.target||ir,o=r.level||0;let a=n.width,s=n.height;const f=r.internalFormat||r.format||Ge,l=Oo(f),u=r.format||l.format,c=r.type||l.type;if(zo(e,r),e.bindTexture(i,t),i===or){const h=n.width,d=n.height;let p,b;if(h/6===d)p=d,b=[0,0,1,0,2,0,3,0,4,0,5,0];else if(d/6===h)p=h,b=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===d/2)p=h/3,b=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===d/3)p=h/2,b=[0,0,1,0,0,1,1,1,0,2,1,2];else throw"can't figure out cube map from element: "+(n.src?n.src:n.nodeName);const y=Gb();y?(y.canvas.width=p,y.canvas.height=p,a=p,s=p,Cd(e,r).forEach(function(w){const S=b[w.ndx*2+0]*p,C=b[w.ndx*2+1]*p;y.drawImage(n,S,C,p,p,0,0,p,p),e.texImage2D(w.face,o,f,u,c,y.canvas)}),y.canvas.width=1,y.canvas.height=1):typeof createImageBitmap<"u"&&(a=p,s=p,Cd(e,r).forEach(function(w){const S=b[w.ndx*2+0]*p,C=b[w.ndx*2+1]*p;e.texImage2D(w.face,o,f,p,p,0,u,c,null),createImageBitmap(n,S,C,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(_){zo(e,r),e.bindTexture(i,t),e.texImage2D(w.face,o,f,u,c,_),Is(r)&&_d(e,t,r,a,s,f)})}))}else if(i===Nr||i===Or){const h=Math.min(n.width,n.height),d=Math.max(n.width,n.height),p=d/h;if(p%1!==0)throw"can not compute 3D dimensions of element";const b=n.width===d?1:0,y=n.height===d?1:0;e.pixelStorei(xd,1),e.pixelStorei(Wb,n.width),e.pixelStorei(Yb,0),e.pixelStorei($b,0),e.texImage3D(i,o,f,h,h,h,0,u,c,null);for(let w=0;w<p;++w){const S=w*h*b,C=w*h*y;e.pixelStorei(Qb,S),e.pixelStorei(Xb,C),e.texSubImage3D(i,o,0,0,w,h,h,1,u,c,n)}r2(e)}else e.texImage2D(i,o,f,u,c,n);Is(r)&&_d(e,t,r,a,s,f),i2(e,t,r)}function Ts(){}function FI(e){if(typeof document<"u"){const t=document.createElement("a");return t.href=e,t.hostname===location.hostname&&t.port===location.port&&t.protocol===location.protocol}else{const t=new URL(location.href).origin;return new URL(e,location.href).origin===t}}function RI(e,t){return t===void 0&&!FI(e)?"anonymous":t}function PI(e,t,n){n=n||Ts;let r;if(t=t!==void 0?t:Lr.crossOrigin,t=RI(e,t),typeof Image<"u"){r=new Image,t!==void 0&&(r.crossOrigin=t);const i=function(){r.removeEventListener("error",o),r.removeEventListener("load",a),r=null},o=function(){const f="couldn't load image: "+e;U8(f),n(f,r),i()},a=function(){n(null,r),i()};return r.addEventListener("error",o),r.addEventListener("load",a),r.src=e,r}else if(typeof ImageBitmap<"u"){let i,o;const a=function(){n(i,o)},s={};t&&(s.mode="cors"),fetch(e,s).then(function(f){if(!f.ok)throw f;return f.blob()}).then(function(f){return createImageBitmap(f,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(f){o=f,setTimeout(a)}).catch(function(f){i=f,setTimeout(a)}),r=null}return r}function a2(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof ImageData<"u"&&e instanceof ImageData||typeof HTMLElement<"u"&&e instanceof HTMLElement}function Id(e,t,n){return a2(e)?(setTimeout(function(){n(null,e)}),e):PI(e,t,n)}function Td(e,t,n){n=n||Lr.textureOptions;const r=n.target||ir;if(e.bindTexture(r,t),n.color===!1)return;const i=DI(n.color);if(r===or)for(let o=0;o<6;++o)e.texImage2D(Zf+o,0,Ge,1,1,0,Ge,He,i);else r===Nr||r===Or?e.texImage3D(r,0,Ge,1,1,1,0,Ge,He,i):e.texImage2D(r,0,Ge,1,1,0,Ge,He,i)}function MI(e,t,n,r){return r=r||Ts,n=n||Lr.textureOptions,Td(e,t,n),n=Object.assign({},n),Id(n.src,n.crossOrigin,function(o,a){o?r(o,t,a):(o2(e,t,a,n),r(null,t,a))})}function LI(e,t,n,r){r=r||Ts;const i=n.src;if(i.length!==6)throw"there must be 6 urls for a cubemap";const o=n.level||0,a=n.internalFormat||n.format||Ge,s=Oo(a),f=n.format||s.format,l=n.type||He,u=n.target||ir;if(u!==or)throw"target must be TEXTURE_CUBE_MAP";Td(e,t,n),n=Object.assign({},n);let c=6;const h=[],d=Sd(e,n);let p;function b(y){return function(w,S){--c,w?h.push(w):S.width!==S.height?h.push("cubemap face img is not a square: "+S.src):(zo(e,n),e.bindTexture(u,t),c===5?Sd().forEach(function(C){e.texImage2D(C,o,a,f,l,S)}):e.texImage2D(y,o,a,f,l,S),Is(n)&&e.generateMipmap(u)),c===0&&r(h.length?h:void 0,t,p)}}p=i.map(function(y,w){return Id(y,n.crossOrigin,b(d[w]))})}function NI(e,t,n,r){r=r||Ts;const i=n.src,o=n.internalFormat||n.format||Ge,a=Oo(o),s=n.format||a.format,f=n.type||He,l=n.target||Or;if(l!==Nr&&l!==Or)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";Td(e,t,n),n=Object.assign({},n);let u=i.length;const c=[];let h;const d=n.level||0;let p=n.width,b=n.height;const y=i.length;let w=!0;function S(C){return function(_,k){if(--u,_)c.push(_);else{if(zo(e,n),e.bindTexture(l,t),w){w=!1,p=n.width||k.width,b=n.height||k.height,e.texImage3D(l,d,o,p,b,y,0,s,f,null);for(let B=0;B<y;++B)e.texSubImage3D(l,d,0,0,B,p,b,1,s,f,k)}else{let B=k,T;(k.width!==p||k.height!==b)&&(T=Gb(),B=T.canvas,T.canvas.width=p,T.canvas.height=b,T.drawImage(k,0,0,p,b)),e.texSubImage3D(l,d,0,0,C,p,b,1,s,f,B),T&&B===T.canvas&&(T.canvas.width=0,T.canvas.height=0)}Is(n)&&e.generateMipmap(l)}u===0&&r(c.length?c:void 0,t,h)}}h=i.map(function(C,_){return Id(C,n.crossOrigin,S(_))})}function s2(e,t,n,r){r=r||Lr.textureOptions;const i=r.target||ir;e.bindTexture(i,t);let o=r.width,a=r.height,s=r.depth;const f=r.level||0,l=r.internalFormat||r.format||Ge,u=Oo(l),c=r.format||u.format,h=r.type||n2(e,n,u.type);if(Ro(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const y=z8(h);n=new y(n)}const d=II(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+yd(e,c);let b;if(i===Nr||i===Or)if(!o&&!a&&!s){const y=Math.cbrt(p);if(y%1!==0)throw"can't guess cube size of array of numElements: "+p;o=y,a=y,s=y}else o&&(!a||!s)?(b=eu(e,i,a,s,p/o),a=b.width,s=b.height):a&&(!o||!s)?(b=eu(e,i,o,s,p/a),o=b.width,s=b.height):(b=eu(e,i,o,a,p/s),o=b.width,a=b.height);else b=eu(e,i,o,a,p),o=b.width,a=b.height;if(r2(e),e.pixelStorei(xd,r.unpackAlignment||1),zo(e,r),i===or){const y=d/n.BYTES_PER_ELEMENT,w=p/6*y;Cd(e,r).forEach(S=>{const C=w*S.ndx,_=n.subarray(C,C+w);e.texImage2D(S.face,f,l,o,a,0,c,h,_)})}else i===Nr||i===Or?e.texImage3D(i,f,l,o,a,s,0,c,h,n):e.texImage2D(i,f,l,o,a,0,c,h,n);return{width:o,height:a,depth:s,type:h}}function OI(e,t,n){const r=n.target||ir;e.bindTexture(r,t);const i=n.level||0,o=n.internalFormat||n.format||Ge,a=Oo(o),s=n.format||a.format,f=n.type||a.type;if(zo(e,n),r===or)for(let l=0;l<6;++l)e.texImage2D(Zf+l,i,o,n.width,n.height,0,s,f,null);else r===Nr||r===Or?e.texImage3D(r,i,o,n.width,n.height,n.depth,0,s,f,null):e.texImage2D(r,i,o,n.width,n.height,0,s,f,null)}function ks(e,t,n){n=n||Ts,t=t||Lr.textureOptions;const r=e.createTexture(),i=t.target||ir;let o=t.width||1,a=t.height||1;const s=t.internalFormat||Ge;e.bindTexture(i,r),i===or&&(e.texParameteri(i,Wf,qf),e.texParameteri(i,Yf,qf));let f=t.src;if(f)if(typeof f=="function"&&(f=f(e,t)),typeof f=="string")MI(e,r,t,n);else if(Ro(f)||Array.isArray(f)&&(typeof f[0]=="number"||Array.isArray(f[0])||Ro(f[0]))){const l=s2(e,r,f,t);o=l.width,a=l.height}else Array.isArray(f)&&(typeof f[0]=="string"||a2(f[0]))?i===or?LI(e,r,t,n):NI(e,r,t,n):(o2(e,r,f,t),o=f.width,a=f.height);else OI(e,r,t);return Is(t)&&_d(e,r,t,o,a,s),i2(e,r,t),r}function zI(e,t,n,r,i,o){r=r||n.width,i=i||n.height,o=o||n.depth;const a=n.target||ir;e.bindTexture(a,t);const s=n.level||0,f=n.internalFormat||n.format||Ge,l=Oo(f),u=n.format||l.format;let c;const h=n.src;if(h&&(Ro(h)||Array.isArray(h)&&typeof h[0]=="number")?c=n.type||n2(e,h,l.type):c=n.type||l.type,a===or)for(let d=0;d<6;++d)e.texImage2D(Zf+d,s,f,r,i,0,u,c,null);else a===Nr||a===Or?e.texImage3D(a,s,f,r,i,o,0,u,c,null):e.texImage2D(a,s,f,r,i,0,u,c,null)}const UI=Rb,tu=33984,GI=35048,nu=34962,HI=34963,kd=35345,l2=35718,VI=35721,jI=35971,qI=35382,ZI=35396,WI=35398,YI=35392,QI=35395,ru=5126,f2=35664,u2=35665,c2=35666,Bd=5124,h2=35667,d2=35668,p2=35669,g2=35670,m2=35671,b2=35672,y2=35673,w2=35674,v2=35675,x2=35676,XI=35678,$I=35680,KI=35679,JI=35682,eT=35685,tT=35686,nT=35687,rT=35688,iT=35689,oT=35690,aT=36289,sT=36292,lT=36293,Dd=5125,A2=36294,E2=36295,_2=36296,fT=36298,uT=36299,cT=36300,hT=36303,dT=36306,pT=36307,gT=36308,mT=36311,iu=3553,ou=34067,Fd=32879,au=35866,oe={};function S2(e,t){return oe[t].bindPoint}function bT(e,t){return function(n){e.uniform1f(t,n)}}function yT(e,t){return function(n){e.uniform1fv(t,n)}}function wT(e,t){return function(n){e.uniform2fv(t,n)}}function vT(e,t){return function(n){e.uniform3fv(t,n)}}function xT(e,t){return function(n){e.uniform4fv(t,n)}}function C2(e,t){return function(n){e.uniform1i(t,n)}}function I2(e,t){return function(n){e.uniform1iv(t,n)}}function T2(e,t){return function(n){e.uniform2iv(t,n)}}function k2(e,t){return function(n){e.uniform3iv(t,n)}}function B2(e,t){return function(n){e.uniform4iv(t,n)}}function AT(e,t){return function(n){e.uniform1ui(t,n)}}function ET(e,t){return function(n){e.uniform1uiv(t,n)}}function _T(e,t){return function(n){e.uniform2uiv(t,n)}}function ST(e,t){return function(n){e.uniform3uiv(t,n)}}function CT(e,t){return function(n){e.uniform4uiv(t,n)}}function IT(e,t){return function(n){e.uniformMatrix2fv(t,!1,n)}}function TT(e,t){return function(n){e.uniformMatrix3fv(t,!1,n)}}function kT(e,t){return function(n){e.uniformMatrix4fv(t,!1,n)}}function BT(e,t){return function(n){e.uniformMatrix2x3fv(t,!1,n)}}function DT(e,t){return function(n){e.uniformMatrix3x2fv(t,!1,n)}}function FT(e,t){return function(n){e.uniformMatrix2x4fv(t,!1,n)}}function RT(e,t){return function(n){e.uniformMatrix4x2fv(t,!1,n)}}function PT(e,t){return function(n){e.uniformMatrix3x4fv(t,!1,n)}}function MT(e,t){return function(n){e.uniformMatrix4x3fv(t,!1,n)}}function Ct(e,t,n,r){const i=S2(e,t);return Fo(e)?function(o){let a,s;jf(e,o)?(a=o,s=null):(a=o.texture,s=o.sampler),e.uniform1i(r,n),e.activeTexture(tu+n),e.bindTexture(i,a),e.bindSampler(n,s)}:function(o){e.uniform1i(r,n),e.activeTexture(tu+n),e.bindTexture(i,o)}}function It(e,t,n,r,i){const o=S2(e,t),a=new Int32Array(i);for(let s=0;s<i;++s)a[s]=n+s;return Fo(e)?function(s){e.uniform1iv(r,a),s.forEach(function(f,l){e.activeTexture(tu+a[l]);let u,c;jf(e,f)?(u=f,c=null):(u=f.texture,c=f.sampler),e.bindSampler(n,c),e.bindTexture(o,u)})}:function(s){e.uniform1iv(r,a),s.forEach(function(f,l){e.activeTexture(tu+a[l]),e.bindTexture(o,f)})}}oe[ru]={Type:Float32Array,size:4,setter:bT,arraySetter:yT},oe[f2]={Type:Float32Array,size:8,setter:wT,cols:2},oe[u2]={Type:Float32Array,size:12,setter:vT,cols:3},oe[c2]={Type:Float32Array,size:16,setter:xT,cols:4},oe[Bd]={Type:Int32Array,size:4,setter:C2,arraySetter:I2},oe[h2]={Type:Int32Array,size:8,setter:T2,cols:2},oe[d2]={Type:Int32Array,size:12,setter:k2,cols:3},oe[p2]={Type:Int32Array,size:16,setter:B2,cols:4},oe[Dd]={Type:Uint32Array,size:4,setter:AT,arraySetter:ET},oe[A2]={Type:Uint32Array,size:8,setter:_T,cols:2},oe[E2]={Type:Uint32Array,size:12,setter:ST,cols:3},oe[_2]={Type:Uint32Array,size:16,setter:CT,cols:4},oe[g2]={Type:Uint32Array,size:4,setter:C2,arraySetter:I2},oe[m2]={Type:Uint32Array,size:8,setter:T2,cols:2},oe[b2]={Type:Uint32Array,size:12,setter:k2,cols:3},oe[y2]={Type:Uint32Array,size:16,setter:B2,cols:4},oe[w2]={Type:Float32Array,size:32,setter:IT,rows:2,cols:2},oe[v2]={Type:Float32Array,size:48,setter:TT,rows:3,cols:3},oe[x2]={Type:Float32Array,size:64,setter:kT,rows:4,cols:4},oe[eT]={Type:Float32Array,size:32,setter:BT,rows:2,cols:3},oe[tT]={Type:Float32Array,size:32,setter:FT,rows:2,cols:4},oe[nT]={Type:Float32Array,size:48,setter:DT,rows:3,cols:2},oe[rT]={Type:Float32Array,size:48,setter:PT,rows:3,cols:4},oe[iT]={Type:Float32Array,size:64,setter:RT,rows:4,cols:2},oe[oT]={Type:Float32Array,size:64,setter:MT,rows:4,cols:3},oe[XI]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:iu},oe[$I]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:ou},oe[KI]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:Fd},oe[JI]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:iu},oe[aT]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:au},oe[sT]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:au},oe[lT]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:ou},oe[fT]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:iu},oe[uT]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:Fd},oe[cT]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:ou},oe[hT]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:au},oe[dT]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:iu},oe[pT]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:Fd},oe[gT]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:ou},oe[mT]={Type:null,size:0,setter:Ct,arraySetter:It,bindPoint:au};function su(e,t){return function(n){if(n.value)switch(e.disableVertexAttribArray(t),n.value.length){case 4:e.vertexAttrib4fv(t,n.value);break;case 3:e.vertexAttrib3fv(t,n.value);break;case 2:e.vertexAttrib2fv(t,n.value);break;case 1:e.vertexAttrib1fv(t,n.value);break;default:throw new Error("the length of a float constant value must be between 1 and 4!")}else e.bindBuffer(nu,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribPointer(t,n.numComponents||n.size,n.type||ru,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Ur(e,t){return function(n){if(n.value)if(e.disableVertexAttribArray(t),n.value.length===4)e.vertexAttrib4iv(t,n.value);else throw new Error("The length of an integer constant value must be 4!");else e.bindBuffer(nu,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||Bd,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function lu(e,t){return function(n){if(n.value)if(e.disableVertexAttribArray(t),n.value.length===4)e.vertexAttrib4uiv(t,n.value);else throw new Error("The length of an unsigned integer constant value must be 4!");else e.bindBuffer(nu,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||Dd,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Rd(e,t,n){const r=n.size,i=n.count;return function(o){e.bindBuffer(nu,o.buffer);const a=o.size||o.numComponents||r,s=a/i,f=o.type||ru,u=oe[f].size*a,c=o.normalize||!1,h=o.offset||0,d=u/i;for(let p=0;p<i;++p)e.enableVertexAttribArray(t+p),e.vertexAttribPointer(t+p,s,f,c,u,h+d*p),o.divisor!==void 0&&e.vertexAttribDivisor(t+p,o.divisor)}}const tt={};tt[ru]={size:4,setter:su},tt[f2]={size:8,setter:su},tt[u2]={size:12,setter:su},tt[c2]={size:16,setter:su},tt[Bd]={size:4,setter:Ur},tt[h2]={size:8,setter:Ur},tt[d2]={size:12,setter:Ur},tt[p2]={size:16,setter:Ur},tt[Dd]={size:4,setter:lu},tt[A2]={size:8,setter:lu},tt[E2]={size:12,setter:lu},tt[_2]={size:16,setter:lu},tt[g2]={size:4,setter:Ur},tt[m2]={size:8,setter:Ur},tt[b2]={size:12,setter:Ur},tt[y2]={size:16,setter:Ur},tt[w2]={size:4,setter:Rd,count:2},tt[v2]={size:9,setter:Rd,count:3},tt[x2]={size:16,setter:Rd,count:4};function D2(e){const t=e.name;return t.startsWith("gl_")||t.startsWith("webgl_")}const LT=/(\.|\[|]|\w+)/g,NT=e=>e>="0"&&e<="9";function F2(e,t,n,r){const i=e.split(LT).filter(s=>s!=="");let o=0,a="";for(;;){const s=i[o++];a+=s;const f=NT(s[0]),l=f?parseInt(s):s;if(f&&(a+=i[o++]),o===i.length){n[l]=t;break}else{const c=i[o++],h=c==="[",d=n[l]||(h?[]:{});n[l]=d,n=d,r[a]=r[a]||function(p){return function(b){N2(p,b)}}(d),a+=c}}}function OT(e,t){let n=0;function r(s,f,l){const u=f.name.endsWith("[0]"),c=f.type,h=oe[c];if(!h)throw new Error(`unknown type: 0x${c.toString(16)}`);let d;if(h.bindPoint){const p=n;n+=f.size,u?d=h.arraySetter(e,c,p,l,f.size):d=h.setter(e,c,p,l,f.size)}else h.arraySetter&&u?d=h.arraySetter(e,l):d=h.setter(e,l);return d.location=l,d}const i={},o={},a=e.getProgramParameter(t,l2);for(let s=0;s<a;++s){const f=e.getActiveUniform(t,s);if(D2(f))continue;let l=f.name;l.endsWith("[0]")&&(l=l.substr(0,l.length-3));const u=e.getUniformLocation(t,f.name);if(u){const c=r(t,f,u);i[l]=c,F2(l,c,o,i)}}return i}function zT(e,t){const n={},r=e.getProgramParameter(t,jI);for(let i=0;i<r;++i){const o=e.getTransformFeedbackVarying(t,i);n[o.name]={index:i,type:o.type,size:o.size}}return n}function UT(e,t){const n=e.getProgramParameter(t,l2),r=[],i=[];for(let s=0;s<n;++s){i.push(s),r.push({});const f=e.getActiveUniform(t,s);r[s].name=f.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(s){const f=s[0],l=s[1];e.getActiveUniforms(t,i,e[f]).forEach(function(u,c){r[c][l]=u})});const o={},a=e.getProgramParameter(t,qI);for(let s=0;s<a;++s){const f=e.getActiveUniformBlockName(t,s),l={index:e.getUniformBlockIndex(t,f),usedByVertexShader:e.getActiveUniformBlockParameter(t,s,ZI),usedByFragmentShader:e.getActiveUniformBlockParameter(t,s,WI),size:e.getActiveUniformBlockParameter(t,s,YI),uniformIndices:e.getActiveUniformBlockParameter(t,s,QI)};l.used=l.usedByVertexShader||l.usedByFragmentShader,o[f]=l}return{blockSpecs:o,uniformData:r}}const R2=/\[\d+\]\.$/,GT=(e,t)=>((e+(t-1))/t|0)*t;function HT(e,t,n,r){if(t||n){r=r||1;const o=e.length/4;return function(a){let s=0,f=0;for(let l=0;l<o;++l){for(let u=0;u<r;++u)e[s++]=a[f++];s+=4-r}}}else return function(i){i.length?e.set(i):e[0]=i}}function VT(e,t,n,r){const i=n.blockSpecs,o=n.uniformData,a=i[r];if(!a)return UI("no uniform block object named:",r),{name:r,uniforms:{}};const s=new ArrayBuffer(a.size),f=e.createBuffer(),l=a.index;e.bindBuffer(kd,f),e.uniformBlockBinding(t,a.index,l);let u=r+".";R2.test(u)&&(u=u.replace(R2,"."));const c={},h={},d={};return a.uniformIndices.forEach(function(p){const b=o[p];let y=b.name;y.startsWith(u)&&(y=y.substr(u.length));const w=y.endsWith("[0]");w&&(y=y.substr(0,y.length-3));const S=oe[b.type],C=S.Type,_=w?GT(S.size,16)*b.size:S.size*b.size,k=new C(s,b.offset,_/C.BYTES_PER_ELEMENT);c[y]=k;const B=HT(k,w,S.rows,S.cols);h[y]=B,F2(y,B,d,h)}),{name:r,array:s,asFloat:new Float32Array(s),buffer:f,uniforms:c,setters:h}}function P2(e,t,n){return VT(e,t.program,t.uniformBlockSpec,n)}function jT(e,t,n){const i=(t.uniformBlockSpec||t).blockSpecs[n.name];if(i){const o=i.index;return e.bindBufferRange(kd,o,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function M2(e,t,n){jT(e,t,n)&&e.bufferData(kd,n.array,GI)}function L2(e,t){const n=e.setters;for(const r in t){const i=n[r];if(i){const o=t[r];i(o)}}}function N2(e,t){for(const n in t){const r=e[n];typeof r=="function"?r(t[n]):N2(e[n],t[n])}}function Yt(e,...t){const n=e.uniformSetters||e,r=t.length;for(let i=0;i<r;++i){const o=t[i];if(Array.isArray(o)){const a=o.length;for(let s=0;s<a;++s)Yt(n,o[s])}else for(const a in o){const s=n[a];s&&s(o[a])}}}function qT(e,t){const n={},r=e.getProgramParameter(t,VI);for(let i=0;i<r;++i){const o=e.getActiveAttrib(t,i);if(D2(o))continue;const a=e.getAttribLocation(t,o.name),s=tt[o.type],f=s.setter(e,a,s);f.location=a,n[o.name]=f}return n}function ZT(e,t){for(const n in t){const r=e[n];r&&r(t[n])}}function Uo(e,t,n){n.vertexArrayObject?e.bindVertexArray(n.vertexArrayObject):(ZT(t.attribSetters||t,n.attribs),n.indices&&e.bindBuffer(HI,n.indices))}function WT(e,t){const n=OT(e,t),r=qT(e,t),i={program:t,uniformSetters:n,attribSetters:r};return Fo(e)&&(i.uniformBlockSpec=UT(e,t),i.transformFeedbackInfo=zT(e,t)),i}const YT=4,O2=5123;function Bs(e,t,n,r,i,o){n=n===void 0?YT:n;const a=t.indices,s=t.elementType,f=r===void 0?t.numElements:r;i=i===void 0?0:i,s||a?o!==void 0?e.drawElementsInstanced(n,f,s===void 0?O2:t.elementType,i,o):e.drawElements(n,f,s===void 0?O2:t.elementType,i):o!==void 0?e.drawArraysInstanced(n,i,f,o):e.drawArrays(n,i,f)}const QT=36160,zi=36161,XT=3553,$T=5121,KT=6402,JT=6408,ek=33190,tk=36012,nk=35056,rk=36013,ik=32854,ok=32855,ak=36194,z2=33189,U2=6401,G2=36168,Pd=34041,sk=36064,fu=36096,H2=36128,Md=33306,Ld=33071,Nd=9729,V2=[{format:JT,type:$T,min:Nd,wrap:Ld},{format:Pd}],En={};En[Pd]=Md,En[U2]=H2,En[G2]=H2,En[KT]=fu,En[z2]=fu,En[ek]=fu,En[tk]=fu,En[nk]=Md,En[rk]=Md;function lk(e,t){return En[e]||En[t]}const Gr={};Gr[ik]=!0,Gr[ok]=!0,Gr[ak]=!0,Gr[Pd]=!0,Gr[z2]=!0,Gr[U2]=!0,Gr[G2]=!0;function fk(e){return Gr[e]}function uk(e,t,n,r){const i=QT,o=e.createFramebuffer();e.bindFramebuffer(i,o),n=n||e.drawingBufferWidth,r=r||e.drawingBufferHeight,t=t||V2;let a=0;const s={framebuffer:o,attachments:[],width:n,height:r};return t.forEach(function(f){let l=f.attachment;const u=f.samples,c=f.format;let h=f.attachmentPoint||lk(c,f.internalFormat);if(h||(h=sk+a++),!l)if(u!==void 0||fk(c))l=e.createRenderbuffer(),e.bindRenderbuffer(zi,l),u>1?e.renderbufferStorageMultisample(zi,u,c,n,r):e.renderbufferStorage(zi,c,n,r);else{const d=Object.assign({},f);d.width=n,d.height=r,d.auto===void 0&&(d.auto=!1,d.min=d.min||d.minMag||Nd,d.mag=d.mag||d.minMag||Nd,d.wrapS=d.wrapS||d.wrap||Ld,d.wrapT=d.wrapT||d.wrap||Ld),l=ks(e,d)}if(Pb(e,l))e.framebufferRenderbuffer(i,h,zi,l);else if(jf(e,l))f.layer!==void 0?e.framebufferTextureLayer(i,h,l,f.level||0,f.layer):e.framebufferTexture2D(i,h,f.target||XT,l,f.level||0);else throw new Error("unknown attachment type");s.attachments.push(l)}),s}function ck(e,t,n,r,i){r=r||e.drawingBufferWidth,i=i||e.drawingBufferHeight,t.width=r,t.height=i,n=n||V2,n.forEach(function(o,a){const s=t.attachments[a],f=o.format,l=o.samples;if(l!==void 0||Pb(e,s))e.bindRenderbuffer(zi,s),l>1?e.renderbufferStorageMultisample(zi,l,f,r,i):e.renderbufferStorage(zi,f,r,i);else if(jf(e,s))zI(e,s,o,r,i);else throw new Error("unknown attachment type")})}function hk(e,t,n){const r=e.createVertexArray();return e.bindVertexArray(r),t.length||(t=[t]),t.forEach(function(i){Uo(e,i,n)}),e.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const dk=/^(.*?)_/;function pk(e,t){yd(e,0);const n=e.getExtension(t);if(n){const r={},i=dk.exec(t)[1],o="_"+i;for(const a in n){const s=n[a],f=typeof s=="function",l=f?i:o;let u=a;a.endsWith(l)&&(u=a.substring(0,a.length-l.length)),e[u]!==void 0?!f&&e[u]!==s&&Rb(u,e[u],s,a):f?e[u]=function(c){return function(){return c.apply(n,arguments)}}(s):(e[u]=s,r[u]=s)}r.constructor={name:n.constructor.name},yd(r,0)}return n}const j2=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_color_buffer_float","EXT_color_buffer_half_float","EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2","EXT_frag_depth","EXT_sRGB","EXT_shader_texture_lod","EXT_texture_filter_anisotropic","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_compressed_texture_atc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_pvrtc","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_depth_texture","WEBGL_draw_buffers"];function q2(e){for(let t=0;t<j2.length;++t)pk(e,j2[t])}function gk(e,t){const n=["webgl2","webgl","experimental-webgl"];let r=null;for(let i=0;i<n.length;++i)if(r=e.getContext(n[i],t),r){q2(r);break}return r}function mk(e,t){return gk(e,t)}const bk=`/***The vertex position wrt the rectangle specified by(x,x2,y,y2).*[0,0]=[x,y],[1,1]=[x2,y2].*The x or y component may contain fractional values if the rectangle*have been tessellated.*/in vec2 frac;uniform vec2 uMinSize;uniform float uMinOpacity;uniform vec4 uCornerRadii;out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
|
|
127
|
+
see: http://github.com/greggman/twgl.js for details */const bd=5120,Bs=5121,yd=5122,wd=5123,vd=5124,xd=5125,Ad=5126,q8=32819,Z8=32820,W8=33635,Y8=5131,Q8=33640,X8=35899,$8=35902,K8=36269,J8=34042,Wb={};{const e=Wb;e[bd]=Int8Array,e[Bs]=Uint8Array,e[yd]=Int16Array,e[wd]=Uint16Array,e[vd]=Int32Array,e[xd]=Uint32Array,e[Ad]=Float32Array,e[q8]=Uint16Array,e[Z8]=Uint16Array,e[W8]=Uint16Array,e[Y8]=Uint16Array,e[Q8]=Uint32Array,e[X8]=Uint32Array,e[$8]=Uint32Array,e[K8]=Uint32Array,e[J8]=Uint32Array}function Ed(e){if(e instanceof Int8Array)return bd;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)return Bs;if(e instanceof Int16Array)return yd;if(e instanceof Uint16Array)return wd;if(e instanceof Int32Array)return vd;if(e instanceof Uint32Array)return xd;if(e instanceof Float32Array)return Ad;throw new Error("unsupported typed array type")}function e5(e){if(e===Int8Array)return bd;if(e===Uint8Array||e===Uint8ClampedArray)return Bs;if(e===Int16Array)return yd;if(e===Uint16Array)return wd;if(e===Int32Array)return vd;if(e===Uint32Array)return xd;if(e===Float32Array)return Ad;throw new Error("unsupported typed array type")}function t5(e){const t=Wb[e];if(!t)throw new Error("unknown gl type");return t}const Kf=typeof SharedArrayBuffer<"u"?function(t){return t&&t.buffer&&(t.buffer instanceof ArrayBuffer||t.buffer instanceof SharedArrayBuffer)}:function(t){return t&&t.buffer&&t.buffer instanceof ArrayBuffer};function n5(...e){console.error(...e)}function Yb(...e){console.warn(...e)}function r5(e,t){return typeof WebGLBuffer<"u"&&t instanceof WebGLBuffer}function Qb(e,t){return typeof WebGLRenderbuffer<"u"&&t instanceof WebGLRenderbuffer}function Jf(e,t){return typeof WebGLTexture<"u"&&t instanceof WebGLTexture}function i5(e,t){return typeof WebGLSampler<"u"&&t instanceof WebGLSampler}const Xb=35044,Nn=34962,o5=34963,a5=34660,s5=5120,l5=5121,f5=5122,u5=5123,c5=5124,h5=5125,d5=5126,$b={attribPrefix:""};function Kb(e,t,n,r,i){e.bindBuffer(t,n),e.bufferData(t,r,i||Xb)}function Jb(e,t,n,r){if(r5(e,t))return t;n=n||Nn;const i=e.createBuffer();return Kb(e,n,i,t,r),i}function e2(e){return e==="indices"}function p5(e){return e instanceof Int8Array||e instanceof Uint8Array}function g5(e){return e===Int8Array||e===Uint8Array}function m5(e){return e.length?e:e.data}const b5=/coord|texture/i,y5=/color|colour/i;function t2(e,t){let n;if(b5.test(e)?n=2:y5.test(e)?n=4:n=3,t%n>0)throw new Error(`Can not guess numComponents for attribute '${e}'. Tried ${n} but ${t} values is not evenly divisible by ${n}. You should specify it.`);return n}function w5(e,t){return e.numComponents||e.size||t2(t,m5(e).length)}function _d(e,t){if(Kf(e))return e;if(Kf(e.data))return e.data;Array.isArray(e)&&(e={data:e});let n=e.type;return n||(e2(t)?n=Uint16Array:n=Float32Array),new n(e.data)}function v5(e,t){const n={};return Object.keys(t).forEach(function(r){if(!e2(r)){const i=t[r],o=i.attrib||i.name||i.attribName||$b.attribPrefix+r;if(i.value){if(!Array.isArray(i.value)&&!Kf(i.value))throw new Error("array.value is not array or typedarray");n[o]={value:i.value}}else{let a,s,f,l;if(i.buffer&&i.buffer instanceof WebGLBuffer)a=i.buffer,l=i.numComponents||i.size,s=i.type,f=i.normalize;else if(typeof i=="number"||typeof i.data=="number"){const u=i.data||i,c=i.type||Float32Array,h=u*c.BYTES_PER_ELEMENT;s=e5(c),f=i.normalize!==void 0?i.normalize:g5(c),l=i.numComponents||i.size||t2(r,u),a=e.createBuffer(),e.bindBuffer(Nn,a),e.bufferData(Nn,h,i.drawType||Xb)}else{const u=_d(i,r);a=Jb(e,u,void 0,i.drawType),s=Ed(u),f=i.normalize!==void 0?i.normalize:p5(u),l=w5(i,r)}n[o]={buffer:a,numComponents:l,type:s,normalize:f,stride:i.stride||0,offset:i.offset||0,divisor:i.divisor===void 0?void 0:i.divisor,drawType:i.drawType}}}}),e.bindBuffer(Nn,null),n}function x5(e,t,n,r){n=_d(n),r!==void 0?(e.bindBuffer(Nn,t.buffer),e.bufferSubData(Nn,r,n)):Kb(e,Nn,t.buffer,n,t.drawType)}function A5(e,t){return t===s5||t===l5?1:t===f5||t===u5?2:t===c5||t===h5||t===d5?4:0}const Sd=["position","positions","a_position"];function E5(e,t){let n,r;for(r=0;r<Sd.length&&(n=Sd[r],!(n in t||(n=$b.attribPrefix+n,n in t)));++r);r===Sd.length&&(n=Object.keys(t)[0]);const i=t[n];e.bindBuffer(Nn,i.buffer);const o=e.getBufferParameter(Nn,a5);e.bindBuffer(Nn,null);const a=A5(e,i.type),s=o/a,f=i.numComponents||i.size,l=s/f;if(l%1!==0)throw new Error(`numComponents ${f} not correct for length ${length}`);return l}function _5(e,t,n){const r=v5(e,t),i=Object.assign({},n||{});i.attribs=Object.assign({},n?n.attribs:{},r);const o=t.indices;if(o){const a=_d(o,"indices");i.indices=Jb(e,a,o5),i.numElements=a.length,i.elementType=Ed(a)}else i.numElements||(i.numElements=E5(e,i.attribs));return i}function Po(e){return!!e.texStorage2D}const Cd=function(){const e={},t={};function n(r){const i=r.constructor.name;if(!e[i]){for(const o in r)if(typeof r[o]=="number"){const a=t[r[o]];t[r[o]]=a?`${a} | ${o}`:o}e[i]=!0}}return function(i,o){return n(i),t[o]||(typeof o=="number"?`0x${o.toString(16)}`:o)}}(),Pr={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},Lo=Kf,n2=function(){let e;return function(){return e=e||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),e}}(),r2=6406,On=6407,He=6408,i2=6409,o2=6410,Ds=6402,a2=34041,eu=33071,S5=9728,C5=9729,rr=3553,ir=34067,Lr=32879,Nr=35866,tu=34069,k5=34070,I5=34071,T5=34072,B5=34073,D5=34074,kd=10241,Id=10240,nu=10242,ru=10243,s2=32882,R5=33082,F5=33083,M5=33084,P5=33085,Td=3317,l2=3314,f2=32878,u2=3316,c2=3315,h2=32877,L5=37443,N5=37441,O5=37440,z5=33321,U5=36756,G5=33325,H5=33326,V5=33330,j5=33329,q5=33338,Z5=33337,W5=33340,Y5=33339,Q5=33323,X5=36757,$5=33327,K5=33328,J5=33336,ek=33335,tk=33332,nk=33331,rk=33334,ik=33333,ok=32849,ak=35905,sk=36194,lk=36758,fk=35898,uk=35901,ck=34843,hk=34837,dk=36221,pk=36239,gk=36215,mk=36233,bk=36209,yk=36227,wk=32856,vk=35907,xk=36759,Ak=32855,Ek=32854,_k=32857,Sk=34842,Ck=34836,kk=36220,Ik=36238,Tk=36975,Bk=36214,Dk=36232,Rk=36226,Fk=36208,Mk=33189,Pk=33190,Lk=36012,Nk=36013,Ok=35056,Or=5120,Ve=5121,iu=5122,No=5123,ou=5124,Li=5125,At=5126,d2=32819,p2=32820,g2=33635,xn=5131,Rs=36193,Bd=33640,zk=35899,Uk=35902,Gk=36269,Hk=34042,au=33319,Oo=33320,su=6403,zo=36244,Uo=36248,Ni=36249;let Dd;function lu(e){if(!Dd){const t={};t[r2]={textureFormat:r2,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[Ve,xn,Rs,At]},t[i2]={textureFormat:i2,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[Ve,xn,Rs,At]},t[o2]={textureFormat:o2,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[Ve,xn,Rs,At]},t[On]={textureFormat:On,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[Ve,xn,Rs,At,g2]},t[He]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[Ve,xn,Rs,At,d2,p2]},t[Ds]={textureFormat:Ds,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Li,No]},t[z5]={textureFormat:su,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[Ve]},t[U5]={textureFormat:su,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[Or]},t[G5]={textureFormat:su,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[At,xn]},t[H5]={textureFormat:su,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[At]},t[V5]={textureFormat:zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[Ve]},t[j5]={textureFormat:zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[Or]},t[tk]={textureFormat:zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[No]},t[nk]={textureFormat:zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[iu]},t[rk]={textureFormat:zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Li]},t[ik]={textureFormat:zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ou]},t[Q5]={textureFormat:au,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[Ve]},t[X5]={textureFormat:au,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[Or]},t[$5]={textureFormat:au,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[At,xn]},t[K5]={textureFormat:au,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[At]},t[J5]={textureFormat:Oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Ve]},t[ek]={textureFormat:Oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Or]},t[q5]={textureFormat:Oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[No]},t[Z5]={textureFormat:Oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[iu]},t[W5]={textureFormat:Oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Li]},t[Y5]={textureFormat:Oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[ou]},t[ok]={textureFormat:On,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[Ve]},t[ak]={textureFormat:On,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[Ve]},t[sk]={textureFormat:On,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[Ve,g2]},t[lk]={textureFormat:On,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[Or]},t[fk]={textureFormat:On,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[At,xn,zk]},t[uk]={textureFormat:On,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[At,xn,Uk]},t[ck]={textureFormat:On,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[At,xn]},t[hk]={textureFormat:On,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[At]},t[dk]={textureFormat:Uo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[Ve]},t[pk]={textureFormat:Uo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[Or]},t[gk]={textureFormat:Uo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[No]},t[mk]={textureFormat:Uo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[iu]},t[bk]={textureFormat:Uo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Li]},t[yk]={textureFormat:Uo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[ou]},t[wk]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Ve]},t[vk]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Ve]},t[xk]={textureFormat:He,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[Or]},t[Ak]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[Ve,p2,Bd]},t[Ek]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[Ve,d2]},t[_k]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Bd]},t[Sk]={textureFormat:He,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[At,xn]},t[Ck]={textureFormat:He,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[At]},t[kk]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ve]},t[Ik]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Or]},t[Tk]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Bd]},t[Bk]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[No]},t[Dk]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[iu]},t[Rk]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[ou]},t[Fk]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Li]},t[Mk]={textureFormat:Ds,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[No,Li]},t[Pk]={textureFormat:Ds,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Li]},t[Lk]={textureFormat:Ds,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[At]},t[Ok]={textureFormat:a2,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Hk]},t[Nk]={textureFormat:a2,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Gk]},Object.keys(t).forEach(function(n){const r=t[n];r.bytesPerElementMap={},r.bytesPerElement.forEach(function(i,o){const a=r.type[o];r.bytesPerElementMap[a]=i})}),Dd=t}return Dd[e]}function Vk(e,t){const n=lu(e);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[t];if(r===void 0)throw"unknown internal format";return r}function Go(e){const t=lu(e);if(!t)throw"unknown internal format";return{format:t.textureFormat,type:t.type[0]}}function m2(e){return(e&e-1)===0}function jk(e,t,n,r){if(!Po(e))return m2(t)&&m2(n);const i=lu(r);if(!i)throw"unknown internal format";return i.colorRenderable&&i.textureFilterable}function qk(e){const t=lu(e);if(!t)throw"unknown internal format";return t.textureFilterable}function b2(e,t,n){return Lo(t)?Ed(t):n||Ve}function fu(e,t,n,r,i){if(i%1!==0)throw"can't guess dimensions";if(!n&&!r){const o=Math.sqrt(i/(t===ir?6:1));o%1===0?(n=o,r=o):(n=i,r=1)}else if(r){if(!n&&(n=i/r,n%1))throw"can't guess dimensions"}else if(r=i/n,r%1)throw"can't guess dimensions";return{width:n,height:r}}function Ho(e,t){t.colorspaceConversion!==void 0&&e.pixelStorei(L5,t.colorspaceConversion),t.premultiplyAlpha!==void 0&&e.pixelStorei(N5,t.premultiplyAlpha),t.flipY!==void 0&&e.pixelStorei(O5,t.flipY)}function y2(e){e.pixelStorei(Td,4),Po(e)&&(e.pixelStorei(l2,0),e.pixelStorei(f2,0),e.pixelStorei(u2,0),e.pixelStorei(c2,0),e.pixelStorei(h2,0))}function Zk(e,t,n,r){r.minMag&&(n.call(e,t,kd,r.minMag),n.call(e,t,Id,r.minMag)),r.min&&n.call(e,t,kd,r.min),r.mag&&n.call(e,t,Id,r.mag),r.wrap&&(n.call(e,t,nu,r.wrap),n.call(e,t,ru,r.wrap),(t===Lr||i5(e,t))&&n.call(e,t,s2,r.wrap)),r.wrapR&&n.call(e,t,s2,r.wrapR),r.wrapS&&n.call(e,t,nu,r.wrapS),r.wrapT&&n.call(e,t,ru,r.wrapT),r.minLod&&n.call(e,t,R5,r.minLod),r.maxLod&&n.call(e,t,F5,r.maxLod),r.baseLevel&&n.call(e,t,M5,r.baseLevel),r.maxLevel&&n.call(e,t,P5,r.maxLevel)}function w2(e,t,n){const r=n.target||rr;e.bindTexture(r,t),Zk(e,r,e.texParameteri,n)}function Wk(e){return e=e||Pr.textureColor,Lo(e)?e:new Uint8Array([e[0]*255,e[1]*255,e[2]*255,e[3]*255])}function Rd(e,t,n,r,i,o){n=n||Pr.textureOptions,o=o||He;const a=n.target||rr;if(r=r||n.width,i=i||n.height,e.bindTexture(a,t),jk(e,r,i,o))e.generateMipmap(a);else{const s=qk(o)?C5:S5;e.texParameteri(a,kd,s),e.texParameteri(a,Id,s),e.texParameteri(a,nu,eu),e.texParameteri(a,ru,eu)}}function Fs(e){return e.auto===!0||e.auto===void 0&&e.level===void 0}function Fd(e,t){return t=t||{},t.cubeFaceOrder||[tu,k5,I5,T5,B5,D5]}function Md(e,t){const r=Fd(e,t).map(function(i,o){return{face:i,ndx:o}});return r.sort(function(i,o){return i.face-o.face}),r}function v2(e,t,n,r){r=r||Pr.textureOptions;const i=r.target||rr,o=r.level||0;let a=n.width,s=n.height;const f=r.internalFormat||r.format||He,l=Go(f),u=r.format||l.format,c=r.type||l.type;if(Ho(e,r),e.bindTexture(i,t),i===ir){const h=n.width,d=n.height;let p,b;if(h/6===d)p=d,b=[0,0,1,0,2,0,3,0,4,0,5,0];else if(d/6===h)p=h,b=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===d/2)p=h/3,b=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===d/3)p=h/2,b=[0,0,1,0,0,1,1,1,0,2,1,2];else throw"can't figure out cube map from element: "+(n.src?n.src:n.nodeName);const y=n2();y?(y.canvas.width=p,y.canvas.height=p,a=p,s=p,Md(e,r).forEach(function(w){const _=b[w.ndx*2+0]*p,C=b[w.ndx*2+1]*p;y.drawImage(n,_,C,p,p,0,0,p,p),e.texImage2D(w.face,o,f,u,c,y.canvas)}),y.canvas.width=1,y.canvas.height=1):typeof createImageBitmap<"u"&&(a=p,s=p,Md(e,r).forEach(function(w){const _=b[w.ndx*2+0]*p,C=b[w.ndx*2+1]*p;e.texImage2D(w.face,o,f,p,p,0,u,c,null),createImageBitmap(n,_,C,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(S){Ho(e,r),e.bindTexture(i,t),e.texImage2D(w.face,o,f,u,c,S),Fs(r)&&Rd(e,t,r,a,s,f)})}))}else if(i===Lr||i===Nr){const h=Math.min(n.width,n.height),d=Math.max(n.width,n.height),p=d/h;if(p%1!==0)throw"can not compute 3D dimensions of element";const b=n.width===d?1:0,y=n.height===d?1:0;e.pixelStorei(Td,1),e.pixelStorei(l2,n.width),e.pixelStorei(f2,0),e.pixelStorei(h2,0),e.texImage3D(i,o,f,h,h,h,0,u,c,null);for(let w=0;w<p;++w){const _=w*h*b,C=w*h*y;e.pixelStorei(u2,_),e.pixelStorei(c2,C),e.texSubImage3D(i,o,0,0,w,h,h,1,u,c,n)}y2(e)}else e.texImage2D(i,o,f,u,c,n);Fs(r)&&Rd(e,t,r,a,s,f),w2(e,t,r)}function Ms(){}function Yk(e){if(typeof document<"u"){const t=document.createElement("a");return t.href=e,t.hostname===location.hostname&&t.port===location.port&&t.protocol===location.protocol}else{const t=new URL(location.href).origin;return new URL(e,location.href).origin===t}}function Qk(e,t){return t===void 0&&!Yk(e)?"anonymous":t}function Xk(e,t,n){n=n||Ms;let r;if(t=t!==void 0?t:Pr.crossOrigin,t=Qk(e,t),typeof Image<"u"){r=new Image,t!==void 0&&(r.crossOrigin=t);const i=function(){r.removeEventListener("error",o),r.removeEventListener("load",a),r=null},o=function(){const f="couldn't load image: "+e;n5(f),n(f,r),i()},a=function(){n(null,r),i()};return r.addEventListener("error",o),r.addEventListener("load",a),r.src=e,r}else if(typeof ImageBitmap<"u"){let i,o;const a=function(){n(i,o)},s={};t&&(s.mode="cors"),fetch(e,s).then(function(f){if(!f.ok)throw f;return f.blob()}).then(function(f){return createImageBitmap(f,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(f){o=f,setTimeout(a)}).catch(function(f){i=f,setTimeout(a)}),r=null}return r}function x2(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof ImageData<"u"&&e instanceof ImageData||typeof HTMLElement<"u"&&e instanceof HTMLElement}function Pd(e,t,n){return x2(e)?(setTimeout(function(){n(null,e)}),e):Xk(e,t,n)}function Ld(e,t,n){n=n||Pr.textureOptions;const r=n.target||rr;if(e.bindTexture(r,t),n.color===!1)return;const i=Wk(n.color);if(r===ir)for(let o=0;o<6;++o)e.texImage2D(tu+o,0,He,1,1,0,He,Ve,i);else r===Lr||r===Nr?e.texImage3D(r,0,He,1,1,1,0,He,Ve,i):e.texImage2D(r,0,He,1,1,0,He,Ve,i)}function $k(e,t,n,r){return r=r||Ms,n=n||Pr.textureOptions,Ld(e,t,n),n=Object.assign({},n),Pd(n.src,n.crossOrigin,function(o,a){o?r(o,t,a):(v2(e,t,a,n),r(null,t,a))})}function Kk(e,t,n,r){r=r||Ms;const i=n.src;if(i.length!==6)throw"there must be 6 urls for a cubemap";const o=n.level||0,a=n.internalFormat||n.format||He,s=Go(a),f=n.format||s.format,l=n.type||Ve,u=n.target||rr;if(u!==ir)throw"target must be TEXTURE_CUBE_MAP";Ld(e,t,n),n=Object.assign({},n);let c=6;const h=[],d=Fd(e,n);let p;function b(y){return function(w,_){--c,w?h.push(w):_.width!==_.height?h.push("cubemap face img is not a square: "+_.src):(Ho(e,n),e.bindTexture(u,t),c===5?Fd().forEach(function(C){e.texImage2D(C,o,a,f,l,_)}):e.texImage2D(y,o,a,f,l,_),Fs(n)&&e.generateMipmap(u)),c===0&&r(h.length?h:void 0,t,p)}}p=i.map(function(y,w){return Pd(y,n.crossOrigin,b(d[w]))})}function Jk(e,t,n,r){r=r||Ms;const i=n.src,o=n.internalFormat||n.format||He,a=Go(o),s=n.format||a.format,f=n.type||Ve,l=n.target||Nr;if(l!==Lr&&l!==Nr)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";Ld(e,t,n),n=Object.assign({},n);let u=i.length;const c=[];let h;const d=n.level||0;let p=n.width,b=n.height;const y=i.length;let w=!0;function _(C){return function(S,T){if(--u,S)c.push(S);else{if(Ho(e,n),e.bindTexture(l,t),w){w=!1,p=n.width||T.width,b=n.height||T.height,e.texImage3D(l,d,o,p,b,y,0,s,f,null);for(let B=0;B<y;++B)e.texSubImage3D(l,d,0,0,B,p,b,1,s,f,T)}else{let B=T,I;(T.width!==p||T.height!==b)&&(I=n2(),B=I.canvas,I.canvas.width=p,I.canvas.height=b,I.drawImage(T,0,0,p,b)),e.texSubImage3D(l,d,0,0,C,p,b,1,s,f,B),I&&B===I.canvas&&(I.canvas.width=0,I.canvas.height=0)}Fs(n)&&e.generateMipmap(l)}u===0&&r(c.length?c:void 0,t,h)}}h=i.map(function(C,S){return Pd(C,n.crossOrigin,_(S))})}function A2(e,t,n,r){r=r||Pr.textureOptions;const i=r.target||rr;e.bindTexture(i,t);let o=r.width,a=r.height,s=r.depth;const f=r.level||0,l=r.internalFormat||r.format||He,u=Go(l),c=r.format||u.format,h=r.type||b2(e,n,u.type);if(Lo(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const y=t5(h);n=new y(n)}const d=Vk(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+Cd(e,c);let b;if(i===Lr||i===Nr)if(!o&&!a&&!s){const y=Math.cbrt(p);if(y%1!==0)throw"can't guess cube size of array of numElements: "+p;o=y,a=y,s=y}else o&&(!a||!s)?(b=fu(e,i,a,s,p/o),a=b.width,s=b.height):a&&(!o||!s)?(b=fu(e,i,o,s,p/a),o=b.width,s=b.height):(b=fu(e,i,o,a,p/s),o=b.width,a=b.height);else b=fu(e,i,o,a,p),o=b.width,a=b.height;if(y2(e),e.pixelStorei(Td,r.unpackAlignment||1),Ho(e,r),i===ir){const y=d/n.BYTES_PER_ELEMENT,w=p/6*y;Md(e,r).forEach(_=>{const C=w*_.ndx,S=n.subarray(C,C+w);e.texImage2D(_.face,f,l,o,a,0,c,h,S)})}else i===Lr||i===Nr?e.texImage3D(i,f,l,o,a,s,0,c,h,n):e.texImage2D(i,f,l,o,a,0,c,h,n);return{width:o,height:a,depth:s,type:h}}function eI(e,t,n){const r=n.target||rr;e.bindTexture(r,t);const i=n.level||0,o=n.internalFormat||n.format||He,a=Go(o),s=n.format||a.format,f=n.type||a.type;if(Ho(e,n),r===ir)for(let l=0;l<6;++l)e.texImage2D(tu+l,i,o,n.width,n.height,0,s,f,null);else r===Lr||r===Nr?e.texImage3D(r,i,o,n.width,n.height,n.depth,0,s,f,null):e.texImage2D(r,i,o,n.width,n.height,0,s,f,null)}function Ps(e,t,n){n=n||Ms,t=t||Pr.textureOptions;const r=e.createTexture(),i=t.target||rr;let o=t.width||1,a=t.height||1;const s=t.internalFormat||He;e.bindTexture(i,r),i===ir&&(e.texParameteri(i,nu,eu),e.texParameteri(i,ru,eu));let f=t.src;if(f)if(typeof f=="function"&&(f=f(e,t)),typeof f=="string")$k(e,r,t,n);else if(Lo(f)||Array.isArray(f)&&(typeof f[0]=="number"||Array.isArray(f[0])||Lo(f[0]))){const l=A2(e,r,f,t);o=l.width,a=l.height}else Array.isArray(f)&&(typeof f[0]=="string"||x2(f[0]))?i===ir?Kk(e,r,t,n):Jk(e,r,t,n):(v2(e,r,f,t),o=f.width,a=f.height);else eI(e,r,t);return Fs(t)&&Rd(e,r,t,o,a,s),w2(e,r,t),r}function tI(e,t,n,r,i,o){r=r||n.width,i=i||n.height,o=o||n.depth;const a=n.target||rr;e.bindTexture(a,t);const s=n.level||0,f=n.internalFormat||n.format||He,l=Go(f),u=n.format||l.format;let c;const h=n.src;if(h&&(Lo(h)||Array.isArray(h)&&typeof h[0]=="number")?c=n.type||b2(e,h,l.type):c=n.type||l.type,a===ir)for(let d=0;d<6;++d)e.texImage2D(tu+d,s,f,r,i,0,u,c,null);else a===Lr||a===Nr?e.texImage3D(a,s,f,r,i,o,0,u,c,null):e.texImage2D(a,s,f,r,i,0,u,c,null)}const nI=Yb,uu=33984,rI=35048,cu=34962,iI=34963,Nd=35345,E2=35718,oI=35721,aI=35971,sI=35382,lI=35396,fI=35398,uI=35392,cI=35395,hu=5126,_2=35664,S2=35665,C2=35666,Od=5124,k2=35667,I2=35668,T2=35669,B2=35670,D2=35671,R2=35672,F2=35673,M2=35674,P2=35675,L2=35676,hI=35678,dI=35680,pI=35679,gI=35682,mI=35685,bI=35686,yI=35687,wI=35688,vI=35689,xI=35690,AI=36289,EI=36292,_I=36293,zd=5125,N2=36294,O2=36295,z2=36296,SI=36298,CI=36299,kI=36300,II=36303,TI=36306,BI=36307,DI=36308,RI=36311,du=3553,pu=34067,Ud=32879,gu=35866,oe={};function U2(e,t){return oe[t].bindPoint}function FI(e,t){return function(n){e.uniform1f(t,n)}}function MI(e,t){return function(n){e.uniform1fv(t,n)}}function PI(e,t){return function(n){e.uniform2fv(t,n)}}function LI(e,t){return function(n){e.uniform3fv(t,n)}}function NI(e,t){return function(n){e.uniform4fv(t,n)}}function G2(e,t){return function(n){e.uniform1i(t,n)}}function H2(e,t){return function(n){e.uniform1iv(t,n)}}function V2(e,t){return function(n){e.uniform2iv(t,n)}}function j2(e,t){return function(n){e.uniform3iv(t,n)}}function q2(e,t){return function(n){e.uniform4iv(t,n)}}function OI(e,t){return function(n){e.uniform1ui(t,n)}}function zI(e,t){return function(n){e.uniform1uiv(t,n)}}function UI(e,t){return function(n){e.uniform2uiv(t,n)}}function GI(e,t){return function(n){e.uniform3uiv(t,n)}}function HI(e,t){return function(n){e.uniform4uiv(t,n)}}function VI(e,t){return function(n){e.uniformMatrix2fv(t,!1,n)}}function jI(e,t){return function(n){e.uniformMatrix3fv(t,!1,n)}}function qI(e,t){return function(n){e.uniformMatrix4fv(t,!1,n)}}function ZI(e,t){return function(n){e.uniformMatrix2x3fv(t,!1,n)}}function WI(e,t){return function(n){e.uniformMatrix3x2fv(t,!1,n)}}function YI(e,t){return function(n){e.uniformMatrix2x4fv(t,!1,n)}}function QI(e,t){return function(n){e.uniformMatrix4x2fv(t,!1,n)}}function XI(e,t){return function(n){e.uniformMatrix3x4fv(t,!1,n)}}function $I(e,t){return function(n){e.uniformMatrix4x3fv(t,!1,n)}}function It(e,t,n,r){const i=U2(e,t);return Po(e)?function(o){let a,s;Jf(e,o)?(a=o,s=null):(a=o.texture,s=o.sampler),e.uniform1i(r,n),e.activeTexture(uu+n),e.bindTexture(i,a),e.bindSampler(n,s)}:function(o){e.uniform1i(r,n),e.activeTexture(uu+n),e.bindTexture(i,o)}}function Tt(e,t,n,r,i){const o=U2(e,t),a=new Int32Array(i);for(let s=0;s<i;++s)a[s]=n+s;return Po(e)?function(s){e.uniform1iv(r,a),s.forEach(function(f,l){e.activeTexture(uu+a[l]);let u,c;Jf(e,f)?(u=f,c=null):(u=f.texture,c=f.sampler),e.bindSampler(n,c),e.bindTexture(o,u)})}:function(s){e.uniform1iv(r,a),s.forEach(function(f,l){e.activeTexture(uu+a[l]),e.bindTexture(o,f)})}}oe[hu]={Type:Float32Array,size:4,setter:FI,arraySetter:MI},oe[_2]={Type:Float32Array,size:8,setter:PI,cols:2},oe[S2]={Type:Float32Array,size:12,setter:LI,cols:3},oe[C2]={Type:Float32Array,size:16,setter:NI,cols:4},oe[Od]={Type:Int32Array,size:4,setter:G2,arraySetter:H2},oe[k2]={Type:Int32Array,size:8,setter:V2,cols:2},oe[I2]={Type:Int32Array,size:12,setter:j2,cols:3},oe[T2]={Type:Int32Array,size:16,setter:q2,cols:4},oe[zd]={Type:Uint32Array,size:4,setter:OI,arraySetter:zI},oe[N2]={Type:Uint32Array,size:8,setter:UI,cols:2},oe[O2]={Type:Uint32Array,size:12,setter:GI,cols:3},oe[z2]={Type:Uint32Array,size:16,setter:HI,cols:4},oe[B2]={Type:Uint32Array,size:4,setter:G2,arraySetter:H2},oe[D2]={Type:Uint32Array,size:8,setter:V2,cols:2},oe[R2]={Type:Uint32Array,size:12,setter:j2,cols:3},oe[F2]={Type:Uint32Array,size:16,setter:q2,cols:4},oe[M2]={Type:Float32Array,size:32,setter:VI,rows:2,cols:2},oe[P2]={Type:Float32Array,size:48,setter:jI,rows:3,cols:3},oe[L2]={Type:Float32Array,size:64,setter:qI,rows:4,cols:4},oe[mI]={Type:Float32Array,size:32,setter:ZI,rows:2,cols:3},oe[bI]={Type:Float32Array,size:32,setter:YI,rows:2,cols:4},oe[yI]={Type:Float32Array,size:48,setter:WI,rows:3,cols:2},oe[wI]={Type:Float32Array,size:48,setter:XI,rows:3,cols:4},oe[vI]={Type:Float32Array,size:64,setter:QI,rows:4,cols:2},oe[xI]={Type:Float32Array,size:64,setter:$I,rows:4,cols:3},oe[hI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:du},oe[dI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:pu},oe[pI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:Ud},oe[gI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:du},oe[AI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:gu},oe[EI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:gu},oe[_I]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:pu},oe[SI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:du},oe[CI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:Ud},oe[kI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:pu},oe[II]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:gu},oe[TI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:du},oe[BI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:Ud},oe[DI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:pu},oe[RI]={Type:null,size:0,setter:It,arraySetter:Tt,bindPoint:gu};function mu(e,t){return function(n){if(n.value)switch(e.disableVertexAttribArray(t),n.value.length){case 4:e.vertexAttrib4fv(t,n.value);break;case 3:e.vertexAttrib3fv(t,n.value);break;case 2:e.vertexAttrib2fv(t,n.value);break;case 1:e.vertexAttrib1fv(t,n.value);break;default:throw new Error("the length of a float constant value must be between 1 and 4!")}else e.bindBuffer(cu,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribPointer(t,n.numComponents||n.size,n.type||hu,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function zr(e,t){return function(n){if(n.value)if(e.disableVertexAttribArray(t),n.value.length===4)e.vertexAttrib4iv(t,n.value);else throw new Error("The length of an integer constant value must be 4!");else e.bindBuffer(cu,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||Od,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function bu(e,t){return function(n){if(n.value)if(e.disableVertexAttribArray(t),n.value.length===4)e.vertexAttrib4uiv(t,n.value);else throw new Error("The length of an unsigned integer constant value must be 4!");else e.bindBuffer(cu,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||zd,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Gd(e,t,n){const r=n.size,i=n.count;return function(o){e.bindBuffer(cu,o.buffer);const a=o.size||o.numComponents||r,s=a/i,f=o.type||hu,u=oe[f].size*a,c=o.normalize||!1,h=o.offset||0,d=u/i;for(let p=0;p<i;++p)e.enableVertexAttribArray(t+p),e.vertexAttribPointer(t+p,s,f,c,u,h+d*p),o.divisor!==void 0&&e.vertexAttribDivisor(t+p,o.divisor)}}const tt={};tt[hu]={size:4,setter:mu},tt[_2]={size:8,setter:mu},tt[S2]={size:12,setter:mu},tt[C2]={size:16,setter:mu},tt[Od]={size:4,setter:zr},tt[k2]={size:8,setter:zr},tt[I2]={size:12,setter:zr},tt[T2]={size:16,setter:zr},tt[zd]={size:4,setter:bu},tt[N2]={size:8,setter:bu},tt[O2]={size:12,setter:bu},tt[z2]={size:16,setter:bu},tt[B2]={size:4,setter:zr},tt[D2]={size:8,setter:zr},tt[R2]={size:12,setter:zr},tt[F2]={size:16,setter:zr},tt[M2]={size:4,setter:Gd,count:2},tt[P2]={size:9,setter:Gd,count:3},tt[L2]={size:16,setter:Gd,count:4};function Z2(e){const t=e.name;return t.startsWith("gl_")||t.startsWith("webgl_")}const KI=/(\.|\[|]|\w+)/g,JI=e=>e>="0"&&e<="9";function W2(e,t,n,r){const i=e.split(KI).filter(s=>s!=="");let o=0,a="";for(;;){const s=i[o++];a+=s;const f=JI(s[0]),l=f?parseInt(s):s;if(f&&(a+=i[o++]),o===i.length){n[l]=t;break}else{const c=i[o++],h=c==="[",d=n[l]||(h?[]:{});n[l]=d,n=d,r[a]=r[a]||function(p){return function(b){X2(p,b)}}(d),a+=c}}}function eT(e,t){let n=0;function r(s,f,l){const u=f.name.endsWith("[0]"),c=f.type,h=oe[c];if(!h)throw new Error(`unknown type: 0x${c.toString(16)}`);let d;if(h.bindPoint){const p=n;n+=f.size,u?d=h.arraySetter(e,c,p,l,f.size):d=h.setter(e,c,p,l,f.size)}else h.arraySetter&&u?d=h.arraySetter(e,l):d=h.setter(e,l);return d.location=l,d}const i={},o={},a=e.getProgramParameter(t,E2);for(let s=0;s<a;++s){const f=e.getActiveUniform(t,s);if(Z2(f))continue;let l=f.name;l.endsWith("[0]")&&(l=l.substr(0,l.length-3));const u=e.getUniformLocation(t,f.name);if(u){const c=r(t,f,u);i[l]=c,W2(l,c,o,i)}}return i}function tT(e,t){const n={},r=e.getProgramParameter(t,aI);for(let i=0;i<r;++i){const o=e.getTransformFeedbackVarying(t,i);n[o.name]={index:i,type:o.type,size:o.size}}return n}function nT(e,t){const n=e.getProgramParameter(t,E2),r=[],i=[];for(let s=0;s<n;++s){i.push(s),r.push({});const f=e.getActiveUniform(t,s);r[s].name=f.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(s){const f=s[0],l=s[1];e.getActiveUniforms(t,i,e[f]).forEach(function(u,c){r[c][l]=u})});const o={},a=e.getProgramParameter(t,sI);for(let s=0;s<a;++s){const f=e.getActiveUniformBlockName(t,s),l={index:e.getUniformBlockIndex(t,f),usedByVertexShader:e.getActiveUniformBlockParameter(t,s,lI),usedByFragmentShader:e.getActiveUniformBlockParameter(t,s,fI),size:e.getActiveUniformBlockParameter(t,s,uI),uniformIndices:e.getActiveUniformBlockParameter(t,s,cI)};l.used=l.usedByVertexShader||l.usedByFragmentShader,o[f]=l}return{blockSpecs:o,uniformData:r}}const Y2=/\[\d+\]\.$/,rT=(e,t)=>((e+(t-1))/t|0)*t;function iT(e,t,n,r){if(t||n){r=r||1;const o=e.length/4;return function(a){let s=0,f=0;for(let l=0;l<o;++l){for(let u=0;u<r;++u)e[s++]=a[f++];s+=4-r}}}else return function(i){i.length?e.set(i):e[0]=i}}function oT(e,t,n,r){const i=n.blockSpecs,o=n.uniformData,a=i[r];if(!a)return nI("no uniform block object named:",r),{name:r,uniforms:{}};const s=new ArrayBuffer(a.size),f=e.createBuffer(),l=a.index;e.bindBuffer(Nd,f),e.uniformBlockBinding(t,a.index,l);let u=r+".";Y2.test(u)&&(u=u.replace(Y2,"."));const c={},h={},d={};return a.uniformIndices.forEach(function(p){const b=o[p];let y=b.name;y.startsWith(u)&&(y=y.substr(u.length));const w=y.endsWith("[0]");w&&(y=y.substr(0,y.length-3));const _=oe[b.type],C=_.Type,S=w?rT(_.size,16)*b.size:_.size*b.size,T=new C(s,b.offset,S/C.BYTES_PER_ELEMENT);c[y]=T;const B=iT(T,w,_.rows,_.cols);h[y]=B,W2(y,B,d,h)}),{name:r,array:s,asFloat:new Float32Array(s),buffer:f,uniforms:c,setters:h}}function Hd(e,t,n){return oT(e,t.program,t.uniformBlockSpec,n)}function Q2(e,t,n){const i=(t.uniformBlockSpec||t).blockSpecs[n.name];if(i){const o=i.index;return e.bindBufferRange(Nd,o,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function Vd(e,t,n){Q2(e,t,n)&&e.bufferData(Nd,n.array,rI)}function Oi(e,t){const n=e.setters;for(const r in t){const i=n[r];if(i){const o=t[r];i(o)}}}function X2(e,t){for(const n in t){const r=e[n];typeof r=="function"?r(t[n]):X2(e[n],t[n])}}function zi(e,...t){const n=e.uniformSetters||e,r=t.length;for(let i=0;i<r;++i){const o=t[i];if(Array.isArray(o)){const a=o.length;for(let s=0;s<a;++s)zi(n,o[s])}else for(const a in o){const s=n[a];s&&s(o[a])}}}function aT(e,t){const n={},r=e.getProgramParameter(t,oI);for(let i=0;i<r;++i){const o=e.getActiveAttrib(t,i);if(Z2(o))continue;const a=e.getAttribLocation(t,o.name),s=tt[o.type],f=s.setter(e,a,s);f.location=a,n[o.name]=f}return n}function sT(e,t){for(const n in t){const r=e[n];r&&r(t[n])}}function Vo(e,t,n){n.vertexArrayObject?e.bindVertexArray(n.vertexArrayObject):(sT(t.attribSetters||t,n.attribs),n.indices&&e.bindBuffer(iI,n.indices))}function lT(e,t){const n=eT(e,t),r=aT(e,t),i={program:t,uniformSetters:n,attribSetters:r};return Po(e)&&(i.uniformBlockSpec=nT(e,t),i.transformFeedbackInfo=tT(e,t)),i}const fT=4,$2=5123;function Ls(e,t,n,r,i,o){n=n===void 0?fT:n;const a=t.indices,s=t.elementType,f=r===void 0?t.numElements:r;i=i===void 0?0:i,s||a?o!==void 0?e.drawElementsInstanced(n,f,s===void 0?$2:t.elementType,i,o):e.drawElements(n,f,s===void 0?$2:t.elementType,i):o!==void 0?e.drawArraysInstanced(n,i,f,o):e.drawArrays(n,i,f)}const uT=36160,Ui=36161,cT=3553,hT=5121,dT=6402,pT=6408,gT=33190,mT=36012,bT=35056,yT=36013,wT=32854,vT=32855,xT=36194,K2=33189,J2=6401,ey=36168,jd=34041,AT=36064,yu=36096,ty=36128,qd=33306,Zd=33071,Wd=9729,ny=[{format:pT,type:hT,min:Wd,wrap:Zd},{format:jd}],An={};An[jd]=qd,An[J2]=ty,An[ey]=ty,An[dT]=yu,An[K2]=yu,An[gT]=yu,An[mT]=yu,An[bT]=qd,An[yT]=qd;function ET(e,t){return An[e]||An[t]}const Ur={};Ur[wT]=!0,Ur[vT]=!0,Ur[xT]=!0,Ur[jd]=!0,Ur[K2]=!0,Ur[J2]=!0,Ur[ey]=!0;function _T(e){return Ur[e]}function ST(e,t,n,r){const i=uT,o=e.createFramebuffer();e.bindFramebuffer(i,o),n=n||e.drawingBufferWidth,r=r||e.drawingBufferHeight,t=t||ny;let a=0;const s={framebuffer:o,attachments:[],width:n,height:r};return t.forEach(function(f){let l=f.attachment;const u=f.samples,c=f.format;let h=f.attachmentPoint||ET(c,f.internalFormat);if(h||(h=AT+a++),!l)if(u!==void 0||_T(c))l=e.createRenderbuffer(),e.bindRenderbuffer(Ui,l),u>1?e.renderbufferStorageMultisample(Ui,u,c,n,r):e.renderbufferStorage(Ui,c,n,r);else{const d=Object.assign({},f);d.width=n,d.height=r,d.auto===void 0&&(d.auto=!1,d.min=d.min||d.minMag||Wd,d.mag=d.mag||d.minMag||Wd,d.wrapS=d.wrapS||d.wrap||Zd,d.wrapT=d.wrapT||d.wrap||Zd),l=Ps(e,d)}if(Qb(e,l))e.framebufferRenderbuffer(i,h,Ui,l);else if(Jf(e,l))f.layer!==void 0?e.framebufferTextureLayer(i,h,l,f.level||0,f.layer):e.framebufferTexture2D(i,h,f.target||cT,l,f.level||0);else throw new Error("unknown attachment type");s.attachments.push(l)}),s}function CT(e,t,n,r,i){r=r||e.drawingBufferWidth,i=i||e.drawingBufferHeight,t.width=r,t.height=i,n=n||ny,n.forEach(function(o,a){const s=t.attachments[a],f=o.format,l=o.samples;if(l!==void 0||Qb(e,s))e.bindRenderbuffer(Ui,s),l>1?e.renderbufferStorageMultisample(Ui,l,f,r,i):e.renderbufferStorage(Ui,f,r,i);else if(Jf(e,s))tI(e,s,o,r,i);else throw new Error("unknown attachment type")})}function kT(e,t,n){const r=e.createVertexArray();return e.bindVertexArray(r),t.length||(t=[t]),t.forEach(function(i){Vo(e,i,n)}),e.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const IT=/^(.*?)_/;function TT(e,t){Cd(e,0);const n=e.getExtension(t);if(n){const r={},i=IT.exec(t)[1],o="_"+i;for(const a in n){const s=n[a],f=typeof s=="function",l=f?i:o;let u=a;a.endsWith(l)&&(u=a.substring(0,a.length-l.length)),e[u]!==void 0?!f&&e[u]!==s&&Yb(u,e[u],s,a):f?e[u]=function(c){return function(){return c.apply(n,arguments)}}(s):(e[u]=s,r[u]=s)}r.constructor={name:n.constructor.name},Cd(r,0)}return n}const ry=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_color_buffer_float","EXT_color_buffer_half_float","EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2","EXT_frag_depth","EXT_sRGB","EXT_shader_texture_lod","EXT_texture_filter_anisotropic","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_compressed_texture_atc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_pvrtc","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_depth_texture","WEBGL_draw_buffers"];function iy(e){for(let t=0;t<ry.length;++t)TT(e,ry[t])}function BT(e,t){const n=["webgl2","webgl","experimental-webgl"];let r=null;for(let i=0;i<n.length;++i)if(r=e.getContext(n[i],t),r){iy(r);break}return r}function DT(e,t){return BT(e,t)}const RT=`uniform Mark{uniform float uMinWidth;uniform float uMinHeight;uniform float uMinOpacity;uniform float uCornerRadiusTopRight;uniform float uCornerRadiusBottomRight;uniform float uCornerRadiusTopLeft;uniform float uCornerRadiusBottomLeft;};/***The vertex position wrt the rectangle specified by(x,x2,y,y2).*[0,0]=[x,y],[1,1]=[x2,y2].*The x or y component may contain fractional values if the rectangle*have been tessellated.*/in vec2 frac;out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
|
|
128
128
|
#if defined(ROUNDED_CORNERS) || defined(STROKED)
|
|
129
129
|
out vec2 vPosInPixels;
|
|
130
130
|
#endif
|
|
131
|
-
out vec2 vHalfSizeInPixels;/***Clamps the minimumSize and returns an opacity that reflects the amount of clamping.*/float clampMinSize(inout float pos,float frac,float size,float minSize){if(minSize>0.0&&abs(size)<minSize){pos+=(frac-0.5)*(minSize*sign(size)-size);return abs(size)/minSize;}return 1.0;}void sort(inout float a,inout float b){if(a>b){float tmp=b;b=a;a=tmp;}}void main(void){vec2 normalizedMinSize=
|
|
131
|
+
out vec2 vHalfSizeInPixels;/***Clamps the minimumSize and returns an opacity that reflects the amount of clamping.*/float clampMinSize(inout float pos,float frac,float size,float minSize){if(minSize>0.0&&abs(size)<minSize){pos+=(frac-0.5)*(minSize*sign(size)-size);return abs(size)/minSize;}return 1.0;}void sort(inout float a,inout float b){if(a>b){float tmp=b;b=a;a=tmp;}}void main(void){vec2 normalizedMinSize=vec2(uMinWidth,uMinHeight)/uViewportSize;vec4 cornerRadii=vec4(uCornerRadiusTopRight,uCornerRadiusBottomRight,uCornerRadiusBottomLeft,uCornerRadiusTopLeft);float x=getScaled_x();float x2=getScaled_x2();float y=getScaled_y();float y2=getScaled_y2();sort(x,x2);sort(y,y2);float clampMargin=1.0;vec2 pos1=vec2(clamp(x,0.0-clampMargin,1.0+clampMargin),y);vec2 pos2=vec2(clamp(x2,0.0-clampMargin,1.0+clampMargin),y2);vec2 size=pos2-pos1;if(size.x<=0.0||size.y<=0.0){gl_Position=vec4(0.0,0.0,0.0,1.0);return;}vec2 pos=pos1+frac*size;size.y*=getSampleFacetHeight(pos);float opaFactor=uViewOpacity*max(uMinOpacity,clampMinSize(pos.x,frac.x,size.x,normalizedMinSize.x)*clampMinSize(pos.y,frac.y,size.y,normalizedMinSize.y));pos=applySampleFacet(pos);
|
|
132
132
|
#if defined(ROUNDED_CORNERS) || defined(STROKED)
|
|
133
|
-
float aaPadding=1.0/uDevicePixelRatio;float strokeWidth=getScaled_strokeWidth();float strokeOpacity=getScaled_strokeOpacity()*opaFactor;vec2 centeredFrac=frac-0.5;vec2 expand=centeredFrac*(strokeWidth+aaPadding)/uViewportSize;pos+=expand;vec2 sizeInPixels=size*uViewportSize;vPosInPixels=(centeredFrac+expand/size)*sizeInPixels;vHalfSizeInPixels=sizeInPixels/2.0;vCornerRadii=min(
|
|
133
|
+
float aaPadding=1.0/uDevicePixelRatio;float strokeWidth=getScaled_strokeWidth();float strokeOpacity=getScaled_strokeOpacity()*opaFactor;vec2 centeredFrac=frac-0.5;vec2 expand=centeredFrac*(strokeWidth+aaPadding)/uViewportSize;pos+=expand;vec2 sizeInPixels=size*uViewportSize;vPosInPixels=(centeredFrac+expand/size)*sizeInPixels;vHalfSizeInPixels=sizeInPixels/2.0;vCornerRadii=min(cornerRadii,min(vHalfSizeInPixels.x,vHalfSizeInPixels.y));vHalfStrokeWidth=strokeWidth/2.0;vStrokeColor=vec4(getScaled_stroke()*strokeOpacity,strokeOpacity);
|
|
134
134
|
#endif
|
|
135
|
-
gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,
|
|
135
|
+
gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,FT=`#if defined(ROUNDED_CORNERS) || defined(STROKED)
|
|
136
136
|
in vec2 vPosInPixels;
|
|
137
137
|
#endif
|
|
138
138
|
in vec2 vHalfSizeInPixels;in lowp vec4 vFillColor;in lowp vec4 vStrokeColor;in float vHalfStrokeWidth;in vec4 vCornerRadii;out lowp vec4 fragColor;float sdRoundedBox(vec2 p,vec2 b,vec4 r){r.xy=p.x>0.0 ? r.xy : r.zw;r.x=p.y>0.0 ? r.x : r.y;vec2 q=abs(p)-b+r.x;return min(max(q.x,q.y),0.0)+length(max(q,0.0))-r.x;}float sdSharpBox(vec2 p,vec2 b){vec2 q=abs(p)-b;return max(q.x,q.y);}void main(void){
|
|
@@ -146,20 +146,20 @@ fragColor=distanceToColor(d,vFillColor,vStrokeColor,vHalfStrokeWidth);if(fragCol
|
|
|
146
146
|
#else
|
|
147
147
|
fragColor=vFillColor;
|
|
148
148
|
#endif
|
|
149
|
-
if(uPickingEnabled){fragColor=vPickingColor;}}`,
|
|
149
|
+
if(uPickingEnabled){fragColor=vPickingColor;}}`,Yd="attr_",oy="uDomain_",MT="range_",ay="scale_",sy="getScaled_",Qd="uRangeTexture_",ly=3402823466e29;function PT(e){const t=e.match(/^(?:(\w+)-)?(\w+)$/);if(!t)throw new Error("Not a scale type: "+e);return{family:t[1]||"continuous",transform:t[2]}}function LT(e,t){let n;if($f(e))n=Gi(Zb(e)(t));else if(Pe(t))if(Mi(e))n=OT(t);else throw new Error(`String values are not supported on the "${e}" channel: ${t}`);else if(La(t))n=Gi(t?1:0);else if(t===null)if(Mi(e))n=Gi([0,0,0]);else throw new Error(`null value is not supported on the "${e}" chanel.`);else n=Gi(t);return`
|
|
150
150
|
#define ${e}_DEFINED
|
|
151
|
-
${n.type} ${
|
|
151
|
+
${n.type} ${sy}${e}() {
|
|
152
152
|
// Constant value
|
|
153
153
|
return ${n};
|
|
154
|
-
}`}function
|
|
155
|
-
${y} ${
|
|
156
|
-
${
|
|
154
|
+
}`}function NT(e,t,n){if(vn(n))throw new Error(`Cannot create scale for "value": ${JSON.stringify(n)}`);if(!t)throw new Error("Scale is undefined");const r=Fi(e),i=Yd+e,o=oy+r,a=MT+r,s=wu(t.type),f=s?"vec2":"float",l=t.domain?t.domain().length:void 0;let u;const c=[];c.push(""),c.push("/".repeat(70)),c.push(`// Channel: ${e}`),c.push(""),c.push(`#define ${e}_DEFINED`);const{transform:h}=PT(t.type),d=(I,...F)=>zT.apply(null,[I,"value",...F]);let p;switch(h){case"linear":p=d("scaleLinear","domain",a);break;case"log":p=d("scaleLog","domain",a,t.base());break;case"symlog":p=d("scaleSymlog","domain",a,t.constant());break;case"pow":case"sqrt":p=d("scalePow","domain",a,t.exponent());break;case"index":case"locus":p=d("scaleBandHp","domain",a,t.paddingInner(),t.paddingOuter(),t.align(),n.band??.5);break;case"point":case"band":p=d("scaleBand","domain",a,t.paddingInner(),t.paddingOuter(),t.align(),n.band??.5);break;case"ordinal":case"null":case"identity":p=d("scaleIdentity");break;case"threshold":break;default:throw new Error(`Unsupported scale type: ${t.type}! ${e}: ${JSON.stringify(n)}`)}const b=Yf(t.type)||xt(t.type)&&Mi(e)?[0,1]:t.range?t.range():void 0;if(b&&e==r&&b.length&&b.every(kt)){const I=fy(b);c.push(`const ${I.type} ${a} = ${I};`)}const y=Mi(e)?"vec3":"float";let w;if(Mi(e)){const I=Qd+r;if(e==r&&c.push(`uniform sampler2D ${I};`),xt(t.type))w=`getInterpolatedColor(${I}, transformed)`;else if(Mr(t.type)||Fo(t.type))w=`getDiscreteColor(${I}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(t.type==="ordinal"||Fo(t.type)){const I=Qd+r;e==r&&c.push(`uniform sampler2D ${I};`),w=`getDiscreteColor(${I}, int(transformed)).r`}ks(n)?c.push(`uniform highp ${f} ${i};`):c.push(`in highp ${f} ${i};`);const _=[],C=xt(t.type)&&l>2,S=Fo(t.type)||C;if(_.push("int slot = 0;"),S){const I=o;_.push(C?`while (slot < ${I}.length() - 2 && value >= ${I}[slot + 1]) { slot++; }`:`while (slot < ${I}.length() && value >= ${I}[slot]) { slot++; }`)}const T=xt(t.type)||Fo(t.type)||["band","point"].includes(t.type);if(p){const I=o;T&&(s?_.push(`vec3 domain = ${I};`):_.push(`vec2 domain = vec2(${I}[slot], ${I}[slot + 1]);`)),_.push(`float transformed = ${p};`),C&&_.push(`transformed = (float(slot) + transformed) / (float(${I}.length() - 1));`)}else _.push("float transformed = float(slot);");"clamp"in t&&t.clamp()&&_.push(`transformed = clampToRange(transformed, ${fy(b)});`),_.push(`return ${w??"transformed"};`),c.push(`
|
|
155
|
+
${y} ${ay}${e}(${f} value) {
|
|
156
|
+
${_.map(I=>` ${I}
|
|
157
157
|
`).join("")}
|
|
158
158
|
}`),c.push(`
|
|
159
|
-
${y} ${
|
|
160
|
-
return ${
|
|
159
|
+
${y} ${sy}${e}() {
|
|
160
|
+
return ${ay}${e}(${i});
|
|
161
161
|
}`);const B=c.join(`
|
|
162
|
-
`);if(
|
|
162
|
+
`);if(T&&e==r){const I=xt(t.type)||Fo(t.type)?l:2;u=s?`highp vec3 ${o};`:`mediump float ${o}[${I}];`}return{glsl:B,domainUniform:u}}function Xd(e){if(!kt(e))throw new Error(`Not a number: ${e}`);if(e==1/0)return""+ly;if(e==-1/0)return""+-ly;{let t=`${e}`;return/^(-)?\d+$/.test(t)&&(t+=".0"),t}}function Gi(e){typeof e=="number"&&(e=[e]);const t=e.length;if(t<1||t>4)throw new Error("Invalid number of components: "+t);let n,r;return t>1?(n=`vec${t}`,r=`${n}(${e.map(Xd).join(", ")})`):(n="float",r=Xd(e[0])),Object.assign(r,{type:n,numComponents:t})}function OT(e){const t=Br(e).rgb();return Gi([t.r,t.g,t.b].map(n=>n/255))}function fy(e){return Gi([e[0],ss(e)])}function zT(e,...t){const n=[];for(const r of t)kt(r)?n.push(Xd(r)):Ft(r)?n.push(Gi(r)):n.push(r);return`${e}(${n.join(", ")})`}function wu(e){return e=="index"||e=="locus"}const uy=2**11,UT=uy-1;function cy(e,t=[]){const n=e&UT,r=e-n;return t[0]=r,t[1]=n,t}function GT(e){const t=e%uy;return[e-t,t]}function HT(e){return[...GT(e[0]),e[1]-e[0]]}class VT{constructor(t){this.size=t,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}addConverter(t,n){const r=this.createUpdater(Yd+t,n.numComponents||1,n.arrayReference),i=n.f;this.dataUpdaters.push(n.arrayReference?o=>r(i(o)):o=>r(i(o)))}createUpdater(t,n,r){if(!kt(this.size))throw new Error("The number of vertices must be defined!");let i,o,a=0;const s=new Float32Array(this.size*n);if(this.arrays[t]={data:s,numComponents:n},n==1){let f=0;const l=u=>{f=+u};i=()=>{s[a++]=f},o=l}else{let f=r??[0];const l=r?u=>{}:u=>{f=u};switch(n){case 1:break;case 2:i=()=>{s[a++]=f[0],s[a++]=f[1]},o=l;break;case 3:i=()=>{s[a++]=f[0],s[a++]=f[1],s[a++]=f[2]},o=l;break;case 4:i=()=>{s[a++]=f[0],s[a++]=f[1],s[a++]=f[2],s[a++]=f[3]},o=l;break;default:throw new Error("Invalid numComponents: "+n)}}return this.pushers.push(i),o}_unrollPushAll(){let t="",n="";for(let i=0;i<this.pushers.length;i++)t+=`const p${i} = that.pushers[${i}];
|
|
163
163
|
`,n+=`p${i}();
|
|
164
164
|
`;const r=new Function("that",`${t}
|
|
165
165
|
|
|
@@ -167,8 +167,8 @@ ${y} ${Y2}${e}() {
|
|
|
167
167
|
${n}
|
|
168
168
|
that.vertexCount++;
|
|
169
169
|
};
|
|
170
|
-
`);this.pushAll=r(this)}pushAll(){this.size>1e5?this._unrollPushAll():this.pushAll=()=>{for(let n=0;n<this.pushers.length;n++)this.pushers[n]();this.vertexCount++},this.pushAll()}updateFromDatum(t){for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](t)}pushFromDatum(t){this.updateFromDatum(t),this.pushAll()}}const
|
|
171
|
-
uniform View{mediump vec2 uViewOffset;mediump vec2 uViewScale;mediump vec2 uViewportSize;lowp float uDevicePixelRatio;lowp float uViewOpacity;bool uPickingEnabled;};/***Maps a coordinate on the unit scale to a normalized device coordinate.*(0,0)is at the bottom left corner.*/vec4 unitToNdc(vec2 coord){return vec4((coord*uViewScale+uViewOffset)*2.0-1.0,0.0,1.0);}vec4 unitToNdc(float x,float y){return unitToNdc(vec2(x,y));}vec4 pixelsToNdc(vec2 coord){return unitToNdc(coord/uViewportSize);}vec4 pixelsToNdc(float x,float y){return pixelsToNdc(vec2(x,y));}float linearstep(float edge0,float edge1,float x){return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}/***Specialized linearstep for doing antialiasing*/float distanceToRatio(float d){return clamp(d*uDevicePixelRatio+0.5,0.0,1.0);}vec4 distanceToColor(float d,vec4 fill,vec4 stroke,float halfStrokeWidth){if(halfStrokeWidth>0.0){float sd=abs(d)-halfStrokeWidth;return mix(stroke,d<=0.0 ? fill : vec4(0.0),distanceToRatio(sd));}else{return fill*distanceToRatio(-d);}}
|
|
170
|
+
`);this.pushAll=r(this)}pushAll(){this.size>1e5?this._unrollPushAll():this.pushAll=()=>{for(let n=0;n<this.pushers.length;n++)this.pushers[n]();this.vertexCount++},this.pushAll()}updateFromDatum(t){for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](t)}pushFromDatum(t){this.updateFromDatum(t),this.pushAll()}}const jo=5,$d=127;function Kd(e){const t=[];for(let p=0;p<=$d;p++)t.push(void 0);const n=new Map;for(const p of e.chars)p.id<=$d?t[p.id]=p:n.set(p.id,p);const r=8722;n.has(r)||n.set(r,t["-".charCodeAt(0)]);function i(p){return(p<=$d?t[p]:n.get(p))||t[63]}function o(p){return i(p.charCodeAt(0))}const a=e.common.base,s=o("x"),f=o("X"),l=o("q"),u=s.height-jo*2,c=f.height-jo*2,h=l.height-s.height+l.yoffset-s.yoffset;function d(p,b=1){let y=0;for(let w=0;w<p.length;w++)y+=i(p.charCodeAt(w)).xadvance;return y/a*b}return{measureWidth:d,getCharByCode:i,getChar:o,xHeight:u,capHeight:c,descent:h,common:e.common}}const hy=2**31-1,jT=-(2**31);function qT(e,t,n,r=n){const i=new Int32Array(e);i.fill(hy);let o=jT,a=!1;const s=new Int32Array(e),f=t[0],u=(t[1]-t[0])/e,c=(y,w)=>{const _=(y-f)/u,C=Math.floor(_);return gs(w&&C==_?C-1:C,0,e-1)};function h(y,w,_){w>o?o=w:a||(a=!0,console.debug("Items are not ordered properly. Disabling binned index."));const C=n(y),S=c(C,!1);i[S]>w&&(i[S]=w),s[S]<_&&(s[S]=_)}function d(y,w,_){w>o?o=w:a||(a=!0,console.debug("Items are not ordered properly. Disabling binned index."));const C=n(y),S=r(y),T=c(C,!1),B=c(S,!0);for(let I=T;I<=B;I++)i[I]>w&&(i[I]=w),s[I]<_&&(s[I]=_)}const p=(y,w,_=[0,0])=>{const C=c(y,!1),S=c(w,!0),T=i[C],B=Math.max(s[S],T);return _[0]=T,_[1]=B,_},b=()=>{for(let w=1;w<s.length;w++)s[w]<s[w-1]&&(s[w]=s[w-1]);let y=!0;for(let w=i.length-1;w>0;w--)y&&i[w]==hy?(i[w]=s[w],y=!1):i[w-1]>i[w]&&(i[w-1]=i[w]);return p};if(h.getIndex=b,d.getIndex=b,!a)return n==r?h:d}class Ns{constructor({encoders:t,numVertices:n=void 0,attributes:r=[]}){this.encoders=t,this.variableEncoders=Object.fromEntries(Object.entries(t).filter(([i,o])=>r.includes(i)&&o&&o.scale&&!o.constant)),this.allocatedVertices=n,this.variableBuilder=new VT(n);for(const[i,o]of Object.entries(this.variableEncoders)){const a=o.accessor,s=[0,0],f=wu(o.scale.type),l=o.indexer,u=l?c=>l(a(c)):f?c=>cy(a(c),s):a;this.variableBuilder.addConverter(i,{f:u,numComponents:f?2:1,arrayReference:f?s:void 0})}this.lastOffset=0,this.rangeMap=new gi([],JSON.stringify)}registerBatch(t){var o;const n=this.lastOffset,r=this.variableBuilder.vertexCount,i=r-n;i&&this.rangeMap.set(t,{offset:n,count:i,xIndex:(o=this.xIndexer)==null?void 0:o.getIndex()}),this.lastOffset=r}addBatches(t){for(const[n,r]of t)this.addBatch(n,r)}addBatch(t,n,r=0,i=n.length){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const a=n[o];this.variableBuilder.pushFromDatum(a),this.addToXIndex(a)}this.registerBatch(t)}prepareXIndexer(t,n=0,r=n+t.length){const i=()=>{this.addToXIndex=f=>{},this.xIndexer=void 0};if(!t.length||r-n<0){i();return}const o=f=>{var l;return f&&xt((l=f.scale)==null?void 0:l.type)&&f},a=o(this.variableEncoders.x),s=o(this.variableEncoders.x2);if(a){const f=a.accessor,l=s?s.accessor:f,u=[f(t[n]),l(t[r-1])];if(u[1]>u[0]){this.xIndexer=qT(50,u,f,l);let c=this.variableBuilder.vertexCount;this.addToXIndex=h=>{let d=this.variableBuilder.vertexCount;this.xIndexer(h,c,d),c=d}}else i()}else i()}addToXIndex(t){}toArrays(){return{arrays:this.variableBuilder.arrays,vertexCount:this.variableBuilder.vertexCount,allocatedVertices:this.allocatedVertices,rangeMap:this.rangeMap}}}class ZT extends Ns{constructor({encoders:t,attributes:n,tessellationThreshold:r=1/0,visibleRange:i=[-1/0,1/0],numItems:o}){super({encoders:t,attributes:n,numVertices:r==1/0?o*6:void 0}),this.visibleRange=i,this.tessellationThreshold=r||1/0,this.updateFrac=this.variableBuilder.createUpdater("frac",2)}addBatch(t,n,r=0,i=n.length){if(i<=r)return;const o=this.encoders,[a,s]=this.visibleRange,f=h=>h.accessor||(d=>0),l=f(o.x),u=f(o.x2);this.prepareXIndexer(n,r,i);const c=[0,0];this.updateFrac(c);for(let h=r;h<i;h++){const d=n[h];let p=l(d),b=u(d);if(p>b&&([p,b]=[b,p]),b<a||p>s)continue;p<a&&(p=a),b>s&&(b=s),this.variableBuilder.updateFromDatum(d),c[0]=0,c[1]=0;const y=1;this.variableBuilder.pushAll();for(let w=0;w<=y;w++)c[0]=w/y,c[1]=0,this.variableBuilder.pushAll(),c[1]=1,this.variableBuilder.pushAll();this.variableBuilder.pushAll(),this.addToXIndex(d)}this.registerBatch(t)}}class WT extends Ns{constructor({encoders:t,attributes:n,tessellationThreshold:r=1/0,visibleRange:i=[-1/0,1/0],numItems:o}){super({encoders:t,attributes:n,numVertices:r==1/0?o*6:void 0}),this.visibleRange=i,this.tessellationThreshold=r||1/0,this.updateSide=this.variableBuilder.createUpdater("side",1),this.updatePos=this.variableBuilder.createUpdater("pos",1)}addBatch(t,n,r=0,i=n.length){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const a=n[o];this.variableBuilder.updateFromDatum(a),this.updateSide(-.5),this.updatePos(0),this.variableBuilder.pushAll();const s=1;for(let f=0;f<=s;f++)this.updatePos(f/s),this.updateSide(-.5),this.variableBuilder.pushAll(),this.updateSide(.5),this.variableBuilder.pushAll();this.variableBuilder.pushAll(),this.addToXIndex(a)}this.registerBatch(t)}}class YT extends Ns{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r})}}class QT extends Ns{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r})}toArrays(){const t=this.variableBuilder.arrays;for(let n of Object.values(t))n.divisor=1;return super.toArrays()}}class XT extends Ns{constructor({encoders:t,attributes:n,fontMetrics:r,properties:i,numCharacters:o=void 0}){super({encoders:t,attributes:n,numVertices:o*6}),this.metadata=r,this.metrics=r,this.properties=i;const s=t.text.channelDef;this.numberFormat=!vn(s)&&"format"in s&&s.format?pt(s.format):f=>f,this.updateVertexCoord=this.variableBuilder.createUpdater("vertexCoord",2),this.updateTextureCoord=this.variableBuilder.createUpdater("textureCoord",2),this.updateWidth=this.variableBuilder.createUpdater("width",1)}addBatch(t,n,r=0,i=n.length){const o=this.properties.align||"left",a=this.properties.logoLetters??!1,s=this.metadata.common.base,f=this.metadata.common.scaleH;let l=-jo;switch(this.properties.baseline){case"top":l+=this.metrics.capHeight;break;case"middle":l+=this.metrics.capHeight/2;break;case"bottom":l-=this.metrics.descent;break}const u=this.encoders.text.accessor||this.encoders.text,c=[0,0];this.updateVertexCoord(c);const h=[0,0];this.updateTextureCoord(h),this.prepareXIndexer(n,r,i);for(let d=r;d<i;d++){const p=n[d],b=this.numberFormat(u(p)),y=Pe(b)?b:b===null?"":""+b;if(y.length==0)continue;this.variableBuilder.updateFromDatum(p);const w=a?y.length:this.metrics.measureWidth(y);this.updateWidth(w);let _=o=="right"?-w:o=="center"?-w/2:0;if(!a){const B=this.metrics.getCharByCode(y.charCodeAt(0));_-=(B.width-B.xadvance)/s/2}let C=-.5,S=1,T=1;for(let B=0;B<y.length;B++){const I=this.metrics.getCharByCode(y.charCodeAt(B)),F=a?1:I.xadvance/s;if(I.id==32){_+=F;continue}a?(T=(I.width+jo*2)/I.width,_=-T/2,S=(I.height+jo*2)/I.height,C=-.5-jo/I.height):(S=I.height/s,C=-(I.height+I.yoffset+l)/s,T=I.width/s);const P=I.x,j=I.y;c[0]=_,c[1]=C+S,h[0]=P/f,h[1]=j/f,this.variableBuilder.pushAll(),c[0]=_+T,c[1]=C+S,h[0]=(P+I.width)/f,h[1]=j/f,this.variableBuilder.pushAll(),c[0]=_,c[1]=C,h[0]=P/f,h[1]=(j+I.height)/f,this.variableBuilder.pushAll(),c[0]=_+T,c[1]=C+S,h[0]=(P+I.width)/f,h[1]=j/f,this.variableBuilder.pushAll(),c[0]=_,c[1]=C,h[0]=P/f,h[1]=(j+I.height)/f,this.variableBuilder.pushAll(),c[0]=_+T,c[1]=C,h[0]=(P+I.width)/f,h[1]=(j+I.height)/f,this.variableBuilder.pushAll(),_+=F}this.addToXIndex(p)}this.registerBatch(t)}}const dy=`#define PI 3.141593
|
|
171
|
+
uniform View{mediump vec2 uViewOffset;mediump vec2 uViewScale;mediump vec2 uViewportSize;lowp float uDevicePixelRatio;lowp float uViewOpacity;bool uPickingEnabled;};/***Maps a coordinate on the unit scale to a normalized device coordinate.*(0,0)is at the bottom left corner.*/vec4 unitToNdc(vec2 coord){return vec4((coord*uViewScale+uViewOffset)*2.0-1.0,0.0,1.0);}vec4 unitToNdc(float x,float y){return unitToNdc(vec2(x,y));}vec4 pixelsToNdc(vec2 coord){return unitToNdc(coord/uViewportSize);}vec4 pixelsToNdc(float x,float y){return pixelsToNdc(vec2(x,y));}float linearstep(float edge0,float edge1,float x){return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}/***Specialized linearstep for doing antialiasing*/float distanceToRatio(float d){return clamp(d*uDevicePixelRatio+0.5,0.0,1.0);}vec4 distanceToColor(float d,vec4 fill,vec4 stroke,float halfStrokeWidth){if(halfStrokeWidth>0.0){float sd=abs(d)-halfStrokeWidth;return mix(stroke,d<=0.0 ? fill : vec4(0.0),distanceToRatio(sd));}else{return fill*distanceToRatio(-d);}}`,$T="uniform highp float uZero;vec3 getDiscreteColor(sampler2D s,int index){return texelFetch(s,ivec2(index % textureSize(s,0).x,0),0).rgb;}vec3 getInterpolatedColor(sampler2D s,float unitValue){return texture(s,vec2(unitValue,0.0)).rgb;}float clampToRange(float value,vec2 range){return clamp(value,min(range[0],range[1]),max(range[0],range[1]));}float scaleIdentity(float value){return value;}float scaleLinear(float value,vec2 domain,vec2 range){float domainSpan=domain[1]-domain[0];float rangeSpan=range[1]-range[0];return(value-domain[0])/domainSpan*rangeSpan+range[0];}float scaleLog(float value,vec2 domain,vec2 range,float base){return scaleLinear(log(value)/log(base),log(domain)/log(base),range);}float symlog(float value,float constant){return sign(value)*log(abs(value/constant)+1.0);}float scaleSymlog(float value,vec2 domain,vec2 range,float constant){return scaleLinear(symlog(value,constant),vec2(symlog(domain[0],constant),symlog(domain[1],constant)),range);}float scalePow(float value,vec2 domain,vec2 range,float exponent){return scaleLinear(pow(abs(value),exponent)*sign(value),pow(abs(domain),vec2(exponent))*sign(domain),range);}float scaleBand(float value,vec2 domainExtent,vec2 range,float paddingInner,float paddingOuter,float align,float band){float start=range[0];float stop=range[1];float rangeSpan=stop-start;float n=domainExtent[1]-domainExtent[0];paddingInner=int(n)>1 ? paddingInner : 0.0;float step=rangeSpan/max(1.0,n-paddingInner+paddingOuter*2.0);start+=(rangeSpan-step*(n-paddingInner))*align;float bandwidth=step*(1.0-paddingInner);return start+(value-domainExtent[0])*step+bandwidth*band;}float scaleBandHp(vec2 value,vec3 domainExtent,vec2 range,float paddingInner,float paddingOuter,float align,float band){float start=range[0];float stop=range[1];float rangeSpan=stop-start;vec2 domainStart=domainExtent.xy;float n=domainExtent[2];float step=rangeSpan/max(1.0,n-paddingInner+paddingOuter*2.0);start+=(rangeSpan-step*(n-paddingInner))*align;float bandwidth=step*(1.0-paddingInner);float inf=1.0/uZero;float hi=max(value[0]-domainStart[0],-inf);float lo=max(value[1]-domainStart[1],-inf);return dot(vec4(start,hi,lo,bandwidth),vec4(1.0,step,step,band));}",KT=`/***Describes where a sample facet should be shown. Interpolating between the*current and target positions/heights allows for transitioning between facet*configurations.*/struct SampleFacetPosition{float pos;float height;float targetPos;float targetHeight;};/***Trasition fraction[0,1]between the current and target configurations.*/uniform float uTransitionOffset;
|
|
172
172
|
#if !defined(SAMPLE_FACET_UNIFORM) && !defined(SAMPLE_FACET_TEXTURE)
|
|
173
173
|
SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1.0);}
|
|
174
174
|
#elif defined(SAMPLE_FACET_UNIFORM)
|
|
@@ -176,43 +176,36 @@ SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1
|
|
|
176
176
|
#elif defined(SAMPLE_FACET_TEXTURE)
|
|
177
177
|
uniform sampler2D uSampleFacetTexture;SampleFacetPosition getSampleFacetPos(){vec4 texel=texelFetch(uSampleFacetTexture,ivec2(int(attr_facetIndex),0),0);return SampleFacetPosition(1.0-texel.r-texel.g,texel.g,1.0-texel.r-texel.g,texel.g);}
|
|
178
178
|
#endif
|
|
179
|
-
bool isFacetedSamples(SampleFacetPosition facetPos){return facetPos!=SampleFacetPosition(0.0,1.0,0.0,1.0);}bool isFacetedSamples(){return isFacetedSamples(getSampleFacetPos());}bool isInTransit(){return uTransitionOffset>0.0;}float getTransitionFraction(float xPos){return smoothstep(0.0,0.7+uTransitionOffset,(xPos-uTransitionOffset)*2.0);}vec2 applySampleFacet(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return pos;}else if(isInTransit()){vec2 interpolated=mix(vec2(facetPos.pos,facetPos.height),vec2(facetPos.targetPos,facetPos.targetHeight),getTransitionFraction(pos.x));return vec2(pos.x,interpolated[0]+pos.y*interpolated[1]);}else{return vec2(pos.x,facetPos.pos+pos.y*facetPos.height);}}float getSampleFacetHeight(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return 1.0;}else if(isInTransit()){return mix(facetPos.height,facetPos.targetHeight,getTransitionFraction(pos.x));}else{return facetPos.height;}}`,
|
|
179
|
+
bool isFacetedSamples(SampleFacetPosition facetPos){return facetPos!=SampleFacetPosition(0.0,1.0,0.0,1.0);}bool isFacetedSamples(){return isFacetedSamples(getSampleFacetPos());}bool isInTransit(){return uTransitionOffset>0.0;}float getTransitionFraction(float xPos){return smoothstep(0.0,0.7+uTransitionOffset,(xPos-uTransitionOffset)*2.0);}vec2 applySampleFacet(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return pos;}else if(isInTransit()){vec2 interpolated=mix(vec2(facetPos.pos,facetPos.height),vec2(facetPos.targetPos,facetPos.targetHeight),getTransitionFraction(pos.x));return vec2(pos.x,interpolated[0]+pos.y*interpolated[1]);}else{return vec2(pos.x,facetPos.pos+pos.y*facetPos.height);}}float getSampleFacetHeight(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return 1.0;}else if(isInTransit()){return mix(facetPos.height,facetPos.targetHeight,getTransitionFraction(pos.x));}else{return facetPos.height;}}`,JT=`/**Based on concepts presented at:*https:*https:*/out highp vec4 vPickingColor;/***Passes the unique id to the fragment shader as a color if picking is enabled.*Returns true if picking is enabled.*/bool setupPicking(){if(uPickingEnabled){
|
|
180
180
|
#ifdef uniqueId_DEFINED
|
|
181
181
|
int id=int(getScaled_uniqueId());vPickingColor=vec4(ivec4(id>>0,id>>8,id>>16,0xFF)&0xFF)/float(0xFF);
|
|
182
182
|
#else
|
|
183
183
|
vPickingColor=vec4(1.0);
|
|
184
184
|
#endif
|
|
185
|
-
return true;}return false;}`,
|
|
185
|
+
return true;}return false;}`,eB="in highp vec4 vPickingColor;",vu=Symbol("cacheMap");function qo(e,t,n){let r=Os(e).get(t);return r===void 0&&(r=n(t),Os(e).set(t,r)),r}function py(e,t){Os(e).delete(t)}function xu(e,t){const n=Os(e);for(const r of n.keys())r.startsWith(t)&&n.delete(r);Os(e).delete(t)}function gy(e){e[vu]=new Map}function Os(e){return e[vu]||gy(e),e[vu]}function tB(e,t,n,r){const i=Pe(e)?e:e.name,o=!Pe(e)&&e.extent||[0,1];if(n===void 0&&!Pe(e)&&(n=e.count),i){const a=dd(i);if(Pt(a)){const s=my(a,{extent:o,count:n});return Au(t,{minMag:t.LINEAR,format:t.RGB,height:1,wrap:t.CLAMP_TO_EDGE},s,r)}else{if(Ft(a))return Jd(a,t);throw new Error("Unknown scheme: "+i)}}}function nB(e,t="rgb",n,r){const i=Qf(e,Pe(t)?t:t.type,Pe(t)?void 0:t.gamma),o=my(i);return Au(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},o,r)}function rB(e,t,n,r){const i=Math.max(e.length,n||0),o=new Float32Array(i);for(let a=0;a<i;a++)o[a]=e[a%e.length];return Au(t,{minMag:t.NEAREST,format:t.RED,internalFormat:t.R32F,height:1},o,r)}function Jd(e,t,n,r){const i=by(e,n);return Au(t,{minMag:t.NEAREST,format:t.RGB,height:1},i,r)}function my(e,{extent:t=[0,1],reverse:n=!1,count:r=256}={}){const i=t[0],o=ss(t)-i,a=za(r).map(s=>s/(r-1)).map(s=>i+s/o).map(e);return n&&a.reverse(),by(a)}function by(e,t){const n=Math.max(e.length,t||0),r=new Uint8Array(n*3);for(let i=0;i<n;i++){const o=Br(e[i%e.length]).rgb();r[i*3+0]=o.r,r[i*3+1]=o.g,r[i*3+2]=o.b}return r}class iB{constructor(t,n,r){this._container=t,this._sizeSource=n,this._shaderCache=new Map,this._listeners=[],this.rangeTextures=new WeakMap;const i=document.createElement("canvas");t.appendChild(i);const o=DT(i,{antialias:!0,depth:!1,premultipliedAlpha:!0});if(!o)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!Po(o))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");if(iy(o),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA),this.canvas=i,this.gl=o,this._pickingAttachmentOptions=[{format:o.RGBA,type:o.UNSIGNED_BYTE,minMag:o.LINEAR,wrap:o.CLAMP_TO_EDGE}],this._pickingBufferInfo=ST(o,this._pickingAttachmentOptions),o.bindFramebuffer(o.FRAMEBUFFER,null),this.adjustGl(),this._resizeObserver=new ResizeObserver(a=>{this.invalidateSize(),this._emit("resize")}),this._resizeObserver.observe(this._container),this._updateDpr(),this._clearColor=[0,0,0,0],r){const a=Br(r).rgb();this._clearColor=[a.r/255,a.g/255,a.b/255,a.opacity]}}invalidateSize(){this._logicalCanvasSize=void 0,this._updateDpr(),this.adjustGl()}_updateDpr(){this.dpr=window.devicePixelRatio}compileShader(t,n){const r="#version 300 es",i="precision mediump float;";Ft(n)&&(n=n.join(`
|
|
186
186
|
|
|
187
187
|
`));const o=this.gl,a=n.replaceAll(/ {2,}|^\s*\/\/.*$/gm,"");let s=this._shaderCache.get(a);if(!s){const f=[r,i,n].join(`
|
|
188
188
|
|
|
189
|
-
`);s=o.createShader(t),o.shaderSource(s,f),o.compileShader(s),this._shaderCache.set(a,s)}return s}adjustGl(){const t=this.getLogicalCanvasSize();this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`;const n=this.getPhysicalCanvasSize(t);this.canvas.width=n.width,this.canvas.height=n.height,
|
|
189
|
+
`);s=o.createShader(t),o.shaderSource(s,f),o.compileShader(s),this._shaderCache.set(a,s)}return s}adjustGl(){const t=this.getLogicalCanvasSize();this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`;const n=this.getPhysicalCanvasSize(t);this.canvas.width=n.width,this.canvas.height=n.height,CT(this.gl,this._pickingBufferInfo,this._pickingAttachmentOptions)}finalize(){this._resizeObserver.unobserve(this._container),this.canvas.remove()}getPhysicalCanvasSize(t){return t=t||this.getLogicalCanvasSize(),{width:t.width*this.dpr,height:t.height*this.dpr}}getLogicalCanvasSize(){var o;if(this._logicalCanvasSize)return this._logicalCanvasSize;const t=((o=this._sizeSource)==null?void 0:o.call(this))??{width:void 0,height:void 0},n=window.getComputedStyle(this._container,null),r=t.width??this._container.clientWidth-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight),i=t.height??this._container.clientHeight-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom);return this._logicalCanvasSize={width:r,height:i},this._logicalCanvasSize}addEventListener(t,n){this._listeners.push({type:t,listener:n})}_emit(t){for(const n of this._listeners)n.type===t&&n.listener()}readPickingPixel(t,n){const r=this.gl;t*=this.dpr,n*=this.dpr;const i=this.getPhysicalCanvasSize().height,o=new Uint8Array(4);return r.bindFramebuffer(r.FRAMEBUFFER,this._pickingBufferInfo.framebuffer),r.readPixels(t,i-n-1,1,1,r.RGBA,r.UNSIGNED_BYTE,o),r.bindFramebuffer(r.FRAMEBUFFER,null),o}clearAll(){const t=this.gl,{width:n,height:r}=this.getPhysicalCanvasSize();t.viewport(0,0,n,r),t.disable(t.SCISSOR_TEST),t.clearColor(...this._clearColor),t.clear(t.COLOR_BUFFER_BIT)}createRangeTexture(t,n=!1){const r=this.rangeTextures.get(t);if(!n&&r)return;function i(a,s){return Mr(s.type)?s.domain().length:s.type=="threshold"?s.domain().length+1:s.type=="quantize"||s.type=="quantile"?a??4:a}const o=t.channel;if(Mi(o)){const a=t.getScaleProps(),s=t.getScale(),f=s.range();let l;if(a.scheme)if(s.type=="threshold"&&f)l=Jd(f,this.gl,s.domain().length,r);else{let u=Pe(a.scheme)?void 0:a.scheme.count;u=i(u,s),l=tB(a.scheme,this.gl,u,r)}else Yf(s.type)||xt(s.type)&&f.length>2?l=nB(f,a.interpolate,this.gl,r):l=Jd(f,this.gl,s.domain().length,r);this.rangeTextures.set(t,l)}else{const a=t.getScale();if(a.type==="ordinal"||Fo(a.type)){const s=$f(o)?Zb(o):l=>l,f=t.getScale().range();this.rangeTextures.set(t,rB(f.map(s),this.gl,a.domain().length,r))}}}}function oB(e,t="",n=0){const r=/ERROR:\s*\d+:(\d+)/gi,i=[...t.matchAll(r)],o=new Map(i.map((a,s)=>{const f=parseInt(a[1]),l=i[s+1],u=l?l.index:t.length,c=t.substring(a.index,u);return[f-1,c]}));return e.split(`
|
|
190
190
|
`).map((a,s)=>{const f=o.get(s);return`${s+1+n}: ${a}${f?`
|
|
191
191
|
|
|
192
192
|
^^^ ${f}`:""}`}).join(`
|
|
193
|
-
`)}function
|
|
194
|
-
Error compiling: ${o}`,e.deleteShader(f));e.deleteProgram(r)}if(o)return{message:o,detail:a}}return{program:r,getProgramErrors:i}}function
|
|
195
|
-
`+this.domainUniforms.map(
|
|
193
|
+
`)}function aB(e,t,n){const r=e.createProgram();e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r);function i(){let o,a;if(!e.getProgramParameter(r,e.LINK_STATUS)){o=e.getProgramInfoLog(r);for(const f of[t,n])e.getShaderParameter(f,e.COMPILE_STATUS)||(o=e.getShaderInfoLog(f),a=oB(e.getShaderSource(f),o,0)+`
|
|
194
|
+
Error compiling: ${o}`,e.deleteShader(f));e.deleteProgram(r)}if(o)return{message:o,detail:a}}return{program:r,getProgramErrors:i}}function Au(e,t,n,r){return r?A2(e,r,n,t):r=Ps(e,{...t,src:n}),r}function sB(...e){const t={get(n,r,i){for(const o of e){const s=o()[r];if(s!==void 0)return s}},has(n,r,i){for(const o of e){const a=o();if(r in a)return!0}return!1}};return new Proxy({},t)}function lB(e){return Pe(e)||kt(e)||La(e)}class Hi extends Error{constructor(t,n){super(t),this.name="ViewError",this.view=n}}const fB="SAMPLE_FACET_UNIFORM",yy="SAMPLE_FACET_TEXTURE";class zs{constructor(t){this.unitView=t,this.encoders=void 0,this.bufferInfo=void 0,this.programInfo=void 0,this.vertexArrayInfo=void 0,this.domainUniformInfo=void 0,this.viewUniformInfo=void 0,this.markUniformInfo=void 0,this.markUniformsAltered=!0,this.rangeMap=new uB,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=sB(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}get encoding(){return qo(this,"encoding",()=>{const t=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=a=>{const s=this.properties[a];return lB(s)&&{value:s}},i=Object.fromEntries(this.getSupportedChannels().map(a=>[a,r(a)]).filter(a=>a[1].value!==void 0)),o=this.fixEncoding({...t,...i,...n});for(const a of Object.keys(o))this.getSupportedChannels().includes(a)||delete o[a];return o})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=N8(this)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return yy;if(this.unitView.getLayoutAncestors().find(t=>"samples"in t.spec))return fB}createAndLinkShaders(t,n,r=[]){const i=this.getAttributes(),o="// view: "+this.unitView.getPathString();this.domainUniforms=[];let a=[];const s=this.getSampleFacetMode();s&&r.push(`#define ${s}`);for(const d of i){let p;if(d in this.encoding)p=d;else continue;const b=this.encoding[p];if(b)if(vn(b))a.push(LT(p,b.value));else{const y=Ut(b)&&b.resolutionChannel||p,w=Pi(y)?this.unitView.getScaleResolution(y).getScale():Xf(),_=NT(p,w,b);a.push(_.glsl),_.domainUniform&&this.domainUniforms.push(_.domainUniform)}}const f=this.domainUniforms.length?`layout(std140) uniform Domains {
|
|
195
|
+
`+this.domainUniforms.map(d=>` ${d}
|
|
196
196
|
`).join("")+`};
|
|
197
197
|
|
|
198
|
-
`:"",
|
|
199
|
-
`,...r,ey,Lk,s,...o,Nk,Ok,t],u=[...r,ey,zk,n],c=this.gl;this.programStatus=qk(c,this.glHelper.compileShader(c.VERTEX_SHADER,l),this.glHelper.compileShader(c.FRAGMENT_SHADER,u))}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=WT(this.gl,this.programStatus.program),delete this.programStatus,this.domainUniforms.length&&(this.domainUniformInfo=P2(this.gl,this.programInfo,"Domains")),this.viewUniformInfo=P2(this.gl,this.programInfo,"View"),this.gl.useProgram(this.programInfo.program),this._setDatums(),Yt(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0})}_setDatums(){for(const[t,n]of Object.entries(this.encoding))if(xs(n)){const r=this.encoders[t],i=r.indexer?r.indexer(n.datum):uu(r.scale.type)?K2(+n.datum):+n.datum;Yt(this.programInfo,{[Od+t]:i})}}deleteGraphicsData(){if(this.bufferInfo){const t=this.gl;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&&o5(this.gl,this.bufferInfo.attribs[n],r.data,0);else this.deleteGraphicsData(),this.bufferInfo=l5(this.gl,t.arrays,{numElements:t.vertexCount}),this.bufferInfo.allocatedVertices=t.allocatedVertices,this.vertexArrayInfo=void 0}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}prepareRender(t){const n=this.glHelper,r=this.gl,i=[];if(i.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=hk(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)}),this.domainUniformInfo){for(const[a,s]of Object.entries(this.domainUniformInfo.setters)){const f=a.substring(Z2.length),l=this.encoding[f],u=Nt(l)&&l.resolutionChannel||f;if(Li(u)){const c=this.unitView.getScaleResolution(u).getScale();i.push(()=>{const h=Mr(c.type)?[0,c.domain().length]:c.domain();s(uu(c.type)?Ik(h):h)})}}i.push(()=>M2(r,this.programInfo,this.domainUniformInfo))}for(const[a,s]of Object.entries(this.encoding))if(Nt(s)){const f=Nt(s)&&s.resolutionChannel||a;if(Li(f)){const l=this.unitView.getScaleResolution(f),u=n.rangeTextures.get(l);u&&i.push(()=>Yt(this.programInfo,{[zd+a]:u}))}}this.getSampleFacetMode()==oy&&i.push(()=>{let a;for(const s of this.unitView.getLayoutAncestors())if(a=s.getSampleFacetTexture(),a)break;if(!a)throw new Error("No facet texture available. This is bug.");Yt(this.programInfo,{uSampleFacetTexture:a})});const o=(t.picking??!1)&&this.isPickingParticipant();return i.push(()=>L2(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:o})),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,o=n.locSize?n.locSize.size:1;if(i>1||i+o<0)return!1;const a=n.targetLocSize?n.targetLocSize.location:i,s=n.targetLocSize?n.targetLocSize.size:o;this.gl.uniform4f(r.location,i,o,a,s)}return!0}render(t){}createRenderCallback(t,n){var c;if(!this.bufferInfo)throw new Gi(`${this.getType()} mark has no data. This is bug.`,this.unitView);const r=this;let i;const o=(c=this.unitView.getScaleResolution("x"))==null?void 0:c.getScale(),a=o&&xt(o.type),s=["index","locus"].includes(o==null?void 0:o.type)?-1:0,f=[0,0];i=h=>{if(a&&h.xIndex){const d=o.domain(),p=h.xIndex(d[0]+s,d[1],f),b=p[0],y=p[1]-b;y>0&&t(b,y)}else t(h.offset,h.count)};const l=this.rangeMap.get(void 0).count==0?n.facetId:void 0,u=this.rangeMap.get(l);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,o=this.properties,a=this.glHelper.getLogicalCanvasSize(),s=.5,f=(o.xOffset??0)+s,l=(o.yOffset??0)+s;let u,c=t;if(o.clip!=="never"&&(o.clip||n)){let h=0,d=0,p;if(n){if(c=t.intersect(n).flatten(),!c.isDefined())return!1;p=[t.width/c.width,t.height/c.height],d=Math.max(0,t.y2-n.y2),h=Math.min(0,t.x-n.x)}else p=[1,1];const b=[c.x,a.height-c.y2,c.width,c.height].map(C=>C*r),y=b.map(C=>Math.round(C)),[w,S]=b.map((C,_)=>C-y[_]);i.viewport(...y),i.scissor(...y),i.enable(i.SCISSOR_TEST),u={uViewOffset:[(f+h+w/r)/c.width,-(l+d-S/r)/c.height],uViewScale:p}}else{if(!t.isDefined())return!1;i.viewport(0,0,a.width*r,a.height*r),i.disable(i.SCISSOR_TEST),u={uViewOffset:[(t.x+f)/a.width,(a.height-t.y-l-t.height)/a.height],uViewScale:[t.width/a.width,t.height/a.height]}}return L2(this.viewUniformInfo,{...u,uViewportSize:[t.width,t.height],uDevicePixelRatio:r}),M2(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(t,n){}}class Qk extends mi{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 t.entries())Object.assign(this.get(n),r)}}function qd(e,t){const n=S8(t);let r=e[t]&&{...e[t]},i=e[n]&&{...e[n]};if(!(xn(r)||xn(i))){if(r){if(!Nt(e[t]))return;if(i){if(r.type!="quantitative"){const o=(1-(r.band||1))/2;r.band=o,i.band=-o}}else if(r.type=="quantitative")i={datum:0};else{i={...r};const o=(1-(r.band??1))/2;r.band=0+o,i.band=1-o}}else r={value:0},i={value:1};e[t]=r,e[n]=i}}function ay(e,t){e.stroke||(t?e.stroke={value:null}:e.stroke={resolutionChannel:"color",...e.color}),xn(e.stroke)&&e.stroke.value===null&&(e.strokeWidth={value:0}),e.strokeOpacity||(e.strokeOpacity={resolutionChannel:"opacity",...e.opacity})}function sy(e,t){xn(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 Xk extends Rs{constructor(t){super(t),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 Ho(this,"opaque",()=>!this._isRoundedCorners()&&!this._isStroked()&&xn(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(t){return qd(t,"x"),qd(t,"y"),ay(t,this.properties.filled),sy(t,this.properties.filled),delete t.color,delete t.opacity,t}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}_isRoundedCorners(){const t=this.properties;return t.cornerRadius||t.cornerRadiusBottomLeft||t.cornerRadiusBottomRight||t.cornerRadiusTopLeft||t.cornerRadiusTopRight}_isStroked(){const t=this.encoding.strokeWidth;return!(xn(t)&&!t.value)}async initializeGraphics(){await super.initializeGraphics();const t=[];this._isRoundedCorners()&&t.push("ROUNDED_CORNERS"),this._isStroked()&&t.push("STROKED"),this.createAndLinkShaders(bk,yk,t.map(n=>"#define "+n))}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;Yt(this.programInfo,{uMinSize:[t.minWidth,t.minHeight],uMinOpacity:t.minOpacity,uCornerRadii:[t.cornerRadiusTopRight??t.cornerRadius,t.cornerRadiusBottomRight??t.cornerRadius,t.cornerRadiusTopLeft??t.cornerRadius,t.cornerRadiusBottomLeft??t.cornerRadius]})}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new Dk({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});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(()=>Uo(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>{Bs(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,i,r)},t)}findDatumAt(t,n){t=Wt(t);const r=this.unitView.getCollector().facetBatches.get(t);if(!r)return;const i=this.encoders,o=i.x.scale.type;if(Mr(o)){const a=i.x.accessor;return r.find(s=>n==a(s))}else{const a=i.x.accessor,s=i.x2.accessor;return r.find(f=>n>=a(f)&&n<s(f))}}}const $k=`/***The stroke should only grow inwards,e.g,the diameter/outline is not affected by the stroke width.*Thus,a point that has a zero size has no visible stroke. This allows strokes to be used with*geometric zoom,etc.*/uniform bool uInwardStroke;uniform lowp float uMaxRelativePointDiameter;uniform float uScaleFactor;uniform float uMaxPointSize;uniform float uZoomLevel;uniform float uSemanticThreshold;out float vRadius;out float vRadiusWithPadding;out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out lowp float vShape;out lowp float vHalfStrokeWidth;out mat2 vRotationMatrix;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TRIANGLE_RIGHT=5.0;const float TRIANGLE_DOWN=6.0;const float TRIANGLE_LEFT=7.0;const float TICK_UP=8.0;const float TICK_RIGHT=9.0;const float TICK_DOWN=10.0;const float TICK_LEFT=11.0;float computeSemanticThresholdFactor(){return getScaled_semanticScore()>=uSemanticThreshold ? 1.0 : 0.0;}/***Computes a scaling factor for the points in a sample-faceted view.*/float getDownscaleFactor(vec2 pos){if(!isFacetedSamples()){return 1.0;}float sampleFacetHeight=getSampleFacetHeight(pos);float maxPointDiameter=sqrt(uMaxPointSize);float factor=sampleFacetHeight*uViewportSize.y*uMaxRelativePointDiameter;return clamp(0.0,maxPointDiameter,factor)/maxPointDiameter;}vec2 getDxDy(){
|
|
198
|
+
`:"",u=[`precision highp float;
|
|
199
|
+
`,o,...r,dy,$T,f,...a,KT,JT,t],c=[o,...r,dy,eB,n],h=this.gl;this.programStatus=aB(h,this.glHelper.compileShader(h.VERTEX_SHADER,u),this.glHelper.compileShader(h.FRAGMENT_SHADER,c))}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=lT(this.gl,this.programStatus.program),delete this.programStatus,this.domainUniforms.length&&(this.domainUniformInfo=Hd(this.gl,this.programInfo,"Domains")),this.viewUniformInfo=Hd(this.gl,this.programInfo,"View"),this.markUniformInfo=Hd(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),this._setDatums(),zi(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0})}registerMarkUniform(t,n,r=i=>i){const i=this.markUniformInfo.setters[t];if(wy(n)){const o=this.unitView.context.paramBroker.createExpression(n.expr),a=()=>{i(r(o(null))),this.markUniformsAltered=!0};o.addListener(a),a()}else i(r(n)),this.markUniformsAltered=!0}_setDatums(){for(const[t,n]of Object.entries(this.encoding))if(ks(n)){const r=this.encoders[t],i=r.indexer?r.indexer(n.datum):wu(r.scale.type)?cy(+n.datum):+n.datum;zi(this.programInfo,{[Yd+t]:i})}}deleteGraphicsData(){if(this.bufferInfo){const t=this.gl;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&&x5(this.gl,this.bufferInfo.attribs[n],r.data,0);else this.deleteGraphicsData(),this.bufferInfo=_5(this.gl,t.arrays,{numElements:t.vertexCount}),this.bufferInfo.allocatedVertices=t.allocatedVertices,this.vertexArrayInfo=void 0}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?(Vd(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):Q2(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(t){const n=this.glHelper,r=this.gl,i=[];if(i.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=kT(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)}),this.domainUniformInfo){for(const[a,s]of Object.entries(this.domainUniformInfo.setters)){const f=a.substring(oy.length),l=this.encoding[f],u=Ut(l)&&l.resolutionChannel||f;if(Pi(u)){const c=this.unitView.getScaleResolution(u).getScale();i.push(()=>{const h=Mr(c.type)?[0,c.domain().length]:c.domain();s(wu(c.type)?HT(h):h)})}}i.push(()=>Vd(r,this.programInfo,this.domainUniformInfo))}for(const[a,s]of Object.entries(this.encoding))if(Ut(s)){const f=Ut(s)&&s.resolutionChannel||a;if(Pi(f)){const l=this.unitView.getScaleResolution(f),u=n.rangeTextures.get(l);u&&i.push(()=>zi(this.programInfo,{[Qd+a]:u}))}}this.getSampleFacetMode()==yy&&i.push(()=>{let a;for(const s of this.unitView.getLayoutAncestors())if(a=s.getSampleFacetTexture(),a)break;if(!a)throw new Error("No facet texture available. This is bug.");zi(this.programInfo,{uSampleFacetTexture:a})});const o=(t.picking??!1)&&this.isPickingParticipant();return i.push(()=>Oi(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:o})),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,o=n.locSize?n.locSize.size:1;if(i>1||i+o<0)return!1;const a=n.targetLocSize?n.targetLocSize.location:i,s=n.targetLocSize?n.targetLocSize.size:o;this.gl.uniform4f(r.location,i,o,a,s)}return!0}render(t){}createRenderCallback(t,n){var c;if(!this.bufferInfo)throw new Hi(`${this.getType()} mark has no data. This is bug.`,this.unitView);const r=this;let i;const o=(c=this.unitView.getScaleResolution("x"))==null?void 0:c.getScale(),a=o&&xt(o.type),s=["index","locus"].includes(o==null?void 0:o.type)?-1:0,f=[0,0];i=h=>{if(a&&h.xIndex){const d=o.domain(),p=h.xIndex(d[0]+s,d[1],f),b=p[0],y=p[1]-b;y>0&&t(b,y)}else t(h.offset,h.count)};const l=this.rangeMap.get(void 0).count==0?n.facetId:void 0,u=this.rangeMap.get(l);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,o=this.properties,a=this.glHelper.getLogicalCanvasSize(),s=.5,f=(o.xOffset??0)+s,l=(o.yOffset??0)+s;let u,c=t;if(o.clip!=="never"&&(o.clip||n)){let h=0,d=0,p;if(n){if(c=t.intersect(n).flatten(),!c.isDefined())return!1;p=[t.width/c.width,t.height/c.height],d=Math.max(0,t.y2-n.y2),h=Math.min(0,t.x-n.x)}else p=[1,1];const b=[c.x,a.height-c.y2,c.width,c.height].map(C=>C*r),y=b.map(C=>Math.round(C)),[w,_]=b.map((C,S)=>C-y[S]);i.viewport(...y),i.scissor(...y),i.enable(i.SCISSOR_TEST),u={uViewOffset:[(f+h+w/r)/c.width,-(l+d-_/r)/c.height],uViewScale:p}}else{if(!t.isDefined())return!1;i.viewport(0,0,a.width*r,a.height*r),i.disable(i.SCISSOR_TEST),u={uViewOffset:[(t.x+f)/a.width,(a.height-t.y-l-t.height)/a.height],uViewScale:[t.width/a.width,t.height/a.height]}}return Oi(this.viewUniformInfo,{...u,uViewportSize:[t.width,t.height],uDevicePixelRatio:r}),Vd(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(t,n){}}class uB extends gi{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 t.entries())Object.assign(this.get(n),r)}}function wy(e){return typeof e=="object"&&"expr"in e&&Pe(e.expr)}function e0(e,t){const n=G8(t);let r=e[t]&&{...e[t]},i=e[n]&&{...e[n]};if(!(vn(r)||vn(i))){if(r){if(!Ut(e[t]))return;if(i){if(r.type!="quantitative"){const o=(1-(r.band||1))/2;r.band=o,i.band=-o}}else if(r.type=="quantitative")i={datum:0};else{i={...r};const o=(1-(r.band??1))/2;r.band=0+o,i.band=1-o}}else r={value:0},i={value:1};e[t]=r,e[n]=i}}function vy(e,t){e.stroke||(t?e.stroke={value:null}:e.stroke={resolutionChannel:"color",...e.color}),vn(e.stroke)&&e.stroke.value===null&&(e.strokeWidth={value:0}),e.strokeOpacity||(e.strokeOpacity={resolutionChannel:"opacity",...e.opacity})}function xy(e,t){vn(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 cB extends zs{constructor(n){super(n);se(this,Nl);se(this,Ol);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 qo(this,"opaque",()=>!te(this,Nl,Bg).call(this)&&!te(this,Ol,Dg).call(this)&&vn(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return e0(n,"x"),e0(n,"y"),vy(n,this.properties.filled),xy(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];te(this,Nl,Bg).call(this)&&n.push("ROUNDED_CORNERS"),te(this,Ol,Dg).call(this)&&n.push("STROKED"),this.createAndLinkShaders(RT,FT,n.map(r=>"#define "+r))}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniform("uMinWidth",n.minWidth),this.registerMarkUniform("uMinHeight",n.minHeight),this.registerMarkUniform("uMinOpacity",n.minOpacity),this.registerMarkUniform("uCornerRadiusTopRight",n.cornerRadiusTopRight??n.cornerRadius??0),this.registerMarkUniform("uCornerRadiusBottomRight",n.cornerRadiusBottomRight??n.cornerRadius??0),this.registerMarkUniform("uCornerRadiusTopLeft",n.cornerRadiusTopLeft??n.cornerRadius??0),this.registerMarkUniform("uCornerRadiusBottomLeft",n.cornerRadiusBottomLeft??n.cornerRadius??0)}updateGraphicsData(){const n=this.unitView.getCollector(),r=n.getItemCount(),i=new ZT({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});i.addBatches(n.facetBatches);const o=i.toArrays();this.rangeMap.migrateEntries(o.rangeMap),this.updateBufferInfo(o)}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>Vo(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,o)=>{Ls(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,o,i)},n)}findDatumAt(n,r){n=Yt(n);const i=this.unitView.getCollector().facetBatches.get(n);if(!i)return;const o=this.encoders,a=o.x.scale.type;if(Mr(a)){const s=o.x.accessor;return i.find(f=>r==s(f))}else{const s=o.x.accessor,f=o.x2.accessor;return i.find(l=>r>=s(l)&&r<f(l))}}}Nl=new WeakSet,Bg=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},Ol=new WeakSet,Dg=function(){const n=this.encoding.strokeWidth;return!(vn(n)&&!n.value)};const hB=`out float vRadius;out float vRadiusWithPadding;out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out lowp float vShape;out lowp float vHalfStrokeWidth;out mat2 vRotationMatrix;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TRIANGLE_RIGHT=5.0;const float TRIANGLE_DOWN=6.0;const float TRIANGLE_LEFT=7.0;const float TICK_UP=8.0;const float TICK_RIGHT=9.0;const float TICK_DOWN=10.0;const float TICK_LEFT=11.0;float computeSemanticThresholdFactor(){return getScaled_semanticScore()>=uSemanticThreshold ? 1.0 : 0.0;}/***Computes a scaling factor for the points in a sample-faceted view.*/float getDownscaleFactor(vec2 pos){if(!isFacetedSamples()){return 1.0;}float sampleFacetHeight=getSampleFacetHeight(pos);float maxPointDiameter=sqrt(uMaxPointSize);float factor=sampleFacetHeight*uViewportSize.y*uMaxRelativePointDiameter;return clamp(0.0,maxPointDiameter,factor)/maxPointDiameter;}vec2 getDxDy(){
|
|
200
200
|
#if defined(dx_DEFINED) || defined(dy_DEFINED)
|
|
201
201
|
return vec2(getScaled_dx(),getScaled_dy())/uViewportSize;
|
|
202
202
|
#else
|
|
203
203
|
return vec2(0.0,0.0);
|
|
204
204
|
#endif
|
|
205
|
-
}void main(void){float shapeAngle=0.0;float semanticThresholdFactor=computeSemanticThresholdFactor();if(semanticThresholdFactor<=0.0){gl_PointSize=0.0;gl_Position=vec4(100.0,0.0,0.0,0.0);return;}float size=getScaled_size();vec2 pos=vec2(getScaled_x(),getScaled_y())+getDxDy();gl_Position=unitToNdc(applySampleFacet(pos));float strokeWidth=getScaled_strokeWidth();float diameter=sqrt(size)*uScaleFactor*semanticThresholdFactor*getDownscaleFactor(pos);float opacity=uViewOpacity;if(strokeWidth<=0.0||uInwardStroke){float minDiameter=1.0/uDevicePixelRatio;if(diameter<minDiameter){opacity*=pow(diameter/minDiameter,2.5);diameter=minDiameter;}}float fillOpa=getScaled_fillOpacity()*opacity;float strokeOpa=getScaled_strokeOpacity()*opacity;vShape=getScaled_shape();bool circle=vShape==0.0;if(vShape>TICK_UP&&vShape<=TICK_LEFT){shapeAngle=(vShape-TICK_UP)*90.0;vShape=TICK_UP;}else if(vShape>TRIANGLE_UP&&vShape<=TRIANGLE_LEFT){shapeAngle=(vShape-TRIANGLE_UP)*90.0;vShape=TRIANGLE_UP;}float angleInDegrees=getScaled_angle();float angle=-(shapeAngle+angleInDegrees)*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);vRotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);float roomForRotation=circle ? 1.0 : sin(mod(angle,PI/2.0)+PI/4.0)/sin(PI/4.0);float aaPadding=1.0/uDevicePixelRatio;float rotationPadding=(diameter*roomForRotation)-diameter;float strokePadding=uInwardStroke ? 0.0 : strokeWidth*(circle ? 1.0 : sqrt(3.0));float padding=rotationPadding+strokePadding+aaPadding;gl_PointSize=(diameter+padding)*uDevicePixelRatio;vRadius=diameter/2.0;vRadiusWithPadding=vRadius+padding/2.0;vHalfStrokeWidth=strokeWidth/2.0;vFillColor=vec4(getScaled_fill()*fillOpa,fillOpa);vStrokeColor=vec4(getScaled_stroke()*strokeOpa,strokeOpa);setupPicking();}`,
|
|
206
|
-
`)+`return function propagate(datum) {${
|
|
205
|
+
}void main(void){float shapeAngle=0.0;float semanticThresholdFactor=computeSemanticThresholdFactor();if(semanticThresholdFactor<=0.0){gl_PointSize=0.0;gl_Position=vec4(100.0,0.0,0.0,0.0);return;}float size=getScaled_size();vec2 pos=vec2(getScaled_x(),getScaled_y())+getDxDy();gl_Position=unitToNdc(applySampleFacet(pos));float strokeWidth=getScaled_strokeWidth();float diameter=sqrt(size)*uScaleFactor*semanticThresholdFactor*getDownscaleFactor(pos);float opacity=uViewOpacity;if(strokeWidth<=0.0||uInwardStroke){float minDiameter=1.0/uDevicePixelRatio;if(diameter<minDiameter){opacity*=pow(diameter/minDiameter,2.5);diameter=minDiameter;}}float fillOpa=getScaled_fillOpacity()*opacity;float strokeOpa=getScaled_strokeOpacity()*opacity;vShape=getScaled_shape();bool circle=vShape==0.0;if(vShape>TICK_UP&&vShape<=TICK_LEFT){shapeAngle=(vShape-TICK_UP)*90.0;vShape=TICK_UP;}else if(vShape>TRIANGLE_UP&&vShape<=TRIANGLE_LEFT){shapeAngle=(vShape-TRIANGLE_UP)*90.0;vShape=TRIANGLE_UP;}float angleInDegrees=getScaled_angle();float angle=-(shapeAngle+angleInDegrees)*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);vRotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);float roomForRotation=circle ? 1.0 : sin(mod(angle,PI/2.0)+PI/4.0)/sin(PI/4.0);float aaPadding=1.0/uDevicePixelRatio;float rotationPadding=(diameter*roomForRotation)-diameter;float strokePadding=uInwardStroke ? 0.0 : strokeWidth*(circle ? 1.0 : sqrt(3.0));float padding=rotationPadding+strokePadding+aaPadding;gl_PointSize=(diameter+padding)*uDevicePixelRatio;vRadius=diameter/2.0;vRadiusWithPadding=vRadius+padding/2.0;vHalfStrokeWidth=strokeWidth/2.0;vFillColor=vec4(getScaled_fill()*fillOpa,fillOpa);vStrokeColor=vec4(getScaled_stroke()*strokeOpa,strokeOpa);setupPicking();}`,dB="const lowp vec4 white=vec4(1.0);const lowp vec4 black=vec4(0.0,0.0,0.0,1.0);in float vRadius;in float vRadiusWithPadding;in lowp vec4 vFillColor;in lowp vec4 vStrokeColor;in lowp float vShape;in lowp float vHalfStrokeWidth;in mat2 vRotationMatrix;out lowp vec4 fragColor;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TICK_UP=8.0;float circle(vec2 p,float r){return length(p)-r;}float square(vec2 p,float r){p=abs(p);return max(p.x,p.y)-r;}float tickUp(vec2 p,float r){float halfR=r*0.5;p.y+=halfR;p=abs(p);return max(p.x-r*0.15,p.y-halfR);}float equilateralTriangle(vec2 p,float r){p.y=-p.y;float k=sqrt(3.0);float kr=k*r;p.y-=kr/2.0;return max((abs(p.x)*k+p.y)/2.0,-p.y-kr);}float crossShape(vec2 p,float r){p=abs(p);vec2 b=vec2(0.4,1.0)*r;vec2 v=abs(p)-b.xy;vec2 h=abs(p)-b.yx;return min(max(v.x,v.y),max(h.x,h.y));}float diamond(vec2 p,float r){p=abs(p);return(max(abs(p.x-p.y),abs(p.x+p.y))-r)/sqrt(2.0);}void main(){float d;vec2 p=vRotationMatrix*(2.0*gl_PointCoord-1.0)*vRadiusWithPadding;float r=vRadius;if(vShape==CIRCLE){d=circle(p,r);}else if(vShape==SQUARE){d=square(p,r);}else if(vShape==CROSS){d=crossShape(p,r);}else if(vShape==DIAMOND){d=diamond(p,r);}else if(vShape==TRIANGLE_UP){d=equilateralTriangle(p,r);}else if(vShape==TICK_UP){d=tickUp(p,r);}else{d=0.0;}if(!uPickingEnabled){lowp vec4 fillColor=mix(vFillColor,white,-d*uGradientStrength/vRadius);fragColor=distanceToColor(d+(uInwardStroke ? vHalfStrokeWidth : 0.0),fillColor,vStrokeColor,vHalfStrokeWidth);}else if(d-vHalfStrokeWidth<=0.0){fragColor=vPickingColor;}else{discard;}}",pB="uniform Mark{/***The stroke should only grow inwards,e.g,the diameter/outline is not affected by the stroke width.*Thus,a point that has a zero size has no visible stroke. This allows strokes to be used with*geometric zoom,etc.*/uniform bool uInwardStroke;uniform lowp float uMaxRelativePointDiameter;uniform mediump float uScaleFactor;uniform mediump float uMaxPointSize;uniform mediump float uZoomLevel;uniform highp float uSemanticThreshold;uniform mediump float uGradientStrength;};",zn=1,Gr=2,t0=4,gB={};class Je{get behavior(){return 0}constructor(){this.children=[],this.parent=void 0,this.completed=!1}reset(){this.completed=!1;for(const t of this.children)t.reset()}initialize(){}_updatePropagator(){this._propagate=Function("children",za(this.children.length).map(t=>`const child${t} = children[${t}];`).join(`
|
|
206
|
+
`)+`return function propagate(datum) {${za(this.children.length).map(t=>`child${t}.handle(datum);`).join(`
|
|
207
207
|
`)}}`)(this.children)}setParent(t){this.parent=t}addChild(t){if(t.parent)throw new Error("Cannot add the child! It already has a parent.");return this.children.push(t),t.setParent(this),this._updatePropagator(),this}adopt(t){t.parent&&t.parent.removeChild(t),this.addChild(t)}adoptChildrenOf(t){for(const n of t.children)this.adopt(n)}insertAsParent(t){if(this.isRoot())throw new Error("Cannot insert a new parent for a root node!");t.parent=this.parent,this.parent.children[this.parent.children.indexOf(this)]=t,this.parent._updatePropagator(),this.parent=void 0,t.addChild(this)}removeChild(t){const n=this.children.indexOf(t);if(n>-1)this.children.splice(n,1),t.parent=void 0,this._updatePropagator();else throw new Error("Trying to remove an unknown child node!")}excise(){if(this.isRoot())throw new Error("Cannot excise root node!");if(this.isTerminal())this.parent.removeChild(this);else if(this.children.length==1){const t=this.children[0];t.setParent(this.parent),this.parent.children[this.parent.children.indexOf(this)]=t,this.parent._updatePropagator(),this.setParent(void 0),this.children.length=0}else throw new Error("Cannot excise a node that has multiple children!")}isRoot(){return!this.parent}isBranching(){return this.children.length>1}isTerminal(){return this.children.length==0}visit(t){t(this);for(const n of this.children)n.visit(t);t.afterChildren&&t.afterChildren(this)}subtreeToString(t=0){const n=this.children.map(r=>r.subtreeToString(t+1)).join("");return`${" ".repeat(t*2)}* ${this.constructor.name}${("identifier"in this&&this.identifier?": "+this.identifier:"")??""}
|
|
208
|
-
${n}`}getGlobalObject(){return this.parent?this.parent.getGlobalObject():Jk}handle(t){this._propagate(t)}complete(){this.completed=!0;for(const t of this.children)t.complete()}beginBatch(t){for(const n of this.children)n.beginBatch(t)}_propagate(t){}}function ly(e){return e.type=="file"}function eB(e){return e.type=="facet"}class fy extends Je{constructor(t){super(),this.k=t.size||500,this.reset()}reset(){super.reset(),this.reservoir=[],this.W=void 0,this.ingester=this._initialIngester}_initialIngester(t){this.reservoir.push(t),this.reservoir.length==this.k&&(this.W=Math.exp(Math.log(Math.random())/this.k),this.i=this.k,this.next=this.i,this.ingester=this._finalIngester,this._setNextStop())}_finalIngester(t){++this.i==this.next&&(this.reservoir[Math.floor(Math.random()*this.k)]=t,this.W*=Math.exp(Math.log(Math.random())/this.k),this._setNextStop())}_setNextStop(){this.next+=Math.floor(Math.log(Math.random())/Math.log(1-this.W))+1}handle(t){this.ingester(t)}complete(){for(const t of this.reservoir)this._propagate(t);super.complete()}}function tB(e,t,n){const r=new fy({type:"sample",size:e});for(const i of t)r.handle(n(i));return r.complete(),r.reservoir}const nB={};class rB extends Rs{constructor(t){super(t),Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x:.5,y:.5,color:"#4c78a8",filled:!0,opacity:1,size:100,semanticScore:0,shape:"circle",strokeWidth:2,fillGradientStrength:0,dx:0,dy:0,angle:0,sampleFacetPadding:.1,semanticZoomFraction:.02}))}getAttributes(){return["inwardStroke","uniqueId","facetIndex","x","y","size","semanticScore","shape","strokeWidth","gradientStrength","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getDefaultEncoding(){return{...super.getDefaultEncoding(),...nB}}fixEncoding(t){return ay(t,this.properties.filled),sy(t,this.properties.filled),delete t.color,delete t.opacity,t}initializeData(){super.initializeData();const t=this.unitView.getAccessor("semanticScore");t&&(this.sampledSemanticScores=Float32Array.from(tB(1e4,this.unitView.getCollector().getData(),t)),this.sampledSemanticScores.sort((n,r)=>n-r))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders($k,Kk)}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;Yt(this.programInfo,{uInwardStroke:t.inwardStroke,uGradientStrength:t.fillGradientStrength,uMaxRelativePointDiameter:1-2*t.sampleFacetPadding})}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new Rk({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)}_getGeometricScaleFactor(){const t=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/t),1/3)}_getMaxPointSize(){const t=this.encoders.size;return t.constant?t(null):t.scale.range().reduce((n,r)=>Math.max(n,r))}getSemanticThreshold(){if(this.sampledSemanticScores){const t=Math.max(0,1-this.properties.semanticZoomFraction*this.unitView.getZoomLevel());if(t<=0)return-1/0;if(t>=1)return 1/0;{const n=this.sampledSemanticScores;return qg(n,t)}}else return-1}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>Yt(this.programInfo,{uMaxPointSize:this._getMaxPointSize(),uScaleFactor:this._getGeometricScaleFactor(),uSemanticThreshold:this.getSemanticThreshold()})),n.push(()=>Uo(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>{i&&Bs(n,this.vertexArrayInfo,n.POINTS,i,r)},t)}}const iB="const int BUTT=0;const int SQUARE=1;const int ROUND=2;in float pos;in float side;uniform float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;out vec4 vColor;out float vSize;out float vNormalLengthInPixels;out highp vec2 vPosInPixels;void main(void){float pixelSize=1.0/uDevicePixelRatio;float size=getScaled_size();float opacity=getScaled_opacity()*uViewOpacity;if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()));vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()));vec2 tangent=b-a;float offset=0.0;float relativeDiff=0.0;if(uMinLength>0.0||uStrokeCap!=BUTT){float len=length(tangent*uViewportSize);float diff=max(0.0,uMinLength-len);if(uStrokeCap!=BUTT){diff+=size;}relativeDiff=diff/len;offset=relativeDiff*(pos-0.5);}vec2 p=pos<1.0? a+tangent*(pos+offset): b+tangent*offset;float aaPadding=pixelSize;vec2 normal=normalize(vec2(-tangent.y,tangent.x)/uViewportSize);p+=normal*side*(size+aaPadding)/uViewportSize;gl_Position=unitToNdc(p);vColor=vec4(getScaled_color()*opacity,opacity);vSize=size;vNormalLengthInPixels=side*(size+aaPadding);vPosInPixels=vec2(pos,(1.0-pos))*(1.0+relativeDiff)*length(tangent*uViewportSize)-vec2(uStrokeCap!=BUTT ? size/2.0 : 0.0);setupPicking();}",oB="const int BUTT=0;const int SQUARE=1;const int ROUND=2;uniform sampler2D uDashTexture;uniform float uDashTextureSize;uniform float uStrokeDashOffset;uniform lowp int uStrokeCap;in vec4 vColor;in float vSize;in vec2 vPosInPixels;in float vNormalLengthInPixels;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distanceFromEnd=-min(vPosInPixels[0],vPosInPixels[1]);float distance;if(distanceFromEnd>0.0&&uStrokeCap==ROUND){distance=length(vec2(distanceFromEnd,vNormalLengthInPixels));}else{distance=abs(vNormalLengthInPixels);}float opacity=clamp(((vSize/2.0-distance)*dpr),-0.5,0.5)+0.5;if(uDashTextureSize>0.0){float pos=(vPosInPixels[0]+uStrokeDashOffset)*dpr;float floored=floor(pos);vec2 texelPositions=(floored+vec2(0.5,1.5))/dpr/uDashTextureSize;opacity*=mix(texture(uDashTexture,vec2(texelPositions[0],0)).r,texture(uDashTexture,vec2(texelPositions[1],0)).r,clamp((pos-floored),0.0,1.0));}fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}";class aB extends Rs{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&&Nt(t.y)&&t.y.type=="quantitative")t.x2=t.x,t.y2={datum:0};else if(!t.y2&&Nt(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=sB(this.properties.strokeDash);this.dashTexture=ks(t,{mag:t.NEAREST,min:t.NEAREST,internalFormat:t.R8,format:t.RED,src:n,height:1}),this.dashTextureSize=n.length}this.createAndLinkShaders(iB,oB)}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;Yt(this.programInfo,{uMinLength:t.minLength,uDashTextureSize:this.dashTextureSize,uStrokeCap:["butt","square","round"].indexOf(t.strokeCap)})}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new Fk({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 this.dashTexture&&n.push(()=>Yt(this.programInfo,{uDashTexture:this.dashTexture,uStrokeDashOffset:this.properties.strokeDashOffset})),n.push(()=>Uo(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Bs(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,i,r),t)}}function sB(e){if(e.length==0||e.length%2||e.findIndex(o=>Math.round(o)!=o||o<1||o>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(e));const t=e.reduce((o,a)=>o+a),n=new Uint8Array(t);let r=!0,i=0;for(let o of e){for(;o;)n[i++]=r&&255||0,o--;r=!r}return n}const lB="uniform float uArcHeightFactor;uniform float uMinArcHeight;uniform float uMinPickingSize;uniform int uShape;uniform int uOrient;uniform bool uClampApex;uniform float uMaxChordLength;uniform vec2 uArcFadingDistance;in vec2 strip;out vec4 vColor;out float vSize;out float vNormalLengthInPixels;const int SHAPE_ARC=0;const int SHAPE_DOME=1;const int SHAPE_DIAGONAL=2;const int SHAPE_LINE=3;const int ORIENT_VERTICAL=0;const int ORIENT_HORIZONTAL=1;float distanceFromLine(vec2 pointOnLine1,vec2 pointOnLine2,vec2 point){vec2 a=point-pointOnLine1;vec2 b=pointOnLine2-pointOnLine1;vec2 proj=dot(a,b)/dot(b,b)*b;return length(a-proj);}bool isInsideViewport(vec2 point,float marginFactor){vec2 margin=uViewportSize*vec2(marginFactor);return point.x>=-margin.x&&point.x<=uViewportSize.x+margin.x&&point.y>=-margin.y&&point.y<=uViewportSize.y+margin.y;}void main(void){float pixelSize=1.0/uDevicePixelRatio;float opacity=getScaled_opacity()*uViewOpacity;vec2 p1,p2,p3,p4;vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()))*uViewportSize;vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()))*uViewportSize;if(uShape<=SHAPE_DOME){if(uShape==SHAPE_DOME){vec2 height=vec2(0.0);if(uOrient==ORIENT_VERTICAL){p1=vec2(min(a.x,b.x),b.y);p4=vec2(max(a.x,b.x),b.y);height=vec2(0.0,a.y-b.y);if(uClampApex){if(p4.x>0.0){p1.x=max(p1.x,-p4.x);}if(p1.x<uViewportSize.x){p4.x=min(p4.x,2.0*uViewportSize.x-p1.x);}}}else{p1=vec2(b.x,min(a.y,b.y));p4=vec2(b.x,max(a.y,b.y));height=vec2(a.x-b.x,0.0);if(uClampApex){if(p4.y>0.0){p1.y=max(p1.y,-p4.y);}if(p1.y<uViewportSize.y){p4.y=min(p4.y,2.0*uViewportSize.y-p1.y);}}}vec2 controlOffset=height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}if(uShape==SHAPE_ARC){p1=a;p4=b;vec2 chordVector=p4-p1;vec2 unitChordVector=normalize(chordVector);vec2 chordNormal=vec2(-unitChordVector.y,unitChordVector.x);float chordLength=length(chordVector);if(chordLength>uMaxChordLength){if(isInsideViewport(p1,2.0)){chordLength=uMaxChordLength;p4=p1+unitChordVector*uMaxChordLength;}else if(isInsideViewport(p4,2.0)){chordLength=uMaxChordLength;p1=p4-unitChordVector*uMaxChordLength;}}float height=max(chordLength/2.0*uArcHeightFactor,uMinArcHeight);vec2 controlOffset=chordNormal*height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}}else if(uShape==SHAPE_DIAGONAL){if(uOrient==ORIENT_VERTICAL){p1=a;p2=vec2(a.x,(a.y+b.y)/2.0);p3=vec2(b.x,(a.y+b.y)/2.0);p4=b;}else{p1=a;p2=vec2((a.x+b.x)/2.0,a.y);p3=vec2((a.x+b.x)/2.0,b.y);p4=b;}}else if(uShape==SHAPE_LINE){p1=a;p2=(a+b)/2.0;p3=p2;p4=b;}float t=smoothstep(0.0,1.0,strip.x);vec2 C1=p4-3.0*p3+3.0*p2-p1;vec2 C2=3.0*p3-6.0*p2+3.0*p1;vec2 C3=3.0*p2-3.0*p1;vec2 C4=p1;vec2 p;if(t==0.0){p=p1;}else if(t==1.0){p=p4;}else{p=C1*t*t*t+C2*t*t+C3*t+C4;}vec2 tangent=normalize(3.0*C1*t*t+2.0*C2*t+C3);vec2 normal=vec2(-tangent.y,tangent.x);float size=getScaled_size();if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}float paddedSize=uPickingEnabled? max(size,uMinPickingSize): size+pixelSize;vNormalLengthInPixels=strip.y*paddedSize;if(uShape==SHAPE_ARC&&uArcFadingDistance[0]>0.0&&uArcFadingDistance[1]>0.0){float d=distanceFromLine(p1,p4,p);float distanceOpacity=smoothstep(uArcFadingDistance[1],uArcFadingDistance[0],d);opacity*=distanceOpacity;if(distanceOpacity<=0.0){vNormalLengthInPixels=0.0;}}p+=normal*vNormalLengthInPixels;gl_Position=pixelsToNdc(p);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vSize=paddedSize;setupPicking();}",fB="in vec4 vColor;in float vSize;in float vNormalLengthInPixels;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distance=abs(vNormalLengthInPixels);float opacity=clamp(((vSize/2.0-distance)*dpr),0.0,1.0);fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",uB=["arc","dome","diagonal","line"],cB=["vertical","horizontal"];class hB extends Rs{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"}))}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","height","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){return t.x2||(Nt(t.x)?t.x2={datum:0}:t.x2=t.x),t.y2||(Nt(t.y)?t.y2={datum:0}:t.y2=t.y),t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(lB,fB)}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;Yt(this.programInfo,{uArcHeightFactor:t.arcHeightFactor,uMinArcHeight:t.minArcHeight,uMinPickingSize:t.minPickingSize,uShape:uB.indexOf(t.linkShape),uOrient:cB.indexOf(t.orient),uClampApex:!!t.clampApex,uMaxChordLength:t.maxChordLength,uArcFadingDistance:t.arcFadingDistance||[0,0]})}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new Pk({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});r.addBatches(t.facetBatches);const i=r.toArrays();i.arrays.strip={data:dB(this.properties.segments),numComponents:2},this.rangeMap.migrateEntries(i.rangeMap),this.arrays=Object.fromEntries(Object.entries(i.arrays).map(([o,a])=>[o,{...a,data:void 0}])),this.updateBufferInfo(i)}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>{this.gl.bindVertexArray(this.vertexArrayInfo.vertexArrayObject);for(const o of Object.entries(this.bufferInfo.attribs)){const[a,s]=o;s.buffer&&s.numComponents&&s.divisor&&(s.offset=r*this.arrays[a].numComponents*4)}Uo(n,this.programInfo,this.bufferInfo),Bs(n,this.bufferInfo,n.TRIANGLE_STRIP,(this.properties.segments+1)*2,0,i)},t)}}function dB(e){let t=0;const n=[];for(;t<=e;t++)n.push(t/e,.5),n.push(t/e,-.5);return n}const pB=`uniform float uSdfNumerator;uniform vec2 uD;in mediump vec2 vertexCoord;in lowp vec2 textureCoord;uniform vec4 uViewportEdgeFadeWidth;uniform vec4 uViewportEdgeFadeDistance;uniform bool uSqueeze;uniform bool uLogoLetter;in float width;uniform ivec2 uAlign;
|
|
209
|
-
#ifdef x2_DEFINED
|
|
210
|
-
uniform float uPaddingX;uniform bool uFlushX;
|
|
211
|
-
#endif
|
|
212
|
-
#ifdef y2_DEFINED
|
|
213
|
-
uniform float uPaddingY;uniform bool uFlushY;
|
|
214
|
-
#endif
|
|
215
|
-
out vec2 vTexCoord;out vec4 vColor;out float vSlope;out float vEdgeFadeOpacity;struct RangeResult{float pos;float scale;};float minValue(vec4 v){return min(min(v.x,v.y),min(v.z,v.w));}float maxValue(vec4 v){return max(max(v.x,v.y),max(v.z,v.w));}/***All measures are in[0,1]*/RangeResult positionInsideRange(float a,float b,float width,float padding,int align,bool flush){float span=b-a;float paddedWidth=width+2.0*padding;if(a>1.0||b<0.0){return RangeResult(0.0,0.0);}float extra=max(0.0,span-paddedWidth);float pos;if(align==0){float centre=a+b;if(flush){float leftOver=max(0.0,paddedWidth-centre);centre+=min(leftOver,extra);float rightOver=max(0.0,paddedWidth+centre-2.0);centre-=min(rightOver,extra);}pos=centre/2.0;}else if(align<0){float edge=a;if(flush){float over=max(0.0,-edge);edge+=min(over,extra);}pos=edge+padding;}else{float edge=b;if(flush){float over=max(0.0,edge-1.0);edge-=min(over,extra);}pos=edge-padding;}float scale=clamp((span-padding)/paddedWidth,0.0,1.0);return RangeResult(pos,scale);}vec2 calculateRotatedDimensions(float width,mat2 rotationMatrix){vec2 a=abs(rotationMatrix*vec2(width/2.0,0.5));vec2 b=abs(rotationMatrix*vec2(width/2.0,-0.5));return vec2(max(a.x,b.x),max(a.y,b.y))*2.0;}ivec2 fixAlignForAngle(ivec2 align,float angleInDegrees){float a=mod(angleInDegrees+45.0,360.0);int x=align.x;int y=-align.y;if(a<90.0){return ivec2(x,y);}else if(a<180.0){return ivec2(y,-x);}else if(a<270.0){return ivec2(-x,y);}else{return ivec2(-y,x);}}void main(void){float opacity=getScaled_opacity()*uViewOpacity;vec2 size=vec2(getScaled_size());float x=getScaled_x();float y=getScaled_y();float scale=1.0;float angleInDegrees=getScaled_angle();float angle=-angleInDegrees*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);mat2 rotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);vec2 flushSize=calculateRotatedDimensions(width,rotationMatrix);
|
|
208
|
+
${n}`}getGlobalObject(){return this.parent?this.parent.getGlobalObject():gB}handle(t){this._propagate(t)}complete(){this.completed=!0;for(const t of this.children)t.complete()}beginBatch(t){for(const n of this.children)n.beginBatch(t)}_propagate(t){}}function Ay(e){return e.type=="file"}function mB(e){return e.type=="facet"}class Ey extends Je{constructor(t){super(),this.k=t.size||500,this.reset()}reset(){super.reset(),this.reservoir=[],this.W=void 0,this.ingester=this._initialIngester}_initialIngester(t){this.reservoir.push(t),this.reservoir.length==this.k&&(this.W=Math.exp(Math.log(Math.random())/this.k),this.i=this.k,this.next=this.i,this.ingester=this._finalIngester,this._setNextStop())}_finalIngester(t){++this.i==this.next&&(this.reservoir[Math.floor(Math.random()*this.k)]=t,this.W*=Math.exp(Math.log(Math.random())/this.k),this._setNextStop())}_setNextStop(){this.next+=Math.floor(Math.log(Math.random())/Math.log(1-this.W))+1}handle(t){this.ingester(t)}complete(){for(const t of this.reservoir)this._propagate(t);super.complete()}}function bB(e,t,n){const r=new Ey({type:"sample",size:e});for(const i of t)r.handle(n(i));return r.complete(),r.reservoir}const yB={};class wB extends zs{constructor(t){super(t),Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x:.5,y:.5,color:"#4c78a8",filled:!0,opacity:1,size:100,semanticScore:0,shape:"circle",strokeWidth:2,fillGradientStrength:0,dx:0,dy:0,angle:0,sampleFacetPadding:.1,semanticZoomFraction:.02}))}getAttributes(){return["inwardStroke","uniqueId","facetIndex","x","y","size","semanticScore","shape","strokeWidth","gradientStrength","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getDefaultEncoding(){return{...super.getDefaultEncoding(),...yB}}fixEncoding(t){return vy(t,this.properties.filled),xy(t,this.properties.filled),delete t.color,delete t.opacity,t}initializeData(){super.initializeData();const t=this.unitView.getAccessor("semanticScore");t&&(this.sampledSemanticScores=Float32Array.from(bB(1e4,this.unitView.getCollector().getData(),t)),this.sampledSemanticScores.sort((n,r)=>n-r))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(hB,dB,[pB])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;Oi(this.markUniformInfo,{uInwardStroke:!!t.inwardStroke,uGradientStrength:+t.fillGradientStrength,uMaxRelativePointDiameter:1-2*t.sampleFacetPadding})}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new YT({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)}_getGeometricScaleFactor(){const t=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/t),1/3)}_getMaxPointSize(){const t=this.encoders.size;return t.constant?t(null):t.scale.range().reduce((n,r)=>Math.max(n,r))}getSemanticThreshold(){if(this.sampledSemanticScores){const t=Math.max(0,1-this.properties.semanticZoomFraction*this.unitView.getZoomLevel());if(t<=0)return-1/0;if(t>=1)return 1/0;{const n=this.sampledSemanticScores;return rm(n,t)}}else return-1}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>{Oi(this.markUniformInfo,{uMaxPointSize:this._getMaxPointSize(),uScaleFactor:this._getGeometricScaleFactor(),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>Vo(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>{i&&Ls(n,this.vertexArrayInfo,n.POINTS,i,r)},t)}}const vB="const int BUTT=0;const int SQUARE=1;const int ROUND=2;in float pos;in float side;out vec4 vColor;out float vSize;out float vNormalLengthInPixels;out highp vec2 vPosInPixels;void main(void){float pixelSize=1.0/uDevicePixelRatio;float size=getScaled_size();float opacity=getScaled_opacity()*uViewOpacity;if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()));vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()));vec2 tangent=b-a;float offset=0.0;float relativeDiff=0.0;if(uMinLength>0.0||uStrokeCap!=BUTT){float len=length(tangent*uViewportSize);float diff=max(0.0,uMinLength-len);if(uStrokeCap!=BUTT){diff+=size;}relativeDiff=diff/len;offset=relativeDiff*(pos-0.5);}vec2 p=pos<1.0? a+tangent*(pos+offset): b+tangent*offset;float aaPadding=pixelSize;vec2 normal=normalize(vec2(-tangent.y,tangent.x)/uViewportSize);p+=normal*side*(size+aaPadding)/uViewportSize;gl_Position=unitToNdc(p);vColor=vec4(getScaled_color()*opacity,opacity);vSize=size;vNormalLengthInPixels=side*(size+aaPadding);vPosInPixels=vec2(pos,(1.0-pos))*(1.0+relativeDiff)*length(tangent*uViewportSize)-vec2(uStrokeCap!=BUTT ? size/2.0 : 0.0);setupPicking();}",xB="const int BUTT=0;const int SQUARE=1;const int ROUND=2;uniform sampler2D uDashTexture;in vec4 vColor;in float vSize;in vec2 vPosInPixels;in float vNormalLengthInPixels;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distanceFromEnd=-min(vPosInPixels[0],vPosInPixels[1]);float distance;if(distanceFromEnd>0.0&&uStrokeCap==ROUND){distance=length(vec2(distanceFromEnd,vNormalLengthInPixels));}else{distance=abs(vNormalLengthInPixels);}float opacity=clamp(((vSize/2.0-distance)*dpr),-0.5,0.5)+0.5;if(uDashTextureSize>0.0){float pos=(vPosInPixels[0]+uStrokeDashOffset)*dpr;float floored=floor(pos);vec2 texelPositions=(floored+vec2(0.5,1.5))/dpr/uDashTextureSize;opacity*=mix(texture(uDashTexture,vec2(texelPositions[0],0)).r,texture(uDashTexture,vec2(texelPositions[1],0)).r,clamp((pos-floored),0.0,1.0));}fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",AB="uniform Mark{uniform mediump float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;uniform mediump float uStrokeDashOffset;};";class EB extends zs{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&&Ut(t.y)&&t.y.type=="quantitative")t.x2=t.x,t.y2={datum:0};else if(!t.y2&&Ut(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=_B(this.properties.strokeDash);this.dashTexture=Ps(t,{mag:t.NEAREST,min:t.NEAREST,internalFormat:t.R8,format:t.RED,src:n,height:1}),this.dashTextureSize=n.length}this.createAndLinkShaders(vB,xB,[AB])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniform("uMinLength",t.minLength),this.registerMarkUniform("uStrokeCap",t.strokeCap??"butt",n=>["butt","square","round"].indexOf(n)),Oi(this.markUniformInfo,{uDashTextureSize:+this.dashTextureSize}),this.markUniformsAltered=!0}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new WT({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(()=>zi(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>Vo(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Ls(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,i,r),t)}}function _B(e){if(e.length==0||e.length%2||e.findIndex(o=>Math.round(o)!=o||o<1||o>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(e));const t=e.reduce((o,a)=>o+a),n=new Uint8Array(t);let r=!0,i=0;for(let o of e){for(;o;)n[i++]=r&&255||0,o--;r=!r}return n}const SB="uniform Mark{uniform float uArcHeightFactor;uniform float uMinArcHeight;uniform float uMinPickingSize;uniform int uShape;uniform int uOrient;uniform bool uClampApex;uniform float uMaxChordLength;uniform vec2 uArcFadingDistance;};in vec2 strip;out vec4 vColor;out float vSize;out float vNormalLengthInPixels;const int SHAPE_ARC=0;const int SHAPE_DOME=1;const int SHAPE_DIAGONAL=2;const int SHAPE_LINE=3;const int ORIENT_VERTICAL=0;const int ORIENT_HORIZONTAL=1;float distanceFromLine(vec2 pointOnLine1,vec2 pointOnLine2,vec2 point){vec2 a=point-pointOnLine1;vec2 b=pointOnLine2-pointOnLine1;vec2 proj=dot(a,b)/dot(b,b)*b;return length(a-proj);}bool isInsideViewport(vec2 point,float marginFactor){vec2 margin=uViewportSize*vec2(marginFactor);return point.x>=-margin.x&&point.x<=uViewportSize.x+margin.x&&point.y>=-margin.y&&point.y<=uViewportSize.y+margin.y;}void main(void){float pixelSize=1.0/uDevicePixelRatio;float opacity=getScaled_opacity()*uViewOpacity;vec2 p1,p2,p3,p4;vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()))*uViewportSize;vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()))*uViewportSize;if(uShape<=SHAPE_DOME){if(uShape==SHAPE_DOME){vec2 height=vec2(0.0);if(uOrient==ORIENT_VERTICAL){p1=vec2(min(a.x,b.x),b.y);p4=vec2(max(a.x,b.x),b.y);height=vec2(0.0,a.y-b.y);if(uClampApex){if(p4.x>0.0){p1.x=max(p1.x,-p4.x);}if(p1.x<uViewportSize.x){p4.x=min(p4.x,2.0*uViewportSize.x-p1.x);}}}else{p1=vec2(b.x,min(a.y,b.y));p4=vec2(b.x,max(a.y,b.y));height=vec2(a.x-b.x,0.0);if(uClampApex){if(p4.y>0.0){p1.y=max(p1.y,-p4.y);}if(p1.y<uViewportSize.y){p4.y=min(p4.y,2.0*uViewportSize.y-p1.y);}}}vec2 controlOffset=height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}if(uShape==SHAPE_ARC){p1=a;p4=b;vec2 chordVector=p4-p1;vec2 unitChordVector=normalize(chordVector);vec2 chordNormal=vec2(-unitChordVector.y,unitChordVector.x);float chordLength=length(chordVector);if(chordLength>uMaxChordLength){if(isInsideViewport(p1,2.0)){chordLength=uMaxChordLength;p4=p1+unitChordVector*uMaxChordLength;}else if(isInsideViewport(p4,2.0)){chordLength=uMaxChordLength;p1=p4-unitChordVector*uMaxChordLength;}}float height=max(chordLength/2.0*uArcHeightFactor,uMinArcHeight);vec2 controlOffset=chordNormal*height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}}else if(uShape==SHAPE_DIAGONAL){if(uOrient==ORIENT_VERTICAL){p1=a;p2=vec2(a.x,(a.y+b.y)/2.0);p3=vec2(b.x,(a.y+b.y)/2.0);p4=b;}else{p1=a;p2=vec2((a.x+b.x)/2.0,a.y);p3=vec2((a.x+b.x)/2.0,b.y);p4=b;}}else if(uShape==SHAPE_LINE){p1=a;p2=(a+b)/2.0;p3=p2;p4=b;}float t=smoothstep(0.0,1.0,strip.x);vec2 C1=p4-3.0*p3+3.0*p2-p1;vec2 C2=3.0*p3-6.0*p2+3.0*p1;vec2 C3=3.0*p2-3.0*p1;vec2 C4=p1;vec2 p;if(t==0.0){p=p1;}else if(t==1.0){p=p4;}else{p=C1*t*t*t+C2*t*t+C3*t+C4;}vec2 tangent=normalize(3.0*C1*t*t+2.0*C2*t+C3);vec2 normal=vec2(-tangent.y,tangent.x);float size=getScaled_size();if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}float paddedSize=uPickingEnabled? max(size,uMinPickingSize): size+pixelSize;vNormalLengthInPixels=strip.y*paddedSize;if(uShape==SHAPE_ARC&&uArcFadingDistance[0]>0.0&&uArcFadingDistance[1]>0.0){float d=distanceFromLine(p1,p4,p);float distanceOpacity=smoothstep(uArcFadingDistance[1],uArcFadingDistance[0],d);opacity*=distanceOpacity;if(distanceOpacity<=0.0){vNormalLengthInPixels=0.0;}}p+=normal*vNormalLengthInPixels;gl_Position=pixelsToNdc(p);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vSize=paddedSize;setupPicking();}",CB="in vec4 vColor;in float vSize;in float vNormalLengthInPixels;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distance=abs(vNormalLengthInPixels);float opacity=clamp(((vSize/2.0-distance)*dpr),0.0,1.0);fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",kB=["arc","dome","diagonal","line"],IB=["vertical","horizontal"];class TB extends zs{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"}))}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","height","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){return t.x2||(Ut(t.x)?t.x2={datum:0}:t.x2=t.x),t.y2||(Ut(t.y)?t.y2={datum:0}:t.y2=t.y),t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(SB,CB)}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniform("uArcFadingDistance",t.arcFadingDistance,n=>n||[0,0]),this.registerMarkUniform("uArcHeightFactor",t.arcHeightFactor),this.registerMarkUniform("uMinArcHeight",t.minArcHeight),this.registerMarkUniform("uMinPickingSize",t.minPickingSize),this.registerMarkUniform("uShape",t.linkShape,n=>kB.indexOf(n)),this.registerMarkUniform("uOrient",t.orient,n=>IB.indexOf(n)),this.registerMarkUniform("uClampApex",t.clampApex,n=>!!n),this.registerMarkUniform("uMaxChordLength",t.maxChordLength)}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new QT({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});r.addBatches(t.facetBatches);const i=r.toArrays();i.arrays.strip={data:BB(this.properties.segments),numComponents:2},this.rangeMap.migrateEntries(i.rangeMap),this.arrays=Object.fromEntries(Object.entries(i.arrays).map(([o,a])=>[o,{...a,data:void 0}])),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>{this.gl.bindVertexArray(this.vertexArrayInfo.vertexArrayObject);for(const o of Object.entries(this.bufferInfo.attribs)){const[a,s]=o;s.buffer&&s.numComponents&&s.divisor&&(s.offset=r*this.arrays[a].numComponents*4)}Vo(n,this.programInfo,this.bufferInfo),Ls(n,this.bufferInfo,n.TRIANGLE_STRIP,(this.properties.segments+1)*2,0,i)},t)}}function BB(e){let t=0;const n=[];for(;t<=e;t++)n.push(t/e,.5),n.push(t/e,-.5);return n}const DB=`in mediump vec2 vertexCoord;in lowp vec2 textureCoord;in float width;out vec2 vTexCoord;out vec4 vColor;out float vSlope;out float vEdgeFadeOpacity;struct RangeResult{float pos;float scale;};float minValue(vec4 v){return min(min(v.x,v.y),min(v.z,v.w));}float maxValue(vec4 v){return max(max(v.x,v.y),max(v.z,v.w));}/***All measures are in[0,1]*/RangeResult positionInsideRange(float a,float b,float width,float padding,int align,bool flush){float span=b-a;float paddedWidth=width+2.0*padding;if(a>1.0||b<0.0){return RangeResult(0.0,0.0);}float extra=max(0.0,span-paddedWidth);float pos;if(align==0){float centre=a+b;if(flush){float leftOver=max(0.0,paddedWidth-centre);centre+=min(leftOver,extra);float rightOver=max(0.0,paddedWidth+centre-2.0);centre-=min(rightOver,extra);}pos=centre/2.0;}else if(align<0){float edge=a;if(flush){float over=max(0.0,-edge);edge+=min(over,extra);}pos=edge+padding;}else{float edge=b;if(flush){float over=max(0.0,edge-1.0);edge-=min(over,extra);}pos=edge-padding;}float scale=clamp((span-padding)/paddedWidth,0.0,1.0);return RangeResult(pos,scale);}vec2 calculateRotatedDimensions(float width,mat2 rotationMatrix){vec2 a=abs(rotationMatrix*vec2(width/2.0,0.5));vec2 b=abs(rotationMatrix*vec2(width/2.0,-0.5));return vec2(max(a.x,b.x),max(a.y,b.y))*2.0;}ivec2 fixAlignForAngle(ivec2 align,float angleInDegrees){float a=mod(angleInDegrees+45.0,360.0);int x=align.x;int y=-align.y;if(a<90.0){return ivec2(x,y);}else if(a<180.0){return ivec2(y,-x);}else if(a<270.0){return ivec2(-x,y);}else{return ivec2(-y,x);}}void main(void){float opacity=getScaled_opacity()*uViewOpacity;vec2 size=vec2(getScaled_size());float x=getScaled_x();float y=getScaled_y();float scale=1.0;float angleInDegrees=getScaled_angle();float angle=-angleInDegrees*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);mat2 rotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);vec2 flushSize=calculateRotatedDimensions(width,rotationMatrix);
|
|
216
209
|
#if defined(x2_DEFINED) || defined(y2_DEFINED)
|
|
217
210
|
ivec2 align=fixAlignForAngle(uAlign,angleInDegrees);
|
|
218
211
|
#else
|
|
@@ -225,7 +218,7 @@ vec2 pos=applySampleFacet(vec2(x,y));
|
|
|
225
218
|
#ifdef y2_DEFINED
|
|
226
219
|
float y2=getScaled_y2();vec2 pos2=applySampleFacet(vec2(x,y2));if(uLogoLetter){size.y=(pos2.y-pos.y)*uViewportSize.y;pos.y+=(pos2.y-pos.y)/2.0;}else{RangeResult result=positionInsideRange(min(pos.y,pos2.y),max(pos.y,pos2.y),size.y*scale*flushSize.y/uViewportSize.y,uPaddingY/uViewportSize.y,align.y,uFlushY);pos.y=result.pos;scale*=result.scale;}
|
|
227
220
|
#endif
|
|
228
|
-
if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scaleFadeExtent[0]){gl_Position=vec4(0.0);return;}size*=scale;opacity*=linearstep(scaleFadeExtent[0],scaleFadeExtent[1],scale);}else if(scale<1.0){gl_Position=vec4(0.0);return;}}vec2 charPos=rotationMatrix*(vertexCoord*size+uD);vec2 unitPos=pos+charPos/uViewportSize;gl_Position=unitToNdc(unitPos);vSlope=max(1.0,min(size.x,size.y)/uSdfNumerator);vColor=vec4(getScaled_color()*opacity,opacity);vTexCoord=textureCoord;if(maxValue(uViewportEdgeFadeDistance)>-pow(10.0,10.0)){vEdgeFadeOpacity=minValue(((vec4(1.0,1.0,0.0,0.0)+vec4(-1.0,-1.0,1.0,1.0)*unitPos.yxyx)*uViewportSize.yxyx-uViewportEdgeFadeDistance)/uViewportEdgeFadeWidth);}else{vEdgeFadeOpacity=1.0;}setupPicking();}`,gB="uniform sampler2D uTexture;uniform bool uLogoLetter;in vec2 vTexCoord;in float vEdgeFadeOpacity;in vec4 vColor;in float vSlope;out lowp vec4 fragColor;float median(float r,float g,float b){return max(min(r,g),min(max(r,g),b));}void main(){vec3 c=texture(uTexture,vTexCoord).rgb;float sigDist=1.0-median(c.r,c.g,c.b);float slope=uLogoLetter? 0.7/length(vec2(dFdy(sigDist),dFdx(sigDist))): vSlope;float opa=clamp((sigDist-0.5)*slope+0.5,0.0,1.0);opa*=pow(clamp(vEdgeFadeOpacity,0.0,1.0),2.2);fragColor=vColor*opa;if(uPickingEnabled){fragColor=vPickingColor;}}",mB={left:-1,center:0,right:1},bB={top:-1,middle:0,bottom:1,alphabetic:1};class yB extends Rs{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()}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 Do)this.properties.fitToBand&&qd(t,n);return t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(pB,gB)}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;Yt(this.programInfo,{uPaddingX:t.paddingX,uPaddingY:t.paddingY,uFlushX:!!t.flushX,uFlushY:!!t.flushY,uAlign:[mB[t.align],bB[t.baseline]],uD:[t.dx,-t.dy],uLogoLetter:!!t.logoLetters,uSqueeze:!!t.squeeze,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 o=0;const a="format"in r.text?pt(r.text.format):l=>l;for(const l of n){const u=a(i(l)),c=Qe(u)?u:u===null?"":""+u;o+=c&&c.length||0}const s=new Mk({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(o,this.properties.minBufferSize||0)});s.addBatches(t.facetBatches);const f=s.toArrays();this.rangeMap.migrateEntries(f.rangeMap),this.updateBufferInfo(f)}prepareRender(t){const n=super.prepareRender(t);let r=.35;this.properties.logoLetters&&(r/=2);const i=this.font.metrics.common.base/(this.unitView.context.devicePixelRatio/r);return n.push(()=>Yt(this.programInfo,{uTexture:this.font.texture,uSdfNumerator:i})),n.push(()=>Uo(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Bs(n,this.vertexArrayInfo,n.TRIANGLES,i,r),t)}}function uy(e,t,{spacing:n,devicePixelRatio:r,offset:i,reverse:o}={}){n=n||0,i=i||0;let a=0,s=0;for(const p of e)a+=pu(p.px)+(Wd(p)?0:n),s+=pu(p.grow);a-=n;const f=Math.max(0,t-a),l=r!==void 0?p=>Math.round(p*r)/r:p=>p,u=[],c=[],h=p=>{const b=u.length;if(!b)return;const y=(p?n:0)*(o?-1:1);d-=y;for(let w=0;w<b;w++)c.push({location:d+(w+1)/(b+1)*y,size:0});d+=y,u.length=0};let d=o?Math.max(t,a):0+i;if(e.length==1&&Wd(e[0]))return[{location:d,size:0}];for(let p=0;p<e.length;p++){const b=e[p];if(Wd(b))u.push(b);else{h(c.length>0);const y=pu(b.px)+(s?pu(b.grow)/s*f:0);o&&(d-=y),c.push({location:l(d),size:l(y)}),o?d-=n:d+=y+n}}return d+=o?n:-n,h(!1),c}function wB(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}}const gg=class gg{constructor(t,n){ce(this,Dl);this.width=t,this.height=n}addPadding(t){return ie(this,Dl,xg).call(this,t.width,t.height)}subtractPadding(t){return ie(this,Dl,xg).call(this,-t.width,-t.height)}};Dl=new WeakSet,xg=function(t,n){return new gg({px:(this.width.px??0)+t,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Vr=gg;const Ps=Object.freeze({px:0,grow:0}),cy=new Vr(Ps,Ps);function Wd(e){return!e.px&&!e.grow}function pu(e){return e||0}function vB(e){return e&&(Ft(e.px)||Ft(e.grow))}function hy(e){if(py(e))throw new Error("parseSizeDef does not accept step-based sizes.");if(vB(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}`)}class Et{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 Et(this.top+t,this.right+t,this.bottom+t,this.left+t)}add(t){return new Et(this.top+t.top,this.right+t.right,this.bottom+t.bottom,this.left+t.left)}subtract(t){return new Et(this.top-t.top,this.right-t.right,this.bottom-t.bottom,this.left-t.left)}union(t){return new Et(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 Et(0,this.right,0,this.left)}getVertical(){return new Et(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):Yd}static createFromRecord(t){return new Et(t.top,t.right,t.bottom,t.left)}static zero(){return Yd}static createUniformPadding(t){return new Et(t,t,t,t)}}const Yd=Et.createUniformPadding(0);Object.freeze(Yd);const xB=/^([A-Za-z]+:)?\/\//;function AB(e,t){if(t&&xB.test(t))return t;const n=e();return n&&t?n.endsWith("/")?n+t:n+"/"+t:n??t}const EB="VISIT_SKIP",Ms="VISIT_STOP",dy=e=>e;class _B{constructor(t,n,r,i,o,a={}){ce(this,co);ce(this,Pl);ce(this,Ea,{});ce(this,Fl,{});ce(this,Rl,{});St(this,"opacityFunction",dy);if(!t)throw new Error("View spec must be defined!");this.context=n,this.layoutParent=r,this.dataParent=i,this.name=t.name||o,this.spec=t,this.resolutions={scale:{},axis:{}},ny(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...a},this.needsAxes={x:!1,y:!1}}getPadding(){return this._cache("size/padding",()=>Et.createFromConfig(this.spec.padding))}getOverhang(){return Et.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Vr(ie(this,co,Vl).call(this,"width"),ie(this,co,Vl).call(this,"height")):cy)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return cy;const t=this.getSize();return new Vr(ie(this,co,Vl).call(this,"viewportWidth")??t.width,ie(this,co,Vl).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 ie(this,Pl,Ag).call(this,"layoutParent")}getDataAncestors(){return ie(this,Pl,Ag).call(this,"dataParent")}handleBroadcast(t){for(const n of $(this,Ea)[t.type]||[])n(t)}_addBroadcastHandler(t,n){let r=$(this,Ea)[t];r||(r=[],$(this,Ea)[t]=r),r.push(n)}handleInteractionEvent(t,n,r){const i=r?$(this,Fl):$(this,Rl);for(const o of i[n.type]||[])o(t,n)}addInteractionEventListener(t,n,r){const i=r?$(this,Fl):$(this,Rl);let o=i[t];o||(o=[],i[t]=o),o.push(n)}visit(t){try{const n=t(this);if(t.postOrder&&t.postOrder(this),n!==Ms)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===dy)&&(this.opacityFunction=CB(this))}onBeforeRender(){}render(t,n,r={}){}getEncoding(){const t=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...t,...n};for(const[i,o]of Object.entries(r))o===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 vs(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(t){const n=Pi(t);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(t){const n=Pi(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 AB(()=>{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 Qe(t)?t:t.text}_cache(t,n){return Ho(this,t,n)}_invalidateCacheByPrefix(t,n="self"){switch(n){case"self":hu(this,t);break;case"ancestors":for(const r of this.getLayoutAncestors())hu(r,t);break;case"progeny":this.visit(r=>hu(r,t));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(t){}}Ea=new WeakMap,Fl=new WeakMap,Rl=new WeakMap,co=new WeakSet,Vl=function(t){var i;let n=this.spec[t];const r=t=="viewportWidth"||t=="viewportHeight";if(py(n)){if(r)throw new Gi(`Cannot use step-based size with "${t}"!`,this);const o=n.step,a=(i=this.getScaleResolution(t=="width"?"x":"y"))==null?void 0:i.getScale();if(a){let s=0;if(Mr(a.type))s=a.domain().length;else if(["locus","index"].includes(a.type)){const l=a.domain();s=ns(l)-l[0]}else throw new Gi(`Cannot use step-based size with "${a.type}" scale!`,this);const f=a;return s=Jh(s,f.paddingInner(),f.paddingOuter()),{px:s*o,grow:0}}else throw new Gi("Cannot use 'step' size with missing scale!",this)}else return(n&&hy(n))??(r?void 0:{px:0,grow:1})},Pl=new WeakSet,Ag=function(t){const n=[];let r=this;do n.push(r),r=r[t];while(r);return n};function SB(e){return"unitsPerPixel"in e}function CB(e){const t=e.spec.opacity;if(t!==void 0){if(Ft(t))return n=>n*t;if(SB(t)){const n=o=>{var s;const a=(s=e.getScaleResolution(o))==null?void 0:s.getScale();if(["linear","index","locus"].includes(a==null?void 0:a.type))return a},r=t.channel?n(t.channel):n("x")??n("y");if(!r)throw new Gi("Cannot find a resolved quantitative scale for dynamic opacity!",e);const i=qh().domain(t.unitsPerPixel).range(t.values).clamp(!0);return o=>{const s=$l(r.domain())/1e3;return i(s)*o}}}return n=>n}const py=e=>!!(e!=null&&e.step);class Hi extends _B{constructor(t,n,r,i,o,a){super(t,n,r,i,o,a),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===Ms)return n;if(n!==EB){t.beforeChildren&&t.beforeChildren(this);for(const r of this){const i=r.visit(t);if(i===Ms)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 Hi)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,Ms}),n}getDefaultResolution(t,n){return"shared"}}const gy=1;function Qd(){let e=[0,1],t=[0,1],n=1,r=1,i=0,o=0,a=.5,s=0;const l=u=>(u+a-e[0])/n*r+t[0];return l.invert=u=>(u-t[0])/r*n+e[0]-a,l.domain=function(u){if(arguments.length){e=T_(u),n=e[1]-e[0];const c=e[0]===0&&e[0]===0;if(n<gy&&!c){n=gy;const h=(e[0]+e[1])/2;e[0]=h-n/2,e[1]=h+n/2}return l}else return e.slice()},l.range=function(u){return arguments.length?(t=[...u],r=t[1]-t[0],l):t},l.numberingOffset=function(u){return arguments.length?(s=u,l):s},l.padding=function(u){return arguments.length?(o=u,i=Math.min(1,u),l):i},l.paddingInner=function(u){return arguments.length?(i=Math.min(1,u),l):i},l.paddingOuter=function(u){return arguments.length?(o=u,l):o},l.align=function(u){return arguments.length?(a=Math.max(0,Math.min(1,u)),l):a},l.step=()=>r/n,l.bandwidth=()=>l.step(),l.ticks=u=>{const c=l.align(),h=l.numberingOffset();return nf(e[0]-c+h,e[1]-c+h,Math.min(u,Math.ceil(n))).filter(Number.isInteger).map(d=>d-s)},l.tickFormat=(u,c)=>{if(c)throw new Error("Index scale's tickFormat does not support a specifier!");const d=bi(e[0],e[1],Math.min(u,Math.ceil(n)))<1e5?pt(","):pt(".3s");return p=>d(p+s)},l.copy=()=>Qd().domain(e).range(t).paddingInner(i).paddingOuter(o).numberingOffset(s),l}function IB(){const e=Qd().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(),o=e.numberingOffset(),[a,s]=[Math.max(i[0],0),Math.min(i[1],t.totalSize-1)].map(u=>t.toChromosome(u)),f=Math.max(1,bi(i[0],i[1],r)),l=[];for(let u=a.index;u<=s.index;u++){const c=t.chromosomes[u],h=Math.max(c.continuousStart+f,i[0]-(i[0]-c.continuousStart)%f),d=Math.min(c.continuousEnd-f/4,i[1]+1);for(let p=h;p<=d;p+=f){const b=p-o;b>=i[0]&&b<i[1]&&l.push(b)}}return l},e.tickFormat=(r,i)=>{if(!t)return;if(i)throw new Error("Locus scale's tickFormat does not support a specifier!");const o=e.domain(),a=o[1]-o[0],s=e.numberingOffset(),l=bi(o[0],o[1],Math.min(r,Math.ceil(a)))<1e6?pt(","):pt(".3s"),u=c=>c-t.toChromosome(c).continuousStart;return c=>l(u(c)+s)};const n=e.copy;return e.copy=()=>n().genome(t),e}function TB(e){return e.type=="locus"}function gu(e,t,n){if(n=n||[],e.some(a=>a===null)){if(e.every(a=>a===null))return null;throw console.warn(e),new Error("Cannot merge objects with nulls!")}const r={},i=(a,s)=>a===s||Vo(a)&&Vo(s)||Vo(a)&&s===!0||a===!0&&Zt(s),o=a=>{for(let s in a){const f=a[s];if(!n.includes(s)&&f!==void 0)if(r[s]!==void 0&&!i(r[s],f))console.warn(`Conflicting property ${s} of ${t}: (${JSON.stringify(r[s])} and ${JSON.stringify(a[s])}). Using ${JSON.stringify(r[s])}.`);else{const l=r[s];if(Vo(l))Vo(f)&&(r[s]=gu([l,f],s));else if(Vo(f)){if(!(l===!0||l===void 0))throw new Error("Bug in merge! Target is: "+l);r[s]=gu([{},f],s)}else r[s]=f}}};for(const a of e)o(a);return r}function Vo(e){return Zt(e)&&!Array.isArray(e)}/*!
|
|
221
|
+
if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scaleFadeExtent[0]){gl_Position=vec4(0.0);return;}size*=scale;opacity*=linearstep(scaleFadeExtent[0],scaleFadeExtent[1],scale);}else if(scale<1.0){gl_Position=vec4(0.0);return;}}vec2 charPos=rotationMatrix*(vertexCoord*size+uD);vec2 unitPos=pos+charPos/uViewportSize;gl_Position=unitToNdc(unitPos);vSlope=max(1.0,min(size.x,size.y)/uSdfNumerator);vColor=vec4(getScaled_color()*opacity,opacity);vTexCoord=textureCoord;if(maxValue(uViewportEdgeFadeDistance)>-pow(10.0,10.0)){vEdgeFadeOpacity=minValue(((vec4(1.0,1.0,0.0,0.0)+vec4(-1.0,-1.0,1.0,1.0)*unitPos.yxyx)*uViewportSize.yxyx-uViewportEdgeFadeDistance)/uViewportEdgeFadeWidth);}else{vEdgeFadeOpacity=1.0;}setupPicking();}`,RB="uniform sampler2D uTexture;in vec2 vTexCoord;in float vEdgeFadeOpacity;in vec4 vColor;in float vSlope;out lowp vec4 fragColor;float median(float r,float g,float b){return max(min(r,g),min(max(r,g),b));}void main(){vec3 c=texture(uTexture,vTexCoord).rgb;float sigDist=1.0-median(c.r,c.g,c.b);float slope=uLogoLetter? 0.7/length(vec2(dFdy(sigDist),dFdx(sigDist))): vSlope;float opa=clamp((sigDist-0.5)*slope+0.5,0.0,1.0);opa*=pow(clamp(vEdgeFadeOpacity,0.0,1.0),2.2);fragColor=vColor*opa;if(uPickingEnabled){fragColor=vPickingColor;}}",FB="uniform Mark{uniform mediump float uSdfNumerator;uniform mediump vec2 uD;uniform mediump vec4 uViewportEdgeFadeWidth;uniform mediump vec4 uViewportEdgeFadeDistance;uniform bool uSqueeze;uniform bool uLogoLetter;uniform lowp ivec2 uAlign;uniform mediump float uPaddingX;uniform bool uFlushX;uniform mediump float uPaddingY;uniform bool uFlushY;};",MB={left:-1,center:0,right:1},PB={top:-1,middle:0,bottom:1,alphabetic:1};class LB extends zs{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()}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 Mo)this.properties.fitToBand&&e0(t,n);return t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(DB,RB,[FB])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;Oi(this.markUniformInfo,{uPaddingX:t.paddingX,uPaddingY:t.paddingY,uFlushX:!!t.flushX,uFlushY:!!t.flushY,uAlign:[MB[t.align],PB[t.baseline]],uD:[t.dx,-t.dy],uLogoLetter:!!t.logoLetters,uSqueeze:!!t.squeeze,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 o=0;const a="format"in r.text?pt(r.text.format):l=>l;for(const l of n){const u=a(i(l)),c=Pe(u)?u:u===null?"":""+u;o+=c&&c.length||0}const s=new XT({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(o,this.properties.minBufferSize||0)});s.addBatches(t.facetBatches);const f=s.toArrays();this.rangeMap.migrateEntries(f.rangeMap),this.updateBufferInfo(f)}prepareRender(t){const n=super.prepareRender(t);let r=.35;this.properties.logoLetters&&(r/=2);const i=this.font.metrics.common.base/(this.unitView.context.devicePixelRatio/r);return n.push(()=>{Oi(this.markUniformInfo,{uSdfNumerator:i}),this.markUniformsAltered=!0,zi(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>Vo(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Ls(n,this.vertexArrayInfo,n.TRIANGLES,i,r),t)}}function _y(e,t,{spacing:n,devicePixelRatio:r,offset:i,reverse:o}={}){n=n||0,i=i||0;let a=0,s=0;for(const p of e)a+=Eu(p.px)+(n0(p)?0:n),s+=Eu(p.grow);a-=n;const f=Math.max(0,t-a),l=r!==void 0?p=>Math.round(p*r)/r:p=>p,u=[],c=[],h=p=>{const b=u.length;if(!b)return;const y=(p?n:0)*(o?-1:1);d-=y;for(let w=0;w<b;w++)c.push({location:d+(w+1)/(b+1)*y,size:0});d+=y,u.length=0};let d=o?Math.max(t,a):0+i;if(e.length==1&&n0(e[0]))return[{location:d,size:0}];for(let p=0;p<e.length;p++){const b=e[p];if(n0(b))u.push(b);else{h(c.length>0);const y=Eu(b.px)+(s?Eu(b.grow)/s*f:0);o&&(d-=y),c.push({location:l(d),size:l(y)}),o?d-=n:d+=y+n}}return d+=o?n:-n,h(!1),c}function NB(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}}const _g=class _g{constructor(t,n){se(this,zl);this.width=t,this.height=n}addPadding(t){return te(this,zl,Rg).call(this,t.width,t.height)}subtractPadding(t){return te(this,zl,Rg).call(this,-t.width,-t.height)}};zl=new WeakSet,Rg=function(t,n){return new _g({px:(this.width.px??0)+t,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Hr=_g;const Us=Object.freeze({px:0,grow:0}),Sy=new Hr(Us,Us);function n0(e){return!e.px&&!e.grow}function Eu(e){return e||0}function OB(e){return e&&(kt(e.px)||kt(e.grow))}function Cy(e){if(Iy(e))throw new Error("parseSizeDef does not accept step-based sizes.");if(OB(e))return e;if(kt(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}`)}class Et{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 Et(this.top+t,this.right+t,this.bottom+t,this.left+t)}add(t){return new Et(this.top+t.top,this.right+t.right,this.bottom+t.bottom,this.left+t.left)}subtract(t){return new Et(this.top-t.top,this.right-t.right,this.bottom-t.bottom,this.left-t.left)}union(t){return new Et(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 Et(0,this.right,0,this.left)}getVertical(){return new Et(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):r0}static createFromRecord(t){return new Et(t.top,t.right,t.bottom,t.left)}static zero(){return r0}static createUniformPadding(t){return new Et(t,t,t,t)}}const r0=Et.createUniformPadding(0);Object.freeze(r0);const zB=/^([A-Za-z]+:)?\/\//;function UB(e,t){if(t&&zB.test(t))return t;const n=e();return n&&t?n.endsWith("/")?n+t:n+"/"+t:n??t}const GB="VISIT_SKIP",Gs="VISIT_STOP",ky=e=>e;class HB{constructor(t,n,r,i,o,a={}){se(this,ho);se(this,Hl);se(this,Ca,{});se(this,Ul,{});se(this,Gl,{});St(this,"opacityFunction",ky);if(!t)throw new Error("View spec must be defined!");this.context=n,this.layoutParent=r,this.dataParent=i,this.name=t.name||o,this.spec=t,this.resolutions={scale:{},axis:{}},gy(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...a},this.needsAxes={x:!1,y:!1}}getPadding(){return this._cache("size/padding",()=>Et.createFromConfig(this.spec.padding))}getOverhang(){return Et.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Hr(te(this,ho,Kl).call(this,"width"),te(this,ho,Kl).call(this,"height")):Sy)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return Sy;const t=this.getSize();return new Hr(te(this,ho,Kl).call(this,"viewportWidth")??t.width,te(this,ho,Kl).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 te(this,Hl,Fg).call(this,"layoutParent")}getDataAncestors(){return te(this,Hl,Fg).call(this,"dataParent")}handleBroadcast(t){for(const n of $(this,Ca)[t.type]||[])n(t)}_addBroadcastHandler(t,n){let r=$(this,Ca)[t];r||(r=[],$(this,Ca)[t]=r),r.push(n)}handleInteractionEvent(t,n,r){const i=r?$(this,Ul):$(this,Gl);for(const o of i[n.type]||[])o(t,n)}addInteractionEventListener(t,n,r){const i=r?$(this,Ul):$(this,Gl);let o=i[t];o||(o=[],i[t]=o),o.push(n)}visit(t){try{const n=t(this);if(t.postOrder&&t.postOrder(this),n!==Gs)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===ky)&&(this.opacityFunction=jB(this))}onBeforeRender(){}render(t,n,r={}){}getEncoding(){const t=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...t,...n};for(const[i,o]of Object.entries(r))o===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 Cs(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(t){const n=Fi(t);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(t){const n=Fi(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 UB(()=>{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 Pe(t)?t:t.text}_cache(t,n){return qo(this,t,n)}_invalidateCacheByPrefix(t,n="self"){switch(n){case"self":xu(this,t);break;case"ancestors":for(const r of this.getLayoutAncestors())xu(r,t);break;case"progeny":this.visit(r=>xu(r,t));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(t){}}Ca=new WeakMap,Ul=new WeakMap,Gl=new WeakMap,ho=new WeakSet,Kl=function(t){var i;let n=this.spec[t];const r=t=="viewportWidth"||t=="viewportHeight";if(Iy(n)){if(r)throw new Hi(`Cannot use step-based size with "${t}"!`,this);const o=n.step,a=(i=this.getScaleResolution(t=="width"?"x":"y"))==null?void 0:i.getScale();if(a){let s=0;if(Mr(a.type))s=a.domain().length;else if(["locus","index"].includes(a.type)){const l=a.domain();s=ss(l)-l[0]}else throw new Hi(`Cannot use step-based size with "${a.type}" scale!`,this);const f=a;return s=sd(s,f.paddingInner(),f.paddingOuter()),{px:s*o,grow:0}}else throw new Hi("Cannot use 'step' size with missing scale!",this)}else return(n&&Cy(n))??(r?void 0:{px:0,grow:1})},Hl=new WeakSet,Fg=function(t){const n=[];let r=this;do n.push(r),r=r[t];while(r);return n};function VB(e){return"unitsPerPixel"in e}function jB(e){const t=e.spec.opacity;if(t!==void 0){if(kt(t))return n=>n*t;if(VB(t)){const n=o=>{var s;const a=(s=e.getScaleResolution(o))==null?void 0:s.getScale();if(["linear","index","locus"].includes(a==null?void 0:a.type))return a},r=t.channel?n(t.channel):n("x")??n("y");if(!r)throw new Hi("Cannot find a resolved quantitative scale for dynamic opacity!",e);const i=Jh().domain(t.unitsPerPixel).range(t.values).clamp(!0);return o=>{const s=af(r.domain())/1e3;return i(s)*o}}else if(wy(t)){const n=e.context.paramBroker.createExpression(t.expr);return r=>n(null)*r}}return n=>n}const Iy=e=>!!(e!=null&&e.step);class Vi extends HB{constructor(t,n,r,i,o,a){super(t,n,r,i,o,a),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===Gs)return n;if(n!==GB){t.beforeChildren&&t.beforeChildren(this);for(const r of this){const i=r.visit(t);if(i===Gs)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 Vi)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,Gs}),n}getDefaultResolution(t,n){return"shared"}}const Ty=1;function i0(){let e=[0,1],t=[0,1],n=1,r=1,i=0,o=0,a=.5,s=0;const l=u=>(u+a-e[0])/n*r+t[0];return l.invert=u=>(u-t[0])/r*n+e[0]-a,l.domain=function(u){if(arguments.length){e=H_(u),n=e[1]-e[0];const c=e[0]===0&&e[0]===0;if(n<Ty&&!c){n=Ty;const h=(e[0]+e[1])/2;e[0]=h-n/2,e[1]=h+n/2}return l}else return e.slice()},l.range=function(u){return arguments.length?(t=[...u],r=t[1]-t[0],l):t},l.numberingOffset=function(u){return arguments.length?(s=u,l):s},l.padding=function(u){return arguments.length?(o=u,i=Math.min(1,u),l):i},l.paddingInner=function(u){return arguments.length?(i=Math.min(1,u),l):i},l.paddingOuter=function(u){return arguments.length?(o=u,l):o},l.align=function(u){return arguments.length?(a=Math.max(0,Math.min(1,u)),l):a},l.step=()=>r/n,l.bandwidth=()=>l.step(),l.ticks=u=>{const c=l.align(),h=l.numberingOffset();return cf(e[0]-c+h,e[1]-c+h,Math.min(u,Math.ceil(n))).filter(Number.isInteger).map(d=>d-s)},l.tickFormat=(u,c)=>{if(c)throw new Error("Index scale's tickFormat does not support a specifier!");const d=mi(e[0],e[1],Math.min(u,Math.ceil(n)))<1e5?pt(","):pt(".3s");return p=>d(p+s)},l.copy=()=>i0().domain(e).range(t).paddingInner(i).paddingOuter(o).numberingOffset(s),l}function qB(){const e=i0().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(),o=e.numberingOffset(),[a,s]=[Math.max(i[0],0),Math.min(i[1],t.totalSize-1)].map(u=>t.toChromosome(u)),f=Math.max(1,mi(i[0],i[1],r)),l=[];for(let u=a.index;u<=s.index;u++){const c=t.chromosomes[u],h=Math.max(c.continuousStart+f,i[0]-(i[0]-c.continuousStart)%f),d=Math.min(c.continuousEnd-f/4,i[1]+1);for(let p=h;p<=d;p+=f){const b=p-o;b>=i[0]&&b<i[1]&&l.push(b)}}return l},e.tickFormat=(r,i)=>{if(!t)return;if(i)throw new Error("Locus scale's tickFormat does not support a specifier!");const o=e.domain(),a=o[1]-o[0],s=e.numberingOffset(),l=mi(o[0],o[1],Math.min(r,Math.ceil(a)))<1e6?pt(","):pt(".3s"),u=c=>c-t.toChromosome(c).continuousStart;return c=>l(u(c)+s)};const n=e.copy;return e.copy=()=>n().genome(t),e}function ZB(e){return e.type=="locus"}function _u(e,t,n){if(n=n||[],e.some(a=>a===null)){if(e.every(a=>a===null))return null;throw console.warn(e),new Error("Cannot merge objects with nulls!")}const r={},i=(a,s)=>a===s||Zo(a)&&Zo(s)||Zo(a)&&s===!0||a===!0&&Mt(s),o=a=>{for(let s in a){const f=a[s];if(!n.includes(s)&&f!==void 0)if(r[s]!==void 0&&!i(r[s],f))console.warn(`Conflicting property ${s} of ${t}: (${JSON.stringify(r[s])} and ${JSON.stringify(a[s])}). Using ${JSON.stringify(r[s])}.`);else{const l=r[s];if(Zo(l))Zo(f)&&(r[s]=_u([l,f],s));else if(Zo(f)){if(!(l===!0||l===void 0))throw new Error("Bug in merge! Target is: "+l);r[s]=_u([{},f],s)}else r[s]=f}}};for(const a of e)o(a);return r}function Zo(e){return Mt(e)&&!Array.isArray(e)}/*!
|
|
229
222
|
* Adapted from vega-encode:
|
|
230
223
|
* https://github.com/vega/vega/blob/master/packages/vega-encode/src/ticks.js
|
|
231
224
|
*
|
|
@@ -233,7 +226,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
|
|
|
233
226
|
* All rights reserved.
|
|
234
227
|
*
|
|
235
228
|
* BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
|
|
236
|
-
*/function
|
|
229
|
+
*/function By(e,t,n){return kt(t)&&n!=null&&(t=Math.min(t,~~(af(e.domain())/n)||1)),Mt(t)&&(t.step,t=t.interval),t}function Dy(e,t,n){var r=e.range(),i=Math.floor(r[0]),o=Math.ceil(mn(r));if(i>o&&(r=o,o=i,i=r),t=t.filter(function(s){return s=e(s),i<=s&&s<=o}),n>0&&t.length>1){for(var a=[t[0],mn(t)];t.length>n&&t.length>=3;)t=t.filter(function(s,f){return!(f%2)});t.length<3&&(t=a)}return t}function WB(e,t){return e.bins?Dy(e,YB(e.bins,t)):e.ticks?e.ticks(t):e.domain()}function YB(e,t){var n=e.length,r=~~(n/(t||n));return r<2?e.slice():e.filter(function(i,o){return!(o%r)})}function QB(e,t,n){var r=e.tickFormat?e.tickFormat(t,n):n?pt(n):String;if(Ob(e.type)){var i=$B(n);r=e.bins?i:XB(r,i)}return r}function XB(e,t){return function(n){return e(n)?t(n):""}}function $B(e){var t=Ar(e||",");if(t.precision==null){switch(t.precision=12,t.type){case"%":t.precision-=2;break;case"e":t.precision-=1;break}return KB(pt(t),pt(".1f")(1)[1])}else return pt(t)}function KB(e,t){return function(n){var r=e(n),i=r.indexOf(t),o,a;if(i<0)return r;for(o=JB(r,i),a=o<r.length?r.slice(o):"";--o>i;)if(r[o]!=="0"){++o;break}return r.slice(0,o)+a}}function JB(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}/*!
|
|
237
230
|
* Adapted from vega-encode:
|
|
238
231
|
* https://github.com/vega/vega/blob/master/packages/vega-encode/src/Scale.js
|
|
239
232
|
*
|
|
@@ -241,52 +234,52 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
|
|
|
241
234
|
* All rights reserved.
|
|
242
235
|
*
|
|
243
236
|
* BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
|
|
244
|
-
*/const LB="locus",NB="index";var OB=5;function zB(e){const t=e.type;return!e.bins&&(t===To||t===gs||t===ms)}function yy(e){return xt(e)&&![Nn,NB,LB].includes(e)}function wy(e){return e||{warn:(t,...n)=>console.warn(t,...n)}}var UB=Jl(["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 vy(e,t,n){n=wy(n);for(const r in e)if(!UB[r]){if(r==="padding"&&yy(t.type))continue;Dt(t[r])?t[r](e[r]):n.warn("Unsupported scale property: "+r)}YB(t,e,WB(t,e,jB(t,e,n)))}function GB(e,t){const n=HB(e),r=Ae(n);if(!r)throw new Error("Unknown scale type: "+n);const i=r();return!e.domain&&xt(i.type)&&(e.domain=[0,0]),vy(e,i,t),i}function HB(e){var t=e.type,n="",r;return t===Nn?Nn+"-"+To:(VB(e)&&(r=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=r===2?Nn+"-":r===3?ko+"-":""),(n+t||To).toLowerCase())}function VB(e){const t=e.type;return xt(t)&&t!==gb&&t!==mb&&(e.scheme||e.range&&e.range.length&&e.range.every(Qe))}function jB(e,t,n){if(!e.domain)return 0;n=wy(n);var r=qB(e,t.domainRaw,n);if(r>-1)return r;var i=t.domain,o=e.type,a=t.zero||t.zero===void 0&&zB(e),s,f;return i?(yy(o)&&t.padding&&i[0]!==bn(i)&&(i=ZB(o,i,t.range,t.padding,t.exponent,t.constant)),(a||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(s=(i=i.slice()).length-1||1,a&&(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&&(f=t.domainMid,(f<i[0]||f>i[s])&&n.warn("Scale domainMid exceeds domain min or max.",f),i.splice(s,0,f))),e.domain(xy(o,i,n)),o===td&&e.unknown(t.domainImplicit?Ah:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&my(e,t.nice)||null),i.length):0}function qB(e,t,n){return t?(e.domain(xy(e.type,t,n)),t.length):-1}function ZB(e,t,n,r,i,o){var a=Math.abs(bn(n)-n[0]),s=a/(a-2*r),f=e===Pr?Dg(t,null,s):e===ms?Fc(t,null,s,.5):e===gs?Fc(t,null,s,i||1):e===Nf?KE(t,null,s,o||1):Bg(t,null,s);return t=t.slice(),t[0]=f[0],t[t.length-1]=f[1],t}function xy(e,t,n){if(Eb(e)){var r=Math.abs(t.reduce(function(i,o){return i+(o<0?-1:o>0?1:0)},0));r!==t.length&&n.warn("Log scale domain includes zero: "+Kl(t))}return t}function WB(e,t,n){let r=t.bins;if(r&&!qt(r)){const i=(r.start==null||r.stop==null)&&e.domain(),o=r.start==null?i[0]:r.start,a=r.stop==null?bn(i):r.stop,s=r.step;s||Ye("Scale bins parameter missing step property."),r=Pa(o,a+s,s)}return r?e.bins=r:e.bins&&delete e.bins,e.type===rd&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function YB(e,t,n){var r=e.type,i=t.round||!1,o=t.range;if(t.rangeStep!=null)o=QB(r,t,n);else if(t.scheme&&(o=XB(r,t,n),Dt(o))){if(e.interpolator)return e.interpolator(o);Ye(`Scale type ${r} does not support interpolating color schemes.`)}if(o&&zf(r))return e.interpolator(Uf(Xd(o,t.reverse),t.interpolate,t.interpolateGamma));o&&t.interpolate&&e.interpolate?e.interpolate(_b(t.interpolate,t.interpolateGamma)):Dt(e.round)?e.round(i):Dt(e.rangeRound)&&e.interpolate(i?ds:Fr),o&&e.range(Xd(o,t.reverse))}function QB(e,t,n){e!==wb&&e!==nd&&Ye("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===nd?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*Jh(n,i,r)]}function XB(e,t,n){var r=t.schemeExtent,i,o;return qt(t.scheme)?o=Uf(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),o=od(i),o||Ye(`Unrecognized scheme name: ${t.scheme}`)),n=e===yb?n+1:e===rd?n-1:e===ed||e===bb?+t.schemeCount||OB:n,zf(e)?Ay(o,r,t.reverse):Dt(o)?m8(Ay(o,r),n):e===td?o:o.slice(0,n)}function Ay(e,t,n){return Dt(e)&&(t||n)?g8(e,Xd(t||[0,1],n)):e}function Xd(e,t){return t?e.slice().reverse():e}const Ey=pt(",d");function $B(e,t){return e.chrom+":"+Ey(Math.floor(e.pos+1))+"-"+(e.chrom!=t.chrom?t.chrom+":":"")+Ey(Math.ceil(t.pos))}const KB="https://genomespy.app/data/genomes/";class JB{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=KB;try{this.setChromSizes(eD(await gf({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,o={...t[r],continuousStart:n,continuousEnd:n+i,continuousInterval:[n,n+i],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(o);const a=o.name.replace(/^chr/i,"");for(const s of["chr"+a,"CHR"+a,"Chr"+a,o.number,""+o.number,a,o.name])this.cumulativeChromPositions.set(s,n),this.chromosomesByName.set(s,o);n+=o.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=yo(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 $B(...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 o=this.chromosomes.findIndex(s=>s.name===n.chrom),a=this.chromosomes.findIndex(s=>s.name===r.chrom);i.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[o].size});for(let s=o+1;s<a;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,o=parseInt(n[2].replace(/,/g,"")),a=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):o;return[this.toContinuous(r,o-1),this.toContinuous(i,a)]}}}function eD(e){return b_(e).filter(t=>/^chr[0-9A-Z]+$/.test(t[0])).map(([t,n])=>({name:t,size:parseInt(n)}))}function _y(e){return Zt(e)&&"chrom"in e}function tD(e){return e.every(_y)}class Ls extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof Ls&&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 $d extends Ls{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 Sy extends Ls{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 Cy extends Sy{constructor(){super(),this.type="nominal"}}class nD extends Ls{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 Iy={quantitative:$d,index:$d,locus:$d,nominal:Cy,ordinal:Sy};function Ty(e,t){if(e=="quantitative"&&rD(t)){const n=new nD(t);return n.type=e,n}else if(Iy[e]){const n=new Iy[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function rD(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function iD(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function oD(e,t,n){return e*Math.pow(t/e,n)}Ae("index",Qd,["continuous"]),Ae("locus",IB,["continuous"]),Ae("null",Gf,[]);const ky="quantitative",By="ordinal",Dy="nominal",Fy="locus",aD="index";class sD{constructor(t){ce(this,$n);ce(this,xc);ce(this,Sa);ce(this,mr);ce(this,Ml);ce(this,Ac);ce(this,mg);ce(this,Ll);ce(this,gr,void 0);ce(this,_a,new Set);ce(this,yt,void 0);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){if(t!="domain")throw new Error("Unsupported event type: "+t);$(this,_a).add(n)}removeEventListener(t,n){if(t!="domain")throw new Error("Unsupported event type: "+t);$(this,_a).delete(n)}pushUnitView(t,n){var a;const r=ad(t,n),i=r.type,o=(a=r==null?void 0:r.scale)==null?void 0:a.name;if(o){if(this.name!==void 0&&o!=this.name)throw new Error(`Shared scales have conflicting names: "${o}" vs. "${this.name}"!`);this.name=o}if(!this.type)this.type=i;else if(i!==this.type&&!Es(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${i}. Use "resolve: independent" for channel ${this.channel}`);this.members.push({view:t,channel:n})}isExplicitDomain(){return!!this.getConfiguredDomain()}isDomainInitialized(){const t=$(this,yt);if(!t)return!1;const n=t.domain();return xt(t.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0}getScaleProps(){return Ho(this,"scaleProps",()=>{const t=ie(this,xc,OE).call(this);if(t===null||t.type=="null")return{type:"null"};const n={...ie(this,Ac,zE).call(this,this.type),...t};n.type||(n.type=lD(this.channel,this.type));const r=ie(this,Sa,kc).call(this);return r&&r.length>0?n.domain=r:Mr(n.type)&&(n.domain=new Cy),!n.domain&&n.domainMid!==void 0&&(n.domain=[n.domainMin??0,n.domainMax??1]),this.channel=="y"&&Mr(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),fD(n,this.channel),n})}getConfiguredDomain(){return ie(this,Ll,_g).call(this,t=>Es(t.channel)?void 0:t.view.getConfiguredDomain(t.channel))}getDataDomain(){return ie(this,Ll,_g).call(this,t=>Es(t.channel)?void 0:t.view.extractDataDomain(t.channel))}reconfigure(){if($(this,yt)&&$(this,yt).type!="null"){const t=this.isDomainInitialized(),n=$(this,yt).domain();ty(this,"scaleProps");const r=this.getScaleProps();if(vy(r,$(this,yt)),xt($(this,yt).type)&&mn(this,gr,ie(this,Ml,Eg).call(this)),!t){ie(this,$n,pi).call(this);return}const i=$(this,yt).domain();yf(i,n)||(this.isZoomable()?$(this,yt).domain(n):ie(this,mr,go).call(this)?($(this,yt).domain(n),this.zoomTo(i,500)):ie(this,$n,pi).call(this))}}getScale(){if($(this,yt))return $(this,yt);const t=this.getScaleProps(),n=GB(t);return mn(this,yt,n),TB(n)&&n.genome(this.getGenome()),xt(n.type)&&mn(this,gr,ie(this,Ml,Eg).call(this)),n}getDomain(){return this.getScale().domain()}getComplexDomain(){var t;return((t=this.getGenome())==null?void 0:t.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return ie(this,mr,go).call(this)&&yf(ie(this,Sa,kc).call(this),this.getDomain())}isZoomable(){return ie(this,mr,go).call(this)&&!!this.getScaleProps().zoom}zoom(t,n,r){if(!ie(this,mr,go).call(this))return!1;const i=this.getScale(),o=i.domain();let a=[...o],s=i.invert(n);switch(this.getScaleProps().reverse&&(r=-r),"align"in i&&(s+=i.align()),i.type){case"linear":case"index":case"locus":a=QE(a,r||0),a=Bg(a,s,t);break;case"log":a=XE(a,r||0),a=Dg(a,s,t);break;case"pow":case"sqrt":{const f=i;a=$E(a,r||0,f.exponent()),a=Fc(a,s,t,f.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return $(this,gr)&&(a=JE(a,$(this,gr)[0],$(this,gr)[1])),[0,1].some(f=>a[f]!=o[f])?(i.domain(a),ie(this,$n,pi).call(this),!0):!1}async zoomTo(t,n=!1){var s;if(Xl(n)&&(n=n?700:0),!ie(this,mr,go).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,o=this.getScale(),a=o.domain();if(n>0&&a.length==2){const f=a[1]-a[0],l=a[0]+f/2,u=r[1]-r[0],c=r[0]+u/2;await i.transition({duration:n,easingFunction:iD,onUpdate:h=>{const d=oD(f,u,h),p=(f-d)/(f-u),b=p*c+(1-p)*l;o.domain([b-d/2,b+d/2]),ie(this,$n,pi).call(this)}}),o.domain(r),ie(this,$n,pi).call(this)}else o.domain(r),i==null||i.requestRender(),ie(this,$n,pi).call(this)}resetZoom(){if(!ie(this,mr,go).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=ie(this,Sa,kc).call(this);return[0,1].some(r=>n[r]!=t[r])?($(this,yt).domain(n),ie(this,$n,pi).call(this),!0):!1}getZoomLevel(){return this.isZoomable()?$l($(this,gr))/$l(this.getScale().domain()):1}getGenome(){var n;if(this.type!=="locus")return;const t=(n=this.members[0].view.context.genomeStore)==null?void 0:n.getGenome();if(!t)throw new Error("No genome has been defined!");return t}invertToComplex(t){const n=this.getScale();if("invert"in n){const r=n.invert(t);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(t){const n=this.getGenome();return n?n.toChromosomal(t):t}fromComplex(t){return _y(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&tD(t)?this.getGenome().toContinuousInterval(t):t}}gr=new WeakMap,_a=new WeakMap,yt=new WeakMap,$n=new WeakSet,pi=function(){for(const t of $(this,_a).values())t({type:"domain",scaleResolution:this})},xc=new WeakSet,OE=function(){return Ho(this,"mergedScaleProps",()=>{const t=this.members.map(n=>ad(n.view,n.channel).scale).filter(n=>n!==void 0);return gu(t,"scale",["domain"])})},Sa=new WeakSet,kc=function(){return this.getConfiguredDomain()??(this.type==Fy?this.getGenome().getExtent():this.getDataDomain())},mr=new WeakSet,go=function(){const t=this.getScale().type;return xt(t)},Ml=new WeakSet,Eg=function(){const t=this.getScaleProps(),n=t.zoom;if(uD(n)&&qt(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():$(this,yt).domain()},Ac=new WeakSet,zE=function(t){const n=this.channel,r={};return this.isExplicitDomain()&&(r.zero=!1),As(n)?r.nice=!this.isExplicitDomain():Mi(n)?r.scheme=t==Dy?"tableau10":t==By?"blues":"viridis":Hf(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r},mg=new WeakSet,rz=function(){return this.members.map(t=>t.view.getPathString()).join(", ")},Ll=new WeakSet,_g=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 lD(e,t){if(t==aD||t==Fy){if(kb(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][[Dy,By,ky].indexOf(t)]:t==ky?"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 fD(e,t){As(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&xt(e.type)&&(e.clamp=!0)}function uD(e){return Zt(e)}function Kd(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of Wt(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function Jd(...e){for(const t of e)if(t!==void 0)return t}class cD{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=ns(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 Ho(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:gu(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=o=>{var s;const a=ad(o.view,o.channel);if(!xn(a))return{member:o,explicitTitle:Jd("axis"in a?(s=a.axis)==null?void 0:s.title:void 0,a.title),implicitTitle:Jd(vs(a)?a.field:void 0,sd(a)?a.expr:void 0)}},n=this.members.map(t),r=n.filter(o=>{var a;if(Es(o.member.channel)&&!o.explicitTitle){const s=Pi(o.member.channel);return((a=n.find(f=>f.member.view==o.member.view&&f.member.channel==s))==null?void 0:a.explicitTitle)===void 0}return!0}),i=new Set(r.map(o=>Jd(o.explicitTitle,o.implicitTitle)).filter(Qe));return i.size?[...i].join(", "):null}}const hD={point:rB,rect:Xk,rule:aB,link:hB,text:yB};class Qt extends Hi{constructor(t,n,r,i,o,a){super(t,n,r,i,o,a),this.spec=t;const s=hD[this.getMarkType()];if(s)this.mark=new s(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),this.coords=void 0,this.needsAxes={x:!0,y:!0}}render(t,n,r={}){this.isConfiguredVisible()&&(this.coords=n,t.pushView(this,n),t.renderMark(this.mark,r),t.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}resolve(t){t||(this.resolve("scale"),this.resolve("axis"));const n=this.mark.encoding;for(const[r,i]of Object.entries(n)){if(!Nt(i))continue;const o=Pi(i.resolutionChannel??r);if(!Li(o)||t=="axis"&&!As(o))continue;let a=this;for(;(a.getConfiguredOrDefaultResolution(o,t)=="forced"||a.dataParent instanceof Hi&&["shared","excluded","forced"].includes(a.dataParent.getConfiguredOrDefaultResolution(o,t)))&&a.getConfiguredOrDefaultResolution(o,t)!="excluded";)a=a.dataParent;t=="axis"&&As(r)&&kb(o)?(a.resolutions[t][o]||(a.resolutions[t][o]=new cD(o)),a.resolutions[t][o].pushUnitView(this,r)):t=="scale"&&Li(r)&&(a.resolutions[t][o]||(a.resolutions[t][o]=new sD(o)),a.resolutions[t][o].pushUnitView(this,r))}}getAccessor(t){return this._cache("accessor/"+t,()=>{const n=this.mark.encoding;if(n&&n[t])return this.context.accessorFactory.createAccessor(n[t])})}getFacetAccessor(t){const n=this.getAccessor("sample");return n||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}_validateDomainQuery(t){if(Es(t))throw new Error(`getDomain(${t}), must only be called for primary channels!`);const n=this.mark.encoding[t];if(!Nt(n))throw new Error("The channel has no scale, cannot get domain!");return n}getConfiguredDomain(t){const n=this._validateDomainQuery(t),r=n&&n.scale&&n.scale.domain;if(r){const i=this.getScaleResolution(n.resolutionChannel??t);return Ty(n.type??"nominal",i.fromComplexInterval(r))}}extractDataDomain(t){const r=this._validateDomainQuery(t).type??"nominal",i=s=>{let f;const l=this.mark.encoding[s];if(l){const u=this.context.accessorFactory.createAccessor(l);if(u)if(f=Ty(r),u.constant)f.extend(u({}));else{const c=this.getCollector();c!=null&&c.completed&&c.visitData(h=>f.extend(u(h)))}}return f};let o=i(t);const a=ld[t];if(a){const s=i(a);s&&o.extendAll(s)}return o}getZoomLevel(){const t=n=>{var r;return((r=this.getScaleResolution(n))==null?void 0:r.getZoomLevel())??1};return Do.map(t).reduce((n,r)=>n*r,1)}propagateInteractionEvent(t){this.handleInteractionEvent(void 0,t,!0),t.target=this,!t.stopped&&this.handleInteractionEvent(void 0,t,!1)}getDefaultResolution(t,n){return t=="x"?"shared":"independent"}}function*e0(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of e0(r,[...t,n]))yield i;else yield[[...t,n],r]}class Ry extends Je{get behavior(){return Zd}constructor(t){super(),this.params=t??{type:"collect"},this.observers=[],this.facetBatches=void 0,this._init()}_init(){this._data=[],this.facetBatches=new mi([],JSON.stringify),this.facetBatches.set(void 0,this._data)}reset(){super.reset(),this._init()}handle(t){this._data.push(t)}beginBatch(t){eB(t)&&(this._data=[],this.facetBatches.set(Wt(t.facetId),this._data))}complete(){var i,o;const t=(i=this.params)==null?void 0:i.sort,n=t?Fg(t.field,t.order):void 0,r=a=>{n&&a.sort(n)};if((o=this.params.groupby)!=null&&o.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const a=this.params.groupby.map(f=>Re(f)),s=tf(this._data,...a);this.facetBatches.clear();for(const[f,l]of e0(s))this.facetBatches.set(f,l)}for(const a of this.facetBatches.values())r(a);if(this.children.length)for(const[a,s]of this.facetBatches.entries()){if(a){const f={type:"facet",facetId:a};for(const l of this.children)l.beginBatch(f)}for(const f of s)this._propagate(f)}super.complete();for(const a of this.observers)a(this)}getData(){switch(this._checkStatus(),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const t=this.facetBatches;return{[Symbol.iterator]:function*(){for(const r of t.values())for(let i=0;i<r.length;i++)yield r[i]}}}}}visitData(t){this._checkStatus();for(const n of this.facetBatches.values())for(let r=0;r<n.length;r++)t(n[r])}getItemCount(){let t=0;for(const n of this.facetBatches.values())t+=n.length;return t}_checkStatus(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")}}class mu{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,o=this.values[i];if(n>=o)break;this.ids[r]=this.ids[i],this.values[r]=o,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 o=0;for(;o<i;){let a=(o<<1)+1;const s=a+1;let f=this.ids[a],l=this.values[a];const u=this.values[s];if(s<this.length&&u<l&&(a=s,f=this.ids[s],l=u),l>=r)break;this.ids[o]=f,this.values[o]=l,o=a}this.ids[o]=n,this.values[o]=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 dD extends Je{get behavior(){return Un}constructor(t){super(),this.params=t,this.startAccessor=Re(t.start),this.endAccessor=Re(t.end),this.chromAccessor=t.chrom?Re(t.chrom):n=>{},this.weightAccessor=t.weight?Re(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 mu}reset(){super.reset(),this.initialize()}initialize(){const t=this.as.coverage,n=this.as.end,r=this.as.chrom,i=this.startAccessor,o=this.endAccessor,a=this.chromAccessor,s=this.weightAccessor;let f,l,u,c=0,h;const d=this.ends;d.clear();const p=(y,w,S)=>{if(y==w)return;let C=!1;f&&(f[t]===S?(f[n]=w,C=!0):f[t]!=0&&this._propagate(f)),C||(f=this.createSegment(y,w,S,u))},b=()=>{let y;for(;(y=d.peekValue())!==void 0;)p(h,y,c),h=y,c-=d.pop();h=void 0,f&&(this._propagate(f),f=void 0)};this.handle=y=>{const w=i(y);let S;for(;(S=d.peekValue())!==void 0&&S<w;)p(h,S,c),h=S,c-=d.pop();if(r){let _=a(y);_!==l&&(b(),u=_,l=u)}h!==void 0&&p(h,w,c),h=w;const C=s(y);c+=C,d.push(C,o(y))},this.complete=()=>{b(),super.complete()}}}function pD(e,t,n=0,r=e.length){const i=new mu,o=r-n;let a;for(a=0;a<t&&a<o;a++)i.push(a,e[n+a]);for(;a<o;a++){const l=e[n+a];l>=i.peekValue()&&(i.push(a,l),i.pop())}const s=[];let f;for(;(f=i.pop())!==void 0;)s.push(n+f);return s.reverse()}class gD{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 o=this._findSlot(t,n,i);return o>=0?o: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++,o=this.n++;return this.lowerLimits[i]=this.lowerLimits[r],this.upperLimits[i]=t,this.lowerLimits[o]=n,this.upperLimits[o]=this.upperLimits[r],this.lowerChildren[r]=i,this.upperChildren[r]=o,!0}}class mD extends Je{get behavior(){return Zd}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=Re(this.params.pos),this.posBisector=ef(this.posAccessor),this.scoreAccessor=Re(this.params.score),this.widthAccessor=Re(this.params.width),this.laneAccessor=this.params.lane?Re(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 gD(200));this.schedule(),super.complete()}_filterAndPropagate(){var a;super.reset();const t=this.resolution.getScale(),n=(a=this.resolution.members[0].view.coords)==null?void 0:a[this.channel=="x"?"width":"height"];if(!n)return;for(const s of this.reservationMaps.values())s.reset();const r=t.domain(),i=70,o=pD(this._scores,i,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of o){const f=this._data[s],l=t(this.posAccessor(f))*n,u=this.widthAccessor(f)/2+this.padding;this.reservationMaps.get(this.laneAccessor(f)).reserve(l-u,l+u)&&this._propagate(f)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class bD extends Je{constructor(t){super(),this.params=t,this.predicate=void 0}initialize(){this.predicate=xh(this.params.expr,this.getGlobalObject())}handle(t){this.predicate(t)&&this._propagate(t)}}class yD extends Je{get behavior(){return Un}constructor(t){super();const n=t.index;if(t.fields){const r=Wt(t.fields).map(o=>Re(o)),i=Wt(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=o=>{const a=r.map((f,l)=>f(o)??[]),s=a[0].length;for(let f=0;f<s;f++){const l=Object.assign({},o);for(let u=0;u<r.length;u++)l[i[u]]=f<a[u].length?a[u][f]:null;n&&(l[n]=f),this._propagate(l)}}}else this.handle=r=>{for(let i=0;i<r.length;i++){const o=Object.assign({},r[i]);n&&(o[n]=i),this._propagate(o)}}}}const wD="0".charCodeAt(0);function*vD(e,t=","){const n=t.charCodeAt(0);let r=0;for(let i=0;i<e.length;i++){const o=e.charCodeAt(i);o==n?(yield r,r=0):r=r*10+o-wD}yield r}class xD extends Je{get behavior(){return Un}constructor(t){super();const n=Re(t.exons??"exons"),r=Re(t.start??"start"),[i,o]=t.as||["exonStart","exonEnd"];this.handle=a=>{let s=r(a),f=s,l=!0;const u=n(a);for(const c of vD(u)){if(l)f=s+c;else{s=f+c;const h=Object.assign({},a);h[i]=f,h[o]=s,this._propagate(h)}l=!l}}}}class AD extends Je{get behavior(){return Un}constructor(t){super();const n=Wt(t.field).map(o=>Re(o)),r=Wt(t.separator),i=Wt(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=o=>{if(n.some(f=>!f(o)))return;const a=n.map((f,l)=>f(o).split(r[l]));ED(a,o);const s=a[0].length;for(let f=0;f<s;f++){const l=Object.assign({},o);for(let u=0;u<n.length;u++)l[i[u]]=a[u][f];this._propagate(l)}}}}function ED(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 _D extends Je{get behavior(){return Hr}constructor(t){super(),this.params=t,this.as=t.as,this.fn=void 0}initialize(){this.fn=xh(this.params.expr,this.getGlobalObject())}handle(t){t[this.as]=this.fn(t),this._propagate(t)}}class Py extends Je{get behavior(){return Hr}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 o=Re(t.chrom),a=Wt(t.pos).map(p=>Re(p)),s=Wt(t.as);if(a.length!=s.length)throw new Error('The number of "pos" and "as" elements must be equal!');const f=Wt(t.offset);let l;if(f.length==0)l=new Array(a.length).fill(0);else if(f.length==1)l=new Array(a.length).fill(f[0]);else if(f.length==a.length)l=f;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(t.offset)}!`);const u=new Function("datum","chromOffset","posAccessors",s.map((p,b)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${b}](datum) - ${l[b]};`).join(`
|
|
245
|
-
`));let c,h=0;const d=p=>{if(p!==c){if(h=i.cumulativeChromPositions.get(p),h===void 0)throw new Error("Unknown chromosome/contig: "+p);c=p}return h};this.handle=p=>{u(p,d(o(p)),a),this._propagate(p)}}}const My={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 SD extends Je{get behavior(){return Hr}constructor(t){super();const n=Hd(My),r=Re(t.field),i=t.as,o=t.fontSize;this.handle=a=>{const s=r(a);s!==void 0?a[i]=n.measureWidth(s,o):a[i]=0,this._propagate(a)}}}const CD=65536;class ID extends Je{get behavior(){return Hr}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=Re(t.start),o=Re(t.end);if(!t.preference!=!t.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(t.preference){const a=new Float64Array(CD),s=Re(t.preference),f=t.preferredOrder;let l=1/0;this.handle=u=>{const c=i(u);c<l&&a.fill(-1/0),l=c;const h=f.indexOf(s(u));let d=-1;if(h>=0&&a[h]<c)d=h;else{const p=i(u);for(d=0;d<a.length&&!(a[d]<p);d++);if(d>=a.length)throw new Error("Out of lanes!")}a[d]=o(u)+r,u[n]=d,this._propagate(u)}}else{const a=new mu,s=new mu;let f=-1/0,l=0;this.handle=u=>{const c=i(u);for(;a.length&&(a.peekValue()<=c||c<f);){const d=a.pop();s.push(d,d)}f=c;let h=s.pop();h===void 0&&(h=l++),u[n]=h,this._propagate(u),a.push(h,o(u)+r)}}}}class TD extends Je{get behavior(){return Un}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=>Re(i)),r=t.as?t.as:n.map(bo);this.handle=i=>{const o={};for(let a=0;a<n.length;a++)o[r[a]]=n[a](i);this._propagate(o)}}}class kD extends Je{get behavior(){return Hr}constructor(t){super();const n=new RegExp(t.regex),r=typeof t.as=="string"?[t.as]:t.as,i=Re(t.field);this.handle=o=>{const a=i(o);if(Qe(a)){const s=a.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 f=0;f<r.length;f++)o[r[f]]=s[f+1]}else if(t.skipInvalidInput)for(let f=0;f<r.length;f++)o[r[f]]=void 0;else throw new Error(`"${a}" 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 a}, field content: "${a}".`);this._propagate(o)}}}class BD extends Je{get behavior(){return Un}constructor(t){super();const n=Wt(t.columnRegex).map(h=>new RegExp(h)),r=Wt(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,o=t.asKey||"sample";let a,s,f;const l=h=>{var y;const d=Object.keys(h),p=new Map;for(const[w,S]of n.entries())for(const C of d){const _=(y=S.exec(C))==null?void 0:y[1];if(_!==void 0){let k=p.get(_);k||(k=[],p.set(_,k)),k[w]=C}}a=[...p.entries()],s=d.filter(w=>!n.some(S=>S.test(w))&&!(i&&i.test(w)));const b=[...s.map(w=>JSON.stringify(w)+": datum["+JSON.stringify(w)+"]"),JSON.stringify(o)+": sampleId",...r.map(w=>JSON.stringify(w)+": null")];f=new Function("datum","sampleId",`return {
|
|
237
|
+
*/const eD="locus",tD="index";var nD=5;function rD(e){const t=e.type;return!e.bins&&(t===Do||t===xs||t===As)}function Ry(e){return xt(e)&&![Ln,tD,eD].includes(e)}function Fy(e){return e||{warn:(t,...n)=>console.warn(t,...n)}}var iD=lf(["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 My(e,t,n){n=Fy(n);for(const r in e)if(!iD[r]){if(r==="padding"&&Ry(t.type))continue;Pt(t[r])?t[r](e[r]):n.warn("Unsupported scale property: "+r)}hD(t,e,cD(t,e,lD(t,e,n)))}function oD(e,t){const n=aD(e),r=Ae(n);if(!r)throw new Error("Unknown scale type: "+n);const i=r();return!e.domain&&xt(i.type)&&(e.domain=[0,0]),My(e,i,t),i}function aD(e){var t=e.type,n="",r;return t===Ln?Ln+"-"+Do:(sD(e)&&(r=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=r===2?Ln+"-":r===3?Ro+"-":""),(n+t||Do).toLowerCase())}function sD(e){const t=e.type;return xt(t)&&t!==Bb&&t!==Db&&(e.scheme||e.range&&e.range.length&&e.range.every(Pe))}function lD(e,t,n){if(!e.domain)return 0;n=Fy(n);var r=fD(e,t.domainRaw,n);if(r>-1)return r;var i=t.domain,o=e.type,a=t.zero||t.zero===void 0&&rD(e),s,f;return i?(Ry(o)&&t.padding&&i[0]!==mn(i)&&(i=uD(o,i,t.range,t.padding,t.exponent,t.constant)),(a||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(s=(i=i.slice()).length-1||1,a&&(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&&(f=t.domainMid,(f<i[0]||f>i[s])&&n.warn("Scale domainMid exceeds domain min or max.",f),i.splice(s,0,f))),e.domain(Py(o,i,n)),o===fd&&e.unknown(t.domainImplicit?Bh:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&By(e,t.nice)||null),i.length):0}function fD(e,t,n){return t?(e.domain(Py(e.type,t,n)),t.length):-1}function uD(e,t,n,r,i,o){var a=Math.abs(mn(n)-n[0]),s=a/(a-2*r),f=e===Fr?Hg(t,null,s):e===As?Gc(t,null,s,.5):e===xs?Gc(t,null,s,i||1):e===Zf?h_(t,null,s,o||1):Gg(t,null,s);return t=t.slice(),t[0]=f[0],t[t.length-1]=f[1],t}function Py(e,t,n){if(Ob(e)){var r=Math.abs(t.reduce(function(i,o){return i+(o<0?-1:o>0?1:0)},0));r!==t.length&&n.warn("Log scale domain includes zero: "+sf(t))}return t}function cD(e,t,n){let r=t.bins;if(r&&!Ft(r)){const i=(r.start==null||r.stop==null)&&e.domain(),o=r.start==null?i[0]:r.start,a=r.stop==null?mn(i):r.stop,s=r.step;s||Qe("Scale bins parameter missing step property."),r=za(o,a+s,s)}return r?e.bins=r:e.bins&&delete e.bins,e.type===cd&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function hD(e,t,n){var r=e.type,i=t.round||!1,o=t.range;if(t.rangeStep!=null)o=dD(r,t,n);else if(t.scheme&&(o=pD(r,t,n),Pt(o))){if(e.interpolator)return e.interpolator(o);Qe(`Scale type ${r} does not support interpolating color schemes.`)}if(o&&Yf(r))return e.interpolator(Qf(o0(o,t.reverse),t.interpolate,t.interpolateGamma));o&&t.interpolate&&e.interpolate?e.interpolate(zb(t.interpolate,t.interpolateGamma)):Pt(e.round)?e.round(i):Pt(e.rangeRound)&&e.interpolate(i?ws:Dr),o&&e.range(o0(o,t.reverse))}function dD(e,t,n){e!==Mb&&e!==ud&&Qe("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===ud?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*sd(n,i,r)]}function pD(e,t,n){var r=t.schemeExtent,i,o;return Ft(t.scheme)?o=Qf(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),o=dd(i),o||Qe(`Unrecognized scheme name: ${t.scheme}`)),n=e===Fb?n+1:e===cd?n-1:e===ld||e===Rb?+t.schemeCount||nD:n,Yf(e)?Ly(o,r,t.reverse):Pt(o)?R8(Ly(o,r),n):e===fd?o:o.slice(0,n)}function Ly(e,t,n){return Pt(e)&&(t||n)?D8(e,o0(t||[0,1],n)):e}function o0(e,t){return t?e.slice().reverse():e}const Ny=pt(",d");function gD(e,t){return e.chrom+":"+Ny(Math.floor(e.pos+1))+"-"+(e.chrom!=t.chrom?t.chrom+":":"")+Ny(Math.ceil(t.pos))}const mD="https://genomespy.app/data/genomes/";class bD{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=mD;try{this.setChromSizes(yD(await Ef({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,o={...t[r],continuousStart:n,continuousEnd:n+i,continuousInterval:[n,n+i],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(o);const a=o.name.replace(/^chr/i,"");for(const s of["chr"+a,"CHR"+a,"Chr"+a,o.number,""+o.number,a,o.name])this.cumulativeChromPositions.set(s,n),this.chromosomesByName.set(s,o);n+=o.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=xo(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 gD(...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 o=this.chromosomes.findIndex(s=>s.name===n.chrom),a=this.chromosomes.findIndex(s=>s.name===r.chrom);i.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[o].size});for(let s=o+1;s<a;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,o=parseInt(n[2].replace(/,/g,"")),a=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):o;return[this.toContinuous(r,o-1),this.toContinuous(i,a)]}}}function yD(e){return D_(e).filter(t=>/^chr[0-9A-Z]+$/.test(t[0])).map(([t,n])=>({name:t,size:parseInt(n)}))}function Oy(e){return Mt(e)&&"chrom"in e}function wD(e){return e.every(Oy)}class Hs extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof Hs&&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 a0 extends Hs{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 zy extends Hs{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 Uy extends zy{constructor(){super(),this.type="nominal"}}class vD extends Hs{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 Gy={quantitative:a0,index:a0,locus:a0,nominal:Uy,ordinal:zy};function Hy(e,t){if(e=="quantitative"&&xD(t)){const n=new vD(t);return n.type=e,n}else if(Gy[e]){const n=new Gy[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function xD(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function AD(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function ED(e,t,n){return e*Math.pow(t/e,n)}Ae("index",i0,["continuous"]),Ae("locus",qB,["continuous"]),Ae("null",Xf,[]);const Vy="quantitative",jy="ordinal",qy="nominal",Zy="locus",_D="index";class SD{constructor(t){se(this,Xn);se(this,Bc);se(this,Ia);se(this,gr);se(this,Vl);se(this,Dc);se(this,Sg);se(this,jl);se(this,pr,void 0);se(this,ka,new Set);se(this,yt,void 0);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){if(t!="domain")throw new Error("Unsupported event type: "+t);$(this,ka).add(n)}removeEventListener(t,n){if(t!="domain")throw new Error("Unsupported event type: "+t);$(this,ka).delete(n)}pushUnitView(t,n){var a;const r=pd(t,n),i=r.type,o=(a=r==null?void 0:r.scale)==null?void 0:a.name;if(o){if(this.name!==void 0&&o!=this.name)throw new Error(`Shared scales have conflicting names: "${o}" vs. "${this.name}"!`);this.name=o}if(!this.type)this.type=i;else if(i!==this.type&&!Ts(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${i}. Use "resolve: independent" for channel ${this.channel}`);this.members.push({view:t,channel:n})}isExplicitDomain(){return!!this.getConfiguredDomain()}isDomainInitialized(){const t=$(this,yt);if(!t)return!1;const n=t.domain();return xt(t.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0}getScaleProps(){return qo(this,"scaleProps",()=>{const t=te(this,Bc,KE).call(this);if(t===null||t.type=="null")return{type:"null"};const n={...te(this,Dc,JE).call(this,this.type),...t};n.type||(n.type=CD(this.channel,this.type));const r=te(this,Ia,Oc).call(this);return r&&r.length>0?n.domain=r:Mr(n.type)&&(n.domain=new Uy),!n.domain&&n.domainMid!==void 0&&(n.domain=[n.domainMin??0,n.domainMax??1]),this.channel=="y"&&Mr(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),kD(n,this.channel),n})}getConfiguredDomain(){return te(this,jl,Pg).call(this,t=>Ts(t.channel)?void 0:t.view.getConfiguredDomain(t.channel))}getDataDomain(){return te(this,jl,Pg).call(this,t=>Ts(t.channel)?void 0:t.view.extractDataDomain(t.channel))}reconfigure(){if($(this,yt)&&$(this,yt).type!="null"){const t=this.isDomainInitialized(),n=$(this,yt).domain();py(this,"scaleProps");const r=this.getScaleProps();if(My(r,$(this,yt)),xt($(this,yt).type)&&Ct(this,pr,te(this,Vl,Mg).call(this)),!t){te(this,Xn,di).call(this);return}const i=$(this,yt).domain();Cf(i,n)||(this.isZoomable()?$(this,yt).domain(n):te(this,gr,yo).call(this)?($(this,yt).domain(n),this.zoomTo(i,500)):te(this,Xn,di).call(this))}}getScale(){if($(this,yt))return $(this,yt);const t=this.getScaleProps(),n=oD(t);return Ct(this,yt,n),ZB(n)&&n.genome(this.getGenome()),xt(n.type)&&Ct(this,pr,te(this,Vl,Mg).call(this)),n}getDomain(){return this.getScale().domain()}getComplexDomain(){var t;return((t=this.getGenome())==null?void 0:t.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return te(this,gr,yo).call(this)&&Cf(te(this,Ia,Oc).call(this),this.getDomain())}isZoomable(){return te(this,gr,yo).call(this)&&!!this.getScaleProps().zoom}zoom(t,n,r){if(!te(this,gr,yo).call(this))return!1;const i=this.getScale(),o=i.domain();let a=[...o],s=i.invert(n);switch(this.getScaleProps().reverse&&(r=-r),"align"in i&&(s+=i.align()),i.type){case"linear":case"index":case"locus":a=f_(a,r||0),a=Gg(a,s,t);break;case"log":a=u_(a,r||0),a=Hg(a,s,t);break;case"pow":case"sqrt":{const f=i;a=c_(a,r||0,f.exponent()),a=Gc(a,s,t,f.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return $(this,pr)&&(a=d_(a,$(this,pr)[0],$(this,pr)[1])),[0,1].some(f=>a[f]!=o[f])?(i.domain(a),te(this,Xn,di).call(this),!0):!1}async zoomTo(t,n=!1){var s;if(La(n)&&(n=n?700:0),!te(this,gr,yo).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,o=this.getScale(),a=o.domain();if(n>0&&a.length==2){const f=a[1]-a[0],l=a[0]+f/2,u=r[1]-r[0],c=r[0]+u/2;await i.transition({duration:n,easingFunction:AD,onUpdate:h=>{const d=ED(f,u,h),p=(f-d)/(f-u),b=p*c+(1-p)*l;o.domain([b-d/2,b+d/2]),te(this,Xn,di).call(this)}}),o.domain(r),te(this,Xn,di).call(this)}else o.domain(r),i==null||i.requestRender(),te(this,Xn,di).call(this)}resetZoom(){if(!te(this,gr,yo).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=te(this,Ia,Oc).call(this);return[0,1].some(r=>n[r]!=t[r])?($(this,yt).domain(n),te(this,Xn,di).call(this),!0):!1}getZoomLevel(){return this.isZoomable()?af($(this,pr))/af(this.getScale().domain()):1}getGenome(){var n;if(this.type!=="locus")return;const t=(n=this.members[0].view.context.genomeStore)==null?void 0:n.getGenome();if(!t)throw new Error("No genome has been defined!");return t}invertToComplex(t){const n=this.getScale();if("invert"in n){const r=n.invert(t);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(t){const n=this.getGenome();return n?n.toChromosomal(t):t}fromComplex(t){return Oy(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&wD(t)?this.getGenome().toContinuousInterval(t):t}}pr=new WeakMap,ka=new WeakMap,yt=new WeakMap,Xn=new WeakSet,di=function(){for(const t of $(this,ka).values())t({type:"domain",scaleResolution:this})},Bc=new WeakSet,KE=function(){return qo(this,"mergedScaleProps",()=>{const t=this.members.map(n=>pd(n.view,n.channel).scale).filter(n=>n!==void 0);return _u(t,"scale",["domain"])})},Ia=new WeakSet,Oc=function(){return this.getConfiguredDomain()??(this.type==Zy?this.getGenome().getExtent():this.getDataDomain())},gr=new WeakSet,yo=function(){const t=this.getScale().type;return xt(t)},Vl=new WeakSet,Mg=function(){const t=this.getScaleProps(),n=t.zoom;if(ID(n)&&Ft(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():$(this,yt).domain()},Dc=new WeakSet,JE=function(t){const n=this.channel,r={};return this.isExplicitDomain()&&(r.zero=!1),Is(n)?r.nice=!this.isExplicitDomain():Mi(n)?r.scheme=t==qy?"tableau10":t==jy?"blues":"viridis":$f(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r},Sg=new WeakSet,xz=function(){return this.members.map(t=>t.view.getPathString()).join(", ")},jl=new WeakSet,Pg=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 CD(e,t){if(t==_D||t==Zy){if(jb(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][[qy,jy,Vy].indexOf(t)]:t==Vy?"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 kD(e,t){Is(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&xt(e.type)&&(e.clamp=!0)}function ID(e){return Mt(e)}function s0(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of Yt(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function l0(...e){for(const t of e)if(t!==void 0)return t}class TD{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=ss(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 qo(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:_u(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=o=>{var s;const a=pd(o.view,o.channel);if(!vn(a))return{member:o,explicitTitle:l0("axis"in a?(s=a.axis)==null?void 0:s.title:void 0,a.title),implicitTitle:l0(Cs(a)?a.field:void 0,gd(a)?a.expr:void 0)}},n=this.members.map(t),r=n.filter(o=>{var a;if(Ts(o.member.channel)&&!o.explicitTitle){const s=Fi(o.member.channel);return((a=n.find(f=>f.member.view==o.member.view&&f.member.channel==s))==null?void 0:a.explicitTitle)===void 0}return!0}),i=new Set(r.map(o=>l0(o.explicitTitle,o.implicitTitle)).filter(Pe));return i.size?[...i].join(", "):null}}const BD={point:wB,rect:cB,rule:EB,link:TB,text:LB};class Qt extends Vi{constructor(t,n,r,i,o,a){super(t,n,r,i,o,a),this.spec=t;const s=BD[this.getMarkType()];if(s)this.mark=new s(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),this.coords=void 0,this.needsAxes={x:!0,y:!0}}render(t,n,r={}){this.isConfiguredVisible()&&(this.coords=n,t.pushView(this,n),t.renderMark(this.mark,r),t.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}resolve(t){t||(this.resolve("scale"),this.resolve("axis"));const n=this.mark.encoding;for(const[r,i]of Object.entries(n)){if(!Ut(i))continue;const o=Fi(i.resolutionChannel??r);if(!Pi(o)||t=="axis"&&!Is(o))continue;let a=this;for(;(a.getConfiguredOrDefaultResolution(o,t)=="forced"||a.dataParent instanceof Vi&&["shared","excluded","forced"].includes(a.dataParent.getConfiguredOrDefaultResolution(o,t)))&&a.getConfiguredOrDefaultResolution(o,t)!="excluded";)a=a.dataParent;t=="axis"&&Is(r)&&jb(o)?(a.resolutions[t][o]||(a.resolutions[t][o]=new TD(o)),a.resolutions[t][o].pushUnitView(this,r)):t=="scale"&&Pi(r)&&(a.resolutions[t][o]||(a.resolutions[t][o]=new SD(o)),a.resolutions[t][o].pushUnitView(this,r))}}getAccessor(t){return this._cache("accessor/"+t,()=>{const n=this.mark.encoding;if(n&&n[t])return this.context.accessorFactory.createAccessor(n[t])})}getFacetAccessor(t){const n=this.getAccessor("sample");return n||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}_validateDomainQuery(t){if(Ts(t))throw new Error(`getDomain(${t}), must only be called for primary channels!`);const n=this.mark.encoding[t];if(!Ut(n))throw new Error("The channel has no scale, cannot get domain!");return n}getConfiguredDomain(t){const n=this._validateDomainQuery(t),r=n&&n.scale&&n.scale.domain;if(r){const i=this.getScaleResolution(n.resolutionChannel??t);return Hy(n.type??"nominal",i.fromComplexInterval(r))}}extractDataDomain(t){const r=this._validateDomainQuery(t).type??"nominal",i=s=>{let f;const l=this.mark.encoding[s];if(l){const u=this.context.accessorFactory.createAccessor(l);if(u)if(f=Hy(r),u.constant)f.extend(u({}));else{const c=this.getCollector();c!=null&&c.completed&&c.visitData(h=>f.extend(u(h)))}}return f};let o=i(t);const a=md[t];if(a){const s=i(a);s&&o.extendAll(s)}return o}getZoomLevel(){const t=n=>{var r;return((r=this.getScaleResolution(n))==null?void 0:r.getZoomLevel())??1};return Mo.map(t).reduce((n,r)=>n*r,1)}propagateInteractionEvent(t){this.handleInteractionEvent(void 0,t,!0),t.target=this,!t.stopped&&this.handleInteractionEvent(void 0,t,!1)}getDefaultResolution(t,n){return t=="x"?"shared":"independent"}}function*f0(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of f0(r,[...t,n]))yield i;else yield[[...t,n],r]}class Wy extends Je{get behavior(){return t0}constructor(t){super(),this.params=t??{type:"collect"},this.observers=[],this.facetBatches=void 0,this._init()}_init(){this._data=[],this.facetBatches=new gi([],JSON.stringify),this.facetBatches.set(void 0,this._data)}reset(){super.reset(),this._init()}handle(t){this._data.push(t)}beginBatch(t){mB(t)&&(this._data=[],this.facetBatches.set(Yt(t.facetId),this._data))}complete(){var i,o;const t=(i=this.params)==null?void 0:i.sort,n=t?Vg(t.field,t.order):void 0,r=a=>{n&&a.sort(n)};if((o=this.params.groupby)!=null&&o.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const a=this.params.groupby.map(f=>Fe(f)),s=uf(this._data,...a);this.facetBatches.clear();for(const[f,l]of f0(s))this.facetBatches.set(f,l)}for(const a of this.facetBatches.values())r(a);if(this.children.length)for(const[a,s]of this.facetBatches.entries()){if(a){const f={type:"facet",facetId:a};for(const l of this.children)l.beginBatch(f)}for(const f of s)this._propagate(f)}super.complete();for(const a of this.observers)a(this)}getData(){switch(this._checkStatus(),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const t=this.facetBatches;return{[Symbol.iterator]:function*(){for(const r of t.values())for(let i=0;i<r.length;i++)yield r[i]}}}}}visitData(t){this._checkStatus();for(const n of this.facetBatches.values())for(let r=0;r<n.length;r++)t(n[r])}getItemCount(){let t=0;for(const n of this.facetBatches.values())t+=n.length;return t}_checkStatus(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")}}class Su{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,o=this.values[i];if(n>=o)break;this.ids[r]=this.ids[i],this.values[r]=o,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 o=0;for(;o<i;){let a=(o<<1)+1;const s=a+1;let f=this.ids[a],l=this.values[a];const u=this.values[s];if(s<this.length&&u<l&&(a=s,f=this.ids[s],l=u),l>=r)break;this.ids[o]=f,this.values[o]=l,o=a}this.ids[o]=n,this.values[o]=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 DD extends Je{get behavior(){return zn}constructor(t){super(),this.params=t,this.startAccessor=Fe(t.start),this.endAccessor=Fe(t.end),this.chromAccessor=t.chrom?Fe(t.chrom):n=>{},this.weightAccessor=t.weight?Fe(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 Su}reset(){super.reset(),this.initialize()}initialize(){const t=this.as.coverage,n=this.as.end,r=this.as.chrom,i=this.startAccessor,o=this.endAccessor,a=this.chromAccessor,s=this.weightAccessor;let f,l,u,c=0,h;const d=this.ends;d.clear();const p=(y,w,_)=>{if(y==w)return;let C=!1;f&&(f[t]===_?(f[n]=w,C=!0):f[t]!=0&&this._propagate(f)),C||(f=this.createSegment(y,w,_,u))},b=()=>{let y;for(;(y=d.peekValue())!==void 0;)p(h,y,c),h=y,c-=d.pop();h=void 0,f&&(this._propagate(f),f=void 0)};this.handle=y=>{const w=i(y);let _;for(;(_=d.peekValue())!==void 0&&_<w;)p(h,_,c),h=_,c-=d.pop();if(r){let S=a(y);S!==l&&(b(),u=S,l=u)}h!==void 0&&p(h,w,c),h=w;const C=s(y);c+=C,d.push(C,o(y))},this.complete=()=>{b(),super.complete()}}}function RD(e,t,n=0,r=e.length){const i=new Su,o=r-n;let a;for(a=0;a<t&&a<o;a++)i.push(a,e[n+a]);for(;a<o;a++){const l=e[n+a];l>=i.peekValue()&&(i.push(a,l),i.pop())}const s=[];let f;for(;(f=i.pop())!==void 0;)s.push(n+f);return s.reverse()}class FD{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 o=this._findSlot(t,n,i);return o>=0?o: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++,o=this.n++;return this.lowerLimits[i]=this.lowerLimits[r],this.upperLimits[i]=t,this.lowerLimits[o]=n,this.upperLimits[o]=this.upperLimits[r],this.lowerChildren[r]=i,this.upperChildren[r]=o,!0}}class MD extends Je{get behavior(){return t0}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=Fe(this.params.pos),this.posBisector=ff(this.posAccessor),this.scoreAccessor=Fe(this.params.score),this.widthAccessor=Fe(this.params.width),this.laneAccessor=this.params.lane?Fe(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 FD(200));this.schedule(),super.complete()}_filterAndPropagate(){var a;super.reset();const t=this.resolution.getScale(),n=(a=this.resolution.members[0].view.coords)==null?void 0:a[this.channel=="x"?"width":"height"];if(!n)return;for(const s of this.reservationMaps.values())s.reset();const r=t.domain(),i=70,o=RD(this._scores,i,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of o){const f=this._data[s],l=t(this.posAccessor(f))*n,u=this.widthAccessor(f)/2+this.padding;this.reservationMaps.get(this.laneAccessor(f)).reserve(l-u,l+u)&&this._propagate(f)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class PD extends Je{constructor(t){super(),this.params=t,this.predicate=void 0}initialize(){this.predicate=Ff(this.params.expr,this.getGlobalObject())}handle(t){this.predicate(t)&&this._propagate(t)}}class LD extends Je{get behavior(){return zn}constructor(t){super();const n=t.index;if(t.fields){const r=Yt(t.fields).map(o=>Fe(o)),i=Yt(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=o=>{const a=r.map((f,l)=>f(o)??[]),s=a[0].length;for(let f=0;f<s;f++){const l=Object.assign({},o);for(let u=0;u<r.length;u++)l[i[u]]=f<a[u].length?a[u][f]:null;n&&(l[n]=f),this._propagate(l)}}}else this.handle=r=>{for(let i=0;i<r.length;i++){const o=Object.assign({},r[i]);n&&(o[n]=i),this._propagate(o)}}}}const ND="0".charCodeAt(0);function*OD(e,t=","){const n=t.charCodeAt(0);let r=0;for(let i=0;i<e.length;i++){const o=e.charCodeAt(i);o==n?(yield r,r=0):r=r*10+o-ND}yield r}class zD extends Je{get behavior(){return zn}constructor(t){super();const n=Fe(t.exons??"exons"),r=Fe(t.start??"start"),[i,o]=t.as||["exonStart","exonEnd"];this.handle=a=>{let s=r(a),f=s,l=!0;const u=n(a);for(const c of OD(u)){if(l)f=s+c;else{s=f+c;const h=Object.assign({},a);h[i]=f,h[o]=s,this._propagate(h)}l=!l}}}}class UD extends Je{get behavior(){return zn}constructor(t){super();const n=Yt(t.field).map(o=>Fe(o)),r=Yt(t.separator),i=Yt(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=o=>{if(n.some(f=>!f(o)))return;const a=n.map((f,l)=>f(o).split(r[l]));GD(a,o);const s=a[0].length;for(let f=0;f<s;f++){const l=Object.assign({},o);for(let u=0;u<n.length;u++)l[i[u]]=a[u][f];this._propagate(l)}}}}function GD(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 HD extends Je{get behavior(){return Gr}constructor(t){super(),this.params=t,this.as=t.as,this.fn=void 0}initialize(){this.fn=Ff(this.params.expr,this.getGlobalObject())}handle(t){t[this.as]=this.fn(t),this._propagate(t)}}class Yy extends Je{get behavior(){return Gr}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 o=Fe(t.chrom),a=Yt(t.pos).map(p=>Fe(p)),s=Yt(t.as);if(a.length!=s.length)throw new Error('The number of "pos" and "as" elements must be equal!');const f=Yt(t.offset);let l;if(f.length==0)l=new Array(a.length).fill(0);else if(f.length==1)l=new Array(a.length).fill(f[0]);else if(f.length==a.length)l=f;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(t.offset)}!`);const u=new Function("datum","chromOffset","posAccessors",s.map((p,b)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${b}](datum) - ${l[b]};`).join(`
|
|
238
|
+
`));let c,h=0;const d=p=>{if(p!==c){if(h=i.cumulativeChromPositions.get(p),h===void 0)throw new Error("Unknown chromosome/contig: "+p);c=p}return h};this.handle=p=>{u(p,d(o(p)),a),this._propagate(p)}}}const Qy={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 VD extends Je{get behavior(){return Gr}constructor(t){super();const n=Kd(Qy),r=Fe(t.field),i=t.as,o=t.fontSize;this.handle=a=>{const s=r(a);s!==void 0?a[i]=n.measureWidth(s,o):a[i]=0,this._propagate(a)}}}const jD=65536;class qD extends Je{get behavior(){return Gr}constructor(t){super(),this.params=t}reset(){super.reset(),this.initialize()}initialize(){const t=this.params,n=t.as||"lane",r=kt(t.spacing)?t.spacing:1,i=Fe(t.start),o=Fe(t.end);if(!t.preference!=!t.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(t.preference){const a=new Float64Array(jD),s=Fe(t.preference),f=t.preferredOrder;let l=1/0;this.handle=u=>{const c=i(u);c<l&&a.fill(-1/0),l=c;const h=f.indexOf(s(u));let d=-1;if(h>=0&&a[h]<c)d=h;else{const p=i(u);for(d=0;d<a.length&&!(a[d]<p);d++);if(d>=a.length)throw new Error("Out of lanes!")}a[d]=o(u)+r,u[n]=d,this._propagate(u)}}else{const a=new Su,s=new Su;let f=-1/0,l=0;this.handle=u=>{const c=i(u);for(;a.length&&(a.peekValue()<=c||c<f);){const d=a.pop();s.push(d,d)}f=c;let h=s.pop();h===void 0&&(h=l++),u[n]=h,this._propagate(u),a.push(h,o(u)+r)}}}}class ZD extends Je{get behavior(){return zn}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=>Fe(i)),r=t.as?t.as:n.map(vo);this.handle=i=>{const o={};for(let a=0;a<n.length;a++)o[r[a]]=n[a](i);this._propagate(o)}}}class WD extends Je{get behavior(){return Gr}constructor(t){super();const n=new RegExp(t.regex),r=typeof t.as=="string"?[t.as]:t.as,i=Fe(t.field);this.handle=o=>{const a=i(o);if(Pe(a)){const s=a.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 f=0;f<r.length;f++)o[r[f]]=s[f+1]}else if(t.skipInvalidInput)for(let f=0;f<r.length;f++)o[r[f]]=void 0;else throw new Error(`"${a}" 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 a}, field content: "${a}".`);this._propagate(o)}}}class YD extends Je{get behavior(){return zn}constructor(t){super();const n=Yt(t.columnRegex).map(h=>new RegExp(h)),r=Yt(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,o=t.asKey||"sample";let a,s,f;const l=h=>{var y;const d=Object.keys(h),p=new Map;for(const[w,_]of n.entries())for(const C of d){const S=(y=_.exec(C))==null?void 0:y[1];if(S!==void 0){let T=p.get(S);T||(T=[],p.set(S,T)),T[w]=C}}a=[...p.entries()],s=d.filter(w=>!n.some(_=>_.test(w))&&!(i&&i.test(w)));const b=[...s.map(w=>JSON.stringify(w)+": datum["+JSON.stringify(w)+"]"),JSON.stringify(o)+": sampleId",...r.map(w=>JSON.stringify(w)+": null")];f=new Function("datum","sampleId",`return {
|
|
246
239
|
`+b.join(`,
|
|
247
240
|
`)+`
|
|
248
|
-
};`)},u=h=>{a||l(h);for(const[d,p]of a){const b=f(h,d);for(let y=0;y<p.length;y++)b[r[y]]=h[p[y]];this._propagate(b)}},c=h=>{l(h),u(h),this.handle=u};this.handle=c,this.beginBatch=h=>{ly(h)&&(this.handle=c),super.beginBatch(h)}}}class DD extends Je{get behavior(){return Hr}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?Fg(t.sort.field,t.sort.order):void 0,i=t.field?Re(t.field):()=>1,o=t.groupby.map(u=>Re(u)),a=F_(this.buffer,u=>o.map(c=>c(u)).join()).map(u=>u[1]);let s=u=>!0;if(t.baseField){const u=Re(t.baseField);s=c=>u(c)!==null}let f,l;switch(t.offset){case"normalize":f=(u,c)=>u/c,l=(u,c)=>rf(u,c);break;case"center":f=(u,c)=>u-c/2,l=(u,c)=>rf(u,c);break;case"information":{const u=Math.log2(t.cardinality??4);f=(c,h)=>c/h,l=(c,h)=>{const p=rf(c,S=>+!s(S)),b=rf(c,h),y=b-p;let w=0;for(let S=0;S<c.length;S++){const C=c[S];if(s(C)){const _=h(C)/y;w-=_*Math.log2(_)}}return y/(u-(w+0))*(y/b)}}break;default:f=(u,c)=>u,l=(u,c)=>1}for(const u of a){r&&u.sort(r);const c=l(u,i);let h=0;for(const d of u){const p=h+i(d);s(d)&&(d[n[0]]=f(h,c),d[n[1]]=f(p,c),this._propagate(d),h=p)}}super.complete()}}class FD extends Je{get behavior(){return Un}constructor(t){super();const n=Re(t.field??"sequence"),[r,i]=t.as??["pos","sequence"];this.handle=o=>{const a=Object.assign({},o,{[i]:"",[r]:0}),s=n(o);for(let f=0;f<s.length;f++){const l=Object.assign({},a);l[r]=f,l[i]=s.charAt(f),this._propagate(l)}}}}class RD extends Je{get behavior(){return Un}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(o=>Re(o)),i=tf(this.buffer,...r);for(const[o,a]of e0(i)){const s={count:a.length};for(let f=0;f<n.length;f++)s[n[f]]=o[f];this._propagate(s)}super.complete()}}const PD="_uniqueId",Ly=1e4,Ny=[null];class Oy extends Je{get behavior(){return Hr}constructor(t){super(),this.params=t,this.as=t.as??PD,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%Ly==0&&(this._id=this._getBlock()*Ly),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const t=Ny.length;return Ny[t]=this,this._blocks.push(t),this._usedBlocks++,t}}const MD={aggregate:RD,collect:Ry,coverage:dD,filterScoredLabels:mD,filter:bD,flatten:yD,flattenCompressedExons:xD,flattenDelimited:AD,flattenSequence:FD,formula:_D,identifier:Oy,linearizeGenomicCoordinate:Py,measureText:SD,pileup:ID,project:TD,regexExtract:kD,regexFold:BD,sample:fy,stack:DD};function LD(e,t){const n=MD[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function zy(e){if(!Hy(e)&&!Gy(e))return;const t={...e.format};if(t.type??(t.type=Gy(e)&&ND(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 ND(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const Uy=e=>typeof e!="object"?OD:zD,OD=e=>({data:e}),zD=e=>e;function Gy(e){return"url"in e}class Ns extends Je{get identifier(){}handle(t){throw new Error("Source does not handle incoming data!")}async load(){}}function Hy(e){return"values"in e}class UD extends Ns{constructor(t,n){var r;if(super(),this.params=t,typeof t.values=="string"&&!((r=t==null?void 0:t.format)!=null&&r.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}loadSynchronously(){const t=this.params.values;let n=[],r=i=>i;if(Array.isArray(t))t.length>0&&(n=t,r=Uy(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=Nm(t,zy(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 GD(e){return"url"in e}class HD extends Ns{constructor(t,n){super(),this.params=t,this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}async load(){const t=this.params.url,n=Array.isArray(t)?t:[t],r=async o=>gf({baseURL:this.baseUrl}).load(o).catch(a=>{throw new Error(`Cannot fetch: ${this.baseUrl}${o}: ${a.message}`)}),i=(o,a)=>{try{const s=Nm(o,zy(this.params));this.beginBatch({type:"file",url:a});for(const f of s)this._propagate(f)}catch(s){throw new Error(`Cannot parse: ${a}: ${s.message}`)}};this.reset(),await Promise.all(n.map(o=>r(o).then(i))),this.complete()}}function VD(e){return"sequence"in e}class jD extends Ns{constructor(t,n){if(super(),this.sequence=t.sequence,!("start"in this.sequence))throw new Error("'start' is missing from sequence parameters!");if(!("stop"in this.sequence))throw new Error("'stop' is missing from sequence parameters!")}loadSynchronously(){const t=this.sequence.as||"data",n=this.sequence.step||1,r=this.sequence.stop;this.reset(),this.beginBatch({type:"file"});for(let i=this.sequence.start;i<r;i+=n)this._propagate({[t]:i});this.complete()}async load(){this.loadSynchronously()}}function qD(e,t,n){return n=(n-e)/(t-e),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}class Vi extends Ns{constructor(t,n){if(super(),this.view=t,n){if(n!=="x"&&n!=="y")throw new Error(`Invalid channel specified for the dynamic data source: ${n}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the dynamic data source. Must be either "x" or "y".');if(this.channel=n,this.scaleResolution=this.view.getScaleResolution(n),!this.scaleResolution){const i=[`The dynamic data source cannot find a resolved scale for channel "${n}".`];throw this.view instanceof Qt||i.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(i.join(" "))}const r=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",r),this.view.context.addBroadcastListener("layoutComputed",r)}getAxisLength(){const t=this.scaleResolution.members.map(n=>{var r;return(r=n.view.coords)==null?void 0:r[this.channel==="x"?"width":"height"]}).filter(n=>n>0);return t.length?t.reduce((n,r)=>Math.min(n,r),1e4):0}get genome(){return this.scaleResolution.getGenome()}async onDomainChanged(t,n){}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(t){this.reset(),this.beginBatch({type:"file"});for(const n of t)this._propagate(n);this.complete(),Kd(this.view),this.requestRender()}}class ZD extends Vi{constructor(n,r){const i={axis:{},...n};super(r,i.channel);St(this,"ticks",[]);this.params=n}async onDomainChanged(){const n=this.scaleResolution.getScale(),r=this.params.axis,i=this.getAxisLength(),o=l=>25+60*qD(100,700,l),a=Ft(r.tickCount)?r.tickCount:Math.round(i/o(i)),s=my(n,a,r.tickMinStep),f=r.values?by(n,r.values,s):kB(n,s);if(!yf(f,this.ticks)){this.ticks=f;const l=DB(n,a,r.format);this.publishData(f.map(u=>({value:u,label:l(u)})))}}}class WD extends Vi{constructor(t,n){super(n,t.channel)}async load(){this.publishData(this.genome.chromosomes)}}function Os(e){return class extends e{constructor(){super(...arguments);St(this,"lastQuantizedInterval",[0,0])}quantizeInterval(r,i){return[Math.max(Math.floor(r[0]/i-1)*i,0),Math.min(Math.ceil(r[1]/i+1)*i,this.genome.totalSize)]}checkAndUpdateLastInterval(r){return yf(this.lastQuantizedInterval,r)?!1:(this.lastQuantizedInterval=r,!0)}}}function zs(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}class YD extends Os(Vi){constructor(t,n){const r={channel:"x",windowSize:7e3,...t};if(super(n,r.channel),this.params=r,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>hw),Promise.resolve().then(()=>R7),Promise.resolve().then(()=>Hs)]).then(([{Buffer:o},{IndexedFasta:a},{RemoteFile:s}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const f=l=>new s(zs(l,this.view.getBaseUrl()));this.fasta=new a({fasta:f(this.params.url),fai:f(this.params.indexUrl??this.params.url+".fai")}),i()})})}async onDomainChanged(t){const n=this.params.windowSize;if(t[1]-t[0]>n)return;await this.initializedPromise;const r=this.quantizeInterval(t,n);if(this.checkAndUpdateLastInterval(r)){const i=this.genome.continuousToDiscreteChromosomeIntervals(r),o=await Promise.all(i.map(a=>this.fasta.getSequence(a.chrom,a.startPos,a.endPos).then(s=>({chrom:a.chrom,start:a.startPos,sequence:s}))));this.publishData(o)}}}function bu(e,t,n=!0){let r,i=a=>{};return function(...s){return new Promise((f,l)=>{const u=()=>{clearTimeout(r),i=c=>{},f(e(...s))};n&&i("debounced"),clearTimeout(r),i=l,r=window.setTimeout(u,t)})}}class QD extends Os(Vi){constructor(n,r){const i={pixelsPerBin:2,channel:"x",...n};super(r,i.channel);St(this,"reductionLevels",[]);St(this,"lastRequestId",0);St(this,"bbi");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigWigSource");this.doDebouncedRequest=bu(this.doRequest.bind(this),200,!1),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>f3),Promise.resolve().then(()=>Hs)]).then(([{BigWig:a},{RemoteFile:s}])=>{this.bbi=new a({filehandle:new s(zs(this.params.url,this.view.getBaseUrl()))}),this.bbi.getHeader().then(f=>{this.reductionLevels=f.zoomLevels.map(l=>l.reductionLevel).reverse(),this.reductionLevels.push(1),o()})})})}async onDomainChanged(n){await this.initializedPromise;const r=this.getAxisLength()||700,i=XD(n,r,this.reductionLevels),o=Math.max(i*r,5e3),a=this.quantizeInterval(n,o);this.checkAndUpdateLastInterval(a)&&this.doDebouncedRequest(a,i)}async doRequest(n,r){const i=await this.getFeatures(n,.5/r/this.params.pixelsPerBin);i.requestId<this.lastRequestId||this.publishData(i.features)}async getFeatures(n,r){let i=++this.lastRequestId;const o=new AbortController,a=this.genome.continuousToDiscreteChromosomeIntervals(n),s=await Promise.all(a.map(f=>this.bbi.getFeatures(f.chrom,f.startPos,f.endPos,{scale:r,signal:o.signal}).then(l=>l.map(u=>({chrom:f.chrom,start:u.start,end:u.end,score:u.score})))));return{requestId:i,abort:()=>o.abort(),features:s.flat()}}}function XD(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class $D extends Os(Vi){constructor(n,r){const i={channel:"x",windowSize:1e6,...n};super(r,i.channel);St(this,"lastRequestId",0);St(this,"parser");St(this,"bbi");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigBedSource");this.doDebouncedRequest=bu(this.doRequest.bind(this),200,!1),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>TN),Promise.resolve().then(()=>f3),Promise.resolve().then(()=>Hs)]).then(([a,{BigBed:s},{RemoteFile:f}])=>{const l=a.default;this.bbi=new s({filehandle:new f(zs(this.params.url,this.view.getBaseUrl()))}),this.headerPromise=this.bbi.getHeader(),this.headerPromise.then(async u=>{this.parser=new l({autoSql:u.autoSql}),o()})})})}async onDomainChanged(n){await this.initializedPromise;const r=this.params.windowSize;if(n[1]-n[0]>r)return;const i=this.quantizeInterval(n,r);this.checkAndUpdateLastInterval(i)&&this.doDebouncedRequest(i)}async doRequest(n){const r=await this.getFeatures(n);r.requestId<this.lastRequestId||this.publishData(r.features)}async getFeatures(n){let r=++this.lastRequestId;const i=new AbortController,o=this.genome.continuousToDiscreteChromosomeIntervals(n),a=await Promise.all(o.map(s=>this.bbi.getFeatures(s.chrom,s.startPos,s.endPos,{signal:i.signal}).then(f=>f.map(l=>this.parser.parseLine(`${s.chrom} ${l.start} ${l.end} ${l.rest}`,{uniqueId:l.uniqueId})))));return{requestId:r,abort:()=>i.abort(),features:a.flat()}}}class KD extends Os(Vi){constructor(n,r){const i={channel:"x",windowSize:2e4,...n};super(r,i.channel);St(this,"lastRequestId",0);St(this,"bam");St(this,"chrPrefixFixer",n=>n);if(this.params=i,!this.params.url)throw new Error("No URL provided for BamSource");this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>YN),Promise.resolve().then(()=>Hs)]).then(([{BamFile:a},{RemoteFile:s}])=>{const f=l=>new s(zs(l,this.view.getBaseUrl()));this.bam=new a({bamFilehandle:f(this.params.url),baiFilehandle:f(this.params.indexUrl??this.params.url+".bai")}),this.bam.getHeader().then(l=>{var h,d;const u=this.genome.hasChrPrefix(),c=(d=(h=this.bam.indexToChr)==null?void 0:h[0])==null?void 0:d.refName.startsWith("chr");u&&!c?this.chrPrefixFixer=p=>p.replace("chr",""):!u&&c&&(this.chrPrefixFixer=p=>"chr"+p),o()})})})}async onDomainChanged(n){const r=this.params.windowSize;if(n[1]-n[0]>r)return;await this.initializedPromise;const i=this.quantizeInterval(n,r);if(this.checkAndUpdateLastInterval(i)){const o=this.genome.continuousToDiscreteChromosomeIntervals(i),a=await Promise.all(o.map(s=>this.bam.getRecordsForRange(this.chrPrefixFixer(s.chrom),s.startPos,s.endPos).then(f=>f.map(l=>({chrom:s.chrom,start:l.get("start"),end:l.get("end"),name:l.get("name"),MD:l.get("MD"),cigar:l.get("cigar"),mapq:l.get("mq"),strand:l.get("strand")===1?"+":"-"})))));this.publishData(a.flat())}}}class JD extends Os(Vi){constructor(n,r){const i={channel:"x",windowSize:3e6,debounceDomainChange:200,...n};super(r,i.channel);St(this,"lastRequestId",0);St(this,"tbiIndex");if(this.params=i,!this.params.url)throw new Error("No URL provided for TabixSource");this.params.debounceDomainChange>0&&(this.onDomainChanged=bu(this.onDomainChanged.bind(this),this.params.debounceDomainChange,!1)),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>hw),Promise.resolve().then(()=>iO),Promise.resolve().then(()=>Hs)]).then(([{Buffer:a},{TabixIndexedFile:s},{RemoteFile:f}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=a));const l=u=>new f(zs(u,this.view.getBaseUrl()));this.tbiIndex=new s({filehandle:l(this.params.url),tbiFilehandle:l(this.params.indexUrl??this.params.url+".tbi")}),o()})})}async onDomainChanged(n){const r=this.params.windowSize;if(n[1]-n[0]>r)return;const i=this.quantizeInterval(n,r);this.checkAndUpdateLastInterval(i)&&this.doRequest(i)}async doRequest(n){const r=await this.getFeatures(n);r.requestId<this.lastRequestId||this.publishData(r.features)}async getFeatures(n){await this.initializedPromise;let r=++this.lastRequestId;const i=new AbortController,o=this.genome.continuousToDiscreteChromosomeIntervals(n),a=await Promise.all(o.map(async s=>{const f=[];return await this.tbiIndex.getLines(s.chrom,s.startPos,s.endPos,{lineCallback:l=>{f.push(l)},signal:i.signal}),this._parseFeatures(f)}));return{requestId:r,abort:()=>i.abort(),features:a.flat()}}_parseFeatures(n){return[]}}class e9 extends JD{constructor(n,r){super(n,r);ce(this,Nl,void 0);Promise.resolve().then(()=>HO).then(i=>{mn(this,Nl,i.default)})}_parseFeatures(n){var i;return(i=$(this,Nl))==null?void 0:i.parseStringSync(n.join(`
|
|
249
|
-
`),{parseSequences:!1})}}
|
|
250
|
-
`)+" };");return n.properties=t,n}class
|
|
251
|
-
Reason: ${s.message}`)}));if(n.isViewSpec(o))return o.baseUrl=(a=i.match(/^[^?#]*\//))==null?void 0:a[0],o;throw new Error(`The imported spec "${i}" is not a view spec: ${JSON.stringify(e)}`)}function _9(e){const t=e.getSize().addPadding(e.getOverhang()),n=r=>r.grow>0?void 0:r.px;return{width:n(t.width),height:n(t.height)}}function ar(e){return()=>e}const kn=class kn{static create(t,n,r,i){return new kn(ar(t),ar(n),ar(r),ar(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"?ar(i):typeof i=="function"?i:this._passThrough(r)};return new kn(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new kn(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 kn(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 kn(()=>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 kn(()=>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 kn(ar(this.x),ar(this.y),ar(this.width),ar(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)}`}};St(kn,"ZERO",kn.create(0,0,0,0));let sr=kn;class Wy{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class Yy extends Wy{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=a=>()=>{t&&a()},i=a=>()=>{t&&n&&a()},o=tf(this.buffer.reverse(),a=>a.mark);for(const[a,s]of[...o.entries()].reverse()){if(!a.isReady())continue;this.batch.push(()=>{t=a.unitView.getEffectiveOpacity()>0}),this.batch.push(...a.prepareRender(this.globalOptions).map(l=>r(l)));let f;for(const l of s){const u=l.coords;u.equals(f)||this.batch.push(r(()=>{n=a.setViewport(u,l.clipRect)})),this.batch.push(i(l.callback)),f=l.coords}}}}class S9 extends Wy{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 C9{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 I9{constructor(t,n){this.x=t,this.y=n}equals(t){return t?t===this||t.x===this.x&&t.y===this.y:!1}}const T9=e=>new Promise(t=>setTimeout(t,e));function k9(e){const t=e.requestAnimationFrame||window.requestAnimationFrame,n=e.signal,r=()=>new Promise((i,o)=>{if(n!=null&&n.aborted)return o("aborted");const a=performance.now(),s=a+(e.duration||1e3),f=typeof e.from=="number"?e.from:0,l=typeof e.to=="number"?e.to:1,u=e.easingFunction||(b=>b),c=b=>(b-a)/(s-a),h=b=>b*(l-f)+f,d=b=>Math.max(0,Math.min(1,b)),p=b=>{n!=null&&n.aborted?o("aborted"):(e.onUpdate(h(u(d(c(b))))),b<s?t(p):(e.onUpdate(h(u(1))),i()))};t(p)});return e.delay?n!=null&&n.aborted?Promise.reject("aborted"):T9(e.delay).then(r):r()}class B9{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 k9({requestAnimationFrame:n=>this.requestTransition(n),...t})}}class D9{constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new JB(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 F9="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMhERycB36XD+hX0/DuzSlsnw3OfyilcwAA/vn/yzQQMoUHg9r59hhn7Oz/njH9ncJAiAXNj9P2qTxdhARETufgDYNs4fsH/Cv2jL53nzm1lcZH2dngKCP/Gnn/LTEiXg+Tw/Q+btvJ1+/vlPfvYz/v1vEwA26w4fs8lm4R4GgIiIAmB5GdvGnmbuh9Rq8MIXcuMGpVJ6AFhEXNwneOI//OfnSz8fL49/jI+9lJcecjjJJD15Ho8+yo9/TKUCb7J5vY1tcw+JiOgMILYJcDpNuFQKq5+neMrFbRXLnI+fu7im6KlSCS9fqXDBccLb31siIgqARBOu1SiV8DzKZbpr0nRxWxnQqs8tv51lol/2Xf63qlS6euOpKYZIREQ7ANOHTYdu1SDL/wMOlguFlxW+Hf8dujMX9ryrNx4KEREFgGXd9BQoWu97S0vLbU36T4EOD6NwGf78R0REAZBoxWaJ3qqDA9Kcx3p9YXW1sLLSCoBM5jIV+i7/gwCWl8Nbzs0xLCIiCgDbDiub7b8JMF3exT3kMOM4a3bLmuNczoX22ScpPluK33KIREQUALmc2QS0KjGqT3BxzWKf2VmKhl0sEhD0ngKZS5ZKOgAQERmVAEg05KhVBwFXnXJ62eWLRYoGrRofv8yGHsv/gwOYmwtvtryMiIgMLQCSxwCHh92mQNGg/4gjEwCTxRZMRdOhPfbSl/86/hURGbUAmJ4eaAoULf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DZyrn2fDhxQgLg2MS770oDnCBA1tbGgyjI9GwWFKT/YDAYthJGAOJLlgAWF5meJhZjdhaKCikspKCAR4bHo4yPqwFjZ8+6cYCU4ODBTa8G23zAMBgMJgK4eTMxNZUAxse5cYNgkEQCnvFSXs7OnZvodNMpK5MG6OUdG+nrkwa49YB9+9gwzJ0/BoPBCMDwcOLllxOBQAKYnOTmTS5cgPx8mpupq8Pn4xHj9bq5IHn9QDicmguqryczSuAfIdtAGuG/IDMYDFsEIwCz44noaOLPv5GYgOlpgkGorKSzjWPHlHbZLAGwH9a0RBpgWehBNNoPebK+pAbU1LAeDAaDwZDLKzBEYiiRCCTiTZU3pjsRh4upqmL/fo4epaODR4vFMs88Q1kZgQCxGLZ9DXIdGbhDZy579mAwGAyGrMnloxAhPhSPBw4n7lYjV2tZFBWhCKC+Xsv/x5xuLy1FtsxlRwAgF05BBevBYDAYTAqojETZc4m25xLRKDMzSAC2b6ekhCeS88sCoOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",R9={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class P9{constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new mi([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:Hd(My),texture:t?this._createTextureNow(F9):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(Qe(r)&&(r=R9[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const i={family:t,style:n,weight:r};let o=this._fonts.get(i);return o||(o={metrics:void 0,texture:void 0},this._fonts.set(i,o),this._promises.push(this._loadFontEntry(o,i))),o}async _loadFontEntry(t,n){try{const r=await this._loadMetadata(n.family),i=L9(r,n),o=this.fontRepository+Qy(n.family)+"/"+i.replace(/\.\w+/,""),a=this._createTexture(o+".png"),s=this._loadFont(o+".json");t.texture=await a,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=>Hd(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=Qy(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=>M9(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)=>{ks(n,{src:t,min:n.LINEAR},(o,a,s)=>{o?i(o):r(a)})})}_createTextureNow(t){const n=this._webGLHelper.gl;let r;const i=new Promise((o,a)=>{r=ks(n,{src:t,min:n.LINEAR},(s,f,l)=>{s?a(s):o(f)})});return this._promises.push(i),r}}function Qy(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function M9(e){const t=e.split(`
|
|
252
|
-
`),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 o=i.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(o){const a=o[1];r[a]=o[2]}if(o=i.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),o){const a=o[1];r[a]=+o[2]}}return n}function
|
|
253
|
-
`))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
|
|
241
|
+
};`)},u=h=>{a||l(h);for(const[d,p]of a){const b=f(h,d);for(let y=0;y<p.length;y++)b[r[y]]=h[p[y]];this._propagate(b)}},c=h=>{l(h),u(h),this.handle=u};this.handle=c,this.beginBatch=h=>{Ay(h)&&(this.handle=c),super.beginBatch(h)}}}class QD extends Je{get behavior(){return Gr}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?Vg(t.sort.field,t.sort.order):void 0,i=t.field?Fe(t.field):()=>1,o=t.groupby.map(u=>Fe(u)),a=Z_(this.buffer,u=>o.map(c=>c(u)).join()).map(u=>u[1]);let s=u=>!0;if(t.baseField){const u=Fe(t.baseField);s=c=>u(c)!==null}let f,l;switch(t.offset){case"normalize":f=(u,c)=>u/c,l=(u,c)=>hf(u,c);break;case"center":f=(u,c)=>u-c/2,l=(u,c)=>hf(u,c);break;case"information":{const u=Math.log2(t.cardinality??4);f=(c,h)=>c/h,l=(c,h)=>{const p=hf(c,_=>+!s(_)),b=hf(c,h),y=b-p;let w=0;for(let _=0;_<c.length;_++){const C=c[_];if(s(C)){const S=h(C)/y;w-=S*Math.log2(S)}}return y/(u-(w+0))*(y/b)}}break;default:f=(u,c)=>u,l=(u,c)=>1}for(const u of a){r&&u.sort(r);const c=l(u,i);let h=0;for(const d of u){const p=h+i(d);s(d)&&(d[n[0]]=f(h,c),d[n[1]]=f(p,c),this._propagate(d),h=p)}}super.complete()}}class XD extends Je{get behavior(){return zn}constructor(t){super();const n=Fe(t.field??"sequence"),[r,i]=t.as??["pos","sequence"];this.handle=o=>{const a=Object.assign({},o,{[i]:"",[r]:0}),s=n(o);for(let f=0;f<s.length;f++){const l=Object.assign({},a);l[r]=f,l[i]=s.charAt(f),this._propagate(l)}}}}class $D extends Je{get behavior(){return zn}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(o=>Fe(o)),i=uf(this.buffer,...r);for(const[o,a]of f0(i)){const s={count:a.length};for(let f=0;f<n.length;f++)s[n[f]]=o[f];this._propagate(s)}super.complete()}}const KD="_uniqueId",Xy=1e4,$y=[null];class Ky extends Je{get behavior(){return Gr}constructor(t){super(),this.params=t,this.as=t.as??KD,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%Xy==0&&(this._id=this._getBlock()*Xy),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const t=$y.length;return $y[t]=this,this._blocks.push(t),this._usedBlocks++,t}}const JD={aggregate:$D,collect:Wy,coverage:DD,filterScoredLabels:MD,filter:PD,flatten:LD,flattenCompressedExons:zD,flattenDelimited:UD,flattenSequence:XD,formula:HD,identifier:Ky,linearizeGenomicCoordinate:Yy,measureText:VD,pileup:qD,project:ZD,regexExtract:WD,regexFold:YD,sample:Ey,stack:QD};function e9(e,t){const n=JD[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function Jy(e){if(!nw(e)&&!tw(e))return;const t={...e.format};if(t.type??(t.type=tw(e)&&t9(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 t9(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const ew=e=>typeof e!="object"?n9:r9,n9=e=>({data:e}),r9=e=>e;function tw(e){return"url"in e}class Vs extends Je{get identifier(){}handle(t){throw new Error("Source does not handle incoming data!")}async load(){}}function nw(e){return"values"in e}class i9 extends Vs{constructor(t,n){var r;if(super(),this.params=t,typeof t.values=="string"&&!((r=t==null?void 0:t.format)!=null&&r.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}loadSynchronously(){const t=this.params.values;let n=[],r=i=>i;if(Array.isArray(t))t.length>0&&(n=t,r=ew(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=Qm(t,Jy(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 o9(e){return"url"in e}class a9 extends Vs{constructor(t,n){super(),this.params=t,this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}async load(){const t=this.params.url,n=Array.isArray(t)?t:[t],r=async o=>Ef({baseURL:this.baseUrl}).load(o).catch(a=>{throw new Error(`Cannot fetch: ${this.baseUrl}${o}: ${a.message}`)}),i=(o,a)=>{try{const s=Qm(o,Jy(this.params));this.beginBatch({type:"file",url:a});for(const f of s)this._propagate(f)}catch(s){throw new Error(`Cannot parse: ${a}: ${s.message}`)}};this.reset(),await Promise.all(n.map(o=>r(o).then(i))),this.complete()}}function s9(e){return"sequence"in e}class l9 extends Vs{constructor(t,n){if(super(),this.sequence=t.sequence,!("start"in this.sequence))throw new Error("'start' is missing from sequence parameters!");if(!("stop"in this.sequence))throw new Error("'stop' is missing from sequence parameters!")}loadSynchronously(){const t=this.sequence.as||"data",n=this.sequence.step||1,r=this.sequence.stop;this.reset(),this.beginBatch({type:"file"});for(let i=this.sequence.start;i<r;i+=n)this._propagate({[t]:i});this.complete()}async load(){this.loadSynchronously()}}class ji extends Vs{constructor(t,n){if(super(),this.view=t,n){if(n!=="x"&&n!=="y")throw new Error(`Invalid channel specified for the dynamic data source: ${n}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the dynamic data source. Must be either "x" or "y".');if(this.channel=n,this.scaleResolution=this.view.getScaleResolution(n),!this.scaleResolution){const i=[`The dynamic data source cannot find a resolved scale for channel "${n}".`];throw this.view instanceof Qt||i.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(i.join(" "))}const r=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",r),this.view.context.addBroadcastListener("layoutComputed",r)}getAxisLength(){const t=this.scaleResolution.members.map(n=>{var r;return(r=n.view.coords)==null?void 0:r[this.channel==="x"?"width":"height"]}).filter(n=>n>0);return t.length?t.reduce((n,r)=>Math.min(n,r),1e4):0}get genome(){return this.scaleResolution.getGenome()}async onDomainChanged(t,n){}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(t){this.reset(),this.beginBatch({type:"file"});for(const n of t)this._propagate(n);this.complete(),s0(this.view),this.requestRender()}}class f9 extends ji{constructor(n,r){const i={axis:{},...n};super(r,i.channel);St(this,"ticks",[]);this.params=n}async onDomainChanged(){const n=this.scaleResolution.getScale(),r=this.params.axis,i=this.getAxisLength(),o=l=>25+60*A1(100,700,l),a=kt(r.tickCount)?r.tickCount:Math.round(i/o(i)),s=By(n,a,r.tickMinStep),f=r.values?Dy(n,r.values,s):WB(n,s);if(!Cf(f,this.ticks)){this.ticks=f;const l=QB(n,a,r.format);this.publishData(f.map(u=>({value:u,label:l(u)})))}}}class u9 extends ji{constructor(t,n){super(n,t.channel)}async load(){this.publishData(this.genome.chromosomes)}}function js(e){return class extends e{constructor(){super(...arguments);St(this,"lastQuantizedInterval",[0,0])}quantizeInterval(r,i){return[Math.max(Math.floor(r[0]/i-1)*i,0),Math.min(Math.ceil(r[1]/i+1)*i,this.genome.totalSize)]}checkAndUpdateLastInterval(r){return Cf(this.lastQuantizedInterval,r)?!1:(this.lastQuantizedInterval=r,!0)}}}function qs(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}class c9 extends js(ji){constructor(t,n){const r={channel:"x",windowSize:7e3,...t};if(super(n,r.channel),this.params=r,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>Cw),Promise.resolve().then(()=>$7),Promise.resolve().then(()=>Ys)]).then(([{Buffer:o},{IndexedFasta:a},{RemoteFile:s}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const f=l=>new s(qs(l,this.view.getBaseUrl()));this.fasta=new a({fasta:f(this.params.url),fai:f(this.params.indexUrl??this.params.url+".fai")}),i()})})}async onDomainChanged(t){const n=this.params.windowSize;if(t[1]-t[0]>n)return;await this.initializedPromise;const r=this.quantizeInterval(t,n);if(this.checkAndUpdateLastInterval(r)){const i=this.genome.continuousToDiscreteChromosomeIntervals(r),o=await Promise.all(i.map(a=>this.fasta.getSequence(a.chrom,a.startPos,a.endPos).then(s=>({chrom:a.chrom,start:a.startPos,sequence:s}))));this.publishData(o)}}}function Cu(e,t,n=!0){let r,i=a=>{};return function(...s){return new Promise((f,l)=>{const u=()=>{clearTimeout(r),i=c=>{},f(e(...s))};n&&i("debounced"),clearTimeout(r),i=l,r=window.setTimeout(u,t)})}}class h9 extends js(ji){constructor(n,r){const i={pixelsPerBin:2,channel:"x",...n};super(r,i.channel);St(this,"reductionLevels",[]);St(this,"lastRequestId",0);St(this,"bbi");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigWigSource");this.doDebouncedRequest=Cu(this.doRequest.bind(this),200,!1),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>E3),Promise.resolve().then(()=>Ys)]).then(([{BigWig:a},{RemoteFile:s}])=>{this.bbi=new a({filehandle:new s(qs(this.params.url,this.view.getBaseUrl()))}),this.bbi.getHeader().then(f=>{this.reductionLevels=f.zoomLevels.map(l=>l.reductionLevel).reverse(),this.reductionLevels.push(1),o()})})})}async onDomainChanged(n){await this.initializedPromise;const r=this.getAxisLength()||700,i=d9(n,r,this.reductionLevels),o=Math.max(i*r,5e3),a=this.quantizeInterval(n,o);this.checkAndUpdateLastInterval(a)&&this.doDebouncedRequest(a,i)}async doRequest(n,r){const i=await this.getFeatures(n,.5/r/this.params.pixelsPerBin);i.requestId<this.lastRequestId||this.publishData(i.features)}async getFeatures(n,r){let i=++this.lastRequestId;const o=new AbortController,a=this.genome.continuousToDiscreteChromosomeIntervals(n),s=await Promise.all(a.map(f=>this.bbi.getFeatures(f.chrom,f.startPos,f.endPos,{scale:r,signal:o.signal}).then(l=>l.map(u=>({chrom:f.chrom,start:u.start,end:u.end,score:u.score})))));return{requestId:i,abort:()=>o.abort(),features:s.flat()}}}function d9(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class p9 extends js(ji){constructor(n,r){const i={channel:"x",windowSize:1e6,...n};super(r,i.channel);St(this,"lastRequestId",0);St(this,"parser");St(this,"bbi");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigBedSource");this.doDebouncedRequest=Cu(this.doRequest.bind(this),200,!1),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>ZN),Promise.resolve().then(()=>E3),Promise.resolve().then(()=>Ys)]).then(([a,{BigBed:s},{RemoteFile:f}])=>{const l=a.default;this.bbi=new s({filehandle:new f(qs(this.params.url,this.view.getBaseUrl()))}),this.headerPromise=this.bbi.getHeader(),this.headerPromise.then(async u=>{this.parser=new l({autoSql:u.autoSql}),o()})})})}async onDomainChanged(n){await this.initializedPromise;const r=this.params.windowSize;if(n[1]-n[0]>r)return;const i=this.quantizeInterval(n,r);this.checkAndUpdateLastInterval(i)&&this.doDebouncedRequest(i)}async doRequest(n){const r=await this.getFeatures(n);r.requestId<this.lastRequestId||this.publishData(r.features)}async getFeatures(n){let r=++this.lastRequestId;const i=new AbortController,o=this.genome.continuousToDiscreteChromosomeIntervals(n),a=await Promise.all(o.map(s=>this.bbi.getFeatures(s.chrom,s.startPos,s.endPos,{signal:i.signal}).then(f=>f.map(l=>this.parser.parseLine(`${s.chrom} ${l.start} ${l.end} ${l.rest}`,{uniqueId:l.uniqueId})))));return{requestId:r,abort:()=>i.abort(),features:a.flat()}}}class g9 extends js(ji){constructor(n,r){const i={channel:"x",windowSize:2e4,...n};super(r,i.channel);St(this,"lastRequestId",0);St(this,"bam");St(this,"chrPrefixFixer",n=>n);if(this.params=i,!this.params.url)throw new Error("No URL provided for BamSource");this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>hO),Promise.resolve().then(()=>Ys)]).then(([{BamFile:a},{RemoteFile:s}])=>{const f=l=>new s(qs(l,this.view.getBaseUrl()));this.bam=new a({bamFilehandle:f(this.params.url),baiFilehandle:f(this.params.indexUrl??this.params.url+".bai")}),this.bam.getHeader().then(l=>{var h,d;const u=this.genome.hasChrPrefix(),c=(d=(h=this.bam.indexToChr)==null?void 0:h[0])==null?void 0:d.refName.startsWith("chr");u&&!c?this.chrPrefixFixer=p=>p.replace("chr",""):!u&&c&&(this.chrPrefixFixer=p=>"chr"+p),o()})})})}async onDomainChanged(n){const r=this.params.windowSize;if(n[1]-n[0]>r)return;await this.initializedPromise;const i=this.quantizeInterval(n,r);if(this.checkAndUpdateLastInterval(i)){const o=this.genome.continuousToDiscreteChromosomeIntervals(i),a=await Promise.all(o.map(s=>this.bam.getRecordsForRange(this.chrPrefixFixer(s.chrom),s.startPos,s.endPos).then(f=>f.map(l=>({chrom:s.chrom,start:l.get("start"),end:l.get("end"),name:l.get("name"),MD:l.get("MD"),cigar:l.get("cigar"),mapq:l.get("mq"),strand:l.get("strand")===1?"+":"-"})))));this.publishData(a.flat())}}}class m9 extends js(ji){constructor(n,r){const i={channel:"x",windowSize:3e6,debounceDomainChange:200,...n};super(r,i.channel);St(this,"lastRequestId",0);St(this,"tbiIndex");if(this.params=i,!this.params.url)throw new Error("No URL provided for TabixSource");this.params.debounceDomainChange>0&&(this.onDomainChanged=Cu(this.onDomainChanged.bind(this),this.params.debounceDomainChange,!1)),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>Cw),Promise.resolve().then(()=>AO),Promise.resolve().then(()=>Ys)]).then(([{Buffer:a},{TabixIndexedFile:s},{RemoteFile:f}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=a));const l=u=>new f(qs(u,this.view.getBaseUrl()));this.tbiIndex=new s({filehandle:l(this.params.url),tbiFilehandle:l(this.params.indexUrl??this.params.url+".tbi")}),o()})})}async onDomainChanged(n){const r=this.params.windowSize;if(n[1]-n[0]>r)return;const i=this.quantizeInterval(n,r);this.checkAndUpdateLastInterval(i)&&this.doRequest(i)}async doRequest(n){const r=await this.getFeatures(n);r.requestId<this.lastRequestId||this.publishData(r.features)}async getFeatures(n){await this.initializedPromise;let r=++this.lastRequestId;const i=new AbortController,o=this.genome.continuousToDiscreteChromosomeIntervals(n),a=await Promise.all(o.map(async s=>{const f=[];return await this.tbiIndex.getLines(s.chrom,s.startPos,s.endPos,{lineCallback:l=>{f.push(l)},signal:i.signal}),this._parseFeatures(f)}));return{requestId:r,abort:()=>i.abort(),features:a.flat()}}_parseFeatures(n){return[]}}class b9 extends m9{constructor(n,r){super(n,r);se(this,ql,void 0);Promise.resolve().then(()=>az).then(i=>{Ct(this,ql,i.default)})}_parseFeatures(n){var i;return(i=$(this,ql))==null?void 0:i.parseStringSync(n.join(`
|
|
242
|
+
`),{parseSequences:!1})}}ql=new WeakMap;function y9(e,t){if(nw(e))return new i9(e,t);if(o9(e))return new a9(e,t);if(s9(e))return new l9(e,t);if(w9(e))return k9(e.lazy,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function w9(e){return"lazy"in e}function v9(e){return(e==null?void 0:e.type)=="axisTicks"}function x9(e){return(e==null?void 0:e.type)=="axisGenome"}function A9(e){return(e==null?void 0:e.type)=="indexedFasta"}function E9(e){return(e==null?void 0:e.type)=="bigwig"}function _9(e){return(e==null?void 0:e.type)=="bigbed"}function S9(e){return(e==null?void 0:e.type)=="bam"}function C9(e){return(e==null?void 0:e.type)=="gff3"}function k9(e,t){if(v9(e))return new f9(e,t);if(x9(e))return new u9(e,t);if(A9(e))return new c9(e,t);if(E9(e))return new h9(e,t);if(_9(e))return new p9(e,t);if(S9(e))return new g9(e,t);if(C9(e))return new b9(e,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function I9(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(`,
|
|
243
|
+
`)+" };");return n.properties=t,n}class ku extends Je{get behavior(){return zn}constructor(){super();const t=n=>{const r=I9(n);this.handle=i=>this._propagate(r(i)),this.handle(n)};this.handle=t,this.beginBatch=n=>{Ay(n)&&(this.handle=t),super.beginBatch(n)}}}function T9(e){return"name"in e}class rw extends Vs{constructor(n,r,i){super();se(this,Zl,void 0);this.provider=i,this.params=n}get identifier(){return this.params.name}updateDynamicData(n){Ct(this,Zl,n),this.loadSynchronously()}loadSynchronously(){const n=$(this,Zl)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(n))n.length>0&&(r=ew(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()}}Zl=new WeakMap;class iw{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,o]of this._dataSourcesByHost.entries())if(o instanceof rw&&t==o.identifier){if(n&&n!==o)throw new Error(`Found multiple instances of named data: ${t}. Data flow optimization is broken (it's a bug).`);n=o,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 B9(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 o=n.get(t(i.ref));o?o.children.push(i):r.push(i)}return r}function ow(e,t,n){var i,o;const r=(i=t.preOrder)==null?void 0:i.call(t,e);if(r)return r;for(const a of n(e)){const s=ow(a,t,n);if(s==="stop")return s}return(o=t.postOrder)==null?void 0:o.call(t,e)}function D9(e,t){return ow(e,t,n=>n.children)}function R9(e,t){const n=[];let r;const i=t??new iw,o=[];function a(c,h=()=>{}){if(!r)throw h()||new Error("Cannot append data flow node, no parent exist!");return r.addChild(c),r=c,c}function s(c,h){return a(c,()=>new Error(`Cannot append a transform because no (inherited) data are available! ${h?JSON.stringify(h):""}`))}function f(c,h){for(const d of c){let p;try{p=e9(d,h)}catch(b){throw console.warn(b),new Error(`Cannot initialize "${d.type}" transform: ${b}`)}p.behavior&Gr&&s(new ku),s(p)}}const l=c=>{if(n.push(r),c.spec.data){const h=T9(c.spec.data)?new rw(c.spec.data,c,c.context.getNamedDataFromProvider):y9(c.spec.data,c);r=h,i.addDataSource(h,c)}if(c.spec.transform&&f(c.spec.transform,c),c instanceof Qt){if(!r)throw new Error(`A unit view (${c.getPathString()}) has no (inherited) data source`);const h=F9(c);if(h){o.push(h.rewrite);for(const p of h.transforms)s(p)}c.mark.isPickingParticipant()&&(s(new ku),s(new Ky({type:"identifier"})));const d=new Wy({type:"collect",groupby:c.getFacetFields(),sort:M9(c,h==null?void 0:h.rewrittenEncoding)});a(d),i.addCollector(d,c)}},u=B9(e.getDescendants(),c=>c.dataParent);for(const c of u)D9(c,{preOrder:h=>l(h.ref),postOrder:()=>{r=n.pop()}});return o.forEach(c=>c()),i}function F9(e){var o;const t=[],n={},r=[];for(const[a,s]of Object.entries(e.getEncoding())){const f=a;Is(f)&&Vb(s)&&r.push({channel:f,chromPosDef:s})}const i=uf(r,a=>Fi(a.channel),a=>a.chromPosDef.chrom);for(const[a,s]of i.entries())for(const[f,l]of s.entries()){const u=[],c=[],h=[];for(const{channel:d,chromPosDef:p}of l){const b=_=>_.replace(/[^A-Za-z0-9_]/g,""),y=["_linearized_",b(p.chrom),"_",b(p.pos)].join(""),w={...((o=e.spec.encoding)==null?void 0:o[d])??e.getEncoding()[d]??{},field:y};delete w.chrom,delete w.pos,!w.type&&p.type&&(w.type=p.type),n[d]=w,u.push(p.pos),h.push(p.offset??0),c.push(y)}t.push(new ku),t.push(new Yy({type:"linearizeGenomicCoordinate",channel:a,chrom:f,pos:u,offset:h,as:c},e))}return t.length?{transforms:t,rewrittenEncoding:n,rewrite:()=>{e.spec.encoding={...e.spec.encoding,...n},py(e.mark,"encoding")}}:void 0}function M9(e,t){var r;const n={...e.getEncoding(),...t}.x;if(Ut(n)&&(r=e.getScaleResolution("x"))!=null&&r.isZoomable()){if(Cs(n))return{field:n.field};if(!ks(n))throw new Error("A zoomable x channel must be mapped to a field.")}}function aw(e,t=void 0){if(e.parent!==t)return!1;for(const n of e.children)if(!aw(n,e))return!1;return!0}function u0(e,t=!1){if(e.behavior&t0&&(t=!0),e instanceof ku)if(t)t=!1;else{const n=e.children[0];e.excise(),n&&u0(n,t);return}e.behavior&zn&&(t=!1);for(let n=0,r=e.children.length;n<r;n++)u0(e.children[n],t||r>1)}function P9(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 o=n.get(i.identifier);o&&(o.adoptChildrenOf(i),i=o),e.addDataSource(i,r)}}function L9(e){if(u0(e),!aw(e))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function N9(e){for(const t of e.dataSources)L9(t);P9(e)}function O9(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 z9(e){for(const t of Mo){const n=e.getScaleResolution(t);n&&!n.name&&n.isZoomable()&&(n.name=`${t}_at_root`)}}async function U9(e,t,n){var a;if(!e.import.url)throw new Error("Cannot import, not an import spec: "+JSON.stringify(e));const r=Ef({baseURL:t}),i=e.import.url,o=JSON.parse(await r.load(i).catch(s=>{throw new Error(`Could not load imported view spec: ${i}
|
|
244
|
+
Reason: ${s.message}`)}));if(n.isViewSpec(o))return o.baseUrl=(a=i.match(/^[^?#]*\//))==null?void 0:a[0],o;throw new Error(`The imported spec "${i}" is not a view spec: ${JSON.stringify(e)}`)}function G9(e){const t=e.getSize().addPadding(e.getOverhang()),n=r=>r.grow>0?void 0:r.px;return{width:n(t.width),height:n(t.height)}}function or(e){return()=>e}const In=class In{static create(t,n,r,i){return new In(or(t),or(n),or(r),or(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"?or(i):typeof i=="function"?i:this._passThrough(r)};return new In(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new In(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 In(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 In(()=>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 In(()=>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 In(or(this.x),or(this.y),or(this.width),or(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)}`}};St(In,"ZERO",In.create(0,0,0,0));let ar=In;class sw{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class lw extends sw{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=a=>()=>{t&&a()},i=a=>()=>{t&&n&&a()},o=uf(this.buffer.reverse(),a=>a.mark);for(const[a,s]of[...o.entries()].reverse()){if(!a.isReady())continue;this.batch.push(()=>{t=a.unitView.getEffectiveOpacity()>0}),this.batch.push(...a.prepareRender(this.globalOptions).map(l=>r(l)));let f;for(const l of s){const u=l.coords;u.equals(f)||this.batch.push(r(()=>{n=a.setViewport(u,l.clipRect)})),this.batch.push(i(l.callback)),f=l.coords}}}}class H9 extends sw{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 V9{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 j9{constructor(t,n){this.x=t,this.y=n}equals(t){return t?t===this||t.x===this.x&&t.y===this.y:!1}}const q9=e=>new Promise(t=>setTimeout(t,e));function Z9(e){const t=e.requestAnimationFrame||window.requestAnimationFrame,n=e.signal,r=()=>new Promise((i,o)=>{if(n!=null&&n.aborted)return o("aborted");const a=performance.now(),s=a+(e.duration||1e3),f=typeof e.from=="number"?e.from:0,l=typeof e.to=="number"?e.to:1,u=e.easingFunction||(b=>b),c=b=>(b-a)/(s-a),h=b=>b*(l-f)+f,d=b=>Math.max(0,Math.min(1,b)),p=b=>{n!=null&&n.aborted?o("aborted"):(e.onUpdate(h(u(d(c(b))))),b<s?t(p):(e.onUpdate(h(u(1))),i()))};t(p)});return e.delay?n!=null&&n.aborted?Promise.reject("aborted"):q9(e.delay).then(r):r()}class W9{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 Z9({requestAnimationFrame:n=>this.requestTransition(n),...t})}}class Y9{constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new bD(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 Q9="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMhERycB36XD+hX0/DuzSlsnw3OfyilcwAA/vn/yzQQMoUHg9r59hhn7Oz/njH9ncJAiAXNj9P2qTxdhARETufgDYNs4fsH/Cv2jL53nzm1lcZH2dngKCP/Gnn/LTEiXg+Tw/Q+btvJ1+/vlPfvYz/v1vEwA26w4fs8lm4R4GgIiIAmB5GdvGnmbuh9Rq8MIXcuMGpVJ6AFhEXNwneOI//OfnSz8fL49/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p+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",X9={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class $9{constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new gi([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:Kd(Qy),texture:t?this._createTextureNow(Q9):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(Pe(r)&&(r=X9[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const i={family:t,style:n,weight:r};let o=this._fonts.get(i);return o||(o={metrics:void 0,texture:void 0},this._fonts.set(i,o),this._promises.push(this._loadFontEntry(o,i))),o}async _loadFontEntry(t,n){try{const r=await this._loadMetadata(n.family),i=J9(r,n),o=this.fontRepository+fw(n.family)+"/"+i.replace(/\.\w+/,""),a=this._createTexture(o+".png"),s=this._loadFont(o+".json");t.texture=await a,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=>Kd(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=fw(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=>K9(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)=>{Ps(n,{src:t,min:n.LINEAR},(o,a,s)=>{o?i(o):r(a)})})}_createTextureNow(t){const n=this._webGLHelper.gl;let r;const i=new Promise((o,a)=>{r=Ps(n,{src:t,min:n.LINEAR},(s,f,l)=>{s?a(s):o(f)})});return this._promises.push(i),r}}function fw(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function K9(e){const t=e.split(`
|
|
245
|
+
`),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 o=i.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(o){const a=o[1];r[a]=o[2]}if(o=i.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),o){const a=o[1];r[a]=+o[2]}}return n}function J9(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 o=Math.abs(t.weight-i.weight);o<r&&(r=o,n=i)}return n==null?void 0:n.filename}function eR(e,t){const n=[];let r;for(const i of e.split(`
|
|
246
|
+
`))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 tR{constructor(t,n){this.animator=t,this.disabled=!!n,this.damping=.015,this.acceleration=.3,this.accelerationThreshold=100,this.lowerLimit=.5,this.loop=!1,this.momentum=0,this.timestamp=0,this.callback=null,this._transitionCallback=this.animate.bind(this),this.clear()}clear(){this.momentum=0,this.timestamp=null,this.loop=null,this.callback=null}cancel(){this.loop&&(this.animator.cancelTransition(this._transitionCallback),this.clear())}setMomentum(t,n){if(this.disabled){n(t);return}t*this.momentum<0?this.momentum=0:Math.abs(t)>this.accelerationThreshold?this.momentum=qg([this.momentum,t],this.acceleration):this.momentum=t,this.callback=n,this.loop||this.animate()}animate(t){this.callback(this.momentum);const n=t-this.timestamp||0;this.timestamp=t;const r=Math.abs(this.momentum);this.momentum=Math.sign(this.momentum)*Math.max(0,r-((r*this.damping)**1.5+.04)*n),Math.abs(this.momentum)>this.lowerLimit?(this.loop=!0,this.animator.requestTransition(this._transitionCallback)):this.clear()}}function nR(e){const t={},n=["string","number","boolean"],r=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const i in e){const o=i;!r.includes(i)&&n.includes(typeof e[o])&&(t[o]=e[o])}return t}const uw=new Map;async function rR(e,t,n){const r=e.symbol;let i=uw.get(r)??await aR(e.symbol);return i?(uw.set(r,i),Dn`
|
|
254
247
|
<div class="title">
|
|
255
248
|
<strong>${i.name}</strong>
|
|
256
249
|
${i.description}
|
|
257
250
|
</div>
|
|
258
251
|
<p class="summary">${i.summary}</p>
|
|
259
252
|
<p class="source">Source: NCBI RefSeq Gene</p>
|
|
260
|
-
`):null}async function
|
|
253
|
+
`):null}async function iR(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(a=>a.json())).result[r]:null}const oR=Cu(iR,500);function aR(e){return oR(e)}const sR=pt(".4~r"),lR=pt(".4~e");function cw(e){return e==null?Dn` <span class="na">NA</span> `:Pe(e)?e.substring(0,30):Number.isInteger(e)?""+e:kt(e)?Math.abs(e)>Math.pow(10,8)||Math.abs(e)<Math.pow(10,-8)?lR(e):sR(e):La(e)?e?"True":"False":Ft(e)?Dn`${e.map((t,n)=>[cw(t),n<e.length-1?", ":nt])}`:"?"+typeof e+" "+e}async function fR(e,t,n){const r=(f,l)=>{var u;for(const[c,h]of Object.entries(t.encoders))if((u=h==null?void 0:h.accessor)!=null&&u.fields.includes(f))switch(c){case"color":case"fill":case"stroke":return Dn`
|
|
261
254
|
<span
|
|
262
255
|
class="color-legend"
|
|
263
256
|
style=${`background-color: ${h(l)}`}
|
|
264
257
|
></span>
|
|
265
|
-
`}return""},i=Object.entries(e).filter(([f,l])=>!f.startsWith("_"));if(i.length===0)return;const o=
|
|
258
|
+
`}return""},i=Object.entries(e).filter(([f,l])=>!f.startsWith("_"));if(i.length===0)return;const o=Dn`
|
|
266
259
|
<table class="attributes">
|
|
267
|
-
${i.map(([f,l])=>
|
|
260
|
+
${i.map(([f,l])=>Dn`
|
|
268
261
|
<tr>
|
|
269
262
|
<th>${f}</th>
|
|
270
|
-
<td>${
|
|
263
|
+
<td>${cw(l)} ${r(f,e)}</td>
|
|
271
264
|
</tr>
|
|
272
265
|
`)}
|
|
273
266
|
</table>
|
|
274
|
-
`,a=t.unitView.getTitleText(),s=a?
|
|
267
|
+
`,a=t.unitView.getTitleText(),s=a?Dn`
|
|
275
268
|
<div class="title">
|
|
276
269
|
<strong>${a}</strong>
|
|
277
270
|
</div>
|
|
278
|
-
`:"";return Fn`${s}${o}`}class Us extends Hi{constructor(n,r,i,o,a,s){super(n,r,i,o,a,s);ce(this,br,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){mn(this,br,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!s0(i)&&!a0(i))throw new Gi("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return $(this,br).slice()}*[Symbol.iterator](){for(const n of $(this,br))yield n}render(n,r,i={}){if(this.isConfiguredVisible()){n.pushView(this,r);for(const o of $(this,br))o.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=$(this,br).length-1;r>=0;r--)if($(this,br)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}br=new WeakMap;class Ky{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 o=[];t.push(o);for(let a=0;a<n;a++){const s=i*n+a;s<this.n&&o.push(s)}}return t}get colIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<n;i++){const o=[];t.push(o);for(let a=0;a<r;a++){const s=a*n+i;s<this.n&&o.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 W9="chromosome_ticks_and_labels",Y9={x:"width",y:"height"};function n0(e){return e=="x"?"y":"x"}const wu={x:["bottom","top"],y:["left","right"]},r0=Object.fromEntries(Object.entries(wu).map(([e,t])=>t.map(n=>[n,e])).flat(1));function jr(e){return r0[e]}class Jy extends Us{constructor(t,n,r,i,o,a){const s=n=="locus",f={...s?X9:ew,...Q9(n,t),...t};super(s?$9(f,n):tw(f,n),r,i,o,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...a}),this.axisProps=f}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return r0[this.axisProps.orient]=="x"?new Vr(n,t):new Vr(t,n)}getPerpendicularSize(){return i0(this.axisProps)}isPickingSupported(){return!1}}function i0(e){const t=jr(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 ew={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 Q9(e,t){const n=t.orient,r=e=="nominal"||e=="ordinal";let i="center",o="middle",a=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(a)>30?(i=a>0==(n=="bottom")?"left":"right",o="middle"):o=n=="top"?"alphabetic":"top";break}return{labelAlign:i,labelAngle:a,labelBaseline:o}}function tw(e,t){const n={...e,extent:i0(e)},r=jr(n.orient),i=n0(r),o=n.orient=="bottom"||n.orient=="right"?1:-1,a=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]:a,size:n.domainWidth}}),f=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[i+"Offset"]:(n.tickSize+n.labelPadding)*o,[i]:a,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:t},text:{field:"label"}}}),l=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[i]:{value:a},[i+"2"]:{value:a-n.tickSize/n.extent*(a?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-a}}),c=()=>{const d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:t}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(f()),d},h={resolve:{scale:{[r]:"forced"}},[Y9[n0(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(c()),n.title&&h.layer.push(u()),h}const X9={...ew,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 $9(e,t){const n={...e,extent:i0(e)},r=jr(n.orient),i=n0(r),o=n.orient=="bottom"||n.orient=="left"?1:0,a=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:e.chromTickDash,strokeDashOffset:e.chromTickDashOffset,[i]:o,[i+"2"]:o-n.chromTickSize/n.extent*(o?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 f;switch(n.orient){case"bottom":case"top":f={};break;case"left":f={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":f={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:f={}}const l=tw({...e,...f},t);if(e.chromTicks||e.chromLabels){const u={name:W9,data:{lazy:{type:"axisGenome",channel:jr(n.orient)}},encoding:{[r]:{field:"continuousStart",type:t,band:0}},layer:[]};if(e.chromTicks&&u.layer.push(a()),e.chromLabels){u.layer.push(s());let c;l.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(d=>d.name=="labels").forEach(d=>{c=d.mark})),c&&(n.orient=="top"||n.orient=="bottom"?(c.viewportEdgeFadeWidthLeft=30,c.viewportEdgeFadeDistanceLeft=40):(c.viewportEdgeFadeWidthBottom=30,c.viewportEdgeFadeDistanceBottom=40))}l.layer.push(u)}return l}class K9 extends Us{constructor(t,n,r,i,o,a){const f={...n=="locus"?J9:nw,...t};super(rF(f,n),r,i,o,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...a}),this.axisProps=f}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const nw={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},J9={...nw,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function eF(e,t){const n=e,r=jr(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 tF(e,t){const n=e,r=jr(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 nF(e,t){const n=e,r=jr(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 rF(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(nF(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(tF(n,t)),n.grid&&n.gridOpacity>0&&r.push(eF(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[jr(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const rw={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"},iF={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},oF={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},aF={start:0,middle:.5,end:1},sF={start:"left",middle:"center",end:"right"};function lF(e){if(!e)return;const t=Qe(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":iF,overlay:oF}[t.style]??{},r={...rw,...n,...t};let i={},o={x:0,y:0};const a=aF[r.anchor??"middle"];switch(r.orient){case"top":o={x:a,y:1},i={baseline:"alphabetic",angle:0};break;case"right":o={x:1,y:1-a},i={baseline:"alphabetic",angle:90};break;case"bottom":o={x:a,y:0},i={baseline:"top",angle:0};break;case"left":o={x:0,y:a},i={baseline:"alphabetic",angle:-90};break}const s={...rw,...i,...n,...t},f={xOffset:0,yOffset:0};switch(r.orient){case"top":f.yOffset=-s.offset;break;case"right":f.xOffset=s.offset;break;case"bottom":f.yOffset=s.offset;break;case"left":f.xOffset=-s.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...o,...f,text:s.text,align:s.align??sF[s.anchor],angle:s.angle,baseline:s.baseline,dx:s.dx,dy:s.dy,color:s.color,font:s.font,size:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight}}}function fF(e,t,n,r){if(e.type=="wheel"){e.uiEvent.preventDefault();const i=e.uiEvent,o=i.deltaMode?120:1;let{x:a,y:s}=e.point;if(r){const f=r.mark.encoders;f.x&&!f.x2&&!f.x.constantValue&&(a=+f.x(r.datum)*t.width+t.x),f.y&&!f.y2&&!f.y.constantValue&&(s=(1-+f.y(r.datum))*t.height+t.y)}Math.abs(i.deltaX)<Math.abs(i.deltaY)?n({x:a,y:s,xDelta:0,yDelta:0,zDelta:i.deltaY*o/300}):n({x:a,y:s,xDelta:-i.deltaX*o,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){const i=e.uiEvent;i.preventDefault();let o=i;const a=f=>{n({x:o.clientX,y:o.clientY,xDelta:f.clientX-o.clientX,yDelta:f.clientY-o.clientY,zDelta:0}),o=f},s=f=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s)};document.addEventListener("mouseup",s,!1),document.addEventListener("mousemove",a,!1)}}class uF extends Hi{constructor(n,r,i,o,a,s,f){super(n,r,i,o,a,f);ce(this,yr);ce(this,Ec);ce(this,po);ce(this,zl);ce(this,Ul);ce(this,Gl);ce(this,_c);ce(this,ka);ce(this,Sc);ce(this,Ca,1/0);ce(this,Ia,10);ce(this,Jt,[]);ce(this,ho,{});ce(this,Ta,0);this.spec=n,mn(this,Ia,n.spacing??10),mn(this,Ca,s),mn(this,Jt,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),$(this,Jt).push(new ow(n,this,$(this,Ta))),NE(this,Ta)._++}setChildren(n){mn(this,Jt,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=$(this,Jt).findIndex(o=>o.view==n);if(i>=0)$(this,Jt)[i]=new ow(r,this,$(this,Ta));else throw new Error("Not my child view!")}get children(){return $(this,Jt).map(n=>n.view)}get childCount(){return $(this,Jt).length}async createAxes(){const n=[];for(const r of Do){const i=this.resolutions.axis[r];if(i){const o=i.getAxisProps();if(o){const a={title:i.getTitle(),orient:wu[r][0],...o},s=new Jy(a,i.scaleResolution.type,this.context,this,this);n.push(s.initializeChildren()),$(this,ho)[r]=s}}}return Promise.all([...n,...$(this,Jt).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of $(this,Jt))yield*n.getChildren();for(const n of Object.values($(this,ho)))yield n}getOverhang(){return ie(this,_c,GE).call(this).union(ie(this,ka,Bc).call(this))}getSize(){return this._cache("size",()=>new Vr(ie(this,Ul,Cg).call(this,"column"),ie(this,Ul,Cg).call(this,"row")).addPadding(ie(this,ka,Bc).call(this)))}render(n,r,i={}){if(!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(ie(this,ka,Bc).call(this)),n.pushView(this,r);const o={devicePixelRatio:this.context.devicePixelRatio},a=uy(ie(this,zl,Sg).call(this,"column"),r.width,o),s=uy(ie(this,zl,Sg).call(this,"row"),r.height,o),f=new Ky($(this,yr,mo).length,$(this,Ca)??1/0),l=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,c]of $(this,yr,mo).entries()){const{view:h,axes:d,gridLines:p,background:b,backgroundStroke:y,title:w}=c,[S,C]=f.getCellCoords(u),_=a[ie(this,Gl,Ig).call(this,"column",S)],k=s[ie(this,Gl,Ig).call(this,"row",C)],B=h.getViewportSize(),T=h.getSize(),R=h.getOverhang(),M=_.location-R.left,j=k.location-R.top,O=(Ne,L)=>(Ne[L].grow?(L=="width"?_:k).size:Ne[L].px)+R[L],ne=O(B,"width"),ae=O(B,"height"),pe=O(T,"width"),ke=O(T,"height"),Xe=c.scrollbars.horizontal,De=c.scrollbars.vertical,$e=Xe?()=>l(Xe.viewportOffset):()=>0,qe=De?()=>l(De.viewportOffset):()=>0,Ke=new sr(()=>r.x+M,()=>r.y+j,()=>ne,()=>ae),Ee=h.isScrollable(),_e=Ee?new sr(()=>r.x+M-$e(),()=>r.y+j-qe(),()=>pe,()=>ke):Ke;c.coords=Ke;const dt=i.clipRect?Ke.intersect(i.clipRect):Ke;b==null||b.render(n,dt,{...i,clipRect:void 0});for(const Ne of Object.values(p))Ne.render(n,Ke,i);const Ht=pF(h)||Ee;Ht&&h.render(n,_e,{...i,clipRect:dt}),y==null||y.render(n,dt,{...i,clipRect:void 0});for(const[Ne,L]of Object.entries(d)){const P=Ne=="left"||Ne=="right"?"vertical":"horizontal",q=c.scrollbars[P],H=q?Ke.modify(P=="vertical"?{y:()=>_e.y,height:ke}:{x:()=>_e.x,width:pe}):Ke,W=iw(H,Ne,L);let E=i.clipRect;q&&(E=W.intersect(E).intersect(q?Ke.modify(P=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),L.render(n,W,{...i,clipRect:E})}for(const Ne of Object.values($(this,ho))){const P=Ne.axisProps.orient;(P=="left"&&S==0||P=="right"&&S==f.nCols-1||P=="top"&&C==0||P=="bottom"&&C==f.nRows-1)&&Ne.render(n,iw(Ke.shrink(c.view.getOverhang()),P,Ne),i)}Ht||h.render(n,_e,i);for(const Ne of Object.values(c.scrollbars))Ne.updateScrollbar(Ke,_e),Ne.render(n,r,i);w==null||w.render(n,Ke,i)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=$(this,yr,mo).find(o=>o.coords.containsPoint(n.point.x,n.point.y));for(const o of Object.values((r==null?void 0:r.scrollbars)??{}))if(o.coords.containsPoint(n.point.x,n.point.y)&&(o.propagateInteractionEvent(n),n.stopped))return;const i=r==null?void 0:r.view;i&&(i.propagateInteractionEvent(n),(i instanceof Qt||i instanceof Us)&&fF(n,r.coords,o=>ie(this,Sc,HE).call(this,r.coords,r.view,o),this.context.getCurrentHover())),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}Ca=new WeakMap,Ia=new WeakMap,Jt=new WeakMap,ho=new WeakMap,Ta=new WeakMap,yr=new WeakSet,mo=function(){return $(this,Jt).filter(n=>n.view.isConfiguredVisible())},Ec=new WeakSet,UE=function(){return new Ky($(this,yr,mo).length,$(this,Ca)??1/0)},po=new WeakSet,jl=function(n){const r=n=="column"?"width":"height",i=(o,a)=>o.map(s=>{const l=$(this,yr,mo)[s].getOverhangAndPadding();return n=="column"?a?l.right:l.left:a?l.bottom:l.top}).reduce((s,f)=>Math.max(s,f),0);return this._cache(`size/directionSizes/${n}`,()=>$(this,Ec,UE)[n=="column"?"colIndices":"rowIndices"].map(o=>({axisBefore:i(o,0),axisAfter:i(o,1),view:wB(o.map(a=>$(this,yr,mo)[a].view.getViewportSize()[r]))})))},zl=new WeakSet,Sg=function(n){const r=ie(this,po,jl).call(this,n),i=[];i.push(Ps);for(const[o,a]of r.entries())o>0&&i.push({px:$(this,Ia),grow:0}),(o==0||this.wrappingFacet)&&i.push(Ps),i.push({px:a.axisBefore,grow:0}),i.push(a.view),i.push({px:a.axisAfter,grow:0}),(o==r.length-1||this.wrappingFacet)&&i.push(Ps);return i},Ul=new WeakSet,Cg=function(n){let r=0,i=0;const o=n=="row"?this.spec.height:this.spec.width;if(o||o===0)return hy(o);const a=ie(this,po,jl).call(this,n);for(const[s,f]of a.entries())s>0&&(i+=$(this,Ia)),(s==0||this.wrappingFacet)&&(i+=0),i+=f.axisBefore,i+=f.view.px??0,r+=f.view.grow??0,i+=f.axisAfter,(s==a.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},Gl=new WeakSet,Ig=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},_c=new WeakSet,GE=function(){const n=ie(this,po,jl).call(this,"column"),r=ie(this,po,jl).call(this,"row");return!n.length||!r.length?Et.zero():new Et(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},ka=new WeakSet,Bc=function(){const n=r=>{const i=r0[r],o=$(this,ho)[i];return(o==null?void 0:o.axisProps.orient)!==r?0:Math.max(o.getPerpendicularSize()+o.axisProps.offset,0)};return new Et(n("top"),n("right"),n("bottom"),n("left"))},Sc=new WeakSet,HE=function(n,r,i){for(const[o,a]of Object.entries(dF(r))){if(a.size<=0)continue;const s=n.normalizePoint(i.x,i.y),f=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:f.x-s.x,y:f.y-s.y};for(const u of a)u.zoom(2**i.zDelta,o=="y"?1-s[o]:s[o],o=="x"?l.x:-l.y)}this.context.animator.requestRender()};function cF(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 hF(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 dF(e){const t={x:new Set,y:new Set};return e.visit(n=>{for(const[r,i]of Object.entries(t)){const o=n.getScaleResolution(r);o&&o.isZoomable()&&i.add(o)}}),t}function pF(e){let t=!0;return e.visit(n=>{n instanceof Qt&&t&&(t=n.mark.properties.clip===!0)}),t}function iw(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 ow{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=sr.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,o="view"in i?i==null?void 0:i.view:void 0,a=cF(o);a&&(this.background=new Qt(a,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const s=hF(o);s&&(this.backgroundStroke=new Qt(s,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const f=lF(t.spec.title);if(f){const l=new Qt(f,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=l}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new aw(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new aw(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,f)=>{const l=s.getAxisProps();if(l===null)return;const u=l?{...l}:{};if(!u.orient){for(const c of wu[f])if(!n[c]){u.orient=c;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()),!wu[f].includes(u.orient))throw new Error(`Invalid axis orientation "${u.orient}" on channel "${f}"!`);return u},o=async(s,f,l)=>{const u=i(s,f);if(u){if(n[u.orient])throw new Error(`An axis with the orient "${u.orient}" already exists!`);const c=new Jy(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[u.orient]=c,await c.initializeChildren()}},a=async(s,f,l)=>{const u=i(s,f);if(u&&(u.grid||u.chromGrid)){const c=new K9(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[u.orient]=c,await c.initializeChildren()}};for(const s of["x","y"])if(t.needsAxes[s]){const f=t.resolutions.axis[s];if(!f)continue;await o(f,s,t)}for(const s of["x","y"])if(t.needsAxes[s]){const f=t.getAxisResolution(s);if(!f)continue;await a(f,s,t)}if(t instanceof Us){for(const s of t)for(const[f,l]of Object.entries(s.resolutions.axis)){const u=l.getAxisProps();u&&u.orient&&await o(l,f,s)}for(const s of t)for(const[f,l]of Object.entries(s.resolutions.axis)){const u=l.getAxisProps();u&&!u.orient&&await o(l,f,s)}}[...Object.values(n),...Object.values(r)].forEach(s=>s.visit(f=>{f instanceof Qt&&f.resolve("scale")}))}getOverhang(){const t=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+r.axisProps.offset,0):0};return new Et(t("top"),t("right"),t("bottom"),t("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}class aw extends Qt{constructor(t,n){const r={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},t.layoutParent.context,t.layoutParent,t.view,"scrollbar-"+n,{blockEncodingInheritance:!0}),this.config=r,this.scrollDirection=n,this.viewportOffset=0,this.maxScrollOffset=0,this.scrollbarCoords=sr.ZERO,this.addInteractionEventListener("mousedown",(i,o)=>{if(o.stopPropagation(),this.maxScrollOffset<=0)return;const a=h=>n=="vertical"?h.clientY:h.clientX,s=o.uiEvent;s.preventDefault();const f=this.getScrollOffset(),l=a(s),u=h=>{const d=Vd(a(h)-l+f,0,this.maxScrollOffset);this.viewportOffset=d/this.maxScrollOffset*this.maxViewportOffset,this.context.animator.requestRender()},c=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",c)};document.addEventListener("mouseup",c,!1),document.addEventListener("mousemove",u,!1)})}getScrollOffset(){return this.viewportOffset/this.maxViewportOffset*this.maxScrollOffset}render(t,n,r){super.render(t,this.scrollbarCoords,r)}updateScrollbar(t,n){const r=this.config.scrollbarPadding,i=this.config.scrollbarSize,o=this.scrollDirection=="horizontal"?"width":"height",a=Math.min(1,t[o]/n[o]),s=t[o]-2*r,f=a*s;this.maxScrollOffset=s-f,this.maxViewportOffset=n[o]-t[o],this.viewportOffset=Vd(this.viewportOffset,0,this.maxViewportOffset),this.scrollbarCoords=this.scrollDirection=="vertical"?new sr(()=>t.x+t.width-i-r,()=>t.y+r+this.getScrollOffset(),()=>i,()=>f):new sr(()=>t.x+r+this.getScrollOffset(),()=>t.y+t.height-i-r,()=>f,()=>i)}}class o0 extends uF{constructor(t,n,r,i,o){super(t,n,r,i,o,l0(t)?t.columns:vu(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=l0(t)?t.concat:vu(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":vu(this.spec)&&t==="x"||lw(this.spec)&&t==="y"?"shared":"independent"}}const sw="viewRoot";class gF{constructor(t={}){ce(this,Ba,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,o,a,s,f)=>new r(i,o,a,s,i.name??f);this.addViewType(s0,n(Us)),this.addViewType(a0,n(Qt)),this.addViewType(vu,n(o0)),this.addViewType(lw,n(o0)),this.addViewType(l0,n(o0)),this.addViewType(bF,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){$(this,Ba).set(t,n)}createView(t,n,r,i,o){for(const[a,s]of $(this,Ba))if(a(t))return s(t,n,r,i,o);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(t)]))}isViewSpec(t){const n=[...$(this,Ba).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,o,a){let s;if(mF(t))if(this.options.allowImport)s=await E9(t,i.getBaseUrl(),n),a&&a(s);else throw new Gi("Importing views is not allowed!",r);else s=t;!i&&this.options.wrapRoot&&(a0(s)||s0(s))&&o===sw&&(s={name:"implicitRoot",vconcat:[s]});const f=this.createView(s,n,r,i,o);return f instanceof Hi&&await f.initializeChildren(),f}}Ba=new WeakMap;function a0(e){return"mark"in e&&(Qe(e.mark)||Zt(e.mark))}function s0(e){return"layer"in e&&Zt(e.layer)}function mF(e){return"import"in e}function vu(e){return"vconcat"in e&&qt(e.vconcat)}function lw(e){return"hconcat"in e&&qt(e.hconcat)}function l0(e){return"concat"in e&&qt(e.concat)}function bF(e){return"samples"in e&&Zt(e.samples)&&"spec"in e&&Zt(e.spec)}Lm("fasta",N9);class fw{constructor(t,n,r={}){this.container=t;const i=document.createElement("style");i.innerHTML=US,t.appendChild(i),this.spec=n,this.accessorFactory=new I8,this.viewFactory=new gF,this.namedDataProviders=[],this.animator=new B9(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=o=>o.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new O9(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:Z9,refseqgene:U9,...r.tooltipHandlers??{}},this.viewRoot=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),Kd(r.hosts),this.animator.requestRender()}broadcast(t,n){var i;const r={type:t,payload:n};this.viewRoot.visit(o=>o.handleBroadcast(r)),(i=this._extraBroadcastListeners.get(t))==null||i.forEach(o=>o(r))}_prepareContainer(){this.container.classList.add("genome-spy"),this.container.classList.add("loading"),this._glHelper=new Vk(this.container,()=>this.viewRoot?_9(this.viewRoot):{width:void 0,height:void 0},this.spec.background),this.loadingMessageElement=document.createElement("div"),this.loadingMessageElement.className="loading-message",this.loadingMessageElement.innerHTML='<div class="message">Loading<span class="ellipsis">...</span></div>',this.container.appendChild(this.loadingMessageElement),this.tooltip=new HS(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})}destroy(){this.container.classList.remove("genome-spy"),this.container.classList.remove("loading");for(const[t,n]of this._keyboardListeners)for(const r of n)document.removeEventListener(t,r);for(this._glHelper.finalize();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new D9(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new jy,accessorFactory:this.accessorFactory,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new P9(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,addKeyboardListener:(f,l)=>{document.addEventListener(f,l);let u=this._keyboardListeners.get(f);u||(u=[],this._keyboardListeners.set(f,u)),u.push(l)},addBroadcastListener(f,l){const u=t._extraBroadcastListeners;let c=u.get(f);c||(c=new Set,u.set(f,c)),c.add(l)},removeBroadcastListener(f,l){var c;(c=t._extraBroadcastListeners.get(f))==null||c.delete(l)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:f=>t.viewFactory.isViewSpec(f),createView:function(f,l,u,c){return t.viewFactory.createView(f,n,l,u,c)},createOrImportView:async function(f,l,u,c,h){return t.viewFactory.createOrImportView(f,n,l,u,c,h)}},r=this.spec;r.datasets&&this.registerNamedDataProvider(f=>r.datasets[f]),this.viewRoot=await n.createOrImportView(r,null,null,sw),x9(this.viewRoot),A9(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(f=>f.configureViewOpacity()),this._glHelper.invalidateSize();const o=i.filter(f=>f instanceof Qt),a=g9(this.viewRoot,n.dataFlow);v9(a),this.broadcast("dataFlowBuilt",a),o.forEach(f=>f.mark.initializeEncoders());const s=Promise.all(o.map(f=>f.mark.initializeGraphics()));for(const f of o)a.addObserver(l=>{f.mark.initializeData(),f.mark.updateGraphicsData()},f);await n.fontManager.waitUntilReady(),a.initialize(),await Promise.all(a.dataSources.map(f=>f.load())),Kd(this.viewRoot),this.broadcast("dataLoaded"),await s,this.viewRoot.visit(f=>{for(const l of Object.values(f.resolutions.scale))this._glHelper.createRangeTexture(l)});for(const f of o)f.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(f=>hu(f,"size")),this._glHelper.invalidateSize()}async launch(){try{return this._prepareContainer(),await this._prepareViewsAndData(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),this._glHelper.addEventListener("resize",()=>{this.computeLayout(),this.renderAll()}),!0}catch(t){const n=`${t.view?`At "${t.view.getPathString()}": `:""}${t.toString()}`;return console.error(t.stack),yF(this.container,n),!1}finally{this.container.classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const t=this._glHelper.canvas,n=r=>{var i;if(r instanceof MouseEvent){r.type=="mousemove"&&(this.tooltip.handleMouseMove(r),this._tooltipUpdateRequested=!1,r.buttons==0&&this.renderPickingFramebuffer());const o=t.getBoundingClientRect(),a=new I9(r.clientX-o.left-t.clientLeft,r.clientY-o.top-t.clientTop),s=f=>{this.viewRoot.propagateInteractionEvent(new C9(a,f)),this._tooltipUpdateRequested||this.tooltip.clear()};if(r.type!="wheel"&&this._wheelInertia.cancel(),r.type=="mousemove")this._handlePicking(a.x,a.y);else if(r.type=="mousedown"||r.type=="mouseup")this.renderPickingFramebuffer();else if(r.type=="wheel"){this._tooltipUpdateRequested=!1;const f=r;if(Math.abs(f.deltaX)>Math.abs(f.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const l=z9(f);this._wheelInertia.setMomentum(f.deltaY*(f.deltaMode?80:1),u=>{const c=new WheelEvent("wheel",{...l,deltaMode:0,deltaX:0,deltaY:u});s(c)}),f.preventDefault();return}}if(r.type=="click"){const f=this._currentHover?{type:r.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(l=>l.name).reverse(),datum:this._currentHover.datum}:{type:r.type,viewPath:null,datum:null};(i=this._eventListeners.get("click"))==null||i.forEach(l=>l(f))}s(r)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(r=>t.addEventListener(r,n)),t.addEventListener("mousedown",()=>{document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),t.addEventListener("dragstart",r=>r.stopPropagation())}_handlePicking(t,n){var o;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!==((o=this._currentHover)==null?void 0:o.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(a=>{if(a instanceof Qt){if(a.mark.isPickingParticipant()){const s=a.mark.encoders.uniqueId.accessor;a.getCollector().visitData(f=>{s(f)==i&&(this._currentHover={mark:a.mark,datum:f,uniqueId:i})})}if(this._currentHover)return Ms}}),this._currentHover){const a=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async s=>{if(!a.isPickingParticipant())return;const f=a.properties.tooltip;if(f!==null){const l=(f==null?void 0:f.handler)??"default",u=this.tooltipHandlers[l];if(!u)throw new Error("No such tooltip handler: "+l);return u(s,a,f==null?void 0:f.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 Yy({picking:!1},this._glHelper),this._pickingContext=new Yy({picking:!0},this._glHelper),t.render(new S9(this._renderingContext,this._pickingContext),sr.create(0,0,n.width,n.height)),this.broadcast("layoutComputed")}renderAll(){var t;(t=this._renderingContext)==null||t.render(),this._dirtyPickingBuffer=!0}renderPickingFramebuffer(){this._dirtyPickingBuffer&&(this._pickingContext.render(),this._dirtyPickingBuffer=!1)}getSearchableViews(){const t=[];return this.viewRoot.visit(n=>{n instanceof Qt&&n.getAccessor("search")&&t.push(n)}),t}getNamedScaleResolutions(){const t=new Map;return this.viewRoot.visit(n=>{for(const r of Object.values(n.resolutions.scale))r.name&&t.set(r.name,r)}),t}}function yF(e,t){const n=document.createElement("div");n.className="message-box";const r=document.createElement("div");r.textContent=t,n.appendChild(r),e.appendChild(n)}const wF="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",vF="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";async function xF(e,t,n={}){let r;if(Qe(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 o=Zt(t)?t:await uw(t);if(o.baseUrl??(o.baseUrl=""),o.width??(o.width="container"),o.padding??(o.padding=10),r==document.body){const a=document.createElement("div");a.style.position="fixed",a.style.inset="0",a.style.overflow="hidden",r.appendChild(a),r=a}i=new fw(r,o,n),AF(i,n),await i.launch()}catch(o){r.innerText=o.toString(),console.error(o)}return{finalize(){for(i.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(o,a){const s=i._eventListeners;let f=s.get(o);f||(f=new Set,s.set(o,f)),f.add(a)},removeEventListener(o,a){var f;(f=i._eventListeners.get(o))==null||f.delete(a)},getScaleResolutionByName(o){return i.getNamedScaleResolutions().get(o)},updateNamedData:i.updateNamedData.bind(i)}}function AF(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function uw(e){let t;try{t=JSON.parse(await gf().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 xu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function Gs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function EF(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 ye={},Au={};Au.byteLength=CF,Au.toByteArray=TF,Au.fromByteArray=DF;for(var Gn=[],nn=[],_F=typeof Uint8Array<"u"?Uint8Array:Array,f0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jo=0,SF=f0.length;jo<SF;++jo)Gn[jo]=f0[jo],nn[f0.charCodeAt(jo)]=jo;nn["-".charCodeAt(0)]=62,nn["_".charCodeAt(0)]=63;function cw(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 CF(e){var t=cw(e),n=t[0],r=t[1];return(n+r)*3/4-r}function IF(e,t,n){return(t+n)*3/4-n}function TF(e){var t,n=cw(e),r=n[0],i=n[1],o=new _F(IF(e,r,i)),a=0,s=i>0?r-4:r,f;for(f=0;f<s;f+=4)t=nn[e.charCodeAt(f)]<<18|nn[e.charCodeAt(f+1)]<<12|nn[e.charCodeAt(f+2)]<<6|nn[e.charCodeAt(f+3)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=t&255;return i===2&&(t=nn[e.charCodeAt(f)]<<2|nn[e.charCodeAt(f+1)]>>4,o[a++]=t&255),i===1&&(t=nn[e.charCodeAt(f)]<<10|nn[e.charCodeAt(f+1)]<<4|nn[e.charCodeAt(f+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function kF(e){return Gn[e>>18&63]+Gn[e>>12&63]+Gn[e>>6&63]+Gn[e&63]}function BF(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(kF(r));return i.join("")}function DF(e){for(var t,n=e.length,r=n%3,i=[],o=16383,a=0,s=n-r;a<s;a+=o)i.push(BF(e,a,a+o>s?s:a+o));return r===1?(t=e[n-1],i.push(Gn[t>>2]+Gn[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(Gn[t>>10]+Gn[t>>4&63]+Gn[t<<2&63]+"=")),i.join("")}var u0={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */u0.read=function(e,t,n,r,i){var o,a,s=i*8-r-1,f=(1<<s)-1,l=f>>1,u=-7,c=n?i-1:0,h=n?-1:1,d=e[t+c];for(c+=h,o=d&(1<<-u)-1,d>>=-u,u+=s;u>0;o=o*256+e[t+c],c+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=a*256+e[t+c],c+=h,u-=8);if(o===0)o=1-l;else{if(o===f)return a?NaN:(d?-1:1)*(1/0);a=a+Math.pow(2,r),o=o-l}return(d?-1:1)*a*Math.pow(2,o-r)},u0.write=function(e,t,n,r,i,o){var a,s,f,l=o*8-i-1,u=(1<<l)-1,c=u>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+c>=1?t+=h/f:t+=h*Math.pow(2,1-c),t*f>=2&&(a++,f/=2),a+c>=u?(s=0,a=u):a+c>=1?(s=(t*f-1)*Math.pow(2,i),a=a+c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=s&255,d+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[n+d]=a&255,d+=p,a/=256,l-=8);e[n+d-p]|=b*128};/*!
|
|
271
|
+
`:"";return Dn`${s}${o}`}class Zs extends Vi{constructor(n,r,i,o,a,s){super(n,r,i,o,a,s);se(this,mr,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){Ct(this,mr,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!m0(i)&&!g0(i))throw new Hi("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return $(this,mr).slice()}*[Symbol.iterator](){for(const n of $(this,mr))yield n}render(n,r,i={}){if(this.isConfiguredVisible()){n.pushView(this,r);for(const o of $(this,mr))o.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=$(this,mr).length-1;r>=0;r--)if($(this,mr)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}mr=new WeakMap;class hw{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 o=[];t.push(o);for(let a=0;a<n;a++){const s=i*n+a;s<this.n&&o.push(s)}}return t}get colIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<n;i++){const o=[];t.push(o);for(let a=0;a<r;a++){const s=a*n+i;s<this.n&&o.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 uR="chromosome_ticks_and_labels",cR={x:"width",y:"height"};function c0(e){return e=="x"?"y":"x"}const Iu={x:["bottom","top"],y:["left","right"]},h0=Object.fromEntries(Object.entries(Iu).map(([e,t])=>t.map(n=>[n,e])).flat(1));function Vr(e){return h0[e]}class dw extends Zs{constructor(t,n,r,i,o,a){const s=n=="locus",f={...s?dR:pw,...hR(n,t),...t};super(s?pR(f,n):gw(f,n),r,i,o,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...a}),this.axisProps=f}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return h0[this.axisProps.orient]=="x"?new Hr(n,t):new Hr(t,n)}getPerpendicularSize(){return d0(this.axisProps)}isPickingSupported(){return!1}}function d0(e){const t=Vr(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 pw={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 hR(e,t){const n=t.orient,r=e=="nominal"||e=="ordinal";let i="center",o="middle",a=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(a)>30?(i=a>0==(n=="bottom")?"left":"right",o="middle"):o=n=="top"?"alphabetic":"top";break}return{labelAlign:i,labelAngle:a,labelBaseline:o}}function gw(e,t){const n={...e,extent:d0(e)},r=Vr(n.orient),i=c0(r),o=n.orient=="bottom"||n.orient=="right"?1:-1,a=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]:a,size:n.domainWidth}}),f=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[i+"Offset"]:(n.tickSize+n.labelPadding)*o,[i]:a,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:t},text:{field:"label"}}}),l=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[i]:{value:a},[i+"2"]:{value:a-n.tickSize/n.extent*(a?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-a}}),c=()=>{const d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:t}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(f()),d},h={resolve:{scale:{[r]:"forced"}},[cR[c0(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(c()),n.title&&h.layer.push(u()),h}const dR={...pw,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 pR(e,t){const n={...e,extent:d0(e)},r=Vr(n.orient),i=c0(r),o=n.orient=="bottom"||n.orient=="left"?1:0,a=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:e.chromTickDash,strokeDashOffset:e.chromTickDashOffset,[i]:o,[i+"2"]:o-n.chromTickSize/n.extent*(o?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 f;switch(n.orient){case"bottom":case"top":f={};break;case"left":f={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":f={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:f={}}const l=gw({...e,...f},t);if(e.chromTicks||e.chromLabels){const u={name:uR,data:{lazy:{type:"axisGenome",channel:Vr(n.orient)}},encoding:{[r]:{field:"continuousStart",type:t,band:0}},layer:[]};if(e.chromTicks&&u.layer.push(a()),e.chromLabels){u.layer.push(s());let c;l.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(d=>d.name=="labels").forEach(d=>{c=d.mark})),c&&(n.orient=="top"||n.orient=="bottom"?(c.viewportEdgeFadeWidthLeft=30,c.viewportEdgeFadeDistanceLeft=40):(c.viewportEdgeFadeWidthBottom=30,c.viewportEdgeFadeDistanceBottom=40))}l.layer.push(u)}return l}class gR extends Zs{constructor(t,n,r,i,o,a){const f={...n=="locus"?mR:mw,...t};super(vR(f,n),r,i,o,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...a}),this.axisProps=f}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const mw={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},mR={...mw,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function bR(e,t){const n=e,r=Vr(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 yR(e,t){const n=e,r=Vr(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 wR(e,t){const n=e,r=Vr(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 vR(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(wR(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(yR(n,t)),n.grid&&n.gridOpacity>0&&r.push(bR(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Vr(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const bw={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"},xR={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},AR={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},ER={start:0,middle:.5,end:1},_R={start:"left",middle:"center",end:"right"};function SR(e){if(!e)return;const t=Pe(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":xR,overlay:AR}[t.style]??{},r={...bw,...n,...t};let i={},o={x:0,y:0};const a=ER[r.anchor??"middle"];switch(r.orient){case"top":o={x:a,y:1},i={baseline:"alphabetic",angle:0};break;case"right":o={x:1,y:1-a},i={baseline:"alphabetic",angle:90};break;case"bottom":o={x:a,y:0},i={baseline:"top",angle:0};break;case"left":o={x:0,y:a},i={baseline:"alphabetic",angle:-90};break}const s={...bw,...i,...n,...t},f={xOffset:0,yOffset:0};switch(r.orient){case"top":f.yOffset=-s.offset;break;case"right":f.xOffset=s.offset;break;case"bottom":f.yOffset=s.offset;break;case"left":f.xOffset=-s.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...o,...f,text:s.text,align:s.align??_R[s.anchor],angle:s.angle,baseline:s.baseline,dx:s.dx,dy:s.dy,color:s.color,font:s.font,size:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight}}}function CR(e,t,n,r){if(e.type=="wheel"){e.uiEvent.preventDefault();const i=e.uiEvent,o=i.deltaMode?120:1;let{x:a,y:s}=e.point;if(r){const f=r.mark.encoders;f.x&&!f.x2&&!f.x.constantValue&&(a=+f.x(r.datum)*t.width+t.x),f.y&&!f.y2&&!f.y.constantValue&&(s=(1-+f.y(r.datum))*t.height+t.y)}Math.abs(i.deltaX)<Math.abs(i.deltaY)?n({x:a,y:s,xDelta:0,yDelta:0,zDelta:i.deltaY*o/300}):n({x:a,y:s,xDelta:-i.deltaX*o,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){const i=e.uiEvent;i.preventDefault();let o=i;const a=f=>{n({x:o.clientX,y:o.clientY,xDelta:f.clientX-o.clientX,yDelta:f.clientY-o.clientY,zDelta:0}),o=f},s=f=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s)};document.addEventListener("mouseup",s,!1),document.addEventListener("mousemove",a,!1)}}class kR extends Vi{constructor(n,r,i,o,a,s,f){super(n,r,i,o,a,f);se(this,br);se(this,Rc);se(this,go);se(this,Wl);se(this,Yl);se(this,Ql);se(this,Fc);se(this,Ra);se(this,Mc);se(this,Ta,1/0);se(this,Ba,10);se(this,Jt,[]);se(this,po,{});se(this,Da,0);this.spec=n,Ct(this,Ba,n.spacing??10),Ct(this,Ta,s),Ct(this,Jt,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),$(this,Jt).push(new ww(n,this,$(this,Da))),$E(this,Da)._++}setChildren(n){Ct(this,Jt,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=$(this,Jt).findIndex(o=>o.view==n);if(i>=0)$(this,Jt)[i]=new ww(r,this,$(this,Da));else throw new Error("Not my child view!")}get children(){return $(this,Jt).map(n=>n.view)}get childCount(){return $(this,Jt).length}async createAxes(){const n=[];for(const r of Mo){const i=this.resolutions.axis[r];if(i){const o=i.getAxisProps();if(o){const a={title:i.getTitle(),orient:Iu[r][0],...o},s=new dw(a,i.scaleResolution.type,this.context,this,this);n.push(s.initializeChildren()),$(this,po)[r]=s}}}return Promise.all([...n,...$(this,Jt).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of $(this,Jt))yield*n.getChildren();for(const n of Object.values($(this,po)))yield n}getOverhang(){return te(this,Fc,t_).call(this).union(te(this,Ra,zc).call(this))}getSize(){return this._cache("size",()=>new Hr(te(this,Yl,Ng).call(this,"column"),te(this,Yl,Ng).call(this,"row")).addPadding(te(this,Ra,zc).call(this)))}render(n,r,i={}){if(!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(te(this,Ra,zc).call(this)),n.pushView(this,r);const o={devicePixelRatio:this.context.devicePixelRatio},a=_y(te(this,Wl,Lg).call(this,"column"),r.width,o),s=_y(te(this,Wl,Lg).call(this,"row"),r.height,o),f=new hw($(this,br,wo).length,$(this,Ta)??1/0),l=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,c]of $(this,br,wo).entries()){const{view:h,axes:d,gridLines:p,background:b,backgroundStroke:y,title:w}=c,[_,C]=f.getCellCoords(u),S=a[te(this,Ql,Og).call(this,"column",_)],T=s[te(this,Ql,Og).call(this,"row",C)],B=h.getViewportSize(),I=h.getSize(),F=h.getOverhang(),P=S.location-F.left,j=T.location-F.top,O=(Oe,L)=>(Oe[L].grow?(L=="width"?S:T).size:Oe[L].px)+F[L],re=O(B,"width"),ae=O(B,"height"),pe=O(I,"width"),Te=O(I,"height"),Xe=c.scrollbars.horizontal,De=c.scrollbars.vertical,$e=Xe?()=>l(Xe.viewportOffset):()=>0,Ze=De?()=>l(De.viewportOffset):()=>0,Ke=new ar(()=>r.x+P,()=>r.y+j,()=>re,()=>ae),Ee=h.isScrollable(),_e=Ee?new ar(()=>r.x+P-$e(),()=>r.y+j-Ze(),()=>pe,()=>Te):Ke;c.coords=Ke;const dt=i.clipRect?Ke.intersect(i.clipRect):Ke;b==null||b.render(n,dt,{...i,clipRect:void 0});for(const Oe of Object.values(p))Oe.render(n,Ke,i);const qt=DR(h)||Ee;qt&&h.render(n,_e,{...i,clipRect:dt}),y==null||y.render(n,dt,{...i,clipRect:void 0});for(const[Oe,L]of Object.entries(d)){const M=Oe=="left"||Oe=="right"?"vertical":"horizontal",q=c.scrollbars[M],H=q?Ke.modify(M=="vertical"?{y:()=>_e.y,height:Te}:{x:()=>_e.x,width:pe}):Ke,W=yw(H,Oe,L);let E=i.clipRect;q&&(E=W.intersect(E).intersect(q?Ke.modify(M=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),L.render(n,W,{...i,clipRect:E})}for(const Oe of Object.values($(this,po))){const M=Oe.axisProps.orient;(M=="left"&&_==0||M=="right"&&_==f.nCols-1||M=="top"&&C==0||M=="bottom"&&C==f.nRows-1)&&Oe.render(n,yw(Ke.shrink(c.view.getOverhang()),M,Oe),i)}qt||h.render(n,_e,i);for(const Oe of Object.values(c.scrollbars))Oe.updateScrollbar(Ke,_e),Oe.render(n,r,i);w==null||w.render(n,Ke,i)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=$(this,br,wo).find(o=>o.coords.containsPoint(n.point.x,n.point.y));for(const o of Object.values((r==null?void 0:r.scrollbars)??{}))if(o.coords.containsPoint(n.point.x,n.point.y)&&(o.propagateInteractionEvent(n),n.stopped))return;const i=r==null?void 0:r.view;i&&(i.propagateInteractionEvent(n),(i instanceof Qt||i instanceof Zs)&&CR(n,r.coords,o=>te(this,Mc,n_).call(this,r.coords,r.view,o),this.context.getCurrentHover())),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}Ta=new WeakMap,Ba=new WeakMap,Jt=new WeakMap,po=new WeakMap,Da=new WeakMap,br=new WeakSet,wo=function(){return $(this,Jt).filter(n=>n.view.isConfiguredVisible())},Rc=new WeakSet,e_=function(){return new hw($(this,br,wo).length,$(this,Ta)??1/0)},go=new WeakSet,Jl=function(n){const r=n=="column"?"width":"height",i=(o,a)=>o.map(s=>{const l=$(this,br,wo)[s].getOverhangAndPadding();return n=="column"?a?l.right:l.left:a?l.bottom:l.top}).reduce((s,f)=>Math.max(s,f),0);return this._cache(`size/directionSizes/${n}`,()=>$(this,Rc,e_)[n=="column"?"colIndices":"rowIndices"].map(o=>({axisBefore:i(o,0),axisAfter:i(o,1),view:NB(o.map(a=>$(this,br,wo)[a].view.getViewportSize()[r]))})))},Wl=new WeakSet,Lg=function(n){const r=te(this,go,Jl).call(this,n),i=[];i.push(Us);for(const[o,a]of r.entries())o>0&&i.push({px:$(this,Ba),grow:0}),(o==0||this.wrappingFacet)&&i.push(Us),i.push({px:a.axisBefore,grow:0}),i.push(a.view),i.push({px:a.axisAfter,grow:0}),(o==r.length-1||this.wrappingFacet)&&i.push(Us);return i},Yl=new WeakSet,Ng=function(n){let r=0,i=0;const o=n=="row"?this.spec.height:this.spec.width;if(o||o===0)return Cy(o);const a=te(this,go,Jl).call(this,n);for(const[s,f]of a.entries())s>0&&(i+=$(this,Ba)),(s==0||this.wrappingFacet)&&(i+=0),i+=f.axisBefore,i+=f.view.px??0,r+=f.view.grow??0,i+=f.axisAfter,(s==a.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},Ql=new WeakSet,Og=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},Fc=new WeakSet,t_=function(){const n=te(this,go,Jl).call(this,"column"),r=te(this,go,Jl).call(this,"row");return!n.length||!r.length?Et.zero():new Et(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},Ra=new WeakSet,zc=function(){const n=r=>{const i=h0[r],o=$(this,po)[i];return(o==null?void 0:o.axisProps.orient)!==r?0:Math.max(o.getPerpendicularSize()+o.axisProps.offset,0)};return new Et(n("top"),n("right"),n("bottom"),n("left"))},Mc=new WeakSet,n_=function(n,r,i){for(const[o,a]of Object.entries(BR(r))){if(a.size<=0)continue;const s=n.normalizePoint(i.x,i.y),f=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:f.x-s.x,y:f.y-s.y};for(const u of a)u.zoom(2**i.zDelta,o=="y"?1-s[o]:s[o],o=="x"?l.x:-l.y)}this.context.animator.requestRender()};function IR(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 TR(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 BR(e){const t={x:new Set,y:new Set};return e.visit(n=>{for(const[r,i]of Object.entries(t)){const o=n.getScaleResolution(r);o&&o.isZoomable()&&i.add(o)}}),t}function DR(e){let t=!0;return e.visit(n=>{n instanceof Qt&&t&&(t=n.mark.properties.clip===!0)}),t}function yw(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 ww{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=ar.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,o="view"in i?i==null?void 0:i.view:void 0,a=IR(o);a&&(this.background=new Qt(a,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const s=TR(o);s&&(this.backgroundStroke=new Qt(s,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const f=SR(t.spec.title);if(f){const l=new Qt(f,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=l}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new vw(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new vw(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,f)=>{const l=s.getAxisProps();if(l===null)return;const u=l?{...l}:{};if(!u.orient){for(const c of Iu[f])if(!n[c]){u.orient=c;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()),!Iu[f].includes(u.orient))throw new Error(`Invalid axis orientation "${u.orient}" on channel "${f}"!`);return u},o=async(s,f,l)=>{const u=i(s,f);if(u){if(n[u.orient])throw new Error(`An axis with the orient "${u.orient}" already exists!`);const c=new dw(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[u.orient]=c,await c.initializeChildren()}},a=async(s,f,l)=>{const u=i(s,f);if(u&&(u.grid||u.chromGrid)){const c=new gR(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[u.orient]=c,await c.initializeChildren()}};for(const s of["x","y"])if(t.needsAxes[s]){const f=t.resolutions.axis[s];if(!f)continue;await o(f,s,t)}for(const s of["x","y"])if(t.needsAxes[s]){const f=t.getAxisResolution(s);if(!f)continue;await a(f,s,t)}if(t instanceof Zs){for(const s of t)for(const[f,l]of Object.entries(s.resolutions.axis)){const u=l.getAxisProps();u&&u.orient&&await o(l,f,s)}for(const s of t)for(const[f,l]of Object.entries(s.resolutions.axis)){const u=l.getAxisProps();u&&!u.orient&&await o(l,f,s)}}[...Object.values(n),...Object.values(r)].forEach(s=>s.visit(f=>{f instanceof Qt&&f.resolve("scale")}))}getOverhang(){const t=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+r.axisProps.offset,0):0};return new Et(t("top"),t("right"),t("bottom"),t("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}class vw extends Qt{constructor(t,n){const r={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},t.layoutParent.context,t.layoutParent,t.view,"scrollbar-"+n,{blockEncodingInheritance:!0}),this.config=r,this.scrollDirection=n,this.viewportOffset=0,this.maxScrollOffset=0,this.scrollbarCoords=ar.ZERO,this.addInteractionEventListener("mousedown",(i,o)=>{if(o.stopPropagation(),this.maxScrollOffset<=0)return;const a=h=>n=="vertical"?h.clientY:h.clientX,s=o.uiEvent;s.preventDefault();const f=this.getScrollOffset(),l=a(s),u=h=>{const d=gs(a(h)-l+f,0,this.maxScrollOffset);this.viewportOffset=d/this.maxScrollOffset*this.maxViewportOffset,this.context.animator.requestRender()},c=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",c)};document.addEventListener("mouseup",c,!1),document.addEventListener("mousemove",u,!1)})}getScrollOffset(){return this.viewportOffset/this.maxViewportOffset*this.maxScrollOffset}render(t,n,r){super.render(t,this.scrollbarCoords,r)}updateScrollbar(t,n){const r=this.config.scrollbarPadding,i=this.config.scrollbarSize,o=this.scrollDirection=="horizontal"?"width":"height",a=Math.min(1,t[o]/n[o]),s=t[o]-2*r,f=a*s;this.maxScrollOffset=s-f,this.maxViewportOffset=n[o]-t[o],this.viewportOffset=gs(this.viewportOffset,0,this.maxViewportOffset),this.scrollbarCoords=this.scrollDirection=="vertical"?new ar(()=>t.x+t.width-i-r,()=>t.y+r+this.getScrollOffset(),()=>i,()=>f):new ar(()=>t.x+r+this.getScrollOffset(),()=>t.y+t.height-i-r,()=>f,()=>i)}}class p0 extends kR{constructor(t,n,r,i,o){super(t,n,r,i,o,b0(t)?t.columns:Tu(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=b0(t)?t.concat:Tu(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":Tu(this.spec)&&t==="x"||Aw(this.spec)&&t==="y"?"shared":"independent"}}const xw="viewRoot";class RR{constructor(t={}){se(this,Fa,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,o,a,s,f)=>new r(i,o,a,s,i.name??f);this.addViewType(m0,n(Zs)),this.addViewType(g0,n(Qt)),this.addViewType(Tu,n(p0)),this.addViewType(Aw,n(p0)),this.addViewType(b0,n(p0)),this.addViewType(MR,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){$(this,Fa).set(t,n)}createView(t,n,r,i,o){for(const[a,s]of $(this,Fa))if(a(t))return s(t,n,r,i,o);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(t)]))}isViewSpec(t){const n=[...$(this,Fa).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,o,a){let s;if(FR(t))if(this.options.allowImport)s=await U9(t,i.getBaseUrl(),n),a&&a(s);else throw new Hi("Importing views is not allowed!",r);else s=t;!i&&this.options.wrapRoot&&(g0(s)||m0(s))&&o===xw&&(s={name:"implicitRoot",vconcat:[s]});const f=this.createView(s,n,r,i,o);return f instanceof Vi&&await f.initializeChildren(),f}}Fa=new WeakMap;function g0(e){return"mark"in e&&(Pe(e.mark)||Mt(e.mark))}function m0(e){return"layer"in e&&Mt(e.layer)}function FR(e){return"import"in e}function Tu(e){return"vconcat"in e&&Ft(e.vconcat)}function Aw(e){return"hconcat"in e&&Ft(e.hconcat)}function b0(e){return"concat"in e&&Ft(e.concat)}function MR(e){return"samples"in e&&Mt(e.samples)&&"spec"in e&&Mt(e.spec)}class PR{constructor(){se(this,Ma,void 0);se(this,mo,void 0);se(this,Xl,void 0);se(this,bo,void 0);Ct(this,Ma,new Map),Ct(this,mo,new Set),Ct(this,bo,new Map),Ct(this,Xl,new Proxy($(this,Ma),{get(t,n){return Pe(n)?t.get(n):void 0}}))}allocateSetter(t){if($(this,mo).has(t))throw new Error("Setter already allocated for parameter: "+t);return $(this,mo).add(t),n=>{$(this,Ma).set(t,n);const r=$(this,bo).get(t);if(r)for(const i of r)i()}}createExpression(t){const n=Ff(t,$(this,Xl));for(const r of n.globals)if(!$(this,mo).has(r))throw new Error(`Unknown variable "${r}" in expression: ${t}`);return n.addListener=r=>{for(const i of n.globals){const o=$(this,bo).get(i)??new Set;$(this,bo).set(i,o),o.add(r)}},n}}Ma=new WeakMap,mo=new WeakMap,Xl=new WeakMap,bo=new WeakMap,Ym("fasta",eR);class Ew{constructor(t,n,r={}){this.container=t;const i=document.createElement("style");i.innerHTML=eC,t.appendChild(i),this.spec=n,this.accessorFactory=new V8,this.viewFactory=new RR,this.namedDataProviders=[],this.animator=new W9(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=o=>o.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new tR(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:fR,refseqgene:rR,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._paramBroker=new PR}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),s0(r.hosts),this.animator.requestRender()}broadcast(t,n){var i;const r={type:t,payload:n};this.viewRoot.visit(o=>o.handleBroadcast(r)),(i=this._extraBroadcastListeners.get(t))==null||i.forEach(o=>o(r))}_prepareContainer(){this.container.classList.add("genome-spy"),this.container.classList.add("loading"),this._glHelper=new iB(this.container,()=>this.viewRoot?G9(this.viewRoot):{width:void 0,height:void 0},this.spec.background),this.loadingMessageElement=document.createElement("div"),this.loadingMessageElement.className="loading-message",this.loadingMessageElement.innerHTML='<div class="message">Loading<span class="ellipsis">...</span></div>',this.container.appendChild(this.loadingMessageElement),this.tooltip=new nC(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})}destroy(){this.container.classList.remove("genome-spy"),this.container.classList.remove("loading");for(const[t,n]of this._keyboardListeners)for(const r of n)document.removeEventListener(t,r);for(this._glHelper.finalize();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new Y9(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new iw,accessorFactory:this.accessorFactory,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new $9(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},paramBroker:this._paramBroker,requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,addKeyboardListener:(f,l)=>{document.addEventListener(f,l);let u=this._keyboardListeners.get(f);u||(u=[],this._keyboardListeners.set(f,u)),u.push(l)},addBroadcastListener(f,l){const u=t._extraBroadcastListeners;let c=u.get(f);c||(c=new Set,u.set(f,c)),c.add(l)},removeBroadcastListener(f,l){var c;(c=t._extraBroadcastListeners.get(f))==null||c.delete(l)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:f=>t.viewFactory.isViewSpec(f),createView:function(f,l,u,c){return t.viewFactory.createView(f,n,l,u,c)},createOrImportView:async function(f,l,u,c,h){return t.viewFactory.createOrImportView(f,n,l,u,c,h)}},r=this.spec;r.datasets&&this.registerNamedDataProvider(f=>r.datasets[f]),this.viewRoot=await n.createOrImportView(r,null,null,xw),O9(this.viewRoot),z9(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(f=>f.configureViewOpacity()),this._glHelper.invalidateSize();const o=i.filter(f=>f instanceof Qt),a=R9(this.viewRoot,n.dataFlow);N9(a),this.broadcast("dataFlowBuilt",a),o.forEach(f=>f.mark.initializeEncoders());const s=Promise.all(o.map(f=>f.mark.initializeGraphics()));for(const f of o)a.addObserver(l=>{f.mark.initializeData(),f.mark.updateGraphicsData()},f);await n.fontManager.waitUntilReady(),a.initialize(),await Promise.all(a.dataSources.map(f=>f.load())),s0(this.viewRoot),this.broadcast("dataLoaded"),await s,this.viewRoot.visit(f=>{for(const l of Object.values(f.resolutions.scale))this._glHelper.createRangeTexture(l)});for(const f of o)f.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(f=>xu(f,"size")),this._glHelper.invalidateSize()}async launch(){try{return this._prepareContainer(),await this._prepareViewsAndData(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),this._glHelper.addEventListener("resize",()=>{this.computeLayout(),this.renderAll()}),!0}catch(t){const n=`${t.view?`At "${t.view.getPathString()}": `:""}${t.toString()}`;return console.error(t.stack),LR(this.container,n),!1}finally{this.container.classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const t=this._glHelper.canvas,n=r=>{var i;if(r instanceof MouseEvent){r.type=="mousemove"&&(this.tooltip.handleMouseMove(r),this._tooltipUpdateRequested=!1,r.buttons==0&&this.renderPickingFramebuffer());const o=t.getBoundingClientRect(),a=new j9(r.clientX-o.left-t.clientLeft,r.clientY-o.top-t.clientTop),s=f=>{this.viewRoot.propagateInteractionEvent(new V9(a,f)),this._tooltipUpdateRequested||this.tooltip.clear()};if(r.type!="wheel"&&this._wheelInertia.cancel(),r.type=="mousemove")this._handlePicking(a.x,a.y);else if(r.type=="mousedown"||r.type=="mouseup")this.renderPickingFramebuffer();else if(r.type=="wheel"){this._tooltipUpdateRequested=!1;const f=r;if(Math.abs(f.deltaX)>Math.abs(f.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const l=nR(f);this._wheelInertia.setMomentum(f.deltaY*(f.deltaMode?80:1),u=>{const c=new WheelEvent("wheel",{...l,deltaMode:0,deltaX:0,deltaY:u});s(c)}),f.preventDefault();return}}if(r.type=="click"){const f=this._currentHover?{type:r.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(l=>l.name).reverse(),datum:this._currentHover.datum}:{type:r.type,viewPath:null,datum:null};(i=this._eventListeners.get("click"))==null||i.forEach(l=>l(f))}s(r)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(r=>t.addEventListener(r,n)),t.addEventListener("mousedown",()=>{document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),t.addEventListener("dragstart",r=>r.stopPropagation())}_handlePicking(t,n){var o;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!==((o=this._currentHover)==null?void 0:o.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(a=>{if(a instanceof Qt){if(a.mark.isPickingParticipant()){const s=a.mark.encoders.uniqueId.accessor;a.getCollector().visitData(f=>{s(f)==i&&(this._currentHover={mark:a.mark,datum:f,uniqueId:i})})}if(this._currentHover)return Gs}}),this._currentHover){const a=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async s=>{if(!a.isPickingParticipant())return;const f=a.properties.tooltip;if(f!==null){const l=(f==null?void 0:f.handler)??"default",u=this.tooltipHandlers[l];if(!u)throw new Error("No such tooltip handler: "+l);return u(s,a,f==null?void 0:f.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 lw({picking:!1},this._glHelper),this._pickingContext=new lw({picking:!0},this._glHelper),t.render(new H9(this._renderingContext,this._pickingContext),ar.create(0,0,n.width,n.height)),this.broadcast("layoutComputed")}renderAll(){var t;(t=this._renderingContext)==null||t.render(),this._dirtyPickingBuffer=!0}renderPickingFramebuffer(){this._dirtyPickingBuffer&&(this._pickingContext.render(),this._dirtyPickingBuffer=!1)}getSearchableViews(){const t=[];return this.viewRoot.visit(n=>{n instanceof Qt&&n.getAccessor("search")&&t.push(n)}),t}getNamedScaleResolutions(){const t=new Map;return this.viewRoot.visit(n=>{for(const r of Object.values(n.resolutions.scale))r.name&&t.set(r.name,r)}),t}}function LR(e,t){const n=document.createElement("div");n.className="message-box";const r=document.createElement("div");r.textContent=t,n.appendChild(r),e.appendChild(n)}const NR="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",OR="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";async function zR(e,t,n={}){let r;if(Pe(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 o=Mt(t)?t:await _w(t);if(o.baseUrl??(o.baseUrl=""),o.width??(o.width="container"),o.padding??(o.padding=10),r==document.body){const a=document.createElement("div");a.style.position="fixed",a.style.inset="0",a.style.overflow="hidden",r.appendChild(a),r=a}i=new Ew(r,o,n),UR(i,n),await i.launch()}catch(o){r.innerText=o.toString(),console.error(o)}return{finalize(){for(i.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(o,a){const s=i._eventListeners;let f=s.get(o);f||(f=new Set,s.set(o,f)),f.add(a)},removeEventListener(o,a){var f;(f=i._eventListeners.get(o))==null||f.delete(a)},getScaleResolutionByName(o){return i.getNamedScaleResolutions().get(o)},updateNamedData:i.updateNamedData.bind(i)}}function UR(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function _w(e){let t;try{t=JSON.parse(await Ef().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 Bu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function Ws(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function GR(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 ye={},Du={};Du.byteLength=jR,Du.toByteArray=ZR,Du.fromByteArray=QR;for(var Un=[],nn=[],HR=typeof Uint8Array<"u"?Uint8Array:Array,y0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wo=0,VR=y0.length;Wo<VR;++Wo)Un[Wo]=y0[Wo],nn[y0.charCodeAt(Wo)]=Wo;nn["-".charCodeAt(0)]=62,nn["_".charCodeAt(0)]=63;function Sw(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 jR(e){var t=Sw(e),n=t[0],r=t[1];return(n+r)*3/4-r}function qR(e,t,n){return(t+n)*3/4-n}function ZR(e){var t,n=Sw(e),r=n[0],i=n[1],o=new HR(qR(e,r,i)),a=0,s=i>0?r-4:r,f;for(f=0;f<s;f+=4)t=nn[e.charCodeAt(f)]<<18|nn[e.charCodeAt(f+1)]<<12|nn[e.charCodeAt(f+2)]<<6|nn[e.charCodeAt(f+3)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=t&255;return i===2&&(t=nn[e.charCodeAt(f)]<<2|nn[e.charCodeAt(f+1)]>>4,o[a++]=t&255),i===1&&(t=nn[e.charCodeAt(f)]<<10|nn[e.charCodeAt(f+1)]<<4|nn[e.charCodeAt(f+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function WR(e){return Un[e>>18&63]+Un[e>>12&63]+Un[e>>6&63]+Un[e&63]}function YR(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(WR(r));return i.join("")}function QR(e){for(var t,n=e.length,r=n%3,i=[],o=16383,a=0,s=n-r;a<s;a+=o)i.push(YR(e,a,a+o>s?s:a+o));return r===1?(t=e[n-1],i.push(Un[t>>2]+Un[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(Un[t>>10]+Un[t>>4&63]+Un[t<<2&63]+"=")),i.join("")}var w0={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */w0.read=function(e,t,n,r,i){var o,a,s=i*8-r-1,f=(1<<s)-1,l=f>>1,u=-7,c=n?i-1:0,h=n?-1:1,d=e[t+c];for(c+=h,o=d&(1<<-u)-1,d>>=-u,u+=s;u>0;o=o*256+e[t+c],c+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=a*256+e[t+c],c+=h,u-=8);if(o===0)o=1-l;else{if(o===f)return a?NaN:(d?-1:1)*(1/0);a=a+Math.pow(2,r),o=o-l}return(d?-1:1)*a*Math.pow(2,o-r)},w0.write=function(e,t,n,r,i,o){var a,s,f,l=o*8-i-1,u=(1<<l)-1,c=u>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),a+c>=1?t+=h/f:t+=h*Math.pow(2,1-c),t*f>=2&&(a++,f/=2),a+c>=u?(s=0,a=u):a+c>=1?(s=(t*f-1)*Math.pow(2,i),a=a+c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=s&255,d+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[n+d]=a&255,d+=p,a/=256,l-=8);e[n+d-p]|=b*128};/*!
|
|
279
272
|
* The buffer module from node.js, for the browser.
|
|
280
273
|
*
|
|
281
274
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
282
275
|
* @license MIT
|
|
283
|
-
*/(function(e){const t=Au,n=u0,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=S,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=o(),!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 o(){try{const v=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(v,g),v.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 a(v){if(v>i)throw new RangeError('The value "'+v+'" is invalid for option "size"');const g=new Uint8Array(v);return Object.setPrototypeOf(g,s.prototype),g}function s(v,g,m){if(typeof v=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(v)}return f(v,g,m)}s.poolSize=8192;function f(v,g,m){if(typeof v=="string")return h(v,g);if(ArrayBuffer.isView(v))return p(v);if(v==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v);if(_t(v,ArrayBuffer)||v&&_t(v.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(_t(v,SharedArrayBuffer)||v&&_t(v.buffer,SharedArrayBuffer)))return b(v,g,m);if(typeof v=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const I=v.valueOf&&v.valueOf();if(I!=null&&I!==v)return s.from(I,g,m);const F=y(v);if(F)return F;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof v[Symbol.toPrimitive]=="function")return s.from(v[Symbol.toPrimitive]("string"),g,m);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v)}s.from=function(v,g,m){return f(v,g,m)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(v){if(typeof v!="number")throw new TypeError('"size" argument must be of type number');if(v<0)throw new RangeError('The value "'+v+'" is invalid for option "size"')}function u(v,g,m){return l(v),v<=0?a(v):g!==void 0?typeof m=="string"?a(v).fill(g,m):a(v).fill(g):a(v)}s.alloc=function(v,g,m){return u(v,g,m)};function c(v){return l(v),a(v<0?0:w(v)|0)}s.allocUnsafe=function(v){return c(v)},s.allocUnsafeSlow=function(v){return c(v)};function h(v,g){if((typeof g!="string"||g==="")&&(g="utf8"),!s.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const m=C(v,g)|0;let I=a(m);const F=I.write(v,g);return F!==m&&(I=I.slice(0,F)),I}function d(v){const g=v.length<0?0:w(v.length)|0,m=a(g);for(let I=0;I<g;I+=1)m[I]=v[I]&255;return m}function p(v){if(_t(v,Uint8Array)){const g=new Uint8Array(v);return b(g.buffer,g.byteOffset,g.byteLength)}return d(v)}function b(v,g,m){if(g<0||v.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(v.byteLength<g+(m||0))throw new RangeError('"length" is outside of buffer bounds');let I;return g===void 0&&m===void 0?I=new Uint8Array(v):m===void 0?I=new Uint8Array(v,g):I=new Uint8Array(v,g,m),Object.setPrototypeOf(I,s.prototype),I}function y(v){if(s.isBuffer(v)){const g=w(v.length)|0,m=a(g);return m.length===0||v.copy(m,0,0,g),m}if(v.length!==void 0)return typeof v.length!="number"||wr(v.length)?a(0):d(v);if(v.type==="Buffer"&&Array.isArray(v.data))return d(v.data)}function w(v){if(v>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return v|0}function S(v){return+v!=v&&(v=0),s.alloc(+v)}s.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==s.prototype},s.compare=function(g,m){if(_t(g,Uint8Array)&&(g=s.from(g,g.offset,g.byteLength)),_t(m,Uint8Array)&&(m=s.from(m,m.offset,m.byteLength)),!s.isBuffer(g)||!s.isBuffer(m))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===m)return 0;let I=g.length,F=m.length;for(let N=0,V=Math.min(I,F);N<V;++N)if(g[N]!==m[N]){I=g[N],F=m[N];break}return I<F?-1:F<I?1:0},s.isEncoding=function(g){switch(String(g).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(g,m){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return s.alloc(0);let I;if(m===void 0)for(m=0,I=0;I<g.length;++I)m+=g[I].length;const F=s.allocUnsafe(m);let N=0;for(I=0;I<g.length;++I){let V=g[I];if(_t(V,Uint8Array))N+V.length>F.length?(s.isBuffer(V)||(V=s.from(V)),V.copy(F,N)):Uint8Array.prototype.set.call(F,V,N);else if(s.isBuffer(V))V.copy(F,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=V.length}return F};function C(v,g){if(s.isBuffer(v))return v.length;if(ArrayBuffer.isView(v)||_t(v,ArrayBuffer))return v.byteLength;if(typeof v!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof v);const m=v.length,I=arguments.length>2&&arguments[2]===!0;if(!I&&m===0)return 0;let F=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return m;case"utf8":case"utf-8":return le(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m*2;case"hex":return m>>>1;case"base64":return li(v).length;default:if(F)return I?-1:le(v).length;g=(""+g).toLowerCase(),F=!0}}s.byteLength=C;function _(v,g,m){let I=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((m===void 0||m>this.length)&&(m=this.length),m<=0)||(m>>>=0,g>>>=0,m<=g))return"";for(v||(v="utf8");;)switch(v){case"hex":return qe(this,g,m);case"utf8":case"utf-8":return pe(this,g,m);case"ascii":return De(this,g,m);case"latin1":case"binary":return $e(this,g,m);case"base64":return ae(this,g,m);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ke(this,g,m);default:if(I)throw new TypeError("Unknown encoding: "+v);v=(v+"").toLowerCase(),I=!0}}s.prototype._isBuffer=!0;function k(v,g,m){const I=v[g];v[g]=v[m],v[m]=I}s.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let m=0;m<g;m+=2)k(this,m,m+1);return this},s.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let m=0;m<g;m+=4)k(this,m,m+3),k(this,m+1,m+2);return this},s.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let m=0;m<g;m+=8)k(this,m,m+7),k(this,m+1,m+6),k(this,m+2,m+5),k(this,m+3,m+4);return this},s.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?pe(this,0,g):_.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(g){if(!s.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:s.compare(this,g)===0},s.prototype.inspect=function(){let g="";const m=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,m).replace(/(.{2})/g,"$1 ").trim(),this.length>m&&(g+=" ... "),"<Buffer "+g+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(g,m,I,F,N){if(_t(g,Uint8Array)&&(g=s.from(g,g.offset,g.byteLength)),!s.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(m===void 0&&(m=0),I===void 0&&(I=g?g.length:0),F===void 0&&(F=0),N===void 0&&(N=this.length),m<0||I>g.length||F<0||N>this.length)throw new RangeError("out of range index");if(F>=N&&m>=I)return 0;if(F>=N)return-1;if(m>=I)return 1;if(m>>>=0,I>>>=0,F>>>=0,N>>>=0,this===g)return 0;let V=N-F,fe=I-m;const Ue=Math.min(V,fe),Pe=this.slice(F,N),Ze=g.slice(m,I);for(let Se=0;Se<Ue;++Se)if(Pe[Se]!==Ze[Se]){V=Pe[Se],fe=Ze[Se];break}return V<fe?-1:fe<V?1:0};function B(v,g,m,I,F){if(v.length===0)return-1;if(typeof m=="string"?(I=m,m=0):m>2147483647?m=2147483647:m<-2147483648&&(m=-2147483648),m=+m,wr(m)&&(m=F?0:v.length-1),m<0&&(m=v.length+m),m>=v.length){if(F)return-1;m=v.length-1}else if(m<0)if(F)m=0;else return-1;if(typeof g=="string"&&(g=s.from(g,I)),s.isBuffer(g))return g.length===0?-1:T(v,g,m,I,F);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?F?Uint8Array.prototype.indexOf.call(v,g,m):Uint8Array.prototype.lastIndexOf.call(v,g,m):T(v,[g],m,I,F);throw new TypeError("val must be string, number or Buffer")}function T(v,g,m,I,F){let N=1,V=v.length,fe=g.length;if(I!==void 0&&(I=String(I).toLowerCase(),I==="ucs2"||I==="ucs-2"||I==="utf16le"||I==="utf-16le")){if(v.length<2||g.length<2)return-1;N=2,V/=2,fe/=2,m/=2}function Ue(Ze,Se){return N===1?Ze[Se]:Ze.readUInt16BE(Se*N)}let Pe;if(F){let Ze=-1;for(Pe=m;Pe<V;Pe++)if(Ue(v,Pe)===Ue(g,Ze===-1?0:Pe-Ze)){if(Ze===-1&&(Ze=Pe),Pe-Ze+1===fe)return Ze*N}else Ze!==-1&&(Pe-=Pe-Ze),Ze=-1}else for(m+fe>V&&(m=V-fe),Pe=m;Pe>=0;Pe--){let Ze=!0;for(let Se=0;Se<fe;Se++)if(Ue(v,Pe+Se)!==Ue(g,Se)){Ze=!1;break}if(Ze)return Pe}return-1}s.prototype.includes=function(g,m,I){return this.indexOf(g,m,I)!==-1},s.prototype.indexOf=function(g,m,I){return B(this,g,m,I,!0)},s.prototype.lastIndexOf=function(g,m,I){return B(this,g,m,I,!1)};function R(v,g,m,I){m=Number(m)||0;const F=v.length-m;I?(I=Number(I),I>F&&(I=F)):I=F;const N=g.length;I>N/2&&(I=N/2);let V;for(V=0;V<I;++V){const fe=parseInt(g.substr(V*2,2),16);if(wr(fe))return V;v[m+V]=fe}return V}function M(v,g,m,I){return fi(le(g,v.length-m),v,m,I)}function j(v,g,m,I){return fi(Vt(g),v,m,I)}function O(v,g,m,I){return fi(li(g),v,m,I)}function ne(v,g,m,I){return fi(si(g,v.length-m),v,m,I)}s.prototype.write=function(g,m,I,F){if(m===void 0)F="utf8",I=this.length,m=0;else if(I===void 0&&typeof m=="string")F=m,I=this.length,m=0;else if(isFinite(m))m=m>>>0,isFinite(I)?(I=I>>>0,F===void 0&&(F="utf8")):(F=I,I=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const N=this.length-m;if((I===void 0||I>N)&&(I=N),g.length>0&&(I<0||m<0)||m>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");let V=!1;for(;;)switch(F){case"hex":return R(this,g,m,I);case"utf8":case"utf-8":return M(this,g,m,I);case"ascii":case"latin1":case"binary":return j(this,g,m,I);case"base64":return O(this,g,m,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,g,m,I);default:if(V)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),V=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ae(v,g,m){return g===0&&m===v.length?t.fromByteArray(v):t.fromByteArray(v.slice(g,m))}function pe(v,g,m){m=Math.min(v.length,m);const I=[];let F=g;for(;F<m;){const N=v[F];let V=null,fe=N>239?4:N>223?3:N>191?2:1;if(F+fe<=m){let Ue,Pe,Ze,Se;switch(fe){case 1:N<128&&(V=N);break;case 2:Ue=v[F+1],(Ue&192)===128&&(Se=(N&31)<<6|Ue&63,Se>127&&(V=Se));break;case 3:Ue=v[F+1],Pe=v[F+2],(Ue&192)===128&&(Pe&192)===128&&(Se=(N&15)<<12|(Ue&63)<<6|Pe&63,Se>2047&&(Se<55296||Se>57343)&&(V=Se));break;case 4:Ue=v[F+1],Pe=v[F+2],Ze=v[F+3],(Ue&192)===128&&(Pe&192)===128&&(Ze&192)===128&&(Se=(N&15)<<18|(Ue&63)<<12|(Pe&63)<<6|Ze&63,Se>65535&&Se<1114112&&(V=Se))}}V===null?(V=65533,fe=1):V>65535&&(V-=65536,I.push(V>>>10&1023|55296),V=56320|V&1023),I.push(V),F+=fe}return Xe(I)}const ke=4096;function Xe(v){const g=v.length;if(g<=ke)return String.fromCharCode.apply(String,v);let m="",I=0;for(;I<g;)m+=String.fromCharCode.apply(String,v.slice(I,I+=ke));return m}function De(v,g,m){let I="";m=Math.min(v.length,m);for(let F=g;F<m;++F)I+=String.fromCharCode(v[F]&127);return I}function $e(v,g,m){let I="";m=Math.min(v.length,m);for(let F=g;F<m;++F)I+=String.fromCharCode(v[F]);return I}function qe(v,g,m){const I=v.length;(!g||g<0)&&(g=0),(!m||m<0||m>I)&&(m=I);let F="";for(let N=g;N<m;++N)F+=ui[v[N]];return F}function Ke(v,g,m){const I=v.slice(g,m);let F="";for(let N=0;N<I.length-1;N+=2)F+=String.fromCharCode(I[N]+I[N+1]*256);return F}s.prototype.slice=function(g,m){const I=this.length;g=~~g,m=m===void 0?I:~~m,g<0?(g+=I,g<0&&(g=0)):g>I&&(g=I),m<0?(m+=I,m<0&&(m=0)):m>I&&(m=I),m<g&&(m=g);const F=this.subarray(g,m);return Object.setPrototypeOf(F,s.prototype),F};function Ee(v,g,m){if(v%1!==0||v<0)throw new RangeError("offset is not uint");if(v+g>m)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(g,m,I){g=g>>>0,m=m>>>0,I||Ee(g,m,this.length);let F=this[g],N=1,V=0;for(;++V<m&&(N*=256);)F+=this[g+V]*N;return F},s.prototype.readUintBE=s.prototype.readUIntBE=function(g,m,I){g=g>>>0,m=m>>>0,I||Ee(g,m,this.length);let F=this[g+--m],N=1;for(;m>0&&(N*=256);)F+=this[g+--m]*N;return F},s.prototype.readUint8=s.prototype.readUInt8=function(g,m){return g=g>>>0,m||Ee(g,1,this.length),this[g]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(g,m){return g=g>>>0,m||Ee(g,2,this.length),this[g]|this[g+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(g,m){return g=g>>>0,m||Ee(g,2,this.length),this[g]<<8|this[g+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},s.prototype.readBigUInt64LE=jt(function(g){g=g>>>0,G(g,"offset");const m=this[g],I=this[g+7];(m===void 0||I===void 0)&&Z(g,this.length-8);const F=m+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,N=this[++g]+this[++g]*2**8+this[++g]*2**16+I*2**24;return BigInt(F)+(BigInt(N)<<BigInt(32))}),s.prototype.readBigUInt64BE=jt(function(g){g=g>>>0,G(g,"offset");const m=this[g],I=this[g+7];(m===void 0||I===void 0)&&Z(g,this.length-8);const F=m*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],N=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+I;return(BigInt(F)<<BigInt(32))+BigInt(N)}),s.prototype.readIntLE=function(g,m,I){g=g>>>0,m=m>>>0,I||Ee(g,m,this.length);let F=this[g],N=1,V=0;for(;++V<m&&(N*=256);)F+=this[g+V]*N;return N*=128,F>=N&&(F-=Math.pow(2,8*m)),F},s.prototype.readIntBE=function(g,m,I){g=g>>>0,m=m>>>0,I||Ee(g,m,this.length);let F=m,N=1,V=this[g+--F];for(;F>0&&(N*=256);)V+=this[g+--F]*N;return N*=128,V>=N&&(V-=Math.pow(2,8*m)),V},s.prototype.readInt8=function(g,m){return g=g>>>0,m||Ee(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},s.prototype.readInt16LE=function(g,m){g=g>>>0,m||Ee(g,2,this.length);const I=this[g]|this[g+1]<<8;return I&32768?I|4294901760:I},s.prototype.readInt16BE=function(g,m){g=g>>>0,m||Ee(g,2,this.length);const I=this[g+1]|this[g]<<8;return I&32768?I|4294901760:I},s.prototype.readInt32LE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},s.prototype.readInt32BE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},s.prototype.readBigInt64LE=jt(function(g){g=g>>>0,G(g,"offset");const m=this[g],I=this[g+7];(m===void 0||I===void 0)&&Z(g,this.length-8);const F=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(I<<24);return(BigInt(F)<<BigInt(32))+BigInt(m+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),s.prototype.readBigInt64BE=jt(function(g){g=g>>>0,G(g,"offset");const m=this[g],I=this[g+7];(m===void 0||I===void 0)&&Z(g,this.length-8);const F=(m<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(F)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+I)}),s.prototype.readFloatLE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),n.read(this,g,!0,23,4)},s.prototype.readFloatBE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),n.read(this,g,!1,23,4)},s.prototype.readDoubleLE=function(g,m){return g=g>>>0,m||Ee(g,8,this.length),n.read(this,g,!0,52,8)},s.prototype.readDoubleBE=function(g,m){return g=g>>>0,m||Ee(g,8,this.length),n.read(this,g,!1,52,8)};function _e(v,g,m,I,F,N){if(!s.isBuffer(v))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>F||g<N)throw new RangeError('"value" argument is out of bounds');if(m+I>v.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(g,m,I,F){if(g=+g,m=m>>>0,I=I>>>0,!F){const fe=Math.pow(2,8*I)-1;_e(this,g,m,I,fe,0)}let N=1,V=0;for(this[m]=g&255;++V<I&&(N*=256);)this[m+V]=g/N&255;return m+I},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(g,m,I,F){if(g=+g,m=m>>>0,I=I>>>0,!F){const fe=Math.pow(2,8*I)-1;_e(this,g,m,I,fe,0)}let N=I-1,V=1;for(this[m+N]=g&255;--N>=0&&(V*=256);)this[m+N]=g/V&255;return m+I},s.prototype.writeUint8=s.prototype.writeUInt8=function(g,m,I){return g=+g,m=m>>>0,I||_e(this,g,m,1,255,0),this[m]=g&255,m+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(g,m,I){return g=+g,m=m>>>0,I||_e(this,g,m,2,65535,0),this[m]=g&255,this[m+1]=g>>>8,m+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(g,m,I){return g=+g,m=m>>>0,I||_e(this,g,m,2,65535,0),this[m]=g>>>8,this[m+1]=g&255,m+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(g,m,I){return g=+g,m=m>>>0,I||_e(this,g,m,4,4294967295,0),this[m+3]=g>>>24,this[m+2]=g>>>16,this[m+1]=g>>>8,this[m]=g&255,m+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(g,m,I){return g=+g,m=m>>>0,I||_e(this,g,m,4,4294967295,0),this[m]=g>>>24,this[m+1]=g>>>16,this[m+2]=g>>>8,this[m+3]=g&255,m+4};function dt(v,g,m,I,F){x(g,I,F,v,m,7);let N=Number(g&BigInt(4294967295));v[m++]=N,N=N>>8,v[m++]=N,N=N>>8,v[m++]=N,N=N>>8,v[m++]=N;let V=Number(g>>BigInt(32)&BigInt(4294967295));return v[m++]=V,V=V>>8,v[m++]=V,V=V>>8,v[m++]=V,V=V>>8,v[m++]=V,m}function Ht(v,g,m,I,F){x(g,I,F,v,m,7);let N=Number(g&BigInt(4294967295));v[m+7]=N,N=N>>8,v[m+6]=N,N=N>>8,v[m+5]=N,N=N>>8,v[m+4]=N;let V=Number(g>>BigInt(32)&BigInt(4294967295));return v[m+3]=V,V=V>>8,v[m+2]=V,V=V>>8,v[m+1]=V,V=V>>8,v[m]=V,m+8}s.prototype.writeBigUInt64LE=jt(function(g,m=0){return dt(this,g,m,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=jt(function(g,m=0){return Ht(this,g,m,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(g,m,I,F){if(g=+g,m=m>>>0,!F){const Ue=Math.pow(2,8*I-1);_e(this,g,m,I,Ue-1,-Ue)}let N=0,V=1,fe=0;for(this[m]=g&255;++N<I&&(V*=256);)g<0&&fe===0&&this[m+N-1]!==0&&(fe=1),this[m+N]=(g/V>>0)-fe&255;return m+I},s.prototype.writeIntBE=function(g,m,I,F){if(g=+g,m=m>>>0,!F){const Ue=Math.pow(2,8*I-1);_e(this,g,m,I,Ue-1,-Ue)}let N=I-1,V=1,fe=0;for(this[m+N]=g&255;--N>=0&&(V*=256);)g<0&&fe===0&&this[m+N+1]!==0&&(fe=1),this[m+N]=(g/V>>0)-fe&255;return m+I},s.prototype.writeInt8=function(g,m,I){return g=+g,m=m>>>0,I||_e(this,g,m,1,127,-128),g<0&&(g=255+g+1),this[m]=g&255,m+1},s.prototype.writeInt16LE=function(g,m,I){return g=+g,m=m>>>0,I||_e(this,g,m,2,32767,-32768),this[m]=g&255,this[m+1]=g>>>8,m+2},s.prototype.writeInt16BE=function(g,m,I){return g=+g,m=m>>>0,I||_e(this,g,m,2,32767,-32768),this[m]=g>>>8,this[m+1]=g&255,m+2},s.prototype.writeInt32LE=function(g,m,I){return g=+g,m=m>>>0,I||_e(this,g,m,4,2147483647,-2147483648),this[m]=g&255,this[m+1]=g>>>8,this[m+2]=g>>>16,this[m+3]=g>>>24,m+4},s.prototype.writeInt32BE=function(g,m,I){return g=+g,m=m>>>0,I||_e(this,g,m,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[m]=g>>>24,this[m+1]=g>>>16,this[m+2]=g>>>8,this[m+3]=g&255,m+4},s.prototype.writeBigInt64LE=jt(function(g,m=0){return dt(this,g,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=jt(function(g,m=0){return Ht(this,g,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ne(v,g,m,I,F,N){if(m+I>v.length)throw new RangeError("Index out of range");if(m<0)throw new RangeError("Index out of range")}function L(v,g,m,I,F){return g=+g,m=m>>>0,F||Ne(v,g,m,4),n.write(v,g,m,I,23,4),m+4}s.prototype.writeFloatLE=function(g,m,I){return L(this,g,m,!0,I)},s.prototype.writeFloatBE=function(g,m,I){return L(this,g,m,!1,I)};function P(v,g,m,I,F){return g=+g,m=m>>>0,F||Ne(v,g,m,8),n.write(v,g,m,I,52,8),m+8}s.prototype.writeDoubleLE=function(g,m,I){return P(this,g,m,!0,I)},s.prototype.writeDoubleBE=function(g,m,I){return P(this,g,m,!1,I)},s.prototype.copy=function(g,m,I,F){if(!s.isBuffer(g))throw new TypeError("argument should be a Buffer");if(I||(I=0),!F&&F!==0&&(F=this.length),m>=g.length&&(m=g.length),m||(m=0),F>0&&F<I&&(F=I),F===I||g.length===0||this.length===0)return 0;if(m<0)throw new RangeError("targetStart out of bounds");if(I<0||I>=this.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("sourceEnd out of bounds");F>this.length&&(F=this.length),g.length-m<F-I&&(F=g.length-m+I);const N=F-I;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(m,I,F):Uint8Array.prototype.set.call(g,this.subarray(I,F),m),N},s.prototype.fill=function(g,m,I,F){if(typeof g=="string"){if(typeof m=="string"?(F=m,m=0,I=this.length):typeof I=="string"&&(F=I,I=this.length),F!==void 0&&typeof F!="string")throw new TypeError("encoding must be a string");if(typeof F=="string"&&!s.isEncoding(F))throw new TypeError("Unknown encoding: "+F);if(g.length===1){const V=g.charCodeAt(0);(F==="utf8"&&V<128||F==="latin1")&&(g=V)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(m<0||this.length<m||this.length<I)throw new RangeError("Out of range index");if(I<=m)return this;m=m>>>0,I=I===void 0?this.length:I>>>0,g||(g=0);let N;if(typeof g=="number")for(N=m;N<I;++N)this[N]=g;else{const V=s.isBuffer(g)?g:s.from(g,F),fe=V.length;if(fe===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(N=0;N<I-m;++N)this[N+m]=V[N%fe]}return this};const q={};function H(v,g,m){q[v]=class extends m{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${v}]`,this.stack,delete this.name}get code(){return v}set code(F){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:F,writable:!0})}toString(){return`${this.name} [${v}]: ${this.message}`}}}H("ERR_BUFFER_OUT_OF_BOUNDS",function(v){return v?`${v} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),H("ERR_INVALID_ARG_TYPE",function(v,g){return`The "${v}" argument must be of type number. Received type ${typeof g}`},TypeError),H("ERR_OUT_OF_RANGE",function(v,g,m){let I=`The value of "${v}" is out of range.`,F=m;return Number.isInteger(m)&&Math.abs(m)>2**32?F=W(String(m)):typeof m=="bigint"&&(F=String(m),(m>BigInt(2)**BigInt(32)||m<-(BigInt(2)**BigInt(32)))&&(F=W(F)),F+="n"),I+=` It must be ${g}. Received ${F}`,I},RangeError);function W(v){let g="",m=v.length;const I=v[0]==="-"?1:0;for(;m>=I+4;m-=3)g=`_${v.slice(m-3,m)}${g}`;return`${v.slice(0,m)}${g}`}function E(v,g,m){G(g,"offset"),(v[g]===void 0||v[g+m]===void 0)&&Z(g,v.length-(m+1))}function x(v,g,m,I,F,N){if(v>m||v<g){const V=typeof g=="bigint"?"n":"";let fe;throw N>3?g===0||g===BigInt(0)?fe=`>= 0${V} and < 2${V} ** ${(N+1)*8}${V}`:fe=`>= -(2${V} ** ${(N+1)*8-1}${V}) and < 2 ** ${(N+1)*8-1}${V}`:fe=`>= ${g}${V} and <= ${m}${V}`,new q.ERR_OUT_OF_RANGE("value",fe,v)}E(I,F,N)}function G(v,g){if(typeof v!="number")throw new q.ERR_INVALID_ARG_TYPE(g,"number",v)}function Z(v,g,m){throw Math.floor(v)!==v?(G(v,m),new q.ERR_OUT_OF_RANGE(m||"offset","an integer",v)):g<0?new q.ERR_BUFFER_OUT_OF_BOUNDS:new q.ERR_OUT_OF_RANGE(m||"offset",`>= ${m?1:0} and <= ${g}`,v)}const se=/[^+/0-9A-Za-z-_]/g;function J(v){if(v=v.split("=")[0],v=v.trim().replace(se,""),v.length<2)return"";for(;v.length%4!==0;)v=v+"=";return v}function le(v,g){g=g||1/0;let m;const I=v.length;let F=null;const N=[];for(let V=0;V<I;++V){if(m=v.charCodeAt(V),m>55295&&m<57344){if(!F){if(m>56319){(g-=3)>-1&&N.push(239,191,189);continue}else if(V+1===I){(g-=3)>-1&&N.push(239,191,189);continue}F=m;continue}if(m<56320){(g-=3)>-1&&N.push(239,191,189),F=m;continue}m=(F-55296<<10|m-56320)+65536}else F&&(g-=3)>-1&&N.push(239,191,189);if(F=null,m<128){if((g-=1)<0)break;N.push(m)}else if(m<2048){if((g-=2)<0)break;N.push(m>>6|192,m&63|128)}else if(m<65536){if((g-=3)<0)break;N.push(m>>12|224,m>>6&63|128,m&63|128)}else if(m<1114112){if((g-=4)<0)break;N.push(m>>18|240,m>>12&63|128,m>>6&63|128,m&63|128)}else throw new Error("Invalid code point")}return N}function Vt(v){const g=[];for(let m=0;m<v.length;++m)g.push(v.charCodeAt(m)&255);return g}function si(v,g){let m,I,F;const N=[];for(let V=0;V<v.length&&!((g-=2)<0);++V)m=v.charCodeAt(V),I=m>>8,F=m%256,N.push(F),N.push(I);return N}function li(v){return t.toByteArray(J(v))}function fi(v,g,m,I){let F;for(F=0;F<I&&!(F+m>=g.length||F>=v.length);++F)g[F+m]=v[F];return F}function _t(v,g){return v instanceof g||v!=null&&v.constructor!=null&&v.constructor.name!=null&&v.constructor.name===g.name}function wr(v){return v!==v}const ui=function(){const v="0123456789abcdef",g=new Array(256);for(let m=0;m<16;++m){const I=m*16;for(let F=0;F<16;++F)g[I+F]=v[m]+v[F]}return g}();function jt(v){return typeof BigInt>"u"?Kn:v}function Kn(){throw new Error("BigInt not supported")}})(ye);const hw=ve({__proto__:null,default:Gs(ye)},[ye]),ct={},FF=Object.freeze(Object.defineProperty({__proto__:null,default:ct},Symbol.toStringTag,{value:"Module"})),c0=typeof window<"u"?window:typeof self<"u"?self:{fetch:void 0};class ji{async getBufferFromResponse(t){if(typeof t.buffer=="function")return t.buffer();if(typeof t.arrayBuffer=="function"){const n=await t.arrayBuffer();return ye.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||c0.fetch&&c0.fetch.bind(c0);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,o={}){const{headers:a={},signal:s,overrides:f={}}=o;r<1/0?a.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(a.range=`bytes=${i}-`);const l={...this.baseOverrides,...f,headers:{...a,...f.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s},u=await this.fetch(this.url,l);if(!u.ok)throw new Error(`HTTP ${u.status} ${u.statusText} ${this.url}`);if(u.status===200&&i===0||u.status===206){const c=await this.getBufferFromResponse(u),h=c.copy(t,n,0,Math.min(r,c.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:o,overrides:a={}}=r,s={headers:i,method:"GET",redirect:"follow",mode:"cors",signal:o,...this.baseOverrides,...a},f=await this.fetch(this.url,s);if(!f)throw new Error("generic-filehandle failed to fetch");if(f.status!==200)throw Object.assign(new Error(`HTTP ${f.status} fetching ${this.url}`),{status:f.status});if(n==="utf8")return f.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(f)}async stat(){if(!this._stat){const t=ye.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 dw(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 RF(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 PF{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 o=i,a=o+r,s=await dw(this.blob.slice(o,a)),f=ye.Buffer.from(s);return{bytesRead:f.copy(t,n),buffer:f}}async readFile(t){let n;if(typeof t=="string"?n=t:n=t&&t.encoding,n==="utf8")return RF(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await dw(this.blob);return ye.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function pw(e,t={}){return new ji(e,t)}function MF(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return pw(e,r);if(t!==void 0)return new ct(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const Hs=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:PF,LocalFile:ct,RemoteFile:ji,fromUrl:pw,open:MF},Symbol.toStringTag,{value:"Module"}));var lr={};(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(o,a){return Object.prototype.hasOwnProperty.call(o,a)}e.assign=function(o){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var s=a.shift();if(s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var f in s)n(s,f)&&(o[f]=s[f])}}return o},e.shrinkBuf=function(o,a){return o.length===a?o:o.subarray?o.subarray(0,a):(o.length=a,o)};var r={arraySet:function(o,a,s,f,l){if(a.subarray&&o.subarray){o.set(a.subarray(s,s+f),l);return}for(var u=0;u<f;u++)o[l+u]=a[s+u]},flattenChunks:function(o){var a,s,f,l,u,c;for(f=0,a=0,s=o.length;a<s;a++)f+=o[a].length;for(c=new Uint8Array(f),l=0,a=0,s=o.length;a<s;a++)u=o[a],c.set(u,l),l+=u.length;return c}},i={arraySet:function(o,a,s,f,l){for(var u=0;u<f;u++)o[l+u]=a[s+u]},flattenChunks:function(o){return[].concat.apply([],o)}};e.setTyped=function(o){o?(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)})(lr);var Vs={},Hn={},qo={},LF=lr,NF=4,gw=0,mw=1,OF=2;function Zo(e){for(var t=e.length;--t>=0;)e[t]=0}var zF=0,bw=1,UF=2,GF=3,HF=258,h0=29,js=256,qs=js+1+h0,Wo=30,d0=19,yw=2*qs+1,qi=15,p0=16,VF=7,g0=256,ww=16,vw=17,xw=18,m0=[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],Eu=[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],jF=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Aw=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],qF=512,fr=new Array((qs+2)*2);Zo(fr);var Zs=new Array(Wo*2);Zo(Zs);var Ws=new Array(qF);Zo(Ws);var Ys=new Array(HF-GF+1);Zo(Ys);var b0=new Array(h0);Zo(b0);var _u=new Array(Wo);Zo(_u);function y0(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 Ew,_w,Sw;function w0(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Cw(e){return e<256?Ws[e]:Ws[256+(e>>>7)]}function Qs(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Ot(e,t,n){e.bi_valid>p0-n?(e.bi_buf|=t<<e.bi_valid&65535,Qs(e,e.bi_buf),e.bi_buf=t>>p0-e.bi_valid,e.bi_valid+=n-p0):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Vn(e,t,n){Ot(e,n[t*2],n[t*2+1])}function Iw(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function ZF(e){e.bi_valid===16?(Qs(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 WF(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,f=t.stat_desc.max_length,l,u,c,h,d,p,b=0;for(h=0;h<=qi;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<yw;l++)u=e.heap[l],h=n[n[u*2+1]*2+1]+1,h>f&&(h=f,b++),n[u*2+1]=h,!(u>r)&&(e.bl_count[h]++,d=0,u>=s&&(d=a[u-s]),p=n[u*2],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[u*2+1]+d)));if(b!==0){do{for(h=f-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[f]--,b-=2}while(b>0);for(h=f;h!==0;h--)for(u=e.bl_count[h];u!==0;)c=e.heap[--l],!(c>r)&&(n[c*2+1]!==h&&(e.opt_len+=(h-n[c*2+1])*n[c*2],n[c*2+1]=h),u--)}}function Tw(e,t,n){var r=new Array(qi+1),i=0,o,a;for(o=1;o<=qi;o++)r[o]=i=i+n[o-1]<<1;for(a=0;a<=t;a++){var s=e[a*2+1];s!==0&&(e[a*2]=Iw(r[s]++,s))}}function YF(){var e,t,n,r,i,o=new Array(qi+1);for(n=0,r=0;r<h0-1;r++)for(b0[r]=n,e=0;e<1<<m0[r];e++)Ys[n++]=r;for(Ys[n-1]=r,i=0,r=0;r<16;r++)for(_u[r]=i,e=0;e<1<<Eu[r];e++)Ws[i++]=r;for(i>>=7;r<Wo;r++)for(_u[r]=i<<7,e=0;e<1<<Eu[r]-7;e++)Ws[256+i++]=r;for(t=0;t<=qi;t++)o[t]=0;for(e=0;e<=143;)fr[e*2+1]=8,e++,o[8]++;for(;e<=255;)fr[e*2+1]=9,e++,o[9]++;for(;e<=279;)fr[e*2+1]=7,e++,o[7]++;for(;e<=287;)fr[e*2+1]=8,e++,o[8]++;for(Tw(fr,qs+1,o),e=0;e<Wo;e++)Zs[e*2+1]=5,Zs[e*2]=Iw(e,5);Ew=new y0(fr,m0,js+1,qs,qi),_w=new y0(Zs,Eu,0,Wo,qi),Sw=new y0(new Array(0),jF,0,d0,VF)}function kw(e){var t;for(t=0;t<qs;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Wo;t++)e.dyn_dtree[t*2]=0;for(t=0;t<d0;t++)e.bl_tree[t*2]=0;e.dyn_ltree[g0*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Bw(e){e.bi_valid>8?Qs(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 QF(e,t,n,r){Bw(e),r&&(Qs(e,n),Qs(e,~n)),LF.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function Dw(e,t,n,r){var i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function v0(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&Dw(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Dw(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function Fw(e,t,n){var r,i,o=0,a,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,r===0?Vn(e,i,t):(a=Ys[i],Vn(e,a+js+1,t),s=m0[a],s!==0&&(i-=b0[a],Ot(e,i,s)),r--,a=Cw(r),Vn(e,a,n),s=Eu[a],s!==0&&(r-=_u[a],Ot(e,r,s)));while(o<e.last_lit);Vn(e,g0,t)}function x0(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,f=-1,l;for(e.heap_len=0,e.heap_max=yw,a=0;a<o;a++)n[a*2]!==0?(e.heap[++e.heap_len]=f=a,e.depth[a]=0):n[a*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=f<2?++f:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=f,a=e.heap_len>>1;a>=1;a--)v0(e,n,a);l=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],v0(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[l*2]=n[a*2]+n[s*2],e.depth[l]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[a*2+1]=n[s*2+1]=l,e.heap[1]=l++,v0(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],WF(e,t),Tw(n,f,e.bl_count)}function Rw(e,t,n){var r,i=-1,o,a=t[0*2+1],s=0,f=7,l=4;for(a===0&&(f=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=a,a=t[(r+1)*2+1],!(++s<f&&o===a)&&(s<l?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[ww*2]++):s<=10?e.bl_tree[vw*2]++:e.bl_tree[xw*2]++,s=0,i=o,a===0?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4))}function Pw(e,t,n){var r,i=-1,o,a=t[0*2+1],s=0,f=7,l=4;for(a===0&&(f=138,l=3),r=0;r<=n;r++)if(o=a,a=t[(r+1)*2+1],!(++s<f&&o===a)){if(s<l)do Vn(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(Vn(e,o,e.bl_tree),s--),Vn(e,ww,e.bl_tree),Ot(e,s-3,2)):s<=10?(Vn(e,vw,e.bl_tree),Ot(e,s-3,3)):(Vn(e,xw,e.bl_tree),Ot(e,s-11,7));s=0,i=o,a===0?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4)}}function XF(e){var t;for(Rw(e,e.dyn_ltree,e.l_desc.max_code),Rw(e,e.dyn_dtree,e.d_desc.max_code),x0(e,e.bl_desc),t=d0-1;t>=3&&e.bl_tree[Aw[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function $F(e,t,n,r){var i;for(Ot(e,t-257,5),Ot(e,n-1,5),Ot(e,r-4,4),i=0;i<r;i++)Ot(e,e.bl_tree[Aw[i]*2+1],3);Pw(e,e.dyn_ltree,t-1),Pw(e,e.dyn_dtree,n-1)}function KF(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return gw;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return mw;for(n=32;n<js;n++)if(e.dyn_ltree[n*2]!==0)return mw;return gw}var Mw=!1;function JF(e){Mw||(YF(),Mw=!0),e.l_desc=new w0(e.dyn_ltree,Ew),e.d_desc=new w0(e.dyn_dtree,_w),e.bl_desc=new w0(e.bl_tree,Sw),e.bi_buf=0,e.bi_valid=0,kw(e)}function Lw(e,t,n,r){Ot(e,(zF<<1)+(r?1:0),3),QF(e,t,n,!0)}function eR(e){Ot(e,bw<<1,3),Vn(e,g0,fr),ZF(e)}function tR(e,t,n,r){var i,o,a=0;e.level>0?(e.strm.data_type===OF&&(e.strm.data_type=KF(e)),x0(e,e.l_desc),x0(e,e.d_desc),a=XF(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?Lw(e,t,n,r):e.strategy===NF||o===i?(Ot(e,(bw<<1)+(r?1:0),3),Fw(e,fr,Zs)):(Ot(e,(UF<<1)+(r?1:0),3),$F(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),Fw(e,e.dyn_ltree,e.dyn_dtree)),kw(e),r&&Bw(e)}function nR(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[(Ys[n]+js+1)*2]++,e.dyn_dtree[Cw(t)*2]++),e.last_lit===e.lit_bufsize-1}qo._tr_init=JF,qo._tr_stored_block=Lw,qo._tr_flush_block=tR,qo._tr_tally=nR,qo._tr_align=eR;function rR(e,t,n,r){for(var i=e&65535|0,o=e>>>16&65535|0,a=0;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+t[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}var Nw=rR;function iR(){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 oR=iR();function aR(e,t,n,r){var i=oR,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}var Ow=aR,A0={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"},Tt=lr,rn=qo,zw=Nw,qr=Ow,sR=A0,Zi=0,lR=1,fR=3,Zr=4,Uw=5,jn=0,Gw=1,on=-2,uR=-3,E0=-5,cR=-1,hR=1,Su=2,dR=3,pR=4,gR=0,mR=2,Cu=8,bR=9,yR=15,wR=8,vR=29,xR=256,_0=xR+1+vR,AR=30,ER=19,_R=2*_0+1,SR=15,he=3,Wr=258,_n=Wr+he+1,CR=32,Iu=42,S0=69,Tu=73,ku=91,Bu=103,Wi=113,Xs=666,it=1,$s=2,Yi=3,Yo=4,IR=3;function Yr(e,t){return e.msg=sR[t],t}function Hw(e){return(e<<1)-(e>4?9:0)}function Qr(e){for(var t=e.length;--t>=0;)e[t]=0}function Xr(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Tt.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 mt(e,t){rn._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Xr(e.strm)}function we(e,t){e.pending_buf[e.pending++]=t}function Ks(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function TR(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Tt.arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=zw(e.adler,t,i,n):e.state.wrap===2&&(e.adler=qr(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function Vw(e,t){var n=e.max_chain_length,r=e.strstart,i,o,a=e.prev_length,s=e.nice_match,f=e.strstart>e.w_size-_n?e.strstart-(e.w_size-_n):0,l=e.window,u=e.w_mask,c=e.prev,h=e.strstart+Wr,d=l[r+a-1],p=l[r+a];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+a]!==p||l[i+a-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(o=Wr-(h-r),r=h-Wr,o>a){if(e.match_start=t,a=o,o>=s)break;d=l[r+a-1],p=l[r+a]}}while((t=c[t&u])>f&&--n!==0);return a<=e.lookahead?a:e.lookahead}function Qi(e){var t=e.w_size,n,r,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-_n)){Tt.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);o+=t}if(e.strm.avail_in===0)break;if(r=TR(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=he)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+he-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<he)););}while(e.lookahead<_n&&e.strm.avail_in!==0)}function kR(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Qi(e),e.lookahead===0&&t===Zi)return it;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,mt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-_n&&(mt(e,!1),e.strm.avail_out===0))return it}return e.insert=0,t===Zr?(mt(e,!0),e.strm.avail_out===0?Yi:Yo):(e.strstart>e.block_start&&(mt(e,!1),e.strm.avail_out===0),it)}function C0(e,t){for(var n,r;;){if(e.lookahead<_n){if(Qi(e),e.lookahead<_n&&t===Zi)return it;if(e.lookahead===0)break}if(n=0,e.lookahead>=he&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+he-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-_n&&(e.match_length=Vw(e,n)),e.match_length>=he)if(r=rn._tr_tally(e,e.strstart-e.match_start,e.match_length-he),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=he){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+he-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=rn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(mt(e,!1),e.strm.avail_out===0))return it}return e.insert=e.strstart<he-1?e.strstart:he-1,t===Zr?(mt(e,!0),e.strm.avail_out===0?Yi:Yo):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?it:$s}function Qo(e,t){for(var n,r,i;;){if(e.lookahead<_n){if(Qi(e),e.lookahead<_n&&t===Zi)return it;if(e.lookahead===0)break}if(n=0,e.lookahead>=he&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+he-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=he-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-_n&&(e.match_length=Vw(e,n),e.match_length<=5&&(e.strategy===hR||e.match_length===he&&e.strstart-e.match_start>4096)&&(e.match_length=he-1)),e.prev_length>=he&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-he,r=rn._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-he),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+he-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=he-1,e.strstart++,r&&(mt(e,!1),e.strm.avail_out===0))return it}else if(e.match_available){if(r=rn._tr_tally(e,0,e.window[e.strstart-1]),r&&mt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return it}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=rn._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<he-1?e.strstart:he-1,t===Zr?(mt(e,!0),e.strm.avail_out===0?Yi:Yo):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?it:$s}function BR(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=Wr){if(Qi(e),e.lookahead<=Wr&&t===Zi)return it;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=he&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+Wr;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=Wr-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=he?(n=rn._tr_tally(e,1,e.match_length-he),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=rn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(mt(e,!1),e.strm.avail_out===0))return it}return e.insert=0,t===Zr?(mt(e,!0),e.strm.avail_out===0?Yi:Yo):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?it:$s}function DR(e,t){for(var n;;){if(e.lookahead===0&&(Qi(e),e.lookahead===0)){if(t===Zi)return it;break}if(e.match_length=0,n=rn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(mt(e,!1),e.strm.avail_out===0))return it}return e.insert=0,t===Zr?(mt(e,!0),e.strm.avail_out===0?Yi:Yo):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?it:$s}function qn(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 Xo;Xo=[new qn(0,0,0,0,kR),new qn(4,4,8,4,C0),new qn(4,5,16,8,C0),new qn(4,6,32,32,C0),new qn(4,4,16,16,Qo),new qn(8,16,32,32,Qo),new qn(8,16,128,128,Qo),new qn(8,32,128,256,Qo),new qn(32,128,258,1024,Qo),new qn(32,258,258,4096,Qo)];function FR(e){e.window_size=2*e.w_size,Qr(e.head),e.max_lazy_match=Xo[e.level].max_lazy,e.good_match=Xo[e.level].good_length,e.nice_match=Xo[e.level].nice_length,e.max_chain_length=Xo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=he-1,e.match_available=0,e.ins_h=0}function RR(){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=Cu,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 Tt.Buf16(_R*2),this.dyn_dtree=new Tt.Buf16((2*AR+1)*2),this.bl_tree=new Tt.Buf16((2*ER+1)*2),Qr(this.dyn_ltree),Qr(this.dyn_dtree),Qr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Tt.Buf16(SR+1),this.heap=new Tt.Buf16(2*_0+1),Qr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Tt.Buf16(2*_0+1),Qr(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 jw(e){var t;return!e||!e.state?Yr(e,on):(e.total_in=e.total_out=0,e.data_type=mR,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Iu:Wi,e.adler=t.wrap===2?0:1,t.last_flush=Zi,rn._tr_init(t),jn)}function qw(e){var t=jw(e);return t===jn&&FR(e.state),t}function PR(e,t){return!e||!e.state||e.state.wrap!==2?on:(e.state.gzhead=t,jn)}function Zw(e,t,n,r,i,o){if(!e)return on;var a=1;if(t===cR&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>bR||n!==Cu||r<8||r>15||t<0||t>9||o<0||o>pR)return Yr(e,on);r===8&&(r=9);var s=new RR;return e.state=s,s.strm=e,s.wrap=a,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+he-1)/he),s.window=new Tt.Buf8(s.w_size*2),s.head=new Tt.Buf16(s.hash_size),s.prev=new Tt.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Tt.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=o,s.method=n,qw(e)}function MR(e,t){return Zw(e,t,Cu,yR,wR,gR)}function LR(e,t){var n,r,i,o;if(!e||!e.state||t>Uw||t<0)return e?Yr(e,on):on;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===Xs&&t!==Zr)return Yr(e,e.avail_out===0?E0:on);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===Iu)if(r.wrap===2)e.adler=0,we(r,31),we(r,139),we(r,8),r.gzhead?(we(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)),we(r,r.gzhead.time&255),we(r,r.gzhead.time>>8&255),we(r,r.gzhead.time>>16&255),we(r,r.gzhead.time>>24&255),we(r,r.level===9?2:r.strategy>=Su||r.level<2?4:0),we(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(we(r,r.gzhead.extra.length&255),we(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=qr(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=S0):(we(r,0),we(r,0),we(r,0),we(r,0),we(r,0),we(r,r.level===9?2:r.strategy>=Su||r.level<2?4:0),we(r,IR),r.status=Wi);else{var a=Cu+(r.w_bits-8<<4)<<8,s=-1;r.strategy>=Su||r.level<2?s=0:r.level<6?s=1:r.level===6?s=2:s=3,a|=s<<6,r.strstart!==0&&(a|=CR),a+=31-a%31,r.status=Wi,Ks(r,a),r.strstart!==0&&(Ks(r,e.adler>>>16),Ks(r,e.adler&65535)),e.adler=1}if(r.status===S0)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=qr(e.adler,r.pending_buf,r.pending-i,i)),Xr(e),i=r.pending,r.pending===r.pending_buf_size));)we(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=qr(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=Tu)}else r.status=Tu;if(r.status===Tu)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=qr(e.adler,r.pending_buf,r.pending-i,i)),Xr(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}r.gzindex<r.gzhead.name.length?o=r.gzhead.name.charCodeAt(r.gzindex++)&255:o=0,we(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=qr(e.adler,r.pending_buf,r.pending-i,i)),o===0&&(r.gzindex=0,r.status=ku)}else r.status=ku;if(r.status===ku)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=qr(e.adler,r.pending_buf,r.pending-i,i)),Xr(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}r.gzindex<r.gzhead.comment.length?o=r.gzhead.comment.charCodeAt(r.gzindex++)&255:o=0,we(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=qr(e.adler,r.pending_buf,r.pending-i,i)),o===0&&(r.status=Bu)}else r.status=Bu;if(r.status===Bu&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Xr(e),r.pending+2<=r.pending_buf_size&&(we(r,e.adler&255),we(r,e.adler>>8&255),e.adler=0,r.status=Wi)):r.status=Wi),r.pending!==0){if(Xr(e),e.avail_out===0)return r.last_flush=-1,jn}else if(e.avail_in===0&&Hw(t)<=Hw(n)&&t!==Zr)return Yr(e,E0);if(r.status===Xs&&e.avail_in!==0)return Yr(e,E0);if(e.avail_in!==0||r.lookahead!==0||t!==Zi&&r.status!==Xs){var f=r.strategy===Su?DR(r,t):r.strategy===dR?BR(r,t):Xo[r.level].func(r,t);if((f===Yi||f===Yo)&&(r.status=Xs),f===it||f===Yi)return e.avail_out===0&&(r.last_flush=-1),jn;if(f===$s&&(t===lR?rn._tr_align(r):t!==Uw&&(rn._tr_stored_block(r,0,0,!1),t===fR&&(Qr(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Xr(e),e.avail_out===0))return r.last_flush=-1,jn}return t!==Zr?jn:r.wrap<=0?Gw:(r.wrap===2?(we(r,e.adler&255),we(r,e.adler>>8&255),we(r,e.adler>>16&255),we(r,e.adler>>24&255),we(r,e.total_in&255),we(r,e.total_in>>8&255),we(r,e.total_in>>16&255),we(r,e.total_in>>24&255)):(Ks(r,e.adler>>>16),Ks(r,e.adler&65535)),Xr(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?jn:Gw)}function NR(e){var t;return!e||!e.state?on:(t=e.state.status,t!==Iu&&t!==S0&&t!==Tu&&t!==ku&&t!==Bu&&t!==Wi&&t!==Xs?Yr(e,on):(e.state=null,t===Wi?Yr(e,uR):jn))}function OR(e,t){var n=t.length,r,i,o,a,s,f,l,u;if(!e||!e.state||(r=e.state,a=r.wrap,a===2||a===1&&r.status!==Iu||r.lookahead))return on;for(a===1&&(e.adler=zw(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(a===0&&(Qr(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new Tt.Buf8(r.w_size),Tt.arraySet(u,t,n-r.w_size,r.w_size,0),t=u,n=r.w_size),s=e.avail_in,f=e.next_in,l=e.input,e.avail_in=n,e.next_in=0,e.input=t,Qi(r);r.lookahead>=he;){i=r.strstart,o=r.lookahead-(he-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+he-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--o);r.strstart=i,r.lookahead=he-1,Qi(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=he-1,r.match_available=0,e.next_in=f,e.input=l,e.avail_in=s,r.wrap=a,jn}Hn.deflateInit=MR,Hn.deflateInit2=Zw,Hn.deflateReset=qw,Hn.deflateResetKeep=jw,Hn.deflateSetHeader=PR,Hn.deflate=LR,Hn.deflateEnd=NR,Hn.deflateSetDictionary=OR,Hn.deflateInfo="pako deflate (from Nodeca project)";var Xi={},Du=lr,Ww=!0,Yw=!0;try{String.fromCharCode.apply(null,[0])}catch{Ww=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Yw=!1}for(var Js=new Du.Buf8(256),$r=0;$r<256;$r++)Js[$r]=$r>=252?6:$r>=248?5:$r>=240?4:$r>=224?3:$r>=192?2:1;Js[254]=Js[254]=1,Xi.string2buf=function(e){var t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(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 Du.Buf8(s),o=0,i=0;o<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};function Qw(e,t){if(t<65534&&(e.subarray&&Yw||!e.subarray&&Ww))return String.fromCharCode.apply(null,Du.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}Xi.buf2binstring=function(e){return Qw(e,e.length)},Xi.binstring2buf=function(e){for(var t=new Du.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},Xi.buf2string=function(e,t){var n,r,i,o,a=t||e.length,s=new Array(a*2);for(r=0,n=0;n<a;){if(i=e[n++],i<128){s[r++]=i;continue}if(o=Js[i],o>4){s[r++]=65533,n+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&n<a;)i=i<<6|e[n++]&63,o--;if(o>1){s[r++]=65533;continue}i<65536?s[r++]=i:(i-=65536,s[r++]=55296|i>>10&1023,s[r++]=56320|i&1023)}return Qw(s,r)},Xi.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+Js[e[n]]>t?n:t};function zR(){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 Xw=zR,el=Hn,tl=lr,I0=Xi,T0=A0,UR=Xw,$w=Object.prototype.toString,GR=0,k0=4,$o=0,Kw=1,Jw=2,HR=-1,VR=0,jR=8;function $i(e){if(!(this instanceof $i))return new $i(e);this.options=tl.assign({level:HR,method:jR,chunkSize:16384,windowBits:15,memLevel:8,strategy:VR,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 UR,this.strm.avail_out=0;var n=el.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==$o)throw new Error(T0[n]);if(t.header&&el.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=I0.string2buf(t.dictionary):$w.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=el.deflateSetDictionary(this.strm,r),n!==$o)throw new Error(T0[n]);this._dict_set=!0}}$i.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?k0:GR,typeof e=="string"?n.input=I0.string2buf(e):$w.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 tl.Buf8(r),n.next_out=0,n.avail_out=r),i=el.deflate(n,o),i!==Kw&&i!==$o)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(o===k0||o===Jw))&&(this.options.to==="string"?this.onData(I0.buf2binstring(tl.shrinkBuf(n.output,n.next_out))):this.onData(tl.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==Kw);return o===k0?(i=el.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===$o):(o===Jw&&(this.onEnd($o),n.avail_out=0),!0)},$i.prototype.onData=function(e){this.chunks.push(e)},$i.prototype.onEnd=function(e){e===$o&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=tl.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function B0(e,t){var n=new $i(t);if(n.push(e,!0),n.err)throw n.msg||T0[n.err];return n.result}function qR(e,t){return t=t||{},t.raw=!0,B0(e,t)}function ZR(e,t){return t=t||{},t.gzip=!0,B0(e,t)}Vs.Deflate=$i,Vs.deflate=B0,Vs.deflateRaw=qR,Vs.gzip=ZR;var nl={},Sn={},Fu=30,WR=12,YR=function(t,n){var r,i,o,a,s,f,l,u,c,h,d,p,b,y,w,S,C,_,k,B,T,R,M,j,O;r=t.state,i=t.next_in,j=t.input,o=i+(t.avail_in-5),a=t.next_out,O=t.output,s=a-(n-t.avail_out),f=a+(t.avail_out-257),l=r.dmax,u=r.wsize,c=r.whave,h=r.wnext,d=r.window,p=r.hold,b=r.bits,y=r.lencode,w=r.distcode,S=(1<<r.lenbits)-1,C=(1<<r.distbits)-1;e:do{b<15&&(p+=j[i++]<<b,b+=8,p+=j[i++]<<b,b+=8),_=y[p&S];t:for(;;){if(k=_>>>24,p>>>=k,b-=k,k=_>>>16&255,k===0)O[a++]=_&65535;else if(k&16){B=_&65535,k&=15,k&&(b<k&&(p+=j[i++]<<b,b+=8),B+=p&(1<<k)-1,p>>>=k,b-=k),b<15&&(p+=j[i++]<<b,b+=8,p+=j[i++]<<b,b+=8),_=w[p&C];n:for(;;){if(k=_>>>24,p>>>=k,b-=k,k=_>>>16&255,k&16){if(T=_&65535,k&=15,b<k&&(p+=j[i++]<<b,b+=8,b<k&&(p+=j[i++]<<b,b+=8)),T+=p&(1<<k)-1,T>l){t.msg="invalid distance too far back",r.mode=Fu;break e}if(p>>>=k,b-=k,k=a-s,T>k){if(k=T-k,k>c&&r.sane){t.msg="invalid distance too far back",r.mode=Fu;break e}if(R=0,M=d,h===0){if(R+=u-k,k<B){B-=k;do O[a++]=d[R++];while(--k);R=a-T,M=O}}else if(h<k){if(R+=u+h-k,k-=h,k<B){B-=k;do O[a++]=d[R++];while(--k);if(R=0,h<B){k=h,B-=k;do O[a++]=d[R++];while(--k);R=a-T,M=O}}}else if(R+=h-k,k<B){B-=k;do O[a++]=d[R++];while(--k);R=a-T,M=O}for(;B>2;)O[a++]=M[R++],O[a++]=M[R++],O[a++]=M[R++],B-=3;B&&(O[a++]=M[R++],B>1&&(O[a++]=M[R++]))}else{R=a-T;do O[a++]=O[R++],O[a++]=O[R++],O[a++]=O[R++],B-=3;while(B>2);B&&(O[a++]=O[R++],B>1&&(O[a++]=O[R++]))}}else if(k&64){t.msg="invalid distance code",r.mode=Fu;break e}else{_=w[(_&65535)+(p&(1<<k)-1)];continue n}break}}else if(k&64)if(k&32){r.mode=WR;break e}else{t.msg="invalid literal/length code",r.mode=Fu;break e}else{_=y[(_&65535)+(p&(1<<k)-1)];continue t}break}}while(i<o&&a<f);B=b>>3,i-=B,b-=B<<3,p&=(1<<b)-1,t.next_in=i,t.next_out=a,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=a<f?257+(f-a):257-(a-f),r.hold=p,r.bits=b},ev=lr,Ko=15,tv=852,nv=592,rv=0,D0=1,iv=2,QR=[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],XR=[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],$R=[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],KR=[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],JR=function(t,n,r,i,o,a,s,f){var l=f.bits,u=0,c=0,h=0,d=0,p=0,b=0,y=0,w=0,S=0,C=0,_,k,B,T,R,M=null,j=0,O,ne=new ev.Buf16(Ko+1),ae=new ev.Buf16(Ko+1),pe=null,ke=0,Xe,De,$e;for(u=0;u<=Ko;u++)ne[u]=0;for(c=0;c<i;c++)ne[n[r+c]]++;for(p=l,d=Ko;d>=1&&ne[d]===0;d--);if(p>d&&(p=d),d===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,f.bits=1,0;for(h=1;h<d&&ne[h]===0;h++);for(p<h&&(p=h),w=1,u=1;u<=Ko;u++)if(w<<=1,w-=ne[u],w<0)return-1;if(w>0&&(t===rv||d!==1))return-1;for(ae[1]=0,u=1;u<Ko;u++)ae[u+1]=ae[u]+ne[u];for(c=0;c<i;c++)n[r+c]!==0&&(s[ae[n[r+c]]++]=c);if(t===rv?(M=pe=s,O=19):t===D0?(M=QR,j-=257,pe=XR,ke-=257,O=256):(M=$R,pe=KR,O=-1),C=0,c=0,u=h,R=a,b=p,y=0,B=-1,S=1<<p,T=S-1,t===D0&&S>tv||t===iv&&S>nv)return 1;for(;;){Xe=u-y,s[c]<O?(De=0,$e=s[c]):s[c]>O?(De=pe[ke+s[c]],$e=M[j+s[c]]):(De=32+64,$e=0),_=1<<u-y,k=1<<b,h=k;do k-=_,o[R+(C>>y)+k]=Xe<<24|De<<16|$e|0;while(k!==0);for(_=1<<u-1;C&_;)_>>=1;if(_!==0?(C&=_-1,C+=_):C=0,c++,--ne[u]===0){if(u===d)break;u=n[r+s[c]]}if(u>p&&(C&T)!==B){for(y===0&&(y=p),R+=h,b=u-y,w=1<<b;b+y<d&&(w-=ne[b+y],!(w<=0));)b++,w<<=1;if(S+=1<<b,t===D0&&S>tv||t===iv&&S>nv)return 1;B=C&T,o[B]=p<<24|b<<16|R-a|0}}return C!==0&&(o[R+C]=u-y<<24|64<<16|0),f.bits=p,0},Xt=lr,F0=Nw,Zn=Ow,e7=YR,rl=JR,t7=0,ov=1,av=2,sv=4,n7=5,Ru=6,Ki=0,r7=1,i7=2,an=-2,lv=-3,fv=-4,o7=-5,uv=8,cv=1,hv=2,dv=3,pv=4,gv=5,mv=6,bv=7,yv=8,wv=9,vv=10,Pu=11,ur=12,R0=13,xv=14,P0=15,Av=16,Ev=17,_v=18,Sv=19,Mu=20,Lu=21,Cv=22,Iv=23,Tv=24,kv=25,Bv=26,M0=27,Dv=28,Fv=29,Ve=30,Rv=31,a7=32,s7=852,l7=592,f7=15,u7=f7;function Pv(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function c7(){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 Xt.Buf16(320),this.work=new Xt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Mv(e){var t;return!e||!e.state?an:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=cv,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Xt.Buf32(s7),t.distcode=t.distdyn=new Xt.Buf32(l7),t.sane=1,t.back=-1,Ki)}function Lv(e){var t;return!e||!e.state?an:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Mv(e))}function Nv(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))?an:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Lv(e))}function Ov(e,t){var n,r;return e?(r=new c7,e.state=r,r.window=null,n=Nv(e,t),n!==Ki&&(e.state=null),n):an}function h7(e){return Ov(e,u7)}var zv=!0,L0,N0;function d7(e){if(zv){var t;for(L0=new Xt.Buf32(512),N0=new Xt.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(rl(ov,e.lens,0,288,L0,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;rl(av,e.lens,0,32,N0,0,e.work,{bits:5}),zv=!1}e.lencode=L0,e.lenbits=9,e.distcode=N0,e.distbits=5}function Uv(e,t,n,r){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Xt.Buf8(o.wsize)),r>=o.wsize?(Xt.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),Xt.arraySet(o.window,t,n-r,i,o.wnext),r-=i,r?(Xt.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function p7(e,t){var n,r,i,o,a,s,f,l,u,c,h,d,p,b,y=0,w,S,C,_,k,B,T,R,M=new Xt.Buf8(4),j,O,ne=[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 an;n=e.state,n.mode===ur&&(n.mode=R0),a=e.next_out,i=e.output,f=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,c=s,h=f,R=Ki;e:for(;;)switch(n.mode){case cv:if(n.wrap===0){n.mode=R0;break}for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.wrap&2&&l===35615){n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=Zn(n.check,M,2,0),l=0,u=0,n.mode=hv;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Ve;break}if((l&15)!==uv){e.msg="unknown compression method",n.mode=Ve;break}if(l>>>=4,u-=4,T=(l&15)+8,n.wbits===0)n.wbits=T;else if(T>n.wbits){e.msg="invalid window size",n.mode=Ve;break}n.dmax=1<<T,e.adler=n.check=1,n.mode=l&512?vv:ur,l=0,u=0;break;case hv:for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==uv){e.msg="unknown compression method",n.mode=Ve;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Ve;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Zn(n.check,M,2,0)),l=0,u=0,n.mode=dv;case dv:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=Zn(n.check,M,4,0)),l=0,u=0,n.mode=pv;case pv:for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Zn(n.check,M,2,0)),l=0,u=0,n.mode=gv;case gv:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Zn(n.check,M,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=mv;case mv: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)),Xt.arraySet(n.head.extra,r,o,d,T)),n.flags&512&&(n.check=Zn(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=bv;case bv:if(n.flags&2048){if(s===0)break e;d=0;do T=r[o+d++],n.head&&T&&n.length<65536&&(n.head.name+=String.fromCharCode(T));while(T&&d<s);if(n.flags&512&&(n.check=Zn(n.check,r,d,o)),s-=d,o+=d,T)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=yv;case yv:if(n.flags&4096){if(s===0)break e;d=0;do T=r[o+d++],n.head&&T&&n.length<65536&&(n.head.comment+=String.fromCharCode(T));while(T&&d<s);if(n.flags&512&&(n.check=Zn(n.check,r,d,o)),s-=d,o+=d,T)break e}else n.head&&(n.head.comment=null);n.mode=wv;case wv:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Ve;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=ur;break;case vv:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}e.adler=n.check=Pv(l),l=0,u=0,n.mode=Pu;case Pu:if(n.havedict===0)return e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,i7;e.adler=n.check=1,n.mode=ur;case ur:if(t===n7||t===Ru)break e;case R0:if(n.last){l>>>=u&7,u-=u&7,n.mode=M0;break}for(;u<3;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=xv;break;case 1:if(d7(n),n.mode=Mu,t===Ru){l>>>=2,u-=2;break e}break;case 2:n.mode=Ev;break;case 3:e.msg="invalid block type",n.mode=Ve}l>>>=2,u-=2;break;case xv:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Ve;break}if(n.length=l&65535,l=0,u=0,n.mode=P0,t===Ru)break e;case P0:n.mode=Av;case Av:if(d=n.length,d){if(d>s&&(d=s),d>f&&(d=f),d===0)break e;Xt.arraySet(i,r,o,d,a),s-=d,o+=d,f-=d,a+=d,n.length-=d;break}n.mode=ur;break;case Ev:for(;u<14;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Ve;break}n.have=0,n.mode=_v;case _v:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.lens[ne[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[ne[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,j={bits:n.lenbits},R=rl(t7,n.lens,0,19,n.lencode,0,n.work,j),n.lenbits=j.bits,R){e.msg="invalid code lengths set",n.mode=Ve;break}n.have=0,n.mode=Sv;case Sv:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,S=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(C<16)l>>>=w,u-=w,n.lens[n.have++]=C;else{if(C===16){for(O=w+2;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(l>>>=w,u-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=Ve;break}T=n.lens[n.have-1],d=3+(l&3),l>>>=2,u-=2}else if(C===17){for(O=w+3;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=w,u-=w,T=0,d=3+(l&7),l>>>=3,u-=3}else{for(O=w+7;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=w,u-=w,T=0,d=11+(l&127),l>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Ve;break}for(;d--;)n.lens[n.have++]=T}}if(n.mode===Ve)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Ve;break}if(n.lenbits=9,j={bits:n.lenbits},R=rl(ov,n.lens,0,n.nlen,n.lencode,0,n.work,j),n.lenbits=j.bits,R){e.msg="invalid literal/lengths set",n.mode=Ve;break}if(n.distbits=6,n.distcode=n.distdyn,j={bits:n.distbits},R=rl(av,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,j),n.distbits=j.bits,R){e.msg="invalid distances set",n.mode=Ve;break}if(n.mode=Mu,t===Ru)break e;case Mu:n.mode=Lu;case Lu:if(s>=6&&f>=258){e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,e7(e,h),a=e.next_out,i=e.output,f=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===ur&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,S=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(S&&!(S&240)){for(_=w,k=S,B=C;y=n.lencode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,S=y>>>16&255,C=y&65535,!(_+w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=_,u-=_,n.back+=_}if(l>>>=w,u-=w,n.back+=w,n.length=C,S===0){n.mode=Bv;break}if(S&32){n.back=-1,n.mode=ur;break}if(S&64){e.msg="invalid literal/length code",n.mode=Ve;break}n.extra=S&15,n.mode=Cv;case Cv:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Iv;case Iv:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,S=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(!(S&240)){for(_=w,k=S,B=C;y=n.distcode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,S=y>>>16&255,C=y&65535,!(_+w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=_,u-=_,n.back+=_}if(l>>>=w,u-=w,n.back+=w,S&64){e.msg="invalid distance code",n.mode=Ve;break}n.offset=C,n.extra=S&15,n.mode=Tv;case Tv:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Ve;break}n.mode=kv;case kv:if(f===0)break e;if(d=h-f,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Ve;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),b=n.window}else b=i,p=a-n.offset,d=n.length;d>f&&(d=f),f-=d,n.length-=d;do i[a++]=b[p++];while(--d);n.length===0&&(n.mode=Lu);break;case Bv:if(f===0)break e;i[a++]=n.length,f--,n.mode=Lu;break;case M0:if(n.wrap){for(;u<32;){if(s===0)break e;s--,l|=r[o++]<<u,u+=8}if(h-=f,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?Zn(n.check,i,h,a-h):F0(n.check,i,h,a-h)),h=f,(n.flags?l:Pv(l))!==n.check){e.msg="incorrect data check",n.mode=Ve;break}l=0,u=0}n.mode=Dv;case Dv:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Ve;break}l=0,u=0}n.mode=Fv;case Fv:R=r7;break e;case Ve:R=lv;break e;case Rv:return fv;case a7:default:return an}return e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<Ve&&(n.mode<M0||t!==sv))&&Uv(e,e.output,e.next_out,h-e.avail_out),c-=e.avail_in,h-=e.avail_out,e.total_in+=c,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?Zn(n.check,i,h,e.next_out-h):F0(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===ur?128:0)+(n.mode===Mu||n.mode===P0?256:0),(c===0&&h===0||t===sv)&&R===Ki&&(R=o7),R}function g7(e){if(!e||!e.state)return an;var t=e.state;return t.window&&(t.window=null),e.state=null,Ki}function m7(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?an:(n.head=t,t.done=!1,Ki)}function b7(e,t){var n=t.length,r,i,o;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==Pu)?an:r.mode===Pu&&(i=1,i=F0(i,t,n,0),i!==r.check)?lv:(o=Uv(e,t,n,n),o?(r.mode=Rv,fv):(r.havedict=1,Ki))}Sn.inflateReset=Lv,Sn.inflateReset2=Nv,Sn.inflateResetKeep=Mv,Sn.inflateInit=h7,Sn.inflateInit2=Ov,Sn.inflate=p7,Sn.inflateEnd=g7,Sn.inflateGetHeader=m7,Sn.inflateSetDictionary=b7,Sn.inflateInfo="pako inflate (from Nodeca project)";var Gv={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 y7(){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 w7=y7,Jo=Sn,il=lr,Nu=Xi,et=Gv,O0=A0,v7=Xw,x7=w7,Hv=Object.prototype.toString;function Ji(e){if(!(this instanceof Ji))return new Ji(e);this.options=il.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 v7,this.strm.avail_out=0;var n=Jo.inflateInit2(this.strm,t.windowBits);if(n!==et.Z_OK)throw new Error(O0[n]);if(this.header=new x7,Jo.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Nu.string2buf(t.dictionary):Hv.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Jo.inflateSetDictionary(this.strm,t.dictionary),n!==et.Z_OK)))throw new Error(O0[n])}Ji.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,a,s,f,l,u=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?et.Z_FINISH:et.Z_NO_FLUSH,typeof e=="string"?n.input=Nu.binstring2buf(e):Hv.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 il.Buf8(r),n.next_out=0,n.avail_out=r),o=Jo.inflate(n,et.Z_NO_FLUSH),o===et.Z_NEED_DICT&&i&&(o=Jo.inflateSetDictionary(this.strm,i)),o===et.Z_BUF_ERROR&&u===!0&&(o=et.Z_OK,u=!1),o!==et.Z_STREAM_END&&o!==et.Z_OK)return this.onEnd(o),this.ended=!0,!1;n.next_out&&(n.avail_out===0||o===et.Z_STREAM_END||n.avail_in===0&&(a===et.Z_FINISH||a===et.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Nu.utf8border(n.output,n.next_out),f=n.next_out-s,l=Nu.buf2string(n.output,s),n.next_out=f,n.avail_out=r-f,f&&il.arraySet(n.output,n.output,s,f,0),this.onData(l)):this.onData(il.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)&&o!==et.Z_STREAM_END);return o===et.Z_STREAM_END&&(a=et.Z_FINISH),a===et.Z_FINISH?(o=Jo.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===et.Z_OK):(a===et.Z_SYNC_FLUSH&&(this.onEnd(et.Z_OK),n.avail_out=0),!0)},Ji.prototype.onData=function(e){this.chunks.push(e)},Ji.prototype.onEnd=function(e){e===et.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=il.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function z0(e,t){var n=new Ji(t);if(n.push(e,!0),n.err)throw n.msg||O0[n.err];return n.result}function A7(e,t){return t=t||{},t.raw=!0,z0(e,t)}nl.Inflate=Ji,nl.inflate=z0,nl.inflateRaw=A7,nl.ungzip=z0;var E7=lr.assign,_7=Vs,S7=nl,C7=Gv,Vv={};E7(Vv,_7,S7,C7);var Ou=Vv;async function Kr(e){try{let t,n=0,r=0;const i=[];let o=0,a;do{const f=e.subarray(n);if(a=new Ou.Inflate,{strm:t}=a,a.push(f,Ou.Z_SYNC_FLUSH),a.err)throw new Error(a.msg);n+=t.next_in,i[r]=a.result,o+=i[r].length,r+=1}while(t.avail_in);const s=new Uint8Array(o);for(let f=0,l=0;f<i.length;f++)s.set(i[f],l),l+=i[f].length;return ye.Buffer.from(s)}catch(t){throw`${t}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function jv(e,t){try{let n;const{minv:r,maxv:i}=t;let o=r.blockPosition,a=r.dataPosition;const s=[],f=[],l=[];let u=0,c=0;do{const p=e.subarray(o-r.blockPosition),b=new Ou.Inflate;if({strm:n}=b,b.push(p,Ou.Z_SYNC_FLUSH),b.err)throw new Error(b.msg);const y=b.result;s.push(y);let w=y.length;f.push(o),l.push(a),s.length===1&&r.dataPosition&&(s[0]=s[0].subarray(r.dataPosition),w=s[0].length);const S=o;if(o+=n.next_in,a+=w,S>=i.blockPosition){s[c]=s[c].subarray(0,i.blockPosition===r.blockPosition?i.dataPosition-r.dataPosition+1:i.dataPosition+1),f.push(o),l.push(a),u+=s[c].length;break}u+=s[c].length,c++}while(n.avail_in);const h=new Uint8Array(u);for(let p=0,b=0;p<s.length;p++)h.set(s[p],b),b+=s[p].length;return{buffer:ye.Buffer.from(h),cpositions:f,dpositions:l}}catch(n){throw`${n}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):n}}var I7=Me,sn=null;try{sn=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 Me(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}Me.prototype.__isLong__,Object.defineProperty(Me.prototype,"__isLong__",{value:!0});function zt(e){return(e&&e.__isLong__)===!0}Me.isLong=zt;var qv={},Zv={};function eo(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=Zv[e],r)?r:(n=Le(e,(e|0)<0?-1:0,!0),i&&(Zv[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=qv[e],r)?r:(n=Le(e,e<0?-1:0,!1),i&&(qv[e]=n),n))}Me.fromInt=eo;function ln(e,t){if(isNaN(e))return t?to:fn;if(t){if(e<0)return to;if(e>=Yv)return Jv}else{if(e<=-Qv)return Ut;if(e+1>=Qv)return Kv}return e<0?ln(-e,t).neg():Le(e%ea|0,e/ea|0,t)}Me.fromNumber=ln;function Le(e,t,n){return new Me(e,t,n)}Me.fromBits=Le;var zu=Math.pow;function U0(e,t,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return fn;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 U0(e.substring(1),t,n).neg();for(var i=ln(zu(n,8)),o=fn,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),f=parseInt(e.substring(a,a+s),n);if(s<8){var l=ln(zu(n,s));o=o.mul(l).add(ln(f))}else o=o.mul(i),o=o.add(ln(f))}return o.unsigned=t,o}Me.fromString=U0;function Cn(e,t){return typeof e=="number"?ln(e,t):typeof e=="string"?U0(e,t):Le(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Me.fromValue=Cn;var Wv=65536,T7=1<<24,ea=Wv*Wv,Yv=ea*ea,Qv=Yv/2,Xv=eo(T7),fn=eo(0);Me.ZERO=fn;var to=eo(0,!0);Me.UZERO=to;var ta=eo(1);Me.ONE=ta;var $v=eo(1,!0);Me.UONE=$v;var G0=eo(-1);Me.NEG_ONE=G0;var Kv=Le(-1,2147483647,!1);Me.MAX_VALUE=Kv;var Jv=Le(-1,-1,!0);Me.MAX_UNSIGNED_VALUE=Jv;var Ut=Le(0,-2147483648,!1);Me.MIN_VALUE=Ut;var Y=Me.prototype;Y.toInt=function(){return this.unsigned?this.low>>>0:this.low},Y.toNumber=function(){return this.unsigned?(this.high>>>0)*ea+(this.low>>>0):this.high*ea+(this.low>>>0)},Y.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(Ut)){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 o=ln(zu(t,6),this.unsigned),a=this,s="";;){var f=a.div(o),l=a.sub(f.mul(o)).toInt()>>>0,u=l.toString(t);if(a=f,a.isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},Y.getHighBits=function(){return this.high},Y.getHighBitsUnsigned=function(){return this.high>>>0},Y.getLowBits=function(){return this.low},Y.getLowBitsUnsigned=function(){return this.low>>>0},Y.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Ut)?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},Y.isZero=function(){return this.high===0&&this.low===0},Y.eqz=Y.isZero,Y.isNegative=function(){return!this.unsigned&&this.high<0},Y.isPositive=function(){return this.unsigned||this.high>=0},Y.isOdd=function(){return(this.low&1)===1},Y.isEven=function(){return(this.low&1)===0},Y.equals=function(t){return zt(t)||(t=Cn(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},Y.eq=Y.equals,Y.notEquals=function(t){return!this.eq(t)},Y.neq=Y.notEquals,Y.ne=Y.notEquals,Y.lessThan=function(t){return this.comp(t)<0},Y.lt=Y.lessThan,Y.lessThanOrEqual=function(t){return this.comp(t)<=0},Y.lte=Y.lessThanOrEqual,Y.le=Y.lessThanOrEqual,Y.greaterThan=function(t){return this.comp(t)>0},Y.gt=Y.greaterThan,Y.greaterThanOrEqual=function(t){return this.comp(t)>=0},Y.gte=Y.greaterThanOrEqual,Y.ge=Y.greaterThanOrEqual,Y.compare=function(t){if(zt(t)||(t=Cn(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},Y.comp=Y.compare,Y.negate=function(){return!this.unsigned&&this.eq(Ut)?Ut:this.not().add(ta)},Y.neg=Y.negate,Y.add=function(t){zt(t)||(t=Cn(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,a=t.high>>>16,s=t.high&65535,f=t.low>>>16,l=t.low&65535,u=0,c=0,h=0,d=0;return d+=o+l,h+=d>>>16,d&=65535,h+=i+f,c+=h>>>16,h&=65535,c+=r+s,u+=c>>>16,c&=65535,u+=n+a,u&=65535,Le(h<<16|d,u<<16|c,this.unsigned)},Y.subtract=function(t){return zt(t)||(t=Cn(t)),this.add(t.neg())},Y.sub=Y.subtract,Y.multiply=function(t){if(this.isZero())return fn;if(zt(t)||(t=Cn(t)),sn){var n=sn.mul(this.low,this.high,t.low,t.high);return Le(n,sn.get_high(),this.unsigned)}if(t.isZero())return fn;if(this.eq(Ut))return t.isOdd()?Ut:fn;if(t.eq(Ut))return this.isOdd()?Ut:fn;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(Xv)&&t.lt(Xv))return ln(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,a=this.low&65535,s=t.high>>>16,f=t.high&65535,l=t.low>>>16,u=t.low&65535,c=0,h=0,d=0,p=0;return p+=a*u,d+=p>>>16,p&=65535,d+=o*u,h+=d>>>16,d&=65535,d+=a*l,h+=d>>>16,d&=65535,h+=i*u,c+=h>>>16,h&=65535,h+=o*l,c+=h>>>16,h&=65535,h+=a*f,c+=h>>>16,h&=65535,c+=r*u+i*l+o*f+a*s,c&=65535,Le(d<<16|p,c<<16|h,this.unsigned)},Y.mul=Y.multiply,Y.divide=function(t){if(zt(t)||(t=Cn(t)),t.isZero())throw Error("division by zero");if(sn){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?sn.div_u:sn.div_s)(this.low,this.high,t.low,t.high);return Le(n,sn.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?to:fn;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return to;if(t.gt(this.shru(1)))return $v;o=to}else{if(this.eq(Ut)){if(t.eq(ta)||t.eq(G0))return Ut;if(t.eq(Ut))return ta;var a=this.shr(1);return r=a.div(t).shl(1),r.eq(fn)?t.isNegative()?ta:G0:(i=this.sub(t.mul(r)),o=r.add(i.div(t)),o)}else if(t.eq(Ut))return this.unsigned?to:fn;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();o=fn}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),f=s<=48?1:zu(2,s-48),l=ln(r),u=l.mul(t);u.isNegative()||u.gt(i);)r-=f,l=ln(r,this.unsigned),u=l.mul(t);l.isZero()&&(l=ta),o=o.add(l),i=i.sub(u)}return o},Y.div=Y.divide,Y.modulo=function(t){if(zt(t)||(t=Cn(t)),sn){var n=(this.unsigned?sn.rem_u:sn.rem_s)(this.low,this.high,t.low,t.high);return Le(n,sn.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},Y.mod=Y.modulo,Y.rem=Y.modulo,Y.not=function(){return Le(~this.low,~this.high,this.unsigned)},Y.and=function(t){return zt(t)||(t=Cn(t)),Le(this.low&t.low,this.high&t.high,this.unsigned)},Y.or=function(t){return zt(t)||(t=Cn(t)),Le(this.low|t.low,this.high|t.high,this.unsigned)},Y.xor=function(t){return zt(t)||(t=Cn(t)),Le(this.low^t.low,this.high^t.high,this.unsigned)},Y.shiftLeft=function(t){return zt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Le(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Le(0,this.low<<t-32,this.unsigned)},Y.shl=Y.shiftLeft,Y.shiftRight=function(t){return zt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Le(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Le(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Y.shr=Y.shiftRight,Y.shiftRightUnsigned=function(t){if(zt(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return Le(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?Le(n,0,this.unsigned):Le(n>>>t-32,0,this.unsigned)},Y.shru=Y.shiftRightUnsigned,Y.shr_u=Y.shiftRightUnsigned,Y.toSigned=function(){return this.unsigned?Le(this.low,this.high,!1):this},Y.toUnsigned=function(){return this.unsigned?this:Le(this.low,this.high,!0)},Y.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Y.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]},Y.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]},Me.fromBytes=function(t,n,r){return r?Me.fromBytesLE(t,n):Me.fromBytesBE(t,n)},Me.fromBytesLE=function(t,n){return new Me(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Me.fromBytesBE=function(t,n){return new Me(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};const Uu=Gs(I7),Gu=1;class k7{constructor({filehandle:t,path:n}){if(t)this.filehandle=t;else if(n)this.filehandle=new ct(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(t,n=0,r=!0){const i=Uu.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=ye.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=ye.Buffer.allocUnsafe(i),await this.filehandle.read(t,0,i,8);for(let o=0;o<n;o+=1){const a=this._readLongWithOverflow(t,o*16),s=this._readLongWithOverflow(t,o*16+8);r[o+1]=[a,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(),o=[],a=(h,d)=>{const p=h[Gu],b=d?d[Gu]:1/0;return p<=n&&b>n?0:p<n?-1:1};let s=0,f=i.length-1,l=Math.floor(i.length/2),u=a(i[l],i[l+1]);for(;u!==0;)u>0?f=l-1:u<0&&(s=l+1),l=Math.ceil((f-s)/2)+s,u=a(i[l],i[l+1]);o.push(i[l]);let c=l+1;for(;c<i.length&&(o.push(i[c]),!(i[c][Gu]>=r));c+=1);return o[o.length-1][Gu]<r&&o.push([]),o}}class ex{constructor({filehandle:t,path:n,gziFilehandle:r,gziPath:i}){if(t)this.filehandle=t;else if(n)this.filehandle=new ct(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 k7({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=ye.Buffer.allocUnsafe(4),{bytesRead:i}=await this.filehandle.read(r,0,4,n-28-4);if(i!==4)throw new Error("read error");const o=r.readUInt32LE(0);return t+o}async _readAndUncompressBlock(t,[n],[r]){let i=r;i||(i=(await this.filehandle.stat()).size);const o=i-n;return await this.filehandle.read(t,0,o,n),await Kr(t.slice(0,o))}async read(t,n,r,i){const o=await this.gzi.getRelevantBlocksForRead(r,i),a=ye.Buffer.allocUnsafe(32768*2);let s=n,f=0;for(let l=0;l<o.length-1;l+=1){const u=await this._readAndUncompressBlock(a,o[l],o[l+1]),[,c]=o[l],h=c>=i?0:i-c,d=Math.min(i+r,c+u.length)-c;h>=0&&h<u.length&&(u.copy(t,s,h,d),s+=d-h,f+=d-h)}return{bytesRead:f,buffer:t}}}function tx(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function B7(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 o=n.toString("utf8").split(/\r?\n/).filter(a=>/\S/.test(a)).map(a=>a.split(" ")).filter(a=>a[0]!=="").map(a=>((!i||i.name!==a[0])&&(i={name:a[0],id:r},r+=1),{id:i.id,name:a[0],length:+a[1],start:0,end:+a[1],offset:+a[2],lineLength:+a[3],lineBytes:+a[4]}));return{name:Object.fromEntries(o.map(a=>[a.name,a])),id:Object.fromEntries(o.map(a=>[a.id,a]))}}class nx{constructor({fasta:t,fai:n,path:r,faiPath:i,chunkSizeLimit:o=1e6}){if(t)this.fasta=t;else if(r)this.fasta=new ct(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 ct(i);else if(r)this.fai=new ct(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile");this.chunkSizeLimit=o}async _getIndexes(t){return this.indexes||(this.indexes=B7(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 o=0;o<i.length;o+=1)n[i[o].name]=i[o].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 o=(await this._getIndexes(i)).id[t];if(o)return this._fetchFromIndexEntry(o,n,r,i)}async getResiduesByName(t,n,r,i){const o=(await this._getIndexes(i)).name[t];if(o)return this._fetchFromIndexEntry(o,n,r,i)}async getSequence(t,n,r,i){return this.getResiduesByName(t,n,r,i)}async _fetchFromIndexEntry(t,n=0,r,i){let o=r;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((o===void 0||o>t.length)&&(o=t.length),n>=o)return"";const a=tx(t,n),s=tx(t,o)-a;if(s>this.chunkSizeLimit)throw new Error(`data size of ${s.toLocaleString()} bytes exceeded chunk size limit of ${this.chunkSizeLimit.toLocaleString()} bytes`);const f=Buffer.allocUnsafe(s);return await this.fasta.read(f,0,s,a,i),f.toString("utf8").replace(/\s+/g,"")}}class D7 extends nx{constructor({fasta:t,path:n,fai:r,faiPath:i,gzi:o,gziPath:a,chunkSizeLimit:s}){super({fasta:t,path:n,fai:r,faiPath:i,chunkSizeLimit:s}),t&&o?this.fasta=new ex({filehandle:t,gziFilehandle:o}):n&&a&&(this.fasta=new ex({path:n,gziPath:a}))}}function rx(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
|
|
284
|
-
`),[i,...o]=n.split(" "),a=r.join("").replace(/\s/g,"");return{id:i,description:o.join(" "),sequence:a}})}class
|
|
285
|
-
`}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 In=new Map,no="___parser_",Tn={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},Vu={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"},ju={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 Te=class Dn{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new Dn}primitiveGenerateN(t,n){const r=Vu[t],i=ju[t];n.pushCode(`${n.generateVariable(this.varName)} = dataView.get${r}(offset, ${i});`),n.pushCode(`offset += ${Tn[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 In.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"&&!In.has(n.type)&&!(n.type in Tn))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),o=n.choices[i];if(isNaN(i))throw new Error(`Choice key "${r}" is not a number.`);if(typeof o=="string"&&!In.has(o)&&!(o in Tn))throw new Error(`Choice type "${o}" 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 Dn)&&!In.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof Dn)&&!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 Tn)&&!In.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 O7(t,this.useContextVariables);return n.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(n),n.pushCode(`return ${no+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 ${no+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=In.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(Tn).indexOf(this.type)>=0)t=Tn[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=Tn[this.options.type]:this.options.type instanceof Dn&&(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 Dn;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 c=0;for(let h=u;h<t.bitFields.length;h++){const d=t.bitFields[h].options.length;if(c+d>32)break;c+=d}return c},o=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 a=0;const s=this.endian==="be";let f=0,l=0;t.bitFields.forEach((u,c)=>{let h=u.options.length;if(h>l){if(l){const b=-1>>>32-l;t.pushCode(`${u.varName} = (${r} & 0x${b.toString(16)}) << ${h-l};`),h-=l}a=0,l=f=o(i(c)-l)}const d=s?f-a-h:a,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),a+=h,l-=h}),t.bitFields=[]}}generateSeek(t){const n=t.generateOption(this.options.length);t.pushCode(`offset += ${n};`)}generateString(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable(),i=this.options.encoding,o=i.toLowerCase()==="hex",a='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 f=`offset - ${r} < ${s} ? offset - 1 : offset`;t.pushCode(o?`${n} = Array.from(buffer.subarray(${r}, ${f}), ${a}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, ${f}));`)}else if(this.options.length){const s=t.generateOption(this.options.length);t.pushCode(o?`${n} = Array.from(buffer.subarray(offset, offset + ${s}), ${a}).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(o?`${n} = Array.from(buffer.subarray(${r}, offset - 1), ${a}).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(o?`${n} = Array.from(buffer.subarray(${r}, offset), ${a}).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(),o=t.generateTmpVariable();t.pushCode(`var ${i} = offset;`),t.pushCode(`var ${o} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${o} = dataView.getUint8(offset);`);const a=t.addImport(r);t.pushCode(`if (${a}.call(${t.generateVariable()}, ${o}, 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,o=t.generateTmpVariable(),a=t.generateVariable(this.varName),s=t.generateTmpVariable(),f=this.options.key,l=typeof f=="string";if(l?t.pushCode(`${a} = {};`):t.pushCode(`${a} = [];`),typeof this.options.readUntil=="function"?t.pushCode("do {"):this.options.readUntil==="eof"?t.pushCode(`for (var ${o} = 0; offset < buffer.length; ${o}++) {`):r!==void 0?t.pushCode(`for (var ${o} = offset + ${r}; offset < ${o}; ) {`):t.pushCode(`for (var ${o} = ${n}; ${o} > 0; ${o}--) {`),typeof i=="string")if(In.get(i)){const u=t.generateTmpVariable();if(t.pushCode(`var ${u} = ${no+i}(offset, {`),t.useContextVariables){const c=t.generateVariable();t.pushCode(`$parent: ${c},`),t.pushCode(`$root: ${c}.$root,`),!this.options.readUntil&&r===void 0&&t.pushCode(`$index: ${n} - ${o},`)}t.pushCode("});"),t.pushCode(`var ${s} = ${u}.result; offset = ${u}.offset;`),i!==this.alias&&t.addReference(i)}else{const u=Vu[i],c=ju[i];t.pushCode(`var ${s} = dataView.get${u}(offset, ${c});`),t.pushCode(`offset += ${Tn[i]};`)}else if(i instanceof Dn){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} - ${o};`)),i.generate(t),t.useContextVariables&&(t.pushCode(`delete ${s}.$parent;`),t.pushCode(`delete ${s}.$root;`),t.pushCode(`delete ${s}.$index;`)),t.popScope()}if(l?t.pushCode(`${a}[${s}.${f}] = ${s};`):t.pushCode(`${a}.push(${s});`),t.pushCode("}"),typeof this.options.readUntil=="function"){const u=this.options.readUntil,c=t.addImport(u);t.pushCode(`while (!${c}.call(${t.generateVariable()}, ${s}, buffer.subarray(offset)));`)}}generateChoiceCase(t,n,r){if(typeof r=="string"){const i=t.generateVariable(this.varName);if(In.has(r)){const o=t.generateTmpVariable();t.pushCode(`var ${o} = ${no+r}(offset, {`),t.useContextVariables&&(t.pushCode(`$parent: ${i}.$parent,`),t.pushCode(`$root: ${i}.$root,`)),t.pushCode("});"),t.pushCode(`${i} = ${o}.result; offset = ${o}.offset;`),r!==this.alias&&t.addReference(r)}else{const o=Vu[r],a=ju[r];t.pushCode(`${i} = dataView.get${o}(offset, ${a});`),t.pushCode(`offset += ${Tn[r]}`)}}else r instanceof Dn&&(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 o=parseInt(i,10),a=this.options.choices[o];t.pushCode(`case ${o}:`),this.generateChoiceCase(t,this.varName,a),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 Dn){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(In.has(this.options.type)){const r=t.generateTmpVariable();if(t.pushCode(`var ${r} = ${no+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 f=this.options.readUntil,l=t.generateTmpVariable(),u=t.generateTmpVariable();t.pushCode(`var ${l} = offset;`),t.pushCode(`var ${u} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${u} = dataView.getUint8(offset);`);const c=t.addImport(f);t.pushCode(`if (${c}.call(${t.generateVariable()}, ${u}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${r} = buffer.subarray(${l}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${r} = buffer.subarray(offset);`);else{const f=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${f});`),t.pushCode(`offset += ${f};`)}this.options.clone&&t.pushCode(`${r} = buffer.constructor.from(${r});`);const i=t.generateTmpVariable(),o=t.generateTmpVariable(),a=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 ${o} = offset;`),t.pushCode(`var ${a} = dataView;`),t.pushCode(`buffer = ${r};`),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof Dn)this.varName&&t.pushCode(`${n} = {};`),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(In.has(this.options.type)){const f=t.generateTmpVariable();t.pushCode(`var ${f} = ${no+this.options.type}(0);`),t.pushCode(`${n} = ${f}.result;`),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode(`buffer = ${i};`),t.pushCode(`dataView = ${a};`),t.pushCode(`offset = ${o};`)}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(),o=t.generateVariable(this.varName);if(t.pushCode(`var ${i} = offset;`),t.pushCode(`offset = ${r};`),this.options.type instanceof Dn){if(t.pushCode(`${o} = {};`),t.useContextVariables){const a=t.generateVariable();t.pushCode(`${o}.$parent = ${a};`),t.pushCode(`${o}.$root = ${a}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode(`delete ${o}.$parent;`),t.pushCode(`delete ${o}.$root;`))}else if(In.has(this.options.type)){const a=t.generateTmpVariable();if(t.pushCode(`var ${a} = ${no+this.options.type}(offset, {`),t.useContextVariables){const s=t.generateVariable();t.pushCode(`$parent: ${s},`),t.pushCode(`$root: ${s}.$root,`)}t.pushCode("});"),t.pushCode(`${o} = ${a}.result; offset = ${a}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(Tn).indexOf(this.options.type)>=0){const a=Vu[n],s=ju[n];t.pushCode(`${o} = dataView.get${a}(offset, ${s});`),t.pushCode(`offset += ${Tn[n]};`)}t.pushCode(`offset = ${i};`)}generateSaveOffset(t){const n=t.generateVariable(this.varName);t.pushCode(`${n} = offset`)}};var ix={},H0={},ro={},ol={};Object.defineProperty(ol,"__esModule",{value:!0});function V0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ox(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 j0(e,t,n){return t&&ox(e.prototype,t),n&&ox(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function z7(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&&q0(e,t)}function na(e){return na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},na(e)}function q0(e,t){return q0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},q0(e,t)}function U7(){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 al(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G7(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 al(e)}function H7(e){var t=U7();return function(){var r=na(e),i;if(t){var o=na(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return G7(this,i)}}function V7(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=na(e),e!==null););return e}function qu(){return typeof Reflect<"u"&&Reflect.get?qu=Reflect.get.bind():qu=function(t,n,r){var i=V7(t,n);if(i){var o=Object.getOwnPropertyDescriptor(i,n);return o.get?o.get.call(arguments.length<3?t:r):o.value}},qu.apply(this,arguments)}var ax=function(){function e(){V0(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return j0(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],o=0,a=i.length;o<a;o++)if(i[o].callback===r){i.splice(o,1);return}}}},{key:"dispatchEvent",value:function(n){if(n.type in this.listeners){for(var r=this.listeners[n.type],i=r.slice(),o=0,a=i.length;o<a;o++){var s=i[o];try{s.callback.call(this,n)}catch(f){Promise.resolve().then(function(){throw f})}s.options&&s.options.once&&this.removeEventListener(n.type,s.callback)}return!n.defaultPrevented}}}]),e}(),Z0=function(e){z7(n,e);var t=H7(n);function n(){var r;return V0(this,n),r=t.call(this),r.listeners||ax.call(al(r)),Object.defineProperty(al(r),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(al(r),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(al(r),"reason",{value:void 0,writable:!0,configurable:!0}),r}return j0(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)),qu(na(n.prototype),"dispatchEvent",this).call(this,i)}}]),n}(ax),sx=function(){function e(){V0(this,e),Object.defineProperty(this,"signal",{value:new Z0,writable:!0,configurable:!0})}return j0(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&&(sx.prototype[Symbol.toStringTag]="AbortController",Z0.prototype[Symbol.toStringTag]="AbortSignal");function j7(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 q7(e){typeof e=="function"&&(e={fetch:e});var t=e,n=t.fetch,r=t.Request,i=r===void 0?n.Request:r,o=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,s=a===void 0?!1:a;if(!j7({fetch:n,Request:i,AbortController:o,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:n,Request:f};var f=i;(f&&!f.prototype.hasOwnProperty("signal")||s)&&(f=function(h,d){var p;d&&d.signal&&(p=d.signal,delete d.signal);var b=new i(h,d);return p&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),b},f.prototype=i.prototype);var l=n,u=function(h,d){var p=f&&f.prototype.isPrototypeOf(h)?h.signal:d?d.signal:void 0;if(p){var b;try{b=new DOMException("Aborted","AbortError")}catch{b=new Error("Aborted"),b.name="AbortError"}if(p.aborted)return Promise.reject(b);var y=new Promise(function(w,S){p.addEventListener("abort",function(){return S(b)},{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([y,l(h,d)])}return l(h,d)};return{fetch:u,Request:f}}ol.AbortController=sx,ol.AbortSignal=Z0,ol.abortableFetch=q7,Object.defineProperty(ro,"__esModule",{value:!0}),ro.AbortSignal=ro.AbortController=void 0;const lx=ol;var Zu=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 Z7=typeof Zu().AbortController>"u"?lx.AbortController:Zu().AbortController;ro.AbortController=Z7;let W7=typeof Zu().AbortController>"u"?lx.AbortSignal:Zu().AbortSignal;ro.AbortSignal=W7;var W0={};Object.defineProperty(W0,"__esModule",{value:!0});const Y7=ro;class Q7{}class X7{constructor(){this.signals=new Set,this.abortController=new Y7.AbortController}addSignal(t=new Q7){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()}}W0.default=X7;var Y0={};Object.defineProperty(Y0,"__esModule",{value:!0});class $7{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)})}}Y0.default=$7;var fx=xu&&xu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(H0,"__esModule",{value:!0});const K7=ro,J7=fx(W0),eP=fx(Y0);class Wu{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 o=new J7.default,a=new eP.default;a.addCallback(i);const s={aborter:o,promise:this.fillCallback(n,o.signal,f=>{a.callback(f)}),settled:!1,statusReporter:a,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(f=>{throw console.error(f),f}),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 K7.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const o=this.cache.get(t);return o?o.aborted&&!o.settled?(this.evict(t,o),this.get(t,n,r,i)):o.settled?o.promise:(o.aborter.addSignal(r),o.statusReporter.addCallback(i),Wu.checkSinglePromise(o.promise,r)):(this.fill(t,n,r,i),Wu.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}}H0.default=Wu;var tP=xu&&xu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ix,"__esModule",{value:!0});const nP=tP(H0);var Yu=ix.default=nP.default;class rP{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 iP=rP;const Qu=Gs(iP);class Jr{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 Jr(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 o=1;o<n.length;o+=1){const a=n[o];a.min()>i.max()+1?(r.push(i),i=a):a.max()>i.max()&&(i=new Jr(i.min(),a.max()))}return r.push(i),r.length===1?r[0]:new Jr(r)}intersection(t){let n=this,r=t;const i=this.ranges(),o=r.ranges(),a=i.length,s=o.length;let f=0,l=0;const u=[];for(;f<a&&l<s;){n=i[f],r=o[l];const c=Math.max(n.min(),r.min()),h=Math.min(n.max(),r.max());h>=c&&u.push(new Jr(c,h)),n.max()>r.max()?l+=1:f+=1}if(u.length===0)throw new Error("found range of length 0");return u.length===1?u[0]:new Jr(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 oP=4,ux=0,cx=1,aP=2;function ra(e){let t=e.length;for(;--t>=0;)e[t]=0}const sP=0,hx=1,lP=2,fP=3,uP=258,Q0=29,sl=256,ll=sl+1+Q0,ia=30,X0=19,dx=2*ll+1,io=15,$0=16,cP=7,K0=256,px=16,gx=17,mx=18,J0=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]),Xu=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]),hP=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bx=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),dP=512,cr=new Array((ll+2)*2);ra(cr);const fl=new Array(ia*2);ra(fl);const ul=new Array(dP);ra(ul);const cl=new Array(uP-fP+1);ra(cl);const ep=new Array(Q0);ra(ep);const $u=new Array(ia);ra($u);function tp(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 yx,wx,vx;function np(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const xx=e=>e<256?ul[e]:ul[256+(e>>>7)],hl=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Gt=(e,t,n)=>{e.bi_valid>$0-n?(e.bi_buf|=t<<e.bi_valid&65535,hl(e,e.bi_buf),e.bi_buf=t>>$0-e.bi_valid,e.bi_valid+=n-$0):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},Wn=(e,t,n)=>{Gt(e,n[t*2],n[t*2+1])},Ax=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},pP=e=>{e.bi_valid===16?(hl(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)},gP=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,f=t.stat_desc.max_length;let l,u,c,h,d,p,b=0;for(h=0;h<=io;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<dx;l++)u=e.heap[l],h=n[n[u*2+1]*2+1]+1,h>f&&(h=f,b++),n[u*2+1]=h,!(u>r)&&(e.bl_count[h]++,d=0,u>=s&&(d=a[u-s]),p=n[u*2],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[u*2+1]+d)));if(b!==0){do{for(h=f-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[f]--,b-=2}while(b>0);for(h=f;h!==0;h--)for(u=e.bl_count[h];u!==0;)c=e.heap[--l],!(c>r)&&(n[c*2+1]!==h&&(e.opt_len+=(h-n[c*2+1])*n[c*2],n[c*2+1]=h),u--)}},Ex=(e,t,n)=>{const r=new Array(io+1);let i=0,o,a;for(o=1;o<=io;o++)i=i+n[o-1]<<1,r[o]=i;for(a=0;a<=t;a++){let s=e[a*2+1];s!==0&&(e[a*2]=Ax(r[s]++,s))}},mP=()=>{let e,t,n,r,i;const o=new Array(io+1);for(n=0,r=0;r<Q0-1;r++)for(ep[r]=n,e=0;e<1<<J0[r];e++)cl[n++]=r;for(cl[n-1]=r,i=0,r=0;r<16;r++)for($u[r]=i,e=0;e<1<<Xu[r];e++)ul[i++]=r;for(i>>=7;r<ia;r++)for($u[r]=i<<7,e=0;e<1<<Xu[r]-7;e++)ul[256+i++]=r;for(t=0;t<=io;t++)o[t]=0;for(e=0;e<=143;)cr[e*2+1]=8,e++,o[8]++;for(;e<=255;)cr[e*2+1]=9,e++,o[9]++;for(;e<=279;)cr[e*2+1]=7,e++,o[7]++;for(;e<=287;)cr[e*2+1]=8,e++,o[8]++;for(Ex(cr,ll+1,o),e=0;e<ia;e++)fl[e*2+1]=5,fl[e*2]=Ax(e,5);yx=new tp(cr,J0,sl+1,ll,io),wx=new tp(fl,Xu,0,ia,io),vx=new tp(new Array(0),hP,0,X0,cP)},_x=e=>{let t;for(t=0;t<ll;t++)e.dyn_ltree[t*2]=0;for(t=0;t<ia;t++)e.dyn_dtree[t*2]=0;for(t=0;t<X0;t++)e.bl_tree[t*2]=0;e.dyn_ltree[K0*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Sx=e=>{e.bi_valid>8?hl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Cx=(e,t,n,r)=>{const i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},rp=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&Cx(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Cx(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},Ix=(e,t,n)=>{let r,i,o=0,a,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?Wn(e,i,t):(a=cl[i],Wn(e,a+sl+1,t),s=J0[a],s!==0&&(i-=ep[a],Gt(e,i,s)),r--,a=xx(r),Wn(e,a,n),s=Xu[a],s!==0&&(r-=$u[a],Gt(e,r,s)));while(o<e.sym_next);Wn(e,K0,t)},ip=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,s,f=-1,l;for(e.heap_len=0,e.heap_max=dx,a=0;a<o;a++)n[a*2]!==0?(e.heap[++e.heap_len]=f=a,e.depth[a]=0):n[a*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=f<2?++f:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=f,a=e.heap_len>>1;a>=1;a--)rp(e,n,a);l=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],rp(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[l*2]=n[a*2]+n[s*2],e.depth[l]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[a*2+1]=n[s*2+1]=l,e.heap[1]=l++,rp(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],gP(e,t),Ex(n,f,e.bl_count)},Tx=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,f=7,l=4;for(a===0&&(f=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=a,a=t[(r+1)*2+1],!(++s<f&&o===a)&&(s<l?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[px*2]++):s<=10?e.bl_tree[gx*2]++:e.bl_tree[mx*2]++,s=0,i=o,a===0?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4))},kx=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,f=7,l=4;for(a===0&&(f=138,l=3),r=0;r<=n;r++)if(o=a,a=t[(r+1)*2+1],!(++s<f&&o===a)){if(s<l)do Wn(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(Wn(e,o,e.bl_tree),s--),Wn(e,px,e.bl_tree),Gt(e,s-3,2)):s<=10?(Wn(e,gx,e.bl_tree),Gt(e,s-3,3)):(Wn(e,mx,e.bl_tree),Gt(e,s-11,7));s=0,i=o,a===0?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4)}},bP=e=>{let t;for(Tx(e,e.dyn_ltree,e.l_desc.max_code),Tx(e,e.dyn_dtree,e.d_desc.max_code),ip(e,e.bl_desc),t=X0-1;t>=3&&e.bl_tree[bx[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},yP=(e,t,n,r)=>{let i;for(Gt(e,t-257,5),Gt(e,n-1,5),Gt(e,r-4,4),i=0;i<r;i++)Gt(e,e.bl_tree[bx[i]*2+1],3);kx(e,e.dyn_ltree,t-1),kx(e,e.dyn_dtree,n-1)},wP=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return ux;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return cx;for(n=32;n<sl;n++)if(e.dyn_ltree[n*2]!==0)return cx;return ux};let Bx=!1;const vP=e=>{Bx||(mP(),Bx=!0),e.l_desc=new np(e.dyn_ltree,yx),e.d_desc=new np(e.dyn_dtree,wx),e.bl_desc=new np(e.bl_tree,vx),e.bi_buf=0,e.bi_valid=0,_x(e)},Dx=(e,t,n,r)=>{Gt(e,(sP<<1)+(r?1:0),3),Sx(e),hl(e,n),hl(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},xP=e=>{Gt(e,hx<<1,3),Wn(e,K0,cr),pP(e)},AP=(e,t,n,r)=>{let i,o,a=0;e.level>0?(e.strm.data_type===aP&&(e.strm.data_type=wP(e)),ip(e,e.l_desc),ip(e,e.d_desc),a=bP(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?Dx(e,t,n,r):e.strategy===oP||o===i?(Gt(e,(hx<<1)+(r?1:0),3),Ix(e,cr,fl)):(Gt(e,(lP<<1)+(r?1:0),3),yP(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),Ix(e,e.dyn_ltree,e.dyn_dtree)),_x(e),r&&Sx(e)},EP=(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[(cl[n]+sl+1)*2]++,e.dyn_dtree[xx(t)*2]++),e.sym_next===e.sym_end);var _P=vP,SP=Dx,CP=AP,IP=EP,TP=xP,kP={_tr_init:_P,_tr_stored_block:SP,_tr_flush_block:CP,_tr_tally:IP,_tr_align:TP},dl=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,a=0;for(;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+t[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0};const BP=()=>{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},DP=new Uint32Array(BP());var ht=(e,t,n,r)=>{const i=DP,o=r+n;e^=-1;for(let a=r;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1},oa={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"},pl={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:FP,_tr_stored_block:op,_tr_flush_block:RP,_tr_tally:ei,_tr_align:PP}=kP,{Z_NO_FLUSH:ti,Z_PARTIAL_FLUSH:MP,Z_FULL_FLUSH:LP,Z_FINISH:un,Z_BLOCK:Fx,Z_OK:bt,Z_STREAM_END:Rx,Z_STREAM_ERROR:Yn,Z_DATA_ERROR:NP,Z_BUF_ERROR:ap,Z_DEFAULT_COMPRESSION:OP,Z_FILTERED:zP,Z_HUFFMAN_ONLY:Ku,Z_RLE:UP,Z_FIXED:GP,Z_DEFAULT_STRATEGY:HP,Z_UNKNOWN:VP,Z_DEFLATED:Ju}=pl,jP=9,qP=15,ZP=8,WP=29,sp=256+1+WP,YP=30,QP=19,XP=2*sp+1,$P=15,de=3,ni=258,Qn=ni+de+1,KP=32,aa=42,lp=57,fp=69,up=73,cp=91,hp=103,oo=113,gl=666,kt=1,sa=2,ao=3,la=4,JP=3,so=(e,t)=>(e.msg=oa[t],t),Px=e=>e*2-(e>4?9:0),ri=e=>{let t=e.length;for(;--t>=0;)e[t]=0},eM=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 ii=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const $t=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))},Kt=(e,t)=>{RP(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,$t(e.strm)},xe=(e,t)=>{e.pending_buf[e.pending++]=t},ml=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},dp=(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=dl(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ht(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Mx=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,a=e.prev_length,s=e.nice_match;const f=e.strstart>e.w_size-Qn?e.strstart-(e.w_size-Qn):0,l=e.window,u=e.w_mask,c=e.prev,h=e.strstart+ni;let d=l[r+a-1],p=l[r+a];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+a]!==p||l[i+a-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(o=ni-(h-r),r=h-ni,o>a){if(e.match_start=t,a=o,o>=s)break;d=l[r+a-1],p=l[r+a]}}while((t=c[t&u])>f&&--n!==0);return a<=e.lookahead?a:e.lookahead},fa=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Qn)&&(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),eM(e),r+=t),e.strm.avail_in===0)break;if(n=dp(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=de)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=ii(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=ii(e,e.ins_h,e.window[i+de-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<de)););}while(e.lookahead<Qn&&e.strm.avail_in!==0)},Lx=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,a=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o||(o=e.strm.avail_out-o,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r<n&&(r===0&&t!==un||t===ti||r!==i+e.strm.avail_in)))break;a=t===un&&r===i+e.strm.avail_in?1:0,op(e,0,0,a),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,$t(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&&(dp(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(a===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),a?la:t!==ti&&t!==un&&e.strm.avail_in===0&&e.strstart===e.block_start?sa:(o=e.window_size-e.strstart,e.strm.avail_in>o&&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++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(dp(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===un)&&t!==ti&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,a=t===un&&e.strm.avail_in===0&&r===i?1:0,op(e,e.block_start,r,a),e.block_start+=r,$t(e.strm)),a?ao:kt)},pp=(e,t)=>{let n,r;for(;;){if(e.lookahead<Qn){if(fa(e),e.lookahead<Qn&&t===ti)return kt;if(e.lookahead===0)break}if(n=0,e.lookahead>=de&&(e.ins_h=ii(e,e.ins_h,e.window[e.strstart+de-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-Qn&&(e.match_length=Mx(e,n)),e.match_length>=de)if(r=ei(e,e.strstart-e.match_start,e.match_length-de),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=de){e.match_length--;do e.strstart++,e.ins_h=ii(e,e.ins_h,e.window[e.strstart+de-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=ii(e,e.ins_h,e.window[e.strstart+1]);else r=ei(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Kt(e,!1),e.strm.avail_out===0))return kt}return e.insert=e.strstart<de-1?e.strstart:de-1,t===un?(Kt(e,!0),e.strm.avail_out===0?ao:la):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?kt:sa},ua=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<Qn){if(fa(e),e.lookahead<Qn&&t===ti)return kt;if(e.lookahead===0)break}if(n=0,e.lookahead>=de&&(e.ins_h=ii(e,e.ins_h,e.window[e.strstart+de-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=de-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Qn&&(e.match_length=Mx(e,n),e.match_length<=5&&(e.strategy===zP||e.match_length===de&&e.strstart-e.match_start>4096)&&(e.match_length=de-1)),e.prev_length>=de&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-de,r=ei(e,e.strstart-1-e.prev_match,e.prev_length-de),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=ii(e,e.ins_h,e.window[e.strstart+de-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=de-1,e.strstart++,r&&(Kt(e,!1),e.strm.avail_out===0))return kt}else if(e.match_available){if(r=ei(e,0,e.window[e.strstart-1]),r&&Kt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return kt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=ei(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<de-1?e.strstart:de-1,t===un?(Kt(e,!0),e.strm.avail_out===0?ao:la):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?kt:sa},tM=(e,t)=>{let n,r,i,o;const a=e.window;for(;;){if(e.lookahead<=ni){if(fa(e),e.lookahead<=ni&&t===ti)return kt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=de&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+ni;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=ni-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=de?(n=ei(e,1,e.match_length-de),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=ei(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Kt(e,!1),e.strm.avail_out===0))return kt}return e.insert=0,t===un?(Kt(e,!0),e.strm.avail_out===0?ao:la):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?kt:sa},nM=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(fa(e),e.lookahead===0)){if(t===ti)return kt;break}if(e.match_length=0,n=ei(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Kt(e,!1),e.strm.avail_out===0))return kt}return e.insert=0,t===un?(Kt(e,!0),e.strm.avail_out===0?ao:la):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?kt:sa};function Xn(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 bl=[new Xn(0,0,0,0,Lx),new Xn(4,4,8,4,pp),new Xn(4,5,16,8,pp),new Xn(4,6,32,32,pp),new Xn(4,4,16,16,ua),new Xn(8,16,32,32,ua),new Xn(8,16,128,128,ua),new Xn(8,32,128,256,ua),new Xn(32,128,258,1024,ua),new Xn(32,258,258,4096,ua)],rM=e=>{e.window_size=2*e.w_size,ri(e.head),e.max_lazy_match=bl[e.level].max_lazy,e.good_match=bl[e.level].good_length,e.nice_match=bl[e.level].nice_length,e.max_chain_length=bl[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=de-1,e.match_available=0,e.ins_h=0};function iM(){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=Ju,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(XP*2),this.dyn_dtree=new Uint16Array((2*YP+1)*2),this.bl_tree=new Uint16Array((2*QP+1)*2),ri(this.dyn_ltree),ri(this.dyn_dtree),ri(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array($P+1),this.heap=new Uint16Array(2*sp+1),ri(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*sp+1),ri(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 yl=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==aa&&t.status!==lp&&t.status!==fp&&t.status!==up&&t.status!==cp&&t.status!==hp&&t.status!==oo&&t.status!==gl?1:0},Nx=e=>{if(yl(e))return so(e,Yn);e.total_in=e.total_out=0,e.data_type=VP;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?lp:t.wrap?aa:oo,e.adler=t.wrap===2?0:1,t.last_flush=-2,FP(t),bt},Ox=e=>{const t=Nx(e);return t===bt&&rM(e.state),t},oM=(e,t)=>yl(e)||e.state.wrap!==2?Yn:(e.state.gzhead=t,bt),zx=(e,t,n,r,i,o)=>{if(!e)return Yn;let a=1;if(t===OP&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>jP||n!==Ju||r<8||r>15||t<0||t>9||o<0||o>GP||r===8&&a!==1)return so(e,Yn);r===8&&(r=9);const s=new iM;return e.state=s,s.strm=e,s.status=aa,s.wrap=a,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+de-1)/de),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=o,s.method=n,Ox(e)},aM=(e,t)=>zx(e,t,Ju,qP,ZP,HP),sM=(e,t)=>{if(yl(e)||t>Fx||t<0)return e?so(e,Yn):Yn;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===gl&&t!==un)return so(e,e.avail_out===0?ap:Yn);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if($t(e),e.avail_out===0)return n.last_flush=-1,bt}else if(e.avail_in===0&&Px(t)<=Px(r)&&t!==un)return so(e,ap);if(n.status===gl&&e.avail_in!==0)return so(e,ap);if(n.status===aa&&n.wrap===0&&(n.status=oo),n.status===aa){let i=Ju+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=Ku||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=KP),i+=31-i%31,ml(n,i),n.strstart!==0&&(ml(n,e.adler>>>16),ml(n,e.adler&65535)),e.adler=1,n.status=oo,$t(e),n.pending!==0)return n.last_flush=-1,bt}if(n.status===lp){if(e.adler=0,xe(n,31),xe(n,139),xe(n,8),n.gzhead)xe(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)),xe(n,n.gzhead.time&255),xe(n,n.gzhead.time>>8&255),xe(n,n.gzhead.time>>16&255),xe(n,n.gzhead.time>>24&255),xe(n,n.level===9?2:n.strategy>=Ku||n.level<2?4:0),xe(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(xe(n,n.gzhead.extra.length&255),xe(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=ht(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=fp;else if(xe(n,0),xe(n,0),xe(n,0),xe(n,0),xe(n,0),xe(n,n.level===9?2:n.strategy>=Ku||n.level<2?4:0),xe(n,JP),n.status=oo,$t(e),n.pending!==0)return n.last_flush=-1,bt}if(n.status===fp){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>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=ht(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,$t(e),n.pending!==0)return n.last_flush=-1,bt;i=0,o-=s}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=ht(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=up}if(n.status===up){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=ht(e.adler,n.pending_buf,n.pending-i,i)),$t(e),n.pending!==0)return n.last_flush=-1,bt;i=0}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,xe(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=ht(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=cp}if(n.status===cp){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=ht(e.adler,n.pending_buf,n.pending-i,i)),$t(e),n.pending!==0)return n.last_flush=-1,bt;i=0}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,xe(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=ht(e.adler,n.pending_buf,n.pending-i,i))}n.status=hp}if(n.status===hp){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&($t(e),n.pending!==0))return n.last_flush=-1,bt;xe(n,e.adler&255),xe(n,e.adler>>8&255),e.adler=0}if(n.status=oo,$t(e),n.pending!==0)return n.last_flush=-1,bt}if(e.avail_in!==0||n.lookahead!==0||t!==ti&&n.status!==gl){let i=n.level===0?Lx(n,t):n.strategy===Ku?nM(n,t):n.strategy===UP?tM(n,t):bl[n.level].func(n,t);if((i===ao||i===la)&&(n.status=gl),i===kt||i===ao)return e.avail_out===0&&(n.last_flush=-1),bt;if(i===sa&&(t===MP?PP(n):t!==Fx&&(op(n,0,0,!1),t===LP&&(ri(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),$t(e),e.avail_out===0))return n.last_flush=-1,bt}return t!==un?bt:n.wrap<=0?Rx:(n.wrap===2?(xe(n,e.adler&255),xe(n,e.adler>>8&255),xe(n,e.adler>>16&255),xe(n,e.adler>>24&255),xe(n,e.total_in&255),xe(n,e.total_in>>8&255),xe(n,e.total_in>>16&255),xe(n,e.total_in>>24&255)):(ml(n,e.adler>>>16),ml(n,e.adler&65535)),$t(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?bt:Rx)},lM=e=>{if(yl(e))return Yn;const t=e.state.status;return e.state=null,t===oo?so(e,NP):bt},fM=(e,t)=>{let n=t.length;if(yl(e))return Yn;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==aa||r.lookahead)return Yn;if(i===1&&(e.adler=dl(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(ri(r.head),r.strstart=0,r.block_start=0,r.insert=0);let f=new Uint8Array(r.w_size);f.set(t.subarray(n-r.w_size,n),0),t=f,n=r.w_size}const o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,fa(r);r.lookahead>=de;){let f=r.strstart,l=r.lookahead-(de-1);do r.ins_h=ii(r,r.ins_h,r.window[f+de-1]),r.prev[f&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=f,f++;while(--l);r.strstart=f,r.lookahead=de-1,fa(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=de-1,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,bt};var uM=aM,cM=zx,hM=Ox,dM=Nx,pM=oM,gM=sM,mM=lM,bM=fM,yM="pako deflate (from Nodeca project)",wl={deflateInit:uM,deflateInit2:cM,deflateReset:hM,deflateResetKeep:dM,deflateSetHeader:pM,deflate:gM,deflateEnd:mM,deflateSetDictionary:bM,deflateInfo:yM};const wM=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var vM=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)wM(n,r)&&(e[r]=n[r])}}return e},xM=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,o=e.length;r<o;r++){let a=e[r];n.set(a,i),i+=a.length}return n},ec={assign:vM,flattenChunks:xM};let Ux=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ux=!1}const vl=new Uint8Array(256);for(let e=0;e<256;e++)vl[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;vl[254]=vl[254]=1;var AM=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(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),o=0,i=0;o<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};const EM=(e,t)=>{if(t<65534&&e.subarray&&Ux)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 _M=(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 o=new Array(n*2);for(i=0,r=0;r<n;){let a=e[r++];if(a<128){o[i++]=a;continue}let s=vl[a];if(s>4){o[i++]=65533,r+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&r<n;)a=a<<6|e[r++]&63,s--;if(s>1){o[i++]=65533;continue}a<65536?o[i++]=a:(a-=65536,o[i++]=55296|a>>10&1023,o[i++]=56320|a&1023)}return EM(o,i)},SM=(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+vl[e[n]]>t?n:t},xl={string2buf:AM,buf2string:_M,utf8border:SM};function CM(){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 Gx=CM;const Hx=Object.prototype.toString,{Z_NO_FLUSH:IM,Z_SYNC_FLUSH:TM,Z_FULL_FLUSH:kM,Z_FINISH:BM,Z_OK:tc,Z_STREAM_END:DM,Z_DEFAULT_COMPRESSION:FM,Z_DEFAULT_STRATEGY:RM,Z_DEFLATED:PM}=pl;function gp(e){this.options=ec.assign({level:FM,method:PM,chunkSize:16384,windowBits:15,memLevel:8,strategy:RM},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 Gx,this.strm.avail_out=0;let n=wl.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==tc)throw new Error(oa[n]);if(t.header&&wl.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=xl.string2buf(t.dictionary):Hx.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=wl.deflateSetDictionary(this.strm,r),n!==tc)throw new Error(oa[n]);this._dict_set=!0}}gp.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?BM:IM,typeof e=="string"?n.input=xl.string2buf(e):Hx.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),(o===TM||o===kM)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=wl.deflate(n,o),i===DM)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=wl.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===tc;if(n.avail_out===0){this.onData(n.output);continue}if(o>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},gp.prototype.onData=function(e){this.chunks.push(e)},gp.prototype.onEnd=function(e){e===tc&&(this.result=ec.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const nc=16209,MM=16191;var LM=function(t,n){let r,i,o,a,s,f,l,u,c,h,d,p,b,y,w,S,C,_,k,B,T,R,M,j;const O=t.state;r=t.next_in,M=t.input,i=r+(t.avail_in-5),o=t.next_out,j=t.output,a=o-(n-t.avail_out),s=o+(t.avail_out-257),f=O.dmax,l=O.wsize,u=O.whave,c=O.wnext,h=O.window,d=O.hold,p=O.bits,b=O.lencode,y=O.distcode,w=(1<<O.lenbits)-1,S=(1<<O.distbits)-1;e:do{p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),C=b[d&w];t:for(;;){if(_=C>>>24,d>>>=_,p-=_,_=C>>>16&255,_===0)j[o++]=C&65535;else if(_&16){k=C&65535,_&=15,_&&(p<_&&(d+=M[r++]<<p,p+=8),k+=d&(1<<_)-1,d>>>=_,p-=_),p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),C=y[d&S];n:for(;;){if(_=C>>>24,d>>>=_,p-=_,_=C>>>16&255,_&16){if(B=C&65535,_&=15,p<_&&(d+=M[r++]<<p,p+=8,p<_&&(d+=M[r++]<<p,p+=8)),B+=d&(1<<_)-1,B>f){t.msg="invalid distance too far back",O.mode=nc;break e}if(d>>>=_,p-=_,_=o-a,B>_){if(_=B-_,_>u&&O.sane){t.msg="invalid distance too far back",O.mode=nc;break e}if(T=0,R=h,c===0){if(T+=l-_,_<k){k-=_;do j[o++]=h[T++];while(--_);T=o-B,R=j}}else if(c<_){if(T+=l+c-_,_-=c,_<k){k-=_;do j[o++]=h[T++];while(--_);if(T=0,c<k){_=c,k-=_;do j[o++]=h[T++];while(--_);T=o-B,R=j}}}else if(T+=c-_,_<k){k-=_;do j[o++]=h[T++];while(--_);T=o-B,R=j}for(;k>2;)j[o++]=R[T++],j[o++]=R[T++],j[o++]=R[T++],k-=3;k&&(j[o++]=R[T++],k>1&&(j[o++]=R[T++]))}else{T=o-B;do j[o++]=j[T++],j[o++]=j[T++],j[o++]=j[T++],k-=3;while(k>2);k&&(j[o++]=j[T++],k>1&&(j[o++]=j[T++]))}}else if(_&64){t.msg="invalid distance code",O.mode=nc;break e}else{C=y[(C&65535)+(d&(1<<_)-1)];continue n}break}}else if(_&64)if(_&32){O.mode=MM;break e}else{t.msg="invalid literal/length code",O.mode=nc;break e}else{C=b[(C&65535)+(d&(1<<_)-1)];continue t}break}}while(r<i&&o<s);k=p>>3,r-=k,p-=k<<3,d&=(1<<p)-1,t.next_in=r,t.next_out=o,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=o<s?257+(s-o):257-(o-s),O.hold=d,O.bits=p};const ca=15,Vx=852,jx=592,qx=0,mp=1,Zx=2,NM=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]),OM=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]),zM=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]),UM=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 Al=(e,t,n,r,i,o,a,s)=>{const f=s.bits;let l=0,u=0,c=0,h=0,d=0,p=0,b=0,y=0,w=0,S=0,C,_,k,B,T,R=null,M;const j=new Uint16Array(ca+1),O=new Uint16Array(ca+1);let ne=null,ae,pe,ke;for(l=0;l<=ca;l++)j[l]=0;for(u=0;u<r;u++)j[t[n+u]]++;for(d=f,h=ca;h>=1&&j[h]===0;h--);if(d>h&&(d=h),h===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(c=1;c<h&&j[c]===0;c++);for(d<c&&(d=c),y=1,l=1;l<=ca;l++)if(y<<=1,y-=j[l],y<0)return-1;if(y>0&&(e===qx||h!==1))return-1;for(O[1]=0,l=1;l<ca;l++)O[l+1]=O[l]+j[l];for(u=0;u<r;u++)t[n+u]!==0&&(a[O[t[n+u]]++]=u);if(e===qx?(R=ne=a,M=20):e===mp?(R=NM,ne=OM,M=257):(R=zM,ne=UM,M=0),S=0,u=0,l=c,T=o,p=d,b=0,k=-1,w=1<<d,B=w-1,e===mp&&w>Vx||e===Zx&&w>jx)return 1;for(;;){ae=l-b,a[u]+1<M?(pe=0,ke=a[u]):a[u]>=M?(pe=ne[a[u]-M],ke=R[a[u]-M]):(pe=32+64,ke=0),C=1<<l-b,_=1<<p,c=_;do _-=C,i[T+(S>>b)+_]=ae<<24|pe<<16|ke|0;while(_!==0);for(C=1<<l-1;S&C;)C>>=1;if(C!==0?(S&=C-1,S+=C):S=0,u++,--j[l]===0){if(l===h)break;l=t[n+a[u]]}if(l>d&&(S&B)!==k){for(b===0&&(b=d),T+=c,p=l-b,y=1<<p;p+b<h&&(y-=j[p+b],!(y<=0));)p++,y<<=1;if(w+=1<<p,e===mp&&w>Vx||e===Zx&&w>jx)return 1;k=S&B,i[k]=d<<24|p<<16|T-o|0}}return S!==0&&(i[T+S]=l-b<<24|64<<16|0),s.bits=d,0};const GM=0,Wx=1,Yx=2,{Z_FINISH:Qx,Z_BLOCK:HM,Z_TREES:rc,Z_OK:lo,Z_STREAM_END:VM,Z_NEED_DICT:jM,Z_STREAM_ERROR:cn,Z_DATA_ERROR:Xx,Z_MEM_ERROR:$x,Z_BUF_ERROR:qM,Z_DEFLATED:Kx}=pl,ic=16180,Jx=16181,eA=16182,tA=16183,nA=16184,rA=16185,iA=16186,oA=16187,aA=16188,sA=16189,oc=16190,hr=16191,bp=16192,lA=16193,yp=16194,fA=16195,uA=16196,cA=16197,hA=16198,ac=16199,sc=16200,dA=16201,pA=16202,gA=16203,mA=16204,bA=16205,wp=16206,yA=16207,wA=16208,je=16209,vA=16210,xA=16211,ZM=852,WM=592,YM=15,AA=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function QM(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const fo=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<ic||t.mode>xA?1:0},EA=e=>{if(fo(e))return cn;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=ic,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(ZM),t.distcode=t.distdyn=new Int32Array(WM),t.sane=1,t.back=-1,lo},_A=e=>{if(fo(e))return cn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,EA(e)},SA=(e,t)=>{let n;if(fo(e))return cn;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?cn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,_A(e))},CA=(e,t)=>{if(!e)return cn;const n=new QM;e.state=n,n.strm=e,n.window=null,n.mode=ic;const r=SA(e,t);return r!==lo&&(e.state=null),r},XM=e=>CA(e,YM);let IA=!0,vp,xp;const $M=e=>{if(IA){vp=new Int32Array(512),xp=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(Al(Wx,e.lens,0,288,vp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Al(Yx,e.lens,0,32,xp,0,e.work,{bits:5}),IA=!1}e.lencode=vp,e.lenbits=9,e.distcode=xp,e.distbits=5},TA=(e,t,n,r)=>{let i;const o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0},KM=(e,t)=>{let n,r,i,o,a,s,f,l,u,c,h,d,p,b,y=0,w,S,C,_,k,B,T,R;const M=new Uint8Array(4);let j,O;const ne=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(fo(e)||!e.output||!e.input&&e.avail_in!==0)return cn;n=e.state,n.mode===hr&&(n.mode=bp),a=e.next_out,i=e.output,f=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,c=s,h=f,R=lo;e:for(;;)switch(n.mode){case ic:if(n.wrap===0){n.mode=bp;break}for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=ht(n.check,M,2,0),l=0,u=0,n.mode=Jx;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=je;break}if((l&15)!==Kx){e.msg="unknown compression method",n.mode=je;break}if(l>>>=4,u-=4,T=(l&15)+8,n.wbits===0&&(n.wbits=T),T>15||T>n.wbits){e.msg="invalid window size",n.mode=je;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?sA:hr,l=0,u=0;break;case Jx:for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==Kx){e.msg="unknown compression method",n.mode=je;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=je;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=ht(n.check,M,2,0)),l=0,u=0,n.mode=eA;case eA:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=ht(n.check,M,4,0)),l=0,u=0,n.mode=tA;case tA:for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=ht(n.check,M,2,0)),l=0,u=0,n.mode=nA;case nA:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=ht(n.check,M,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=rA;case rA: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(o,o+d),T)),n.flags&512&&n.wrap&4&&(n.check=ht(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=iA;case iA:if(n.flags&2048){if(s===0)break e;d=0;do T=r[o+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=ht(n.check,r,d,o)),s-=d,o+=d,T)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=oA;case oA:if(n.flags&4096){if(s===0)break e;d=0;do T=r[o+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=ht(n.check,r,d,o)),s-=d,o+=d,T)break e}else n.head&&(n.head.comment=null);n.mode=aA;case aA:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=je;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=hr;break;case sA:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}e.adler=n.check=AA(l),l=0,u=0,n.mode=oc;case oc:if(n.havedict===0)return e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,jM;e.adler=n.check=1,n.mode=hr;case hr:if(t===HM||t===rc)break e;case bp:if(n.last){l>>>=u&7,u-=u&7,n.mode=wp;break}for(;u<3;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=lA;break;case 1:if($M(n),n.mode=ac,t===rc){l>>>=2,u-=2;break e}break;case 2:n.mode=uA;break;case 3:e.msg="invalid block type",n.mode=je}l>>>=2,u-=2;break;case lA:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=je;break}if(n.length=l&65535,l=0,u=0,n.mode=yp,t===rc)break e;case yp:n.mode=fA;case fA:if(d=n.length,d){if(d>s&&(d=s),d>f&&(d=f),d===0)break e;i.set(r.subarray(o,o+d),a),s-=d,o+=d,f-=d,a+=d,n.length-=d;break}n.mode=hr;break;case uA:for(;u<14;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=je;break}n.have=0,n.mode=cA;case cA:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.lens[ne[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[ne[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,j={bits:n.lenbits},R=Al(GM,n.lens,0,19,n.lencode,0,n.work,j),n.lenbits=j.bits,R){e.msg="invalid code lengths set",n.mode=je;break}n.have=0,n.mode=hA;case hA:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,S=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(C<16)l>>>=w,u-=w,n.lens[n.have++]=C;else{if(C===16){for(O=w+2;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(l>>>=w,u-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=je;break}T=n.lens[n.have-1],d=3+(l&3),l>>>=2,u-=2}else if(C===17){for(O=w+3;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=w,u-=w,T=0,d=3+(l&7),l>>>=3,u-=3}else{for(O=w+7;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=w,u-=w,T=0,d=11+(l&127),l>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=je;break}for(;d--;)n.lens[n.have++]=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,j={bits:n.lenbits},R=Al(Wx,n.lens,0,n.nlen,n.lencode,0,n.work,j),n.lenbits=j.bits,R){e.msg="invalid literal/lengths set",n.mode=je;break}if(n.distbits=6,n.distcode=n.distdyn,j={bits:n.distbits},R=Al(Yx,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,j),n.distbits=j.bits,R){e.msg="invalid distances set",n.mode=je;break}if(n.mode=ac,t===rc)break e;case ac:n.mode=sc;case sc:if(s>=6&&f>=258){e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,LM(e,h),a=e.next_out,i=e.output,f=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===hr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,S=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(S&&!(S&240)){for(_=w,k=S,B=C;y=n.lencode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,S=y>>>16&255,C=y&65535,!(_+w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=_,u-=_,n.back+=_}if(l>>>=w,u-=w,n.back+=w,n.length=C,S===0){n.mode=bA;break}if(S&32){n.back=-1,n.mode=hr;break}if(S&64){e.msg="invalid literal/length code",n.mode=je;break}n.extra=S&15,n.mode=dA;case dA:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=pA;case pA:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,S=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(!(S&240)){for(_=w,k=S,B=C;y=n.distcode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,S=y>>>16&255,C=y&65535,!(_+w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=_,u-=_,n.back+=_}if(l>>>=w,u-=w,n.back+=w,S&64){e.msg="invalid distance code",n.mode=je;break}n.offset=C,n.extra=S&15,n.mode=gA;case gA:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=je;break}n.mode=mA;case mA:if(f===0)break e;if(d=h-f,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),b=n.window}else b=i,p=a-n.offset,d=n.length;d>f&&(d=f),f-=d,n.length-=d;do i[a++]=b[p++];while(--d);n.length===0&&(n.mode=sc);break;case bA:if(f===0)break e;i[a++]=n.length,f--,n.mode=sc;break;case wp:if(n.wrap){for(;u<32;){if(s===0)break e;s--,l|=r[o++]<<u,u+=8}if(h-=f,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?ht(n.check,i,h,a-h):dl(n.check,i,h,a-h)),h=f,n.wrap&4&&(n.flags?l:AA(l))!==n.check){e.msg="incorrect data check",n.mode=je;break}l=0,u=0}n.mode=yA;case yA:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=je;break}l=0,u=0}n.mode=wA;case wA:R=VM;break e;case je:R=Xx;break e;case vA:return $x;case xA:default:return cn}return e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<je&&(n.mode<wp||t!==Qx))&&TA(e,e.output,e.next_out,h-e.avail_out),c-=e.avail_in,h-=e.avail_out,e.total_in+=c,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?ht(n.check,i,h,e.next_out-h):dl(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===hr?128:0)+(n.mode===ac||n.mode===yp?256:0),(c===0&&h===0||t===Qx)&&R===lo&&(R=qM),R},JM=e=>{if(fo(e))return cn;let t=e.state;return t.window&&(t.window=null),e.state=null,lo},eL=(e,t)=>{if(fo(e))return cn;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,lo):cn},tL=(e,t)=>{const n=t.length;let r,i,o;return fo(e)||(r=e.state,r.wrap!==0&&r.mode!==oc)?cn:r.mode===oc&&(i=1,i=dl(i,t,n,0),i!==r.check)?Xx:(o=TA(e,t,n,n),o?(r.mode=vA,$x):(r.havedict=1,lo))};var nL=_A,rL=SA,iL=EA,oL=XM,aL=CA,sL=KM,lL=JM,fL=eL,uL=tL,cL="pako inflate (from Nodeca project)",dr={inflateReset:nL,inflateReset2:rL,inflateResetKeep:iL,inflateInit:oL,inflateInit2:aL,inflate:sL,inflateEnd:lL,inflateGetHeader:fL,inflateSetDictionary:uL,inflateInfo:cL};function hL(){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 dL=hL;const kA=Object.prototype.toString,{Z_NO_FLUSH:pL,Z_FINISH:gL,Z_OK:El,Z_STREAM_END:Ap,Z_NEED_DICT:Ep,Z_STREAM_ERROR:mL,Z_DATA_ERROR:BA,Z_MEM_ERROR:bL}=pl;function _l(e){this.options=ec.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 Gx,this.strm.avail_out=0;let n=dr.inflateInit2(this.strm,t.windowBits);if(n!==El)throw new Error(oa[n]);if(this.header=new dL,dr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=xl.string2buf(t.dictionary):kA.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=dr.inflateSetDictionary(this.strm,t.dictionary),n!==El)))throw new Error(oa[n])}_l.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?gL:pL,kA.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),o=dr.inflate(n,a),o===Ep&&i&&(o=dr.inflateSetDictionary(n,i),o===El?o=dr.inflate(n,a):o===BA&&(o=Ep));n.avail_in>0&&o===Ap&&n.state.wrap>0&&e[n.next_in]!==0;)dr.inflateReset(n),o=dr.inflate(n,a);switch(o){case mL:case BA:case Ep:case bL:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===Ap))if(this.options.to==="string"){let f=xl.utf8border(n.output,n.next_out),l=n.next_out-f,u=xl.buf2string(n.output,f);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(f,f+l),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===El&&s===0)){if(o===Ap)return o=dr.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},_l.prototype.onData=function(e){this.chunks.push(e)},_l.prototype.onEnd=function(e){e===El&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ec.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function _p(e,t){const n=new _l(t);if(n.push(e),n.err)throw n.msg||oa[n.err];return n.result}function yL(e,t){return t=t||{},t.raw=!0,_p(e,t)}var wL=_l,vL=_p,xL=yL,AL=_p,EL=pl,_L={Inflate:wL,inflate:vL,inflateRaw:xL,ungzip:AL,constants:EL};const{Inflate:bz,inflate:yz,inflateRaw:SL,ungzip:wz}=_L;var CL=SL;function IL(e){return CL(e.subarray(2))}let TL=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function kL(e){e.sort((i,o)=>Number(i.offset)-Number(o.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 lc(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new TL("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const BL=1,DL=2,FL=3;function Sp(e,t,n,r){return e<r&&t>=n}function RL(e){const t=e?"big":"little",n=new Te().endianess(t).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),r=new Te().endianess(t).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:new Te().endianess(t).array("blocksToFetch",{length:"cnt",type:new Te().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:new Te().array("recurOffsets",{length:"cnt",type:new Te().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),i=new Te().endianess(t).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:new Te().endianess(t).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:{[FL]:new Te().array("items",{length:"itemCount",type:new Te().floatle("score")}),[DL]:new Te().array("items",{length:"itemCount",type:new Te().endianess(t).int32("start").floatle("score")}),[BL]:new Te().array("items",{length:"itemCount",type:new Te().endianess(t).int32("start").int32("end").floatle("score")})}}),bigBedParser:i,summaryParser:n,leafParser:r}}class DA{constructor(t,n,r,i,o,a){if(this.bbi=t,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=i,this.isCompressed=o,this.blockType=a,this.featureCache=new Yu({cache:new Qu({maxSize:1e3}),fill:async(f,l)=>{const u=Number(f.length),c=Number(f.offset),{buffer:h}=await this.bbi.read(ye.Buffer.alloc(u),0,u,c,{signal:l});return h}}),!(r>=0))throw new Error("invalid cirTreeOffset!");const s=RL(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}async readWigData(t,n,r,i,o){try{const{refsByName:a,bbi:s,cirTreeOffset:f,isBigEndian:l}=this,u=a[t];u===void 0&&i.complete();const c={chrId:u,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=s.read(ye.Buffer.alloc(48),0,48,Number(f),o));const{buffer:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],b=0;const y=(_,k,B)=>{try{const T=_.subarray(k),R=this.leafParser.parse(T);if(R.blocksToFetch&&(p=p.concat(R.blocksToFetch.filter(M=>w(M)).map(M=>({offset:M.blockOffset,length:M.blockSize})))),R.recurOffsets){const M=R.recurOffsets.filter(j=>w(j)).map(j=>Number(j.blockOffset));M.length>0&&C(M,B+1)}}catch(T){i.error(T)}},w=_=>{const{startChrom:k,startBase:B,endChrom:T,endBase:R}=_;return(k<u||k===u&&B<=r)&&(T>u||T===u&&R>=n)},S=async(_,k,B)=>{try{const T=k.max()-k.min(),R=k.min(),M=await this.featureCache.get(`${T}_${R}`,{length:T,offset:R},o==null?void 0:o.signal);for(const j of _)k.contains(j)&&(y(M,j-R,B),b-=1,b===0&&this.readFeatures(i,p,{...o,request:c}))}catch(T){i.error(T)}},C=(_,k)=>{try{b+=_.length;const B=4+Number(d)*32;let T=new Jr(_[0],_[0]+B);for(let R=1;R<_.length;R+=1){const M=new Jr(_[R],_[R]+B);T=T.union(M)}T.getRanges().map(R=>S(_,R,k))}catch(B){i.error(B)}};return C([Number(f)+48],1)}catch(a){i.error(a)}}parseSummaryBlock(t,n,r){const i=[];let o=n;const a=new DataView(t.buffer,t.byteOffset,t.length);for(;o<t.byteLength;){const s=a.getUint32(o,!0);o+=4;const f=a.getUint32(o,!0);o+=4;const l=a.getUint32(o,!0);o+=4;const u=a.getUint32(o,!0);o+=4;const c=a.getFloat32(o,!0);o+=4;const h=a.getFloat32(o,!0);o+=4;const d=a.getFloat32(o,!0);o+=4,o+=4,(!r||s===r.chrId&&Sp(f,l,r.start,r.end))&&i.push({start:f,end:l,maxScore:h,minScore:c,summary:!0,score:d/(u||1)})}return i}parseBigBedBlock(t,n,r,i){const o=[];let a=n;for(;a<t.byteLength;){const s=this.bigBedParser.parse(t.subarray(a));o.push({...s,uniqueId:`bb-${r+a}`}),a+=s.offset}return i?o.filter(s=>Sp(s.start,s.end,i.start,i.end)):o}parseBigWigBlock(t,n,r){const i=t.subarray(n),o=new DataView(i.buffer,i.byteOffset,i.length);let a=0;a+=4;const s=o.getInt32(a,!0);a+=8;const f=o.getUint32(a,!0);a+=4;const l=o.getUint32(a,!0);a+=4;const u=o.getUint8(a);a+=2;const c=o.getUint16(a,!0);a+=2;const h=new Array(c);switch(u){case 1:{for(let d=0;d<c;d++){const p=o.getInt32(a,!0);a+=4;const b=o.getInt32(a,!0);a+=4;const y=o.getFloat32(a,!0);a+=4,h[d]={start:p,end:b,score:y}}break}case 2:{for(let d=0;d<c;d++){const p=o.getInt32(a,!0);a+=4;const b=o.getFloat32(a,!0);a+=4,h[d]={score:b,start:p,end:p+l}}break}case 3:{for(let d=0;d<c;d++){const p=o.getFloat32(a,!0);a+=4;const b=s+d*f;h[d]={score:p,start:b,end:b+l}}break}}return r?h.filter(d=>Sp(d.start,d.end,r.start,r.end)):h}async readFeatures(t,n,r={}){try{const{blockType:i,isCompressed:o}=this,{signal:a,request:s}=r,f=kL(n);lc(a),await Promise.all(f.map(async l=>{lc(a);const{length:u,offset:c}=l,h=await this.featureCache.get(`${u}_${c}`,l,a);for(const d of l.blocks){lc(a);let p=Number(d.offset)-Number(l.offset),b=h;switch(o&&(b=IL(h.subarray(p)),p=0),lc(a),i){case"summary":{t.next(this.parseSummaryBlock(b,p,s));break}case"bigwig":{t.next(this.parseBigWigBlock(b,p,s));break}case"bigbed":{t.next(this.parseBigBedBlock(b,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 Cp=function(e,t){return Cp=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])},Cp(e,t)};function Ip(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Cp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function PL(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{l(r.next(u))}catch(c){a(c)}}function f(u){try{l(r.throw(u))}catch(c){a(c)}}function l(u){u.done?o(u.value):i(u.value).then(s,f)}l((r=r.apply(e,t||[])).next())})}function FA(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return f([l,u])}}function f(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Sl(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 fc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function uc(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function ha(e){return this instanceof ha?(this.v=e,this):new ha(e)}function ML(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(h){r[h]&&(i[h]=function(d){return new Promise(function(p,b){o.push([h,d,p,b])>1||s(h,d)})})}function s(h,d){try{f(r[h](d))}catch(p){c(o[0][3],p)}}function f(h){h.value instanceof ha?Promise.resolve(h.value.v).then(l,u):c(o[0][2],h)}function l(h){s("next",h)}function u(h){s("throw",h)}function c(h,d){h(d),o.shift(),o.length&&s(o[0][0],o[0][1])}}function LL(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 Sl=="function"?Sl(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(a){return new Promise(function(s,f){a=e[o](a),i(s,f,a.done,a.value)})}}function i(o,a,s,f){Promise.resolve(f).then(function(l){o({value:l,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function ot(e){return typeof e=="function"}function RA(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 Tp=RA(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
276
|
+
*/(function(e){const t=Du,n=w0,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=o(),!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 o(){try{const v=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(v,g),v.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 a(v){if(v>i)throw new RangeError('The value "'+v+'" is invalid for option "size"');const g=new Uint8Array(v);return Object.setPrototypeOf(g,s.prototype),g}function s(v,g,m){if(typeof v=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(v)}return f(v,g,m)}s.poolSize=8192;function f(v,g,m){if(typeof v=="string")return h(v,g);if(ArrayBuffer.isView(v))return p(v);if(v==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v);if(_t(v,ArrayBuffer)||v&&_t(v.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(_t(v,SharedArrayBuffer)||v&&_t(v.buffer,SharedArrayBuffer)))return b(v,g,m);if(typeof v=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const k=v.valueOf&&v.valueOf();if(k!=null&&k!==v)return s.from(k,g,m);const R=y(v);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof v[Symbol.toPrimitive]=="function")return s.from(v[Symbol.toPrimitive]("string"),g,m);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v)}s.from=function(v,g,m){return f(v,g,m)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(v){if(typeof v!="number")throw new TypeError('"size" argument must be of type number');if(v<0)throw new RangeError('The value "'+v+'" is invalid for option "size"')}function u(v,g,m){return l(v),v<=0?a(v):g!==void 0?typeof m=="string"?a(v).fill(g,m):a(v).fill(g):a(v)}s.alloc=function(v,g,m){return u(v,g,m)};function c(v){return l(v),a(v<0?0:w(v)|0)}s.allocUnsafe=function(v){return c(v)},s.allocUnsafeSlow=function(v){return c(v)};function h(v,g){if((typeof g!="string"||g==="")&&(g="utf8"),!s.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const m=C(v,g)|0;let k=a(m);const R=k.write(v,g);return R!==m&&(k=k.slice(0,R)),k}function d(v){const g=v.length<0?0:w(v.length)|0,m=a(g);for(let k=0;k<g;k+=1)m[k]=v[k]&255;return m}function p(v){if(_t(v,Uint8Array)){const g=new Uint8Array(v);return b(g.buffer,g.byteOffset,g.byteLength)}return d(v)}function b(v,g,m){if(g<0||v.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(v.byteLength<g+(m||0))throw new RangeError('"length" is outside of buffer bounds');let k;return g===void 0&&m===void 0?k=new Uint8Array(v):m===void 0?k=new Uint8Array(v,g):k=new Uint8Array(v,g,m),Object.setPrototypeOf(k,s.prototype),k}function y(v){if(s.isBuffer(v)){const g=w(v.length)|0,m=a(g);return m.length===0||v.copy(m,0,0,g),m}if(v.length!==void 0)return typeof v.length!="number"||yr(v.length)?a(0):d(v);if(v.type==="Buffer"&&Array.isArray(v.data))return d(v.data)}function w(v){if(v>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return v|0}function _(v){return+v!=v&&(v=0),s.alloc(+v)}s.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==s.prototype},s.compare=function(g,m){if(_t(g,Uint8Array)&&(g=s.from(g,g.offset,g.byteLength)),_t(m,Uint8Array)&&(m=s.from(m,m.offset,m.byteLength)),!s.isBuffer(g)||!s.isBuffer(m))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===m)return 0;let k=g.length,R=m.length;for(let N=0,V=Math.min(k,R);N<V;++N)if(g[N]!==m[N]){k=g[N],R=m[N];break}return k<R?-1:R<k?1:0},s.isEncoding=function(g){switch(String(g).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(g,m){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return s.alloc(0);let k;if(m===void 0)for(m=0,k=0;k<g.length;++k)m+=g[k].length;const R=s.allocUnsafe(m);let N=0;for(k=0;k<g.length;++k){let V=g[k];if(_t(V,Uint8Array))N+V.length>R.length?(s.isBuffer(V)||(V=s.from(V)),V.copy(R,N)):Uint8Array.prototype.set.call(R,V,N);else if(s.isBuffer(V))V.copy(R,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=V.length}return R};function C(v,g){if(s.isBuffer(v))return v.length;if(ArrayBuffer.isView(v)||_t(v,ArrayBuffer))return v.byteLength;if(typeof v!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof v);const m=v.length,k=arguments.length>2&&arguments[2]===!0;if(!k&&m===0)return 0;let R=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return m;case"utf8":case"utf-8":return fe(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m*2;case"hex":return m>>>1;case"base64":return si(v).length;default:if(R)return k?-1:fe(v).length;g=(""+g).toLowerCase(),R=!0}}s.byteLength=C;function S(v,g,m){let k=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((m===void 0||m>this.length)&&(m=this.length),m<=0)||(m>>>=0,g>>>=0,m<=g))return"";for(v||(v="utf8");;)switch(v){case"hex":return Ze(this,g,m);case"utf8":case"utf-8":return pe(this,g,m);case"ascii":return De(this,g,m);case"latin1":case"binary":return $e(this,g,m);case"base64":return ae(this,g,m);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ke(this,g,m);default:if(k)throw new TypeError("Unknown encoding: "+v);v=(v+"").toLowerCase(),k=!0}}s.prototype._isBuffer=!0;function T(v,g,m){const k=v[g];v[g]=v[m],v[m]=k}s.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let m=0;m<g;m+=2)T(this,m,m+1);return this},s.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let m=0;m<g;m+=4)T(this,m,m+3),T(this,m+1,m+2);return this},s.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let m=0;m<g;m+=8)T(this,m,m+7),T(this,m+1,m+6),T(this,m+2,m+5),T(this,m+3,m+4);return this},s.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?pe(this,0,g):S.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(g){if(!s.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:s.compare(this,g)===0},s.prototype.inspect=function(){let g="";const m=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,m).replace(/(.{2})/g,"$1 ").trim(),this.length>m&&(g+=" ... "),"<Buffer "+g+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(g,m,k,R,N){if(_t(g,Uint8Array)&&(g=s.from(g,g.offset,g.byteLength)),!s.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(m===void 0&&(m=0),k===void 0&&(k=g?g.length:0),R===void 0&&(R=0),N===void 0&&(N=this.length),m<0||k>g.length||R<0||N>this.length)throw new RangeError("out of range index");if(R>=N&&m>=k)return 0;if(R>=N)return-1;if(m>=k)return 1;if(m>>>=0,k>>>=0,R>>>=0,N>>>=0,this===g)return 0;let V=N-R,ue=k-m;const Ge=Math.min(V,ue),Me=this.slice(R,N),We=g.slice(m,k);for(let Se=0;Se<Ge;++Se)if(Me[Se]!==We[Se]){V=Me[Se],ue=We[Se];break}return V<ue?-1:ue<V?1:0};function B(v,g,m,k,R){if(v.length===0)return-1;if(typeof m=="string"?(k=m,m=0):m>2147483647?m=2147483647:m<-2147483648&&(m=-2147483648),m=+m,yr(m)&&(m=R?0:v.length-1),m<0&&(m=v.length+m),m>=v.length){if(R)return-1;m=v.length-1}else if(m<0)if(R)m=0;else return-1;if(typeof g=="string"&&(g=s.from(g,k)),s.isBuffer(g))return g.length===0?-1:I(v,g,m,k,R);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(v,g,m):Uint8Array.prototype.lastIndexOf.call(v,g,m):I(v,[g],m,k,R);throw new TypeError("val must be string, number or Buffer")}function I(v,g,m,k,R){let N=1,V=v.length,ue=g.length;if(k!==void 0&&(k=String(k).toLowerCase(),k==="ucs2"||k==="ucs-2"||k==="utf16le"||k==="utf-16le")){if(v.length<2||g.length<2)return-1;N=2,V/=2,ue/=2,m/=2}function Ge(We,Se){return N===1?We[Se]:We.readUInt16BE(Se*N)}let Me;if(R){let We=-1;for(Me=m;Me<V;Me++)if(Ge(v,Me)===Ge(g,We===-1?0:Me-We)){if(We===-1&&(We=Me),Me-We+1===ue)return We*N}else We!==-1&&(Me-=Me-We),We=-1}else for(m+ue>V&&(m=V-ue),Me=m;Me>=0;Me--){let We=!0;for(let Se=0;Se<ue;Se++)if(Ge(v,Me+Se)!==Ge(g,Se)){We=!1;break}if(We)return Me}return-1}s.prototype.includes=function(g,m,k){return this.indexOf(g,m,k)!==-1},s.prototype.indexOf=function(g,m,k){return B(this,g,m,k,!0)},s.prototype.lastIndexOf=function(g,m,k){return B(this,g,m,k,!1)};function F(v,g,m,k){m=Number(m)||0;const R=v.length-m;k?(k=Number(k),k>R&&(k=R)):k=R;const N=g.length;k>N/2&&(k=N/2);let V;for(V=0;V<k;++V){const ue=parseInt(g.substr(V*2,2),16);if(yr(ue))return V;v[m+V]=ue}return V}function P(v,g,m,k){return li(fe(g,v.length-m),v,m,k)}function j(v,g,m,k){return li(Zt(g),v,m,k)}function O(v,g,m,k){return li(si(g),v,m,k)}function re(v,g,m,k){return li(ai(g,v.length-m),v,m,k)}s.prototype.write=function(g,m,k,R){if(m===void 0)R="utf8",k=this.length,m=0;else if(k===void 0&&typeof m=="string")R=m,k=this.length,m=0;else if(isFinite(m))m=m>>>0,isFinite(k)?(k=k>>>0,R===void 0&&(R="utf8")):(R=k,k=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const N=this.length-m;if((k===void 0||k>N)&&(k=N),g.length>0&&(k<0||m<0)||m>this.length)throw new RangeError("Attempt to write outside buffer bounds");R||(R="utf8");let V=!1;for(;;)switch(R){case"hex":return F(this,g,m,k);case"utf8":case"utf-8":return P(this,g,m,k);case"ascii":case"latin1":case"binary":return j(this,g,m,k);case"base64":return O(this,g,m,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,g,m,k);default:if(V)throw new TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),V=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ae(v,g,m){return g===0&&m===v.length?t.fromByteArray(v):t.fromByteArray(v.slice(g,m))}function pe(v,g,m){m=Math.min(v.length,m);const k=[];let R=g;for(;R<m;){const N=v[R];let V=null,ue=N>239?4:N>223?3:N>191?2:1;if(R+ue<=m){let Ge,Me,We,Se;switch(ue){case 1:N<128&&(V=N);break;case 2:Ge=v[R+1],(Ge&192)===128&&(Se=(N&31)<<6|Ge&63,Se>127&&(V=Se));break;case 3:Ge=v[R+1],Me=v[R+2],(Ge&192)===128&&(Me&192)===128&&(Se=(N&15)<<12|(Ge&63)<<6|Me&63,Se>2047&&(Se<55296||Se>57343)&&(V=Se));break;case 4:Ge=v[R+1],Me=v[R+2],We=v[R+3],(Ge&192)===128&&(Me&192)===128&&(We&192)===128&&(Se=(N&15)<<18|(Ge&63)<<12|(Me&63)<<6|We&63,Se>65535&&Se<1114112&&(V=Se))}}V===null?(V=65533,ue=1):V>65535&&(V-=65536,k.push(V>>>10&1023|55296),V=56320|V&1023),k.push(V),R+=ue}return Xe(k)}const Te=4096;function Xe(v){const g=v.length;if(g<=Te)return String.fromCharCode.apply(String,v);let m="",k=0;for(;k<g;)m+=String.fromCharCode.apply(String,v.slice(k,k+=Te));return m}function De(v,g,m){let k="";m=Math.min(v.length,m);for(let R=g;R<m;++R)k+=String.fromCharCode(v[R]&127);return k}function $e(v,g,m){let k="";m=Math.min(v.length,m);for(let R=g;R<m;++R)k+=String.fromCharCode(v[R]);return k}function Ze(v,g,m){const k=v.length;(!g||g<0)&&(g=0),(!m||m<0||m>k)&&(m=k);let R="";for(let N=g;N<m;++N)R+=fi[v[N]];return R}function Ke(v,g,m){const k=v.slice(g,m);let R="";for(let N=0;N<k.length-1;N+=2)R+=String.fromCharCode(k[N]+k[N+1]*256);return R}s.prototype.slice=function(g,m){const k=this.length;g=~~g,m=m===void 0?k:~~m,g<0?(g+=k,g<0&&(g=0)):g>k&&(g=k),m<0?(m+=k,m<0&&(m=0)):m>k&&(m=k),m<g&&(m=g);const R=this.subarray(g,m);return Object.setPrototypeOf(R,s.prototype),R};function Ee(v,g,m){if(v%1!==0||v<0)throw new RangeError("offset is not uint");if(v+g>m)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(g,m,k){g=g>>>0,m=m>>>0,k||Ee(g,m,this.length);let R=this[g],N=1,V=0;for(;++V<m&&(N*=256);)R+=this[g+V]*N;return R},s.prototype.readUintBE=s.prototype.readUIntBE=function(g,m,k){g=g>>>0,m=m>>>0,k||Ee(g,m,this.length);let R=this[g+--m],N=1;for(;m>0&&(N*=256);)R+=this[g+--m]*N;return R},s.prototype.readUint8=s.prototype.readUInt8=function(g,m){return g=g>>>0,m||Ee(g,1,this.length),this[g]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(g,m){return g=g>>>0,m||Ee(g,2,this.length),this[g]|this[g+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(g,m){return g=g>>>0,m||Ee(g,2,this.length),this[g]<<8|this[g+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},s.prototype.readBigUInt64LE=Wt(function(g){g=g>>>0,G(g,"offset");const m=this[g],k=this[g+7];(m===void 0||k===void 0)&&Z(g,this.length-8);const R=m+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,N=this[++g]+this[++g]*2**8+this[++g]*2**16+k*2**24;return BigInt(R)+(BigInt(N)<<BigInt(32))}),s.prototype.readBigUInt64BE=Wt(function(g){g=g>>>0,G(g,"offset");const m=this[g],k=this[g+7];(m===void 0||k===void 0)&&Z(g,this.length-8);const R=m*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],N=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+k;return(BigInt(R)<<BigInt(32))+BigInt(N)}),s.prototype.readIntLE=function(g,m,k){g=g>>>0,m=m>>>0,k||Ee(g,m,this.length);let R=this[g],N=1,V=0;for(;++V<m&&(N*=256);)R+=this[g+V]*N;return N*=128,R>=N&&(R-=Math.pow(2,8*m)),R},s.prototype.readIntBE=function(g,m,k){g=g>>>0,m=m>>>0,k||Ee(g,m,this.length);let R=m,N=1,V=this[g+--R];for(;R>0&&(N*=256);)V+=this[g+--R]*N;return N*=128,V>=N&&(V-=Math.pow(2,8*m)),V},s.prototype.readInt8=function(g,m){return g=g>>>0,m||Ee(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},s.prototype.readInt16LE=function(g,m){g=g>>>0,m||Ee(g,2,this.length);const k=this[g]|this[g+1]<<8;return k&32768?k|4294901760:k},s.prototype.readInt16BE=function(g,m){g=g>>>0,m||Ee(g,2,this.length);const k=this[g+1]|this[g]<<8;return k&32768?k|4294901760:k},s.prototype.readInt32LE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},s.prototype.readInt32BE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},s.prototype.readBigInt64LE=Wt(function(g){g=g>>>0,G(g,"offset");const m=this[g],k=this[g+7];(m===void 0||k===void 0)&&Z(g,this.length-8);const R=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(k<<24);return(BigInt(R)<<BigInt(32))+BigInt(m+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),s.prototype.readBigInt64BE=Wt(function(g){g=g>>>0,G(g,"offset");const m=this[g],k=this[g+7];(m===void 0||k===void 0)&&Z(g,this.length-8);const R=(m<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(R)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+k)}),s.prototype.readFloatLE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),n.read(this,g,!0,23,4)},s.prototype.readFloatBE=function(g,m){return g=g>>>0,m||Ee(g,4,this.length),n.read(this,g,!1,23,4)},s.prototype.readDoubleLE=function(g,m){return g=g>>>0,m||Ee(g,8,this.length),n.read(this,g,!0,52,8)},s.prototype.readDoubleBE=function(g,m){return g=g>>>0,m||Ee(g,8,this.length),n.read(this,g,!1,52,8)};function _e(v,g,m,k,R,N){if(!s.isBuffer(v))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>R||g<N)throw new RangeError('"value" argument is out of bounds');if(m+k>v.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(g,m,k,R){if(g=+g,m=m>>>0,k=k>>>0,!R){const ue=Math.pow(2,8*k)-1;_e(this,g,m,k,ue,0)}let N=1,V=0;for(this[m]=g&255;++V<k&&(N*=256);)this[m+V]=g/N&255;return m+k},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(g,m,k,R){if(g=+g,m=m>>>0,k=k>>>0,!R){const ue=Math.pow(2,8*k)-1;_e(this,g,m,k,ue,0)}let N=k-1,V=1;for(this[m+N]=g&255;--N>=0&&(V*=256);)this[m+N]=g/V&255;return m+k},s.prototype.writeUint8=s.prototype.writeUInt8=function(g,m,k){return g=+g,m=m>>>0,k||_e(this,g,m,1,255,0),this[m]=g&255,m+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(g,m,k){return g=+g,m=m>>>0,k||_e(this,g,m,2,65535,0),this[m]=g&255,this[m+1]=g>>>8,m+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(g,m,k){return g=+g,m=m>>>0,k||_e(this,g,m,2,65535,0),this[m]=g>>>8,this[m+1]=g&255,m+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(g,m,k){return g=+g,m=m>>>0,k||_e(this,g,m,4,4294967295,0),this[m+3]=g>>>24,this[m+2]=g>>>16,this[m+1]=g>>>8,this[m]=g&255,m+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(g,m,k){return g=+g,m=m>>>0,k||_e(this,g,m,4,4294967295,0),this[m]=g>>>24,this[m+1]=g>>>16,this[m+2]=g>>>8,this[m+3]=g&255,m+4};function dt(v,g,m,k,R){x(g,k,R,v,m,7);let N=Number(g&BigInt(4294967295));v[m++]=N,N=N>>8,v[m++]=N,N=N>>8,v[m++]=N,N=N>>8,v[m++]=N;let V=Number(g>>BigInt(32)&BigInt(4294967295));return v[m++]=V,V=V>>8,v[m++]=V,V=V>>8,v[m++]=V,V=V>>8,v[m++]=V,m}function qt(v,g,m,k,R){x(g,k,R,v,m,7);let N=Number(g&BigInt(4294967295));v[m+7]=N,N=N>>8,v[m+6]=N,N=N>>8,v[m+5]=N,N=N>>8,v[m+4]=N;let V=Number(g>>BigInt(32)&BigInt(4294967295));return v[m+3]=V,V=V>>8,v[m+2]=V,V=V>>8,v[m+1]=V,V=V>>8,v[m]=V,m+8}s.prototype.writeBigUInt64LE=Wt(function(g,m=0){return dt(this,g,m,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Wt(function(g,m=0){return qt(this,g,m,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(g,m,k,R){if(g=+g,m=m>>>0,!R){const Ge=Math.pow(2,8*k-1);_e(this,g,m,k,Ge-1,-Ge)}let N=0,V=1,ue=0;for(this[m]=g&255;++N<k&&(V*=256);)g<0&&ue===0&&this[m+N-1]!==0&&(ue=1),this[m+N]=(g/V>>0)-ue&255;return m+k},s.prototype.writeIntBE=function(g,m,k,R){if(g=+g,m=m>>>0,!R){const Ge=Math.pow(2,8*k-1);_e(this,g,m,k,Ge-1,-Ge)}let N=k-1,V=1,ue=0;for(this[m+N]=g&255;--N>=0&&(V*=256);)g<0&&ue===0&&this[m+N+1]!==0&&(ue=1),this[m+N]=(g/V>>0)-ue&255;return m+k},s.prototype.writeInt8=function(g,m,k){return g=+g,m=m>>>0,k||_e(this,g,m,1,127,-128),g<0&&(g=255+g+1),this[m]=g&255,m+1},s.prototype.writeInt16LE=function(g,m,k){return g=+g,m=m>>>0,k||_e(this,g,m,2,32767,-32768),this[m]=g&255,this[m+1]=g>>>8,m+2},s.prototype.writeInt16BE=function(g,m,k){return g=+g,m=m>>>0,k||_e(this,g,m,2,32767,-32768),this[m]=g>>>8,this[m+1]=g&255,m+2},s.prototype.writeInt32LE=function(g,m,k){return g=+g,m=m>>>0,k||_e(this,g,m,4,2147483647,-2147483648),this[m]=g&255,this[m+1]=g>>>8,this[m+2]=g>>>16,this[m+3]=g>>>24,m+4},s.prototype.writeInt32BE=function(g,m,k){return g=+g,m=m>>>0,k||_e(this,g,m,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[m]=g>>>24,this[m+1]=g>>>16,this[m+2]=g>>>8,this[m+3]=g&255,m+4},s.prototype.writeBigInt64LE=Wt(function(g,m=0){return dt(this,g,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Wt(function(g,m=0){return qt(this,g,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Oe(v,g,m,k,R,N){if(m+k>v.length)throw new RangeError("Index out of range");if(m<0)throw new RangeError("Index out of range")}function L(v,g,m,k,R){return g=+g,m=m>>>0,R||Oe(v,g,m,4),n.write(v,g,m,k,23,4),m+4}s.prototype.writeFloatLE=function(g,m,k){return L(this,g,m,!0,k)},s.prototype.writeFloatBE=function(g,m,k){return L(this,g,m,!1,k)};function M(v,g,m,k,R){return g=+g,m=m>>>0,R||Oe(v,g,m,8),n.write(v,g,m,k,52,8),m+8}s.prototype.writeDoubleLE=function(g,m,k){return M(this,g,m,!0,k)},s.prototype.writeDoubleBE=function(g,m,k){return M(this,g,m,!1,k)},s.prototype.copy=function(g,m,k,R){if(!s.isBuffer(g))throw new TypeError("argument should be a Buffer");if(k||(k=0),!R&&R!==0&&(R=this.length),m>=g.length&&(m=g.length),m||(m=0),R>0&&R<k&&(R=k),R===k||g.length===0||this.length===0)return 0;if(m<0)throw new RangeError("targetStart out of bounds");if(k<0||k>=this.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),g.length-m<R-k&&(R=g.length-m+k);const N=R-k;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(m,k,R):Uint8Array.prototype.set.call(g,this.subarray(k,R),m),N},s.prototype.fill=function(g,m,k,R){if(typeof g=="string"){if(typeof m=="string"?(R=m,m=0,k=this.length):typeof k=="string"&&(R=k,k=this.length),R!==void 0&&typeof R!="string")throw new TypeError("encoding must be a string");if(typeof R=="string"&&!s.isEncoding(R))throw new TypeError("Unknown encoding: "+R);if(g.length===1){const V=g.charCodeAt(0);(R==="utf8"&&V<128||R==="latin1")&&(g=V)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(m<0||this.length<m||this.length<k)throw new RangeError("Out of range index");if(k<=m)return this;m=m>>>0,k=k===void 0?this.length:k>>>0,g||(g=0);let N;if(typeof g=="number")for(N=m;N<k;++N)this[N]=g;else{const V=s.isBuffer(g)?g:s.from(g,R),ue=V.length;if(ue===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(N=0;N<k-m;++N)this[N+m]=V[N%ue]}return this};const q={};function H(v,g,m){q[v]=class extends m{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${v}]`,this.stack,delete this.name}get code(){return v}set code(R){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:R,writable:!0})}toString(){return`${this.name} [${v}]: ${this.message}`}}}H("ERR_BUFFER_OUT_OF_BOUNDS",function(v){return v?`${v} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),H("ERR_INVALID_ARG_TYPE",function(v,g){return`The "${v}" argument must be of type number. Received type ${typeof g}`},TypeError),H("ERR_OUT_OF_RANGE",function(v,g,m){let k=`The value of "${v}" is out of range.`,R=m;return Number.isInteger(m)&&Math.abs(m)>2**32?R=W(String(m)):typeof m=="bigint"&&(R=String(m),(m>BigInt(2)**BigInt(32)||m<-(BigInt(2)**BigInt(32)))&&(R=W(R)),R+="n"),k+=` It must be ${g}. Received ${R}`,k},RangeError);function W(v){let g="",m=v.length;const k=v[0]==="-"?1:0;for(;m>=k+4;m-=3)g=`_${v.slice(m-3,m)}${g}`;return`${v.slice(0,m)}${g}`}function E(v,g,m){G(g,"offset"),(v[g]===void 0||v[g+m]===void 0)&&Z(g,v.length-(m+1))}function x(v,g,m,k,R,N){if(v>m||v<g){const V=typeof g=="bigint"?"n":"";let ue;throw N>3?g===0||g===BigInt(0)?ue=`>= 0${V} and < 2${V} ** ${(N+1)*8}${V}`:ue=`>= -(2${V} ** ${(N+1)*8-1}${V}) and < 2 ** ${(N+1)*8-1}${V}`:ue=`>= ${g}${V} and <= ${m}${V}`,new q.ERR_OUT_OF_RANGE("value",ue,v)}E(k,R,N)}function G(v,g){if(typeof v!="number")throw new q.ERR_INVALID_ARG_TYPE(g,"number",v)}function Z(v,g,m){throw Math.floor(v)!==v?(G(v,m),new q.ERR_OUT_OF_RANGE(m||"offset","an integer",v)):g<0?new q.ERR_BUFFER_OUT_OF_BOUNDS:new q.ERR_OUT_OF_RANGE(m||"offset",`>= ${m?1:0} and <= ${g}`,v)}const le=/[^+/0-9A-Za-z-_]/g;function J(v){if(v=v.split("=")[0],v=v.trim().replace(le,""),v.length<2)return"";for(;v.length%4!==0;)v=v+"=";return v}function fe(v,g){g=g||1/0;let m;const k=v.length;let R=null;const N=[];for(let V=0;V<k;++V){if(m=v.charCodeAt(V),m>55295&&m<57344){if(!R){if(m>56319){(g-=3)>-1&&N.push(239,191,189);continue}else if(V+1===k){(g-=3)>-1&&N.push(239,191,189);continue}R=m;continue}if(m<56320){(g-=3)>-1&&N.push(239,191,189),R=m;continue}m=(R-55296<<10|m-56320)+65536}else R&&(g-=3)>-1&&N.push(239,191,189);if(R=null,m<128){if((g-=1)<0)break;N.push(m)}else if(m<2048){if((g-=2)<0)break;N.push(m>>6|192,m&63|128)}else if(m<65536){if((g-=3)<0)break;N.push(m>>12|224,m>>6&63|128,m&63|128)}else if(m<1114112){if((g-=4)<0)break;N.push(m>>18|240,m>>12&63|128,m>>6&63|128,m&63|128)}else throw new Error("Invalid code point")}return N}function Zt(v){const g=[];for(let m=0;m<v.length;++m)g.push(v.charCodeAt(m)&255);return g}function ai(v,g){let m,k,R;const N=[];for(let V=0;V<v.length&&!((g-=2)<0);++V)m=v.charCodeAt(V),k=m>>8,R=m%256,N.push(R),N.push(k);return N}function si(v){return t.toByteArray(J(v))}function li(v,g,m,k){let R;for(R=0;R<k&&!(R+m>=g.length||R>=v.length);++R)g[R+m]=v[R];return R}function _t(v,g){return v instanceof g||v!=null&&v.constructor!=null&&v.constructor.name!=null&&v.constructor.name===g.name}function yr(v){return v!==v}const fi=function(){const v="0123456789abcdef",g=new Array(256);for(let m=0;m<16;++m){const k=m*16;for(let R=0;R<16;++R)g[k+R]=v[m]+v[R]}return g}();function Wt(v){return typeof BigInt>"u"?$n:v}function $n(){throw new Error("BigInt not supported")}})(ye);const Cw=ve({__proto__:null,default:Ws(ye)},[ye]),ct={},XR=Object.freeze(Object.defineProperty({__proto__:null,default:ct},Symbol.toStringTag,{value:"Module"})),v0=typeof window<"u"?window:typeof self<"u"?self:{fetch:void 0};class qi{async getBufferFromResponse(t){if(typeof t.buffer=="function")return t.buffer();if(typeof t.arrayBuffer=="function"){const n=await t.arrayBuffer();return ye.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||v0.fetch&&v0.fetch.bind(v0);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,o={}){const{headers:a={},signal:s,overrides:f={}}=o;r<1/0?a.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(a.range=`bytes=${i}-`);const l={...this.baseOverrides,...f,headers:{...a,...f.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s},u=await this.fetch(this.url,l);if(!u.ok)throw new Error(`HTTP ${u.status} ${u.statusText} ${this.url}`);if(u.status===200&&i===0||u.status===206){const c=await this.getBufferFromResponse(u),h=c.copy(t,n,0,Math.min(r,c.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:o,overrides:a={}}=r,s={headers:i,method:"GET",redirect:"follow",mode:"cors",signal:o,...this.baseOverrides,...a},f=await this.fetch(this.url,s);if(!f)throw new Error("generic-filehandle failed to fetch");if(f.status!==200)throw Object.assign(new Error(`HTTP ${f.status} fetching ${this.url}`),{status:f.status});if(n==="utf8")return f.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(f)}async stat(){if(!this._stat){const t=ye.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 kw(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 $R(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 KR{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 o=i,a=o+r,s=await kw(this.blob.slice(o,a)),f=ye.Buffer.from(s);return{bytesRead:f.copy(t,n),buffer:f}}async readFile(t){let n;if(typeof t=="string"?n=t:n=t&&t.encoding,n==="utf8")return $R(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await kw(this.blob);return ye.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function Iw(e,t={}){return new qi(e,t)}function JR(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return Iw(e,r);if(t!==void 0)return new ct(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const Ys=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:KR,LocalFile:ct,RemoteFile:qi,fromUrl:Iw,open:JR},Symbol.toStringTag,{value:"Module"}));var sr={};(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(o,a){return Object.prototype.hasOwnProperty.call(o,a)}e.assign=function(o){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var s=a.shift();if(s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var f in s)n(s,f)&&(o[f]=s[f])}}return o},e.shrinkBuf=function(o,a){return o.length===a?o:o.subarray?o.subarray(0,a):(o.length=a,o)};var r={arraySet:function(o,a,s,f,l){if(a.subarray&&o.subarray){o.set(a.subarray(s,s+f),l);return}for(var u=0;u<f;u++)o[l+u]=a[s+u]},flattenChunks:function(o){var a,s,f,l,u,c;for(f=0,a=0,s=o.length;a<s;a++)f+=o[a].length;for(c=new Uint8Array(f),l=0,a=0,s=o.length;a<s;a++)u=o[a],c.set(u,l),l+=u.length;return c}},i={arraySet:function(o,a,s,f,l){for(var u=0;u<f;u++)o[l+u]=a[s+u]},flattenChunks:function(o){return[].concat.apply([],o)}};e.setTyped=function(o){o?(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)})(sr);var Qs={},Gn={},Yo={},eF=sr,tF=4,Tw=0,Bw=1,nF=2;function Qo(e){for(var t=e.length;--t>=0;)e[t]=0}var rF=0,Dw=1,iF=2,oF=3,aF=258,x0=29,Xs=256,$s=Xs+1+x0,Xo=30,A0=19,Rw=2*$s+1,Zi=15,E0=16,sF=7,_0=256,Fw=16,Mw=17,Pw=18,S0=[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],Ru=[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],lF=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Lw=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fF=512,lr=new Array(($s+2)*2);Qo(lr);var Ks=new Array(Xo*2);Qo(Ks);var Js=new Array(fF);Qo(Js);var el=new Array(aF-oF+1);Qo(el);var C0=new Array(x0);Qo(C0);var Fu=new Array(Xo);Qo(Fu);function k0(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 Nw,Ow,zw;function I0(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Uw(e){return e<256?Js[e]:Js[256+(e>>>7)]}function tl(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Gt(e,t,n){e.bi_valid>E0-n?(e.bi_buf|=t<<e.bi_valid&65535,tl(e,e.bi_buf),e.bi_buf=t>>E0-e.bi_valid,e.bi_valid+=n-E0):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Hn(e,t,n){Gt(e,n[t*2],n[t*2+1])}function Gw(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function uF(e){e.bi_valid===16?(tl(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 cF(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,f=t.stat_desc.max_length,l,u,c,h,d,p,b=0;for(h=0;h<=Zi;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<Rw;l++)u=e.heap[l],h=n[n[u*2+1]*2+1]+1,h>f&&(h=f,b++),n[u*2+1]=h,!(u>r)&&(e.bl_count[h]++,d=0,u>=s&&(d=a[u-s]),p=n[u*2],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[u*2+1]+d)));if(b!==0){do{for(h=f-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[f]--,b-=2}while(b>0);for(h=f;h!==0;h--)for(u=e.bl_count[h];u!==0;)c=e.heap[--l],!(c>r)&&(n[c*2+1]!==h&&(e.opt_len+=(h-n[c*2+1])*n[c*2],n[c*2+1]=h),u--)}}function Hw(e,t,n){var r=new Array(Zi+1),i=0,o,a;for(o=1;o<=Zi;o++)r[o]=i=i+n[o-1]<<1;for(a=0;a<=t;a++){var s=e[a*2+1];s!==0&&(e[a*2]=Gw(r[s]++,s))}}function hF(){var e,t,n,r,i,o=new Array(Zi+1);for(n=0,r=0;r<x0-1;r++)for(C0[r]=n,e=0;e<1<<S0[r];e++)el[n++]=r;for(el[n-1]=r,i=0,r=0;r<16;r++)for(Fu[r]=i,e=0;e<1<<Ru[r];e++)Js[i++]=r;for(i>>=7;r<Xo;r++)for(Fu[r]=i<<7,e=0;e<1<<Ru[r]-7;e++)Js[256+i++]=r;for(t=0;t<=Zi;t++)o[t]=0;for(e=0;e<=143;)lr[e*2+1]=8,e++,o[8]++;for(;e<=255;)lr[e*2+1]=9,e++,o[9]++;for(;e<=279;)lr[e*2+1]=7,e++,o[7]++;for(;e<=287;)lr[e*2+1]=8,e++,o[8]++;for(Hw(lr,$s+1,o),e=0;e<Xo;e++)Ks[e*2+1]=5,Ks[e*2]=Gw(e,5);Nw=new k0(lr,S0,Xs+1,$s,Zi),Ow=new k0(Ks,Ru,0,Xo,Zi),zw=new k0(new Array(0),lF,0,A0,sF)}function Vw(e){var t;for(t=0;t<$s;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Xo;t++)e.dyn_dtree[t*2]=0;for(t=0;t<A0;t++)e.bl_tree[t*2]=0;e.dyn_ltree[_0*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function jw(e){e.bi_valid>8?tl(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 dF(e,t,n,r){jw(e),r&&(tl(e,n),tl(e,~n)),eF.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function qw(e,t,n,r){var i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function T0(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&qw(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!qw(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function Zw(e,t,n){var r,i,o=0,a,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,r===0?Hn(e,i,t):(a=el[i],Hn(e,a+Xs+1,t),s=S0[a],s!==0&&(i-=C0[a],Gt(e,i,s)),r--,a=Uw(r),Hn(e,a,n),s=Ru[a],s!==0&&(r-=Fu[a],Gt(e,r,s)));while(o<e.last_lit);Hn(e,_0,t)}function B0(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,f=-1,l;for(e.heap_len=0,e.heap_max=Rw,a=0;a<o;a++)n[a*2]!==0?(e.heap[++e.heap_len]=f=a,e.depth[a]=0):n[a*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=f<2?++f:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=f,a=e.heap_len>>1;a>=1;a--)T0(e,n,a);l=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],T0(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[l*2]=n[a*2]+n[s*2],e.depth[l]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[a*2+1]=n[s*2+1]=l,e.heap[1]=l++,T0(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],cF(e,t),Hw(n,f,e.bl_count)}function Ww(e,t,n){var r,i=-1,o,a=t[0*2+1],s=0,f=7,l=4;for(a===0&&(f=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=a,a=t[(r+1)*2+1],!(++s<f&&o===a)&&(s<l?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[Fw*2]++):s<=10?e.bl_tree[Mw*2]++:e.bl_tree[Pw*2]++,s=0,i=o,a===0?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4))}function Yw(e,t,n){var r,i=-1,o,a=t[0*2+1],s=0,f=7,l=4;for(a===0&&(f=138,l=3),r=0;r<=n;r++)if(o=a,a=t[(r+1)*2+1],!(++s<f&&o===a)){if(s<l)do Hn(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(Hn(e,o,e.bl_tree),s--),Hn(e,Fw,e.bl_tree),Gt(e,s-3,2)):s<=10?(Hn(e,Mw,e.bl_tree),Gt(e,s-3,3)):(Hn(e,Pw,e.bl_tree),Gt(e,s-11,7));s=0,i=o,a===0?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4)}}function pF(e){var t;for(Ww(e,e.dyn_ltree,e.l_desc.max_code),Ww(e,e.dyn_dtree,e.d_desc.max_code),B0(e,e.bl_desc),t=A0-1;t>=3&&e.bl_tree[Lw[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function gF(e,t,n,r){var i;for(Gt(e,t-257,5),Gt(e,n-1,5),Gt(e,r-4,4),i=0;i<r;i++)Gt(e,e.bl_tree[Lw[i]*2+1],3);Yw(e,e.dyn_ltree,t-1),Yw(e,e.dyn_dtree,n-1)}function mF(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return Tw;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Bw;for(n=32;n<Xs;n++)if(e.dyn_ltree[n*2]!==0)return Bw;return Tw}var Qw=!1;function bF(e){Qw||(hF(),Qw=!0),e.l_desc=new I0(e.dyn_ltree,Nw),e.d_desc=new I0(e.dyn_dtree,Ow),e.bl_desc=new I0(e.bl_tree,zw),e.bi_buf=0,e.bi_valid=0,Vw(e)}function Xw(e,t,n,r){Gt(e,(rF<<1)+(r?1:0),3),dF(e,t,n,!0)}function yF(e){Gt(e,Dw<<1,3),Hn(e,_0,lr),uF(e)}function wF(e,t,n,r){var i,o,a=0;e.level>0?(e.strm.data_type===nF&&(e.strm.data_type=mF(e)),B0(e,e.l_desc),B0(e,e.d_desc),a=pF(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?Xw(e,t,n,r):e.strategy===tF||o===i?(Gt(e,(Dw<<1)+(r?1:0),3),Zw(e,lr,Ks)):(Gt(e,(iF<<1)+(r?1:0),3),gF(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),Zw(e,e.dyn_ltree,e.dyn_dtree)),Vw(e),r&&jw(e)}function vF(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[(el[n]+Xs+1)*2]++,e.dyn_dtree[Uw(t)*2]++),e.last_lit===e.lit_bufsize-1}Yo._tr_init=bF,Yo._tr_stored_block=Xw,Yo._tr_flush_block=wF,Yo._tr_tally=vF,Yo._tr_align=yF;function xF(e,t,n,r){for(var i=e&65535|0,o=e>>>16&65535|0,a=0;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+t[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}var $w=xF;function AF(){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 EF=AF();function _F(e,t,n,r){var i=EF,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}var Kw=_F,D0={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"},Bt=sr,rn=Yo,Jw=$w,jr=Kw,SF=D0,Wi=0,CF=1,kF=3,qr=4,ev=5,Vn=0,tv=1,on=-2,IF=-3,R0=-5,TF=-1,BF=1,Mu=2,DF=3,RF=4,FF=0,MF=2,Pu=8,PF=9,LF=15,NF=8,OF=29,zF=256,F0=zF+1+OF,UF=30,GF=19,HF=2*F0+1,VF=15,he=3,Zr=258,En=Zr+he+1,jF=32,Lu=42,M0=69,Nu=73,Ou=91,zu=103,Yi=113,nl=666,it=1,rl=2,Qi=3,$o=4,qF=3;function Wr(e,t){return e.msg=SF[t],t}function nv(e){return(e<<1)-(e>4?9:0)}function Yr(e){for(var t=e.length;--t>=0;)e[t]=0}function Qr(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Bt.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 mt(e,t){rn._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Qr(e.strm)}function we(e,t){e.pending_buf[e.pending++]=t}function il(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function ZF(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Bt.arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=Jw(e.adler,t,i,n):e.state.wrap===2&&(e.adler=jr(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function rv(e,t){var n=e.max_chain_length,r=e.strstart,i,o,a=e.prev_length,s=e.nice_match,f=e.strstart>e.w_size-En?e.strstart-(e.w_size-En):0,l=e.window,u=e.w_mask,c=e.prev,h=e.strstart+Zr,d=l[r+a-1],p=l[r+a];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+a]!==p||l[i+a-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(o=Zr-(h-r),r=h-Zr,o>a){if(e.match_start=t,a=o,o>=s)break;d=l[r+a-1],p=l[r+a]}}while((t=c[t&u])>f&&--n!==0);return a<=e.lookahead?a:e.lookahead}function Xi(e){var t=e.w_size,n,r,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-En)){Bt.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);o+=t}if(e.strm.avail_in===0)break;if(r=ZF(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=he)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+he-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<he)););}while(e.lookahead<En&&e.strm.avail_in!==0)}function WF(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Xi(e),e.lookahead===0&&t===Wi)return it;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,mt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-En&&(mt(e,!1),e.strm.avail_out===0))return it}return e.insert=0,t===qr?(mt(e,!0),e.strm.avail_out===0?Qi:$o):(e.strstart>e.block_start&&(mt(e,!1),e.strm.avail_out===0),it)}function P0(e,t){for(var n,r;;){if(e.lookahead<En){if(Xi(e),e.lookahead<En&&t===Wi)return it;if(e.lookahead===0)break}if(n=0,e.lookahead>=he&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+he-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-En&&(e.match_length=rv(e,n)),e.match_length>=he)if(r=rn._tr_tally(e,e.strstart-e.match_start,e.match_length-he),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=he){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+he-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=rn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(mt(e,!1),e.strm.avail_out===0))return it}return e.insert=e.strstart<he-1?e.strstart:he-1,t===qr?(mt(e,!0),e.strm.avail_out===0?Qi:$o):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?it:rl}function Ko(e,t){for(var n,r,i;;){if(e.lookahead<En){if(Xi(e),e.lookahead<En&&t===Wi)return it;if(e.lookahead===0)break}if(n=0,e.lookahead>=he&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+he-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=he-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-En&&(e.match_length=rv(e,n),e.match_length<=5&&(e.strategy===BF||e.match_length===he&&e.strstart-e.match_start>4096)&&(e.match_length=he-1)),e.prev_length>=he&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-he,r=rn._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-he),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+he-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=he-1,e.strstart++,r&&(mt(e,!1),e.strm.avail_out===0))return it}else if(e.match_available){if(r=rn._tr_tally(e,0,e.window[e.strstart-1]),r&&mt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return it}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=rn._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<he-1?e.strstart:he-1,t===qr?(mt(e,!0),e.strm.avail_out===0?Qi:$o):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?it:rl}function YF(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=Zr){if(Xi(e),e.lookahead<=Zr&&t===Wi)return it;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=he&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+Zr;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=Zr-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=he?(n=rn._tr_tally(e,1,e.match_length-he),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=rn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(mt(e,!1),e.strm.avail_out===0))return it}return e.insert=0,t===qr?(mt(e,!0),e.strm.avail_out===0?Qi:$o):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?it:rl}function QF(e,t){for(var n;;){if(e.lookahead===0&&(Xi(e),e.lookahead===0)){if(t===Wi)return it;break}if(e.match_length=0,n=rn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(mt(e,!1),e.strm.avail_out===0))return it}return e.insert=0,t===qr?(mt(e,!0),e.strm.avail_out===0?Qi:$o):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?it:rl}function jn(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 Jo;Jo=[new jn(0,0,0,0,WF),new jn(4,4,8,4,P0),new jn(4,5,16,8,P0),new jn(4,6,32,32,P0),new jn(4,4,16,16,Ko),new jn(8,16,32,32,Ko),new jn(8,16,128,128,Ko),new jn(8,32,128,256,Ko),new jn(32,128,258,1024,Ko),new jn(32,258,258,4096,Ko)];function XF(e){e.window_size=2*e.w_size,Yr(e.head),e.max_lazy_match=Jo[e.level].max_lazy,e.good_match=Jo[e.level].good_length,e.nice_match=Jo[e.level].nice_length,e.max_chain_length=Jo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=he-1,e.match_available=0,e.ins_h=0}function $F(){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=Pu,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 Bt.Buf16(HF*2),this.dyn_dtree=new Bt.Buf16((2*UF+1)*2),this.bl_tree=new Bt.Buf16((2*GF+1)*2),Yr(this.dyn_ltree),Yr(this.dyn_dtree),Yr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Bt.Buf16(VF+1),this.heap=new Bt.Buf16(2*F0+1),Yr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Bt.Buf16(2*F0+1),Yr(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 iv(e){var t;return!e||!e.state?Wr(e,on):(e.total_in=e.total_out=0,e.data_type=MF,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Lu:Yi,e.adler=t.wrap===2?0:1,t.last_flush=Wi,rn._tr_init(t),Vn)}function ov(e){var t=iv(e);return t===Vn&&XF(e.state),t}function KF(e,t){return!e||!e.state||e.state.wrap!==2?on:(e.state.gzhead=t,Vn)}function av(e,t,n,r,i,o){if(!e)return on;var a=1;if(t===TF&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>PF||n!==Pu||r<8||r>15||t<0||t>9||o<0||o>RF)return Wr(e,on);r===8&&(r=9);var s=new $F;return e.state=s,s.strm=e,s.wrap=a,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+he-1)/he),s.window=new Bt.Buf8(s.w_size*2),s.head=new Bt.Buf16(s.hash_size),s.prev=new Bt.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Bt.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=o,s.method=n,ov(e)}function JF(e,t){return av(e,t,Pu,LF,NF,FF)}function e7(e,t){var n,r,i,o;if(!e||!e.state||t>ev||t<0)return e?Wr(e,on):on;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===nl&&t!==qr)return Wr(e,e.avail_out===0?R0:on);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===Lu)if(r.wrap===2)e.adler=0,we(r,31),we(r,139),we(r,8),r.gzhead?(we(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)),we(r,r.gzhead.time&255),we(r,r.gzhead.time>>8&255),we(r,r.gzhead.time>>16&255),we(r,r.gzhead.time>>24&255),we(r,r.level===9?2:r.strategy>=Mu||r.level<2?4:0),we(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(we(r,r.gzhead.extra.length&255),we(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=jr(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=M0):(we(r,0),we(r,0),we(r,0),we(r,0),we(r,0),we(r,r.level===9?2:r.strategy>=Mu||r.level<2?4:0),we(r,qF),r.status=Yi);else{var a=Pu+(r.w_bits-8<<4)<<8,s=-1;r.strategy>=Mu||r.level<2?s=0:r.level<6?s=1:r.level===6?s=2:s=3,a|=s<<6,r.strstart!==0&&(a|=jF),a+=31-a%31,r.status=Yi,il(r,a),r.strstart!==0&&(il(r,e.adler>>>16),il(r,e.adler&65535)),e.adler=1}if(r.status===M0)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=jr(e.adler,r.pending_buf,r.pending-i,i)),Qr(e),i=r.pending,r.pending===r.pending_buf_size));)we(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=jr(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=Nu)}else r.status=Nu;if(r.status===Nu)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=jr(e.adler,r.pending_buf,r.pending-i,i)),Qr(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}r.gzindex<r.gzhead.name.length?o=r.gzhead.name.charCodeAt(r.gzindex++)&255:o=0,we(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=jr(e.adler,r.pending_buf,r.pending-i,i)),o===0&&(r.gzindex=0,r.status=Ou)}else r.status=Ou;if(r.status===Ou)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=jr(e.adler,r.pending_buf,r.pending-i,i)),Qr(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}r.gzindex<r.gzhead.comment.length?o=r.gzhead.comment.charCodeAt(r.gzindex++)&255:o=0,we(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=jr(e.adler,r.pending_buf,r.pending-i,i)),o===0&&(r.status=zu)}else r.status=zu;if(r.status===zu&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Qr(e),r.pending+2<=r.pending_buf_size&&(we(r,e.adler&255),we(r,e.adler>>8&255),e.adler=0,r.status=Yi)):r.status=Yi),r.pending!==0){if(Qr(e),e.avail_out===0)return r.last_flush=-1,Vn}else if(e.avail_in===0&&nv(t)<=nv(n)&&t!==qr)return Wr(e,R0);if(r.status===nl&&e.avail_in!==0)return Wr(e,R0);if(e.avail_in!==0||r.lookahead!==0||t!==Wi&&r.status!==nl){var f=r.strategy===Mu?QF(r,t):r.strategy===DF?YF(r,t):Jo[r.level].func(r,t);if((f===Qi||f===$o)&&(r.status=nl),f===it||f===Qi)return e.avail_out===0&&(r.last_flush=-1),Vn;if(f===rl&&(t===CF?rn._tr_align(r):t!==ev&&(rn._tr_stored_block(r,0,0,!1),t===kF&&(Yr(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Qr(e),e.avail_out===0))return r.last_flush=-1,Vn}return t!==qr?Vn:r.wrap<=0?tv:(r.wrap===2?(we(r,e.adler&255),we(r,e.adler>>8&255),we(r,e.adler>>16&255),we(r,e.adler>>24&255),we(r,e.total_in&255),we(r,e.total_in>>8&255),we(r,e.total_in>>16&255),we(r,e.total_in>>24&255)):(il(r,e.adler>>>16),il(r,e.adler&65535)),Qr(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Vn:tv)}function t7(e){var t;return!e||!e.state?on:(t=e.state.status,t!==Lu&&t!==M0&&t!==Nu&&t!==Ou&&t!==zu&&t!==Yi&&t!==nl?Wr(e,on):(e.state=null,t===Yi?Wr(e,IF):Vn))}function n7(e,t){var n=t.length,r,i,o,a,s,f,l,u;if(!e||!e.state||(r=e.state,a=r.wrap,a===2||a===1&&r.status!==Lu||r.lookahead))return on;for(a===1&&(e.adler=Jw(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(a===0&&(Yr(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new Bt.Buf8(r.w_size),Bt.arraySet(u,t,n-r.w_size,r.w_size,0),t=u,n=r.w_size),s=e.avail_in,f=e.next_in,l=e.input,e.avail_in=n,e.next_in=0,e.input=t,Xi(r);r.lookahead>=he;){i=r.strstart,o=r.lookahead-(he-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+he-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--o);r.strstart=i,r.lookahead=he-1,Xi(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=he-1,r.match_available=0,e.next_in=f,e.input=l,e.avail_in=s,r.wrap=a,Vn}Gn.deflateInit=JF,Gn.deflateInit2=av,Gn.deflateReset=ov,Gn.deflateResetKeep=iv,Gn.deflateSetHeader=KF,Gn.deflate=e7,Gn.deflateEnd=t7,Gn.deflateSetDictionary=n7,Gn.deflateInfo="pako deflate (from Nodeca project)";var $i={},Uu=sr,sv=!0,lv=!0;try{String.fromCharCode.apply(null,[0])}catch{sv=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{lv=!1}for(var ol=new Uu.Buf8(256),Xr=0;Xr<256;Xr++)ol[Xr]=Xr>=252?6:Xr>=248?5:Xr>=240?4:Xr>=224?3:Xr>=192?2:1;ol[254]=ol[254]=1,$i.string2buf=function(e){var t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(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 Uu.Buf8(s),o=0,i=0;o<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};function fv(e,t){if(t<65534&&(e.subarray&&lv||!e.subarray&&sv))return String.fromCharCode.apply(null,Uu.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}$i.buf2binstring=function(e){return fv(e,e.length)},$i.binstring2buf=function(e){for(var t=new Uu.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},$i.buf2string=function(e,t){var n,r,i,o,a=t||e.length,s=new Array(a*2);for(r=0,n=0;n<a;){if(i=e[n++],i<128){s[r++]=i;continue}if(o=ol[i],o>4){s[r++]=65533,n+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&n<a;)i=i<<6|e[n++]&63,o--;if(o>1){s[r++]=65533;continue}i<65536?s[r++]=i:(i-=65536,s[r++]=55296|i>>10&1023,s[r++]=56320|i&1023)}return fv(s,r)},$i.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+ol[e[n]]>t?n:t};function r7(){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 uv=r7,al=Gn,sl=sr,L0=$i,N0=D0,i7=uv,cv=Object.prototype.toString,o7=0,O0=4,ea=0,hv=1,dv=2,a7=-1,s7=0,l7=8;function Ki(e){if(!(this instanceof Ki))return new Ki(e);this.options=sl.assign({level:a7,method:l7,chunkSize:16384,windowBits:15,memLevel:8,strategy:s7,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 i7,this.strm.avail_out=0;var n=al.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==ea)throw new Error(N0[n]);if(t.header&&al.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=L0.string2buf(t.dictionary):cv.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=al.deflateSetDictionary(this.strm,r),n!==ea)throw new Error(N0[n]);this._dict_set=!0}}Ki.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?O0:o7,typeof e=="string"?n.input=L0.string2buf(e):cv.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 sl.Buf8(r),n.next_out=0,n.avail_out=r),i=al.deflate(n,o),i!==hv&&i!==ea)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(o===O0||o===dv))&&(this.options.to==="string"?this.onData(L0.buf2binstring(sl.shrinkBuf(n.output,n.next_out))):this.onData(sl.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==hv);return o===O0?(i=al.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ea):(o===dv&&(this.onEnd(ea),n.avail_out=0),!0)},Ki.prototype.onData=function(e){this.chunks.push(e)},Ki.prototype.onEnd=function(e){e===ea&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=sl.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function z0(e,t){var n=new Ki(t);if(n.push(e,!0),n.err)throw n.msg||N0[n.err];return n.result}function f7(e,t){return t=t||{},t.raw=!0,z0(e,t)}function u7(e,t){return t=t||{},t.gzip=!0,z0(e,t)}Qs.Deflate=Ki,Qs.deflate=z0,Qs.deflateRaw=f7,Qs.gzip=u7;var ll={},_n={},Gu=30,c7=12,h7=function(t,n){var r,i,o,a,s,f,l,u,c,h,d,p,b,y,w,_,C,S,T,B,I,F,P,j,O;r=t.state,i=t.next_in,j=t.input,o=i+(t.avail_in-5),a=t.next_out,O=t.output,s=a-(n-t.avail_out),f=a+(t.avail_out-257),l=r.dmax,u=r.wsize,c=r.whave,h=r.wnext,d=r.window,p=r.hold,b=r.bits,y=r.lencode,w=r.distcode,_=(1<<r.lenbits)-1,C=(1<<r.distbits)-1;e:do{b<15&&(p+=j[i++]<<b,b+=8,p+=j[i++]<<b,b+=8),S=y[p&_];t:for(;;){if(T=S>>>24,p>>>=T,b-=T,T=S>>>16&255,T===0)O[a++]=S&65535;else if(T&16){B=S&65535,T&=15,T&&(b<T&&(p+=j[i++]<<b,b+=8),B+=p&(1<<T)-1,p>>>=T,b-=T),b<15&&(p+=j[i++]<<b,b+=8,p+=j[i++]<<b,b+=8),S=w[p&C];n:for(;;){if(T=S>>>24,p>>>=T,b-=T,T=S>>>16&255,T&16){if(I=S&65535,T&=15,b<T&&(p+=j[i++]<<b,b+=8,b<T&&(p+=j[i++]<<b,b+=8)),I+=p&(1<<T)-1,I>l){t.msg="invalid distance too far back",r.mode=Gu;break e}if(p>>>=T,b-=T,T=a-s,I>T){if(T=I-T,T>c&&r.sane){t.msg="invalid distance too far back",r.mode=Gu;break e}if(F=0,P=d,h===0){if(F+=u-T,T<B){B-=T;do O[a++]=d[F++];while(--T);F=a-I,P=O}}else if(h<T){if(F+=u+h-T,T-=h,T<B){B-=T;do O[a++]=d[F++];while(--T);if(F=0,h<B){T=h,B-=T;do O[a++]=d[F++];while(--T);F=a-I,P=O}}}else if(F+=h-T,T<B){B-=T;do O[a++]=d[F++];while(--T);F=a-I,P=O}for(;B>2;)O[a++]=P[F++],O[a++]=P[F++],O[a++]=P[F++],B-=3;B&&(O[a++]=P[F++],B>1&&(O[a++]=P[F++]))}else{F=a-I;do O[a++]=O[F++],O[a++]=O[F++],O[a++]=O[F++],B-=3;while(B>2);B&&(O[a++]=O[F++],B>1&&(O[a++]=O[F++]))}}else if(T&64){t.msg="invalid distance code",r.mode=Gu;break e}else{S=w[(S&65535)+(p&(1<<T)-1)];continue n}break}}else if(T&64)if(T&32){r.mode=c7;break e}else{t.msg="invalid literal/length code",r.mode=Gu;break e}else{S=y[(S&65535)+(p&(1<<T)-1)];continue t}break}}while(i<o&&a<f);B=b>>3,i-=B,b-=B<<3,p&=(1<<b)-1,t.next_in=i,t.next_out=a,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=a<f?257+(f-a):257-(a-f),r.hold=p,r.bits=b},pv=sr,ta=15,gv=852,mv=592,bv=0,U0=1,yv=2,d7=[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],p7=[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],g7=[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],m7=[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],b7=function(t,n,r,i,o,a,s,f){var l=f.bits,u=0,c=0,h=0,d=0,p=0,b=0,y=0,w=0,_=0,C=0,S,T,B,I,F,P=null,j=0,O,re=new pv.Buf16(ta+1),ae=new pv.Buf16(ta+1),pe=null,Te=0,Xe,De,$e;for(u=0;u<=ta;u++)re[u]=0;for(c=0;c<i;c++)re[n[r+c]]++;for(p=l,d=ta;d>=1&&re[d]===0;d--);if(p>d&&(p=d),d===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,f.bits=1,0;for(h=1;h<d&&re[h]===0;h++);for(p<h&&(p=h),w=1,u=1;u<=ta;u++)if(w<<=1,w-=re[u],w<0)return-1;if(w>0&&(t===bv||d!==1))return-1;for(ae[1]=0,u=1;u<ta;u++)ae[u+1]=ae[u]+re[u];for(c=0;c<i;c++)n[r+c]!==0&&(s[ae[n[r+c]]++]=c);if(t===bv?(P=pe=s,O=19):t===U0?(P=d7,j-=257,pe=p7,Te-=257,O=256):(P=g7,pe=m7,O=-1),C=0,c=0,u=h,F=a,b=p,y=0,B=-1,_=1<<p,I=_-1,t===U0&&_>gv||t===yv&&_>mv)return 1;for(;;){Xe=u-y,s[c]<O?(De=0,$e=s[c]):s[c]>O?(De=pe[Te+s[c]],$e=P[j+s[c]]):(De=32+64,$e=0),S=1<<u-y,T=1<<b,h=T;do T-=S,o[F+(C>>y)+T]=Xe<<24|De<<16|$e|0;while(T!==0);for(S=1<<u-1;C&S;)S>>=1;if(S!==0?(C&=S-1,C+=S):C=0,c++,--re[u]===0){if(u===d)break;u=n[r+s[c]]}if(u>p&&(C&I)!==B){for(y===0&&(y=p),F+=h,b=u-y,w=1<<b;b+y<d&&(w-=re[b+y],!(w<=0));)b++,w<<=1;if(_+=1<<b,t===U0&&_>gv||t===yv&&_>mv)return 1;B=C&I,o[B]=p<<24|b<<16|F-a|0}}return C!==0&&(o[F+C]=u-y<<24|64<<16|0),f.bits=p,0},Xt=sr,G0=$w,qn=Kw,y7=h7,fl=b7,w7=0,wv=1,vv=2,xv=4,v7=5,Hu=6,Ji=0,x7=1,A7=2,an=-2,Av=-3,Ev=-4,E7=-5,_v=8,Sv=1,Cv=2,kv=3,Iv=4,Tv=5,Bv=6,Dv=7,Rv=8,Fv=9,Mv=10,Vu=11,fr=12,H0=13,Pv=14,V0=15,Lv=16,Nv=17,Ov=18,zv=19,ju=20,qu=21,Uv=22,Gv=23,Hv=24,Vv=25,jv=26,j0=27,qv=28,Zv=29,je=30,Wv=31,_7=32,S7=852,C7=592,k7=15,I7=k7;function Yv(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function T7(){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 Xt.Buf16(320),this.work=new Xt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Qv(e){var t;return!e||!e.state?an:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Sv,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Xt.Buf32(S7),t.distcode=t.distdyn=new Xt.Buf32(C7),t.sane=1,t.back=-1,Ji)}function Xv(e){var t;return!e||!e.state?an:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Qv(e))}function $v(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))?an:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Xv(e))}function Kv(e,t){var n,r;return e?(r=new T7,e.state=r,r.window=null,n=$v(e,t),n!==Ji&&(e.state=null),n):an}function B7(e){return Kv(e,I7)}var Jv=!0,q0,Z0;function D7(e){if(Jv){var t;for(q0=new Xt.Buf32(512),Z0=new Xt.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(fl(wv,e.lens,0,288,q0,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;fl(vv,e.lens,0,32,Z0,0,e.work,{bits:5}),Jv=!1}e.lencode=q0,e.lenbits=9,e.distcode=Z0,e.distbits=5}function ex(e,t,n,r){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Xt.Buf8(o.wsize)),r>=o.wsize?(Xt.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),Xt.arraySet(o.window,t,n-r,i,o.wnext),r-=i,r?(Xt.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function R7(e,t){var n,r,i,o,a,s,f,l,u,c,h,d,p,b,y=0,w,_,C,S,T,B,I,F,P=new Xt.Buf8(4),j,O,re=[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 an;n=e.state,n.mode===fr&&(n.mode=H0),a=e.next_out,i=e.output,f=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,c=s,h=f,F=Ji;e:for(;;)switch(n.mode){case Sv:if(n.wrap===0){n.mode=H0;break}for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.wrap&2&&l===35615){n.check=0,P[0]=l&255,P[1]=l>>>8&255,n.check=qn(n.check,P,2,0),l=0,u=0,n.mode=Cv;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=je;break}if((l&15)!==_v){e.msg="unknown compression method",n.mode=je;break}if(l>>>=4,u-=4,I=(l&15)+8,n.wbits===0)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=je;break}n.dmax=1<<I,e.adler=n.check=1,n.mode=l&512?Mv:fr,l=0,u=0;break;case Cv:for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==_v){e.msg="unknown compression method",n.mode=je;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=je;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&(P[0]=l&255,P[1]=l>>>8&255,n.check=qn(n.check,P,2,0)),l=0,u=0,n.mode=kv;case kv:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&(P[0]=l&255,P[1]=l>>>8&255,P[2]=l>>>16&255,P[3]=l>>>24&255,n.check=qn(n.check,P,4,0)),l=0,u=0,n.mode=Iv;case Iv:for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&(P[0]=l&255,P[1]=l>>>8&255,n.check=qn(n.check,P,2,0)),l=0,u=0,n.mode=Tv;case Tv:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&(P[0]=l&255,P[1]=l>>>8&255,n.check=qn(n.check,P,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=Bv;case Bv:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Xt.arraySet(n.head.extra,r,o,d,I)),n.flags&512&&(n.check=qn(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Dv;case Dv:if(n.flags&2048){if(s===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&(n.check=qn(n.check,r,d,o)),s-=d,o+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Rv;case Rv:if(n.flags&4096){if(s===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&(n.check=qn(n.check,r,d,o)),s-=d,o+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=Fv;case Fv:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=je;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=fr;break;case Mv:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}e.adler=n.check=Yv(l),l=0,u=0,n.mode=Vu;case Vu:if(n.havedict===0)return e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,A7;e.adler=n.check=1,n.mode=fr;case fr:if(t===v7||t===Hu)break e;case H0:if(n.last){l>>>=u&7,u-=u&7,n.mode=j0;break}for(;u<3;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=Pv;break;case 1:if(D7(n),n.mode=ju,t===Hu){l>>>=2,u-=2;break e}break;case 2:n.mode=Nv;break;case 3:e.msg="invalid block type",n.mode=je}l>>>=2,u-=2;break;case Pv:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=je;break}if(n.length=l&65535,l=0,u=0,n.mode=V0,t===Hu)break e;case V0:n.mode=Lv;case Lv:if(d=n.length,d){if(d>s&&(d=s),d>f&&(d=f),d===0)break e;Xt.arraySet(i,r,o,d,a),s-=d,o+=d,f-=d,a+=d,n.length-=d;break}n.mode=fr;break;case Nv:for(;u<14;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=je;break}n.have=0,n.mode=Ov;case Ov:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.lens[re[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[re[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,j={bits:n.lenbits},F=fl(w7,n.lens,0,19,n.lencode,0,n.work,j),n.lenbits=j.bits,F){e.msg="invalid code lengths set",n.mode=je;break}n.have=0,n.mode=zv;case zv:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,_=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(C<16)l>>>=w,u-=w,n.lens[n.have++]=C;else{if(C===16){for(O=w+2;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(l>>>=w,u-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=je;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,u-=2}else if(C===17){for(O=w+3;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=w,u-=w,I=0,d=3+(l&7),l>>>=3,u-=3}else{for(O=w+7;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=w,u-=w,I=0,d=11+(l&127),l>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=je;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===je)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=je;break}if(n.lenbits=9,j={bits:n.lenbits},F=fl(wv,n.lens,0,n.nlen,n.lencode,0,n.work,j),n.lenbits=j.bits,F){e.msg="invalid literal/lengths set",n.mode=je;break}if(n.distbits=6,n.distcode=n.distdyn,j={bits:n.distbits},F=fl(vv,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,j),n.distbits=j.bits,F){e.msg="invalid distances set",n.mode=je;break}if(n.mode=ju,t===Hu)break e;case ju:n.mode=qu;case qu:if(s>=6&&f>=258){e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,y7(e,h),a=e.next_out,i=e.output,f=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===fr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,_=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(_&&!(_&240)){for(S=w,T=_,B=C;y=n.lencode[B+((l&(1<<S+T)-1)>>S)],w=y>>>24,_=y>>>16&255,C=y&65535,!(S+w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=S,u-=S,n.back+=S}if(l>>>=w,u-=w,n.back+=w,n.length=C,_===0){n.mode=jv;break}if(_&32){n.back=-1,n.mode=fr;break}if(_&64){e.msg="invalid literal/length code",n.mode=je;break}n.extra=_&15,n.mode=Uv;case Uv:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Gv;case Gv:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,_=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(!(_&240)){for(S=w,T=_,B=C;y=n.distcode[B+((l&(1<<S+T)-1)>>S)],w=y>>>24,_=y>>>16&255,C=y&65535,!(S+w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=S,u-=S,n.back+=S}if(l>>>=w,u-=w,n.back+=w,_&64){e.msg="invalid distance code",n.mode=je;break}n.offset=C,n.extra=_&15,n.mode=Hv;case Hv:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=je;break}n.mode=Vv;case Vv:if(f===0)break e;if(d=h-f,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),b=n.window}else b=i,p=a-n.offset,d=n.length;d>f&&(d=f),f-=d,n.length-=d;do i[a++]=b[p++];while(--d);n.length===0&&(n.mode=qu);break;case jv:if(f===0)break e;i[a++]=n.length,f--,n.mode=qu;break;case j0:if(n.wrap){for(;u<32;){if(s===0)break e;s--,l|=r[o++]<<u,u+=8}if(h-=f,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?qn(n.check,i,h,a-h):G0(n.check,i,h,a-h)),h=f,(n.flags?l:Yv(l))!==n.check){e.msg="incorrect data check",n.mode=je;break}l=0,u=0}n.mode=qv;case qv:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=je;break}l=0,u=0}n.mode=Zv;case Zv:F=x7;break e;case je:F=Av;break e;case Wv:return Ev;case _7:default:return an}return e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<je&&(n.mode<j0||t!==xv))&&ex(e,e.output,e.next_out,h-e.avail_out),c-=e.avail_in,h-=e.avail_out,e.total_in+=c,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?qn(n.check,i,h,e.next_out-h):G0(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===fr?128:0)+(n.mode===ju||n.mode===V0?256:0),(c===0&&h===0||t===xv)&&F===Ji&&(F=E7),F}function F7(e){if(!e||!e.state)return an;var t=e.state;return t.window&&(t.window=null),e.state=null,Ji}function M7(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?an:(n.head=t,t.done=!1,Ji)}function P7(e,t){var n=t.length,r,i,o;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==Vu)?an:r.mode===Vu&&(i=1,i=G0(i,t,n,0),i!==r.check)?Av:(o=ex(e,t,n,n),o?(r.mode=Wv,Ev):(r.havedict=1,Ji))}_n.inflateReset=Xv,_n.inflateReset2=$v,_n.inflateResetKeep=Qv,_n.inflateInit=B7,_n.inflateInit2=Kv,_n.inflate=R7,_n.inflateEnd=F7,_n.inflateGetHeader=M7,_n.inflateSetDictionary=P7,_n.inflateInfo="pako inflate (from Nodeca project)";var tx={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 L7(){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 N7=L7,na=_n,ul=sr,Zu=$i,et=tx,W0=D0,O7=uv,z7=N7,nx=Object.prototype.toString;function eo(e){if(!(this instanceof eo))return new eo(e);this.options=ul.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 O7,this.strm.avail_out=0;var n=na.inflateInit2(this.strm,t.windowBits);if(n!==et.Z_OK)throw new Error(W0[n]);if(this.header=new z7,na.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Zu.string2buf(t.dictionary):nx.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=na.inflateSetDictionary(this.strm,t.dictionary),n!==et.Z_OK)))throw new Error(W0[n])}eo.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,a,s,f,l,u=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?et.Z_FINISH:et.Z_NO_FLUSH,typeof e=="string"?n.input=Zu.binstring2buf(e):nx.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 ul.Buf8(r),n.next_out=0,n.avail_out=r),o=na.inflate(n,et.Z_NO_FLUSH),o===et.Z_NEED_DICT&&i&&(o=na.inflateSetDictionary(this.strm,i)),o===et.Z_BUF_ERROR&&u===!0&&(o=et.Z_OK,u=!1),o!==et.Z_STREAM_END&&o!==et.Z_OK)return this.onEnd(o),this.ended=!0,!1;n.next_out&&(n.avail_out===0||o===et.Z_STREAM_END||n.avail_in===0&&(a===et.Z_FINISH||a===et.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Zu.utf8border(n.output,n.next_out),f=n.next_out-s,l=Zu.buf2string(n.output,s),n.next_out=f,n.avail_out=r-f,f&&ul.arraySet(n.output,n.output,s,f,0),this.onData(l)):this.onData(ul.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)&&o!==et.Z_STREAM_END);return o===et.Z_STREAM_END&&(a=et.Z_FINISH),a===et.Z_FINISH?(o=na.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===et.Z_OK):(a===et.Z_SYNC_FLUSH&&(this.onEnd(et.Z_OK),n.avail_out=0),!0)},eo.prototype.onData=function(e){this.chunks.push(e)},eo.prototype.onEnd=function(e){e===et.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ul.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Y0(e,t){var n=new eo(t);if(n.push(e,!0),n.err)throw n.msg||W0[n.err];return n.result}function U7(e,t){return t=t||{},t.raw=!0,Y0(e,t)}ll.Inflate=eo,ll.inflate=Y0,ll.inflateRaw=U7,ll.ungzip=Y0;var G7=sr.assign,H7=Qs,V7=ll,j7=tx,rx={};G7(rx,H7,V7,j7);var Wu=rx;async function $r(e){try{let t,n=0,r=0;const i=[];let o=0,a;do{const f=e.subarray(n);if(a=new Wu.Inflate,{strm:t}=a,a.push(f,Wu.Z_SYNC_FLUSH),a.err)throw new Error(a.msg);n+=t.next_in,i[r]=a.result,o+=i[r].length,r+=1}while(t.avail_in);const s=new Uint8Array(o);for(let f=0,l=0;f<i.length;f++)s.set(i[f],l),l+=i[f].length;return ye.Buffer.from(s)}catch(t){throw`${t}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function ix(e,t){try{let n;const{minv:r,maxv:i}=t;let o=r.blockPosition,a=r.dataPosition;const s=[],f=[],l=[];let u=0,c=0;do{const p=e.subarray(o-r.blockPosition),b=new Wu.Inflate;if({strm:n}=b,b.push(p,Wu.Z_SYNC_FLUSH),b.err)throw new Error(b.msg);const y=b.result;s.push(y);let w=y.length;f.push(o),l.push(a),s.length===1&&r.dataPosition&&(s[0]=s[0].subarray(r.dataPosition),w=s[0].length);const _=o;if(o+=n.next_in,a+=w,_>=i.blockPosition){s[c]=s[c].subarray(0,i.blockPosition===r.blockPosition?i.dataPosition-r.dataPosition+1:i.dataPosition+1),f.push(o),l.push(a),u+=s[c].length;break}u+=s[c].length,c++}while(n.avail_in);const h=new Uint8Array(u);for(let p=0,b=0;p<s.length;p++)h.set(s[p],b),b+=s[p].length;return{buffer:ye.Buffer.from(h),cpositions:f,dpositions:l}}catch(n){throw`${n}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):n}}var q7=Le,sn=null;try{sn=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 Le(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}Le.prototype.__isLong__,Object.defineProperty(Le.prototype,"__isLong__",{value:!0});function Ht(e){return(e&&e.__isLong__)===!0}Le.isLong=Ht;var ox={},ax={};function to(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=ax[e],r)?r:(n=Ne(e,(e|0)<0?-1:0,!0),i&&(ax[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=ox[e],r)?r:(n=Ne(e,e<0?-1:0,!1),i&&(ox[e]=n),n))}Le.fromInt=to;function ln(e,t){if(isNaN(e))return t?no:fn;if(t){if(e<0)return no;if(e>=lx)return dx}else{if(e<=-fx)return Vt;if(e+1>=fx)return hx}return e<0?ln(-e,t).neg():Ne(e%ra|0,e/ra|0,t)}Le.fromNumber=ln;function Ne(e,t,n){return new Le(e,t,n)}Le.fromBits=Ne;var Yu=Math.pow;function Q0(e,t,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return fn;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 Q0(e.substring(1),t,n).neg();for(var i=ln(Yu(n,8)),o=fn,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),f=parseInt(e.substring(a,a+s),n);if(s<8){var l=ln(Yu(n,s));o=o.mul(l).add(ln(f))}else o=o.mul(i),o=o.add(ln(f))}return o.unsigned=t,o}Le.fromString=Q0;function Sn(e,t){return typeof e=="number"?ln(e,t):typeof e=="string"?Q0(e,t):Ne(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Le.fromValue=Sn;var sx=65536,Z7=1<<24,ra=sx*sx,lx=ra*ra,fx=lx/2,ux=to(Z7),fn=to(0);Le.ZERO=fn;var no=to(0,!0);Le.UZERO=no;var ia=to(1);Le.ONE=ia;var cx=to(1,!0);Le.UONE=cx;var X0=to(-1);Le.NEG_ONE=X0;var hx=Ne(-1,2147483647,!1);Le.MAX_VALUE=hx;var dx=Ne(-1,-1,!0);Le.MAX_UNSIGNED_VALUE=dx;var Vt=Ne(0,-2147483648,!1);Le.MIN_VALUE=Vt;var Y=Le.prototype;Y.toInt=function(){return this.unsigned?this.low>>>0:this.low},Y.toNumber=function(){return this.unsigned?(this.high>>>0)*ra+(this.low>>>0):this.high*ra+(this.low>>>0)},Y.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(Vt)){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 o=ln(Yu(t,6),this.unsigned),a=this,s="";;){var f=a.div(o),l=a.sub(f.mul(o)).toInt()>>>0,u=l.toString(t);if(a=f,a.isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},Y.getHighBits=function(){return this.high},Y.getHighBitsUnsigned=function(){return this.high>>>0},Y.getLowBits=function(){return this.low},Y.getLowBitsUnsigned=function(){return this.low>>>0},Y.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Vt)?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},Y.isZero=function(){return this.high===0&&this.low===0},Y.eqz=Y.isZero,Y.isNegative=function(){return!this.unsigned&&this.high<0},Y.isPositive=function(){return this.unsigned||this.high>=0},Y.isOdd=function(){return(this.low&1)===1},Y.isEven=function(){return(this.low&1)===0},Y.equals=function(t){return Ht(t)||(t=Sn(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},Y.eq=Y.equals,Y.notEquals=function(t){return!this.eq(t)},Y.neq=Y.notEquals,Y.ne=Y.notEquals,Y.lessThan=function(t){return this.comp(t)<0},Y.lt=Y.lessThan,Y.lessThanOrEqual=function(t){return this.comp(t)<=0},Y.lte=Y.lessThanOrEqual,Y.le=Y.lessThanOrEqual,Y.greaterThan=function(t){return this.comp(t)>0},Y.gt=Y.greaterThan,Y.greaterThanOrEqual=function(t){return this.comp(t)>=0},Y.gte=Y.greaterThanOrEqual,Y.ge=Y.greaterThanOrEqual,Y.compare=function(t){if(Ht(t)||(t=Sn(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},Y.comp=Y.compare,Y.negate=function(){return!this.unsigned&&this.eq(Vt)?Vt:this.not().add(ia)},Y.neg=Y.negate,Y.add=function(t){Ht(t)||(t=Sn(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,a=t.high>>>16,s=t.high&65535,f=t.low>>>16,l=t.low&65535,u=0,c=0,h=0,d=0;return d+=o+l,h+=d>>>16,d&=65535,h+=i+f,c+=h>>>16,h&=65535,c+=r+s,u+=c>>>16,c&=65535,u+=n+a,u&=65535,Ne(h<<16|d,u<<16|c,this.unsigned)},Y.subtract=function(t){return Ht(t)||(t=Sn(t)),this.add(t.neg())},Y.sub=Y.subtract,Y.multiply=function(t){if(this.isZero())return fn;if(Ht(t)||(t=Sn(t)),sn){var n=sn.mul(this.low,this.high,t.low,t.high);return Ne(n,sn.get_high(),this.unsigned)}if(t.isZero())return fn;if(this.eq(Vt))return t.isOdd()?Vt:fn;if(t.eq(Vt))return this.isOdd()?Vt:fn;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(ux)&&t.lt(ux))return ln(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,a=this.low&65535,s=t.high>>>16,f=t.high&65535,l=t.low>>>16,u=t.low&65535,c=0,h=0,d=0,p=0;return p+=a*u,d+=p>>>16,p&=65535,d+=o*u,h+=d>>>16,d&=65535,d+=a*l,h+=d>>>16,d&=65535,h+=i*u,c+=h>>>16,h&=65535,h+=o*l,c+=h>>>16,h&=65535,h+=a*f,c+=h>>>16,h&=65535,c+=r*u+i*l+o*f+a*s,c&=65535,Ne(d<<16|p,c<<16|h,this.unsigned)},Y.mul=Y.multiply,Y.divide=function(t){if(Ht(t)||(t=Sn(t)),t.isZero())throw Error("division by zero");if(sn){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?sn.div_u:sn.div_s)(this.low,this.high,t.low,t.high);return Ne(n,sn.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?no:fn;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return no;if(t.gt(this.shru(1)))return cx;o=no}else{if(this.eq(Vt)){if(t.eq(ia)||t.eq(X0))return Vt;if(t.eq(Vt))return ia;var a=this.shr(1);return r=a.div(t).shl(1),r.eq(fn)?t.isNegative()?ia:X0:(i=this.sub(t.mul(r)),o=r.add(i.div(t)),o)}else if(t.eq(Vt))return this.unsigned?no:fn;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();o=fn}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),f=s<=48?1:Yu(2,s-48),l=ln(r),u=l.mul(t);u.isNegative()||u.gt(i);)r-=f,l=ln(r,this.unsigned),u=l.mul(t);l.isZero()&&(l=ia),o=o.add(l),i=i.sub(u)}return o},Y.div=Y.divide,Y.modulo=function(t){if(Ht(t)||(t=Sn(t)),sn){var n=(this.unsigned?sn.rem_u:sn.rem_s)(this.low,this.high,t.low,t.high);return Ne(n,sn.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},Y.mod=Y.modulo,Y.rem=Y.modulo,Y.not=function(){return Ne(~this.low,~this.high,this.unsigned)},Y.and=function(t){return Ht(t)||(t=Sn(t)),Ne(this.low&t.low,this.high&t.high,this.unsigned)},Y.or=function(t){return Ht(t)||(t=Sn(t)),Ne(this.low|t.low,this.high|t.high,this.unsigned)},Y.xor=function(t){return Ht(t)||(t=Sn(t)),Ne(this.low^t.low,this.high^t.high,this.unsigned)},Y.shiftLeft=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ne(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Ne(0,this.low<<t-32,this.unsigned)},Y.shl=Y.shiftLeft,Y.shiftRight=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ne(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Ne(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Y.shr=Y.shiftRight,Y.shiftRightUnsigned=function(t){if(Ht(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return Ne(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?Ne(n,0,this.unsigned):Ne(n>>>t-32,0,this.unsigned)},Y.shru=Y.shiftRightUnsigned,Y.shr_u=Y.shiftRightUnsigned,Y.toSigned=function(){return this.unsigned?Ne(this.low,this.high,!1):this},Y.toUnsigned=function(){return this.unsigned?this:Ne(this.low,this.high,!0)},Y.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Y.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]},Y.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]},Le.fromBytes=function(t,n,r){return r?Le.fromBytesLE(t,n):Le.fromBytesBE(t,n)},Le.fromBytesLE=function(t,n){return new Le(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Le.fromBytesBE=function(t,n){return new Le(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};const Qu=Ws(q7),Xu=1;class W7{constructor({filehandle:t,path:n}){if(t)this.filehandle=t;else if(n)this.filehandle=new ct(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(t,n=0,r=!0){const i=Qu.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=ye.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=ye.Buffer.allocUnsafe(i),await this.filehandle.read(t,0,i,8);for(let o=0;o<n;o+=1){const a=this._readLongWithOverflow(t,o*16),s=this._readLongWithOverflow(t,o*16+8);r[o+1]=[a,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(),o=[],a=(h,d)=>{const p=h[Xu],b=d?d[Xu]:1/0;return p<=n&&b>n?0:p<n?-1:1};let s=0,f=i.length-1,l=Math.floor(i.length/2),u=a(i[l],i[l+1]);for(;u!==0;)u>0?f=l-1:u<0&&(s=l+1),l=Math.ceil((f-s)/2)+s,u=a(i[l],i[l+1]);o.push(i[l]);let c=l+1;for(;c<i.length&&(o.push(i[c]),!(i[c][Xu]>=r));c+=1);return o[o.length-1][Xu]<r&&o.push([]),o}}class px{constructor({filehandle:t,path:n,gziFilehandle:r,gziPath:i}){if(t)this.filehandle=t;else if(n)this.filehandle=new ct(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 W7({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=ye.Buffer.allocUnsafe(4),{bytesRead:i}=await this.filehandle.read(r,0,4,n-28-4);if(i!==4)throw new Error("read error");const o=r.readUInt32LE(0);return t+o}async _readAndUncompressBlock(t,[n],[r]){let i=r;i||(i=(await this.filehandle.stat()).size);const o=i-n;return await this.filehandle.read(t,0,o,n),await $r(t.slice(0,o))}async read(t,n,r,i){const o=await this.gzi.getRelevantBlocksForRead(r,i),a=ye.Buffer.allocUnsafe(32768*2);let s=n,f=0;for(let l=0;l<o.length-1;l+=1){const u=await this._readAndUncompressBlock(a,o[l],o[l+1]),[,c]=o[l],h=c>=i?0:i-c,d=Math.min(i+r,c+u.length)-c;h>=0&&h<u.length&&(u.copy(t,s,h,d),s+=d-h,f+=d-h)}return{bytesRead:f,buffer:t}}}function gx(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function Y7(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 o=n.toString("utf8").split(/\r?\n/).filter(a=>/\S/.test(a)).map(a=>a.split(" ")).filter(a=>a[0]!=="").map(a=>((!i||i.name!==a[0])&&(i={name:a[0],id:r},r+=1),{id:i.id,name:a[0],length:+a[1],start:0,end:+a[1],offset:+a[2],lineLength:+a[3],lineBytes:+a[4]}));return{name:Object.fromEntries(o.map(a=>[a.name,a])),id:Object.fromEntries(o.map(a=>[a.id,a]))}}class mx{constructor({fasta:t,fai:n,path:r,faiPath:i,chunkSizeLimit:o=1e6}){if(t)this.fasta=t;else if(r)this.fasta=new ct(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 ct(i);else if(r)this.fai=new ct(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile");this.chunkSizeLimit=o}async _getIndexes(t){return this.indexes||(this.indexes=Y7(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 o=0;o<i.length;o+=1)n[i[o].name]=i[o].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 o=(await this._getIndexes(i)).id[t];if(o)return this._fetchFromIndexEntry(o,n,r,i)}async getResiduesByName(t,n,r,i){const o=(await this._getIndexes(i)).name[t];if(o)return this._fetchFromIndexEntry(o,n,r,i)}async getSequence(t,n,r,i){return this.getResiduesByName(t,n,r,i)}async _fetchFromIndexEntry(t,n=0,r,i){let o=r;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((o===void 0||o>t.length)&&(o=t.length),n>=o)return"";const a=gx(t,n),s=gx(t,o)-a;if(s>this.chunkSizeLimit)throw new Error(`data size of ${s.toLocaleString()} bytes exceeded chunk size limit of ${this.chunkSizeLimit.toLocaleString()} bytes`);const f=Buffer.allocUnsafe(s);return await this.fasta.read(f,0,s,a,i),f.toString("utf8").replace(/\s+/g,"")}}class Q7 extends mx{constructor({fasta:t,path:n,fai:r,faiPath:i,gzi:o,gziPath:a,chunkSizeLimit:s}){super({fasta:t,path:n,fai:r,faiPath:i,chunkSizeLimit:s}),t&&o?this.fasta=new px({filehandle:t,gziFilehandle:o}):n&&a&&(this.fasta=new px({path:n,gziPath:a}))}}function bx(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
|
|
277
|
+
`),[i,...o]=n.split(" "),a=r.join("").replace(/\s/g,"");return{id:i,description:o.join(" "),sequence:a}})}class X7{constructor({fasta:t,path:n}){if(t)this.fasta=t;else if(n)this.fasta=new ct(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const i=r.toString("utf8");return bx(i)})}async fetch(t,n,r){const o=(await this.data).find(s=>s.id===t),a=r-n;if(!o)throw new Error(`no sequence with id ${t} exists`);return o.sequence.substr(n,a)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const $7=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:Q7,FetchableSmallFasta:X7,IndexedFasta:mx,parseSmallFasta:bx},Symbol.toStringTag,{value:"Module"})),$u=BigInt(32);function K7(e,t,n){const r=+!!n,i=+!n;return BigInt(e.getInt32(t,n)*i+e.getInt32(t+4,n)*r)<<$u|BigInt(e.getUint32(t,n)*r+e.getUint32(t+4,n)*i)}function J7(e,t,n){const r=e.getUint32(t,n),i=e.getUint32(t+4,n),o=+!!n,a=+!n;return BigInt(r*a+i*o)<<$u|BigInt(r*o+i*a)}function eM(e,t,n,r){const i=Number(n>>$u),o=Number(n&BigInt(4294967295));r?(e.setInt32(t+4,i,r),e.setUint32(t,o,r)):(e.setInt32(t,i,r),e.setUint32(t+4,o,r))}function tM(e,t,n,r){const i=Number(n>>$u),o=Number(n&BigInt(4294967295));r?(e.setUint32(t+4,i,r),e.setUint32(t,o,r)):(e.setUint32(t,i,r),e.setUint32(t+4,o,r))}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return K7(this,e,t)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(e,t){return J7(this,e,t)}),"setBigInt64"in DataView||(DataView.prototype.setBigInt64=function(e,t,n){eM(this,e,t,n)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,n){tM(this,e,t,n)});class nM{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+`
|
|
278
|
+
`}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 Cn=new Map,ro="___parser_",kn={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},Ku={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"},Ju={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 Ie=class Bn{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new Bn}primitiveGenerateN(t,n){const r=Ku[t],i=Ju[t];n.pushCode(`${n.generateVariable(this.varName)} = dataView.get${r}(offset, ${i});`),n.pushCode(`offset += ${kn[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 Cn.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"&&!Cn.has(n.type)&&!(n.type in kn))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),o=n.choices[i];if(isNaN(i))throw new Error(`Choice key "${r}" is not a number.`);if(typeof o=="string"&&!Cn.has(o)&&!(o in kn))throw new Error(`Choice type "${o}" 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 Bn)&&!Cn.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof Bn)&&!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 kn)&&!Cn.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 nM(t,this.useContextVariables);return n.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(n),n.pushCode(`return ${ro+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 ${ro+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=Cn.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(kn).indexOf(this.type)>=0)t=kn[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=kn[this.options.type]:this.options.type instanceof Bn&&(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 Bn;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 c=0;for(let h=u;h<t.bitFields.length;h++){const d=t.bitFields[h].options.length;if(c+d>32)break;c+=d}return c},o=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 a=0;const s=this.endian==="be";let f=0,l=0;t.bitFields.forEach((u,c)=>{let h=u.options.length;if(h>l){if(l){const b=-1>>>32-l;t.pushCode(`${u.varName} = (${r} & 0x${b.toString(16)}) << ${h-l};`),h-=l}a=0,l=f=o(i(c)-l)}const d=s?f-a-h:a,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),a+=h,l-=h}),t.bitFields=[]}}generateSeek(t){const n=t.generateOption(this.options.length);t.pushCode(`offset += ${n};`)}generateString(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable(),i=this.options.encoding,o=i.toLowerCase()==="hex",a='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 f=`offset - ${r} < ${s} ? offset - 1 : offset`;t.pushCode(o?`${n} = Array.from(buffer.subarray(${r}, ${f}), ${a}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, ${f}));`)}else if(this.options.length){const s=t.generateOption(this.options.length);t.pushCode(o?`${n} = Array.from(buffer.subarray(offset, offset + ${s}), ${a}).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(o?`${n} = Array.from(buffer.subarray(${r}, offset - 1), ${a}).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(o?`${n} = Array.from(buffer.subarray(${r}, offset), ${a}).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(),o=t.generateTmpVariable();t.pushCode(`var ${i} = offset;`),t.pushCode(`var ${o} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${o} = dataView.getUint8(offset);`);const a=t.addImport(r);t.pushCode(`if (${a}.call(${t.generateVariable()}, ${o}, 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,o=t.generateTmpVariable(),a=t.generateVariable(this.varName),s=t.generateTmpVariable(),f=this.options.key,l=typeof f=="string";if(l?t.pushCode(`${a} = {};`):t.pushCode(`${a} = [];`),typeof this.options.readUntil=="function"?t.pushCode("do {"):this.options.readUntil==="eof"?t.pushCode(`for (var ${o} = 0; offset < buffer.length; ${o}++) {`):r!==void 0?t.pushCode(`for (var ${o} = offset + ${r}; offset < ${o}; ) {`):t.pushCode(`for (var ${o} = ${n}; ${o} > 0; ${o}--) {`),typeof i=="string")if(Cn.get(i)){const u=t.generateTmpVariable();if(t.pushCode(`var ${u} = ${ro+i}(offset, {`),t.useContextVariables){const c=t.generateVariable();t.pushCode(`$parent: ${c},`),t.pushCode(`$root: ${c}.$root,`),!this.options.readUntil&&r===void 0&&t.pushCode(`$index: ${n} - ${o},`)}t.pushCode("});"),t.pushCode(`var ${s} = ${u}.result; offset = ${u}.offset;`),i!==this.alias&&t.addReference(i)}else{const u=Ku[i],c=Ju[i];t.pushCode(`var ${s} = dataView.get${u}(offset, ${c});`),t.pushCode(`offset += ${kn[i]};`)}else if(i instanceof Bn){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} - ${o};`)),i.generate(t),t.useContextVariables&&(t.pushCode(`delete ${s}.$parent;`),t.pushCode(`delete ${s}.$root;`),t.pushCode(`delete ${s}.$index;`)),t.popScope()}if(l?t.pushCode(`${a}[${s}.${f}] = ${s};`):t.pushCode(`${a}.push(${s});`),t.pushCode("}"),typeof this.options.readUntil=="function"){const u=this.options.readUntil,c=t.addImport(u);t.pushCode(`while (!${c}.call(${t.generateVariable()}, ${s}, buffer.subarray(offset)));`)}}generateChoiceCase(t,n,r){if(typeof r=="string"){const i=t.generateVariable(this.varName);if(Cn.has(r)){const o=t.generateTmpVariable();t.pushCode(`var ${o} = ${ro+r}(offset, {`),t.useContextVariables&&(t.pushCode(`$parent: ${i}.$parent,`),t.pushCode(`$root: ${i}.$root,`)),t.pushCode("});"),t.pushCode(`${i} = ${o}.result; offset = ${o}.offset;`),r!==this.alias&&t.addReference(r)}else{const o=Ku[r],a=Ju[r];t.pushCode(`${i} = dataView.get${o}(offset, ${a});`),t.pushCode(`offset += ${kn[r]}`)}}else r instanceof Bn&&(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 o=parseInt(i,10),a=this.options.choices[o];t.pushCode(`case ${o}:`),this.generateChoiceCase(t,this.varName,a),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 Bn){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(Cn.has(this.options.type)){const r=t.generateTmpVariable();if(t.pushCode(`var ${r} = ${ro+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 f=this.options.readUntil,l=t.generateTmpVariable(),u=t.generateTmpVariable();t.pushCode(`var ${l} = offset;`),t.pushCode(`var ${u} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${u} = dataView.getUint8(offset);`);const c=t.addImport(f);t.pushCode(`if (${c}.call(${t.generateVariable()}, ${u}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${r} = buffer.subarray(${l}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${r} = buffer.subarray(offset);`);else{const f=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${f});`),t.pushCode(`offset += ${f};`)}this.options.clone&&t.pushCode(`${r} = buffer.constructor.from(${r});`);const i=t.generateTmpVariable(),o=t.generateTmpVariable(),a=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 ${o} = offset;`),t.pushCode(`var ${a} = dataView;`),t.pushCode(`buffer = ${r};`),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof Bn)this.varName&&t.pushCode(`${n} = {};`),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(Cn.has(this.options.type)){const f=t.generateTmpVariable();t.pushCode(`var ${f} = ${ro+this.options.type}(0);`),t.pushCode(`${n} = ${f}.result;`),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode(`buffer = ${i};`),t.pushCode(`dataView = ${a};`),t.pushCode(`offset = ${o};`)}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(),o=t.generateVariable(this.varName);if(t.pushCode(`var ${i} = offset;`),t.pushCode(`offset = ${r};`),this.options.type instanceof Bn){if(t.pushCode(`${o} = {};`),t.useContextVariables){const a=t.generateVariable();t.pushCode(`${o}.$parent = ${a};`),t.pushCode(`${o}.$root = ${a}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode(`delete ${o}.$parent;`),t.pushCode(`delete ${o}.$root;`))}else if(Cn.has(this.options.type)){const a=t.generateTmpVariable();if(t.pushCode(`var ${a} = ${ro+this.options.type}(offset, {`),t.useContextVariables){const s=t.generateVariable();t.pushCode(`$parent: ${s},`),t.pushCode(`$root: ${s}.$root,`)}t.pushCode("});"),t.pushCode(`${o} = ${a}.result; offset = ${a}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(kn).indexOf(this.options.type)>=0){const a=Ku[n],s=Ju[n];t.pushCode(`${o} = dataView.get${a}(offset, ${s});`),t.pushCode(`offset += ${kn[n]};`)}t.pushCode(`offset = ${i};`)}generateSaveOffset(t){const n=t.generateVariable(this.varName);t.pushCode(`${n} = offset`)}};var yx={},$0={},io={},cl={};Object.defineProperty(cl,"__esModule",{value:!0});function K0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wx(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 J0(e,t,n){return t&&wx(e.prototype,t),n&&wx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rM(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&&ep(e,t)}function oa(e){return oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},oa(e)}function ep(e,t){return ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ep(e,t)}function iM(){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 hl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oM(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 hl(e)}function aM(e){var t=iM();return function(){var r=oa(e),i;if(t){var o=oa(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return oM(this,i)}}function sM(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=oa(e),e!==null););return e}function ec(){return typeof Reflect<"u"&&Reflect.get?ec=Reflect.get.bind():ec=function(t,n,r){var i=sM(t,n);if(i){var o=Object.getOwnPropertyDescriptor(i,n);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ec.apply(this,arguments)}var vx=function(){function e(){K0(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return J0(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],o=0,a=i.length;o<a;o++)if(i[o].callback===r){i.splice(o,1);return}}}},{key:"dispatchEvent",value:function(n){if(n.type in this.listeners){for(var r=this.listeners[n.type],i=r.slice(),o=0,a=i.length;o<a;o++){var s=i[o];try{s.callback.call(this,n)}catch(f){Promise.resolve().then(function(){throw f})}s.options&&s.options.once&&this.removeEventListener(n.type,s.callback)}return!n.defaultPrevented}}}]),e}(),tp=function(e){rM(n,e);var t=aM(n);function n(){var r;return K0(this,n),r=t.call(this),r.listeners||vx.call(hl(r)),Object.defineProperty(hl(r),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(hl(r),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(hl(r),"reason",{value:void 0,writable:!0,configurable:!0}),r}return J0(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)),ec(oa(n.prototype),"dispatchEvent",this).call(this,i)}}]),n}(vx),xx=function(){function e(){K0(this,e),Object.defineProperty(this,"signal",{value:new tp,writable:!0,configurable:!0})}return J0(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&&(xx.prototype[Symbol.toStringTag]="AbortController",tp.prototype[Symbol.toStringTag]="AbortSignal");function lM(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 fM(e){typeof e=="function"&&(e={fetch:e});var t=e,n=t.fetch,r=t.Request,i=r===void 0?n.Request:r,o=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,s=a===void 0?!1:a;if(!lM({fetch:n,Request:i,AbortController:o,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:n,Request:f};var f=i;(f&&!f.prototype.hasOwnProperty("signal")||s)&&(f=function(h,d){var p;d&&d.signal&&(p=d.signal,delete d.signal);var b=new i(h,d);return p&&Object.defineProperty(b,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),b},f.prototype=i.prototype);var l=n,u=function(h,d){var p=f&&f.prototype.isPrototypeOf(h)?h.signal:d?d.signal:void 0;if(p){var b;try{b=new DOMException("Aborted","AbortError")}catch{b=new Error("Aborted"),b.name="AbortError"}if(p.aborted)return Promise.reject(b);var y=new Promise(function(w,_){p.addEventListener("abort",function(){return _(b)},{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([y,l(h,d)])}return l(h,d)};return{fetch:u,Request:f}}cl.AbortController=xx,cl.AbortSignal=tp,cl.abortableFetch=fM,Object.defineProperty(io,"__esModule",{value:!0}),io.AbortSignal=io.AbortController=void 0;const Ax=cl;var tc=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 uM=typeof tc().AbortController>"u"?Ax.AbortController:tc().AbortController;io.AbortController=uM;let cM=typeof tc().AbortController>"u"?Ax.AbortSignal:tc().AbortSignal;io.AbortSignal=cM;var np={};Object.defineProperty(np,"__esModule",{value:!0});const hM=io;class dM{}class pM{constructor(){this.signals=new Set,this.abortController=new hM.AbortController}addSignal(t=new dM){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()}}np.default=pM;var rp={};Object.defineProperty(rp,"__esModule",{value:!0});class gM{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)})}}rp.default=gM;var Ex=Bu&&Bu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($0,"__esModule",{value:!0});const mM=io,bM=Ex(np),yM=Ex(rp);class nc{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 o=new bM.default,a=new yM.default;a.addCallback(i);const s={aborter:o,promise:this.fillCallback(n,o.signal,f=>{a.callback(f)}),settled:!1,statusReporter:a,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(f=>{throw console.error(f),f}),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 mM.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const o=this.cache.get(t);return o?o.aborted&&!o.settled?(this.evict(t,o),this.get(t,n,r,i)):o.settled?o.promise:(o.aborter.addSignal(r),o.statusReporter.addCallback(i),nc.checkSinglePromise(o.promise,r)):(this.fill(t,n,r,i),nc.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}}$0.default=nc;var wM=Bu&&Bu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yx,"__esModule",{value:!0});const vM=wM($0);var rc=yx.default=vM.default;class xM{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 AM=xM;const ic=Ws(AM);class Kr{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 Kr(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 o=1;o<n.length;o+=1){const a=n[o];a.min()>i.max()+1?(r.push(i),i=a):a.max()>i.max()&&(i=new Kr(i.min(),a.max()))}return r.push(i),r.length===1?r[0]:new Kr(r)}intersection(t){let n=this,r=t;const i=this.ranges(),o=r.ranges(),a=i.length,s=o.length;let f=0,l=0;const u=[];for(;f<a&&l<s;){n=i[f],r=o[l];const c=Math.max(n.min(),r.min()),h=Math.min(n.max(),r.max());h>=c&&u.push(new Kr(c,h)),n.max()>r.max()?l+=1:f+=1}if(u.length===0)throw new Error("found range of length 0");return u.length===1?u[0]:new Kr(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 EM=4,_x=0,Sx=1,_M=2;function aa(e){let t=e.length;for(;--t>=0;)e[t]=0}const SM=0,Cx=1,CM=2,kM=3,IM=258,ip=29,dl=256,pl=dl+1+ip,sa=30,op=19,kx=2*pl+1,oo=15,ap=16,TM=7,sp=256,Ix=16,Tx=17,Bx=18,lp=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]),oc=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]),BM=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Dx=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DM=512,ur=new Array((pl+2)*2);aa(ur);const gl=new Array(sa*2);aa(gl);const ml=new Array(DM);aa(ml);const bl=new Array(IM-kM+1);aa(bl);const fp=new Array(ip);aa(fp);const ac=new Array(sa);aa(ac);function up(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 Rx,Fx,Mx;function cp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const Px=e=>e<256?ml[e]:ml[256+(e>>>7)],yl=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},jt=(e,t,n)=>{e.bi_valid>ap-n?(e.bi_buf|=t<<e.bi_valid&65535,yl(e,e.bi_buf),e.bi_buf=t>>ap-e.bi_valid,e.bi_valid+=n-ap):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},Zn=(e,t,n)=>{jt(e,n[t*2],n[t*2+1])},Lx=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},RM=e=>{e.bi_valid===16?(yl(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)},FM=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,f=t.stat_desc.max_length;let l,u,c,h,d,p,b=0;for(h=0;h<=oo;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<kx;l++)u=e.heap[l],h=n[n[u*2+1]*2+1]+1,h>f&&(h=f,b++),n[u*2+1]=h,!(u>r)&&(e.bl_count[h]++,d=0,u>=s&&(d=a[u-s]),p=n[u*2],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[u*2+1]+d)));if(b!==0){do{for(h=f-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[f]--,b-=2}while(b>0);for(h=f;h!==0;h--)for(u=e.bl_count[h];u!==0;)c=e.heap[--l],!(c>r)&&(n[c*2+1]!==h&&(e.opt_len+=(h-n[c*2+1])*n[c*2],n[c*2+1]=h),u--)}},Nx=(e,t,n)=>{const r=new Array(oo+1);let i=0,o,a;for(o=1;o<=oo;o++)i=i+n[o-1]<<1,r[o]=i;for(a=0;a<=t;a++){let s=e[a*2+1];s!==0&&(e[a*2]=Lx(r[s]++,s))}},MM=()=>{let e,t,n,r,i;const o=new Array(oo+1);for(n=0,r=0;r<ip-1;r++)for(fp[r]=n,e=0;e<1<<lp[r];e++)bl[n++]=r;for(bl[n-1]=r,i=0,r=0;r<16;r++)for(ac[r]=i,e=0;e<1<<oc[r];e++)ml[i++]=r;for(i>>=7;r<sa;r++)for(ac[r]=i<<7,e=0;e<1<<oc[r]-7;e++)ml[256+i++]=r;for(t=0;t<=oo;t++)o[t]=0;for(e=0;e<=143;)ur[e*2+1]=8,e++,o[8]++;for(;e<=255;)ur[e*2+1]=9,e++,o[9]++;for(;e<=279;)ur[e*2+1]=7,e++,o[7]++;for(;e<=287;)ur[e*2+1]=8,e++,o[8]++;for(Nx(ur,pl+1,o),e=0;e<sa;e++)gl[e*2+1]=5,gl[e*2]=Lx(e,5);Rx=new up(ur,lp,dl+1,pl,oo),Fx=new up(gl,oc,0,sa,oo),Mx=new up(new Array(0),BM,0,op,TM)},Ox=e=>{let t;for(t=0;t<pl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<sa;t++)e.dyn_dtree[t*2]=0;for(t=0;t<op;t++)e.bl_tree[t*2]=0;e.dyn_ltree[sp*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},zx=e=>{e.bi_valid>8?yl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Ux=(e,t,n,r)=>{const i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},hp=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&Ux(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Ux(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},Gx=(e,t,n)=>{let r,i,o=0,a,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?Zn(e,i,t):(a=bl[i],Zn(e,a+dl+1,t),s=lp[a],s!==0&&(i-=fp[a],jt(e,i,s)),r--,a=Px(r),Zn(e,a,n),s=oc[a],s!==0&&(r-=ac[a],jt(e,r,s)));while(o<e.sym_next);Zn(e,sp,t)},dp=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,s,f=-1,l;for(e.heap_len=0,e.heap_max=kx,a=0;a<o;a++)n[a*2]!==0?(e.heap[++e.heap_len]=f=a,e.depth[a]=0):n[a*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=f<2?++f:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=f,a=e.heap_len>>1;a>=1;a--)hp(e,n,a);l=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],hp(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[l*2]=n[a*2]+n[s*2],e.depth[l]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[a*2+1]=n[s*2+1]=l,e.heap[1]=l++,hp(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],FM(e,t),Nx(n,f,e.bl_count)},Hx=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,f=7,l=4;for(a===0&&(f=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=a,a=t[(r+1)*2+1],!(++s<f&&o===a)&&(s<l?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[Ix*2]++):s<=10?e.bl_tree[Tx*2]++:e.bl_tree[Bx*2]++,s=0,i=o,a===0?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4))},Vx=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,f=7,l=4;for(a===0&&(f=138,l=3),r=0;r<=n;r++)if(o=a,a=t[(r+1)*2+1],!(++s<f&&o===a)){if(s<l)do Zn(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(Zn(e,o,e.bl_tree),s--),Zn(e,Ix,e.bl_tree),jt(e,s-3,2)):s<=10?(Zn(e,Tx,e.bl_tree),jt(e,s-3,3)):(Zn(e,Bx,e.bl_tree),jt(e,s-11,7));s=0,i=o,a===0?(f=138,l=3):o===a?(f=6,l=3):(f=7,l=4)}},PM=e=>{let t;for(Hx(e,e.dyn_ltree,e.l_desc.max_code),Hx(e,e.dyn_dtree,e.d_desc.max_code),dp(e,e.bl_desc),t=op-1;t>=3&&e.bl_tree[Dx[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},LM=(e,t,n,r)=>{let i;for(jt(e,t-257,5),jt(e,n-1,5),jt(e,r-4,4),i=0;i<r;i++)jt(e,e.bl_tree[Dx[i]*2+1],3);Vx(e,e.dyn_ltree,t-1),Vx(e,e.dyn_dtree,n-1)},NM=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return _x;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Sx;for(n=32;n<dl;n++)if(e.dyn_ltree[n*2]!==0)return Sx;return _x};let jx=!1;const OM=e=>{jx||(MM(),jx=!0),e.l_desc=new cp(e.dyn_ltree,Rx),e.d_desc=new cp(e.dyn_dtree,Fx),e.bl_desc=new cp(e.bl_tree,Mx),e.bi_buf=0,e.bi_valid=0,Ox(e)},qx=(e,t,n,r)=>{jt(e,(SM<<1)+(r?1:0),3),zx(e),yl(e,n),yl(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},zM=e=>{jt(e,Cx<<1,3),Zn(e,sp,ur),RM(e)},UM=(e,t,n,r)=>{let i,o,a=0;e.level>0?(e.strm.data_type===_M&&(e.strm.data_type=NM(e)),dp(e,e.l_desc),dp(e,e.d_desc),a=PM(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?qx(e,t,n,r):e.strategy===EM||o===i?(jt(e,(Cx<<1)+(r?1:0),3),Gx(e,ur,gl)):(jt(e,(CM<<1)+(r?1:0),3),LM(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),Gx(e,e.dyn_ltree,e.dyn_dtree)),Ox(e),r&&zx(e)},GM=(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[(bl[n]+dl+1)*2]++,e.dyn_dtree[Px(t)*2]++),e.sym_next===e.sym_end);var HM=OM,VM=qx,jM=UM,qM=GM,ZM=zM,WM={_tr_init:HM,_tr_stored_block:VM,_tr_flush_block:jM,_tr_tally:qM,_tr_align:ZM},wl=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,a=0;for(;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+t[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0};const YM=()=>{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},QM=new Uint32Array(YM());var ht=(e,t,n,r)=>{const i=QM,o=r+n;e^=-1;for(let a=r;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1},la={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"},vl={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:XM,_tr_stored_block:pp,_tr_flush_block:$M,_tr_tally:Jr,_tr_align:KM}=WM,{Z_NO_FLUSH:ei,Z_PARTIAL_FLUSH:JM,Z_FULL_FLUSH:eP,Z_FINISH:un,Z_BLOCK:Zx,Z_OK:bt,Z_STREAM_END:Wx,Z_STREAM_ERROR:Wn,Z_DATA_ERROR:tP,Z_BUF_ERROR:gp,Z_DEFAULT_COMPRESSION:nP,Z_FILTERED:rP,Z_HUFFMAN_ONLY:sc,Z_RLE:iP,Z_FIXED:oP,Z_DEFAULT_STRATEGY:aP,Z_UNKNOWN:sP,Z_DEFLATED:lc}=vl,lP=9,fP=15,uP=8,cP=29,mp=256+1+cP,hP=30,dP=19,pP=2*mp+1,gP=15,de=3,ti=258,Yn=ti+de+1,mP=32,fa=42,bp=57,yp=69,wp=73,vp=91,xp=103,ao=113,xl=666,Dt=1,ua=2,so=3,ca=4,bP=3,lo=(e,t)=>(e.msg=la[t],t),Yx=e=>e*2-(e>4?9:0),ni=e=>{let t=e.length;for(;--t>=0;)e[t]=0},yP=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 ri=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const $t=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))},Kt=(e,t)=>{$M(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,$t(e.strm)},xe=(e,t)=>{e.pending_buf[e.pending++]=t},Al=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Ap=(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=wl(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ht(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Qx=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,a=e.prev_length,s=e.nice_match;const f=e.strstart>e.w_size-Yn?e.strstart-(e.w_size-Yn):0,l=e.window,u=e.w_mask,c=e.prev,h=e.strstart+ti;let d=l[r+a-1],p=l[r+a];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+a]!==p||l[i+a-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(o=ti-(h-r),r=h-ti,o>a){if(e.match_start=t,a=o,o>=s)break;d=l[r+a-1],p=l[r+a]}}while((t=c[t&u])>f&&--n!==0);return a<=e.lookahead?a:e.lookahead},ha=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Yn)&&(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),yP(e),r+=t),e.strm.avail_in===0)break;if(n=Ap(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=de)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=ri(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=ri(e,e.ins_h,e.window[i+de-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<de)););}while(e.lookahead<Yn&&e.strm.avail_in!==0)},Xx=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,a=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o||(o=e.strm.avail_out-o,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r<n&&(r===0&&t!==un||t===ei||r!==i+e.strm.avail_in)))break;a=t===un&&r===i+e.strm.avail_in?1:0,pp(e,0,0,a),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,$t(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&&(Ap(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(a===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),a?ca:t!==ei&&t!==un&&e.strm.avail_in===0&&e.strstart===e.block_start?ua:(o=e.window_size-e.strstart,e.strm.avail_in>o&&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++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Ap(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===un)&&t!==ei&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,a=t===un&&e.strm.avail_in===0&&r===i?1:0,pp(e,e.block_start,r,a),e.block_start+=r,$t(e.strm)),a?so:Dt)},Ep=(e,t)=>{let n,r;for(;;){if(e.lookahead<Yn){if(ha(e),e.lookahead<Yn&&t===ei)return Dt;if(e.lookahead===0)break}if(n=0,e.lookahead>=de&&(e.ins_h=ri(e,e.ins_h,e.window[e.strstart+de-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-Yn&&(e.match_length=Qx(e,n)),e.match_length>=de)if(r=Jr(e,e.strstart-e.match_start,e.match_length-de),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=de){e.match_length--;do e.strstart++,e.ins_h=ri(e,e.ins_h,e.window[e.strstart+de-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=ri(e,e.ins_h,e.window[e.strstart+1]);else r=Jr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Kt(e,!1),e.strm.avail_out===0))return Dt}return e.insert=e.strstart<de-1?e.strstart:de-1,t===un?(Kt(e,!0),e.strm.avail_out===0?so:ca):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?Dt:ua},da=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<Yn){if(ha(e),e.lookahead<Yn&&t===ei)return Dt;if(e.lookahead===0)break}if(n=0,e.lookahead>=de&&(e.ins_h=ri(e,e.ins_h,e.window[e.strstart+de-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=de-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Yn&&(e.match_length=Qx(e,n),e.match_length<=5&&(e.strategy===rP||e.match_length===de&&e.strstart-e.match_start>4096)&&(e.match_length=de-1)),e.prev_length>=de&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-de,r=Jr(e,e.strstart-1-e.prev_match,e.prev_length-de),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=ri(e,e.ins_h,e.window[e.strstart+de-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=de-1,e.strstart++,r&&(Kt(e,!1),e.strm.avail_out===0))return Dt}else if(e.match_available){if(r=Jr(e,0,e.window[e.strstart-1]),r&&Kt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Dt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Jr(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<de-1?e.strstart:de-1,t===un?(Kt(e,!0),e.strm.avail_out===0?so:ca):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?Dt:ua},wP=(e,t)=>{let n,r,i,o;const a=e.window;for(;;){if(e.lookahead<=ti){if(ha(e),e.lookahead<=ti&&t===ei)return Dt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=de&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+ti;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=ti-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=de?(n=Jr(e,1,e.match_length-de),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Jr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Kt(e,!1),e.strm.avail_out===0))return Dt}return e.insert=0,t===un?(Kt(e,!0),e.strm.avail_out===0?so:ca):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?Dt:ua},vP=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(ha(e),e.lookahead===0)){if(t===ei)return Dt;break}if(e.match_length=0,n=Jr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Kt(e,!1),e.strm.avail_out===0))return Dt}return e.insert=0,t===un?(Kt(e,!0),e.strm.avail_out===0?so:ca):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?Dt:ua};function Qn(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 El=[new Qn(0,0,0,0,Xx),new Qn(4,4,8,4,Ep),new Qn(4,5,16,8,Ep),new Qn(4,6,32,32,Ep),new Qn(4,4,16,16,da),new Qn(8,16,32,32,da),new Qn(8,16,128,128,da),new Qn(8,32,128,256,da),new Qn(32,128,258,1024,da),new Qn(32,258,258,4096,da)],xP=e=>{e.window_size=2*e.w_size,ni(e.head),e.max_lazy_match=El[e.level].max_lazy,e.good_match=El[e.level].good_length,e.nice_match=El[e.level].nice_length,e.max_chain_length=El[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=de-1,e.match_available=0,e.ins_h=0};function AP(){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=lc,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(pP*2),this.dyn_dtree=new Uint16Array((2*hP+1)*2),this.bl_tree=new Uint16Array((2*dP+1)*2),ni(this.dyn_ltree),ni(this.dyn_dtree),ni(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(gP+1),this.heap=new Uint16Array(2*mp+1),ni(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*mp+1),ni(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 _l=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==fa&&t.status!==bp&&t.status!==yp&&t.status!==wp&&t.status!==vp&&t.status!==xp&&t.status!==ao&&t.status!==xl?1:0},$x=e=>{if(_l(e))return lo(e,Wn);e.total_in=e.total_out=0,e.data_type=sP;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?bp:t.wrap?fa:ao,e.adler=t.wrap===2?0:1,t.last_flush=-2,XM(t),bt},Kx=e=>{const t=$x(e);return t===bt&&xP(e.state),t},EP=(e,t)=>_l(e)||e.state.wrap!==2?Wn:(e.state.gzhead=t,bt),Jx=(e,t,n,r,i,o)=>{if(!e)return Wn;let a=1;if(t===nP&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>lP||n!==lc||r<8||r>15||t<0||t>9||o<0||o>oP||r===8&&a!==1)return lo(e,Wn);r===8&&(r=9);const s=new AP;return e.state=s,s.strm=e,s.status=fa,s.wrap=a,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+de-1)/de),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=o,s.method=n,Kx(e)},_P=(e,t)=>Jx(e,t,lc,fP,uP,aP),SP=(e,t)=>{if(_l(e)||t>Zx||t<0)return e?lo(e,Wn):Wn;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===xl&&t!==un)return lo(e,e.avail_out===0?gp:Wn);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if($t(e),e.avail_out===0)return n.last_flush=-1,bt}else if(e.avail_in===0&&Yx(t)<=Yx(r)&&t!==un)return lo(e,gp);if(n.status===xl&&e.avail_in!==0)return lo(e,gp);if(n.status===fa&&n.wrap===0&&(n.status=ao),n.status===fa){let i=lc+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=sc||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=mP),i+=31-i%31,Al(n,i),n.strstart!==0&&(Al(n,e.adler>>>16),Al(n,e.adler&65535)),e.adler=1,n.status=ao,$t(e),n.pending!==0)return n.last_flush=-1,bt}if(n.status===bp){if(e.adler=0,xe(n,31),xe(n,139),xe(n,8),n.gzhead)xe(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)),xe(n,n.gzhead.time&255),xe(n,n.gzhead.time>>8&255),xe(n,n.gzhead.time>>16&255),xe(n,n.gzhead.time>>24&255),xe(n,n.level===9?2:n.strategy>=sc||n.level<2?4:0),xe(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(xe(n,n.gzhead.extra.length&255),xe(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=ht(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=yp;else if(xe(n,0),xe(n,0),xe(n,0),xe(n,0),xe(n,0),xe(n,n.level===9?2:n.strategy>=sc||n.level<2?4:0),xe(n,bP),n.status=ao,$t(e),n.pending!==0)return n.last_flush=-1,bt}if(n.status===yp){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>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=ht(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,$t(e),n.pending!==0)return n.last_flush=-1,bt;i=0,o-=s}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=ht(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=wp}if(n.status===wp){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=ht(e.adler,n.pending_buf,n.pending-i,i)),$t(e),n.pending!==0)return n.last_flush=-1,bt;i=0}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,xe(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=ht(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=vp}if(n.status===vp){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=ht(e.adler,n.pending_buf,n.pending-i,i)),$t(e),n.pending!==0)return n.last_flush=-1,bt;i=0}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,xe(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=ht(e.adler,n.pending_buf,n.pending-i,i))}n.status=xp}if(n.status===xp){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&($t(e),n.pending!==0))return n.last_flush=-1,bt;xe(n,e.adler&255),xe(n,e.adler>>8&255),e.adler=0}if(n.status=ao,$t(e),n.pending!==0)return n.last_flush=-1,bt}if(e.avail_in!==0||n.lookahead!==0||t!==ei&&n.status!==xl){let i=n.level===0?Xx(n,t):n.strategy===sc?vP(n,t):n.strategy===iP?wP(n,t):El[n.level].func(n,t);if((i===so||i===ca)&&(n.status=xl),i===Dt||i===so)return e.avail_out===0&&(n.last_flush=-1),bt;if(i===ua&&(t===JM?KM(n):t!==Zx&&(pp(n,0,0,!1),t===eP&&(ni(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),$t(e),e.avail_out===0))return n.last_flush=-1,bt}return t!==un?bt:n.wrap<=0?Wx:(n.wrap===2?(xe(n,e.adler&255),xe(n,e.adler>>8&255),xe(n,e.adler>>16&255),xe(n,e.adler>>24&255),xe(n,e.total_in&255),xe(n,e.total_in>>8&255),xe(n,e.total_in>>16&255),xe(n,e.total_in>>24&255)):(Al(n,e.adler>>>16),Al(n,e.adler&65535)),$t(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?bt:Wx)},CP=e=>{if(_l(e))return Wn;const t=e.state.status;return e.state=null,t===ao?lo(e,tP):bt},kP=(e,t)=>{let n=t.length;if(_l(e))return Wn;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==fa||r.lookahead)return Wn;if(i===1&&(e.adler=wl(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(ni(r.head),r.strstart=0,r.block_start=0,r.insert=0);let f=new Uint8Array(r.w_size);f.set(t.subarray(n-r.w_size,n),0),t=f,n=r.w_size}const o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,ha(r);r.lookahead>=de;){let f=r.strstart,l=r.lookahead-(de-1);do r.ins_h=ri(r,r.ins_h,r.window[f+de-1]),r.prev[f&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=f,f++;while(--l);r.strstart=f,r.lookahead=de-1,ha(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=de-1,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,bt};var IP=_P,TP=Jx,BP=Kx,DP=$x,RP=EP,FP=SP,MP=CP,PP=kP,LP="pako deflate (from Nodeca project)",Sl={deflateInit:IP,deflateInit2:TP,deflateReset:BP,deflateResetKeep:DP,deflateSetHeader:RP,deflate:FP,deflateEnd:MP,deflateSetDictionary:PP,deflateInfo:LP};const NP=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var OP=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)NP(n,r)&&(e[r]=n[r])}}return e},zP=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,o=e.length;r<o;r++){let a=e[r];n.set(a,i),i+=a.length}return n},fc={assign:OP,flattenChunks:zP};let eA=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{eA=!1}const Cl=new Uint8Array(256);for(let e=0;e<256;e++)Cl[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Cl[254]=Cl[254]=1;var UP=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(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),o=0,i=0;o<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};const GP=(e,t)=>{if(t<65534&&e.subarray&&eA)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 HP=(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 o=new Array(n*2);for(i=0,r=0;r<n;){let a=e[r++];if(a<128){o[i++]=a;continue}let s=Cl[a];if(s>4){o[i++]=65533,r+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&r<n;)a=a<<6|e[r++]&63,s--;if(s>1){o[i++]=65533;continue}a<65536?o[i++]=a:(a-=65536,o[i++]=55296|a>>10&1023,o[i++]=56320|a&1023)}return GP(o,i)},VP=(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+Cl[e[n]]>t?n:t},kl={string2buf:UP,buf2string:HP,utf8border:VP};function jP(){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 tA=jP;const nA=Object.prototype.toString,{Z_NO_FLUSH:qP,Z_SYNC_FLUSH:ZP,Z_FULL_FLUSH:WP,Z_FINISH:YP,Z_OK:uc,Z_STREAM_END:QP,Z_DEFAULT_COMPRESSION:XP,Z_DEFAULT_STRATEGY:$P,Z_DEFLATED:KP}=vl;function _p(e){this.options=fc.assign({level:XP,method:KP,chunkSize:16384,windowBits:15,memLevel:8,strategy:$P},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 tA,this.strm.avail_out=0;let n=Sl.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==uc)throw new Error(la[n]);if(t.header&&Sl.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=kl.string2buf(t.dictionary):nA.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Sl.deflateSetDictionary(this.strm,r),n!==uc)throw new Error(la[n]);this._dict_set=!0}}_p.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?YP:qP,typeof e=="string"?n.input=kl.string2buf(e):nA.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),(o===ZP||o===WP)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Sl.deflate(n,o),i===QP)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Sl.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===uc;if(n.avail_out===0){this.onData(n.output);continue}if(o>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},_p.prototype.onData=function(e){this.chunks.push(e)},_p.prototype.onEnd=function(e){e===uc&&(this.result=fc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const cc=16209,JP=16191;var eL=function(t,n){let r,i,o,a,s,f,l,u,c,h,d,p,b,y,w,_,C,S,T,B,I,F,P,j;const O=t.state;r=t.next_in,P=t.input,i=r+(t.avail_in-5),o=t.next_out,j=t.output,a=o-(n-t.avail_out),s=o+(t.avail_out-257),f=O.dmax,l=O.wsize,u=O.whave,c=O.wnext,h=O.window,d=O.hold,p=O.bits,b=O.lencode,y=O.distcode,w=(1<<O.lenbits)-1,_=(1<<O.distbits)-1;e:do{p<15&&(d+=P[r++]<<p,p+=8,d+=P[r++]<<p,p+=8),C=b[d&w];t:for(;;){if(S=C>>>24,d>>>=S,p-=S,S=C>>>16&255,S===0)j[o++]=C&65535;else if(S&16){T=C&65535,S&=15,S&&(p<S&&(d+=P[r++]<<p,p+=8),T+=d&(1<<S)-1,d>>>=S,p-=S),p<15&&(d+=P[r++]<<p,p+=8,d+=P[r++]<<p,p+=8),C=y[d&_];n:for(;;){if(S=C>>>24,d>>>=S,p-=S,S=C>>>16&255,S&16){if(B=C&65535,S&=15,p<S&&(d+=P[r++]<<p,p+=8,p<S&&(d+=P[r++]<<p,p+=8)),B+=d&(1<<S)-1,B>f){t.msg="invalid distance too far back",O.mode=cc;break e}if(d>>>=S,p-=S,S=o-a,B>S){if(S=B-S,S>u&&O.sane){t.msg="invalid distance too far back",O.mode=cc;break e}if(I=0,F=h,c===0){if(I+=l-S,S<T){T-=S;do j[o++]=h[I++];while(--S);I=o-B,F=j}}else if(c<S){if(I+=l+c-S,S-=c,S<T){T-=S;do j[o++]=h[I++];while(--S);if(I=0,c<T){S=c,T-=S;do j[o++]=h[I++];while(--S);I=o-B,F=j}}}else if(I+=c-S,S<T){T-=S;do j[o++]=h[I++];while(--S);I=o-B,F=j}for(;T>2;)j[o++]=F[I++],j[o++]=F[I++],j[o++]=F[I++],T-=3;T&&(j[o++]=F[I++],T>1&&(j[o++]=F[I++]))}else{I=o-B;do j[o++]=j[I++],j[o++]=j[I++],j[o++]=j[I++],T-=3;while(T>2);T&&(j[o++]=j[I++],T>1&&(j[o++]=j[I++]))}}else if(S&64){t.msg="invalid distance code",O.mode=cc;break e}else{C=y[(C&65535)+(d&(1<<S)-1)];continue n}break}}else if(S&64)if(S&32){O.mode=JP;break e}else{t.msg="invalid literal/length code",O.mode=cc;break e}else{C=b[(C&65535)+(d&(1<<S)-1)];continue t}break}}while(r<i&&o<s);T=p>>3,r-=T,p-=T<<3,d&=(1<<p)-1,t.next_in=r,t.next_out=o,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=o<s?257+(s-o):257-(o-s),O.hold=d,O.bits=p};const pa=15,rA=852,iA=592,oA=0,Sp=1,aA=2,tL=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]),nL=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]),rL=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]),iL=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 Il=(e,t,n,r,i,o,a,s)=>{const f=s.bits;let l=0,u=0,c=0,h=0,d=0,p=0,b=0,y=0,w=0,_=0,C,S,T,B,I,F=null,P;const j=new Uint16Array(pa+1),O=new Uint16Array(pa+1);let re=null,ae,pe,Te;for(l=0;l<=pa;l++)j[l]=0;for(u=0;u<r;u++)j[t[n+u]]++;for(d=f,h=pa;h>=1&&j[h]===0;h--);if(d>h&&(d=h),h===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(c=1;c<h&&j[c]===0;c++);for(d<c&&(d=c),y=1,l=1;l<=pa;l++)if(y<<=1,y-=j[l],y<0)return-1;if(y>0&&(e===oA||h!==1))return-1;for(O[1]=0,l=1;l<pa;l++)O[l+1]=O[l]+j[l];for(u=0;u<r;u++)t[n+u]!==0&&(a[O[t[n+u]]++]=u);if(e===oA?(F=re=a,P=20):e===Sp?(F=tL,re=nL,P=257):(F=rL,re=iL,P=0),_=0,u=0,l=c,I=o,p=d,b=0,T=-1,w=1<<d,B=w-1,e===Sp&&w>rA||e===aA&&w>iA)return 1;for(;;){ae=l-b,a[u]+1<P?(pe=0,Te=a[u]):a[u]>=P?(pe=re[a[u]-P],Te=F[a[u]-P]):(pe=32+64,Te=0),C=1<<l-b,S=1<<p,c=S;do S-=C,i[I+(_>>b)+S]=ae<<24|pe<<16|Te|0;while(S!==0);for(C=1<<l-1;_&C;)C>>=1;if(C!==0?(_&=C-1,_+=C):_=0,u++,--j[l]===0){if(l===h)break;l=t[n+a[u]]}if(l>d&&(_&B)!==T){for(b===0&&(b=d),I+=c,p=l-b,y=1<<p;p+b<h&&(y-=j[p+b],!(y<=0));)p++,y<<=1;if(w+=1<<p,e===Sp&&w>rA||e===aA&&w>iA)return 1;T=_&B,i[T]=d<<24|p<<16|I-o|0}}return _!==0&&(i[I+_]=l-b<<24|64<<16|0),s.bits=d,0};const oL=0,sA=1,lA=2,{Z_FINISH:fA,Z_BLOCK:aL,Z_TREES:hc,Z_OK:fo,Z_STREAM_END:sL,Z_NEED_DICT:lL,Z_STREAM_ERROR:cn,Z_DATA_ERROR:uA,Z_MEM_ERROR:cA,Z_BUF_ERROR:fL,Z_DEFLATED:hA}=vl,dc=16180,dA=16181,pA=16182,gA=16183,mA=16184,bA=16185,yA=16186,wA=16187,vA=16188,xA=16189,pc=16190,cr=16191,Cp=16192,AA=16193,kp=16194,EA=16195,_A=16196,SA=16197,CA=16198,gc=16199,mc=16200,kA=16201,IA=16202,TA=16203,BA=16204,DA=16205,Ip=16206,RA=16207,FA=16208,qe=16209,MA=16210,PA=16211,uL=852,cL=592,hL=15,LA=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function dL(){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 uo=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<dc||t.mode>PA?1:0},NA=e=>{if(uo(e))return cn;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=dc,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(uL),t.distcode=t.distdyn=new Int32Array(cL),t.sane=1,t.back=-1,fo},OA=e=>{if(uo(e))return cn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,NA(e)},zA=(e,t)=>{let n;if(uo(e))return cn;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?cn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,OA(e))},UA=(e,t)=>{if(!e)return cn;const n=new dL;e.state=n,n.strm=e,n.window=null,n.mode=dc;const r=zA(e,t);return r!==fo&&(e.state=null),r},pL=e=>UA(e,hL);let GA=!0,Tp,Bp;const gL=e=>{if(GA){Tp=new Int32Array(512),Bp=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(Il(sA,e.lens,0,288,Tp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Il(lA,e.lens,0,32,Bp,0,e.work,{bits:5}),GA=!1}e.lencode=Tp,e.lenbits=9,e.distcode=Bp,e.distbits=5},HA=(e,t,n,r)=>{let i;const o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0},mL=(e,t)=>{let n,r,i,o,a,s,f,l,u,c,h,d,p,b,y=0,w,_,C,S,T,B,I,F;const P=new Uint8Array(4);let j,O;const re=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(uo(e)||!e.output||!e.input&&e.avail_in!==0)return cn;n=e.state,n.mode===cr&&(n.mode=Cp),a=e.next_out,i=e.output,f=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,c=s,h=f,F=fo;e:for(;;)switch(n.mode){case dc:if(n.wrap===0){n.mode=Cp;break}for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,P[0]=l&255,P[1]=l>>>8&255,n.check=ht(n.check,P,2,0),l=0,u=0,n.mode=dA;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=qe;break}if((l&15)!==hA){e.msg="unknown compression method",n.mode=qe;break}if(l>>>=4,u-=4,I=(l&15)+8,n.wbits===0&&(n.wbits=I),I>15||I>n.wbits){e.msg="invalid window size",n.mode=qe;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?xA:cr,l=0,u=0;break;case dA:for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==hA){e.msg="unknown compression method",n.mode=qe;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=qe;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(P[0]=l&255,P[1]=l>>>8&255,n.check=ht(n.check,P,2,0)),l=0,u=0,n.mode=pA;case pA:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(P[0]=l&255,P[1]=l>>>8&255,P[2]=l>>>16&255,P[3]=l>>>24&255,n.check=ht(n.check,P,4,0)),l=0,u=0,n.mode=gA;case gA:for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(P[0]=l&255,P[1]=l>>>8&255,n.check=ht(n.check,P,2,0)),l=0,u=0,n.mode=mA;case mA:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(P[0]=l&255,P[1]=l>>>8&255,n.check=ht(n.check,P,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=bA;case bA:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+d),I)),n.flags&512&&n.wrap&4&&(n.check=ht(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=yA;case yA:if(n.flags&2048){if(s===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=ht(n.check,r,d,o)),s-=d,o+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=wA;case wA:if(n.flags&4096){if(s===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=ht(n.check,r,d,o)),s-=d,o+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=vA;case vA:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=qe;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=cr;break;case xA:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}e.adler=n.check=LA(l),l=0,u=0,n.mode=pc;case pc:if(n.havedict===0)return e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,lL;e.adler=n.check=1,n.mode=cr;case cr:if(t===aL||t===hc)break e;case Cp:if(n.last){l>>>=u&7,u-=u&7,n.mode=Ip;break}for(;u<3;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=AA;break;case 1:if(gL(n),n.mode=gc,t===hc){l>>>=2,u-=2;break e}break;case 2:n.mode=_A;break;case 3:e.msg="invalid block type",n.mode=qe}l>>>=2,u-=2;break;case AA:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=qe;break}if(n.length=l&65535,l=0,u=0,n.mode=kp,t===hc)break e;case kp:n.mode=EA;case EA:if(d=n.length,d){if(d>s&&(d=s),d>f&&(d=f),d===0)break e;i.set(r.subarray(o,o+d),a),s-=d,o+=d,f-=d,a+=d,n.length-=d;break}n.mode=cr;break;case _A:for(;u<14;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=qe;break}n.have=0,n.mode=SA;case SA:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.lens[re[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[re[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,j={bits:n.lenbits},F=Il(oL,n.lens,0,19,n.lencode,0,n.work,j),n.lenbits=j.bits,F){e.msg="invalid code lengths set",n.mode=qe;break}n.have=0,n.mode=CA;case CA:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,_=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(C<16)l>>>=w,u-=w,n.lens[n.have++]=C;else{if(C===16){for(O=w+2;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(l>>>=w,u-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=qe;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,u-=2}else if(C===17){for(O=w+3;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=w,u-=w,I=0,d=3+(l&7),l>>>=3,u-=3}else{for(O=w+7;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=w,u-=w,I=0,d=11+(l&127),l>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=qe;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===qe)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=qe;break}if(n.lenbits=9,j={bits:n.lenbits},F=Il(sA,n.lens,0,n.nlen,n.lencode,0,n.work,j),n.lenbits=j.bits,F){e.msg="invalid literal/lengths set",n.mode=qe;break}if(n.distbits=6,n.distcode=n.distdyn,j={bits:n.distbits},F=Il(lA,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,j),n.distbits=j.bits,F){e.msg="invalid distances set",n.mode=qe;break}if(n.mode=gc,t===hc)break e;case gc:n.mode=mc;case mc:if(s>=6&&f>=258){e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,eL(e,h),a=e.next_out,i=e.output,f=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===cr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,_=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(_&&!(_&240)){for(S=w,T=_,B=C;y=n.lencode[B+((l&(1<<S+T)-1)>>S)],w=y>>>24,_=y>>>16&255,C=y&65535,!(S+w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=S,u-=S,n.back+=S}if(l>>>=w,u-=w,n.back+=w,n.length=C,_===0){n.mode=DA;break}if(_&32){n.back=-1,n.mode=cr;break}if(_&64){e.msg="invalid literal/length code",n.mode=qe;break}n.extra=_&15,n.mode=kA;case kA:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=IA;case IA:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,_=y>>>16&255,C=y&65535,!(w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(!(_&240)){for(S=w,T=_,B=C;y=n.distcode[B+((l&(1<<S+T)-1)>>S)],w=y>>>24,_=y>>>16&255,C=y&65535,!(S+w<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=S,u-=S,n.back+=S}if(l>>>=w,u-=w,n.back+=w,_&64){e.msg="invalid distance code",n.mode=qe;break}n.offset=C,n.extra=_&15,n.mode=TA;case TA:if(n.extra){for(O=n.extra;u<O;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=qe;break}n.mode=BA;case BA:if(f===0)break e;if(d=h-f,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=qe;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),b=n.window}else b=i,p=a-n.offset,d=n.length;d>f&&(d=f),f-=d,n.length-=d;do i[a++]=b[p++];while(--d);n.length===0&&(n.mode=mc);break;case DA:if(f===0)break e;i[a++]=n.length,f--,n.mode=mc;break;case Ip:if(n.wrap){for(;u<32;){if(s===0)break e;s--,l|=r[o++]<<u,u+=8}if(h-=f,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?ht(n.check,i,h,a-h):wl(n.check,i,h,a-h)),h=f,n.wrap&4&&(n.flags?l:LA(l))!==n.check){e.msg="incorrect data check",n.mode=qe;break}l=0,u=0}n.mode=RA;case RA:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=qe;break}l=0,u=0}n.mode=FA;case FA:F=sL;break e;case qe:F=uA;break e;case MA:return cA;case PA:default:return cn}return e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<qe&&(n.mode<Ip||t!==fA))&&HA(e,e.output,e.next_out,h-e.avail_out),c-=e.avail_in,h-=e.avail_out,e.total_in+=c,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?ht(n.check,i,h,e.next_out-h):wl(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===cr?128:0)+(n.mode===gc||n.mode===kp?256:0),(c===0&&h===0||t===fA)&&F===fo&&(F=fL),F},bL=e=>{if(uo(e))return cn;let t=e.state;return t.window&&(t.window=null),e.state=null,fo},yL=(e,t)=>{if(uo(e))return cn;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,fo):cn},wL=(e,t)=>{const n=t.length;let r,i,o;return uo(e)||(r=e.state,r.wrap!==0&&r.mode!==pc)?cn:r.mode===pc&&(i=1,i=wl(i,t,n,0),i!==r.check)?uA:(o=HA(e,t,n,n),o?(r.mode=MA,cA):(r.havedict=1,fo))};var vL=OA,xL=zA,AL=NA,EL=pL,_L=UA,SL=mL,CL=bL,kL=yL,IL=wL,TL="pako inflate (from Nodeca project)",hr={inflateReset:vL,inflateReset2:xL,inflateResetKeep:AL,inflateInit:EL,inflateInit2:_L,inflate:SL,inflateEnd:CL,inflateGetHeader:kL,inflateSetDictionary:IL,inflateInfo:TL};function BL(){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 DL=BL;const VA=Object.prototype.toString,{Z_NO_FLUSH:RL,Z_FINISH:FL,Z_OK:Tl,Z_STREAM_END:Dp,Z_NEED_DICT:Rp,Z_STREAM_ERROR:ML,Z_DATA_ERROR:jA,Z_MEM_ERROR:PL}=vl;function Bl(e){this.options=fc.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 tA,this.strm.avail_out=0;let n=hr.inflateInit2(this.strm,t.windowBits);if(n!==Tl)throw new Error(la[n]);if(this.header=new DL,hr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=kl.string2buf(t.dictionary):VA.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=hr.inflateSetDictionary(this.strm,t.dictionary),n!==Tl)))throw new Error(la[n])}Bl.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?FL:RL,VA.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),o=hr.inflate(n,a),o===Rp&&i&&(o=hr.inflateSetDictionary(n,i),o===Tl?o=hr.inflate(n,a):o===jA&&(o=Rp));n.avail_in>0&&o===Dp&&n.state.wrap>0&&e[n.next_in]!==0;)hr.inflateReset(n),o=hr.inflate(n,a);switch(o){case ML:case jA:case Rp:case PL:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===Dp))if(this.options.to==="string"){let f=kl.utf8border(n.output,n.next_out),l=n.next_out-f,u=kl.buf2string(n.output,f);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(f,f+l),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===Tl&&s===0)){if(o===Dp)return o=hr.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},Bl.prototype.onData=function(e){this.chunks.push(e)},Bl.prototype.onEnd=function(e){e===Tl&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=fc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Fp(e,t){const n=new Bl(t);if(n.push(e),n.err)throw n.msg||la[n.err];return n.result}function LL(e,t){return t=t||{},t.raw=!0,Fp(e,t)}var NL=Bl,OL=Fp,zL=LL,UL=Fp,GL=vl,HL={Inflate:NL,inflate:OL,inflateRaw:zL,ungzip:UL,constants:GL};const{Inflate:Pz,inflate:Lz,inflateRaw:VL,ungzip:Nz}=HL;var jL=VL;function qL(e){return jL(e.subarray(2))}let ZL=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function WL(e){e.sort((i,o)=>Number(i.offset)-Number(o.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 bc(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new ZL("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const YL=1,QL=2,XL=3;function Mp(e,t,n,r){return e<r&&t>=n}function $L(e){const t=e?"big":"little",n=new Ie().endianess(t).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),r=new Ie().endianess(t).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:new Ie().endianess(t).array("blocksToFetch",{length:"cnt",type:new Ie().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:new Ie().array("recurOffsets",{length:"cnt",type:new Ie().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),i=new Ie().endianess(t).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:new Ie().endianess(t).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:{[XL]:new Ie().array("items",{length:"itemCount",type:new Ie().floatle("score")}),[QL]:new Ie().array("items",{length:"itemCount",type:new Ie().endianess(t).int32("start").floatle("score")}),[YL]:new Ie().array("items",{length:"itemCount",type:new Ie().endianess(t).int32("start").int32("end").floatle("score")})}}),bigBedParser:i,summaryParser:n,leafParser:r}}class qA{constructor(t,n,r,i,o,a){if(this.bbi=t,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=i,this.isCompressed=o,this.blockType=a,this.featureCache=new rc({cache:new ic({maxSize:1e3}),fill:async(f,l)=>{const u=Number(f.length),c=Number(f.offset),{buffer:h}=await this.bbi.read(ye.Buffer.alloc(u),0,u,c,{signal:l});return h}}),!(r>=0))throw new Error("invalid cirTreeOffset!");const s=$L(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}async readWigData(t,n,r,i,o){try{const{refsByName:a,bbi:s,cirTreeOffset:f,isBigEndian:l}=this,u=a[t];u===void 0&&i.complete();const c={chrId:u,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=s.read(ye.Buffer.alloc(48),0,48,Number(f),o));const{buffer:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],b=0;const y=(S,T,B)=>{try{const I=S.subarray(T),F=this.leafParser.parse(I);if(F.blocksToFetch&&(p=p.concat(F.blocksToFetch.filter(P=>w(P)).map(P=>({offset:P.blockOffset,length:P.blockSize})))),F.recurOffsets){const P=F.recurOffsets.filter(j=>w(j)).map(j=>Number(j.blockOffset));P.length>0&&C(P,B+1)}}catch(I){i.error(I)}},w=S=>{const{startChrom:T,startBase:B,endChrom:I,endBase:F}=S;return(T<u||T===u&&B<=r)&&(I>u||I===u&&F>=n)},_=async(S,T,B)=>{try{const I=T.max()-T.min(),F=T.min(),P=await this.featureCache.get(`${I}_${F}`,{length:I,offset:F},o==null?void 0:o.signal);for(const j of S)T.contains(j)&&(y(P,j-F,B),b-=1,b===0&&this.readFeatures(i,p,{...o,request:c}))}catch(I){i.error(I)}},C=(S,T)=>{try{b+=S.length;const B=4+Number(d)*32;let I=new Kr(S[0],S[0]+B);for(let F=1;F<S.length;F+=1){const P=new Kr(S[F],S[F]+B);I=I.union(P)}I.getRanges().map(F=>_(S,F,T))}catch(B){i.error(B)}};return C([Number(f)+48],1)}catch(a){i.error(a)}}parseSummaryBlock(t,n,r){const i=[];let o=n;const a=new DataView(t.buffer,t.byteOffset,t.length);for(;o<t.byteLength;){const s=a.getUint32(o,!0);o+=4;const f=a.getUint32(o,!0);o+=4;const l=a.getUint32(o,!0);o+=4;const u=a.getUint32(o,!0);o+=4;const c=a.getFloat32(o,!0);o+=4;const h=a.getFloat32(o,!0);o+=4;const d=a.getFloat32(o,!0);o+=4,o+=4,(!r||s===r.chrId&&Mp(f,l,r.start,r.end))&&i.push({start:f,end:l,maxScore:h,minScore:c,summary:!0,score:d/(u||1)})}return i}parseBigBedBlock(t,n,r,i){const o=[];let a=n;for(;a<t.byteLength;){const s=this.bigBedParser.parse(t.subarray(a));o.push({...s,uniqueId:`bb-${r+a}`}),a+=s.offset}return i?o.filter(s=>Mp(s.start,s.end,i.start,i.end)):o}parseBigWigBlock(t,n,r){const i=t.subarray(n),o=new DataView(i.buffer,i.byteOffset,i.length);let a=0;a+=4;const s=o.getInt32(a,!0);a+=8;const f=o.getUint32(a,!0);a+=4;const l=o.getUint32(a,!0);a+=4;const u=o.getUint8(a);a+=2;const c=o.getUint16(a,!0);a+=2;const h=new Array(c);switch(u){case 1:{for(let d=0;d<c;d++){const p=o.getInt32(a,!0);a+=4;const b=o.getInt32(a,!0);a+=4;const y=o.getFloat32(a,!0);a+=4,h[d]={start:p,end:b,score:y}}break}case 2:{for(let d=0;d<c;d++){const p=o.getInt32(a,!0);a+=4;const b=o.getFloat32(a,!0);a+=4,h[d]={score:b,start:p,end:p+l}}break}case 3:{for(let d=0;d<c;d++){const p=o.getFloat32(a,!0);a+=4;const b=s+d*f;h[d]={score:p,start:b,end:b+l}}break}}return r?h.filter(d=>Mp(d.start,d.end,r.start,r.end)):h}async readFeatures(t,n,r={}){try{const{blockType:i,isCompressed:o}=this,{signal:a,request:s}=r,f=WL(n);bc(a),await Promise.all(f.map(async l=>{bc(a);const{length:u,offset:c}=l,h=await this.featureCache.get(`${u}_${c}`,l,a);for(const d of l.blocks){bc(a);let p=Number(d.offset)-Number(l.offset),b=h;switch(o&&(b=qL(h.subarray(p)),p=0),bc(a),i){case"summary":{t.next(this.parseSummaryBlock(b,p,s));break}case"bigwig":{t.next(this.parseBigWigBlock(b,p,s));break}case"bigbed":{t.next(this.parseBigBedBlock(b,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 Pp=function(e,t){return Pp=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])},Pp(e,t)};function Lp(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Pp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function KL(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{l(r.next(u))}catch(c){a(c)}}function f(u){try{l(r.throw(u))}catch(c){a(c)}}function l(u){u.done?o(u.value):i(u.value).then(s,f)}l((r=r.apply(e,t||[])).next())})}function ZA(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return f([l,u])}}function f(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Dl(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 yc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function wc(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function ga(e){return this instanceof ga?(this.v=e,this):new ga(e)}function JL(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(h){r[h]&&(i[h]=function(d){return new Promise(function(p,b){o.push([h,d,p,b])>1||s(h,d)})})}function s(h,d){try{f(r[h](d))}catch(p){c(o[0][3],p)}}function f(h){h.value instanceof ga?Promise.resolve(h.value.v).then(l,u):c(o[0][2],h)}function l(h){s("next",h)}function u(h){s("throw",h)}function c(h,d){h(d),o.shift(),o.length&&s(o[0][0],o[0][1])}}function eN(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 Dl=="function"?Dl(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(a){return new Promise(function(s,f){a=e[o](a),i(s,f,a.done,a.value)})}}function i(o,a,s,f){Promise.resolve(f).then(function(l){o({value:l,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function ot(e){return typeof e=="function"}function WA(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 Np=WA(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
286
279
|
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
|
287
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function PA(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var kp=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,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Sl(a),f=s.next();!f.done;f=s.next()){var l=f.value;l.remove(this)}}catch(b){t={error:b}}finally{try{f&&!f.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else a.remove(this);var u=this.initialTeardown;if(ot(u))try{u()}catch(b){o=b instanceof Tp?b.errors:[b]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var h=Sl(c),d=h.next();!d.done;d=h.next()){var p=d.value;try{LA(p)}catch(b){o=o??[],b instanceof Tp?o=uc(uc([],fc(o)),fc(b.errors)):o.push(b)}}}catch(b){r={error:b}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Tp(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)LA(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)&&PA(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&PA(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();kp.EMPTY;function MA(e){return e instanceof kp||e&&"closed"in e&&ot(e.remove)&&ot(e.add)&&ot(e.unsubscribe)}function LA(e){ot(e)?e():e.unsubscribe()}var NA={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Bp={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Bp.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,uc([e,t],fc(n))):setTimeout.apply(void 0,uc([e,t],fc(n)))},clearTimeout:function(e){var t=Bp.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function OA(e){Bp.setTimeout(function(){throw e})}function zA(){}function NL(e){e()}var Dp=function(e){Ip(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,MA(n)&&n.add(r)):r.destination=GL,r}return t.create=function(n,r,i){return new cc(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}(kp),OL=Function.prototype.bind;function Fp(e,t){return OL.call(e,t)}var zL=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){hc(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){hc(r)}else hc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){hc(n)}},e}(),cc=function(e){Ip(t,e);function t(n,r,i){var o=e.call(this)||this,a;if(ot(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&NA.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Fp(n.next,s),error:n.error&&Fp(n.error,s),complete:n.complete&&Fp(n.complete,s)}):a=n}return o.destination=new zL(a),o}return t}(Dp);function hc(e){OA(e)}function UL(e){throw e}var GL={closed:!0,next:zA,error:UL,complete:zA},Rp=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function UA(e){return e}function HL(e){return e.length===0?UA:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var hn=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,o=jL(t)?t:new cc(t,n,r);return NL(function(){var a=i,s=a.operator,f=a.source;o.add(s?s.call(o,f):f?i._subscribe(o):i._trySubscribe(o))}),o},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=GA(n),new n(function(i,o){var a=new cc({next:function(s){try{t(s)}catch(f){o(f),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Rp]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return HL(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=GA(t),new t(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function GA(e){var t;return(t=e??NA.Promise)!==null&&t!==void 0?t:Promise}function VL(e){return e&&ot(e.next)&&ot(e.error)&&ot(e.complete)}function jL(e){return e&&e instanceof Dp||VL(e)&&MA(e)}function qL(e){return ot(e==null?void 0:e.lift)}function da(e){return function(t){if(qL(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 Cl(e,t,n,r,i){return new ZL(e,t,n,r,i)}var ZL=function(e){Ip(t,e);function t(n,r,i,o,a,s){var f=e.call(this,n)||this;return f.onFinalize=a,f.shouldUnsubscribe=s,f._next=r?function(l){try{r(l)}catch(u){n.error(u)}}:e.prototype._next,f._error=o?function(l){try{o(l)}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._error,f._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,f}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}(Dp),WL=new hn(function(e){return e.complete()});function YL(e){return e&&ot(e.schedule)}function HA(e){return e[e.length-1]}function QL(e){return YL(HA(e))?e.pop():void 0}function XL(e,t){return typeof HA(e)=="number"?e.pop():t}var VA=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function jA(e){return ot(e==null?void 0:e.then)}function qA(e){return ot(e[Rp])}function ZA(e){return Symbol.asyncIterator&&ot(e==null?void 0:e[Symbol.asyncIterator])}function WA(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 $L(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var YA=$L();function QA(e){return ot(e==null?void 0:e[YA])}function XA(e){return ML(this,arguments,function(){var n,r,i,o;return FA(this,function(a){switch(a.label){case 0:n=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ha(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,ha(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ha(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function $A(e){return ot(e==null?void 0:e.getReader)}function pa(e){if(e instanceof hn)return e;if(e!=null){if(qA(e))return KL(e);if(VA(e))return JL(e);if(jA(e))return eN(e);if(ZA(e))return KA(e);if(QA(e))return tN(e);if($A(e))return nN(e)}throw WA(e)}function KL(e){return new hn(function(t){var n=e[Rp]();if(ot(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function JL(e){return new hn(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function eN(e){return new hn(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,OA)})}function tN(e){return new hn(function(t){var n,r;try{for(var i=Sl(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function KA(e){return new hn(function(t){rN(e,t).catch(function(n){return t.error(n)})})}function nN(e){return KA(XA(e))}function rN(e,t){var n,r,i,o;return PL(this,void 0,void 0,function(){var a,s;return FA(this,function(f){switch(f.label){case 0:f.trys.push([0,5,6,11]),n=LL(e),f.label=1;case 1:return[4,n.next()];case 2:if(r=f.sent(),!!r.done)return[3,4];if(a=r.value,t.next(a),t.closed)return[2];f.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=f.sent(),i={error:s},[3,11];case 6:return f.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:f.sent(),f.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 oi(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function JA(e,t){return t===void 0&&(t=0),da(function(n,r){n.subscribe(Cl(r,function(i){return oi(r,e,function(){return r.next(i)},t)},function(){return oi(r,e,function(){return r.complete()},t)},function(i){return oi(r,e,function(){return r.error(i)},t)}))})}function e3(e,t){return t===void 0&&(t=0),da(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function iN(e,t){return pa(e).pipe(e3(t),JA(t))}function oN(e,t){return pa(e).pipe(e3(t),JA(t))}function aN(e,t){return new hn(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function sN(e,t){return new hn(function(n){var r;return oi(n,t,function(){r=e[YA](),oi(n,t,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return ot(r==null?void 0:r.return)&&r.return()}})}function t3(e,t){if(!e)throw new Error("Iterable cannot be null");return new hn(function(n){oi(n,t,function(){var r=e[Symbol.asyncIterator]();oi(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function lN(e,t){return t3(XA(e),t)}function fN(e,t){if(e!=null){if(qA(e))return iN(e,t);if(VA(e))return aN(e,t);if(jA(e))return oN(e,t);if(ZA(e))return t3(e,t);if(QA(e))return sN(e,t);if($A(e))return lN(e,t)}throw WA(e)}function uN(e,t){return t?fN(e,t):pa(e)}var cN=RA(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function n3(e,t){var n=typeof t=="object";return new Promise(function(r,i){var o=new cc({next:function(a){r(a),o.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new cN)}});e.subscribe(o)})}function r3(e,t){return da(function(n,r){var i=0;n.subscribe(Cl(r,function(o){r.next(e.call(t,o,i++))}))})}function hN(e,t,n,r,i,o,a,s){var f=[],l=0,u=0,c=!1,h=function(){c&&!f.length&&!l&&t.complete()},d=function(b){return l<r?p(b):f.push(b)},p=function(b){o&&t.next(b),l++;var y=!1;pa(n(b,u++)).subscribe(Cl(t,function(w){i==null||i(w),o?d(w):t.next(w)},function(){y=!0},void 0,function(){if(y)try{l--;for(var w=function(){var S=f.shift();a?oi(t,a,function(){return p(S)}):p(S)};f.length&&l<r;)w();h()}catch(S){t.error(S)}}))};return e.subscribe(Cl(t,d,function(){c=!0,h()})),function(){s==null||s()}}function i3(e,t,n){return n===void 0&&(n=1/0),ot(t)?i3(function(r,i){return r3(function(o,a){return t(r,o,i,a)})(pa(e(r,i)))},n):(typeof t=="number"&&(n=t),da(function(r,i){return hN(r,i,e,n)}))}function dN(e){return e===void 0&&(e=1/0),i3(UA,e)}function pN(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=QL(e),r=XL(e,1/0),i=e;return i.length?i.length===1?pa(i[0]):dN(r)(uN(i,n)):WL}function gN(e,t,n,r,i){return function(o,a){var s=n,f=t,l=0;o.subscribe(Cl(a,function(u){var c=l++;f=s?e(f,u,c):(s=!0,u),r&&a.next(f)},i&&function(){s&&a.next(f),a.complete()}))}}function o3(e,t){return da(gN(e,t,arguments.length>=2,!1,!0))}var mN=function(e,t){return e.push(t),e};function bN(){return da(function(e,t){o3(mN,[])(e).subscribe(t)})}const a3=-2003829722,Pp=-2021002517;function yN(e){return new TextDecoder().decode(e)}function s3(e){const t=e?"big":"little",n=new Te().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 Te().endianess(t).uint32("reductionLevel").uint32("reserved").uint64("dataOffset").uint64("indexOffset")}),r=new Te().endianess(t).uint64("basesCovered").doublele("scoreMin").doublele("scoreMax").doublele("scoreSum").doublele("scoreSumSquares"),i=new Te().endianess(t).uint32("magic").uint32("blockSize").uint32("keySize").uint32("valSize").uint64("itemCount"),o=new Te().endianess(t).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");return{chromTreeParser:i,totalSummaryParser:r,headerParser:n,isLeafNode:o}}class l3{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=a=>a,path:i,url:o}=t;if(this.renameRefSeqs=r,n)this.bbi=n;else if(o)this.bbi=new ji(o);else if(i)this.bbi=new ct(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(ye.Buffer.alloc(n),0,n,0,t),i=this._isBigEndian(r),o=s3(i),a=o.headerParser.parse(r),{magic:s,asOffset:f,totalSummaryOffset:l}=a;if(a.fileType=s===Pp?"bigbed":"bigwig",f>n||l>n)return this._getMainHeader(t,n*2);if(f){const u=Number(a.asOffset);a.autoSql=yN(r.subarray(u,r.indexOf(0,u)))}if(a.totalSummaryOffset>n)return this._getMainHeader(t,n*2);if(a.totalSummaryOffset){const u=r.subarray(Number(a.totalSummaryOffset)),c=o.totalSummaryParser.parse(u);a.totalSummary={...c,basesCovered:Number(c.basesCovered)}}return{...a,isBigEndian:i}}_isBigEndian(t){let n=t.readInt32LE(0);if(n===a3||n===Pp)return!1;if(n=t.readInt32BE(0),n===a3||n===Pp)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(t,n){const r=t.isBigEndian,i=r?"big":"little",o=[],a={};let s=Number(t.unzoomedDataOffset);const f=Number(t.chromTreeOffset);for(;s%4!==0;)s+=1;const l=s-f,{buffer:u}=await this.bbi.read(ye.Buffer.alloc(l),0,l,Number(f),n),c=s3(r),{keySize:h}=c.chromTreeParser.parse(u),d=new Te().endianess(i).string("key",{stripNull:!0,length:h}).uint32("refId").uint32("refSize").saveOffset("offset"),p=new Te().endianess(i).skip(h).uint64("childOffset").saveOffset("offset"),b=32,y=async w=>{let S=w;if(S>=u.length)throw new Error("reading beyond end of buffer");const C=c.isLeafNode.parse(u.subarray(S)),{isLeafNode:_,cnt:k}=C;if(S+=C.offset,_)for(let B=0;B<k;B+=1){const T=d.parse(u.subarray(S));S+=T.offset;const{key:R,refId:M,refSize:j}=T,O={name:R,id:M,length:j};a[this.renameRefSeqs(R)]=M,o[M]=O}else{const B=[];for(let T=0;T<k;T+=1){const R=p.parse(u.subarray(S)),{childOffset:M}=R;S+=R.offset,B.push(y(Number(M)-Number(f)))}await Promise.all(B)}};return await y(b),{refsByName:a,refsByNumber:o}}async getUnzoomedView(t){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:i,isBigEndian:o,fileType:a}=await this.getHeader(t);return new DA(this.bbi,r,n,o,i>0,a)}async getFeatureStream(t,n,r,i){await this.getHeader(i);const o=this.renameRefSeqs(t);let a;const{basesPerSpan:s,scale:f}=i||{};return s?a=await this.getView(1/s,i):f?a=await this.getView(f,i):a=await this.getView(1,i),new hn(l=>{a.readWigData(o,n,r,l,i)})}async getFeatures(t,n,r,i){const o=await this.getFeatureStream(t,n,r,i);return(await n3(o.pipe(bN()))).flat()}}class wN extends l3{async getView(t,n){const{zoomLevels:r,refsByName:i,fileSize:o,isBigEndian:a,uncompressBufSize:s}=await this.getHeader(n),f=1/t;let l=r.length;o||(l-=1);for(let u=l;u>=0;u-=1){const c=r[u];if(c&&c.reductionLevel<=2*f){const h=Number(c.indexOffset);return new DA(this.bbi,i,h,a,s>0,"summary")}}return this.getUnzoomedView(n)}}function vN(e){return e.filter(t=>!!t)}class xN extends l3{constructor(){super(...arguments),this.readIndicesCache=new Yu({cache:new Qu({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(ye.Buffer.alloc(64),0,64,Number(n)),o=r?"big":"little",a=new Te().endianess(o).uint16("size").uint16("count").uint64("offset").parse(i),{count:s,offset:f}=a;if(s===0)return[];const l=20,u=l*s,{buffer:c}=await this.bbi.read(ye.Buffer.alloc(u),0,u,Number(f)),h=new Te().endianess(o).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),d=[];for(let p=0;p<s;p+=1)d.push(h.parse(c.subarray(p*l)));return d}async searchExtraIndexBlocks(t,n={}){const{isBigEndian:r}=await this.getHeader(n),i=await this.readIndices(n);if(i.length===0)return[];const o=i.map(async a=>{const{offset:s,field:f}=a,{buffer:l}=await this.bbi.read(ye.Buffer.alloc(32),0,32,Number(s),n),u=r?"big":"little",c=new Te().endianess(u).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),{blockSize:h,keySize:d,valSize:p}=c.parse(l),b=new Te().endianess(u).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:new Te().array("leafkeys",{length:"cnt",type:new Te().endianess(u).string("key",{length:d,stripNull:!0}).uint64("offset")}),1:new Te().array("keys",{length:"cnt",type:new Te().endianess(u).string("key",{length:d,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),y=async S=>{const C=Number(S),_=4+h*(d+p),{buffer:k}=await this.bbi.read(ye.Buffer.alloc(_),0,_,C,n),B=b.parse(k);if(B.leafkeys){let T;for(let R=0;R<B.leafkeys.length;R+=1){const{key:M}=B.leafkeys[R];if(t.localeCompare(M)<0&&T)return y(T);T=B.leafkeys[R].offset}return y(T)}for(let T=0;T<B.keys.length;T+=1)if(B.keys[T].key===t)return{...B.keys[T],field:f}},w=32;return y(Number(s)+w)});return vN(await Promise.all(o))}async searchExtraIndex(t,n={}){const r=await this.searchExtraIndexBlocks(t,n);if(r.length===0)return[];const i=await this.getUnzoomedView(n),o=r.map(s=>new hn(f=>{i.readFeatures(f,[s],n)}).pipe(o3((f,l)=>f.concat(l)),r3(f=>{for(const l of f)l.field=s.field;return f})));return(await n3(pN(...o))).filter(s=>{var f;return((f=s.rest)===null||f===void 0?void 0:f.split(" ")[(s.field||0)-3])===t})}}const f3=Object.freeze(Object.defineProperty({__proto__:null,BigBed:xN,BigWig:wN},Symbol.toStringTag,{value:"Module"}));function AN(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function ga(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,ga)}AN(ga,Error),ga.buildMessage=function(e,t){var n={literal:function(l){return'"'+i(l.text)+'"'},class:function(l){var u="",c;for(c=0;c<l.parts.length;c++)u+=l.parts[c]instanceof Array?o(l.parts[c][0])+"-"+o(l.parts[c][1]):o(l.parts[c]);return"["+(l.inverted?"^":"")+u+"]"},any:function(l){return"any character"},end:function(l){return"end of input"},other:function(l){return l.description}};function r(l){return l.charCodeAt(0).toString(16).toUpperCase()}function i(l){return l.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function o(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function a(l){return n[l.type](l)}function s(l){var u=new Array(l.length),c,h;for(c=0;c<l.length;c++)u[c]=a(l[c]);if(u.sort(),u.length>0){for(c=1,h=1;c<u.length;c++)u[c-1]!==u[c]&&(u[h]=u[c],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 f(l){return l?'"'+i(l)+'"':"end of input"}return"Expected "+s(e)+" but "+f(t)+" found."};function EN(e,t){t=t!==void 0?t:{};var n={},r={declaration:FE},i=FE,o="(",a=Fe("(",!1),s=")",f=Fe(")",!1),l=function(A,z,Q,X){return{type:A,name:z,comment:Q,fields:X}},u="simple",c=Fe("simple",!1),h="object",d=Fe("object",!1),p="table",b=Fe("table",!1),y="auto",w=Fe("auto",!1),S="primary",C=Fe("primary",!1),_="index",k=Fe("index",!1),B="unique",T=Fe("unique",!1),R=function(A,z){return z},M=function(A,z){return A.name&&z.unshift(A),z},j="#",O=Fe("#",!1),ne=";",ae=Fe(";",!1),pe=function(A,z,Q){return{type:A,name:z,comment:Q}},ke="[",Xe=Fe("[",!1),De="]",$e=Fe("]",!1),qe=function(A,z,Q,X){return{type:A,size:z,name:Q,comment:X}},Ke=function(A,z,Q,X){return{type:A,vals:z,name:Q,comment:X}},Ee=",",_e=Fe(",",!1),dt=function(A,z){return z.unshift(A),z},Ht="int",Ne=Fe("int",!1),L="uint",P=Fe("uint",!1),q="short",H=Fe("short",!1),W="ushort",E=Fe("ushort",!1),x="byte",G=Fe("byte",!1),Z="ubyte",se=Fe("ubyte",!1),J="float",le=Fe("float",!1),Vt="char",si=Fe("char",!1),li="string",fi=Fe("string",!1),_t="lstring",wr=Fe("lstring",!1),ui="enum",jt=Fe("enum",!1),Kn="double",v=Fe("double",!1),g="bigint",m=Fe("bigint",!1),I="set",F=Fe("set",!1),N=function(A,z){return A+" "+z},V=/^[a-zA-Z_]/,fe=Hl([["a","z"],["A","Z"],"_"],!1,!1),Ue=/^[a-zA-Z0-9_]/,Pe=Hl([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Ze=function(A){return TE()},Se=/^[^\n\r]/,EE=Hl([`
|
|
288
|
-
`,"\r"],!0,!1),
|
|
289
|
-
`,"\r"],!1,!1),D=0,
|
|
280
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function YA(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Op=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,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Dl(a),f=s.next();!f.done;f=s.next()){var l=f.value;l.remove(this)}}catch(b){t={error:b}}finally{try{f&&!f.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else a.remove(this);var u=this.initialTeardown;if(ot(u))try{u()}catch(b){o=b instanceof Np?b.errors:[b]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var h=Dl(c),d=h.next();!d.done;d=h.next()){var p=d.value;try{XA(p)}catch(b){o=o??[],b instanceof Np?o=wc(wc([],yc(o)),yc(b.errors)):o.push(b)}}}catch(b){r={error:b}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Np(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)XA(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)&&YA(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&YA(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();Op.EMPTY;function QA(e){return e instanceof Op||e&&"closed"in e&&ot(e.remove)&&ot(e.add)&&ot(e.unsubscribe)}function XA(e){ot(e)?e():e.unsubscribe()}var $A={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},zp={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=zp.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,wc([e,t],yc(n))):setTimeout.apply(void 0,wc([e,t],yc(n)))},clearTimeout:function(e){var t=zp.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function KA(e){zp.setTimeout(function(){throw e})}function JA(){}function tN(e){e()}var Up=function(e){Lp(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,QA(n)&&n.add(r)):r.destination=oN,r}return t.create=function(n,r,i){return new vc(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}(Op),nN=Function.prototype.bind;function Gp(e,t){return nN.call(e,t)}var rN=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){xc(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){xc(r)}else xc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){xc(n)}},e}(),vc=function(e){Lp(t,e);function t(n,r,i){var o=e.call(this)||this,a;if(ot(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&$A.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Gp(n.next,s),error:n.error&&Gp(n.error,s),complete:n.complete&&Gp(n.complete,s)}):a=n}return o.destination=new rN(a),o}return t}(Up);function xc(e){KA(e)}function iN(e){throw e}var oN={closed:!0,next:JA,error:iN,complete:JA},Hp=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function e3(e){return e}function aN(e){return e.length===0?e3:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var hn=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,o=lN(t)?t:new vc(t,n,r);return tN(function(){var a=i,s=a.operator,f=a.source;o.add(s?s.call(o,f):f?i._subscribe(o):i._trySubscribe(o))}),o},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=t3(n),new n(function(i,o){var a=new vc({next:function(s){try{t(s)}catch(f){o(f),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Hp]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return aN(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=t3(t),new t(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function t3(e){var t;return(t=e??$A.Promise)!==null&&t!==void 0?t:Promise}function sN(e){return e&&ot(e.next)&&ot(e.error)&&ot(e.complete)}function lN(e){return e&&e instanceof Up||sN(e)&&QA(e)}function fN(e){return ot(e==null?void 0:e.lift)}function ma(e){return function(t){if(fN(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 Rl(e,t,n,r,i){return new uN(e,t,n,r,i)}var uN=function(e){Lp(t,e);function t(n,r,i,o,a,s){var f=e.call(this,n)||this;return f.onFinalize=a,f.shouldUnsubscribe=s,f._next=r?function(l){try{r(l)}catch(u){n.error(u)}}:e.prototype._next,f._error=o?function(l){try{o(l)}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._error,f._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,f}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}(Up),cN=new hn(function(e){return e.complete()});function hN(e){return e&&ot(e.schedule)}function n3(e){return e[e.length-1]}function dN(e){return hN(n3(e))?e.pop():void 0}function pN(e,t){return typeof n3(e)=="number"?e.pop():t}var r3=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function i3(e){return ot(e==null?void 0:e.then)}function o3(e){return ot(e[Hp])}function a3(e){return Symbol.asyncIterator&&ot(e==null?void 0:e[Symbol.asyncIterator])}function s3(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 gN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var l3=gN();function f3(e){return ot(e==null?void 0:e[l3])}function u3(e){return JL(this,arguments,function(){var n,r,i,o;return ZA(this,function(a){switch(a.label){case 0:n=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ga(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,ga(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ga(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function c3(e){return ot(e==null?void 0:e.getReader)}function ba(e){if(e instanceof hn)return e;if(e!=null){if(o3(e))return mN(e);if(r3(e))return bN(e);if(i3(e))return yN(e);if(a3(e))return h3(e);if(f3(e))return wN(e);if(c3(e))return vN(e)}throw s3(e)}function mN(e){return new hn(function(t){var n=e[Hp]();if(ot(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function bN(e){return new hn(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function yN(e){return new hn(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,KA)})}function wN(e){return new hn(function(t){var n,r;try{for(var i=Dl(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function h3(e){return new hn(function(t){xN(e,t).catch(function(n){return t.error(n)})})}function vN(e){return h3(u3(e))}function xN(e,t){var n,r,i,o;return KL(this,void 0,void 0,function(){var a,s;return ZA(this,function(f){switch(f.label){case 0:f.trys.push([0,5,6,11]),n=eN(e),f.label=1;case 1:return[4,n.next()];case 2:if(r=f.sent(),!!r.done)return[3,4];if(a=r.value,t.next(a),t.closed)return[2];f.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=f.sent(),i={error:s},[3,11];case 6:return f.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:f.sent(),f.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 ii(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function d3(e,t){return t===void 0&&(t=0),ma(function(n,r){n.subscribe(Rl(r,function(i){return ii(r,e,function(){return r.next(i)},t)},function(){return ii(r,e,function(){return r.complete()},t)},function(i){return ii(r,e,function(){return r.error(i)},t)}))})}function p3(e,t){return t===void 0&&(t=0),ma(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function AN(e,t){return ba(e).pipe(p3(t),d3(t))}function EN(e,t){return ba(e).pipe(p3(t),d3(t))}function _N(e,t){return new hn(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function SN(e,t){return new hn(function(n){var r;return ii(n,t,function(){r=e[l3](),ii(n,t,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return ot(r==null?void 0:r.return)&&r.return()}})}function g3(e,t){if(!e)throw new Error("Iterable cannot be null");return new hn(function(n){ii(n,t,function(){var r=e[Symbol.asyncIterator]();ii(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function CN(e,t){return g3(u3(e),t)}function kN(e,t){if(e!=null){if(o3(e))return AN(e,t);if(r3(e))return _N(e,t);if(i3(e))return EN(e,t);if(a3(e))return g3(e,t);if(f3(e))return SN(e,t);if(c3(e))return CN(e,t)}throw s3(e)}function IN(e,t){return t?kN(e,t):ba(e)}var TN=WA(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function m3(e,t){var n=typeof t=="object";return new Promise(function(r,i){var o=new vc({next:function(a){r(a),o.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new TN)}});e.subscribe(o)})}function b3(e,t){return ma(function(n,r){var i=0;n.subscribe(Rl(r,function(o){r.next(e.call(t,o,i++))}))})}function BN(e,t,n,r,i,o,a,s){var f=[],l=0,u=0,c=!1,h=function(){c&&!f.length&&!l&&t.complete()},d=function(b){return l<r?p(b):f.push(b)},p=function(b){o&&t.next(b),l++;var y=!1;ba(n(b,u++)).subscribe(Rl(t,function(w){i==null||i(w),o?d(w):t.next(w)},function(){y=!0},void 0,function(){if(y)try{l--;for(var w=function(){var _=f.shift();a?ii(t,a,function(){return p(_)}):p(_)};f.length&&l<r;)w();h()}catch(_){t.error(_)}}))};return e.subscribe(Rl(t,d,function(){c=!0,h()})),function(){s==null||s()}}function y3(e,t,n){return n===void 0&&(n=1/0),ot(t)?y3(function(r,i){return b3(function(o,a){return t(r,o,i,a)})(ba(e(r,i)))},n):(typeof t=="number"&&(n=t),ma(function(r,i){return BN(r,i,e,n)}))}function DN(e){return e===void 0&&(e=1/0),y3(e3,e)}function RN(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=dN(e),r=pN(e,1/0),i=e;return i.length?i.length===1?ba(i[0]):DN(r)(IN(i,n)):cN}function FN(e,t,n,r,i){return function(o,a){var s=n,f=t,l=0;o.subscribe(Rl(a,function(u){var c=l++;f=s?e(f,u,c):(s=!0,u),r&&a.next(f)},i&&function(){s&&a.next(f),a.complete()}))}}function w3(e,t){return ma(FN(e,t,arguments.length>=2,!1,!0))}var MN=function(e,t){return e.push(t),e};function PN(){return ma(function(e,t){w3(MN,[])(e).subscribe(t)})}const v3=-2003829722,Vp=-2021002517;function LN(e){return new TextDecoder().decode(e)}function x3(e){const t=e?"big":"little",n=new Ie().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 Ie().endianess(t).uint32("reductionLevel").uint32("reserved").uint64("dataOffset").uint64("indexOffset")}),r=new Ie().endianess(t).uint64("basesCovered").doublele("scoreMin").doublele("scoreMax").doublele("scoreSum").doublele("scoreSumSquares"),i=new Ie().endianess(t).uint32("magic").uint32("blockSize").uint32("keySize").uint32("valSize").uint64("itemCount"),o=new Ie().endianess(t).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");return{chromTreeParser:i,totalSummaryParser:r,headerParser:n,isLeafNode:o}}class A3{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=a=>a,path:i,url:o}=t;if(this.renameRefSeqs=r,n)this.bbi=n;else if(o)this.bbi=new qi(o);else if(i)this.bbi=new ct(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(ye.Buffer.alloc(n),0,n,0,t),i=this._isBigEndian(r),o=x3(i),a=o.headerParser.parse(r),{magic:s,asOffset:f,totalSummaryOffset:l}=a;if(a.fileType=s===Vp?"bigbed":"bigwig",f>n||l>n)return this._getMainHeader(t,n*2);if(f){const u=Number(a.asOffset);a.autoSql=LN(r.subarray(u,r.indexOf(0,u)))}if(a.totalSummaryOffset>n)return this._getMainHeader(t,n*2);if(a.totalSummaryOffset){const u=r.subarray(Number(a.totalSummaryOffset)),c=o.totalSummaryParser.parse(u);a.totalSummary={...c,basesCovered:Number(c.basesCovered)}}return{...a,isBigEndian:i}}_isBigEndian(t){let n=t.readInt32LE(0);if(n===v3||n===Vp)return!1;if(n=t.readInt32BE(0),n===v3||n===Vp)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(t,n){const r=t.isBigEndian,i=r?"big":"little",o=[],a={};let s=Number(t.unzoomedDataOffset);const f=Number(t.chromTreeOffset);for(;s%4!==0;)s+=1;const l=s-f,{buffer:u}=await this.bbi.read(ye.Buffer.alloc(l),0,l,Number(f),n),c=x3(r),{keySize:h}=c.chromTreeParser.parse(u),d=new Ie().endianess(i).string("key",{stripNull:!0,length:h}).uint32("refId").uint32("refSize").saveOffset("offset"),p=new Ie().endianess(i).skip(h).uint64("childOffset").saveOffset("offset"),b=32,y=async w=>{let _=w;if(_>=u.length)throw new Error("reading beyond end of buffer");const C=c.isLeafNode.parse(u.subarray(_)),{isLeafNode:S,cnt:T}=C;if(_+=C.offset,S)for(let B=0;B<T;B+=1){const I=d.parse(u.subarray(_));_+=I.offset;const{key:F,refId:P,refSize:j}=I,O={name:F,id:P,length:j};a[this.renameRefSeqs(F)]=P,o[P]=O}else{const B=[];for(let I=0;I<T;I+=1){const F=p.parse(u.subarray(_)),{childOffset:P}=F;_+=F.offset,B.push(y(Number(P)-Number(f)))}await Promise.all(B)}};return await y(b),{refsByName:a,refsByNumber:o}}async getUnzoomedView(t){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:i,isBigEndian:o,fileType:a}=await this.getHeader(t);return new qA(this.bbi,r,n,o,i>0,a)}async getFeatureStream(t,n,r,i){await this.getHeader(i);const o=this.renameRefSeqs(t);let a;const{basesPerSpan:s,scale:f}=i||{};return s?a=await this.getView(1/s,i):f?a=await this.getView(f,i):a=await this.getView(1,i),new hn(l=>{a.readWigData(o,n,r,l,i)})}async getFeatures(t,n,r,i){const o=await this.getFeatureStream(t,n,r,i);return(await m3(o.pipe(PN()))).flat()}}class NN extends A3{async getView(t,n){const{zoomLevels:r,refsByName:i,fileSize:o,isBigEndian:a,uncompressBufSize:s}=await this.getHeader(n),f=1/t;let l=r.length;o||(l-=1);for(let u=l;u>=0;u-=1){const c=r[u];if(c&&c.reductionLevel<=2*f){const h=Number(c.indexOffset);return new qA(this.bbi,i,h,a,s>0,"summary")}}return this.getUnzoomedView(n)}}function ON(e){return e.filter(t=>!!t)}class zN extends A3{constructor(){super(...arguments),this.readIndicesCache=new rc({cache:new ic({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(ye.Buffer.alloc(64),0,64,Number(n)),o=r?"big":"little",a=new Ie().endianess(o).uint16("size").uint16("count").uint64("offset").parse(i),{count:s,offset:f}=a;if(s===0)return[];const l=20,u=l*s,{buffer:c}=await this.bbi.read(ye.Buffer.alloc(u),0,u,Number(f)),h=new Ie().endianess(o).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),d=[];for(let p=0;p<s;p+=1)d.push(h.parse(c.subarray(p*l)));return d}async searchExtraIndexBlocks(t,n={}){const{isBigEndian:r}=await this.getHeader(n),i=await this.readIndices(n);if(i.length===0)return[];const o=i.map(async a=>{const{offset:s,field:f}=a,{buffer:l}=await this.bbi.read(ye.Buffer.alloc(32),0,32,Number(s),n),u=r?"big":"little",c=new Ie().endianess(u).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),{blockSize:h,keySize:d,valSize:p}=c.parse(l),b=new Ie().endianess(u).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:new Ie().array("leafkeys",{length:"cnt",type:new Ie().endianess(u).string("key",{length:d,stripNull:!0}).uint64("offset")}),1:new Ie().array("keys",{length:"cnt",type:new Ie().endianess(u).string("key",{length:d,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),y=async _=>{const C=Number(_),S=4+h*(d+p),{buffer:T}=await this.bbi.read(ye.Buffer.alloc(S),0,S,C,n),B=b.parse(T);if(B.leafkeys){let I;for(let F=0;F<B.leafkeys.length;F+=1){const{key:P}=B.leafkeys[F];if(t.localeCompare(P)<0&&I)return y(I);I=B.leafkeys[F].offset}return y(I)}for(let I=0;I<B.keys.length;I+=1)if(B.keys[I].key===t)return{...B.keys[I],field:f}},w=32;return y(Number(s)+w)});return ON(await Promise.all(o))}async searchExtraIndex(t,n={}){const r=await this.searchExtraIndexBlocks(t,n);if(r.length===0)return[];const i=await this.getUnzoomedView(n),o=r.map(s=>new hn(f=>{i.readFeatures(f,[s],n)}).pipe(w3((f,l)=>f.concat(l)),b3(f=>{for(const l of f)l.field=s.field;return f})));return(await m3(RN(...o))).filter(s=>{var f;return((f=s.rest)===null||f===void 0?void 0:f.split(" ")[(s.field||0)-3])===t})}}const E3=Object.freeze(Object.defineProperty({__proto__:null,BigBed:zN,BigWig:NN},Symbol.toStringTag,{value:"Module"}));function UN(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function ya(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,ya)}UN(ya,Error),ya.buildMessage=function(e,t){var n={literal:function(l){return'"'+i(l.text)+'"'},class:function(l){var u="",c;for(c=0;c<l.parts.length;c++)u+=l.parts[c]instanceof Array?o(l.parts[c][0])+"-"+o(l.parts[c][1]):o(l.parts[c]);return"["+(l.inverted?"^":"")+u+"]"},any:function(l){return"any character"},end:function(l){return"end of input"},other:function(l){return l.description}};function r(l){return l.charCodeAt(0).toString(16).toUpperCase()}function i(l){return l.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function o(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+r(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+r(u)})}function a(l){return n[l.type](l)}function s(l){var u=new Array(l.length),c,h;for(c=0;c<l.length;c++)u[c]=a(l[c]);if(u.sort(),u.length>0){for(c=1,h=1;c<u.length;c++)u[c-1]!==u[c]&&(u[h]=u[c],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 f(l){return l?'"'+i(l)+'"':"end of input"}return"Expected "+s(e)+" but "+f(t)+" found."};function GN(e,t){t=t!==void 0?t:{};var n={},r={declaration:ZE},i=ZE,o="(",a=Re("(",!1),s=")",f=Re(")",!1),l=function(A,z,Q,X){return{type:A,name:z,comment:Q,fields:X}},u="simple",c=Re("simple",!1),h="object",d=Re("object",!1),p="table",b=Re("table",!1),y="auto",w=Re("auto",!1),_="primary",C=Re("primary",!1),S="index",T=Re("index",!1),B="unique",I=Re("unique",!1),F=function(A,z){return z},P=function(A,z){return A.name&&z.unshift(A),z},j="#",O=Re("#",!1),re=";",ae=Re(";",!1),pe=function(A,z,Q){return{type:A,name:z,comment:Q}},Te="[",Xe=Re("[",!1),De="]",$e=Re("]",!1),Ze=function(A,z,Q,X){return{type:A,size:z,name:Q,comment:X}},Ke=function(A,z,Q,X){return{type:A,vals:z,name:Q,comment:X}},Ee=",",_e=Re(",",!1),dt=function(A,z){return z.unshift(A),z},qt="int",Oe=Re("int",!1),L="uint",M=Re("uint",!1),q="short",H=Re("short",!1),W="ushort",E=Re("ushort",!1),x="byte",G=Re("byte",!1),Z="ubyte",le=Re("ubyte",!1),J="float",fe=Re("float",!1),Zt="char",ai=Re("char",!1),si="string",li=Re("string",!1),_t="lstring",yr=Re("lstring",!1),fi="enum",Wt=Re("enum",!1),$n="double",v=Re("double",!1),g="bigint",m=Re("bigint",!1),k="set",R=Re("set",!1),N=function(A,z){return A+" "+z},V=/^[a-zA-Z_]/,ue=$l([["a","z"],["A","Z"],"_"],!1,!1),Ge=/^[a-zA-Z0-9_]/,Me=$l([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),We=function(A){return HE()},Se=/^[^\n\r]/,NE=$l([`
|
|
281
|
+
`,"\r"],!0,!1),sz=function(A){return A.join("").replace(/^"/,"").replace(/"$/,"")},lz=VE("integer"),OE=/^[0-9]/,zE=$l([["0","9"]],!1,!1),fz=function(){return parseInt(HE(),10)},uz=VE("whitespace"),UE=/^[ \t\n\r]/,GE=$l([" "," ",`
|
|
282
|
+
`,"\r"],!1,!1),D=0,Rt=0,Pc=[{line:1,column:1}],Kn=0,Cg=[],ne=0,Lc;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 HE(){return e.substring(Rt,D)}function Re(A,z){return{type:"literal",text:A,ignoreCase:z}}function $l(A,z,Q){return{type:"class",parts:A,inverted:z,ignoreCase:Q}}function cz(){return{type:"end"}}function VE(A){return{type:"other",description:A}}function jE(A){var z=Pc[A],Q;if(z)return z;for(Q=A-1;!Pc[Q];)Q--;for(z=Pc[Q],z={line:z.line,column:z.column};Q<A;)e.charCodeAt(Q)===10?(z.line++,z.column=1):z.column++,Q++;return Pc[A]=z,z}function qE(A,z){var Q=jE(A),X=jE(z);return{start:{offset:A,line:Q.line,column:Q.column},end:{offset:z,line:X.line,column:X.column}}}function ie(A){D<Kn||(D>Kn&&(Kn=D,Cg=[]),Cg.push(A))}function hz(A,z,Q){return new ya(ya.buildMessage(A,z),A,z,Q)}function ZE(){var A,z,Q,X,ee,ze,Ye,gn,ui,wr,ci,vr,hi,xr;return A=D,z=ge(),z!==n?(Q=WE(),Q!==n?(X=ge(),X!==n?(ee=YE(),ee!==n?(ze=ge(),ze!==n?(Ye=Nc(),Ye!==n?(gn=ge(),gn!==n?(e.charCodeAt(D)===40?(ui=o,D++):(ui=n,ne===0&&ie(a)),ui!==n?(wr=ge(),wr!==n?(ci=dz(),ci!==n?(vr=ge(),vr!==n?(e.charCodeAt(D)===41?(hi=s,D++):(hi=n,ne===0&&ie(f)),hi!==n?(xr=ge(),xr!==n?(Rt=A,z=l(Q,ee,Ye,ci),A=z):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n),A}function WE(){var A;return e.substr(D,6)===u?(A=u,D+=6):(A=n,ne===0&&ie(c)),A===n&&(e.substr(D,6)===h?(A=h,D+=6):(A=n,ne===0&&ie(d)),A===n&&(e.substr(D,5)===p?(A=p,D+=5):(A=n,ne===0&&ie(b)))),A}function YE(){var A,z,Q,X;return A=Tn(),A===n&&(A=D,z=Tn(),z!==n?(Q=QE(),Q!==n?(z=[z,Q],A=z):(D=A,A=n)):(D=A,A=n),A===n&&(A=D,z=Tn(),z!==n?(e.substr(D,4)===y?(Q=y,D+=4):(Q=n,ne===0&&ie(w)),Q!==n?(z=[z,Q],A=z):(D=A,A=n)):(D=A,A=n),A===n&&(A=D,z=Tn(),z!==n?(Q=QE(),Q!==n?(e.substr(D,4)===y?(X=y,D+=4):(X=n,ne===0&&ie(w)),X!==n?(z=[z,Q,X],A=z):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)))),A}function QE(){var A;return e.substr(D,7)===_?(A=_,D+=7):(A=n,ne===0&&ie(C)),A===n&&(e.substr(D,5)===S?(A=S,D+=5):(A=n,ne===0&&ie(T)),A===n&&(e.substr(D,6)===B?(A=B,D+=6):(A=n,ne===0&&ie(I)))),A}function Nc(){var A;return A=XE(),A===n&&(A=ge()),A}function dz(){var A,z,Q,X,ee,ze,Ye;if(A=D,z=kg(),z!==n)if(Q=ge(),Q!==n){for(X=[],ee=D,ze=ge(),ze!==n?(Ye=kg(),Ye!==n?(Rt=ee,ze=F(z,Ye),ee=ze):(D=ee,ee=n)):(D=ee,ee=n);ee!==n;)X.push(ee),ee=D,ze=ge(),ze!==n?(Ye=kg(),Ye!==n?(Rt=ee,ze=F(z,Ye),ee=ze):(D=ee,ee=n)):(D=ee,ee=n);X!==n?(ee=ge(),ee!==n?(Rt=A,z=P(z,X),A=z):(D=A,A=n)):(D=A,A=n)}else D=A,A=n;else D=A,A=n;return A}function pz(){var A;return e.charCodeAt(D)===35?(A=j,D++):(A=n,ne===0&&ie(O)),A}function gz(){var A,z,Q,X,ee;return A=D,z=ge(),z!==n?(Q=pz(),Q!==n?(X=XE(),X!==n?(ee=ge(),ee!==n?(z=[z,Q,X,ee],A=z):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n),A}function kg(){var A,z,Q,X,ee,ze,Ye,gn,ui,wr,ci,vr,hi,xr;return A=D,z=Ig(),z!==n?(Q=ge(),Q!==n?(X=Tn(),X!==n?(ee=ge(),ee!==n?(e.charCodeAt(D)===59?(ze=re,D++):(ze=n,ne===0&&ie(ae)),ze!==n?(Ye=ge(),Ye!==n?(gn=Nc(),gn!==n?(Rt=A,z=pe(z,X,gn),A=z):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n),A===n&&(A=D,z=Ig(),z!==n?(Q=ge(),Q!==n?(e.charCodeAt(D)===91?(X=Te,D++):(X=n,ne===0&&ie(Xe)),X!==n?(ee=ge(),ee!==n?(ze=bz(),ze!==n?(Ye=ge(),Ye!==n?(e.charCodeAt(D)===93?(gn=De,D++):(gn=n,ne===0&&ie($e)),gn!==n?(ui=ge(),ui!==n?(wr=Tn(),wr!==n?(ci=ge(),ci!==n?(e.charCodeAt(D)===59?(vr=re,D++):(vr=n,ne===0&&ie(ae)),vr!==n?(hi=ge(),hi!==n?(xr=Nc(),xr!==n?(Rt=A,z=Ze(z,ze,wr,xr),A=z):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n),A===n&&(A=D,z=Ig(),z!==n?(Q=ge(),Q!==n?(e.charCodeAt(D)===40?(X=o,D++):(X=n,ne===0&&ie(a)),X!==n?(ee=ge(),ee!==n?(ze=mz(),ze!==n?(Ye=ge(),Ye!==n?(e.charCodeAt(D)===41?(gn=s,D++):(gn=n,ne===0&&ie(f)),gn!==n?(ui=ge(),ui!==n?(wr=Tn(),wr!==n?(ci=ge(),ci!==n?(e.charCodeAt(D)===59?(vr=re,D++):(vr=n,ne===0&&ie(ae)),vr!==n?(hi=ge(),hi!==n?(xr=Nc(),xr!==n?(Rt=A,z=Ke(z,ze,wr,xr),A=z):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n)):(D=A,A=n),A===n&&(A=gz()))),A}function mz(){var A,z,Q,X,ee,ze,Ye;if(A=D,z=Tn(),z!==n){for(Q=[],X=D,e.charCodeAt(D)===44?(ee=Ee,D++):(ee=n,ne===0&&ie(_e)),ee!==n?(ze=ge(),ze!==n?(Ye=Tn(),Ye!==n?(Rt=X,ee=F(z,Ye),X=ee):(D=X,X=n)):(D=X,X=n)):(D=X,X=n);X!==n;)Q.push(X),X=D,e.charCodeAt(D)===44?(ee=Ee,D++):(ee=n,ne===0&&ie(_e)),ee!==n?(ze=ge(),ze!==n?(Ye=Tn(),Ye!==n?(Rt=X,ee=F(z,Ye),X=ee):(D=X,X=n)):(D=X,X=n)):(D=X,X=n);Q!==n?(Rt=A,z=dt(z,Q),A=z):(D=A,A=n)}else D=A,A=n;return A}function Ig(){var A,z,Q,X;return e.substr(D,3)===qt?(A=qt,D+=3):(A=n,ne===0&&ie(Oe)),A===n&&(e.substr(D,4)===L?(A=L,D+=4):(A=n,ne===0&&ie(M)),A===n&&(e.substr(D,5)===q?(A=q,D+=5):(A=n,ne===0&&ie(H)),A===n&&(e.substr(D,6)===W?(A=W,D+=6):(A=n,ne===0&&ie(E)),A===n&&(e.substr(D,4)===x?(A=x,D+=4):(A=n,ne===0&&ie(G)),A===n&&(e.substr(D,5)===Z?(A=Z,D+=5):(A=n,ne===0&&ie(le)),A===n&&(e.substr(D,5)===J?(A=J,D+=5):(A=n,ne===0&&ie(fe)),A===n&&(e.substr(D,4)===Zt?(A=Zt,D+=4):(A=n,ne===0&&ie(ai)),A===n&&(e.substr(D,6)===si?(A=si,D+=6):(A=n,ne===0&&ie(li)),A===n&&(e.substr(D,7)===_t?(A=_t,D+=7):(A=n,ne===0&&ie(yr)),A===n&&(e.substr(D,4)===fi?(A=fi,D+=4):(A=n,ne===0&&ie(Wt)),A===n&&(e.substr(D,6)===$n?(A=$n,D+=6):(A=n,ne===0&&ie(v)),A===n&&(e.substr(D,6)===g?(A=g,D+=6):(A=n,ne===0&&ie(m)),A===n&&(e.substr(D,3)===k?(A=k,D+=3):(A=n,ne===0&&ie(R)),A===n&&(A=D,z=WE(),z!==n?(Q=ge(),Q!==n?(X=YE(),X!==n?(Rt=A,z=N(z,X),A=z):(D=A,A=n)):(D=A,A=n)):(D=A,A=n))))))))))))))),A}function bz(){var A;return A=yz(),A===n&&(A=Tn()),A}function Tn(){var A,z,Q,X,ee;if(A=D,z=D,V.test(e.charAt(D))?(Q=e.charAt(D),D++):(Q=n,ne===0&&ie(ue)),Q!==n){for(X=[],Ge.test(e.charAt(D))?(ee=e.charAt(D),D++):(ee=n,ne===0&&ie(Me));ee!==n;)X.push(ee),Ge.test(e.charAt(D))?(ee=e.charAt(D),D++):(ee=n,ne===0&&ie(Me));X!==n?(Q=[Q,X],z=Q):(D=z,z=n)}else D=z,z=n;return z!==n&&(Rt=A,z=We()),A=z,A}function XE(){var A,z,Q;for(A=D,z=[],Se.test(e.charAt(D))?(Q=e.charAt(D),D++):(Q=n,ne===0&&ie(NE));Q!==n;)z.push(Q),Se.test(e.charAt(D))?(Q=e.charAt(D),D++):(Q=n,ne===0&&ie(NE));return z!==n&&(Rt=A,z=sz(z)),A=z,A}function yz(){var A,z,Q,X;if(ne++,A=D,z=ge(),z!==n){if(Q=[],OE.test(e.charAt(D))?(X=e.charAt(D),D++):(X=n,ne===0&&ie(zE)),X!==n)for(;X!==n;)Q.push(X),OE.test(e.charAt(D))?(X=e.charAt(D),D++):(X=n,ne===0&&ie(zE));else Q=n;Q!==n?(Rt=A,z=fz(),A=z):(D=A,A=n)}else D=A,A=n;return ne--,A===n&&(z=n,ne===0&&ie(lz)),A}function ge(){var A,z;for(ne++,A=[],UE.test(e.charAt(D))?(z=e.charAt(D),D++):(z=n,ne===0&&ie(GE));z!==n;)A.push(z),UE.test(e.charAt(D))?(z=e.charAt(D),D++):(z=n,ne===0&&ie(GE));return ne--,A===n&&(z=n,ne===0&&ie(uz)),A}if(Lc=i(),Lc!==n&&D===e.length)return Lc;throw Lc!==n&&D<e.length&&ie(cz()),hz(Cg,Kn<e.length?e.charAt(Kn):null,Kn<e.length?qE(Kn,Kn+1):qE(Kn,Kn))}var _3={SyntaxError:ya,parse:GN};const HN=Ws(_3),jp=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
|
|
290
283
|
"bigChain pairwise alignment"
|
|
291
284
|
(
|
|
292
285
|
string chrom; "Reference sequence chromosome or scaffold"
|
|
@@ -445,17 +438,17 @@ Reason: ${s.message}`)}));if(n.isViewSpec(o))return o.baseUrl=(a=i.match(/^[^?#]
|
|
|
445
438
|
float score; "Floating point score."
|
|
446
439
|
char[1] leftStatus; "Gap/break annotation for preceding block"
|
|
447
440
|
char[1] rightStatus; "Gap/break annotation for following block"
|
|
448
|
-
)`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,u3.parse(t.trim())]));function Lp(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 SN={".":0,"-":-1,"+":1};function CN(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 IN{constructor(t={}){if(t.autoSql)this.autoSql=Lp(_N.parse(t.autoSql));else if(t.type){if(!Mp[t.type])throw new Error("Type not found");this.autoSql=Lp(Mp[t.type])}else this.autoSql=Lp(Mp.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(t,n={}){const{autoSql:r}=this,{uniqueId:i}=n,o=Array.isArray(t)?t:t.split(" ");let a={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&CN(o))for(let s=0;s<r.fields.length;s++){const f=r.fields[s];let l=o[s];const{isNumeric:u,isArray:c,arrayIsNumeric:h,name:d}=f;if(l==null)break;if(l!=="."){if(u){const p=Number(l);l=Number.isNaN(p)?l:p}else c&&(l=l.split(","),l[l.length-1]===""&&l.pop(),h&&(l=l.map(p=>Number(p))));a[d]=l}}else{const s=["chrom","chromStart","chromEnd","name"];a=Object.fromEntries(o.map((f,l)=>[s[l]||"field"+l,f])),a.chromStart=+a.chromStart,a.chromEnd=+a.chromEnd,Number.isNaN(Number.parseFloat(a.field4))||(a.score=+a.field4,delete a.field4),(a.field5==="+"||a.field5==="-")&&(a.strand=a.field5,delete a.field5)}return i&&(a.uniqueId=i),a.strand=SN[a.strand]||0,a.chrom=decodeURIComponent(a.chrom),a}}const TN=Object.freeze(Object.defineProperty({__proto__:null,default:IN},Symbol.toStringTag,{value:"Module"}));let c3=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 ma(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new c3(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 h3=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 kN(e){return new Promise(t=>setTimeout(t,e))}function BN(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}function DN(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 FN(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function RN(e={}){return"aborted"in e?{signal:e}:e}function d3(e,t){const n=[];let r;if(e.length===0)return e;e.sort((i,o)=>{const a=i.minv.blockPosition-o.minv.blockPosition;return a===0?i.minv.dataPosition-o.minv.dataPosition:a});for(const i of e)(!t||i.maxv.compareTo(t)>0)&&(r===void 0?(n.push(i),r=i):FN(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function p3(e,t){return{lineCount:BN(Uu.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function dc(e,t){return e?e.compareTo(t)>0?t:e:t}function PN(e,t=n=>n){let n=0,r=0;const i=[],o={};for(let a=0;a<e.length;a+=1)if(!e[a]){if(r<a){let s=e.toString("utf8",r,a);s=t(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}let g3=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const MN=21578050;function LN(e,t){return e-e%t}function NN(e,t){return e-e%t+t}function ON(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 ba extends g3{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)!==MN)throw new Error("Not a BAI file");const r=n.readInt32LE(4),o=((1<<(5+1)*3)-1)/7;let a=8,s;const f=new Array(r);for(let l=0;l<r;l++){const u=n.readInt32LE(a);let c;a+=4;const h={};for(let b=0;b<u;b+=1){const y=n.readUInt32LE(a);if(a+=4,y===o+1)a+=4,c=p3(n,a+16),a+=32;else{if(y>o+1)throw new Error("bai index contains too many bins, please use CSI");{const w=n.readInt32LE(a);a+=4;const S=new Array(w);for(let C=0;C<w;C++){const _=ma(n,a);a+=8;const k=ma(n,a);a+=8,s=dc(s,_),S[C]=new h3(_,k,y)}h[y]=S}}}const d=n.readInt32LE(a);a+=4;const p=new Array(d);for(let b=0;b<d;b++){const y=ma(n,a);a+=8,s=dc(s,y),p[b]=y}f[l]={binIndex:h,linearIndex:p,stats:c}}return{bai:!0,firstDataLine:s,maxBlockSize:65536,indices:f,refCount:r}}async indexCov(t,n,r,i={}){const a=n!==void 0,f=(await this.parse(i)).indices[t];if(!f)return[];const{linearIndex:l=[],stats:u}=f;if(l.length===0)return[];const c=r===void 0?(l.length-1)*16384:NN(r,16384),h=n===void 0?0:LN(n,16384),d=a?new Array((c-h)/16384):new Array(l.length-1),p=l[l.length-1].blockPosition;if(c>(l.length-1)*16384)throw new Error("query outside of range of linear index");let b=l[h/16384].blockPosition;for(let y=h/16384,w=0;y<c/16384;y++,w++)d[w]={score:l[y+1].blockPosition-b,start:y*16384,end:y*16384+16384},b=l[y+1].blockPosition;return d.map(y=>({...y,score:y.score*((u==null?void 0:u.lineCount)||0)/p}))}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const a=o.indices[t];if(!a)return[];const s=ON(n,r),f=[];for(const[d,p]of s)for(let b=d;b<=p;b++)if(a.binIndex[b]){const y=a.binIndex[b];for(const w of y)f.push(w)}const l=a.linearIndex.length;let u;const c=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=c;d<=h;++d){const p=a.linearIndex[d];p&&(!u||p.compareTo(u)<0)&&(u=p)}return d3(f,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 ai=ye.Buffer,Np=[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"&&(Np=new Int32Array(Np));function m3(e){if(ai.isBuffer(e))return e;var t=typeof ai.alloc=="function"&&typeof ai.from=="function";if(typeof e=="number")return t?ai.alloc(e):new ai(e);if(typeof e=="string")return t?ai.from(e):new ai(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function zN(e){var t=m3(4);return t.writeInt32BE(e,0),t}function Op(e,t){e=m3(e),ai.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=~~t^-1,r=0;r<e.length;r++)n=Np[(n^e[r])&255]^n>>>8;return n^-1}function zp(){return zN(Op.apply(null,arguments))}zp.signed=function(){return Op.apply(null,arguments)},zp.unsigned=function(){return Op.apply(null,arguments)>>>0};var UN=zp;const GN=Gs(UN),HN=21582659,VN=38359875;function jN(e,t){return e*2**t}function b3(e,t){return Math.floor(e/2**t)}let pc=class extends g3{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",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),f=s?String.fromCharCode(s):"",l=t.readInt32LE(n+20),u=t.readInt32LE(n+24);return{columnNumbers:a,coordinateType:i,metaValue:s,metaChar:f,skipLines:l,format:o,formatFlags:r,...PN(t.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await Kr(n);let i;if(r.readUInt32LE(0)===HN)i=1;else if(r.readUInt32LE(0)===VN)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 o=r.readInt32LE(12),a=o>=30?this.parseAuxData(r,16):void 0,s=r.readInt32LE(16+o);let f=16+o+4,l;const u=new Array(s);for(let c=0;c<s;c++){const h=r.readInt32LE(f);f+=4;const d={};let p;for(let b=0;b<h;b++){const y=r.readUInt32LE(f);if(f+=4,y>this.maxBinNumber)p=p3(r,f+28),f+=28+16;else{l=dc(l,ma(r,f)),f+=8;const w=r.readInt32LE(f);f+=4;const S=new Array(w);for(let C=0;C<w;C+=1){const _=ma(r,f);f+=8;const k=ma(r,f);f+=8,l=dc(l,_),S[C]=new h3(_,k,y)}d[y]=S}}u[c]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:l,indices:u,refCount:s,csi:!0,maxBlockSize:65536,...a}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i),a=o==null?void 0:o.indices[t];if(!a)return[];const s=this.reg2bins(n,r);if(s.length===0)return[];const f=[];for(const[l,u]of s)for(let c=l;c<=u;c++)if(a.binIndex[c]){const h=a.binIndex[c];for(const d of h)f.push(d)}return d3(f,new c3(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,o=this.minShift+this.depth*3;const a=[];for(;r<=this.depth;o-=3,i+=jN(1,r*3),r+=1){const s=i+b3(t,o),f=i+b3(n,o);if(f-s+a.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`);a.push([s,f])}return a}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 dn={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},y3="=ACMGRSVTWYHKDBN".split(""),Il="MIDNSHP=X???????".split("");class w3{constructor(t){this.data={},this._tagList=[],this._allTagsParsed=!1;const{bytes:n,fileOffset:r}=t,{byteArray:i,start:o}=n;this.data={},this.bytes=n,this._id=r,this._refID=i.readInt32LE(o+4),this.data.start=i.readInt32LE(o+8),this.flags=(i.readInt32LE(o+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(),o=n[i];return n[i]=!0,!o})}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 o=this.bytes.end;let a;for(;i<o&&a!==t;){const s=String.fromCharCode(n[i],n[i+1]);a=s.toLowerCase();const f=String.fromCharCode(n[i+2]);i+=3;let l;switch(f){case"A":{l=String.fromCharCode(n[i]),i+=1;break}case"i":{l=n.readInt32LE(i),i+=4;break}case"I":{l=n.readUInt32LE(i),i+=4;break}case"c":{l=n.readInt8(i),i+=1;break}case"C":{l=n.readUInt8(i),i+=1;break}case"s":{l=n.readInt16LE(i),i+=2;break}case"S":{l=n.readUInt16LE(i),i+=2;break}case"f":{l=n.readFloatLE(i),i+=4;break}case"Z":case"H":{for(l="";i<=o;){const u=n[i++];if(u===0)break;l+=String.fromCharCode(u)}break}case"B":{l="";const u=n[i++],c=String.fromCharCode(u),h=n.readInt32LE(i);if(i+=4,c==="i")if(s==="CG")for(let d=0;d<h;d++){const p=n.readInt32LE(i),b=p>>4,y=Il[p&15];l+=b+y,i+=4}else for(let d=0;d<h;d++)l+=n.readInt32LE(i),d+1<h&&(l+=","),i+=4;if(c==="I")if(s==="CG")for(let d=0;d<h;d++){const p=n.readUInt32LE(i),b=p>>4,y=Il[p&15];l+=b+y,i+=4}else for(let d=0;d<h;d++)l+=n.readUInt32LE(i),d+1<h&&(l+=","),i+=4;if(c==="s")for(let d=0;d<h;d++)l+=n.readInt16LE(i),d+1<h&&(l+=","),i+=2;if(c==="S")for(let d=0;d<h;d++)l+=n.readUInt16LE(i),d+1<h&&(l+=","),i+=2;if(c==="c")for(let d=0;d<h;d++)l+=n.readInt8(i),d+1<h&&(l+=","),i+=1;if(c==="C")for(let d=0;d<h;d++)l+=n.readUInt8(i),d+1<h&&(l+=","),i+=1;if(c==="f")for(let d=0;d<h;d++)l+=n.readFloatLE(i),d+1<h&&(l+=","),i+=4;break}default:console.warn(`Unknown BAM tag type '${f}', tags may be incomplete`),l=void 0,i=o}if(this._tagOffset=i,this._tagList.push(s),a===t)return l;this.data[a]=l}this._allTagsParsed=!0}_parseAllTags(){this._parseTag("")}_parseCigar(t){return t.match(/\d+\D/g).map(n=>[n.match(/\D/)[0].toUpperCase(),Number.parseInt(n,10)])}isPaired(){return!!(this.flags&dn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&dn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&dn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&dn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&dn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&dn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&dn.BAM_FREAD1)}isRead2(){return!!(this.flags&dn.BAM_FREAD2)}isSecondary(){return!!(this.flags&dn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&dn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&dn.BAM_FDUP)}isSupplementary(){return!!(this.flags&dn.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 o=this.get("seq_length");let a="",s=0,f=t.readInt32LE(i),l=f>>4,u=Il[f&15];if(u==="S"&&l===o)return i+=4,f=t.readInt32LE(i),l=f>>4,u=Il[f&15],u!=="N"&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(let c=0;c<r;++c)f=t.readInt32LE(i),l=f>>4,u=Il[f&15],a+=l+u,u!=="H"&&u!=="S"&&u!=="I"&&(s+=l),i+=4;return this.data.length_on_ref=s,a}_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"),o=this.get("seq_length");let a="",s=0;for(let f=0;f<i;++f){const l=t[r+f];a+=y3[(l&240)>>4],s++,s<o&&(a+=y3[l&15],s++)}return a}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 o=[];return this.template_length()>0?(o[0]=t,o[1]=r,o[2]=n,o[3]=i):(o[2]=t,o[3]=r,o[0]=n,o[1]=i),o.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 v3(e){const t=e.split(/\r?\n/),n=[];for(const r of t){const[i,...o]=r.split(/\t/);i&&n.push({tag:i.slice(1),data:o.map(a=>{const[s,f]=a.split(":",2);return{tag:s,value:f}})})}return n}const x3=21840194,A3=65536;async function qN(e){let t=[];for await(const n of e)t=t.concat(n);return t}class ZN{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 E3{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:o,baiUrl:a,csiPath:s,csiFilehandle:f,csiUrl:l,htsget:u,yieldThreadTime:c=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new Yu({cache:new Qu({maxSize:50}),fill:async(d,p)=>{const{chunk:b,opts:y}=d,{data:w,cpositions:S,dpositions:C}=await this._readChunk({chunk:b,opts:{...y,signal:p}});return this.readBamFeatures(w,S,C,b)}}),this.renameRefSeq=h,t)this.bam=t;else if(n)this.bam=new ct(n);else if(r)this.bam=new ji(r);else if(u)this.htsget=!0,this.bam=new ZN;else throw new Error("unable to initialize bam");if(f)this.index=new pc({filehandle:f});else if(s)this.index=new pc({filehandle:new ct(s)});else if(l)this.index=new pc({filehandle:new ji(l)});else if(o)this.index=new ba({filehandle:o});else if(i)this.index=new ba({filehandle:new ct(i)});else if(a)this.index=new ba({filehandle:new ji(a)});else if(n)this.index=new ba({filehandle:new ct(`${n}.bai`)});else if(r)this.index=new ba({filehandle:new ji(`${r}.bai`)});else if(u)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=c}async getHeaderPre(t){const n=RN(t);if(!this.index)return;const r=await this.index.parse(n),i=r.firstDataLine?r.firstDataLine.blockPosition+65535:void 0;let o;if(i){const u=i+A3,c=await this.bam.read(ye.Buffer.alloc(u),0,u,0,n);if(!c.bytesRead)throw new Error("Error reading header");o=c.buffer.subarray(0,Math.min(c.bytesRead,i))}else o=await this.bam.readFile(n);const a=await Kr(o);if(a.readInt32LE(0)!==x3)throw new Error("Not a BAM file");const s=a.readInt32LE(4);this.header=a.toString("utf8",8,8+s);const{chrToIndex:f,indexToChr:l}=await this._readRefSeqs(s+8,65535,n);return this.chrToIndex=f,this.indexToChr=l,v3(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+A3,{bytesRead:o,buffer:a}=await this.bam.read(ye.Buffer.alloc(i),0,n,0,r);if(!o)throw new Error("Error reading refseqs from header");const s=await Kr(a.subarray(0,Math.min(o,n))),f=s.readInt32LE(t);let l=t+4;const u={},c=[];for(let h=0;h<f;h+=1){const d=s.readInt32LE(l),p=this.renameRefSeq(s.toString("utf8",l+4,l+4+d-1)),b=s.readInt32LE(l+d+4);if(u[p]=h,c.push({refName:p,length:b}),l=l+8+d,l>s.length)return console.warn(`BAM header is very big. Re-fetching ${n} bytes.`),this._readRefSeqs(t,n*2,r)}return{chrToIndex:u,indexToChr:c}}async getRecordsForRange(t,n,r,i){return qN(this.streamRecordsForRange(t,n,r,i))}async*streamRecordsForRange(t,n,r,i){var o;await this.getHeader(i);const a=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(a===void 0||!this.index)yield[];else{const s=await this.index.blocksForRange(a,n-1,r,i);yield*this._fetchChunkFeatures(s,a,n,r,i)}}async*_fetchChunkFeatures(t,n,r,i,o={}){const{viewAsPairs:a}=o,s=[];let f=!1;for(const l of t){const u=await this.featureCache.get(l.toString(),{chunk:l,opts:o},o.signal),c=[];for(const h of u)if(h.seq_id()===n)if(h.get("start")>=i){f=!0;break}else h.get("end")>=r&&c.push(h);if(s.push(c),yield c,f)break}DN(o.signal),a&&(yield this.fetchPairs(n,s,o))}async fetchPairs(t,n,r){const{pairAcrossChr:i,maxInsertSize:o=2e5}=r,a={},s={};n.map(h=>{const d={};for(const p of h){const b=p.name(),y=p.id();d[b]||(d[b]=0),d[b]++,s[y]=1}for(const[p,b]of Object.entries(d))b===1&&(a[p]=!0)});const f=[];n.map(h=>{for(const d of h){const p=d.name(),b=d.get("start"),y=d._next_pos(),w=d._next_refid();this.index&&a[p]&&(i||w===t&&Math.abs(b-y)<o)&&f.push(this.index.blocksForRange(w,y,y+1,r))}});const l=new Map,u=await Promise.all(f);for(const h of u.flat())l.has(h.toString())||l.set(h.toString(),h);return(await Promise.all([...l.values()].map(async h=>{const{data:d,cpositions:p,dpositions:b,chunk:y}=await this._readChunk({chunk:h,opts:r}),w=[];for(const S of await this.readBamFeatures(d,p,b,y))a[S.get("name")]&&!s[S.id()]&&w.push(S);return w}))).flat()}async _readRegion(t,n,r={}){const{bytesRead:i,buffer:o}=await this.bam.read(ye.Buffer.alloc(n),0,n,t,r);return o.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:o,dpositions:a}=await jv(r,t);return{data:i,cpositions:o,dpositions:a,chunk:t}}async readBamFeatures(t,n,r,i){let o=0;const a=[];let s=0,f=+Date.now();for(;o+4<t.length;){const l=t.readInt32LE(o),u=o+4+l-1;if(r){for(;o+i.minv.dataPosition>=r[s++];);s--}if(u<t.length){const c=new w3({bytes:{byteArray:t,start:o,end:u},fileOffset:n.length>0?n[s]*256+(o-r[s])+i.minv.dataPosition+1:GN.signed(t.slice(o,u))});a.push(c),this.yieldThreadTime&&+Date.now()-f>this.yieldThreadTime&&(await kN(1),f=+Date.now())}o=u+1}return a}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 o=(i=this.chrToIndex)===null||i===void 0?void 0:i[t];return o===void 0?[]:this.index.indexCov(o,n,r)}async blocksForRange(t,n,r,i){var o;if(!this.index)return[];await this.index.parse();const a=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];return a===void 0?[]:this.index.blocksForRange(a,n,r,i)}}async function _3(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:o}=r;if(i.startsWith("data:"))return ye.Buffer.from(i.split(",")[1],"base64");{const{referer:a,...s}=o,f=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...s}});if(!f.ok)throw new Error(`HTTP ${f.status} fetching ${i}: ${await f.text()}`);return ye.Buffer.from(await f.arrayBuffer())}}));return ye.Buffer.concat(await Promise.all(n.map(r=>Kr(r))))}class WN extends E3{constructor(t){super({htsget:!0}),this.baseUrl=t.baseUrl,this.trackId=t.trackId}async*streamRecordsForRange(t,n,r,i){var o;const s=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${t}&start=${n}&end=${r}&format=BAM`,f=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(f===void 0)yield[];else{const l=await fetch(s,{...i});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${s}: ${await l.text()}`);const u=await l.json(),c=await _3(u.htsget.urls.slice(1),i);yield*this._fetchChunkFeatures([{buffer:c,_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}`}}],f,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(),o=await _3(i.htsget.urls,t);if(o.readInt32LE(0)!==x3)throw new Error("Not a BAM file");const a=o.readInt32LE(4),s=o.toString("utf8",8,8+a),f=v3(s),l=[],u={},c=f.filter(h=>h.tag==="SQ");for(const[h,d]of c.entries()){let p="",b=0;for(const y of d.data)y.tag==="SN"?p=y.value:y.tag==="LN"&&(b=+y.value);u[p]=h,l[h]={refName:p,length:b}}return this.chrToIndex=u,this.indexToChr=l,f}}const YN=Object.freeze(Object.defineProperty({__proto__:null,BAI:ba,BamFile:E3,BamRecord:w3,CSI:pc,HtsgetFile:WN},Symbol.toStringTag,{value:"Module"}));function S3(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class QN extends Error{}function uo(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new QN("aborted");throw t.code="ERR_ABORTED",t}}}function XN(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function C3(e,t){const n=[];let r=null;return e.length===0?e:(e.sort(function(i,o){const a=i.minv.blockPosition-o.minv.blockPosition;return a!==0?a:i.minv.dataPosition-o.minv.dataPosition}),e.forEach(i=>{(!t||i.maxv.compareTo(t)>0)&&(r===null?(n.push(i),r=i):XN(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class Up{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 ya(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Up(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 gc{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 I3{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={}){return!!((await this.parse(n)).indices[t]||{}).binIndex}}const $N=21578324,T3=14;function KN(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 mc extends I3{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:a}=r.indices[i];return a?a.lineCount:-1}async _parse(t={}){const n=await this.filehandle.readFile(t),r=await Kr(n);if(uo(t.signal),r.readUInt32LE(0)!==$N)throw new Error("Not a TBI file");const i=r.readInt32LE(4),o=r.readInt32LE(8),a=o&65536?"zero-based-half-open":"1-based-closed",f={0:"generic",1:"SAM",2:"VCF"}[o&15];if(!f)throw new Error(`invalid Tabix preset format flags ${o}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},u=r.readInt32LE(24),c=5,h=((1<<(c+1)*3)-1)/7,d=2**(14+c*3),p=u?String.fromCharCode(u):null,b=r.readInt32LE(28),y=r.readInt32LE(32),{refNameToId:w,refIdToName:S}=this._parseNameBytes(r.slice(36,36+y));let C=36+y,_;return{indices:new Array(i).fill(0).map(()=>{const B=r.readInt32LE(C);C+=4;const T={};let R;for(let O=0;O<B;O+=1){const ne=r.readUInt32LE(C);if(C+=4,ne>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(ne===h+1){const ae=r.readInt32LE(C);C+=4,ae===2&&(R=this.parsePseudoBin(r,C)),C+=16*ae}else{const ae=r.readInt32LE(C);C+=4;const pe=new Array(ae);for(let ke=0;ke<ae;ke+=1){const Xe=ya(r,C),De=ya(r,C+8);C+=16,_=this._findFirstData(_,Xe),pe[ke]=new gc(Xe,De,ne)}T[ne]=pe}}const M=r.readInt32LE(C);C+=4;const j=new Array(M);for(let O=0;O<M;O+=1)j[O]=ya(r,C),C+=8,_=this._findFirstData(_,j[O]);return{binIndex:T,linearIndex:j,stats:R}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:b,firstDataLine:_,columnNumbers:l,coordinateType:a,format:f,refIdToName:S,refNameToId:w,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:S3(Uu.fromBytesLE(t.slice(n+16,n+24),!0))}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let a=0;a<t.length;a+=1)if(!t[a]){if(r<a){let s=t.toString("utf8",r,a);s=this.renameRefSeq(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const a=o.refNameToId[t],s=o.indices[a];if(!s)return[];(s.linearIndex.length?s.linearIndex[n>>T3>=s.linearIndex.length?s.linearIndex.length-1:n>>T3]:new Up(0,0))||console.warn("querying outside of possible tabix range");const l=KN(n,r),u=[];for(const[b,y]of l)for(let w=b;w<=y;w++)if(s.binIndex[w]){const S=s.binIndex[w];for(let C=0;C<S.length;++C)u.push(new gc(S[C].minv,S[C].maxv,w))}const c=s.linearIndex.length;let h=null;const d=Math.min(n>>14,c-1),p=Math.min(r>>14,c-1);for(let b=d;b<=p;++b){const y=s.linearIndex[b];y&&(!h||y.compareTo(h)<0)&&(h=y)}return C3(u,h)}}const JN=21582659,eO=38359875;function tO(e,t){return e*2**t}function k3(e,t){return Math.floor(e/2**t)}class Gp extends I3{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:a}=r.indices[i];return a?a.lineCount:-1}async 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",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),f=s?String.fromCharCode(s):null,l=t.readInt32LE(n+20),u=t.readInt32LE(n+24),{refIdToName:c,refNameToId:h}=this._parseNameBytes(t.slice(n+28,n+28+u));return{refIdToName:c,refNameToId:h,skipLines:l,metaChar:f,columnNumbers:a,format:o,coordinateType:i}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let a=0;a<t.length;a+=1)if(!t[a]){if(r<a){let s=t.toString("utf8",r,a);s=this.renameRefSeq(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}async _parse(t={}){const n=await Kr(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===JN)r=1;else if(n.readUInt32LE(0)===eO)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),o=n.readInt32LE(12),a=o&&o>=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+o);let f,l=16+o+4;const u=new Array(s).fill(0).map(()=>{const c=n.readInt32LE(l);l+=4;const h={};let d;for(let p=0;p<c;p+=1){const b=n.readUInt32LE(l);if(b>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=4+8+4+16+16;else{const y=ya(n,l+4);f=this._findFirstData(f,y);const w=n.readInt32LE(l+12);l+=16;const S=new Array(w);for(let C=0;C<w;C+=1){const _=ya(n,l),k=ya(n,l+8);l+=16,S[C]=new gc(_,k,b)}h[b]=S}}return{binIndex:h,stats:d}});return{...a,csi:!0,refCount:s,maxBlockSize:65536,firstDataLine:f,csiVersion:r,indices:u,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:S3(Uu.fromBytesLE(t.slice(n+28,n+36),!0))}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const a=o.refNameToId[t],s=o.indices[a];if(!s)return[];const f=this.reg2bins(n,r),l=[];for(const[u,c]of f)for(let h=u;h<=c;h++)if(s.binIndex[h]){const d=s.binIndex[h];for(let p=0;p<d.length;++p)l.push(new gc(d[p].minv,d[p].maxv,h))}return C3(l,new Up(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,o=this.minShift+this.depth*3;const a=[];for(;r<=this.depth;o-=3,i+=tO(1,r*3),r+=1){const s=i+k3(t,o),f=i+k3(n,o);if(f-s+a.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`);a.push([s,f])}return a}}const Hp=typeof TextDecoder<"u"?new TextDecoder("utf-8"):void 0;function nO(e){return new Promise(t=>setTimeout(t,e))}class rO{constructor({path:t,filehandle:n,tbiPath:r,tbiFilehandle:i,csiPath:o,csiFilehandle:a,yieldTime:s=500,chunkSizeLimit:f=5e7,renameRefSeqs:l=c=>c,chunkCacheSize:u=5*2**20}){if(n)this.filehandle=n;else if(t)this.filehandle=new ct(t);else throw new TypeError("must provide either filehandle or path");if(i)this.index=new mc({filehandle:i,renameRefSeqs:l});else if(a)this.index=new Gp({filehandle:a,renameRefSeqs:l});else if(r)this.index=new mc({filehandle:new ct(r),renameRefSeqs:l});else if(o)this.index=new Gp({filehandle:new ct(o),renameRefSeqs:l});else if(t)this.index=new mc({filehandle:new ct(`${t}.tbi`),renameRefSeqs:l});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, or csiPath");this.chunkSizeLimit=f,this.renameRefSeq=l,this.yieldTime=s,this.chunkCache=new Yu({cache:new Qu({maxSize:Math.floor(u/65536)}),fill:(c,h)=>this.readChunk(c,{signal:h})})}async getLines(t,n,r,i){let o,a={},s;if(typeof i>"u")throw new TypeError("line callback must be provided");if(typeof i=="function"?s=i:(a=i,s=i.lineCallback),t===void 0)throw new TypeError("must provide a reference sequence name");if(!s)throw new TypeError("line callback must be provided");const f=await this.index.getMetadata(a);if(uo(o),n||(n=0),r||(r=f.maxRefLength),!(n<=r))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(n===r)return;const l=await this.index.blocksForRange(t,n,r,a);uo(o);for(let c=0;c<l.length;c+=1){const h=l[c].fetchedSize();if(h>this.chunkSizeLimit)throw new Error(`Too much data. Chunk size ${h.toLocaleString()} bytes exceeds chunkSizeLimit of ${this.chunkSizeLimit.toLocaleString()}.`)}let u=Date.now();for(let c=0;c<l.length;c+=1){let h;const d=l[c],{buffer:p,cpositions:b,dpositions:y}=await this.chunkCache.get(d.toString(),d);uo(o);let w=0,S=0;for(;w<p.length;){const C=p.indexOf(`
|
|
449
|
-
`,w);if(C===-1)break;const
|
|
450
|
-
`.charCodeAt(0),l=r.charCodeAt(0);for(let u=0;u<a.length&&!(u===s+1&&a[u]!==l);u+=1)a[u]===f&&(s=u);a=a.slice(0,s+1)}return a}async getHeader(t={}){return(await this.getHeaderBuffer(t)).toString("utf8")}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,n,r,i,o){const{columnNumbers:a,metaChar:s,coordinateType:f,format:l}=t;if(o.charAt(0)===s)return{overlaps:!1};let{ref:u,start:c,end:h}=a;u||(u=0),c||(c=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(u,c,h);let p=1,b=0,y="",w=-1/0;for(let S=0;S<o.length+1;S+=1)if(o[S]===" "||S===o.length){if(p===u){if(this.renameRefSeq(o.slice(b,S))!==n)return{overlaps:!1}}else if(p===c){if(w=parseInt(o.slice(b,S),10),f==="1-based-closed"&&(w-=1),w>=i)return{startCoordinate:w,overlaps:!1};if((h===0||h===c)&&w+1<=r)return{startCoordinate:w,overlaps:!1}}else if(l==="VCF"&&p===4)y=o.slice(b,S);else if(p===h){let C;if(l==="VCF"?C=this._getVcfEnd(w,y,o.slice(b,S)):C=parseInt(o.slice(b,S),10),C<=r)return{overlaps:!1}}if(b=S+1,p+=1,p>d)break}return{startCoordinate:w,overlaps:!0}}_getVcfEnd(t,n,r){let i=t+n.length;const o=r.indexOf("SVTYPE=TRA")!==-1;if(r[0]!=="."&&!o){let a=";";for(let s=0;s<r.length;s+=1){if(a===";"&&r.slice(s,s+4)==="END="){let f=r.indexOf(";",s);f===-1&&(f=r.length),i=parseInt(r.slice(s+4,f),10);break}a=r[s]}}else if(o)return t+1;return i}async lineCount(t,n={}){return this.index.lineCount(t,n)}async _readRegion(t,n,r={}){const i=Buffer.alloc(n),{bytesRead:o,buffer:a}=await this.filehandle.read(i,0,n,t,r);return a.slice(0,o)}async readChunk(t,n={}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n);try{return jv(r,t)}catch(i){throw new Error(`error decompressing c ${t.toString()} ${i}`)}}}const iO=Object.freeze(Object.defineProperty({__proto__:null,CSI:Gp,TBI:mc,TabixIndexedFile:rO},Symbol.toStringTag,{value:"Module"}));var Vp={exports:{}},wa=typeof Reflect=="object"?Reflect:null,B3=wa&&typeof wa.apply=="function"?wa.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},bc;wa&&typeof wa.ownKeys=="function"?bc=wa.ownKeys:Object.getOwnPropertySymbols?bc=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:bc=function(t){return Object.getOwnPropertyNames(t)};function oO(e){console&&console.warn&&console.warn(e)}var D3=Number.isNaN||function(t){return t!==t};function Be(){Be.init.call(this)}Vp.exports=Be,Vp.exports.once=fO,Be.EventEmitter=Be,Be.prototype._events=void 0,Be.prototype._eventsCount=0,Be.prototype._maxListeners=void 0;var F3=10;function yc(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Be,"defaultMaxListeners",{enumerable:!0,get:function(){return F3},set:function(e){if(typeof e!="number"||e<0||D3(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");F3=e}}),Be.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},Be.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||D3(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 R3(e){return e._maxListeners===void 0?Be.defaultMaxListeners:e._maxListeners}Be.prototype.getMaxListeners=function(){return R3(this)},Be.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=t==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var a;if(n.length>0&&(a=n[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var f=o[t];if(f===void 0)return!1;if(typeof f=="function")B3(f,this,n);else for(var l=f.length,u=O3(f,l),r=0;r<l;++r)B3(u[r],this,n);return!0};function P3(e,t,n,r){var i,o,a;if(yc(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),a===void 0)a=o[t]=n,++e._eventsCount;else if(typeof a=="function"?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),i=R3(e),i>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,oO(s)}return e}Be.prototype.addListener=function(t,n){return P3(this,t,n,!1)},Be.prototype.on=Be.prototype.addListener,Be.prototype.prependListener=function(t,n){return P3(this,t,n,!0)};function aO(){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 M3(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=aO.bind(r);return i.listener=n,r.wrapFn=i,i}Be.prototype.once=function(t,n){return yc(n),this.on(t,M3(this,t,n)),this},Be.prototype.prependOnceListener=function(t,n){return yc(n),this.prependListener(t,M3(this,t,n)),this},Be.prototype.removeListener=function(t,n){var r,i,o,a,s;if(yc(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(o=-1,a=r.length-1;a>=0;a--)if(r[a]===n||r[a].listener===n){s=r[a].listener,o=a;break}if(o<0)return this;o===0?r.shift():sO(r,o),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this},Be.prototype.off=Be.prototype.removeListener,Be.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 o=Object.keys(r),a;for(i=0;i<o.length;++i)a=o[i],a!=="removeListener"&&this.removeAllListeners(a);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 L3(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?lO(i):O3(i,i.length)}Be.prototype.listeners=function(t){return L3(this,t,!0)},Be.prototype.rawListeners=function(t){return L3(this,t,!1)},Be.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):N3.call(e,t)},Be.prototype.listenerCount=N3;function N3(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}Be.prototype.eventNames=function(){return this._eventsCount>0?bc(this._events):[]};function O3(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function sO(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function lO(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function fO(e,t){return new Promise(function(n,r){function i(a){e.removeListener(t,o),r(a)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",i),n([].slice.call(arguments))}z3(e,t,o,{once:!0}),t!=="error"&&uO(e,i,{once:!0})})}function uO(e,t,n){typeof e.on=="function"&&z3(e,"error",t,n)}function z3(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(o){r.once&&e.removeEventListener(t,i),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var jp=Vp.exports,qp={exports:{}};typeof Object.create=="function"?qp.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:qp.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 va=qp.exports,Zp,U3;function G3(){return U3||(U3=1,Zp=jp.EventEmitter),Zp}const H3=EF(FF);var Wp,V3;function cO(){if(V3)return Wp;V3=1;function e(p,b){var y=Object.keys(p);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(p);b&&(w=w.filter(function(S){return Object.getOwnPropertyDescriptor(p,S).enumerable})),y.push.apply(y,w)}return y}function t(p){for(var b=1;b<arguments.length;b++){var y=arguments[b]!=null?arguments[b]:{};b%2?e(Object(y),!0).forEach(function(w){n(p,w,y[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(w){Object.defineProperty(p,w,Object.getOwnPropertyDescriptor(y,w))})}return p}function n(p,b,y){return b=a(b),b in p?Object.defineProperty(p,b,{value:y,enumerable:!0,configurable:!0,writable:!0}):p[b]=y,p}function r(p,b){if(!(p instanceof b))throw new TypeError("Cannot call a class as a function")}function i(p,b){for(var y=0;y<b.length;y++){var w=b[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(p,a(w.key),w)}}function o(p,b,y){return b&&i(p.prototype,b),y&&i(p,y),Object.defineProperty(p,"prototype",{writable:!1}),p}function a(p){var b=s(p,"string");return typeof b=="symbol"?b:String(b)}function s(p,b){if(typeof p!="object"||p===null)return p;var y=p[Symbol.toPrimitive];if(y!==void 0){var w=y.call(p,b||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(p)}var f=ye,l=f.Buffer,u=H3,c=u.inspect,h=c&&c.custom||"inspect";function d(p,b,y){l.prototype.copy.call(p,b,y)}return Wp=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return o(p,[{key:"push",value:function(y){var w={data:y,next:null};this.length>0?this.tail.next=w:this.head=w,this.tail=w,++this.length}},{key:"unshift",value:function(y){var w={data:y,next:this.head};this.length===0&&(this.tail=w),this.head=w,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var w=this.head,S=""+w.data;w=w.next;)S+=y+w.data;return S}},{key:"concat",value:function(y){if(this.length===0)return l.alloc(0);for(var w=l.allocUnsafe(y>>>0),S=this.head,C=0;S;)d(S.data,w,C),C+=S.data.length,S=S.next;return w}},{key:"consume",value:function(y,w){var S;return y<this.head.data.length?(S=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?S=this.shift():S=w?this._getString(y):this._getBuffer(y),S}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var w=this.head,S=1,C=w.data;for(y-=C.length;w=w.next;){var _=w.data,k=y>_.length?_.length:y;if(k===_.length?C+=_:C+=_.slice(0,y),y-=k,y===0){k===_.length?(++S,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=_.slice(k));break}++S}return this.length-=S,C}},{key:"_getBuffer",value:function(y){var w=l.allocUnsafe(y),S=this.head,C=1;for(S.data.copy(w),y-=S.data.length;S=S.next;){var _=S.data,k=y>_.length?_.length:y;if(_.copy(w,w.length-y,0,k),y-=k,y===0){k===_.length?(++C,S.next?this.head=S.next:this.head=this.tail=null):(this.head=S,S.data=_.slice(k));break}++C}return this.length-=C,w}},{key:h,value:function(y,w){return c(this,t(t({},w),{},{depth:0,customInspect:!1}))}}]),p}(),Wp}var Yp,j3;function q3(){if(j3)return Yp;j3=1;function e(a,s){var f=this,l=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return l||u?(s?s(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,a)):process.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(c){!s&&c?f._writableState?f._writableState.errorEmitted?process.nextTick(n,f):(f._writableState.errorEmitted=!0,process.nextTick(t,f,c)):process.nextTick(t,f,c):s?(process.nextTick(n,f),s(c)):process.nextTick(n,f)}),this)}function t(a,s){i(a,s),n(a)}function n(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.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(a,s){a.emit("error",s)}function o(a,s){var f=a._readableState,l=a._writableState;f&&f.autoDestroy||l&&l.autoDestroy?a.destroy(s):a.emit("error",s)}return Yp={destroy:e,undestroy:r,errorOrDestroy:o},Yp}var Qp={},Z3;function xa(){if(Z3)return Qp;Z3=1;function e(s,f){s.prototype=Object.create(f.prototype),s.prototype.constructor=s,s.__proto__=f}var t={};function n(s,f,l){l||(l=Error);function u(h,d,p){return typeof f=="string"?f:f(h,d,p)}var c=function(h){e(d,h);function d(p,b,y){return h.call(this,u(p,b,y))||this}return d}(l);c.prototype.name=l.name,c.prototype.code=s,t[s]=c}function r(s,f){if(Array.isArray(s)){var l=s.length;return s=s.map(function(u){return String(u)}),l>2?"one of ".concat(f," ").concat(s.slice(0,l-1).join(", "),", or ")+s[l-1]:l===2?"one of ".concat(f," ").concat(s[0]," or ").concat(s[1]):"of ".concat(f," ").concat(s[0])}else return"of ".concat(f," ").concat(String(s))}function i(s,f,l){return s.substr(!l||l<0?0:+l,f.length)===f}function o(s,f,l){return(l===void 0||l>s.length)&&(l=s.length),s.substring(l-f.length,l)===f}function a(s,f,l){return typeof l!="number"&&(l=0),l+f.length>s.length?!1:s.indexOf(f,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,f){return'The value "'+f+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,f,l){var u;typeof f=="string"&&i(f,"not ")?(u="must not be",f=f.replace(/^not /,"")):u="must be";var c;if(o(s," argument"))c="The ".concat(s," ").concat(u," ").concat(r(f,"type"));else{var h=a(s,".")?"property":"argument";c='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(f,"type"))}return c+=". Received type ".concat(typeof l),c},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"),Qp.codes=t,Qp}var Xp,W3;function Y3(){if(W3)return Xp;W3=1;var e=xa().codes.ERR_INVALID_OPT_VALUE;function t(r,i,o){return r.highWaterMark!=null?r.highWaterMark:i?r[o]:null}function n(r,i,o,a){var s=t(i,a,o);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var f=a?o:"highWaterMark";throw new e(f,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return Xp={getHighWaterMark:n},Xp}var $p,Q3;function hO(){if(Q3)return $p;Q3=1,$p=e;function e(n,r){if(t("noDeprecation"))return n;var i=!1;function o(){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 o}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 $p}var Kp,X3;function $3(){if(X3)return Kp;X3=1,Kp=R;function e(L){var P=this;this.next=null,this.entry=null,this.finish=function(){Ne(P,L)}}var t;R.WritableState=B;var n={deprecate:hO()},r=G3(),i=ye.Buffer,o=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(L){return i.from(L)}function s(L){return i.isBuffer(L)||L instanceof o}var f=q3(),l=Y3(),u=l.getHighWaterMark,c=xa().codes,h=c.ERR_INVALID_ARG_TYPE,d=c.ERR_METHOD_NOT_IMPLEMENTED,p=c.ERR_MULTIPLE_CALLBACK,b=c.ERR_STREAM_CANNOT_PIPE,y=c.ERR_STREAM_DESTROYED,w=c.ERR_STREAM_NULL_VALUES,S=c.ERR_STREAM_WRITE_AFTER_END,C=c.ERR_UNKNOWN_ENCODING,_=f.errorOrDestroy;va(R,r);function k(){}function B(L,P,q){t=t||Aa(),L=L||{},typeof q!="boolean"&&(q=P instanceof t),this.objectMode=!!L.objectMode,q&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=u(this,L,"writableHighWaterMark",q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var H=L.decodeStrings===!1;this.decodeStrings=!H,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(W){Xe(P,W)},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)}B.prototype.getBuffer=function(){for(var P=this.bufferedRequest,q=[];P;)q.push(P),P=P.next;return q},function(){try{Object.defineProperty(B.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(R,Symbol.hasInstance,{value:function(P){return T.call(this,P)?!0:this!==R?!1:P&&P._writableState instanceof B}})):T=function(P){return P instanceof this};function R(L){t=t||Aa();var P=this instanceof t;if(!P&&!T.call(R,this))return new R(L);this._writableState=new B(L,this,P),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)}R.prototype.pipe=function(){_(this,new b)};function M(L,P){var q=new S;_(L,q),process.nextTick(P,q)}function j(L,P,q,H){var W;return q===null?W=new w:typeof q!="string"&&!P.objectMode&&(W=new h("chunk",["string","Buffer"],q)),W?(_(L,W),process.nextTick(H,W),!1):!0}R.prototype.write=function(L,P,q){var H=this._writableState,W=!1,E=!H.objectMode&&s(L);return E&&!i.isBuffer(L)&&(L=a(L)),typeof P=="function"&&(q=P,P=null),E?P="buffer":P||(P=H.defaultEncoding),typeof q!="function"&&(q=k),H.ending?M(this,q):(E||j(this,H,L,q))&&(H.pendingcb++,W=ne(this,H,E,L,P,q)),W},R.prototype.cork=function(){this._writableState.corked++},R.prototype.uncork=function(){var L=this._writableState;L.corked&&(L.corked--,!L.writing&&!L.corked&&!L.bufferProcessing&&L.bufferedRequest&&qe(this,L))},R.prototype.setDefaultEncoding=function(P){if(typeof P=="string"&&(P=P.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((P+"").toLowerCase())>-1))throw new C(P);return this._writableState.defaultEncoding=P,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(L,P,q){return!L.objectMode&&L.decodeStrings!==!1&&typeof P=="string"&&(P=i.from(P,q)),P}Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ne(L,P,q,H,W,E){if(!q){var x=O(P,H,W);H!==x&&(q=!0,W="buffer",H=x)}var G=P.objectMode?1:H.length;P.length+=G;var Z=P.length<P.highWaterMark;if(Z||(P.needDrain=!0),P.writing||P.corked){var se=P.lastBufferedRequest;P.lastBufferedRequest={chunk:H,encoding:W,isBuf:q,callback:E,next:null},se?se.next=P.lastBufferedRequest:P.bufferedRequest=P.lastBufferedRequest,P.bufferedRequestCount+=1}else ae(L,P,!1,G,H,W,E);return Z}function ae(L,P,q,H,W,E,x){P.writelen=H,P.writecb=x,P.writing=!0,P.sync=!0,P.destroyed?P.onwrite(new y("write")):q?L._writev(W,P.onwrite):L._write(W,E,P.onwrite),P.sync=!1}function pe(L,P,q,H,W){--P.pendingcb,q?(process.nextTick(W,H),process.nextTick(dt,L,P),L._writableState.errorEmitted=!0,_(L,H)):(W(H),L._writableState.errorEmitted=!0,_(L,H),dt(L,P))}function ke(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}function Xe(L,P){var q=L._writableState,H=q.sync,W=q.writecb;if(typeof W!="function")throw new p;if(ke(q),P)pe(L,q,H,P,W);else{var E=Ke(q)||L.destroyed;!E&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&qe(L,q),H?process.nextTick(De,L,q,E,W):De(L,q,E,W)}}function De(L,P,q,H){q||$e(L,P),P.pendingcb--,H(),dt(L,P)}function $e(L,P){P.length===0&&P.needDrain&&(P.needDrain=!1,L.emit("drain"))}function qe(L,P){P.bufferProcessing=!0;var q=P.bufferedRequest;if(L._writev&&q&&q.next){var H=P.bufferedRequestCount,W=new Array(H),E=P.corkedRequestsFree;E.entry=q;for(var x=0,G=!0;q;)W[x]=q,q.isBuf||(G=!1),q=q.next,x+=1;W.allBuffers=G,ae(L,P,!0,P.length,W,"",E.finish),P.pendingcb++,P.lastBufferedRequest=null,E.next?(P.corkedRequestsFree=E.next,E.next=null):P.corkedRequestsFree=new e(P),P.bufferedRequestCount=0}else{for(;q;){var Z=q.chunk,se=q.encoding,J=q.callback,le=P.objectMode?1:Z.length;if(ae(L,P,!1,le,Z,se,J),q=q.next,P.bufferedRequestCount--,P.writing)break}q===null&&(P.lastBufferedRequest=null)}P.bufferedRequest=q,P.bufferProcessing=!1}R.prototype._write=function(L,P,q){q(new d("_write()"))},R.prototype._writev=null,R.prototype.end=function(L,P,q){var H=this._writableState;return typeof L=="function"?(q=L,L=null,P=null):typeof P=="function"&&(q=P,P=null),L!=null&&this.write(L,P),H.corked&&(H.corked=1,this.uncork()),H.ending||Ht(this,H,q),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ke(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function Ee(L,P){L._final(function(q){P.pendingcb--,q&&_(L,q),P.prefinished=!0,L.emit("prefinish"),dt(L,P)})}function _e(L,P){!P.prefinished&&!P.finalCalled&&(typeof L._final=="function"&&!P.destroyed?(P.pendingcb++,P.finalCalled=!0,process.nextTick(Ee,L,P)):(P.prefinished=!0,L.emit("prefinish")))}function dt(L,P){var q=Ke(P);if(q&&(_e(L,P),P.pendingcb===0&&(P.finished=!0,L.emit("finish"),P.autoDestroy))){var H=L._readableState;(!H||H.autoDestroy&&H.endEmitted)&&L.destroy()}return q}function Ht(L,P,q){P.ending=!0,dt(L,P),q&&(P.finished?process.nextTick(q):L.once("finish",q)),P.ended=!0,L.writable=!1}function Ne(L,P,q){var H=L.entry;for(L.entry=null;H;){var W=H.callback;P.pendingcb--,W(q),H=H.next}P.corkedRequestsFree.next=L}return Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(P){this._writableState&&(this._writableState.destroyed=P)}}),R.prototype.destroy=f.destroy,R.prototype._undestroy=f.undestroy,R.prototype._destroy=function(L,P){P(L)},Kp}var Jp,K3;function Aa(){if(K3)return Jp;K3=1;var e=Object.keys||function(l){var u=[];for(var c in l)u.push(c);return u};Jp=a;var t=iE(),n=$3();va(a,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var o=r[i];a.prototype[o]||(a.prototype[o]=n.prototype[o])}function a(l){if(!(this instanceof a))return new a(l);t.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(f,this)}function f(l){l.end()}return Object.defineProperty(a.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)}}),Jp}var eg={},tg={exports:{}};(function(e,t){var n=ye,r=n.Buffer;function i(a,s){for(var f in a)s[f]=a[f]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o);function o(a,s,f){return r(a,s,f)}i(r,o),o.from=function(a,s,f){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,s,f)},o.alloc=function(a,s,f){if(typeof a!="number")throw new TypeError("Argument must be a number");var l=r(a);return s!==void 0?typeof f=="string"?l.fill(s,f):l.fill(s):l.fill(0),l},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(a)}})(tg,tg.exports);var dO=tg.exports,ng=dO.Buffer,J3=ng.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 pO(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 gO(e){var t=pO(e);if(typeof t!="string"&&(ng.isEncoding===J3||!J3(e)))throw new Error("Unknown encoding: "+e);return t||e}var mO=eg.StringDecoder=Tl;function Tl(e){this.encoding=gO(e);var t;switch(this.encoding){case"utf16le":this.text=AO,this.end=EO,t=4;break;case"utf8":this.fillLast=wO,t=4;break;case"base64":this.text=_O,this.end=SO,t=3;break;default:this.write=CO,this.end=IO;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=ng.allocUnsafe(t)}Tl.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||""},Tl.prototype.end=xO,Tl.prototype.text=vO,Tl.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 rg(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function bO(e,t,n){var r=t.length-1;if(r<n)return 0;var i=rg(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=rg(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=rg(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function yO(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 wO(e){var t=this.lastTotal-this.lastNeed,n=yO(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 vO(e,t){var n=bO(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 xO(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function AO(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 EO(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 _O(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 SO(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function CO(e){return e.toString(this.encoding)}function IO(e){return e&&e.length?this.write(e):""}var ig,eE;function og(){if(eE)return ig;eE=1;var e=xa().codes.ERR_STREAM_PREMATURE_CLOSE;function t(o){var a=!1;return function(){if(!a){a=!0;for(var s=arguments.length,f=new Array(s),l=0;l<s;l++)f[l]=arguments[l];o.apply(this,f)}}}function n(){}function r(o){return o.setHeader&&typeof o.abort=="function"}function i(o,a,s){if(typeof a=="function")return i(o,null,a);a||(a={}),s=t(s||n);var f=a.readable||a.readable!==!1&&o.readable,l=a.writable||a.writable!==!1&&o.writable,u=function(){o.writable||h()},c=o._writableState&&o._writableState.finished,h=function(){l=!1,c=!0,f||s.call(o)},d=o._readableState&&o._readableState.endEmitted,p=function(){f=!1,d=!0,l||s.call(o)},b=function(C){s.call(o,C)},y=function(){var C;if(f&&!d)return(!o._readableState||!o._readableState.ended)&&(C=new e),s.call(o,C);if(l&&!c)return(!o._writableState||!o._writableState.ended)&&(C=new e),s.call(o,C)},w=function(){o.req.on("finish",h)};return r(o)?(o.on("complete",h),o.on("abort",y),o.req?w():o.on("request",w)):l&&!o._writableState&&(o.on("end",u),o.on("close",u)),o.on("end",p),o.on("finish",h),a.error!==!1&&o.on("error",b),o.on("close",y),function(){o.removeListener("complete",h),o.removeListener("abort",y),o.removeListener("request",w),o.req&&o.req.removeListener("finish",h),o.removeListener("end",u),o.removeListener("close",u),o.removeListener("finish",h),o.removeListener("end",p),o.removeListener("error",b),o.removeListener("close",y)}}return ig=i,ig}var ag,tE;function TO(){if(tE)return ag;tE=1;var e;function t(C,_,k){return _=n(_),_ in C?Object.defineProperty(C,_,{value:k,enumerable:!0,configurable:!0,writable:!0}):C[_]=k,C}function n(C){var _=r(C,"string");return typeof _=="symbol"?_:String(_)}function r(C,_){if(typeof C!="object"||C===null)return C;var k=C[Symbol.toPrimitive];if(k!==void 0){var B=k.call(C,_||"default");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_==="string"?String:Number)(C)}var i=og(),o=Symbol("lastResolve"),a=Symbol("lastReject"),s=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),c=Symbol("stream");function h(C,_){return{value:C,done:_}}function d(C){var _=C[o];if(_!==null){var k=C[c].read();k!==null&&(C[l]=null,C[o]=null,C[a]=null,_(h(k,!1)))}}function p(C){process.nextTick(d,C)}function b(C,_){return function(k,B){C.then(function(){if(_[f]){k(h(void 0,!0));return}_[u](k,B)},B)}}var y=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((e={get stream(){return this[c]},next:function(){var _=this,k=this[s];if(k!==null)return Promise.reject(k);if(this[f])return Promise.resolve(h(void 0,!0));if(this[c].destroyed)return new Promise(function(M,j){process.nextTick(function(){_[s]?j(_[s]):M(h(void 0,!0))})});var B=this[l],T;if(B)T=new Promise(b(B,this));else{var R=this[c].read();if(R!==null)return Promise.resolve(h(R,!1));T=new Promise(this[u])}return this[l]=T,T}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var _=this;return new Promise(function(k,B){_[c].destroy(null,function(T){if(T){B(T);return}k(h(void 0,!0))})})}),e),y),S=function(_){var k,B=Object.create(w,(k={},t(k,c,{value:_,writable:!0}),t(k,o,{value:null,writable:!0}),t(k,a,{value:null,writable:!0}),t(k,s,{value:null,writable:!0}),t(k,f,{value:_._readableState.endEmitted,writable:!0}),t(k,u,{value:function(R,M){var j=B[c].read();j?(B[l]=null,B[o]=null,B[a]=null,R(h(j,!1))):(B[o]=R,B[a]=M)},writable:!0}),k));return B[l]=null,i(_,function(T){if(T&&T.code!=="ERR_STREAM_PREMATURE_CLOSE"){var R=B[a];R!==null&&(B[l]=null,B[o]=null,B[a]=null,R(T)),B[s]=T;return}var M=B[o];M!==null&&(B[l]=null,B[o]=null,B[a]=null,M(h(void 0,!0))),B[f]=!0}),_.on("readable",p.bind(null,B)),B};return ag=S,ag}var sg,nE;function kO(){return nE||(nE=1,sg=function(){throw new Error("Readable.from is not available in the browser")}),sg}var lg,rE;function iE(){if(rE)return lg;rE=1,lg=M;var e;M.ReadableState=R,jp.EventEmitter;var t=function(x,G){return x.listeners(G).length},n=G3(),r=ye.Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(E){return r.from(E)}function a(E){return r.isBuffer(E)||E instanceof i}var s=H3,f;s&&s.debuglog?f=s.debuglog("stream"):f=function(){};var l=cO(),u=q3(),c=Y3(),h=c.getHighWaterMark,d=xa().codes,p=d.ERR_INVALID_ARG_TYPE,b=d.ERR_STREAM_PUSH_AFTER_EOF,y=d.ERR_METHOD_NOT_IMPLEMENTED,w=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,S,C,_;va(M,n);var k=u.errorOrDestroy,B=["error","close","destroy","pause","resume"];function T(E,x,G){if(typeof E.prependListener=="function")return E.prependListener(x,G);!E._events||!E._events[x]?E.on(x,G):Array.isArray(E._events[x])?E._events[x].unshift(G):E._events[x]=[G,E._events[x]]}function R(E,x,G){e=e||Aa(),E=E||{},typeof G!="boolean"&&(G=x instanceof e),this.objectMode=!!E.objectMode,G&&(this.objectMode=this.objectMode||!!E.readableObjectMode),this.highWaterMark=h(this,E,"readableHighWaterMark",G),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=E.emitClose!==!1,this.autoDestroy=!!E.autoDestroy,this.destroyed=!1,this.defaultEncoding=E.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,E.encoding&&(S||(S=eg.StringDecoder),this.decoder=new S(E.encoding),this.encoding=E.encoding)}function M(E){if(e=e||Aa(),!(this instanceof M))return new M(E);var x=this instanceof e;this._readableState=new R(E,this,x),this.readable=!0,E&&(typeof E.read=="function"&&(this._read=E.read),typeof E.destroy=="function"&&(this._destroy=E.destroy)),n.call(this)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(x){this._readableState&&(this._readableState.destroyed=x)}}),M.prototype.destroy=u.destroy,M.prototype._undestroy=u.undestroy,M.prototype._destroy=function(E,x){x(E)},M.prototype.push=function(E,x){var G=this._readableState,Z;return G.objectMode?Z=!0:typeof E=="string"&&(x=x||G.defaultEncoding,x!==G.encoding&&(E=r.from(E,x),x=""),Z=!0),j(this,E,x,!1,Z)},M.prototype.unshift=function(E){return j(this,E,null,!0,!1)};function j(E,x,G,Z,se){f("readableAddChunk",x);var J=E._readableState;if(x===null)J.reading=!1,Xe(E,J);else{var le;if(se||(le=ne(J,x)),le)k(E,le);else if(J.objectMode||x&&x.length>0)if(typeof x!="string"&&!J.objectMode&&Object.getPrototypeOf(x)!==r.prototype&&(x=o(x)),Z)J.endEmitted?k(E,new w):O(E,J,x,!0);else if(J.ended)k(E,new b);else{if(J.destroyed)return!1;J.reading=!1,J.decoder&&!G?(x=J.decoder.write(x),J.objectMode||x.length!==0?O(E,J,x,!1):qe(E,J)):O(E,J,x,!1)}else Z||(J.reading=!1,qe(E,J))}return!J.ended&&(J.length<J.highWaterMark||J.length===0)}function O(E,x,G,Z){x.flowing&&x.length===0&&!x.sync?(x.awaitDrain=0,E.emit("data",G)):(x.length+=x.objectMode?1:G.length,Z?x.buffer.unshift(G):x.buffer.push(G),x.needReadable&&De(E)),qe(E,x)}function ne(E,x){var G;return!a(x)&&typeof x!="string"&&x!==void 0&&!E.objectMode&&(G=new p("chunk",["string","Buffer","Uint8Array"],x)),G}M.prototype.isPaused=function(){return this._readableState.flowing===!1},M.prototype.setEncoding=function(E){S||(S=eg.StringDecoder);var x=new S(E);this._readableState.decoder=x,this._readableState.encoding=this._readableState.decoder.encoding;for(var G=this._readableState.buffer.head,Z="";G!==null;)Z+=x.write(G.data),G=G.next;return this._readableState.buffer.clear(),Z!==""&&this._readableState.buffer.push(Z),this._readableState.length=Z.length,this};var ae=1073741824;function pe(E){return E>=ae?E=ae:(E--,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E++),E}function ke(E,x){return E<=0||x.length===0&&x.ended?0:x.objectMode?1:E!==E?x.flowing&&x.length?x.buffer.head.data.length:x.length:(E>x.highWaterMark&&(x.highWaterMark=pe(E)),E<=x.length?E:x.ended?x.length:(x.needReadable=!0,0))}M.prototype.read=function(E){f("read",E),E=parseInt(E,10);var x=this._readableState,G=E;if(E!==0&&(x.emittedReadable=!1),E===0&&x.needReadable&&((x.highWaterMark!==0?x.length>=x.highWaterMark:x.length>0)||x.ended))return f("read: emitReadable",x.length,x.ended),x.length===0&&x.ended?q(this):De(this),null;if(E=ke(E,x),E===0&&x.ended)return x.length===0&&q(this),null;var Z=x.needReadable;f("need readable",Z),(x.length===0||x.length-E<x.highWaterMark)&&(Z=!0,f("length less than watermark",Z)),x.ended||x.reading?(Z=!1,f("reading or ended",Z)):Z&&(f("do read"),x.reading=!0,x.sync=!0,x.length===0&&(x.needReadable=!0),this._read(x.highWaterMark),x.sync=!1,x.reading||(E=ke(G,x)));var se;return E>0?se=P(E,x):se=null,se===null?(x.needReadable=x.length<=x.highWaterMark,E=0):(x.length-=E,x.awaitDrain=0),x.length===0&&(x.ended||(x.needReadable=!0),G!==E&&x.ended&&q(this)),se!==null&&this.emit("data",se),se};function Xe(E,x){if(f("onEofChunk"),!x.ended){if(x.decoder){var G=x.decoder.end();G&&G.length&&(x.buffer.push(G),x.length+=x.objectMode?1:G.length)}x.ended=!0,x.sync?De(E):(x.needReadable=!1,x.emittedReadable||(x.emittedReadable=!0,$e(E)))}}function De(E){var x=E._readableState;f("emitReadable",x.needReadable,x.emittedReadable),x.needReadable=!1,x.emittedReadable||(f("emitReadable",x.flowing),x.emittedReadable=!0,process.nextTick($e,E))}function $e(E){var x=E._readableState;f("emitReadable_",x.destroyed,x.length,x.ended),!x.destroyed&&(x.length||x.ended)&&(E.emit("readable"),x.emittedReadable=!1),x.needReadable=!x.flowing&&!x.ended&&x.length<=x.highWaterMark,L(E)}function qe(E,x){x.readingMore||(x.readingMore=!0,process.nextTick(Ke,E,x))}function Ke(E,x){for(;!x.reading&&!x.ended&&(x.length<x.highWaterMark||x.flowing&&x.length===0);){var G=x.length;if(f("maybeReadMore read 0"),E.read(0),G===x.length)break}x.readingMore=!1}M.prototype._read=function(E){k(this,new y("_read()"))},M.prototype.pipe=function(E,x){var G=this,Z=this._readableState;switch(Z.pipesCount){case 0:Z.pipes=E;break;case 1:Z.pipes=[Z.pipes,E];break;default:Z.pipes.push(E);break}Z.pipesCount+=1,f("pipe count=%d opts=%j",Z.pipesCount,x);var se=(!x||x.end!==!1)&&E!==process.stdout&&E!==process.stderr,J=se?Vt:Kn;Z.endEmitted?process.nextTick(J):G.once("end",J),E.on("unpipe",le);function le(v,g){f("onunpipe"),v===G&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,fi())}function Vt(){f("onend"),E.end()}var si=Ee(G);E.on("drain",si);var li=!1;function fi(){f("cleanup"),E.removeListener("close",ui),E.removeListener("finish",jt),E.removeListener("drain",si),E.removeListener("error",wr),E.removeListener("unpipe",le),G.removeListener("end",Vt),G.removeListener("end",Kn),G.removeListener("data",_t),li=!0,Z.awaitDrain&&(!E._writableState||E._writableState.needDrain)&&si()}G.on("data",_t);function _t(v){f("ondata");var g=E.write(v);f("dest.write",g),g===!1&&((Z.pipesCount===1&&Z.pipes===E||Z.pipesCount>1&&W(Z.pipes,E)!==-1)&&!li&&(f("false write response, pause",Z.awaitDrain),Z.awaitDrain++),G.pause())}function wr(v){f("onerror",v),Kn(),E.removeListener("error",wr),t(E,"error")===0&&k(E,v)}T(E,"error",wr);function ui(){E.removeListener("finish",jt),Kn()}E.once("close",ui);function jt(){f("onfinish"),E.removeListener("close",ui),Kn()}E.once("finish",jt);function Kn(){f("unpipe"),G.unpipe(E)}return E.emit("pipe",G),Z.flowing||(f("pipe resume"),G.resume()),E};function Ee(E){return function(){var G=E._readableState;f("pipeOnDrain",G.awaitDrain),G.awaitDrain&&G.awaitDrain--,G.awaitDrain===0&&t(E,"data")&&(G.flowing=!0,L(E))}}M.prototype.unpipe=function(E){var x=this._readableState,G={hasUnpiped:!1};if(x.pipesCount===0)return this;if(x.pipesCount===1)return E&&E!==x.pipes?this:(E||(E=x.pipes),x.pipes=null,x.pipesCount=0,x.flowing=!1,E&&E.emit("unpipe",this,G),this);if(!E){var Z=x.pipes,se=x.pipesCount;x.pipes=null,x.pipesCount=0,x.flowing=!1;for(var J=0;J<se;J++)Z[J].emit("unpipe",this,{hasUnpiped:!1});return this}var le=W(x.pipes,E);return le===-1?this:(x.pipes.splice(le,1),x.pipesCount-=1,x.pipesCount===1&&(x.pipes=x.pipes[0]),E.emit("unpipe",this,G),this)},M.prototype.on=function(E,x){var G=n.prototype.on.call(this,E,x),Z=this._readableState;return E==="data"?(Z.readableListening=this.listenerCount("readable")>0,Z.flowing!==!1&&this.resume()):E==="readable"&&!Z.endEmitted&&!Z.readableListening&&(Z.readableListening=Z.needReadable=!0,Z.flowing=!1,Z.emittedReadable=!1,f("on readable",Z.length,Z.reading),Z.length?De(this):Z.reading||process.nextTick(dt,this)),G},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(E,x){var G=n.prototype.removeListener.call(this,E,x);return E==="readable"&&process.nextTick(_e,this),G},M.prototype.removeAllListeners=function(E){var x=n.prototype.removeAllListeners.apply(this,arguments);return(E==="readable"||E===void 0)&&process.nextTick(_e,this),x};function _e(E){var x=E._readableState;x.readableListening=E.listenerCount("readable")>0,x.resumeScheduled&&!x.paused?x.flowing=!0:E.listenerCount("data")>0&&E.resume()}function dt(E){f("readable nexttick read 0"),E.read(0)}M.prototype.resume=function(){var E=this._readableState;return E.flowing||(f("resume"),E.flowing=!E.readableListening,Ht(this,E)),E.paused=!1,this};function Ht(E,x){x.resumeScheduled||(x.resumeScheduled=!0,process.nextTick(Ne,E,x))}function Ne(E,x){f("resume",x.reading),x.reading||E.read(0),x.resumeScheduled=!1,E.emit("resume"),L(E),x.flowing&&!x.reading&&E.read(0)}M.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function L(E){var x=E._readableState;for(f("flow",x.flowing);x.flowing&&E.read()!==null;);}M.prototype.wrap=function(E){var x=this,G=this._readableState,Z=!1;E.on("end",function(){if(f("wrapped end"),G.decoder&&!G.ended){var le=G.decoder.end();le&&le.length&&x.push(le)}x.push(null)}),E.on("data",function(le){if(f("wrapped data"),G.decoder&&(le=G.decoder.write(le)),!(G.objectMode&&le==null)&&!(!G.objectMode&&(!le||!le.length))){var Vt=x.push(le);Vt||(Z=!0,E.pause())}});for(var se in E)this[se]===void 0&&typeof E[se]=="function"&&(this[se]=function(Vt){return function(){return E[Vt].apply(E,arguments)}}(se));for(var J=0;J<B.length;J++)E.on(B[J],this.emit.bind(this,B[J]));return this._read=function(le){f("wrapped _read",le),Z&&(Z=!1,E.resume())},this},typeof Symbol=="function"&&(M.prototype[Symbol.asyncIterator]=function(){return C===void 0&&(C=TO()),C(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(x){this._readableState&&(this._readableState.flowing=x)}}),M._fromList=P,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function P(E,x){if(x.length===0)return null;var G;return x.objectMode?G=x.buffer.shift():!E||E>=x.length?(x.decoder?G=x.buffer.join(""):x.buffer.length===1?G=x.buffer.first():G=x.buffer.concat(x.length),x.buffer.clear()):G=x.buffer.consume(E,x.decoder),G}function q(E){var x=E._readableState;f("endReadable",x.endEmitted),x.endEmitted||(x.ended=!0,process.nextTick(H,x,E))}function H(E,x){if(f("endReadableNT",E.endEmitted,E.length),!E.endEmitted&&E.length===0&&(E.endEmitted=!0,x.readable=!1,x.emit("end"),E.autoDestroy)){var G=x._writableState;(!G||G.autoDestroy&&G.finished)&&x.destroy()}}typeof Symbol=="function"&&(M.from=function(E,x){return _===void 0&&(_=kO()),_(M,E,x)});function W(E,x){for(var G=0,Z=E.length;G<Z;G++)if(E[G]===x)return G;return-1}return lg}var fg,oE;function aE(){if(oE)return fg;oE=1,fg=s;var e=xa().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,o=Aa();va(s,o);function a(u,c){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,c!=null&&this.push(c),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);o.call(this,u),this._transformState={afterTransform:a.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",f)}function f(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(c,h){l(u,c,h)}):l(this,null,null)}s.prototype.push=function(u,c){return this._transformState.needTransform=!1,o.prototype.push.call(this,u,c)},s.prototype._transform=function(u,c,h){h(new t("_transform()"))},s.prototype._write=function(u,c,h){var d=this._transformState;if(d.writecb=h,d.writechunk=u,d.writeencoding=c,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},s.prototype._read=function(u){var c=this._transformState;c.writechunk!==null&&!c.transforming?(c.transforming=!0,this._transform(c.writechunk,c.writeencoding,c.afterTransform)):c.needTransform=!0},s.prototype._destroy=function(u,c){o.prototype._destroy.call(this,u,function(h){c(h)})};function l(u,c,h){if(c)return u.emit("error",c);if(h!=null&&u.push(h),u._writableState.length)throw new i;if(u._transformState.transforming)throw new r;return u.push(null)}return fg}var ug,sE;function BO(){if(sE)return ug;sE=1,ug=t;var e=aE();va(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)},ug}var cg,lE;function DO(){if(lE)return cg;lE=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=xa().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function o(h){if(h)throw h}function a(h){return h.setHeader&&typeof h.abort=="function"}function s(h,d,p,b){b=t(b);var y=!1;h.on("close",function(){y=!0}),e===void 0&&(e=og()),e(h,{readable:d,writable:p},function(S){if(S)return b(S);y=!0,b()});var w=!1;return function(S){if(!y&&!w){if(w=!0,a(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();b(S||new i("pipe"))}}}function f(h){h()}function l(h,d){return h.pipe(d)}function u(h){return!h.length||typeof h[h.length-1]!="function"?o:h.pop()}function c(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var b=u(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var y,w=d.map(function(S,C){var _=C<d.length-1,k=C>0;return s(S,_,k,function(B){y||(y=B),B&&w.forEach(f),!_&&(w.forEach(f),b(y))})});return d.reduce(l)}return cg=c,cg}var fE=pn,hg=jp.EventEmitter,FO=va;FO(pn,hg),pn.Readable=iE(),pn.Writable=$3(),pn.Duplex=Aa(),pn.Transform=aE(),pn.PassThrough=BO(),pn.finished=og(),pn.pipeline=DO(),pn.Stream=pn;function pn(){hg.call(this)}pn.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",a),n.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function f(u){if(l(),hg.listenerCount(this,"error")===0)throw u}n.on("error",f),e.on("error",f);function l(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",a),n.removeListener("close",s),n.removeListener("error",f),e.removeListener("error",f),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e};function kl(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function uE(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function Bl(e){return uE(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function pr(e){return uE(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function cE(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(o=>o.trim()).map(kl))}),t}function hE(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&kl(t[0]),source:t[1]&&kl(t[1]),type:t[2]&&kl(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:cE(t[8])}}function dE(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 o=r.split(/\s+/,3);return{...i,seq_id:o[0],start:o[1]&&o[1].replace(/\D/g,""),end:o[2]&&o[2].replace(/\D/g,"")}}else if(n==="genome-build"){const[o,a]=r.split(/\s+/,2);return{...i,source:o,buildName:a}}return i}function pE(e){const t=[];return Object.entries(e).forEach(([n,r])=>{if(!r)return;let i;r.hasOwnProperty("toString")?i=Bl(r.toString()):Array.isArray(r)?i=r.map(Bl).join(","):i=Bl(r),t.push(`${Bl(n)}=${i}`)}),t.length?t.join(";"):"."}function RO(e,t){const n=e.attributes===null||e.attributes===void 0?".":pE(e.attributes),i=`${[e.seq_id===null?".":pr(e.seq_id),e.source===null?".":pr(e.source),e.type===null?".":pr(e.type),e.start===null?".":pr(e.start),e.end===null?".":pr(e.end),e.score===null?".":pr(e.score),e.strand===null?".":pr(e.strand),e.phase===null?".":pr(e.phase),n].join(" ")}
|
|
451
|
-
`;return t[i]?"":(t[i]=!0,i)}function
|
|
452
|
-
`,t}function
|
|
453
|
-
`}function
|
|
441
|
+
)`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,_3.parse(t.trim())]));function qp(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 VN={".":0,"-":-1,"+":1};function jN(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 qN{constructor(t={}){if(t.autoSql)this.autoSql=qp(HN.parse(t.autoSql));else if(t.type){if(!jp[t.type])throw new Error("Type not found");this.autoSql=qp(jp[t.type])}else this.autoSql=qp(jp.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(t,n={}){const{autoSql:r}=this,{uniqueId:i}=n,o=Array.isArray(t)?t:t.split(" ");let a={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&jN(o))for(let s=0;s<r.fields.length;s++){const f=r.fields[s];let l=o[s];const{isNumeric:u,isArray:c,arrayIsNumeric:h,name:d}=f;if(l==null)break;if(l!=="."){if(u){const p=Number(l);l=Number.isNaN(p)?l:p}else c&&(l=l.split(","),l[l.length-1]===""&&l.pop(),h&&(l=l.map(p=>Number(p))));a[d]=l}}else{const s=["chrom","chromStart","chromEnd","name"];a=Object.fromEntries(o.map((f,l)=>[s[l]||"field"+l,f])),a.chromStart=+a.chromStart,a.chromEnd=+a.chromEnd,Number.isNaN(Number.parseFloat(a.field4))||(a.score=+a.field4,delete a.field4),(a.field5==="+"||a.field5==="-")&&(a.strand=a.field5,delete a.field5)}return i&&(a.uniqueId=i),a.strand=VN[a.strand]||0,a.chrom=decodeURIComponent(a.chrom),a}}const ZN=Object.freeze(Object.defineProperty({__proto__:null,default:qN},Symbol.toStringTag,{value:"Module"}));let S3=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 wa(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new S3(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 C3=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 WN(e){return new Promise(t=>setTimeout(t,e))}function YN(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}function QN(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 XN(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function $N(e={}){return"aborted"in e?{signal:e}:e}function k3(e,t){const n=[];let r;if(e.length===0)return e;e.sort((i,o)=>{const a=i.minv.blockPosition-o.minv.blockPosition;return a===0?i.minv.dataPosition-o.minv.dataPosition:a});for(const i of e)(!t||i.maxv.compareTo(t)>0)&&(r===void 0?(n.push(i),r=i):XN(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function I3(e,t){return{lineCount:YN(Qu.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function Ac(e,t){return e?e.compareTo(t)>0?t:e:t}function KN(e,t=n=>n){let n=0,r=0;const i=[],o={};for(let a=0;a<e.length;a+=1)if(!e[a]){if(r<a){let s=e.toString("utf8",r,a);s=t(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}let T3=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const JN=21578050;function eO(e,t){return e-e%t}function tO(e,t){return e-e%t+t}function nO(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 va extends T3{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)!==JN)throw new Error("Not a BAI file");const r=n.readInt32LE(4),o=((1<<(5+1)*3)-1)/7;let a=8,s;const f=new Array(r);for(let l=0;l<r;l++){const u=n.readInt32LE(a);let c;a+=4;const h={};for(let b=0;b<u;b+=1){const y=n.readUInt32LE(a);if(a+=4,y===o+1)a+=4,c=I3(n,a+16),a+=32;else{if(y>o+1)throw new Error("bai index contains too many bins, please use CSI");{const w=n.readInt32LE(a);a+=4;const _=new Array(w);for(let C=0;C<w;C++){const S=wa(n,a);a+=8;const T=wa(n,a);a+=8,s=Ac(s,S),_[C]=new C3(S,T,y)}h[y]=_}}}const d=n.readInt32LE(a);a+=4;const p=new Array(d);for(let b=0;b<d;b++){const y=wa(n,a);a+=8,s=Ac(s,y),p[b]=y}f[l]={binIndex:h,linearIndex:p,stats:c}}return{bai:!0,firstDataLine:s,maxBlockSize:65536,indices:f,refCount:r}}async indexCov(t,n,r,i={}){const a=n!==void 0,f=(await this.parse(i)).indices[t];if(!f)return[];const{linearIndex:l=[],stats:u}=f;if(l.length===0)return[];const c=r===void 0?(l.length-1)*16384:tO(r,16384),h=n===void 0?0:eO(n,16384),d=a?new Array((c-h)/16384):new Array(l.length-1),p=l[l.length-1].blockPosition;if(c>(l.length-1)*16384)throw new Error("query outside of range of linear index");let b=l[h/16384].blockPosition;for(let y=h/16384,w=0;y<c/16384;y++,w++)d[w]={score:l[y+1].blockPosition-b,start:y*16384,end:y*16384+16384},b=l[y+1].blockPosition;return d.map(y=>({...y,score:y.score*((u==null?void 0:u.lineCount)||0)/p}))}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const a=o.indices[t];if(!a)return[];const s=nO(n,r),f=[];for(const[d,p]of s)for(let b=d;b<=p;b++)if(a.binIndex[b]){const y=a.binIndex[b];for(const w of y)f.push(w)}const l=a.linearIndex.length;let u;const c=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=c;d<=h;++d){const p=a.linearIndex[d];p&&(!u||p.compareTo(u)<0)&&(u=p)}return k3(f,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 oi=ye.Buffer,Zp=[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"&&(Zp=new Int32Array(Zp));function B3(e){if(oi.isBuffer(e))return e;var t=typeof oi.alloc=="function"&&typeof oi.from=="function";if(typeof e=="number")return t?oi.alloc(e):new oi(e);if(typeof e=="string")return t?oi.from(e):new oi(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function rO(e){var t=B3(4);return t.writeInt32BE(e,0),t}function Wp(e,t){e=B3(e),oi.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=~~t^-1,r=0;r<e.length;r++)n=Zp[(n^e[r])&255]^n>>>8;return n^-1}function Yp(){return rO(Wp.apply(null,arguments))}Yp.signed=function(){return Wp.apply(null,arguments)},Yp.unsigned=function(){return Wp.apply(null,arguments)>>>0};var iO=Yp;const oO=Ws(iO),aO=21582659,sO=38359875;function lO(e,t){return e*2**t}function D3(e,t){return Math.floor(e/2**t)}let Ec=class extends T3{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",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),f=s?String.fromCharCode(s):"",l=t.readInt32LE(n+20),u=t.readInt32LE(n+24);return{columnNumbers:a,coordinateType:i,metaValue:s,metaChar:f,skipLines:l,format:o,formatFlags:r,...KN(t.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await $r(n);let i;if(r.readUInt32LE(0)===aO)i=1;else if(r.readUInt32LE(0)===sO)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 o=r.readInt32LE(12),a=o>=30?this.parseAuxData(r,16):void 0,s=r.readInt32LE(16+o);let f=16+o+4,l;const u=new Array(s);for(let c=0;c<s;c++){const h=r.readInt32LE(f);f+=4;const d={};let p;for(let b=0;b<h;b++){const y=r.readUInt32LE(f);if(f+=4,y>this.maxBinNumber)p=I3(r,f+28),f+=28+16;else{l=Ac(l,wa(r,f)),f+=8;const w=r.readInt32LE(f);f+=4;const _=new Array(w);for(let C=0;C<w;C+=1){const S=wa(r,f);f+=8;const T=wa(r,f);f+=8,l=Ac(l,S),_[C]=new C3(S,T,y)}d[y]=_}}u[c]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:l,indices:u,refCount:s,csi:!0,maxBlockSize:65536,...a}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i),a=o==null?void 0:o.indices[t];if(!a)return[];const s=this.reg2bins(n,r);if(s.length===0)return[];const f=[];for(const[l,u]of s)for(let c=l;c<=u;c++)if(a.binIndex[c]){const h=a.binIndex[c];for(const d of h)f.push(d)}return k3(f,new S3(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,o=this.minShift+this.depth*3;const a=[];for(;r<=this.depth;o-=3,i+=lO(1,r*3),r+=1){const s=i+D3(t,o),f=i+D3(n,o);if(f-s+a.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`);a.push([s,f])}return a}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 dn={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},R3="=ACMGRSVTWYHKDBN".split(""),Fl="MIDNSHP=X???????".split("");class F3{constructor(t){this.data={},this._tagList=[],this._allTagsParsed=!1;const{bytes:n,fileOffset:r}=t,{byteArray:i,start:o}=n;this.data={},this.bytes=n,this._id=r,this._refID=i.readInt32LE(o+4),this.data.start=i.readInt32LE(o+8),this.flags=(i.readInt32LE(o+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(),o=n[i];return n[i]=!0,!o})}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 o=this.bytes.end;let a;for(;i<o&&a!==t;){const s=String.fromCharCode(n[i],n[i+1]);a=s.toLowerCase();const f=String.fromCharCode(n[i+2]);i+=3;let l;switch(f){case"A":{l=String.fromCharCode(n[i]),i+=1;break}case"i":{l=n.readInt32LE(i),i+=4;break}case"I":{l=n.readUInt32LE(i),i+=4;break}case"c":{l=n.readInt8(i),i+=1;break}case"C":{l=n.readUInt8(i),i+=1;break}case"s":{l=n.readInt16LE(i),i+=2;break}case"S":{l=n.readUInt16LE(i),i+=2;break}case"f":{l=n.readFloatLE(i),i+=4;break}case"Z":case"H":{for(l="";i<=o;){const u=n[i++];if(u===0)break;l+=String.fromCharCode(u)}break}case"B":{l="";const u=n[i++],c=String.fromCharCode(u),h=n.readInt32LE(i);if(i+=4,c==="i")if(s==="CG")for(let d=0;d<h;d++){const p=n.readInt32LE(i),b=p>>4,y=Fl[p&15];l+=b+y,i+=4}else for(let d=0;d<h;d++)l+=n.readInt32LE(i),d+1<h&&(l+=","),i+=4;if(c==="I")if(s==="CG")for(let d=0;d<h;d++){const p=n.readUInt32LE(i),b=p>>4,y=Fl[p&15];l+=b+y,i+=4}else for(let d=0;d<h;d++)l+=n.readUInt32LE(i),d+1<h&&(l+=","),i+=4;if(c==="s")for(let d=0;d<h;d++)l+=n.readInt16LE(i),d+1<h&&(l+=","),i+=2;if(c==="S")for(let d=0;d<h;d++)l+=n.readUInt16LE(i),d+1<h&&(l+=","),i+=2;if(c==="c")for(let d=0;d<h;d++)l+=n.readInt8(i),d+1<h&&(l+=","),i+=1;if(c==="C")for(let d=0;d<h;d++)l+=n.readUInt8(i),d+1<h&&(l+=","),i+=1;if(c==="f")for(let d=0;d<h;d++)l+=n.readFloatLE(i),d+1<h&&(l+=","),i+=4;break}default:console.warn(`Unknown BAM tag type '${f}', tags may be incomplete`),l=void 0,i=o}if(this._tagOffset=i,this._tagList.push(s),a===t)return l;this.data[a]=l}this._allTagsParsed=!0}_parseAllTags(){this._parseTag("")}_parseCigar(t){return t.match(/\d+\D/g).map(n=>[n.match(/\D/)[0].toUpperCase(),Number.parseInt(n,10)])}isPaired(){return!!(this.flags&dn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&dn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&dn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&dn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&dn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&dn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&dn.BAM_FREAD1)}isRead2(){return!!(this.flags&dn.BAM_FREAD2)}isSecondary(){return!!(this.flags&dn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&dn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&dn.BAM_FDUP)}isSupplementary(){return!!(this.flags&dn.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 o=this.get("seq_length");let a="",s=0,f=t.readInt32LE(i),l=f>>4,u=Fl[f&15];if(u==="S"&&l===o)return i+=4,f=t.readInt32LE(i),l=f>>4,u=Fl[f&15],u!=="N"&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(let c=0;c<r;++c)f=t.readInt32LE(i),l=f>>4,u=Fl[f&15],a+=l+u,u!=="H"&&u!=="S"&&u!=="I"&&(s+=l),i+=4;return this.data.length_on_ref=s,a}_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"),o=this.get("seq_length");let a="",s=0;for(let f=0;f<i;++f){const l=t[r+f];a+=R3[(l&240)>>4],s++,s<o&&(a+=R3[l&15],s++)}return a}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 o=[];return this.template_length()>0?(o[0]=t,o[1]=r,o[2]=n,o[3]=i):(o[2]=t,o[3]=r,o[0]=n,o[1]=i),o.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 M3(e){const t=e.split(/\r?\n/),n=[];for(const r of t){const[i,...o]=r.split(/\t/);i&&n.push({tag:i.slice(1),data:o.map(a=>{const[s,f]=a.split(":",2);return{tag:s,value:f}})})}return n}const P3=21840194,L3=65536;async function fO(e){let t=[];for await(const n of e)t=t.concat(n);return t}class uO{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 N3{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:o,baiUrl:a,csiPath:s,csiFilehandle:f,csiUrl:l,htsget:u,yieldThreadTime:c=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new rc({cache:new ic({maxSize:50}),fill:async(d,p)=>{const{chunk:b,opts:y}=d,{data:w,cpositions:_,dpositions:C}=await this._readChunk({chunk:b,opts:{...y,signal:p}});return this.readBamFeatures(w,_,C,b)}}),this.renameRefSeq=h,t)this.bam=t;else if(n)this.bam=new ct(n);else if(r)this.bam=new qi(r);else if(u)this.htsget=!0,this.bam=new uO;else throw new Error("unable to initialize bam");if(f)this.index=new Ec({filehandle:f});else if(s)this.index=new Ec({filehandle:new ct(s)});else if(l)this.index=new Ec({filehandle:new qi(l)});else if(o)this.index=new va({filehandle:o});else if(i)this.index=new va({filehandle:new ct(i)});else if(a)this.index=new va({filehandle:new qi(a)});else if(n)this.index=new va({filehandle:new ct(`${n}.bai`)});else if(r)this.index=new va({filehandle:new qi(`${r}.bai`)});else if(u)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=c}async getHeaderPre(t){const n=$N(t);if(!this.index)return;const r=await this.index.parse(n),i=r.firstDataLine?r.firstDataLine.blockPosition+65535:void 0;let o;if(i){const u=i+L3,c=await this.bam.read(ye.Buffer.alloc(u),0,u,0,n);if(!c.bytesRead)throw new Error("Error reading header");o=c.buffer.subarray(0,Math.min(c.bytesRead,i))}else o=await this.bam.readFile(n);const a=await $r(o);if(a.readInt32LE(0)!==P3)throw new Error("Not a BAM file");const s=a.readInt32LE(4);this.header=a.toString("utf8",8,8+s);const{chrToIndex:f,indexToChr:l}=await this._readRefSeqs(s+8,65535,n);return this.chrToIndex=f,this.indexToChr=l,M3(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+L3,{bytesRead:o,buffer:a}=await this.bam.read(ye.Buffer.alloc(i),0,n,0,r);if(!o)throw new Error("Error reading refseqs from header");const s=await $r(a.subarray(0,Math.min(o,n))),f=s.readInt32LE(t);let l=t+4;const u={},c=[];for(let h=0;h<f;h+=1){const d=s.readInt32LE(l),p=this.renameRefSeq(s.toString("utf8",l+4,l+4+d-1)),b=s.readInt32LE(l+d+4);if(u[p]=h,c.push({refName:p,length:b}),l=l+8+d,l>s.length)return console.warn(`BAM header is very big. Re-fetching ${n} bytes.`),this._readRefSeqs(t,n*2,r)}return{chrToIndex:u,indexToChr:c}}async getRecordsForRange(t,n,r,i){return fO(this.streamRecordsForRange(t,n,r,i))}async*streamRecordsForRange(t,n,r,i){var o;await this.getHeader(i);const a=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(a===void 0||!this.index)yield[];else{const s=await this.index.blocksForRange(a,n-1,r,i);yield*this._fetchChunkFeatures(s,a,n,r,i)}}async*_fetchChunkFeatures(t,n,r,i,o={}){const{viewAsPairs:a}=o,s=[];let f=!1;for(const l of t){const u=await this.featureCache.get(l.toString(),{chunk:l,opts:o},o.signal),c=[];for(const h of u)if(h.seq_id()===n)if(h.get("start")>=i){f=!0;break}else h.get("end")>=r&&c.push(h);if(s.push(c),yield c,f)break}QN(o.signal),a&&(yield this.fetchPairs(n,s,o))}async fetchPairs(t,n,r){const{pairAcrossChr:i,maxInsertSize:o=2e5}=r,a={},s={};n.map(h=>{const d={};for(const p of h){const b=p.name(),y=p.id();d[b]||(d[b]=0),d[b]++,s[y]=1}for(const[p,b]of Object.entries(d))b===1&&(a[p]=!0)});const f=[];n.map(h=>{for(const d of h){const p=d.name(),b=d.get("start"),y=d._next_pos(),w=d._next_refid();this.index&&a[p]&&(i||w===t&&Math.abs(b-y)<o)&&f.push(this.index.blocksForRange(w,y,y+1,r))}});const l=new Map,u=await Promise.all(f);for(const h of u.flat())l.has(h.toString())||l.set(h.toString(),h);return(await Promise.all([...l.values()].map(async h=>{const{data:d,cpositions:p,dpositions:b,chunk:y}=await this._readChunk({chunk:h,opts:r}),w=[];for(const _ of await this.readBamFeatures(d,p,b,y))a[_.get("name")]&&!s[_.id()]&&w.push(_);return w}))).flat()}async _readRegion(t,n,r={}){const{bytesRead:i,buffer:o}=await this.bam.read(ye.Buffer.alloc(n),0,n,t,r);return o.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:o,dpositions:a}=await ix(r,t);return{data:i,cpositions:o,dpositions:a,chunk:t}}async readBamFeatures(t,n,r,i){let o=0;const a=[];let s=0,f=+Date.now();for(;o+4<t.length;){const l=t.readInt32LE(o),u=o+4+l-1;if(r){for(;o+i.minv.dataPosition>=r[s++];);s--}if(u<t.length){const c=new F3({bytes:{byteArray:t,start:o,end:u},fileOffset:n.length>0?n[s]*256+(o-r[s])+i.minv.dataPosition+1:oO.signed(t.slice(o,u))});a.push(c),this.yieldThreadTime&&+Date.now()-f>this.yieldThreadTime&&(await WN(1),f=+Date.now())}o=u+1}return a}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 o=(i=this.chrToIndex)===null||i===void 0?void 0:i[t];return o===void 0?[]:this.index.indexCov(o,n,r)}async blocksForRange(t,n,r,i){var o;if(!this.index)return[];await this.index.parse();const a=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];return a===void 0?[]:this.index.blocksForRange(a,n,r,i)}}async function O3(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:o}=r;if(i.startsWith("data:"))return ye.Buffer.from(i.split(",")[1],"base64");{const{referer:a,...s}=o,f=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...s}});if(!f.ok)throw new Error(`HTTP ${f.status} fetching ${i}: ${await f.text()}`);return ye.Buffer.from(await f.arrayBuffer())}}));return ye.Buffer.concat(await Promise.all(n.map(r=>$r(r))))}class cO extends N3{constructor(t){super({htsget:!0}),this.baseUrl=t.baseUrl,this.trackId=t.trackId}async*streamRecordsForRange(t,n,r,i){var o;const s=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${t}&start=${n}&end=${r}&format=BAM`,f=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(f===void 0)yield[];else{const l=await fetch(s,{...i});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${s}: ${await l.text()}`);const u=await l.json(),c=await O3(u.htsget.urls.slice(1),i);yield*this._fetchChunkFeatures([{buffer:c,_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}`}}],f,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(),o=await O3(i.htsget.urls,t);if(o.readInt32LE(0)!==P3)throw new Error("Not a BAM file");const a=o.readInt32LE(4),s=o.toString("utf8",8,8+a),f=M3(s),l=[],u={},c=f.filter(h=>h.tag==="SQ");for(const[h,d]of c.entries()){let p="",b=0;for(const y of d.data)y.tag==="SN"?p=y.value:y.tag==="LN"&&(b=+y.value);u[p]=h,l[h]={refName:p,length:b}}return this.chrToIndex=u,this.indexToChr=l,f}}const hO=Object.freeze(Object.defineProperty({__proto__:null,BAI:va,BamFile:N3,BamRecord:F3,CSI:Ec,HtsgetFile:cO},Symbol.toStringTag,{value:"Module"}));function z3(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class dO extends Error{}function co(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new dO("aborted");throw t.code="ERR_ABORTED",t}}}function pO(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function U3(e,t){const n=[];let r=null;return e.length===0?e:(e.sort(function(i,o){const a=i.minv.blockPosition-o.minv.blockPosition;return a!==0?a:i.minv.dataPosition-o.minv.dataPosition}),e.forEach(i=>{(!t||i.maxv.compareTo(t)>0)&&(r===null?(n.push(i),r=i):pO(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class Qp{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 xa(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Qp(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 _c{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 G3{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={}){return!!((await this.parse(n)).indices[t]||{}).binIndex}}const gO=21578324,H3=14;function mO(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 Sc extends G3{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:a}=r.indices[i];return a?a.lineCount:-1}async _parse(t={}){const n=await this.filehandle.readFile(t),r=await $r(n);if(co(t.signal),r.readUInt32LE(0)!==gO)throw new Error("Not a TBI file");const i=r.readInt32LE(4),o=r.readInt32LE(8),a=o&65536?"zero-based-half-open":"1-based-closed",f={0:"generic",1:"SAM",2:"VCF"}[o&15];if(!f)throw new Error(`invalid Tabix preset format flags ${o}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},u=r.readInt32LE(24),c=5,h=((1<<(c+1)*3)-1)/7,d=2**(14+c*3),p=u?String.fromCharCode(u):null,b=r.readInt32LE(28),y=r.readInt32LE(32),{refNameToId:w,refIdToName:_}=this._parseNameBytes(r.slice(36,36+y));let C=36+y,S;return{indices:new Array(i).fill(0).map(()=>{const B=r.readInt32LE(C);C+=4;const I={};let F;for(let O=0;O<B;O+=1){const re=r.readUInt32LE(C);if(C+=4,re>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(re===h+1){const ae=r.readInt32LE(C);C+=4,ae===2&&(F=this.parsePseudoBin(r,C)),C+=16*ae}else{const ae=r.readInt32LE(C);C+=4;const pe=new Array(ae);for(let Te=0;Te<ae;Te+=1){const Xe=xa(r,C),De=xa(r,C+8);C+=16,S=this._findFirstData(S,Xe),pe[Te]=new _c(Xe,De,re)}I[re]=pe}}const P=r.readInt32LE(C);C+=4;const j=new Array(P);for(let O=0;O<P;O+=1)j[O]=xa(r,C),C+=8,S=this._findFirstData(S,j[O]);return{binIndex:I,linearIndex:j,stats:F}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:b,firstDataLine:S,columnNumbers:l,coordinateType:a,format:f,refIdToName:_,refNameToId:w,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:z3(Qu.fromBytesLE(t.slice(n+16,n+24),!0))}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let a=0;a<t.length;a+=1)if(!t[a]){if(r<a){let s=t.toString("utf8",r,a);s=this.renameRefSeq(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const a=o.refNameToId[t],s=o.indices[a];if(!s)return[];(s.linearIndex.length?s.linearIndex[n>>H3>=s.linearIndex.length?s.linearIndex.length-1:n>>H3]:new Qp(0,0))||console.warn("querying outside of possible tabix range");const l=mO(n,r),u=[];for(const[b,y]of l)for(let w=b;w<=y;w++)if(s.binIndex[w]){const _=s.binIndex[w];for(let C=0;C<_.length;++C)u.push(new _c(_[C].minv,_[C].maxv,w))}const c=s.linearIndex.length;let h=null;const d=Math.min(n>>14,c-1),p=Math.min(r>>14,c-1);for(let b=d;b<=p;++b){const y=s.linearIndex[b];y&&(!h||y.compareTo(h)<0)&&(h=y)}return U3(u,h)}}const bO=21582659,yO=38359875;function wO(e,t){return e*2**t}function V3(e,t){return Math.floor(e/2**t)}class Xp extends G3{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:a}=r.indices[i];return a?a.lineCount:-1}async 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",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),f=s?String.fromCharCode(s):null,l=t.readInt32LE(n+20),u=t.readInt32LE(n+24),{refIdToName:c,refNameToId:h}=this._parseNameBytes(t.slice(n+28,n+28+u));return{refIdToName:c,refNameToId:h,skipLines:l,metaChar:f,columnNumbers:a,format:o,coordinateType:i}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let a=0;a<t.length;a+=1)if(!t[a]){if(r<a){let s=t.toString("utf8",r,a);s=this.renameRefSeq(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}async _parse(t={}){const n=await $r(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===bO)r=1;else if(n.readUInt32LE(0)===yO)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),o=n.readInt32LE(12),a=o&&o>=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+o);let f,l=16+o+4;const u=new Array(s).fill(0).map(()=>{const c=n.readInt32LE(l);l+=4;const h={};let d;for(let p=0;p<c;p+=1){const b=n.readUInt32LE(l);if(b>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=4+8+4+16+16;else{const y=xa(n,l+4);f=this._findFirstData(f,y);const w=n.readInt32LE(l+12);l+=16;const _=new Array(w);for(let C=0;C<w;C+=1){const S=xa(n,l),T=xa(n,l+8);l+=16,_[C]=new _c(S,T,b)}h[b]=_}}return{binIndex:h,stats:d}});return{...a,csi:!0,refCount:s,maxBlockSize:65536,firstDataLine:f,csiVersion:r,indices:u,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:z3(Qu.fromBytesLE(t.slice(n+28,n+36),!0))}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const a=o.refNameToId[t],s=o.indices[a];if(!s)return[];const f=this.reg2bins(n,r),l=[];for(const[u,c]of f)for(let h=u;h<=c;h++)if(s.binIndex[h]){const d=s.binIndex[h];for(let p=0;p<d.length;++p)l.push(new _c(d[p].minv,d[p].maxv,h))}return U3(l,new Qp(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,o=this.minShift+this.depth*3;const a=[];for(;r<=this.depth;o-=3,i+=wO(1,r*3),r+=1){const s=i+V3(t,o),f=i+V3(n,o);if(f-s+a.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`);a.push([s,f])}return a}}const $p=typeof TextDecoder<"u"?new TextDecoder("utf-8"):void 0;function vO(e){return new Promise(t=>setTimeout(t,e))}class xO{constructor({path:t,filehandle:n,tbiPath:r,tbiFilehandle:i,csiPath:o,csiFilehandle:a,yieldTime:s=500,chunkSizeLimit:f=5e7,renameRefSeqs:l=c=>c,chunkCacheSize:u=5*2**20}){if(n)this.filehandle=n;else if(t)this.filehandle=new ct(t);else throw new TypeError("must provide either filehandle or path");if(i)this.index=new Sc({filehandle:i,renameRefSeqs:l});else if(a)this.index=new Xp({filehandle:a,renameRefSeqs:l});else if(r)this.index=new Sc({filehandle:new ct(r),renameRefSeqs:l});else if(o)this.index=new Xp({filehandle:new ct(o),renameRefSeqs:l});else if(t)this.index=new Sc({filehandle:new ct(`${t}.tbi`),renameRefSeqs:l});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, or csiPath");this.chunkSizeLimit=f,this.renameRefSeq=l,this.yieldTime=s,this.chunkCache=new rc({cache:new ic({maxSize:Math.floor(u/65536)}),fill:(c,h)=>this.readChunk(c,{signal:h})})}async getLines(t,n,r,i){let o,a={},s;if(typeof i>"u")throw new TypeError("line callback must be provided");if(typeof i=="function"?s=i:(a=i,s=i.lineCallback),t===void 0)throw new TypeError("must provide a reference sequence name");if(!s)throw new TypeError("line callback must be provided");const f=await this.index.getMetadata(a);if(co(o),n||(n=0),r||(r=f.maxRefLength),!(n<=r))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(n===r)return;const l=await this.index.blocksForRange(t,n,r,a);co(o);for(let c=0;c<l.length;c+=1){const h=l[c].fetchedSize();if(h>this.chunkSizeLimit)throw new Error(`Too much data. Chunk size ${h.toLocaleString()} bytes exceeds chunkSizeLimit of ${this.chunkSizeLimit.toLocaleString()}.`)}let u=Date.now();for(let c=0;c<l.length;c+=1){let h;const d=l[c],{buffer:p,cpositions:b,dpositions:y}=await this.chunkCache.get(d.toString(),d);co(o);let w=0,_=0;for(;w<p.length;){const C=p.indexOf(`
|
|
442
|
+
`,w);if(C===-1)break;const S=p.slice(w,C),T=($p==null?void 0:$p.decode(S))||S.toString();if(y){for(;w+d.minv.dataPosition>=y[_++];);_--}const{startCoordinate:B,overlaps:I}=this.checkLine(f,t,n,r,T);if(h!==void 0&&B!==void 0&&h>B)throw new Error(`Lines not sorted by start coordinate (${h} > ${B}), this file is not usable with Tabix.`);if(h=B,I)s(T.trim(),b[_]*256+(w-y[_])+d.minv.dataPosition+1);else if(B!==void 0&&B>=r)return;this.yieldTime&&u-Date.now()>this.yieldTime&&(u=Date.now(),co(o),await vO(1)),w=C+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:n,metaChar:r,maxBlockSize:i}=await this.getMetadata(t);co(t.signal);const o=((n==null?void 0:n.blockPosition)||0)+i;let a=await this._readRegion(0,o,t);co(t.signal);try{a=await $r(a)}catch(s){throw console.error(s),new Error(`error decompressing block ${s.code} at 0 (length ${o}) ${s}`)}if(r){let s=-1;const f=`
|
|
443
|
+
`.charCodeAt(0),l=r.charCodeAt(0);for(let u=0;u<a.length&&!(u===s+1&&a[u]!==l);u+=1)a[u]===f&&(s=u);a=a.slice(0,s+1)}return a}async getHeader(t={}){return(await this.getHeaderBuffer(t)).toString("utf8")}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,n,r,i,o){const{columnNumbers:a,metaChar:s,coordinateType:f,format:l}=t;if(o.charAt(0)===s)return{overlaps:!1};let{ref:u,start:c,end:h}=a;u||(u=0),c||(c=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(u,c,h);let p=1,b=0,y="",w=-1/0;for(let _=0;_<o.length+1;_+=1)if(o[_]===" "||_===o.length){if(p===u){if(this.renameRefSeq(o.slice(b,_))!==n)return{overlaps:!1}}else if(p===c){if(w=parseInt(o.slice(b,_),10),f==="1-based-closed"&&(w-=1),w>=i)return{startCoordinate:w,overlaps:!1};if((h===0||h===c)&&w+1<=r)return{startCoordinate:w,overlaps:!1}}else if(l==="VCF"&&p===4)y=o.slice(b,_);else if(p===h){let C;if(l==="VCF"?C=this._getVcfEnd(w,y,o.slice(b,_)):C=parseInt(o.slice(b,_),10),C<=r)return{overlaps:!1}}if(b=_+1,p+=1,p>d)break}return{startCoordinate:w,overlaps:!0}}_getVcfEnd(t,n,r){let i=t+n.length;const o=r.indexOf("SVTYPE=TRA")!==-1;if(r[0]!=="."&&!o){let a=";";for(let s=0;s<r.length;s+=1){if(a===";"&&r.slice(s,s+4)==="END="){let f=r.indexOf(";",s);f===-1&&(f=r.length),i=parseInt(r.slice(s+4,f),10);break}a=r[s]}}else if(o)return t+1;return i}async lineCount(t,n={}){return this.index.lineCount(t,n)}async _readRegion(t,n,r={}){const i=Buffer.alloc(n),{bytesRead:o,buffer:a}=await this.filehandle.read(i,0,n,t,r);return a.slice(0,o)}async readChunk(t,n={}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n);try{return ix(r,t)}catch(i){throw new Error(`error decompressing c ${t.toString()} ${i}`)}}}const AO=Object.freeze(Object.defineProperty({__proto__:null,CSI:Xp,TBI:Sc,TabixIndexedFile:xO},Symbol.toStringTag,{value:"Module"}));var Kp={exports:{}},Aa=typeof Reflect=="object"?Reflect:null,j3=Aa&&typeof Aa.apply=="function"?Aa.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},Cc;Aa&&typeof Aa.ownKeys=="function"?Cc=Aa.ownKeys:Object.getOwnPropertySymbols?Cc=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Cc=function(t){return Object.getOwnPropertyNames(t)};function EO(e){console&&console.warn&&console.warn(e)}var q3=Number.isNaN||function(t){return t!==t};function Be(){Be.init.call(this)}Kp.exports=Be,Kp.exports.once=kO,Be.EventEmitter=Be,Be.prototype._events=void 0,Be.prototype._eventsCount=0,Be.prototype._maxListeners=void 0;var Z3=10;function kc(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Be,"defaultMaxListeners",{enumerable:!0,get:function(){return Z3},set:function(e){if(typeof e!="number"||e<0||q3(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Z3=e}}),Be.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},Be.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||q3(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 W3(e){return e._maxListeners===void 0?Be.defaultMaxListeners:e._maxListeners}Be.prototype.getMaxListeners=function(){return W3(this)},Be.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=t==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var a;if(n.length>0&&(a=n[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var f=o[t];if(f===void 0)return!1;if(typeof f=="function")j3(f,this,n);else for(var l=f.length,u=K3(f,l),r=0;r<l;++r)j3(u[r],this,n);return!0};function Y3(e,t,n,r){var i,o,a;if(kc(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),a===void 0)a=o[t]=n,++e._eventsCount;else if(typeof a=="function"?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),i=W3(e),i>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,EO(s)}return e}Be.prototype.addListener=function(t,n){return Y3(this,t,n,!1)},Be.prototype.on=Be.prototype.addListener,Be.prototype.prependListener=function(t,n){return Y3(this,t,n,!0)};function _O(){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 Q3(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=_O.bind(r);return i.listener=n,r.wrapFn=i,i}Be.prototype.once=function(t,n){return kc(n),this.on(t,Q3(this,t,n)),this},Be.prototype.prependOnceListener=function(t,n){return kc(n),this.prependListener(t,Q3(this,t,n)),this},Be.prototype.removeListener=function(t,n){var r,i,o,a,s;if(kc(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(o=-1,a=r.length-1;a>=0;a--)if(r[a]===n||r[a].listener===n){s=r[a].listener,o=a;break}if(o<0)return this;o===0?r.shift():SO(r,o),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this},Be.prototype.off=Be.prototype.removeListener,Be.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 o=Object.keys(r),a;for(i=0;i<o.length;++i)a=o[i],a!=="removeListener"&&this.removeAllListeners(a);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 X3(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?CO(i):K3(i,i.length)}Be.prototype.listeners=function(t){return X3(this,t,!0)},Be.prototype.rawListeners=function(t){return X3(this,t,!1)},Be.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):$3.call(e,t)},Be.prototype.listenerCount=$3;function $3(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}Be.prototype.eventNames=function(){return this._eventsCount>0?Cc(this._events):[]};function K3(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function SO(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function CO(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function kO(e,t){return new Promise(function(n,r){function i(a){e.removeListener(t,o),r(a)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",i),n([].slice.call(arguments))}J3(e,t,o,{once:!0}),t!=="error"&&IO(e,i,{once:!0})})}function IO(e,t,n){typeof e.on=="function"&&J3(e,"error",t,n)}function J3(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(o){r.once&&e.removeEventListener(t,i),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var Jp=Kp.exports,eg={exports:{}};typeof Object.create=="function"?eg.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:eg.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 Ea=eg.exports,tg,eE;function tE(){return eE||(eE=1,tg=Jp.EventEmitter),tg}const nE=GR(XR);var ng,rE;function TO(){if(rE)return ng;rE=1;function e(p,b){var y=Object.keys(p);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(p);b&&(w=w.filter(function(_){return Object.getOwnPropertyDescriptor(p,_).enumerable})),y.push.apply(y,w)}return y}function t(p){for(var b=1;b<arguments.length;b++){var y=arguments[b]!=null?arguments[b]:{};b%2?e(Object(y),!0).forEach(function(w){n(p,w,y[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(w){Object.defineProperty(p,w,Object.getOwnPropertyDescriptor(y,w))})}return p}function n(p,b,y){return b=a(b),b in p?Object.defineProperty(p,b,{value:y,enumerable:!0,configurable:!0,writable:!0}):p[b]=y,p}function r(p,b){if(!(p instanceof b))throw new TypeError("Cannot call a class as a function")}function i(p,b){for(var y=0;y<b.length;y++){var w=b[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(p,a(w.key),w)}}function o(p,b,y){return b&&i(p.prototype,b),y&&i(p,y),Object.defineProperty(p,"prototype",{writable:!1}),p}function a(p){var b=s(p,"string");return typeof b=="symbol"?b:String(b)}function s(p,b){if(typeof p!="object"||p===null)return p;var y=p[Symbol.toPrimitive];if(y!==void 0){var w=y.call(p,b||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(p)}var f=ye,l=f.Buffer,u=nE,c=u.inspect,h=c&&c.custom||"inspect";function d(p,b,y){l.prototype.copy.call(p,b,y)}return ng=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return o(p,[{key:"push",value:function(y){var w={data:y,next:null};this.length>0?this.tail.next=w:this.head=w,this.tail=w,++this.length}},{key:"unshift",value:function(y){var w={data:y,next:this.head};this.length===0&&(this.tail=w),this.head=w,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var w=this.head,_=""+w.data;w=w.next;)_+=y+w.data;return _}},{key:"concat",value:function(y){if(this.length===0)return l.alloc(0);for(var w=l.allocUnsafe(y>>>0),_=this.head,C=0;_;)d(_.data,w,C),C+=_.data.length,_=_.next;return w}},{key:"consume",value:function(y,w){var _;return y<this.head.data.length?(_=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?_=this.shift():_=w?this._getString(y):this._getBuffer(y),_}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var w=this.head,_=1,C=w.data;for(y-=C.length;w=w.next;){var S=w.data,T=y>S.length?S.length:y;if(T===S.length?C+=S:C+=S.slice(0,y),y-=T,y===0){T===S.length?(++_,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=S.slice(T));break}++_}return this.length-=_,C}},{key:"_getBuffer",value:function(y){var w=l.allocUnsafe(y),_=this.head,C=1;for(_.data.copy(w),y-=_.data.length;_=_.next;){var S=_.data,T=y>S.length?S.length:y;if(S.copy(w,w.length-y,0,T),y-=T,y===0){T===S.length?(++C,_.next?this.head=_.next:this.head=this.tail=null):(this.head=_,_.data=S.slice(T));break}++C}return this.length-=C,w}},{key:h,value:function(y,w){return c(this,t(t({},w),{},{depth:0,customInspect:!1}))}}]),p}(),ng}var rg,iE;function oE(){if(iE)return rg;iE=1;function e(a,s){var f=this,l=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return l||u?(s?s(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,a)):process.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(c){!s&&c?f._writableState?f._writableState.errorEmitted?process.nextTick(n,f):(f._writableState.errorEmitted=!0,process.nextTick(t,f,c)):process.nextTick(t,f,c):s?(process.nextTick(n,f),s(c)):process.nextTick(n,f)}),this)}function t(a,s){i(a,s),n(a)}function n(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.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(a,s){a.emit("error",s)}function o(a,s){var f=a._readableState,l=a._writableState;f&&f.autoDestroy||l&&l.autoDestroy?a.destroy(s):a.emit("error",s)}return rg={destroy:e,undestroy:r,errorOrDestroy:o},rg}var ig={},aE;function _a(){if(aE)return ig;aE=1;function e(s,f){s.prototype=Object.create(f.prototype),s.prototype.constructor=s,s.__proto__=f}var t={};function n(s,f,l){l||(l=Error);function u(h,d,p){return typeof f=="string"?f:f(h,d,p)}var c=function(h){e(d,h);function d(p,b,y){return h.call(this,u(p,b,y))||this}return d}(l);c.prototype.name=l.name,c.prototype.code=s,t[s]=c}function r(s,f){if(Array.isArray(s)){var l=s.length;return s=s.map(function(u){return String(u)}),l>2?"one of ".concat(f," ").concat(s.slice(0,l-1).join(", "),", or ")+s[l-1]:l===2?"one of ".concat(f," ").concat(s[0]," or ").concat(s[1]):"of ".concat(f," ").concat(s[0])}else return"of ".concat(f," ").concat(String(s))}function i(s,f,l){return s.substr(!l||l<0?0:+l,f.length)===f}function o(s,f,l){return(l===void 0||l>s.length)&&(l=s.length),s.substring(l-f.length,l)===f}function a(s,f,l){return typeof l!="number"&&(l=0),l+f.length>s.length?!1:s.indexOf(f,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,f){return'The value "'+f+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,f,l){var u;typeof f=="string"&&i(f,"not ")?(u="must not be",f=f.replace(/^not /,"")):u="must be";var c;if(o(s," argument"))c="The ".concat(s," ").concat(u," ").concat(r(f,"type"));else{var h=a(s,".")?"property":"argument";c='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(f,"type"))}return c+=". Received type ".concat(typeof l),c},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"),ig.codes=t,ig}var og,sE;function lE(){if(sE)return og;sE=1;var e=_a().codes.ERR_INVALID_OPT_VALUE;function t(r,i,o){return r.highWaterMark!=null?r.highWaterMark:i?r[o]:null}function n(r,i,o,a){var s=t(i,a,o);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var f=a?o:"highWaterMark";throw new e(f,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return og={getHighWaterMark:n},og}var ag,fE;function BO(){if(fE)return ag;fE=1,ag=e;function e(n,r){if(t("noDeprecation"))return n;var i=!1;function o(){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 o}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 ag}var sg,uE;function cE(){if(uE)return sg;uE=1,sg=F;function e(L){var M=this;this.next=null,this.entry=null,this.finish=function(){Oe(M,L)}}var t;F.WritableState=B;var n={deprecate:BO()},r=tE(),i=ye.Buffer,o=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(L){return i.from(L)}function s(L){return i.isBuffer(L)||L instanceof o}var f=oE(),l=lE(),u=l.getHighWaterMark,c=_a().codes,h=c.ERR_INVALID_ARG_TYPE,d=c.ERR_METHOD_NOT_IMPLEMENTED,p=c.ERR_MULTIPLE_CALLBACK,b=c.ERR_STREAM_CANNOT_PIPE,y=c.ERR_STREAM_DESTROYED,w=c.ERR_STREAM_NULL_VALUES,_=c.ERR_STREAM_WRITE_AFTER_END,C=c.ERR_UNKNOWN_ENCODING,S=f.errorOrDestroy;Ea(F,r);function T(){}function B(L,M,q){t=t||Sa(),L=L||{},typeof q!="boolean"&&(q=M instanceof t),this.objectMode=!!L.objectMode,q&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=u(this,L,"writableHighWaterMark",q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var H=L.decodeStrings===!1;this.decodeStrings=!H,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(W){Xe(M,W)},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)}B.prototype.getBuffer=function(){for(var M=this.bufferedRequest,q=[];M;)q.push(M),M=M.next;return q},function(){try{Object.defineProperty(B.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(F,Symbol.hasInstance,{value:function(M){return I.call(this,M)?!0:this!==F?!1:M&&M._writableState instanceof B}})):I=function(M){return M instanceof this};function F(L){t=t||Sa();var M=this instanceof t;if(!M&&!I.call(F,this))return new F(L);this._writableState=new B(L,this,M),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)}F.prototype.pipe=function(){S(this,new b)};function P(L,M){var q=new _;S(L,q),process.nextTick(M,q)}function j(L,M,q,H){var W;return q===null?W=new w:typeof q!="string"&&!M.objectMode&&(W=new h("chunk",["string","Buffer"],q)),W?(S(L,W),process.nextTick(H,W),!1):!0}F.prototype.write=function(L,M,q){var H=this._writableState,W=!1,E=!H.objectMode&&s(L);return E&&!i.isBuffer(L)&&(L=a(L)),typeof M=="function"&&(q=M,M=null),E?M="buffer":M||(M=H.defaultEncoding),typeof q!="function"&&(q=T),H.ending?P(this,q):(E||j(this,H,L,q))&&(H.pendingcb++,W=re(this,H,E,L,M,q)),W},F.prototype.cork=function(){this._writableState.corked++},F.prototype.uncork=function(){var L=this._writableState;L.corked&&(L.corked--,!L.writing&&!L.corked&&!L.bufferProcessing&&L.bufferedRequest&&Ze(this,L))},F.prototype.setDefaultEncoding=function(M){if(typeof M=="string"&&(M=M.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((M+"").toLowerCase())>-1))throw new C(M);return this._writableState.defaultEncoding=M,this},Object.defineProperty(F.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(L,M,q){return!L.objectMode&&L.decodeStrings!==!1&&typeof M=="string"&&(M=i.from(M,q)),M}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function re(L,M,q,H,W,E){if(!q){var x=O(M,H,W);H!==x&&(q=!0,W="buffer",H=x)}var G=M.objectMode?1:H.length;M.length+=G;var Z=M.length<M.highWaterMark;if(Z||(M.needDrain=!0),M.writing||M.corked){var le=M.lastBufferedRequest;M.lastBufferedRequest={chunk:H,encoding:W,isBuf:q,callback:E,next:null},le?le.next=M.lastBufferedRequest:M.bufferedRequest=M.lastBufferedRequest,M.bufferedRequestCount+=1}else ae(L,M,!1,G,H,W,E);return Z}function ae(L,M,q,H,W,E,x){M.writelen=H,M.writecb=x,M.writing=!0,M.sync=!0,M.destroyed?M.onwrite(new y("write")):q?L._writev(W,M.onwrite):L._write(W,E,M.onwrite),M.sync=!1}function pe(L,M,q,H,W){--M.pendingcb,q?(process.nextTick(W,H),process.nextTick(dt,L,M),L._writableState.errorEmitted=!0,S(L,H)):(W(H),L._writableState.errorEmitted=!0,S(L,H),dt(L,M))}function Te(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}function Xe(L,M){var q=L._writableState,H=q.sync,W=q.writecb;if(typeof W!="function")throw new p;if(Te(q),M)pe(L,q,H,M,W);else{var E=Ke(q)||L.destroyed;!E&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&Ze(L,q),H?process.nextTick(De,L,q,E,W):De(L,q,E,W)}}function De(L,M,q,H){q||$e(L,M),M.pendingcb--,H(),dt(L,M)}function $e(L,M){M.length===0&&M.needDrain&&(M.needDrain=!1,L.emit("drain"))}function Ze(L,M){M.bufferProcessing=!0;var q=M.bufferedRequest;if(L._writev&&q&&q.next){var H=M.bufferedRequestCount,W=new Array(H),E=M.corkedRequestsFree;E.entry=q;for(var x=0,G=!0;q;)W[x]=q,q.isBuf||(G=!1),q=q.next,x+=1;W.allBuffers=G,ae(L,M,!0,M.length,W,"",E.finish),M.pendingcb++,M.lastBufferedRequest=null,E.next?(M.corkedRequestsFree=E.next,E.next=null):M.corkedRequestsFree=new e(M),M.bufferedRequestCount=0}else{for(;q;){var Z=q.chunk,le=q.encoding,J=q.callback,fe=M.objectMode?1:Z.length;if(ae(L,M,!1,fe,Z,le,J),q=q.next,M.bufferedRequestCount--,M.writing)break}q===null&&(M.lastBufferedRequest=null)}M.bufferedRequest=q,M.bufferProcessing=!1}F.prototype._write=function(L,M,q){q(new d("_write()"))},F.prototype._writev=null,F.prototype.end=function(L,M,q){var H=this._writableState;return typeof L=="function"?(q=L,L=null,M=null):typeof M=="function"&&(q=M,M=null),L!=null&&this.write(L,M),H.corked&&(H.corked=1,this.uncork()),H.ending||qt(this,H,q),this},Object.defineProperty(F.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ke(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function Ee(L,M){L._final(function(q){M.pendingcb--,q&&S(L,q),M.prefinished=!0,L.emit("prefinish"),dt(L,M)})}function _e(L,M){!M.prefinished&&!M.finalCalled&&(typeof L._final=="function"&&!M.destroyed?(M.pendingcb++,M.finalCalled=!0,process.nextTick(Ee,L,M)):(M.prefinished=!0,L.emit("prefinish")))}function dt(L,M){var q=Ke(M);if(q&&(_e(L,M),M.pendingcb===0&&(M.finished=!0,L.emit("finish"),M.autoDestroy))){var H=L._readableState;(!H||H.autoDestroy&&H.endEmitted)&&L.destroy()}return q}function qt(L,M,q){M.ending=!0,dt(L,M),q&&(M.finished?process.nextTick(q):L.once("finish",q)),M.ended=!0,L.writable=!1}function Oe(L,M,q){var H=L.entry;for(L.entry=null;H;){var W=H.callback;M.pendingcb--,W(q),H=H.next}M.corkedRequestsFree.next=L}return Object.defineProperty(F.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(M){this._writableState&&(this._writableState.destroyed=M)}}),F.prototype.destroy=f.destroy,F.prototype._undestroy=f.undestroy,F.prototype._destroy=function(L,M){M(L)},sg}var lg,hE;function Sa(){if(hE)return lg;hE=1;var e=Object.keys||function(l){var u=[];for(var c in l)u.push(c);return u};lg=a;var t=yE(),n=cE();Ea(a,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var o=r[i];a.prototype[o]||(a.prototype[o]=n.prototype[o])}function a(l){if(!(this instanceof a))return new a(l);t.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(f,this)}function f(l){l.end()}return Object.defineProperty(a.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)}}),lg}var fg={},ug={exports:{}};(function(e,t){var n=ye,r=n.Buffer;function i(a,s){for(var f in a)s[f]=a[f]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o);function o(a,s,f){return r(a,s,f)}i(r,o),o.from=function(a,s,f){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,s,f)},o.alloc=function(a,s,f){if(typeof a!="number")throw new TypeError("Argument must be a number");var l=r(a);return s!==void 0?typeof f=="string"?l.fill(s,f):l.fill(s):l.fill(0),l},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(a)}})(ug,ug.exports);var DO=ug.exports,cg=DO.Buffer,dE=cg.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 RO(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 FO(e){var t=RO(e);if(typeof t!="string"&&(cg.isEncoding===dE||!dE(e)))throw new Error("Unknown encoding: "+e);return t||e}var MO=fg.StringDecoder=Ml;function Ml(e){this.encoding=FO(e);var t;switch(this.encoding){case"utf16le":this.text=UO,this.end=GO,t=4;break;case"utf8":this.fillLast=NO,t=4;break;case"base64":this.text=HO,this.end=VO,t=3;break;default:this.write=jO,this.end=qO;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=cg.allocUnsafe(t)}Ml.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||""},Ml.prototype.end=zO,Ml.prototype.text=OO,Ml.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 hg(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function PO(e,t,n){var r=t.length-1;if(r<n)return 0;var i=hg(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=hg(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=hg(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function LO(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 NO(e){var t=this.lastTotal-this.lastNeed,n=LO(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 OO(e,t){var n=PO(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 zO(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function UO(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 GO(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 HO(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 VO(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function jO(e){return e.toString(this.encoding)}function qO(e){return e&&e.length?this.write(e):""}var dg,pE;function pg(){if(pE)return dg;pE=1;var e=_a().codes.ERR_STREAM_PREMATURE_CLOSE;function t(o){var a=!1;return function(){if(!a){a=!0;for(var s=arguments.length,f=new Array(s),l=0;l<s;l++)f[l]=arguments[l];o.apply(this,f)}}}function n(){}function r(o){return o.setHeader&&typeof o.abort=="function"}function i(o,a,s){if(typeof a=="function")return i(o,null,a);a||(a={}),s=t(s||n);var f=a.readable||a.readable!==!1&&o.readable,l=a.writable||a.writable!==!1&&o.writable,u=function(){o.writable||h()},c=o._writableState&&o._writableState.finished,h=function(){l=!1,c=!0,f||s.call(o)},d=o._readableState&&o._readableState.endEmitted,p=function(){f=!1,d=!0,l||s.call(o)},b=function(C){s.call(o,C)},y=function(){var C;if(f&&!d)return(!o._readableState||!o._readableState.ended)&&(C=new e),s.call(o,C);if(l&&!c)return(!o._writableState||!o._writableState.ended)&&(C=new e),s.call(o,C)},w=function(){o.req.on("finish",h)};return r(o)?(o.on("complete",h),o.on("abort",y),o.req?w():o.on("request",w)):l&&!o._writableState&&(o.on("end",u),o.on("close",u)),o.on("end",p),o.on("finish",h),a.error!==!1&&o.on("error",b),o.on("close",y),function(){o.removeListener("complete",h),o.removeListener("abort",y),o.removeListener("request",w),o.req&&o.req.removeListener("finish",h),o.removeListener("end",u),o.removeListener("close",u),o.removeListener("finish",h),o.removeListener("end",p),o.removeListener("error",b),o.removeListener("close",y)}}return dg=i,dg}var gg,gE;function ZO(){if(gE)return gg;gE=1;var e;function t(C,S,T){return S=n(S),S in C?Object.defineProperty(C,S,{value:T,enumerable:!0,configurable:!0,writable:!0}):C[S]=T,C}function n(C){var S=r(C,"string");return typeof S=="symbol"?S:String(S)}function r(C,S){if(typeof C!="object"||C===null)return C;var T=C[Symbol.toPrimitive];if(T!==void 0){var B=T.call(C,S||"default");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(C)}var i=pg(),o=Symbol("lastResolve"),a=Symbol("lastReject"),s=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),c=Symbol("stream");function h(C,S){return{value:C,done:S}}function d(C){var S=C[o];if(S!==null){var T=C[c].read();T!==null&&(C[l]=null,C[o]=null,C[a]=null,S(h(T,!1)))}}function p(C){process.nextTick(d,C)}function b(C,S){return function(T,B){C.then(function(){if(S[f]){T(h(void 0,!0));return}S[u](T,B)},B)}}var y=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((e={get stream(){return this[c]},next:function(){var S=this,T=this[s];if(T!==null)return Promise.reject(T);if(this[f])return Promise.resolve(h(void 0,!0));if(this[c].destroyed)return new Promise(function(P,j){process.nextTick(function(){S[s]?j(S[s]):P(h(void 0,!0))})});var B=this[l],I;if(B)I=new Promise(b(B,this));else{var F=this[c].read();if(F!==null)return Promise.resolve(h(F,!1));I=new Promise(this[u])}return this[l]=I,I}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var S=this;return new Promise(function(T,B){S[c].destroy(null,function(I){if(I){B(I);return}T(h(void 0,!0))})})}),e),y),_=function(S){var T,B=Object.create(w,(T={},t(T,c,{value:S,writable:!0}),t(T,o,{value:null,writable:!0}),t(T,a,{value:null,writable:!0}),t(T,s,{value:null,writable:!0}),t(T,f,{value:S._readableState.endEmitted,writable:!0}),t(T,u,{value:function(F,P){var j=B[c].read();j?(B[l]=null,B[o]=null,B[a]=null,F(h(j,!1))):(B[o]=F,B[a]=P)},writable:!0}),T));return B[l]=null,i(S,function(I){if(I&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=B[a];F!==null&&(B[l]=null,B[o]=null,B[a]=null,F(I)),B[s]=I;return}var P=B[o];P!==null&&(B[l]=null,B[o]=null,B[a]=null,P(h(void 0,!0))),B[f]=!0}),S.on("readable",p.bind(null,B)),B};return gg=_,gg}var mg,mE;function WO(){return mE||(mE=1,mg=function(){throw new Error("Readable.from is not available in the browser")}),mg}var bg,bE;function yE(){if(bE)return bg;bE=1,bg=P;var e;P.ReadableState=F,Jp.EventEmitter;var t=function(x,G){return x.listeners(G).length},n=tE(),r=ye.Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(E){return r.from(E)}function a(E){return r.isBuffer(E)||E instanceof i}var s=nE,f;s&&s.debuglog?f=s.debuglog("stream"):f=function(){};var l=TO(),u=oE(),c=lE(),h=c.getHighWaterMark,d=_a().codes,p=d.ERR_INVALID_ARG_TYPE,b=d.ERR_STREAM_PUSH_AFTER_EOF,y=d.ERR_METHOD_NOT_IMPLEMENTED,w=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,_,C,S;Ea(P,n);var T=u.errorOrDestroy,B=["error","close","destroy","pause","resume"];function I(E,x,G){if(typeof E.prependListener=="function")return E.prependListener(x,G);!E._events||!E._events[x]?E.on(x,G):Array.isArray(E._events[x])?E._events[x].unshift(G):E._events[x]=[G,E._events[x]]}function F(E,x,G){e=e||Sa(),E=E||{},typeof G!="boolean"&&(G=x instanceof e),this.objectMode=!!E.objectMode,G&&(this.objectMode=this.objectMode||!!E.readableObjectMode),this.highWaterMark=h(this,E,"readableHighWaterMark",G),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=E.emitClose!==!1,this.autoDestroy=!!E.autoDestroy,this.destroyed=!1,this.defaultEncoding=E.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,E.encoding&&(_||(_=fg.StringDecoder),this.decoder=new _(E.encoding),this.encoding=E.encoding)}function P(E){if(e=e||Sa(),!(this instanceof P))return new P(E);var x=this instanceof e;this._readableState=new F(E,this,x),this.readable=!0,E&&(typeof E.read=="function"&&(this._read=E.read),typeof E.destroy=="function"&&(this._destroy=E.destroy)),n.call(this)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(x){this._readableState&&(this._readableState.destroyed=x)}}),P.prototype.destroy=u.destroy,P.prototype._undestroy=u.undestroy,P.prototype._destroy=function(E,x){x(E)},P.prototype.push=function(E,x){var G=this._readableState,Z;return G.objectMode?Z=!0:typeof E=="string"&&(x=x||G.defaultEncoding,x!==G.encoding&&(E=r.from(E,x),x=""),Z=!0),j(this,E,x,!1,Z)},P.prototype.unshift=function(E){return j(this,E,null,!0,!1)};function j(E,x,G,Z,le){f("readableAddChunk",x);var J=E._readableState;if(x===null)J.reading=!1,Xe(E,J);else{var fe;if(le||(fe=re(J,x)),fe)T(E,fe);else if(J.objectMode||x&&x.length>0)if(typeof x!="string"&&!J.objectMode&&Object.getPrototypeOf(x)!==r.prototype&&(x=o(x)),Z)J.endEmitted?T(E,new w):O(E,J,x,!0);else if(J.ended)T(E,new b);else{if(J.destroyed)return!1;J.reading=!1,J.decoder&&!G?(x=J.decoder.write(x),J.objectMode||x.length!==0?O(E,J,x,!1):Ze(E,J)):O(E,J,x,!1)}else Z||(J.reading=!1,Ze(E,J))}return!J.ended&&(J.length<J.highWaterMark||J.length===0)}function O(E,x,G,Z){x.flowing&&x.length===0&&!x.sync?(x.awaitDrain=0,E.emit("data",G)):(x.length+=x.objectMode?1:G.length,Z?x.buffer.unshift(G):x.buffer.push(G),x.needReadable&&De(E)),Ze(E,x)}function re(E,x){var G;return!a(x)&&typeof x!="string"&&x!==void 0&&!E.objectMode&&(G=new p("chunk",["string","Buffer","Uint8Array"],x)),G}P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(E){_||(_=fg.StringDecoder);var x=new _(E);this._readableState.decoder=x,this._readableState.encoding=this._readableState.decoder.encoding;for(var G=this._readableState.buffer.head,Z="";G!==null;)Z+=x.write(G.data),G=G.next;return this._readableState.buffer.clear(),Z!==""&&this._readableState.buffer.push(Z),this._readableState.length=Z.length,this};var ae=1073741824;function pe(E){return E>=ae?E=ae:(E--,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E++),E}function Te(E,x){return E<=0||x.length===0&&x.ended?0:x.objectMode?1:E!==E?x.flowing&&x.length?x.buffer.head.data.length:x.length:(E>x.highWaterMark&&(x.highWaterMark=pe(E)),E<=x.length?E:x.ended?x.length:(x.needReadable=!0,0))}P.prototype.read=function(E){f("read",E),E=parseInt(E,10);var x=this._readableState,G=E;if(E!==0&&(x.emittedReadable=!1),E===0&&x.needReadable&&((x.highWaterMark!==0?x.length>=x.highWaterMark:x.length>0)||x.ended))return f("read: emitReadable",x.length,x.ended),x.length===0&&x.ended?q(this):De(this),null;if(E=Te(E,x),E===0&&x.ended)return x.length===0&&q(this),null;var Z=x.needReadable;f("need readable",Z),(x.length===0||x.length-E<x.highWaterMark)&&(Z=!0,f("length less than watermark",Z)),x.ended||x.reading?(Z=!1,f("reading or ended",Z)):Z&&(f("do read"),x.reading=!0,x.sync=!0,x.length===0&&(x.needReadable=!0),this._read(x.highWaterMark),x.sync=!1,x.reading||(E=Te(G,x)));var le;return E>0?le=M(E,x):le=null,le===null?(x.needReadable=x.length<=x.highWaterMark,E=0):(x.length-=E,x.awaitDrain=0),x.length===0&&(x.ended||(x.needReadable=!0),G!==E&&x.ended&&q(this)),le!==null&&this.emit("data",le),le};function Xe(E,x){if(f("onEofChunk"),!x.ended){if(x.decoder){var G=x.decoder.end();G&&G.length&&(x.buffer.push(G),x.length+=x.objectMode?1:G.length)}x.ended=!0,x.sync?De(E):(x.needReadable=!1,x.emittedReadable||(x.emittedReadable=!0,$e(E)))}}function De(E){var x=E._readableState;f("emitReadable",x.needReadable,x.emittedReadable),x.needReadable=!1,x.emittedReadable||(f("emitReadable",x.flowing),x.emittedReadable=!0,process.nextTick($e,E))}function $e(E){var x=E._readableState;f("emitReadable_",x.destroyed,x.length,x.ended),!x.destroyed&&(x.length||x.ended)&&(E.emit("readable"),x.emittedReadable=!1),x.needReadable=!x.flowing&&!x.ended&&x.length<=x.highWaterMark,L(E)}function Ze(E,x){x.readingMore||(x.readingMore=!0,process.nextTick(Ke,E,x))}function Ke(E,x){for(;!x.reading&&!x.ended&&(x.length<x.highWaterMark||x.flowing&&x.length===0);){var G=x.length;if(f("maybeReadMore read 0"),E.read(0),G===x.length)break}x.readingMore=!1}P.prototype._read=function(E){T(this,new y("_read()"))},P.prototype.pipe=function(E,x){var G=this,Z=this._readableState;switch(Z.pipesCount){case 0:Z.pipes=E;break;case 1:Z.pipes=[Z.pipes,E];break;default:Z.pipes.push(E);break}Z.pipesCount+=1,f("pipe count=%d opts=%j",Z.pipesCount,x);var le=(!x||x.end!==!1)&&E!==process.stdout&&E!==process.stderr,J=le?Zt:$n;Z.endEmitted?process.nextTick(J):G.once("end",J),E.on("unpipe",fe);function fe(v,g){f("onunpipe"),v===G&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,li())}function Zt(){f("onend"),E.end()}var ai=Ee(G);E.on("drain",ai);var si=!1;function li(){f("cleanup"),E.removeListener("close",fi),E.removeListener("finish",Wt),E.removeListener("drain",ai),E.removeListener("error",yr),E.removeListener("unpipe",fe),G.removeListener("end",Zt),G.removeListener("end",$n),G.removeListener("data",_t),si=!0,Z.awaitDrain&&(!E._writableState||E._writableState.needDrain)&&ai()}G.on("data",_t);function _t(v){f("ondata");var g=E.write(v);f("dest.write",g),g===!1&&((Z.pipesCount===1&&Z.pipes===E||Z.pipesCount>1&&W(Z.pipes,E)!==-1)&&!si&&(f("false write response, pause",Z.awaitDrain),Z.awaitDrain++),G.pause())}function yr(v){f("onerror",v),$n(),E.removeListener("error",yr),t(E,"error")===0&&T(E,v)}I(E,"error",yr);function fi(){E.removeListener("finish",Wt),$n()}E.once("close",fi);function Wt(){f("onfinish"),E.removeListener("close",fi),$n()}E.once("finish",Wt);function $n(){f("unpipe"),G.unpipe(E)}return E.emit("pipe",G),Z.flowing||(f("pipe resume"),G.resume()),E};function Ee(E){return function(){var G=E._readableState;f("pipeOnDrain",G.awaitDrain),G.awaitDrain&&G.awaitDrain--,G.awaitDrain===0&&t(E,"data")&&(G.flowing=!0,L(E))}}P.prototype.unpipe=function(E){var x=this._readableState,G={hasUnpiped:!1};if(x.pipesCount===0)return this;if(x.pipesCount===1)return E&&E!==x.pipes?this:(E||(E=x.pipes),x.pipes=null,x.pipesCount=0,x.flowing=!1,E&&E.emit("unpipe",this,G),this);if(!E){var Z=x.pipes,le=x.pipesCount;x.pipes=null,x.pipesCount=0,x.flowing=!1;for(var J=0;J<le;J++)Z[J].emit("unpipe",this,{hasUnpiped:!1});return this}var fe=W(x.pipes,E);return fe===-1?this:(x.pipes.splice(fe,1),x.pipesCount-=1,x.pipesCount===1&&(x.pipes=x.pipes[0]),E.emit("unpipe",this,G),this)},P.prototype.on=function(E,x){var G=n.prototype.on.call(this,E,x),Z=this._readableState;return E==="data"?(Z.readableListening=this.listenerCount("readable")>0,Z.flowing!==!1&&this.resume()):E==="readable"&&!Z.endEmitted&&!Z.readableListening&&(Z.readableListening=Z.needReadable=!0,Z.flowing=!1,Z.emittedReadable=!1,f("on readable",Z.length,Z.reading),Z.length?De(this):Z.reading||process.nextTick(dt,this)),G},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(E,x){var G=n.prototype.removeListener.call(this,E,x);return E==="readable"&&process.nextTick(_e,this),G},P.prototype.removeAllListeners=function(E){var x=n.prototype.removeAllListeners.apply(this,arguments);return(E==="readable"||E===void 0)&&process.nextTick(_e,this),x};function _e(E){var x=E._readableState;x.readableListening=E.listenerCount("readable")>0,x.resumeScheduled&&!x.paused?x.flowing=!0:E.listenerCount("data")>0&&E.resume()}function dt(E){f("readable nexttick read 0"),E.read(0)}P.prototype.resume=function(){var E=this._readableState;return E.flowing||(f("resume"),E.flowing=!E.readableListening,qt(this,E)),E.paused=!1,this};function qt(E,x){x.resumeScheduled||(x.resumeScheduled=!0,process.nextTick(Oe,E,x))}function Oe(E,x){f("resume",x.reading),x.reading||E.read(0),x.resumeScheduled=!1,E.emit("resume"),L(E),x.flowing&&!x.reading&&E.read(0)}P.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function L(E){var x=E._readableState;for(f("flow",x.flowing);x.flowing&&E.read()!==null;);}P.prototype.wrap=function(E){var x=this,G=this._readableState,Z=!1;E.on("end",function(){if(f("wrapped end"),G.decoder&&!G.ended){var fe=G.decoder.end();fe&&fe.length&&x.push(fe)}x.push(null)}),E.on("data",function(fe){if(f("wrapped data"),G.decoder&&(fe=G.decoder.write(fe)),!(G.objectMode&&fe==null)&&!(!G.objectMode&&(!fe||!fe.length))){var Zt=x.push(fe);Zt||(Z=!0,E.pause())}});for(var le in E)this[le]===void 0&&typeof E[le]=="function"&&(this[le]=function(Zt){return function(){return E[Zt].apply(E,arguments)}}(le));for(var J=0;J<B.length;J++)E.on(B[J],this.emit.bind(this,B[J]));return this._read=function(fe){f("wrapped _read",fe),Z&&(Z=!1,E.resume())},this},typeof Symbol=="function"&&(P.prototype[Symbol.asyncIterator]=function(){return C===void 0&&(C=ZO()),C(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(x){this._readableState&&(this._readableState.flowing=x)}}),P._fromList=M,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function M(E,x){if(x.length===0)return null;var G;return x.objectMode?G=x.buffer.shift():!E||E>=x.length?(x.decoder?G=x.buffer.join(""):x.buffer.length===1?G=x.buffer.first():G=x.buffer.concat(x.length),x.buffer.clear()):G=x.buffer.consume(E,x.decoder),G}function q(E){var x=E._readableState;f("endReadable",x.endEmitted),x.endEmitted||(x.ended=!0,process.nextTick(H,x,E))}function H(E,x){if(f("endReadableNT",E.endEmitted,E.length),!E.endEmitted&&E.length===0&&(E.endEmitted=!0,x.readable=!1,x.emit("end"),E.autoDestroy)){var G=x._writableState;(!G||G.autoDestroy&&G.finished)&&x.destroy()}}typeof Symbol=="function"&&(P.from=function(E,x){return S===void 0&&(S=WO()),S(P,E,x)});function W(E,x){for(var G=0,Z=E.length;G<Z;G++)if(E[G]===x)return G;return-1}return bg}var yg,wE;function vE(){if(wE)return yg;wE=1,yg=s;var e=_a().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,o=Sa();Ea(s,o);function a(u,c){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,c!=null&&this.push(c),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);o.call(this,u),this._transformState={afterTransform:a.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",f)}function f(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(c,h){l(u,c,h)}):l(this,null,null)}s.prototype.push=function(u,c){return this._transformState.needTransform=!1,o.prototype.push.call(this,u,c)},s.prototype._transform=function(u,c,h){h(new t("_transform()"))},s.prototype._write=function(u,c,h){var d=this._transformState;if(d.writecb=h,d.writechunk=u,d.writeencoding=c,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},s.prototype._read=function(u){var c=this._transformState;c.writechunk!==null&&!c.transforming?(c.transforming=!0,this._transform(c.writechunk,c.writeencoding,c.afterTransform)):c.needTransform=!0},s.prototype._destroy=function(u,c){o.prototype._destroy.call(this,u,function(h){c(h)})};function l(u,c,h){if(c)return u.emit("error",c);if(h!=null&&u.push(h),u._writableState.length)throw new i;if(u._transformState.transforming)throw new r;return u.push(null)}return yg}var wg,xE;function YO(){if(xE)return wg;xE=1,wg=t;var e=vE();Ea(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)},wg}var vg,AE;function QO(){if(AE)return vg;AE=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=_a().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function o(h){if(h)throw h}function a(h){return h.setHeader&&typeof h.abort=="function"}function s(h,d,p,b){b=t(b);var y=!1;h.on("close",function(){y=!0}),e===void 0&&(e=pg()),e(h,{readable:d,writable:p},function(_){if(_)return b(_);y=!0,b()});var w=!1;return function(_){if(!y&&!w){if(w=!0,a(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();b(_||new i("pipe"))}}}function f(h){h()}function l(h,d){return h.pipe(d)}function u(h){return!h.length||typeof h[h.length-1]!="function"?o:h.pop()}function c(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var b=u(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var y,w=d.map(function(_,C){var S=C<d.length-1,T=C>0;return s(_,S,T,function(B){y||(y=B),B&&w.forEach(f),!S&&(w.forEach(f),b(y))})});return d.reduce(l)}return vg=c,vg}var EE=pn,xg=Jp.EventEmitter,XO=Ea;XO(pn,xg),pn.Readable=yE(),pn.Writable=cE(),pn.Duplex=Sa(),pn.Transform=vE(),pn.PassThrough=YO(),pn.finished=pg(),pn.pipeline=QO(),pn.Stream=pn;function pn(){xg.call(this)}pn.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",a),n.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function f(u){if(l(),xg.listenerCount(this,"error")===0)throw u}n.on("error",f),e.on("error",f);function l(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",a),n.removeListener("close",s),n.removeListener("error",f),e.removeListener("error",f),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e};function Pl(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function _E(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function Ll(e){return _E(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function dr(e){return _E(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function SE(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(o=>o.trim()).map(Pl))}),t}function CE(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&Pl(t[0]),source:t[1]&&Pl(t[1]),type:t[2]&&Pl(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:SE(t[8])}}function kE(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 o=r.split(/\s+/,3);return{...i,seq_id:o[0],start:o[1]&&o[1].replace(/\D/g,""),end:o[2]&&o[2].replace(/\D/g,"")}}else if(n==="genome-build"){const[o,a]=r.split(/\s+/,2);return{...i,source:o,buildName:a}}return i}function IE(e){const t=[];return Object.entries(e).forEach(([n,r])=>{if(!r)return;let i;r.hasOwnProperty("toString")?i=Ll(r.toString()):Array.isArray(r)?i=r.map(Ll).join(","):i=Ll(r),t.push(`${Ll(n)}=${i}`)}),t.length?t.join(";"):"."}function $O(e,t){const n=e.attributes===null||e.attributes===void 0?".":IE(e.attributes),i=`${[e.seq_id===null?".":dr(e.seq_id),e.source===null?".":dr(e.source),e.type===null?".":dr(e.type),e.start===null?".":dr(e.start),e.end===null?".":dr(e.end),e.score===null?".":dr(e.score),e.strand===null?".":dr(e.strand),e.phase===null?".":dr(e.phase),n].join(" ")}
|
|
444
|
+
`;return t[i]?"":(t[i]=!0,i)}function Ic(e,t){if(Array.isArray(e))return e.map(r=>Ic(r,t)).join("");const n=[$O(e,t)];return KO(e)&&n.push(...e.child_features.map(r=>Ic(r,t)),...e.derived_features.map(r=>Ic(r,t))),n.join("")}function TE(e){return Ic(e,{})}function BE(e){let t=`##${e.directive}`;return e.value&&(t+=` ${e.value}`),t+=`
|
|
445
|
+
`,t}function DE(e){return`# ${e.comment}
|
|
446
|
+
`}function Ag(e){return`>${e.id}${e.description?` ${e.description}`:""}
|
|
454
447
|
${e.sequence}
|
|
455
|
-
`}function
|
|
456
|
-
`}return Array.isArray(e)?e.map(t):t(e)}function
|
|
457
|
-
`,r+=n.map(
|
|
448
|
+
`}function Tc(e){function t(n){return"attributes"in n?TE(n):"directive"in n?BE(n):"sequence"in n?Ag(n):"comment"in n?DE(n):`# (invalid item found during format)
|
|
449
|
+
`}return Array.isArray(e)?e.map(t):t(e)}function KO(e){return e.child_features!==void 0&&e.derived_features!==void 0}const JO=Object.freeze(Object.defineProperty({__proto__:null,escape:Ll,escapeColumn:dr,formatAttributes:IE,formatComment:DE,formatDirective:BE,formatFeature:TE,formatItem:Tc,formatSequence:Ag,parseAttributes:SE,parseDirective:kE,parseFeature:CE,unescape:Pl},Symbol.toStringTag,{value:"Module"})),RE={Parent:"child_features",Derives_from:"derived_features"};class FE{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 ME{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 o=kE(t);o&&(o.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new FE(this.sequenceCallback)):this._emitItem(o))}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 FE(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(o=>{delete this._underConstructionById[o],delete this._completedReferences[o]}),r.forEach(o=>{o.child_features&&o.child_features.forEach(a=>n(a)),o.derived_features&&o.derived_features.forEach(a=>n(a))}))};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 a={...CE(t),child_features:[],derived_features:[]},s=((n=a.attributes)===null||n===void 0?void 0:n.ID)||[],f=((r=a.attributes)===null||r===void 0?void 0:r.Parent)||[],l=this.disableDerivesFromReferences?[]:((i=a.attributes)===null||i===void 0?void 0:i.Derives_from)||[];if(!s.length&&!f.length&&!l.length){this._emitItem([a]);return}let u;s.forEach(c=>{const h=this._underConstructionById[c];h?(h[h.length-1].type!==a.type&&this._parseError(`multi-line feature "${c}" has inconsistent types: "${a.type}", "${h[h.length-1].type}"`),h.push(a),u=h):(u=[a],this._enforceBufferSizeLimit(1),!f.length&&!l.length&&this._underConstructionTopLevel.push(u),this._underConstructionById[c]=u,this._resolveReferencesTo(u,c))}),this._resolveReferencesFrom(u||[a],{Parent:f,Derives_from:l},s)}_resolveReferencesTo(t,n){const r=this._underConstructionOrphans[n];r&&(t.forEach(i=>{i.child_features.push(...r.Parent)}),t.forEach(i=>{i.derived_features.push(...r.Derives_from)}),delete this._underConstructionOrphans[n])}_parseError(t){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${t}`)}_resolveReferencesFrom(t,n,r){function i(o,a,s){let f=o[a];f||(f={},o[a]=f);const l=f[s]||!1;return f[s]=!0,l}n.Parent.forEach(o=>{const a=this._underConstructionById[o];if(a){const s=RE.Parent;r.filter(f=>i(this._completedReferences,f,`Parent,${o}`)).length||a.forEach(f=>{f[s].push(t)})}else{let s=this._underConstructionOrphans[o];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[o]=s),s.Parent.push(t)}}),n.Derives_from.forEach(o=>{const a=this._underConstructionById[o];if(a){const s=RE.Derives_from;r.filter(f=>i(this._completedReferences,f,`Derives_from,${o}`)).length||a.forEach(f=>{f[s].push(t)})}else{let s=this._underConstructionOrphans[o];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[o]=s),s.Derives_from.push(t)}})}}function Eg(e){process&&process.nextTick?process.nextTick(e):e()}function PE(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 ez extends EE.Transform{constructor(t={}){super({objectMode:!0}),this.textBuffer="";const n=PE(t);this.encoding=t.encoding||"utf8",this.decoder=new MO;const r=this.push.bind(this);this.parser=new ME({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)),Eg(r)}_flush(t){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),Eg(t)}}function tz(e={}){return new ez(e)}function nz(e,t={}){if(!e)return[];const n=PE(t),r=[],i=r.push.bind(r),o=new ME({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:a=>{throw a}});return e.split(/\r?\n/).forEach(o.addLine.bind(o)),o.finish(),r}function rz(e){const t=[],n=[];e.forEach(i=>{"sequence"in i?n.push(i):t.push(i)});let r=t.map(Tc).join("");return n.length&&(r+=`##FASTA
|
|
450
|
+
`,r+=n.map(Ag).join("")),r}class LE extends EE.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 o=Array.isArray(t)?t[0]:t;"directive"in o&&o.directive!=="gff-version"&&this.push(`##gff-version 3
|
|
458
451
|
`)}if("sequence"in t&&!this.fastaMode&&(this.push(`##FASTA
|
|
459
|
-
`),this.fastaMode=!0),Array.isArray(t)?i=t.map(
|
|
452
|
+
`),this.fastaMode=!0),Array.isArray(t)?i=t.map(Tc).join(""):i=Tc(t),this.push(i),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
|
|
460
453
|
`),this.linesSinceLastSyncMark=0;else{let o=0;for(let a=0;a<i.length;a+=1)i[a]===`
|
|
461
|
-
`&&(o+=1);this.linesSinceLastSyncMark+=o}this.haveWeEmittedData=!0,
|
|
454
|
+
`&&(o+=1);this.linesSinceLastSyncMark+=o}this.haveWeEmittedData=!0,Eg(r)}}function iz(e={}){return new LE(e)}function oz(e,t,n={}){const r={insertVersionDirective:!0,...n};return new Promise((i,o)=>{e.pipe(new LE(r)).on("end",()=>i(null)).on("error",o).pipe(t)})}const az=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:tz,parseStringSync:nz,formatSync:rz,formatStream:iz,formatFile:oz,util:JO}},Symbol.toStringTag,{value:"Module"}));ce.GenomeSpy=Ew,ce.embed=zR,ce.favIcon=OR,ce.html=Dn,ce.icon=NR,ce.loadSpec=_w,Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"})});
|