@genome-spy/core 0.45.0 → 0.46.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.
Files changed (71) hide show
  1. package/dist/bundle/{index-lmJu1tfP.js → index-BtRKzKhM.js} +6 -6
  2. package/dist/bundle/{index--cKb-dKG.js → index-BwFvhduA.js} +5 -5
  3. package/dist/bundle/{index-1QVesMzU.js → index-C8lYPtq_.js} +1 -1
  4. package/dist/bundle/{index-Pv3tKJ1W.js → index-CkI3Kd2P.js} +3 -3
  5. package/dist/bundle/{index-Y-LdHNIz.js → index-CmBp-spD.js} +1 -1
  6. package/dist/bundle/{index-z4Cs62EO.js → index-Dixm7K89.js} +4 -4
  7. package/dist/bundle/{index-noY1e-G6.js → index-Sk-Wtwdn.js} +5 -5
  8. package/dist/bundle/{index-UyrC0vvF.js → index-Z7JiNsFI.js} +4 -4
  9. package/dist/bundle/{index-LD6yPc3X.js → index-mihmTLo-.js} +1 -1
  10. package/dist/bundle/index.es.js +2698 -2615
  11. package/dist/bundle/index.js +93 -84
  12. package/dist/bundle/{long-Veu0zKh9.js → long-CYrAUkxh.js} +2 -2
  13. package/dist/bundle/{remoteFile-Ur-gRKsH.js → remoteFile-1_eCK3VV.js} +1 -1
  14. package/dist/schema.json +156 -15
  15. package/dist/src/data/collector.d.ts +1 -0
  16. package/dist/src/data/collector.d.ts.map +1 -1
  17. package/dist/src/data/collector.js +19 -3
  18. package/dist/src/data/flow.test.js +4 -0
  19. package/dist/src/data/flowNode.d.ts +10 -8
  20. package/dist/src/data/flowNode.d.ts.map +1 -1
  21. package/dist/src/data/flowNode.js +25 -15
  22. package/dist/src/data/sources/dataSource.d.ts +17 -0
  23. package/dist/src/data/sources/dataSource.d.ts.map +1 -1
  24. package/dist/src/data/sources/dataSource.js +34 -0
  25. package/dist/src/data/sources/inlineSource.js +1 -1
  26. package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
  27. package/dist/src/data/sources/lazy/bigBedSource.js +6 -0
  28. package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
  29. package/dist/src/data/sources/lazy/bigWigSource.js +28 -15
  30. package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts +0 -8
  31. package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts.map +1 -1
  32. package/dist/src/data/sources/lazy/singleAxisLazySource.js +1 -13
  33. package/dist/src/data/sources/lazy/singleAxisWindowedSource.js +3 -3
  34. package/dist/src/data/sources/namedSource.js +1 -1
  35. package/dist/src/data/sources/sequenceSource.d.ts.map +1 -1
  36. package/dist/src/data/sources/sequenceSource.js +2 -1
  37. package/dist/src/data/sources/urlSource.d.ts.map +1 -1
  38. package/dist/src/data/sources/urlSource.js +9 -5
  39. package/dist/src/data/transforms/filter.d.ts +2 -2
  40. package/dist/src/data/transforms/filter.d.ts.map +1 -1
  41. package/dist/src/data/transforms/filter.js +3 -6
  42. package/dist/src/data/transforms/filter.test.js +6 -0
  43. package/dist/src/data/transforms/formula.d.ts +2 -2
  44. package/dist/src/data/transforms/formula.d.ts.map +1 -1
  45. package/dist/src/data/transforms/formula.js +3 -3
  46. package/dist/src/data/transforms/formula.test.js +7 -1
  47. package/dist/src/genomeSpy.d.ts +5 -2
  48. package/dist/src/genomeSpy.d.ts.map +1 -1
  49. package/dist/src/genomeSpy.js +24 -8
  50. package/dist/src/marks/mark.d.ts.map +1 -1
  51. package/dist/src/marks/mark.js +11 -0
  52. package/dist/src/spec/view.d.ts +52 -9
  53. package/dist/src/styles/genome-spy.css.d.ts +1 -1
  54. package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
  55. package/dist/src/styles/genome-spy.css.js +4 -0
  56. package/dist/src/styles/genome-spy.scss +5 -0
  57. package/dist/src/types/viewContext.d.ts +9 -2
  58. package/dist/src/utils/expression.js +1 -1
  59. package/dist/src/view/paramMediator.d.ts +2 -1
  60. package/dist/src/view/paramMediator.d.ts.map +1 -1
  61. package/dist/src/view/paramMediator.js +3 -2
  62. package/dist/src/view/paramMediator.test.js +13 -0
  63. package/dist/src/view/viewFactory.d.ts +4 -1
  64. package/dist/src/view/viewFactory.d.ts.map +1 -1
  65. package/dist/src/view/viewFactory.js +52 -24
  66. package/dist/src/view/viewUtils.d.ts +2 -7
  67. package/dist/src/view/viewUtils.d.ts.map +1 -1
  68. package/dist/src/view/viewUtils.js +21 -30
  69. package/package.json +2 -2
  70. /package/dist/bundle/{__vite-browser-external-ENoMJThg.js → __vite-browser-external-C--ziKoh.js} +0 -0
  71. /package/dist/bundle/{_commonjsHelpers-QtkX90xp.js → _commonjsHelpers-BIiJCwQW.js} +0 -0
@@ -1,35 +1,35 @@
1
- (function(he,xe){typeof exports=="object"&&typeof module<"u"?xe(exports):typeof define=="function"&&define.amd?define(["exports"],xe):(he=typeof globalThis<"u"?globalThis:he||self,xe(he.genomeSpyEmbed={}))})(this,function(he){"use strict";var ZU=Object.defineProperty;var YU=(he,xe,ke)=>xe in he?ZU(he,xe,{enumerable:!0,configurable:!0,writable:!0,value:ke}):he[xe]=ke;var yn=(he,xe,ke)=>(YU(he,typeof xe!="symbol"?xe+"":xe,ke),ke),cm=(he,xe,ke)=>{if(!xe.has(he))throw TypeError("Cannot "+ke)};var W=(he,xe,ke)=>(cm(he,xe,"read from private field"),ke?ke.call(he):xe.get(he)),K=(he,xe,ke)=>{if(xe.has(he))throw TypeError("Cannot add the same private member more than once");xe instanceof WeakSet?xe.add(he):xe.set(he,ke)},Fe=(he,xe,ke,Aa)=>(cm(he,xe,"write to private field"),Aa?Aa.call(he,ke):xe.set(he,ke),ke);var j_=(he,xe,ke,Aa)=>({set _(Cu){Fe(he,xe,Cu,ke)},get _(){return W(he,xe,Aa)}}),J=(he,xe,ke)=>(cm(he,xe,"access private method"),ke);var I_,bi,Do,Ro,Kl,Jl,eu,lh,$_,uh,q_,xr,tu,fm,nu,hm,Fo,ru,dm,Mo,iu,au,ma,_u,ou,pm,Ar,Po,Jt,su,lu,gm,am,QU,Dn,Br,uu,mm,ch,W_,fh,Z_,cu,bm,fu,ym,Lo,Ah,Er,va,hu,wm,hh,Y_,om,XU,du,vm,Oo,No,zo,pu,Uo,Go,gu,xm,mu,Am,ba,bu,yu,wu,_r,Ho,Vo,en,ya,jo,Sr,xa,dh,Q_,wa,Su,vu,Em,xu,_m,Au,Sm,ph,X_,$o,Eh,gh,K_,qo,Wo,_h,mh,J_,bh,e4,yh,t4;function xe(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ke(e,t,n){return e.fields=t||[],e.fname=n,e}function Aa(e){return e==null?null:e.fname}function Cu(e){return e==null?null:e.fields}function n4(e){return e.length===1?r4(e[0]):i4(e)}const r4=e=>function(t){return t[e]},i4=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 a4(e){const t=[],n=e.length;let r=null,i=0,a="",o,s,u;e=e+"";function l(){t.push(a+e.substring(o,s)),a="",o=s+1}for(o=s=0;s<n;++s)if(u=e[s],u==="\\")a+=e.substring(o,s++),o=s;else if(u===r)l(),r=null,i=-1;else{if(r)continue;o===i&&u==='"'||o===i&&u==="'"?(o=s+1,r=u):u==="."&&!i?s>o?l():o=s+1:u==="["?(s>o&&l(),i=o=s+1):u==="]"&&(i||Qe("Access path missing open bracket: "+e),i>0&&l(),i=0,o=s+1)}return i&&Qe("Access path missing closing bracket: "+e),r&&Qe("Access path missing closing quote: "+e),s>o&&(s++,l()),t}function ku(e,t,n){const r=a4(e);return e=r.length===1?r[0]:e,ke((n&&n.get||n4)(r),[e],t||e)}ku("id");const Tu=ke(e=>e,[],"identity");ke(()=>0,[],"zero"),ke(()=>1,[],"one"),ke(()=>!0,[],"true"),ke(()=>!1,[],"false");var xt=Array.isArray;function kt(e){return e===Object(e)}function wn(e){return e[e.length-1]}function Zo(e){return e==null||e===""?null:+e}const Cm=e=>t=>e*Math.exp(t),km=e=>t=>Math.log(e*t),o4=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),s4=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,Iu=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function Sh(e,t,n,r){const i=n(e[0]),a=n(wn(e)),o=(a-i)*t;return[r(i-o),r(a-o)]}function l4(e,t){return Sh(e,t,Zo,Tu)}function u4(e,t){var n=Math.sign(e[0]);return Sh(e,t,km(n),Cm(n))}function c4(e,t,n){return Sh(e,t,Iu(n),Iu(1/n))}function Bu(e,t,n,r,i){const a=r(e[0]),o=r(wn(e)),s=t!=null?r(t):(a+o)/2;return[i(s+(a-s)*n),i(s+(o-s)*n)]}function Tm(e,t,n){return Bu(e,t,n,Zo,Tu)}function Im(e,t,n){const r=Math.sign(e[0]);return Bu(e,t,n,km(r),Cm(r))}function Ch(e,t,n,r){return Bu(e,t,n,Iu(r),Iu(1/r))}function f4(e,t,n,r){return Bu(e,t,n,o4(r),s4(r))}function kh(e){return e!=null?xt(e)?e:[e]:[]}function h4(e,t,n){let r=e[0],i=e[1],a;return i<r&&(a=i,i=r,r=a),a=i-r,a>=n-t?[t,n]:[r=Math.min(Math.max(r,t),n-a),r+a]}function Pt(e){return typeof e=="function"}const d4="descending";function Bm(e,t,n){n=n||{},t=kh(t)||[];const r=[],i=[],a={},o=n.comparator||p4;return kh(e).forEach((s,u)=>{s!=null&&(r.push(t[u]===d4?-1:1),i.push(s=Pt(s)?s:ku(s,null,n)),(Cu(s)||[]).forEach(l=>a[l]=1))}),i.length===0?null:ke(o(i,r),Object.keys(a))}const Dm=(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),p4=(e,t)=>e.length===1?g4(e[0],t[0]):m4(e,t,e.length),g4=(e,t)=>function(n,r){return Dm(e(n),e(r))*t},m4=(e,t,n)=>(t.push(0),function(r,i){let a,o=0,s=-1;for(;o===0&&++s<n;)a=e[s],o=Dm(a(r),a(i));return o*t[s]});function b4(e){return Pt(e)?e:()=>e}function Th(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 y4=Object.prototype.hasOwnProperty;function Ea(e,t){return y4.call(e,t)}function Yo(e){return typeof e=="boolean"}function w4(e){return Object.prototype.toString.call(e)==="[object Date]"}function v4(e){return e&&Pt(e[Symbol.iterator])}function Tt(e){return typeof e=="number"}function x4(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Ue(e){return typeof e=="string"}function Rm(e,t){const n=e[0],r=wn(e),i=+t;return i?i===1?r:n+i*(r-n):n}function Du(e){return e&&wn(e)-e[0]||0}function Ru(e){return xt(e)?"["+e.map(Ru)+"]":kt(e)||Ue(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function A4(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const E4=e=>Tt(e)||w4(e)?e:Date.parse(e);function _4(e,t){return t=t||E4,e==null||e===""?null:t(e)}function S4(e){return e==null||e===""?null:e+""}function Fu(e){const t={},n=e.length;for(let r=0;r<n;++r)t[e[r]]=!0;return t}var Fm={},Ih={},Bh=34,Qo=10,Dh=13;function Mm(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function C4(e,t){var n=Mm(e);return function(r,i){return t(n(r),i,e)}}function Pm(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 k4(e){return e<0?"-"+Lt(-e,6):e>9999?"+"+Lt(e,6):Lt(e,4)}function T4(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":k4(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 Lm(e){var t=new RegExp('["'+e+`
2
- \r]`),n=e.charCodeAt(0);function r(f,h){var d,p,m=i(f,function(y,w){if(d)return d(y,w-1);p=y,d=h?C4(y,h):Mm(y)});return m.columns=p||[],m}function i(f,h){var d=[],p=f.length,m=0,y=0,w,A=p<=0,S=!1;f.charCodeAt(p-1)===Qo&&--p,f.charCodeAt(p-1)===Dh&&--p;function _(){if(A)return Ih;if(S)return S=!1,Fm;var I,B=m,R;if(f.charCodeAt(B)===Bh){for(;m++<p&&f.charCodeAt(m)!==Bh||f.charCodeAt(++m)===Bh;);return(I=m)>=p?A=!0:(R=f.charCodeAt(m++))===Qo?S=!0:R===Dh&&(S=!0,f.charCodeAt(m)===Qo&&++m),f.slice(B+1,I-1).replace(/""/g,'"')}for(;m<p;){if((R=f.charCodeAt(I=m++))===Qo)S=!0;else if(R===Dh)S=!0,f.charCodeAt(m)===Qo&&++m;else if(R!==n)continue;return f.slice(B,I)}return A=!0,f.slice(B,p)}for(;(w=_())!==Ih;){for(var T=[];w!==Fm&&w!==Ih;)T.push(w),w=_();h&&(T=h(T,y++))==null||d.push(T)}return d}function a(f,h){return f.map(function(d){return h.map(function(p){return c(d[p])}).join(e)})}function o(f,h){return h==null&&(h=Pm(f)),[h.map(c).join(e)].concat(a(f,h)).join(`
3
- `)}function s(f,h){return h==null&&(h=Pm(f)),a(f,h).join(`
1
+ (function(he,xe){typeof exports=="object"&&typeof module<"u"?xe(exports):typeof define=="function"&&define.amd?define(["exports"],xe):(he=typeof globalThis<"u"?globalThis:he||self,xe(he.genomeSpyEmbed={}))})(this,function(he){"use strict";var QU=Object.defineProperty;var XU=(he,xe,ke)=>xe in he?QU(he,xe,{enumerable:!0,configurable:!0,writable:!0,value:ke}):he[xe]=ke;var nn=(he,xe,ke)=>(XU(he,typeof xe!="symbol"?xe+"":xe,ke),ke),cm=(he,xe,ke)=>{if(!xe.has(he))throw TypeError("Cannot "+ke)};var W=(he,xe,ke)=>(cm(he,xe,"read from private field"),ke?ke.call(he):xe.get(he)),K=(he,xe,ke)=>{if(xe.has(he))throw TypeError("Cannot add the same private member more than once");xe instanceof WeakSet?xe.add(he):xe.set(he,ke)},Fe=(he,xe,ke,Aa)=>(cm(he,xe,"write to private field"),Aa?Aa.call(he,ke):xe.set(he,ke),ke);var W_=(he,xe,ke,Aa)=>({set _(ku){Fe(he,xe,ku,ke)},get _(){return W(he,xe,Aa)}}),J=(he,xe,ke)=>(cm(he,xe,"access private method"),ke);var R_,bi,Do,Ro,Kl,Jl,eu,lh,Z_,uh,Y_,xr,tu,fm,nu,hm,Fo,ru,dm,Mo,iu,au,ma,Su,ou,pm,Ar,Po,en,su,lu,gm,am,KU,Dn,Br,uu,mm,ch,Q_,fh,X_,cu,bm,fu,ym,Lo,Ah,Er,va,hu,wm,hh,K_,om,JU,du,vm,pu,xm,Oo,No,zo,gu,Uo,Go,mu,Am,bu,Em,ba,yu,wu,vu,_r,Ho,Vo,tn,ya,jo,Sr,xa,dh,J_,wa,Cu,xu,_m,Au,Sm,Eu,Cm,ph,e4,$o,Eh,gh,t4,qo,Wo,_h,mh,n4,bh,r4,yh,i4;function xe(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ke(e,t,n){return e.fields=t||[],e.fname=n,e}function Aa(e){return e==null?null:e.fname}function ku(e){return e==null?null:e.fields}function a4(e){return e.length===1?o4(e[0]):s4(e)}const o4=e=>function(t){return t[e]},s4=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 l4(e){const t=[],n=e.length;let r=null,i=0,a="",o,s,u;e=e+"";function l(){t.push(a+e.substring(o,s)),a="",o=s+1}for(o=s=0;s<n;++s)if(u=e[s],u==="\\")a+=e.substring(o,s++),o=s;else if(u===r)l(),r=null,i=-1;else{if(r)continue;o===i&&u==='"'||o===i&&u==="'"?(o=s+1,r=u):u==="."&&!i?s>o?l():o=s+1:u==="["?(s>o&&l(),i=o=s+1):u==="]"&&(i||Qe("Access path missing open bracket: "+e),i>0&&l(),i=0,o=s+1)}return i&&Qe("Access path missing closing bracket: "+e),r&&Qe("Access path missing closing quote: "+e),s>o&&(s++,l()),t}function Tu(e,t,n){const r=l4(e);return e=r.length===1?r[0]:e,ke((n&&n.get||a4)(r),[e],t||e)}Tu("id");const Iu=ke(e=>e,[],"identity");ke(()=>0,[],"zero"),ke(()=>1,[],"one"),ke(()=>!0,[],"true"),ke(()=>!1,[],"false");var xt=Array.isArray;function kt(e){return e===Object(e)}function vn(e){return e[e.length-1]}function Zo(e){return e==null||e===""?null:+e}const km=e=>t=>e*Math.exp(t),Tm=e=>t=>Math.log(e*t),u4=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),c4=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,Bu=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function Sh(e,t,n,r){const i=n(e[0]),a=n(vn(e)),o=(a-i)*t;return[r(i-o),r(a-o)]}function f4(e,t){return Sh(e,t,Zo,Iu)}function h4(e,t){var n=Math.sign(e[0]);return Sh(e,t,Tm(n),km(n))}function d4(e,t,n){return Sh(e,t,Bu(n),Bu(1/n))}function Du(e,t,n,r,i){const a=r(e[0]),o=r(vn(e)),s=t!=null?r(t):(a+o)/2;return[i(s+(a-s)*n),i(s+(o-s)*n)]}function Im(e,t,n){return Du(e,t,n,Zo,Iu)}function Bm(e,t,n){const r=Math.sign(e[0]);return Du(e,t,n,Tm(r),km(r))}function Ch(e,t,n,r){return Du(e,t,n,Bu(r),Bu(1/r))}function p4(e,t,n,r){return Du(e,t,n,u4(r),c4(r))}function kh(e){return e!=null?xt(e)?e:[e]:[]}function g4(e,t,n){let r=e[0],i=e[1],a;return i<r&&(a=i,i=r,r=a),a=i-r,a>=n-t?[t,n]:[r=Math.min(Math.max(r,t),n-a),r+a]}function Pt(e){return typeof e=="function"}const m4="descending";function Dm(e,t,n){n=n||{},t=kh(t)||[];const r=[],i=[],a={},o=n.comparator||b4;return kh(e).forEach((s,u)=>{s!=null&&(r.push(t[u]===m4?-1:1),i.push(s=Pt(s)?s:Tu(s,null,n)),(ku(s)||[]).forEach(l=>a[l]=1))}),i.length===0?null:ke(o(i,r),Object.keys(a))}const Rm=(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),b4=(e,t)=>e.length===1?y4(e[0],t[0]):w4(e,t,e.length),y4=(e,t)=>function(n,r){return Rm(e(n),e(r))*t},w4=(e,t,n)=>(t.push(0),function(r,i){let a,o=0,s=-1;for(;o===0&&++s<n;)a=e[s],o=Rm(a(r),a(i));return o*t[s]});function v4(e){return Pt(e)?e:()=>e}function Th(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 x4=Object.prototype.hasOwnProperty;function Ea(e,t){return x4.call(e,t)}function Yo(e){return typeof e=="boolean"}function A4(e){return Object.prototype.toString.call(e)==="[object Date]"}function E4(e){return e&&Pt(e[Symbol.iterator])}function Tt(e){return typeof e=="number"}function _4(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Ue(e){return typeof e=="string"}function Fm(e,t){const n=e[0],r=vn(e),i=+t;return i?i===1?r:n+i*(r-n):n}function Ru(e){return e&&vn(e)-e[0]||0}function Fu(e){return xt(e)?"["+e.map(Fu)+"]":kt(e)||Ue(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function S4(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const C4=e=>Tt(e)||A4(e)?e:Date.parse(e);function k4(e,t){return t=t||C4,e==null||e===""?null:t(e)}function T4(e){return e==null||e===""?null:e+""}function Mu(e){const t={},n=e.length;for(let r=0;r<n;++r)t[e[r]]=!0;return t}var Mm={},Ih={},Bh=34,Qo=10,Dh=13;function Pm(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function I4(e,t){var n=Pm(e);return function(r,i){return t(n(r),i,e)}}function Lm(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 B4(e){return e<0?"-"+Lt(-e,6):e>9999?"+"+Lt(e,6):Lt(e,4)}function D4(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":B4(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 Om(e){var t=new RegExp('["'+e+`
2
+ \r]`),n=e.charCodeAt(0);function r(f,h){var d,p,m=i(f,function(y,w){if(d)return d(y,w-1);p=y,d=h?I4(y,h):Pm(y)});return m.columns=p||[],m}function i(f,h){var d=[],p=f.length,m=0,y=0,w,A=p<=0,S=!1;f.charCodeAt(p-1)===Qo&&--p,f.charCodeAt(p-1)===Dh&&--p;function _(){if(A)return Ih;if(S)return S=!1,Mm;var I,B=m,R;if(f.charCodeAt(B)===Bh){for(;m++<p&&f.charCodeAt(m)!==Bh||f.charCodeAt(++m)===Bh;);return(I=m)>=p?A=!0:(R=f.charCodeAt(m++))===Qo?S=!0:R===Dh&&(S=!0,f.charCodeAt(m)===Qo&&++m),f.slice(B+1,I-1).replace(/""/g,'"')}for(;m<p;){if((R=f.charCodeAt(I=m++))===Qo)S=!0;else if(R===Dh)S=!0,f.charCodeAt(m)===Qo&&++m;else if(R!==n)continue;return f.slice(B,I)}return A=!0,f.slice(B,p)}for(;(w=_())!==Ih;){for(var T=[];w!==Mm&&w!==Ih;)T.push(w),w=_();h&&(T=h(T,y++))==null||d.push(T)}return d}function a(f,h){return f.map(function(d){return h.map(function(p){return c(d[p])}).join(e)})}function o(f,h){return h==null&&(h=Lm(f)),[h.map(c).join(e)].concat(a(f,h)).join(`
3
+ `)}function s(f,h){return h==null&&(h=Lm(f)),a(f,h).join(`
4
4
  `)}function u(f){return f.map(l).join(`
5
- `)}function l(f){return f.map(c).join(e)}function c(f){return f==null?"":f instanceof Date?T4(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:u,formatRow:l,formatValue:c}}var I4=Lm(" "),B4=I4.parseRows;function D4(e){return e}function R4(e){if(e==null)return D4;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(s,u){u||(t=n=0);var l=2,c=s.length,f=new Array(c);for(f[0]=(t+=s[0])*r+a,f[1]=(n+=s[1])*i+o;l<c;)f[l]=s[l],++l;return f}}function F4(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function M4(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return Om(e,n)})}:Om(e,t)}function Om(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,a=Nm(e,t);return n==null&&r==null?{type:"Feature",properties:i,geometry:a}:r==null?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function Nm(e,t){var n=R4(e.transform),r=e.arcs;function i(c,f){f.length&&f.pop();for(var h=r[c<0?~c:c],d=0,p=h.length;d<p;++d)f.push(n(h[d],d));c<0&&F4(f,p)}function a(c){return n(c)}function o(c){for(var f=[],h=0,d=c.length;h<d;++h)i(c[h],f);return f.length<2&&f.push(f[0]),f}function s(c){for(var f=o(c);f.length<4;)f.push(f[0]);return f}function u(c){return c.map(s)}function l(c){var f=c.type,h;switch(f){case"GeometryCollection":return{type:f,geometries:c.geometries.map(l)};case"Point":h=a(c.coordinates);break;case"MultiPoint":h=c.coordinates.map(a);break;case"LineString":h=o(c.arcs);break;case"MultiLineString":h=c.arcs.map(o);break;case"Polygon":h=u(c.arcs);break;case"MultiPolygon":h=c.arcs.map(u);break;default:return null}return{type:f,coordinates:h}}return l(t)}function P4(e,t){var n={},r={},i={},a=[],o=-1;t.forEach(function(l,c){var f=e.arcs[l<0?~l:l],h;f.length<3&&!f[1][0]&&!f[1][1]&&(h=t[++o],t[o]=l,t[c]=h)}),t.forEach(function(l){var c=s(l),f=c[0],h=c[1],d,p;if(d=i[f])if(delete i[d.end],d.push(l),d.end=h,p=r[h]){delete r[p.start];var m=p===d?d:d.concat(p);r[m.start=d.start]=i[m.end=p.end]=m}else r[d.start]=i[d.end]=d;else if(d=r[h])if(delete r[d.start],d.unshift(l),d.start=f,p=i[f]){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=f]=i[d.end=h]=d});function s(l){var c=e.arcs[l<0?~l:l],f=c[0],h;return e.transform?(h=[0,0],c.forEach(function(d){h[0]+=d[0],h[1]+=d[1]})):h=c[c.length-1],l<0?[h,f]:[f,h]}function u(l,c){for(var f in l){var h=l[f];delete c[h.start],delete h.start,delete h.end,h.forEach(function(d){n[d<0?~d:d]=1}),a.push(h)}}return u(i,r),u(r,i),t.forEach(function(l){n[l<0?~l:l]||a.push([l])}),a}function L4(e){return Nm(e,O4.apply(this,arguments))}function O4(e,t,n){var r,i,a;if(arguments.length>1)r=N4(e,t,n);else for(i=0,r=new Array(a=e.arcs.length);i<a;++i)r[i]=i;return{type:"MultiLineString",arcs:P4(e,r)}}function N4(e,t,n){var r=[],i=[],a;function o(f){var h=f<0?~f:f;(i[h]||(i[h]=[])).push({i:f,g:a})}function s(f){f.forEach(o)}function u(f){f.forEach(s)}function l(f){f.forEach(u)}function c(f){switch(a=f,f.type){case"GeometryCollection":f.geometries.forEach(c);break;case"LineString":s(f.arcs);break;case"MultiLineString":case"Polygon":u(f.arcs);break;case"MultiPolygon":l(f.arcs);break}}return c(t),i.forEach(n==null?function(f){r.push(f[0].i)}:function(f){n(f[0].g,f[f.length-1].g)&&r.push(f[0].i)}),r}function Xo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function z4(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Mu(e){let t,n,r;e.length!==2?(t=Xo,n=(s,u)=>Xo(e(s),u),r=(s,u)=>e(s)-u):(t=e===Xo||e===z4?e:U4,n=e,r=e);function i(s,u,l=0,c=s.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:o,right:a}}function U4(){return 0}function zm(e){return e===null?NaN:+e}const Um=Mu(Xo),Dr=Um.right;Um.left,Mu(zm).center;function G4(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 a of e)(a=t(a,++i,e))!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}class Rr extends Map{constructor(t,n=j4){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(Gm(this,t))}has(t){return super.has(Gm(this,t))}set(t,n){return super.set(H4(this,t),n)}delete(t){return super.delete(V4(this,t))}}function Gm({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function H4({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function V4({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function j4(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Rh(e){return e}function Pu(e,...t){return Hm(e,Rh,Rh,t)}function $4(e,...t){return Hm(e,Array.from,Rh,t)}function Hm(e,t,n,r){return function i(a,o){if(o>=r.length)return n(a);const s=new Rr,u=r[o++];let l=-1;for(const c of a){const f=u(c,++l,a),h=s.get(f);h?h.push(c):s.set(f,[c])}for(const[c,f]of s)s.set(c,i(f,o));return t(s)}(e,0)}const q4=Math.sqrt(50),W4=Math.sqrt(10),Z4=Math.sqrt(2);function Lu(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=q4?10:a>=W4?5:a>=Z4?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(e*l),u=Math.round(t*l),s/l<e&&++s,u/l>t&&--u,l=-l):(l=Math.pow(10,i)*o,s=Math.round(e/l),u=Math.round(t/l),s*l<e&&++s,u*l>t&&--u),u<s&&.5<=n&&n<2?Lu(e,t,n*2):[s,u,l]}function Ou(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?Lu(t,e,n):Lu(e,t,n);if(!(a>=i))return[];const s=a-i+1,u=new Array(s);if(r)if(o<0)for(let l=0;l<s;++l)u[l]=(a-l)/-o;else for(let l=0;l<s;++l)u[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)u[l]=(i+l)/-o;else for(let l=0;l<s;++l)u[l]=(i+l)*o;return u}function Fh(e,t,n){return t=+t,e=+e,n=+n,Lu(e,t,n)[2]}function Fr(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Fh(t,e,n):Fh(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Vm(e,t,n=zm){if(!(!(r=e.length)||isNaN(t=+t))){if(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,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function Ko(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,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function Nu(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 Y4(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function zu(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 _a(e){return e=zu(Math.abs(e)),e?e[1]:NaN}function Q4(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function X4(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var K4=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mr(e){if(!(t=K4.exec(e)))throw new Error("invalid format: "+e);var t;return new Mh({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]})}Mr.prototype=Mh.prototype;function Mh(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+""}Mh.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 J4(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 jm;function eS(e,t){var n=zu(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(jm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+zu(e,Math.max(0,t+a-1))[0]}function $m(e,t){var n=zu(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 qm={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Y4,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)=>$m(e*100,t),r:$m,s:eS,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Wm(e){return e}var Zm=Array.prototype.map,Ym=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function tS(e){var t=e.grouping===void 0||e.thousands===void 0?Wm:Q4(Zm.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+"",a=e.numerals===void 0?Wm:X4(Zm.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Mr(f);var h=f.fill,d=f.align,p=f.sign,m=f.symbol,y=f.zero,w=f.width,A=f.comma,S=f.precision,_=f.trim,T=f.type;T==="n"?(A=!0,T="g"):qm[T]||(S===void 0&&(S=12),_=!0,T="g"),(y||h==="0"&&d==="=")&&(y=!0,h="0",d="=");var I=m==="$"?n:m==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",B=m==="$"?r:/[%p]/.test(T)?o:"",R=qm[T],M=/[defgprs%]/.test(T);S=S===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function G(N){var re=I,se=B,te,ge,Xe;if(T==="c")se=R(N)+se,N="";else{N=+N;var De=N<0||1/N<0;if(N=isNaN(N)?u:R(Math.abs(N),S),_&&(N=J4(N)),De&&+N==0&&p!=="+"&&(De=!1),re=(De?p==="("?p:s:p==="-"||p==="("?"":p)+re,se=(T==="s"?Ym[8+jm/3]:"")+se+(De&&p==="("?")":""),M){for(te=-1,ge=N.length;++te<ge;)if(Xe=N.charCodeAt(te),48>Xe||Xe>57){se=(Xe===46?i+N.slice(te+1):N.slice(te))+se,N=N.slice(0,te);break}}}A&&!y&&(N=t(N,1/0));var Ke=re.length+N.length+se.length,We=Ke<w?new Array(w-Ke+1).join(h):"";switch(A&&y&&(N=t(We+N,We.length?w-se.length:1/0),We=""),d){case"<":N=re+N+se+We;break;case"=":N=re+We+N+se;break;case"^":N=We.slice(0,Ke=We.length>>1)+re+N+se+We.slice(Ke);break;default:N=We+re+N+se;break}return a(N)}return G.toString=function(){return f+""},G}function c(f,h){var d=l((f=Mr(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(_a(h)/3)))*3,m=Math.pow(10,-p),y=Ym[8+p/3];return function(w){return d(m*w)+y}}return{format:l,formatPrefix:c}}var Uu,mt,Ph;nS({thousands:",",grouping:[3],currency:["$",""]});function nS(e){return Uu=tS(e),mt=Uu.format,Ph=Uu.formatPrefix,Uu}function Qm(e){return Math.max(0,-_a(Math.abs(e)))}function Xm(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_a(t)/3)))*3-_a(Math.abs(e)))}function Km(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_a(t)-_a(e))+1}const Lh=new Date,Oh=new Date;function rt(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const u=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return u;let l;do u.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return u},i.filter=a=>rt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Lh.setTime(+a),Oh.setTime(+o),e(Lh),e(Oh),Math.floor(n(Lh,Oh))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Sa=rt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Sa.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?rt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Sa),Sa.range;const ir=1e3,tn=ir*60,ar=tn*60,or=ar*24,Nh=or*7,Jm=or*30,zh=or*365,sr=rt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,e=>e.getUTCSeconds());sr.range;const Gu=rt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ir)},(e,t)=>{e.setTime(+e+t*tn)},(e,t)=>(t-e)/tn,e=>e.getMinutes());Gu.range;const Hu=rt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*tn)},(e,t)=>(t-e)/tn,e=>e.getUTCMinutes());Hu.range;const Vu=rt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ir-e.getMinutes()*tn)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());Vu.range;const ju=rt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());ju.range;const Pr=rt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*tn)/or,e=>e.getDate()-1);Pr.range;const Si=rt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/or,e=>e.getUTCDate()-1);Si.range;const e1=rt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/or,e=>Math.floor(e/or));e1.range;function Ci(e){return rt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*tn)/Nh)}const Jo=Ci(0),$u=Ci(1),rS=Ci(2),iS=Ci(3),Ca=Ci(4),aS=Ci(5),oS=Ci(6);Jo.range,$u.range,rS.range,iS.range,Ca.range,aS.range,oS.range;function ki(e){return rt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Nh)}const es=ki(0),qu=ki(1),sS=ki(2),lS=ki(3),ka=ki(4),uS=ki(5),cS=ki(6);es.range,qu.range,sS.range,lS.range,ka.range,uS.range,cS.range;const ts=rt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ts.range;const ns=rt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ns.range;const Pn=rt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Pn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:rt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Pn.range;const Ln=rt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ln.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:rt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Ln.range;function t1(e,t,n,r,i,a){const o=[[sr,1,ir],[sr,5,5*ir],[sr,15,15*ir],[sr,30,30*ir],[a,1,tn],[a,5,5*tn],[a,15,15*tn],[a,30,30*tn],[i,1,ar],[i,3,3*ar],[i,6,6*ar],[i,12,12*ar],[r,1,or],[r,2,2*or],[n,1,Nh],[t,1,Jm],[t,3,3*Jm],[e,1,zh]];function s(l,c,f){const h=c<l;h&&([l,c]=[c,l]);const d=f&&typeof f.range=="function"?f:u(l,c,f),p=d?d.range(l,+c+1):[];return h?p.reverse():p}function u(l,c,f){const h=Math.abs(c-l)/f,d=Mu(([,,y])=>y).right(o,h);if(d===o.length)return e.every(Fr(l/zh,c/zh,f));if(d===0)return Sa.every(Math.max(Fr(l,c,f),1));const[p,m]=o[h/o[d-1][2]<o[d][2]/h?d-1:d];return p.every(m)}return[s,u]}const[fS,hS]=t1(Ln,ns,es,e1,ju,Hu),[dS,pS]=t1(Pn,ts,Jo,Pr,Vu,Gu),rs="year",is="quarter",as="month",os="week",ss="date",Wu="day",Uh="dayofyear",ls="hours",us="minutes",cs="seconds",Zu="milliseconds";[rs,is,as,os,ss,Wu,Uh,ls,us,cs,Zu].reduce((e,t,n)=>(e[t]=1+n,e),{});const gS={[rs]:Pn,[is]:ts.every(3),[as]:ts,[os]:Jo,[ss]:Pr,[Wu]:Pr,[Uh]:Pr,[ls]:Vu,[us]:Gu,[cs]:sr,[Zu]:Sa},mS={[rs]:Ln,[is]:ns.every(3),[as]:ns,[os]:es,[ss]:Si,[Wu]:Si,[Uh]:Si,[ls]:ju,[us]:Hu,[cs]:sr,[Zu]:Sa};function bS(e){return gS[e]}function yS(e){return mS[e]}function Gh(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 Hh(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 fs(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function n1(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,u=e.shortMonths,l=hs(i),c=ds(i),f=hs(a),h=ds(a),d=hs(o),p=ds(o),m=hs(s),y=ds(s),w=hs(u),A=ds(u),S={a:De,A:Ke,b:We,B:Je,c:null,d:l1,e:l1,f:GS,g:XS,G:JS,H:NS,I:zS,j:US,L:u1,m:HS,M:VS,p:_e,q:Se,Q:g1,s:m1,S:jS,u:$S,U:qS,V:WS,w:ZS,W:YS,x:null,X:null,y:QS,Y:KS,Z:eC,"%":p1},_={a:gt,A:$t,b:Ne,B:L,c:null,d:f1,e:f1,f:iC,g:pC,G:mC,H:tC,I:nC,j:rC,L:h1,m:aC,M:oC,p:P,q:$,Q:g1,s:m1,S:sC,u:lC,U:uC,V:cC,w:fC,W:hC,x:null,X:null,y:dC,Y:gC,Z:bC,"%":p1},T={a:G,A:N,b:re,B:se,c:te,d:o1,e:o1,f:MS,g:a1,G:i1,H:s1,I:s1,j:BS,L:FS,m:IS,M:DS,p:M,q:TS,Q:LS,s:OS,S:RS,u:ES,U:_S,V:SS,w:AS,W:CS,x:ge,X:Xe,y:a1,Y:i1,Z:kS,"%":PS};S.x=I(n,S),S.X=I(r,S),S.c=I(t,S),_.x=I(n,_),_.X=I(r,_),_.c=I(t,_);function I(V,Z){return function(C){var x=[],H=-1,q=0,ue=V.length,ne,ce,qt;for(C instanceof Date||(C=new Date(+C));++H<ue;)V.charCodeAt(H)===37&&(x.push(V.slice(q,H)),(ce=r1[ne=V.charAt(++H)])!=null?ne=V.charAt(++H):ce=ne==="e"?" ":"0",(qt=Z[ne])&&(ne=qt(C,ce)),x.push(ne),q=H+1);return x.push(V.slice(q,H)),x.join("")}}function B(V,Z){return function(C){var x=fs(1900,void 0,1),H=R(x,V,C+="",0),q,ue;if(H!=C.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(Z&&!("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?(q=Hh(fs(x.y,0,1)),ue=q.getUTCDay(),q=ue>4||ue===0?qu.ceil(q):qu(q),q=Si.offset(q,(x.V-1)*7),x.y=q.getUTCFullYear(),x.m=q.getUTCMonth(),x.d=q.getUTCDate()+(x.w+6)%7):(q=Gh(fs(x.y,0,1)),ue=q.getDay(),q=ue>4||ue===0?$u.ceil(q):$u(q),q=Pr.offset(q,(x.V-1)*7),x.y=q.getFullYear(),x.m=q.getMonth(),x.d=q.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),ue="Z"in x?Hh(fs(x.y,0,1)).getUTCDay():Gh(fs(x.y,0,1)).getDay(),x.m=0,x.d="W"in x?(x.w+6)%7+x.W*7-(ue+5)%7:x.w+x.U*7-(ue+6)%7);return"Z"in x?(x.H+=x.Z/100|0,x.M+=x.Z%100,Hh(x)):Gh(x)}}function R(V,Z,C,x){for(var H=0,q=Z.length,ue=C.length,ne,ce;H<q;){if(x>=ue)return-1;if(ne=Z.charCodeAt(H++),ne===37){if(ne=Z.charAt(H++),ce=T[ne in r1?Z.charAt(H++):ne],!ce||(x=ce(V,C,x))<0)return-1}else if(ne!=C.charCodeAt(x++))return-1}return x}function M(V,Z,C){var x=l.exec(Z.slice(C));return x?(V.p=c.get(x[0].toLowerCase()),C+x[0].length):-1}function G(V,Z,C){var x=d.exec(Z.slice(C));return x?(V.w=p.get(x[0].toLowerCase()),C+x[0].length):-1}function N(V,Z,C){var x=f.exec(Z.slice(C));return x?(V.w=h.get(x[0].toLowerCase()),C+x[0].length):-1}function re(V,Z,C){var x=w.exec(Z.slice(C));return x?(V.m=A.get(x[0].toLowerCase()),C+x[0].length):-1}function se(V,Z,C){var x=m.exec(Z.slice(C));return x?(V.m=y.get(x[0].toLowerCase()),C+x[0].length):-1}function te(V,Z,C){return R(V,t,Z,C)}function ge(V,Z,C){return R(V,n,Z,C)}function Xe(V,Z,C){return R(V,r,Z,C)}function De(V){return o[V.getDay()]}function Ke(V){return a[V.getDay()]}function We(V){return u[V.getMonth()]}function Je(V){return s[V.getMonth()]}function _e(V){return i[+(V.getHours()>=12)]}function Se(V){return 1+~~(V.getMonth()/3)}function gt(V){return o[V.getUTCDay()]}function $t(V){return a[V.getUTCDay()]}function Ne(V){return u[V.getUTCMonth()]}function L(V){return s[V.getUTCMonth()]}function P(V){return i[+(V.getUTCHours()>=12)]}function $(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var Z=I(V+="",S);return Z.toString=function(){return V},Z},parse:function(V){var Z=B(V+="",!1);return Z.toString=function(){return V},Z},utcFormat:function(V){var Z=I(V+="",_);return Z.toString=function(){return V},Z},utcParse:function(V){var Z=B(V+="",!0);return Z.toString=function(){return V},Z}}}var r1={"-":"",_:" ",0:"0"},ut=/^\s*\d+/,wS=/^%/,vS=/[\\^$*+?|[\]().{}]/g;function ye(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function xS(e){return e.replace(vS,"\\$&")}function hs(e){return new RegExp("^(?:"+e.map(xS).join("|")+")","i")}function ds(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function AS(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ES(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function _S(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function SS(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function CS(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function i1(e,t,n){var r=ut.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function a1(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function kS(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 TS(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function IS(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function o1(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function BS(e,t,n){var r=ut.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function s1(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function DS(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function RS(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function FS(e,t,n){var r=ut.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function MS(e,t,n){var r=ut.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function PS(e,t,n){var r=wS.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function LS(e,t,n){var r=ut.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function OS(e,t,n){var r=ut.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function l1(e,t){return ye(e.getDate(),t,2)}function NS(e,t){return ye(e.getHours(),t,2)}function zS(e,t){return ye(e.getHours()%12||12,t,2)}function US(e,t){return ye(1+Pr.count(Pn(e),e),t,3)}function u1(e,t){return ye(e.getMilliseconds(),t,3)}function GS(e,t){return u1(e,t)+"000"}function HS(e,t){return ye(e.getMonth()+1,t,2)}function VS(e,t){return ye(e.getMinutes(),t,2)}function jS(e,t){return ye(e.getSeconds(),t,2)}function $S(e){var t=e.getDay();return t===0?7:t}function qS(e,t){return ye(Jo.count(Pn(e)-1,e),t,2)}function c1(e){var t=e.getDay();return t>=4||t===0?Ca(e):Ca.ceil(e)}function WS(e,t){return e=c1(e),ye(Ca.count(Pn(e),e)+(Pn(e).getDay()===4),t,2)}function ZS(e){return e.getDay()}function YS(e,t){return ye($u.count(Pn(e)-1,e),t,2)}function QS(e,t){return ye(e.getFullYear()%100,t,2)}function XS(e,t){return e=c1(e),ye(e.getFullYear()%100,t,2)}function KS(e,t){return ye(e.getFullYear()%1e4,t,4)}function JS(e,t){var n=e.getDay();return e=n>=4||n===0?Ca(e):Ca.ceil(e),ye(e.getFullYear()%1e4,t,4)}function eC(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function f1(e,t){return ye(e.getUTCDate(),t,2)}function tC(e,t){return ye(e.getUTCHours(),t,2)}function nC(e,t){return ye(e.getUTCHours()%12||12,t,2)}function rC(e,t){return ye(1+Si.count(Ln(e),e),t,3)}function h1(e,t){return ye(e.getUTCMilliseconds(),t,3)}function iC(e,t){return h1(e,t)+"000"}function aC(e,t){return ye(e.getUTCMonth()+1,t,2)}function oC(e,t){return ye(e.getUTCMinutes(),t,2)}function sC(e,t){return ye(e.getUTCSeconds(),t,2)}function lC(e){var t=e.getUTCDay();return t===0?7:t}function uC(e,t){return ye(es.count(Ln(e)-1,e),t,2)}function d1(e){var t=e.getUTCDay();return t>=4||t===0?ka(e):ka.ceil(e)}function cC(e,t){return e=d1(e),ye(ka.count(Ln(e),e)+(Ln(e).getUTCDay()===4),t,2)}function fC(e){return e.getUTCDay()}function hC(e,t){return ye(qu.count(Ln(e)-1,e),t,2)}function dC(e,t){return ye(e.getUTCFullYear()%100,t,2)}function pC(e,t){return e=d1(e),ye(e.getUTCFullYear()%100,t,2)}function gC(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function mC(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ka(e):ka.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function bC(){return"+0000"}function p1(){return"%"}function g1(e){return+e}function m1(e){return Math.floor(+e/1e3)}var Ta,Vh,b1,jh,y1;yC({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 yC(e){return Ta=n1(e),Vh=Ta.format,b1=Ta.parse,jh=Ta.utcFormat,y1=Ta.utcParse,Ta}function ps(e){const t={};return n=>t[n]||(t[n]=e(n))}function wC(e,t){return n=>{const r=e(n),i=r.indexOf(t);if(i<0)return r;let a=vC(r,i);const o=a<r.length?r.slice(a):"";for(;--a>i;)if(r[a]!=="0"){++a;break}return r.slice(0,a)+o}}function vC(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 xC(e){const t=ps(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(r){const i=Mr(r||",");if(i.precision==null){switch(i.precision=12,i.type){case"%":i.precision-=2;break;case"e":i.precision-=1;break}return wC(t(i),t(".1f")(1)[1])}else return t(i)},formatSpan(r,i,a,o){o=Mr(o??",f");const s=Fr(r,i,a),u=Math.max(Math.abs(r),Math.abs(i));let l;if(o.precision==null)switch(o.type){case"s":return isNaN(l=Xm(s,u))||(o.precision=l),n(o,u);case"":case"e":case"g":case"p":case"r":{isNaN(l=Km(s,u))||(o.precision=l-(o.type==="e"));break}case"f":case"%":{isNaN(l=Qm(s))||(o.precision=l-(o.type==="%")*2);break}}return t(o)}}}AC();function AC(){return xC({format:mt,formatPrefix:Ph})}function w1(e,t,n){n=n||{},kt(n)||Qe(`Invalid time multi-format specifier: ${n}`);const r=t(cs),i=t(us),a=t(ls),o=t(ss),s=t(os),u=t(as),l=t(is),c=t(rs),f=e(n[Zu]||".%L"),h=e(n[cs]||":%S"),d=e(n[us]||"%I:%M"),p=e(n[ls]||"%I %p"),m=e(n[ss]||n[Wu]||"%a %d"),y=e(n[os]||"%b %d"),w=e(n[as]||"%B"),A=e(n[is]||"%B"),S=e(n[rs]||"%Y");return _=>(r(_)<_?f:i(_)<_?h:a(_)<_?d:o(_)<_?p:u(_)<_?s(_)<_?m:y:c(_)<_?l(_)<_?w:A:S)(_)}function v1(e){const t=ps(e.format),n=ps(e.utcFormat);return{timeFormat:r=>Ue(r)?t(r):w1(t,bS,r),utcFormat:r=>Ue(r)?n(r):w1(n,yS,r),timeParse:ps(e.parse),utcParse:ps(e.utcParse)}}let $h;EC();function EC(){return $h=v1({format:Vh,parse:b1,utcFormat:jh,utcParse:y1})}function _C(e){return v1(n1(e))}function SC(e){return arguments.length?$h=_C(e):$h}const CC=/^(data:|([A-Za-z]+:)?\/\/)/,kC=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,TC=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,x1="file://";function IC(e,t){return n=>({options:n||{},sanitize:DC,load:BC,fileAccess:!!t,file:RC(t),http:MC(e)})}async function BC(e,t){const n=await this.sanitize(e,t),r=n.href;return n.localFile?this.file(r):this.http(r,t)}async function DC(e,t){t=Th({},this.options,t);const n=this.fileAccess,r={href:null};let i,a,o;const s=kC.test(e.replace(TC,""));(e==null||typeof e!="string"||!s)&&Qe("Sanitize failure, invalid URI: "+Ru(e));const u=CC.test(e);return(o=t.baseURL)&&!u&&(!e.startsWith("/")&&!o.endsWith("/")&&(e="/"+e),e=o+e),a=(i=e.startsWith(x1))||t.mode==="file"||t.mode!=="http"&&!u&&n,i?e=e.slice(x1.length):e.startsWith("//")&&(t.defaultProtocol==="file"?(e=e.slice(2),a=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(r,"localFile",{value:!!a}),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 RC(e){return e?t=>new Promise((n,r)=>{e.readFile(t,(i,a)=>{i?r(i):n(a)})}):FC}async function FC(){Qe("No file system access.")}function MC(e){return e?async function(t,n){const r=Th({},this.options.http,n),i=n&&n.response,a=await e(t,r);return a.ok?Pt(a[i])?a[i]():a.text():Qe(a.status+""+a.statusText)}:PC}async function PC(){Qe("No HTTP fetch method available.")}const LC=e=>e!=null&&e===e,OC=e=>e==="true"||e==="false"||e===!0||e===!1,NC=e=>!Number.isNaN(Date.parse(e)),A1=e=>!Number.isNaN(+e)&&!(e instanceof Date),zC=e=>A1(e)&&Number.isInteger(+e),E1={boolean:A4,integer:Zo,number:Zo,date:_4,string:S4,unknown:Tu},Yu=[OC,zC,A1,NC],UC=["boolean","integer","number","date"];function GC(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=Yu.length,i=Yu.map((a,o)=>o+1);for(let a=0,o=0,s,u;a<n;++a)for(u=t?e[a][t]:e[a],s=0;s<r;++s)if(i[s]&&LC(u)&&!Yu[s](u)&&(i[s]=0,++o,o===Yu.length))return"string";return UC[i.reduce((a,o)=>a===0?o:a,0)-1]}function HC(e,t){return t.reduce((n,r)=>(n[r]=GC(e,r),n),{})}function _1(e){const t=function(n,r){const i={delimiter:e};return qh(n,r?Th(r,i):i)};return t.responseType="text",t}function qh(e,t){return t.header&&(e=t.header.map(Ru).join(t.delimiter)+`
6
- `+e),Lm(t.delimiter).parse(e+"")}qh.responseType="text";function VC(e){return typeof Buffer=="function"&&Pt(Buffer.isBuffer)?Buffer.isBuffer(e):!1}function Wh(e,t){const n=t&&t.property?ku(t.property):Tu;return kt(e)&&!VC(e)?jC(n(e),t):n(JSON.parse(e))}Wh.responseType="json";function jC(e,t){return!xt(e)&&v4(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}const $C={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function S1(e,t){let n,r,i,a;return e=Wh(e,t),t&&t.feature?(n=M4,i=t.feature):t&&t.mesh?(n=L4,i=t.mesh,a=$C[t.filter]):Qe("Missing TopoJSON feature or mesh parameter."),r=(r=e.objects[i])?n(e,r,a):Qe("Invalid TopoJSON object: "+i),r&&r.features||[r]}S1.responseType="json";const Zh={dsv:qh,csv:_1(","),tsv:_1(" "),json:Wh,topojson:S1};function C1(e,t){return arguments.length>1?(Zh[e]=t,this):Ea(Zh,e)?Zh[e]:null}function k1(e,t,n,r){t=t||{};const i=C1(t.type||"json");return i||Qe("Unknown data format type: "+t.type),e=i(e,t),t.parse&&qC(e,t.parse,n,r),Ea(e,"columns")&&delete e.columns,e}function qC(e,t,n,r){if(!e.length)return;const i=SC();n=n||i.timeParse,r=r||i.utcParse;let a=e.columns||Object.keys(e[0]),o,s,u,l,c,f;t==="auto"&&(t=HC(e,a)),a=Object.keys(t);const h=a.map(d=>{const p=t[d];let m,y;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return m=p.split(/:(.+)?/,2),y=m[1],(y[0]==="'"&&y[y.length-1]==="'"||y[0]==='"'&&y[y.length-1]==='"')&&(y=y.slice(1,-1)),(m[0]==="utc"?r:n)(y);if(!E1[p])throw Error("Illegal format pattern: "+d+":"+p);return E1[p]});for(u=0,c=e.length,f=a.length;u<c;++u)for(o=e[u],l=0;l<f;++l)s=a[l],o[s]=h[l](o[s])}const Qu=IC(typeof fetch<"u"&&fetch,null);/**
5
+ `)}function l(f){return f.map(c).join(e)}function c(f){return f==null?"":f instanceof Date?D4(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:u,formatRow:l,formatValue:c}}var R4=Om(" "),F4=R4.parseRows;function M4(e){return e}function P4(e){if(e==null)return M4;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(s,u){u||(t=n=0);var l=2,c=s.length,f=new Array(c);for(f[0]=(t+=s[0])*r+a,f[1]=(n+=s[1])*i+o;l<c;)f[l]=s[l],++l;return f}}function L4(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function O4(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return Nm(e,n)})}:Nm(e,t)}function Nm(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,a=zm(e,t);return n==null&&r==null?{type:"Feature",properties:i,geometry:a}:r==null?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function zm(e,t){var n=P4(e.transform),r=e.arcs;function i(c,f){f.length&&f.pop();for(var h=r[c<0?~c:c],d=0,p=h.length;d<p;++d)f.push(n(h[d],d));c<0&&L4(f,p)}function a(c){return n(c)}function o(c){for(var f=[],h=0,d=c.length;h<d;++h)i(c[h],f);return f.length<2&&f.push(f[0]),f}function s(c){for(var f=o(c);f.length<4;)f.push(f[0]);return f}function u(c){return c.map(s)}function l(c){var f=c.type,h;switch(f){case"GeometryCollection":return{type:f,geometries:c.geometries.map(l)};case"Point":h=a(c.coordinates);break;case"MultiPoint":h=c.coordinates.map(a);break;case"LineString":h=o(c.arcs);break;case"MultiLineString":h=c.arcs.map(o);break;case"Polygon":h=u(c.arcs);break;case"MultiPolygon":h=c.arcs.map(u);break;default:return null}return{type:f,coordinates:h}}return l(t)}function N4(e,t){var n={},r={},i={},a=[],o=-1;t.forEach(function(l,c){var f=e.arcs[l<0?~l:l],h;f.length<3&&!f[1][0]&&!f[1][1]&&(h=t[++o],t[o]=l,t[c]=h)}),t.forEach(function(l){var c=s(l),f=c[0],h=c[1],d,p;if(d=i[f])if(delete i[d.end],d.push(l),d.end=h,p=r[h]){delete r[p.start];var m=p===d?d:d.concat(p);r[m.start=d.start]=i[m.end=p.end]=m}else r[d.start]=i[d.end]=d;else if(d=r[h])if(delete r[d.start],d.unshift(l),d.start=f,p=i[f]){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=f]=i[d.end=h]=d});function s(l){var c=e.arcs[l<0?~l:l],f=c[0],h;return e.transform?(h=[0,0],c.forEach(function(d){h[0]+=d[0],h[1]+=d[1]})):h=c[c.length-1],l<0?[h,f]:[f,h]}function u(l,c){for(var f in l){var h=l[f];delete c[h.start],delete h.start,delete h.end,h.forEach(function(d){n[d<0?~d:d]=1}),a.push(h)}}return u(i,r),u(r,i),t.forEach(function(l){n[l<0?~l:l]||a.push([l])}),a}function z4(e){return zm(e,U4.apply(this,arguments))}function U4(e,t,n){var r,i,a;if(arguments.length>1)r=G4(e,t,n);else for(i=0,r=new Array(a=e.arcs.length);i<a;++i)r[i]=i;return{type:"MultiLineString",arcs:N4(e,r)}}function G4(e,t,n){var r=[],i=[],a;function o(f){var h=f<0?~f:f;(i[h]||(i[h]=[])).push({i:f,g:a})}function s(f){f.forEach(o)}function u(f){f.forEach(s)}function l(f){f.forEach(u)}function c(f){switch(a=f,f.type){case"GeometryCollection":f.geometries.forEach(c);break;case"LineString":s(f.arcs);break;case"MultiLineString":case"Polygon":u(f.arcs);break;case"MultiPolygon":l(f.arcs);break}}return c(t),i.forEach(n==null?function(f){r.push(f[0].i)}:function(f){n(f[0].g,f[f.length-1].g)&&r.push(f[0].i)}),r}function Xo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function H4(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Pu(e){let t,n,r;e.length!==2?(t=Xo,n=(s,u)=>Xo(e(s),u),r=(s,u)=>e(s)-u):(t=e===Xo||e===H4?e:V4,n=e,r=e);function i(s,u,l=0,c=s.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:o,right:a}}function V4(){return 0}function Um(e){return e===null?NaN:+e}const Gm=Pu(Xo),Dr=Gm.right;Gm.left,Pu(Um).center;function j4(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 a of e)(a=t(a,++i,e))!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}class Rr extends Map{constructor(t,n=W4){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(Hm(this,t))}has(t){return super.has(Hm(this,t))}set(t,n){return super.set($4(this,t),n)}delete(t){return super.delete(q4(this,t))}}function Hm({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function $4({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function q4({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function W4(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Rh(e){return e}function Lu(e,...t){return Vm(e,Rh,Rh,t)}function Z4(e,...t){return Vm(e,Array.from,Rh,t)}function Vm(e,t,n,r){return function i(a,o){if(o>=r.length)return n(a);const s=new Rr,u=r[o++];let l=-1;for(const c of a){const f=u(c,++l,a),h=s.get(f);h?h.push(c):s.set(f,[c])}for(const[c,f]of s)s.set(c,i(f,o));return t(s)}(e,0)}const Y4=Math.sqrt(50),Q4=Math.sqrt(10),X4=Math.sqrt(2);function Ou(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=Y4?10:a>=Q4?5:a>=X4?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(e*l),u=Math.round(t*l),s/l<e&&++s,u/l>t&&--u,l=-l):(l=Math.pow(10,i)*o,s=Math.round(e/l),u=Math.round(t/l),s*l<e&&++s,u*l>t&&--u),u<s&&.5<=n&&n<2?Ou(e,t,n*2):[s,u,l]}function Nu(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?Ou(t,e,n):Ou(e,t,n);if(!(a>=i))return[];const s=a-i+1,u=new Array(s);if(r)if(o<0)for(let l=0;l<s;++l)u[l]=(a-l)/-o;else for(let l=0;l<s;++l)u[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)u[l]=(i+l)/-o;else for(let l=0;l<s;++l)u[l]=(i+l)*o;return u}function Fh(e,t,n){return t=+t,e=+e,n=+n,Ou(e,t,n)[2]}function Fr(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Fh(t,e,n):Fh(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function jm(e,t,n=Um){if(!(!(r=e.length)||isNaN(t=+t))){if(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,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function Ko(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,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function zu(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 K4(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Uu(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 _a(e){return e=Uu(Math.abs(e)),e?e[1]:NaN}function J4(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function eS(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var tS=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mr(e){if(!(t=tS.exec(e)))throw new Error("invalid format: "+e);var t;return new Mh({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]})}Mr.prototype=Mh.prototype;function Mh(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+""}Mh.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 nS(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 $m;function rS(e,t){var n=Uu(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-($m=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Uu(e,Math.max(0,t+a-1))[0]}function qm(e,t){var n=Uu(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 Wm={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:K4,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)=>qm(e*100,t),r:qm,s:rS,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Zm(e){return e}var Ym=Array.prototype.map,Qm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function iS(e){var t=e.grouping===void 0||e.thousands===void 0?Zm:J4(Ym.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+"",a=e.numerals===void 0?Zm:eS(Ym.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Mr(f);var h=f.fill,d=f.align,p=f.sign,m=f.symbol,y=f.zero,w=f.width,A=f.comma,S=f.precision,_=f.trim,T=f.type;T==="n"?(A=!0,T="g"):Wm[T]||(S===void 0&&(S=12),_=!0,T="g"),(y||h==="0"&&d==="=")&&(y=!0,h="0",d="=");var I=m==="$"?n:m==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",B=m==="$"?r:/[%p]/.test(T)?o:"",R=Wm[T],M=/[defgprs%]/.test(T);S=S===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function G(N){var re=I,se=B,te,ge,Xe;if(T==="c")se=R(N)+se,N="";else{N=+N;var De=N<0||1/N<0;if(N=isNaN(N)?u:R(Math.abs(N),S),_&&(N=nS(N)),De&&+N==0&&p!=="+"&&(De=!1),re=(De?p==="("?p:s:p==="-"||p==="("?"":p)+re,se=(T==="s"?Qm[8+$m/3]:"")+se+(De&&p==="("?")":""),M){for(te=-1,ge=N.length;++te<ge;)if(Xe=N.charCodeAt(te),48>Xe||Xe>57){se=(Xe===46?i+N.slice(te+1):N.slice(te))+se,N=N.slice(0,te);break}}}A&&!y&&(N=t(N,1/0));var Je=re.length+N.length+se.length,We=Je<w?new Array(w-Je+1).join(h):"";switch(A&&y&&(N=t(We+N,We.length?w-se.length:1/0),We=""),d){case"<":N=re+N+se+We;break;case"=":N=re+We+N+se;break;case"^":N=We.slice(0,Je=We.length>>1)+re+N+se+We.slice(Je);break;default:N=We+re+N+se;break}return a(N)}return G.toString=function(){return f+""},G}function c(f,h){var d=l((f=Mr(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(_a(h)/3)))*3,m=Math.pow(10,-p),y=Qm[8+p/3];return function(w){return d(m*w)+y}}return{format:l,formatPrefix:c}}var Gu,mt,Ph;aS({thousands:",",grouping:[3],currency:["$",""]});function aS(e){return Gu=iS(e),mt=Gu.format,Ph=Gu.formatPrefix,Gu}function Xm(e){return Math.max(0,-_a(Math.abs(e)))}function Km(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_a(t)/3)))*3-_a(Math.abs(e)))}function Jm(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_a(t)-_a(e))+1}const Lh=new Date,Oh=new Date;function at(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const u=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return u;let l;do u.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return u},i.filter=a=>at(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Lh.setTime(+a),Oh.setTime(+o),e(Lh),e(Oh),Math.floor(n(Lh,Oh))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Sa=at(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Sa.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?at(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Sa),Sa.range;const ir=1e3,rn=ir*60,ar=rn*60,or=ar*24,Nh=or*7,e1=or*30,zh=or*365,sr=at(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ir)},(e,t)=>(t-e)/ir,e=>e.getUTCSeconds());sr.range;const Hu=at(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ir)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getMinutes());Hu.range;const Vu=at(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getUTCMinutes());Vu.range;const ju=at(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ir-e.getMinutes()*rn)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());ju.range;const $u=at(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());$u.range;const Pr=at(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*rn)/or,e=>e.getDate()-1);Pr.range;const Si=at(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/or,e=>e.getUTCDate()-1);Si.range;const t1=at(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/or,e=>Math.floor(e/or));t1.range;function Ci(e){return at(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*rn)/Nh)}const Jo=Ci(0),qu=Ci(1),oS=Ci(2),sS=Ci(3),Ca=Ci(4),lS=Ci(5),uS=Ci(6);Jo.range,qu.range,oS.range,sS.range,Ca.range,lS.range,uS.range;function ki(e){return at(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Nh)}const es=ki(0),Wu=ki(1),cS=ki(2),fS=ki(3),ka=ki(4),hS=ki(5),dS=ki(6);es.range,Wu.range,cS.range,fS.range,ka.range,hS.range,dS.range;const ts=at(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ts.range;const ns=at(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ns.range;const Pn=at(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Pn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:at(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Pn.range;const Ln=at(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ln.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:at(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Ln.range;function n1(e,t,n,r,i,a){const o=[[sr,1,ir],[sr,5,5*ir],[sr,15,15*ir],[sr,30,30*ir],[a,1,rn],[a,5,5*rn],[a,15,15*rn],[a,30,30*rn],[i,1,ar],[i,3,3*ar],[i,6,6*ar],[i,12,12*ar],[r,1,or],[r,2,2*or],[n,1,Nh],[t,1,e1],[t,3,3*e1],[e,1,zh]];function s(l,c,f){const h=c<l;h&&([l,c]=[c,l]);const d=f&&typeof f.range=="function"?f:u(l,c,f),p=d?d.range(l,+c+1):[];return h?p.reverse():p}function u(l,c,f){const h=Math.abs(c-l)/f,d=Pu(([,,y])=>y).right(o,h);if(d===o.length)return e.every(Fr(l/zh,c/zh,f));if(d===0)return Sa.every(Math.max(Fr(l,c,f),1));const[p,m]=o[h/o[d-1][2]<o[d][2]/h?d-1:d];return p.every(m)}return[s,u]}const[pS,gS]=n1(Ln,ns,es,t1,$u,Vu),[mS,bS]=n1(Pn,ts,Jo,Pr,ju,Hu),rs="year",is="quarter",as="month",os="week",ss="date",Zu="day",Uh="dayofyear",ls="hours",us="minutes",cs="seconds",Yu="milliseconds";[rs,is,as,os,ss,Zu,Uh,ls,us,cs,Yu].reduce((e,t,n)=>(e[t]=1+n,e),{});const yS={[rs]:Pn,[is]:ts.every(3),[as]:ts,[os]:Jo,[ss]:Pr,[Zu]:Pr,[Uh]:Pr,[ls]:ju,[us]:Hu,[cs]:sr,[Yu]:Sa},wS={[rs]:Ln,[is]:ns.every(3),[as]:ns,[os]:es,[ss]:Si,[Zu]:Si,[Uh]:Si,[ls]:$u,[us]:Vu,[cs]:sr,[Yu]:Sa};function vS(e){return yS[e]}function xS(e){return wS[e]}function Gh(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 Hh(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 fs(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function r1(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,u=e.shortMonths,l=hs(i),c=ds(i),f=hs(a),h=ds(a),d=hs(o),p=ds(o),m=hs(s),y=ds(s),w=hs(u),A=ds(u),S={a:De,A:Je,b:We,B:et,c:null,d:u1,e:u1,f:jS,g:eC,G:nC,H:GS,I:HS,j:VS,L:c1,m:$S,M:qS,p:_e,q:Se,Q:m1,s:b1,S:WS,u:ZS,U:YS,V:QS,w:XS,W:KS,x:null,X:null,y:JS,Y:tC,Z:rC,"%":g1},_={a:gt,A:$t,b:Ne,B:L,c:null,d:h1,e:h1,f:sC,g:bC,G:wC,H:iC,I:aC,j:oC,L:d1,m:lC,M:uC,p:P,q:$,Q:m1,s:b1,S:cC,u:fC,U:hC,V:dC,w:pC,W:gC,x:null,X:null,y:mC,Y:yC,Z:vC,"%":g1},T={a:G,A:N,b:re,B:se,c:te,d:s1,e:s1,f:OS,g:o1,G:a1,H:l1,I:l1,j:FS,L:LS,m:RS,M:MS,p:M,q:DS,Q:zS,s:US,S:PS,u:CS,U:kS,V:TS,w:SS,W:IS,x:ge,X:Xe,y:o1,Y:a1,Z:BS,"%":NS};S.x=I(n,S),S.X=I(r,S),S.c=I(t,S),_.x=I(n,_),_.X=I(r,_),_.c=I(t,_);function I(V,Z){return function(C){var x=[],H=-1,q=0,ue=V.length,ne,ce,qt;for(C instanceof Date||(C=new Date(+C));++H<ue;)V.charCodeAt(H)===37&&(x.push(V.slice(q,H)),(ce=i1[ne=V.charAt(++H)])!=null?ne=V.charAt(++H):ce=ne==="e"?" ":"0",(qt=Z[ne])&&(ne=qt(C,ce)),x.push(ne),q=H+1);return x.push(V.slice(q,H)),x.join("")}}function B(V,Z){return function(C){var x=fs(1900,void 0,1),H=R(x,V,C+="",0),q,ue;if(H!=C.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(Z&&!("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?(q=Hh(fs(x.y,0,1)),ue=q.getUTCDay(),q=ue>4||ue===0?Wu.ceil(q):Wu(q),q=Si.offset(q,(x.V-1)*7),x.y=q.getUTCFullYear(),x.m=q.getUTCMonth(),x.d=q.getUTCDate()+(x.w+6)%7):(q=Gh(fs(x.y,0,1)),ue=q.getDay(),q=ue>4||ue===0?qu.ceil(q):qu(q),q=Pr.offset(q,(x.V-1)*7),x.y=q.getFullYear(),x.m=q.getMonth(),x.d=q.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),ue="Z"in x?Hh(fs(x.y,0,1)).getUTCDay():Gh(fs(x.y,0,1)).getDay(),x.m=0,x.d="W"in x?(x.w+6)%7+x.W*7-(ue+5)%7:x.w+x.U*7-(ue+6)%7);return"Z"in x?(x.H+=x.Z/100|0,x.M+=x.Z%100,Hh(x)):Gh(x)}}function R(V,Z,C,x){for(var H=0,q=Z.length,ue=C.length,ne,ce;H<q;){if(x>=ue)return-1;if(ne=Z.charCodeAt(H++),ne===37){if(ne=Z.charAt(H++),ce=T[ne in i1?Z.charAt(H++):ne],!ce||(x=ce(V,C,x))<0)return-1}else if(ne!=C.charCodeAt(x++))return-1}return x}function M(V,Z,C){var x=l.exec(Z.slice(C));return x?(V.p=c.get(x[0].toLowerCase()),C+x[0].length):-1}function G(V,Z,C){var x=d.exec(Z.slice(C));return x?(V.w=p.get(x[0].toLowerCase()),C+x[0].length):-1}function N(V,Z,C){var x=f.exec(Z.slice(C));return x?(V.w=h.get(x[0].toLowerCase()),C+x[0].length):-1}function re(V,Z,C){var x=w.exec(Z.slice(C));return x?(V.m=A.get(x[0].toLowerCase()),C+x[0].length):-1}function se(V,Z,C){var x=m.exec(Z.slice(C));return x?(V.m=y.get(x[0].toLowerCase()),C+x[0].length):-1}function te(V,Z,C){return R(V,t,Z,C)}function ge(V,Z,C){return R(V,n,Z,C)}function Xe(V,Z,C){return R(V,r,Z,C)}function De(V){return o[V.getDay()]}function Je(V){return a[V.getDay()]}function We(V){return u[V.getMonth()]}function et(V){return s[V.getMonth()]}function _e(V){return i[+(V.getHours()>=12)]}function Se(V){return 1+~~(V.getMonth()/3)}function gt(V){return o[V.getUTCDay()]}function $t(V){return a[V.getUTCDay()]}function Ne(V){return u[V.getUTCMonth()]}function L(V){return s[V.getUTCMonth()]}function P(V){return i[+(V.getUTCHours()>=12)]}function $(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var Z=I(V+="",S);return Z.toString=function(){return V},Z},parse:function(V){var Z=B(V+="",!1);return Z.toString=function(){return V},Z},utcFormat:function(V){var Z=I(V+="",_);return Z.toString=function(){return V},Z},utcParse:function(V){var Z=B(V+="",!0);return Z.toString=function(){return V},Z}}}var i1={"-":"",_:" ",0:"0"},ut=/^\s*\d+/,AS=/^%/,ES=/[\\^$*+?|[\]().{}]/g;function ye(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function _S(e){return e.replace(ES,"\\$&")}function hs(e){return new RegExp("^(?:"+e.map(_S).join("|")+")","i")}function ds(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function SS(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function CS(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function kS(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function TS(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function IS(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function a1(e,t,n){var r=ut.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function o1(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function BS(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 DS(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function RS(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function s1(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function FS(e,t,n){var r=ut.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function l1(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function MS(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function PS(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function LS(e,t,n){var r=ut.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function OS(e,t,n){var r=ut.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function NS(e,t,n){var r=AS.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function zS(e,t,n){var r=ut.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function US(e,t,n){var r=ut.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function u1(e,t){return ye(e.getDate(),t,2)}function GS(e,t){return ye(e.getHours(),t,2)}function HS(e,t){return ye(e.getHours()%12||12,t,2)}function VS(e,t){return ye(1+Pr.count(Pn(e),e),t,3)}function c1(e,t){return ye(e.getMilliseconds(),t,3)}function jS(e,t){return c1(e,t)+"000"}function $S(e,t){return ye(e.getMonth()+1,t,2)}function qS(e,t){return ye(e.getMinutes(),t,2)}function WS(e,t){return ye(e.getSeconds(),t,2)}function ZS(e){var t=e.getDay();return t===0?7:t}function YS(e,t){return ye(Jo.count(Pn(e)-1,e),t,2)}function f1(e){var t=e.getDay();return t>=4||t===0?Ca(e):Ca.ceil(e)}function QS(e,t){return e=f1(e),ye(Ca.count(Pn(e),e)+(Pn(e).getDay()===4),t,2)}function XS(e){return e.getDay()}function KS(e,t){return ye(qu.count(Pn(e)-1,e),t,2)}function JS(e,t){return ye(e.getFullYear()%100,t,2)}function eC(e,t){return e=f1(e),ye(e.getFullYear()%100,t,2)}function tC(e,t){return ye(e.getFullYear()%1e4,t,4)}function nC(e,t){var n=e.getDay();return e=n>=4||n===0?Ca(e):Ca.ceil(e),ye(e.getFullYear()%1e4,t,4)}function rC(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function h1(e,t){return ye(e.getUTCDate(),t,2)}function iC(e,t){return ye(e.getUTCHours(),t,2)}function aC(e,t){return ye(e.getUTCHours()%12||12,t,2)}function oC(e,t){return ye(1+Si.count(Ln(e),e),t,3)}function d1(e,t){return ye(e.getUTCMilliseconds(),t,3)}function sC(e,t){return d1(e,t)+"000"}function lC(e,t){return ye(e.getUTCMonth()+1,t,2)}function uC(e,t){return ye(e.getUTCMinutes(),t,2)}function cC(e,t){return ye(e.getUTCSeconds(),t,2)}function fC(e){var t=e.getUTCDay();return t===0?7:t}function hC(e,t){return ye(es.count(Ln(e)-1,e),t,2)}function p1(e){var t=e.getUTCDay();return t>=4||t===0?ka(e):ka.ceil(e)}function dC(e,t){return e=p1(e),ye(ka.count(Ln(e),e)+(Ln(e).getUTCDay()===4),t,2)}function pC(e){return e.getUTCDay()}function gC(e,t){return ye(Wu.count(Ln(e)-1,e),t,2)}function mC(e,t){return ye(e.getUTCFullYear()%100,t,2)}function bC(e,t){return e=p1(e),ye(e.getUTCFullYear()%100,t,2)}function yC(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function wC(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ka(e):ka.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function vC(){return"+0000"}function g1(){return"%"}function m1(e){return+e}function b1(e){return Math.floor(+e/1e3)}var Ta,Vh,y1,jh,w1;xC({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 xC(e){return Ta=r1(e),Vh=Ta.format,y1=Ta.parse,jh=Ta.utcFormat,w1=Ta.utcParse,Ta}function ps(e){const t={};return n=>t[n]||(t[n]=e(n))}function AC(e,t){return n=>{const r=e(n),i=r.indexOf(t);if(i<0)return r;let a=EC(r,i);const o=a<r.length?r.slice(a):"";for(;--a>i;)if(r[a]!=="0"){++a;break}return r.slice(0,a)+o}}function EC(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 _C(e){const t=ps(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(r){const i=Mr(r||",");if(i.precision==null){switch(i.precision=12,i.type){case"%":i.precision-=2;break;case"e":i.precision-=1;break}return AC(t(i),t(".1f")(1)[1])}else return t(i)},formatSpan(r,i,a,o){o=Mr(o??",f");const s=Fr(r,i,a),u=Math.max(Math.abs(r),Math.abs(i));let l;if(o.precision==null)switch(o.type){case"s":return isNaN(l=Km(s,u))||(o.precision=l),n(o,u);case"":case"e":case"g":case"p":case"r":{isNaN(l=Jm(s,u))||(o.precision=l-(o.type==="e"));break}case"f":case"%":{isNaN(l=Xm(s))||(o.precision=l-(o.type==="%")*2);break}}return t(o)}}}SC();function SC(){return _C({format:mt,formatPrefix:Ph})}function v1(e,t,n){n=n||{},kt(n)||Qe(`Invalid time multi-format specifier: ${n}`);const r=t(cs),i=t(us),a=t(ls),o=t(ss),s=t(os),u=t(as),l=t(is),c=t(rs),f=e(n[Yu]||".%L"),h=e(n[cs]||":%S"),d=e(n[us]||"%I:%M"),p=e(n[ls]||"%I %p"),m=e(n[ss]||n[Zu]||"%a %d"),y=e(n[os]||"%b %d"),w=e(n[as]||"%B"),A=e(n[is]||"%B"),S=e(n[rs]||"%Y");return _=>(r(_)<_?f:i(_)<_?h:a(_)<_?d:o(_)<_?p:u(_)<_?s(_)<_?m:y:c(_)<_?l(_)<_?w:A:S)(_)}function x1(e){const t=ps(e.format),n=ps(e.utcFormat);return{timeFormat:r=>Ue(r)?t(r):v1(t,vS,r),utcFormat:r=>Ue(r)?n(r):v1(n,xS,r),timeParse:ps(e.parse),utcParse:ps(e.utcParse)}}let $h;CC();function CC(){return $h=x1({format:Vh,parse:y1,utcFormat:jh,utcParse:w1})}function kC(e){return x1(r1(e))}function TC(e){return arguments.length?$h=kC(e):$h}const IC=/^(data:|([A-Za-z]+:)?\/\/)/,BC=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,DC=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,A1="file://";function RC(e,t){return n=>({options:n||{},sanitize:MC,load:FC,fileAccess:!!t,file:PC(t),http:OC(e)})}async function FC(e,t){const n=await this.sanitize(e,t),r=n.href;return n.localFile?this.file(r):this.http(r,t)}async function MC(e,t){t=Th({},this.options,t);const n=this.fileAccess,r={href:null};let i,a,o;const s=BC.test(e.replace(DC,""));(e==null||typeof e!="string"||!s)&&Qe("Sanitize failure, invalid URI: "+Fu(e));const u=IC.test(e);return(o=t.baseURL)&&!u&&(!e.startsWith("/")&&!o.endsWith("/")&&(e="/"+e),e=o+e),a=(i=e.startsWith(A1))||t.mode==="file"||t.mode!=="http"&&!u&&n,i?e=e.slice(A1.length):e.startsWith("//")&&(t.defaultProtocol==="file"?(e=e.slice(2),a=!0):e=(t.defaultProtocol||"http")+":"+e),Object.defineProperty(r,"localFile",{value:!!a}),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 PC(e){return e?t=>new Promise((n,r)=>{e.readFile(t,(i,a)=>{i?r(i):n(a)})}):LC}async function LC(){Qe("No file system access.")}function OC(e){return e?async function(t,n){const r=Th({},this.options.http,n),i=n&&n.response,a=await e(t,r);return a.ok?Pt(a[i])?a[i]():a.text():Qe(a.status+""+a.statusText)}:NC}async function NC(){Qe("No HTTP fetch method available.")}const zC=e=>e!=null&&e===e,UC=e=>e==="true"||e==="false"||e===!0||e===!1,GC=e=>!Number.isNaN(Date.parse(e)),E1=e=>!Number.isNaN(+e)&&!(e instanceof Date),HC=e=>E1(e)&&Number.isInteger(+e),_1={boolean:S4,integer:Zo,number:Zo,date:k4,string:T4,unknown:Iu},Qu=[UC,HC,E1,GC],VC=["boolean","integer","number","date"];function jC(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=Qu.length,i=Qu.map((a,o)=>o+1);for(let a=0,o=0,s,u;a<n;++a)for(u=t?e[a][t]:e[a],s=0;s<r;++s)if(i[s]&&zC(u)&&!Qu[s](u)&&(i[s]=0,++o,o===Qu.length))return"string";return VC[i.reduce((a,o)=>a===0?o:a,0)-1]}function $C(e,t){return t.reduce((n,r)=>(n[r]=jC(e,r),n),{})}function S1(e){const t=function(n,r){const i={delimiter:e};return qh(n,r?Th(r,i):i)};return t.responseType="text",t}function qh(e,t){return t.header&&(e=t.header.map(Fu).join(t.delimiter)+`
6
+ `+e),Om(t.delimiter).parse(e+"")}qh.responseType="text";function qC(e){return typeof Buffer=="function"&&Pt(Buffer.isBuffer)?Buffer.isBuffer(e):!1}function Wh(e,t){const n=t&&t.property?Tu(t.property):Iu;return kt(e)&&!qC(e)?WC(n(e),t):n(JSON.parse(e))}Wh.responseType="json";function WC(e,t){return!xt(e)&&E4(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}const ZC={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function C1(e,t){let n,r,i,a;return e=Wh(e,t),t&&t.feature?(n=O4,i=t.feature):t&&t.mesh?(n=z4,i=t.mesh,a=ZC[t.filter]):Qe("Missing TopoJSON feature or mesh parameter."),r=(r=e.objects[i])?n(e,r,a):Qe("Invalid TopoJSON object: "+i),r&&r.features||[r]}C1.responseType="json";const Zh={dsv:qh,csv:S1(","),tsv:S1(" "),json:Wh,topojson:C1};function k1(e,t){return arguments.length>1?(Zh[e]=t,this):Ea(Zh,e)?Zh[e]:null}function T1(e,t,n,r){t=t||{};const i=k1(t.type||"json");return i||Qe("Unknown data format type: "+t.type),e=i(e,t),t.parse&&YC(e,t.parse,n,r),Ea(e,"columns")&&delete e.columns,e}function YC(e,t,n,r){if(!e.length)return;const i=TC();n=n||i.timeParse,r=r||i.utcParse;let a=e.columns||Object.keys(e[0]),o,s,u,l,c,f;t==="auto"&&(t=$C(e,a)),a=Object.keys(t);const h=a.map(d=>{const p=t[d];let m,y;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return m=p.split(/:(.+)?/,2),y=m[1],(y[0]==="'"&&y[y.length-1]==="'"||y[0]==='"'&&y[y.length-1]==='"')&&(y=y.slice(1,-1)),(m[0]==="utc"?r:n)(y);if(!_1[p])throw Error("Illegal format pattern: "+d+":"+p);return _1[p]});for(u=0,c=e.length,f=a.length;u<c;++u)for(o=e[u],l=0;l<f;++l)s=a[l],o[s]=h[l](o[s])}const Xu=RC(typeof fetch<"u"&&fetch,null);/**
7
7
  * @license
8
8
  * Copyright 2019 Google LLC
9
9
  * SPDX-License-Identifier: BSD-3-Clause
10
- */const Xu=globalThis,Yh=Xu.ShadowRoot&&(Xu.ShadyCSS===void 0||Xu.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,T1=Symbol(),I1=new WeakMap;let WC=class{constructor(t,n,r){if(this._$cssResult$=!0,r!==T1)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(Yh&&t===void 0){const r=n!==void 0&&n.length===1;r&&(t=I1.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&I1.set(n,t))}return t}toString(){return this.cssText}};const ZC=e=>new WC(typeof e=="string"?e:e+"",void 0,T1),YC=(e,t)=>{if(Yh)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of t){const r=document.createElement("style"),i=Xu.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,e.appendChild(r)}},B1=Yh?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const r of t.cssRules)n+=r.cssText;return ZC(n)})(e):e;/**
10
+ */const Ku=globalThis,Yh=Ku.ShadowRoot&&(Ku.ShadyCSS===void 0||Ku.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I1=Symbol(),B1=new WeakMap;let QC=class{constructor(t,n,r){if(this._$cssResult$=!0,r!==I1)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(Yh&&t===void 0){const r=n!==void 0&&n.length===1;r&&(t=B1.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&B1.set(n,t))}return t}toString(){return this.cssText}};const XC=e=>new QC(typeof e=="string"?e:e+"",void 0,I1),KC=(e,t)=>{if(Yh)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of t){const r=document.createElement("style"),i=Ku.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,e.appendChild(r)}},D1=Yh?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const r of t.cssRules)n+=r.cssText;return XC(n)})(e):e;/**
11
11
  * @license
12
12
  * Copyright 2017 Google LLC
13
13
  * SPDX-License-Identifier: BSD-3-Clause
14
- */const{is:QC,defineProperty:XC,getOwnPropertyDescriptor:KC,getOwnPropertyNames:JC,getOwnPropertySymbols:e6,getPrototypeOf:t6}=Object,Lr=globalThis,D1=Lr.trustedTypes,n6=D1?D1.emptyScript:"",Qh=Lr.reactiveElementPolyfillSupport,gs=(e,t)=>e,Xh={toAttribute(e,t){switch(t){case Boolean:e=e?n6:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},R1=(e,t)=>!QC(e,t),F1={attribute:!0,type:String,converter:Xh,reflect:!1,hasChanged:R1};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Lr.litPropertyMetadata??(Lr.litPropertyMetadata=new WeakMap);class Ia extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=F1){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(t,n),!n.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,n);i!==void 0&&XC(this.prototype,t,i)}}static getPropertyDescriptor(t,n,r){const{get:i,set:a}=KC(this.prototype,t)??{get(){return this[n]},set(o){this[n]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const s=i==null?void 0:i.call(this);a.call(this,o),this.requestUpdate(t,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??F1}static _$Ei(){if(this.hasOwnProperty(gs("elementProperties")))return;const t=t6(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(gs("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(gs("properties"))){const n=this.properties,r=[...JC(n),...e6(n)];for(const i of r)this.createProperty(i,n[i])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)n.unshift(B1(i))}else t!==void 0&&n.push(B1(t));return n}static _$Eu(t,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(n=>n(this))}addController(t){var n;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)==null||n.call(t))}removeController(t){var n;(n=this._$EO)==null||n.delete(t)}_$E_(){const t=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return YC(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(n=>{var r;return(r=n.hostConnected)==null?void 0:r.call(n)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(n=>{var r;return(r=n.hostDisconnected)==null?void 0:r.call(n)})}attributeChangedCallback(t,n,r){this._$AK(t,r)}_$EC(t,n){var a;const r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){const o=(((a=r.converter)==null?void 0:a.toAttribute)!==void 0?r.converter:Xh).toAttribute(n,r.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,n){var a;const r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:((a=o.converter)==null?void 0:a.fromAttribute)!==void 0?o.converter:Xh;this._$Em=i,this[i]=s.fromAttribute(n,o.type),this._$Em=null}}requestUpdate(t,n,r){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??R1)(this[t],n))return;this.P(t,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,n,r){this._$AL.has(t)||this._$AL.set(t,n),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,o]of this._$Ep)this[a]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[a,o]of i)o.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],o)}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(i=>{var a;return(a=i.hostUpdate)==null?void 0:a.call(i)}),this.update(n)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(n)}willUpdate(t){}_$AE(t){var n;(n=this._$EO)==null||n.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(t){}firstUpdated(t){}}Ia.elementStyles=[],Ia.shadowRootOptions={mode:"open"},Ia[gs("elementProperties")]=new Map,Ia[gs("finalized")]=new Map,Qh==null||Qh({ReactiveElement:Ia}),(Lr.reactiveElementVersions??(Lr.reactiveElementVersions=[])).push("2.0.4");/**
14
+ */const{is:JC,defineProperty:e6,getOwnPropertyDescriptor:t6,getOwnPropertyNames:n6,getOwnPropertySymbols:r6,getPrototypeOf:i6}=Object,Lr=globalThis,R1=Lr.trustedTypes,a6=R1?R1.emptyScript:"",Qh=Lr.reactiveElementPolyfillSupport,gs=(e,t)=>e,Xh={toAttribute(e,t){switch(t){case Boolean:e=e?a6:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},F1=(e,t)=>!JC(e,t),M1={attribute:!0,type:String,converter:Xh,reflect:!1,hasChanged:F1};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Lr.litPropertyMetadata??(Lr.litPropertyMetadata=new WeakMap);class Ia extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=M1){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(t,n),!n.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,n);i!==void 0&&e6(this.prototype,t,i)}}static getPropertyDescriptor(t,n,r){const{get:i,set:a}=t6(this.prototype,t)??{get(){return this[n]},set(o){this[n]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const s=i==null?void 0:i.call(this);a.call(this,o),this.requestUpdate(t,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??M1}static _$Ei(){if(this.hasOwnProperty(gs("elementProperties")))return;const t=i6(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(gs("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(gs("properties"))){const n=this.properties,r=[...n6(n),...r6(n)];for(const i of r)this.createProperty(i,n[i])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)n.unshift(D1(i))}else t!==void 0&&n.push(D1(t));return n}static _$Eu(t,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(n=>n(this))}addController(t){var n;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)==null||n.call(t))}removeController(t){var n;(n=this._$EO)==null||n.delete(t)}_$E_(){const t=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return KC(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(n=>{var r;return(r=n.hostConnected)==null?void 0:r.call(n)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(n=>{var r;return(r=n.hostDisconnected)==null?void 0:r.call(n)})}attributeChangedCallback(t,n,r){this._$AK(t,r)}_$EC(t,n){var a;const r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){const o=(((a=r.converter)==null?void 0:a.toAttribute)!==void 0?r.converter:Xh).toAttribute(n,r.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,n){var a;const r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:((a=o.converter)==null?void 0:a.fromAttribute)!==void 0?o.converter:Xh;this._$Em=i,this[i]=s.fromAttribute(n,o.type),this._$Em=null}}requestUpdate(t,n,r){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??F1)(this[t],n))return;this.P(t,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,n,r){this._$AL.has(t)||this._$AL.set(t,n),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,o]of this._$Ep)this[a]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[a,o]of i)o.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],o)}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(i=>{var a;return(a=i.hostUpdate)==null?void 0:a.call(i)}),this.update(n)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(n)}willUpdate(t){}_$AE(t){var n;(n=this._$EO)==null||n.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(t){}firstUpdated(t){}}Ia.elementStyles=[],Ia.shadowRootOptions={mode:"open"},Ia[gs("elementProperties")]=new Map,Ia[gs("finalized")]=new Map,Qh==null||Qh({ReactiveElement:Ia}),(Lr.reactiveElementVersions??(Lr.reactiveElementVersions=[])).push("2.0.4");/**
15
15
  * @license
16
16
  * Copyright 2017 Google LLC
17
17
  * SPDX-License-Identifier: BSD-3-Clause
18
- */const ms=globalThis,Ku=ms.trustedTypes,M1=Ku?Ku.createPolicy("lit-html",{createHTML:e=>e}):void 0,P1="$lit$",Or=`lit$${(Math.random()+"").slice(9)}$`,L1="?"+Or,r6=`<${L1}>`,Ti=document,bs=()=>Ti.createComment(""),ys=e=>e===null||typeof e!="object"&&typeof e!="function",O1=Array.isArray,i6=e=>O1(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Kh=`[
19
- \f\r]`,ws=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N1=/-->/g,z1=/>/g,Ii=RegExp(`>|${Kh}(?:([^\\s"'>=/]+)(${Kh}*=${Kh}*(?:[^
20
- \f\r"'\`<>=]|("|')|))|$)`,"g"),U1=/'/g,G1=/"/g,H1=/^(?:script|style|textarea|title)$/i,a6=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),it=a6(1),Bi=Symbol.for("lit-noChange"),at=Symbol.for("lit-nothing"),V1=new WeakMap,Di=Ti.createTreeWalker(Ti,129);function j1(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return M1!==void 0?M1.createHTML(t):t}const o6=(e,t)=>{const n=e.length-1,r=[];let i,a=t===2?"<svg>":"",o=ws;for(let s=0;s<n;s++){const u=e[s];let l,c,f=-1,h=0;for(;h<u.length&&(o.lastIndex=h,c=o.exec(u),c!==null);)h=o.lastIndex,o===ws?c[1]==="!--"?o=N1:c[1]!==void 0?o=z1:c[2]!==void 0?(H1.test(c[2])&&(i=RegExp("</"+c[2],"g")),o=Ii):c[3]!==void 0&&(o=Ii):o===Ii?c[0]===">"?(o=i??ws,f=-1):c[1]===void 0?f=-2:(f=o.lastIndex-c[2].length,l=c[1],o=c[3]===void 0?Ii:c[3]==='"'?G1:U1):o===G1||o===U1?o=Ii:o===N1||o===z1?o=ws:(o=Ii,i=void 0);const d=o===Ii&&e[s+1].startsWith("/>")?" ":"";a+=o===ws?u+r6:f>=0?(r.push(l),u.slice(0,f)+P1+u.slice(f)+Or+d):u+Or+(f===-2?s:d)}return[j1(e,a+(e[n]||"<?>")+(t===2?"</svg>":"")),r]};class vs{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0;const s=t.length-1,u=this.parts,[l,c]=o6(t,n);if(this.el=vs.createElement(l,r),Di.currentNode=this.el.content,n===2){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=Di.nextNode())!==null&&u.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(const f of i.getAttributeNames())if(f.endsWith(P1)){const h=c[o++],d=i.getAttribute(f).split(Or),p=/([.?@])?(.*)/.exec(h);u.push({type:1,index:a,name:p[2],strings:d,ctor:p[1]==="."?l6:p[1]==="?"?u6:p[1]==="@"?c6:Ju}),i.removeAttribute(f)}else f.startsWith(Or)&&(u.push({type:6,index:a}),i.removeAttribute(f));if(H1.test(i.tagName)){const f=i.textContent.split(Or),h=f.length-1;if(h>0){i.textContent=Ku?Ku.emptyScript:"";for(let d=0;d<h;d++)i.append(f[d],bs()),Di.nextNode(),u.push({type:2,index:++a});i.append(f[h],bs())}}}else if(i.nodeType===8)if(i.data===L1)u.push({type:2,index:a});else{let f=-1;for(;(f=i.data.indexOf(Or,f+1))!==-1;)u.push({type:7,index:a}),f+=Or.length-1}a++}}static createElement(t,n){const r=Ti.createElement("template");return r.innerHTML=t,r}}function Ba(e,t,n=e,r){var o,s;if(t===Bi)return t;let i=r!==void 0?(o=n._$Co)==null?void 0:o[r]:n._$Cl;const a=ys(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==a&&((s=i==null?void 0:i._$AO)==null||s.call(i,!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r!==void 0?(n._$Co??(n._$Co=[]))[r]=i:n._$Cl=i),i!==void 0&&(t=Ba(e,i._$AS(e,t.values),i,r)),t}class s6{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)??Ti).importNode(n,!0);Di.currentNode=i;let a=Di.nextNode(),o=0,s=0,u=r[0];for(;u!==void 0;){if(o===u.index){let l;u.type===2?l=new xs(a,a.nextSibling,this,t):u.type===1?l=new u.ctor(a,u.name,u.strings,this,t):u.type===6&&(l=new f6(a,this,t)),this._$AV.push(l),u=r[++s]}o!==(u==null?void 0:u.index)&&(a=Di.nextNode(),o++)}return Di.currentNode=Ti,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 xs{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=at,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=Ba(this,t,n),ys(t)?t===at||t==null||t===""?(this._$AH!==at&&this._$AR(),this._$AH=at):t!==this._$AH&&t!==Bi&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):i6(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==at&&ys(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ti.createTextNode(t)),this._$AH=t}$(t){var a;const{values:n,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=vs.createElement(j1(r.h,r.h[0]),this.options)),r);if(((a=this._$AH)==null?void 0:a._$AD)===i)this._$AH.p(n);else{const o=new s6(i,this),s=o.u(this.options);o.p(n),this.T(s),this._$AH=o}}_$AC(t){let n=V1.get(t.strings);return n===void 0&&V1.set(t.strings,n=new vs(t)),n}k(t){O1(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,i=0;for(const a of t)i===n.length?n.push(r=new xs(this.S(bs()),this.S(bs()),this,this.options)):r=n[i],r._$AI(a),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 Ju=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,r,i,a){this.type=1,this._$AH=at,this._$AN=void 0,this.element=t,this.name=n,this._$AM=i,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=at}_$AI(t,n=this,r,i){const a=this.strings;let o=!1;if(a===void 0)t=Ba(this,t,n,0),o=!ys(t)||t!==this._$AH&&t!==Bi,o&&(this._$AH=t);else{const s=t;let u,l;for(t=a[0],u=0;u<a.length-1;u++)l=Ba(this,s[r+u],n,u),l===Bi&&(l=this._$AH[u]),o||(o=!ys(l)||l!==this._$AH[u]),l===at?t=at:t!==at&&(t+=(l??"")+a[u+1]),this._$AH[u]=l}o&&!i&&this.j(t)}j(t){t===at?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class l6 extends Ju{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===at?void 0:t}}class u6 extends Ju{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==at)}}class c6 extends Ju{constructor(t,n,r,i,a){super(t,n,r,i,a),this.type=5}_$AI(t,n=this){if((t=Ba(this,t,n,0)??at)===Bi)return;const r=this._$AH,i=t===at&&r!==at||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,a=t!==at&&(r===at||i);i&&this.element.removeEventListener(this.name,this,r),a&&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 f6{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){Ba(this,t)}}const Jh=ms.litHtmlPolyfillSupport;Jh==null||Jh(vs,xs),(ms.litHtmlVersions??(ms.litHtmlVersions=[])).push("3.1.2");const As=(e,t,n)=>{const r=(n==null?void 0:n.renderBefore)??t;let i=r._$litPart$;if(i===void 0){const a=(n==null?void 0:n.renderBefore)??null;r._$litPart$=i=new xs(t.insertBefore(bs(),a),a,void 0,n??{})}return i._$AI(e),i};/**
18
+ */const ms=globalThis,Ju=ms.trustedTypes,P1=Ju?Ju.createPolicy("lit-html",{createHTML:e=>e}):void 0,L1="$lit$",Or=`lit$${(Math.random()+"").slice(9)}$`,O1="?"+Or,o6=`<${O1}>`,Ti=document,bs=()=>Ti.createComment(""),ys=e=>e===null||typeof e!="object"&&typeof e!="function",N1=Array.isArray,s6=e=>N1(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Kh=`[
19
+ \f\r]`,ws=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,z1=/-->/g,U1=/>/g,Ii=RegExp(`>|${Kh}(?:([^\\s"'>=/]+)(${Kh}*=${Kh}*(?:[^
20
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),G1=/'/g,H1=/"/g,V1=/^(?:script|style|textarea|title)$/i,l6=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Ke=l6(1),Bi=Symbol.for("lit-noChange"),rt=Symbol.for("lit-nothing"),j1=new WeakMap,Di=Ti.createTreeWalker(Ti,129);function $1(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return P1!==void 0?P1.createHTML(t):t}const u6=(e,t)=>{const n=e.length-1,r=[];let i,a=t===2?"<svg>":"",o=ws;for(let s=0;s<n;s++){const u=e[s];let l,c,f=-1,h=0;for(;h<u.length&&(o.lastIndex=h,c=o.exec(u),c!==null);)h=o.lastIndex,o===ws?c[1]==="!--"?o=z1:c[1]!==void 0?o=U1:c[2]!==void 0?(V1.test(c[2])&&(i=RegExp("</"+c[2],"g")),o=Ii):c[3]!==void 0&&(o=Ii):o===Ii?c[0]===">"?(o=i??ws,f=-1):c[1]===void 0?f=-2:(f=o.lastIndex-c[2].length,l=c[1],o=c[3]===void 0?Ii:c[3]==='"'?H1:G1):o===H1||o===G1?o=Ii:o===z1||o===U1?o=ws:(o=Ii,i=void 0);const d=o===Ii&&e[s+1].startsWith("/>")?" ":"";a+=o===ws?u+o6:f>=0?(r.push(l),u.slice(0,f)+L1+u.slice(f)+Or+d):u+Or+(f===-2?s:d)}return[$1(e,a+(e[n]||"<?>")+(t===2?"</svg>":"")),r]};class vs{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0;const s=t.length-1,u=this.parts,[l,c]=u6(t,n);if(this.el=vs.createElement(l,r),Di.currentNode=this.el.content,n===2){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=Di.nextNode())!==null&&u.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(const f of i.getAttributeNames())if(f.endsWith(L1)){const h=c[o++],d=i.getAttribute(f).split(Or),p=/([.?@])?(.*)/.exec(h);u.push({type:1,index:a,name:p[2],strings:d,ctor:p[1]==="."?f6:p[1]==="?"?h6:p[1]==="@"?d6:ec}),i.removeAttribute(f)}else f.startsWith(Or)&&(u.push({type:6,index:a}),i.removeAttribute(f));if(V1.test(i.tagName)){const f=i.textContent.split(Or),h=f.length-1;if(h>0){i.textContent=Ju?Ju.emptyScript:"";for(let d=0;d<h;d++)i.append(f[d],bs()),Di.nextNode(),u.push({type:2,index:++a});i.append(f[h],bs())}}}else if(i.nodeType===8)if(i.data===O1)u.push({type:2,index:a});else{let f=-1;for(;(f=i.data.indexOf(Or,f+1))!==-1;)u.push({type:7,index:a}),f+=Or.length-1}a++}}static createElement(t,n){const r=Ti.createElement("template");return r.innerHTML=t,r}}function Ba(e,t,n=e,r){var o,s;if(t===Bi)return t;let i=r!==void 0?(o=n._$Co)==null?void 0:o[r]:n._$Cl;const a=ys(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==a&&((s=i==null?void 0:i._$AO)==null||s.call(i,!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r!==void 0?(n._$Co??(n._$Co=[]))[r]=i:n._$Cl=i),i!==void 0&&(t=Ba(e,i._$AS(e,t.values),i,r)),t}class c6{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)??Ti).importNode(n,!0);Di.currentNode=i;let a=Di.nextNode(),o=0,s=0,u=r[0];for(;u!==void 0;){if(o===u.index){let l;u.type===2?l=new xs(a,a.nextSibling,this,t):u.type===1?l=new u.ctor(a,u.name,u.strings,this,t):u.type===6&&(l=new p6(a,this,t)),this._$AV.push(l),u=r[++s]}o!==(u==null?void 0:u.index)&&(a=Di.nextNode(),o++)}return Di.currentNode=Ti,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 xs{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=rt,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=Ba(this,t,n),ys(t)?t===rt||t==null||t===""?(this._$AH!==rt&&this._$AR(),this._$AH=rt):t!==this._$AH&&t!==Bi&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):s6(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==rt&&ys(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ti.createTextNode(t)),this._$AH=t}$(t){var a;const{values:n,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=vs.createElement($1(r.h,r.h[0]),this.options)),r);if(((a=this._$AH)==null?void 0:a._$AD)===i)this._$AH.p(n);else{const o=new c6(i,this),s=o.u(this.options);o.p(n),this.T(s),this._$AH=o}}_$AC(t){let n=j1.get(t.strings);return n===void 0&&j1.set(t.strings,n=new vs(t)),n}k(t){N1(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,i=0;for(const a of t)i===n.length?n.push(r=new xs(this.S(bs()),this.S(bs()),this,this.options)):r=n[i],r._$AI(a),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 ec=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,r,i,a){this.type=1,this._$AH=rt,this._$AN=void 0,this.element=t,this.name=n,this._$AM=i,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=rt}_$AI(t,n=this,r,i){const a=this.strings;let o=!1;if(a===void 0)t=Ba(this,t,n,0),o=!ys(t)||t!==this._$AH&&t!==Bi,o&&(this._$AH=t);else{const s=t;let u,l;for(t=a[0],u=0;u<a.length-1;u++)l=Ba(this,s[r+u],n,u),l===Bi&&(l=this._$AH[u]),o||(o=!ys(l)||l!==this._$AH[u]),l===rt?t=rt:t!==rt&&(t+=(l??"")+a[u+1]),this._$AH[u]=l}o&&!i&&this.j(t)}j(t){t===rt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class f6 extends ec{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===rt?void 0:t}}class h6 extends ec{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==rt)}}class d6 extends ec{constructor(t,n,r,i,a){super(t,n,r,i,a),this.type=5}_$AI(t,n=this){if((t=Ba(this,t,n,0)??rt)===Bi)return;const r=this._$AH,i=t===rt&&r!==rt||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,a=t!==rt&&(r===rt||i);i&&this.element.removeEventListener(this.name,this,r),a&&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 p6{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){Ba(this,t)}}const Jh=ms.litHtmlPolyfillSupport;Jh==null||Jh(vs,xs),(ms.litHtmlVersions??(ms.litHtmlVersions=[])).push("3.1.2");const As=(e,t,n)=>{const r=(n==null?void 0:n.renderBefore)??t;let i=r._$litPart$;if(i===void 0){const a=(n==null?void 0:n.renderBefore)??null;r._$litPart$=i=new xs(t.insertBefore(bs(),a),a,void 0,n??{})}return i._$AI(e),i};/**
21
21
  * @license
22
22
  * Copyright 2017 Google LLC
23
23
  * SPDX-License-Identifier: BSD-3-Clause
24
- */class ec extends Ia{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;const t=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=t.firstChild),t}update(t){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=As(n,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return Bi}}ec._$litElement$=!0,ec.finalized=!0,(I_=globalThis.litElementHydrateSupport)==null||I_.call(globalThis,{LitElement:ec});const ed=globalThis.litElementPolyfillSupport;ed==null||ed({LitElement:ec}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.4");/**
24
+ */class tc extends Ia{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;const t=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=t.firstChild),t}update(t){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=As(n,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return Bi}}tc._$litElement$=!0,tc.finalized=!0,(R_=globalThis.litElementHydrateSupport)==null||R_.call(globalThis,{LitElement:tc});const ed=globalThis.litElementPolyfillSupport;ed==null||ed({LitElement:tc}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.4");/**
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
- */const h6={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},d6=e=>(...t)=>({_$litDirective$:e,values:t});let p6=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,n,r){this._$Ct=t,this._$AM=n,this._$Ci=r}_$AS(t,n){return this.update(t,n)}update(t,n){return this.render(...n)}};/**
28
+ */const g6={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},m6=e=>(...t)=>({_$litDirective$:e,values:t});let b6=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,n,r){this._$Ct=t,this._$AM=n,this._$Ci=r}_$AS(t,n){return this.update(t,n)}update(t,n){return this.render(...n)}};/**
29
29
  * @license
30
30
  * Copyright 2018 Google LLC
31
31
  * SPDX-License-Identifier: BSD-3-Clause
32
- */const $1="important",g6=" !"+$1,m6=d6(class extends p6{constructor(e){var t;if(super(e),e.type!==h6.ATTRIBUTE||e.name!=="style"||((t=e.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return r==null?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(e,[t]){const{style:n}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?n.removeProperty(r):n[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const a=typeof i=="string"&&i.endsWith(g6);r.includes("-")||a?n.setProperty(r,a?i.slice(0,-11):i,a?$1:""):n[r]=i}}return Bi}}),b6="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e.spinner_ajPY{transform-origin:center;animation:spinner_AtaB%20.75s%20infinite%20linear}@keyframes%20spinner_AtaB{100%25{transform:rotate(360deg)}}%3c/style%3e%3cpath%20d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z'%20opacity='.25'/%3e%3cpath%20d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'%20class='spinner_ajPY'/%3e%3c/svg%3e",y6=`
32
+ */const q1="important",y6=" !"+q1,w6=m6(class extends b6{constructor(e){var t;if(super(e),e.type!==g6.ATTRIBUTE||e.name!=="style"||((t=e.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return r==null?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(e,[t]){const{style:n}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?n.removeProperty(r):n[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const a=typeof i=="string"&&i.endsWith(y6);r.includes("-")||a?n.setProperty(r,a?i.slice(0,-11):i,a?q1:""):n[r]=i}}return Bi}}),v6="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e.spinner_ajPY{transform-origin:center;animation:spinner_AtaB%20.75s%20infinite%20linear}@keyframes%20spinner_AtaB{100%25{transform:rotate(360deg)}}%3c/style%3e%3cpath%20d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z'%20opacity='.25'/%3e%3cpath%20d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'%20class='spinner_ajPY'/%3e%3c/svg%3e",x6=`
33
33
  .genome-spy {
34
34
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
35
35
  position: relative;
@@ -98,6 +98,10 @@
98
98
  .genome-spy .loading-indicators div > div.loading {
99
99
  opacity: 0.5;
100
100
  }
101
+ .genome-spy .loading-indicators div > div.error {
102
+ opacity: 0.8;
103
+ color: firebrick;
104
+ }
101
105
  .genome-spy .loading-indicators div > div > * {
102
106
  display: block;
103
107
  }
@@ -217,11 +221,11 @@
217
221
  font-size: 14px;
218
222
  padding: 10px;
219
223
  }
220
- `;function w6(e,t){var n=e.getBoundingClientRect();return[t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop]}function td(e,t){return e.length==t.length&&e.every((n,r)=>e[r]===t[r])}function Ot(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function Es(e){return e[e.length-1]}class v6{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 Es(this.enabledStack)??!0}pushEnabledState(t){this.enabledStack.push(t),t||(this.visible=!1)}popEnabledState(){this.enabledStack.pop()}handleMouseMove(t){this.mouseCoords=w6(this.container,t);const n=performance.now();!this.visible&&!this._isPenalty()&&n-this._previousMove>500&&(this._penaltyUntil=n+70),this._lastCoords&&x6(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&&(As("",this.element),this.visible=!1),this._previousTooltipDatum=void 0;return}As(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(it` ${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 x6(e,t){let n=0;for(let r=0;r<e.length;r++)n+=(e[r]-t[r])**2;return Math.sqrt(n)}const A6="RawCode",E6="Literal",_6="Property",S6="Identifier",C6="ArrayExpression",k6="BinaryExpression",T6="CallExpression",I6="ConditionalExpression",B6="LogicalExpression",D6="MemberExpression",R6="ObjectExpression",F6="UnaryExpression";function vn(e){this.type=e}vn.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=M6(this),n=0,r=t.length;n<r;++n)if(t[n].visit(e))return 1};function M6(e){switch(e.type){case C6:return e.elements;case k6:case B6:return[e.left,e.right];case T6:return[e.callee].concat(e.arguments);case I6:return[e.test,e.consequent,e.alternate];case D6:return[e.object,e.property];case R6:return e.properties;case _6:return[e.key,e.value];case F6:return[e.argument];case S6:case E6:case A6:default:return[]}}var On,ee,U,At,Te,tc=1,_s=2,Ri=3,Nr=4,nc=5,Fi=6,Nt=7,Ss=8,P6=9;On={},On[tc]="Boolean",On[_s]="<end>",On[Ri]="Identifier",On[Nr]="Keyword",On[nc]="Null",On[Fi]="Numeric",On[Nt]="Punctuator",On[Ss]="String",On[P6]="RegularExpression";var L6="ArrayExpression",O6="BinaryExpression",N6="CallExpression",z6="ConditionalExpression",q1="Identifier",U6="Literal",G6="LogicalExpression",H6="MemberExpression",V6="ObjectExpression",j6="Property",$6="UnaryExpression",ct="Unexpected token %0",q6="Unexpected number",W6="Unexpected string",Z6="Unexpected identifier",Y6="Unexpected reserved word",Q6="Unexpected end of input",nd="Invalid regular expression",rd="Invalid regular expression: missing /",W1="Octal literals are not allowed in strict mode.",X6="Duplicate data property in object literal not allowed in strict mode",bt="ILLEGAL",Cs="Disabled.",K6=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]"),J6=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-\\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B1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\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 rc(e,t){if(!e)throw new Error("ASSERT: "+t)}function lr(e){return e>=48&&e<=57}function id(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function ks(e){return"01234567".indexOf(e)>=0}function e8(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 Ts(e){return e===10||e===13||e===8232||e===8233}function Is(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&K6.test(String.fromCharCode(e))}function ic(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&J6.test(String.fromCharCode(e))}const t8={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 Z1(){for(;U<At;){const e=ee.charCodeAt(U);if(e8(e)||Ts(e))++U;else break}}function ad(e){var t,n,r,i=0;for(n=e==="u"?4:2,t=0;t<n;++t)U<At&&id(ee[U])?(r=ee[U++],i=i*16+"0123456789abcdef".indexOf(r.toLowerCase())):we({},ct,bt);return String.fromCharCode(i)}function n8(){var e,t,n,r;for(e=ee[U],t=0,e==="}"&&we({},ct,bt);U<At&&(e=ee[U++],!!id(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&we({},ct,bt),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function Y1(){var e,t;for(e=ee.charCodeAt(U++),t=String.fromCharCode(e),e===92&&(ee.charCodeAt(U)!==117&&we({},ct,bt),++U,e=ad("u"),(!e||e==="\\"||!Is(e.charCodeAt(0)))&&we({},ct,bt),t=e);U<At&&(e=ee.charCodeAt(U),!!ic(e));)++U,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),ee.charCodeAt(U)!==117&&we({},ct,bt),++U,e=ad("u"),(!e||e==="\\"||!ic(e.charCodeAt(0)))&&we({},ct,bt),t+=e);return t}function r8(){var e,t;for(e=U++;U<At;){if(t=ee.charCodeAt(U),t===92)return U=e,Y1();if(ic(t))++U;else break}return ee.slice(e,U)}function i8(){var e,t,n;return e=U,t=ee.charCodeAt(U)===92?Y1():r8(),t.length===1?n=Ri:t8.hasOwnProperty(t)?n=Nr:t==="null"?n=nc:t==="true"||t==="false"?n=tc:n=Ri,{type:n,value:t,start:e,end:U}}function od(){var e=U,t=ee.charCodeAt(U),n,r=ee[U],i,a,o;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=ee.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,ee.charCodeAt(U)===61&&++U,{type:Nt,value:ee.slice(e,U),start:e,end:U}}}if(o=ee.substr(U,4),o===">>>=")return U+=4,{type:Nt,value:o,start:e,end:U};if(a=o.substr(0,3),a===">>>"||a==="<<="||a===">>=")return U+=3,{type:Nt,value:a,start:e,end:U};if(i=a.substr(0,2),r===i[1]&&"+-<>&|".indexOf(r)>=0||i==="=>")return U+=2,{type:Nt,value:i,start:e,end:U};if(i==="//"&&we({},ct,bt),"<>=!+-*%&|^/".indexOf(r)>=0)return++U,{type:Nt,value:r,start:e,end:U};we({},ct,bt)}function a8(e){let t="";for(;U<At&&id(ee[U]);)t+=ee[U++];return t.length===0&&we({},ct,bt),Is(ee.charCodeAt(U))&&we({},ct,bt),{type:Fi,value:parseInt("0x"+t,16),start:e,end:U}}function o8(e){let t="0"+ee[U++];for(;U<At&&ks(ee[U]);)t+=ee[U++];return(Is(ee.charCodeAt(U))||lr(ee.charCodeAt(U)))&&we({},ct,bt),{type:Fi,value:parseInt(t,8),octal:!0,start:e,end:U}}function Q1(){var e,t,n;if(n=ee[U],rc(lr(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=U,e="",n!=="."){if(e=ee[U++],n=ee[U],e==="0"){if(n==="x"||n==="X")return++U,a8(t);if(ks(n))return o8(t);n&&lr(n.charCodeAt(0))&&we({},ct,bt)}for(;lr(ee.charCodeAt(U));)e+=ee[U++];n=ee[U]}if(n==="."){for(e+=ee[U++];lr(ee.charCodeAt(U));)e+=ee[U++];n=ee[U]}if(n==="e"||n==="E")if(e+=ee[U++],n=ee[U],(n==="+"||n==="-")&&(e+=ee[U++]),lr(ee.charCodeAt(U)))for(;lr(ee.charCodeAt(U));)e+=ee[U++];else we({},ct,bt);return Is(ee.charCodeAt(U))&&we({},ct,bt),{type:Fi,value:parseFloat(e),start:t,end:U}}function s8(){var e="",t,n,r,i,a=!1;for(t=ee[U],rc(t==="'"||t==='"',"String literal must starts with a quote"),n=U,++U;U<At;)if(r=ee[U++],r===t){t="";break}else if(r==="\\")if(r=ee[U++],!r||!Ts(r.charCodeAt(0)))switch(r){case"u":case"x":ee[U]==="{"?(++U,e+=n8()):e+=ad(r);break;case"n":e+=`
224
+ `;function A6(e,t){var n=e.getBoundingClientRect();return[t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop]}function td(e,t){return e.length==t.length&&e.every((n,r)=>e[r]===t[r])}function Ot(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function Es(e){return e[e.length-1]}class E6{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 Es(this.enabledStack)??!0}pushEnabledState(t){this.enabledStack.push(t),t||(this.visible=!1)}popEnabledState(){this.enabledStack.pop()}handleMouseMove(t){this.mouseCoords=A6(this.container,t);const n=performance.now();!this.visible&&!this._isPenalty()&&n-this._previousMove>500&&(this._penaltyUntil=n+70),this._lastCoords&&_6(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&&(As("",this.element),this.visible=!1),this._previousTooltipDatum=void 0;return}As(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(Ke` ${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 _6(e,t){let n=0;for(let r=0;r<e.length;r++)n+=(e[r]-t[r])**2;return Math.sqrt(n)}const S6="RawCode",C6="Literal",k6="Property",T6="Identifier",I6="ArrayExpression",B6="BinaryExpression",D6="CallExpression",R6="ConditionalExpression",F6="LogicalExpression",M6="MemberExpression",P6="ObjectExpression",L6="UnaryExpression";function xn(e){this.type=e}xn.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=O6(this),n=0,r=t.length;n<r;++n)if(t[n].visit(e))return 1};function O6(e){switch(e.type){case I6:return e.elements;case B6:case F6:return[e.left,e.right];case D6:return[e.callee].concat(e.arguments);case R6:return[e.test,e.consequent,e.alternate];case M6:return[e.object,e.property];case P6:return e.properties;case k6:return[e.key,e.value];case L6:return[e.argument];case T6:case C6:case S6:default:return[]}}var On,ee,U,At,Te,nc=1,_s=2,Ri=3,Nr=4,rc=5,Fi=6,Nt=7,Ss=8,N6=9;On={},On[nc]="Boolean",On[_s]="<end>",On[Ri]="Identifier",On[Nr]="Keyword",On[rc]="Null",On[Fi]="Numeric",On[Nt]="Punctuator",On[Ss]="String",On[N6]="RegularExpression";var z6="ArrayExpression",U6="BinaryExpression",G6="CallExpression",H6="ConditionalExpression",W1="Identifier",V6="Literal",j6="LogicalExpression",$6="MemberExpression",q6="ObjectExpression",W6="Property",Z6="UnaryExpression",ct="Unexpected token %0",Y6="Unexpected number",Q6="Unexpected string",X6="Unexpected identifier",K6="Unexpected reserved word",J6="Unexpected end of input",nd="Invalid regular expression",rd="Invalid regular expression: missing /",Z1="Octal literals are not allowed in strict mode.",e8="Duplicate data property in object literal not allowed in strict mode",bt="ILLEGAL",Cs="Disabled.",t8=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]"),n8=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\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0EA1-\\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 ic(e,t){if(!e)throw new Error("ASSERT: "+t)}function lr(e){return e>=48&&e<=57}function id(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function ks(e){return"01234567".indexOf(e)>=0}function r8(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 Ts(e){return e===10||e===13||e===8232||e===8233}function Is(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&t8.test(String.fromCharCode(e))}function ac(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&n8.test(String.fromCharCode(e))}const i8={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 Y1(){for(;U<At;){const e=ee.charCodeAt(U);if(r8(e)||Ts(e))++U;else break}}function ad(e){var t,n,r,i=0;for(n=e==="u"?4:2,t=0;t<n;++t)U<At&&id(ee[U])?(r=ee[U++],i=i*16+"0123456789abcdef".indexOf(r.toLowerCase())):we({},ct,bt);return String.fromCharCode(i)}function a8(){var e,t,n,r;for(e=ee[U],t=0,e==="}"&&we({},ct,bt);U<At&&(e=ee[U++],!!id(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&we({},ct,bt),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function Q1(){var e,t;for(e=ee.charCodeAt(U++),t=String.fromCharCode(e),e===92&&(ee.charCodeAt(U)!==117&&we({},ct,bt),++U,e=ad("u"),(!e||e==="\\"||!Is(e.charCodeAt(0)))&&we({},ct,bt),t=e);U<At&&(e=ee.charCodeAt(U),!!ac(e));)++U,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),ee.charCodeAt(U)!==117&&we({},ct,bt),++U,e=ad("u"),(!e||e==="\\"||!ac(e.charCodeAt(0)))&&we({},ct,bt),t+=e);return t}function o8(){var e,t;for(e=U++;U<At;){if(t=ee.charCodeAt(U),t===92)return U=e,Q1();if(ac(t))++U;else break}return ee.slice(e,U)}function s8(){var e,t,n;return e=U,t=ee.charCodeAt(U)===92?Q1():o8(),t.length===1?n=Ri:i8.hasOwnProperty(t)?n=Nr:t==="null"?n=rc:t==="true"||t==="false"?n=nc:n=Ri,{type:n,value:t,start:e,end:U}}function od(){var e=U,t=ee.charCodeAt(U),n,r=ee[U],i,a,o;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=ee.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,ee.charCodeAt(U)===61&&++U,{type:Nt,value:ee.slice(e,U),start:e,end:U}}}if(o=ee.substr(U,4),o===">>>=")return U+=4,{type:Nt,value:o,start:e,end:U};if(a=o.substr(0,3),a===">>>"||a==="<<="||a===">>=")return U+=3,{type:Nt,value:a,start:e,end:U};if(i=a.substr(0,2),r===i[1]&&"+-<>&|".indexOf(r)>=0||i==="=>")return U+=2,{type:Nt,value:i,start:e,end:U};if(i==="//"&&we({},ct,bt),"<>=!+-*%&|^/".indexOf(r)>=0)return++U,{type:Nt,value:r,start:e,end:U};we({},ct,bt)}function l8(e){let t="";for(;U<At&&id(ee[U]);)t+=ee[U++];return t.length===0&&we({},ct,bt),Is(ee.charCodeAt(U))&&we({},ct,bt),{type:Fi,value:parseInt("0x"+t,16),start:e,end:U}}function u8(e){let t="0"+ee[U++];for(;U<At&&ks(ee[U]);)t+=ee[U++];return(Is(ee.charCodeAt(U))||lr(ee.charCodeAt(U)))&&we({},ct,bt),{type:Fi,value:parseInt(t,8),octal:!0,start:e,end:U}}function X1(){var e,t,n;if(n=ee[U],ic(lr(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=U,e="",n!=="."){if(e=ee[U++],n=ee[U],e==="0"){if(n==="x"||n==="X")return++U,l8(t);if(ks(n))return u8(t);n&&lr(n.charCodeAt(0))&&we({},ct,bt)}for(;lr(ee.charCodeAt(U));)e+=ee[U++];n=ee[U]}if(n==="."){for(e+=ee[U++];lr(ee.charCodeAt(U));)e+=ee[U++];n=ee[U]}if(n==="e"||n==="E")if(e+=ee[U++],n=ee[U],(n==="+"||n==="-")&&(e+=ee[U++]),lr(ee.charCodeAt(U)))for(;lr(ee.charCodeAt(U));)e+=ee[U++];else we({},ct,bt);return Is(ee.charCodeAt(U))&&we({},ct,bt),{type:Fi,value:parseFloat(e),start:t,end:U}}function c8(){var e="",t,n,r,i,a=!1;for(t=ee[U],ic(t==="'"||t==='"',"String literal must starts with a quote"),n=U,++U;U<At;)if(r=ee[U++],r===t){t="";break}else if(r==="\\")if(r=ee[U++],!r||!Ts(r.charCodeAt(0)))switch(r){case"u":case"x":ee[U]==="{"?(++U,e+=a8()):e+=ad(r);break;case"n":e+=`
221
225
  `;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:ks(r)?(i="01234567".indexOf(r),i!==0&&(a=!0),U<At&&ks(ee[U])&&(a=!0,i=i*8+"01234567".indexOf(ee[U++]),"0123".indexOf(r)>=0&&U<At&&ks(ee[U])&&(i=i*8+"01234567".indexOf(ee[U++]))),e+=String.fromCharCode(i)):e+=r;break}else r==="\r"&&ee[U]===`
222
- `&&++U;else{if(Ts(r.charCodeAt(0)))break;e+=r}return t!==""&&we({},ct,bt),{type:Ss,value:e,octal:a,start:n,end:U}}function l8(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";we({},nd)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{we({},nd)}try{return new RegExp(e,t)}catch{return null}}function u8(){var e,t,n,r,i;for(e=ee[U],rc(e==="/","Regular expression literal must start with a slash"),t=ee[U++],n=!1,r=!1;U<At;)if(e=ee[U++],t+=e,e==="\\")e=ee[U++],Ts(e.charCodeAt(0))&&we({},rd),t+=e;else if(Ts(e.charCodeAt(0)))we({},rd);else if(n)e==="]"&&(n=!1);else if(e==="/"){r=!0;break}else e==="["&&(n=!0);return r||we({},rd),i=t.substr(1,t.length-2),{value:i,literal:t}}function c8(){var e,t,n;for(t="",n="";U<At&&(e=ee[U],!!ic(e.charCodeAt(0)));)++U,e==="\\"&&U<At?we({},ct,bt):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&we({},nd,n),{value:n,literal:t}}function f8(){var e,t,n,r;return Te=null,Z1(),e=U,t=u8(),n=c8(),r=l8(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:U}}function h8(e){return e.type===Ri||e.type===Nr||e.type===tc||e.type===nc}function X1(){if(Z1(),U>=At)return{type:_s,start:U,end:U};const e=ee.charCodeAt(U);return Is(e)?i8():e===40||e===41||e===59?od():e===39||e===34?s8():e===46?lr(ee.charCodeAt(U+1))?Q1():od():lr(e)?Q1():od()}function zt(){const e=Te;return U=e.end,Te=X1(),U=e.end,e}function K1(){const e=U;Te=X1(),U=e}function d8(e){const t=new vn(L6);return t.elements=e,t}function J1(e,t,n){const r=new vn(e==="||"||e==="&&"?G6:O6);return r.operator=e,r.left=t,r.right=n,r}function p8(e,t){const n=new vn(N6);return n.callee=e,n.arguments=t,n}function g8(e,t,n){const r=new vn(z6);return r.test=e,r.consequent=t,r.alternate=n,r}function sd(e){const t=new vn(q1);return t.name=e,t}function Bs(e){const t=new vn(U6);return t.value=e.value,t.raw=ee.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function eb(e,t,n){const r=new vn(H6);return r.computed=e==="[",r.object=t,r.property=n,r.computed||(n.member=!0),r}function m8(e){const t=new vn(V6);return t.properties=e,t}function tb(e,t,n){const r=new vn(j6);return r.key=t,r.value=n,r.kind=e,r}function b8(e,t){const n=new vn($6);return n.operator=e,n.argument=t,n.prefix=!0,n}function we(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(a,o)=>(rc(o<r.length,"Message reference must be in range"),r[o]));throw n=new Error(i),n.index=U,n.description=i,n}function ac(e){e.type===_s&&we(e,Q6),e.type===Fi&&we(e,q6),e.type===Ss&&we(e,W6),e.type===Ri&&we(e,Z6),e.type===Nr&&we(e,Y6),we(e,ct,e.value)}function Et(e){const t=zt();(t.type!==Nt||t.value!==e)&&ac(t)}function Ge(e){return Te.type===Nt&&Te.value===e}function ld(e){return Te.type===Nr&&Te.value===e}function y8(){const e=[];for(U=Te.start,Et("[");!Ge("]");)Ge(",")?(zt(),e.push(null)):(e.push(Mi()),Ge("]")||Et(","));return zt(),d8(e)}function nb(){U=Te.start;const e=zt();return e.type===Ss||e.type===Fi?(e.octal&&we(e,W1),Bs(e)):sd(e.value)}function w8(){var e,t,n,r;if(U=Te.start,e=Te,e.type===Ri)return n=nb(),Et(":"),r=Mi(),tb("init",n,r);if(e.type===_s||e.type===Nt)ac(e);else return t=nb(),Et(":"),r=Mi(),tb("init",t,r)}function v8(){var e=[],t,n,r,i={},a=String;for(U=Te.start,Et("{");!Ge("}");)t=w8(),t.key.type===q1?n=t.key.name:n=a(t.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(i,r)?we({},X6):i[r]=!0,e.push(t),Ge("}")||Et(",");return Et("}"),m8(e)}function x8(){Et("(");const e=ud();return Et(")"),e}const A8={if:1};function E8(){var e,t,n;if(Ge("("))return x8();if(Ge("["))return y8();if(Ge("{"))return v8();if(e=Te.type,U=Te.start,e===Ri||A8[Te.value])n=sd(zt().value);else if(e===Ss||e===Fi)Te.octal&&we(Te,W1),n=Bs(zt());else{if(e===Nr)throw new Error(Cs);e===tc?(t=zt(),t.value=t.value==="true",n=Bs(t)):e===nc?(t=zt(),t.value=null,n=Bs(t)):Ge("/")||Ge("/=")?(n=Bs(f8()),K1()):ac(zt())}return n}function _8(){const e=[];if(Et("("),!Ge(")"))for(;U<At&&(e.push(Mi()),!Ge(")"));)Et(",");return Et(")"),e}function S8(){U=Te.start;const e=zt();return h8(e)||ac(e),sd(e.value)}function C8(){return Et("."),S8()}function k8(){Et("[");const e=ud();return Et("]"),e}function T8(){var e,t,n;for(e=E8();;)if(Ge("."))n=C8(),e=eb(".",e,n);else if(Ge("("))t=_8(),e=p8(e,t);else if(Ge("["))n=k8(),e=eb("[",e,n);else break;return e}function rb(){const e=T8();if(Te.type===Nt&&(Ge("++")||Ge("--")))throw new Error(Cs);return e}function oc(){var e,t;if(Te.type!==Nt&&Te.type!==Nr)t=rb();else{if(Ge("++")||Ge("--"))throw new Error(Cs);if(Ge("+")||Ge("-")||Ge("~")||Ge("!"))e=zt(),t=oc(),t=b8(e.value,t);else{if(ld("delete")||ld("void")||ld("typeof"))throw new Error(Cs);t=rb()}}return t}function ib(e){let t=0;if(e.type!==Nt&&e.type!==Nr)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 I8(){var e,t,n,r,i,a,o,s,u,l;if(e=Te,u=oc(),r=Te,i=ib(r),i===0)return u;for(r.prec=i,zt(),t=[e,Te],o=oc(),a=[u,r,o];(i=ib(Te))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),s=a.pop().value,u=a.pop(),t.pop(),n=J1(s,u,o),a.push(n);r=zt(),r.prec=i,a.push(r),t.push(Te),n=oc(),a.push(n)}for(l=a.length-1,n=a[l],t.pop();l>1;)t.pop(),n=J1(a[l-1].value,a[l-2],n),l-=2;return n}function Mi(){var e,t,n;return e=I8(),Ge("?")&&(zt(),t=Mi(),Et(":"),n=Mi(),e=g8(e,t,n)),e}function ud(){const e=Mi();if(Ge(","))throw new Error(Cs);return e}function B8(e){ee=e,U=0,At=ee.length,Te=null,K1();const t=ud();if(Te.type!==_s)throw new Error("Unexpect token after expression.");return t}var D8={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 ab(e){function t(o,s,u,l){let c=e(s[0]);return u&&(c=u+"("+c+")",u.lastIndexOf("new ",0)===0&&(c="("+c+")")),c+"."+o+(l<0?"":l===0?"()":"("+s.slice(1).map(e).join(",")+")")}function n(o,s,u){return l=>t(o,l,s,u)}const r="new Date",i="String",a="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",hypot:"Math.hypot",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(o){o.length<3&&Qe("Missing arguments to clamp function."),o.length>3&&Qe("Too many arguments to clamp function.");const s=o.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:a,test:n("test",a),if:function(o){o.length<3&&Qe("Missing arguments to if function."),o.length>3&&Qe("Too many arguments to if function.");const s=o.map(e);return"("+s[0]+"?"+s[1]+":"+s[2]+")"}}}function R8(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function F8(e){e=e||{};const t=e.allowed?Fu(e.allowed):{},n=e.forbidden?Fu(e.forbidden):{},r=e.constants||D8,i=(e.functions||ab)(f),a=e.globalvar,o=e.fieldvar,s=Pt(a)?a:p=>`${a}["${p}"]`;let u={},l={},c=0;function f(p){if(Ue(p))return p;const m=h[p.type];return m==null&&Qe("Unsupported type: "+p.type),m(p)}const h={Literal:p=>p.raw,Identifier:p=>{const m=p.name;return c>0?m:Ea(n,m)?Qe("Illegal identifier: "+m):Ea(r,m)?r[m]:Ea(t,m)?m:(u[m]=1,s(m))},MemberExpression:p=>{const m=!p.computed,y=f(p.object);m&&(c+=1);const w=f(p.property);return y===o&&(l[R8(w)]=1),m&&(c-=1),y+(m?"."+w:"["+w+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&Qe("Illegal callee type: "+p.callee.type);const m=p.callee.name,y=p.arguments,w=Ea(i,m)&&i[m];return w||Qe("Unrecognized function: "+m),Pt(w)?w(y):w+"("+y.map(f).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(f).join(",")+"]",BinaryExpression:p=>"("+f(p.left)+" "+p.operator+" "+f(p.right)+")",UnaryExpression:p=>"("+p.operator+f(p.argument)+")",ConditionalExpression:p=>"("+f(p.test)+"?"+f(p.consequent)+":"+f(p.alternate)+")",LogicalExpression:p=>"("+f(p.left)+p.operator+f(p.right)+")",ObjectExpression:p=>"{"+p.properties.map(f).join(",")+"}",Property:p=>{c+=1;const m=f(p.key);return c-=1,m+":"+f(p.value)}};function d(p){const m={code:f(p),globals:Object.keys(u),fields:Object.keys(l)};return u={},l={},m}return d.functions=i,d.constants=r,d}function ob(e,t,n){return n=(n-e)/(t-e),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function Ds(e,t=0,n=1){return Math.max(t,Math.min(n,e))}function M8(e,t,n){return Ds((n-e)/(t-e),0,1)}const sb={clamp:Ds,isArray:xt,isBoolean:Yo,isDefined(e){return e!==void 0},isNumber:Tt,isObject:kt,isRegExp:x4,isString:Ue,isValid(e){return e!=null&&e===e},lerp:Rm,linearstep:M8,smoothstep:ob};function P8(e){const t=ab(e);for(const n in sb)t[n]=`this.${n}`;return t}const L8=F8({forbidden:[],allowed:["datum"],globalvar:"globalObject",fieldvar:"datum",functions:P8});function sc(e,t={}){try{const n=B8(e),r=L8(n),i=Function("datum","globalObject",`"use strict"; return (${r.code});`).bind(sb),a=o=>i(o,t);return a.fields=r.fields,a.globals=r.globals,a.code=r.code,a}catch(n){throw new Error(`Invalid expression: ${e}, ${n.message}`)}}function Nn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function zr(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 cd=Symbol("implicit");function fd(){var e=new Rr,t=[],n=[],r=cd;function i(a){let o=e.get(a);if(o===void 0){if(r!==cd)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Rr;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return fd(t,n).unknown(r)},Nn.apply(i,arguments),i}function Da(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Rs(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ur(){}var Pi=.7,Ra=1/Pi,Fa="\\s*([+-]?\\d+)\\s*",Fs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",O8=/^#([0-9a-f]{3,8})$/,N8=new RegExp(`^rgb\\(${Fa},${Fa},${Fa}\\)$`),z8=new RegExp(`^rgb\\(${zn},${zn},${zn}\\)$`),U8=new RegExp(`^rgba\\(${Fa},${Fa},${Fa},${Fs}\\)$`),G8=new RegExp(`^rgba\\(${zn},${zn},${zn},${Fs}\\)$`),H8=new RegExp(`^hsl\\(${Fs},${zn},${zn}\\)$`),V8=new RegExp(`^hsla\\(${Fs},${zn},${zn},${Fs}\\)$`),lb={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};Da(Ur,Gr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ub,formatHex:ub,formatHex8:j8,formatHsl:$8,formatRgb:cb,toString:cb});function ub(){return this.rgb().formatHex()}function j8(){return this.rgb().formatHex8()}function $8(){return gb(this).formatHsl()}function cb(){return this.rgb().formatRgb()}function Gr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=O8.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?fb(t):n===3?new ft(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?lc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?lc(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=N8.exec(e))?new ft(t[1],t[2],t[3],1):(t=z8.exec(e))?new ft(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=U8.exec(e))?lc(t[1],t[2],t[3],t[4]):(t=G8.exec(e))?lc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=H8.exec(e))?pb(t[1],t[2]/100,t[3]/100,1):(t=V8.exec(e))?pb(t[1],t[2]/100,t[3]/100,t[4]):lb.hasOwnProperty(e)?fb(lb[e]):e==="transparent"?new ft(NaN,NaN,NaN,0):null}function fb(e){return new ft(e>>16&255,e>>8&255,e&255,1)}function lc(e,t,n,r){return r<=0&&(e=t=n=NaN),new ft(e,t,n,r)}function hd(e){return e instanceof Ur||(e=Gr(e)),e?(e=e.rgb(),new ft(e.r,e.g,e.b,e.opacity)):new ft}function uc(e,t,n,r){return arguments.length===1?hd(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}Da(ft,uc,Rs(Ur,{brighter(e){return e=e==null?Ra:Math.pow(Ra,e),new ft(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pi:Math.pow(Pi,e),new ft(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ft(Li(this.r),Li(this.g),Li(this.b),cc(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:hb,formatHex:hb,formatHex8:q8,formatRgb:db,toString:db}));function hb(){return`#${Oi(this.r)}${Oi(this.g)}${Oi(this.b)}`}function q8(){return`#${Oi(this.r)}${Oi(this.g)}${Oi(this.b)}${Oi((isNaN(this.opacity)?1:this.opacity)*255)}`}function db(){const e=cc(this.opacity);return`${e===1?"rgb(":"rgba("}${Li(this.r)}, ${Li(this.g)}, ${Li(this.b)}${e===1?")":`, ${e})`}`}function cc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Li(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Oi(e){return e=Li(e),(e<16?"0":"")+e.toString(16)}function pb(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new xn(e,t,n,r)}function gb(e){if(e instanceof xn)return new xn(e.h,e.s,e.l,e.opacity);if(e instanceof Ur||(e=Gr(e)),!e)return new xn;if(e instanceof xn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new xn(o,s,u,e.opacity)}function dd(e,t,n,r){return arguments.length===1?gb(e):new xn(e,t,n,r??1)}function xn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Da(xn,dd,Rs(Ur,{brighter(e){return e=e==null?Ra:Math.pow(Ra,e),new xn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pi:Math.pow(Pi,e),new xn(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(pd(e>=240?e-240:e+120,i,r),pd(e,i,r),pd(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new xn(mb(this.h),fc(this.s),fc(this.l),cc(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=cc(this.opacity);return`${e===1?"hsl(":"hsla("}${mb(this.h)}, ${fc(this.s)*100}%, ${fc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function mb(e){return e=(e||0)%360,e<0?e+360:e}function fc(e){return Math.max(0,Math.min(1,e||0))}function pd(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 bb=Math.PI/180,yb=180/Math.PI,hc=18,wb=.96422,vb=1,xb=.82521,Ab=4/29,Ma=6/29,Eb=3*Ma*Ma,W8=Ma*Ma*Ma;function _b(e){if(e instanceof Un)return new Un(e.l,e.a,e.b,e.opacity);if(e instanceof ur)return Sb(e);e instanceof ft||(e=hd(e));var t=wd(e.r),n=wd(e.g),r=wd(e.b),i=md((.2225045*t+.7168786*n+.0606169*r)/vb),a,o;return t===n&&n===r?a=o=i:(a=md((.4360747*t+.3850649*n+.1430804*r)/wb),o=md((.0139322*t+.0971045*n+.7141733*r)/xb)),new Un(116*i-16,500*(a-i),200*(i-o),e.opacity)}function gd(e,t,n,r){return arguments.length===1?_b(e):new Un(e,t,n,r??1)}function Un(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Da(Un,gd,Rs(Ur,{brighter(e){return new Un(this.l+hc*(e??1),this.a,this.b,this.opacity)},darker(e){return new Un(this.l-hc*(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=wb*bd(t),e=vb*bd(e),n=xb*bd(n),new ft(yd(3.1338561*t-1.6168667*e-.4906146*n),yd(-.9787684*t+1.9161415*e+.033454*n),yd(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function md(e){return e>W8?Math.pow(e,1/3):e/Eb+Ab}function bd(e){return e>Ma?e*e*e:Eb*(e-Ab)}function yd(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function wd(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Z8(e){if(e instanceof ur)return new ur(e.h,e.c,e.l,e.opacity);if(e instanceof Un||(e=_b(e)),e.a===0&&e.b===0)return new ur(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*yb;return new ur(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function vd(e,t,n,r){return arguments.length===1?Z8(e):new ur(e,t,n,r??1)}function ur(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Sb(e){if(isNaN(e.h))return new Un(e.l,0,0,e.opacity);var t=e.h*bb;return new Un(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Da(ur,vd,Rs(Ur,{brighter(e){return new ur(this.h,this.c,this.l+hc*(e??1),this.opacity)},darker(e){return new ur(this.h,this.c,this.l-hc*(e??1),this.opacity)},rgb(){return Sb(this).rgb()}}));var Cb=-.14861,xd=1.78277,Ad=-.29227,dc=-.90649,Ms=1.97294,kb=Ms*dc,Tb=Ms*xd,Ib=xd*Ad-dc*Cb;function Y8(e){if(e instanceof Ni)return new Ni(e.h,e.s,e.l,e.opacity);e instanceof ft||(e=hd(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Ib*r+kb*t-Tb*n)/(Ib+kb-Tb),a=r-i,o=(Ms*(n-i)-Ad*a)/dc,s=Math.sqrt(o*o+a*a)/(Ms*i*(1-i)),u=s?Math.atan2(o,a)*yb-120:NaN;return new Ni(u<0?u+360:u,s,i,e.opacity)}function Ed(e,t,n,r){return arguments.length===1?Y8(e):new Ni(e,t,n,r??1)}function Ni(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Da(Ni,Ed,Rs(Ur,{brighter(e){return e=e==null?Ra:Math.pow(Ra,e),new Ni(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pi:Math.pow(Pi,e),new Ni(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*bb,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*(Cb*r+xd*i)),255*(t+n*(Ad*r+dc*i)),255*(t+n*(Ms*r)),this.opacity)}}));function Bb(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function Db(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],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return Bb((n-r/t)*t,o,i,a,s)}}function Rb(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],a=e[r%t],o=e[(r+1)%t],s=e[(r+2)%t];return Bb((n-r/t)*t,i,a,o,s)}}const pc=e=>()=>e;function Fb(e,t){return function(n){return e+n*t}}function Q8(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 gc(e,t){var n=t-e;return n?Fb(e,n>180||n<-180?n-360*Math.round(n/360):n):pc(isNaN(e)?t:e)}function X8(e){return(e=+e)==1?ht:function(t,n){return n-t?Q8(t,n,e):pc(isNaN(t)?n:t)}}function ht(e,t){var n=t-e;return n?Fb(e,n):pc(isNaN(e)?t:e)}const _d=function e(t){var n=X8(t);function r(i,a){var o=n((i=uc(i)).r,(a=uc(a)).r),s=n(i.g,a.g),u=n(i.b,a.b),l=ht(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function Mb(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=uc(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(u){return s.r=r(u),s.g=i(u),s.b=a(u),s+""}}}var K8=Mb(Db),J8=Mb(Rb);function Sd(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Pb(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function e5(e,t){return(Pb(t)?Sd:Lb)(e,t)}function Lb(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=Hr(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function Ob(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function An(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Nb(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]=Hr(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var Cd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kd=new RegExp(Cd.source,"g");function t5(e){return function(){return e}}function n5(e){return function(t){return e(t)+""}}function zb(e,t){var n=Cd.lastIndex=kd.lastIndex=0,r,i,a,o=-1,s=[],u=[];for(e=e+"",t=t+"";(r=Cd.exec(e))&&(i=kd.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:An(r,i)})),n=kd.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?u[0]?n5(u[0].x):t5(t):(t=u.length,function(l){for(var c=0,f;c<t;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function Hr(e,t){var n=typeof t,r;return t==null||n==="boolean"?pc(t):(n==="number"?An:n==="string"?(r=Gr(t))?(t=r,_d):zb:t instanceof Gr?_d:t instanceof Date?Ob:Pb(t)?Sd:Array.isArray(t)?Lb:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Nb:An)(e,t)}function r5(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function i5(e,t){var n=gc(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ps(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ub=180/Math.PI,Td={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Gb(e,t,n,r,i,a){var o,s,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),e*r<t*n&&(e=-e,t=-t,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Ub,skewX:Math.atan(u)*Ub,scaleX:o,scaleY:s}}var mc;function a5(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Td:Gb(t.a,t.b,t.c,t.d,t.e,t.f)}function o5(e){return e==null||(mc||(mc=document.createElementNS("http://www.w3.org/2000/svg","g")),mc.setAttribute("transform",e),!(e=mc.transform.baseVal.consolidate()))?Td:(e=e.matrix,Gb(e.a,e.b,e.c,e.d,e.e,e.f))}function Hb(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function a(l,c,f,h,d,p){if(l!==f||c!==h){var m=d.push("translate(",null,t,null,n);p.push({i:m-4,x:An(l,f)},{i:m-2,x:An(c,h)})}else(f||h)&&d.push("translate("+f+t+h+n)}function o(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:An(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:An(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,h,d,p){if(l!==f||c!==h){var m=d.push(i(d)+"scale(",null,",",null,")");p.push({i:m-4,x:An(l,f)},{i:m-2,x:An(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=e(l),c=e(c),a(l.translateX,l.translateY,c.translateX,c.translateY,f,h),o(l.rotate,c.rotate,f,h),s(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(d){for(var p=-1,m=h.length,y;++p<m;)f[(y=h[p]).i]=y.x(d);return f.join("")}}}var s5=Hb(a5,"px, ","px)","deg)"),l5=Hb(o5,", ",")",")"),u5=1e-12;function Vb(e){return((e=Math.exp(e))+1/e)/2}function c5(e){return((e=Math.exp(e))-1/e)/2}function f5(e){return((e=Math.exp(2*e))-1)/(e+1)}const h5=function e(t,n,r){function i(a,o){var s=a[0],u=a[1],l=a[2],c=o[0],f=o[1],h=o[2],d=c-s,p=f-u,m=d*d+p*p,y,w;if(m<u5)w=Math.log(h/l)/t,y=function(B){return[s+B*d,u+B*p,l*Math.exp(t*B*w)]};else{var A=Math.sqrt(m),S=(h*h-l*l+r*m)/(2*l*n*A),_=(h*h-l*l-r*m)/(2*h*n*A),T=Math.log(Math.sqrt(S*S+1)-S),I=Math.log(Math.sqrt(_*_+1)-_);w=(I-T)/t,y=function(B){var R=B*w,M=Vb(T),G=l/(n*A)*(M*f5(t*R+T)-c5(T));return[s+G*d,u+G*p,l*M/Vb(t*R+T)]}}return y.duration=w*1e3*t/Math.SQRT2,y}return i.rho=function(a){var o=Math.max(.001,+a),s=o*o,u=s*s;return e(o,s,u)},i}(Math.SQRT2,2,4);function jb(e){return function(t,n){var r=e((t=dd(t)).h,(n=dd(n)).h),i=ht(t.s,n.s),a=ht(t.l,n.l),o=ht(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=a(s),t.opacity=o(s),t+""}}}const d5=jb(gc);var p5=jb(ht);function g5(e,t){var n=ht((e=gd(e)).l,(t=gd(t)).l),r=ht(e.a,t.a),i=ht(e.b,t.b),a=ht(e.opacity,t.opacity);return function(o){return e.l=n(o),e.a=r(o),e.b=i(o),e.opacity=a(o),e+""}}function $b(e){return function(t,n){var r=e((t=vd(t)).h,(n=vd(n)).h),i=ht(t.c,n.c),a=ht(t.l,n.l),o=ht(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=a(s),t.opacity=o(s),t+""}}}const m5=$b(gc);var b5=$b(ht);function qb(e){return function t(n){n=+n;function r(i,a){var o=e((i=Ed(i)).h,(a=Ed(a)).h),s=ht(i.s,a.s),u=ht(i.l,a.l),l=ht(i.opacity,a.opacity);return function(c){return i.h=o(c),i.s=s(c),i.l=u(Math.pow(c,n)),i.opacity=l(c),i+""}}return r.gamma=t,r}(1)}const y5=qb(gc);var w5=qb(ht);function Id(e,t){t===void 0&&(t=e,e=Hr);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var s=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[s](o-s)}}function v5(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}const x5=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Hr,interpolateArray:e5,interpolateBasis:Db,interpolateBasisClosed:Rb,interpolateCubehelix:y5,interpolateCubehelixLong:w5,interpolateDate:Ob,interpolateDiscrete:r5,interpolateHcl:m5,interpolateHclLong:b5,interpolateHsl:d5,interpolateHslLong:p5,interpolateHue:i5,interpolateLab:g5,interpolateNumber:An,interpolateNumberArray:Sd,interpolateObject:Nb,interpolateRgb:_d,interpolateRgbBasis:K8,interpolateRgbBasisClosed:J8,interpolateRound:Ps,interpolateString:zb,interpolateTransformCss:s5,interpolateTransformSvg:l5,interpolateZoom:h5,piecewise:Id,quantize:v5},Symbol.toStringTag,{value:"Module"}));function A5(e){return function(){return e}}function Bd(e){return+e}var Wb=[0,1];function Ut(e){return e}function Dd(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:A5(isNaN(t)?NaN:.5)}function E5(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function _5(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Dd(i,r),a=n(o,a)):(r=Dd(r,i),a=n(a,o)),function(s){return a(r(s))}}function S5(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Dd(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var u=Dr(e,s,1,r)-1;return a[u](i[u](s))}}function Ls(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function bc(){var e=Wb,t=Wb,n=Hr,r,i,a,o=Ut,s,u,l;function c(){var h=Math.min(e.length,t.length);return o!==Ut&&(o=E5(e[0],e[h-1])),s=h>2?S5:_5,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?a:(u||(u=s(e.map(r),t,n)))(r(o(h)))}return f.invert=function(h){return o(i((l||(l=s(t,e.map(r),An)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Bd),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=Ps,c()},f.clamp=function(h){return arguments.length?(o=h?!0:Ut,c()):o!==Ut},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,d){return r=h,i=d,c()}}function Zb(){return bc()(Ut,Ut)}function Yb(e,t,n,r){var i=Fr(e,t,n),a;switch(r=Mr(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Xm(i,o))&&(r.precision=a),Ph(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Km(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Qm(i))&&(r.precision=a-(r.type==="%")*2);break}}return mt(r)}function zi(e){var t=e.domain;return e.ticks=function(n){var r=t();return Ou(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Yb(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],u,l,c=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);c-- >0;){if(l=Fh(o,s,n),l===u)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Qb(){var e=Zb();return e.copy=function(){return Ls(e,Qb())},Nn.apply(e,arguments),zi(e)}function Xb(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,Bd),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Xb(e).unknown(t)},e=arguments.length?Array.from(e,Bd):[0,1],zi(n)}function Kb(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function Jb(e){return Math.log(e)}function e2(e){return Math.exp(e)}function C5(e){return-Math.log(-e)}function k5(e){return-Math.exp(-e)}function T5(e){return isFinite(e)?+("1e"+e):e<0?0:e}function I5(e){return e===10?T5:e===Math.E?Math.exp:t=>Math.pow(e,t)}function B5(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 t2(e){return(t,n)=>-e(-t,n)}function Rd(e){const t=e(Jb,e2),n=t.domain;let r=10,i,a;function o(){return i=B5(r),a=I5(r),n()[0]<0?(i=t2(i),a=t2(a),e(C5,k5)):e(Jb,e2),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const u=n();let l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let h=i(l),d=i(c),p,m;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(m=h<0?p/a(-h):p*a(h),!(m<l)){if(m>c)break;w.push(m)}}else for(;h<=d;++h)for(p=r-1;p>=1;--p)if(m=h>0?p/a(-h):p*a(h),!(m<l)){if(m>c)break;w.push(m)}w.length*2<y&&(w=Ou(l,c,y))}else w=Ou(h,d,Math.min(d-h,y)).map(a);return f?w.reverse():w},t.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Mr(u)).precision==null&&(u.trim=!0),u=mt(u)),s===1/0)return u;const l=Math.max(1,r*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=l?u(c):""}},t.nice=()=>n(Kb(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function Fd(){const e=Rd(bc()).domain([1,10]);return e.copy=()=>Ls(e,Fd()).base(e.base()),Nn.apply(e,arguments),e}function n2(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function r2(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Md(e){var t=1,n=e(n2(t),r2(t));return n.constant=function(r){return arguments.length?e(n2(t=+r),r2(t)):t},zi(n)}function i2(){var e=Md(bc());return e.copy=function(){return Ls(e,i2()).constant(e.constant())},Nn.apply(e,arguments)}function a2(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function D5(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function R5(e){return e<0?-e*e:e*e}function Pd(e){var t=e(Ut,Ut),n=1;function r(){return n===1?e(Ut,Ut):n===.5?e(D5,R5):e(a2(n),a2(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},zi(t)}function Ld(){var e=Pd(bc());return e.copy=function(){return Ls(e,Ld()).exponent(e.exponent())},Nn.apply(e,arguments),e}function F5(){return Ld.apply(null,arguments).exponent(.5)}function o2(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o<s;)n[o-1]=Vm(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?r:t[Dr(n,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Xo),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return o2().domain(e).range(t).unknown(r)},Nn.apply(a,arguments)}function s2(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[Dr(r,u,0,n)]:a}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return o}return o.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,s()):[e,t]},o.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},o.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[e,r[0]]:l>=n?[r[n-1],t]:[r[l-1],r[l]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return r.slice()},o.copy=function(){return s2().domain([e,t]).range(i).unknown(a)},Nn.apply(zi(o),arguments)}function l2(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Dr(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return l2().domain(e).range(t).unknown(n)},Nn.apply(i,arguments)}function M5(e){return new Date(e)}function P5(e){return e instanceof Date?+e:+new Date(+e)}function Od(e,t,n,r,i,a,o,s,u,l){var c=Zb(),f=c.invert,h=c.domain,d=l(".%L"),p=l(":%S"),m=l("%I:%M"),y=l("%I %p"),w=l("%a %d"),A=l("%b %d"),S=l("%B"),_=l("%Y");function T(I){return(u(I)<I?d:s(I)<I?p:o(I)<I?m:a(I)<I?y:r(I)<I?i(I)<I?w:A:n(I)<I?S:_)(I)}return c.invert=function(I){return new Date(f(I))},c.domain=function(I){return arguments.length?h(Array.from(I,P5)):h().map(M5)},c.ticks=function(I){var B=h();return e(B[0],B[B.length-1],I??10)},c.tickFormat=function(I,B){return B==null?T:l(B)},c.nice=function(I){var B=h();return(!I||typeof I.range!="function")&&(I=t(B[0],B[B.length-1],I??10)),I?h(Kb(B,I)):c},c.copy=function(){return Ls(c,Od(e,t,n,r,i,a,o,s,u,l))},c}function L5(){return Nn.apply(Od(dS,pS,Pn,ts,Jo,Pr,Vu,Gu,sr,Vh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function O5(){return Nn.apply(Od(fS,hS,Ln,ns,es,Si,ju,Hu,sr,jh).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function yc(){var e=0,t=1,n,r,i,a,o=Ut,s=!1,u;function l(f){return f==null||isNaN(f=+f)?u:o(i===0?.5:(f=(a(f)-n)*i,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([e,t]=f,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(f){return arguments.length?(s=!!f,l):s},l.interpolator=function(f){return arguments.length?(o=f,l):o};function c(f){return function(h){var d,p;return arguments.length?([d,p]=h,o=f(d,p),l):[o(0),o(1)]}}return l.range=c(Hr),l.rangeRound=c(Ps),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return a=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),l}}function Vr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Nd(){var e=zi(yc()(Ut));return e.copy=function(){return Vr(e,Nd())},zr.apply(e,arguments)}function u2(){var e=Rd(yc()).domain([1,10]);return e.copy=function(){return Vr(e,u2()).base(e.base())},zr.apply(e,arguments)}function c2(){var e=Md(yc());return e.copy=function(){return Vr(e,c2()).constant(e.constant())},zr.apply(e,arguments)}function zd(){var e=Pd(yc());return e.copy=function(){return Vr(e,zd()).exponent(e.exponent())},zr.apply(e,arguments)}function N5(){return zd.apply(null,arguments).exponent(.5)}function wc(){var e=0,t=.5,n=1,r=1,i,a,o,s,u,l=Ut,c,f=!1,h;function d(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-a)*(r*m<r*a?s:u),l(f?Math.max(0,Math.min(1,m)):m))}d.domain=function(m){return arguments.length?([e,t,n]=m,i=c(e=+e),a=c(t=+t),o=c(n=+n),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,d):[e,t,n]},d.clamp=function(m){return arguments.length?(f=!!m,d):f},d.interpolator=function(m){return arguments.length?(l=m,d):l};function p(m){return function(y){var w,A,S;return arguments.length?([w,A,S]=y,l=Id(m,[w,A,S]),d):[l(0),l(.5),l(1)]}}return d.range=p(Hr),d.rangeRound=p(Ps),d.unknown=function(m){return arguments.length?(h=m,d):h},function(m){return c=m,i=m(e),a=m(t),o=m(n),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,d}}function f2(){var e=zi(wc()(Ut));return e.copy=function(){return Vr(e,f2())},zr.apply(e,arguments)}function h2(){var e=Rd(wc()).domain([.1,1,10]);return e.copy=function(){return Vr(e,h2()).base(e.base())},zr.apply(e,arguments)}function d2(){var e=Md(wc());return e.copy=function(){return Vr(e,d2()).constant(e.constant())},zr.apply(e,arguments)}function Ud(){var e=Pd(wc());return e.copy=function(){return Vr(e,Ud()).exponent(e.exponent())},zr.apply(e,arguments)}function z5(){return Ud.apply(null,arguments).exponent(.5)}function Gd(e,t,n){const r=e-t+n*2;return e?r>0?r:1:0}const U5="identity",Pa="linear",jr="log",Os="pow",Ns="sqrt",vc="symlog",p2="time",g2="utc",Gn="sequential",La="diverging",Hd="quantile",m2="quantize",b2="threshold",Vd="ordinal",jd="point",y2="band",$d="bin-ordinal",ot="continuous",zs="discrete",Us="discretizing",nn="interpolating",w2="temporal";function G5(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 H5(e){return function(t){const n=e.range();let r=t[0],i=t[1],a=-1,o,s,u,l;for(i<r&&(s=r,r=i,i=s),u=0,l=n.length;u<l;++u)n[u]>=r&&n[u]<=i&&(a<0&&(a=u),o=u);if(!(a<0))return r=e.invertExtent(n[a]),i=e.invertExtent(n[o]),[r[0]===void 0?r[1]:r[0],i[1]===void 0?i[0]:i[1]]}}function qd(){const e=fd().unknown(void 0),t=e.domain,n=e.range;let r=[0,1],i,a,o=!1,s=0,u=0,l=.5;delete e.unknown;function c(){const f=t().length,h=r[1]<r[0],d=r[1-h],p=Gd(f,s,u);let m=r[h-0];i=(d-m)/(p||1),o&&(i=Math.floor(i)),m+=(d-m-i*(f-s))*l,a=i*(1-s),o&&(m=Math.round(m),a=Math.round(a));const y=Ko(f).map(w=>m+i*w);return n(h?y.reverse():y)}return e.domain=function(f){return arguments.length?(t(f),c()):t()},e.range=function(f){return arguments.length?(r=[+f[0],+f[1]],c()):r.slice()},e.rangeRound=function(f){return r=[+f[0],+f[1]],o=!0,c()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(f){return arguments.length?(o=!!f,c()):o},e.padding=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),s=u,c()):s},e.paddingInner=function(f){return arguments.length?(s=Math.max(0,Math.min(1,f)),c()):s},e.paddingOuter=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),c()):u},e.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),c()):l},e.invertRange=function(f){if(f[0]==null||f[1]==null)return;const h=r[1]<r[0],d=h?n().reverse():n(),p=d.length-1;let m=+f[0],y=+f[1],w,A,S;if(!(m!==m||y!==y)&&(y<m&&(S=m,m=y,y=S),!(y<d[0]||m>r[1-h])))return w=Math.max(0,Dr(d,m)-1),A=m===y?w:Dr(d,y)-1,m-d[w]>a+1e-10&&++w,h&&(S=w,w=p-A,A=p-S),w>A?void 0:t().slice(w,A+1)},e.invert=function(f){const h=e.invertRange([f,f]);return h&&h[0]},e.copy=function(){return qd().domain(t()).range(r).round(o).paddingInner(s).paddingOuter(u).align(l)},c()}function v2(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return v2(t())},e}function V5(){return v2(qd().paddingInner(1))}var j5=Array.prototype.map;function $5(e){return j5.call(e,Zo)}const q5=Array.prototype.slice;function x2(){let e=[],t=[];function n(r){return r==null||r!==r?void 0:t[(Dr(e,r)-1)%t.length]}return n.domain=function(r){return arguments.length?(e=$5(r),n):e.slice()},n.range=function(r){return arguments.length?(t=q5.call(r),n):t.slice()},n.tickFormat=function(r,i){return Yb(e[0],wn(e),r??10,i)},n.copy=function(){return x2().domain(n.domain()).range(n.range())},n}const xc=new Map,W5=Symbol("vega_scale");function Z5(e){return e[W5]=!0,e}function Y5(e,t,n){const r=function(){const a=t();return a.invertRange||(a.invertRange=a.invert?G5(a):a.invertExtent?H5(a):void 0),a.type=e,Z5(a)};return r.metadata=Fu(kh(n)),r}function Ee(e,t,n){return arguments.length>1?(xc.set(e,Y5(e,t,n)),this):Q5(e)?xc.get(e):void 0}Ee(U5,Xb),Ee(Pa,Qb,ot),Ee(jr,Fd,[ot,jr]),Ee(Os,Ld,ot),Ee(Ns,F5,ot),Ee(vc,i2,ot),Ee(p2,L5,[ot,w2]),Ee(g2,O5,[ot,w2]),Ee(Gn,Nd,[ot,nn]),Ee(`${Gn}-${Pa}`,Nd,[ot,nn]),Ee(`${Gn}-${jr}`,u2,[ot,nn,jr]),Ee(`${Gn}-${Os}`,zd,[ot,nn]),Ee(`${Gn}-${Ns}`,N5,[ot,nn]),Ee(`${Gn}-${vc}`,c2,[ot,nn]),Ee(`${La}-${Pa}`,f2,[ot,nn]),Ee(`${La}-${jr}`,h2,[ot,nn,jr]),Ee(`${La}-${Os}`,Ud,[ot,nn]),Ee(`${La}-${Ns}`,z5,[ot,nn]),Ee(`${La}-${vc}`,d2,[ot,nn]),Ee(Hd,o2,[Us,Hd]),Ee(m2,s2,Us),Ee(b2,l2,Us),Ee($d,x2,[zs,Us]),Ee(Vd,fd,zs),Ee(y2,qd,zs),Ee(jd,V5,zs);function Q5(e){return xc.has(e)}function Gs(e,t){const n=xc.get(e);return n&&n.metadata[t]}function yt(e){return Gs(e,ot)}function Hn(e){return Gs(e,zs)}function Ui(e){return Gs(e,Us)}function A2(e){return Gs(e,jr)}function Ac(e){return Gs(e,nn)}function X5(e,t){const n=t[0],r=wn(t)-n;return function(i){return e(n+i*r)}}function Ec(e,t,n){return Id(E2(t||"rgb",n),e)}function K5(e,t){const n=new Array(t),r=t+1;for(let i=0;i<t;)n[i]=e(++i/r);return n}function E2(e,t){const n=x5[J5(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function J5(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const ek={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"},tk={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 _2(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 S2(e,t){for(const n in e)Wd(n,t(e[n]))}const C2={};S2(tk,_2),S2(ek,e=>Ec(_2(e)));function Wd(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(C2[e]=t,this):C2[e]}function nk(){let e=0,t,n=0;const r=new Map,i=a=>(a===t||(n=r.get(a),n===void 0&&(n=e++,r.set(a,n)),t=a),n);return i.addAll=a=>{for(const o of a)i(o)},i.invert=a=>{for(const o of r.entries())if(o[1]==a)return o[0]},i.domain=()=>[...r.keys()],i}function _c(){const e=t=>t;return e.invert=t=>t,e.copy=_c,e.invertRange=()=>{},e.type="null",e}class rk{constructor(t){K(this,bi,void 0);yn(this,"paramListeners");K(this,Do,new Map);K(this,Ro,new Map);K(this,Kl,new Map);K(this,Jl,void 0);Fe(this,Jl,t??(()=>{})),Fe(this,bi,new Map),this.paramListeners=new Map}registerParam(t){if("value"in t&&"expr"in t)throw new Error("Parameter must not have both value and expr: "+t.name);let n;if("value"in t)n=this.allocateSetter(t.name,t.value);else if("expr"in t){const r=this.createExpression(t.expr),i=this.allocateSetter(t.name,r(null));r.addListener(()=>i(r(null))),n=a=>{}}return W(this,Kl).set(t.name,t),n}allocateSetter(t,n){if(W(this,Do).has(t))throw new Error("Setter already allocated for parameter: "+t);const r=i=>{const a=W(this,bi).get(t);if(i!==a){W(this,bi).set(t,i);const o=this.paramListeners.get(t);if(o)for(const s of o)s()}};return r(n),W(this,Do).set(t,r),r}getSetter(t){const n=W(this,Do).get(t);if(!n)throw new Error("Setter not found for parameter: "+t);return n}getValue(t){return W(this,bi).get(t)}findValue(t){const n=this.findMediatorForParam(t);return n==null?void 0:n.getValue(t)}get paramConfigs(){return W(this,Kl)}findMediatorForParam(t){var n;return W(this,bi).has(t)?this:(n=W(this,Jl).call(this))==null?void 0:n.findMediatorForParam(t)}createExpression(t){if(W(this,Ro).has(t))return W(this,Ro).get(t);const n={},r=sc(t,n),i=new Map;for(const o of r.globals){const s=this.findMediatorForParam(o);if(!s)throw new Error(`Unknown variable "${o}" in expression: ${t}`);i.set(o,s),Object.defineProperty(n,o,{enumerable:!0,get(){return s.getValue(o)}})}const a=new Set;return r.addListener=o=>{for(const[s,u]of i){const l=u.paramListeners.get(s)??new Set;u.paramListeners.set(s,l),l.add(o),a.add(o)}},r.invalidate=()=>{var o;for(const[s,u]of i)for(const l of a)(o=u.paramListeners.get(s))==null||o.delete(l)},r.identifier=()=>r.code,W(this,Ro).set(t,r),r}evaluateAndGet(t){return this.createExpression(t)()}}bi=new WeakMap,Do=new WeakMap,Ro=new WeakMap,Kl=new WeakMap,Jl=new WeakMap;function It(e){return typeof e=="object"&&e!=null&&"expr"in e&&Ue(e.expr)}function En(e){if(It(e))throw new Error(`ExprRef ${JSON.stringify(e)} not allowed here. Expected a scalar value.`);return e}function Sc(e,t,n){const r={...t},i=[],a=o=>{i.push(o),i.length===1&&queueMicrotask(()=>{n(i.slice()),i.length=0})};for(const[o,s]of Object.entries(t))if(It(s)){const u=e.createExpression(s.expr);n&&u.addListener(()=>a(o)),Object.defineProperty(r,o,{enumerable:!0,get(){return u()}})}else r[o]=s;return r}function ik(e,t){const n={};t||(t=e.encoding);for(const[r,i]of Object.entries(t)){if(!i)continue;const a=((Zt(i)&&i.resolutionChannel)??(Na(r)&&r))||void 0,o=e.unitView.getScaleResolution(a);n[r]=ak(e,t[r],o==null?void 0:o.scale,e.unitView.getAccessor(r),r)}return n}function ak(e,t,n,r,i){let a;if(rn(t))if(It(t.value)){const o=e.unitView.paramMediator.createExpression(t.value.expr);a=s=>o(null),a.constant=!0,a.constantValue=!1,a.accessor=r}else{const o=t.value;a=s=>o,a.constant=!0,a.constantValue=!0,a.accessor=void 0}else if(r)if(i=="text")a=o=>{},a.accessor=r,a.constant=r.constant;else{if(!n)if(!Na(i))n=_c();else throw new Error(`Missing scale! "${i}": ${JSON.stringify(t)}`);if(a=o=>n(r(o)),Hn(n.type)){const o=nk();o.addAll(n.domain()),a.indexer=o}a.constant=r.constant,a.accessor=r,a.scale=n}else throw new Error(`Missing value or accessor (field, expr, datum) on channel "${i}": ${JSON.stringify(t)}`);return a.invert=n?o=>n.invert(o):o=>{throw new Error("No scale available, cannot invert: "+JSON.stringify(t))},a.channelDef=t,a.applyMetadata=o=>{for(const s in a)s in a&&(o[s]=a[s]);return o},a}function rn(e){return e&&"value"in e}function Gi(e){return e&&"field"in e}function Hs(e){return e&&"datum"in e}function Zt(e){return Gi(e)||Hs(e)||Cc(e)||k2(e)}function Zd(e,t){const n=e.mark.encoding[t];if(Zt(n))return n;throw new Error("Not a channel def with scale!")}function k2(e){return e&&"chrom"in e}function Cc(e){return e&&"expr"in e}const Oa=["x","y"],ok=["x2","y2"],sk=[...Oa,...ok];function T2(e){return Oa.includes(e)}function Vs(e){return sk.includes(e)}const Yd={x:"x2",y:"y2"},I2=Object.fromEntries(Object.entries(Yd).map(e=>[e[1],e[0]]));function js(e){return e in I2}function lk(e){const t=Yd[e];if(t)return t;throw new Error(`${e} has no secondary channel!`)}function Hi(e){return I2[e]??e}function $r(e){return["color","fill","stroke"].includes(Hi(e))}function kc(e){return["shape","squeeze"].includes(e)}function Na(e){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(e)}function uk(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 B2(e){if(!kc(e))throw new Error("Not a discrete channel: "+e);const t=new Map(uk(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 Me(e,t=e){if(/^[A-Za-z0-9_]+$/.test(e)){const n=new Function("datum",`return datum[${JSON.stringify(e)}]`);return ke(n,[e],t)}else return ku(e)}class ck{constructor(){this.accessorCreators=[],this.register(t=>{if(Gi(t))try{const n=Me(t.field);return n.constant=!1,n.fields=Cu(n),n}catch(n){throw new Error(`Invalid field definition: ${n.message}`)}}),this.register(t=>Cc(t)?fk(t.expr):void 0),this.register(t=>{if(Hs(t)){const r=b4(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 fk(e){const n=sc(e);return n.constant=n.fields.length==0,n}/* @license twgl.js 4.22.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
226
+ `&&++U;else{if(Ts(r.charCodeAt(0)))break;e+=r}return t!==""&&we({},ct,bt),{type:Ss,value:e,octal:a,start:n,end:U}}function f8(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";we({},nd)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{we({},nd)}try{return new RegExp(e,t)}catch{return null}}function h8(){var e,t,n,r,i;for(e=ee[U],ic(e==="/","Regular expression literal must start with a slash"),t=ee[U++],n=!1,r=!1;U<At;)if(e=ee[U++],t+=e,e==="\\")e=ee[U++],Ts(e.charCodeAt(0))&&we({},rd),t+=e;else if(Ts(e.charCodeAt(0)))we({},rd);else if(n)e==="]"&&(n=!1);else if(e==="/"){r=!0;break}else e==="["&&(n=!0);return r||we({},rd),i=t.substr(1,t.length-2),{value:i,literal:t}}function d8(){var e,t,n;for(t="",n="";U<At&&(e=ee[U],!!ac(e.charCodeAt(0)));)++U,e==="\\"&&U<At?we({},ct,bt):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&we({},nd,n),{value:n,literal:t}}function p8(){var e,t,n,r;return Te=null,Y1(),e=U,t=h8(),n=d8(),r=f8(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:U}}function g8(e){return e.type===Ri||e.type===Nr||e.type===nc||e.type===rc}function K1(){if(Y1(),U>=At)return{type:_s,start:U,end:U};const e=ee.charCodeAt(U);return Is(e)?s8():e===40||e===41||e===59?od():e===39||e===34?c8():e===46?lr(ee.charCodeAt(U+1))?X1():od():lr(e)?X1():od()}function zt(){const e=Te;return U=e.end,Te=K1(),U=e.end,e}function J1(){const e=U;Te=K1(),U=e}function m8(e){const t=new xn(z6);return t.elements=e,t}function eb(e,t,n){const r=new xn(e==="||"||e==="&&"?j6:U6);return r.operator=e,r.left=t,r.right=n,r}function b8(e,t){const n=new xn(G6);return n.callee=e,n.arguments=t,n}function y8(e,t,n){const r=new xn(H6);return r.test=e,r.consequent=t,r.alternate=n,r}function sd(e){const t=new xn(W1);return t.name=e,t}function Bs(e){const t=new xn(V6);return t.value=e.value,t.raw=ee.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function tb(e,t,n){const r=new xn($6);return r.computed=e==="[",r.object=t,r.property=n,r.computed||(n.member=!0),r}function w8(e){const t=new xn(q6);return t.properties=e,t}function nb(e,t,n){const r=new xn(W6);return r.key=t,r.value=n,r.kind=e,r}function v8(e,t){const n=new xn(Z6);return n.operator=e,n.argument=t,n.prefix=!0,n}function we(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(a,o)=>(ic(o<r.length,"Message reference must be in range"),r[o]));throw n=new Error(i),n.index=U,n.description=i,n}function oc(e){e.type===_s&&we(e,J6),e.type===Fi&&we(e,Y6),e.type===Ss&&we(e,Q6),e.type===Ri&&we(e,X6),e.type===Nr&&we(e,K6),we(e,ct,e.value)}function Et(e){const t=zt();(t.type!==Nt||t.value!==e)&&oc(t)}function Ge(e){return Te.type===Nt&&Te.value===e}function ld(e){return Te.type===Nr&&Te.value===e}function x8(){const e=[];for(U=Te.start,Et("[");!Ge("]");)Ge(",")?(zt(),e.push(null)):(e.push(Mi()),Ge("]")||Et(","));return zt(),m8(e)}function rb(){U=Te.start;const e=zt();return e.type===Ss||e.type===Fi?(e.octal&&we(e,Z1),Bs(e)):sd(e.value)}function A8(){var e,t,n,r;if(U=Te.start,e=Te,e.type===Ri)return n=rb(),Et(":"),r=Mi(),nb("init",n,r);if(e.type===_s||e.type===Nt)oc(e);else return t=rb(),Et(":"),r=Mi(),nb("init",t,r)}function E8(){var e=[],t,n,r,i={},a=String;for(U=Te.start,Et("{");!Ge("}");)t=A8(),t.key.type===W1?n=t.key.name:n=a(t.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(i,r)?we({},e8):i[r]=!0,e.push(t),Ge("}")||Et(",");return Et("}"),w8(e)}function _8(){Et("(");const e=ud();return Et(")"),e}const S8={if:1};function C8(){var e,t,n;if(Ge("("))return _8();if(Ge("["))return x8();if(Ge("{"))return E8();if(e=Te.type,U=Te.start,e===Ri||S8[Te.value])n=sd(zt().value);else if(e===Ss||e===Fi)Te.octal&&we(Te,Z1),n=Bs(zt());else{if(e===Nr)throw new Error(Cs);e===nc?(t=zt(),t.value=t.value==="true",n=Bs(t)):e===rc?(t=zt(),t.value=null,n=Bs(t)):Ge("/")||Ge("/=")?(n=Bs(p8()),J1()):oc(zt())}return n}function k8(){const e=[];if(Et("("),!Ge(")"))for(;U<At&&(e.push(Mi()),!Ge(")"));)Et(",");return Et(")"),e}function T8(){U=Te.start;const e=zt();return g8(e)||oc(e),sd(e.value)}function I8(){return Et("."),T8()}function B8(){Et("[");const e=ud();return Et("]"),e}function D8(){var e,t,n;for(e=C8();;)if(Ge("."))n=I8(),e=tb(".",e,n);else if(Ge("("))t=k8(),e=b8(e,t);else if(Ge("["))n=B8(),e=tb("[",e,n);else break;return e}function ib(){const e=D8();if(Te.type===Nt&&(Ge("++")||Ge("--")))throw new Error(Cs);return e}function sc(){var e,t;if(Te.type!==Nt&&Te.type!==Nr)t=ib();else{if(Ge("++")||Ge("--"))throw new Error(Cs);if(Ge("+")||Ge("-")||Ge("~")||Ge("!"))e=zt(),t=sc(),t=v8(e.value,t);else{if(ld("delete")||ld("void")||ld("typeof"))throw new Error(Cs);t=ib()}}return t}function ab(e){let t=0;if(e.type!==Nt&&e.type!==Nr)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 R8(){var e,t,n,r,i,a,o,s,u,l;if(e=Te,u=sc(),r=Te,i=ab(r),i===0)return u;for(r.prec=i,zt(),t=[e,Te],o=sc(),a=[u,r,o];(i=ab(Te))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),s=a.pop().value,u=a.pop(),t.pop(),n=eb(s,u,o),a.push(n);r=zt(),r.prec=i,a.push(r),t.push(Te),n=sc(),a.push(n)}for(l=a.length-1,n=a[l],t.pop();l>1;)t.pop(),n=eb(a[l-1].value,a[l-2],n),l-=2;return n}function Mi(){var e,t,n;return e=R8(),Ge("?")&&(zt(),t=Mi(),Et(":"),n=Mi(),e=y8(e,t,n)),e}function ud(){const e=Mi();if(Ge(","))throw new Error(Cs);return e}function F8(e){ee=e,U=0,At=ee.length,Te=null,J1();const t=ud();if(Te.type!==_s)throw new Error("Unexpect token after expression.");return t}var M8={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 ob(e){function t(o,s,u,l){let c=e(s[0]);return u&&(c=u+"("+c+")",u.lastIndexOf("new ",0)===0&&(c="("+c+")")),c+"."+o+(l<0?"":l===0?"()":"("+s.slice(1).map(e).join(",")+")")}function n(o,s,u){return l=>t(o,l,s,u)}const r="new Date",i="String",a="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",hypot:"Math.hypot",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(o){o.length<3&&Qe("Missing arguments to clamp function."),o.length>3&&Qe("Too many arguments to clamp function.");const s=o.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:a,test:n("test",a),if:function(o){o.length<3&&Qe("Missing arguments to if function."),o.length>3&&Qe("Too many arguments to if function.");const s=o.map(e);return"("+s[0]+"?"+s[1]+":"+s[2]+")"}}}function P8(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function L8(e){e=e||{};const t=e.allowed?Mu(e.allowed):{},n=e.forbidden?Mu(e.forbidden):{},r=e.constants||M8,i=(e.functions||ob)(f),a=e.globalvar,o=e.fieldvar,s=Pt(a)?a:p=>`${a}["${p}"]`;let u={},l={},c=0;function f(p){if(Ue(p))return p;const m=h[p.type];return m==null&&Qe("Unsupported type: "+p.type),m(p)}const h={Literal:p=>p.raw,Identifier:p=>{const m=p.name;return c>0?m:Ea(n,m)?Qe("Illegal identifier: "+m):Ea(r,m)?r[m]:Ea(t,m)?m:(u[m]=1,s(m))},MemberExpression:p=>{const m=!p.computed,y=f(p.object);m&&(c+=1);const w=f(p.property);return y===o&&(l[P8(w)]=1),m&&(c-=1),y+(m?"."+w:"["+w+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&Qe("Illegal callee type: "+p.callee.type);const m=p.callee.name,y=p.arguments,w=Ea(i,m)&&i[m];return w||Qe("Unrecognized function: "+m),Pt(w)?w(y):w+"("+y.map(f).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(f).join(",")+"]",BinaryExpression:p=>"("+f(p.left)+" "+p.operator+" "+f(p.right)+")",UnaryExpression:p=>"("+p.operator+f(p.argument)+")",ConditionalExpression:p=>"("+f(p.test)+"?"+f(p.consequent)+":"+f(p.alternate)+")",LogicalExpression:p=>"("+f(p.left)+p.operator+f(p.right)+")",ObjectExpression:p=>"{"+p.properties.map(f).join(",")+"}",Property:p=>{c+=1;const m=f(p.key);return c-=1,m+":"+f(p.value)}};function d(p){const m={code:f(p),globals:Object.keys(u),fields:Object.keys(l)};return u={},l={},m}return d.functions=i,d.constants=r,d}function sb(e,t,n){return n=(n-e)/(t-e),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function Ds(e,t=0,n=1){return Math.max(t,Math.min(n,e))}function O8(e,t,n){return Ds((n-e)/(t-e),0,1)}const lb={clamp:Ds,isArray:xt,isBoolean:Yo,isDefined(e){return e!==void 0},isNumber:Tt,isObject:kt,isRegExp:_4,isString:Ue,isValid(e){return e!=null&&e===e},lerp:Fm,linearstep:O8,smoothstep:sb};function N8(e){const t=ob(e);for(const n in lb)t[n]=`this.${n}`;return t}const z8=L8({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:N8});function ub(e,t={}){try{const n=F8(e),r=z8(n),i=Function("datum","globalObject",`"use strict"; return (${r.code});`).bind(lb),a=o=>i(o,t);return a.fields=r.fields,a.globals=r.globals,a.code=r.code,a}catch(n){throw new Error(`Invalid expression: ${e}, ${n.message}`)}}function Nn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function zr(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 cd=Symbol("implicit");function fd(){var e=new Rr,t=[],n=[],r=cd;function i(a){let o=e.get(a);if(o===void 0){if(r!==cd)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Rr;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return fd(t,n).unknown(r)},Nn.apply(i,arguments),i}function Da(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Rs(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ur(){}var Pi=.7,Ra=1/Pi,Fa="\\s*([+-]?\\d+)\\s*",Fs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",U8=/^#([0-9a-f]{3,8})$/,G8=new RegExp(`^rgb\\(${Fa},${Fa},${Fa}\\)$`),H8=new RegExp(`^rgb\\(${zn},${zn},${zn}\\)$`),V8=new RegExp(`^rgba\\(${Fa},${Fa},${Fa},${Fs}\\)$`),j8=new RegExp(`^rgba\\(${zn},${zn},${zn},${Fs}\\)$`),$8=new RegExp(`^hsl\\(${Fs},${zn},${zn}\\)$`),q8=new RegExp(`^hsla\\(${Fs},${zn},${zn},${Fs}\\)$`),cb={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};Da(Ur,Gr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fb,formatHex:fb,formatHex8:W8,formatHsl:Z8,formatRgb:hb,toString:hb});function fb(){return this.rgb().formatHex()}function W8(){return this.rgb().formatHex8()}function Z8(){return bb(this).formatHsl()}function hb(){return this.rgb().formatRgb()}function Gr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=U8.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?db(t):n===3?new ft(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?lc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?lc(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=G8.exec(e))?new ft(t[1],t[2],t[3],1):(t=H8.exec(e))?new ft(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=V8.exec(e))?lc(t[1],t[2],t[3],t[4]):(t=j8.exec(e))?lc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$8.exec(e))?mb(t[1],t[2]/100,t[3]/100,1):(t=q8.exec(e))?mb(t[1],t[2]/100,t[3]/100,t[4]):cb.hasOwnProperty(e)?db(cb[e]):e==="transparent"?new ft(NaN,NaN,NaN,0):null}function db(e){return new ft(e>>16&255,e>>8&255,e&255,1)}function lc(e,t,n,r){return r<=0&&(e=t=n=NaN),new ft(e,t,n,r)}function hd(e){return e instanceof Ur||(e=Gr(e)),e?(e=e.rgb(),new ft(e.r,e.g,e.b,e.opacity)):new ft}function uc(e,t,n,r){return arguments.length===1?hd(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}Da(ft,uc,Rs(Ur,{brighter(e){return e=e==null?Ra:Math.pow(Ra,e),new ft(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pi:Math.pow(Pi,e),new ft(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ft(Li(this.r),Li(this.g),Li(this.b),cc(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:pb,formatHex:pb,formatHex8:Y8,formatRgb:gb,toString:gb}));function pb(){return`#${Oi(this.r)}${Oi(this.g)}${Oi(this.b)}`}function Y8(){return`#${Oi(this.r)}${Oi(this.g)}${Oi(this.b)}${Oi((isNaN(this.opacity)?1:this.opacity)*255)}`}function gb(){const e=cc(this.opacity);return`${e===1?"rgb(":"rgba("}${Li(this.r)}, ${Li(this.g)}, ${Li(this.b)}${e===1?")":`, ${e})`}`}function cc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Li(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Oi(e){return e=Li(e),(e<16?"0":"")+e.toString(16)}function mb(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new An(e,t,n,r)}function bb(e){if(e instanceof An)return new An(e.h,e.s,e.l,e.opacity);if(e instanceof Ur||(e=Gr(e)),!e)return new An;if(e instanceof An)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new An(o,s,u,e.opacity)}function dd(e,t,n,r){return arguments.length===1?bb(e):new An(e,t,n,r??1)}function An(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Da(An,dd,Rs(Ur,{brighter(e){return e=e==null?Ra:Math.pow(Ra,e),new An(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pi:Math.pow(Pi,e),new An(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(pd(e>=240?e-240:e+120,i,r),pd(e,i,r),pd(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new An(yb(this.h),fc(this.s),fc(this.l),cc(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=cc(this.opacity);return`${e===1?"hsl(":"hsla("}${yb(this.h)}, ${fc(this.s)*100}%, ${fc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yb(e){return e=(e||0)%360,e<0?e+360:e}function fc(e){return Math.max(0,Math.min(1,e||0))}function pd(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 wb=Math.PI/180,vb=180/Math.PI,hc=18,xb=.96422,Ab=1,Eb=.82521,_b=4/29,Ma=6/29,Sb=3*Ma*Ma,Q8=Ma*Ma*Ma;function Cb(e){if(e instanceof Un)return new Un(e.l,e.a,e.b,e.opacity);if(e instanceof ur)return kb(e);e instanceof ft||(e=hd(e));var t=wd(e.r),n=wd(e.g),r=wd(e.b),i=md((.2225045*t+.7168786*n+.0606169*r)/Ab),a,o;return t===n&&n===r?a=o=i:(a=md((.4360747*t+.3850649*n+.1430804*r)/xb),o=md((.0139322*t+.0971045*n+.7141733*r)/Eb)),new Un(116*i-16,500*(a-i),200*(i-o),e.opacity)}function gd(e,t,n,r){return arguments.length===1?Cb(e):new Un(e,t,n,r??1)}function Un(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Da(Un,gd,Rs(Ur,{brighter(e){return new Un(this.l+hc*(e??1),this.a,this.b,this.opacity)},darker(e){return new Un(this.l-hc*(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=xb*bd(t),e=Ab*bd(e),n=Eb*bd(n),new ft(yd(3.1338561*t-1.6168667*e-.4906146*n),yd(-.9787684*t+1.9161415*e+.033454*n),yd(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function md(e){return e>Q8?Math.pow(e,1/3):e/Sb+_b}function bd(e){return e>Ma?e*e*e:Sb*(e-_b)}function yd(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function wd(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function X8(e){if(e instanceof ur)return new ur(e.h,e.c,e.l,e.opacity);if(e instanceof Un||(e=Cb(e)),e.a===0&&e.b===0)return new ur(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*vb;return new ur(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function vd(e,t,n,r){return arguments.length===1?X8(e):new ur(e,t,n,r??1)}function ur(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function kb(e){if(isNaN(e.h))return new Un(e.l,0,0,e.opacity);var t=e.h*wb;return new Un(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Da(ur,vd,Rs(Ur,{brighter(e){return new ur(this.h,this.c,this.l+hc*(e??1),this.opacity)},darker(e){return new ur(this.h,this.c,this.l-hc*(e??1),this.opacity)},rgb(){return kb(this).rgb()}}));var Tb=-.14861,xd=1.78277,Ad=-.29227,dc=-.90649,Ms=1.97294,Ib=Ms*dc,Bb=Ms*xd,Db=xd*Ad-dc*Tb;function K8(e){if(e instanceof Ni)return new Ni(e.h,e.s,e.l,e.opacity);e instanceof ft||(e=hd(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Db*r+Ib*t-Bb*n)/(Db+Ib-Bb),a=r-i,o=(Ms*(n-i)-Ad*a)/dc,s=Math.sqrt(o*o+a*a)/(Ms*i*(1-i)),u=s?Math.atan2(o,a)*vb-120:NaN;return new Ni(u<0?u+360:u,s,i,e.opacity)}function Ed(e,t,n,r){return arguments.length===1?K8(e):new Ni(e,t,n,r??1)}function Ni(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Da(Ni,Ed,Rs(Ur,{brighter(e){return e=e==null?Ra:Math.pow(Ra,e),new Ni(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pi:Math.pow(Pi,e),new Ni(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*wb,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*(Tb*r+xd*i)),255*(t+n*(Ad*r+dc*i)),255*(t+n*(Ms*r)),this.opacity)}}));function Rb(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function Fb(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],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return Rb((n-r/t)*t,o,i,a,s)}}function Mb(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],a=e[r%t],o=e[(r+1)%t],s=e[(r+2)%t];return Rb((n-r/t)*t,i,a,o,s)}}const pc=e=>()=>e;function Pb(e,t){return function(n){return e+n*t}}function J8(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 gc(e,t){var n=t-e;return n?Pb(e,n>180||n<-180?n-360*Math.round(n/360):n):pc(isNaN(e)?t:e)}function e5(e){return(e=+e)==1?ht:function(t,n){return n-t?J8(t,n,e):pc(isNaN(t)?n:t)}}function ht(e,t){var n=t-e;return n?Pb(e,n):pc(isNaN(e)?t:e)}const _d=function e(t){var n=e5(t);function r(i,a){var o=n((i=uc(i)).r,(a=uc(a)).r),s=n(i.g,a.g),u=n(i.b,a.b),l=ht(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function Lb(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=uc(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(u){return s.r=r(u),s.g=i(u),s.b=a(u),s+""}}}var t5=Lb(Fb),n5=Lb(Mb);function Sd(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Ob(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function r5(e,t){return(Ob(t)?Sd:Nb)(e,t)}function Nb(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=Hr(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function zb(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function En(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ub(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]=Hr(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var Cd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kd=new RegExp(Cd.source,"g");function i5(e){return function(){return e}}function a5(e){return function(t){return e(t)+""}}function Gb(e,t){var n=Cd.lastIndex=kd.lastIndex=0,r,i,a,o=-1,s=[],u=[];for(e=e+"",t=t+"";(r=Cd.exec(e))&&(i=kd.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:En(r,i)})),n=kd.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?u[0]?a5(u[0].x):i5(t):(t=u.length,function(l){for(var c=0,f;c<t;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function Hr(e,t){var n=typeof t,r;return t==null||n==="boolean"?pc(t):(n==="number"?En:n==="string"?(r=Gr(t))?(t=r,_d):Gb:t instanceof Gr?_d:t instanceof Date?zb:Ob(t)?Sd:Array.isArray(t)?Nb:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Ub:En)(e,t)}function o5(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function s5(e,t){var n=gc(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ps(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Hb=180/Math.PI,Td={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Vb(e,t,n,r,i,a){var o,s,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),e*r<t*n&&(e=-e,t=-t,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Hb,skewX:Math.atan(u)*Hb,scaleX:o,scaleY:s}}var mc;function l5(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Td:Vb(t.a,t.b,t.c,t.d,t.e,t.f)}function u5(e){return e==null||(mc||(mc=document.createElementNS("http://www.w3.org/2000/svg","g")),mc.setAttribute("transform",e),!(e=mc.transform.baseVal.consolidate()))?Td:(e=e.matrix,Vb(e.a,e.b,e.c,e.d,e.e,e.f))}function jb(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function a(l,c,f,h,d,p){if(l!==f||c!==h){var m=d.push("translate(",null,t,null,n);p.push({i:m-4,x:En(l,f)},{i:m-2,x:En(c,h)})}else(f||h)&&d.push("translate("+f+t+h+n)}function o(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:En(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:En(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,h,d,p){if(l!==f||c!==h){var m=d.push(i(d)+"scale(",null,",",null,")");p.push({i:m-4,x:En(l,f)},{i:m-2,x:En(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=e(l),c=e(c),a(l.translateX,l.translateY,c.translateX,c.translateY,f,h),o(l.rotate,c.rotate,f,h),s(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(d){for(var p=-1,m=h.length,y;++p<m;)f[(y=h[p]).i]=y.x(d);return f.join("")}}}var c5=jb(l5,"px, ","px)","deg)"),f5=jb(u5,", ",")",")"),h5=1e-12;function $b(e){return((e=Math.exp(e))+1/e)/2}function d5(e){return((e=Math.exp(e))-1/e)/2}function p5(e){return((e=Math.exp(2*e))-1)/(e+1)}const g5=function e(t,n,r){function i(a,o){var s=a[0],u=a[1],l=a[2],c=o[0],f=o[1],h=o[2],d=c-s,p=f-u,m=d*d+p*p,y,w;if(m<h5)w=Math.log(h/l)/t,y=function(B){return[s+B*d,u+B*p,l*Math.exp(t*B*w)]};else{var A=Math.sqrt(m),S=(h*h-l*l+r*m)/(2*l*n*A),_=(h*h-l*l-r*m)/(2*h*n*A),T=Math.log(Math.sqrt(S*S+1)-S),I=Math.log(Math.sqrt(_*_+1)-_);w=(I-T)/t,y=function(B){var R=B*w,M=$b(T),G=l/(n*A)*(M*p5(t*R+T)-d5(T));return[s+G*d,u+G*p,l*M/$b(t*R+T)]}}return y.duration=w*1e3*t/Math.SQRT2,y}return i.rho=function(a){var o=Math.max(.001,+a),s=o*o,u=s*s;return e(o,s,u)},i}(Math.SQRT2,2,4);function qb(e){return function(t,n){var r=e((t=dd(t)).h,(n=dd(n)).h),i=ht(t.s,n.s),a=ht(t.l,n.l),o=ht(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=a(s),t.opacity=o(s),t+""}}}const m5=qb(gc);var b5=qb(ht);function y5(e,t){var n=ht((e=gd(e)).l,(t=gd(t)).l),r=ht(e.a,t.a),i=ht(e.b,t.b),a=ht(e.opacity,t.opacity);return function(o){return e.l=n(o),e.a=r(o),e.b=i(o),e.opacity=a(o),e+""}}function Wb(e){return function(t,n){var r=e((t=vd(t)).h,(n=vd(n)).h),i=ht(t.c,n.c),a=ht(t.l,n.l),o=ht(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=a(s),t.opacity=o(s),t+""}}}const w5=Wb(gc);var v5=Wb(ht);function Zb(e){return function t(n){n=+n;function r(i,a){var o=e((i=Ed(i)).h,(a=Ed(a)).h),s=ht(i.s,a.s),u=ht(i.l,a.l),l=ht(i.opacity,a.opacity);return function(c){return i.h=o(c),i.s=s(c),i.l=u(Math.pow(c,n)),i.opacity=l(c),i+""}}return r.gamma=t,r}(1)}const x5=Zb(gc);var A5=Zb(ht);function Id(e,t){t===void 0&&(t=e,e=Hr);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var s=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[s](o-s)}}function E5(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}const _5=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Hr,interpolateArray:r5,interpolateBasis:Fb,interpolateBasisClosed:Mb,interpolateCubehelix:x5,interpolateCubehelixLong:A5,interpolateDate:zb,interpolateDiscrete:o5,interpolateHcl:w5,interpolateHclLong:v5,interpolateHsl:m5,interpolateHslLong:b5,interpolateHue:s5,interpolateLab:y5,interpolateNumber:En,interpolateNumberArray:Sd,interpolateObject:Ub,interpolateRgb:_d,interpolateRgbBasis:t5,interpolateRgbBasisClosed:n5,interpolateRound:Ps,interpolateString:Gb,interpolateTransformCss:c5,interpolateTransformSvg:f5,interpolateZoom:g5,piecewise:Id,quantize:E5},Symbol.toStringTag,{value:"Module"}));function S5(e){return function(){return e}}function Bd(e){return+e}var Yb=[0,1];function Ut(e){return e}function Dd(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:S5(isNaN(t)?NaN:.5)}function C5(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function k5(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Dd(i,r),a=n(o,a)):(r=Dd(r,i),a=n(a,o)),function(s){return a(r(s))}}function T5(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Dd(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var u=Dr(e,s,1,r)-1;return a[u](i[u](s))}}function Ls(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function bc(){var e=Yb,t=Yb,n=Hr,r,i,a,o=Ut,s,u,l;function c(){var h=Math.min(e.length,t.length);return o!==Ut&&(o=C5(e[0],e[h-1])),s=h>2?T5:k5,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?a:(u||(u=s(e.map(r),t,n)))(r(o(h)))}return f.invert=function(h){return o(i((l||(l=s(t,e.map(r),En)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Bd),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=Ps,c()},f.clamp=function(h){return arguments.length?(o=h?!0:Ut,c()):o!==Ut},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,d){return r=h,i=d,c()}}function Qb(){return bc()(Ut,Ut)}function Xb(e,t,n,r){var i=Fr(e,t,n),a;switch(r=Mr(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Km(i,o))&&(r.precision=a),Ph(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Jm(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Xm(i))&&(r.precision=a-(r.type==="%")*2);break}}return mt(r)}function zi(e){var t=e.domain;return e.ticks=function(n){var r=t();return Nu(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Xb(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],u,l,c=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);c-- >0;){if(l=Fh(o,s,n),l===u)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Kb(){var e=Qb();return e.copy=function(){return Ls(e,Kb())},Nn.apply(e,arguments),zi(e)}function Jb(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,Bd),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Jb(e).unknown(t)},e=arguments.length?Array.from(e,Bd):[0,1],zi(n)}function e2(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function t2(e){return Math.log(e)}function n2(e){return Math.exp(e)}function I5(e){return-Math.log(-e)}function B5(e){return-Math.exp(-e)}function D5(e){return isFinite(e)?+("1e"+e):e<0?0:e}function R5(e){return e===10?D5:e===Math.E?Math.exp:t=>Math.pow(e,t)}function F5(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 r2(e){return(t,n)=>-e(-t,n)}function Rd(e){const t=e(t2,n2),n=t.domain;let r=10,i,a;function o(){return i=F5(r),a=R5(r),n()[0]<0?(i=r2(i),a=r2(a),e(I5,B5)):e(t2,n2),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const u=n();let l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let h=i(l),d=i(c),p,m;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(m=h<0?p/a(-h):p*a(h),!(m<l)){if(m>c)break;w.push(m)}}else for(;h<=d;++h)for(p=r-1;p>=1;--p)if(m=h>0?p/a(-h):p*a(h),!(m<l)){if(m>c)break;w.push(m)}w.length*2<y&&(w=Nu(l,c,y))}else w=Nu(h,d,Math.min(d-h,y)).map(a);return f?w.reverse():w},t.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Mr(u)).precision==null&&(u.trim=!0),u=mt(u)),s===1/0)return u;const l=Math.max(1,r*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=l?u(c):""}},t.nice=()=>n(e2(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function Fd(){const e=Rd(bc()).domain([1,10]);return e.copy=()=>Ls(e,Fd()).base(e.base()),Nn.apply(e,arguments),e}function i2(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function a2(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Md(e){var t=1,n=e(i2(t),a2(t));return n.constant=function(r){return arguments.length?e(i2(t=+r),a2(t)):t},zi(n)}function o2(){var e=Md(bc());return e.copy=function(){return Ls(e,o2()).constant(e.constant())},Nn.apply(e,arguments)}function s2(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function M5(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function P5(e){return e<0?-e*e:e*e}function Pd(e){var t=e(Ut,Ut),n=1;function r(){return n===1?e(Ut,Ut):n===.5?e(M5,P5):e(s2(n),s2(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},zi(t)}function Ld(){var e=Pd(bc());return e.copy=function(){return Ls(e,Ld()).exponent(e.exponent())},Nn.apply(e,arguments),e}function L5(){return Ld.apply(null,arguments).exponent(.5)}function l2(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o<s;)n[o-1]=jm(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?r:t[Dr(n,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Xo),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return l2().domain(e).range(t).unknown(r)},Nn.apply(a,arguments)}function u2(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[Dr(r,u,0,n)]:a}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return o}return o.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,s()):[e,t]},o.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},o.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[e,r[0]]:l>=n?[r[n-1],t]:[r[l-1],r[l]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return r.slice()},o.copy=function(){return u2().domain([e,t]).range(i).unknown(a)},Nn.apply(zi(o),arguments)}function c2(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Dr(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return c2().domain(e).range(t).unknown(n)},Nn.apply(i,arguments)}function O5(e){return new Date(e)}function N5(e){return e instanceof Date?+e:+new Date(+e)}function Od(e,t,n,r,i,a,o,s,u,l){var c=Qb(),f=c.invert,h=c.domain,d=l(".%L"),p=l(":%S"),m=l("%I:%M"),y=l("%I %p"),w=l("%a %d"),A=l("%b %d"),S=l("%B"),_=l("%Y");function T(I){return(u(I)<I?d:s(I)<I?p:o(I)<I?m:a(I)<I?y:r(I)<I?i(I)<I?w:A:n(I)<I?S:_)(I)}return c.invert=function(I){return new Date(f(I))},c.domain=function(I){return arguments.length?h(Array.from(I,N5)):h().map(O5)},c.ticks=function(I){var B=h();return e(B[0],B[B.length-1],I??10)},c.tickFormat=function(I,B){return B==null?T:l(B)},c.nice=function(I){var B=h();return(!I||typeof I.range!="function")&&(I=t(B[0],B[B.length-1],I??10)),I?h(e2(B,I)):c},c.copy=function(){return Ls(c,Od(e,t,n,r,i,a,o,s,u,l))},c}function z5(){return Nn.apply(Od(mS,bS,Pn,ts,Jo,Pr,ju,Hu,sr,Vh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function U5(){return Nn.apply(Od(pS,gS,Ln,ns,es,Si,$u,Vu,sr,jh).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function yc(){var e=0,t=1,n,r,i,a,o=Ut,s=!1,u;function l(f){return f==null||isNaN(f=+f)?u:o(i===0?.5:(f=(a(f)-n)*i,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([e,t]=f,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(f){return arguments.length?(s=!!f,l):s},l.interpolator=function(f){return arguments.length?(o=f,l):o};function c(f){return function(h){var d,p;return arguments.length?([d,p]=h,o=f(d,p),l):[o(0),o(1)]}}return l.range=c(Hr),l.rangeRound=c(Ps),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return a=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),l}}function Vr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Nd(){var e=zi(yc()(Ut));return e.copy=function(){return Vr(e,Nd())},zr.apply(e,arguments)}function f2(){var e=Rd(yc()).domain([1,10]);return e.copy=function(){return Vr(e,f2()).base(e.base())},zr.apply(e,arguments)}function h2(){var e=Md(yc());return e.copy=function(){return Vr(e,h2()).constant(e.constant())},zr.apply(e,arguments)}function zd(){var e=Pd(yc());return e.copy=function(){return Vr(e,zd()).exponent(e.exponent())},zr.apply(e,arguments)}function G5(){return zd.apply(null,arguments).exponent(.5)}function wc(){var e=0,t=.5,n=1,r=1,i,a,o,s,u,l=Ut,c,f=!1,h;function d(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-a)*(r*m<r*a?s:u),l(f?Math.max(0,Math.min(1,m)):m))}d.domain=function(m){return arguments.length?([e,t,n]=m,i=c(e=+e),a=c(t=+t),o=c(n=+n),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,d):[e,t,n]},d.clamp=function(m){return arguments.length?(f=!!m,d):f},d.interpolator=function(m){return arguments.length?(l=m,d):l};function p(m){return function(y){var w,A,S;return arguments.length?([w,A,S]=y,l=Id(m,[w,A,S]),d):[l(0),l(.5),l(1)]}}return d.range=p(Hr),d.rangeRound=p(Ps),d.unknown=function(m){return arguments.length?(h=m,d):h},function(m){return c=m,i=m(e),a=m(t),o=m(n),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,d}}function d2(){var e=zi(wc()(Ut));return e.copy=function(){return Vr(e,d2())},zr.apply(e,arguments)}function p2(){var e=Rd(wc()).domain([.1,1,10]);return e.copy=function(){return Vr(e,p2()).base(e.base())},zr.apply(e,arguments)}function g2(){var e=Md(wc());return e.copy=function(){return Vr(e,g2()).constant(e.constant())},zr.apply(e,arguments)}function Ud(){var e=Pd(wc());return e.copy=function(){return Vr(e,Ud()).exponent(e.exponent())},zr.apply(e,arguments)}function H5(){return Ud.apply(null,arguments).exponent(.5)}function Gd(e,t,n){const r=e-t+n*2;return e?r>0?r:1:0}const V5="identity",Pa="linear",jr="log",Os="pow",Ns="sqrt",vc="symlog",m2="time",b2="utc",Gn="sequential",La="diverging",Hd="quantile",y2="quantize",w2="threshold",Vd="ordinal",jd="point",v2="band",$d="bin-ordinal",ot="continuous",zs="discrete",Us="discretizing",an="interpolating",x2="temporal";function j5(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 $5(e){return function(t){const n=e.range();let r=t[0],i=t[1],a=-1,o,s,u,l;for(i<r&&(s=r,r=i,i=s),u=0,l=n.length;u<l;++u)n[u]>=r&&n[u]<=i&&(a<0&&(a=u),o=u);if(!(a<0))return r=e.invertExtent(n[a]),i=e.invertExtent(n[o]),[r[0]===void 0?r[1]:r[0],i[1]===void 0?i[0]:i[1]]}}function qd(){const e=fd().unknown(void 0),t=e.domain,n=e.range;let r=[0,1],i,a,o=!1,s=0,u=0,l=.5;delete e.unknown;function c(){const f=t().length,h=r[1]<r[0],d=r[1-h],p=Gd(f,s,u);let m=r[h-0];i=(d-m)/(p||1),o&&(i=Math.floor(i)),m+=(d-m-i*(f-s))*l,a=i*(1-s),o&&(m=Math.round(m),a=Math.round(a));const y=Ko(f).map(w=>m+i*w);return n(h?y.reverse():y)}return e.domain=function(f){return arguments.length?(t(f),c()):t()},e.range=function(f){return arguments.length?(r=[+f[0],+f[1]],c()):r.slice()},e.rangeRound=function(f){return r=[+f[0],+f[1]],o=!0,c()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(f){return arguments.length?(o=!!f,c()):o},e.padding=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),s=u,c()):s},e.paddingInner=function(f){return arguments.length?(s=Math.max(0,Math.min(1,f)),c()):s},e.paddingOuter=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),c()):u},e.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),c()):l},e.invertRange=function(f){if(f[0]==null||f[1]==null)return;const h=r[1]<r[0],d=h?n().reverse():n(),p=d.length-1;let m=+f[0],y=+f[1],w,A,S;if(!(m!==m||y!==y)&&(y<m&&(S=m,m=y,y=S),!(y<d[0]||m>r[1-h])))return w=Math.max(0,Dr(d,m)-1),A=m===y?w:Dr(d,y)-1,m-d[w]>a+1e-10&&++w,h&&(S=w,w=p-A,A=p-S),w>A?void 0:t().slice(w,A+1)},e.invert=function(f){const h=e.invertRange([f,f]);return h&&h[0]},e.copy=function(){return qd().domain(t()).range(r).round(o).paddingInner(s).paddingOuter(u).align(l)},c()}function A2(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return A2(t())},e}function q5(){return A2(qd().paddingInner(1))}var W5=Array.prototype.map;function Z5(e){return W5.call(e,Zo)}const Y5=Array.prototype.slice;function E2(){let e=[],t=[];function n(r){return r==null||r!==r?void 0:t[(Dr(e,r)-1)%t.length]}return n.domain=function(r){return arguments.length?(e=Z5(r),n):e.slice()},n.range=function(r){return arguments.length?(t=Y5.call(r),n):t.slice()},n.tickFormat=function(r,i){return Xb(e[0],vn(e),r??10,i)},n.copy=function(){return E2().domain(n.domain()).range(n.range())},n}const xc=new Map,Q5=Symbol("vega_scale");function X5(e){return e[Q5]=!0,e}function K5(e,t,n){const r=function(){const a=t();return a.invertRange||(a.invertRange=a.invert?j5(a):a.invertExtent?$5(a):void 0),a.type=e,X5(a)};return r.metadata=Mu(kh(n)),r}function Ee(e,t,n){return arguments.length>1?(xc.set(e,K5(e,t,n)),this):J5(e)?xc.get(e):void 0}Ee(V5,Jb),Ee(Pa,Kb,ot),Ee(jr,Fd,[ot,jr]),Ee(Os,Ld,ot),Ee(Ns,L5,ot),Ee(vc,o2,ot),Ee(m2,z5,[ot,x2]),Ee(b2,U5,[ot,x2]),Ee(Gn,Nd,[ot,an]),Ee(`${Gn}-${Pa}`,Nd,[ot,an]),Ee(`${Gn}-${jr}`,f2,[ot,an,jr]),Ee(`${Gn}-${Os}`,zd,[ot,an]),Ee(`${Gn}-${Ns}`,G5,[ot,an]),Ee(`${Gn}-${vc}`,h2,[ot,an]),Ee(`${La}-${Pa}`,d2,[ot,an]),Ee(`${La}-${jr}`,p2,[ot,an,jr]),Ee(`${La}-${Os}`,Ud,[ot,an]),Ee(`${La}-${Ns}`,H5,[ot,an]),Ee(`${La}-${vc}`,g2,[ot,an]),Ee(Hd,l2,[Us,Hd]),Ee(y2,u2,Us),Ee(w2,c2,Us),Ee($d,E2,[zs,Us]),Ee(Vd,fd,zs),Ee(v2,qd,zs),Ee(jd,q5,zs);function J5(e){return xc.has(e)}function Gs(e,t){const n=xc.get(e);return n&&n.metadata[t]}function yt(e){return Gs(e,ot)}function Hn(e){return Gs(e,zs)}function Ui(e){return Gs(e,Us)}function _2(e){return Gs(e,jr)}function Ac(e){return Gs(e,an)}function ek(e,t){const n=t[0],r=vn(t)-n;return function(i){return e(n+i*r)}}function Ec(e,t,n){return Id(S2(t||"rgb",n),e)}function tk(e,t){const n=new Array(t),r=t+1;for(let i=0;i<t;)n[i]=e(++i/r);return n}function S2(e,t){const n=_5[nk(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function nk(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const rk={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"},ik={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 C2(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 k2(e,t){for(const n in e)Wd(n,t(e[n]))}const T2={};k2(ik,C2),k2(rk,e=>Ec(C2(e)));function Wd(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(T2[e]=t,this):T2[e]}function ak(){let e=0,t,n=0;const r=new Map,i=a=>(a===t||(n=r.get(a),n===void 0&&(n=e++,r.set(a,n)),t=a),n);return i.addAll=a=>{for(const o of a)i(o)},i.invert=a=>{for(const o of r.entries())if(o[1]==a)return o[0]},i.domain=()=>[...r.keys()],i}function _c(){const e=t=>t;return e.invert=t=>t,e.copy=_c,e.invertRange=()=>{},e.type="null",e}class ok{constructor(t){K(this,bi,void 0);nn(this,"paramListeners");K(this,Do,new Map);K(this,Ro,new Map);K(this,Kl,new Map);K(this,Jl,void 0);Fe(this,Jl,t??(()=>{})),Fe(this,bi,new Map),this.paramListeners=new Map}registerParam(t){if("value"in t&&"expr"in t)throw new Error("Parameter must not have both value and expr: "+t.name);let n;if("value"in t)n=this.allocateSetter(t.name,t.value);else if("expr"in t){const r=this.createExpression(t.expr),i=this.allocateSetter(t.name,r(null));r.addListener(()=>i(r(null))),n=a=>{}}return W(this,Kl).set(t.name,t),n}allocateSetter(t,n,r=!1){if(W(this,Do).has(t))throw new Error("Setter already allocated for parameter: "+t);const i=a=>{const o=W(this,bi).get(t);if(a!==o){W(this,bi).set(t,a);const s=this.paramListeners.get(t);if(s&&!r)for(const u of s)u()}};return i(n),W(this,Do).set(t,i),i}getSetter(t){const n=W(this,Do).get(t);if(!n)throw new Error("Setter not found for parameter: "+t);return n}getValue(t){return W(this,bi).get(t)}findValue(t){const n=this.findMediatorForParam(t);return n==null?void 0:n.getValue(t)}get paramConfigs(){return W(this,Kl)}findMediatorForParam(t){var n;return W(this,bi).has(t)?this:(n=W(this,Jl).call(this))==null?void 0:n.findMediatorForParam(t)}createExpression(t){if(W(this,Ro).has(t))return W(this,Ro).get(t);const n={},r=ub(t,n),i=new Map;for(const o of r.globals){const s=this.findMediatorForParam(o);if(!s)throw new Error(`Unknown variable "${o}" in expression: ${t}`);i.set(o,s),Object.defineProperty(n,o,{enumerable:!0,get(){return s.getValue(o)}})}const a=new Set;return r.addListener=o=>{for(const[s,u]of i){const l=u.paramListeners.get(s)??new Set;u.paramListeners.set(s,l),l.add(o),a.add(o)}},r.invalidate=()=>{var o;for(const[s,u]of i)for(const l of a)(o=u.paramListeners.get(s))==null||o.delete(l)},r.identifier=()=>r.code,W(this,Ro).set(t,r),r}evaluateAndGet(t){return this.createExpression(t)()}}bi=new WeakMap,Do=new WeakMap,Ro=new WeakMap,Kl=new WeakMap,Jl=new WeakMap;function It(e){return typeof e=="object"&&e!=null&&"expr"in e&&Ue(e.expr)}function Zt(e){if(It(e))throw new Error(`ExprRef ${JSON.stringify(e)} not allowed here. Expected a scalar value.`);return e}function Sc(e,t,n){const r={...t},i=[],a=o=>{i.push(o),i.length===1&&queueMicrotask(()=>{n(i.slice()),i.length=0})};for(const[o,s]of Object.entries(t))if(It(s)){const u=e.createExpression(s.expr);n&&u.addListener(()=>a(o)),Object.defineProperty(r,o,{enumerable:!0,get(){return u()}})}else r[o]=s;return r}function sk(e,t){const n={};t||(t=e.encoding);for(const[r,i]of Object.entries(t)){if(!i)continue;const a=((Yt(i)&&i.resolutionChannel)??(Na(r)&&r))||void 0,o=e.unitView.getScaleResolution(a);n[r]=lk(e,t[r],o==null?void 0:o.scale,e.unitView.getAccessor(r),r)}return n}function lk(e,t,n,r,i){let a;if(on(t))if(It(t.value)){const o=e.unitView.paramMediator.createExpression(t.value.expr);a=s=>o(null),a.constant=!0,a.constantValue=!1,a.accessor=r}else{const o=t.value;a=s=>o,a.constant=!0,a.constantValue=!0,a.accessor=void 0}else if(r)if(i=="text")a=o=>{},a.accessor=r,a.constant=r.constant;else{if(!n)if(!Na(i))n=_c();else throw new Error(`Missing scale! "${i}": ${JSON.stringify(t)}`);if(a=o=>n(r(o)),Hn(n.type)){const o=ak();o.addAll(n.domain()),a.indexer=o}a.constant=r.constant,a.accessor=r,a.scale=n}else throw new Error(`Missing value or accessor (field, expr, datum) on channel "${i}": ${JSON.stringify(t)}`);return a.invert=n?o=>n.invert(o):o=>{throw new Error("No scale available, cannot invert: "+JSON.stringify(t))},a.channelDef=t,a.applyMetadata=o=>{for(const s in a)s in a&&(o[s]=a[s]);return o},a}function on(e){return e&&"value"in e}function Gi(e){return e&&"field"in e}function Hs(e){return e&&"datum"in e}function Yt(e){return Gi(e)||Hs(e)||Cc(e)||I2(e)}function Zd(e,t){const n=e.mark.encoding[t];if(Yt(n))return n;throw new Error("Not a channel def with scale!")}function I2(e){return e&&"chrom"in e}function Cc(e){return e&&"expr"in e}const Oa=["x","y"],uk=["x2","y2"],ck=[...Oa,...uk];function B2(e){return Oa.includes(e)}function Vs(e){return ck.includes(e)}const Yd={x:"x2",y:"y2"},D2=Object.fromEntries(Object.entries(Yd).map(e=>[e[1],e[0]]));function js(e){return e in D2}function fk(e){const t=Yd[e];if(t)return t;throw new Error(`${e} has no secondary channel!`)}function Hi(e){return D2[e]??e}function $r(e){return["color","fill","stroke"].includes(Hi(e))}function kc(e){return["shape","squeeze"].includes(e)}function Na(e){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(e)}function hk(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 R2(e){if(!kc(e))throw new Error("Not a discrete channel: "+e);const t=new Map(hk(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 Me(e,t=e){if(/^[A-Za-z0-9_]+$/.test(e)){const n=new Function("datum",`return datum[${JSON.stringify(e)}]`);return ke(n,[e],t)}else return Tu(e)}class dk{constructor(){this.accessorCreators=[],this.register(t=>{if(Gi(t))try{const n=Me(t.field);return n.constant=!1,n.fields=ku(n),n}catch(n){throw new Error(`Invalid field definition: ${n.message}`)}}),this.register(t=>Cc(t)?pk(t.expr):void 0),this.register(t=>{if(Hs(t)){const r=v4(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 pk(e){const n=ub(e);return n.constant=n.fields.length==0,n}/* @license twgl.js 4.22.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
223
227
  Available via the MIT license.
224
- see: http://github.com/greggman/twgl.js for details */const Qd=5120,$s=5121,Xd=5122,Kd=5123,Jd=5124,e0=5125,t0=5126,hk=32819,dk=32820,pk=33635,gk=5131,mk=33640,bk=35899,yk=35902,wk=36269,vk=34042,D2={};{const e=D2;e[Qd]=Int8Array,e[$s]=Uint8Array,e[Xd]=Int16Array,e[Kd]=Uint16Array,e[Jd]=Int32Array,e[e0]=Uint32Array,e[t0]=Float32Array,e[hk]=Uint16Array,e[dk]=Uint16Array,e[pk]=Uint16Array,e[gk]=Uint16Array,e[mk]=Uint32Array,e[bk]=Uint32Array,e[yk]=Uint32Array,e[wk]=Uint32Array,e[vk]=Uint32Array}function n0(e){if(e instanceof Int8Array)return Qd;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)return $s;if(e instanceof Int16Array)return Xd;if(e instanceof Uint16Array)return Kd;if(e instanceof Int32Array)return Jd;if(e instanceof Uint32Array)return e0;if(e instanceof Float32Array)return t0;throw new Error("unsupported typed array type")}function xk(e){if(e===Int8Array)return Qd;if(e===Uint8Array||e===Uint8ClampedArray)return $s;if(e===Int16Array)return Xd;if(e===Uint16Array)return Kd;if(e===Int32Array)return Jd;if(e===Uint32Array)return e0;if(e===Float32Array)return t0;throw new Error("unsupported typed array type")}function Ak(e){const t=D2[e];if(!t)throw new Error("unknown gl type");return t}const Tc=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 Ek(...e){console.error(...e)}function R2(...e){console.warn(...e)}function _k(e,t){return typeof WebGLBuffer<"u"&&t instanceof WebGLBuffer}function F2(e,t){return typeof WebGLRenderbuffer<"u"&&t instanceof WebGLRenderbuffer}function Ic(e,t){return typeof WebGLTexture<"u"&&t instanceof WebGLTexture}function Sk(e,t){return typeof WebGLSampler<"u"&&t instanceof WebGLSampler}const M2=35044,Vn=34962,Ck=34963,kk=34660,Tk=5120,Ik=5121,Bk=5122,Dk=5123,Rk=5124,Fk=5125,Mk=5126,P2={attribPrefix:""};function L2(e,t,n,r,i){e.bindBuffer(t,n),e.bufferData(t,r,i||M2)}function O2(e,t,n,r){if(_k(e,t))return t;n=n||Vn;const i=e.createBuffer();return L2(e,n,i,t,r),i}function N2(e){return e==="indices"}function Pk(e){return e instanceof Int8Array||e instanceof Uint8Array}function Lk(e){return e===Int8Array||e===Uint8Array}function Ok(e){return e.length?e:e.data}const Nk=/coord|texture/i,zk=/color|colour/i;function z2(e,t){let n;if(Nk.test(e)?n=2:zk.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 Uk(e,t){return e.numComponents||e.size||z2(t,Ok(e).length)}function r0(e,t){if(Tc(e))return e;if(Tc(e.data))return e.data;Array.isArray(e)&&(e={data:e});let n=e.type;return n||(N2(t)?n=Uint16Array:n=Float32Array),new n(e.data)}function Gk(e,t){const n={};return Object.keys(t).forEach(function(r){if(!N2(r)){const i=t[r],a=i.attrib||i.name||i.attribName||P2.attribPrefix+r;if(i.value){if(!Array.isArray(i.value)&&!Tc(i.value))throw new Error("array.value is not array or typedarray");n[a]={value:i.value}}else{let o,s,u,l;if(i.buffer&&i.buffer instanceof WebGLBuffer)o=i.buffer,l=i.numComponents||i.size,s=i.type,u=i.normalize;else if(typeof i=="number"||typeof i.data=="number"){const c=i.data||i,f=i.type||Float32Array,h=c*f.BYTES_PER_ELEMENT;s=xk(f),u=i.normalize!==void 0?i.normalize:Lk(f),l=i.numComponents||i.size||z2(r,c),o=e.createBuffer(),e.bindBuffer(Vn,o),e.bufferData(Vn,h,i.drawType||M2)}else{const c=r0(i,r);o=O2(e,c,void 0,i.drawType),s=n0(c),u=i.normalize!==void 0?i.normalize:Pk(c),l=Uk(i,r)}n[a]={buffer:o,numComponents:l,type:s,normalize:u,stride:i.stride||0,offset:i.offset||0,divisor:i.divisor===void 0?void 0:i.divisor,drawType:i.drawType}}}}),e.bindBuffer(Vn,null),n}function Hk(e,t,n,r){n=r0(n),r!==void 0?(e.bindBuffer(Vn,t.buffer),e.bufferSubData(Vn,r,n)):L2(e,Vn,t.buffer,n,t.drawType)}function Vk(e,t){return t===Tk||t===Ik?1:t===Bk||t===Dk?2:t===Rk||t===Fk||t===Mk?4:0}const i0=["position","positions","a_position"];function jk(e,t){let n,r;for(r=0;r<i0.length&&(n=i0[r],!(n in t||(n=P2.attribPrefix+n,n in t)));++r);r===i0.length&&(n=Object.keys(t)[0]);const i=t[n];e.bindBuffer(Vn,i.buffer);const a=e.getBufferParameter(Vn,kk);e.bindBuffer(Vn,null);const o=Vk(e,i.type),s=a/o,u=i.numComponents||i.size,l=s/u;if(l%1!==0)throw new Error(`numComponents ${u} not correct for length ${length}`);return l}function $k(e,t,n){const r=Gk(e,t),i=Object.assign({},n||{});i.attribs=Object.assign({},n?n.attribs:{},r);const a=t.indices;if(a){const o=r0(a,"indices");i.indices=O2(e,o,Ck),i.numElements=o.length,i.elementType=n0(o)}else i.numElements||(i.numElements=jk(e,i.attribs));return i}function za(e){return!!e.texStorage2D}const a0=function(){const e={},t={};function n(r){const i=r.constructor.name;if(!e[i]){for(const a in r)if(typeof r[a]=="number"){const o=t[r[a]];t[r[a]]=o?`${o} | ${a}`:a}e[i]=!0}}return function(i,a){return n(i),t[a]||(typeof a=="number"?`0x${a.toString(16)}`:a)}}(),qr={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},Ua=Tc,U2=function(){let e;return function(){return e=e||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),e}}(),G2=6406,jn=6407,Ve=6408,H2=6409,V2=6410,qs=6402,j2=34041,Bc=33071,qk=9728,Wk=9729,cr=3553,fr=34067,Wr=32879,Zr=35866,Dc=34069,Zk=34070,Yk=34071,Qk=34072,Xk=34073,Kk=34074,o0=10241,s0=10240,Rc=10242,Fc=10243,$2=32882,Jk=33082,eT=33083,tT=33084,nT=33085,l0=3317,q2=3314,W2=32878,Z2=3316,Y2=3315,Q2=32877,rT=37443,iT=37441,aT=37440,oT=33321,sT=36756,lT=33325,uT=33326,cT=33330,fT=33329,hT=33338,dT=33337,pT=33340,gT=33339,mT=33323,bT=36757,yT=33327,wT=33328,vT=33336,xT=33335,AT=33332,ET=33331,_T=33334,ST=33333,CT=32849,kT=35905,TT=36194,IT=36758,BT=35898,DT=35901,RT=34843,FT=34837,MT=36221,PT=36239,LT=36215,OT=36233,NT=36209,zT=36227,UT=32856,GT=35907,HT=36759,VT=32855,jT=32854,$T=32857,qT=34842,WT=34836,ZT=36220,YT=36238,QT=36975,XT=36214,KT=36232,JT=36226,eI=36208,tI=33189,nI=33190,rI=36012,iI=36013,aI=35056,Yr=5120,je=5121,Mc=5122,Ga=5123,Pc=5124,Vi=5125,_t=5126,X2=32819,K2=32820,J2=33635,_n=5131,Ws=36193,u0=33640,oI=35899,sI=35902,lI=36269,uI=34042,Lc=33319,Ha=33320,Oc=6403,Va=36244,ja=36248,ji=36249;let c0;function Nc(e){if(!c0){const t={};t[G2]={textureFormat:G2,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[je,_n,Ws,_t]},t[H2]={textureFormat:H2,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[je,_n,Ws,_t]},t[V2]={textureFormat:V2,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[je,_n,Ws,_t]},t[jn]={textureFormat:jn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[je,_n,Ws,_t,J2]},t[Ve]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[je,_n,Ws,_t,X2,K2]},t[qs]={textureFormat:qs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Vi,Ga]},t[oT]={textureFormat:Oc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[je]},t[sT]={textureFormat:Oc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[Yr]},t[lT]={textureFormat:Oc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[_t,_n]},t[uT]={textureFormat:Oc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[_t]},t[cT]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[je]},t[fT]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[Yr]},t[AT]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Ga]},t[ET]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Mc]},t[_T]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Vi]},t[ST]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Pc]},t[mT]={textureFormat:Lc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[je]},t[bT]={textureFormat:Lc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[Yr]},t[yT]={textureFormat:Lc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[_t,_n]},t[wT]={textureFormat:Lc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[_t]},t[vT]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[je]},t[xT]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Yr]},t[hT]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ga]},t[dT]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Mc]},t[pT]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Vi]},t[gT]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Pc]},t[CT]={textureFormat:jn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[je]},t[kT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[je]},t[TT]={textureFormat:jn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[je,J2]},t[IT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[Yr]},t[BT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[_t,_n,oI]},t[DT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[_t,_n,sI]},t[RT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[_t,_n]},t[FT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[_t]},t[MT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[je]},t[PT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[Yr]},t[LT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Ga]},t[OT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Mc]},t[NT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Vi]},t[zT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Pc]},t[UT]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[je]},t[GT]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[je]},t[HT]={textureFormat:Ve,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[Yr]},t[VT]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[je,K2,u0]},t[jT]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[je,X2]},t[$T]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[u0]},t[qT]={textureFormat:Ve,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[_t,_n]},t[WT]={textureFormat:Ve,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[_t]},t[ZT]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[je]},t[YT]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Yr]},t[QT]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[u0]},t[XT]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Ga]},t[KT]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Mc]},t[JT]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Pc]},t[eI]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Vi]},t[tI]={textureFormat:qs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Ga,Vi]},t[nI]={textureFormat:qs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Vi]},t[rI]={textureFormat:qs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[_t]},t[aI]={textureFormat:j2,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[uI]},t[iI]={textureFormat:j2,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[lI]},Object.keys(t).forEach(function(n){const r=t[n];r.bytesPerElementMap={},r.bytesPerElement.forEach(function(i,a){const o=r.type[a];r.bytesPerElementMap[o]=i})}),c0=t}return c0[e]}function cI(e,t){const n=Nc(e);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[t];if(r===void 0)throw"unknown internal format";return r}function $a(e){const t=Nc(e);if(!t)throw"unknown internal format";return{format:t.textureFormat,type:t.type[0]}}function ey(e){return(e&e-1)===0}function fI(e,t,n,r){if(!za(e))return ey(t)&&ey(n);const i=Nc(r);if(!i)throw"unknown internal format";return i.colorRenderable&&i.textureFilterable}function hI(e){const t=Nc(e);if(!t)throw"unknown internal format";return t.textureFilterable}function ty(e,t,n){return Ua(t)?n0(t):n||je}function zc(e,t,n,r,i){if(i%1!==0)throw"can't guess dimensions";if(!n&&!r){const a=Math.sqrt(i/(t===fr?6:1));a%1===0?(n=a,r=a):(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 qa(e,t){t.colorspaceConversion!==void 0&&e.pixelStorei(rT,t.colorspaceConversion),t.premultiplyAlpha!==void 0&&e.pixelStorei(iT,t.premultiplyAlpha),t.flipY!==void 0&&e.pixelStorei(aT,t.flipY)}function ny(e){e.pixelStorei(l0,4),za(e)&&(e.pixelStorei(q2,0),e.pixelStorei(W2,0),e.pixelStorei(Z2,0),e.pixelStorei(Y2,0),e.pixelStorei(Q2,0))}function dI(e,t,n,r){r.minMag&&(n.call(e,t,o0,r.minMag),n.call(e,t,s0,r.minMag)),r.min&&n.call(e,t,o0,r.min),r.mag&&n.call(e,t,s0,r.mag),r.wrap&&(n.call(e,t,Rc,r.wrap),n.call(e,t,Fc,r.wrap),(t===Wr||Sk(e,t))&&n.call(e,t,$2,r.wrap)),r.wrapR&&n.call(e,t,$2,r.wrapR),r.wrapS&&n.call(e,t,Rc,r.wrapS),r.wrapT&&n.call(e,t,Fc,r.wrapT),r.minLod&&n.call(e,t,Jk,r.minLod),r.maxLod&&n.call(e,t,eT,r.maxLod),r.baseLevel&&n.call(e,t,tT,r.baseLevel),r.maxLevel&&n.call(e,t,nT,r.maxLevel)}function ry(e,t,n){const r=n.target||cr;e.bindTexture(r,t),dI(e,r,e.texParameteri,n)}function pI(e){return e=e||qr.textureColor,Ua(e)?e:new Uint8Array([e[0]*255,e[1]*255,e[2]*255,e[3]*255])}function f0(e,t,n,r,i,a){n=n||qr.textureOptions,a=a||Ve;const o=n.target||cr;if(r=r||n.width,i=i||n.height,e.bindTexture(o,t),fI(e,r,i,a))e.generateMipmap(o);else{const s=hI(a)?Wk:qk;e.texParameteri(o,o0,s),e.texParameteri(o,s0,s),e.texParameteri(o,Rc,Bc),e.texParameteri(o,Fc,Bc)}}function Zs(e){return e.auto===!0||e.auto===void 0&&e.level===void 0}function h0(e,t){return t=t||{},t.cubeFaceOrder||[Dc,Zk,Yk,Qk,Xk,Kk]}function d0(e,t){const r=h0(e,t).map(function(i,a){return{face:i,ndx:a}});return r.sort(function(i,a){return i.face-a.face}),r}function iy(e,t,n,r){r=r||qr.textureOptions;const i=r.target||cr,a=r.level||0;let o=n.width,s=n.height;const u=r.internalFormat||r.format||Ve,l=$a(u),c=r.format||l.format,f=r.type||l.type;if(qa(e,r),e.bindTexture(i,t),i===fr){const h=n.width,d=n.height;let p,m;if(h/6===d)p=d,m=[0,0,1,0,2,0,3,0,4,0,5,0];else if(d/6===h)p=h,m=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===d/2)p=h/3,m=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===d/3)p=h/2,m=[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=U2();y?(y.canvas.width=p,y.canvas.height=p,o=p,s=p,d0(e,r).forEach(function(w){const A=m[w.ndx*2+0]*p,S=m[w.ndx*2+1]*p;y.drawImage(n,A,S,p,p,0,0,p,p),e.texImage2D(w.face,a,u,c,f,y.canvas)}),y.canvas.width=1,y.canvas.height=1):typeof createImageBitmap<"u"&&(o=p,s=p,d0(e,r).forEach(function(w){const A=m[w.ndx*2+0]*p,S=m[w.ndx*2+1]*p;e.texImage2D(w.face,a,u,p,p,0,c,f,null),createImageBitmap(n,A,S,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(_){qa(e,r),e.bindTexture(i,t),e.texImage2D(w.face,a,u,c,f,_),Zs(r)&&f0(e,t,r,o,s,u)})}))}else if(i===Wr||i===Zr){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 m=n.width===d?1:0,y=n.height===d?1:0;e.pixelStorei(l0,1),e.pixelStorei(q2,n.width),e.pixelStorei(W2,0),e.pixelStorei(Q2,0),e.texImage3D(i,a,u,h,h,h,0,c,f,null);for(let w=0;w<p;++w){const A=w*h*m,S=w*h*y;e.pixelStorei(Z2,A),e.pixelStorei(Y2,S),e.texSubImage3D(i,a,0,0,w,h,h,1,c,f,n)}ny(e)}else e.texImage2D(i,a,u,c,f,n);Zs(r)&&f0(e,t,r,o,s,u),ry(e,t,r)}function Ys(){}function gI(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 mI(e,t){return t===void 0&&!gI(e)?"anonymous":t}function bI(e,t,n){n=n||Ys;let r;if(t=t!==void 0?t:qr.crossOrigin,t=mI(e,t),typeof Image<"u"){r=new Image,t!==void 0&&(r.crossOrigin=t);const i=function(){r.removeEventListener("error",a),r.removeEventListener("load",o),r=null},a=function(){const u="couldn't load image: "+e;Ek(u),n(u,r),i()},o=function(){n(null,r),i()};return r.addEventListener("error",a),r.addEventListener("load",o),r.src=e,r}else if(typeof ImageBitmap<"u"){let i,a;const o=function(){n(i,a)},s={};t&&(s.mode="cors"),fetch(e,s).then(function(u){if(!u.ok)throw u;return u.blob()}).then(function(u){return createImageBitmap(u,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(u){a=u,setTimeout(o)}).catch(function(u){i=u,setTimeout(o)}),r=null}return r}function ay(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof ImageData<"u"&&e instanceof ImageData||typeof HTMLElement<"u"&&e instanceof HTMLElement}function p0(e,t,n){return ay(e)?(setTimeout(function(){n(null,e)}),e):bI(e,t,n)}function g0(e,t,n){n=n||qr.textureOptions;const r=n.target||cr;if(e.bindTexture(r,t),n.color===!1)return;const i=pI(n.color);if(r===fr)for(let a=0;a<6;++a)e.texImage2D(Dc+a,0,Ve,1,1,0,Ve,je,i);else r===Wr||r===Zr?e.texImage3D(r,0,Ve,1,1,1,0,Ve,je,i):e.texImage2D(r,0,Ve,1,1,0,Ve,je,i)}function yI(e,t,n,r){return r=r||Ys,n=n||qr.textureOptions,g0(e,t,n),n=Object.assign({},n),p0(n.src,n.crossOrigin,function(a,o){a?r(a,t,o):(iy(e,t,o,n),r(null,t,o))})}function wI(e,t,n,r){r=r||Ys;const i=n.src;if(i.length!==6)throw"there must be 6 urls for a cubemap";const a=n.level||0,o=n.internalFormat||n.format||Ve,s=$a(o),u=n.format||s.format,l=n.type||je,c=n.target||cr;if(c!==fr)throw"target must be TEXTURE_CUBE_MAP";g0(e,t,n),n=Object.assign({},n);let f=6;const h=[],d=h0(e,n);let p;function m(y){return function(w,A){--f,w?h.push(w):A.width!==A.height?h.push("cubemap face img is not a square: "+A.src):(qa(e,n),e.bindTexture(c,t),f===5?h0().forEach(function(S){e.texImage2D(S,a,o,u,l,A)}):e.texImage2D(y,a,o,u,l,A),Zs(n)&&e.generateMipmap(c)),f===0&&r(h.length?h:void 0,t,p)}}p=i.map(function(y,w){return p0(y,n.crossOrigin,m(d[w]))})}function vI(e,t,n,r){r=r||Ys;const i=n.src,a=n.internalFormat||n.format||Ve,o=$a(a),s=n.format||o.format,u=n.type||je,l=n.target||Zr;if(l!==Wr&&l!==Zr)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";g0(e,t,n),n=Object.assign({},n);let c=i.length;const f=[];let h;const d=n.level||0;let p=n.width,m=n.height;const y=i.length;let w=!0;function A(S){return function(_,T){if(--c,_)f.push(_);else{if(qa(e,n),e.bindTexture(l,t),w){w=!1,p=n.width||T.width,m=n.height||T.height,e.texImage3D(l,d,a,p,m,y,0,s,u,null);for(let I=0;I<y;++I)e.texSubImage3D(l,d,0,0,I,p,m,1,s,u,T)}else{let I=T,B;(T.width!==p||T.height!==m)&&(B=U2(),I=B.canvas,B.canvas.width=p,B.canvas.height=m,B.drawImage(T,0,0,p,m)),e.texSubImage3D(l,d,0,0,S,p,m,1,s,u,I),B&&I===B.canvas&&(B.canvas.width=0,B.canvas.height=0)}Zs(n)&&e.generateMipmap(l)}c===0&&r(f.length?f:void 0,t,h)}}h=i.map(function(S,_){return p0(S,n.crossOrigin,A(_))})}function oy(e,t,n,r){r=r||qr.textureOptions;const i=r.target||cr;e.bindTexture(i,t);let a=r.width,o=r.height,s=r.depth;const u=r.level||0,l=r.internalFormat||r.format||Ve,c=$a(l),f=r.format||c.format,h=r.type||ty(e,n,c.type);if(Ua(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const y=Ak(h);n=new y(n)}const d=cI(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+a0(e,f);let m;if(i===Wr||i===Zr)if(!a&&!o&&!s){const y=Math.cbrt(p);if(y%1!==0)throw"can't guess cube size of array of numElements: "+p;a=y,o=y,s=y}else a&&(!o||!s)?(m=zc(e,i,o,s,p/a),o=m.width,s=m.height):o&&(!a||!s)?(m=zc(e,i,a,s,p/o),a=m.width,s=m.height):(m=zc(e,i,a,o,p/s),a=m.width,o=m.height);else m=zc(e,i,a,o,p),a=m.width,o=m.height;if(ny(e),e.pixelStorei(l0,r.unpackAlignment||1),qa(e,r),i===fr){const y=d/n.BYTES_PER_ELEMENT,w=p/6*y;d0(e,r).forEach(A=>{const S=w*A.ndx,_=n.subarray(S,S+w);e.texImage2D(A.face,u,l,a,o,0,f,h,_)})}else i===Wr||i===Zr?e.texImage3D(i,u,l,a,o,s,0,f,h,n):e.texImage2D(i,u,l,a,o,0,f,h,n);return{width:a,height:o,depth:s,type:h}}function xI(e,t,n){const r=n.target||cr;e.bindTexture(r,t);const i=n.level||0,a=n.internalFormat||n.format||Ve,o=$a(a),s=n.format||o.format,u=n.type||o.type;if(qa(e,n),r===fr)for(let l=0;l<6;++l)e.texImage2D(Dc+l,i,a,n.width,n.height,0,s,u,null);else r===Wr||r===Zr?e.texImage3D(r,i,a,n.width,n.height,n.depth,0,s,u,null):e.texImage2D(r,i,a,n.width,n.height,0,s,u,null)}function Qs(e,t,n){n=n||Ys,t=t||qr.textureOptions;const r=e.createTexture(),i=t.target||cr;let a=t.width||1,o=t.height||1;const s=t.internalFormat||Ve;e.bindTexture(i,r),i===fr&&(e.texParameteri(i,Rc,Bc),e.texParameteri(i,Fc,Bc));let u=t.src;if(u)if(typeof u=="function"&&(u=u(e,t)),typeof u=="string")yI(e,r,t,n);else if(Ua(u)||Array.isArray(u)&&(typeof u[0]=="number"||Array.isArray(u[0])||Ua(u[0]))){const l=oy(e,r,u,t);a=l.width,o=l.height}else Array.isArray(u)&&(typeof u[0]=="string"||ay(u[0]))?i===fr?wI(e,r,t,n):vI(e,r,t,n):(iy(e,r,u,t),a=u.width,o=u.height);else xI(e,r,t);return Zs(t)&&f0(e,r,t,a,o,s),ry(e,r,t),r}function AI(e,t,n,r,i,a){r=r||n.width,i=i||n.height,a=a||n.depth;const o=n.target||cr;e.bindTexture(o,t);const s=n.level||0,u=n.internalFormat||n.format||Ve,l=$a(u),c=n.format||l.format;let f;const h=n.src;if(h&&(Ua(h)||Array.isArray(h)&&typeof h[0]=="number")?f=n.type||ty(e,h,l.type):f=n.type||l.type,o===fr)for(let d=0;d<6;++d)e.texImage2D(Dc+d,s,u,r,i,0,c,f,null);else o===Wr||o===Zr?e.texImage3D(o,s,u,r,i,a,0,c,f,null):e.texImage2D(o,s,u,r,i,0,c,f,null)}const EI=R2,Uc=33984,_I=35048,Gc=34962,SI=34963,m0=35345,sy=35718,CI=35721,kI=35971,TI=35382,II=35396,BI=35398,DI=35392,RI=35395,Hc=5126,ly=35664,uy=35665,cy=35666,b0=5124,fy=35667,hy=35668,dy=35669,py=35670,gy=35671,my=35672,by=35673,yy=35674,wy=35675,vy=35676,FI=35678,MI=35680,PI=35679,LI=35682,OI=35685,NI=35686,zI=35687,UI=35688,GI=35689,HI=35690,VI=36289,jI=36292,$I=36293,y0=5125,xy=36294,Ay=36295,Ey=36296,qI=36298,WI=36299,ZI=36300,YI=36303,QI=36306,XI=36307,KI=36308,JI=36311,Vc=3553,jc=34067,w0=32879,$c=35866,le={};function _y(e,t){return le[t].bindPoint}function eB(e,t){return function(n){e.uniform1f(t,n)}}function tB(e,t){return function(n){e.uniform1fv(t,n)}}function nB(e,t){return function(n){e.uniform2fv(t,n)}}function rB(e,t){return function(n){e.uniform3fv(t,n)}}function iB(e,t){return function(n){e.uniform4fv(t,n)}}function Sy(e,t){return function(n){e.uniform1i(t,n)}}function Cy(e,t){return function(n){e.uniform1iv(t,n)}}function ky(e,t){return function(n){e.uniform2iv(t,n)}}function Ty(e,t){return function(n){e.uniform3iv(t,n)}}function Iy(e,t){return function(n){e.uniform4iv(t,n)}}function aB(e,t){return function(n){e.uniform1ui(t,n)}}function oB(e,t){return function(n){e.uniform1uiv(t,n)}}function sB(e,t){return function(n){e.uniform2uiv(t,n)}}function lB(e,t){return function(n){e.uniform3uiv(t,n)}}function uB(e,t){return function(n){e.uniform4uiv(t,n)}}function cB(e,t){return function(n){e.uniformMatrix2fv(t,!1,n)}}function fB(e,t){return function(n){e.uniformMatrix3fv(t,!1,n)}}function hB(e,t){return function(n){e.uniformMatrix4fv(t,!1,n)}}function dB(e,t){return function(n){e.uniformMatrix2x3fv(t,!1,n)}}function pB(e,t){return function(n){e.uniformMatrix3x2fv(t,!1,n)}}function gB(e,t){return function(n){e.uniformMatrix2x4fv(t,!1,n)}}function mB(e,t){return function(n){e.uniformMatrix4x2fv(t,!1,n)}}function bB(e,t){return function(n){e.uniformMatrix3x4fv(t,!1,n)}}function yB(e,t){return function(n){e.uniformMatrix4x3fv(t,!1,n)}}function Bt(e,t,n,r){const i=_y(e,t);return za(e)?function(a){let o,s;Ic(e,a)?(o=a,s=null):(o=a.texture,s=a.sampler),e.uniform1i(r,n),e.activeTexture(Uc+n),e.bindTexture(i,o),e.bindSampler(n,s)}:function(a){e.uniform1i(r,n),e.activeTexture(Uc+n),e.bindTexture(i,a)}}function Dt(e,t,n,r,i){const a=_y(e,t),o=new Int32Array(i);for(let s=0;s<i;++s)o[s]=n+s;return za(e)?function(s){e.uniform1iv(r,o),s.forEach(function(u,l){e.activeTexture(Uc+o[l]);let c,f;Ic(e,u)?(c=u,f=null):(c=u.texture,f=u.sampler),e.bindSampler(n,f),e.bindTexture(a,c)})}:function(s){e.uniform1iv(r,o),s.forEach(function(u,l){e.activeTexture(Uc+o[l]),e.bindTexture(a,u)})}}le[Hc]={Type:Float32Array,size:4,setter:eB,arraySetter:tB},le[ly]={Type:Float32Array,size:8,setter:nB,cols:2},le[uy]={Type:Float32Array,size:12,setter:rB,cols:3},le[cy]={Type:Float32Array,size:16,setter:iB,cols:4},le[b0]={Type:Int32Array,size:4,setter:Sy,arraySetter:Cy},le[fy]={Type:Int32Array,size:8,setter:ky,cols:2},le[hy]={Type:Int32Array,size:12,setter:Ty,cols:3},le[dy]={Type:Int32Array,size:16,setter:Iy,cols:4},le[y0]={Type:Uint32Array,size:4,setter:aB,arraySetter:oB},le[xy]={Type:Uint32Array,size:8,setter:sB,cols:2},le[Ay]={Type:Uint32Array,size:12,setter:lB,cols:3},le[Ey]={Type:Uint32Array,size:16,setter:uB,cols:4},le[py]={Type:Uint32Array,size:4,setter:Sy,arraySetter:Cy},le[gy]={Type:Uint32Array,size:8,setter:ky,cols:2},le[my]={Type:Uint32Array,size:12,setter:Ty,cols:3},le[by]={Type:Uint32Array,size:16,setter:Iy,cols:4},le[yy]={Type:Float32Array,size:32,setter:cB,rows:2,cols:2},le[wy]={Type:Float32Array,size:48,setter:fB,rows:3,cols:3},le[vy]={Type:Float32Array,size:64,setter:hB,rows:4,cols:4},le[OI]={Type:Float32Array,size:32,setter:dB,rows:2,cols:3},le[NI]={Type:Float32Array,size:32,setter:gB,rows:2,cols:4},le[zI]={Type:Float32Array,size:48,setter:pB,rows:3,cols:2},le[UI]={Type:Float32Array,size:48,setter:bB,rows:3,cols:4},le[GI]={Type:Float32Array,size:64,setter:mB,rows:4,cols:2},le[HI]={Type:Float32Array,size:64,setter:yB,rows:4,cols:3},le[FI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:Vc},le[MI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:jc},le[PI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:w0},le[LI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:Vc},le[VI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:$c},le[jI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:$c},le[$I]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:jc},le[qI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:Vc},le[WI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:w0},le[ZI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:jc},le[YI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:$c},le[QI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:Vc},le[XI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:w0},le[KI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:jc},le[JI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:$c};function qc(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(Gc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribPointer(t,n.numComponents||n.size,n.type||Hc,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Qr(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(Gc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||b0,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Wc(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(Gc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||y0,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function v0(e,t,n){const r=n.size,i=n.count;return function(a){e.bindBuffer(Gc,a.buffer);const o=a.size||a.numComponents||r,s=o/i,u=a.type||Hc,c=le[u].size*o,f=a.normalize||!1,h=a.offset||0,d=c/i;for(let p=0;p<i;++p)e.enableVertexAttribArray(t+p),e.vertexAttribPointer(t+p,s,u,f,c,h+d*p),a.divisor!==void 0&&e.vertexAttribDivisor(t+p,a.divisor)}}const nt={};nt[Hc]={size:4,setter:qc},nt[ly]={size:8,setter:qc},nt[uy]={size:12,setter:qc},nt[cy]={size:16,setter:qc},nt[b0]={size:4,setter:Qr},nt[fy]={size:8,setter:Qr},nt[hy]={size:12,setter:Qr},nt[dy]={size:16,setter:Qr},nt[y0]={size:4,setter:Wc},nt[xy]={size:8,setter:Wc},nt[Ay]={size:12,setter:Wc},nt[Ey]={size:16,setter:Wc},nt[py]={size:4,setter:Qr},nt[gy]={size:8,setter:Qr},nt[my]={size:12,setter:Qr},nt[by]={size:16,setter:Qr},nt[yy]={size:4,setter:v0,count:2},nt[wy]={size:9,setter:v0,count:3},nt[vy]={size:16,setter:v0,count:4};function By(e){const t=e.name;return t.startsWith("gl_")||t.startsWith("webgl_")}const wB=/(\.|\[|]|\w+)/g,vB=e=>e>="0"&&e<="9";function Dy(e,t,n,r){const i=e.split(wB).filter(s=>s!=="");let a=0,o="";for(;;){const s=i[a++];o+=s;const u=vB(s[0]),l=u?parseInt(s):s;if(u&&(o+=i[a++]),a===i.length){n[l]=t;break}else{const f=i[a++],h=f==="[",d=n[l]||(h?[]:{});n[l]=d,n=d,r[o]=r[o]||function(p){return function(m){Ly(p,m)}}(d),o+=f}}}function xB(e,t){let n=0;function r(s,u,l){const c=u.name.endsWith("[0]"),f=u.type,h=le[f];if(!h)throw new Error(`unknown type: 0x${f.toString(16)}`);let d;if(h.bindPoint){const p=n;n+=u.size,c?d=h.arraySetter(e,f,p,l,u.size):d=h.setter(e,f,p,l,u.size)}else h.arraySetter&&c?d=h.arraySetter(e,l):d=h.setter(e,l);return d.location=l,d}const i={},a={},o=e.getProgramParameter(t,sy);for(let s=0;s<o;++s){const u=e.getActiveUniform(t,s);if(By(u))continue;let l=u.name;l.endsWith("[0]")&&(l=l.substr(0,l.length-3));const c=e.getUniformLocation(t,u.name);if(c){const f=r(t,u,c);i[l]=f,Dy(l,f,a,i)}}return i}function AB(e,t){const n={},r=e.getProgramParameter(t,kI);for(let i=0;i<r;++i){const a=e.getTransformFeedbackVarying(t,i);n[a.name]={index:i,type:a.type,size:a.size}}return n}function EB(e,t){const n=e.getProgramParameter(t,sy),r=[],i=[];for(let s=0;s<n;++s){i.push(s),r.push({});const u=e.getActiveUniform(t,s);r[s].name=u.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(s){const u=s[0],l=s[1];e.getActiveUniforms(t,i,e[u]).forEach(function(c,f){r[f][l]=c})});const a={},o=e.getProgramParameter(t,TI);for(let s=0;s<o;++s){const u=e.getActiveUniformBlockName(t,s),l={index:e.getUniformBlockIndex(t,u),usedByVertexShader:e.getActiveUniformBlockParameter(t,s,II),usedByFragmentShader:e.getActiveUniformBlockParameter(t,s,BI),size:e.getActiveUniformBlockParameter(t,s,DI),uniformIndices:e.getActiveUniformBlockParameter(t,s,RI)};l.used=l.usedByVertexShader||l.usedByFragmentShader,a[u]=l}return{blockSpecs:a,uniformData:r}}const Ry=/\[\d+\]\.$/,_B=(e,t)=>((e+(t-1))/t|0)*t;function SB(e,t,n,r){if(t||n){r=r||1;const a=e.length/4;return function(o){let s=0,u=0;for(let l=0;l<a;++l){for(let c=0;c<r;++c)e[s++]=o[u++];s+=4-r}}}else return function(i){i.length?e.set(i):e[0]=i}}function CB(e,t,n,r){const i=n.blockSpecs,a=n.uniformData,o=i[r];if(!o)return EI("no uniform block object named:",r),{name:r,uniforms:{}};const s=new ArrayBuffer(o.size),u=e.createBuffer(),l=o.index;e.bindBuffer(m0,u),e.uniformBlockBinding(t,o.index,l);let c=r+".";Ry.test(c)&&(c=c.replace(Ry,"."));const f={},h={},d={};return o.uniformIndices.forEach(function(p){const m=a[p];let y=m.name;y.startsWith(c)&&(y=y.substr(c.length));const w=y.endsWith("[0]");w&&(y=y.substr(0,y.length-3));const A=le[m.type],S=A.Type,_=w?_B(A.size,16)*m.size:A.size*m.size,T=new S(s,m.offset,_/S.BYTES_PER_ELEMENT);f[y]=T;const I=SB(T,w,A.rows,A.cols);h[y]=I,Dy(y,I,d,h)}),{name:r,array:s,asFloat:new Float32Array(s),buffer:u,uniforms:f,setters:h}}function Fy(e,t,n){return CB(e,t.program,t.uniformBlockSpec,n)}function My(e,t,n){const i=(t.uniformBlockSpec||t).blockSpecs[n.name];if(i){const a=i.index;return e.bindBufferRange(m0,a,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function Py(e,t,n){My(e,t,n)&&e.bufferData(m0,n.array,_I)}function Xs(e,t){const n=e.setters;for(const r in t){const i=n[r];if(i){const a=t[r];i(a)}}}function Ly(e,t){for(const n in t){const r=e[n];typeof r=="function"?r(t[n]):Ly(e[n],t[n])}}function Wa(e,...t){const n=e.uniformSetters||e,r=t.length;for(let i=0;i<r;++i){const a=t[i];if(Array.isArray(a)){const o=a.length;for(let s=0;s<o;++s)Wa(n,a[s])}else for(const o in a){const s=n[o];s&&s(a[o])}}}function kB(e,t){const n={},r=e.getProgramParameter(t,CI);for(let i=0;i<r;++i){const a=e.getActiveAttrib(t,i);if(By(a))continue;const o=e.getAttribLocation(t,a.name),s=nt[a.type],u=s.setter(e,o,s);u.location=o,n[a.name]=u}return n}function TB(e,t){for(const n in t){const r=e[n];r&&r(t[n])}}function $i(e,t,n){n.vertexArrayObject?e.bindVertexArray(n.vertexArrayObject):(TB(t.attribSetters||t,n.attribs),n.indices&&e.bindBuffer(SI,n.indices))}function IB(e,t){const n=xB(e,t),r=kB(e,t),i={program:t,uniformSetters:n,attribSetters:r};return za(e)&&(i.uniformBlockSpec=EB(e,t),i.transformFeedbackInfo=AB(e,t)),i}const BB=4,Oy=5123;function Zc(e,t,n,r,i,a){n=n===void 0?BB:n;const o=t.indices,s=t.elementType,u=r===void 0?t.numElements:r;i=i===void 0?0:i,s||o?a!==void 0?e.drawElementsInstanced(n,u,s===void 0?Oy:t.elementType,i,a):e.drawElements(n,u,s===void 0?Oy:t.elementType,i):a!==void 0?e.drawArraysInstanced(n,i,u,a):e.drawArrays(n,i,u)}const DB=36160,qi=36161,RB=3553,FB=5121,MB=6402,PB=6408,LB=33190,OB=36012,NB=35056,zB=36013,UB=32854,GB=32855,HB=36194,Ny=33189,zy=6401,Uy=36168,x0=34041,VB=36064,Yc=36096,Gy=36128,A0=33306,E0=33071,_0=9729,Hy=[{format:PB,type:FB,min:_0,wrap:E0},{format:x0}],Sn={};Sn[x0]=A0,Sn[zy]=Gy,Sn[Uy]=Gy,Sn[MB]=Yc,Sn[Ny]=Yc,Sn[LB]=Yc,Sn[OB]=Yc,Sn[NB]=A0,Sn[zB]=A0;function jB(e,t){return Sn[e]||Sn[t]}const Xr={};Xr[UB]=!0,Xr[GB]=!0,Xr[HB]=!0,Xr[x0]=!0,Xr[Ny]=!0,Xr[zy]=!0,Xr[Uy]=!0;function $B(e){return Xr[e]}function qB(e,t,n,r){const i=DB,a=e.createFramebuffer();e.bindFramebuffer(i,a),n=n||e.drawingBufferWidth,r=r||e.drawingBufferHeight,t=t||Hy;let o=0;const s={framebuffer:a,attachments:[],width:n,height:r};return t.forEach(function(u){let l=u.attachment;const c=u.samples,f=u.format;let h=u.attachmentPoint||jB(f,u.internalFormat);if(h||(h=VB+o++),!l)if(c!==void 0||$B(f))l=e.createRenderbuffer(),e.bindRenderbuffer(qi,l),c>1?e.renderbufferStorageMultisample(qi,c,f,n,r):e.renderbufferStorage(qi,f,n,r);else{const d=Object.assign({},u);d.width=n,d.height=r,d.auto===void 0&&(d.auto=!1,d.min=d.min||d.minMag||_0,d.mag=d.mag||d.minMag||_0,d.wrapS=d.wrapS||d.wrap||E0,d.wrapT=d.wrapT||d.wrap||E0),l=Qs(e,d)}if(F2(e,l))e.framebufferRenderbuffer(i,h,qi,l);else if(Ic(e,l))u.layer!==void 0?e.framebufferTextureLayer(i,h,l,u.level||0,u.layer):e.framebufferTexture2D(i,h,u.target||RB,l,u.level||0);else throw new Error("unknown attachment type");s.attachments.push(l)}),s}function WB(e,t,n,r,i){r=r||e.drawingBufferWidth,i=i||e.drawingBufferHeight,t.width=r,t.height=i,n=n||Hy,n.forEach(function(a,o){const s=t.attachments[o],u=a.format,l=a.samples;if(l!==void 0||F2(e,s))e.bindRenderbuffer(qi,s),l>1?e.renderbufferStorageMultisample(qi,l,u,r,i):e.renderbufferStorage(qi,u,r,i);else if(Ic(e,s))AI(e,s,a,r,i);else throw new Error("unknown attachment type")})}function ZB(e,t,n){const r=e.createVertexArray();return e.bindVertexArray(r),t.length||(t=[t]),t.forEach(function(i){$i(e,i,n)}),e.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const YB=/^(.*?)_/;function QB(e,t){a0(e,0);const n=e.getExtension(t);if(n){const r={},i=YB.exec(t)[1],a="_"+i;for(const o in n){const s=n[o],u=typeof s=="function",l=u?i:a;let c=o;o.endsWith(l)&&(c=o.substring(0,o.length-l.length)),e[c]!==void 0?!u&&e[c]!==s&&R2(c,e[c],s,o):u?e[c]=function(f){return function(){return f.apply(n,arguments)}}(s):(e[c]=s,r[c]=s)}r.constructor={name:n.constructor.name},a0(r,0)}return n}const Vy=["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 jy(e){for(let t=0;t<Vy.length;++t)QB(e,Vy[t])}function XB(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){jy(r);break}return r}function KB(e,t){return XB(e,t)}const JB=`out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
228
+ see: http://github.com/greggman/twgl.js for details */const Qd=5120,$s=5121,Xd=5122,Kd=5123,Jd=5124,e0=5125,t0=5126,gk=32819,mk=32820,bk=33635,yk=5131,wk=33640,vk=35899,xk=35902,Ak=36269,Ek=34042,F2={};{const e=F2;e[Qd]=Int8Array,e[$s]=Uint8Array,e[Xd]=Int16Array,e[Kd]=Uint16Array,e[Jd]=Int32Array,e[e0]=Uint32Array,e[t0]=Float32Array,e[gk]=Uint16Array,e[mk]=Uint16Array,e[bk]=Uint16Array,e[yk]=Uint16Array,e[wk]=Uint32Array,e[vk]=Uint32Array,e[xk]=Uint32Array,e[Ak]=Uint32Array,e[Ek]=Uint32Array}function n0(e){if(e instanceof Int8Array)return Qd;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)return $s;if(e instanceof Int16Array)return Xd;if(e instanceof Uint16Array)return Kd;if(e instanceof Int32Array)return Jd;if(e instanceof Uint32Array)return e0;if(e instanceof Float32Array)return t0;throw new Error("unsupported typed array type")}function _k(e){if(e===Int8Array)return Qd;if(e===Uint8Array||e===Uint8ClampedArray)return $s;if(e===Int16Array)return Xd;if(e===Uint16Array)return Kd;if(e===Int32Array)return Jd;if(e===Uint32Array)return e0;if(e===Float32Array)return t0;throw new Error("unsupported typed array type")}function Sk(e){const t=F2[e];if(!t)throw new Error("unknown gl type");return t}const Tc=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 Ck(...e){console.error(...e)}function M2(...e){console.warn(...e)}function kk(e,t){return typeof WebGLBuffer<"u"&&t instanceof WebGLBuffer}function P2(e,t){return typeof WebGLRenderbuffer<"u"&&t instanceof WebGLRenderbuffer}function Ic(e,t){return typeof WebGLTexture<"u"&&t instanceof WebGLTexture}function Tk(e,t){return typeof WebGLSampler<"u"&&t instanceof WebGLSampler}const L2=35044,Vn=34962,Ik=34963,Bk=34660,Dk=5120,Rk=5121,Fk=5122,Mk=5123,Pk=5124,Lk=5125,Ok=5126,O2={attribPrefix:""};function N2(e,t,n,r,i){e.bindBuffer(t,n),e.bufferData(t,r,i||L2)}function z2(e,t,n,r){if(kk(e,t))return t;n=n||Vn;const i=e.createBuffer();return N2(e,n,i,t,r),i}function U2(e){return e==="indices"}function Nk(e){return e instanceof Int8Array||e instanceof Uint8Array}function zk(e){return e===Int8Array||e===Uint8Array}function Uk(e){return e.length?e:e.data}const Gk=/coord|texture/i,Hk=/color|colour/i;function G2(e,t){let n;if(Gk.test(e)?n=2:Hk.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 Vk(e,t){return e.numComponents||e.size||G2(t,Uk(e).length)}function r0(e,t){if(Tc(e))return e;if(Tc(e.data))return e.data;Array.isArray(e)&&(e={data:e});let n=e.type;return n||(U2(t)?n=Uint16Array:n=Float32Array),new n(e.data)}function jk(e,t){const n={};return Object.keys(t).forEach(function(r){if(!U2(r)){const i=t[r],a=i.attrib||i.name||i.attribName||O2.attribPrefix+r;if(i.value){if(!Array.isArray(i.value)&&!Tc(i.value))throw new Error("array.value is not array or typedarray");n[a]={value:i.value}}else{let o,s,u,l;if(i.buffer&&i.buffer instanceof WebGLBuffer)o=i.buffer,l=i.numComponents||i.size,s=i.type,u=i.normalize;else if(typeof i=="number"||typeof i.data=="number"){const c=i.data||i,f=i.type||Float32Array,h=c*f.BYTES_PER_ELEMENT;s=_k(f),u=i.normalize!==void 0?i.normalize:zk(f),l=i.numComponents||i.size||G2(r,c),o=e.createBuffer(),e.bindBuffer(Vn,o),e.bufferData(Vn,h,i.drawType||L2)}else{const c=r0(i,r);o=z2(e,c,void 0,i.drawType),s=n0(c),u=i.normalize!==void 0?i.normalize:Nk(c),l=Vk(i,r)}n[a]={buffer:o,numComponents:l,type:s,normalize:u,stride:i.stride||0,offset:i.offset||0,divisor:i.divisor===void 0?void 0:i.divisor,drawType:i.drawType}}}}),e.bindBuffer(Vn,null),n}function $k(e,t,n,r){n=r0(n),r!==void 0?(e.bindBuffer(Vn,t.buffer),e.bufferSubData(Vn,r,n)):N2(e,Vn,t.buffer,n,t.drawType)}function qk(e,t){return t===Dk||t===Rk?1:t===Fk||t===Mk?2:t===Pk||t===Lk||t===Ok?4:0}const i0=["position","positions","a_position"];function Wk(e,t){let n,r;for(r=0;r<i0.length&&(n=i0[r],!(n in t||(n=O2.attribPrefix+n,n in t)));++r);r===i0.length&&(n=Object.keys(t)[0]);const i=t[n];e.bindBuffer(Vn,i.buffer);const a=e.getBufferParameter(Vn,Bk);e.bindBuffer(Vn,null);const o=qk(e,i.type),s=a/o,u=i.numComponents||i.size,l=s/u;if(l%1!==0)throw new Error(`numComponents ${u} not correct for length ${length}`);return l}function Zk(e,t,n){const r=jk(e,t),i=Object.assign({},n||{});i.attribs=Object.assign({},n?n.attribs:{},r);const a=t.indices;if(a){const o=r0(a,"indices");i.indices=z2(e,o,Ik),i.numElements=o.length,i.elementType=n0(o)}else i.numElements||(i.numElements=Wk(e,i.attribs));return i}function za(e){return!!e.texStorage2D}const a0=function(){const e={},t={};function n(r){const i=r.constructor.name;if(!e[i]){for(const a in r)if(typeof r[a]=="number"){const o=t[r[a]];t[r[a]]=o?`${o} | ${a}`:a}e[i]=!0}}return function(i,a){return n(i),t[a]||(typeof a=="number"?`0x${a.toString(16)}`:a)}}(),qr={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},Ua=Tc,H2=function(){let e;return function(){return e=e||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),e}}(),V2=6406,jn=6407,Ve=6408,j2=6409,$2=6410,qs=6402,q2=34041,Bc=33071,Yk=9728,Qk=9729,cr=3553,fr=34067,Wr=32879,Zr=35866,Dc=34069,Xk=34070,Kk=34071,Jk=34072,eT=34073,tT=34074,o0=10241,s0=10240,Rc=10242,Fc=10243,W2=32882,nT=33082,rT=33083,iT=33084,aT=33085,l0=3317,Z2=3314,Y2=32878,Q2=3316,X2=3315,K2=32877,oT=37443,sT=37441,lT=37440,uT=33321,cT=36756,fT=33325,hT=33326,dT=33330,pT=33329,gT=33338,mT=33337,bT=33340,yT=33339,wT=33323,vT=36757,xT=33327,AT=33328,ET=33336,_T=33335,ST=33332,CT=33331,kT=33334,TT=33333,IT=32849,BT=35905,DT=36194,RT=36758,FT=35898,MT=35901,PT=34843,LT=34837,OT=36221,NT=36239,zT=36215,UT=36233,GT=36209,HT=36227,VT=32856,jT=35907,$T=36759,qT=32855,WT=32854,ZT=32857,YT=34842,QT=34836,XT=36220,KT=36238,JT=36975,eI=36214,tI=36232,nI=36226,rI=36208,iI=33189,aI=33190,oI=36012,sI=36013,lI=35056,Yr=5120,je=5121,Mc=5122,Ga=5123,Pc=5124,Vi=5125,_t=5126,J2=32819,ey=32820,ty=33635,_n=5131,Ws=36193,u0=33640,uI=35899,cI=35902,fI=36269,hI=34042,Lc=33319,Ha=33320,Oc=6403,Va=36244,ja=36248,ji=36249;let c0;function Nc(e){if(!c0){const t={};t[V2]={textureFormat:V2,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[je,_n,Ws,_t]},t[j2]={textureFormat:j2,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[je,_n,Ws,_t]},t[$2]={textureFormat:$2,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[je,_n,Ws,_t]},t[jn]={textureFormat:jn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[je,_n,Ws,_t,ty]},t[Ve]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[je,_n,Ws,_t,J2,ey]},t[qs]={textureFormat:qs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Vi,Ga]},t[uT]={textureFormat:Oc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[je]},t[cT]={textureFormat:Oc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[Yr]},t[fT]={textureFormat:Oc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[_t,_n]},t[hT]={textureFormat:Oc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[_t]},t[dT]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[je]},t[pT]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[Yr]},t[ST]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Ga]},t[CT]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Mc]},t[kT]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Vi]},t[TT]={textureFormat:Va,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Pc]},t[wT]={textureFormat:Lc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[je]},t[vT]={textureFormat:Lc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[Yr]},t[xT]={textureFormat:Lc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[_t,_n]},t[AT]={textureFormat:Lc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[_t]},t[ET]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[je]},t[_T]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Yr]},t[gT]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ga]},t[mT]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Mc]},t[bT]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Vi]},t[yT]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Pc]},t[IT]={textureFormat:jn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[je]},t[BT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[je]},t[DT]={textureFormat:jn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[je,ty]},t[RT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[Yr]},t[FT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[_t,_n,uI]},t[MT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[_t,_n,cI]},t[PT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[_t,_n]},t[LT]={textureFormat:jn,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[_t]},t[OT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[je]},t[NT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[Yr]},t[zT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Ga]},t[UT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Mc]},t[GT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Vi]},t[HT]={textureFormat:ja,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Pc]},t[VT]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[je]},t[jT]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[je]},t[$T]={textureFormat:Ve,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[Yr]},t[qT]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[je,ey,u0]},t[WT]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[je,J2]},t[ZT]={textureFormat:Ve,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[u0]},t[YT]={textureFormat:Ve,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[_t,_n]},t[QT]={textureFormat:Ve,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[_t]},t[XT]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[je]},t[KT]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Yr]},t[JT]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[u0]},t[eI]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Ga]},t[tI]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Mc]},t[nI]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Pc]},t[rI]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Vi]},t[iI]={textureFormat:qs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Ga,Vi]},t[aI]={textureFormat:qs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Vi]},t[oI]={textureFormat:qs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[_t]},t[lI]={textureFormat:q2,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[hI]},t[sI]={textureFormat:q2,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[fI]},Object.keys(t).forEach(function(n){const r=t[n];r.bytesPerElementMap={},r.bytesPerElement.forEach(function(i,a){const o=r.type[a];r.bytesPerElementMap[o]=i})}),c0=t}return c0[e]}function dI(e,t){const n=Nc(e);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[t];if(r===void 0)throw"unknown internal format";return r}function $a(e){const t=Nc(e);if(!t)throw"unknown internal format";return{format:t.textureFormat,type:t.type[0]}}function ny(e){return(e&e-1)===0}function pI(e,t,n,r){if(!za(e))return ny(t)&&ny(n);const i=Nc(r);if(!i)throw"unknown internal format";return i.colorRenderable&&i.textureFilterable}function gI(e){const t=Nc(e);if(!t)throw"unknown internal format";return t.textureFilterable}function ry(e,t,n){return Ua(t)?n0(t):n||je}function zc(e,t,n,r,i){if(i%1!==0)throw"can't guess dimensions";if(!n&&!r){const a=Math.sqrt(i/(t===fr?6:1));a%1===0?(n=a,r=a):(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 qa(e,t){t.colorspaceConversion!==void 0&&e.pixelStorei(oT,t.colorspaceConversion),t.premultiplyAlpha!==void 0&&e.pixelStorei(sT,t.premultiplyAlpha),t.flipY!==void 0&&e.pixelStorei(lT,t.flipY)}function iy(e){e.pixelStorei(l0,4),za(e)&&(e.pixelStorei(Z2,0),e.pixelStorei(Y2,0),e.pixelStorei(Q2,0),e.pixelStorei(X2,0),e.pixelStorei(K2,0))}function mI(e,t,n,r){r.minMag&&(n.call(e,t,o0,r.minMag),n.call(e,t,s0,r.minMag)),r.min&&n.call(e,t,o0,r.min),r.mag&&n.call(e,t,s0,r.mag),r.wrap&&(n.call(e,t,Rc,r.wrap),n.call(e,t,Fc,r.wrap),(t===Wr||Tk(e,t))&&n.call(e,t,W2,r.wrap)),r.wrapR&&n.call(e,t,W2,r.wrapR),r.wrapS&&n.call(e,t,Rc,r.wrapS),r.wrapT&&n.call(e,t,Fc,r.wrapT),r.minLod&&n.call(e,t,nT,r.minLod),r.maxLod&&n.call(e,t,rT,r.maxLod),r.baseLevel&&n.call(e,t,iT,r.baseLevel),r.maxLevel&&n.call(e,t,aT,r.maxLevel)}function ay(e,t,n){const r=n.target||cr;e.bindTexture(r,t),mI(e,r,e.texParameteri,n)}function bI(e){return e=e||qr.textureColor,Ua(e)?e:new Uint8Array([e[0]*255,e[1]*255,e[2]*255,e[3]*255])}function f0(e,t,n,r,i,a){n=n||qr.textureOptions,a=a||Ve;const o=n.target||cr;if(r=r||n.width,i=i||n.height,e.bindTexture(o,t),pI(e,r,i,a))e.generateMipmap(o);else{const s=gI(a)?Qk:Yk;e.texParameteri(o,o0,s),e.texParameteri(o,s0,s),e.texParameteri(o,Rc,Bc),e.texParameteri(o,Fc,Bc)}}function Zs(e){return e.auto===!0||e.auto===void 0&&e.level===void 0}function h0(e,t){return t=t||{},t.cubeFaceOrder||[Dc,Xk,Kk,Jk,eT,tT]}function d0(e,t){const r=h0(e,t).map(function(i,a){return{face:i,ndx:a}});return r.sort(function(i,a){return i.face-a.face}),r}function oy(e,t,n,r){r=r||qr.textureOptions;const i=r.target||cr,a=r.level||0;let o=n.width,s=n.height;const u=r.internalFormat||r.format||Ve,l=$a(u),c=r.format||l.format,f=r.type||l.type;if(qa(e,r),e.bindTexture(i,t),i===fr){const h=n.width,d=n.height;let p,m;if(h/6===d)p=d,m=[0,0,1,0,2,0,3,0,4,0,5,0];else if(d/6===h)p=h,m=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===d/2)p=h/3,m=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===d/3)p=h/2,m=[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=H2();y?(y.canvas.width=p,y.canvas.height=p,o=p,s=p,d0(e,r).forEach(function(w){const A=m[w.ndx*2+0]*p,S=m[w.ndx*2+1]*p;y.drawImage(n,A,S,p,p,0,0,p,p),e.texImage2D(w.face,a,u,c,f,y.canvas)}),y.canvas.width=1,y.canvas.height=1):typeof createImageBitmap<"u"&&(o=p,s=p,d0(e,r).forEach(function(w){const A=m[w.ndx*2+0]*p,S=m[w.ndx*2+1]*p;e.texImage2D(w.face,a,u,p,p,0,c,f,null),createImageBitmap(n,A,S,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(_){qa(e,r),e.bindTexture(i,t),e.texImage2D(w.face,a,u,c,f,_),Zs(r)&&f0(e,t,r,o,s,u)})}))}else if(i===Wr||i===Zr){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 m=n.width===d?1:0,y=n.height===d?1:0;e.pixelStorei(l0,1),e.pixelStorei(Z2,n.width),e.pixelStorei(Y2,0),e.pixelStorei(K2,0),e.texImage3D(i,a,u,h,h,h,0,c,f,null);for(let w=0;w<p;++w){const A=w*h*m,S=w*h*y;e.pixelStorei(Q2,A),e.pixelStorei(X2,S),e.texSubImage3D(i,a,0,0,w,h,h,1,c,f,n)}iy(e)}else e.texImage2D(i,a,u,c,f,n);Zs(r)&&f0(e,t,r,o,s,u),ay(e,t,r)}function Ys(){}function yI(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 wI(e,t){return t===void 0&&!yI(e)?"anonymous":t}function vI(e,t,n){n=n||Ys;let r;if(t=t!==void 0?t:qr.crossOrigin,t=wI(e,t),typeof Image<"u"){r=new Image,t!==void 0&&(r.crossOrigin=t);const i=function(){r.removeEventListener("error",a),r.removeEventListener("load",o),r=null},a=function(){const u="couldn't load image: "+e;Ck(u),n(u,r),i()},o=function(){n(null,r),i()};return r.addEventListener("error",a),r.addEventListener("load",o),r.src=e,r}else if(typeof ImageBitmap<"u"){let i,a;const o=function(){n(i,a)},s={};t&&(s.mode="cors"),fetch(e,s).then(function(u){if(!u.ok)throw u;return u.blob()}).then(function(u){return createImageBitmap(u,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(u){a=u,setTimeout(o)}).catch(function(u){i=u,setTimeout(o)}),r=null}return r}function sy(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof ImageData<"u"&&e instanceof ImageData||typeof HTMLElement<"u"&&e instanceof HTMLElement}function p0(e,t,n){return sy(e)?(setTimeout(function(){n(null,e)}),e):vI(e,t,n)}function g0(e,t,n){n=n||qr.textureOptions;const r=n.target||cr;if(e.bindTexture(r,t),n.color===!1)return;const i=bI(n.color);if(r===fr)for(let a=0;a<6;++a)e.texImage2D(Dc+a,0,Ve,1,1,0,Ve,je,i);else r===Wr||r===Zr?e.texImage3D(r,0,Ve,1,1,1,0,Ve,je,i):e.texImage2D(r,0,Ve,1,1,0,Ve,je,i)}function xI(e,t,n,r){return r=r||Ys,n=n||qr.textureOptions,g0(e,t,n),n=Object.assign({},n),p0(n.src,n.crossOrigin,function(a,o){a?r(a,t,o):(oy(e,t,o,n),r(null,t,o))})}function AI(e,t,n,r){r=r||Ys;const i=n.src;if(i.length!==6)throw"there must be 6 urls for a cubemap";const a=n.level||0,o=n.internalFormat||n.format||Ve,s=$a(o),u=n.format||s.format,l=n.type||je,c=n.target||cr;if(c!==fr)throw"target must be TEXTURE_CUBE_MAP";g0(e,t,n),n=Object.assign({},n);let f=6;const h=[],d=h0(e,n);let p;function m(y){return function(w,A){--f,w?h.push(w):A.width!==A.height?h.push("cubemap face img is not a square: "+A.src):(qa(e,n),e.bindTexture(c,t),f===5?h0().forEach(function(S){e.texImage2D(S,a,o,u,l,A)}):e.texImage2D(y,a,o,u,l,A),Zs(n)&&e.generateMipmap(c)),f===0&&r(h.length?h:void 0,t,p)}}p=i.map(function(y,w){return p0(y,n.crossOrigin,m(d[w]))})}function EI(e,t,n,r){r=r||Ys;const i=n.src,a=n.internalFormat||n.format||Ve,o=$a(a),s=n.format||o.format,u=n.type||je,l=n.target||Zr;if(l!==Wr&&l!==Zr)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";g0(e,t,n),n=Object.assign({},n);let c=i.length;const f=[];let h;const d=n.level||0;let p=n.width,m=n.height;const y=i.length;let w=!0;function A(S){return function(_,T){if(--c,_)f.push(_);else{if(qa(e,n),e.bindTexture(l,t),w){w=!1,p=n.width||T.width,m=n.height||T.height,e.texImage3D(l,d,a,p,m,y,0,s,u,null);for(let I=0;I<y;++I)e.texSubImage3D(l,d,0,0,I,p,m,1,s,u,T)}else{let I=T,B;(T.width!==p||T.height!==m)&&(B=H2(),I=B.canvas,B.canvas.width=p,B.canvas.height=m,B.drawImage(T,0,0,p,m)),e.texSubImage3D(l,d,0,0,S,p,m,1,s,u,I),B&&I===B.canvas&&(B.canvas.width=0,B.canvas.height=0)}Zs(n)&&e.generateMipmap(l)}c===0&&r(f.length?f:void 0,t,h)}}h=i.map(function(S,_){return p0(S,n.crossOrigin,A(_))})}function ly(e,t,n,r){r=r||qr.textureOptions;const i=r.target||cr;e.bindTexture(i,t);let a=r.width,o=r.height,s=r.depth;const u=r.level||0,l=r.internalFormat||r.format||Ve,c=$a(l),f=r.format||c.format,h=r.type||ry(e,n,c.type);if(Ua(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const y=Sk(h);n=new y(n)}const d=dI(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+a0(e,f);let m;if(i===Wr||i===Zr)if(!a&&!o&&!s){const y=Math.cbrt(p);if(y%1!==0)throw"can't guess cube size of array of numElements: "+p;a=y,o=y,s=y}else a&&(!o||!s)?(m=zc(e,i,o,s,p/a),o=m.width,s=m.height):o&&(!a||!s)?(m=zc(e,i,a,s,p/o),a=m.width,s=m.height):(m=zc(e,i,a,o,p/s),a=m.width,o=m.height);else m=zc(e,i,a,o,p),a=m.width,o=m.height;if(iy(e),e.pixelStorei(l0,r.unpackAlignment||1),qa(e,r),i===fr){const y=d/n.BYTES_PER_ELEMENT,w=p/6*y;d0(e,r).forEach(A=>{const S=w*A.ndx,_=n.subarray(S,S+w);e.texImage2D(A.face,u,l,a,o,0,f,h,_)})}else i===Wr||i===Zr?e.texImage3D(i,u,l,a,o,s,0,f,h,n):e.texImage2D(i,u,l,a,o,0,f,h,n);return{width:a,height:o,depth:s,type:h}}function _I(e,t,n){const r=n.target||cr;e.bindTexture(r,t);const i=n.level||0,a=n.internalFormat||n.format||Ve,o=$a(a),s=n.format||o.format,u=n.type||o.type;if(qa(e,n),r===fr)for(let l=0;l<6;++l)e.texImage2D(Dc+l,i,a,n.width,n.height,0,s,u,null);else r===Wr||r===Zr?e.texImage3D(r,i,a,n.width,n.height,n.depth,0,s,u,null):e.texImage2D(r,i,a,n.width,n.height,0,s,u,null)}function Qs(e,t,n){n=n||Ys,t=t||qr.textureOptions;const r=e.createTexture(),i=t.target||cr;let a=t.width||1,o=t.height||1;const s=t.internalFormat||Ve;e.bindTexture(i,r),i===fr&&(e.texParameteri(i,Rc,Bc),e.texParameteri(i,Fc,Bc));let u=t.src;if(u)if(typeof u=="function"&&(u=u(e,t)),typeof u=="string")xI(e,r,t,n);else if(Ua(u)||Array.isArray(u)&&(typeof u[0]=="number"||Array.isArray(u[0])||Ua(u[0]))){const l=ly(e,r,u,t);a=l.width,o=l.height}else Array.isArray(u)&&(typeof u[0]=="string"||sy(u[0]))?i===fr?AI(e,r,t,n):EI(e,r,t,n):(oy(e,r,u,t),a=u.width,o=u.height);else _I(e,r,t);return Zs(t)&&f0(e,r,t,a,o,s),ay(e,r,t),r}function SI(e,t,n,r,i,a){r=r||n.width,i=i||n.height,a=a||n.depth;const o=n.target||cr;e.bindTexture(o,t);const s=n.level||0,u=n.internalFormat||n.format||Ve,l=$a(u),c=n.format||l.format;let f;const h=n.src;if(h&&(Ua(h)||Array.isArray(h)&&typeof h[0]=="number")?f=n.type||ry(e,h,l.type):f=n.type||l.type,o===fr)for(let d=0;d<6;++d)e.texImage2D(Dc+d,s,u,r,i,0,c,f,null);else o===Wr||o===Zr?e.texImage3D(o,s,u,r,i,a,0,c,f,null):e.texImage2D(o,s,u,r,i,0,c,f,null)}const CI=M2,Uc=33984,kI=35048,Gc=34962,TI=34963,m0=35345,uy=35718,II=35721,BI=35971,DI=35382,RI=35396,FI=35398,MI=35392,PI=35395,Hc=5126,cy=35664,fy=35665,hy=35666,b0=5124,dy=35667,py=35668,gy=35669,my=35670,by=35671,yy=35672,wy=35673,vy=35674,xy=35675,Ay=35676,LI=35678,OI=35680,NI=35679,zI=35682,UI=35685,GI=35686,HI=35687,VI=35688,jI=35689,$I=35690,qI=36289,WI=36292,ZI=36293,y0=5125,Ey=36294,_y=36295,Sy=36296,YI=36298,QI=36299,XI=36300,KI=36303,JI=36306,eB=36307,tB=36308,nB=36311,Vc=3553,jc=34067,w0=32879,$c=35866,le={};function Cy(e,t){return le[t].bindPoint}function rB(e,t){return function(n){e.uniform1f(t,n)}}function iB(e,t){return function(n){e.uniform1fv(t,n)}}function aB(e,t){return function(n){e.uniform2fv(t,n)}}function oB(e,t){return function(n){e.uniform3fv(t,n)}}function sB(e,t){return function(n){e.uniform4fv(t,n)}}function ky(e,t){return function(n){e.uniform1i(t,n)}}function Ty(e,t){return function(n){e.uniform1iv(t,n)}}function Iy(e,t){return function(n){e.uniform2iv(t,n)}}function By(e,t){return function(n){e.uniform3iv(t,n)}}function Dy(e,t){return function(n){e.uniform4iv(t,n)}}function lB(e,t){return function(n){e.uniform1ui(t,n)}}function uB(e,t){return function(n){e.uniform1uiv(t,n)}}function cB(e,t){return function(n){e.uniform2uiv(t,n)}}function fB(e,t){return function(n){e.uniform3uiv(t,n)}}function hB(e,t){return function(n){e.uniform4uiv(t,n)}}function dB(e,t){return function(n){e.uniformMatrix2fv(t,!1,n)}}function pB(e,t){return function(n){e.uniformMatrix3fv(t,!1,n)}}function gB(e,t){return function(n){e.uniformMatrix4fv(t,!1,n)}}function mB(e,t){return function(n){e.uniformMatrix2x3fv(t,!1,n)}}function bB(e,t){return function(n){e.uniformMatrix3x2fv(t,!1,n)}}function yB(e,t){return function(n){e.uniformMatrix2x4fv(t,!1,n)}}function wB(e,t){return function(n){e.uniformMatrix4x2fv(t,!1,n)}}function vB(e,t){return function(n){e.uniformMatrix3x4fv(t,!1,n)}}function xB(e,t){return function(n){e.uniformMatrix4x3fv(t,!1,n)}}function Bt(e,t,n,r){const i=Cy(e,t);return za(e)?function(a){let o,s;Ic(e,a)?(o=a,s=null):(o=a.texture,s=a.sampler),e.uniform1i(r,n),e.activeTexture(Uc+n),e.bindTexture(i,o),e.bindSampler(n,s)}:function(a){e.uniform1i(r,n),e.activeTexture(Uc+n),e.bindTexture(i,a)}}function Dt(e,t,n,r,i){const a=Cy(e,t),o=new Int32Array(i);for(let s=0;s<i;++s)o[s]=n+s;return za(e)?function(s){e.uniform1iv(r,o),s.forEach(function(u,l){e.activeTexture(Uc+o[l]);let c,f;Ic(e,u)?(c=u,f=null):(c=u.texture,f=u.sampler),e.bindSampler(n,f),e.bindTexture(a,c)})}:function(s){e.uniform1iv(r,o),s.forEach(function(u,l){e.activeTexture(Uc+o[l]),e.bindTexture(a,u)})}}le[Hc]={Type:Float32Array,size:4,setter:rB,arraySetter:iB},le[cy]={Type:Float32Array,size:8,setter:aB,cols:2},le[fy]={Type:Float32Array,size:12,setter:oB,cols:3},le[hy]={Type:Float32Array,size:16,setter:sB,cols:4},le[b0]={Type:Int32Array,size:4,setter:ky,arraySetter:Ty},le[dy]={Type:Int32Array,size:8,setter:Iy,cols:2},le[py]={Type:Int32Array,size:12,setter:By,cols:3},le[gy]={Type:Int32Array,size:16,setter:Dy,cols:4},le[y0]={Type:Uint32Array,size:4,setter:lB,arraySetter:uB},le[Ey]={Type:Uint32Array,size:8,setter:cB,cols:2},le[_y]={Type:Uint32Array,size:12,setter:fB,cols:3},le[Sy]={Type:Uint32Array,size:16,setter:hB,cols:4},le[my]={Type:Uint32Array,size:4,setter:ky,arraySetter:Ty},le[by]={Type:Uint32Array,size:8,setter:Iy,cols:2},le[yy]={Type:Uint32Array,size:12,setter:By,cols:3},le[wy]={Type:Uint32Array,size:16,setter:Dy,cols:4},le[vy]={Type:Float32Array,size:32,setter:dB,rows:2,cols:2},le[xy]={Type:Float32Array,size:48,setter:pB,rows:3,cols:3},le[Ay]={Type:Float32Array,size:64,setter:gB,rows:4,cols:4},le[UI]={Type:Float32Array,size:32,setter:mB,rows:2,cols:3},le[GI]={Type:Float32Array,size:32,setter:yB,rows:2,cols:4},le[HI]={Type:Float32Array,size:48,setter:bB,rows:3,cols:2},le[VI]={Type:Float32Array,size:48,setter:vB,rows:3,cols:4},le[jI]={Type:Float32Array,size:64,setter:wB,rows:4,cols:2},le[$I]={Type:Float32Array,size:64,setter:xB,rows:4,cols:3},le[LI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:Vc},le[OI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:jc},le[NI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:w0},le[zI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:Vc},le[qI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:$c},le[WI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:$c},le[ZI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:jc},le[YI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:Vc},le[QI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:w0},le[XI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:jc},le[KI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:$c},le[JI]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:Vc},le[eB]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:w0},le[tB]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:jc},le[nB]={Type:null,size:0,setter:Bt,arraySetter:Dt,bindPoint:$c};function qc(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(Gc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribPointer(t,n.numComponents||n.size,n.type||Hc,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Qr(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(Gc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||b0,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Wc(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(Gc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||y0,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function v0(e,t,n){const r=n.size,i=n.count;return function(a){e.bindBuffer(Gc,a.buffer);const o=a.size||a.numComponents||r,s=o/i,u=a.type||Hc,c=le[u].size*o,f=a.normalize||!1,h=a.offset||0,d=c/i;for(let p=0;p<i;++p)e.enableVertexAttribArray(t+p),e.vertexAttribPointer(t+p,s,u,f,c,h+d*p),a.divisor!==void 0&&e.vertexAttribDivisor(t+p,a.divisor)}}const it={};it[Hc]={size:4,setter:qc},it[cy]={size:8,setter:qc},it[fy]={size:12,setter:qc},it[hy]={size:16,setter:qc},it[b0]={size:4,setter:Qr},it[dy]={size:8,setter:Qr},it[py]={size:12,setter:Qr},it[gy]={size:16,setter:Qr},it[y0]={size:4,setter:Wc},it[Ey]={size:8,setter:Wc},it[_y]={size:12,setter:Wc},it[Sy]={size:16,setter:Wc},it[my]={size:4,setter:Qr},it[by]={size:8,setter:Qr},it[yy]={size:12,setter:Qr},it[wy]={size:16,setter:Qr},it[vy]={size:4,setter:v0,count:2},it[xy]={size:9,setter:v0,count:3},it[Ay]={size:16,setter:v0,count:4};function Ry(e){const t=e.name;return t.startsWith("gl_")||t.startsWith("webgl_")}const AB=/(\.|\[|]|\w+)/g,EB=e=>e>="0"&&e<="9";function Fy(e,t,n,r){const i=e.split(AB).filter(s=>s!=="");let a=0,o="";for(;;){const s=i[a++];o+=s;const u=EB(s[0]),l=u?parseInt(s):s;if(u&&(o+=i[a++]),a===i.length){n[l]=t;break}else{const f=i[a++],h=f==="[",d=n[l]||(h?[]:{});n[l]=d,n=d,r[o]=r[o]||function(p){return function(m){Ny(p,m)}}(d),o+=f}}}function _B(e,t){let n=0;function r(s,u,l){const c=u.name.endsWith("[0]"),f=u.type,h=le[f];if(!h)throw new Error(`unknown type: 0x${f.toString(16)}`);let d;if(h.bindPoint){const p=n;n+=u.size,c?d=h.arraySetter(e,f,p,l,u.size):d=h.setter(e,f,p,l,u.size)}else h.arraySetter&&c?d=h.arraySetter(e,l):d=h.setter(e,l);return d.location=l,d}const i={},a={},o=e.getProgramParameter(t,uy);for(let s=0;s<o;++s){const u=e.getActiveUniform(t,s);if(Ry(u))continue;let l=u.name;l.endsWith("[0]")&&(l=l.substr(0,l.length-3));const c=e.getUniformLocation(t,u.name);if(c){const f=r(t,u,c);i[l]=f,Fy(l,f,a,i)}}return i}function SB(e,t){const n={},r=e.getProgramParameter(t,BI);for(let i=0;i<r;++i){const a=e.getTransformFeedbackVarying(t,i);n[a.name]={index:i,type:a.type,size:a.size}}return n}function CB(e,t){const n=e.getProgramParameter(t,uy),r=[],i=[];for(let s=0;s<n;++s){i.push(s),r.push({});const u=e.getActiveUniform(t,s);r[s].name=u.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(s){const u=s[0],l=s[1];e.getActiveUniforms(t,i,e[u]).forEach(function(c,f){r[f][l]=c})});const a={},o=e.getProgramParameter(t,DI);for(let s=0;s<o;++s){const u=e.getActiveUniformBlockName(t,s),l={index:e.getUniformBlockIndex(t,u),usedByVertexShader:e.getActiveUniformBlockParameter(t,s,RI),usedByFragmentShader:e.getActiveUniformBlockParameter(t,s,FI),size:e.getActiveUniformBlockParameter(t,s,MI),uniformIndices:e.getActiveUniformBlockParameter(t,s,PI)};l.used=l.usedByVertexShader||l.usedByFragmentShader,a[u]=l}return{blockSpecs:a,uniformData:r}}const My=/\[\d+\]\.$/,kB=(e,t)=>((e+(t-1))/t|0)*t;function TB(e,t,n,r){if(t||n){r=r||1;const a=e.length/4;return function(o){let s=0,u=0;for(let l=0;l<a;++l){for(let c=0;c<r;++c)e[s++]=o[u++];s+=4-r}}}else return function(i){i.length?e.set(i):e[0]=i}}function IB(e,t,n,r){const i=n.blockSpecs,a=n.uniformData,o=i[r];if(!o)return CI("no uniform block object named:",r),{name:r,uniforms:{}};const s=new ArrayBuffer(o.size),u=e.createBuffer(),l=o.index;e.bindBuffer(m0,u),e.uniformBlockBinding(t,o.index,l);let c=r+".";My.test(c)&&(c=c.replace(My,"."));const f={},h={},d={};return o.uniformIndices.forEach(function(p){const m=a[p];let y=m.name;y.startsWith(c)&&(y=y.substr(c.length));const w=y.endsWith("[0]");w&&(y=y.substr(0,y.length-3));const A=le[m.type],S=A.Type,_=w?kB(A.size,16)*m.size:A.size*m.size,T=new S(s,m.offset,_/S.BYTES_PER_ELEMENT);f[y]=T;const I=TB(T,w,A.rows,A.cols);h[y]=I,Fy(y,I,d,h)}),{name:r,array:s,asFloat:new Float32Array(s),buffer:u,uniforms:f,setters:h}}function Py(e,t,n){return IB(e,t.program,t.uniformBlockSpec,n)}function Ly(e,t,n){const i=(t.uniformBlockSpec||t).blockSpecs[n.name];if(i){const a=i.index;return e.bindBufferRange(m0,a,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function Oy(e,t,n){Ly(e,t,n)&&e.bufferData(m0,n.array,kI)}function Xs(e,t){const n=e.setters;for(const r in t){const i=n[r];if(i){const a=t[r];i(a)}}}function Ny(e,t){for(const n in t){const r=e[n];typeof r=="function"?r(t[n]):Ny(e[n],t[n])}}function Wa(e,...t){const n=e.uniformSetters||e,r=t.length;for(let i=0;i<r;++i){const a=t[i];if(Array.isArray(a)){const o=a.length;for(let s=0;s<o;++s)Wa(n,a[s])}else for(const o in a){const s=n[o];s&&s(a[o])}}}function BB(e,t){const n={},r=e.getProgramParameter(t,II);for(let i=0;i<r;++i){const a=e.getActiveAttrib(t,i);if(Ry(a))continue;const o=e.getAttribLocation(t,a.name),s=it[a.type],u=s.setter(e,o,s);u.location=o,n[a.name]=u}return n}function DB(e,t){for(const n in t){const r=e[n];r&&r(t[n])}}function $i(e,t,n){n.vertexArrayObject?e.bindVertexArray(n.vertexArrayObject):(DB(t.attribSetters||t,n.attribs),n.indices&&e.bindBuffer(TI,n.indices))}function RB(e,t){const n=_B(e,t),r=BB(e,t),i={program:t,uniformSetters:n,attribSetters:r};return za(e)&&(i.uniformBlockSpec=CB(e,t),i.transformFeedbackInfo=SB(e,t)),i}const FB=4,zy=5123;function Zc(e,t,n,r,i,a){n=n===void 0?FB:n;const o=t.indices,s=t.elementType,u=r===void 0?t.numElements:r;i=i===void 0?0:i,s||o?a!==void 0?e.drawElementsInstanced(n,u,s===void 0?zy:t.elementType,i,a):e.drawElements(n,u,s===void 0?zy:t.elementType,i):a!==void 0?e.drawArraysInstanced(n,i,u,a):e.drawArrays(n,i,u)}const MB=36160,qi=36161,PB=3553,LB=5121,OB=6402,NB=6408,zB=33190,UB=36012,GB=35056,HB=36013,VB=32854,jB=32855,$B=36194,Uy=33189,Gy=6401,Hy=36168,x0=34041,qB=36064,Yc=36096,Vy=36128,A0=33306,E0=33071,_0=9729,jy=[{format:NB,type:LB,min:_0,wrap:E0},{format:x0}],Sn={};Sn[x0]=A0,Sn[Gy]=Vy,Sn[Hy]=Vy,Sn[OB]=Yc,Sn[Uy]=Yc,Sn[zB]=Yc,Sn[UB]=Yc,Sn[GB]=A0,Sn[HB]=A0;function WB(e,t){return Sn[e]||Sn[t]}const Xr={};Xr[VB]=!0,Xr[jB]=!0,Xr[$B]=!0,Xr[x0]=!0,Xr[Uy]=!0,Xr[Gy]=!0,Xr[Hy]=!0;function ZB(e){return Xr[e]}function YB(e,t,n,r){const i=MB,a=e.createFramebuffer();e.bindFramebuffer(i,a),n=n||e.drawingBufferWidth,r=r||e.drawingBufferHeight,t=t||jy;let o=0;const s={framebuffer:a,attachments:[],width:n,height:r};return t.forEach(function(u){let l=u.attachment;const c=u.samples,f=u.format;let h=u.attachmentPoint||WB(f,u.internalFormat);if(h||(h=qB+o++),!l)if(c!==void 0||ZB(f))l=e.createRenderbuffer(),e.bindRenderbuffer(qi,l),c>1?e.renderbufferStorageMultisample(qi,c,f,n,r):e.renderbufferStorage(qi,f,n,r);else{const d=Object.assign({},u);d.width=n,d.height=r,d.auto===void 0&&(d.auto=!1,d.min=d.min||d.minMag||_0,d.mag=d.mag||d.minMag||_0,d.wrapS=d.wrapS||d.wrap||E0,d.wrapT=d.wrapT||d.wrap||E0),l=Qs(e,d)}if(P2(e,l))e.framebufferRenderbuffer(i,h,qi,l);else if(Ic(e,l))u.layer!==void 0?e.framebufferTextureLayer(i,h,l,u.level||0,u.layer):e.framebufferTexture2D(i,h,u.target||PB,l,u.level||0);else throw new Error("unknown attachment type");s.attachments.push(l)}),s}function QB(e,t,n,r,i){r=r||e.drawingBufferWidth,i=i||e.drawingBufferHeight,t.width=r,t.height=i,n=n||jy,n.forEach(function(a,o){const s=t.attachments[o],u=a.format,l=a.samples;if(l!==void 0||P2(e,s))e.bindRenderbuffer(qi,s),l>1?e.renderbufferStorageMultisample(qi,l,u,r,i):e.renderbufferStorage(qi,u,r,i);else if(Ic(e,s))SI(e,s,a,r,i);else throw new Error("unknown attachment type")})}function XB(e,t,n){const r=e.createVertexArray();return e.bindVertexArray(r),t.length||(t=[t]),t.forEach(function(i){$i(e,i,n)}),e.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const KB=/^(.*?)_/;function JB(e,t){a0(e,0);const n=e.getExtension(t);if(n){const r={},i=KB.exec(t)[1],a="_"+i;for(const o in n){const s=n[o],u=typeof s=="function",l=u?i:a;let c=o;o.endsWith(l)&&(c=o.substring(0,o.length-l.length)),e[c]!==void 0?!u&&e[c]!==s&&M2(c,e[c],s,o):u?e[c]=function(f){return function(){return f.apply(n,arguments)}}(s):(e[c]=s,r[c]=s)}r.constructor={name:n.constructor.name},a0(r,0)}return n}const $y=["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 qy(e){for(let t=0;t<$y.length;++t)JB(e,$y[t])}function eD(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){qy(r);break}return r}function tD(e,t){return eD(e,t)}const nD=`out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
225
229
  #if defined(ROUNDED_CORNERS) || defined(STROKED)
226
230
  out vec2 vPosInPixels;
227
231
  #endif
@@ -229,7 +233,7 @@ out vec2 vHalfSizeInPixels;/***Clamps the minimumSize and returns an opacity tha
229
233
  #if defined(ROUNDED_CORNERS) || defined(STROKED)
230
234
  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);
231
235
  #endif
232
- gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,eD=`#if defined(ROUNDED_CORNERS) || defined(STROKED)
236
+ gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,rD=`#if defined(ROUNDED_CORNERS) || defined(STROKED)
233
237
  in vec2 vPosInPixels;
234
238
  #endif
235
239
  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){
@@ -243,42 +247,42 @@ fragColor=distanceToColor(d,vFillColor,vStrokeColor,vHalfStrokeWidth);if(fragCol
243
247
  #else
244
248
  fragColor=vFillColor;
245
249
  #endif
246
- if(uPickingEnabled){fragColor=vPickingColor;}}`,tD=`layout(std140)uniform Mark{uniform float uMinWidth;uniform float uMinHeight;uniform float uMinOpacity;uniform float uCornerRadiusTopRight;uniform float uCornerRadiusBottomRight;uniform float uCornerRadiusTopLeft;uniform float uCornerRadiusBottomLeft;
250
+ if(uPickingEnabled){fragColor=vPickingColor;}}`,iD=`layout(std140)uniform Mark{uniform float uMinWidth;uniform float uMinHeight;uniform float uMinOpacity;uniform float uCornerRadiusTopRight;uniform float uCornerRadiusBottomRight;uniform float uCornerRadiusTopLeft;uniform float uCornerRadiusBottomLeft;
247
251
  #pragma markUniforms
248
- };`,$y="attr_",nD="uDomain_",rD="range_",qy="scale_",S0="getScaled_",C0="uRangeTexture_",Wy=3402823466e29;function iD(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 aD(e,t){let n;if(kc(e))n=Wi(B2(e)(t));else if(Ue(t))if($r(e))n=lD(t);else throw new Error(`String values are not supported on the "${e}" channel: ${t}`);else if(Yo(t))n=Wi(t?1:0);else if(t===null)if($r(e))n=Wi([0,0,0]);else throw new Error(`null value is not supported on the "${e}" chanel.`);else n=Wi(t);return`
252
+ };`,Wy="attr_",aD="uDomain_",oD="range_",Zy="scale_",S0="getScaled_",C0="uRangeTexture_",Yy=3402823466e29;function sD(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 lD(e,t){let n;if(kc(e))n=Wi(R2(e)(t));else if(Ue(t))if($r(e))n=fD(t);else throw new Error(`String values are not supported on the "${e}" channel: ${t}`);else if(Yo(t))n=Wi(t?1:0);else if(t===null)if($r(e))n=Wi([0,0,0]);else throw new Error(`null value is not supported on the "${e}" chanel.`);else n=Wi(t);return`
249
253
  #define ${e}_DEFINED
250
254
  ${n.type} ${S0}${e}() {
251
255
  // Constant value
252
256
  return ${n};
253
- }`}function oD(e){let t="float",n=o=>o;$r(e)&&(t="vec3",n=o=>Qy(o));const r=`u${hD(e)}`,i=` // Dynamic value
257
+ }`}function uD(e){let t="float",n=o=>o;$r(e)&&(t="vec3",n=o=>Ky(o));const r=`u${gD(e)}`,i=` // Dynamic value
254
258
  uniform ${t} ${r};`;let a=`
255
259
  #define ${e}_DEFINED
256
260
  ${t} ${S0}${e}() {
257
261
  // Dynamic value
258
262
  return ${r};
259
- }`;return{channel:e,uniformName:r,uniformGlsl:i,scaleGlsl:a,adjuster:n}}function sD(e,t,n,r=[e]){if(rn(n))throw new Error(`Cannot create scale for "value": ${JSON.stringify(n)}`);const i=t?t.scale:_c(),a=Hi(e),o=$y+ew(r),s=nD+a,u=rD+a,l=Hn(i.type),c=Qc(i.type),h=c&&k0(i.domain())?"uvec2":c||l?"uint":"float",d=i.domain?i.domain().length:void 0;let p;const m=[];m.push(""),m.push("/".repeat(70)),m.push(`// Channel: ${e}`),m.push(""),m.push(`#define ${e}_DEFINED`);const{transform:y}=iD(i.type),w=(te,...ge)=>uD.apply(null,[te,"value",...ge]);let A;switch(y){case"linear":A=w("scaleLinear","domain",u);break;case"log":A=w("scaleLog","domain",u,i.base());break;case"symlog":A=w("scaleSymlog","domain",u,i.constant());break;case"pow":case"sqrt":A=w("scalePow","domain",u,i.exponent());break;case"index":case"locus":A=w("scaleBandHp","domain",u,i.paddingInner(),i.paddingOuter(),i.align(),n.band??.5);break;case"point":case"band":A=w("scaleBand","domain",u,i.paddingInner(),i.paddingOuter(),i.align(),n.band??.5);break;case"ordinal":case"null":case"identity":A=w("scaleIdentity");break;case"threshold":break;default:throw new Error(`Unsupported scale type: ${i.type}! ${e}: ${JSON.stringify(n)}`)}const S=tw(i,e);let _;if(S&&e==a){const te=i.props.range??[];if(It(te)||te.some(It)){if(S.length<1||S.length>4)throw new Error(`A range with ExprRefs must have 1-4 elements, not ${S.length}! Range: ${JSON.stringify(S)}`);_=` uniform ${Yy(S.length)} ${u};`}else if(S.length&&S.every(Tt)){const ge=Xy(S);m.push(`const ${ge.type} ${u} = ${ge};`)}}const T=$r(e)?"vec3":"float";let I;if($r(e)){const te=C0+a;if(e==a&&m.push(`uniform sampler2D ${te};`),yt(i.type))I=`getInterpolatedColor(${te}, transformed)`;else if(Hn(i.type)||Ui(i.type))I=`getDiscreteColor(${te}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(i.type==="ordinal"||Ui(i.type)){const te=C0+a;e==a&&m.push(`uniform sampler2D ${te};`),I=`getDiscreteColor(${te}, int(transformed)).r`}const[B,R]=Hs(n)?[void 0,` uniform highp ${h} ${o};`]:[`in highp ${h} ${o};`,void 0],M=[],G=yt(i.type)&&d>2,N=Ui(i.type)||G;if(M.push("int slot = 0;"),N){const te=s;M.push(G?`while (slot < ${te}.length() - 2 && value >= ${te}[slot + 1]) { slot++; }`:`while (slot < ${te}.length() && value >= ${te}[slot]) { slot++; }`)}const re=yt(i.type)||Ui(i.type)||["band","point"].includes(i.type);if(A){const te=s;re&&(c?M.push(`vec3 domain = ${te};`):M.push(`vec2 domain = vec2(${te}[slot], ${te}[slot + 1]);`)),M.push(`float transformed = ${A};`),G&&M.push(`transformed = (float(slot) + transformed) / (float(${te}.length() - 1));`)}else M.push("float transformed = float(slot);");"clamp"in i&&i.clamp()&&M.push(`transformed = clampToRange(transformed, ${Xy(S)});`),M.push(`return ${I??"transformed"};`),m.push(`
260
- ${T} ${qy}${e}(${h} value) {
263
+ }`;return{channel:e,uniformName:r,uniformGlsl:i,scaleGlsl:a,adjuster:n}}function cD(e,t,n,r=[e]){if(on(n))throw new Error(`Cannot create scale for "value": ${JSON.stringify(n)}`);const i=t?t.scale:_c(),a=Hi(e),o=Wy+nw(r),s=aD+a,u=oD+a,l=Hn(i.type),c=Qc(i.type),h=c&&k0(i.domain())?"uvec2":c||l?"uint":"float",d=i.domain?i.domain().length:void 0;let p;const m=[];m.push(""),m.push("/".repeat(70)),m.push(`// Channel: ${e}`),m.push(""),m.push(`#define ${e}_DEFINED`);const{transform:y}=sD(i.type),w=(te,...ge)=>hD.apply(null,[te,"value",...ge]);let A;switch(y){case"linear":A=w("scaleLinear","domain",u);break;case"log":A=w("scaleLog","domain",u,i.base());break;case"symlog":A=w("scaleSymlog","domain",u,i.constant());break;case"pow":case"sqrt":A=w("scalePow","domain",u,i.exponent());break;case"index":case"locus":A=w("scaleBandHp","domain",u,i.paddingInner(),i.paddingOuter(),i.align(),n.band??.5);break;case"point":case"band":A=w("scaleBand","domain",u,i.paddingInner(),i.paddingOuter(),i.align(),n.band??.5);break;case"ordinal":case"null":case"identity":A=w("scaleIdentity");break;case"threshold":break;default:throw new Error(`Unsupported scale type: ${i.type}! ${e}: ${JSON.stringify(n)}`)}const S=rw(i,e);let _;if(S&&e==a){const te=i.props.range??[];if(It(te)||te.some(It)){if(S.length<1||S.length>4)throw new Error(`A range with ExprRefs must have 1-4 elements, not ${S.length}! Range: ${JSON.stringify(S)}`);_=` uniform ${Xy(S.length)} ${u};`}else if(S.length&&S.every(Tt)){const ge=Jy(S);m.push(`const ${ge.type} ${u} = ${ge};`)}}const T=$r(e)?"vec3":"float";let I;if($r(e)){const te=C0+a;if(e==a&&m.push(`uniform sampler2D ${te};`),yt(i.type))I=`getInterpolatedColor(${te}, transformed)`;else if(Hn(i.type)||Ui(i.type))I=`getDiscreteColor(${te}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(i.type==="ordinal"||Ui(i.type)){const te=C0+a;e==a&&m.push(`uniform sampler2D ${te};`),I=`getDiscreteColor(${te}, int(transformed)).r`}const[B,R]=Hs(n)?[void 0,` uniform highp ${h} ${o};`]:[`in highp ${h} ${o};`,void 0],M=[],G=yt(i.type)&&d>2,N=Ui(i.type)||G;if(M.push("int slot = 0;"),N){const te=s;M.push(G?`while (slot < ${te}.length() - 2 && value >= ${te}[slot + 1]) { slot++; }`:`while (slot < ${te}.length() && value >= ${te}[slot]) { slot++; }`)}const re=yt(i.type)||Ui(i.type)||["band","point"].includes(i.type);if(A){const te=s;re&&(c?M.push(`vec3 domain = ${te};`):M.push(`vec2 domain = vec2(${te}[slot], ${te}[slot + 1]);`)),M.push(`float transformed = ${A};`),G&&M.push(`transformed = (float(slot) + transformed) / (float(${te}.length() - 1));`)}else M.push("float transformed = float(slot);");"clamp"in i&&i.clamp()&&M.push(`transformed = clampToRange(transformed, ${Jy(S)});`),M.push(`return ${I??"transformed"};`),m.push(`
264
+ ${T} ${Zy}${e}(${h} value) {
261
265
  ${M.map(te=>` ${te}
262
266
  `).join("")}
263
267
  }`),m.push(`
264
268
  ${T} ${S0}${e}() {
265
- return ${qy}${e}(${o});
269
+ return ${Zy}${e}(${o});
266
270
  }`);const se=m.join(`
267
- `);if(re&&e==a){const te=yt(i.type)||Ui(i.type)?d:2;p=c?` highp vec3 ${s};`:` mediump float ${s}[${te}];`}return{attributeName:o,attributeGlsl:B,markUniformGlsl:R,glsl:se,domainUniformName:s,domainUniform:p,rangeName:u,rangeUniform:_}}function Zy(e){if(!Tt(e))throw new Error(`Not a number: ${e}`);if(e==1/0)return""+Wy;if(e==-1/0)return""+-Wy;{let t=`${e}`;return/^(-)?\d+$/.test(t)&&(t+=".0"),t}}function Wi(e){typeof e=="number"&&(e=[e]);const t=e.length;if(t<1||t>4)throw new Error("Invalid number of components: "+t);const n=Yy(t),r=`${n}(${e.map(Zy).join(", ")})`;return Object.assign(r,{type:n,numComponents:t})}function Yy(e){switch(e){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error("Invalid number of components: "+e)}}function Qy(e){const t=Gr(e).rgb();return[t.r,t.g,t.b].map(n=>n/255)}function lD(e){return Wi(Qy(e))}function Xy(e){return Wi([e[0],Es(e)])}function uD(e,...t){const n=[];for(const r of t)Tt(r)?n.push(Zy(r)):xt(r)?n.push(Wi(r)):n.push(r);return`${e}(${n.join(", ")})`}function Qc(e){return e=="index"||e=="locus"}function k0(e){return e[1]>2**32}const T0=2**12;function Ky(e,t=[]){const n=e%T0,r=(e-n)/T0;return t[0]=r,t[1]=n,t}function cD(e){const t=e%T0;return[e-t,t]}function fD(e){return[...cD(e[0]),e[1]-e[0]]}function Jy(e){const t=new Rr([],JSON.stringify);for(const[n,r]of Object.entries(e)){const i=r.channelDef;if(Gi(i)){const o=[i.field,r.scale?(yt(r.scale.type)||Ui(r.scale.type))??!1:!1];t.set(o,[...t.get(o)??[],n])}}return t}function ew(e){return Ot(e).join("_")}function hD(e){return e[0].toUpperCase()+e.slice(1)}const tw=(e,t)=>Ac(e.type)||yt(e.type)&&$r(t)?[0,1]:e.range?e.range():void 0,nw=1e4;class dD{constructor(t){K(this,lh);K(this,uh);K(this,eu,!1);this.size=t,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}configure(){if(W(this,eu))throw new Error("Already configured!");J(this,lh,$_).call(this),J(this,uh,q_).call(this),Fe(this,eu,!0)}addConverter(t,n){const r=this.createUpdater($y+t,n.numComponents||1,n.targetArrayType??Float32Array,n.arrayReference),i=n.f;this.dataUpdaters.push(n.arrayReference?a=>r(i(a)):a=>r(i(a)))}createUpdater(t,n,r=Float32Array,i=void 0){if(!Tt(this.size))throw new Error("The number of vertices must be defined!");let a,o,s=0;const u=new r(this.size*n);if(this.arrays[t]={data:u,numComponents:n},n==1){let l=0;const c=f=>{l=+f};a=()=>{u[s++]=l},o=c}else{let l=i??[0];const c=i?f=>{}:f=>{l=f};switch(n){case 1:break;case 2:a=()=>{u[s++]=l[0],u[s++]=l[1]},o=c;break;case 3:a=()=>{u[s++]=l[0],u[s++]=l[1],u[s++]=l[2]},o=c;break;case 4:a=()=>{u[s++]=l[0],u[s++]=l[1],u[s++]=l[2],u[s++]=l[3]},o=c;break;default:throw new Error("Invalid numComponents: "+n)}}return this.pushers.push(a),o}pushAll(){throw new Error("Call configure() first!")}updateFromDatum(t){throw new Error("Call configure() first!")}pushFromDatum(t){this.updateFromDatum(t),this.pushAll()}}eu=new WeakMap,lh=new WeakSet,$_=function(){if(this.size>nw){const t=this.pushers.map((r,i)=>`const p${i} = that.pushers[${i}];`).join(`
271
+ `);if(re&&e==a){const te=yt(i.type)||Ui(i.type)?d:2;p=c?` highp vec3 ${s};`:` mediump float ${s}[${te}];`}return{attributeName:o,attributeGlsl:B,markUniformGlsl:R,glsl:se,domainUniformName:s,domainUniform:p,rangeName:u,rangeUniform:_}}function Qy(e){if(!Tt(e))throw new Error(`Not a number: ${e}`);if(e==1/0)return""+Yy;if(e==-1/0)return""+-Yy;{let t=`${e}`;return/^(-)?\d+$/.test(t)&&(t+=".0"),t}}function Wi(e){typeof e=="number"&&(e=[e]);const t=e.length;if(t<1||t>4)throw new Error("Invalid number of components: "+t);const n=Xy(t),r=`${n}(${e.map(Qy).join(", ")})`;return Object.assign(r,{type:n,numComponents:t})}function Xy(e){switch(e){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error("Invalid number of components: "+e)}}function Ky(e){const t=Gr(e).rgb();return[t.r,t.g,t.b].map(n=>n/255)}function fD(e){return Wi(Ky(e))}function Jy(e){return Wi([e[0],Es(e)])}function hD(e,...t){const n=[];for(const r of t)Tt(r)?n.push(Qy(r)):xt(r)?n.push(Wi(r)):n.push(r);return`${e}(${n.join(", ")})`}function Qc(e){return e=="index"||e=="locus"}function k0(e){return e[1]>2**32}const T0=2**12;function ew(e,t=[]){const n=e%T0,r=(e-n)/T0;return t[0]=r,t[1]=n,t}function dD(e){const t=e%T0;return[e-t,t]}function pD(e){return[...dD(e[0]),e[1]-e[0]]}function tw(e){const t=new Rr([],JSON.stringify);for(const[n,r]of Object.entries(e)){const i=r.channelDef;if(Gi(i)){const o=[i.field,r.scale?(yt(r.scale.type)||Ui(r.scale.type))??!1:!1];t.set(o,[...t.get(o)??[],n])}}return t}function nw(e){return Ot(e).join("_")}function gD(e){return e[0].toUpperCase()+e.slice(1)}const rw=(e,t)=>Ac(e.type)||yt(e.type)&&$r(t)?[0,1]:e.range?e.range():void 0,iw=1e4;class mD{constructor(t){K(this,lh);K(this,uh);K(this,eu,!1);this.size=t,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}configure(){if(W(this,eu))throw new Error("Already configured!");J(this,lh,Z_).call(this),J(this,uh,Y_).call(this),Fe(this,eu,!0)}addConverter(t,n){const r=this.createUpdater(Wy+t,n.numComponents||1,n.targetArrayType??Float32Array,n.arrayReference),i=n.f;this.dataUpdaters.push(n.arrayReference?a=>r(i(a)):a=>r(i(a)))}createUpdater(t,n,r=Float32Array,i=void 0){if(!Tt(this.size))throw new Error("The number of vertices must be defined!");let a,o,s=0;const u=new r(this.size*n);if(this.arrays[t]={data:u,numComponents:n},n==1){let l=0;const c=f=>{l=+f};a=()=>{u[s++]=l},o=c}else{let l=i??[0];const c=i?f=>{}:f=>{l=f};switch(n){case 1:break;case 2:a=()=>{u[s++]=l[0],u[s++]=l[1]},o=c;break;case 3:a=()=>{u[s++]=l[0],u[s++]=l[1],u[s++]=l[2]},o=c;break;case 4:a=()=>{u[s++]=l[0],u[s++]=l[1],u[s++]=l[2],u[s++]=l[3]},o=c;break;default:throw new Error("Invalid numComponents: "+n)}}return this.pushers.push(a),o}pushAll(){throw new Error("Call configure() first!")}updateFromDatum(t){throw new Error("Call configure() first!")}pushFromDatum(t){this.updateFromDatum(t),this.pushAll()}}eu=new WeakMap,lh=new WeakSet,Z_=function(){if(this.size>iw){const t=this.pushers.map((r,i)=>`const p${i} = that.pushers[${i}];`).join(`
268
272
  `),n=this.pushers.map((r,i)=>` p${i}();`).join(`
269
273
  `);this.pushAll=new Function("that",`${t}
270
274
  return function unrolledPushAll() {
271
275
  ${n}
272
276
  that.vertexCount++;
273
- };`)(this)}else this.pushAll=()=>{for(let t=0;t<this.pushers.length;t++)this.pushers[t]();this.vertexCount++}},uh=new WeakSet,q_=function(){if(this.size>nw){const t=this.dataUpdaters.map((r,i)=>`const u${i} = that.dataUpdaters[${i}];`).join(`
277
+ };`)(this)}else this.pushAll=()=>{for(let t=0;t<this.pushers.length;t++)this.pushers[t]();this.vertexCount++}},uh=new WeakSet,Y_=function(){if(this.size>iw){const t=this.dataUpdaters.map((r,i)=>`const u${i} = that.dataUpdaters[${i}];`).join(`
274
278
  `),n=this.dataUpdaters.map((r,i)=>` u${i}(datum);`).join(`
275
279
  `);this.updateFromDatum=new Function("that","datum",`${t}
276
280
  return function unrolledUpdateFromDatum(datum) {
277
281
  ${n}
278
- };`)(this)}else this.updateFromDatum=t=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](t)}};const Za=5,I0=127;function B0(e){const t=[];for(let p=0;p<=I0;p++)t.push(void 0);const n=new Map;for(const p of e.chars)p.id<=I0?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<=I0?t[p]:n.get(p))||t[63]}function a(p){return i(p.charCodeAt(0))}const o=e.common.base,s=a("x"),u=a("X"),l=a("q"),c=s.height-Za*2,f=u.height-Za*2,h=l.height-s.height+l.yoffset-s.yoffset;function d(p,m=1){let y=0;for(let w=0;w<p.length;w++)y+=i(p.charCodeAt(w)).xadvance;return y/o*m}return{measureWidth:d,getCharByCode:i,getChar:a,xHeight:c,capHeight:f,descent:h,common:e.common}}const rw=2**31-1,pD=-(2**31);function gD(e,t,n,r=n){const i=new Array(e);i.fill(rw);let a=pD,o=-1/0,s=!1;const u=new Array(e);u.fill(0);const l=t[0],f=(t[1]-t[0])/e,h=(w,A)=>{const S=(w-l)/f,_=Math.floor(S);return Ds(A&&_==S?_-1:_,0,e-1)};function d(w,A,S){if(s)return;if(A>a)a=A;else{s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}const _=n(w);if(_<o){s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}o=_;const T=h(_,!1);i[T]>A&&(i[T]=A),u[T]<S&&(u[T]=S)}function p(w,A,S){if(s)return;if(A>a)a=A;else{s=!0,console.debug("Items (vertices) are not ordered properly. Disabling binned index.");return}const _=n(w),T=r(w);if(_<o){s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}else if(T<_){s=!0,console.debug("End index is less than start index. Disabling binned index. Datum: ",w);return}o=_;const I=h(_,!1),B=h(T,!0);for(let R=I;R<=B;R++)i[R]>A&&(i[R]=A),u[R]<S&&(u[R]=S)}const m=(w,A,S=[0,0])=>{const _=h(w,!1),T=h(A,!0),I=i[_],B=Math.max(u[T],I);return S[0]=I,S[1]=B,S},y=()=>{if(s)return;for(let A=1;A<u.length;A++)u[A]<u[A-1]&&(u[A]=u[A-1]);let w=!0;for(let A=i.length-1;A>0;A--)w&&i[A]==rw?(i[A]=u[A],w=!1):i[A-1]>i[A]&&(i[A-1]=i[A]);return m};return d.getIndex=y,p.getIndex=y,n==r?d:p}class Ks{constructor({encoders:t,numVertices:n=void 0,attributes:r=[]}){this.encoders=t,this.variableEncoders=Object.fromEntries(Object.entries(t).filter(([a,o])=>r.includes(a)&&o&&o.scale&&!o.constant));const i=[...Jy(t).entries()].filter(([a,o])=>a[1]&&o.length>1).map(([a,o])=>o);this.allocatedVertices=n,this.variableBuilder=new dD(n);for(const[a,o]of Object.entries(this.variableEncoders)){const s=i.find(m=>m.find(y=>y==a));if(s&&a!=s[0])continue;const u=o.accessor,l=Qc(o.scale.type),c=l&&k0(o.scale.domain()),f=[0,0],h=o.indexer,d=h?m=>h(u(m)):c?m=>Ky(u(m),f):u,p=s?ew(s):a;this.variableBuilder.addConverter(p,{f:d,numComponents:c?2:1,arrayReference:c?f:void 0,targetArrayType:Hn(o.scale.type)?Uint16Array:l?Uint32Array:Float32Array})}this.lastOffset=0,this.rangeMap=new Rr([],JSON.stringify)}registerBatch(t){var a;const n=this.lastOffset,r=this.variableBuilder.vertexCount,i=r-n;i&&this.rangeMap.set(t,{offset:n,count:i,xIndex:(a=this.xIndexer)==null?void 0:a.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 a=r;a<i;a++){const o=n[a];this.variableBuilder.pushFromDatum(o),this.addToXIndex(o)}this.registerBatch(t)}prepareXIndexer(t,n=0,r=n+t.length){var l;const i=()=>{this.addToXIndex=c=>{},this.xIndexer=void 0},a=(l=this.encoders.x)==null?void 0:l.channelDef;if(!("buildIndex"in a)||!a.buildIndex||!t.length||r-n<0){i();return}const o=c=>{var f;return c&&yt((f=c.scale)==null?void 0:f.type)&&c},s=o(this.variableEncoders.x),u=o(this.variableEncoders.x2);if(s){const c=s.accessor,f=u?u.accessor:c,h=[c(t[n]),f(t[r-1])];if(h[1]>h[0]){this.xIndexer=gD(50,h,c,f);let d=this.variableBuilder.vertexCount;this.addToXIndex=p=>{let m=this.variableBuilder.vertexCount;this.xIndexer(p,d,m),d=m}}else i()}else i()}addToXIndex(t){}toArrays(){return{arrays:this.variableBuilder.arrays,vertexCount:this.variableBuilder.vertexCount,allocatedVertices:this.allocatedVertices,rangeMap:this.rangeMap}}}class mD extends Ks{constructor({encoders:t,attributes:n,numItems:r}){super({encoders:t,attributes:n,numVertices:r*6}),this.variableBuilder.configure();const i=this.variableBuilder.pushAll;this.pushAllSixTimes=r>500?new Function("pushAll",`return function unrolledPushAllSixTimes() {
282
+ };`)(this)}else this.updateFromDatum=t=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](t)}};const Za=5,I0=127;function B0(e){const t=[];for(let p=0;p<=I0;p++)t.push(void 0);const n=new Map;for(const p of e.chars)p.id<=I0?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<=I0?t[p]:n.get(p))||t[63]}function a(p){return i(p.charCodeAt(0))}const o=e.common.base,s=a("x"),u=a("X"),l=a("q"),c=s.height-Za*2,f=u.height-Za*2,h=l.height-s.height+l.yoffset-s.yoffset;function d(p,m=1){let y=0;for(let w=0;w<p.length;w++)y+=i(p.charCodeAt(w)).xadvance;return y/o*m}return{measureWidth:d,getCharByCode:i,getChar:a,xHeight:c,capHeight:f,descent:h,common:e.common}}const aw=2**31-1,bD=-(2**31);function yD(e,t,n,r=n){const i=new Array(e);i.fill(aw);let a=bD,o=-1/0,s=!1;const u=new Array(e);u.fill(0);const l=t[0],f=(t[1]-t[0])/e,h=(w,A)=>{const S=(w-l)/f,_=Math.floor(S);return Ds(A&&_==S?_-1:_,0,e-1)};function d(w,A,S){if(s)return;if(A>a)a=A;else{s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}const _=n(w);if(_<o){s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}o=_;const T=h(_,!1);i[T]>A&&(i[T]=A),u[T]<S&&(u[T]=S)}function p(w,A,S){if(s)return;if(A>a)a=A;else{s=!0,console.debug("Items (vertices) are not ordered properly. Disabling binned index.");return}const _=n(w),T=r(w);if(_<o){s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}else if(T<_){s=!0,console.debug("End index is less than start index. Disabling binned index. Datum: ",w);return}o=_;const I=h(_,!1),B=h(T,!0);for(let R=I;R<=B;R++)i[R]>A&&(i[R]=A),u[R]<S&&(u[R]=S)}const m=(w,A,S=[0,0])=>{const _=h(w,!1),T=h(A,!0),I=i[_],B=Math.max(u[T],I);return S[0]=I,S[1]=B,S},y=()=>{if(s)return;for(let A=1;A<u.length;A++)u[A]<u[A-1]&&(u[A]=u[A-1]);let w=!0;for(let A=i.length-1;A>0;A--)w&&i[A]==aw?(i[A]=u[A],w=!1):i[A-1]>i[A]&&(i[A-1]=i[A]);return m};return d.getIndex=y,p.getIndex=y,n==r?d:p}class Ks{constructor({encoders:t,numVertices:n=void 0,attributes:r=[]}){this.encoders=t,this.variableEncoders=Object.fromEntries(Object.entries(t).filter(([a,o])=>r.includes(a)&&o&&o.scale&&!o.constant));const i=[...tw(t).entries()].filter(([a,o])=>a[1]&&o.length>1).map(([a,o])=>o);this.allocatedVertices=n,this.variableBuilder=new mD(n);for(const[a,o]of Object.entries(this.variableEncoders)){const s=i.find(m=>m.find(y=>y==a));if(s&&a!=s[0])continue;const u=o.accessor,l=Qc(o.scale.type),c=l&&k0(o.scale.domain()),f=[0,0],h=o.indexer,d=h?m=>h(u(m)):c?m=>ew(u(m),f):u,p=s?nw(s):a;this.variableBuilder.addConverter(p,{f:d,numComponents:c?2:1,arrayReference:c?f:void 0,targetArrayType:Hn(o.scale.type)?Uint16Array:l?Uint32Array:Float32Array})}this.lastOffset=0,this.rangeMap=new Rr([],JSON.stringify)}registerBatch(t){var a;const n=this.lastOffset,r=this.variableBuilder.vertexCount,i=r-n;i&&this.rangeMap.set(t,{offset:n,count:i,xIndex:(a=this.xIndexer)==null?void 0:a.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 a=r;a<i;a++){const o=n[a];this.variableBuilder.pushFromDatum(o),this.addToXIndex(o)}this.registerBatch(t)}prepareXIndexer(t,n=0,r=n+t.length){var l;const i=()=>{this.addToXIndex=c=>{},this.xIndexer=void 0},a=(l=this.encoders.x)==null?void 0:l.channelDef;if(!("buildIndex"in a)||!a.buildIndex||!t.length||r-n<0){i();return}const o=c=>{var f;return c&&yt((f=c.scale)==null?void 0:f.type)&&c},s=o(this.variableEncoders.x),u=o(this.variableEncoders.x2);if(s){const c=s.accessor,f=u?u.accessor:c,h=[c(t[n]),f(t[r-1])];if(h[1]>h[0]){this.xIndexer=yD(50,h,c,f);let d=this.variableBuilder.vertexCount;this.addToXIndex=p=>{let m=this.variableBuilder.vertexCount;this.xIndexer(p,d,m),d=m}}else i()}else i()}addToXIndex(t){}toArrays(){return{arrays:this.variableBuilder.arrays,vertexCount:this.variableBuilder.vertexCount,allocatedVertices:this.allocatedVertices,rangeMap:this.rangeMap}}}class wD extends Ks{constructor({encoders:t,attributes:n,numItems:r}){super({encoders:t,attributes:n,numVertices:r*6}),this.variableBuilder.configure();const i=this.variableBuilder.pushAll;this.pushAllSixTimes=r>500?new Function("pushAll",`return function unrolledPushAllSixTimes() {
279
283
  pushAll(); pushAll(); pushAll(); pushAll(); pushAll(); pushAll();
280
- };`)(i):function(){i(),i(),i(),i(),i(),i()}}addBatch(t,n,r=0,i=n.length){if(!(i<=r)){this.prepareXIndexer(n,r,i);for(let a=r;a<i;a++){const o=n[a];this.variableBuilder.updateFromDatum(o),this.pushAllSixTimes(),this.addToXIndex(o)}this.registerBatch(t)}}}class bD extends Ks{constructor({encoders:t,attributes:n,tessellationThreshold:r=1/0,visibleRange:i=[-1/0,1/0],numItems:a}){super({encoders:t,attributes:n,numVertices:r==1/0?a*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),this.variableBuilder.configure()}addBatch(t,n,r=0,i=n.length){this.prepareXIndexer(n,r,i);for(let a=r;a<i;a++){const o=n[a];this.variableBuilder.updateFromDatum(o),this.updateSide(-.5),this.updatePos(0),this.variableBuilder.pushAll();const s=1;for(let u=0;u<=s;u++)this.updatePos(u/s),this.updateSide(-.5),this.variableBuilder.pushAll(),this.updateSide(.5),this.variableBuilder.pushAll();this.variableBuilder.pushAll(),this.addToXIndex(o)}this.registerBatch(t)}}class yD extends Ks{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r}),this.variableBuilder.configure()}}class wD extends Ks{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r}),this.variableBuilder.configure()}toArrays(){const t=this.variableBuilder.arrays;for(let n of Object.values(t))n.divisor=1;return super.toArrays()}}class vD extends Ks{constructor({encoders:t,attributes:n,fontMetrics:r,properties:i,numCharacters:a=void 0}){super({encoders:t,attributes:n,numVertices:a*6}),this.metadata=r,this.metrics=r,this.properties=i;const s=t.text.channelDef;this.numberFormat=!rn(s)&&"format"in s&&s.format?mt(s.format):u=>u,this.updateVertexCoord=this.variableBuilder.createUpdater("vertexCoord",2),this.updateTextureCoord=this.variableBuilder.createUpdater("textureCoord",2),this.updateWidth=this.variableBuilder.createUpdater("width",1),this.variableBuilder.configure()}addBatch(t,n,r=0,i=n.length){const a=this.properties.align||"left",o=this.properties.logoLetters??!1,s=this.metadata.common.base,u=this.metadata.common.scaleH;let l=-Za;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 c=this.encoders.text.accessor||this.encoders.text,f=[0,0];this.updateVertexCoord(f);const h=[0,0];this.updateTextureCoord(h),this.prepareXIndexer(n,r,i);for(let d=r;d<i;d++){const p=n[d],m=this.numberFormat(c(p)),y=Ue(m)?m:m===null?"":""+m;if(y.length==0)continue;this.variableBuilder.updateFromDatum(p);const w=o?y.length:this.metrics.measureWidth(y);this.updateWidth(w);let A=a=="right"?-w:a=="center"?-w/2:0;if(!o){const I=this.metrics.getCharByCode(y.charCodeAt(0));A-=(I.width-I.xadvance)/s/2}let S=-.5,_=1,T=1;for(let I=0;I<y.length;I++){const B=this.metrics.getCharByCode(y.charCodeAt(I)),R=o?1:B.xadvance/s;if(B.id==32){A+=R;continue}o?(T=(B.width+Za*2)/B.width,A=-T/2,_=(B.height+Za*2)/B.height,S=-.5-Za/B.height):(_=B.height/s,S=-(B.height+B.yoffset+l)/s,T=B.width/s);const M=B.x,G=B.y;f[0]=A,f[1]=S+_,h[0]=M/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=A+T,f[1]=S+_,h[0]=(M+B.width)/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,h[0]=M/u,h[1]=(G+B.height)/u,this.variableBuilder.pushAll(),f[0]=A+T,f[1]=S+_,h[0]=(M+B.width)/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,h[0]=M/u,h[1]=(G+B.height)/u,this.variableBuilder.pushAll(),f[0]=A+T,f[1]=S,h[0]=(M+B.width)/u,h[1]=(G+B.height)/u,this.variableBuilder.pushAll(),A+=R}this.addToXIndex(p)}this.registerBatch(t)}}const iw=`#define PI 3.141593
281
- 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);}}`,xD="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 scaleIdentity(uint value){return float(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(uint 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+(float(value)-domainExtent[0])*step+bandwidth*band;}const int lowBits=12;const float lowDivisor=pow(2.0,float(lowBits));const uint lowMask=uint(lowDivisor-1.0);vec2 splitUint(uint value){uint valueLo=value&lowMask;uint valueHi=value-valueLo;return vec2(float(valueHi),float(valueLo));}/***High precision variant of scaleBand for index/locus scales*/float scaleBandHp(uint 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);vec2 splitValue=splitUint(value);float inf=1.0/uZero;float hi=max(splitValue[0]-domainStart[0],-inf);float lo=max(splitValue[1]-domainStart[1],-inf);return dot(vec4(start,hi,lo,bandwidth),vec4(1.0,step,step,band));}/***High precision variant of scaleBand for index/locus scales for large*domains where 32bit uints are not sufficient to represent the domain.*/float scaleBandHp(uvec2 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);vec2 splitValue=vec2(float(value[0])*lowDivisor,float(value[1]));float inf=1.0/uZero;float hi=max(splitValue[0]-domainStart[0],-inf);float lo=max(splitValue[1]-domainStart[1],-inf);return dot(vec4(start,hi,lo,bandwidth),vec4(1.0,step,step,band));}",AD=`/***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;
284
+ };`)(i):function(){i(),i(),i(),i(),i(),i()}}addBatch(t,n,r=0,i=n.length){if(!(i<=r)){this.prepareXIndexer(n,r,i);for(let a=r;a<i;a++){const o=n[a];this.variableBuilder.updateFromDatum(o),this.pushAllSixTimes(),this.addToXIndex(o)}this.registerBatch(t)}}}class vD extends Ks{constructor({encoders:t,attributes:n,tessellationThreshold:r=1/0,visibleRange:i=[-1/0,1/0],numItems:a}){super({encoders:t,attributes:n,numVertices:r==1/0?a*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),this.variableBuilder.configure()}addBatch(t,n,r=0,i=n.length){this.prepareXIndexer(n,r,i);for(let a=r;a<i;a++){const o=n[a];this.variableBuilder.updateFromDatum(o),this.updateSide(-.5),this.updatePos(0),this.variableBuilder.pushAll();const s=1;for(let u=0;u<=s;u++)this.updatePos(u/s),this.updateSide(-.5),this.variableBuilder.pushAll(),this.updateSide(.5),this.variableBuilder.pushAll();this.variableBuilder.pushAll(),this.addToXIndex(o)}this.registerBatch(t)}}class xD extends Ks{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r}),this.variableBuilder.configure()}}class AD extends Ks{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r}),this.variableBuilder.configure()}toArrays(){const t=this.variableBuilder.arrays;for(let n of Object.values(t))n.divisor=1;return super.toArrays()}}class ED extends Ks{constructor({encoders:t,attributes:n,fontMetrics:r,properties:i,numCharacters:a=void 0}){super({encoders:t,attributes:n,numVertices:a*6}),this.metadata=r,this.metrics=r,this.properties=i;const s=t.text.channelDef;this.numberFormat=!on(s)&&"format"in s&&s.format?mt(s.format):u=>u,this.updateVertexCoord=this.variableBuilder.createUpdater("vertexCoord",2),this.updateTextureCoord=this.variableBuilder.createUpdater("textureCoord",2),this.updateWidth=this.variableBuilder.createUpdater("width",1),this.variableBuilder.configure()}addBatch(t,n,r=0,i=n.length){const a=this.properties.align||"left",o=this.properties.logoLetters??!1,s=this.metadata.common.base,u=this.metadata.common.scaleH;let l=-Za;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 c=this.encoders.text.accessor||this.encoders.text,f=[0,0];this.updateVertexCoord(f);const h=[0,0];this.updateTextureCoord(h),this.prepareXIndexer(n,r,i);for(let d=r;d<i;d++){const p=n[d],m=this.numberFormat(c(p)),y=Ue(m)?m:m===null?"":""+m;if(y.length==0)continue;this.variableBuilder.updateFromDatum(p);const w=o?y.length:this.metrics.measureWidth(y);this.updateWidth(w);let A=a=="right"?-w:a=="center"?-w/2:0;if(!o){const I=this.metrics.getCharByCode(y.charCodeAt(0));A-=(I.width-I.xadvance)/s/2}let S=-.5,_=1,T=1;for(let I=0;I<y.length;I++){const B=this.metrics.getCharByCode(y.charCodeAt(I)),R=o?1:B.xadvance/s;if(B.id==32){A+=R;continue}o?(T=(B.width+Za*2)/B.width,A=-T/2,_=(B.height+Za*2)/B.height,S=-.5-Za/B.height):(_=B.height/s,S=-(B.height+B.yoffset+l)/s,T=B.width/s);const M=B.x,G=B.y;f[0]=A,f[1]=S+_,h[0]=M/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=A+T,f[1]=S+_,h[0]=(M+B.width)/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,h[0]=M/u,h[1]=(G+B.height)/u,this.variableBuilder.pushAll(),f[0]=A+T,f[1]=S+_,h[0]=(M+B.width)/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,h[0]=M/u,h[1]=(G+B.height)/u,this.variableBuilder.pushAll(),f[0]=A+T,f[1]=S,h[0]=(M+B.width)/u,h[1]=(G+B.height)/u,this.variableBuilder.pushAll(),A+=R}this.addToXIndex(p)}this.registerBatch(t)}}const ow=`#define PI 3.141593
285
+ 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);}}`,_D="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 scaleIdentity(uint value){return float(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(uint 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+(float(value)-domainExtent[0])*step+bandwidth*band;}const int lowBits=12;const float lowDivisor=pow(2.0,float(lowBits));const uint lowMask=uint(lowDivisor-1.0);vec2 splitUint(uint value){uint valueLo=value&lowMask;uint valueHi=value-valueLo;return vec2(float(valueHi),float(valueLo));}/***High precision variant of scaleBand for index/locus scales*/float scaleBandHp(uint 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);vec2 splitValue=splitUint(value);float inf=1.0/uZero;float hi=max(splitValue[0]-domainStart[0],-inf);float lo=max(splitValue[1]-domainStart[1],-inf);return dot(vec4(start,hi,lo,bandwidth),vec4(1.0,step,step,band));}/***High precision variant of scaleBand for index/locus scales for large*domains where 32bit uints are not sufficient to represent the domain.*/float scaleBandHp(uvec2 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);vec2 splitValue=vec2(float(value[0])*lowDivisor,float(value[1]));float inf=1.0/uZero;float hi=max(splitValue[0]-domainStart[0],-inf);float lo=max(splitValue[1]-domainStart[1],-inf);return dot(vec4(start,hi,lo,bandwidth),vec4(1.0,step,step,band));}",SD=`/***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;
282
286
  #if !defined(SAMPLE_FACET_UNIFORM) && !defined(SAMPLE_FACET_TEXTURE)
283
287
  SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1.0);}
284
288
  #elif defined(SAMPLE_FACET_UNIFORM)
@@ -286,40 +290,40 @@ SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1
286
290
  #elif defined(SAMPLE_FACET_TEXTURE)
287
291
  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);}
288
292
  #endif
289
- 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;}}`,ED=`/**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){
293
+ 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;}}`,CD=`/**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){
290
294
  #ifdef uniqueId_DEFINED
291
295
  int id=int(getScaled_uniqueId());vPickingColor=vec4(ivec4(id>>0,id>>8,id>>16,0xFF)&0xFF)/float(0xFF);
292
296
  #else
293
297
  vPickingColor=vec4(1.0);
294
298
  #endif
295
- return true;}return false;}`,_D="in highp vec4 vPickingColor;",Xc=Symbol("cacheMap");function Kc(e,t,n){let r=Js(e).get(t);return r===void 0&&(r=n(t),Js(e).set(t,r)),r}function SD(e,t){Js(e).delete(t)}function Jc(e,t){const n=Js(e);for(const r of n.keys())r.startsWith(t)&&n.delete(r);Js(e).delete(t)}function aw(e){e[Xc]=new Map}function Js(e){return e[Xc]||aw(e),e[Xc]}function CD(e,t,n,r){const i=Ue(e)?e:e.name,a=!Ue(e)&&e.extent||[0,1];if(n===void 0&&!Ue(e)&&(n=e.count),i){const o=Wd(i);if(Pt(o)){const s=ow(o,{extent:a,count:n});return ef(t,{minMag:t.LINEAR,format:t.RGB,height:1,wrap:t.CLAMP_TO_EDGE},s,r)}else{if(xt(o))return D0(o,t);throw new Error("Unknown scheme: "+i)}}}function kD(e,t="rgb",n,r){const i=Ec(e,Ue(t)?t:t.type,Ue(t)?void 0:t.gamma),a=ow(i);return ef(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},a,r)}function TD(e,t,n,r){const i=Math.max(e.length,n||0),a=new Float32Array(i);for(let o=0;o<i;o++)a[o]=e[o%e.length];return ef(t,{minMag:t.NEAREST,format:t.RED,internalFormat:t.R32F,height:1},a,r)}function D0(e,t,n,r){const i=sw(e,n);return ef(t,{minMag:t.NEAREST,format:t.RGB,height:1},i,r)}function ow(e,{extent:t=[0,1],reverse:n=!1,count:r=256}={}){const i=t[0],a=Es(t)-i,o=Ko(r).map(s=>s/(r-1)).map(s=>i+s/a).map(e);return n&&o.reverse(),sw(o)}function sw(e,t){const n=Math.max(e.length,t||0),r=new Uint8Array(n*3);for(let i=0;i<n;i++){const a=Gr(e[i%e.length]).rgb();r[i*3+0]=a.r,r[i*3+1]=a.g,r[i*3+2]=a.b}return r}class ID{constructor(t,n,r){this._container=t,this._sizeSource=n??(()=>({width:void 0,height:void 0})),this._shaderCache=new Map,this.rangeTextures=new WeakMap;const i=document.createElement("canvas");t.appendChild(i);const a=KB(i,{antialias:!0,depth:!1,premultipliedAlpha:!0});if(!a)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!za(a))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");if(jy(a),a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),this.canvas=i,this.gl=a,this._pickingAttachmentOptions=[{format:a.RGBA,type:a.UNSIGNED_BYTE,minMag:a.LINEAR,wrap:a.CLAMP_TO_EDGE}],this._pickingBufferInfo=qB(a,this._pickingAttachmentOptions),a.bindFramebuffer(a.FRAMEBUFFER,null),this.adjustGl(),this._updateDpr(),this._clearColor=[0,0,0,0],r){const o=Gr(r).rgb();this._clearColor=[o.r/255,o.g/255,o.b/255,o.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;";xt(n)&&(n=n.join(`
299
+ return true;}return false;}`,kD="in highp vec4 vPickingColor;",Xc=Symbol("cacheMap");function Kc(e,t,n){let r=Js(e).get(t);return r===void 0&&(r=n(t),Js(e).set(t,r)),r}function TD(e,t){Js(e).delete(t)}function Jc(e,t){const n=Js(e);for(const r of n.keys())r.startsWith(t)&&n.delete(r);Js(e).delete(t)}function sw(e){e[Xc]=new Map}function Js(e){return e[Xc]||sw(e),e[Xc]}function ID(e,t,n,r){const i=Ue(e)?e:e.name,a=!Ue(e)&&e.extent||[0,1];if(n===void 0&&!Ue(e)&&(n=e.count),i){const o=Wd(i);if(Pt(o)){const s=lw(o,{extent:a,count:n});return ef(t,{minMag:t.LINEAR,format:t.RGB,height:1,wrap:t.CLAMP_TO_EDGE},s,r)}else{if(xt(o))return D0(o,t);throw new Error("Unknown scheme: "+i)}}}function BD(e,t="rgb",n,r){const i=Ec(e,Ue(t)?t:t.type,Ue(t)?void 0:t.gamma),a=lw(i);return ef(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},a,r)}function DD(e,t,n,r){const i=Math.max(e.length,n||0),a=new Float32Array(i);for(let o=0;o<i;o++)a[o]=e[o%e.length];return ef(t,{minMag:t.NEAREST,format:t.RED,internalFormat:t.R32F,height:1},a,r)}function D0(e,t,n,r){const i=uw(e,n);return ef(t,{minMag:t.NEAREST,format:t.RGB,height:1},i,r)}function lw(e,{extent:t=[0,1],reverse:n=!1,count:r=256}={}){const i=t[0],a=Es(t)-i,o=Ko(r).map(s=>s/(r-1)).map(s=>i+s/a).map(e);return n&&o.reverse(),uw(o)}function uw(e,t){const n=Math.max(e.length,t||0),r=new Uint8Array(n*3);for(let i=0;i<n;i++){const a=Gr(e[i%e.length]).rgb();r[i*3+0]=a.r,r[i*3+1]=a.g,r[i*3+2]=a.b}return r}class RD{constructor(t,n,r){this._container=t,this._sizeSource=n??(()=>({width:void 0,height:void 0})),this._shaderCache=new Map,this.rangeTextures=new WeakMap;const i=document.createElement("canvas");t.appendChild(i);const a=tD(i,{antialias:!0,depth:!1,premultipliedAlpha:!0});if(!a)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!za(a))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");if(qy(a),a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),this.canvas=i,this.gl=a,this._pickingAttachmentOptions=[{format:a.RGBA,type:a.UNSIGNED_BYTE,minMag:a.LINEAR,wrap:a.CLAMP_TO_EDGE}],this._pickingBufferInfo=YB(a,this._pickingAttachmentOptions),a.bindFramebuffer(a.FRAMEBUFFER,null),this.adjustGl(),this._updateDpr(),this._clearColor=[0,0,0,0],r){const o=Gr(r).rgb();this._clearColor=[o.r/255,o.g/255,o.b/255,o.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;";xt(n)&&(n=n.join(`
296
300
 
297
301
  `));const a=this.gl,o=n.replaceAll(/ {2,}|^\s*\/\/.*$/gm,"");let s=this._shaderCache.get(o);if(!s){const u=[r,i,n].join(`
298
302
 
299
- `);s=a.createShader(t),a.shaderSource(s,u),a.compileShader(s),this._shaderCache.set(o,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,WB(this.gl,this._pickingBufferInfo,this._pickingAttachmentOptions)}finalize(){this.canvas.remove()}getPhysicalCanvasSize(t){return t=t||this.getLogicalCanvasSize(),{width:t.width*this.dpr,height:t.height*this.dpr}}getLogicalCanvasSize(){if(this._logicalCanvasSize)return this._logicalCanvasSize;const t=this._sizeSource(),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}readPickingPixel(t,n){const r=this.gl;t*=this.dpr,n*=this.dpr;const i=this.getPhysicalCanvasSize().height,a=new Uint8Array(4);return r.bindFramebuffer(r.FRAMEBUFFER,this._pickingBufferInfo.framebuffer),r.readPixels(t,i-n-1,1,1,r.RGBA,r.UNSIGNED_BYTE,a),r.bindFramebuffer(r.FRAMEBUFFER,null),a}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(o,s){return Hn(s.type)?s.domain().length:s.type=="threshold"?s.domain().length+1:s.type=="quantize"||s.type=="quantile"?o??4:o}const a=t.channel;if($r(a)){const o=t.scale,s=o.props,u=o.range();let l;if(s.scheme)if(o.type=="threshold"&&u)l=D0(u,this.gl,o.domain().length,r);else{let c=Ue(s.scheme)?void 0:s.scheme.count;c=i(c,o),l=CD(s.scheme,this.gl,c,r)}else Ac(o.type)||yt(o.type)&&u.length>1?l=kD(u,s.interpolate,this.gl,r):l=D0(u,this.gl,o.domain().length,r);this.rangeTextures.set(t,l)}else{const o=t.scale;if(o.type==="ordinal"||Ui(o.type)){const s=kc(a)?B2(a):l=>l,u=o.range();this.rangeTextures.set(t,TD(u.map(s),this.gl,o.domain().length,r))}}}}function BD(e,t="",n=0){const r=/ERROR:\s*\d+:(\d+)/gi,i=[...t.matchAll(r)],a=new Map(i.map((o,s)=>{const u=parseInt(o[1]),l=i[s+1],c=l?l.index:t.length,f=t.substring(o.index,c);return[u-1,f]}));return e.split(`
303
+ `);s=a.createShader(t),a.shaderSource(s,u),a.compileShader(s),this._shaderCache.set(o,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,QB(this.gl,this._pickingBufferInfo,this._pickingAttachmentOptions)}finalize(){this.canvas.remove()}getPhysicalCanvasSize(t){return t=t||this.getLogicalCanvasSize(),{width:t.width*this.dpr,height:t.height*this.dpr}}getLogicalCanvasSize(){if(this._logicalCanvasSize)return this._logicalCanvasSize;const t=this._sizeSource(),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}readPickingPixel(t,n){const r=this.gl;t*=this.dpr,n*=this.dpr;const i=this.getPhysicalCanvasSize().height,a=new Uint8Array(4);return r.bindFramebuffer(r.FRAMEBUFFER,this._pickingBufferInfo.framebuffer),r.readPixels(t,i-n-1,1,1,r.RGBA,r.UNSIGNED_BYTE,a),r.bindFramebuffer(r.FRAMEBUFFER,null),a}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(o,s){return Hn(s.type)?s.domain().length:s.type=="threshold"?s.domain().length+1:s.type=="quantize"||s.type=="quantile"?o??4:o}const a=t.channel;if($r(a)){const o=t.scale,s=o.props,u=o.range();let l;if(s.scheme)if(o.type=="threshold"&&u)l=D0(u,this.gl,o.domain().length,r);else{let c=Ue(s.scheme)?void 0:s.scheme.count;c=i(c,o),l=ID(s.scheme,this.gl,c,r)}else Ac(o.type)||yt(o.type)&&u.length>1?l=BD(u,s.interpolate,this.gl,r):l=D0(u,this.gl,o.domain().length,r);this.rangeTextures.set(t,l)}else{const o=t.scale;if(o.type==="ordinal"||Ui(o.type)){const s=kc(a)?R2(a):l=>l,u=o.range();this.rangeTextures.set(t,DD(u.map(s),this.gl,o.domain().length,r))}}}}function FD(e,t="",n=0){const r=/ERROR:\s*\d+:(\d+)/gi,i=[...t.matchAll(r)],a=new Map(i.map((o,s)=>{const u=parseInt(o[1]),l=i[s+1],c=l?l.index:t.length,f=t.substring(o.index,c);return[u-1,f]}));return e.split(`
300
304
  `).map((o,s)=>{const u=a.get(s);return`${s+1+n}: ${o}${u?`
301
305
 
302
306
  ^^^ ${u}`:""}`}).join(`
303
- `)}function DD(e,t,n){const r=e.createProgram();e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r);function i(){let a,o;if(!e.getProgramParameter(r,e.LINK_STATUS)){a=e.getProgramInfoLog(r);for(const u of[t,n])e.getShaderParameter(u,e.COMPILE_STATUS)||(a=e.getShaderInfoLog(u),o=BD(e.getShaderSource(u),a,0)+`
304
- Error compiling: ${a}`,e.deleteShader(u));e.deleteProgram(r)}if(a)return{message:a,detail:o}}return{program:r,getProgramErrors:i}}function ef(e,t,n,r){return r?oy(e,r,n,t):r=Qs(e,{...t,src:n}),r}function lw(...e){const t={get(n,r,i){for(const a of e){const s=a()[r];if(s!==void 0)return s}},has(n,r,i){for(const a of e){const o=a();if(r in o)return!0}return!1}};return new Proxy({},t)}function RD(e){return Ue(e)||Tt(e)||Yo(e)}class Zi extends Error{constructor(t,n){super(t),this.name="ViewError",this.view=n}}const FD="SAMPLE_FACET_UNIFORM",uw="SAMPLE_FACET_TEXTURE";class el{constructor(t){K(this,xr,[]);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 MD,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=lw(typeof this.unitView.spec.mark=="object"?()=>this.unitView.spec.mark:()=>({}),()=>this.defaultProperties)}get opaque(){return!1}getAttributes(){throw new Error("Not implemented!")}getSupportedChannels(){return["sample","facetIndex","x","y","color","opacity","search","uniqueId"]}getDefaultEncoding(){const t={sample:void 0,uniqueId:void 0};return this.isPickingParticipant()&&(t.uniqueId={field:"_uniqueId"}),t}fixEncoding(t){return t}setupExprRefsNeedingGraphicsUpdate(t){const n=this.getSupportedChannels(),r={};for(const a of t){const o=this.properties[a];if(o&&It(o)){const s=this.unitView.paramMediator.createExpression(o.expr);s.addListener(()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()}),n.includes(a)||Object.defineProperty(r,a,{get(){return s()}})}}const i=this.properties;this.properties=lw(()=>r,()=>i)}get encoding(){return Kc(this,"encoding",()=>{var o;const t=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=s=>{const u=this.properties[s];return RD(u)||It(u)?{value:u}:void 0},i=Object.fromEntries(this.getSupportedChannels().map(s=>[s,r(s)]).filter(s=>rn(s[1]))),a=this.fixEncoding({...t,...i,...n});for(const s of Object.keys(a))this.getSupportedChannels().includes(s)||delete a[s];return a.x&&((o=a.x).buildIndex??(o.buildIndex=!0)),a})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=ik(this)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return uw;if(this.unitView.getLayoutAncestors().find(t=>"samples"in t.spec))return FD}createAndLinkShaders(t,n,r=[]){const i=this.getAttributes(),a="// view: "+this.unitView.getPathString();let o=[];const s=new Set,u=Jy(this.encoders),l=this.getSampleFacetMode();l&&r.push(`#define ${l}`);const c=[];for(const y of i){let w;if(y in this.encoding)w=y;else continue;const A=this.encoding[w];if(A)if(rn(A))if(It(A.value)){const{uniformName:S,uniformGlsl:_,scaleGlsl:T,adjuster:I}=oD(w);o.push(T),c.push(_),W(this,xr).push(()=>{this.registerMarkUniformValue(S,A.value,I)})}else o.push(aD(w,A.value));else{const S=Zt(A)&&A.resolutionChannel||w,_=Na(S)?this.unitView.getScaleResolution(S):null,T=Gi(A)?u.get([A.field,!0]):[w],I=sD(w,_,A,T!=null&&T.includes(w)?T:[w]);if(o.push(I.glsl),c.push(I.domainUniform),c.push(I.rangeUniform),s.add(I.attributeGlsl),I.rangeUniform&&W(this,xr).push(()=>{const B=this.createMarkUniformSetter(I.rangeName),R=()=>B(tw(_.scale,w));_.addEventListener("range",R),R()}),I.markUniformGlsl){if(!Hs(A))throw new Error("Bug!");const B=this.encoders[w],R=B.indexer,G=Qc(B.scale.type)&&k0(B.scale.domain()),N=R||(G?Ky:re=>+re);c.push(I.markUniformGlsl),W(this,xr).push(()=>{this.registerMarkUniformValue(I.attributeName,A.datum,N)})}I.domainUniform&&W(this,xr).push(()=>{const B=this.createMarkUniformSetter(I.domainUniformName),R=_.scale,M=()=>{const G=Hn(R.type)?[0,R.domain().length]:R.domain();B(Qc(R.type)?fD(G):G)};_.addEventListener("domain",M),M()})}}const f=`precision highp float;
307
+ `)}function MD(e,t,n){const r=e.createProgram();e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r);function i(){let a,o;if(!e.getProgramParameter(r,e.LINK_STATUS)){a=e.getProgramInfoLog(r);for(const u of[t,n])e.getShaderParameter(u,e.COMPILE_STATUS)||(a=e.getShaderInfoLog(u),o=FD(e.getShaderSource(u),a,0)+`
308
+ Error compiling: ${a}`,e.deleteShader(u));e.deleteProgram(r)}if(a)return{message:a,detail:o}}return{program:r,getProgramErrors:i}}function ef(e,t,n,r){return r?ly(e,r,n,t):r=Qs(e,{...t,src:n}),r}function cw(...e){const t={get(n,r,i){for(const a of e){const s=a()[r];if(s!==void 0)return s}},has(n,r,i){for(const a of e){const o=a();if(r in o)return!0}return!1}};return new Proxy({},t)}function PD(e){return Ue(e)||Tt(e)||Yo(e)}class Zi extends Error{constructor(t,n){super(t),this.name="ViewError",this.view=n}}const LD="SAMPLE_FACET_UNIFORM",fw="SAMPLE_FACET_TEXTURE";class el{constructor(t){K(this,xr,[]);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 OD,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=cw(typeof this.unitView.spec.mark=="object"?()=>this.unitView.spec.mark:()=>({}),()=>this.defaultProperties)}get opaque(){return!1}getAttributes(){throw new Error("Not implemented!")}getSupportedChannels(){return["sample","facetIndex","x","y","color","opacity","search","uniqueId"]}getDefaultEncoding(){const t={sample:void 0,uniqueId:void 0};return this.isPickingParticipant()&&(t.uniqueId={field:"_uniqueId"}),t}fixEncoding(t){return t}setupExprRefsNeedingGraphicsUpdate(t){const n=this.getSupportedChannels(),r={};for(const a of t){const o=this.properties[a];if(o&&It(o)){const s=this.unitView.paramMediator.createExpression(o.expr);s.addListener(()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()}),n.includes(a)||Object.defineProperty(r,a,{get(){return s()}})}}const i=this.properties;this.properties=cw(()=>r,()=>i)}get encoding(){return Kc(this,"encoding",()=>{var o;const t=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=s=>{const u=this.properties[s];return PD(u)||It(u)?{value:u}:void 0},i=Object.fromEntries(this.getSupportedChannels().map(s=>[s,r(s)]).filter(s=>on(s[1]))),a=this.fixEncoding({...t,...i,...n});for(const s of Object.keys(a))this.getSupportedChannels().includes(s)||delete a[s];return a.x&&((o=a.x).buildIndex??(o.buildIndex=!0)),a})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=sk(this)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return fw;if(this.unitView.getLayoutAncestors().find(t=>"samples"in t.spec))return LD}createAndLinkShaders(t,n,r=[]){const i=this.getAttributes(),a="// view: "+this.unitView.getPathString();let o=[];const s=new Set,u=tw(this.encoders),l=this.getSampleFacetMode();l&&r.push(`#define ${l}`);const c=[];for(const y of i){let w;if(y in this.encoding)w=y;else continue;const A=this.encoding[w];if(A)if(on(A))if(It(A.value)){const{uniformName:S,uniformGlsl:_,scaleGlsl:T,adjuster:I}=uD(w);o.push(T),c.push(_),W(this,xr).push(()=>{this.registerMarkUniformValue(S,A.value,I)})}else o.push(lD(w,A.value));else{const S=Yt(A)&&A.resolutionChannel||w,_=Na(S)?this.unitView.getScaleResolution(S):null,T=Gi(A)?u.get([A.field,!0]):[w],I=cD(w,_,A,T!=null&&T.includes(w)?T:[w]);if(o.push(I.glsl),c.push(I.domainUniform),c.push(I.rangeUniform),s.add(I.attributeGlsl),I.rangeUniform&&W(this,xr).push(()=>{const B=this.createMarkUniformSetter(I.rangeName),R=()=>B(rw(_.scale,w));_.addEventListener("range",R),R()}),I.markUniformGlsl){if(!Hs(A))throw new Error("Bug!");const B=this.encoders[w],R=B.indexer,G=Qc(B.scale.type)&&k0(B.scale.domain()),N=R||(G?ew:re=>+re);c.push(I.markUniformGlsl),W(this,xr).push(()=>{this.registerMarkUniformValue(I.attributeName,A.datum,N)})}I.domainUniform&&W(this,xr).push(()=>{const B=this.createMarkUniformSetter(I.domainUniformName),R=_.scale,M=()=>{const G=Hn(R.type)?[0,R.domain().length]:R.domain();B(Qc(R.type)?pD(G):G)};_.addEventListener("domain",M),M()})}}const f=`precision highp float;
305
309
  precision highp int;`,h=y=>y.replace("#pragma markUniforms",c.join(`
306
- `));r=r.map(h),t=h(t),n=h(n);const d=[f,a,...r,iw,xD,[...s].join(`
307
- `),...o,AD,ED,t],p=[f,a,...r,iw,_D,n],m=this.gl;this.programStatus=DD(m,this.glHelper.compileShader(m.VERTEX_SHADER,d),this.glHelper.compileShader(m.FRAGMENT_SHADER,p))}finalizeGraphicsInitialization(){const t=this.programStatus.getProgramErrors();if(t){t.detail&&console.warn(t.detail);const n=new Error("Cannot create shader program: "+t.message);throw n.view=this.unitView,n}this.programInfo=IB(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=Fy(this.gl,this.programInfo,"View"),this.markUniformInfo=Fy(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),Wa(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of W(this,xr))n();Fe(this,xr,void 0)}createMarkUniformSetter(t){const n=this.markUniformInfo.setters[t];if(!n)throw new Error(`Uniform "${t}" not found int the Mark block!`);return r=>{n(r),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(t,n,r=i=>i){const i=this.createMarkUniformSetter(t),a=o=>{if(o==null)throw new Error(`Trying to set null/undefined value for uniform: ${t}${It(n)?`Expr: ${n.expr}`:""}`);i(o)};if(It(n)){const o=this.unitView.paramMediator.createExpression(n.expr),s=()=>a(r(o(null)));o.addListener(s),s()}else a(r(n))}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&&Hk(this.gl,this.bufferInfo.attribs[n],r.data,0);else this.deleteGraphicsData(),this.bufferInfo=$k(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?(Py(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):My(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(t){const n=this.glHelper,r=this.gl,i=[];i.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=ZB(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[o,s]of Object.entries(this.encoding))if(Zt(s)){const u=Zt(s)&&s.resolutionChannel||o;if(Na(u)){const l=this.unitView.getScaleResolution(u),c=n.rangeTextures.get(l);c&&i.push(()=>Wa(this.programInfo,{[C0+o]:c}))}}this.getSampleFacetMode()==uw&&i.push(()=>{let o;for(const s of this.unitView.getLayoutAncestors())if(o=s.getSampleFacetTexture(),o)break;if(!o)throw new Error("No facet texture available. This is bug.");Wa(this.programInfo,{uSampleFacetTexture:o})});const a=(t.picking??!1)&&this.isPickingParticipant();return i.push(()=>Xs(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:a})),this.opaque||t.picking?i.push(()=>r.disable(r.BLEND)):i.push(()=>r.enable(r.BLEND)),i}prepareSampleFacetRendering(t){const n=t.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(n&&r){const i=n.locSize?n.locSize.location:0,a=n.locSize?n.locSize.size:1;if(i>1||i+a<0)return!1;const o=n.targetLocSize?n.targetLocSize.location:i,s=n.targetLocSize?n.targetLocSize.size:a;this.gl.uniform4f(r.location,i,a,o,s)}return!0}render(t){}createRenderCallback(t,n){var f;if(!this.bufferInfo)throw new Zi(`${this.getType()} mark has no data. This is bug.`,this.unitView);const r=this;let i;const a=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,o=a&&yt(a.type),s=["index","locus"].includes(a==null?void 0:a.type)?-1:0,u=[0,0];i=h=>{if(o&&h.xIndex){const d=a.domain(),p=h.xIndex(d[0]+s,d[1],u),m=p[0],y=p[1]-m;y>0&&t(m,y)}else t(h.offset,h.count)};const l=this.rangeMap.get(void 0).count==0?n.facetId:void 0,c=this.rangeMap.get(l);return n.sampleFacetRenderingOptions?function(){c.count&&r.prepareSampleFacetRendering(n)&&i(c)}:function(){c.count&&i(c)}}setViewport(t,n){t=t.flatten();const r=this.unitView.context.devicePixelRatio,i=this.gl,a=this.properties,o=this.glHelper.getLogicalCanvasSize(),s=.5,u=(a.xOffset??0)+s,l=(a.yOffset??0)+s;let c,f=t;if(a.clip!=="never"&&(a.clip||n)){let h=0,d=0,p;if(n){if(f=t.intersect(n).flatten(),!f.isDefined())return!1;p=[t.width/f.width,t.height/f.height],d=Math.max(0,t.y2-n.y2),h=Math.min(0,t.x-n.x)}else p=[1,1];const m=[f.x,o.height-f.y2,f.width,f.height].map(S=>S*r),y=m.map(S=>Math.round(S)),[w,A]=m.map((S,_)=>S-y[_]);i.viewport(...y),i.scissor(...y),i.enable(i.SCISSOR_TEST),c={uViewOffset:[(u+h+w/r)/f.width,-(l+d-A/r)/f.height],uViewScale:p}}else{if(!t.isDefined())return!1;i.viewport(0,0,o.width*r,o.height*r),i.disable(i.SCISSOR_TEST),c={uViewOffset:[(t.x+u)/o.width,(o.height-t.y-l-t.height)/o.height],uViewScale:[t.width/o.width,t.height/o.height]}}return Xs(this.viewUniformInfo,{...c,uViewportSize:[t.width,t.height],uDevicePixelRatio:r}),Py(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(t,n){}}xr=new WeakMap;class MD extends Rr{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 R0(e,t){const n=lk(t);let r=e[t]&&{...e[t]},i=e[n]&&{...e[n]};if(!(rn(r)||rn(i))){if(r){if(!Zt(e[t]))return;if(i){if(r.type!="quantitative"){const a=(1-(r.band||1))/2;r.band=a,i.band=-a}}else if(r.type=="quantitative")i={datum:0};else{i={...r};const a=(1-(r.band??1))/2;r.band=0+a,i.band=1-a}}else r={value:0},i={value:1};e[t]=r,e[n]=i}}function cw(e,t){e.stroke||(t?e.stroke={value:null}:e.stroke={resolutionChannel:"color",...e.color}),rn(e.stroke)&&e.stroke.value===null&&(e.strokeWidth={value:0}),e.strokeOpacity||(e.strokeOpacity={resolutionChannel:"opacity",...e.opacity})}function fw(e,t){rn(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 PD extends el{constructor(n){super(n);K(this,tu);K(this,nu);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 Kc(this,"opaque",()=>!J(this,tu,fm).call(this)&&!J(this,nu,hm).call(this)&&rn(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return R0(n,"x"),R0(n,"y"),cw(n,this.properties.filled),fw(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];J(this,tu,fm).call(this)&&n.push("ROUNDED_CORNERS"),J(this,nu,hm).call(this)&&n.push("STROKED"),this.createAndLinkShaders(JB,eD,[tD,...n.map(r=>"#define "+r)])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uMinWidth",n.minWidth),this.registerMarkUniformValue("uMinHeight",n.minHeight),this.registerMarkUniformValue("uMinOpacity",n.minOpacity),this.registerMarkUniformValue("uCornerRadiusTopRight",n.cornerRadiusTopRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomRight",n.cornerRadiusBottomRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusTopLeft",n.cornerRadiusTopLeft??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomLeft",n.cornerRadiusBottomLeft??n.cornerRadius??0)}updateGraphicsData(){const n=this.unitView.getCollector(),r=n.getItemCount(),i=new mD({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});i.addBatches(n.facetBatches);const a=i.toArrays();this.rangeMap.migrateEntries(a.rangeMap),this.updateBufferInfo(a)}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>$i(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,a)=>{Zc(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,a,i)},n)}findDatumAt(n,r){n=Ot(n);const i=this.unitView.getCollector().facetBatches.get(n);if(!i)return;const a=this.encoders,o=a.x.scale.type;if(Hn(o)){const s=a.x.accessor;return i.find(u=>r==s(u))}else{const s=a.x.accessor,u=a.x2.accessor;return i.find(l=>r>=s(l)&&r<u(l))}}}tu=new WeakSet,fm=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},nu=new WeakSet,hm=function(){const n=this.encoding.strokeWidth;return!(rn(n)&&!n.value)};const LD=`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;}vec2 getDxDy(){
310
+ `));r=r.map(h),t=h(t),n=h(n);const d=[f,a,...r,ow,_D,[...s].join(`
311
+ `),...o,SD,CD,t],p=[f,a,...r,ow,kD,n],m=this.gl;this.programStatus=MD(m,this.glHelper.compileShader(m.VERTEX_SHADER,d),this.glHelper.compileShader(m.FRAGMENT_SHADER,p))}finalizeGraphicsInitialization(){const t=this.programStatus.getProgramErrors();if(t){t.detail&&console.warn(t.detail);const n=new Error("Cannot create shader program: "+t.message);throw n.view=this.unitView,n}this.programInfo=RB(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=Py(this.gl,this.programInfo,"View"),this.markUniformInfo=Py(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),Wa(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of W(this,xr))n();Fe(this,xr,void 0)}createMarkUniformSetter(t){const n=this.markUniformInfo.setters[t];if(!n)throw new Error(`Uniform "${t}" not found int the Mark block!`);return r=>{n(r),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(t,n,r=i=>i){const i=this.createMarkUniformSetter(t),a=o=>{if(o==null)throw new Error(`Trying to set null/undefined value for uniform: ${t}${It(n)?`Expr: ${n.expr}`:""}`);i(o)};if(It(n)){const o=this.unitView.paramMediator.createExpression(n.expr),s=()=>a(r(o(null)));o.addListener(s),s()}else a(r(n))}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&&$k(this.gl,this.bufferInfo.attribs[n],r.data,0);else this.deleteGraphicsData(),this.bufferInfo=Zk(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?(Oy(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):Ly(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(t){const n=this.glHelper,r=this.gl,i=[];i.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=XB(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[o,s]of Object.entries(this.encoding))if(Yt(s)){const u=Yt(s)&&s.resolutionChannel||o;if(Na(u)){const l=this.unitView.getScaleResolution(u),c=n.rangeTextures.get(l);c&&i.push(()=>Wa(this.programInfo,{[C0+o]:c}))}}this.getSampleFacetMode()==fw&&i.push(()=>{let o;for(const s of this.unitView.getLayoutAncestors())if(o=s.getSampleFacetTexture(),o)break;if(!o)throw new Error("No facet texture available. This is bug.");Wa(this.programInfo,{uSampleFacetTexture:o})});const a=(t.picking??!1)&&this.isPickingParticipant();return i.push(()=>Xs(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:a})),this.opaque||t.picking?i.push(()=>r.disable(r.BLEND)):i.push(()=>r.enable(r.BLEND)),i}prepareSampleFacetRendering(t){const n=t.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(n&&r){const i=n.locSize?n.locSize.location:0,a=n.locSize?n.locSize.size:1;if(i>1||i+a<0)return!1;const o=n.targetLocSize?n.targetLocSize.location:i,s=n.targetLocSize?n.targetLocSize.size:a;this.gl.uniform4f(r.location,i,a,o,s)}return!0}render(t){}createRenderCallback(t,n){var f;if(!this.bufferInfo)throw new Zi(`${this.getType()} mark has no data. This is bug.`,this.unitView);const r=this;let i;const a=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,o=a&&yt(a.type),s=["index","locus"].includes(a==null?void 0:a.type)?-1:0,u=[0,0];i=h=>{if(o&&h.xIndex){const d=a.domain(),p=h.xIndex(d[0]+s,d[1],u),m=p[0],y=p[1]-m;y>0&&t(m,y)}else t(h.offset,h.count)};const l=this.rangeMap.get(void 0).count==0?n.facetId:void 0,c=this.rangeMap.get(l);return n.sampleFacetRenderingOptions?function(){c.count&&r.prepareSampleFacetRendering(n)&&i(c)}:function(){c.count&&i(c)}}setViewport(t,n){t=t.flatten();const r=this.unitView.context.devicePixelRatio,i=this.gl,a=this.properties,o=this.glHelper.getLogicalCanvasSize(),s=.5,u=(a.xOffset??0)+s,l=(a.yOffset??0)+s;let c,f=t;if(a.clip!=="never"&&(a.clip||n)){let h=0,d=0,p;if(n){if(f=t.intersect(n).flatten(),!f.isDefined())return!1;p=[t.width/f.width,t.height/f.height],d=Math.max(0,t.y2-n.y2),h=Math.min(0,t.x-n.x)}else p=[1,1];const m=[f.x,o.height-f.y2,f.width,f.height].map(S=>S*r),y=m.map(S=>Math.round(S)),[w,A]=m.map((S,_)=>S-y[_]);i.viewport(...y),i.scissor(...y),i.enable(i.SCISSOR_TEST),c={uViewOffset:[(u+h+w/r)/f.width,-(l+d-A/r)/f.height],uViewScale:p}}else{if(!t.isDefined())return!1;i.viewport(0,0,o.width*r,o.height*r),i.disable(i.SCISSOR_TEST),c={uViewOffset:[(t.x+u)/o.width,(o.height-t.y-l-t.height)/o.height],uViewScale:[t.width/o.width,t.height/o.height]}}return Xs(this.viewUniformInfo,{...c,uViewportSize:[t.width,t.height],uDevicePixelRatio:r}),Oy(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(t,n){}}xr=new WeakMap;class OD extends Rr{constructor(){super([],JSON.stringify)}get(t){let n=super.get(t);return n===void 0&&(n={offset:0,count:0,xIndex:void 0},super.set(t,n)),n}migrateEntries(t){for(const[n,r]of this.entries())t.has(n)||(r.offset=0,r.count=0,r.xIndex=void 0);for(const[n,r]of t.entries())Object.assign(this.get(n),r)}}function R0(e,t){const n=fk(t);let r=e[t]&&{...e[t]},i=e[n]&&{...e[n]};if(!(on(r)||on(i))){if(r){if(!Yt(e[t]))return;if(i){if(r.type!="quantitative"){const a=(1-(r.band||1))/2;r.band=a,i.band=-a}}else if(r.type=="quantitative")i={datum:0};else{i={...r};const a=(1-(r.band??1))/2;r.band=0+a,i.band=1-a}}else r={value:0},i={value:1};e[t]=r,e[n]=i}}function hw(e,t){e.stroke||(t?e.stroke={value:null}:e.stroke={resolutionChannel:"color",...e.color}),on(e.stroke)&&e.stroke.value===null&&(e.strokeWidth={value:0}),e.strokeOpacity||(e.strokeOpacity={resolutionChannel:"opacity",...e.opacity})}function dw(e,t){on(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 ND extends el{constructor(n){super(n);K(this,tu);K(this,nu);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 Kc(this,"opaque",()=>!J(this,tu,fm).call(this)&&!J(this,nu,hm).call(this)&&on(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return R0(n,"x"),R0(n,"y"),hw(n,this.properties.filled),dw(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];J(this,tu,fm).call(this)&&n.push("ROUNDED_CORNERS"),J(this,nu,hm).call(this)&&n.push("STROKED"),this.createAndLinkShaders(nD,rD,[iD,...n.map(r=>"#define "+r)])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uMinWidth",n.minWidth),this.registerMarkUniformValue("uMinHeight",n.minHeight),this.registerMarkUniformValue("uMinOpacity",n.minOpacity),this.registerMarkUniformValue("uCornerRadiusTopRight",n.cornerRadiusTopRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomRight",n.cornerRadiusBottomRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusTopLeft",n.cornerRadiusTopLeft??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomLeft",n.cornerRadiusBottomLeft??n.cornerRadius??0)}updateGraphicsData(){const n=this.unitView.getCollector(),r=n.getItemCount(),i=new wD({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});i.addBatches(n.facetBatches);const a=i.toArrays();this.rangeMap.migrateEntries(a.rangeMap),this.updateBufferInfo(a)}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>$i(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,a)=>{Zc(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,a,i)},n)}findDatumAt(n,r){n=Ot(n);const i=this.unitView.getCollector().facetBatches.get(n);if(!i)return;const a=this.encoders,o=a.x.scale.type;if(Hn(o)){const s=a.x.accessor;return i.find(u=>r==s(u))}else{const s=a.x.accessor,u=a.x2.accessor;return i.find(l=>r>=s(l)&&r<u(l))}}}tu=new WeakSet,fm=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},nu=new WeakSet,hm=function(){const n=this.encoding.strokeWidth;return!(on(n)&&!n.value)};const zD=`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;}vec2 getDxDy(){
308
312
  #if defined(dx_DEFINED) || defined(dy_DEFINED)
309
313
  return vec2(getScaled_dx(),getScaled_dy())/uViewportSize;
310
314
  #else
311
315
  return vec2(0.0,0.0);
312
316
  #endif
313
- }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;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();}`,OD="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;}}",ND=`layout(std140)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 mediump float uScaleFactor;uniform mediump float uZoomLevel;uniform highp float uSemanticThreshold;uniform mediump float uGradientStrength;
317
+ }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;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();}`,UD="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;}}",GD=`layout(std140)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 mediump float uScaleFactor;uniform mediump float uZoomLevel;uniform highp float uSemanticThreshold;uniform mediump float uGradientStrength;
314
318
  #pragma markUniforms
315
- };`,$n=1,Kr=2,F0=4,zD={};class et{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",Ko(this.children.length).map(t=>`const child${t} = children[${t}];`).join(`
319
+ };`,$n=1,Kr=2,F0=4;class tt{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",Ko(this.children.length).map(t=>`const child${t} = children[${t}];`).join(`
316
320
  `)+`return function propagate(datum) {${Ko(this.children.length).map(t=>`child${t}.handle(datum);`).join(`
317
321
  `)}}`)(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:"")??""}
318
- ${n}`}getGlobalObject(){return this.parent?this.parent.getGlobalObject():zD}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 hw(e){return e.type=="file"}function UD(e){return e.type=="facet"}class dw extends et{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 GD(e,t,n){const r=new dw({type:"sample",size:e});for(const i of t)r.handle(n(i));return r.complete(),r.reservoir}const HD={};class VD extends el{constructor(n){super(n);K(this,Fo,()=>0);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}));const r=this.properties.semanticZoomFraction;if(r!=null)if(It(r)){const i=this.unitView.paramMediator.createExpression(r.expr);i.addListener(()=>this.getContext().animator.requestRender()),Fe(this,Fo,i)}else Fe(this,Fo,()=>r)}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(),...HD}}fixEncoding(n){return cw(n,this.properties.filled),fw(n,this.properties.filled),delete n.color,delete n.opacity,n}initializeData(){super.initializeData();const n=this.unitView.getAccessor("semanticScore");n&&(this.sampledSemanticScores=Float32Array.from(GD(1e4,this.unitView.getCollector().getData(),n)),this.sampledSemanticScores.sort((r,i)=>r-i))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(LD,OD,[ND])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uInwardStroke",n.inwardStroke,r=>!!r),this.registerMarkUniformValue("uGradientStrength",n.fillGradientStrength)}updateGraphicsData(){const n=this.unitView.getCollector(),r=n.getItemCount(),i=new yD({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(r,this.properties.minBufferSize||0)});i.addBatches(n.facetBatches);const a=i.toArrays();this.rangeMap.migrateEntries(a.rangeMap),this.updateBufferInfo(a)}_getGeometricScaleFactor(){const n=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/n),1/3)}getSemanticThreshold(){if(this.sampledSemanticScores){const n=Math.max(0,1-W(this,Fo).call(this)*this.unitView.getZoomLevel());if(n<=0)return-1/0;if(n>=1)return 1/0;{const r=this.sampledSemanticScores;return Vm(r,n)}}else return-1}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>{Xs(this.markUniformInfo,{uScaleFactor:this._getGeometricScaleFactor(),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>$i(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,a)=>{a&&Zc(r,this.vertexArrayInfo,r.POINTS,a,i)},n)}}Fo=new WeakMap;const jD="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();}",$D="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;}}",qD=`layout(std140)uniform Mark{uniform mediump float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;uniform mediump float uStrokeDashOffset;
322
+ ${n}`}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)}get paramMediator(){if(!this.parent)throw new Error("Cannot find paramMediator!");return this.parent.paramMediator}repropagate(){if(this.parent)this.parent.repropagate();else throw new Error("Cannot repropagate data, no FlowNode with stored data found!")}_propagate(t){}}function pw(e){return e.type=="file"}function HD(e){return e.type=="facet"}class gw extends tt{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 VD(e,t,n){const r=new gw({type:"sample",size:e});for(const i of t)r.handle(n(i));return r.complete(),r.reservoir}const jD={};class $D extends el{constructor(n){super(n);K(this,Fo,()=>0);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}));const r=this.properties.semanticZoomFraction;if(r!=null)if(It(r)){const i=this.unitView.paramMediator.createExpression(r.expr);i.addListener(()=>this.getContext().animator.requestRender()),Fe(this,Fo,i)}else Fe(this,Fo,()=>r)}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(),...jD}}fixEncoding(n){return hw(n,this.properties.filled),dw(n,this.properties.filled),delete n.color,delete n.opacity,n}initializeData(){super.initializeData();const n=this.unitView.getAccessor("semanticScore");n&&(this.sampledSemanticScores=Float32Array.from(VD(1e4,this.unitView.getCollector().getData(),n)),this.sampledSemanticScores.sort((r,i)=>r-i))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(zD,UD,[GD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uInwardStroke",n.inwardStroke,r=>!!r),this.registerMarkUniformValue("uGradientStrength",n.fillGradientStrength)}updateGraphicsData(){const n=this.unitView.getCollector(),r=n.getItemCount(),i=new xD({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(r,this.properties.minBufferSize||0)});i.addBatches(n.facetBatches);const a=i.toArrays();this.rangeMap.migrateEntries(a.rangeMap),this.updateBufferInfo(a)}_getGeometricScaleFactor(){const n=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/n),1/3)}getSemanticThreshold(){if(this.sampledSemanticScores){const n=Math.max(0,1-W(this,Fo).call(this)*this.unitView.getZoomLevel());if(n<=0)return-1/0;if(n>=1)return 1/0;{const r=this.sampledSemanticScores;return jm(r,n)}}else return-1}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>{Xs(this.markUniformInfo,{uScaleFactor:this._getGeometricScaleFactor(),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>$i(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,a)=>{a&&Zc(r,this.vertexArrayInfo,r.POINTS,a,i)},n)}}Fo=new WeakMap;const qD="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();}",WD="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;}}",ZD=`layout(std140)uniform Mark{uniform mediump float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;uniform mediump float uStrokeDashOffset;
319
323
  #pragma markUniforms
320
- };`;class WD extends el{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&&Zt(t.y)&&t.y.type=="quantitative")t.x2=t.x,t.y2={datum:0};else if(!t.y2&&Zt(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=ZD(this.properties.strokeDash);this.dashTexture=Qs(t,{mag:t.NEAREST,min:t.NEAREST,internalFormat:t.R8,format:t.RED,src:n,height:1}),this.dashTextureSize=n.length}this.createAndLinkShaders(jD,$D,[qD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uMinLength",t.minLength),this.registerMarkUniformValue("uStrokeCap",t.strokeCap??"butt",n=>["butt","square","round"].indexOf(n)),Xs(this.markUniformInfo,{uDashTextureSize:+this.dashTextureSize}),this.markUniformsAltered=!0}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new bD({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(()=>Wa(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>$i(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Zc(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,i,r),t)}}function ZD(e){if(e.length==0||e.length%2||e.findIndex(a=>Math.round(a)!=a||a<1||a>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(e));const t=e.reduce((a,o)=>a+o),n=new Uint8Array(t);let r=!0,i=0;for(let a of e){for(;a;)n[i++]=r&&255||0,a--;r=!r}return n}const YD="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();}",QD="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;}}",XD=`layout(std140)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;
324
+ };`;class YD extends el{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&&Yt(t.y)&&t.y.type=="quantitative")t.x2=t.x,t.y2={datum:0};else if(!t.y2&&Yt(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=QD(this.properties.strokeDash);this.dashTexture=Qs(t,{mag:t.NEAREST,min:t.NEAREST,internalFormat:t.R8,format:t.RED,src:n,height:1}),this.dashTextureSize=n.length}this.createAndLinkShaders(qD,WD,[ZD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uMinLength",t.minLength),this.registerMarkUniformValue("uStrokeCap",t.strokeCap??"butt",n=>["butt","square","round"].indexOf(n)),Xs(this.markUniformInfo,{uDashTextureSize:+this.dashTextureSize}),this.markUniformsAltered=!0}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new vD({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(()=>Wa(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>$i(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Zc(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,i,r),t)}}function QD(e){if(e.length==0||e.length%2||e.findIndex(a=>Math.round(a)!=a||a<1||a>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(e));const t=e.reduce((a,o)=>a+o),n=new Uint8Array(t);let r=!0,i=0;for(let a of e){for(;a;)n[i++]=r&&255||0,a--;r=!r}return n}const XD="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();}",KD="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;}}",JD=`layout(std140)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;
321
325
  #pragma markUniforms
322
- };`,KD=["arc","dome","diagonal","line"],JD=["vertical","horizontal"];class eR extends el{constructor(t){super(t),Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x:0,x2:void 0,y:0,y2:void 0,size:1,color:"black",opacity:1,segments:101,arcHeightFactor:1,minArcHeight:1.5,minPickingSize:3,clampApex:!1,maxChordLength:5e4,arcFadingDistance:!1,linkShape:"arc",orient:"vertical"})),this._baseInstanceExt=this.gl.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","height","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){return t.x2||(Zt(t.x)?t.x2={datum:0}:t.x2=t.x),t.y2||(Zt(t.y)?t.y2={datum:0}:t.y2=t.y),t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(YD,QD,[XD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uArcFadingDistance",t.arcFadingDistance,n=>n||[0,0]),this.registerMarkUniformValue("uArcHeightFactor",t.arcHeightFactor),this.registerMarkUniformValue("uMinArcHeight",t.minArcHeight),this.registerMarkUniformValue("uMinPickingSize",t.minPickingSize),this.registerMarkUniformValue("uShape",t.linkShape,n=>KD.indexOf(n)),this.registerMarkUniformValue("uOrient",t.orient,n=>JD.indexOf(n)),this.registerMarkUniformValue("uClampApex",t.clampApex,n=>!!n),this.registerMarkUniformValue("uMaxChordLength",t.maxChordLength)}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new wD({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});r.addBatches(t.facetBatches);const i=r.toArrays();i.arrays.strip={data:tR(this.properties.segments),numComponents:2},this.rangeMap.migrateEntries(i.rangeMap),this.arrays=Object.fromEntries(Object.entries(i.arrays).map(([a,o])=>[a,{...o,data:void 0}])),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),this._baseInstanceExt?n.push(()=>$i(this.gl,this.programInfo,this.vertexArrayInfo)):n.push(()=>this.gl.bindVertexArray(null)),n}render(t){const n=this.gl,r=(this.properties.segments+1)*2;return this._baseInstanceExt?this.createRenderCallback((i,a)=>{this._baseInstanceExt.drawArraysInstancedBaseInstanceWEBGL(n.TRIANGLE_STRIP,0,r,a,i)},t):this.createRenderCallback((i,a)=>{for(const o of Object.entries(this.bufferInfo.attribs)){const[s,u]=o;u.buffer&&u.numComponents&&u.divisor&&(u.offset=i*this.arrays[s].numComponents*4)}$i(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,r,a)},t)}}function tR(e){let t=0;const n=[];for(;t<=e;t++)n.push(t/e,.5),n.push(t/e,-.5);return new Float32Array(n)}const nR=`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);
326
+ };`,eR=["arc","dome","diagonal","line"],tR=["vertical","horizontal"];class nR extends el{constructor(t){super(t),Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x:0,x2:void 0,y:0,y2:void 0,size:1,color:"black",opacity:1,segments:101,arcHeightFactor:1,minArcHeight:1.5,minPickingSize:3,clampApex:!1,maxChordLength:5e4,arcFadingDistance:!1,linkShape:"arc",orient:"vertical"})),this._baseInstanceExt=this.gl.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","height","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){return t.x2||(Yt(t.x)?t.x2={datum:0}:t.x2=t.x),t.y2||(Yt(t.y)?t.y2={datum:0}:t.y2=t.y),t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(XD,KD,[JD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uArcFadingDistance",t.arcFadingDistance,n=>n||[0,0]),this.registerMarkUniformValue("uArcHeightFactor",t.arcHeightFactor),this.registerMarkUniformValue("uMinArcHeight",t.minArcHeight),this.registerMarkUniformValue("uMinPickingSize",t.minPickingSize),this.registerMarkUniformValue("uShape",t.linkShape,n=>eR.indexOf(n)),this.registerMarkUniformValue("uOrient",t.orient,n=>tR.indexOf(n)),this.registerMarkUniformValue("uClampApex",t.clampApex,n=>!!n),this.registerMarkUniformValue("uMaxChordLength",t.maxChordLength)}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getItemCount(),r=new AD({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});r.addBatches(t.facetBatches);const i=r.toArrays();i.arrays.strip={data:rR(this.properties.segments),numComponents:2},this.rangeMap.migrateEntries(i.rangeMap),this.arrays=Object.fromEntries(Object.entries(i.arrays).map(([a,o])=>[a,{...o,data:void 0}])),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),this._baseInstanceExt?n.push(()=>$i(this.gl,this.programInfo,this.vertexArrayInfo)):n.push(()=>this.gl.bindVertexArray(null)),n}render(t){const n=this.gl,r=(this.properties.segments+1)*2;return this._baseInstanceExt?this.createRenderCallback((i,a)=>{this._baseInstanceExt.drawArraysInstancedBaseInstanceWEBGL(n.TRIANGLE_STRIP,0,r,a,i)},t):this.createRenderCallback((i,a)=>{for(const o of Object.entries(this.bufferInfo.attribs)){const[s,u]=o;u.buffer&&u.numComponents&&u.divisor&&(u.offset=i*this.arrays[s].numComponents*4)}$i(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,r,a)},t)}}function rR(e){let t=0;const n=[];for(;t<=e;t++)n.push(t/e,.5),n.push(t/e,-.5);return new Float32Array(n)}const iR=`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);
323
327
  #if defined(x2_DEFINED) || defined(y2_DEFINED)
324
328
  ivec2 align=fixAlignForAngle(uAlign,angleInDegrees);
325
329
  #else
@@ -332,9 +336,9 @@ vec2 pos=applySampleFacet(vec2(x,y));
332
336
  #ifdef y2_DEFINED
333
337
  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;}
334
338
  #endif
335
- 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();}`,rR="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;}}",iR=`layout(std140)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;
339
+ 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();}`,aR="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;}}",oR=`layout(std140)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;
336
340
  #pragma markUniforms
337
- };`,aR={left:-1,center:0,right:1},oR={top:-1,middle:0,bottom:1,alphabetic:1};class sR extends el{constructor(t){super(t),Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x:.5,y:.5,x2:void 0,y2:void 0,text:"",size:11,color:"black",opacity:1,font:void 0,fontStyle:void 0,fontWeight:void 0,align:"center",baseline:"middle",dx:0,dy:0,angle:0,fitToBand:!1,squeeze:!0,paddingX:0,paddingY:0,flushX:!0,flushY:!0,logoLetters:!1,viewportEdgeFadeWidthTop:0,viewportEdgeFadeWidthRight:0,viewportEdgeFadeWidthBottom:0,viewportEdgeFadeWidthLeft:0,viewportEdgeFadeDistanceTop:-1/0,viewportEdgeFadeDistanceRight:-1/0,viewportEdgeFadeDistanceBottom:-1/0,viewportEdgeFadeDistanceLeft:-1/0})),this.font=this.properties.font?t.context.fontManager.getFont(this.properties.font,this.properties.fontStyle,this.properties.fontWeight):t.context.fontManager.getDefaultFont(),this.setupExprRefsNeedingGraphicsUpdate(["text","fitToBand","logoLetters"])}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","color","size","opacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size","text","angle"]}fixEncoding(t){for(const n of Oa)this.properties.fitToBand&&R0(t,n);return t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(nR,rR,[iR])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uSdfNumerator",{expr:"devicePixelRatio"},n=>{let r=.35;return this.properties.logoLetters&&(r/=2),this.font.metrics.common.base/(n/r)}),this.registerMarkUniformValue("uPaddingX",t.paddingX),this.registerMarkUniformValue("uPaddingY",t.paddingY),this.registerMarkUniformValue("uFlushX",t.flushX,n=>!!n),this.registerMarkUniformValue("uFlushY",t.flushY,n=>!!n),this.registerMarkUniformValue("uSqueeze",t.squeeze,n=>!!n),Xs(this.markUniformInfo,{uAlign:[aR[t.align],oR[t.baseline]],uD:[t.dx,-t.dy],uLogoLetter:!!t.logoLetters,uViewportEdgeFadeWidth:[t.viewportEdgeFadeWidthTop,t.viewportEdgeFadeWidthRight,t.viewportEdgeFadeWidthBottom,t.viewportEdgeFadeWidthLeft],uViewportEdgeFadeDistance:[t.viewportEdgeFadeDistanceTop,t.viewportEdgeFadeDistanceRight,t.viewportEdgeFadeDistanceBottom,t.viewportEdgeFadeDistanceLeft]})}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getData(),r=this.encoding,i=this.encoders.text.accessor||this.encoders.text;let a=0;const o="format"in r.text?mt(r.text.format):l=>l;for(const l of n){const c=o(i(l)),f=Ue(c)?c:c===null?"":""+c;a+=f&&f.length||0}const s=new vD({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(a,this.properties.minBufferSize||0)});s.addBatches(t.facetBatches);const u=s.toArrays();this.rangeMap.migrateEntries(u.rangeMap),this.updateBufferInfo(u)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>{Wa(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>$i(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Zc(n,this.vertexArrayInfo,n.TRIANGLES,i,r),t)}}function pw(e,t,{spacing:n,devicePixelRatio:r,offset:i,reverse:a}={}){n=n||0,i=i||0;let o=0,s=0;for(const p of e)o+=tf(p.px)+(M0(p)?0:n),s+=tf(p.grow);o-=n;const u=Math.max(0,t-o),l=r!==void 0?p=>Math.round(p*r)/r:p=>p,c=[],f=[],h=p=>{const m=c.length;if(!m)return;const y=(p?n:0)*(a?-1:1);d-=y;for(let w=0;w<m;w++)f.push({location:d+(w+1)/(m+1)*y,size:0});d+=y,c.length=0};let d=a?Math.max(t,o):0+i;if(e.length==1&&M0(e[0]))return[{location:d,size:0}];for(let p=0;p<e.length;p++){const m=e[p];if(M0(m))c.push(m);else{h(f.length>0);const y=tf(m.px)+(s?tf(m.grow)/s*u:0);a&&(d-=y),f.push({location:l(d),size:l(y)}),a?d-=n:d+=y+n}}return d+=a?n:-n,h(!1),f}function lR(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 im=class im{constructor(t,n){K(this,ru);this.width=t,this.height=n}addPadding(t){return J(this,ru,dm).call(this,t.width,t.height)}subtractPadding(t){return J(this,ru,dm).call(this,-t.width,-t.height)}};ru=new WeakSet,dm=function(t,n){return new im({px:(this.width.px??0)+t,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Jr=im;const tl=Object.freeze({px:0,grow:0}),gw=new Jr(tl,tl);function M0(e){return!e.px&&!e.grow}function tf(e){return e||0}function uR(e){return e&&(Tt(e.px)||Tt(e.grow))}function mw(e){if(yw(e))throw new Error("parseSizeDef does not accept step-based sizes.");if(uR(e))return e;if(Tt(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 St{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 St(this.top+t,this.right+t,this.bottom+t,this.left+t)}add(t){return new St(this.top+t.top,this.right+t.right,this.bottom+t.bottom,this.left+t.left)}subtract(t){return new St(this.top-t.top,this.right-t.right,this.bottom-t.bottom,this.left-t.left)}union(t){return new St(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 St(0,this.right,0,this.left)}getVertical(){return new St(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):P0}static createFromRecord(t){return new St(t.top,t.right,t.bottom,t.left)}static zero(){return P0}static createUniformPadding(t){return new St(t,t,t,t)}}const P0=St.createUniformPadding(0);Object.freeze(P0);const cR=/^([A-Za-z]+:)?\/\//;function fR(e,t){if(t&&cR.test(t))return t;const n=e();return n&&t?n.endsWith("/")?n+t:n+"/"+t:n??t}const hR="VISIT_SKIP",nl="VISIT_STOP",bw=e=>e;class dR{constructor(t,n,r,i,a,o={}){K(this,ma);K(this,ou);K(this,Mo,{});K(this,iu,{});K(this,au,{});yn(this,"opacityFunction",bw);yn(this,"coords");if(!t)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=r,this.dataParent=i,this.name=t.name||a,this.spec=t,this.resolutions={scale:{},axis:{}},aw(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...o},this.needsAxes={x:!1,y:!1},this.paramMediator=new rk(()=>{var s;return(s=this.dataParent)==null?void 0:s.paramMediator}),t.params)for(const s of t.params)this.paramMediator.registerParam(s)}getPadding(){return this._cache("size/padding",()=>St.createFromConfig(this.spec.padding))}getOverhang(){return St.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Jr(J(this,ma,_u).call(this,"width"),J(this,ma,_u).call(this,"height")):gw)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return gw;const t=this.getSize();return new Jr(J(this,ma,_u).call(this,"viewportWidth")??t.width,J(this,ma,_u).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 J(this,ou,pm).call(this,"layoutParent")}getDataAncestors(){return J(this,ou,pm).call(this,"dataParent")}handleBroadcast(t){for(const n of W(this,Mo)[t.type]||[])n(t)}_addBroadcastHandler(t,n){let r=W(this,Mo)[t];r||(r=[],W(this,Mo)[t]=r),r.push(n)}handleInteractionEvent(t,n,r){const i=r?W(this,iu):W(this,au);for(const a of i[n.type]||[])a(t,n)}addInteractionEventListener(t,n,r){const i=r?W(this,iu):W(this,au);let a=i[t];a||(a=[],i[t]=a),a.push(n)}visit(t){try{const n=t(this);if(t.postOrder&&t.postOrder(this),n!==nl)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===bw)&&(this.opacityFunction=gR(this))}onBeforeRender(){}render(t,n,r={}){this.coords=r.clipRect?n.intersect(r.clipRect):n}getEncoding(){const t=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...t,...n};for(const[i,a]of Object.entries(r))a===null&&delete r[i];return r}getFacetAccessor(t){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(t){var r;const n=this.getEncoding().sample;return Gi(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(t){const n=Hi(t);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(t){const n=Hi(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 fR(()=>{var t;return(t=this.dataParent)==null?void 0:t.getBaseUrl()},this.spec.baseUrl)}isPickingSupported(){return!0}getTitleText(){const t=this.spec.title;if(t)return Ue(t)?t:It(t.text)?this.paramMediator.evaluateAndGet(t.text.expr):t.text}_cache(t,n){return Kc(this,t,n)}_invalidateCacheByPrefix(t,n="self"){switch(n){case"self":Jc(this,t);break;case"ancestors":for(const r of this.getLayoutAncestors())Jc(r,t);break;case"progeny":this.visit(r=>Jc(r,t));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(t){}}Mo=new WeakMap,iu=new WeakMap,au=new WeakMap,ma=new WeakSet,_u=function(t){var i;let n=this.spec[t];const r=t=="viewportWidth"||t=="viewportHeight";if(yw(n)){if(r)throw new Zi(`Cannot use step-based size with "${t}"!`,this);const a=n.step,o=(i=this.getScaleResolution(t=="width"?"x":"y"))==null?void 0:i.scale;if(o){let s=0;if(Hn(o.type))s=o.domain().length;else if(["locus","index"].includes(o.type)){const l=o.domain();s=Es(l)-l[0]}else throw new Zi(`Cannot use step-based size with "${o.type}" scale!`,this);const u=o;return s=Gd(s,u.paddingInner(),u.paddingOuter()),{px:s*a,grow:0}}else throw new Zi("Cannot use 'step' size with missing scale!",this)}else return(n&&mw(n))??(r?void 0:{px:0,grow:1})},ou=new WeakSet,pm=function(t){const n=[];let r=this;do n.push(r),r=r[t];while(r);return n};function pR(e){return"unitsPerPixel"in e}function gR(e){const t=e.spec.opacity;if(t!==void 0){if(Tt(t))return n=>n*t;if(pR(t)){const n=a=>{var s;const o=(s=e.getScaleResolution(a))==null?void 0:s.scale;if(["linear","index","locus"].includes(o==null?void 0:o.type))return o},r=t.channel?n(t.channel):n("x")??n("y");if(!r)throw new Zi("Cannot find a resolved quantitative scale for dynamic opacity!",e);const i=Fd().domain(t.unitsPerPixel).range(t.values).clamp(!0);return a=>{const s=Du(r.domain())/1e3;return i(s)*a}}else if(It(t)){const n=e.paramMediator.createExpression(t.expr);return n.addListener(()=>e.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const yw=e=>!!(e!=null&&e.step);class Yi extends dR{constructor(t,n,r,i,a,o){super(t,n,r,i,a,o),this.spec=t}async initializeChildren(){}*[Symbol.iterator](){}replaceChild(t,n){throw new Error("Not implemented")}visit(t){let n;try{n=t(this)}catch(r){throw r.view=this,r}if(n===nl)return n;if(n!==hR){t.beforeChildren&&t.beforeChildren(this);for(const r of this){const i=r.visit(t);if(i===nl)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 Yi)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,nl}),n}getDefaultResolution(t,n){return"shared"}}const ww=1;function L0(){let e=[0,1],t=[0,1],n=1,r=1,i=0,a=0,o=.5,s=0;const l=c=>(c+o-e[0])/n*r+t[0];return l.invert=c=>(c-t[0])/r*n+e[0]-o,l.domain=function(c){if(arguments.length){e=G4(c),n=e[1]-e[0];const f=e[0]===0&&e[0]===0;if(n<ww&&!f){n=ww;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(c){return arguments.length?(t=[...c],r=t[1]-t[0],l):t},l.numberingOffset=function(c){return arguments.length?(s=c,l):s},l.padding=function(c){return arguments.length?(a=c,i=Math.min(1,c),l):i},l.paddingInner=function(c){return arguments.length?(i=Math.min(1,c),l):i},l.paddingOuter=function(c){return arguments.length?(a=c,l):a},l.align=function(c){return arguments.length?(o=Math.max(0,Math.min(1,c)),l):o},l.step=()=>r/n,l.bandwidth=()=>l.step(),l.ticks=c=>{const f=l.align(),h=l.numberingOffset();return Ou(e[0]-f+h,e[1]-f+h,Math.min(c,Math.ceil(n))).filter(Number.isInteger).map(d=>d-s)},l.tickFormat=(c,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const d=Fr(e[0],e[1],Math.min(c,Math.ceil(n)))<1e5?mt(","):mt(".3s");return p=>d(p+s)},l.copy=()=>L0().domain(e).range(t).paddingInner(i).paddingOuter(a).numberingOffset(s),l}function mR(){const e=L0().numberingOffset(1);let t;e.genome=function(r){return arguments.length?(t=r,e):t},e.ticks=r=>{if(!t)return[];const i=e.domain(),a=e.numberingOffset(),[o,s]=[Math.max(i[0],0),Math.min(i[1],t.totalSize-1)].map(c=>t.toChromosome(c)),u=Math.max(1,Fr(i[0],i[1],r)),l=[];for(let c=o.index;c<=s.index;c++){const f=t.chromosomes[c],h=Math.max(f.continuousStart+u,i[0]-(i[0]-f.continuousStart)%u),d=Math.min(f.continuousEnd-u/4,i[1]+1);for(let p=h;p<=d;p+=u){const m=p-a;m>=i[0]&&m<i[1]&&l.push(m)}}return l},e.tickFormat=(r,i)=>{if(!t)return;if(i)throw new Error("Locus scale's tickFormat does not support a specifier!");const a=e.domain(),o=a[1]-a[0],s=e.numberingOffset(),l=Fr(a[0],a[1],Math.min(r,Math.ceil(o)))<1e6?mt(","):mt(".3s"),c=f=>f-t.toChromosome(f).continuousStart;return f=>l(c(f)+s)};const n=e.copy;return e.copy=()=>n().genome(t),e}function bR(e){return e.type=="locus"}function nf(e,t,n){if(n=n||[],e.some(o=>o===null)){if(e.every(o=>o===null))return null;throw console.warn(e),new Error("Cannot merge objects with nulls!")}const r={},i=(o,s)=>o===s||Ya(o)&&Ya(s)||Ya(o)&&s===!0||o===!0&&kt(s),a=o=>{for(let s in o){const u=o[s];if(!n.includes(s)&&u!==void 0)if(r[s]!==void 0&&!i(r[s],u))console.warn(`Conflicting property ${s} of ${t}: (${JSON.stringify(r[s])} and ${JSON.stringify(o[s])}). Using ${JSON.stringify(r[s])}.`);else{const l=r[s];if(Ya(l))Ya(u)&&(r[s]=nf([l,u],s));else if(Ya(u)){if(!(l===!0||l===void 0))throw new Error("Bug in merge! Target is: "+l);r[s]=nf([{},u],s)}else r[s]=u}}};for(const o of e)a(o);return r}function Ya(e){return kt(e)&&!Array.isArray(e)}/*!
341
+ };`,sR={left:-1,center:0,right:1},lR={top:-1,middle:0,bottom:1,alphabetic:1};class uR extends el{constructor(t){super(t),Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors({x:.5,y:.5,x2:void 0,y2:void 0,text:"",size:11,color:"black",opacity:1,font:void 0,fontStyle:void 0,fontWeight:void 0,align:"center",baseline:"middle",dx:0,dy:0,angle:0,fitToBand:!1,squeeze:!0,paddingX:0,paddingY:0,flushX:!0,flushY:!0,logoLetters:!1,viewportEdgeFadeWidthTop:0,viewportEdgeFadeWidthRight:0,viewportEdgeFadeWidthBottom:0,viewportEdgeFadeWidthLeft:0,viewportEdgeFadeDistanceTop:-1/0,viewportEdgeFadeDistanceRight:-1/0,viewportEdgeFadeDistanceBottom:-1/0,viewportEdgeFadeDistanceLeft:-1/0})),this.font=this.properties.font?t.context.fontManager.getFont(this.properties.font,this.properties.fontStyle,this.properties.fontWeight):t.context.fontManager.getDefaultFont(),this.setupExprRefsNeedingGraphicsUpdate(["text","fitToBand","logoLetters"])}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","color","size","opacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size","text","angle"]}fixEncoding(t){for(const n of Oa)this.properties.fitToBand&&R0(t,n);return t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(iR,aR,[oR])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uSdfNumerator",{expr:"devicePixelRatio"},n=>{let r=.35;return this.properties.logoLetters&&(r/=2),this.font.metrics.common.base/(n/r)}),this.registerMarkUniformValue("uPaddingX",t.paddingX),this.registerMarkUniformValue("uPaddingY",t.paddingY),this.registerMarkUniformValue("uFlushX",t.flushX,n=>!!n),this.registerMarkUniformValue("uFlushY",t.flushY,n=>!!n),this.registerMarkUniformValue("uSqueeze",t.squeeze,n=>!!n),Xs(this.markUniformInfo,{uAlign:[sR[t.align],lR[t.baseline]],uD:[t.dx,-t.dy],uLogoLetter:!!t.logoLetters,uViewportEdgeFadeWidth:[t.viewportEdgeFadeWidthTop,t.viewportEdgeFadeWidthRight,t.viewportEdgeFadeWidthBottom,t.viewportEdgeFadeWidthLeft],uViewportEdgeFadeDistance:[t.viewportEdgeFadeDistanceTop,t.viewportEdgeFadeDistanceRight,t.viewportEdgeFadeDistanceBottom,t.viewportEdgeFadeDistanceLeft]})}updateGraphicsData(){const t=this.unitView.getCollector(),n=t.getData(),r=this.encoding,i=this.encoders.text.accessor||this.encoders.text;let a=0;const o="format"in r.text?mt(r.text.format):l=>l;for(const l of n){const c=o(i(l)),f=Ue(c)?c:c===null?"":""+c;a+=f&&f.length||0}const s=new ED({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(a,this.properties.minBufferSize||0)});s.addBatches(t.facetBatches);const u=s.toArrays();this.rangeMap.migrateEntries(u.rangeMap),this.updateBufferInfo(u)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>{Wa(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>$i(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>Zc(n,this.vertexArrayInfo,n.TRIANGLES,i,r),t)}}function mw(e,t,{spacing:n,devicePixelRatio:r,offset:i,reverse:a}={}){n=n||0,i=i||0;let o=0,s=0;for(const p of e)o+=tf(p.px)+(M0(p)?0:n),s+=tf(p.grow);o-=n;const u=Math.max(0,t-o),l=r!==void 0?p=>Math.round(p*r)/r:p=>p,c=[],f=[],h=p=>{const m=c.length;if(!m)return;const y=(p?n:0)*(a?-1:1);d-=y;for(let w=0;w<m;w++)f.push({location:d+(w+1)/(m+1)*y,size:0});d+=y,c.length=0};let d=a?Math.max(t,o):0+i;if(e.length==1&&M0(e[0]))return[{location:d,size:0}];for(let p=0;p<e.length;p++){const m=e[p];if(M0(m))c.push(m);else{h(f.length>0);const y=tf(m.px)+(s?tf(m.grow)/s*u:0);a&&(d-=y),f.push({location:l(d),size:l(y)}),a?d-=n:d+=y+n}}return d+=a?n:-n,h(!1),f}function cR(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 im=class im{constructor(t,n){K(this,ru);this.width=t,this.height=n}addPadding(t){return J(this,ru,dm).call(this,t.width,t.height)}subtractPadding(t){return J(this,ru,dm).call(this,-t.width,-t.height)}};ru=new WeakSet,dm=function(t,n){return new im({px:(this.width.px??0)+t,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Jr=im;const tl=Object.freeze({px:0,grow:0}),bw=new Jr(tl,tl);function M0(e){return!e.px&&!e.grow}function tf(e){return e||0}function fR(e){return e&&(Tt(e.px)||Tt(e.grow))}function yw(e){if(vw(e))throw new Error("parseSizeDef does not accept step-based sizes.");if(fR(e))return e;if(Tt(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 St{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 St(this.top+t,this.right+t,this.bottom+t,this.left+t)}add(t){return new St(this.top+t.top,this.right+t.right,this.bottom+t.bottom,this.left+t.left)}subtract(t){return new St(this.top-t.top,this.right-t.right,this.bottom-t.bottom,this.left-t.left)}union(t){return new St(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 St(0,this.right,0,this.left)}getVertical(){return new St(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):P0}static createFromRecord(t){return new St(t.top,t.right,t.bottom,t.left)}static zero(){return P0}static createUniformPadding(t){return new St(t,t,t,t)}}const P0=St.createUniformPadding(0);Object.freeze(P0);const hR=/^([A-Za-z]+:)?\/\//;function dR(e,t){if(t&&hR.test(t))return t;const n=e();return n&&t?n.endsWith("/")?n+t:n+"/"+t:n??t}const pR="VISIT_SKIP",nl="VISIT_STOP",ww=e=>e;class gR{constructor(t,n,r,i,a,o={}){K(this,ma);K(this,ou);K(this,Mo,{});K(this,iu,{});K(this,au,{});nn(this,"opacityFunction",ww);nn(this,"coords");if(!t)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=r,this.dataParent=i,this.name=t.name||a,this.spec=t,this.resolutions={scale:{},axis:{}},sw(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...o},this.needsAxes={x:!1,y:!1},this.paramMediator=new ok(()=>{var s;return(s=this.dataParent)==null?void 0:s.paramMediator}),t.params)for(const s of t.params)this.paramMediator.registerParam(s)}getPadding(){return this._cache("size/padding",()=>St.createFromConfig(this.spec.padding))}getOverhang(){return St.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Jr(J(this,ma,Su).call(this,"width"),J(this,ma,Su).call(this,"height")):bw)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return bw;const t=this.getSize();return new Jr(J(this,ma,Su).call(this,"viewportWidth")??t.width,J(this,ma,Su).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 J(this,ou,pm).call(this,"layoutParent")}getDataAncestors(){return J(this,ou,pm).call(this,"dataParent")}handleBroadcast(t){for(const n of W(this,Mo)[t.type]||[])n(t)}_addBroadcastHandler(t,n){let r=W(this,Mo)[t];r||(r=[],W(this,Mo)[t]=r),r.push(n)}handleInteractionEvent(t,n,r){const i=r?W(this,iu):W(this,au);for(const a of i[n.type]||[])a(t,n)}addInteractionEventListener(t,n,r){const i=r?W(this,iu):W(this,au);let a=i[t];a||(a=[],i[t]=a),a.push(n)}visit(t){try{const n=t(this);if(t.postOrder&&t.postOrder(this),n!==nl)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===ww)&&(this.opacityFunction=bR(this))}onBeforeRender(){}render(t,n,r={}){this.coords=r.clipRect?n.intersect(r.clipRect):n}getEncoding(){const t=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...t,...n};for(const[i,a]of Object.entries(r))a===null&&delete r[i];return r}getFacetAccessor(t){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(t){var r;const n=this.getEncoding().sample;return Gi(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(t){const n=Hi(t);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(t){const n=Hi(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 dR(()=>{var t;return(t=this.dataParent)==null?void 0:t.getBaseUrl()},this.spec.baseUrl)}isPickingSupported(){return!0}getTitleText(){const t=this.spec.title;if(t)return Ue(t)?t:It(t.text)?this.paramMediator.evaluateAndGet(t.text.expr):t.text}_cache(t,n){return Kc(this,t,n)}_invalidateCacheByPrefix(t,n="self"){switch(n){case"self":Jc(this,t);break;case"ancestors":for(const r of this.getLayoutAncestors())Jc(r,t);break;case"progeny":this.visit(r=>Jc(r,t));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(t){}}Mo=new WeakMap,iu=new WeakMap,au=new WeakMap,ma=new WeakSet,Su=function(t){var i;let n=this.spec[t];const r=t=="viewportWidth"||t=="viewportHeight";if(vw(n)){if(r)throw new Zi(`Cannot use step-based size with "${t}"!`,this);const a=n.step,o=(i=this.getScaleResolution(t=="width"?"x":"y"))==null?void 0:i.scale;if(o){let s=0;if(Hn(o.type))s=o.domain().length;else if(["locus","index"].includes(o.type)){const l=o.domain();s=Es(l)-l[0]}else throw new Zi(`Cannot use step-based size with "${o.type}" scale!`,this);const u=o;return s=Gd(s,u.paddingInner(),u.paddingOuter()),{px:s*a,grow:0}}else throw new Zi("Cannot use 'step' size with missing scale!",this)}else return(n&&yw(n))??(r?void 0:{px:0,grow:1})},ou=new WeakSet,pm=function(t){const n=[];let r=this;do n.push(r),r=r[t];while(r);return n};function mR(e){return"unitsPerPixel"in e}function bR(e){const t=e.spec.opacity;if(t!==void 0){if(Tt(t))return n=>n*t;if(mR(t)){const n=a=>{var s;const o=(s=e.getScaleResolution(a))==null?void 0:s.scale;if(["linear","index","locus"].includes(o==null?void 0:o.type))return o},r=t.channel?n(t.channel):n("x")??n("y");if(!r)throw new Zi("Cannot find a resolved quantitative scale for dynamic opacity!",e);const i=Fd().domain(t.unitsPerPixel).range(t.values).clamp(!0);return a=>{const s=Ru(r.domain())/1e3;return i(s)*a}}else if(It(t)){const n=e.paramMediator.createExpression(t.expr);return n.addListener(()=>e.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const vw=e=>!!(e!=null&&e.step);class Yi extends gR{constructor(t,n,r,i,a,o){super(t,n,r,i,a,o),this.spec=t}async initializeChildren(){}*[Symbol.iterator](){}replaceChild(t,n){throw new Error("Not implemented")}visit(t){let n;try{n=t(this)}catch(r){throw r.view=this,r}if(n===nl)return n;if(n!==pR){t.beforeChildren&&t.beforeChildren(this);for(const r of this){const i=r.visit(t);if(i===nl)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 Yi)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,nl}),n}getDefaultResolution(t,n){return"shared"}}const xw=1;function L0(){let e=[0,1],t=[0,1],n=1,r=1,i=0,a=0,o=.5,s=0;const l=c=>(c+o-e[0])/n*r+t[0];return l.invert=c=>(c-t[0])/r*n+e[0]-o,l.domain=function(c){if(arguments.length){e=j4(c),n=e[1]-e[0];const f=e[0]===0&&e[0]===0;if(n<xw&&!f){n=xw;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(c){return arguments.length?(t=[...c],r=t[1]-t[0],l):t},l.numberingOffset=function(c){return arguments.length?(s=c,l):s},l.padding=function(c){return arguments.length?(a=c,i=Math.min(1,c),l):i},l.paddingInner=function(c){return arguments.length?(i=Math.min(1,c),l):i},l.paddingOuter=function(c){return arguments.length?(a=c,l):a},l.align=function(c){return arguments.length?(o=Math.max(0,Math.min(1,c)),l):o},l.step=()=>r/n,l.bandwidth=()=>l.step(),l.ticks=c=>{const f=l.align(),h=l.numberingOffset();return Nu(e[0]-f+h,e[1]-f+h,Math.min(c,Math.ceil(n))).filter(Number.isInteger).map(d=>d-s)},l.tickFormat=(c,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const d=Fr(e[0],e[1],Math.min(c,Math.ceil(n)))<1e5?mt(","):mt(".3s");return p=>d(p+s)},l.copy=()=>L0().domain(e).range(t).paddingInner(i).paddingOuter(a).numberingOffset(s),l}function yR(){const e=L0().numberingOffset(1);let t;e.genome=function(r){return arguments.length?(t=r,e):t},e.ticks=r=>{if(!t)return[];const i=e.domain(),a=e.numberingOffset(),[o,s]=[Math.max(i[0],0),Math.min(i[1],t.totalSize-1)].map(c=>t.toChromosome(c)),u=Math.max(1,Fr(i[0],i[1],r)),l=[];for(let c=o.index;c<=s.index;c++){const f=t.chromosomes[c],h=Math.max(f.continuousStart+u,i[0]-(i[0]-f.continuousStart)%u),d=Math.min(f.continuousEnd-u/4,i[1]+1);for(let p=h;p<=d;p+=u){const m=p-a;m>=i[0]&&m<i[1]&&l.push(m)}}return l},e.tickFormat=(r,i)=>{if(!t)return;if(i)throw new Error("Locus scale's tickFormat does not support a specifier!");const a=e.domain(),o=a[1]-a[0],s=e.numberingOffset(),l=Fr(a[0],a[1],Math.min(r,Math.ceil(o)))<1e6?mt(","):mt(".3s"),c=f=>f-t.toChromosome(f).continuousStart;return f=>l(c(f)+s)};const n=e.copy;return e.copy=()=>n().genome(t),e}function wR(e){return e.type=="locus"}function nf(e,t,n){if(n=n||[],e.some(o=>o===null)){if(e.every(o=>o===null))return null;throw console.warn(e),new Error("Cannot merge objects with nulls!")}const r={},i=(o,s)=>o===s||Ya(o)&&Ya(s)||Ya(o)&&s===!0||o===!0&&kt(s),a=o=>{for(let s in o){const u=o[s];if(!n.includes(s)&&u!==void 0)if(r[s]!==void 0&&!i(r[s],u))console.warn(`Conflicting property ${s} of ${t}: (${JSON.stringify(r[s])} and ${JSON.stringify(o[s])}). Using ${JSON.stringify(r[s])}.`);else{const l=r[s];if(Ya(l))Ya(u)&&(r[s]=nf([l,u],s));else if(Ya(u)){if(!(l===!0||l===void 0))throw new Error("Bug in merge! Target is: "+l);r[s]=nf([{},u],s)}else r[s]=u}}};for(const o of e)a(o);return r}function Ya(e){return kt(e)&&!Array.isArray(e)}/*!
338
342
  * Adapted from vega-encode:
339
343
  * https://github.com/vega/vega/blob/master/packages/vega-encode/src/ticks.js
340
344
  *
@@ -342,7 +346,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
342
346
  * All rights reserved.
343
347
  *
344
348
  * BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
345
- */function vw(e,t,n){return Tt(t)&&n!=null&&(t=Math.min(t,~~(Du(e.domain())/n)||1)),kt(t)&&(t.step,t=t.interval),t}function xw(e,t,n){var r=e.range(),i=Math.floor(r[0]),a=Math.ceil(wn(r));if(i>a&&(r=a,a=i,i=r),t=t.filter(function(s){return s=e(s),i<=s&&s<=a}),n>0&&t.length>1){for(var o=[t[0],wn(t)];t.length>n&&t.length>=3;)t=t.filter(function(s,u){return!(u%2)});t.length<3&&(t=o)}return t}function yR(e,t){return e.bins?xw(e,wR(e.bins,t)):e.ticks?e.ticks(t):e.domain()}function wR(e,t){var n=e.length,r=~~(n/(t||n));return r<2?e.slice():e.filter(function(i,a){return!(a%r)})}function vR(e,t,n){var r=e.tickFormat?e.tickFormat(t,n):n?mt(n):String;if(A2(e.type)){var i=AR(n);r=e.bins?i:xR(r,i)}return r}function xR(e,t){return function(n){return e(n)?t(n):""}}function AR(e){var t=Mr(e||",");if(t.precision==null){switch(t.precision=12,t.type){case"%":t.precision-=2;break;case"e":t.precision-=1;break}return ER(mt(t),mt(".1f")(1)[1])}else return mt(t)}function ER(e,t){return function(n){var r=e(n),i=r.indexOf(t),a,o;if(i<0)return r;for(a=_R(r,i),o=a<r.length?r.slice(a):"";--a>i;)if(r[a]!=="0"){++a;break}return r.slice(0,a)+o}}function _R(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}/*!
349
+ */function Aw(e,t,n){return Tt(t)&&n!=null&&(t=Math.min(t,~~(Ru(e.domain())/n)||1)),kt(t)&&(t.step,t=t.interval),t}function Ew(e,t,n){var r=e.range(),i=Math.floor(r[0]),a=Math.ceil(vn(r));if(i>a&&(r=a,a=i,i=r),t=t.filter(function(s){return s=e(s),i<=s&&s<=a}),n>0&&t.length>1){for(var o=[t[0],vn(t)];t.length>n&&t.length>=3;)t=t.filter(function(s,u){return!(u%2)});t.length<3&&(t=o)}return t}function vR(e,t){return e.bins?Ew(e,xR(e.bins,t)):e.ticks?e.ticks(t):e.domain()}function xR(e,t){var n=e.length,r=~~(n/(t||n));return r<2?e.slice():e.filter(function(i,a){return!(a%r)})}function AR(e,t,n){var r=e.tickFormat?e.tickFormat(t,n):n?mt(n):String;if(_2(e.type)){var i=_R(n);r=e.bins?i:ER(r,i)}return r}function ER(e,t){return function(n){return e(n)?t(n):""}}function _R(e){var t=Mr(e||",");if(t.precision==null){switch(t.precision=12,t.type){case"%":t.precision-=2;break;case"e":t.precision-=1;break}return SR(mt(t),mt(".1f")(1)[1])}else return mt(t)}function SR(e,t){return function(n){var r=e(n),i=r.indexOf(t),a,o;if(i<0)return r;for(a=CR(r,i),o=a<r.length?r.slice(a):"";--a>i;)if(r[a]!=="0"){++a;break}return r.slice(0,a)+o}}function CR(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}/*!
346
350
  * Adapted from vega-encode:
347
351
  * https://github.com/vega/vega/blob/master/packages/vega-encode/src/Scale.js
348
352
  *
@@ -350,11 +354,11 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
350
354
  * All rights reserved.
351
355
  *
352
356
  * BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
353
- */const SR="locus",CR="index";var kR=5;function TR(e){const t=e.type;return!e.bins&&(t===Pa||t===Os||t===Ns)}function Aw(e){return yt(e)&&![Gn,CR,SR].includes(e)}function Ew(e){return e||{warn:(t,...n)=>console.warn(t,...n)}}var IR=Fu(["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 _w(e,t,n){n=Ew(n);for(const r in e)if(!IR[r]){if(r==="padding"&&Aw(t.type))continue;Pt(t[r])?t[r](e[r]):n.warn("Unsupported scale property: "+r)}OR(t,e,LR(t,e,FR(t,e,n)))}function BR(e,t){const n=DR(e),r=Ee(n);if(!r)throw new Error("Unknown scale type: "+n);const i=r();return!e.domain&&yt(i.type)&&(e.domain=[0,0]),_w(e,i,t),i}function DR(e){var t=e.type,n="",r;return t===Gn?Gn+"-"+Pa:(RR(e)&&(r=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=r===2?Gn+"-":r===3?La+"-":""),(n+t||Pa).toLowerCase())}function RR(e){const t=e.type;return yt(t)&&t!==p2&&t!==g2&&(e.scheme||e.range&&e.range.length&&e.range.every(Ue))}function FR(e,t,n){if(!e.domain)return 0;n=Ew(n);var r=MR(e,t.domainRaw,n);if(r>-1)return r;var i=t.domain,a=e.type,o=t.zero||t.zero===void 0&&TR(e),s,u;return i?(Aw(a)&&t.padding&&i[0]!==wn(i)&&(i=PR(a,i,t.range,t.padding,t.exponent,t.constant)),(o||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(s=(i=i.slice()).length-1||1,o&&(i[0]>0&&(i[0]=0),i[s]<0&&(i[s]=0)),t.domainMin!=null&&(i[0]=t.domainMin),t.domainMax!=null&&(i[s]=t.domainMax),t.domainMid!=null&&(u=t.domainMid,(u<i[0]||u>i[s])&&n.warn("Scale domainMid exceeds domain min or max.",u),i.splice(s,0,u))),e.domain(Sw(a,i,n)),a===Vd&&e.unknown(t.domainImplicit?cd:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&vw(e,t.nice)||null),i.length):0}function MR(e,t,n){return t?(e.domain(Sw(e.type,t,n)),t.length):-1}function PR(e,t,n,r,i,a){var o=Math.abs(wn(n)-n[0]),s=o/(o-2*r),u=e===jr?Im(t,null,s):e===Ns?Ch(t,null,s,.5):e===Os?Ch(t,null,s,i||1):e===vc?f4(t,null,s,a||1):Tm(t,null,s);return t=t.slice(),t[0]=u[0],t[t.length-1]=u[1],t}function Sw(e,t,n){if(A2(e)){var r=Math.abs(t.reduce(function(i,a){return i+(a<0?-1:a>0?1:0)},0));r!==t.length&&n.warn("Log scale domain includes zero: "+Ru(t))}return t}function LR(e,t,n){let r=t.bins;if(r&&!xt(r)){const i=(r.start==null||r.stop==null)&&e.domain(),a=r.start==null?i[0]:r.start,o=r.stop==null?wn(i):r.stop,s=r.step;s||Qe("Scale bins parameter missing step property."),r=Ko(a,o+s,s)}return r?e.bins=r:e.bins&&delete e.bins,e.type===$d&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function OR(e,t,n){var r=e.type,i=t.round||!1,a=t.range;if(t.rangeStep!=null)a=NR(r,t,n);else if(t.scheme&&(a=zR(r,t,n),Pt(a))){if(e.interpolator)return e.interpolator(a);Qe(`Scale type ${r} does not support interpolating color schemes.`)}if(a&&Ac(r))return e.interpolator(Ec(O0(a,t.reverse),t.interpolate,t.interpolateGamma));a&&t.interpolate&&e.interpolate?e.interpolate(E2(t.interpolate,t.interpolateGamma)):Pt(e.round)?e.round(i):Pt(e.rangeRound)&&e.interpolate(i?Ps:Hr),a&&e.range(O0(a,t.reverse))}function NR(e,t,n){e!==y2&&e!==jd&&Qe("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===jd?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*Gd(n,i,r)]}function zR(e,t,n){var r=t.schemeExtent,i,a;return xt(t.scheme)?a=Ec(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),a=Wd(i),a||Qe(`Unrecognized scheme name: ${t.scheme}`)),n=e===b2?n+1:e===$d?n-1:e===Hd||e===m2?+t.schemeCount||kR:n,Ac(e)?Cw(a,r,t.reverse):Pt(a)?K5(Cw(a,r),n):e===Vd?a:a.slice(0,n)}function Cw(e,t,n){return Pt(e)&&(t||n)?X5(e,O0(t||[0,1],n)):e}function O0(e,t){return t?e.slice().reverse():e}const kw=mt(",d");function UR(e,t){return e.chrom+":"+kw(Math.floor(e.pos+1))+"-"+(e.chrom!=t.chrom?t.chrom+":":"")+kw(Math.ceil(t.pos))}const GR="https://genomespy.app/data/genomes/";class HR{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=GR;try{this.setChromSizes(VR(await Qu({baseURL:this.baseUrl}).load(`${this.config.name}/${this.name}.chrom.sizes`)))}catch(n){throw new Error(`Could not load chrom sizes: ${n.message}`)}}}hasChrPrefix(){return this.chromosomes.some(t=>t.name.startsWith("chr"))}setChromSizes(t){let n=0;this.startByIndex=[0];for(let r=0;r<t.length;r++){this.startByIndex.push(n);const i=t[r].size,a={...t[r],continuousStart:n,continuousEnd:n+i,continuousInterval:[n,n+i],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(a);const o=a.name.replace(/^chr/i,"");for(const s of["chr"+o,"CHR"+o,"Chr"+o,a.number,""+a.number,o,a.name])this.cumulativeChromPositions.set(s,n),this.chromosomesByName.set(s,a);n+=a.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(t,n){let r=this.cumulativeChromPositions.get(t);if(r===void 0)throw new Error("Unknown chromosome/contig: "+t);return r+ +n}toChromosome(t){if(t>this.totalSize)return;t=Math.floor(t);const n=Dr(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 UR(...this.toChromosomalInterval(t))}toChromosomalInterval(t){const n=this.toChromosomal(t[0]+.5),r=this.toChromosomal(t[1]-.5);return r.pos+=1,[n,r]}toContinuousInterval(t){var i;let[n,r]=t;return r||(r=n),[this.toContinuous(n.chrom,n.pos??0),this.toContinuous(r.chrom,r.pos??((i=this.chromosomesByName.get(r.chrom))==null?void 0:i.size))]}toDiscreteChromosomeIntervals(t){const n=t[0],r=t[1],i=[];if(n.chrom===r.chrom)i.push({chrom:n.chrom,startPos:n.pos,endPos:r.pos});else{const a=this.chromosomes.findIndex(s=>s.name===n.chrom),o=this.chromosomes.findIndex(s=>s.name===r.chrom);i.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[a].size});for(let s=a+1;s<o;s++)i.push({chrom:this.chromosomes[s].name,startPos:0,endPos:this.chromosomes[s].size});i.push({chrom:r.chrom,startPos:0,endPos:r.pos})}return i}continuousToDiscreteChromosomeIntervals(t){return this.toDiscreteChromosomeIntervals([this.toChromosomal(t[0]),this.toChromosomal(t[1])])}parseInterval(t){const n=t.match(/^(chr[0-9A-Z]+)(?::([0-9,]+)(?:-(?:(chr[0-9A-Z]+):)?([0-9,]+))?)?$/);if(n){const r=n[1];if(n.slice(2).every(s=>s===void 0)){const s=this.getChromosome(r);return s?[s.continuousStart,s.continuousEnd]:void 0}const i=n[3]||r,a=parseInt(n[2].replace(/,/g,"")),o=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):a;return[this.toContinuous(r,a-1),this.toContinuous(i,o)]}}}function VR(e){return B4(e).filter(t=>/^chr[0-9A-Z]+$/.test(t[0])).map(([t,n])=>({name:t,size:parseInt(n)}))}function Tw(e){return kt(e)&&"chrom"in e}function jR(e){return e.every(Tw)}class rl extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof rl&&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 N0 extends rl{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 Iw extends rl{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 Bw extends Iw{constructor(){super(),this.type="nominal"}}class $R extends rl{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 Dw={quantitative:N0,index:N0,locus:N0,nominal:Bw,ordinal:Iw};function Rw(e,t){if(e=="quantitative"&&qR(t)){const n=new $R(t);return n.type=e,n}else if(Dw[e]){const n=new Dw[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function qR(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function WR(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function ZR(e,t,n){return e*Math.pow(t/e,n)}Ee("index",L0,["continuous"]),Ee("locus",mR,["continuous"]),Ee("null",_c,[]);const Fw="quantitative",Mw="ordinal",Pw="nominal",Lw="locus",YR="index";class QR{constructor(t){K(this,lu);K(this,am);K(this,Dn);K(this,uu);K(this,ch);K(this,fh);K(this,cu);K(this,fu);K(this,Lo);K(this,Er);K(this,hu);K(this,hh);K(this,om);K(this,du);K(this,Ar,void 0);K(this,Po,{domain:new Set,range:new Set});K(this,Jt,void 0);K(this,su,new Set);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){W(this,Po)[t].add(n)}removeEventListener(t,n){W(this,Po)[t].delete(n)}pushUnitView(t,n){var o;const r=Zd(t,n),i=r.type,a=(o=r==null?void 0:r.scale)==null?void 0:o.name;if(a){if(this.name!==void 0&&a!=this.name)throw new Error(`Shared scales have conflicting names: "${a}" vs. "${this.name}"!`);this.name=a}if(!this.type)this.type=i;else if(i!==this.type&&!js(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${i}. Use "resolve: independent" for channel ${this.channel}`);this.members.push({view:t,channel:n})}getConfiguredDomain(){return J(this,du,vm).call(this,t=>js(t.channel)?void 0:t.view.getConfiguredDomain(t.channel))}getDataDomain(){return J(this,du,vm).call(this,t=>js(t.channel)?void 0:t.view.extractDataDomain(t.channel))}reconfigure(){const t=W(this,Jt);if(!t||t.type=="null")return;const n=J(this,ch,W_).call(this),r=t.domain(),i=J(this,cu,bm).call(this);if(_w({...i,range:void 0},t),t.props=i,J(this,fu,ym).call(this),yt(t.type)&&Fe(this,Ar,J(this,hu,wm).call(this)),!n){J(this,Dn,Br).call(this,"domain");return}const a=t.domain();td(a,r)||(this.isZoomable()?t.domain(r):J(this,Er,va).call(this)?(t.domain(r),this.zoomTo(a,500)):J(this,Dn,Br).call(this,"domain"))}get scale(){if(W(this,Jt))return W(this,Jt);const t=J(this,cu,bm).call(this),n=BR({...t,range:void 0});n.props=t,Fe(this,Jt,n),J(this,fu,ym).call(this),bR(n)&&n.genome(this.getGenome()),yt(n.type)&&Fe(this,Ar,J(this,hu,wm).call(this));const r=n.range;if(r){const i=()=>J(this,Dn,Br).call(this,"range");n.range=function(a){if(arguments.length)r(a),i();else return r()},i()}return n}getDomain(){return this.scale.domain()}getComplexDomain(){var t;return((t=this.getGenome())==null?void 0:t.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return J(this,Er,va).call(this)&&td(J(this,Lo,Ah).call(this),this.getDomain())}isZoomable(){return J(this,Er,va).call(this)&&!!this.scale.props.zoom}zoom(t,n,r){if(!J(this,Er,va).call(this))return!1;const i=this.scale,a=i.domain();let o=[...a],s=i.invert(n);switch(i.props.reverse&&(r=-r),"align"in i&&(s+=i.align()),i.type){case"linear":case"index":case"locus":o=l4(o,r||0),o=Tm(o,s,t);break;case"log":o=u4(o,r||0),o=Im(o,s,t);break;case"pow":case"sqrt":{const u=i;o=c4(o,r||0,u.exponent()),o=Ch(o,s,t,u.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return W(this,Ar)&&(o=h4(o,W(this,Ar)[0],W(this,Ar)[1])),[0,1].some(u=>o[u]!=a[u])?(i.domain(o),J(this,Dn,Br).call(this,"domain"),!0):!1}async zoomTo(t,n=!1){var s;if(Yo(n)&&(n=n?700:0),!J(this,Er,va).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(t),i=(s=this.members[0])==null?void 0:s.view.context.animator,a=this.scale,o=a.domain();if(n>0&&o.length==2){const u=o[1]-o[0],l=o[0]+u/2,c=r[1]-r[0],f=r[0]+c/2;await i.transition({duration:n,easingFunction:WR,onUpdate:h=>{const d=ZR(u,c,h),p=(u-d)/(u-c),m=p*f+(1-p)*l;a.domain([m-d/2,m+d/2]),J(this,Dn,Br).call(this,"domain")}}),a.domain(r),J(this,Dn,Br).call(this,"domain")}else a.domain(r),i==null||i.requestRender(),J(this,Dn,Br).call(this,"domain")}resetZoom(){if(!J(this,Er,va).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=J(this,Lo,Ah).call(this);return[0,1].some(r=>n[r]!=t[r])?(W(this,Jt).domain(n),J(this,Dn,Br).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?Du(W(this,Ar))/Du(this.scale.domain()):1}getGenome(){var n;if(this.type!=="locus")return;const t=(n=this.members[0].view.context.genomeStore)==null?void 0:n.getGenome();if(!t)throw new Error("No genome has been defined!");return t}invertToComplex(t){const n=this.scale;if("invert"in n){const r=n.invert(t);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(t){const n=this.getGenome();return n?n.toChromosomal(t):t}fromComplex(t){return Tw(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&jR(t)?this.getGenome().toContinuousInterval(t):t}}Ar=new WeakMap,Po=new WeakMap,Jt=new WeakMap,su=new WeakMap,lu=new WeakSet,gm=function(){return this.members[0].view},am=new WeakSet,QU=function(){return W(this,lu,gm).context},Dn=new WeakSet,Br=function(t){for(const n of W(this,Po)[t].values())n({type:t,scaleResolution:this})},uu=new WeakSet,mm=function(){return!!this.getConfiguredDomain()},ch=new WeakSet,W_=function(){const t=W(this,Jt);if(!t)return!1;const n=t.domain();return yt(t.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},fh=new WeakSet,Z_=function(){const t=this.members.map(n=>Zd(n.view,n.channel).scale).filter(n=>n!==void 0);return nf(t,"scale",["domain"])},cu=new WeakSet,bm=function(){const t=J(this,fh,Z_).call(this);if(t===null||t.type=="null")return{type:"null"};const n={...J(this,hh,Y_).call(this,this.type),...t};n.type||(n.type=XR(this.channel,this.type));const r=J(this,Lo,Ah).call(this);return r&&r.length>0?n.domain=r:Hn(n.type)&&(n.domain=new Bw),!n.domain&&n.domainMid!==void 0&&(n.domain=[n.domainMin??0,n.domainMax??1]),this.channel=="y"&&Hn(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),KR(n,this.channel),n},fu=new WeakSet,ym=function(){const t=W(this,Jt).props,n=t.range;if(W(this,su).forEach(i=>i.invalidate()),!n||!xt(n))return;const r=(i,a)=>a?i.slice().reverse():i;if(n.some(It)){let i;const a=()=>{W(this,Jt).range(r(i.map(o=>o()),t.reverse))};i=n.map(o=>{if(It(o)){const s=W(this,lu,gm).paramMediator.createExpression(o.expr);return s.addListener(a),W(this,su).add(s),()=>s(null)}else return()=>o}),a()}else W(this,Jt).range(r(n,t.reverse))},Lo=new WeakSet,Ah=function(){return this.getConfiguredDomain()??(this.type==Lw?this.getGenome().getExtent():this.getDataDomain())},Er=new WeakSet,va=function(){const t=this.scale.type;return yt(t)},hu=new WeakSet,wm=function(){const t=this.scale.props,n=t.zoom;if(JR(n)&&xt(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():W(this,Jt).domain()},hh=new WeakSet,Y_=function(t){const n=this.channel,r={};return J(this,uu,mm).call(this)&&(r.zero=!1),Vs(n)?r.nice=!J(this,uu,mm).call(this):$r(n)?r.scheme=t==Pw?"tableau10":t==Mw?"blues":"viridis":kc(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r},om=new WeakSet,XU=function(){return this.members.map(t=>t.view.getPathString()).join(", ")},du=new WeakSet,vm=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 XR(e,t){if(t==YR||t==Lw){if(T2(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][[Pw,Mw,Fw].indexOf(t)]:t==Fw?"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 KR(e,t){Vs(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&yt(e.type)&&(e.clamp=!0)}function JR(e){return kt(e)}function z0(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of Ot(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function U0(...e){for(const t of e)if(t!==void 0)return t}class e9{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=Es(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 Kc(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:nf(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=a=>{var s;const o=Zd(a.view,a.channel);if(!rn(o))return{member:a,explicitTitle:U0("axis"in o?(s=o.axis)==null?void 0:s.title:void 0,o.title),implicitTitle:U0(Gi(o)?o.field:void 0,Cc(o)?o.expr:void 0)}},n=this.members.map(t),r=n.filter(a=>{var o;if(js(a.member.channel)&&!a.explicitTitle){const s=Hi(a.member.channel);return((o=n.find(u=>u.member.view==a.member.view&&u.member.channel==s))==null?void 0:o.explicitTitle)===void 0}return!0}),i=new Set(r.map(a=>U0(a.explicitTitle,a.implicitTitle)).filter(Ue));return i.size?[...i].join(", "):null}}const t9={point:VD,rect:PD,rule:WD,link:eR,text:sR};class Yt extends Yi{constructor(t,n,r,i,a,o){super(t,n,r,i,a,o),this.spec=t;const s=t9[this.getMarkType()];if(s)this.mark=new s(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),this.needsAxes={x:!0,y:!0}}render(t,n,r={}){super.render(t,n,r),this.isConfiguredVisible()&&(t.pushView(this,n),t.renderMark(this.mark,r),t.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}resolve(t){t||(this.resolve("scale"),this.resolve("axis"));const n=this.mark.encoding;for(const[r,i]of Object.entries(n)){if(!Zt(i))continue;const a=Hi(i.resolutionChannel??r);if(!Na(a)||t=="axis"&&!Vs(a))continue;let o=this;for(;(o.getConfiguredOrDefaultResolution(a,t)=="forced"||o.dataParent instanceof Yi&&["shared","excluded","forced"].includes(o.dataParent.getConfiguredOrDefaultResolution(a,t)))&&o.getConfiguredOrDefaultResolution(a,t)!="excluded";)o=o.dataParent;if(t=="axis"&&Vs(r)&&T2(a))o.resolutions[t][a]||(o.resolutions[t][a]=new e9(a)),o.resolutions[t][a].pushUnitView(this,r);else if(t=="scale"&&Na(r)){if(!o.resolutions[t][a]){const s=new QR(a);o.resolutions[t][a]=s,s.addEventListener("range",u=>{var l;(l=this.context.glHelper)==null||l.createRangeTexture(u.scaleResolution,!0)})}o.resolutions[t][a].pushUnitView(this,r)}}}getAccessor(t){return this._cache("accessor/"+t,()=>{const n=this.mark.encoding;if(n&&n[t])return this.context.accessorFactory.createAccessor(n[t])})}getFacetAccessor(t){const n=this.getAccessor("sample");return n||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}_validateDomainQuery(t){if(js(t))throw new Error(`getDomain(${t}), must only be called for primary channels!`);const n=this.mark.encoding[t];if(!Zt(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 Rw(n.type??"nominal",i.fromComplexInterval(r))}}extractDataDomain(t){const r=this._validateDomainQuery(t).type??"nominal",i=s=>{let u;const l=this.mark.encoding[s];if(l){const c=this.context.accessorFactory.createAccessor(l);if(c)if(u=Rw(r),c.constant)u.extend(c({}));else{const f=this.getCollector();f!=null&&f.completed&&f.visitData(h=>u.extend(c(h)))}}return u};let a=i(t);const o=Yd[t];if(o){const s=i(o);s&&a.extendAll(s)}return a}getZoomLevel(){const t=n=>{var r;return((r=this.getScaleResolution(n))==null?void 0:r.getZoomLevel())??1};return Oa.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*G0(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of G0(r,[...t,n]))yield i;else yield[[...t,n],r]}class Ow extends et{get behavior(){return F0}constructor(t){super(),this.params=t??{type:"collect"},this.observers=[],this.facetBatches=void 0,this._init()}_init(){this._data=[],this.facetBatches=new Rr([],JSON.stringify),this.facetBatches.set(void 0,this._data)}reset(){super.reset(),this._init()}handle(t){this._data.push(t)}beginBatch(t){UD(t)&&(this._data=[],this.facetBatches.set(Ot(t.facetId),this._data))}complete(){var i,a;const t=(i=this.params)==null?void 0:i.sort,n=t?Bm(t.field,t.order):void 0,r=o=>{n&&o.sort(n)};if((a=this.params.groupby)!=null&&a.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const o=this.params.groupby.map(u=>Me(u)),s=o.length>1?Pu(this._data,...o):n9(this._data,o[0]);this.facetBatches.clear();for(const[u,l]of G0(s))this.facetBatches.set(u,l)}for(const o of this.facetBatches.values())r(o);if(this.children.length)for(const[o,s]of this.facetBatches.entries()){if(o){const u={type:"facet",facetId:o};for(const l of this.children)l.beginBatch(u)}for(const u of s)this._propagate(u)}super.complete();for(const o of this.observers)o(this)}getData(){switch(this._checkStatus(),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const t=this.facetBatches;return{[Symbol.iterator]:function*(){for(const r of t.values())for(let i=0;i<r.length;i++)yield r[i]}}}}}visitData(t){this._checkStatus();for(const n of this.facetBatches.values())for(let r=0;r<n.length;r++)t(n[r])}getItemCount(){let t=0;for(const n of this.facetBatches.values())t+=n.length;return t}_checkStatus(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")}}function n9(e,t){const n=new Map;for(let r=0,i=e.length;r<i;r++){const a=e[r],o=t(a);let s=n.get(o);s||(s=[],n.set(o,s)),s.push(a)}return n}class rf{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,n){let r=this.length++;for(;r>0;){const i=r-1>>1,a=this.values[i];if(n>=a)break;this.ids[r]=this.ids[i],this.values[r]=a,r=i}this.ids[r]=t,this.values[r]=n}pop(){if(this.length===0)return;const t=this.ids[0];if(this.length--,this.length>0){const n=this.ids[0]=this.ids[this.length],r=this.values[0]=this.values[this.length],i=this.length>>1;let a=0;for(;a<i;){let o=(a<<1)+1;const s=o+1;let u=this.ids[o],l=this.values[o];const c=this.values[s];if(s<this.length&&c<l&&(o=s,u=this.ids[s],l=c),l>=r)break;this.ids[a]=u,this.values[a]=l,a=o}this.ids[a]=n,this.values[a]=r}return t}peek(){if(this.length!==0)return this.ids[0]}peekValue(){if(this.length!==0)return this.values[0]}shrink(){this.ids.length=this.values.length=this.length}}class r9 extends et{get behavior(){return $n}constructor(t){super(),this.params=t,this.startAccessor=Me(t.start),this.endAccessor=Me(t.end),this.chromAccessor=t.chrom?Me(t.chrom):n=>{},this.weightAccessor=t.weight?Me(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 rf}reset(){super.reset(),this.initialize()}initialize(){const t=this.as.coverage,n=this.as.end,r=this.as.chrom,i=this.startAccessor,a=this.endAccessor,o=this.chromAccessor,s=this.weightAccessor;let u,l,c,f=0,h;const d=this.ends;d.clear();const p=(y,w,A)=>{if(y==w)return;let S=!1;u&&(u[t]===A?(u[n]=w,S=!0):u[t]!=0&&this._propagate(u)),S||(u=this.createSegment(y,w,A,c))},m=()=>{let y=0;for(;(y=d.peekValue())!==void 0;)p(h,y,f),h=y,f-=d.pop();h=void 0,u&&(this._propagate(u),u=void 0)};this.handle=y=>{const w=i(y);let A=0;for(;(A=d.peekValue())!==void 0&&A<w;)p(h,A,f),h=A,f-=d.pop();if(r){let _=o(y);_!==l&&(m(),c=_,l=c)}h!==void 0&&p(h,w,f),h=w;const S=s(y);f+=S,d.push(S,a(y))},this.complete=()=>{m(),super.complete()},this.beginBatch=y=>{m(),l=void 0,super.beginBatch(y)}}}function i9(e,t,n=0,r=e.length){const i=new rf,a=r-n;let o;for(o=0;o<t&&o<a;o++)i.push(o,e[n+o]);for(;o<a;o++){const l=e[n+o];l>=i.peekValue()&&(i.push(o,l),i.pop())}const s=[];let u;for(;(u=i.pop())!==void 0;)s.push(n+u);return s.reverse()}class a9{constructor(t,n=-1/0,r=1/0){this.maxSize=t,this.lowerLimit=n,this.upperLimit=r;const i=this.maxSize*2+1;this.lowerLimits=new Float64Array(i),this.upperLimits=new Float64Array(i),this.lowerChildren=new Int32Array(i),this.upperChildren=new Int32Array(i),this.reset()}reset(){this.lowerLimits.fill(0),this.upperLimits.fill(0),this.lowerChildren.fill(0),this.upperChildren.fill(0),this.n=1,this.lowerLimits[0]=this.lowerLimit,this.upperLimits[0]=this.upperLimit}_findSlot(t,n,r=0){if(t>=this.lowerLimits[r]&&n<=this.upperLimits[r]){const i=this.lowerChildren[r];if(i){const a=this._findSlot(t,n,i);return a>=0?a:this._findSlot(t,n,this.upperChildren[r])}else return r}else return-1}reserve(t,n){if(n-t<=0)throw new Error("Cannot reserve an empty or negative-size slot!");if(this.n+1>this.lowerLimits.length)return!1;const r=this._findSlot(t,n);if(r<0)return!1;const i=this.n++,a=this.n++;return this.lowerLimits[i]=this.lowerLimits[r],this.upperLimits[i]=t,this.lowerLimits[a]=n,this.upperLimits[a]=this.upperLimits[r],this.lowerChildren[r]=i,this.upperChildren[r]=a,!0}}class o9 extends et{get behavior(){return F0}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=Me(this.params.pos),this.posBisector=Mu(this.posAccessor),this.scoreAccessor=Me(this.params.score),this.widthAccessor=Me(this.params.width),this.laneAccessor=this.params.lane?Me(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 a9(200));this.schedule(),super.complete()}_filterAndPropagate(){var o;super.reset();const t=this.resolution.scale,n=(o=this.resolution.members[0].view.coords)==null?void 0:o[this.channel=="x"?"width":"height"];if(!n)return;for(const s of this.reservationMaps.values())s.reset();const r=t.domain(),i=70,a=i9(this._scores,i,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of a){const u=this._data[s],l=t(this.posAccessor(u))*n,c=this.widthAccessor(u)/2+this.padding;this.reservationMaps.get(this.laneAccessor(u)).reserve(l-c,l+c)&&this._propagate(u)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class s9 extends et{constructor(t){super(),this.params=t,this.predicate=void 0}initialize(){this.predicate=sc(this.params.expr,this.getGlobalObject())}handle(t){this.predicate(t)&&this._propagate(t)}}class l9 extends et{get behavior(){return $n}constructor(t){super();const n=t.index;if(t.fields){const r=Ot(t.fields).map(a=>Me(a)),i=Ot(t.as||t.fields);if(r.length!==i.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${i.length}) do not match!`);this.handle=a=>{const o=r.map((u,l)=>u(a)??[]),s=o[0].length;for(let u=0;u<s;u++){const l=Object.assign({},a);for(let c=0;c<r.length;c++)l[i[c]]=u<o[c].length?o[c][u]:null;n&&(l[n]=u),this._propagate(l)}}}else this.handle=r=>{for(let i=0;i<r.length;i++){const a=Object.assign({},r[i]);n&&(a[n]=i),this._propagate(a)}}}}const u9="0".charCodeAt(0);function*c9(e,t=","){const n=t.charCodeAt(0);let r=0;for(let i=0;i<e.length;i++){const a=e.charCodeAt(i);a==n?(yield r,r=0):r=r*10+a-u9}yield r}class f9 extends et{get behavior(){return $n}constructor(t){super();const n=Me(t.exons??"exons"),r=Me(t.start??"start"),[i,a]=t.as||["exonStart","exonEnd"];this.handle=o=>{let s=r(o),u=s,l=!0;const c=n(o);for(const f of c9(c)){if(l)u=s+f;else{s=u+f;const h=Object.assign({},o);h[i]=u,h[a]=s,this._propagate(h)}l=!l}}}}class h9 extends et{get behavior(){return $n}constructor(t){super();const n=Ot(t.field).map(a=>Me(a)),r=Ot(t.separator),i=Ot(t.as||t.field);if(n.length!==r.length||n.length!==i.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${n.length}), and "as" (${i.length}) do not match!`);this.handle=a=>{if(n.some(u=>!u(a)))return;const o=n.map((u,l)=>u(a).split(r[l]));d9(o,a);const s=o[0].length;for(let u=0;u<s;u++){const l=Object.assign({},a);for(let c=0;c<n.length;c++)l[i[c]]=o[c][u];this._propagate(l)}}}}function d9(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 p9 extends et{get behavior(){return Kr}constructor(t){super(),this.params=t,this.as=t.as,this.fn=void 0}initialize(){this.fn=sc(this.params.expr,this.getGlobalObject())}handle(t){t[this.as]=this.fn(t),this._propagate(t)}}class Nw extends et{get behavior(){return Kr}constructor(t,n){super();const r=t.channel??"x";if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const i=n.getScaleResolution(r).getGenome();if(!i)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const a=Me(t.chrom),o=Ot(t.pos).map(p=>Me(p)),s=Ot(t.as);if(o.length!=s.length)throw new Error('The number of "pos" and "as" elements must be equal!');const u=Ot(t.offset);let l;if(u.length==0)l=new Array(o.length).fill(0);else if(u.length==1)l=new Array(o.length).fill(u[0]);else if(u.length==o.length)l=u;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(t.offset)}!`);const c=new Function("datum","chromOffset","posAccessors",s.map((p,m)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${m}](datum) - ${l[m]};`).join(`
354
- `));let f,h=0;const d=p=>{if(p!==f){if(h=i.cumulativeChromPositions.get(p),h===void 0)throw new Error("Unknown chromosome/contig: "+p);f=p}return h};this.handle=p=>{c(p,d(a(p)),o),this._propagate(p)}}}const zw={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 g9 extends et{get behavior(){return Kr}constructor(t){super();const n=B0(zw),r=Me(t.field),i=t.as,a=t.fontSize;this.handle=o=>{const s=r(o);s!==void 0?o[i]=n.measureWidth(s,a):o[i]=0,this._propagate(o)}}}const m9=65536;class b9 extends et{get behavior(){return Kr}constructor(t){super(),this.params=t}reset(){super.reset(),this.initialize()}initialize(){const t=this.params,n=t.as||"lane",r=Tt(t.spacing)?t.spacing:1,i=Me(t.start),a=Me(t.end);if(!t.preference!=!t.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(t.preference){const o=new Float64Array(m9),s=Me(t.preference),u=t.preferredOrder;let l=1/0;this.handle=c=>{const f=i(c);f<l&&o.fill(-1/0),l=f;const h=u.indexOf(s(c));let d=-1;if(h>=0&&o[h]<f)d=h;else{const p=i(c);for(d=0;d<o.length&&!(o[d]<p);d++);if(d>=o.length)throw new Error("Out of lanes!")}o[d]=a(c)+r,c[n]=d,this._propagate(c)}}else{const o=new rf,s=new rf;let u=-1/0,l=0;this.handle=c=>{const f=i(c);for(;o.length&&(o.peekValue()<=f||f<u);){const d=o.pop();s.push(d,d)}u=f;let h=s.pop();h===void 0&&(h=l++),c[n]=h,this._propagate(c),o.push(h,a(c)+r)}}}}class y9 extends et{get behavior(){return $n}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=>Me(i)),r=t.as?t.as:n.map(Aa);this.handle=i=>{const a={};for(let o=0;o<n.length;o++)a[r[o]]=n[o](i);this._propagate(a)}}}class w9 extends et{get behavior(){return Kr}constructor(t){super();const n=new RegExp(t.regex),r=typeof t.as=="string"?[t.as]:t.as,i=Me(t.field);this.handle=a=>{const o=i(a);if(Ue(o)){const s=o.match(n);if(s){if(s.length-1!=r.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let u=0;u<r.length;u++)a[r[u]]=s[u+1]}else if(t.skipInvalidInput)for(let u=0;u<r.length;u++)a[r[u]]=void 0;else throw new Error(`"${o}" does not match the given regex: ${n.toString()}`)}else if(!t.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof o}, field content: "${o}".`);this._propagate(a)}}}class v9 extends et{get behavior(){return $n}constructor(t){super();const n=Ot(t.columnRegex).map(h=>new RegExp(h)),r=Ot(t.asValue);if(n.length!=r.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const i=t.skipRegex?new RegExp(t.skipRegex):void 0,a=t.asKey||"sample";let o,s,u;const l=h=>{var y;const d=Object.keys(h);for(const w of n)if(!d.some(A=>w.test(A)))throw new Error(`No columns matching the regex ${w.toString()} found in the data!`);const p=new Map;for(const[w,A]of n.entries())for(const S of d){const _=(y=A.exec(S))==null?void 0:y[1];if(_!==void 0){let T=p.get(_);T||(T=[],p.set(_,T)),T[w]=S}}o=[...p.entries()],s=d.filter(w=>!n.some(A=>A.test(w))&&!(i&&i.test(w)));const m=[...s.map(w=>JSON.stringify(w)+": datum["+JSON.stringify(w)+"]"),JSON.stringify(a)+": sampleId",...r.map((w,A)=>JSON.stringify(w)+`: datum[attrs[${A}]]`)];u=new Function("datum","sampleId","attrs",`return {
357
+ */const kR="locus",TR="index";var IR=5;function BR(e){const t=e.type;return!e.bins&&(t===Pa||t===Os||t===Ns)}function _w(e){return yt(e)&&![Gn,TR,kR].includes(e)}function Sw(e){return e||{warn:(t,...n)=>console.warn(t,...n)}}var DR=Mu(["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 Cw(e,t,n){n=Sw(n);for(const r in e)if(!DR[r]){if(r==="padding"&&_w(t.type))continue;Pt(t[r])?t[r](e[r]):n.warn("Unsupported scale property: "+r)}zR(t,e,NR(t,e,PR(t,e,n)))}function RR(e,t){const n=FR(e),r=Ee(n);if(!r)throw new Error("Unknown scale type: "+n);const i=r();return!e.domain&&yt(i.type)&&(e.domain=[0,0]),Cw(e,i,t),i}function FR(e){var t=e.type,n="",r;return t===Gn?Gn+"-"+Pa:(MR(e)&&(r=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=r===2?Gn+"-":r===3?La+"-":""),(n+t||Pa).toLowerCase())}function MR(e){const t=e.type;return yt(t)&&t!==m2&&t!==b2&&(e.scheme||e.range&&e.range.length&&e.range.every(Ue))}function PR(e,t,n){if(!e.domain)return 0;n=Sw(n);var r=LR(e,t.domainRaw,n);if(r>-1)return r;var i=t.domain,a=e.type,o=t.zero||t.zero===void 0&&BR(e),s,u;return i?(_w(a)&&t.padding&&i[0]!==vn(i)&&(i=OR(a,i,t.range,t.padding,t.exponent,t.constant)),(o||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(s=(i=i.slice()).length-1||1,o&&(i[0]>0&&(i[0]=0),i[s]<0&&(i[s]=0)),t.domainMin!=null&&(i[0]=t.domainMin),t.domainMax!=null&&(i[s]=t.domainMax),t.domainMid!=null&&(u=t.domainMid,(u<i[0]||u>i[s])&&n.warn("Scale domainMid exceeds domain min or max.",u),i.splice(s,0,u))),e.domain(kw(a,i,n)),a===Vd&&e.unknown(t.domainImplicit?cd:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&Aw(e,t.nice)||null),i.length):0}function LR(e,t,n){return t?(e.domain(kw(e.type,t,n)),t.length):-1}function OR(e,t,n,r,i,a){var o=Math.abs(vn(n)-n[0]),s=o/(o-2*r),u=e===jr?Bm(t,null,s):e===Ns?Ch(t,null,s,.5):e===Os?Ch(t,null,s,i||1):e===vc?p4(t,null,s,a||1):Im(t,null,s);return t=t.slice(),t[0]=u[0],t[t.length-1]=u[1],t}function kw(e,t,n){if(_2(e)){var r=Math.abs(t.reduce(function(i,a){return i+(a<0?-1:a>0?1:0)},0));r!==t.length&&n.warn("Log scale domain includes zero: "+Fu(t))}return t}function NR(e,t,n){let r=t.bins;if(r&&!xt(r)){const i=(r.start==null||r.stop==null)&&e.domain(),a=r.start==null?i[0]:r.start,o=r.stop==null?vn(i):r.stop,s=r.step;s||Qe("Scale bins parameter missing step property."),r=Ko(a,o+s,s)}return r?e.bins=r:e.bins&&delete e.bins,e.type===$d&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function zR(e,t,n){var r=e.type,i=t.round||!1,a=t.range;if(t.rangeStep!=null)a=UR(r,t,n);else if(t.scheme&&(a=GR(r,t,n),Pt(a))){if(e.interpolator)return e.interpolator(a);Qe(`Scale type ${r} does not support interpolating color schemes.`)}if(a&&Ac(r))return e.interpolator(Ec(O0(a,t.reverse),t.interpolate,t.interpolateGamma));a&&t.interpolate&&e.interpolate?e.interpolate(S2(t.interpolate,t.interpolateGamma)):Pt(e.round)?e.round(i):Pt(e.rangeRound)&&e.interpolate(i?Ps:Hr),a&&e.range(O0(a,t.reverse))}function UR(e,t,n){e!==v2&&e!==jd&&Qe("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===jd?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*Gd(n,i,r)]}function GR(e,t,n){var r=t.schemeExtent,i,a;return xt(t.scheme)?a=Ec(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),a=Wd(i),a||Qe(`Unrecognized scheme name: ${t.scheme}`)),n=e===w2?n+1:e===$d?n-1:e===Hd||e===y2?+t.schemeCount||IR:n,Ac(e)?Tw(a,r,t.reverse):Pt(a)?tk(Tw(a,r),n):e===Vd?a:a.slice(0,n)}function Tw(e,t,n){return Pt(e)&&(t||n)?ek(e,O0(t||[0,1],n)):e}function O0(e,t){return t?e.slice().reverse():e}const Iw=mt(",d");function HR(e,t){return e.chrom+":"+Iw(Math.floor(e.pos+1))+"-"+(e.chrom!=t.chrom?t.chrom+":":"")+Iw(Math.ceil(t.pos))}const VR="https://genomespy.app/data/genomes/";class jR{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=VR;try{this.setChromSizes($R(await Xu({baseURL:this.baseUrl}).load(`${this.config.name}/${this.name}.chrom.sizes`)))}catch(n){throw new Error(`Could not load chrom sizes: ${n.message}`)}}}hasChrPrefix(){return this.chromosomes.some(t=>t.name.startsWith("chr"))}setChromSizes(t){let n=0;this.startByIndex=[0];for(let r=0;r<t.length;r++){this.startByIndex.push(n);const i=t[r].size,a={...t[r],continuousStart:n,continuousEnd:n+i,continuousInterval:[n,n+i],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(a);const o=a.name.replace(/^chr/i,"");for(const s of["chr"+o,"CHR"+o,"Chr"+o,a.number,""+a.number,o,a.name])this.cumulativeChromPositions.set(s,n),this.chromosomesByName.set(s,a);n+=a.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(t,n){let r=this.cumulativeChromPositions.get(t);if(r===void 0)throw new Error("Unknown chromosome/contig: "+t);return r+ +n}toChromosome(t){if(t>this.totalSize)return;t=Math.floor(t);const n=Dr(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 HR(...this.toChromosomalInterval(t))}toChromosomalInterval(t){const n=this.toChromosomal(t[0]+.5),r=this.toChromosomal(t[1]-.5);return r.pos+=1,[n,r]}toContinuousInterval(t){var i;let[n,r]=t;return r||(r=n),[this.toContinuous(n.chrom,n.pos??0),this.toContinuous(r.chrom,r.pos??((i=this.chromosomesByName.get(r.chrom))==null?void 0:i.size))]}toDiscreteChromosomeIntervals(t){const n=t[0],r=t[1],i=[];if(n.chrom===r.chrom)i.push({chrom:n.chrom,startPos:n.pos,endPos:r.pos});else{const a=this.chromosomes.findIndex(s=>s.name===n.chrom),o=this.chromosomes.findIndex(s=>s.name===r.chrom);i.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[a].size});for(let s=a+1;s<o;s++)i.push({chrom:this.chromosomes[s].name,startPos:0,endPos:this.chromosomes[s].size});i.push({chrom:r.chrom,startPos:0,endPos:r.pos})}return i}continuousToDiscreteChromosomeIntervals(t){return this.toDiscreteChromosomeIntervals([this.toChromosomal(t[0]),this.toChromosomal(t[1])])}parseInterval(t){const n=t.match(/^(chr[0-9A-Z]+)(?::([0-9,]+)(?:-(?:(chr[0-9A-Z]+):)?([0-9,]+))?)?$/);if(n){const r=n[1];if(n.slice(2).every(s=>s===void 0)){const s=this.getChromosome(r);return s?[s.continuousStart,s.continuousEnd]:void 0}const i=n[3]||r,a=parseInt(n[2].replace(/,/g,"")),o=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):a;return[this.toContinuous(r,a-1),this.toContinuous(i,o)]}}}function $R(e){return F4(e).filter(t=>/^chr[0-9A-Z]+$/.test(t[0])).map(([t,n])=>({name:t,size:parseInt(n)}))}function Bw(e){return kt(e)&&"chrom"in e}function qR(e){return e.every(Bw)}class rl extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof rl&&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 N0 extends rl{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 Dw extends rl{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 Rw extends Dw{constructor(){super(),this.type="nominal"}}class WR extends rl{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 Fw={quantitative:N0,index:N0,locus:N0,nominal:Rw,ordinal:Dw};function Mw(e,t){if(e=="quantitative"&&ZR(t)){const n=new WR(t);return n.type=e,n}else if(Fw[e]){const n=new Fw[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function ZR(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function YR(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function QR(e,t,n){return e*Math.pow(t/e,n)}Ee("index",L0,["continuous"]),Ee("locus",yR,["continuous"]),Ee("null",_c,[]);const Pw="quantitative",Lw="ordinal",Ow="nominal",Nw="locus",XR="index";class KR{constructor(t){K(this,lu);K(this,am);K(this,Dn);K(this,uu);K(this,ch);K(this,fh);K(this,cu);K(this,fu);K(this,Lo);K(this,Er);K(this,hu);K(this,hh);K(this,om);K(this,du);K(this,Ar,void 0);K(this,Po,{domain:new Set,range:new Set});K(this,en,void 0);K(this,su,new Set);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){W(this,Po)[t].add(n)}removeEventListener(t,n){W(this,Po)[t].delete(n)}pushUnitView(t,n){var o;const r=Zd(t,n),i=r.type,a=(o=r==null?void 0:r.scale)==null?void 0:o.name;if(a){if(this.name!==void 0&&a!=this.name)throw new Error(`Shared scales have conflicting names: "${a}" vs. "${this.name}"!`);this.name=a}if(!this.type)this.type=i;else if(i!==this.type&&!js(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${i}. Use "resolve: independent" for channel ${this.channel}`);this.members.push({view:t,channel:n})}getConfiguredDomain(){return J(this,du,vm).call(this,t=>js(t.channel)?void 0:t.view.getConfiguredDomain(t.channel))}getDataDomain(){return J(this,du,vm).call(this,t=>js(t.channel)?void 0:t.view.extractDataDomain(t.channel))}reconfigure(){const t=W(this,en);if(!t||t.type=="null")return;const n=J(this,ch,Q_).call(this),r=t.domain(),i=J(this,cu,bm).call(this);if(Cw({...i,range:void 0},t),t.props=i,J(this,fu,ym).call(this),yt(t.type)&&Fe(this,Ar,J(this,hu,wm).call(this)),!n){J(this,Dn,Br).call(this,"domain");return}const a=t.domain();td(a,r)||(this.isZoomable()?t.domain(r):J(this,Er,va).call(this)?(t.domain(r),this.zoomTo(a,500)):J(this,Dn,Br).call(this,"domain"))}get scale(){if(W(this,en))return W(this,en);const t=J(this,cu,bm).call(this),n=RR({...t,range:void 0});n.props=t,Fe(this,en,n),J(this,fu,ym).call(this),wR(n)&&n.genome(this.getGenome()),yt(n.type)&&Fe(this,Ar,J(this,hu,wm).call(this));const r=n.range;if(r){const i=()=>J(this,Dn,Br).call(this,"range");n.range=function(a){if(arguments.length)r(a),i();else return r()},i()}return n}getDomain(){return this.scale.domain()}getComplexDomain(){var t;return((t=this.getGenome())==null?void 0:t.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return J(this,Er,va).call(this)&&td(J(this,Lo,Ah).call(this),this.getDomain())}isZoomable(){return J(this,Er,va).call(this)&&!!this.scale.props.zoom}zoom(t,n,r){if(!J(this,Er,va).call(this))return!1;const i=this.scale,a=i.domain();let o=[...a],s=i.invert(n);switch(i.props.reverse&&(r=-r),"align"in i&&(s+=i.align()),i.type){case"linear":case"index":case"locus":o=f4(o,r||0),o=Im(o,s,t);break;case"log":o=h4(o,r||0),o=Bm(o,s,t);break;case"pow":case"sqrt":{const u=i;o=d4(o,r||0,u.exponent()),o=Ch(o,s,t,u.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return W(this,Ar)&&(o=g4(o,W(this,Ar)[0],W(this,Ar)[1])),[0,1].some(u=>o[u]!=a[u])?(i.domain(o),J(this,Dn,Br).call(this,"domain"),!0):!1}async zoomTo(t,n=!1){var s;if(Yo(n)&&(n=n?700:0),!J(this,Er,va).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(t),i=(s=this.members[0])==null?void 0:s.view.context.animator,a=this.scale,o=a.domain();if(n>0&&o.length==2){const u=o[1]-o[0],l=o[0]+u/2,c=r[1]-r[0],f=r[0]+c/2;await i.transition({duration:n,easingFunction:YR,onUpdate:h=>{const d=QR(u,c,h),p=(u-d)/(u-c),m=p*f+(1-p)*l;a.domain([m-d/2,m+d/2]),J(this,Dn,Br).call(this,"domain")}}),a.domain(r),J(this,Dn,Br).call(this,"domain")}else a.domain(r),i==null||i.requestRender(),J(this,Dn,Br).call(this,"domain")}resetZoom(){if(!J(this,Er,va).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=J(this,Lo,Ah).call(this);return[0,1].some(r=>n[r]!=t[r])?(W(this,en).domain(n),J(this,Dn,Br).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?Ru(W(this,Ar))/Ru(this.scale.domain()):1}getGenome(){var n;if(this.type!=="locus")return;const t=(n=this.members[0].view.context.genomeStore)==null?void 0:n.getGenome();if(!t)throw new Error("No genome has been defined!");return t}invertToComplex(t){const n=this.scale;if("invert"in n){const r=n.invert(t);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(t){const n=this.getGenome();return n?n.toChromosomal(t):t}fromComplex(t){return Bw(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&qR(t)?this.getGenome().toContinuousInterval(t):t}}Ar=new WeakMap,Po=new WeakMap,en=new WeakMap,su=new WeakMap,lu=new WeakSet,gm=function(){return this.members[0].view},am=new WeakSet,KU=function(){return W(this,lu,gm).context},Dn=new WeakSet,Br=function(t){for(const n of W(this,Po)[t].values())n({type:t,scaleResolution:this})},uu=new WeakSet,mm=function(){return!!this.getConfiguredDomain()},ch=new WeakSet,Q_=function(){const t=W(this,en);if(!t)return!1;const n=t.domain();return yt(t.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},fh=new WeakSet,X_=function(){const t=this.members.map(n=>Zd(n.view,n.channel).scale).filter(n=>n!==void 0);return nf(t,"scale",["domain"])},cu=new WeakSet,bm=function(){const t=J(this,fh,X_).call(this);if(t===null||t.type=="null")return{type:"null"};const n={...J(this,hh,K_).call(this,this.type),...t};n.type||(n.type=JR(this.channel,this.type));const r=J(this,Lo,Ah).call(this);return r&&r.length>0?n.domain=r:Hn(n.type)&&(n.domain=new Rw),!n.domain&&n.domainMid!==void 0&&(n.domain=[n.domainMin??0,n.domainMax??1]),this.channel=="y"&&Hn(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),e9(n,this.channel),n},fu=new WeakSet,ym=function(){const t=W(this,en).props,n=t.range;if(W(this,su).forEach(i=>i.invalidate()),!n||!xt(n))return;const r=(i,a)=>a?i.slice().reverse():i;if(n.some(It)){let i;const a=()=>{W(this,en).range(r(i.map(o=>o()),t.reverse))};i=n.map(o=>{if(It(o)){const s=W(this,lu,gm).paramMediator.createExpression(o.expr);return s.addListener(a),W(this,su).add(s),()=>s(null)}else return()=>o}),a()}else W(this,en).range(r(n,t.reverse))},Lo=new WeakSet,Ah=function(){return this.getConfiguredDomain()??(this.type==Nw?this.getGenome().getExtent():this.getDataDomain())},Er=new WeakSet,va=function(){const t=this.scale.type;return yt(t)},hu=new WeakSet,wm=function(){const t=this.scale.props,n=t.zoom;if(t9(n)&&xt(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():W(this,en).domain()},hh=new WeakSet,K_=function(t){const n=this.channel,r={};return J(this,uu,mm).call(this)&&(r.zero=!1),Vs(n)?r.nice=!J(this,uu,mm).call(this):$r(n)?r.scheme=t==Ow?"tableau10":t==Lw?"blues":"viridis":kc(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r},om=new WeakSet,JU=function(){return this.members.map(t=>t.view.getPathString()).join(", ")},du=new WeakSet,vm=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 JR(e,t){if(t==XR||t==Nw){if(B2(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][[Ow,Lw,Pw].indexOf(t)]:t==Pw?"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 e9(e,t){Vs(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&yt(e.type)&&(e.clamp=!0)}function t9(e){return kt(e)}function z0(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of Ot(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function U0(...e){for(const t of e)if(t!==void 0)return t}class n9{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=Es(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 Kc(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:nf(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=a=>{var s;const o=Zd(a.view,a.channel);if(!on(o))return{member:a,explicitTitle:U0("axis"in o?(s=o.axis)==null?void 0:s.title:void 0,o.title),implicitTitle:U0(Gi(o)?o.field:void 0,Cc(o)?o.expr:void 0)}},n=this.members.map(t),r=n.filter(a=>{var o;if(js(a.member.channel)&&!a.explicitTitle){const s=Hi(a.member.channel);return((o=n.find(u=>u.member.view==a.member.view&&u.member.channel==s))==null?void 0:o.explicitTitle)===void 0}return!0}),i=new Set(r.map(a=>U0(a.explicitTitle,a.implicitTitle)).filter(Ue));return i.size?[...i].join(", "):null}}const r9={point:$D,rect:ND,rule:YD,link:nR,text:uR};class Qt extends Yi{constructor(t,n,r,i,a,o){super(t,n,r,i,a,o),this.spec=t;const s=r9[this.getMarkType()];if(s)this.mark=new s(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),this.needsAxes={x:!0,y:!0}}render(t,n,r={}){super.render(t,n,r),this.isConfiguredVisible()&&(t.pushView(this,n),t.renderMark(this.mark,r),t.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}resolve(t){t||(this.resolve("scale"),this.resolve("axis"));const n=this.mark.encoding;for(const[r,i]of Object.entries(n)){if(!Yt(i))continue;const a=Hi(i.resolutionChannel??r);if(!Na(a)||t=="axis"&&!Vs(a))continue;let o=this;for(;(o.getConfiguredOrDefaultResolution(a,t)=="forced"||o.dataParent instanceof Yi&&["shared","excluded","forced"].includes(o.dataParent.getConfiguredOrDefaultResolution(a,t)))&&o.getConfiguredOrDefaultResolution(a,t)!="excluded";)o=o.dataParent;if(t=="axis"&&Vs(r)&&B2(a))o.resolutions[t][a]||(o.resolutions[t][a]=new n9(a)),o.resolutions[t][a].pushUnitView(this,r);else if(t=="scale"&&Na(r)){if(!o.resolutions[t][a]){const s=new KR(a);o.resolutions[t][a]=s,s.addEventListener("range",u=>{var l;(l=this.context.glHelper)==null||l.createRangeTexture(u.scaleResolution,!0)})}o.resolutions[t][a].pushUnitView(this,r)}}}getAccessor(t){return this._cache("accessor/"+t,()=>{const n=this.mark.encoding;if(n&&n[t])return this.context.accessorFactory.createAccessor(n[t])})}getFacetAccessor(t){const n=this.getAccessor("sample");return n||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}_validateDomainQuery(t){if(js(t))throw new Error(`getDomain(${t}), must only be called for primary channels!`);const n=this.mark.encoding[t];if(!Yt(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 Mw(n.type??"nominal",i.fromComplexInterval(r))}}extractDataDomain(t){const r=this._validateDomainQuery(t).type??"nominal",i=s=>{let u;const l=this.mark.encoding[s];if(l){const c=this.context.accessorFactory.createAccessor(l);if(c)if(u=Mw(r),c.constant)u.extend(c({}));else{const f=this.getCollector();f!=null&&f.completed&&f.visitData(h=>u.extend(c(h)))}}return u};let a=i(t);const o=Yd[t];if(o){const s=i(o);s&&a.extendAll(s)}return a}getZoomLevel(){const t=n=>{var r;return((r=this.getScaleResolution(n))==null?void 0:r.getZoomLevel())??1};return Oa.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*G0(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of G0(r,[...t,n]))yield i;else yield[[...t,n],r]}class zw extends tt{constructor(n){super();K(this,pu);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=void 0,this._init()}get behavior(){return F0}_init(){this._data=[],this.facetBatches=new Rr([],JSON.stringify),this.facetBatches.set(void 0,this._data)}reset(){super.reset(),this._init()}handle(n){this._data.push(n)}beginBatch(n){HD(n)&&(this._data=[],this.facetBatches.set(Ot(n.facetId),this._data))}complete(){var a,o;const n=(a=this.params)==null?void 0:a.sort,r=n?Dm(n.field,n.order):void 0,i=s=>{r&&s.sort(r)};if((o=this.params.groupby)!=null&&o.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const s=this.params.groupby.map(l=>Me(l)),u=s.length>1?Lu(this._data,...s):i9(this._data,s[0]);this.facetBatches.clear();for(const[l,c]of G0(u))this.facetBatches.set(l,c)}for(const s of this.facetBatches.values())i(s);J(this,pu,xm).call(this),super.complete();for(const s of this.observers)s(this)}repropagate(){for(const n of this.children)n.reset();J(this,pu,xm).call(this);for(const n of this.children)n.complete()}getData(){switch(this._checkStatus(),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const n=this.facetBatches;return{[Symbol.iterator]:function*(){for(const i of n.values())for(let a=0;a<i.length;a++)yield i[a]}}}}}visitData(n){this._checkStatus();for(const r of this.facetBatches.values())for(let i=0;i<r.length;i++)n(r[i])}getItemCount(){let n=0;for(const r of this.facetBatches.values())n+=r.length;return n}_checkStatus(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")}}pu=new WeakSet,xm=function(){if(this.children.length)for(const[n,r]of this.facetBatches.entries()){if(n){const i={type:"facet",facetId:n};for(const a of this.children)a.beginBatch(i)}for(const i of r)this._propagate(i)}};function i9(e,t){const n=new Map;for(let r=0,i=e.length;r<i;r++){const a=e[r],o=t(a);let s=n.get(o);s||(s=[],n.set(o,s)),s.push(a)}return n}class rf{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,n){let r=this.length++;for(;r>0;){const i=r-1>>1,a=this.values[i];if(n>=a)break;this.ids[r]=this.ids[i],this.values[r]=a,r=i}this.ids[r]=t,this.values[r]=n}pop(){if(this.length===0)return;const t=this.ids[0];if(this.length--,this.length>0){const n=this.ids[0]=this.ids[this.length],r=this.values[0]=this.values[this.length],i=this.length>>1;let a=0;for(;a<i;){let o=(a<<1)+1;const s=o+1;let u=this.ids[o],l=this.values[o];const c=this.values[s];if(s<this.length&&c<l&&(o=s,u=this.ids[s],l=c),l>=r)break;this.ids[a]=u,this.values[a]=l,a=o}this.ids[a]=n,this.values[a]=r}return t}peek(){if(this.length!==0)return this.ids[0]}peekValue(){if(this.length!==0)return this.values[0]}shrink(){this.ids.length=this.values.length=this.length}}class a9 extends tt{get behavior(){return $n}constructor(t){super(),this.params=t,this.startAccessor=Me(t.start),this.endAccessor=Me(t.end),this.chromAccessor=t.chrom?Me(t.chrom):n=>{},this.weightAccessor=t.weight?Me(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 rf}reset(){super.reset(),this.initialize()}initialize(){const t=this.as.coverage,n=this.as.end,r=this.as.chrom,i=this.startAccessor,a=this.endAccessor,o=this.chromAccessor,s=this.weightAccessor;let u,l,c,f=0,h;const d=this.ends;d.clear();const p=(y,w,A)=>{if(y==w)return;let S=!1;u&&(u[t]===A?(u[n]=w,S=!0):u[t]!=0&&this._propagate(u)),S||(u=this.createSegment(y,w,A,c))},m=()=>{let y=0;for(;(y=d.peekValue())!==void 0;)p(h,y,f),h=y,f-=d.pop();h=void 0,u&&(this._propagate(u),u=void 0)};this.handle=y=>{const w=i(y);let A=0;for(;(A=d.peekValue())!==void 0&&A<w;)p(h,A,f),h=A,f-=d.pop();if(r){let _=o(y);_!==l&&(m(),c=_,l=c)}h!==void 0&&p(h,w,f),h=w;const S=s(y);f+=S,d.push(S,a(y))},this.complete=()=>{m(),super.complete()},this.beginBatch=y=>{m(),l=void 0,super.beginBatch(y)}}}function o9(e,t,n=0,r=e.length){const i=new rf,a=r-n;let o;for(o=0;o<t&&o<a;o++)i.push(o,e[n+o]);for(;o<a;o++){const l=e[n+o];l>=i.peekValue()&&(i.push(o,l),i.pop())}const s=[];let u;for(;(u=i.pop())!==void 0;)s.push(n+u);return s.reverse()}class s9{constructor(t,n=-1/0,r=1/0){this.maxSize=t,this.lowerLimit=n,this.upperLimit=r;const i=this.maxSize*2+1;this.lowerLimits=new Float64Array(i),this.upperLimits=new Float64Array(i),this.lowerChildren=new Int32Array(i),this.upperChildren=new Int32Array(i),this.reset()}reset(){this.lowerLimits.fill(0),this.upperLimits.fill(0),this.lowerChildren.fill(0),this.upperChildren.fill(0),this.n=1,this.lowerLimits[0]=this.lowerLimit,this.upperLimits[0]=this.upperLimit}_findSlot(t,n,r=0){if(t>=this.lowerLimits[r]&&n<=this.upperLimits[r]){const i=this.lowerChildren[r];if(i){const a=this._findSlot(t,n,i);return a>=0?a:this._findSlot(t,n,this.upperChildren[r])}else return r}else return-1}reserve(t,n){if(n-t<=0)throw new Error("Cannot reserve an empty or negative-size slot!");if(this.n+1>this.lowerLimits.length)return!1;const r=this._findSlot(t,n);if(r<0)return!1;const i=this.n++,a=this.n++;return this.lowerLimits[i]=this.lowerLimits[r],this.upperLimits[i]=t,this.lowerLimits[a]=n,this.upperLimits[a]=this.upperLimits[r],this.lowerChildren[r]=i,this.upperChildren[r]=a,!0}}class l9 extends tt{get behavior(){return F0}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=Me(this.params.pos),this.posBisector=Pu(this.posAccessor),this.scoreAccessor=Me(this.params.score),this.widthAccessor=Me(this.params.width),this.laneAccessor=this.params.lane?Me(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 s9(200));this.schedule(),super.complete()}_filterAndPropagate(){var o;super.reset();const t=this.resolution.scale,n=(o=this.resolution.members[0].view.coords)==null?void 0:o[this.channel=="x"?"width":"height"];if(!n)return;for(const s of this.reservationMaps.values())s.reset();const r=t.domain(),i=70,a=o9(this._scores,i,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of a){const u=this._data[s],l=t(this.posAccessor(u))*n,c=this.widthAccessor(u)/2+this.padding;this.reservationMaps.get(this.laneAccessor(u)).reserve(l-c,l+c)&&this._propagate(u)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class u9 extends tt{constructor(t){super(),this.params=t,this.predicate=void 0}initialize(){this.predicate=this.paramMediator.createExpression(this.params.expr),this.predicate.addListener(()=>this.repropagate())}handle(t){this.predicate(t)&&this._propagate(t)}}class c9 extends tt{get behavior(){return $n}constructor(t){super();const n=t.index;if(t.fields){const r=Ot(t.fields).map(a=>Me(a)),i=Ot(t.as||t.fields);if(r.length!==i.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${i.length}) do not match!`);this.handle=a=>{const o=r.map((u,l)=>u(a)??[]),s=o[0].length;for(let u=0;u<s;u++){const l=Object.assign({},a);for(let c=0;c<r.length;c++)l[i[c]]=u<o[c].length?o[c][u]:null;n&&(l[n]=u),this._propagate(l)}}}else this.handle=r=>{for(let i=0;i<r.length;i++){const a=Object.assign({},r[i]);n&&(a[n]=i),this._propagate(a)}}}}const f9="0".charCodeAt(0);function*h9(e,t=","){const n=t.charCodeAt(0);let r=0;for(let i=0;i<e.length;i++){const a=e.charCodeAt(i);a==n?(yield r,r=0):r=r*10+a-f9}yield r}class d9 extends tt{get behavior(){return $n}constructor(t){super();const n=Me(t.exons??"exons"),r=Me(t.start??"start"),[i,a]=t.as||["exonStart","exonEnd"];this.handle=o=>{let s=r(o),u=s,l=!0;const c=n(o);for(const f of h9(c)){if(l)u=s+f;else{s=u+f;const h=Object.assign({},o);h[i]=u,h[a]=s,this._propagate(h)}l=!l}}}}class p9 extends tt{get behavior(){return $n}constructor(t){super();const n=Ot(t.field).map(a=>Me(a)),r=Ot(t.separator),i=Ot(t.as||t.field);if(n.length!==r.length||n.length!==i.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${n.length}), and "as" (${i.length}) do not match!`);this.handle=a=>{if(n.some(u=>!u(a)))return;const o=n.map((u,l)=>u(a).split(r[l]));g9(o,a);const s=o[0].length;for(let u=0;u<s;u++){const l=Object.assign({},a);for(let c=0;c<n.length;c++)l[i[c]]=o[c][u];this._propagate(l)}}}}function g9(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 m9 extends tt{get behavior(){return Kr}constructor(t){super(),this.params=t,this.as=t.as,this.fn=void 0}initialize(){this.fn=this.paramMediator.createExpression(this.params.expr),this.fn.addListener(()=>this.repropagate())}handle(t){t[this.as]=this.fn(t),this._propagate(t)}}class Uw extends tt{get behavior(){return Kr}constructor(t,n){super();const r=t.channel??"x";if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const i=n.getScaleResolution(r).getGenome();if(!i)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const a=Me(t.chrom),o=Ot(t.pos).map(p=>Me(p)),s=Ot(t.as);if(o.length!=s.length)throw new Error('The number of "pos" and "as" elements must be equal!');const u=Ot(t.offset);let l;if(u.length==0)l=new Array(o.length).fill(0);else if(u.length==1)l=new Array(o.length).fill(u[0]);else if(u.length==o.length)l=u;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(t.offset)}!`);const c=new Function("datum","chromOffset","posAccessors",s.map((p,m)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${m}](datum) - ${l[m]};`).join(`
358
+ `));let f,h=0;const d=p=>{if(p!==f){if(h=i.cumulativeChromPositions.get(p),h===void 0)throw new Error("Unknown chromosome/contig: "+p);f=p}return h};this.handle=p=>{c(p,d(a(p)),o),this._propagate(p)}}}const Gw={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 b9 extends tt{get behavior(){return Kr}constructor(t){super();const n=B0(Gw),r=Me(t.field),i=t.as,a=t.fontSize;this.handle=o=>{const s=r(o);s!==void 0?o[i]=n.measureWidth(s,a):o[i]=0,this._propagate(o)}}}const y9=65536;class w9 extends tt{get behavior(){return Kr}constructor(t){super(),this.params=t}reset(){super.reset(),this.initialize()}initialize(){const t=this.params,n=t.as||"lane",r=Tt(t.spacing)?t.spacing:1,i=Me(t.start),a=Me(t.end);if(!t.preference!=!t.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(t.preference){const o=new Float64Array(y9),s=Me(t.preference),u=t.preferredOrder;let l=1/0;this.handle=c=>{const f=i(c);f<l&&o.fill(-1/0),l=f;const h=u.indexOf(s(c));let d=-1;if(h>=0&&o[h]<f)d=h;else{const p=i(c);for(d=0;d<o.length&&!(o[d]<p);d++);if(d>=o.length)throw new Error("Out of lanes!")}o[d]=a(c)+r,c[n]=d,this._propagate(c)}}else{const o=new rf,s=new rf;let u=-1/0,l=0;this.handle=c=>{const f=i(c);for(;o.length&&(o.peekValue()<=f||f<u);){const d=o.pop();s.push(d,d)}u=f;let h=s.pop();h===void 0&&(h=l++),c[n]=h,this._propagate(c),o.push(h,a(c)+r)}}}}class v9 extends tt{get behavior(){return $n}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=>Me(i)),r=t.as?t.as:n.map(Aa);this.handle=i=>{const a={};for(let o=0;o<n.length;o++)a[r[o]]=n[o](i);this._propagate(a)}}}class x9 extends tt{get behavior(){return Kr}constructor(t){super();const n=new RegExp(t.regex),r=typeof t.as=="string"?[t.as]:t.as,i=Me(t.field);this.handle=a=>{const o=i(a);if(Ue(o)){const s=o.match(n);if(s){if(s.length-1!=r.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let u=0;u<r.length;u++)a[r[u]]=s[u+1]}else if(t.skipInvalidInput)for(let u=0;u<r.length;u++)a[r[u]]=void 0;else throw new Error(`"${o}" does not match the given regex: ${n.toString()}`)}else if(!t.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof o}, field content: "${o}".`);this._propagate(a)}}}class A9 extends tt{get behavior(){return $n}constructor(t){super();const n=Ot(t.columnRegex).map(h=>new RegExp(h)),r=Ot(t.asValue);if(n.length!=r.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const i=t.skipRegex?new RegExp(t.skipRegex):void 0,a=t.asKey||"sample";let o,s,u;const l=h=>{var y;const d=Object.keys(h);for(const w of n)if(!d.some(A=>w.test(A)))throw new Error(`No columns matching the regex ${w.toString()} found in the data!`);const p=new Map;for(const[w,A]of n.entries())for(const S of d){const _=(y=A.exec(S))==null?void 0:y[1];if(_!==void 0){let T=p.get(_);T||(T=[],p.set(_,T)),T[w]=S}}o=[...p.entries()],s=d.filter(w=>!n.some(A=>A.test(w))&&!(i&&i.test(w)));const m=[...s.map(w=>JSON.stringify(w)+": datum["+JSON.stringify(w)+"]"),JSON.stringify(a)+": sampleId",...r.map((w,A)=>JSON.stringify(w)+`: datum[attrs[${A}]]`)];u=new Function("datum","sampleId","attrs",`return {
355
359
  `+m.join(`,
356
360
  `)+`
357
- };`)},c=h=>{o||l(h);for(let d=0;d<o.length;d++){const[p,m]=o[d],y=u(h,p,m);this._propagate(y)}},f=h=>{l(h),c(h),this.handle=c};this.handle=f,this.beginBatch=h=>{hw(h)&&(this.handle=f),super.beginBatch(h)}}}class x9 extends et{get behavior(){return Kr}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?Bm(t.sort.field,t.sort.order):void 0,i=t.field?Me(t.field):()=>1,a=t.groupby.map(c=>Me(c)),o=$4(this.buffer,c=>a.map(f=>f(c)).join()).map(c=>c[1]);let s=c=>!0;if(t.baseField){const c=Me(t.baseField);s=f=>c(f)!==null}let u,l;switch(t.offset){case"normalize":u=(c,f)=>c/f,l=(c,f)=>Nu(c,f);break;case"center":u=(c,f)=>c-f/2,l=(c,f)=>Nu(c,f);break;case"information":{const c=Math.log2(t.cardinality??4);u=(f,h)=>f/h,l=(f,h)=>{const p=Nu(f,A=>+!s(A)),m=Nu(f,h),y=m-p;let w=0;for(let A=0;A<f.length;A++){const S=f[A];if(s(S)){const _=h(S)/y;w-=_*Math.log2(_)}}return y/(c-(w+0))*(y/m)}}break;default:u=(c,f)=>c,l=(c,f)=>1}for(const c of o){r&&c.sort(r);const f=l(c,i);let h=0;for(const d of c){const p=h+i(d);s(d)&&(d[n[0]]=u(h,f),d[n[1]]=u(p,f),this._propagate(d),h=p)}}super.complete()}}class A9 extends et{get behavior(){return $n}constructor(t){super();const n=Me(t.field??"sequence"),[r,i]=t.as??["pos","sequence"];this.handle=a=>{const o=Object.assign({},a,{[i]:"",[r]:0}),s=n(a);for(let u=0;u<s.length;u++){const l=Object.assign({},o);l[r]=u,l[i]=s.charAt(u),this._propagate(l)}}}}class E9 extends et{get behavior(){return $n}constructor(t){super(),this.params=t,this.buffer=[]}reset(){this.buffer=[]}handle(t){this.buffer.push(t)}complete(){const n=this.params.groupby,r=n.map(a=>Me(a)),i=Pu(this.buffer,...r);for(const[a,o]of G0(i)){const s={count:o.length};for(let u=0;u<n.length;u++)s[n[u]]=a[u];this._propagate(s)}super.complete()}}const _9="_uniqueId",Uw=1e4,Gw=[null];class Hw extends et{get behavior(){return Kr}constructor(t){super(),this.params=t,this.as=t.as??_9,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%Uw==0&&(this._id=this._getBlock()*Uw),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const t=Gw.length;return Gw[t]=this,this._blocks.push(t),this._usedBlocks++,t}}const S9={aggregate:E9,collect:Ow,coverage:r9,filterScoredLabels:o9,filter:s9,flatten:l9,flattenCompressedExons:f9,flattenDelimited:h9,flattenSequence:A9,formula:p9,identifier:Hw,linearizeGenomicCoordinate:Nw,measureText:g9,pileup:b9,project:y9,regexExtract:w9,regexFold:v9,sample:dw,stack:x9};function C9(e,t){const n=S9[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function Vw(e){if(!qw(e)&&!$w(e))return;const t={...e.format};if(t.type??(t.type=$w(e)&&k9(En(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 k9(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const jw=e=>typeof e!="object"?T9:I9,T9=e=>({data:e}),I9=e=>e;function $w(e){return"url"in e}class il extends et{get identifier(){}handle(t){throw new Error("Source does not handle incoming data!")}async load(){}}function qw(e){return"values"in e}class B9 extends il{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=jw(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=k1(t,Vw(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 D9(e){return"url"in e}class R9 extends il{constructor(t,n){super(),this.params=Sc(n.paramMediator,t,()=>this.load()),this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}async load(){const t=En(this.params.url),n=Array.isArray(t)?t:[t];if(n.length===0||!n[0]){this.reset(),this.complete();return}const r=async a=>Qu({baseURL:this.baseUrl}).load(a).catch(o=>{throw new Error(`Cannot fetch: ${this.baseUrl}${a}: ${o.message}`)}),i=(a,o)=>{try{const s=k1(a,Vw(this.params));this.beginBatch({type:"file",url:o});for(const u of s)this._propagate(u)}catch(s){throw new Error(`Cannot parse: ${o}: ${s.message}`)}};this.reset(),await Promise.all(n.map(a=>r(a).then(i))),this.complete()}}function F9(e){return"sequence"in e}class M9 extends il{constructor(t,n){if(super(),this.sequence=Sc(n.paramMediator,t.sequence,()=>this.loadSynchronously()),!("start"in this.sequence))throw new Error("'start' is missing from sequence parameters!");if(!("stop"in this.sequence))throw new Error("'stop' is missing from sequence parameters!")}loadSynchronously(){const t=En(this.sequence.as)??"data",n=En(this.sequence.start)??0,r=En(this.sequence.step)??1,i=En(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let a=n;a<i;a+=r)this._propagate({[t]:a});this.complete()}async load(){this.loadSynchronously()}}class H0 extends il{constructor(n,r){super();yn(this,"initializedPromise",Promise.resolve());if(this.view=n,r){if(r!=="x"&&r!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${r}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the lazy data source. Must be either "x" or "y".');if(this.channel=r,this.scaleResolution=this.view.getScaleResolution(r),!this.scaleResolution){const a=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof Yt||a.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(a.join(" "))}const i=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",i),this.view.context.addBroadcastListener("layoutComputed",i)}getAxisLength(){const n=this.scaleResolution.members.map(r=>{var i;return(i=r.view.coords)==null?void 0:i[this.channel==="x"?"width":"height"]}).filter(r=>r>0);return n.length?n.reduce((r,i)=>Math.min(r,i),1e4):0}get genome(){return this.scaleResolution.getGenome()}onDomainChanged(n,r){}setLoadingStatus(n){this.view.context.setDataLoadingStatus(this.view,n)}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(n){this.reset(),this.beginBatch({type:"file"});for(const r of n)for(const i of r)this._propagate(i);this.complete(),z0(this.view)}}class P9 extends H0{constructor(n,r){const i={axis:{},...n};super(r,i.channel);yn(this,"ticks",[]);this.params=n}onDomainChanged(){const n=this.scaleResolution.scale,r=this.params.axis,i=this.getAxisLength(),a=l=>25+60*ob(100,700,l),o=Tt(r.tickCount)?r.tickCount:Math.round(i/a(i)),s=vw(n,o,r.tickMinStep),u=r.values?xw(n,r.values,s):yR(n,s);if(!td(u,this.ticks)){this.ticks=u;const l=vR(n,o,r.format);this.publishData([u.map(c=>({value:c,label:l(c)}))])}}}class L9 extends H0{constructor(t,n){super(n,t.channel)}async load(){this.publishData([this.genome.chromosomes])}}function al(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}function af(e,t,n=!0){let r,i=o=>{};return function(...s){return new Promise((u,l)=>{const c=()=>{clearTimeout(r),i=f=>{},u(e(...s))};n&&i("debounced"),clearTimeout(r),i=l,r=window.setTimeout(c,typeof t=="function"?t():t)})}}class ol extends H0{constructor(){super(...arguments);K(this,Oo,new AbortController);K(this,No,[0,0]);K(this,zo,[0,0]);K(this,pu,0);yn(this,"params")}setupDebouncing(n){const r=()=>En(n.debounce),i=n.debounceMode;if(i=="domain")this.onDomainChanged=af(this.onDomainChanged.bind(this),r,!1);else if(i=="window")this.loadInterval=af(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+i)}onDomainChanged(n){var i;Fe(this,zo,n);const r=En((i=this.params)==null?void 0:i.windowSize)??-1;n[1]-n[0]>r||this.callIfWindowsChanged(n,r,async a=>{await this.initializedPromise,this.loadInterval(a)})}reloadLastDomain(){const n=W(this,zo);Fe(this,zo,[0,0]),Fe(this,No,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){W(this,Oo).abort(),this.setLoadingStatus(!0),Fe(this,Oo,new AbortController);const i=W(this,Oo).signal,a=this.genome.continuousToDiscreteChromosomeIntervals(n);try{const o=await Promise.all(a.map(async s=>r(s,i)));if(!i.aborted)return this.setLoadingStatus(!1),o}catch(o){if(!i.aborted)throw this.setLoadingStatus(!1),o}}callIfWindowsChanged(n,r,i){const a=[Math.max(Math.floor(n[0]/r)*r,0),Math.min(Math.ceil(n[1]/r)*r,this.genome.totalSize)],o=W(this,No);(r!==W(this,pu)||a[0]<o[0]||a[1]>o[1])&&(Fe(this,No,a),Fe(this,pu,r),i(a))}}Oo=new WeakMap,No=new WeakMap,zo=new WeakMap,pu=new WeakMap;class O9 extends ol{constructor(t,n){const r={channel:"x",windowSize:7e3,debounce:200,debounceMode:"window",...t};if(super(n,r.channel),this.params=r,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>bv),Promise.resolve().then(()=>CP),Promise.resolve().then(()=>ul)]).then(([{Buffer:a},{IndexedFasta:o},{RemoteFile:s}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=a));const u=l=>new s(al(l,this.view.getBaseUrl()));this.fasta=new o({fasta:u(this.params.url),fai:u(this.params.indexUrl??this.params.url+".fai")}),i()})})}async loadInterval(t){const n=await this.discretizeAndLoad(t,async(r,i)=>this.fasta.getSequence(r.chrom,r.startPos,r.endPos,{signal:i}).then(a=>({chrom:r.chrom,start:r.startPos,sequence:a})));n&&this.publishData([n])}}class N9 extends ol{constructor(n,r){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},a=Sc(r.paramMediator,i,o=>{o.includes("url")?J(this,gu,xm).call(this).then(()=>this.reloadLastDomain()):o.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,a.channel);K(this,gu);K(this,Uo,[]);K(this,Go,void 0);if(this.params=a,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),J(this,gu,xm).call(this)}async onDomainChanged(n){await this.initializedPromise;const r=this.getAxisLength()||700,i=z9(n,r,W(this,Uo)),a=Math.max(i*r,5e3);this.callIfWindowsChanged(n,a,o=>this.loadInterval(o,i))}async loadInterval(n,r){const i=.5/r/En(this.params.pixelsPerBin),a=await this.discretizeAndLoad(n,(o,s)=>W(this,Go).getFeatures(o.chrom,o.startPos,o.endPos,{scale:i,signal:s}).then(u=>u.map(l=>({chrom:o.chrom,start:l.start,end:l.end,score:l.score}))));a&&this.publishData(a)}}Uo=new WeakMap,Go=new WeakMap,gu=new WeakSet,xm=function(){return this.initializedPromise=new Promise(n=>{Promise.all([Promise.resolve().then(()=>gE),Promise.resolve().then(()=>ul)]).then(([{BigWig:r},{RemoteFile:i}])=>{Fe(this,Go,new r({filehandle:new i(al(En(this.params.url),this.view.getBaseUrl()))})),W(this,Go).getHeader().then(a=>{Fe(this,Uo,a.zoomLevels.map(o=>o.reductionLevel).reverse()),W(this,Uo).push(1),n()})})}),this.initializedPromise};function z9(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class U9 extends ol{constructor(n,r){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},a=Sc(r.paramMediator,i,o=>{o.includes("url")?J(this,mu,Am).call(this).then(()=>this.reloadLastDomain()):o.includes("windowSize")&&this.reloadLastDomain()});super(r,a.channel);K(this,mu);yn(this,"parser");yn(this,"bbi");yn(this,"parseLine");if(this.params=a,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),J(this,mu,Am).call(this)}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>this.bbi.getFeatures(i.chrom,i.startPos,i.endPos,{signal:a}).then(o=>o.map(s=>this.parseLine(i.chrom,s))));r&&this.publishData(r)}}mu=new WeakSet,Am=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>xz),Promise.resolve().then(()=>gE),Promise.resolve().then(()=>ul)]).then(([i,{BigBed:a},{RemoteFile:o}])=>{const s=i.default;this.bbi=new a({filehandle:new o(al(En(this.params.url),this.view.getBaseUrl()))}),this.bbi.getHeader().then(async u=>{this.parser=new s({autoSql:u.autoSql});try{const l=G9(this.parser);this.parseLine=(c,f)=>l(c,f.start,f.end,f.rest)}catch{this.parseLine=(c,f)=>this.parser.parseLine(`${c} ${f.start} ${f.end} ${f.rest}`)}n()}).catch(u=>{this.load(),r(u)})})}),this.initializedPromise};function G9(e){const t=e.autoSql.fields.filter(A=>A.type).slice(3);let n=0,r="",i=0,a={};const o=" ",s=o.charCodeAt(0),u="0".charCodeAt(0),l="-".charCodeAt(0);function c(){let A=r.indexOf(o,n);A<0&&(A=i);const S=r.substring(n,A);return n=A+1,S}function f(){let A=0,S=r.charCodeAt(n),_=1;S===l&&(_=-1,n++,S=r.charCodeAt(n));do{if(S===s){n++;break}A=A*10+S-u,S=r.charCodeAt(++n)}while(n<i);return A*_}const h=t.map(A=>`${JSON.stringify(A.name)}: ${A.isNumeric?"0":"emptyString"}`),d=new Function(`
361
+ };`)},c=h=>{o||l(h);for(let d=0;d<o.length;d++){const[p,m]=o[d],y=u(h,p,m);this._propagate(y)}},f=h=>{l(h),c(h),this.handle=c};this.handle=f,this.beginBatch=h=>{pw(h)&&(this.handle=f),super.beginBatch(h)}}}class E9 extends tt{get behavior(){return Kr}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?Dm(t.sort.field,t.sort.order):void 0,i=t.field?Me(t.field):()=>1,a=t.groupby.map(c=>Me(c)),o=Z4(this.buffer,c=>a.map(f=>f(c)).join()).map(c=>c[1]);let s=c=>!0;if(t.baseField){const c=Me(t.baseField);s=f=>c(f)!==null}let u,l;switch(t.offset){case"normalize":u=(c,f)=>c/f,l=(c,f)=>zu(c,f);break;case"center":u=(c,f)=>c-f/2,l=(c,f)=>zu(c,f);break;case"information":{const c=Math.log2(t.cardinality??4);u=(f,h)=>f/h,l=(f,h)=>{const p=zu(f,A=>+!s(A)),m=zu(f,h),y=m-p;let w=0;for(let A=0;A<f.length;A++){const S=f[A];if(s(S)){const _=h(S)/y;w-=_*Math.log2(_)}}return y/(c-(w+0))*(y/m)}}break;default:u=(c,f)=>c,l=(c,f)=>1}for(const c of o){r&&c.sort(r);const f=l(c,i);let h=0;for(const d of c){const p=h+i(d);s(d)&&(d[n[0]]=u(h,f),d[n[1]]=u(p,f),this._propagate(d),h=p)}}super.complete()}}class _9 extends tt{get behavior(){return $n}constructor(t){super();const n=Me(t.field??"sequence"),[r,i]=t.as??["pos","sequence"];this.handle=a=>{const o=Object.assign({},a,{[i]:"",[r]:0}),s=n(a);for(let u=0;u<s.length;u++){const l=Object.assign({},o);l[r]=u,l[i]=s.charAt(u),this._propagate(l)}}}}class S9 extends tt{get behavior(){return $n}constructor(t){super(),this.params=t,this.buffer=[]}reset(){this.buffer=[]}handle(t){this.buffer.push(t)}complete(){const n=this.params.groupby,r=n.map(a=>Me(a)),i=Lu(this.buffer,...r);for(const[a,o]of G0(i)){const s={count:o.length};for(let u=0;u<n.length;u++)s[n[u]]=a[u];this._propagate(s)}super.complete()}}const C9="_uniqueId",Hw=1e4,Vw=[null];class jw extends tt{get behavior(){return Kr}constructor(t){super(),this.params=t,this.as=t.as??C9,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%Hw==0&&(this._id=this._getBlock()*Hw),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const t=Vw.length;return Vw[t]=this,this._blocks.push(t),this._usedBlocks++,t}}const k9={aggregate:S9,collect:zw,coverage:a9,filterScoredLabels:l9,filter:u9,flatten:c9,flattenCompressedExons:d9,flattenDelimited:p9,flattenSequence:_9,formula:m9,identifier:jw,linearizeGenomicCoordinate:Uw,measureText:b9,pileup:w9,project:v9,regexExtract:x9,regexFold:A9,sample:gw,stack:E9};function T9(e,t){const n=k9[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function $w(e){if(!Zw(e)&&!Ww(e))return;const t={...e.format};if(t.type??(t.type=Ww(e)&&I9(Zt(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 I9(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const qw=e=>typeof e!="object"?B9:D9,B9=e=>({data:e}),D9=e=>e;function Ww(e){return"url"in e}class il extends tt{constructor(n){super();nn(this,"view");this.view=n}get identifier(){}setLoadingStatus(n,r){this.view.context.setDataLoadingStatus(this.view,n,r)}get paramMediator(){return this.view.paramMediator}handle(n){throw new Error("Source does not handle incoming data!")}async load(){}repropagate(){this.load()}}function Zw(e){return"values"in e}class R9 extends il{constructor(t,n){var r;if(super(n),this.params=t,typeof t.values=="string"&&!((r=t==null?void 0:t.format)!=null&&r.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}loadSynchronously(){const t=this.params.values;let n=[],r=i=>i;if(Array.isArray(t))t.length>0&&(n=t,r=qw(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=T1(t,$w(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 F9(e){return"url"in e}class M9 extends il{constructor(t,n){super(n),this.params=Sc(n.paramMediator,t,()=>this.load()),this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}async load(){const t=Zt(this.params.url),n=Array.isArray(t)?t:[t];if(n.length===0||!n[0]){this.reset(),this.complete();return}const r=async a=>Xu({baseURL:this.baseUrl}).load(a).catch(o=>{throw new Error(`${a}: ${o.message}`)}),i=(a,o)=>{try{const s=T1(a,$w(this.params));this.beginBatch({type:"file",url:o});for(const u of s)this._propagate(u)}catch(s){throw new Error(`Cannot parse: ${o}: ${s.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(n.map(a=>r(a).then(i))),this.setLoadingStatus("complete")}catch(a){this.setLoadingStatus("error",a.message)}this.complete()}}function P9(e){return"sequence"in e}class L9 extends il{constructor(t,n){if(super(n),this.sequence=Sc(n.paramMediator,t.sequence,()=>this.loadSynchronously()),!("start"in this.sequence))throw new Error("'start' is missing from sequence parameters!");if(!("stop"in this.sequence))throw new Error("'stop' is missing from sequence parameters!")}loadSynchronously(){const t=Zt(this.sequence.as)??"data",n=Zt(this.sequence.start)??0,r=Zt(this.sequence.step)??1,i=Zt(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let a=n;a<i;a+=r)this._propagate({[t]:a});this.complete()}async load(){this.loadSynchronously()}}class H0 extends il{constructor(n,r){super(n);nn(this,"initializedPromise",Promise.resolve());if(r){if(r!=="x"&&r!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${r}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the lazy data source. Must be either "x" or "y".');if(this.channel=r,this.scaleResolution=this.view.getScaleResolution(r),!this.scaleResolution){const a=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof Qt||a.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(a.join(" "))}const i=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",i),this.view.context.addBroadcastListener("layoutComputed",i)}getAxisLength(){const n=this.scaleResolution.members.map(r=>{var i;return(i=r.view.coords)==null?void 0:i[this.channel==="x"?"width":"height"]}).filter(r=>r>0);return n.length?n.reduce((r,i)=>Math.min(r,i),1e4):0}get genome(){return this.scaleResolution.getGenome()}onDomainChanged(n,r){}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(n){this.reset(),this.beginBatch({type:"file"});for(const r of n)for(const i of r)this._propagate(i);this.complete(),z0(this.view)}}class O9 extends H0{constructor(n,r){const i={axis:{},...n};super(r,i.channel);nn(this,"ticks",[]);this.params=n}onDomainChanged(){const n=this.scaleResolution.scale,r=this.params.axis,i=this.getAxisLength(),a=l=>25+60*sb(100,700,l),o=Tt(r.tickCount)?r.tickCount:Math.round(i/a(i)),s=Aw(n,o,r.tickMinStep),u=r.values?Ew(n,r.values,s):vR(n,s);if(!td(u,this.ticks)){this.ticks=u;const l=AR(n,o,r.format);this.publishData([u.map(c=>({value:c,label:l(c)}))])}}}class N9 extends H0{constructor(t,n){super(n,t.channel)}async load(){this.publishData([this.genome.chromosomes])}}function al(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}function af(e,t,n=!0){let r,i=o=>{};return function(...s){return new Promise((u,l)=>{const c=()=>{clearTimeout(r),i=f=>{},u(e(...s))};n&&i("debounced"),clearTimeout(r),i=l,r=window.setTimeout(c,typeof t=="function"?t():t)})}}class ol extends H0{constructor(){super(...arguments);K(this,Oo,new AbortController);K(this,No,[0,0]);K(this,zo,[0,0]);K(this,gu,0);nn(this,"params")}setupDebouncing(n){const r=()=>Zt(n.debounce),i=n.debounceMode;if(i=="domain")this.onDomainChanged=af(this.onDomainChanged.bind(this),r,!1);else if(i=="window")this.loadInterval=af(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+i)}onDomainChanged(n){var i;Fe(this,zo,n);const r=Zt((i=this.params)==null?void 0:i.windowSize)??-1;n[1]-n[0]>r||this.callIfWindowsChanged(n,r,async a=>{await this.initializedPromise,this.loadInterval(a)})}reloadLastDomain(){const n=W(this,zo);Fe(this,zo,[0,0]),Fe(this,No,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){W(this,Oo).abort(),this.setLoadingStatus("loading"),Fe(this,Oo,new AbortController);const i=W(this,Oo).signal,a=this.genome.continuousToDiscreteChromosomeIntervals(n);try{const o=await Promise.all(a.map(async s=>r(s,i)));if(!i.aborted)return this.setLoadingStatus("complete"),o}catch(o){if(!i.aborted)throw this.setLoadingStatus("error",o.message),o}}callIfWindowsChanged(n,r,i){const a=[Math.max(Math.floor(n[0]/r)*r,0),Math.min(Math.ceil(n[1]/r)*r,this.genome.totalSize)],o=W(this,No);(r!==W(this,gu)||a[0]<o[0]||a[1]>o[1])&&(Fe(this,No,a),Fe(this,gu,r),i(a))}}Oo=new WeakMap,No=new WeakMap,zo=new WeakMap,gu=new WeakMap;class z9 extends ol{constructor(t,n){const r={channel:"x",windowSize:7e3,debounce:200,debounceMode:"window",...t};if(super(n,r.channel),this.params=r,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>vv),Promise.resolve().then(()=>TP),Promise.resolve().then(()=>ul)]).then(([{Buffer:a},{IndexedFasta:o},{RemoteFile:s}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=a));const u=l=>new s(al(l,this.view.getBaseUrl()));this.fasta=new o({fasta:u(this.params.url),fai:u(this.params.indexUrl??this.params.url+".fai")}),i()})})}async loadInterval(t){const n=await this.discretizeAndLoad(t,async(r,i)=>this.fasta.getSequence(r.chrom,r.startPos,r.endPos,{signal:i}).then(a=>({chrom:r.chrom,start:r.startPos,sequence:a})));n&&this.publishData([n])}}class U9 extends ol{constructor(n,r){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},a=Sc(r.paramMediator,i,o=>{o.includes("url")?J(this,mu,Am).call(this).then(()=>this.reloadLastDomain()):o.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,a.channel);K(this,mu);K(this,Uo,[]);K(this,Go,void 0);if(this.params=a,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),J(this,mu,Am).call(this)}async onDomainChanged(n){await this.initializedPromise;const r=this.getAxisLength()||700,i=G9(n,r,W(this,Uo)),a=Math.max(i*r,5e3);this.callIfWindowsChanged(n,a,o=>this.loadInterval(o,i))}async loadInterval(n,r){const i=.5/r/Zt(this.params.pixelsPerBin),a=await this.discretizeAndLoad(n,(o,s)=>W(this,Go).getFeatures(o.chrom,o.startPos,o.endPos,{scale:i,signal:s}).then(u=>u.map(l=>({chrom:o.chrom,start:l.start,end:l.end,score:l.score}))));a&&this.publishData(a)}}Uo=new WeakMap,Go=new WeakMap,mu=new WeakSet,Am=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>yE),Promise.resolve().then(()=>ul)]).then(([{BigWig:i},{RemoteFile:a}])=>{Fe(this,Go,new i({filehandle:new a(al(Zt(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),W(this,Go).getHeader().then(o=>{Fe(this,Uo,o.zoomLevels.map(s=>s.reductionLevel).reverse()),W(this,Uo).push(1),this.setLoadingStatus("complete"),n()}).catch(o=>{this.load(),this.setLoadingStatus("error",`${Zt(this.params.url)}: ${o.message}`),r(o)})})}),this.initializedPromise};function G9(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class H9 extends ol{constructor(n,r){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},a=Sc(r.paramMediator,i,o=>{o.includes("url")?J(this,bu,Em).call(this).then(()=>this.reloadLastDomain()):o.includes("windowSize")&&this.reloadLastDomain()});super(r,a.channel);K(this,bu);nn(this,"parser");nn(this,"bbi");nn(this,"parseLine");if(this.params=a,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),J(this,bu,Em).call(this)}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>this.bbi.getFeatures(i.chrom,i.startPos,i.endPos,{signal:a}).then(o=>o.map(s=>this.parseLine(i.chrom,s))));r&&this.publishData(r)}}bu=new WeakSet,Em=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>Ez),Promise.resolve().then(()=>yE),Promise.resolve().then(()=>ul)]).then(([i,{BigBed:a},{RemoteFile:o}])=>{const s=i.default;this.bbi=new a({filehandle:new o(al(Zt(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async u=>{this.parser=new s({autoSql:u.autoSql});try{const l=V9(this.parser);this.parseLine=(c,f)=>l(c,f.start,f.end,f.rest)}catch{this.parseLine=(c,f)=>this.parser.parseLine(`${c} ${f.start} ${f.end} ${f.rest}`)}this.setLoadingStatus("complete"),n()}).catch(u=>{this.load(),this.setLoadingStatus("error",`${Zt(this.params.url)}: ${u.message}`),r(u)})})}),this.initializedPromise};function V9(e){const t=e.autoSql.fields.filter(A=>A.type).slice(3);let n=0,r="",i=0,a={};const o=" ",s=o.charCodeAt(0),u="0".charCodeAt(0),l="-".charCodeAt(0);function c(){let A=r.indexOf(o,n);A<0&&(A=i);const S=r.substring(n,A);return n=A+1,S}function f(){let A=0,S=r.charCodeAt(n),_=1;S===l&&(_=-1,n++,S=r.charCodeAt(n));do{if(S===s){n++;break}A=A*10+S-u,S=r.charCodeAt(++n)}while(n<i);return A*_}const h=t.map(A=>`${JSON.stringify(A.name)}: ${A.isNumeric?"0":"emptyString"}`),d=new Function(`
358
362
  const emptyString = "";
359
363
  return function makeTemplate(chrom, chromStart, chromEnd) {
360
364
  return {
@@ -364,40 +368,40 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
364
368
  ${h.join(`,
365
369
  `)}
366
370
  }
367
- };`)(),p=t.map(A=>{const S=A.type,_=JSON.stringify(A.name);if(["ubyte","int","uint"].includes(S))return`d[${_}] = parseInt();`;if(A.isNumeric)return`d[${_}] = Number(parseString());`;if(["char","string","lstring"].includes(S))return`d[${_}] = parseString();`;throw new Error("Unsupported type: "+S)}),m=H9(p,50).map((A,S)=>Function("parseInt","parseString",`return function parseFieldChunk${S}(d) {
371
+ };`)(),p=t.map(A=>{const S=A.type,_=JSON.stringify(A.name);if(["ubyte","int","uint"].includes(S))return`d[${_}] = parseInt();`;if(A.isNumeric)return`d[${_}] = Number(parseString());`;if(["char","string","lstring"].includes(S))return`d[${_}] = parseString();`;throw new Error("Unsupported type: "+S)}),m=j9(p,50).map((A,S)=>Function("parseInt","parseString",`return function parseFieldChunk${S}(d) {
368
372
  ${A.join(`
369
373
  `)}
370
- }`)(f,c));function y(A){r=A,i=A.length,n=0}function w(A,S,_,T){y(T),a=d(A,S,_);for(const I of m)I(a);return a}return w}function H9(e,t){return Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t))}class V9 extends ol{constructor(n,r){const i={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,i.channel);K(this,ba,void 0);yn(this,"chrPrefixFixer",n=>n);if(this.params=i,!this.params.url)throw new Error("No URL provided for BamSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>Gz),Promise.resolve().then(()=>ul)]).then(([{BamFile:o},{RemoteFile:s}])=>{const u=l=>new s(al(l,this.view.getBaseUrl()));Fe(this,ba,new o({bamFilehandle:u(this.params.url),baiFilehandle:u(this.params.indexUrl??this.params.url+".bai")})),W(this,ba).getHeader().then(l=>{var h,d;const c=this.genome.hasChrPrefix(),f=(d=(h=W(this,ba).indexToChr)==null?void 0:h[0])==null?void 0:d.refName.startsWith("chr");c&&!f?this.chrPrefixFixer=p=>p.replace("chr",""):!c&&f&&(this.chrPrefixFixer=p=>"chr"+p),a()})})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>W(this,ba).getRecordsForRange(this.chrPrefixFixer(i.chrom),i.startPos,i.endPos,{signal:a}).then(o=>o.map(s=>({chrom:i.chrom,start:s.get("start"),end:s.get("end"),name:s.get("name"),MD:s.get("MD"),cigar:s.get("cigar"),mapq:s.get("mq"),strand:s.get("strand")===1?"+":"-"}))));r&&this.publishData(r)}}ba=new WeakMap;class j9 extends ol{constructor(n,r){const i={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",...n};super(r,i.channel);K(this,bu,void 0);if(this.params=i,!this.params.url)throw new Error("No URL provided for TabixSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>bv),Promise.resolve().then(()=>Xz),Promise.resolve().then(()=>ul)]).then(([{Buffer:o},{TabixIndexedFile:s},{RemoteFile:u}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const l=c=>new u(al(c,this.view.getBaseUrl()));Fe(this,bu,new s({filehandle:l(this.params.url),tbiFilehandle:l(this.params.indexUrl??this.params.url+".tbi")})),a()})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>{const o=[];return await W(this,bu).getLines(i.chrom,i.startPos,i.endPos,{lineCallback:s=>{o.push(s)},signal:a}),this._parseFeatures(o)});r&&this.publishData(r)}_parseFeatures(n){return[]}}bu=new WeakMap;class $9 extends j9{constructor(n,r){super(n,r);K(this,yu,void 0);Promise.resolve().then(()=>PU).then(i=>{Fe(this,yu,i.default)})}_parseFeatures(n){var i;return(i=W(this,yu))==null?void 0:i.parseStringSync(n.join(`
371
- `),{parseSequences:!1})}}yu=new WeakMap;function q9(e,t){if(qw(e))return new B9(e,t);if(D9(e))return new R9(e,t);if(F9(e))return new M9(e,t);if(W9(e))return tF(e.lazy,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function W9(e){return"lazy"in e}function Z9(e){return(e==null?void 0:e.type)=="axisTicks"}function Y9(e){return(e==null?void 0:e.type)=="axisGenome"}function Q9(e){return(e==null?void 0:e.type)=="indexedFasta"}function X9(e){return(e==null?void 0:e.type)=="bigwig"}function K9(e){return(e==null?void 0:e.type)=="bigbed"}function J9(e){return(e==null?void 0:e.type)=="bam"}function eF(e){return(e==null?void 0:e.type)=="gff3"}function tF(e,t){if(Z9(e))return new P9(e,t);if(Y9(e))return new L9(e,t);if(Q9(e))return new O9(e,t);if(X9(e))return new N9(e,t);if(K9(e))return new U9(e,t);if(J9(e))return new V9(e,t);if(eF(e))return new $9(e,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function nF(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(`,
372
- `)+" };");return n.properties=t,n}class of extends et{get behavior(){return $n}constructor(){super();const t=n=>{const r=nF(n);this.handle=i=>this._propagate(r(i)),this.handle(n)};this.handle=t,this.beginBatch=n=>{hw(n)&&(this.handle=t),super.beginBatch(n)}}}function rF(e){return"name"in e}class Ww extends il{constructor(n,r,i){super();K(this,wu,void 0);this.provider=i,this.params=n}get identifier(){return this.params.name}updateDynamicData(n){Fe(this,wu,n),this.loadSynchronously()}loadSynchronously(){const n=W(this,wu)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(n))n.length>0&&(r=jw(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()}}wu=new WeakMap;class Zw{constructor(){this._dataSourcesByHost=new Map,this._collectorsByHost=new Map,this._observers=new Map}get dataSources(){return[...new Set(this._dataSourcesByHost.values()).values()]}get collectors(){return[...this._collectorsByHost.values()]}addObserver(t,n){let r=this._observers.get(n);r||(r=[],this._observers.set(n,r)),r.push(t)}_relayObserverCallback(t,n){const r=this._observers.get(n);if(r)for(const i of r)i(t)}addDataSource(t,n){this._dataSourcesByHost.set(n,t)}findDataSourceByKey(t){return this._dataSourcesByHost.get(t)}findNamedDataSource(t){let n,r=[];for(const[i,a]of this._dataSourcesByHost.entries())if(a instanceof Ww&&t==a.identifier){if(n&&n!==a)throw new Error(`Found multiple instances of named data: ${t}. Data flow optimization is broken (it's a bug).`);n=a,r.push(i)}if(n)return{dataSource:n,hosts:r}}addCollector(t,n){this._collectorsByHost.set(n,t),t.observers.push(r=>this._relayObserverCallback(r,n))}findCollectorByKey(t){return this._collectorsByHost.get(t)}initialize(){for(const t of this.dataSources)t.visit(n=>n.initialize())}}function iF(e,t){const n=new Map,r=[];for(const i of e)n.set(i,{ref:i,children:[]});for(const i of n.values()){const a=n.get(t(i.ref));a?a.children.push(i):r.push(i)}return r}function Yw(e,t,n){var i,a;const r=(i=t.preOrder)==null?void 0:i.call(t,e);if(r)return r;for(const o of n(e)){const s=Yw(o,t,n);if(s==="stop")return s}return(a=t.postOrder)==null?void 0:a.call(t,e)}function aF(e,t){return Yw(e,t,n=>n.children)}function oF(e,t){const n=[];let r;const i=t??new Zw,a=[];function o(f,h=()=>{}){if(!r)throw h()||new Error("Cannot append data flow node, no parent exist!");return r.addChild(f),r=f,f}function s(f,h){return o(f,()=>new Error(`Cannot append a transform because no (inherited) data are available! ${h?JSON.stringify(h):""}`))}function u(f,h){for(const d of f){let p;try{p=C9(d,h)}catch(m){throw console.warn(m),new Error(`Cannot initialize "${d.type}" transform: ${m}`)}p.behavior&Kr&&s(new of),s(p)}}const l=f=>{if(n.push(r),f.spec.data){const h=rF(f.spec.data)?new Ww(f.spec.data,f,f.context.getNamedDataFromProvider):q9(f.spec.data,f);r=h,i.addDataSource(h,f)}if(f.spec.transform&&u(f.spec.transform,f),f instanceof Yt){if(!r)throw new Error(`A unit view (${f.getPathString()}) has no (inherited) data source`);const h=sF(f);if(h){a.push(h.rewrite);for(const p of h.transforms)s(p)}f.mark.isPickingParticipant()&&(s(new of),s(new Hw({type:"identifier"})));const d=new Ow({type:"collect",groupby:f.getFacetFields(),sort:lF(f,h==null?void 0:h.rewrittenEncoding)});o(d),i.addCollector(d,f)}},c=iF(e.getDescendants(),f=>f.dataParent);for(const f of c)aF(f,{preOrder:h=>l(h.ref),postOrder:()=>{r=n.pop()}});return a.forEach(f=>f()),i}function sF(e){var a;const t=[],n={},r=[];for(const[o,s]of Object.entries(e.getEncoding())){const u=o;Vs(u)&&k2(s)&&r.push({channel:u,chromPosDef:s})}const i=Pu(r,o=>Hi(o.channel),o=>o.chromPosDef.chrom);for(const[o,s]of i.entries())for(const[u,l]of s.entries()){const c=[],f=[],h=[];for(const{channel:d,chromPosDef:p}of l){const m=A=>A.replace(/[^A-Za-z0-9_]/g,""),y=["_linearized_",m(p.chrom),"_",m(p.pos)].join(""),w={...((a=e.spec.encoding)==null?void 0:a[d])??e.getEncoding()[d]??{},field:y};delete w.chrom,delete w.pos,!w.type&&p.type&&(w.type=p.type),n[d]=w,c.push(p.pos),h.push(p.offset??0),f.push(y)}t.push(new of),t.push(new Nw({type:"linearizeGenomicCoordinate",channel:o,chrom:u,pos:c,offset:h,as:f},e))}return t.length?{transforms:t,rewrittenEncoding:n,rewrite:()=>{e.spec.encoding={...e.spec.encoding,...n},SD(e.mark,"encoding")}}:void 0}function lF(e,t){var r;const n={...e.getEncoding(),...t}.x;if(Zt(n)&&(r=e.getScaleResolution("x"))!=null&&r.isZoomable()){if(Gi(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!Hs(n)){if(Cc(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function Qw(e,t=void 0){if(e.parent!==t)return!1;for(const n of e.children)if(!Qw(n,e))return!1;return!0}function V0(e,t=!1){if(e.behavior&F0&&(t=!0),e instanceof of)if(t)t=!1;else{const n=e.children[0];e.excise(),n&&V0(n,t);return}e.behavior&$n&&(t=!1);for(let n=0,r=e.children.length;n<r;n++)V0(e.children[n],t||r>1)}function uF(e){const t=[...e._dataSourcesByHost.entries()],n=new Map;for(const r of t){const i=r[1];i.identifier&&!n.has(i.identifier)&&n.set(i.identifier,i)}e._dataSourcesByHost.clear();for(let[r,i]of t){const a=n.get(i.identifier);a&&(a.adoptChildrenOf(i),i=a),e.addDataSource(i,r)}}function cF(e){if(V0(e),!Qw(e))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function fF(e){for(const t of e.dataSources)cF(t);uF(e)}function hF(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 dF(e){for(const t of Oa){const n=e.getScaleResolution(t);n&&!n.name&&n.isZoomable()&&(n.name=`${t}_at_root`)}}async function pF(e,t,n){var o;if(!e.import.url)throw new Error("Cannot import, not an import spec: "+JSON.stringify(e));const r=Qu({baseURL:t}),i=e.import.url,a=JSON.parse(await r.load(i).catch(s=>{throw new Error(`Could not load imported view spec: ${i}
373
- Reason: ${s.message}`)}));if(n.isViewSpec(a))return a.baseUrl=(o=i.match(/^[^?#]*\//))==null?void 0:o[0],a;throw new Error(`The imported spec "${i}" is not a view spec: ${JSON.stringify(e)}`)}function Xw(e){return e.getSize().addPadding(e.getOverhang())}function gF(e){const t=n=>n.grow>0?void 0:n.px;return{width:t(e.width),height:t(e.height)}}function hr(e){return()=>e}const Rn=class Rn{static create(t,n,r,i){return new Rn(hr(t),hr(n),hr(r),hr(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"?hr(i):typeof i=="function"?i:this._passThrough(r)};return new Rn(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new Rn(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 Rn(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 Rn(()=>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 Rn(()=>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 Rn(hr(this.x),hr(this.y),hr(this.width),hr(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)}`}};yn(Rn,"ZERO",Rn.create(0,0,0,0));let dr=Rn;class Kw{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class Jw extends Kw{constructor(t,n){super(t),this.webGLHelper=n,this.buffer=[],this.coords=void 0,this.views=new Set}pushView(t,n){this.views.add(t),this.coords=n}renderMark(t,n){if(this.globalOptions.picking&&!t.isPickingParticipant())return;const r=t.render(n);r&&this.buffer.push({mark:t,callback:r,coords:this.coords,clipRect:n.clipRect})}render(){if(this.batch||this._buildBatch(),this.batch.length==0)return;const t=this.webGLHelper.gl,n=this.globalOptions.picking;t.bindFramebuffer(t.FRAMEBUFFER,n?this.webGLHelper._pickingBufferInfo.framebuffer:null),this.webGLHelper.clearAll();for(const r of this.views)r.onBeforeRender();for(const r of this.batch)r();n&&t.bindFramebuffer(t.FRAMEBUFFER,null)}_buildBatch(){this.batch=[];let t=!0,n=!0;const r=o=>()=>{t&&o()},i=o=>()=>{t&&n&&o()},a=Pu(this.buffer.reverse(),o=>o.mark);for(const[o,s]of[...a.entries()].reverse()){if(!o.isReady())continue;this.batch.push(()=>{t=o.unitView.getEffectiveOpacity()>0}),this.batch.push(...o.prepareRender(this.globalOptions).map(l=>r(l)));let u;for(const l of s){const c=l.coords;c.equals(u)||this.batch.push(r(()=>{n=o.setViewport(c,l.clipRect)})),this.batch.push(i(l.callback)),u=l.coords}}}}class mF extends Kw{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 bF{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 yF{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 wF=e=>new Promise(t=>setTimeout(t,e));function vF(e){const t=e.requestAnimationFrame||window.requestAnimationFrame,n=e.signal,r=()=>new Promise((i,a)=>{if(n!=null&&n.aborted)return a("aborted");const o=performance.now(),s=o+(e.duration||1e3),u=typeof e.from=="number"?e.from:0,l=typeof e.to=="number"?e.to:1,c=e.easingFunction||(m=>m),f=m=>(m-o)/(s-o),h=m=>m*(l-u)+u,d=m=>Math.max(0,Math.min(1,m)),p=m=>{n!=null&&n.aborted?a("aborted"):(e.onUpdate(h(c(d(f(m))))),m<s?t(p):(e.onUpdate(h(c(1))),i()))};t(p)});return e.delay?n!=null&&n.aborted?Promise.reject("aborted"):wF(e.delay).then(r):r()}class xF{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 vF({requestAnimationFrame:n=>this.requestTransition(n),...t})}}class AF{constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new HR(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 EF="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMh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TZU3pjsRh4upqmL/fo4epaODR4vFMs88Q1kZgQCxGLZ9DXIdGbhDZy579mAwGAyGrMnloxAhPhSPBw4n7lYjV2tZFBWhCKC+Xsv/x5xuLy1FtsxlRwAgF05BBevBYDAYTAqojETZc4m25xLRKDMzSAC2b6ekhCeS88sCoOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",_F={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class SF{constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new Rr([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:B0(zw),texture:t?this._createTextureNow(EF):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(Ue(r)&&(r=_F[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const i={family:t,style:n,weight:r};let a=this._fonts.get(i);return a||(a={metrics:void 0,texture:void 0},this._fonts.set(i,a),this._promises.push(this._loadFontEntry(a,i))),a}async _loadFontEntry(t,n){try{const r=await this._loadMetadata(n.family),i=kF(r,n),a=this.fontRepository+ev(n.family)+"/"+i.replace(/\.\w+/,""),o=this._createTexture(a+".png"),s=this._loadFont(a+".json");t.texture=await o,t.metrics=await s}catch(r){console.log("Cannot load font. Using default.",r),t.metrics=this._defaultFontEntry.metrics,t.texture=this._defaultFontEntry.texture}}_loadFont(t){let n=this._fontPromises.get(t);return n||(n=fetch(t).then(r=>{if(!r.ok)throw new Error("Could not load font: "+r.status);return r}).then(r=>r.json()).then(r=>B0(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=ev(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=>CF(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)=>{Qs(n,{src:t,min:n.LINEAR},(a,o,s)=>{a?i(a):r(o)})})}_createTextureNow(t){const n=this._webGLHelper.gl;let r;const i=new Promise((a,o)=>{r=Qs(n,{src:t,min:n.LINEAR},(s,u,l)=>{s?o(s):a(u)})});return this._promises.push(i),r}}function ev(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function CF(e){const t=e.split(`
374
- `),n=[];let r;for(const i of t)if(i.startsWith("fonts {")&&(r={name:void 0,style:void 0,weight:void 0,filename:void 0,post_script_name:void 0,full_name:void 0,copyright:void 0}),i.startsWith("}")&&(n.push(r),r=void 0),r){let a=i.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(a){const o=a[1];r[o]=a[2]}if(a=i.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),a){const o=a[1];r[o]=+a[2]}}return n}function kF(e,t){let n,r=Number.POSITIVE_INFINITY;for(const i of e)if(t.family.localeCompare(i.name,void 0,{sensitivity:"accent"})==0&&t.style==i.style){const a=Math.abs(t.weight-i.weight);a<r&&(r=a,n=i)}return n==null?void 0:n.filename}function TF(e,t){const n=[];let r;for(const i of e.split(`
375
- `))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 IF{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=Rm([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 BF(e){const t={},n=["string","number","boolean"],r=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const i in e){const a=i;!r.includes(i)&&n.includes(typeof e[a])&&(t[a]=e[a])}return t}const tv=new Map;async function DF(e,t,n){const r=e.symbol;let i=tv.get(r)??await MF(e.symbol);return i?(tv.set(r,i),it`
374
+ }`)(f,c));function y(A){r=A,i=A.length,n=0}function w(A,S,_,T){y(T),a=d(A,S,_);for(const I of m)I(a);return a}return w}function j9(e,t){return Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t))}class $9 extends ol{constructor(n,r){const i={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,i.channel);K(this,ba,void 0);nn(this,"chrPrefixFixer",n=>n);if(this.params=i,!this.params.url)throw new Error("No URL provided for BamSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>Vz),Promise.resolve().then(()=>ul)]).then(([{BamFile:o},{RemoteFile:s}])=>{const u=l=>new s(al(l,this.view.getBaseUrl()));Fe(this,ba,new o({bamFilehandle:u(this.params.url),baiFilehandle:u(this.params.indexUrl??this.params.url+".bai")})),W(this,ba).getHeader().then(l=>{var h,d;const c=this.genome.hasChrPrefix(),f=(d=(h=W(this,ba).indexToChr)==null?void 0:h[0])==null?void 0:d.refName.startsWith("chr");c&&!f?this.chrPrefixFixer=p=>p.replace("chr",""):!c&&f&&(this.chrPrefixFixer=p=>"chr"+p),a()})})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>W(this,ba).getRecordsForRange(this.chrPrefixFixer(i.chrom),i.startPos,i.endPos,{signal:a}).then(o=>o.map(s=>({chrom:i.chrom,start:s.get("start"),end:s.get("end"),name:s.get("name"),MD:s.get("MD"),cigar:s.get("cigar"),mapq:s.get("mq"),strand:s.get("strand")===1?"+":"-"}))));r&&this.publishData(r)}}ba=new WeakMap;class q9 extends ol{constructor(n,r){const i={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",...n};super(r,i.channel);K(this,yu,void 0);if(this.params=i,!this.params.url)throw new Error("No URL provided for TabixSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(a=>{Promise.all([Promise.resolve().then(()=>vv),Promise.resolve().then(()=>Jz),Promise.resolve().then(()=>ul)]).then(([{Buffer:o},{TabixIndexedFile:s},{RemoteFile:u}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const l=c=>new u(al(c,this.view.getBaseUrl()));Fe(this,yu,new s({filehandle:l(this.params.url),tbiFilehandle:l(this.params.indexUrl??this.params.url+".tbi")})),a()})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,a)=>{const o=[];return await W(this,yu).getLines(i.chrom,i.startPos,i.endPos,{lineCallback:s=>{o.push(s)},signal:a}),this._parseFeatures(o)});r&&this.publishData(r)}_parseFeatures(n){return[]}}yu=new WeakMap;class W9 extends q9{constructor(n,r){super(n,r);K(this,wu,void 0);Promise.resolve().then(()=>OU).then(i=>{Fe(this,wu,i.default)})}_parseFeatures(n){var i;return(i=W(this,wu))==null?void 0:i.parseStringSync(n.join(`
375
+ `),{parseSequences:!1})}}wu=new WeakMap;function Z9(e,t){if(Zw(e))return new R9(e,t);if(F9(e))return new M9(e,t);if(P9(e))return new L9(e,t);if(Y9(e))return rF(e.lazy,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function Y9(e){return"lazy"in e}function Q9(e){return(e==null?void 0:e.type)=="axisTicks"}function X9(e){return(e==null?void 0:e.type)=="axisGenome"}function K9(e){return(e==null?void 0:e.type)=="indexedFasta"}function J9(e){return(e==null?void 0:e.type)=="bigwig"}function eF(e){return(e==null?void 0:e.type)=="bigbed"}function tF(e){return(e==null?void 0:e.type)=="bam"}function nF(e){return(e==null?void 0:e.type)=="gff3"}function rF(e,t){if(Q9(e))return new O9(e,t);if(X9(e))return new N9(e,t);if(K9(e))return new z9(e,t);if(J9(e))return new U9(e,t);if(eF(e))return new H9(e,t);if(tF(e))return new $9(e,t);if(nF(e))return new W9(e,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function iF(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(`,
376
+ `)+" };");return n.properties=t,n}class of extends tt{get behavior(){return $n}constructor(){super();const t=n=>{const r=iF(n);this.handle=i=>this._propagate(r(i)),this.handle(n)};this.handle=t,this.beginBatch=n=>{pw(n)&&(this.handle=t),super.beginBatch(n)}}}function aF(e){return"name"in e}class Yw extends il{constructor(n,r,i){super(r);K(this,vu,void 0);this.provider=i,this.params=n}get identifier(){return this.params.name}updateDynamicData(n){Fe(this,vu,n),this.loadSynchronously()}loadSynchronously(){const n=W(this,vu)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(n))n.length>0&&(r=qw(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()}}vu=new WeakMap;class Qw{constructor(){this._dataSourcesByHost=new Map,this._collectorsByHost=new Map,this._observers=new Map}get dataSources(){return[...new Set(this._dataSourcesByHost.values()).values()]}get collectors(){return[...this._collectorsByHost.values()]}addObserver(t,n){let r=this._observers.get(n);r||(r=[],this._observers.set(n,r)),r.push(t)}_relayObserverCallback(t,n){const r=this._observers.get(n);if(r)for(const i of r)i(t)}addDataSource(t,n){this._dataSourcesByHost.set(n,t)}findDataSourceByKey(t){return this._dataSourcesByHost.get(t)}findNamedDataSource(t){let n,r=[];for(const[i,a]of this._dataSourcesByHost.entries())if(a instanceof Yw&&t==a.identifier){if(n&&n!==a)throw new Error(`Found multiple instances of named data: ${t}. Data flow optimization is broken (it's a bug).`);n=a,r.push(i)}if(n)return{dataSource:n,hosts:r}}addCollector(t,n){this._collectorsByHost.set(n,t),t.observers.push(r=>this._relayObserverCallback(r,n))}findCollectorByKey(t){return this._collectorsByHost.get(t)}initialize(){for(const t of this.dataSources)t.visit(n=>n.initialize())}}function oF(e,t){const n=new Map,r=[];for(const i of e)n.set(i,{ref:i,children:[]});for(const i of n.values()){const a=n.get(t(i.ref));a?a.children.push(i):r.push(i)}return r}function Xw(e,t,n){var i,a;const r=(i=t.preOrder)==null?void 0:i.call(t,e);if(r)return r;for(const o of n(e)){const s=Xw(o,t,n);if(s==="stop")return s}return(a=t.postOrder)==null?void 0:a.call(t,e)}function sF(e,t){return Xw(e,t,n=>n.children)}function lF(e,t){const n=[];let r;const i=t??new Qw,a=[];function o(f,h=()=>{}){if(!r)throw h()||new Error("Cannot append data flow node, no parent exist!");return r.addChild(f),r=f,f}function s(f,h){return o(f,()=>new Error(`Cannot append a transform because no (inherited) data are available! ${h?JSON.stringify(h):""}`))}function u(f,h){for(const d of f){let p;try{p=T9(d,h)}catch(m){throw console.warn(m),new Error(`Cannot initialize "${d.type}" transform: ${m}`)}p.behavior&Kr&&s(new of),s(p)}}const l=f=>{if(n.push(r),f.spec.data){const h=aF(f.spec.data)?new Yw(f.spec.data,f,f.context.getNamedDataFromProvider):Z9(f.spec.data,f);r=h,i.addDataSource(h,f)}if(f.spec.transform&&u(f.spec.transform,f),f instanceof Qt){if(!r)throw new Error(`A unit view (${f.getPathString()}) has no (inherited) data source`);const h=uF(f);if(h){a.push(h.rewrite);for(const p of h.transforms)s(p)}f.mark.isPickingParticipant()&&(s(new of),s(new jw({type:"identifier"})));const d=new zw({type:"collect",groupby:f.getFacetFields(),sort:cF(f,h==null?void 0:h.rewrittenEncoding)});o(d),i.addCollector(d,f)}},c=oF(e.getDescendants(),f=>f.dataParent);for(const f of c)sF(f,{preOrder:h=>l(h.ref),postOrder:()=>{r=n.pop()}});return a.forEach(f=>f()),i}function uF(e){var a;const t=[],n={},r=[];for(const[o,s]of Object.entries(e.getEncoding())){const u=o;Vs(u)&&I2(s)&&r.push({channel:u,chromPosDef:s})}const i=Lu(r,o=>Hi(o.channel),o=>o.chromPosDef.chrom);for(const[o,s]of i.entries())for(const[u,l]of s.entries()){const c=[],f=[],h=[];for(const{channel:d,chromPosDef:p}of l){const m=A=>A.replace(/[^A-Za-z0-9_]/g,""),y=["_linearized_",m(p.chrom),"_",m(p.pos)].join(""),w={...((a=e.spec.encoding)==null?void 0:a[d])??e.getEncoding()[d]??{},field:y};delete w.chrom,delete w.pos,!w.type&&p.type&&(w.type=p.type),n[d]=w,c.push(p.pos),h.push(p.offset??0),f.push(y)}t.push(new of),t.push(new Uw({type:"linearizeGenomicCoordinate",channel:o,chrom:u,pos:c,offset:h,as:f},e))}return t.length?{transforms:t,rewrittenEncoding:n,rewrite:()=>{e.spec.encoding={...e.spec.encoding,...n},TD(e.mark,"encoding")}}:void 0}function cF(e,t){var r;const n={...e.getEncoding(),...t}.x;if(Yt(n)&&(r=e.getScaleResolution("x"))!=null&&r.isZoomable()){if(Gi(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!Hs(n)){if(Cc(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function Kw(e,t=void 0){if(e.parent!==t)return!1;for(const n of e.children)if(!Kw(n,e))return!1;return!0}function V0(e,t=!1){if(e.behavior&F0&&(t=!0),e instanceof of)if(t)t=!1;else{const n=e.children[0];e.excise(),n&&V0(n,t);return}e.behavior&$n&&(t=!1);for(let n=0,r=e.children.length;n<r;n++)V0(e.children[n],t||r>1)}function fF(e){const t=[...e._dataSourcesByHost.entries()],n=new Map;for(const r of t){const i=r[1];i.identifier&&!n.has(i.identifier)&&n.set(i.identifier,i)}e._dataSourcesByHost.clear();for(let[r,i]of t){const a=n.get(i.identifier);a&&(a.adoptChildrenOf(i),i=a),e.addDataSource(i,r)}}function hF(e){if(V0(e),!Kw(e))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function dF(e){for(const t of e.dataSources)hF(t);fF(e)}function pF(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 gF(e){for(const t of Oa){const n=e.getScaleResolution(t);n&&!n.name&&n.isZoomable()&&(n.name=`${t}_at_root`)}}async function mF(e,t,n){var i;const r=e.import;if("url"in r){const a=Xu({baseURL:t}),o=r.url,s=JSON.parse(await a.load(o).catch(u=>{throw new Error(`Could not load imported view spec: ${o}
377
+ Reason: ${u.message}`)}));if(n.isViewSpec(s))return s.baseUrl=(i=o.match(/^[^?#]*\//))==null?void 0:i[0],s;throw new Error(`The imported spec "${o}" is not a view spec: ${JSON.stringify(e)}`)}else throw new Error("Not an url import: "+JSON.stringify(r))}function Jw(e){return e.getSize().addPadding(e.getOverhang())}function bF(e){const t=n=>n.grow>0?void 0:n.px;return{width:t(e.width),height:t(e.height)}}function hr(e){return()=>e}const Rn=class Rn{static create(t,n,r,i){return new Rn(hr(t),hr(n),hr(r),hr(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"?hr(i):typeof i=="function"?i:this._passThrough(r)};return new Rn(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new Rn(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 Rn(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 Rn(()=>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 Rn(()=>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 Rn(hr(this.x),hr(this.y),hr(this.width),hr(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)}`}};nn(Rn,"ZERO",Rn.create(0,0,0,0));let dr=Rn;class ev{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class tv extends ev{constructor(t,n){super(t),this.webGLHelper=n,this.buffer=[],this.coords=void 0,this.views=new Set}pushView(t,n){this.views.add(t),this.coords=n}renderMark(t,n){if(this.globalOptions.picking&&!t.isPickingParticipant())return;const r=t.render(n);r&&this.buffer.push({mark:t,callback:r,coords:this.coords,clipRect:n.clipRect})}render(){if(this.batch||this._buildBatch(),this.batch.length==0)return;const t=this.webGLHelper.gl,n=this.globalOptions.picking;t.bindFramebuffer(t.FRAMEBUFFER,n?this.webGLHelper._pickingBufferInfo.framebuffer:null),this.webGLHelper.clearAll();for(const r of this.views)r.onBeforeRender();for(const r of this.batch)r();n&&t.bindFramebuffer(t.FRAMEBUFFER,null)}_buildBatch(){this.batch=[];let t=!0,n=!0;const r=o=>()=>{t&&o()},i=o=>()=>{t&&n&&o()},a=Lu(this.buffer.reverse(),o=>o.mark);for(const[o,s]of[...a.entries()].reverse()){if(!o.isReady())continue;this.batch.push(()=>{t=o.unitView.getEffectiveOpacity()>0}),this.batch.push(...o.prepareRender(this.globalOptions).map(l=>r(l)));let u;for(const l of s){const c=l.coords;c.equals(u)||this.batch.push(r(()=>{n=o.setViewport(c,l.clipRect)})),this.batch.push(i(l.callback)),u=l.coords}}}}class yF extends ev{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 wF{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 vF{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 xF=e=>new Promise(t=>setTimeout(t,e));function AF(e){const t=e.requestAnimationFrame||window.requestAnimationFrame,n=e.signal,r=()=>new Promise((i,a)=>{if(n!=null&&n.aborted)return a("aborted");const o=performance.now(),s=o+(e.duration||1e3),u=typeof e.from=="number"?e.from:0,l=typeof e.to=="number"?e.to:1,c=e.easingFunction||(m=>m),f=m=>(m-o)/(s-o),h=m=>m*(l-u)+u,d=m=>Math.max(0,Math.min(1,m)),p=m=>{n!=null&&n.aborted?a("aborted"):(e.onUpdate(h(c(d(f(m))))),m<s?t(p):(e.onUpdate(h(c(1))),i()))};t(p)});return e.delay?n!=null&&n.aborted?Promise.reject("aborted"):xF(e.delay).then(r):r()}class EF{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 AF({requestAnimationFrame:n=>this.requestTransition(n),...t})}}class _F{constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new jR(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 SF="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088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5IHn9QDicmguqryczSuAfIdtAGuG/IDMYDFsEIwCz44noaOLPv5GYgOlpgkGorKSzjWPHlHbZLAGwH9a0RBpgWehBNNoPebK+pAbU1LAeDAaDwZDLKzBEYiiRCCTiTZU3pjsRh4upqmL/fo4epaODR4vFMs88Q1kZgQCxGLZ9DXIdGbhDZy579mAwGAyGrMnloxAhPhSPBw4n7lYjV2tZFBWhCKC+Xsv/x5xuLy1FtsxlRwAgF05BBevBYDAYTAqojETZc4m25xLRKDMzSAC2b6ekhCeS88sCoOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",CF={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class kF{constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new Rr([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:B0(Gw),texture:t?this._createTextureNow(SF):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(Ue(r)&&(r=CF[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const i={family:t,style:n,weight:r};let a=this._fonts.get(i);return a||(a={metrics:void 0,texture:void 0},this._fonts.set(i,a),this._promises.push(this._loadFontEntry(a,i))),a}async _loadFontEntry(t,n){try{const r=await this._loadMetadata(n.family),i=IF(r,n),a=this.fontRepository+nv(n.family)+"/"+i.replace(/\.\w+/,""),o=this._createTexture(a+".png"),s=this._loadFont(a+".json");t.texture=await o,t.metrics=await s}catch(r){console.log("Cannot load font. Using default.",r),t.metrics=this._defaultFontEntry.metrics,t.texture=this._defaultFontEntry.texture}}_loadFont(t){let n=this._fontPromises.get(t);return n||(n=fetch(t).then(r=>{if(!r.ok)throw new Error("Could not load font: "+r.status);return r}).then(r=>r.json()).then(r=>B0(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=nv(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=>TF(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)=>{Qs(n,{src:t,min:n.LINEAR},(a,o,s)=>{a?i(a):r(o)})})}_createTextureNow(t){const n=this._webGLHelper.gl;let r;const i=new Promise((a,o)=>{r=Qs(n,{src:t,min:n.LINEAR},(s,u,l)=>{s?o(s):a(u)})});return this._promises.push(i),r}}function nv(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function TF(e){const t=e.split(`
378
+ `),n=[];let r;for(const i of t)if(i.startsWith("fonts {")&&(r={name:void 0,style:void 0,weight:void 0,filename:void 0,post_script_name:void 0,full_name:void 0,copyright:void 0}),i.startsWith("}")&&(n.push(r),r=void 0),r){let a=i.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(a){const o=a[1];r[o]=a[2]}if(a=i.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),a){const o=a[1];r[o]=+a[2]}}return n}function IF(e,t){let n,r=Number.POSITIVE_INFINITY;for(const i of e)if(t.family.localeCompare(i.name,void 0,{sensitivity:"accent"})==0&&t.style==i.style){const a=Math.abs(t.weight-i.weight);a<r&&(r=a,n=i)}return n==null?void 0:n.filename}function BF(e,t){const n=[];let r;for(const i of e.split(`
379
+ `))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 DF{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=Fm([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 RF(e){const t={},n=["string","number","boolean"],r=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const i in e){const a=i;!r.includes(i)&&n.includes(typeof e[a])&&(t[a]=e[a])}return t}const rv=new Map;async function FF(e,t,n){const r=e.symbol;let i=rv.get(r)??await LF(e.symbol);return i?(rv.set(r,i),Ke`
376
380
  <div class="title">
377
381
  <strong>${i.name}</strong>
378
382
  ${i.description}
379
383
  </div>
380
384
  <p class="summary">${i.summary}</p>
381
385
  <p class="source">Source: NCBI RefSeq Gene</p>
382
- `):null}async function RF(e){console.log("Searching: "+e);const t={mode:"cors"},r=(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&term=${e}[GENE]&sort=relevance&retmode=json`,t).then(i=>i.json())).esearchresult.idlist[0];return r?(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id=${r}&retmode=json`,t).then(o=>o.json())).result[r]:null}const FF=af(RF,500);function MF(e){return FF(e)}const PF=mt(".4~r"),LF=mt(".4~e");function nv(e){return e==null?it` <span class="na">NA</span> `:Ue(e)?e.substring(0,30):Number.isInteger(e)?""+e:Tt(e)?Math.abs(e)>Math.pow(10,8)||Math.abs(e)<Math.pow(10,-8)?LF(e):PF(e):Yo(e)?e?"True":"False":xt(e)?it`${e.map((t,n)=>[nv(t),n<e.length-1?", ":at])}`:"?"+typeof e+" "+e}async function OF(e,t,n){const r=(u,l)=>{var c;for(const[f,h]of Object.entries(t.encoders))if((c=h==null?void 0:h.accessor)!=null&&c.fields.includes(u))switch(f){case"color":case"fill":case"stroke":return it`
386
+ `):null}async function MF(e){console.log("Searching: "+e);const t={mode:"cors"},r=(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&term=${e}[GENE]&sort=relevance&retmode=json`,t).then(i=>i.json())).esearchresult.idlist[0];return r?(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id=${r}&retmode=json`,t).then(o=>o.json())).result[r]:null}const PF=af(MF,500);function LF(e){return PF(e)}const OF=mt(".4~r"),NF=mt(".4~e");function iv(e){return e==null?Ke` <span class="na">NA</span> `:Ue(e)?e.substring(0,30):Number.isInteger(e)?""+e:Tt(e)?Math.abs(e)>Math.pow(10,8)||Math.abs(e)<Math.pow(10,-8)?NF(e):OF(e):Yo(e)?e?"True":"False":xt(e)?Ke`${e.map((t,n)=>[iv(t),n<e.length-1?", ":rt])}`:"?"+typeof e+" "+e}async function zF(e,t,n){const r=(u,l)=>{var c;for(const[f,h]of Object.entries(t.encoders))if((c=h==null?void 0:h.accessor)!=null&&c.fields.includes(u))switch(f){case"color":case"fill":case"stroke":return Ke`
383
387
  <span
384
388
  class="color-legend"
385
389
  style=${`background-color: ${h(l)}`}
386
390
  ></span>
387
- `}return""},i=Object.entries(e).filter(([u,l])=>!u.startsWith("_"));if(i.length===0)return;const a=it`
391
+ `}return""},i=Object.entries(e).filter(([u,l])=>!u.startsWith("_"));if(i.length===0)return;const a=Ke`
388
392
  <table class="attributes">
389
- ${i.map(([u,l])=>it`
393
+ ${i.map(([u,l])=>Ke`
390
394
  <tr>
391
395
  <th>${u}</th>
392
- <td>${nv(l)} ${r(u,e)}</td>
396
+ <td>${iv(l)} ${r(u,e)}</td>
393
397
  </tr>
394
398
  `)}
395
399
  </table>
396
- `,o=t.unitView.getTitleText(),s=o?it`
400
+ `,o=t.unitView.getTitleText(),s=o?Ke`
397
401
  <div class="title">
398
402
  <strong>${o}</strong>
399
403
  </div>
400
- `:"";return it`${s}${a}`}class sl extends Yi{constructor(n,r,i,a,o,s){super(n,r,i,a,o,s);K(this,_r,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){Fe(this,_r,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!Y0(i)&&!Z0(i))throw new Zi("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return W(this,_r).slice()}*[Symbol.iterator](){for(const n of W(this,_r))yield n}render(n,r,i={}){if(super.render(n,r,i),!!this.isConfiguredVisible()){n.pushView(this,r);for(const a of W(this,_r))a.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=W(this,_r).length-1;r>=0;r--)if(W(this,_r)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}_r=new WeakMap;class rv{constructor(t,n){this.n=t,this.maxCols=n??1/0}get nRows(){return this.maxCols==1/0?1:Math.ceil(this.n/this.maxCols)}get nCols(){return Math.min(this.n,this.maxCols)}get rowIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<r;i++){const a=[];t.push(a);for(let o=0;o<n;o++){const s=i*n+o;s<this.n&&a.push(s)}}return t}get colIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<n;i++){const a=[];t.push(a);for(let o=0;o<r;o++){const s=o*n+i;s<this.n&&a.push(s)}}return t}getCellIndex(t,n){let r=0;if(this.maxCols==1/0)r=n==0?t:void 0;else{if(t>=this.maxCols)return;r=n*this.nCols+t}return r<this.n?r:void 0}getCellCoords(t){if(!(t<0||t>=this.n))return[t%this.nCols,Math.floor(t/this.nCols)]}}const NF="chromosome_ticks_and_labels",zF={x:"width",y:"height"};function j0(e){return e=="x"?"y":"x"}const sf={x:["bottom","top"],y:["left","right"]},$0=Object.fromEntries(Object.entries(sf).map(([e,t])=>t.map(n=>[n,e])).flat(1));function ei(e){return $0[e]}class iv extends sl{constructor(t,n,r,i,a,o){const s=n=="locus",u={...s?GF:av,...UF(n,t),...t};super(s?HF(u,n):ov(u,n),r,i,a,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=u}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return $0[this.axisProps.orient]=="x"?new Jr(n,t):new Jr(t,n)}getPerpendicularSize(){return q0(this.axisProps)}isPickingSupported(){return!1}}function q0(e){const t=ei(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 av={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 UF(e,t){const n=t.orient,r=e=="nominal"||e=="ordinal";let i="center",a="middle",o=t.labelAngle??((n=="top"||n=="bottom")&&r?-90:0);switch(n){case"left":i="right";break;case"right":i="left";break;case"top":case"bottom":Math.abs(o)>30?(i=o>0==(n=="bottom")?"left":"right",a="middle"):a=n=="top"?"alphabetic":"top";break}return{labelAlign:i,labelAngle:o,labelBaseline:a}}function ov(e,t){const n={...e,extent:q0(e)},r=ei(n.orient),i=j0(r),a=n.orient=="bottom"||n.orient=="right"?1:-1,o=n.orient=="bottom"||n.orient=="left"?1:0,s=()=>({name:"domain",data:{values:[0]},mark:{type:"rule",clip:!1,strokeDash:n.domainDash,strokeCap:n.domainCap,color:n.domainColor,[i]:o,size:n.domainWidth}}),u=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[i+"Offset"]:(n.tickSize+n.labelPadding)*a,[i]:o,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:t},text:{field:"label"}}}),l=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[i]:{value:o},[i+"2"]:{value:o-n.tickSize/n.extent*(o?1:-1)}}}),c=()=>({name:"title",data:{values:[0]},mark:{type:"text",clip:!1,align:"center",baseline:n.orient=="bottom"?"bottom":"top",angle:[0,90,0,-90][["top","right","bottom","left"].indexOf(n.orient)],text:n.title,color:n.titleColor,[r]:.5,[i]:1-o}}),f=()=>{const d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:t}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(u()),d},h={resolve:{scale:{[r]:"forced"}},[zF[j0(r)]]:n.extent,data:{lazy:{type:"axisTicks",channel:r,axis:e}},layer:[]};return n.domain&&h.layer.push(s()),(n.ticks||n.labels)&&h.layer.push(f()),n.title&&h.layer.push(c()),h}const GF={...av,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 HF(e,t){const n={...e,extent:q0(e)},r=ei(n.orient),i=j0(r),a=n.orient=="bottom"||n.orient=="left"?1:0,o=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:e.chromTickDash,strokeDashOffset:e.chromTickDashOffset,[i]:a,[i+"2"]:a-n.chromTickSize/n.extent*(a?1:-1),color:e.chromTickColor,size:n.chromTickWidth}}),s=()=>{let c;switch(n.orient){case"top":c={y:0,angle:0,paddingX:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":c={y:1,angle:0,paddingX:4,dy:n.chromLabelPadding+n.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":c={x:1,angle:-90,paddingY:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":c={x:0,angle:90,align:"right",paddingY:4,dy:-n.chromLabelPadding};break;default:c={}}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,...c},encoding:{[r+"2"]:{field:"continuousEnd",type:t},text:{field:"name"}}}};let u;switch(n.orient){case"bottom":case"top":u={};break;case"left":u={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":u={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:u={}}const l=ov({...e,...u},t);if(e.chromTicks||e.chromLabels){const c={name:NF,data:{lazy:{type:"axisGenome",channel:ei(n.orient)}},encoding:{[r]:{field:"continuousStart",type:t,band:0}},layer:[]};if(e.chromTicks&&c.layer.push(o()),e.chromLabels){c.layer.push(s());let f;l.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(d=>d.name=="labels").forEach(d=>{f=d.mark})),f&&(n.orient=="top"||n.orient=="bottom"?(f.viewportEdgeFadeWidthLeft=30,f.viewportEdgeFadeDistanceLeft=40):(f.viewportEdgeFadeWidthBottom=30,f.viewportEdgeFadeDistanceBottom=40))}l.layer.push(c)}return l}class VF extends sl{constructor(t,n,r,i,a,o){const u={...n=="locus"?jF:sv,...t};super(ZF(u,n),r,i,a,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=u}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const sv={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},jF={...sv,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function $F(e,t){const n=e,r=ei(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 qF(e,t){const n=e,r=ei(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 WF(e,t){const n=e,r=ei(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 ZF(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(WF(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(qF(n,t)),n.grid&&n.gridOpacity>0&&r.push($F(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[ei(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const lv={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"},YF={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},QF={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},XF={start:0,middle:.5,end:1},KF={start:"left",middle:"center",end:"right"};function JF(e){if(!e)return;const t=Ue(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":YF,overlay:QF}[t.style]??{},r={...lv,...n,...t};let i={},a={x:0,y:0};const o=XF[r.anchor??"middle"];switch(r.orient){case"top":a={x:o,y:1},i={baseline:"alphabetic",angle:0};break;case"right":a={x:1,y:1-o},i={baseline:"alphabetic",angle:90};break;case"bottom":a={x:o,y:0},i={baseline:"top",angle:0};break;case"left":a={x:0,y:o},i={baseline:"alphabetic",angle:-90};break}const s={...lv,...i,...n,...t},u={xOffset:0,yOffset:0};switch(r.orient){case"top":u.yOffset=-s.offset;break;case"right":u.xOffset=s.offset;break;case"bottom":u.yOffset=s.offset;break;case"left":u.xOffset=-s.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...a,...u,text:s.text,align:s.align??KF[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 e7(e,t,n,r){if(e.type=="wheel"){e.uiEvent.preventDefault();const i=e.uiEvent,a=i.deltaMode?120:1;let{x:o,y:s}=e.point;if(r){const u=r.mark.encoders;u.x&&!u.x2&&!u.x.constantValue&&(o=+u.x(r.datum)*t.width+t.x),u.y&&!u.y2&&!u.y.constantValue&&(s=(1-+u.y(r.datum))*t.height+t.y)}Math.abs(i.deltaX)<Math.abs(i.deltaY)?n({x:o,y:s,xDelta:0,yDelta:0,zDelta:i.deltaY*a/300}):n({x:o,y:s,xDelta:-i.deltaX*a,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){const i=e.uiEvent;i.preventDefault();let a=i;const o=u=>{n({x:a.clientX,y:a.clientY,xDelta:u.clientX-a.clientX,yDelta:u.clientY-a.clientY,zDelta:0}),a=u},s=u=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",s)};document.addEventListener("mouseup",s,!1),document.addEventListener("mousemove",o,!1)}}class t7 extends Yi{constructor(n,r,i,a,o,s,u){super(n,r,i,a,o,u);K(this,Sr);K(this,dh);K(this,wa);K(this,vu);K(this,xu);K(this,Au);K(this,ph);K(this,$o);K(this,gh);K(this,Ho,1/0);K(this,Vo,10);K(this,en,[]);K(this,ya,{});K(this,jo,0);this.spec=n,Fe(this,Vo,n.spacing??10),Fe(this,Ho,s),Fe(this,en,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),W(this,en).push(new cv(n,this,W(this,jo))),j_(this,jo)._++}setChildren(n){Fe(this,en,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=W(this,en).findIndex(a=>a.view==n);if(i>=0)W(this,en)[i]=new cv(r,this,W(this,jo));else throw new Error("Not my child view!")}get children(){return W(this,en).map(n=>n.view)}get childCount(){return W(this,en).length}async createAxes(){const n=[];for(const r of Oa){const i=this.resolutions.axis[r];if(i){const a=i.getAxisProps();if(a){const o={title:i.getTitle(),orient:sf[r][0],...a},s=new iv(o,i.scaleResolution.type,this.context,this,this);n.push(s.initializeChildren()),W(this,ya)[r]=s}}}return Promise.all([...n,...W(this,en).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of W(this,en))yield*n.getChildren();for(const n of Object.values(W(this,ya)))yield n}getOverhang(){return J(this,ph,X_).call(this).union(J(this,$o,Eh).call(this))}getSize(){return this._cache("size",()=>new Jr(J(this,xu,_m).call(this,"column"),J(this,xu,_m).call(this,"row")).addPadding(J(this,$o,Eh).call(this)))}render(n,r,i={}){if(super.render(n,r,i),!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(J(this,$o,Eh).call(this)),n.pushView(this,r);const a={devicePixelRatio:this.context.devicePixelRatio},o=pw(J(this,vu,Em).call(this,"column"),r.width,a),s=pw(J(this,vu,Em).call(this,"row"),r.height,a),u=new rv(W(this,Sr,xa).length,W(this,Ho)??1/0),l=c=>Math.round(c*devicePixelRatio)/devicePixelRatio;for(const[c,f]of W(this,Sr,xa).entries()){const{view:h,axes:d,gridLines:p,background:m,backgroundStroke:y,title:w}=f,[A,S]=u.getCellCoords(c),_=o[J(this,Au,Sm).call(this,"column",A)],T=s[J(this,Au,Sm).call(this,"row",S)],I=h.getViewportSize(),B=h.getSize(),R=h.getOverhang(),M=_.location-R.left,G=T.location-R.top,N=(Ne,L)=>(Ne[L].grow?(L=="width"?_:T).size:Ne[L].px)+R[L],re=N(I,"width"),se=N(I,"height"),te=N(B,"width"),ge=N(B,"height"),Xe=f.scrollbars.horizontal,De=f.scrollbars.vertical,Ke=Xe?()=>l(Xe.viewportOffset):()=>0,We=De?()=>l(De.viewportOffset):()=>0,Je=new dr(()=>r.x+M,()=>r.y+G,()=>re,()=>se),_e=h.isScrollable(),Se=_e?new dr(()=>r.x+M-Ke(),()=>r.y+G-We(),()=>te,()=>ge):Je;f.coords=Je;const gt=i.clipRect?Je.intersect(i.clipRect):Je;m==null||m.render(n,gt,{...i,clipRect:void 0});for(const Ne of Object.values(p))Ne.render(n,Je,i);const $t=a7(h)||_e;$t&&h.render(n,Se,{...i,clipRect:gt}),y==null||y.render(n,gt,{...i,clipRect:void 0});for(const[Ne,L]of Object.entries(d)){const P=Ne=="left"||Ne=="right"?"vertical":"horizontal",$=f.scrollbars[P],V=$?Je.modify(P=="vertical"?{y:()=>Se.y,height:ge}:{x:()=>Se.x,width:te}):Je,Z=uv(V,Ne,L);let C=i.clipRect;$&&(C=Z.intersect(C).intersect($?Je.modify(P=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),L.render(n,Z,{...i,clipRect:C})}for(const Ne of Object.values(W(this,ya))){const P=Ne.axisProps.orient;(P=="left"&&A==0||P=="right"&&A==u.nCols-1||P=="top"&&S==0||P=="bottom"&&S==u.nRows-1)&&Ne.render(n,uv(Je.shrink(f.view.getOverhang()),P,Ne),i)}$t||h.render(n,Se,i);for(const Ne of Object.values(f.scrollbars))Ne.updateScrollbar(Je,Se),Ne.render(n,r,i);w==null||w.render(n,Je,i)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=W(this,Sr,xa).find(a=>a.coords.containsPoint(n.point.x,n.point.y));for(const a of Object.values((r==null?void 0:r.scrollbars)??{}))if(a.coords.containsPoint(n.point.x,n.point.y)&&(a.propagateInteractionEvent(n),n.stopped))return;const i=r==null?void 0:r.view;i&&(i.propagateInteractionEvent(n),(i instanceof Yt||i instanceof sl)&&e7(n,r.coords,a=>J(this,gh,K_).call(this,r.coords,r.view,a),this.context.getCurrentHover())),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}Ho=new WeakMap,Vo=new WeakMap,en=new WeakMap,ya=new WeakMap,jo=new WeakMap,Sr=new WeakSet,xa=function(){return W(this,en).filter(n=>n.view.isConfiguredVisible())},dh=new WeakSet,Q_=function(){return new rv(W(this,Sr,xa).length,W(this,Ho)??1/0)},wa=new WeakSet,Su=function(n){const r=n=="column"?"width":"height",i=(a,o)=>a.map(s=>{const l=W(this,Sr,xa)[s].getOverhangAndPadding();return n=="column"?o?l.right:l.left:o?l.bottom:l.top}).reduce((s,u)=>Math.max(s,u),0);return this._cache(`size/directionSizes/${n}`,()=>W(this,dh,Q_)[n=="column"?"colIndices":"rowIndices"].map(a=>({axisBefore:i(a,0),axisAfter:i(a,1),view:lR(a.map(o=>W(this,Sr,xa)[o].view.getViewportSize()[r]))})))},vu=new WeakSet,Em=function(n){const r=J(this,wa,Su).call(this,n),i=[];i.push(tl);for(const[a,o]of r.entries())a>0&&i.push({px:W(this,Vo),grow:0}),(a==0||this.wrappingFacet)&&i.push(tl),i.push({px:o.axisBefore,grow:0}),i.push(o.view),i.push({px:o.axisAfter,grow:0}),(a==r.length-1||this.wrappingFacet)&&i.push(tl);return i},xu=new WeakSet,_m=function(n){let r=0,i=0;const a=n=="row"?this.spec.height:this.spec.width;if(a||a===0)return mw(a);const o=J(this,wa,Su).call(this,n);for(const[s,u]of o.entries())s>0&&(i+=W(this,Vo)),(s==0||this.wrappingFacet)&&(i+=0),i+=u.axisBefore,i+=u.view.px??0,r+=u.view.grow??0,i+=u.axisAfter,(s==o.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},Au=new WeakSet,Sm=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},ph=new WeakSet,X_=function(){const n=J(this,wa,Su).call(this,"column"),r=J(this,wa,Su).call(this,"row");return!n.length||!r.length?St.zero():new St(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},$o=new WeakSet,Eh=function(){const n=r=>{const i=$0[r],a=W(this,ya)[i];return(a==null?void 0:a.axisProps.orient)!==r?0:Math.max(a.getPerpendicularSize()+a.axisProps.offset,0)};return new St(n("top"),n("right"),n("bottom"),n("left"))},gh=new WeakSet,K_=function(n,r,i){for(const[a,o]of Object.entries(i7(r))){if(o.size<=0)continue;const s=n.normalizePoint(i.x,i.y),u=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:u.x-s.x,y:u.y-s.y};for(const c of o)c.zoom(2**i.zDelta,a=="y"?1-s[a]:s[a],a=="x"?l.x:-l.y)}this.context.animator.requestRender()};function n7(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 r7(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 i7(e){const t={x:new Set,y:new Set};return e.visit(n=>{for(const[r,i]of Object.entries(t)){const a=n.getScaleResolution(r);a&&a.isZoomable()&&i.add(a)}}),t}function a7(e){let t=!0;return e.visit(n=>{n instanceof Yt&&t&&(t=n.mark.properties.clip===!0)}),t}function uv(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 cv{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=dr.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,a="view"in i?i==null?void 0:i.view:void 0,o=n7(a);o&&(this.background=new Yt(o,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const s=r7(a);s&&(this.backgroundStroke=new Yt(s,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const u=JF(t.spec.title);if(u){const l=new Yt(u,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=l}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new fv(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new fv(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,u)=>{const l=s.getAxisProps();if(l===null)return;const c=l?{...l}:{};if(!c.orient){for(const f of sf[u])if(!n[f]){c.orient=f;break}if(!c.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(c.title??(c.title=s.getTitle()),!sf[u].includes(c.orient))throw new Error(`Invalid axis orientation "${c.orient}" on channel "${u}"!`);return c},a=async(s,u,l)=>{const c=i(s,u);if(c){if(n[c.orient])throw new Error(`An axis with the orient "${c.orient}" already exists!`);const f=new iv(c,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[c.orient]=f,await f.initializeChildren()}},o=async(s,u,l)=>{const c=i(s,u);if(c&&(c.grid||c.chromGrid)){const f=new VF(c,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[c.orient]=f,await f.initializeChildren()}};for(const s of["x","y"])if(t.needsAxes[s]){const u=t.resolutions.axis[s];if(!u)continue;await a(u,s,t)}for(const s of["x","y"])if(t.needsAxes[s]){const u=t.getAxisResolution(s);if(!u)continue;await o(u,s,t)}if(t instanceof sl){for(const s of t)for(const[u,l]of Object.entries(s.resolutions.axis)){const c=l.getAxisProps();c&&c.orient&&await a(l,u,s)}for(const s of t)for(const[u,l]of Object.entries(s.resolutions.axis)){const c=l.getAxisProps();c&&!c.orient&&await a(l,u,s)}}[...Object.values(n),...Object.values(r)].forEach(s=>s.visit(u=>{u instanceof Yt&&u.resolve("scale")}))}getOverhang(){const t=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+r.axisProps.offset,0):0};return new St(t("top"),t("right"),t("bottom"),t("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}class fv extends Yt{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=dr.ZERO,this.addInteractionEventListener("mousedown",(i,a)=>{if(a.stopPropagation(),this.maxScrollOffset<=0)return;const o=h=>n=="vertical"?h.clientY:h.clientX,s=a.uiEvent;s.preventDefault();const u=this.getScrollOffset(),l=o(s),c=h=>{const d=Ds(o(h)-l+u,0,this.maxScrollOffset);this.viewportOffset=d/this.maxScrollOffset*this.maxViewportOffset,this.context.animator.requestRender()},f=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",f)};document.addEventListener("mouseup",f,!1),document.addEventListener("mousemove",c,!1)})}getScrollOffset(){return this.viewportOffset/this.maxViewportOffset*this.maxScrollOffset}render(t,n,r){super.render(t,this.scrollbarCoords,r)}updateScrollbar(t,n){const r=this.config.scrollbarPadding,i=this.config.scrollbarSize,a=this.scrollDirection=="horizontal"?"width":"height",o=Math.min(1,t[a]/n[a]),s=t[a]-2*r,u=o*s;this.maxScrollOffset=s-u,this.maxViewportOffset=n[a]-t[a],this.viewportOffset=Ds(this.viewportOffset,0,this.maxViewportOffset),this.scrollbarCoords=this.scrollDirection=="vertical"?new dr(()=>t.x+t.width-i-r,()=>t.y+r+this.getScrollOffset(),()=>i,()=>u):new dr(()=>t.x+r+this.getScrollOffset(),()=>t.y+t.height-i-r,()=>u,()=>i)}}class W0 extends t7{constructor(t,n,r,i,a){super(t,n,r,i,a,Q0(t)?t.columns:lf(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=Q0(t)?t.concat:lf(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":lf(this.spec)&&t==="x"||dv(this.spec)&&t==="y"?"shared":"independent"}}const hv="viewRoot";class o7{constructor(t={}){K(this,qo,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,a,o,s,u)=>new r(i,a,o,s,i.name??u);this.addViewType(Y0,n(sl)),this.addViewType(Z0,n(Yt)),this.addViewType(lf,n(W0)),this.addViewType(dv,n(W0)),this.addViewType(Q0,n(W0)),this.addViewType(u7,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){W(this,qo).set(t,n)}createView(t,n,r,i,a){for(const[o,s]of W(this,qo))if(o(t))return s(t,n,r,i,a);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(t)]))}isViewSpec(t){const n=[...W(this,qo).keys()].filter(r=>r(t));if(n.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return n.length==1}async createOrImportView(t,n,r,i,a,o){let s;if(l7(t))if(this.options.allowImport)s=await pF(t,i.getBaseUrl(),n),o&&o(s),s7(s,t.import);else throw new Zi("Importing views is not allowed!",r);else s=t;!i&&this.options.wrapRoot&&(Z0(s)||Y0(s))&&a===hv&&(s={name:"implicitRoot",vconcat:[s]});const u=this.createView(s,n,r,i,a);return u instanceof Yi&&await u.initializeChildren(),u}}qo=new WeakMap;function s7(e,t){t.name!=null&&(e.name=t.name);const n=xt(t.params)?t.params:kt(t.params)?Object.entries(t.params).map(([r,i])=>({name:r,value:i})):[];if(n.length){e.params??(e.params=[]);for(const r of n){const i=e.params.findIndex(a=>a.name==r.name);i>=0&&(e.params[i]=r)}for(const r of n)e.params.some(i=>i.name==r.name)||e.params.push(r)}}function Z0(e){return"mark"in e&&(Ue(e.mark)||kt(e.mark))}function Y0(e){return"layer"in e&&kt(e.layer)}function l7(e){return"import"in e}function lf(e){return"vconcat"in e&&xt(e.vconcat)}function dv(e){return"hconcat"in e&&xt(e.hconcat)}function Q0(e){return"concat"in e&&xt(e.concat)}function u7(e){return"samples"in e&&kt(e.samples)&&"spec"in e&&kt(e.spec)}function c7(e){const t=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of e.paramConfigs.values()){const i=r.bind;if(!i||!("input"in i))continue;const a=r.name,o=e.getSetter(a),s=e.getValue(a),u=i.name??a,l=i.debounce?af(o,i.debounce,!1):o,c=`${t}-param-${a}`;if(i.input=="range")n.push(it`<label for=${c}>${u}</label>
404
+ `:"";return Ke`${s}${a}`}class sl extends Yi{constructor(n,r,i,a,o,s){super(n,r,i,a,o,s);K(this,_r,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){Fe(this,_r,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!Y0(i)&&!Z0(i))throw new Zi("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return W(this,_r).slice()}*[Symbol.iterator](){for(const n of W(this,_r))yield n}render(n,r,i={}){if(super.render(n,r,i),!!this.isConfiguredVisible()){n.pushView(this,r);for(const a of W(this,_r))a.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=W(this,_r).length-1;r>=0;r--)if(W(this,_r)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}_r=new WeakMap;class av{constructor(t,n){this.n=t,this.maxCols=n??1/0}get nRows(){return this.maxCols==1/0?1:Math.ceil(this.n/this.maxCols)}get nCols(){return Math.min(this.n,this.maxCols)}get rowIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<r;i++){const a=[];t.push(a);for(let o=0;o<n;o++){const s=i*n+o;s<this.n&&a.push(s)}}return t}get colIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<n;i++){const a=[];t.push(a);for(let o=0;o<r;o++){const s=o*n+i;s<this.n&&a.push(s)}}return t}getCellIndex(t,n){let r=0;if(this.maxCols==1/0)r=n==0?t:void 0;else{if(t>=this.maxCols)return;r=n*this.nCols+t}return r<this.n?r:void 0}getCellCoords(t){if(!(t<0||t>=this.n))return[t%this.nCols,Math.floor(t/this.nCols)]}}const UF="chromosome_ticks_and_labels",GF={x:"width",y:"height"};function j0(e){return e=="x"?"y":"x"}const sf={x:["bottom","top"],y:["left","right"]},$0=Object.fromEntries(Object.entries(sf).map(([e,t])=>t.map(n=>[n,e])).flat(1));function ei(e){return $0[e]}class ov extends sl{constructor(t,n,r,i,a,o){const s=n=="locus",u={...s?VF:sv,...HF(n,t),...t};super(s?jF(u,n):lv(u,n),r,i,a,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=u}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return $0[this.axisProps.orient]=="x"?new Jr(n,t):new Jr(t,n)}getPerpendicularSize(){return q0(this.axisProps)}isPickingSupported(){return!1}}function q0(e){const t=ei(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 sv={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 HF(e,t){const n=t.orient,r=e=="nominal"||e=="ordinal";let i="center",a="middle",o=t.labelAngle??((n=="top"||n=="bottom")&&r?-90:0);switch(n){case"left":i="right";break;case"right":i="left";break;case"top":case"bottom":Math.abs(o)>30?(i=o>0==(n=="bottom")?"left":"right",a="middle"):a=n=="top"?"alphabetic":"top";break}return{labelAlign:i,labelAngle:o,labelBaseline:a}}function lv(e,t){const n={...e,extent:q0(e)},r=ei(n.orient),i=j0(r),a=n.orient=="bottom"||n.orient=="right"?1:-1,o=n.orient=="bottom"||n.orient=="left"?1:0,s=()=>({name:"domain",data:{values:[0]},mark:{type:"rule",clip:!1,strokeDash:n.domainDash,strokeCap:n.domainCap,color:n.domainColor,[i]:o,size:n.domainWidth}}),u=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[i+"Offset"]:(n.tickSize+n.labelPadding)*a,[i]:o,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:t},text:{field:"label"}}}),l=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[i]:{value:o},[i+"2"]:{value:o-n.tickSize/n.extent*(o?1:-1)}}}),c=()=>({name:"title",data:{values:[0]},mark:{type:"text",clip:!1,align:"center",baseline:n.orient=="bottom"?"bottom":"top",angle:[0,90,0,-90][["top","right","bottom","left"].indexOf(n.orient)],text:n.title,color:n.titleColor,[r]:.5,[i]:1-o}}),f=()=>{const d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:t}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(u()),d},h={resolve:{scale:{[r]:"forced"}},[GF[j0(r)]]:n.extent,data:{lazy:{type:"axisTicks",channel:r,axis:e}},layer:[]};return n.domain&&h.layer.push(s()),(n.ticks||n.labels)&&h.layer.push(f()),n.title&&h.layer.push(c()),h}const VF={...sv,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 jF(e,t){const n={...e,extent:q0(e)},r=ei(n.orient),i=j0(r),a=n.orient=="bottom"||n.orient=="left"?1:0,o=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:e.chromTickDash,strokeDashOffset:e.chromTickDashOffset,[i]:a,[i+"2"]:a-n.chromTickSize/n.extent*(a?1:-1),color:e.chromTickColor,size:n.chromTickWidth}}),s=()=>{let c;switch(n.orient){case"top":c={y:0,angle:0,paddingX:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":c={y:1,angle:0,paddingX:4,dy:n.chromLabelPadding+n.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":c={x:1,angle:-90,paddingY:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":c={x:0,angle:90,align:"right",paddingY:4,dy:-n.chromLabelPadding};break;default:c={}}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,...c},encoding:{[r+"2"]:{field:"continuousEnd",type:t},text:{field:"name"}}}};let u;switch(n.orient){case"bottom":case"top":u={};break;case"left":u={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":u={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:u={}}const l=lv({...e,...u},t);if(e.chromTicks||e.chromLabels){const c={name:UF,data:{lazy:{type:"axisGenome",channel:ei(n.orient)}},encoding:{[r]:{field:"continuousStart",type:t,band:0}},layer:[]};if(e.chromTicks&&c.layer.push(o()),e.chromLabels){c.layer.push(s());let f;l.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(d=>d.name=="labels").forEach(d=>{f=d.mark})),f&&(n.orient=="top"||n.orient=="bottom"?(f.viewportEdgeFadeWidthLeft=30,f.viewportEdgeFadeDistanceLeft=40):(f.viewportEdgeFadeWidthBottom=30,f.viewportEdgeFadeDistanceBottom=40))}l.layer.push(c)}return l}class $F extends sl{constructor(t,n,r,i,a,o){const u={...n=="locus"?qF:uv,...t};super(QF(u,n),r,i,a,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=u}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const uv={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},qF={...uv,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function WF(e,t){const n=e,r=ei(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 ZF(e,t){const n=e,r=ei(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 YF(e,t){const n=e,r=ei(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 QF(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(YF(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(ZF(n,t)),n.grid&&n.gridOpacity>0&&r.push(WF(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[ei(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const cv={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"},XF={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},KF={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},JF={start:0,middle:.5,end:1},e7={start:"left",middle:"center",end:"right"};function t7(e){if(!e)return;const t=Ue(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":XF,overlay:KF}[t.style]??{},r={...cv,...n,...t};let i={},a={x:0,y:0};const o=JF[r.anchor??"middle"];switch(r.orient){case"top":a={x:o,y:1},i={baseline:"alphabetic",angle:0};break;case"right":a={x:1,y:1-o},i={baseline:"alphabetic",angle:90};break;case"bottom":a={x:o,y:0},i={baseline:"top",angle:0};break;case"left":a={x:0,y:o},i={baseline:"alphabetic",angle:-90};break}const s={...cv,...i,...n,...t},u={xOffset:0,yOffset:0};switch(r.orient){case"top":u.yOffset=-s.offset;break;case"right":u.xOffset=s.offset;break;case"bottom":u.yOffset=s.offset;break;case"left":u.xOffset=-s.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...a,...u,text:s.text,align:s.align??e7[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 n7(e,t,n,r){if(e.type=="wheel"){e.uiEvent.preventDefault();const i=e.uiEvent,a=i.deltaMode?120:1;let{x:o,y:s}=e.point;if(r){const u=r.mark.encoders;u.x&&!u.x2&&!u.x.constantValue&&(o=+u.x(r.datum)*t.width+t.x),u.y&&!u.y2&&!u.y.constantValue&&(s=(1-+u.y(r.datum))*t.height+t.y)}Math.abs(i.deltaX)<Math.abs(i.deltaY)?n({x:o,y:s,xDelta:0,yDelta:0,zDelta:i.deltaY*a/300}):n({x:o,y:s,xDelta:-i.deltaX*a,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){const i=e.uiEvent;i.preventDefault();let a=i;const o=u=>{n({x:a.clientX,y:a.clientY,xDelta:u.clientX-a.clientX,yDelta:u.clientY-a.clientY,zDelta:0}),a=u},s=u=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",s)};document.addEventListener("mouseup",s,!1),document.addEventListener("mousemove",o,!1)}}class r7 extends Yi{constructor(n,r,i,a,o,s,u){super(n,r,i,a,o,u);K(this,Sr);K(this,dh);K(this,wa);K(this,xu);K(this,Au);K(this,Eu);K(this,ph);K(this,$o);K(this,gh);K(this,Ho,1/0);K(this,Vo,10);K(this,tn,[]);K(this,ya,{});K(this,jo,0);this.spec=n,Fe(this,Vo,n.spacing??10),Fe(this,Ho,s),Fe(this,tn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),W(this,tn).push(new hv(n,this,W(this,jo))),W_(this,jo)._++}setChildren(n){Fe(this,tn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=W(this,tn).findIndex(a=>a.view==n);if(i>=0)W(this,tn)[i]=new hv(r,this,W(this,jo));else throw new Error("Not my child view!")}get children(){return W(this,tn).map(n=>n.view)}get childCount(){return W(this,tn).length}async createAxes(){const n=[];for(const r of Oa){const i=this.resolutions.axis[r];if(i){const a=i.getAxisProps();if(a){const o={title:i.getTitle(),orient:sf[r][0],...a},s=new ov(o,i.scaleResolution.type,this.context,this,this);n.push(s.initializeChildren()),W(this,ya)[r]=s}}}return Promise.all([...n,...W(this,tn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of W(this,tn))yield*n.getChildren();for(const n of Object.values(W(this,ya)))yield n}getOverhang(){return J(this,ph,e4).call(this).union(J(this,$o,Eh).call(this))}getSize(){return this._cache("size",()=>new Jr(J(this,Au,Sm).call(this,"column"),J(this,Au,Sm).call(this,"row")).addPadding(J(this,$o,Eh).call(this)))}render(n,r,i={}){if(super.render(n,r,i),!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(J(this,$o,Eh).call(this)),n.pushView(this,r);const a={devicePixelRatio:this.context.devicePixelRatio},o=mw(J(this,xu,_m).call(this,"column"),r.width,a),s=mw(J(this,xu,_m).call(this,"row"),r.height,a),u=new av(W(this,Sr,xa).length,W(this,Ho)??1/0),l=c=>Math.round(c*devicePixelRatio)/devicePixelRatio;for(const[c,f]of W(this,Sr,xa).entries()){const{view:h,axes:d,gridLines:p,background:m,backgroundStroke:y,title:w}=f,[A,S]=u.getCellCoords(c),_=o[J(this,Eu,Cm).call(this,"column",A)],T=s[J(this,Eu,Cm).call(this,"row",S)],I=h.getViewportSize(),B=h.getSize(),R=h.getOverhang(),M=_.location-R.left,G=T.location-R.top,N=(Ne,L)=>(Ne[L].grow?(L=="width"?_:T).size:Ne[L].px)+R[L],re=N(I,"width"),se=N(I,"height"),te=N(B,"width"),ge=N(B,"height"),Xe=f.scrollbars.horizontal,De=f.scrollbars.vertical,Je=Xe?()=>l(Xe.viewportOffset):()=>0,We=De?()=>l(De.viewportOffset):()=>0,et=new dr(()=>r.x+M,()=>r.y+G,()=>re,()=>se),_e=h.isScrollable(),Se=_e?new dr(()=>r.x+M-Je(),()=>r.y+G-We(),()=>te,()=>ge):et;f.coords=et;const gt=i.clipRect?et.intersect(i.clipRect):et;m==null||m.render(n,gt,{...i,clipRect:void 0});for(const Ne of Object.values(p))Ne.render(n,et,i);const $t=s7(h)||_e;$t&&h.render(n,Se,{...i,clipRect:gt}),y==null||y.render(n,gt,{...i,clipRect:void 0});for(const[Ne,L]of Object.entries(d)){const P=Ne=="left"||Ne=="right"?"vertical":"horizontal",$=f.scrollbars[P],V=$?et.modify(P=="vertical"?{y:()=>Se.y,height:ge}:{x:()=>Se.x,width:te}):et,Z=fv(V,Ne,L);let C=i.clipRect;$&&(C=Z.intersect(C).intersect($?et.modify(P=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),L.render(n,Z,{...i,clipRect:C})}for(const Ne of Object.values(W(this,ya))){const P=Ne.axisProps.orient;(P=="left"&&A==0||P=="right"&&A==u.nCols-1||P=="top"&&S==0||P=="bottom"&&S==u.nRows-1)&&Ne.render(n,fv(et.shrink(f.view.getOverhang()),P,Ne),i)}$t||h.render(n,Se,i);for(const Ne of Object.values(f.scrollbars))Ne.updateScrollbar(et,Se),Ne.render(n,r,i);w==null||w.render(n,et,i)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=W(this,Sr,xa).find(a=>a.coords.containsPoint(n.point.x,n.point.y));for(const a of Object.values((r==null?void 0:r.scrollbars)??{}))if(a.coords.containsPoint(n.point.x,n.point.y)&&(a.propagateInteractionEvent(n),n.stopped))return;const i=r==null?void 0:r.view;i&&(i.propagateInteractionEvent(n),(i instanceof Qt||i instanceof sl)&&n7(n,r.coords,a=>J(this,gh,t4).call(this,r.coords,r.view,a),this.context.getCurrentHover())),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}Ho=new WeakMap,Vo=new WeakMap,tn=new WeakMap,ya=new WeakMap,jo=new WeakMap,Sr=new WeakSet,xa=function(){return W(this,tn).filter(n=>n.view.isConfiguredVisible())},dh=new WeakSet,J_=function(){return new av(W(this,Sr,xa).length,W(this,Ho)??1/0)},wa=new WeakSet,Cu=function(n){const r=n=="column"?"width":"height",i=(a,o)=>a.map(s=>{const l=W(this,Sr,xa)[s].getOverhangAndPadding();return n=="column"?o?l.right:l.left:o?l.bottom:l.top}).reduce((s,u)=>Math.max(s,u),0);return this._cache(`size/directionSizes/${n}`,()=>W(this,dh,J_)[n=="column"?"colIndices":"rowIndices"].map(a=>({axisBefore:i(a,0),axisAfter:i(a,1),view:cR(a.map(o=>W(this,Sr,xa)[o].view.getViewportSize()[r]))})))},xu=new WeakSet,_m=function(n){const r=J(this,wa,Cu).call(this,n),i=[];i.push(tl);for(const[a,o]of r.entries())a>0&&i.push({px:W(this,Vo),grow:0}),(a==0||this.wrappingFacet)&&i.push(tl),i.push({px:o.axisBefore,grow:0}),i.push(o.view),i.push({px:o.axisAfter,grow:0}),(a==r.length-1||this.wrappingFacet)&&i.push(tl);return i},Au=new WeakSet,Sm=function(n){let r=0,i=0;const a=n=="row"?this.spec.height:this.spec.width;if(a||a===0)return yw(a);const o=J(this,wa,Cu).call(this,n);for(const[s,u]of o.entries())s>0&&(i+=W(this,Vo)),(s==0||this.wrappingFacet)&&(i+=0),i+=u.axisBefore,i+=u.view.px??0,r+=u.view.grow??0,i+=u.axisAfter,(s==o.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},Eu=new WeakSet,Cm=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},ph=new WeakSet,e4=function(){const n=J(this,wa,Cu).call(this,"column"),r=J(this,wa,Cu).call(this,"row");return!n.length||!r.length?St.zero():new St(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},$o=new WeakSet,Eh=function(){const n=r=>{const i=$0[r],a=W(this,ya)[i];return(a==null?void 0:a.axisProps.orient)!==r?0:Math.max(a.getPerpendicularSize()+a.axisProps.offset,0)};return new St(n("top"),n("right"),n("bottom"),n("left"))},gh=new WeakSet,t4=function(n,r,i){for(const[a,o]of Object.entries(o7(r))){if(o.size<=0)continue;const s=n.normalizePoint(i.x,i.y),u=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:u.x-s.x,y:u.y-s.y};for(const c of o)c.zoom(2**i.zDelta,a=="y"?1-s[a]:s[a],a=="x"?l.x:-l.y)}this.context.animator.requestRender()};function i7(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 a7(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 o7(e){const t={x:new Set,y:new Set};return e.visit(n=>{for(const[r,i]of Object.entries(t)){const a=n.getScaleResolution(r);a&&a.isZoomable()&&i.add(a)}}),t}function s7(e){let t=!0;return e.visit(n=>{n instanceof Qt&&t&&(t=n.mark.properties.clip===!0)}),t}function fv(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 hv{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=dr.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,a="view"in i?i==null?void 0:i.view:void 0,o=i7(a);o&&(this.background=new Qt(o,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const s=a7(a);s&&(this.backgroundStroke=new Qt(s,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const u=t7(t.spec.title);if(u){const l=new Qt(u,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=l}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new dv(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new dv(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,u)=>{const l=s.getAxisProps();if(l===null)return;const c=l?{...l}:{};if(!c.orient){for(const f of sf[u])if(!n[f]){c.orient=f;break}if(!c.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(c.title??(c.title=s.getTitle()),!sf[u].includes(c.orient))throw new Error(`Invalid axis orientation "${c.orient}" on channel "${u}"!`);return c},a=async(s,u,l)=>{const c=i(s,u);if(c){if(n[c.orient])throw new Error(`An axis with the orient "${c.orient}" already exists!`);const f=new ov(c,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[c.orient]=f,await f.initializeChildren()}},o=async(s,u,l)=>{const c=i(s,u);if(c&&(c.grid||c.chromGrid)){const f=new $F(c,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[c.orient]=f,await f.initializeChildren()}};for(const s of["x","y"])if(t.needsAxes[s]){const u=t.resolutions.axis[s];if(!u)continue;await a(u,s,t)}for(const s of["x","y"])if(t.needsAxes[s]){const u=t.getAxisResolution(s);if(!u)continue;await o(u,s,t)}if(t instanceof sl){for(const s of t)for(const[u,l]of Object.entries(s.resolutions.axis)){const c=l.getAxisProps();c&&c.orient&&await a(l,u,s)}for(const s of t)for(const[u,l]of Object.entries(s.resolutions.axis)){const c=l.getAxisProps();c&&!c.orient&&await a(l,u,s)}}[...Object.values(n),...Object.values(r)].forEach(s=>s.visit(u=>{u instanceof Qt&&u.resolve("scale")}))}getOverhang(){const t=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+r.axisProps.offset,0):0};return new St(t("top"),t("right"),t("bottom"),t("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}class dv 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=dr.ZERO,this.addInteractionEventListener("mousedown",(i,a)=>{if(a.stopPropagation(),this.maxScrollOffset<=0)return;const o=h=>n=="vertical"?h.clientY:h.clientX,s=a.uiEvent;s.preventDefault();const u=this.getScrollOffset(),l=o(s),c=h=>{const d=Ds(o(h)-l+u,0,this.maxScrollOffset);this.viewportOffset=d/this.maxScrollOffset*this.maxViewportOffset,this.context.animator.requestRender()},f=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",f)};document.addEventListener("mouseup",f,!1),document.addEventListener("mousemove",c,!1)})}getScrollOffset(){return this.viewportOffset/this.maxViewportOffset*this.maxScrollOffset}render(t,n,r){super.render(t,this.scrollbarCoords,r)}updateScrollbar(t,n){const r=this.config.scrollbarPadding,i=this.config.scrollbarSize,a=this.scrollDirection=="horizontal"?"width":"height",o=Math.min(1,t[a]/n[a]),s=t[a]-2*r,u=o*s;this.maxScrollOffset=s-u,this.maxViewportOffset=n[a]-t[a],this.viewportOffset=Ds(this.viewportOffset,0,this.maxViewportOffset),this.scrollbarCoords=this.scrollDirection=="vertical"?new dr(()=>t.x+t.width-i-r,()=>t.y+r+this.getScrollOffset(),()=>i,()=>u):new dr(()=>t.x+r+this.getScrollOffset(),()=>t.y+t.height-i-r,()=>u,()=>i)}}class W0 extends r7{constructor(t,n,r,i,a){super(t,n,r,i,a,Q0(t)?t.columns:lf(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=Q0(t)?t.concat:lf(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":lf(this.spec)&&t==="x"||mv(this.spec)&&t==="y"?"shared":"independent"}}const pv="viewRoot";class l7{constructor(t={}){K(this,qo,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,a,o,s,u)=>new r(i,a,o,s,i.name??u);this.addViewType(Y0,n(sl)),this.addViewType(Z0,n(Qt)),this.addViewType(lf,n(W0)),this.addViewType(mv,n(W0)),this.addViewType(Q0,n(W0)),this.addViewType(f7,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){W(this,qo).set(t,n)}createView(t,n,r,i,a){for(const[o,s]of W(this,qo))if(o(t))return s(t,n,r,i,a);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(t)]))}isViewSpec(t){const n=[...W(this,qo).keys()].filter(r=>r(t));if(n.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return n.length==1}async createOrImportView(t,n,r,i,a,o){let s;if(c7(t)){let l;if("url"in t.import)if(this.options.allowImport)l=await mF(t,i.getBaseUrl(),n);else throw new Zi("Importing views is not allowed!",r);else if("template"in t.import)l=gv(t.import.template,i);else throw new Error("Invalid import: "+JSON.stringify(t));o==null||o(l),u7(l,t),s=l}else s=t;!i&&this.options.wrapRoot&&(Z0(s)||Y0(s))&&a===pv&&(s={name:"implicitRoot",vconcat:[s]});const u=this.createView(s,n,r,i,a);return u instanceof Yi&&await u.initializeChildren(),u}}qo=new WeakMap;function gv(e,t){var r,i;const n=(i=(r=t.spec)==null?void 0:r.templates)==null?void 0:i[e];if(n)return structuredClone(n);if(t.dataParent)return gv(e,t.dataParent);throw new Error(`Cannot find template "${e}" in current view or its ancestors!`)}function u7(e,t){t.name!=null&&(e.name=t.name);const n=xt(t.params)?t.params:kt(t.params)?Object.entries(t.params).map(([r,i])=>({name:r,value:i})):[];if(n.length){e.params??(e.params=[]);for(const r of n){const i=e.params.findIndex(a=>a.name==r.name);i>=0&&(e.params[i]=r)}for(const r of n)e.params.some(i=>i.name==r.name)||e.params.push(r)}}function Z0(e){return"mark"in e&&(Ue(e.mark)||kt(e.mark))}function Y0(e){return"layer"in e&&kt(e.layer)}function c7(e){return"import"in e}function lf(e){return"vconcat"in e&&xt(e.vconcat)}function mv(e){return"hconcat"in e&&xt(e.hconcat)}function Q0(e){return"concat"in e&&xt(e.concat)}function f7(e){return"samples"in e&&kt(e.samples)&&"spec"in e&&kt(e.spec)}function h7(e){const t=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of e.paramConfigs.values()){const i=r.bind;if(!i||!("input"in i))continue;const a=r.name,o=e.getSetter(a),s=e.getValue(a),u=i.name??a,l=i.debounce?af(o,i.debounce,!1):o,c=`${t}-param-${a}`;if(i.input=="range")n.push(Ke`<label for=${c}>${u}</label>
401
405
  <div>
402
406
  <input
403
407
  id=${c}
@@ -408,15 +412,15 @@ Reason: ${s.message}`)}));if(n.isViewSpec(a))return a.baseUrl=(o=i.match(/^[^?#]
408
412
  .value=${s}
409
413
  @input=${f=>{l(f.target.valueAsNumber),f.target.nextElementSibling.textContent=f.target.valueAsNumber}}
410
414
  /><span>${s}</span>
411
- </div>`);else if(i.input=="checkbox")n.push(it`<label for=${c}>${u}</label>
415
+ </div>`);else if(i.input=="checkbox")n.push(Ke`<label for=${c}>${u}</label>
412
416
  <input
413
417
  id=${c}
414
418
  type="checkbox"
415
419
  ?checked=${s}
416
420
  @input=${f=>l(f.target.checked)}
417
- />`);else if(i.input=="radio")n.push(it`<span class="label">${u}</span>
421
+ />`);else if(i.input=="radio")n.push(Ke`<span class="label">${u}</span>
418
422
  <div class="radio-group">
419
- ${i.options.map((f,h)=>{var d;return it`<label>
423
+ ${i.options.map((f,h)=>{var d;return Ke`<label>
420
424
  <input
421
425
  type="radio"
422
426
  name=${a}
@@ -425,34 +429,39 @@ Reason: ${s.message}`)}));if(n.isViewSpec(a))return a.baseUrl=(o=i.match(/^[^?#]
425
429
  @input=${p=>l(p.target.value)}
426
430
  />${((d=i.labels)==null?void 0:d[h])??f}</label
427
431
  >`})}
428
- </div>`);else if(i.input=="select")n.push(it`<label for=${c}>${u}</label>
432
+ </div>`);else if(i.input=="select")n.push(Ke`<label for=${c}>${u}</label>
429
433
  <select
430
434
  id=${c}
431
435
  @input=${f=>l(f.target.value)}
432
436
  >
433
- ${i.options.map((f,h)=>{var d;return it`<option
437
+ ${i.options.map((f,h)=>{var d;return Ke`<option
434
438
  value=${f}
435
439
  ?selected=${s==f}
436
440
  >
437
441
  ${((d=i.labels)==null?void 0:d[h])??f}
438
442
  </option>`})}
439
- </select> `);else throw new Error("Unsupported input type: "+i.input);i.description&&n.push(it`<div class="description">${i.description}</div>`)}return n}C1("fasta",TF);class pv{constructor(t,n,r={}){K(this,Wo);K(this,mh);K(this,bh);K(this,yh);this.container=t,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=n,this.accessorFactory=new ck,this.viewFactory=new o7,this.namedDataProviders=[],this.animator=new xF(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=i=>i.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new IF(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:OF,refseqgene:DF,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._loadingViews=new Map,this._inputBindingContainer=void 0}registerNamedDataProvider(t){this.namedDataProviders.unshift(t)}getNamedDataFromProvider(t){for(const n of this.namedDataProviders){const r=n(t);if(r)return r}}updateNamedData(t,n){const r=this.viewRoot.context.dataFlow.findNamedDataSource(t);if(!r)throw new Error("No such named data source: "+t);r.dataSource.updateDynamicData(n),z0(r.hosts),this.animator.requestRender()}broadcast(t,n){var i;const r={type:t,payload:n};this.viewRoot.visit(a=>a.handleBroadcast(r)),(i=this._extraBroadcastListeners.get(t))==null||i.forEach(a=>a(r))}_updateLoadingIndicators(){const t=[],n=()=>[...this._loadingViews.values()].some(r=>r);for(const[r,i]of this._loadingViews){const a=r.coords;if(a){const o={left:`${a.x}px`,top:`${a.y}px`,width:`${a.width}px`,height:`${a.height}px`};t.push(it`<div style=${m6(o)}>
440
- <div class=${i?"loading":""}>
441
- <img src="${b6}" alt="" />
442
- <span>Loading...</span>
443
+ </select> `);else throw new Error("Unsupported input type: "+i.input);i.description&&n.push(Ke`<div class="description">${i.description}</div>`)}return n}k1("fasta",BF);class bv{constructor(t,n,r={}){K(this,Wo);K(this,mh);K(this,bh);K(this,yh);this.container=t,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=n,this.accessorFactory=new dk,this.viewFactory=new l7,this.namedDataProviders=[],this.animator=new EF(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=i=>i.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new DF(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:zF,refseqgene:FF,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._loadingViews=new Map,this._inputBindingContainer=void 0}registerNamedDataProvider(t){this.namedDataProviders.unshift(t)}getNamedDataFromProvider(t){for(const n of this.namedDataProviders){const r=n(t);if(r)return r}}updateNamedData(t,n){const r=this.viewRoot.context.dataFlow.findNamedDataSource(t);if(!r)throw new Error("No such named data source: "+t);r.dataSource.updateDynamicData(n),z0(r.hosts),this.animator.requestRender()}broadcast(t,n){var i;const r={type:t,payload:n};this.viewRoot.visit(a=>a.handleBroadcast(r)),(i=this._extraBroadcastListeners.get(t))==null||i.forEach(a=>a(r))}_updateLoadingIndicators(){const t=[],n=()=>[...this._loadingViews.values()].some(r=>r.status=="loading"||r.status=="error");for(const[r,i]of this._loadingViews){const a=r.coords;if(a){const o={left:`${a.x}px`,top:`${a.y}px`,width:`${a.width}px`,height:`${a.height}px`};t.push(Ke`<div style=${w6(o)}>
444
+ <div class=${i.status}>
445
+ ${i.status=="error"?Ke`<span
446
+ >Loading
447
+ failed${i.detail?Ke`: ${i.detail}`:rt}</span
448
+ >`:Ke`
449
+ <img src="${v6}" alt="" />
450
+ <span>Loading...</span>
451
+ `}
443
452
  </div>
444
- </div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),As(t,this.loadingIndicatorsElement)}destroy(){var n;const t=W(this,Wo,_h);this.container.classList.remove("genome-spy"),t.classList.remove("loading");for(const[r,i]of this._keyboardListeners)for(const a of i)document.removeEventListener(r,a);for(this._destructionCallbacks.forEach(r=>r()),this._glHelper.finalize(),(n=this._inputBindingContainer)==null||n.remove();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new AF(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new Zw,accessorFactory:this.accessorFactory,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new SF(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(u,l)=>{this._loadingViews.set(u,l),this._updateLoadingIndicators()},addKeyboardListener:(u,l)=>{document.addEventListener(u,l);let c=this._keyboardListeners.get(u);c||(c=[],this._keyboardListeners.set(u,c)),c.push(l)},addBroadcastListener(u,l){const c=t._extraBroadcastListeners;let f=c.get(u);f||(f=new Set,c.set(u,f)),f.add(l)},removeBroadcastListener(u,l){var f;(f=t._extraBroadcastListeners.get(u))==null||f.delete(l)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:u=>t.viewFactory.isViewSpec(u),createView:function(u,l,c,f){return t.viewFactory.createView(u,n,l,c,f)},createOrImportView:async function(u,l,c,f,h){return t.viewFactory.createOrImportView(u,n,l,c,f,h)}},r=this.spec;r.datasets&&this.registerNamedDataProvider(u=>r.datasets[u]),this.viewRoot=await n.createOrImportView(r,null,null,hv),W(this,Wo,_h).style.flexGrow=Xw(this.viewRoot).height.grow>0?"1":"0",J(this,mh,J_).call(this),hF(this.viewRoot),dF(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(u=>u.configureViewOpacity()),this._glHelper.invalidateSize(),J(this,bh,e4).call(this);const a=i.filter(u=>u instanceof Yt),o=oF(this.viewRoot,n.dataFlow);fF(o),this.broadcast("dataFlowBuilt",o),a.forEach(u=>u.mark.initializeEncoders());const s=Promise.all(a.map(u=>u.mark.initializeGraphics()));for(const u of a)o.addObserver(l=>{u.mark.initializeData(),u.mark.updateGraphicsData(),n.animator.requestRender()},u);await n.fontManager.waitUntilReady(),o.initialize(),await Promise.all(o.dataSources.map(u=>u.load())),z0(this.viewRoot),this.broadcast("dataLoaded"),await s;for(const u of a)u.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(u=>Jc(u,"size")),this._glHelper.invalidateSize()}async launch(){try{return J(this,yh,t4).call(this),await this._prepareViewsAndData(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),!0}catch(t){const n=`${t.view?`At "${t.view.getPathString()}": `:""}${t.toString()}`;return console.error(t.stack),f7(this.container,n),!1}finally{W(this,Wo,_h).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const t=this._glHelper.canvas,n=r=>{var i;if(r instanceof MouseEvent){r.type=="mousemove"&&(this.tooltip.handleMouseMove(r),this._tooltipUpdateRequested=!1,r.buttons==0&&this.renderPickingFramebuffer());const a=t.getBoundingClientRect(),o=new yF(r.clientX-a.left-t.clientLeft,r.clientY-a.top-t.clientTop),s=u=>{this.viewRoot.propagateInteractionEvent(new bF(o,u)),this._tooltipUpdateRequested||this.tooltip.clear()};if(r.type!="wheel"&&this._wheelInertia.cancel(),r.type=="mousemove")this._handlePicking(o.x,o.y);else if(r.type=="mousedown"||r.type=="mouseup")this.renderPickingFramebuffer();else if(r.type=="wheel"){this._tooltipUpdateRequested=!1;const u=r;if(Math.abs(u.deltaX)>Math.abs(u.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const l=BF(u);this._wheelInertia.setMomentum(u.deltaY*(u.deltaMode?80:1),c=>{const f=new WheelEvent("wheel",{...l,deltaMode:0,deltaX:0,deltaY:c});s(f)}),u.preventDefault();return}}if(r.type=="click"){const u=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(u))}s(r)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(r=>t.addEventListener(r,n)),t.addEventListener("mousedown",()=>{document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),t.addEventListener("dragstart",r=>r.stopPropagation())}_handlePicking(t,n){var a;const r=this._glHelper.readPickingPixel(t,n),i=r[0]|r[1]<<8|r[2]<<16;if(i==0){this._currentHover=null;return}if(i!==((a=this._currentHover)==null?void 0:a.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(o=>{if(o instanceof Yt){if(o.mark.isPickingParticipant()){const s=o.mark.encoders.uniqueId.accessor;o.getCollector().visitData(u=>{s(u)==i&&(this._currentHover={mark:o.mark,datum:u,uniqueId:i})})}if(this._currentHover)return nl}}),this._currentHover){const o=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async s=>{if(!o.isPickingParticipant())return;const u=o.properties.tooltip;if(u!==null){const l=(u==null?void 0:u.handler)??"default",c=this.tooltipHandlers[l];if(!c)throw new Error("No such tooltip handler: "+l);return c(s,o,u==null?void 0:u.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 Jw({picking:!1},this._glHelper),this._pickingContext=new Jw({picking:!0},this._glHelper),t.render(new mF(this._renderingContext,this._pickingContext),dr.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 Yt&&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}}Wo=new WeakSet,_h=function(){return this.container.querySelector(".canvas-wrapper")},mh=new WeakSet,J_=function(){const t=[];this.viewRoot.visit(r=>{const i=r.paramMediator;t.push(...c7(i))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!t.length)){if(this._inputBindingContainer=uf("div",{className:"gs-input-bindings"}),n=="default")this.container.appendChild(this._inputBindingContainer);else if(n instanceof HTMLElement)n.appendChild(this._inputBindingContainer);else throw new Error("Invalid inputBindingContainer");t.length&&As(it`<div class="gs-input-binding">${t}</div>`,this._inputBindingContainer)}},bh=new WeakSet,e4=function(){const t=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",window.devicePixelRatio),n=()=>{this._glHelper.invalidateSize(),t(window.devicePixelRatio),this.computeLayout(),this.renderAll()},r=new ResizeObserver(n);r.observe(this.container),this._destructionCallbacks.push(()=>r.disconnect());let i=null;const a=()=>{i!=null&&(i(),n());const o=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);o.addEventListener("change",a),i=()=>{o.removeEventListener("change",a)}};a(),i&&this._destructionCallbacks.push(i)},yh=new WeakSet,t4=function(){this.container.classList.add("genome-spy");const t=document.createElement("style");t.innerHTML=y6,this.container.appendChild(t);const n=uf("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new ID(n,()=>this.viewRoot?gF(Xw(this.viewRoot)):{width:void 0,height:void 0},this.spec.background),this.loadingMessageElement=uf("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=uf("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new v6(n),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function f7(e,t){const n=document.createElement("div");n.className="message-box";const r=document.createElement("div");r.textContent=t,n.appendChild(r),e.appendChild(n)}function uf(e,t){const n=document.createElement(e);for(const[r,i]of Object.entries(t))["innerHTML","innerText","className"].includes(r)&&(n[r]=i),n.setAttribute(r,i);return n}const h7="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",d7="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 p7(e,t,n={}){let r;if(Ue(e)){if(r=document.querySelector(e),!r)throw new Error(`No such element: ${e}`)}else if(e instanceof HTMLElement)r=e;else throw new Error(`Invalid element: ${e}`);let i;try{const a=kt(t)?t:await gv(t);if(a.baseUrl??(a.baseUrl=""),a.width??(a.width="container"),a.padding??(a.padding=10),r==document.body){const o=document.createElement("div");o.style.position="fixed",o.style.inset="0",o.style.overflow="hidden",r.appendChild(o),r=o}i=new pv(r,a,n),g7(i,n),await i.launch()}catch(a){r.innerText=a.toString(),console.error(a)}return{finalize(){for(i.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(a,o){const s=i._eventListeners;let u=s.get(a);u||(u=new Set,s.set(a,u)),u.add(o)},removeEventListener(a,o){var u;(u=i._eventListeners.get(a))==null||u.delete(o)},getScaleResolutionByName(a){return i.getNamedScaleResolutions().get(a)},updateNamedData:i.updateNamedData.bind(i)}}function g7(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function gv(e){let t;try{t=JSON.parse(await Qu().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 cf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function ll(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function m7(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 me={},ff={};ff.byteLength=w7,ff.toByteArray=x7,ff.fromByteArray=_7;for(var qn=[],an=[],b7=typeof Uint8Array<"u"?Uint8Array:Array,X0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qa=0,y7=X0.length;Qa<y7;++Qa)qn[Qa]=X0[Qa],an[X0.charCodeAt(Qa)]=Qa;an["-".charCodeAt(0)]=62,an["_".charCodeAt(0)]=63;function mv(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 w7(e){var t=mv(e),n=t[0],r=t[1];return(n+r)*3/4-r}function v7(e,t,n){return(t+n)*3/4-n}function x7(e){var t,n=mv(e),r=n[0],i=n[1],a=new b7(v7(e,r,i)),o=0,s=i>0?r-4:r,u;for(u=0;u<s;u+=4)t=an[e.charCodeAt(u)]<<18|an[e.charCodeAt(u+1)]<<12|an[e.charCodeAt(u+2)]<<6|an[e.charCodeAt(u+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=an[e.charCodeAt(u)]<<2|an[e.charCodeAt(u+1)]>>4,a[o++]=t&255),i===1&&(t=an[e.charCodeAt(u)]<<10|an[e.charCodeAt(u+1)]<<4|an[e.charCodeAt(u+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function A7(e){return qn[e>>18&63]+qn[e>>12&63]+qn[e>>6&63]+qn[e&63]}function E7(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(A7(r));return i.join("")}function _7(e){for(var t,n=e.length,r=n%3,i=[],a=16383,o=0,s=n-r;o<s;o+=a)i.push(E7(e,o,o+a>s?s:o+a));return r===1?(t=e[n-1],i.push(qn[t>>2]+qn[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(qn[t>>10]+qn[t>>4&63]+qn[t<<2&63]+"=")),i.join("")}var K0={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */K0.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-l;else{if(a===u)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-l}return(d?-1:1)*o*Math.pow(2,a-r)},K0.write=function(e,t,n,r,i,a){var o,s,u,l=a*8-i-1,c=(1<<l)-1,f=c>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+f>=1?t+=h/u:t+=h*Math.pow(2,1-f),t*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=s&255,d+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+d]=o&255,d+=p,o/=256,l-=8);e[n+d-p]|=m*128};/*!
453
+ </div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),As(t,this.loadingIndicatorsElement)}destroy(){var n;const t=W(this,Wo,_h);this.container.classList.remove("genome-spy"),t.classList.remove("loading");for(const[r,i]of this._keyboardListeners)for(const a of i)document.removeEventListener(r,a);for(this._destructionCallbacks.forEach(r=>r()),this._glHelper.finalize(),(n=this._inputBindingContainer)==null||n.remove();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new _F(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new Qw,accessorFactory:this.accessorFactory,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new kF(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(u,l,c)=>{this._loadingViews.set(u,{status:l,detail:c}),this._updateLoadingIndicators()},addKeyboardListener:(u,l)=>{document.addEventListener(u,l);let c=this._keyboardListeners.get(u);c||(c=[],this._keyboardListeners.set(u,c)),c.push(l)},addBroadcastListener(u,l){const c=t._extraBroadcastListeners;let f=c.get(u);f||(f=new Set,c.set(u,f)),f.add(l)},removeBroadcastListener(u,l){var f;(f=t._extraBroadcastListeners.get(u))==null||f.delete(l)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:u=>t.viewFactory.isViewSpec(u),createView:function(u,l,c,f){return t.viewFactory.createView(u,n,l,c,f)},createOrImportView:async function(u,l,c,f,h){return t.viewFactory.createOrImportView(u,n,l,c,f,h)}},r=this.spec;r.datasets&&this.registerNamedDataProvider(u=>r.datasets[u]),this.viewRoot=await n.createOrImportView(r,null,null,pv),W(this,Wo,_h).style.flexGrow=Jw(this.viewRoot).height.grow>0?"1":"0",J(this,mh,n4).call(this),pF(this.viewRoot),gF(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(u=>u.configureViewOpacity()),this._glHelper.invalidateSize(),J(this,bh,r4).call(this);const a=i.filter(u=>u instanceof Qt),o=lF(this.viewRoot,n.dataFlow);dF(o),this.broadcast("dataFlowBuilt",o),a.forEach(u=>u.mark.initializeEncoders());const s=Promise.all(a.map(u=>u.mark.initializeGraphics()));for(const u of a)o.addObserver(l=>{u.mark.initializeData(),u.mark.updateGraphicsData(),n.animator.requestRender()},u);await n.fontManager.waitUntilReady(),o.initialize(),await Promise.all(o.dataSources.map(u=>u.load())),z0(this.viewRoot),this.broadcast("dataLoaded"),await s;for(const u of a)u.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(u=>Jc(u,"size")),this._glHelper.invalidateSize()}async launch(){try{return J(this,yh,i4).call(this),await this._prepareViewsAndData(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),!0}catch(t){const n=`${t.view?`At "${t.view.getPathString()}": `:""}${t.toString()}`;return console.error(t.stack),d7(this.container,n),!1}finally{W(this,Wo,_h).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const t=this._glHelper.canvas,n=r=>{var i;if(r instanceof MouseEvent){r.type=="mousemove"&&(this.tooltip.handleMouseMove(r),this._tooltipUpdateRequested=!1,r.buttons==0&&this.renderPickingFramebuffer());const a=t.getBoundingClientRect(),o=new vF(r.clientX-a.left-t.clientLeft,r.clientY-a.top-t.clientTop),s=u=>{this.viewRoot.propagateInteractionEvent(new wF(o,u)),this._tooltipUpdateRequested||this.tooltip.clear()};if(r.type!="wheel"&&this._wheelInertia.cancel(),r.type=="mousemove")this._handlePicking(o.x,o.y);else if(r.type=="mousedown"||r.type=="mouseup")this.renderPickingFramebuffer();else if(r.type=="wheel"){this._tooltipUpdateRequested=!1;const u=r;if(Math.abs(u.deltaX)>Math.abs(u.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const l=RF(u);this._wheelInertia.setMomentum(u.deltaY*(u.deltaMode?80:1),c=>{const f=new WheelEvent("wheel",{...l,deltaMode:0,deltaX:0,deltaY:c});s(f)}),u.preventDefault();return}}if(r.type=="click"){const u=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(u))}s(r)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(r=>t.addEventListener(r,n)),t.addEventListener("mousedown",()=>{document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),t.addEventListener("dragstart",r=>r.stopPropagation())}_handlePicking(t,n){var a;const r=this._glHelper.readPickingPixel(t,n),i=r[0]|r[1]<<8|r[2]<<16;if(i==0){this._currentHover=null;return}if(i!==((a=this._currentHover)==null?void 0:a.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(o=>{if(o instanceof Qt){if(o.mark.isPickingParticipant()){const s=o.mark.encoders.uniqueId.accessor;o.getCollector().visitData(u=>{s(u)==i&&(this._currentHover={mark:o.mark,datum:u,uniqueId:i})})}if(this._currentHover)return nl}}),this._currentHover){const o=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async s=>{if(!o.isPickingParticipant())return;const u=o.properties.tooltip;if(u!==null){const l=(u==null?void 0:u.handler)??"default",c=this.tooltipHandlers[l];if(!c)throw new Error("No such tooltip handler: "+l);return c(s,o,u==null?void 0:u.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 tv({picking:!1},this._glHelper),this._pickingContext=new tv({picking:!0},this._glHelper),t.render(new yF(this._renderingContext,this._pickingContext),dr.create(0,0,n.width,n.height)),this._updateLoadingIndicators(),this.broadcast("layoutComputed")}renderAll(){var t;(t=this._renderingContext)==null||t.render(),this._dirtyPickingBuffer=!0}renderPickingFramebuffer(){this._dirtyPickingBuffer&&(this._pickingContext.render(),this._dirtyPickingBuffer=!1)}getSearchableViews(){const t=[];return this.viewRoot.visit(n=>{n instanceof 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}}Wo=new WeakSet,_h=function(){return this.container.querySelector(".canvas-wrapper")},mh=new WeakSet,n4=function(){const t=[];this.viewRoot.visit(r=>{const i=r.paramMediator;t.push(...h7(i))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!t.length)){if(this._inputBindingContainer=uf("div",{className:"gs-input-bindings"}),n=="default")this.container.appendChild(this._inputBindingContainer);else if(n instanceof HTMLElement)n.appendChild(this._inputBindingContainer);else throw new Error("Invalid inputBindingContainer");t.length&&As(Ke`<div class="gs-input-binding">${t}</div>`,this._inputBindingContainer)}},bh=new WeakSet,r4=function(){const t=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",window.devicePixelRatio),n=()=>{this._glHelper.invalidateSize(),t(window.devicePixelRatio),this.computeLayout(),this.renderAll()},r=new ResizeObserver(n);r.observe(this.container),this._destructionCallbacks.push(()=>r.disconnect());let i=null;const a=()=>{i!=null&&(i(),n());const o=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);o.addEventListener("change",a),i=()=>{o.removeEventListener("change",a)}};a(),i&&this._destructionCallbacks.push(i)},yh=new WeakSet,i4=function(){this.container.classList.add("genome-spy");const t=document.createElement("style");t.innerHTML=x6,this.container.appendChild(t);const n=uf("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new RD(n,()=>this.viewRoot?bF(Jw(this.viewRoot)):{width:void 0,height:void 0},this.spec.background),this.loadingMessageElement=uf("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=uf("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new E6(n),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function d7(e,t){const n=document.createElement("div");n.className="message-box";const r=document.createElement("div");r.textContent=t,n.appendChild(r),e.appendChild(n)}function uf(e,t){const n=document.createElement(e);for(const[r,i]of Object.entries(t))["innerHTML","innerText","className"].includes(r)&&(n[r]=i),n.setAttribute(r,i);return n}const p7="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",g7="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 m7(e,t,n={}){let r;if(Ue(e)){if(r=document.querySelector(e),!r)throw new Error(`No such element: ${e}`)}else if(e instanceof HTMLElement)r=e;else throw new Error(`Invalid element: ${e}`);let i;try{const a=kt(t)?t:await yv(t);if(a.baseUrl??(a.baseUrl=""),a.width??(a.width="container"),a.padding??(a.padding=10),r==document.body){const o=document.createElement("div");o.style.position="fixed",o.style.inset="0",o.style.overflow="hidden",r.appendChild(o),r=o}i=new bv(r,a,n),b7(i,n),await i.launch()}catch(a){r.innerText=a.toString(),console.error(a)}return{finalize(){for(i.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(a,o){const s=i._eventListeners;let u=s.get(a);u||(u=new Set,s.set(a,u)),u.add(o)},removeEventListener(a,o){var u;(u=i._eventListeners.get(a))==null||u.delete(o)},getScaleResolutionByName(a){return i.getNamedScaleResolutions().get(a)},updateNamedData:i.updateNamedData.bind(i)}}function b7(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function yv(e){let t;try{t=JSON.parse(await Xu().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 cf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function ll(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function y7(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 me={},ff={};ff.byteLength=x7,ff.toByteArray=E7,ff.fromByteArray=C7;for(var qn=[],sn=[],w7=typeof Uint8Array<"u"?Uint8Array:Array,X0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qa=0,v7=X0.length;Qa<v7;++Qa)qn[Qa]=X0[Qa],sn[X0.charCodeAt(Qa)]=Qa;sn["-".charCodeAt(0)]=62,sn["_".charCodeAt(0)]=63;function wv(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 x7(e){var t=wv(e),n=t[0],r=t[1];return(n+r)*3/4-r}function A7(e,t,n){return(t+n)*3/4-n}function E7(e){var t,n=wv(e),r=n[0],i=n[1],a=new w7(A7(e,r,i)),o=0,s=i>0?r-4:r,u;for(u=0;u<s;u+=4)t=sn[e.charCodeAt(u)]<<18|sn[e.charCodeAt(u+1)]<<12|sn[e.charCodeAt(u+2)]<<6|sn[e.charCodeAt(u+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=sn[e.charCodeAt(u)]<<2|sn[e.charCodeAt(u+1)]>>4,a[o++]=t&255),i===1&&(t=sn[e.charCodeAt(u)]<<10|sn[e.charCodeAt(u+1)]<<4|sn[e.charCodeAt(u+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function _7(e){return qn[e>>18&63]+qn[e>>12&63]+qn[e>>6&63]+qn[e&63]}function S7(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(_7(r));return i.join("")}function C7(e){for(var t,n=e.length,r=n%3,i=[],a=16383,o=0,s=n-r;o<s;o+=a)i.push(S7(e,o,o+a>s?s:o+a));return r===1?(t=e[n-1],i.push(qn[t>>2]+qn[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(qn[t>>10]+qn[t>>4&63]+qn[t<<2&63]+"=")),i.join("")}var K0={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */K0.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-l;else{if(a===u)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,r),a=a-l}return(d?-1:1)*o*Math.pow(2,a-r)},K0.write=function(e,t,n,r,i,a){var o,s,u,l=a*8-i-1,c=(1<<l)-1,f=c>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+f>=1?t+=h/u:t+=h*Math.pow(2,1-f),t*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=s&255,d+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+d]=o&255,d+=p,o/=256,l-=8);e[n+d-p]|=m*128};/*!
445
454
  * The buffer module from node.js, for the browser.
446
455
  *
447
456
  * @author Feross Aboukhadijeh <https://feross.org>
448
457
  * @license MIT
449
- */(function(e){const t=ff,n=K0,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{const 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 o(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,b){if(typeof v=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(v)}return u(v,g,b)}s.poolSize=8192;function u(v,g,b){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(Ct(v,ArrayBuffer)||v&&Ct(v.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ct(v,SharedArrayBuffer)||v&&Ct(v.buffer,SharedArrayBuffer)))return m(v,g,b);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,b);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,b);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,b){return u(v,g,b)},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 c(v,g,b){return l(v),v<=0?o(v):g!==void 0?typeof b=="string"?o(v).fill(g,b):o(v).fill(g):o(v)}s.alloc=function(v,g,b){return c(v,g,b)};function f(v){return l(v),o(v<0?0:w(v)|0)}s.allocUnsafe=function(v){return f(v)},s.allocUnsafeSlow=function(v){return f(v)};function h(v,g){if((typeof g!="string"||g==="")&&(g="utf8"),!s.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const b=S(v,g)|0;let k=o(b);const F=k.write(v,g);return F!==b&&(k=k.slice(0,F)),k}function d(v){const g=v.length<0?0:w(v.length)|0,b=o(g);for(let k=0;k<g;k+=1)b[k]=v[k]&255;return b}function p(v){if(Ct(v,Uint8Array)){const g=new Uint8Array(v);return m(g.buffer,g.byteOffset,g.byteLength)}return d(v)}function m(v,g,b){if(g<0||v.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(v.byteLength<g+(b||0))throw new RangeError('"length" is outside of buffer bounds');let k;return g===void 0&&b===void 0?k=new Uint8Array(v):b===void 0?k=new Uint8Array(v,g):k=new Uint8Array(v,g,b),Object.setPrototypeOf(k,s.prototype),k}function y(v){if(s.isBuffer(v)){const g=w(v.length)|0,b=o(g);return b.length===0||v.copy(b,0,0,g),b}if(v.length!==void 0)return typeof v.length!="number"||Cr(v.length)?o(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 A(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,b){if(Ct(g,Uint8Array)&&(g=s.from(g,g.offset,g.byteLength)),Ct(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),!s.isBuffer(g)||!s.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===b)return 0;let k=g.length,F=b.length;for(let O=0,j=Math.min(k,F);O<j;++O)if(g[O]!==b[O]){k=g[O],F=b[O];break}return k<F?-1:F<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,b){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(b===void 0)for(b=0,k=0;k<g.length;++k)b+=g[k].length;const F=s.allocUnsafe(b);let O=0;for(k=0;k<g.length;++k){let j=g[k];if(Ct(j,Uint8Array))O+j.length>F.length?(s.isBuffer(j)||(j=s.from(j)),j.copy(F,O)):Uint8Array.prototype.set.call(F,j,O);else if(s.isBuffer(j))j.copy(F,O);else throw new TypeError('"list" argument must be an Array of Buffers');O+=j.length}return F};function S(v,g){if(s.isBuffer(v))return v.length;if(ArrayBuffer.isView(v)||Ct(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 b=v.length,k=arguments.length>2&&arguments[2]===!0;if(!k&&b===0)return 0;let F=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return ce(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return wi(v).length;default:if(F)return k?-1:ce(v).length;g=(""+g).toLowerCase(),F=!0}}s.byteLength=S;function _(v,g,b){let k=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,g>>>=0,b<=g))return"";for(v||(v="utf8");;)switch(v){case"hex":return We(this,g,b);case"utf8":case"utf-8":return te(this,g,b);case"ascii":return De(this,g,b);case"latin1":case"binary":return Ke(this,g,b);case"base64":return se(this,g,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Je(this,g,b);default:if(k)throw new TypeError("Unknown encoding: "+v);v=(v+"").toLowerCase(),k=!0}}s.prototype._isBuffer=!0;function T(v,g,b){const k=v[g];v[g]=v[b],v[b]=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 b=0;b<g;b+=2)T(this,b,b+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 b=0;b<g;b+=4)T(this,b,b+3),T(this,b+1,b+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 b=0;b<g;b+=8)T(this,b,b+7),T(this,b+1,b+6),T(this,b+2,b+5),T(this,b+3,b+4);return this},s.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?te(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 b=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,b).replace(/(.{2})/g,"$1 ").trim(),this.length>b&&(g+=" ... "),"<Buffer "+g+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(g,b,k,F,O){if(Ct(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(b===void 0&&(b=0),k===void 0&&(k=g?g.length:0),F===void 0&&(F=0),O===void 0&&(O=this.length),b<0||k>g.length||F<0||O>this.length)throw new RangeError("out of range index");if(F>=O&&b>=k)return 0;if(F>=O)return-1;if(b>=k)return 1;if(b>>>=0,k>>>=0,F>>>=0,O>>>=0,this===g)return 0;let j=O-F,fe=k-b;const He=Math.min(j,fe),Pe=this.slice(F,O),Ze=g.slice(b,k);for(let Ce=0;Ce<He;++Ce)if(Pe[Ce]!==Ze[Ce]){j=Pe[Ce],fe=Ze[Ce];break}return j<fe?-1:fe<j?1:0};function I(v,g,b,k,F){if(v.length===0)return-1;if(typeof b=="string"?(k=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,Cr(b)&&(b=F?0:v.length-1),b<0&&(b=v.length+b),b>=v.length){if(F)return-1;b=v.length-1}else if(b<0)if(F)b=0;else return-1;if(typeof g=="string"&&(g=s.from(g,k)),s.isBuffer(g))return g.length===0?-1:B(v,g,b,k,F);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?F?Uint8Array.prototype.indexOf.call(v,g,b):Uint8Array.prototype.lastIndexOf.call(v,g,b):B(v,[g],b,k,F);throw new TypeError("val must be string, number or Buffer")}function B(v,g,b,k,F){let O=1,j=v.length,fe=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;O=2,j/=2,fe/=2,b/=2}function He(Ze,Ce){return O===1?Ze[Ce]:Ze.readUInt16BE(Ce*O)}let Pe;if(F){let Ze=-1;for(Pe=b;Pe<j;Pe++)if(He(v,Pe)===He(g,Ze===-1?0:Pe-Ze)){if(Ze===-1&&(Ze=Pe),Pe-Ze+1===fe)return Ze*O}else Ze!==-1&&(Pe-=Pe-Ze),Ze=-1}else for(b+fe>j&&(b=j-fe),Pe=b;Pe>=0;Pe--){let Ze=!0;for(let Ce=0;Ce<fe;Ce++)if(He(v,Pe+Ce)!==He(g,Ce)){Ze=!1;break}if(Ze)return Pe}return-1}s.prototype.includes=function(g,b,k){return this.indexOf(g,b,k)!==-1},s.prototype.indexOf=function(g,b,k){return I(this,g,b,k,!0)},s.prototype.lastIndexOf=function(g,b,k){return I(this,g,b,k,!1)};function R(v,g,b,k){b=Number(b)||0;const F=v.length-b;k?(k=Number(k),k>F&&(k=F)):k=F;const O=g.length;k>O/2&&(k=O/2);let j;for(j=0;j<k;++j){const fe=parseInt(g.substr(j*2,2),16);if(Cr(fe))return j;v[b+j]=fe}return j}function M(v,g,b,k){return vi(ce(g,v.length-b),v,b,k)}function G(v,g,b,k){return vi(qt(g),v,b,k)}function N(v,g,b,k){return vi(wi(g),v,b,k)}function re(v,g,b,k){return vi(yi(g,v.length-b),v,b,k)}s.prototype.write=function(g,b,k,F){if(b===void 0)F="utf8",k=this.length,b=0;else if(k===void 0&&typeof b=="string")F=b,k=this.length,b=0;else if(isFinite(b))b=b>>>0,isFinite(k)?(k=k>>>0,F===void 0&&(F="utf8")):(F=k,k=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const O=this.length-b;if((k===void 0||k>O)&&(k=O),g.length>0&&(k<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");let j=!1;for(;;)switch(F){case"hex":return R(this,g,b,k);case"utf8":case"utf-8":return M(this,g,b,k);case"ascii":case"latin1":case"binary":return G(this,g,b,k);case"base64":return N(this,g,b,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,g,b,k);default:if(j)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),j=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(v,g,b){return g===0&&b===v.length?t.fromByteArray(v):t.fromByteArray(v.slice(g,b))}function te(v,g,b){b=Math.min(v.length,b);const k=[];let F=g;for(;F<b;){const O=v[F];let j=null,fe=O>239?4:O>223?3:O>191?2:1;if(F+fe<=b){let He,Pe,Ze,Ce;switch(fe){case 1:O<128&&(j=O);break;case 2:He=v[F+1],(He&192)===128&&(Ce=(O&31)<<6|He&63,Ce>127&&(j=Ce));break;case 3:He=v[F+1],Pe=v[F+2],(He&192)===128&&(Pe&192)===128&&(Ce=(O&15)<<12|(He&63)<<6|Pe&63,Ce>2047&&(Ce<55296||Ce>57343)&&(j=Ce));break;case 4:He=v[F+1],Pe=v[F+2],Ze=v[F+3],(He&192)===128&&(Pe&192)===128&&(Ze&192)===128&&(Ce=(O&15)<<18|(He&63)<<12|(Pe&63)<<6|Ze&63,Ce>65535&&Ce<1114112&&(j=Ce))}}j===null?(j=65533,fe=1):j>65535&&(j-=65536,k.push(j>>>10&1023|55296),j=56320|j&1023),k.push(j),F+=fe}return Xe(k)}const ge=4096;function Xe(v){const g=v.length;if(g<=ge)return String.fromCharCode.apply(String,v);let b="",k=0;for(;k<g;)b+=String.fromCharCode.apply(String,v.slice(k,k+=ge));return b}function De(v,g,b){let k="";b=Math.min(v.length,b);for(let F=g;F<b;++F)k+=String.fromCharCode(v[F]&127);return k}function Ke(v,g,b){let k="";b=Math.min(v.length,b);for(let F=g;F<b;++F)k+=String.fromCharCode(v[F]);return k}function We(v,g,b){const k=v.length;(!g||g<0)&&(g=0),(!b||b<0||b>k)&&(b=k);let F="";for(let O=g;O<b;++O)F+=xi[v[O]];return F}function Je(v,g,b){const k=v.slice(g,b);let F="";for(let O=0;O<k.length-1;O+=2)F+=String.fromCharCode(k[O]+k[O+1]*256);return F}s.prototype.slice=function(g,b){const k=this.length;g=~~g,b=b===void 0?k:~~b,g<0?(g+=k,g<0&&(g=0)):g>k&&(g=k),b<0?(b+=k,b<0&&(b=0)):b>k&&(b=k),b<g&&(b=g);const F=this.subarray(g,b);return Object.setPrototypeOf(F,s.prototype),F};function _e(v,g,b){if(v%1!==0||v<0)throw new RangeError("offset is not uint");if(v+g>b)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(g,b,k){g=g>>>0,b=b>>>0,k||_e(g,b,this.length);let F=this[g],O=1,j=0;for(;++j<b&&(O*=256);)F+=this[g+j]*O;return F},s.prototype.readUintBE=s.prototype.readUIntBE=function(g,b,k){g=g>>>0,b=b>>>0,k||_e(g,b,this.length);let F=this[g+--b],O=1;for(;b>0&&(O*=256);)F+=this[g+--b]*O;return F},s.prototype.readUint8=s.prototype.readUInt8=function(g,b){return g=g>>>0,b||_e(g,1,this.length),this[g]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(g,b){return g=g>>>0,b||_e(g,2,this.length),this[g]|this[g+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(g,b){return g=g>>>0,b||_e(g,2,this.length),this[g]<<8|this[g+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(g,b){return g=g>>>0,b||_e(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,b){return g=g>>>0,b||_e(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,H(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&q(g,this.length-8);const F=b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,O=this[++g]+this[++g]*2**8+this[++g]*2**16+k*2**24;return BigInt(F)+(BigInt(O)<<BigInt(32))}),s.prototype.readBigUInt64BE=Wt(function(g){g=g>>>0,H(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&q(g,this.length-8);const F=b*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],O=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+k;return(BigInt(F)<<BigInt(32))+BigInt(O)}),s.prototype.readIntLE=function(g,b,k){g=g>>>0,b=b>>>0,k||_e(g,b,this.length);let F=this[g],O=1,j=0;for(;++j<b&&(O*=256);)F+=this[g+j]*O;return O*=128,F>=O&&(F-=Math.pow(2,8*b)),F},s.prototype.readIntBE=function(g,b,k){g=g>>>0,b=b>>>0,k||_e(g,b,this.length);let F=b,O=1,j=this[g+--F];for(;F>0&&(O*=256);)j+=this[g+--F]*O;return O*=128,j>=O&&(j-=Math.pow(2,8*b)),j},s.prototype.readInt8=function(g,b){return g=g>>>0,b||_e(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},s.prototype.readInt16LE=function(g,b){g=g>>>0,b||_e(g,2,this.length);const k=this[g]|this[g+1]<<8;return k&32768?k|4294901760:k},s.prototype.readInt16BE=function(g,b){g=g>>>0,b||_e(g,2,this.length);const k=this[g+1]|this[g]<<8;return k&32768?k|4294901760:k},s.prototype.readInt32LE=function(g,b){return g=g>>>0,b||_e(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},s.prototype.readInt32BE=function(g,b){return g=g>>>0,b||_e(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,H(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&q(g,this.length-8);const F=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(k<<24);return(BigInt(F)<<BigInt(32))+BigInt(b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),s.prototype.readBigInt64BE=Wt(function(g){g=g>>>0,H(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&q(g,this.length-8);const F=(b<<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+k)}),s.prototype.readFloatLE=function(g,b){return g=g>>>0,b||_e(g,4,this.length),n.read(this,g,!0,23,4)},s.prototype.readFloatBE=function(g,b){return g=g>>>0,b||_e(g,4,this.length),n.read(this,g,!1,23,4)},s.prototype.readDoubleLE=function(g,b){return g=g>>>0,b||_e(g,8,this.length),n.read(this,g,!0,52,8)},s.prototype.readDoubleBE=function(g,b){return g=g>>>0,b||_e(g,8,this.length),n.read(this,g,!1,52,8)};function Se(v,g,b,k,F,O){if(!s.isBuffer(v))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>F||g<O)throw new RangeError('"value" argument is out of bounds');if(b+k>v.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(g,b,k,F){if(g=+g,b=b>>>0,k=k>>>0,!F){const fe=Math.pow(2,8*k)-1;Se(this,g,b,k,fe,0)}let O=1,j=0;for(this[b]=g&255;++j<k&&(O*=256);)this[b+j]=g/O&255;return b+k},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(g,b,k,F){if(g=+g,b=b>>>0,k=k>>>0,!F){const fe=Math.pow(2,8*k)-1;Se(this,g,b,k,fe,0)}let O=k-1,j=1;for(this[b+O]=g&255;--O>=0&&(j*=256);)this[b+O]=g/j&255;return b+k},s.prototype.writeUint8=s.prototype.writeUInt8=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,1,255,0),this[b]=g&255,b+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,2,65535,0),this[b]=g&255,this[b+1]=g>>>8,b+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,2,65535,0),this[b]=g>>>8,this[b+1]=g&255,b+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,4,4294967295,0),this[b+3]=g>>>24,this[b+2]=g>>>16,this[b+1]=g>>>8,this[b]=g&255,b+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,4,4294967295,0),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4};function gt(v,g,b,k,F){x(g,k,F,v,b,7);let O=Number(g&BigInt(4294967295));v[b++]=O,O=O>>8,v[b++]=O,O=O>>8,v[b++]=O,O=O>>8,v[b++]=O;let j=Number(g>>BigInt(32)&BigInt(4294967295));return v[b++]=j,j=j>>8,v[b++]=j,j=j>>8,v[b++]=j,j=j>>8,v[b++]=j,b}function $t(v,g,b,k,F){x(g,k,F,v,b,7);let O=Number(g&BigInt(4294967295));v[b+7]=O,O=O>>8,v[b+6]=O,O=O>>8,v[b+5]=O,O=O>>8,v[b+4]=O;let j=Number(g>>BigInt(32)&BigInt(4294967295));return v[b+3]=j,j=j>>8,v[b+2]=j,j=j>>8,v[b+1]=j,j=j>>8,v[b]=j,b+8}s.prototype.writeBigUInt64LE=Wt(function(g,b=0){return gt(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Wt(function(g,b=0){return $t(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(g,b,k,F){if(g=+g,b=b>>>0,!F){const He=Math.pow(2,8*k-1);Se(this,g,b,k,He-1,-He)}let O=0,j=1,fe=0;for(this[b]=g&255;++O<k&&(j*=256);)g<0&&fe===0&&this[b+O-1]!==0&&(fe=1),this[b+O]=(g/j>>0)-fe&255;return b+k},s.prototype.writeIntBE=function(g,b,k,F){if(g=+g,b=b>>>0,!F){const He=Math.pow(2,8*k-1);Se(this,g,b,k,He-1,-He)}let O=k-1,j=1,fe=0;for(this[b+O]=g&255;--O>=0&&(j*=256);)g<0&&fe===0&&this[b+O+1]!==0&&(fe=1),this[b+O]=(g/j>>0)-fe&255;return b+k},s.prototype.writeInt8=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,1,127,-128),g<0&&(g=255+g+1),this[b]=g&255,b+1},s.prototype.writeInt16LE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,2,32767,-32768),this[b]=g&255,this[b+1]=g>>>8,b+2},s.prototype.writeInt16BE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,2,32767,-32768),this[b]=g>>>8,this[b+1]=g&255,b+2},s.prototype.writeInt32LE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,4,2147483647,-2147483648),this[b]=g&255,this[b+1]=g>>>8,this[b+2]=g>>>16,this[b+3]=g>>>24,b+4},s.prototype.writeInt32BE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4},s.prototype.writeBigInt64LE=Wt(function(g,b=0){return gt(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Wt(function(g,b=0){return $t(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ne(v,g,b,k,F,O){if(b+k>v.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function L(v,g,b,k,F){return g=+g,b=b>>>0,F||Ne(v,g,b,4),n.write(v,g,b,k,23,4),b+4}s.prototype.writeFloatLE=function(g,b,k){return L(this,g,b,!0,k)},s.prototype.writeFloatBE=function(g,b,k){return L(this,g,b,!1,k)};function P(v,g,b,k,F){return g=+g,b=b>>>0,F||Ne(v,g,b,8),n.write(v,g,b,k,52,8),b+8}s.prototype.writeDoubleLE=function(g,b,k){return P(this,g,b,!0,k)},s.prototype.writeDoubleBE=function(g,b,k){return P(this,g,b,!1,k)},s.prototype.copy=function(g,b,k,F){if(!s.isBuffer(g))throw new TypeError("argument should be a Buffer");if(k||(k=0),!F&&F!==0&&(F=this.length),b>=g.length&&(b=g.length),b||(b=0),F>0&&F<k&&(F=k),F===k||g.length===0||this.length===0)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(k<0||k>=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-b<F-k&&(F=g.length-b+k);const O=F-k;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(b,k,F):Uint8Array.prototype.set.call(g,this.subarray(k,F),b),O},s.prototype.fill=function(g,b,k,F){if(typeof g=="string"){if(typeof b=="string"?(F=b,b=0,k=this.length):typeof k=="string"&&(F=k,k=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 j=g.charCodeAt(0);(F==="utf8"&&j<128||F==="latin1")&&(g=j)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(b<0||this.length<b||this.length<k)throw new RangeError("Out of range index");if(k<=b)return this;b=b>>>0,k=k===void 0?this.length:k>>>0,g||(g=0);let O;if(typeof g=="number")for(O=b;O<k;++O)this[O]=g;else{const j=s.isBuffer(g)?g:s.from(g,F),fe=j.length;if(fe===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(O=0;O<k-b;++O)this[O+b]=j[O%fe]}return this};const $={};function V(v,g,b){$[v]=class extends b{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}`}}}V("ERR_BUFFER_OUT_OF_BOUNDS",function(v){return v?`${v} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),V("ERR_INVALID_ARG_TYPE",function(v,g){return`The "${v}" argument must be of type number. Received type ${typeof g}`},TypeError),V("ERR_OUT_OF_RANGE",function(v,g,b){let k=`The value of "${v}" is out of range.`,F=b;return Number.isInteger(b)&&Math.abs(b)>2**32?F=Z(String(b)):typeof b=="bigint"&&(F=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(F=Z(F)),F+="n"),k+=` It must be ${g}. Received ${F}`,k},RangeError);function Z(v){let g="",b=v.length;const k=v[0]==="-"?1:0;for(;b>=k+4;b-=3)g=`_${v.slice(b-3,b)}${g}`;return`${v.slice(0,b)}${g}`}function C(v,g,b){H(g,"offset"),(v[g]===void 0||v[g+b]===void 0)&&q(g,v.length-(b+1))}function x(v,g,b,k,F,O){if(v>b||v<g){const j=typeof g=="bigint"?"n":"";let fe;throw O>3?g===0||g===BigInt(0)?fe=`>= 0${j} and < 2${j} ** ${(O+1)*8}${j}`:fe=`>= -(2${j} ** ${(O+1)*8-1}${j}) and < 2 ** ${(O+1)*8-1}${j}`:fe=`>= ${g}${j} and <= ${b}${j}`,new $.ERR_OUT_OF_RANGE("value",fe,v)}C(k,F,O)}function H(v,g){if(typeof v!="number")throw new $.ERR_INVALID_ARG_TYPE(g,"number",v)}function q(v,g,b){throw Math.floor(v)!==v?(H(v,b),new $.ERR_OUT_OF_RANGE(b||"offset","an integer",v)):g<0?new $.ERR_BUFFER_OUT_OF_BOUNDS:new $.ERR_OUT_OF_RANGE(b||"offset",`>= ${b?1:0} and <= ${g}`,v)}const ue=/[^+/0-9A-Za-z-_]/g;function ne(v){if(v=v.split("=")[0],v=v.trim().replace(ue,""),v.length<2)return"";for(;v.length%4!==0;)v=v+"=";return v}function ce(v,g){g=g||1/0;let b;const k=v.length;let F=null;const O=[];for(let j=0;j<k;++j){if(b=v.charCodeAt(j),b>55295&&b<57344){if(!F){if(b>56319){(g-=3)>-1&&O.push(239,191,189);continue}else if(j+1===k){(g-=3)>-1&&O.push(239,191,189);continue}F=b;continue}if(b<56320){(g-=3)>-1&&O.push(239,191,189),F=b;continue}b=(F-55296<<10|b-56320)+65536}else F&&(g-=3)>-1&&O.push(239,191,189);if(F=null,b<128){if((g-=1)<0)break;O.push(b)}else if(b<2048){if((g-=2)<0)break;O.push(b>>6|192,b&63|128)}else if(b<65536){if((g-=3)<0)break;O.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((g-=4)<0)break;O.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return O}function qt(v){const g=[];for(let b=0;b<v.length;++b)g.push(v.charCodeAt(b)&255);return g}function yi(v,g){let b,k,F;const O=[];for(let j=0;j<v.length&&!((g-=2)<0);++j)b=v.charCodeAt(j),k=b>>8,F=b%256,O.push(F),O.push(k);return O}function wi(v){return t.toByteArray(ne(v))}function vi(v,g,b,k){let F;for(F=0;F<k&&!(F+b>=g.length||F>=v.length);++F)g[F+b]=v[F];return F}function Ct(v,g){return v instanceof g||v!=null&&v.constructor!=null&&v.constructor.name!=null&&v.constructor.name===g.name}function Cr(v){return v!==v}const xi=function(){const v="0123456789abcdef",g=new Array(256);for(let b=0;b<16;++b){const k=b*16;for(let F=0;F<16;++F)g[k+F]=v[b]+v[F]}return g}();function Wt(v){return typeof BigInt>"u"?nr:v}function nr(){throw new Error("BigInt not supported")}})(me);const bv=xe({__proto__:null,default:ll(me)},[me]),dt={},S7=Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})),J0=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 me.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||J0.fetch&&J0.fetch.bind(J0);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");n.overrides&&(this.baseOverrides=n.overrides),this.fetchImplementation=r}async fetch(t,n){let r;try{r=await this.fetchImplementation(t,n)}catch(i){if(`${i}`.includes("Failed to fetch"))console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`),r=await this.fetchImplementation(t,{...n,cache:"reload"});else throw i}return r}async read(t,n=0,r,i=0,a={}){const{headers:o={},signal:s,overrides:u={}}=a;r<1/0?o.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(o.range=`bytes=${i}-`);const l={...this.baseOverrides,...u,headers:{...o,...u.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s},c=await this.fetch(this.url,l);if(!c.ok)throw new Error(`HTTP ${c.status} ${c.statusText} ${this.url}`);if(c.status===200&&i===0||c.status===206){const f=await this.getBufferFromResponse(c),h=f.copy(t,n,0,Math.min(r,f.length)),d=c.headers.get("content-range"),p=/\/(\d+)$/.exec(d||"");return p&&p[1]&&(this._stat={size:parseInt(p[1],10)}),{bytesRead:h,buffer:t}}throw c.status===200?new Error("${this.url} fetch returned status 200, expected 206"):new Error(`HTTP ${c.status} fetching ${this.url}`)}async readFile(t={}){let n,r;typeof t=="string"?(n=t,r={}):(n=t.encoding,r=t,delete r.encoding);const{headers:i={},signal:a,overrides:o={}}=r,s={headers:i,method:"GET",redirect:"follow",mode:"cors",signal:a,...this.baseOverrides,...o},u=await this.fetch(this.url,s);if(!u)throw new Error("generic-filehandle failed to fetch");if(u.status!==200)throw Object.assign(new Error(`HTTP ${u.status} fetching ${this.url}`),{status:u.status});if(n==="utf8")return u.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(u)}async stat(){if(!this._stat){const t=me.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 yv(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 C7(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 k7{constructor(t){this.blob=t,this.size=t.size}async read(t,n=0,r,i=0){if(!r)return{bytesRead:0,buffer:t};const a=i,o=a+r,s=await yv(this.blob.slice(a,o)),u=me.Buffer.from(s);return{bytesRead:u.copy(t,n),buffer:u}}async readFile(t){let n;if(typeof t=="string"?n=t:n=t&&t.encoding,n==="utf8")return C7(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await yv(this.blob);return me.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function wv(e,t={}){return new Qi(e,t)}function T7(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return wv(e,r);if(t!==void 0)return new dt(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const ul=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:k7,LocalFile:dt,RemoteFile:Qi,fromUrl:wv,open:T7},Symbol.toStringTag,{value:"Module"}));var pr={};(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(a,o){return Object.prototype.hasOwnProperty.call(a,o)}e.assign=function(a){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var s=o.shift();if(s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var u in s)n(s,u)&&(a[u]=s[u])}}return a},e.shrinkBuf=function(a,o){return a.length===o?a:a.subarray?a.subarray(0,o):(a.length=o,a)};var r={arraySet:function(a,o,s,u,l){if(o.subarray&&a.subarray){a.set(o.subarray(s,s+u),l);return}for(var c=0;c<u;c++)a[l+c]=o[s+c]},flattenChunks:function(a){var o,s,u,l,c,f;for(u=0,o=0,s=a.length;o<s;o++)u+=a[o].length;for(f=new Uint8Array(u),l=0,o=0,s=a.length;o<s;o++)c=a[o],f.set(c,l),l+=c.length;return f}},i={arraySet:function(a,o,s,u,l){for(var c=0;c<u;c++)a[l+c]=o[s+c]},flattenChunks:function(a){return[].concat.apply([],a)}};e.setTyped=function(a){a?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})(pr);var cl={},Wn={},Xa={},I7=pr,B7=4,vv=0,xv=1,D7=2;function Ka(e){for(var t=e.length;--t>=0;)e[t]=0}var R7=0,Av=1,F7=2,M7=3,P7=258,ep=29,fl=256,hl=fl+1+ep,Ja=30,tp=19,Ev=2*hl+1,Xi=15,np=16,L7=7,rp=256,_v=16,Sv=17,Cv=18,ip=[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],hf=[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],O7=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],kv=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N7=512,gr=new Array((hl+2)*2);Ka(gr);var dl=new Array(Ja*2);Ka(dl);var pl=new Array(N7);Ka(pl);var gl=new Array(P7-M7+1);Ka(gl);var ap=new Array(ep);Ka(ap);var df=new Array(Ja);Ka(df);function op(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 Tv,Iv,Bv;function sp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Dv(e){return e<256?pl[e]:pl[256+(e>>>7)]}function ml(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>np-n?(e.bi_buf|=t<<e.bi_valid&65535,ml(e,e.bi_buf),e.bi_buf=t>>np-e.bi_valid,e.bi_valid+=n-np):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Zn(e,t,n){Gt(e,n[t*2],n[t*2+1])}function Rv(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function z7(e){e.bi_valid===16?(ml(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 U7(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length,l,c,f,h,d,p,m=0;for(h=0;h<=Xi;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<Ev;l++)c=e.heap[l],h=n[n[c*2+1]*2+1]+1,h>u&&(h=u,m++),n[c*2+1]=h,!(c>r)&&(e.bl_count[h]++,d=0,c>=s&&(d=o[c-s]),p=n[c*2],e.opt_len+=p*(h+d),a&&(e.static_len+=p*(i[c*2+1]+d)));if(m!==0){do{for(h=u-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(h=u;h!==0;h--)for(c=e.bl_count[h];c!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),c--)}}function Fv(e,t,n){var r=new Array(Xi+1),i=0,a,o;for(a=1;a<=Xi;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=Rv(r[s]++,s))}}function G7(){var e,t,n,r,i,a=new Array(Xi+1);for(n=0,r=0;r<ep-1;r++)for(ap[r]=n,e=0;e<1<<ip[r];e++)gl[n++]=r;for(gl[n-1]=r,i=0,r=0;r<16;r++)for(df[r]=i,e=0;e<1<<hf[r];e++)pl[i++]=r;for(i>>=7;r<Ja;r++)for(df[r]=i<<7,e=0;e<1<<hf[r]-7;e++)pl[256+i++]=r;for(t=0;t<=Xi;t++)a[t]=0;for(e=0;e<=143;)gr[e*2+1]=8,e++,a[8]++;for(;e<=255;)gr[e*2+1]=9,e++,a[9]++;for(;e<=279;)gr[e*2+1]=7,e++,a[7]++;for(;e<=287;)gr[e*2+1]=8,e++,a[8]++;for(Fv(gr,hl+1,a),e=0;e<Ja;e++)dl[e*2+1]=5,dl[e*2]=Rv(e,5);Tv=new op(gr,ip,fl+1,hl,Xi),Iv=new op(dl,hf,0,Ja,Xi),Bv=new op(new Array(0),O7,0,tp,L7)}function Mv(e){var t;for(t=0;t<hl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ja;t++)e.dyn_dtree[t*2]=0;for(t=0;t<tp;t++)e.bl_tree[t*2]=0;e.dyn_ltree[rp*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Pv(e){e.bi_valid>8?ml(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 H7(e,t,n,r){Pv(e),r&&(ml(e,n),ml(e,~n)),I7.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function Lv(e,t,n,r){var i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function lp(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&Lv(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Lv(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function Ov(e,t,n){var r,i,a=0,o,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],i=e.pending_buf[e.l_buf+a],a++,r===0?Zn(e,i,t):(o=gl[i],Zn(e,o+fl+1,t),s=ip[o],s!==0&&(i-=ap[o],Gt(e,i,s)),r--,o=Dv(r),Zn(e,o,n),s=hf[o],s!==0&&(r-=df[o],Gt(e,r,s)));while(a<e.last_lit);Zn(e,rp,t)}function up(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,u=-1,l;for(e.heap_len=0,e.heap_max=Ev,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=u,o=e.heap_len>>1;o>=1;o--)lp(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],lp(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,lp(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],U7(e,t),Fv(n,u,e.bl_count)}function Nv(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<u&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[_v*2]++):s<=10?e.bl_tree[Sv*2]++:e.bl_tree[Cv*2]++,s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4))}function zv(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<u&&a===o)){if(s<l)do Zn(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Zn(e,a,e.bl_tree),s--),Zn(e,_v,e.bl_tree),Gt(e,s-3,2)):s<=10?(Zn(e,Sv,e.bl_tree),Gt(e,s-3,3)):(Zn(e,Cv,e.bl_tree),Gt(e,s-11,7));s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4)}}function V7(e){var t;for(Nv(e,e.dyn_ltree,e.l_desc.max_code),Nv(e,e.dyn_dtree,e.d_desc.max_code),up(e,e.bl_desc),t=tp-1;t>=3&&e.bl_tree[kv[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function j7(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[kv[i]*2+1],3);zv(e,e.dyn_ltree,t-1),zv(e,e.dyn_dtree,n-1)}function $7(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return vv;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return xv;for(n=32;n<fl;n++)if(e.dyn_ltree[n*2]!==0)return xv;return vv}var Uv=!1;function q7(e){Uv||(G7(),Uv=!0),e.l_desc=new sp(e.dyn_ltree,Tv),e.d_desc=new sp(e.dyn_dtree,Iv),e.bl_desc=new sp(e.bl_tree,Bv),e.bi_buf=0,e.bi_valid=0,Mv(e)}function Gv(e,t,n,r){Gt(e,(R7<<1)+(r?1:0),3),H7(e,t,n,!0)}function W7(e){Gt(e,Av<<1,3),Zn(e,rp,gr),z7(e)}function Z7(e,t,n,r){var i,a,o=0;e.level>0?(e.strm.data_type===D7&&(e.strm.data_type=$7(e)),up(e,e.l_desc),up(e,e.d_desc),o=V7(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?Gv(e,t,n,r):e.strategy===B7||a===i?(Gt(e,(Av<<1)+(r?1:0),3),Ov(e,gr,dl)):(Gt(e,(F7<<1)+(r?1:0),3),j7(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Ov(e,e.dyn_ltree,e.dyn_dtree)),Mv(e),r&&Pv(e)}function Y7(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[(gl[n]+fl+1)*2]++,e.dyn_dtree[Dv(t)*2]++),e.last_lit===e.lit_bufsize-1}Xa._tr_init=q7,Xa._tr_stored_block=Gv,Xa._tr_flush_block=Z7,Xa._tr_tally=Y7,Xa._tr_align=W7;function Q7(e,t,n,r){for(var i=e&65535|0,a=e>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0}var Hv=Q7;function X7(){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 K7=X7();function J7(e,t,n,r){var i=K7,a=r+n;e^=-1;for(var o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1}var Vv=J7,cp={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"},Rt=pr,on=Xa,jv=Hv,ti=Vv,eM=cp,Ki=0,tM=1,nM=3,ni=4,$v=5,Yn=0,qv=1,sn=-2,rM=-3,fp=-5,iM=-1,aM=1,pf=2,oM=3,sM=4,lM=0,uM=2,gf=8,cM=9,fM=15,hM=8,dM=29,pM=256,hp=pM+1+dM,gM=30,mM=19,bM=2*hp+1,yM=15,de=3,ri=258,Cn=ri+de+1,wM=32,mf=42,dp=69,bf=73,yf=91,wf=103,Ji=113,bl=666,st=1,yl=2,ea=3,eo=4,vM=3;function ii(e,t){return e.msg=eM[t],t}function Wv(e){return(e<<1)-(e>4?9:0)}function ai(e){for(var t=e.length;--t>=0;)e[t]=0}function oi(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Rt.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 wt(e,t){on._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,oi(e.strm)}function ve(e,t){e.pending_buf[e.pending++]=t}function wl(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function xM(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Rt.arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=jv(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ti(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function Zv(e,t){var n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-Cn?e.strstart-(e.w_size-Cn):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+ri,d=l[r+o-1],p=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+o]!==p||l[i+o-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(a=ri-(h-r),r=h-ri,a>o){if(e.match_start=t,o=a,a>=s)break;d=l[r+o-1],p=l[r+o]}}while((t=f[t&c])>u&&--n!==0);return o<=e.lookahead?o:e.lookahead}function ta(e){var t=e.w_size,n,r,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Cn)){Rt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);a+=t}if(e.strm.avail_in===0)break;if(r=xM(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=de)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+de-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<de)););}while(e.lookahead<Cn&&e.strm.avail_in!==0)}function AM(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ta(e),e.lookahead===0&&t===Ki)return st;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,wt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Cn&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=0,t===ni?(wt(e,!0),e.strm.avail_out===0?ea:eo):(e.strstart>e.block_start&&(wt(e,!1),e.strm.avail_out===0),st)}function pp(e,t){for(var n,r;;){if(e.lookahead<Cn){if(ta(e),e.lookahead<Cn&&t===Ki)return st;if(e.lookahead===0)break}if(n=0,e.lookahead>=de&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-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-Cn&&(e.match_length=Zv(e,n)),e.match_length>=de)if(r=on._tr_tally(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=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-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=on._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=e.strstart<de-1?e.strstart:de-1,t===ni?(wt(e,!0),e.strm.avail_out===0?ea:eo):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:yl}function to(e,t){for(var n,r,i;;){if(e.lookahead<Cn){if(ta(e),e.lookahead<Cn&&t===Ki)return st;if(e.lookahead===0)break}if(n=0,e.lookahead>=de&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-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=de-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Cn&&(e.match_length=Zv(e,n),e.match_length<=5&&(e.strategy===aM||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=on._tr_tally(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=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-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=de-1,e.strstart++,r&&(wt(e,!1),e.strm.avail_out===0))return st}else if(e.match_available){if(r=on._tr_tally(e,0,e.window[e.strstart-1]),r&&wt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return st}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=on._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<de-1?e.strstart:de-1,t===ni?(wt(e,!0),e.strm.avail_out===0?ea:eo):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:yl}function EM(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=ri){if(ta(e),e.lookahead<=ri&&t===Ki)return st;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=de&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+ri;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=ri-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=de?(n=on._tr_tally(e,1,e.match_length-de),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=on._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=0,t===ni?(wt(e,!0),e.strm.avail_out===0?ea:eo):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:yl}function _M(e,t){for(var n;;){if(e.lookahead===0&&(ta(e),e.lookahead===0)){if(t===Ki)return st;break}if(e.match_length=0,n=on._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=0,t===ni?(wt(e,!0),e.strm.avail_out===0?ea:eo):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:yl}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 no;no=[new Qn(0,0,0,0,AM),new Qn(4,4,8,4,pp),new Qn(4,5,16,8,pp),new Qn(4,6,32,32,pp),new Qn(4,4,16,16,to),new Qn(8,16,32,32,to),new Qn(8,16,128,128,to),new Qn(8,32,128,256,to),new Qn(32,128,258,1024,to),new Qn(32,258,258,4096,to)];function SM(e){e.window_size=2*e.w_size,ai(e.head),e.max_lazy_match=no[e.level].max_lazy,e.good_match=no[e.level].good_length,e.nice_match=no[e.level].nice_length,e.max_chain_length=no[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 CM(){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=gf,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 Rt.Buf16(bM*2),this.dyn_dtree=new Rt.Buf16((2*gM+1)*2),this.bl_tree=new Rt.Buf16((2*mM+1)*2),ai(this.dyn_ltree),ai(this.dyn_dtree),ai(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Rt.Buf16(yM+1),this.heap=new Rt.Buf16(2*hp+1),ai(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Rt.Buf16(2*hp+1),ai(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 Yv(e){var t;return!e||!e.state?ii(e,sn):(e.total_in=e.total_out=0,e.data_type=uM,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?mf:Ji,e.adler=t.wrap===2?0:1,t.last_flush=Ki,on._tr_init(t),Yn)}function Qv(e){var t=Yv(e);return t===Yn&&SM(e.state),t}function kM(e,t){return!e||!e.state||e.state.wrap!==2?sn:(e.state.gzhead=t,Yn)}function Xv(e,t,n,r,i,a){if(!e)return sn;var o=1;if(t===iM&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>cM||n!==gf||r<8||r>15||t<0||t>9||a<0||a>sM)return ii(e,sn);r===8&&(r=9);var s=new CM;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+de-1)/de),s.window=new Rt.Buf8(s.w_size*2),s.head=new Rt.Buf16(s.hash_size),s.prev=new Rt.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Rt.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=t,s.strategy=a,s.method=n,Qv(e)}function TM(e,t){return Xv(e,t,gf,fM,hM,lM)}function IM(e,t){var n,r,i,a;if(!e||!e.state||t>$v||t<0)return e?ii(e,sn):sn;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===bl&&t!==ni)return ii(e,e.avail_out===0?fp:sn);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===mf)if(r.wrap===2)e.adler=0,ve(r,31),ve(r,139),ve(r,8),r.gzhead?(ve(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)),ve(r,r.gzhead.time&255),ve(r,r.gzhead.time>>8&255),ve(r,r.gzhead.time>>16&255),ve(r,r.gzhead.time>>24&255),ve(r,r.level===9?2:r.strategy>=pf||r.level<2?4:0),ve(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(ve(r,r.gzhead.extra.length&255),ve(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=ti(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=dp):(ve(r,0),ve(r,0),ve(r,0),ve(r,0),ve(r,0),ve(r,r.level===9?2:r.strategy>=pf||r.level<2?4:0),ve(r,vM),r.status=Ji);else{var o=gf+(r.w_bits-8<<4)<<8,s=-1;r.strategy>=pf||r.level<2?s=0:r.level<6?s=1:r.level===6?s=2:s=3,o|=s<<6,r.strstart!==0&&(o|=wM),o+=31-o%31,r.status=Ji,wl(r,o),r.strstart!==0&&(wl(r,e.adler>>>16),wl(r,e.adler&65535)),e.adler=1}if(r.status===dp)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=ti(e.adler,r.pending_buf,r.pending-i,i)),oi(e),i=r.pending,r.pending===r.pending_buf_size));)ve(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=ti(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=bf)}else r.status=bf;if(r.status===bf)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=ti(e.adler,r.pending_buf,r.pending-i,i)),oi(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}r.gzindex<r.gzhead.name.length?a=r.gzhead.name.charCodeAt(r.gzindex++)&255:a=0,ve(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=ti(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=yf)}else r.status=yf;if(r.status===yf)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=ti(e.adler,r.pending_buf,r.pending-i,i)),oi(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}r.gzindex<r.gzhead.comment.length?a=r.gzhead.comment.charCodeAt(r.gzindex++)&255:a=0,ve(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=ti(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=wf)}else r.status=wf;if(r.status===wf&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&oi(e),r.pending+2<=r.pending_buf_size&&(ve(r,e.adler&255),ve(r,e.adler>>8&255),e.adler=0,r.status=Ji)):r.status=Ji),r.pending!==0){if(oi(e),e.avail_out===0)return r.last_flush=-1,Yn}else if(e.avail_in===0&&Wv(t)<=Wv(n)&&t!==ni)return ii(e,fp);if(r.status===bl&&e.avail_in!==0)return ii(e,fp);if(e.avail_in!==0||r.lookahead!==0||t!==Ki&&r.status!==bl){var u=r.strategy===pf?_M(r,t):r.strategy===oM?EM(r,t):no[r.level].func(r,t);if((u===ea||u===eo)&&(r.status=bl),u===st||u===ea)return e.avail_out===0&&(r.last_flush=-1),Yn;if(u===yl&&(t===tM?on._tr_align(r):t!==$v&&(on._tr_stored_block(r,0,0,!1),t===nM&&(ai(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),oi(e),e.avail_out===0))return r.last_flush=-1,Yn}return t!==ni?Yn:r.wrap<=0?qv:(r.wrap===2?(ve(r,e.adler&255),ve(r,e.adler>>8&255),ve(r,e.adler>>16&255),ve(r,e.adler>>24&255),ve(r,e.total_in&255),ve(r,e.total_in>>8&255),ve(r,e.total_in>>16&255),ve(r,e.total_in>>24&255)):(wl(r,e.adler>>>16),wl(r,e.adler&65535)),oi(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Yn:qv)}function BM(e){var t;return!e||!e.state?sn:(t=e.state.status,t!==mf&&t!==dp&&t!==bf&&t!==yf&&t!==wf&&t!==Ji&&t!==bl?ii(e,sn):(e.state=null,t===Ji?ii(e,rM):Yn))}function DM(e,t){var n=t.length,r,i,a,o,s,u,l,c;if(!e||!e.state||(r=e.state,o=r.wrap,o===2||o===1&&r.status!==mf||r.lookahead))return sn;for(o===1&&(e.adler=jv(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(o===0&&(ai(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new Rt.Buf8(r.w_size),Rt.arraySet(c,t,n-r.w_size,r.w_size,0),t=c,n=r.w_size),s=e.avail_in,u=e.next_in,l=e.input,e.avail_in=n,e.next_in=0,e.input=t,ta(r);r.lookahead>=de;){i=r.strstart,a=r.lookahead-(de-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+de-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--a);r.strstart=i,r.lookahead=de-1,ta(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=u,e.input=l,e.avail_in=s,r.wrap=o,Yn}Wn.deflateInit=TM,Wn.deflateInit2=Xv,Wn.deflateReset=Qv,Wn.deflateResetKeep=Yv,Wn.deflateSetHeader=kM,Wn.deflate=IM,Wn.deflateEnd=BM,Wn.deflateSetDictionary=DM,Wn.deflateInfo="pako deflate (from Nodeca project)";var na={},vf=pr,Kv=!0,Jv=!0;try{String.fromCharCode.apply(null,[0])}catch{Kv=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Jv=!1}for(var vl=new vf.Buf8(256),si=0;si<256;si++)vl[si]=si>=252?6:si>=248?5:si>=240?4:si>=224?3:si>=192?2:1;vl[254]=vl[254]=1,na.string2buf=function(e){var t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new vf.Buf8(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};function ex(e,t){if(t<65534&&(e.subarray&&Jv||!e.subarray&&Kv))return String.fromCharCode.apply(null,vf.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}na.buf2binstring=function(e){return ex(e,e.length)},na.binstring2buf=function(e){for(var t=new vf.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},na.buf2string=function(e,t){var n,r,i,a,o=t||e.length,s=new Array(o*2);for(r=0,n=0;n<o;){if(i=e[n++],i<128){s[r++]=i;continue}if(a=vl[i],a>4){s[r++]=65533,n+=a-1;continue}for(i&=a===2?31:a===3?15:7;a>1&&n<o;)i=i<<6|e[n++]&63,a--;if(a>1){s[r++]=65533;continue}i<65536?s[r++]=i:(i-=65536,s[r++]=55296|i>>10&1023,s[r++]=56320|i&1023)}return ex(s,r)},na.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+vl[e[n]]>t?n:t};function RM(){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 tx=RM,xl=Wn,Al=pr,gp=na,mp=cp,FM=tx,nx=Object.prototype.toString,MM=0,bp=4,ro=0,rx=1,ix=2,PM=-1,LM=0,OM=8;function ra(e){if(!(this instanceof ra))return new ra(e);this.options=Al.assign({level:PM,method:OM,chunkSize:16384,windowBits:15,memLevel:8,strategy:LM,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 FM,this.strm.avail_out=0;var n=xl.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==ro)throw new Error(mp[n]);if(t.header&&xl.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=gp.string2buf(t.dictionary):nx.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=xl.deflateSetDictionary(this.strm,r),n!==ro)throw new Error(mp[n]);this._dict_set=!0}}ra.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;a=t===~~t?t:t===!0?bp:MM,typeof e=="string"?n.input=gp.string2buf(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 Al.Buf8(r),n.next_out=0,n.avail_out=r),i=xl.deflate(n,a),i!==rx&&i!==ro)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(a===bp||a===ix))&&(this.options.to==="string"?this.onData(gp.buf2binstring(Al.shrinkBuf(n.output,n.next_out))):this.onData(Al.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==rx);return a===bp?(i=xl.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ro):(a===ix&&(this.onEnd(ro),n.avail_out=0),!0)},ra.prototype.onData=function(e){this.chunks.push(e)},ra.prototype.onEnd=function(e){e===ro&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Al.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function yp(e,t){var n=new ra(t);if(n.push(e,!0),n.err)throw n.msg||mp[n.err];return n.result}function NM(e,t){return t=t||{},t.raw=!0,yp(e,t)}function zM(e,t){return t=t||{},t.gzip=!0,yp(e,t)}cl.Deflate=ra,cl.deflate=yp,cl.deflateRaw=NM,cl.gzip=zM;var El={},kn={},xf=30,UM=12,GM=function(t,n){var r,i,a,o,s,u,l,c,f,h,d,p,m,y,w,A,S,_,T,I,B,R,M,G,N;r=t.state,i=t.next_in,G=t.input,a=i+(t.avail_in-5),o=t.next_out,N=t.output,s=o-(n-t.avail_out),u=o+(t.avail_out-257),l=r.dmax,c=r.wsize,f=r.whave,h=r.wnext,d=r.window,p=r.hold,m=r.bits,y=r.lencode,w=r.distcode,A=(1<<r.lenbits)-1,S=(1<<r.distbits)-1;e:do{m<15&&(p+=G[i++]<<m,m+=8,p+=G[i++]<<m,m+=8),_=y[p&A];t:for(;;){if(T=_>>>24,p>>>=T,m-=T,T=_>>>16&255,T===0)N[o++]=_&65535;else if(T&16){I=_&65535,T&=15,T&&(m<T&&(p+=G[i++]<<m,m+=8),I+=p&(1<<T)-1,p>>>=T,m-=T),m<15&&(p+=G[i++]<<m,m+=8,p+=G[i++]<<m,m+=8),_=w[p&S];n:for(;;){if(T=_>>>24,p>>>=T,m-=T,T=_>>>16&255,T&16){if(B=_&65535,T&=15,m<T&&(p+=G[i++]<<m,m+=8,m<T&&(p+=G[i++]<<m,m+=8)),B+=p&(1<<T)-1,B>l){t.msg="invalid distance too far back",r.mode=xf;break e}if(p>>>=T,m-=T,T=o-s,B>T){if(T=B-T,T>f&&r.sane){t.msg="invalid distance too far back",r.mode=xf;break e}if(R=0,M=d,h===0){if(R+=c-T,T<I){I-=T;do N[o++]=d[R++];while(--T);R=o-B,M=N}}else if(h<T){if(R+=c+h-T,T-=h,T<I){I-=T;do N[o++]=d[R++];while(--T);if(R=0,h<I){T=h,I-=T;do N[o++]=d[R++];while(--T);R=o-B,M=N}}}else if(R+=h-T,T<I){I-=T;do N[o++]=d[R++];while(--T);R=o-B,M=N}for(;I>2;)N[o++]=M[R++],N[o++]=M[R++],N[o++]=M[R++],I-=3;I&&(N[o++]=M[R++],I>1&&(N[o++]=M[R++]))}else{R=o-B;do N[o++]=N[R++],N[o++]=N[R++],N[o++]=N[R++],I-=3;while(I>2);I&&(N[o++]=N[R++],I>1&&(N[o++]=N[R++]))}}else if(T&64){t.msg="invalid distance code",r.mode=xf;break e}else{_=w[(_&65535)+(p&(1<<T)-1)];continue n}break}}else if(T&64)if(T&32){r.mode=UM;break e}else{t.msg="invalid literal/length code",r.mode=xf;break e}else{_=y[(_&65535)+(p&(1<<T)-1)];continue t}break}}while(i<a&&o<u);I=m>>3,i-=I,m-=I<<3,p&=(1<<m)-1,t.next_in=i,t.next_out=o,t.avail_in=i<a?5+(a-i):5-(i-a),t.avail_out=o<u?257+(u-o):257-(o-u),r.hold=p,r.bits=m},ax=pr,io=15,ox=852,sx=592,lx=0,wp=1,ux=2,HM=[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],VM=[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],jM=[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],$M=[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],qM=function(t,n,r,i,a,o,s,u){var l=u.bits,c=0,f=0,h=0,d=0,p=0,m=0,y=0,w=0,A=0,S=0,_,T,I,B,R,M=null,G=0,N,re=new ax.Buf16(io+1),se=new ax.Buf16(io+1),te=null,ge=0,Xe,De,Ke;for(c=0;c<=io;c++)re[c]=0;for(f=0;f<i;f++)re[n[r+f]]++;for(p=l,d=io;d>=1&&re[d]===0;d--);if(p>d&&(p=d),d===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,u.bits=1,0;for(h=1;h<d&&re[h]===0;h++);for(p<h&&(p=h),w=1,c=1;c<=io;c++)if(w<<=1,w-=re[c],w<0)return-1;if(w>0&&(t===lx||d!==1))return-1;for(se[1]=0,c=1;c<io;c++)se[c+1]=se[c]+re[c];for(f=0;f<i;f++)n[r+f]!==0&&(s[se[n[r+f]]++]=f);if(t===lx?(M=te=s,N=19):t===wp?(M=HM,G-=257,te=VM,ge-=257,N=256):(M=jM,te=$M,N=-1),S=0,f=0,c=h,R=o,m=p,y=0,I=-1,A=1<<p,B=A-1,t===wp&&A>ox||t===ux&&A>sx)return 1;for(;;){Xe=c-y,s[f]<N?(De=0,Ke=s[f]):s[f]>N?(De=te[ge+s[f]],Ke=M[G+s[f]]):(De=32+64,Ke=0),_=1<<c-y,T=1<<m,h=T;do T-=_,a[R+(S>>y)+T]=Xe<<24|De<<16|Ke|0;while(T!==0);for(_=1<<c-1;S&_;)_>>=1;if(_!==0?(S&=_-1,S+=_):S=0,f++,--re[c]===0){if(c===d)break;c=n[r+s[f]]}if(c>p&&(S&B)!==I){for(y===0&&(y=p),R+=h,m=c-y,w=1<<m;m+y<d&&(w-=re[m+y],!(w<=0));)m++,w<<=1;if(A+=1<<m,t===wp&&A>ox||t===ux&&A>sx)return 1;I=S&B,a[I]=p<<24|m<<16|R-o|0}}return S!==0&&(a[R+S]=c-y<<24|64<<16|0),u.bits=p,0},Qt=pr,vp=Hv,Xn=Vv,WM=GM,_l=qM,ZM=0,cx=1,fx=2,hx=4,YM=5,Af=6,ia=0,QM=1,XM=2,ln=-2,dx=-3,px=-4,KM=-5,gx=8,mx=1,bx=2,yx=3,wx=4,vx=5,xx=6,Ax=7,Ex=8,_x=9,Sx=10,Ef=11,mr=12,xp=13,Cx=14,Ap=15,kx=16,Tx=17,Ix=18,Bx=19,_f=20,Sf=21,Dx=22,Rx=23,Fx=24,Mx=25,Px=26,Ep=27,Lx=28,Ox=29,$e=30,Nx=31,JM=32,eP=852,tP=592,nP=15,rP=nP;function zx(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function iP(){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 Qt.Buf16(320),this.work=new Qt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ux(e){var t;return!e||!e.state?ln:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=mx,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Qt.Buf32(eP),t.distcode=t.distdyn=new Qt.Buf32(tP),t.sane=1,t.back=-1,ia)}function Gx(e){var t;return!e||!e.state?ln:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Ux(e))}function Hx(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))?ln:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Gx(e))}function Vx(e,t){var n,r;return e?(r=new iP,e.state=r,r.window=null,n=Hx(e,t),n!==ia&&(e.state=null),n):ln}function aP(e){return Vx(e,rP)}var jx=!0,_p,Sp;function oP(e){if(jx){var t;for(_p=new Qt.Buf32(512),Sp=new Qt.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(_l(cx,e.lens,0,288,_p,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;_l(fx,e.lens,0,32,Sp,0,e.work,{bits:5}),jx=!1}e.lencode=_p,e.lenbits=9,e.distcode=Sp,e.distbits=5}function $x(e,t,n,r){var i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Qt.Buf8(a.wsize)),r>=a.wsize?(Qt.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),Qt.arraySet(a.window,t,n-r,i,a.wnext),r-=i,r?(Qt.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function sP(e,t){var n,r,i,a,o,s,u,l,c,f,h,d,p,m,y=0,w,A,S,_,T,I,B,R,M=new Qt.Buf8(4),G,N,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 ln;n=e.state,n.mode===mr&&(n.mode=xp),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,f=s,h=u,R=ia;e:for(;;)switch(n.mode){case mx:if(n.wrap===0){n.mode=xp;break}for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.wrap&2&&l===35615){n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0),l=0,c=0,n.mode=bx;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=$e;break}if((l&15)!==gx){e.msg="unknown compression method",n.mode=$e;break}if(l>>>=4,c-=4,B=(l&15)+8,n.wbits===0)n.wbits=B;else if(B>n.wbits){e.msg="invalid window size",n.mode=$e;break}n.dmax=1<<B,e.adler=n.check=1,n.mode=l&512?Sx:mr,l=0,c=0;break;case bx:for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.flags=l,(n.flags&255)!==gx){e.msg="unknown compression method",n.mode=$e;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=$e;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0)),l=0,c=0,n.mode=yx;case yx:for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=Xn(n.check,M,4,0)),l=0,c=0,n.mode=wx;case wx:for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=Xn(n.check,M,2,0)),l=0,c=0,n.mode=vx;case vx:if(n.flags&1024){for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=Xn(n.check,M,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=xx;case xx:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(B=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Qt.arraySet(n.head.extra,r,a,d,B)),n.flags&512&&(n.check=Xn(n.check,r,d,a)),s-=d,a+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Ax;case Ax:if(n.flags&2048){if(s===0)break e;d=0;do B=r[a+d++],n.head&&B&&n.length<65536&&(n.head.name+=String.fromCharCode(B));while(B&&d<s);if(n.flags&512&&(n.check=Xn(n.check,r,d,a)),s-=d,a+=d,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Ex;case Ex:if(n.flags&4096){if(s===0)break e;d=0;do B=r[a+d++],n.head&&B&&n.length<65536&&(n.head.comment+=String.fromCharCode(B));while(B&&d<s);if(n.flags&512&&(n.check=Xn(n.check,r,d,a)),s-=d,a+=d,B)break e}else n.head&&(n.head.comment=null);n.mode=_x;case _x:if(n.flags&512){for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=$e;break}l=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=mr;break;case Sx:for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}e.adler=n.check=zx(l),l=0,c=0,n.mode=Ef;case Ef:if(n.havedict===0)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,XM;e.adler=n.check=1,n.mode=mr;case mr:if(t===YM||t===Af)break e;case xp:if(n.last){l>>>=c&7,c-=c&7,n.mode=Ep;break}for(;c<3;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}switch(n.last=l&1,l>>>=1,c-=1,l&3){case 0:n.mode=Cx;break;case 1:if(oP(n),n.mode=_f,t===Af){l>>>=2,c-=2;break e}break;case 2:n.mode=Tx;break;case 3:e.msg="invalid block type",n.mode=$e}l>>>=2,c-=2;break;case Cx:for(l>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=$e;break}if(n.length=l&65535,l=0,c=0,n.mode=Ap,t===Af)break e;case Ap:n.mode=kx;case kx:if(d=n.length,d){if(d>s&&(d=s),d>u&&(d=u),d===0)break e;Qt.arraySet(i,r,a,d,o),s-=d,a+=d,u-=d,o+=d,n.length-=d;break}n.mode=mr;break;case Tx:for(;c<14;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.nlen=(l&31)+257,l>>>=5,c-=5,n.ndist=(l&31)+1,l>>>=5,c-=5,n.ncode=(l&15)+4,l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=$e;break}n.have=0,n.mode=Ix;case Ix:for(;n.have<n.ncode;){for(;c<3;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.lens[re[n.have++]]=l&7,l>>>=3,c-=3}for(;n.have<19;)n.lens[re[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},R=_l(ZM,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,R){e.msg="invalid code lengths set",n.mode=$e;break}n.have=0,n.mode=Bx;case Bx:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(S<16)l>>>=w,c-=w,n.lens[n.have++]=S;else{if(S===16){for(N=w+2;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(l>>>=w,c-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=$e;break}B=n.lens[n.have-1],d=3+(l&3),l>>>=2,c-=2}else if(S===17){for(N=w+3;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=w,c-=w,B=0,d=3+(l&7),l>>>=3,c-=3}else{for(N=w+7;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=w,c-=w,B=0,d=11+(l&127),l>>>=7,c-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=$e;break}for(;d--;)n.lens[n.have++]=B}}if(n.mode===$e)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=$e;break}if(n.lenbits=9,G={bits:n.lenbits},R=_l(cx,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,R){e.msg="invalid literal/lengths set",n.mode=$e;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},R=_l(fx,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,R){e.msg="invalid distances set",n.mode=$e;break}if(n.mode=_f,t===Af)break e;case _f:n.mode=Sf;case Sf:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,WM(e,h),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,n.mode===mr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(A&&!(A&240)){for(_=w,T=A,I=S;y=n.lencode[I+((l&(1<<_+T)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,n.length=S,A===0){n.mode=Px;break}if(A&32){n.back=-1,n.mode=mr;break}if(A&64){e.msg="invalid literal/length code",n.mode=$e;break}n.extra=A&15,n.mode=Dx;case Dx:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Rx;case Rx:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(!(A&240)){for(_=w,T=A,I=S;y=n.distcode[I+((l&(1<<_+T)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,A&64){e.msg="invalid distance code",n.mode=$e;break}n.offset=S,n.extra=A&15,n.mode=Fx;case Fx:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=$e;break}n.mode=Mx;case Mx:if(u===0)break e;if(d=h-u,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=$e;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),m=n.window}else m=i,p=o-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[o++]=m[p++];while(--d);n.length===0&&(n.mode=Sf);break;case Px:if(u===0)break e;i[o++]=n.length,u--,n.mode=Sf;break;case Ep:if(n.wrap){for(;c<32;){if(s===0)break e;s--,l|=r[a++]<<c,c+=8}if(h-=u,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?Xn(n.check,i,h,o-h):vp(n.check,i,h,o-h)),h=u,(n.flags?l:zx(l))!==n.check){e.msg="incorrect data check",n.mode=$e;break}l=0,c=0}n.mode=Lx;case Lx:if(n.wrap&&n.flags){for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=$e;break}l=0,c=0}n.mode=Ox;case Ox:R=QM;break e;case $e:R=dx;break e;case Nx:return px;case JM:default:return ln}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<$e&&(n.mode<Ep||t!==hx))&&$x(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?Xn(n.check,i,h,e.next_out-h):vp(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===mr?128:0)+(n.mode===_f||n.mode===Ap?256:0),(f===0&&h===0||t===hx)&&R===ia&&(R=KM),R}function lP(e){if(!e||!e.state)return ln;var t=e.state;return t.window&&(t.window=null),e.state=null,ia}function uP(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?ln:(n.head=t,t.done=!1,ia)}function cP(e,t){var n=t.length,r,i,a;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==Ef)?ln:r.mode===Ef&&(i=1,i=vp(i,t,n,0),i!==r.check)?dx:(a=$x(e,t,n,n),a?(r.mode=Nx,px):(r.havedict=1,ia))}kn.inflateReset=Gx,kn.inflateReset2=Hx,kn.inflateResetKeep=Ux,kn.inflateInit=aP,kn.inflateInit2=Vx,kn.inflate=sP,kn.inflateEnd=lP,kn.inflateGetHeader=uP,kn.inflateSetDictionary=cP,kn.inflateInfo="pako inflate (from Nodeca project)";var qx={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 fP(){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 hP=fP,ao=kn,Sl=pr,Cf=na,tt=qx,Cp=cp,dP=tx,pP=hP,Wx=Object.prototype.toString;function aa(e){if(!(this instanceof aa))return new aa(e);this.options=Sl.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 dP,this.strm.avail_out=0;var n=ao.inflateInit2(this.strm,t.windowBits);if(n!==tt.Z_OK)throw new Error(Cp[n]);if(this.header=new pP,ao.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Cf.string2buf(t.dictionary):Wx.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ao.inflateSetDictionary(this.strm,t.dictionary),n!==tt.Z_OK)))throw new Error(Cp[n])}aa.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s,u,l,c=!1;if(this.ended)return!1;o=t===~~t?t:t===!0?tt.Z_FINISH:tt.Z_NO_FLUSH,typeof e=="string"?n.input=Cf.binstring2buf(e):Wx.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),a=ao.inflate(n,tt.Z_NO_FLUSH),a===tt.Z_NEED_DICT&&i&&(a=ao.inflateSetDictionary(this.strm,i)),a===tt.Z_BUF_ERROR&&c===!0&&(a=tt.Z_OK,c=!1),a!==tt.Z_STREAM_END&&a!==tt.Z_OK)return this.onEnd(a),this.ended=!0,!1;n.next_out&&(n.avail_out===0||a===tt.Z_STREAM_END||n.avail_in===0&&(o===tt.Z_FINISH||o===tt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Cf.utf8border(n.output,n.next_out),u=n.next_out-s,l=Cf.buf2string(n.output,s),n.next_out=u,n.avail_out=r-u,u&&Sl.arraySet(n.output,n.output,s,u,0),this.onData(l)):this.onData(Sl.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(c=!0)}while((n.avail_in>0||n.avail_out===0)&&a!==tt.Z_STREAM_END);return a===tt.Z_STREAM_END&&(o=tt.Z_FINISH),o===tt.Z_FINISH?(a=ao.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===tt.Z_OK):(o===tt.Z_SYNC_FLUSH&&(this.onEnd(tt.Z_OK),n.avail_out=0),!0)},aa.prototype.onData=function(e){this.chunks.push(e)},aa.prototype.onEnd=function(e){e===tt.Z_OK&&(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 kp(e,t){var n=new aa(t);if(n.push(e,!0),n.err)throw n.msg||Cp[n.err];return n.result}function gP(e,t){return t=t||{},t.raw=!0,kp(e,t)}El.Inflate=aa,El.inflate=kp,El.inflateRaw=gP,El.ungzip=kp;var mP=pr.assign,bP=cl,yP=El,wP=qx,Zx={};mP(Zx,bP,yP,wP);var kf=Zx;async function li(e){try{let t,n=0,r=0;const i=[];let a=0,o;do{const u=e.subarray(n);if(o=new kf.Inflate,{strm:t}=o,o.push(u,kf.Z_SYNC_FLUSH),o.err)throw new Error(o.msg);n+=t.next_in,i[r]=o.result,a+=i[r].length,r+=1}while(t.avail_in);const s=new Uint8Array(a);for(let u=0,l=0;u<i.length;u++)s.set(i[u],l),l+=i[u].length;return me.Buffer.from(s)}catch(t){throw`${t}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function Yx(e,t){try{let n;const{minv:r,maxv:i}=t;let a=r.blockPosition,o=r.dataPosition;const s=[],u=[],l=[];let c=0,f=0;do{const p=e.subarray(a-r.blockPosition),m=new kf.Inflate;if({strm:n}=m,m.push(p,kf.Z_SYNC_FLUSH),m.err)throw new Error(m.msg);const y=m.result;s.push(y);let w=y.length;u.push(a),l.push(o),s.length===1&&r.dataPosition&&(s[0]=s[0].subarray(r.dataPosition),w=s[0].length);const A=a;if(a+=n.next_in,o+=w,A>=i.blockPosition){s[f]=s[f].subarray(0,i.blockPosition===r.blockPosition?i.dataPosition-r.dataPosition+1:i.dataPosition+1),u.push(a),l.push(o),c+=s[f].length;break}c+=s[f].length,f++}while(n.avail_in);const h=new Uint8Array(c);for(let p=0,m=0;p<s.length;p++)h.set(s[p],m),m+=s[p].length;return{buffer:me.Buffer.from(h),cpositions:u,dpositions:l}}catch(n){throw`${n}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):n}}var vP=Le,un=null;try{un=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 Qx={},Xx={};function oa(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=Xx[e],r)?r:(n=Oe(e,(e|0)<0?-1:0,!0),i&&(Xx[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=Qx[e],r)?r:(n=Oe(e,e<0?-1:0,!1),i&&(Qx[e]=n),n))}Le.fromInt=oa;function cn(e,t){if(isNaN(e))return t?sa:fn;if(t){if(e<0)return sa;if(e>=Jx)return iA}else{if(e<=-eA)return Vt;if(e+1>=eA)return rA}return e<0?cn(-e,t).neg():Oe(e%oo|0,e/oo|0,t)}Le.fromNumber=cn;function Oe(e,t,n){return new Le(e,t,n)}Le.fromBits=Oe;var Tf=Math.pow;function Tp(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 Tp(e.substring(1),t,n).neg();for(var i=cn(Tf(n,8)),a=fn,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),u=parseInt(e.substring(o,o+s),n);if(s<8){var l=cn(Tf(n,s));a=a.mul(l).add(cn(u))}else a=a.mul(i),a=a.add(cn(u))}return a.unsigned=t,a}Le.fromString=Tp;function Tn(e,t){return typeof e=="number"?cn(e,t):typeof e=="string"?Tp(e,t):Oe(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Le.fromValue=Tn;var Kx=65536,xP=1<<24,oo=Kx*Kx,Jx=oo*oo,eA=Jx/2,tA=oa(xP),fn=oa(0);Le.ZERO=fn;var sa=oa(0,!0);Le.UZERO=sa;var so=oa(1);Le.ONE=so;var nA=oa(1,!0);Le.UONE=nA;var Ip=oa(-1);Le.NEG_ONE=Ip;var rA=Oe(-1,2147483647,!1);Le.MAX_VALUE=rA;var iA=Oe(-1,-1,!0);Le.MAX_UNSIGNED_VALUE=iA;var Vt=Oe(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)*oo+(this.low>>>0):this.high*oo+(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=cn(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var a=cn(Tf(t,6),this.unsigned),o=this,s="";;){var u=o.div(a),l=o.sub(u.mul(a)).toInt()>>>0,c=l.toString(t);if(o=u,o.isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+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=Tn(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=Tn(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(so)},Y.neg=Y.negate,Y.add=function(t){Ht(t)||(t=Tn(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,a=this.low&65535,o=t.high>>>16,s=t.high&65535,u=t.low>>>16,l=t.low&65535,c=0,f=0,h=0,d=0;return d+=a+l,h+=d>>>16,d&=65535,h+=i+u,f+=h>>>16,h&=65535,f+=r+s,c+=f>>>16,f&=65535,c+=n+o,c&=65535,Oe(h<<16|d,c<<16|f,this.unsigned)},Y.subtract=function(t){return Ht(t)||(t=Tn(t)),this.add(t.neg())},Y.sub=Y.subtract,Y.multiply=function(t){if(this.isZero())return fn;if(Ht(t)||(t=Tn(t)),un){var n=un.mul(this.low,this.high,t.low,t.high);return Oe(n,un.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(tA)&&t.lt(tA))return cn(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,a=this.low>>>16,o=this.low&65535,s=t.high>>>16,u=t.high&65535,l=t.low>>>16,c=t.low&65535,f=0,h=0,d=0,p=0;return p+=o*c,d+=p>>>16,p&=65535,d+=a*c,h+=d>>>16,d&=65535,d+=o*l,h+=d>>>16,d&=65535,h+=i*c,f+=h>>>16,h&=65535,h+=a*l,f+=h>>>16,h&=65535,h+=o*u,f+=h>>>16,h&=65535,f+=r*c+i*l+a*u+o*s,f&=65535,Oe(d<<16|p,f<<16|h,this.unsigned)},Y.mul=Y.multiply,Y.divide=function(t){if(Ht(t)||(t=Tn(t)),t.isZero())throw Error("division by zero");if(un){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?un.div_u:un.div_s)(this.low,this.high,t.low,t.high);return Oe(n,un.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?sa:fn;var r,i,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return sa;if(t.gt(this.shru(1)))return nA;a=sa}else{if(this.eq(Vt)){if(t.eq(so)||t.eq(Ip))return Vt;if(t.eq(Vt))return so;var o=this.shr(1);return r=o.div(t).shl(1),r.eq(fn)?t.isNegative()?so:Ip:(i=this.sub(t.mul(r)),a=r.add(i.div(t)),a)}else if(t.eq(Vt))return this.unsigned?sa: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();a=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),u=s<=48?1:Tf(2,s-48),l=cn(r),c=l.mul(t);c.isNegative()||c.gt(i);)r-=u,l=cn(r,this.unsigned),c=l.mul(t);l.isZero()&&(l=so),a=a.add(l),i=i.sub(c)}return a},Y.div=Y.divide,Y.modulo=function(t){if(Ht(t)||(t=Tn(t)),un){var n=(this.unsigned?un.rem_u:un.rem_s)(this.low,this.high,t.low,t.high);return Oe(n,un.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},Y.mod=Y.modulo,Y.rem=Y.modulo,Y.not=function(){return Oe(~this.low,~this.high,this.unsigned)},Y.and=function(t){return Ht(t)||(t=Tn(t)),Oe(this.low&t.low,this.high&t.high,this.unsigned)},Y.or=function(t){return Ht(t)||(t=Tn(t)),Oe(this.low|t.low,this.high|t.high,this.unsigned)},Y.xor=function(t){return Ht(t)||(t=Tn(t)),Oe(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?Oe(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Oe(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?Oe(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Oe(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 Oe(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?Oe(n,0,this.unsigned):Oe(n>>>t-32,0,this.unsigned)},Y.shru=Y.shiftRightUnsigned,Y.shr_u=Y.shiftRightUnsigned,Y.toSigned=function(){return this.unsigned?Oe(this.low,this.high,!1):this},Y.toUnsigned=function(){return this.unsigned?this:Oe(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 If=ll(vP),Bf=1;class AP{constructor({filehandle:t,path:n}){if(t)this.filehandle=t;else if(n)this.filehandle=new dt(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(t,n=0,r=!0){const i=If.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=me.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=me.Buffer.allocUnsafe(i),await this.filehandle.read(t,0,i,8);for(let a=0;a<n;a+=1){const o=this._readLongWithOverflow(t,a*16),s=this._readLongWithOverflow(t,a*16+8);r[a+1]=[o,s]}return r}async getLastBlock(){const t=await this._getIndex();if(t.length)return t[t.length-1]}async getRelevantBlocksForRead(t,n){const r=n+t;if(t===0)return[];const i=await this._getIndex(),a=[],o=(h,d)=>{const p=h[Bf],m=d?d[Bf]:1/0;return p<=n&&m>n?0:p<n?-1:1};let s=0,u=i.length-1,l=Math.floor(i.length/2),c=o(i[l],i[l+1]);for(;c!==0;)c>0?u=l-1:c<0&&(s=l+1),l=Math.ceil((u-s)/2)+s,c=o(i[l],i[l+1]);a.push(i[l]);let f=l+1;for(;f<i.length&&(a.push(i[f]),!(i[f][Bf]>=r));f+=1);return a[a.length-1][Bf]<r&&a.push([]),a}}class aA{constructor({filehandle:t,path:n,gziFilehandle:r,gziPath:i}){if(t)this.filehandle=t;else if(n)this.filehandle=new dt(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 AP({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=me.Buffer.allocUnsafe(4),{bytesRead:i}=await this.filehandle.read(r,0,4,n-28-4);if(i!==4)throw new Error("read error");const a=r.readUInt32LE(0);return t+a}async _readAndUncompressBlock(t,[n],[r]){let i=r;i||(i=(await this.filehandle.stat()).size);const a=i-n;return await this.filehandle.read(t,0,a,n),await li(t.slice(0,a))}async read(t,n,r,i){const a=await this.gzi.getRelevantBlocksForRead(r,i),o=me.Buffer.allocUnsafe(32768*2);let s=n,u=0;for(let l=0;l<a.length-1;l+=1){const c=await this._readAndUncompressBlock(o,a[l],a[l+1]),[,f]=a[l],h=f>=i?0:i-f,d=Math.min(i+r,f+c.length)-f;h>=0&&h<c.length&&(c.copy(t,s,h,d),s+=d-h,u+=d-h)}return{bytesRead:u,buffer:t}}}function oA(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function EP(e,t){const n=await e.readFile(t);if(!(n&&n.length))throw new Error("No data read from FASTA index (FAI) file");let r=0,i;const a=n.toString("utf8").split(/\r?\n/).filter(o=>/\S/.test(o)).map(o=>o.split(" ")).filter(o=>o[0]!=="").map(o=>((!i||i.name!==o[0])&&(i={name:o[0],id:r},r+=1),{id:i.id,name:o[0],length:+o[1],start:0,end:+o[1],offset:+o[2],lineLength:+o[3],lineBytes:+o[4]}));return{name:Object.fromEntries(a.map(o=>[o.name,o])),id:Object.fromEntries(a.map(o=>[o.id,o]))}}class sA{constructor({fasta:t,fai:n,path:r,faiPath:i,chunkSizeLimit:a=1e6}){if(t)this.fasta=t;else if(r)this.fasta=new dt(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 dt(i);else if(r)this.fai=new dt(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile");this.chunkSizeLimit=a}async _getIndexes(t){return this.indexes||(this.indexes=EP(this.fai,t)),this.indexes}async getSequenceNames(t){return Object.keys((await this._getIndexes(t)).name)}async getSequenceSizes(t){const n={},r=await this._getIndexes(t),i=Object.values(r.id);for(let a=0;a<i.length;a+=1)n[i[a].name]=i[a].length;return n}async getSequenceSize(t,n){var r;return(r=(await this._getIndexes(n)).name[t])===null||r===void 0?void 0:r.length}async hasReferenceSequence(t,n){return!!(await this._getIndexes(n)).name[t]}async getResiduesById(t,n,r,i){const a=(await this._getIndexes(i)).id[t];if(a)return this._fetchFromIndexEntry(a,n,r,i)}async getResiduesByName(t,n,r,i){const a=(await this._getIndexes(i)).name[t];if(a)return this._fetchFromIndexEntry(a,n,r,i)}async getSequence(t,n,r,i){return this.getResiduesByName(t,n,r,i)}async _fetchFromIndexEntry(t,n=0,r,i){let a=r;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((a===void 0||a>t.length)&&(a=t.length),n>=a)return"";const o=oA(t,n),s=oA(t,a)-o;if(s>this.chunkSizeLimit)throw new Error(`data size of ${s.toLocaleString()} bytes exceeded chunk size limit of ${this.chunkSizeLimit.toLocaleString()} bytes`);const u=Buffer.allocUnsafe(s);return await this.fasta.read(u,0,s,o,i),u.toString("utf8").replace(/\s+/g,"")}}class _P extends sA{constructor({fasta:t,path:n,fai:r,faiPath:i,gzi:a,gziPath:o,chunkSizeLimit:s}){super({fasta:t,path:n,fai:r,faiPath:i,chunkSizeLimit:s}),t&&a?this.fasta=new aA({filehandle:t,gziFilehandle:a}):n&&o&&(this.fasta=new aA({path:n,gziPath:o}))}}function lA(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
450
- `),[i,...a]=n.split(" "),o=r.join("").replace(/\s/g,"");return{id:i,description:a.join(" "),sequence:o}})}class SP{constructor({fasta:t,path:n}){if(t)this.fasta=t;else if(n)this.fasta=new dt(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const i=r.toString("utf8");return lA(i)})}async fetch(t,n,r){const a=(await this.data).find(s=>s.id===t),o=r-n;if(!a)throw new Error(`no sequence with id ${t} exists`);return a.sequence.substr(n,o)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const CP=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:_P,FetchableSmallFasta:SP,IndexedFasta:sA,parseSmallFasta:lA},Symbol.toStringTag,{value:"Module"})),Df=BigInt(32);function kP(e,t,n){const r=+!!n,i=+!n;return BigInt(e.getInt32(t,n)*i+e.getInt32(t+4,n)*r)<<Df|BigInt(e.getUint32(t,n)*r+e.getUint32(t+4,n)*i)}function TP(e,t,n){const r=e.getUint32(t,n),i=e.getUint32(t+4,n),a=+!!n,o=+!n;return BigInt(r*o+i*a)<<Df|BigInt(r*a+i*o)}function IP(e,t,n,r){const i=Number(n>>Df),a=Number(n&BigInt(4294967295));r?(e.setInt32(t+4,i,r),e.setUint32(t,a,r)):(e.setInt32(t,i,r),e.setUint32(t+4,a,r))}function BP(e,t,n,r){const i=Number(n>>Df),a=Number(n&BigInt(4294967295));r?(e.setUint32(t+4,i,r),e.setUint32(t,a,r)):(e.setUint32(t,i,r),e.setUint32(t+4,a,r))}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return kP(this,e,t)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(e,t){return TP(this,e,t)}),"setBigInt64"in DataView||(DataView.prototype.setBigInt64=function(e,t,n){IP(this,e,t,n)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,n){BP(this,e,t,n)});class DP{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+`
451
- `}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,la="___parser_",Bn={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},Rf={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"},Ff={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 Mn{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new Mn}primitiveGenerateN(t,n){const r=Rf[t],i=Ff[t];n.pushCode(`${n.generateVariable(this.varName)} = dataView.get${r}(offset, ${i});`),n.pushCode(`offset += ${Bn[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 Bn))throw new Error(`Array element type "${n.type}" is unkown.`);return this.setNextParser("array",t,n)}choice(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n)throw new Error("tag and choices are are required for choice.");if(!n.tag)throw new Error("tag is requird for choice.");if(!n.choices)throw new Error("choices is required for choice.");for(const r in n.choices){const i=parseInt(r,10),a=n.choices[i];if(isNaN(i))throw new Error(`Choice key "${r}" is not a number.`);if(typeof a=="string"&&!In.has(a)&&!(a in Bn))throw new Error(`Choice type "${a}" is unkown.`)}return this.setNextParser("choice",t,n)}nest(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.type)throw new Error("type is required for nest.");if(!(n.type instanceof Mn)&&!In.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof Mn)&&!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 Bn)&&!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 DP(t,this.useContextVariables);return n.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(n),n.pushCode(`return ${la+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 ${la+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(Bn).indexOf(this.type)>=0)t=Bn[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=Bn[this.options.type]:this.options.type instanceof Mn&&(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 Mn;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=(c=0)=>{let f=0;for(let h=c;h<t.bitFields.length;h++){const d=t.bitFields[h].options.length;if(f+d>32)break;f+=d}return f},a=c=>(c<=8?(t.pushCode(`${r} = dataView.getUint8(offset);`),c=8):c<=16?(t.pushCode(`${r} = dataView.getUint16(offset);`),c=16):c<=24?(t.pushCode(`${r} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`),c=24):(t.pushCode(`${r} = dataView.getUint32(offset);`),c=32),t.pushCode(`offset += ${c/8};`),c);let o=0;const s=this.endian==="be";let u=0,l=0;t.bitFields.forEach((c,f)=>{let h=c.options.length;if(h>l){if(l){const m=-1>>>32-l;t.pushCode(`${c.varName} = (${r} & 0x${m.toString(16)}) << ${h-l};`),h-=l}o=0,l=u=a(i(f)-l)}const d=s?u-o-h:o,p=-1>>>32-h;t.pushCode(`${c.varName} ${h<c.options.length?"|=":"="} ${r} >> ${d} & 0x${p.toString(16)};`),c.options.length===32&&t.pushCode(`${c.varName} >>>= 0`),c.options.assert&&c.generateAssert(t),c.options.formatter&&c.generateFormatter(t,c.varName,c.options.formatter),o+=h,l-=h}),t.bitFields=[]}}generateSeek(t){const n=t.generateOption(this.options.length);t.pushCode(`offset += ${n};`)}generateString(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable(),i=this.options.encoding,a=i.toLowerCase()==="hex",o='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){const s=this.options.length;t.pushCode(`var ${r} = offset;`),t.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${r} < ${s});`);const u=`offset - ${r} < ${s} ? offset - 1 : offset`;t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, ${u}), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, ${u}));`)}else if(this.options.length){const s=t.generateOption(this.options.length);t.pushCode(a?`${n} = Array.from(buffer.subarray(offset, offset + ${s}), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(offset, offset + ${s}));`),t.pushCode(`offset += ${s};`)}else this.options.zeroTerminated?(t.pushCode(`var ${r} = offset;`),t.pushCode("while(dataView.getUint8(offset++) !== 0);"),t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, offset - 1), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset - 1));`)):this.options.greedy&&(t.pushCode(`var ${r} = offset;`),t.pushCode("while(buffer.length > offset++);"),t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, offset), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset));`));this.options.stripNull&&t.pushCode(`${n} = ${n}.replace(/\\x00+$/g, '')`)}generateBuffer(t){const n=t.generateVariable(this.varName);if(typeof this.options.readUntil=="function"){const r=this.options.readUntil,i=t.generateTmpVariable(),a=t.generateTmpVariable();t.pushCode(`var ${i} = offset;`),t.pushCode(`var ${a} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${a} = dataView.getUint8(offset);`);const o=t.addImport(r);t.pushCode(`if (${o}.call(${t.generateVariable()}, ${a}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${n} = buffer.subarray(${i}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${n} = buffer.subarray(offset);`);else{const r=t.generateOption(this.options.length);t.pushCode(`${n} = buffer.subarray(offset, offset + ${r});`),t.pushCode(`offset += ${r};`)}this.options.clone&&t.pushCode(`${n} = buffer.constructor.from(${n});`)}generateArray(t){const n=t.generateOption(this.options.length),r=t.generateOption(this.options.lengthInBytes),i=this.options.type,a=t.generateTmpVariable(),o=t.generateVariable(this.varName),s=t.generateTmpVariable(),u=this.options.key,l=typeof u=="string";if(l?t.pushCode(`${o} = {};`):t.pushCode(`${o} = [];`),typeof this.options.readUntil=="function"?t.pushCode("do {"):this.options.readUntil==="eof"?t.pushCode(`for (var ${a} = 0; offset < buffer.length; ${a}++) {`):r!==void 0?t.pushCode(`for (var ${a} = offset + ${r}; offset < ${a}; ) {`):t.pushCode(`for (var ${a} = ${n}; ${a} > 0; ${a}--) {`),typeof i=="string")if(In.get(i)){const c=t.generateTmpVariable();if(t.pushCode(`var ${c} = ${la+i}(offset, {`),t.useContextVariables){const f=t.generateVariable();t.pushCode(`$parent: ${f},`),t.pushCode(`$root: ${f}.$root,`),!this.options.readUntil&&r===void 0&&t.pushCode(`$index: ${n} - ${a},`)}t.pushCode("});"),t.pushCode(`var ${s} = ${c}.result; offset = ${c}.offset;`),i!==this.alias&&t.addReference(i)}else{const c=Rf[i],f=Ff[i];t.pushCode(`var ${s} = dataView.get${c}(offset, ${f});`),t.pushCode(`offset += ${Bn[i]};`)}else if(i instanceof Mn){t.pushCode(`var ${s} = {};`);const c=t.generateVariable();t.pushScope(s),t.useContextVariables&&(t.pushCode(`${s}.$parent = ${c};`),t.pushCode(`${s}.$root = ${c}.$root;`),!this.options.readUntil&&r===void 0&&t.pushCode(`${s}.$index = ${n} - ${a};`)),i.generate(t),t.useContextVariables&&(t.pushCode(`delete ${s}.$parent;`),t.pushCode(`delete ${s}.$root;`),t.pushCode(`delete ${s}.$index;`)),t.popScope()}if(l?t.pushCode(`${o}[${s}.${u}] = ${s};`):t.pushCode(`${o}.push(${s});`),t.pushCode("}"),typeof this.options.readUntil=="function"){const c=this.options.readUntil,f=t.addImport(c);t.pushCode(`while (!${f}.call(${t.generateVariable()}, ${s}, buffer.subarray(offset)));`)}}generateChoiceCase(t,n,r){if(typeof r=="string"){const i=t.generateVariable(this.varName);if(In.has(r)){const a=t.generateTmpVariable();t.pushCode(`var ${a} = ${la+r}(offset, {`),t.useContextVariables&&(t.pushCode(`$parent: ${i}.$parent,`),t.pushCode(`$root: ${i}.$root,`)),t.pushCode("});"),t.pushCode(`${i} = ${a}.result; offset = ${a}.offset;`),r!==this.alias&&t.addReference(r)}else{const a=Rf[r],o=Ff[r];t.pushCode(`${i} = dataView.get${a}(offset, ${o});`),t.pushCode(`offset += ${Bn[r]}`)}}else r instanceof Mn&&(t.pushPath(n),r.generate(t),t.popPath(n))}generateChoice(t){const n=t.generateOption(this.options.tag),r=t.generateVariable(this.varName);if(this.varName&&(t.pushCode(`${r} = {};`),t.useContextVariables)){const i=t.generateVariable();t.pushCode(`${r}.$parent = ${i};`),t.pushCode(`${r}.$root = ${i}.$root;`)}t.pushCode(`switch(${n}) {`);for(const i in this.options.choices){const a=parseInt(i,10),o=this.options.choices[a];t.pushCode(`case ${a}:`),this.generateChoiceCase(t,this.varName,o),t.pushCode("break;")}t.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(t,this.varName,this.options.defaultChoice):t.generateError(`"Met undefined tag value " + ${n} + " at choice"`),t.pushCode("}"),this.varName&&t.useContextVariables&&(t.pushCode(`delete ${r}.$parent;`),t.pushCode(`delete ${r}.$root;`))}generateNest(t){const n=t.generateVariable(this.varName);if(this.options.type instanceof Mn){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} = ${la+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 u=this.options.readUntil,l=t.generateTmpVariable(),c=t.generateTmpVariable();t.pushCode(`var ${l} = offset;`),t.pushCode(`var ${c} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${c} = dataView.getUint8(offset);`);const f=t.addImport(u);t.pushCode(`if (${f}.call(${t.generateVariable()}, ${c}, 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 u=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${u});`),t.pushCode(`offset += ${u};`)}this.options.clone&&t.pushCode(`${r} = buffer.constructor.from(${r});`);const i=t.generateTmpVariable(),a=t.generateTmpVariable(),o=t.generateTmpVariable(),s=t.addImport(this.options.wrapper);if(t.pushCode(`${r} = ${s}.call(this, ${r}).subarray(0);`),t.pushCode(`var ${i} = buffer;`),t.pushCode(`var ${a} = offset;`),t.pushCode(`var ${o} = dataView;`),t.pushCode(`buffer = ${r};`),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof Mn)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 u=t.generateTmpVariable();t.pushCode(`var ${u} = ${la+this.options.type}(0);`),t.pushCode(`${n} = ${u}.result;`),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode(`buffer = ${i};`),t.pushCode(`dataView = ${o};`),t.pushCode(`offset = ${a};`)}generateFormatter(t,n,r){if(typeof r=="function"){const i=t.addImport(r);t.pushCode(`${n} = ${i}.call(${t.generateVariable()}, ${n});`)}}generatePointer(t){const n=this.options.type,r=t.generateOption(this.options.offset),i=t.generateTmpVariable(),a=t.generateVariable(this.varName);if(t.pushCode(`var ${i} = offset;`),t.pushCode(`offset = ${r};`),this.options.type instanceof Mn){if(t.pushCode(`${a} = {};`),t.useContextVariables){const o=t.generateVariable();t.pushCode(`${a}.$parent = ${o};`),t.pushCode(`${a}.$root = ${o}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode(`delete ${a}.$parent;`),t.pushCode(`delete ${a}.$root;`))}else if(In.has(this.options.type)){const o=t.generateTmpVariable();if(t.pushCode(`var ${o} = ${la+this.options.type}(offset, {`),t.useContextVariables){const s=t.generateVariable();t.pushCode(`$parent: ${s},`),t.pushCode(`$root: ${s}.$root,`)}t.pushCode("});"),t.pushCode(`${a} = ${o}.result; offset = ${o}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(Bn).indexOf(this.options.type)>=0){const o=Rf[n],s=Ff[n];t.pushCode(`${a} = dataView.get${o}(offset, ${s});`),t.pushCode(`offset += ${Bn[n]};`)}t.pushCode(`offset = ${i};`)}generateSaveOffset(t){const n=t.generateVariable(this.varName);t.pushCode(`${n} = offset`)}};var uA={},Bp={},ua={},Cl={};Object.defineProperty(Cl,"__esModule",{value:!0});function Dp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cA(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 Rp(e,t,n){return t&&cA(e.prototype,t),n&&cA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function RP(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&&Fp(e,t)}function lo(e){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lo(e)}function Fp(e,t){return Fp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Fp(e,t)}function FP(){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 kl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MP(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 kl(e)}function PP(e){var t=FP();return function(){var r=lo(e),i;if(t){var a=lo(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return MP(this,i)}}function LP(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=lo(e),e!==null););return e}function Mf(){return typeof Reflect<"u"&&Reflect.get?Mf=Reflect.get.bind():Mf=function(t,n,r){var i=LP(t,n);if(i){var a=Object.getOwnPropertyDescriptor(i,n);return a.get?a.get.call(arguments.length<3?t:r):a.value}},Mf.apply(this,arguments)}var fA=function(){function e(){Dp(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return Rp(e,[{key:"addEventListener",value:function(n,r,i){n in this.listeners||(this.listeners[n]=[]),this.listeners[n].push({callback:r,options:i})}},{key:"removeEventListener",value:function(n,r){if(n in this.listeners){for(var i=this.listeners[n],a=0,o=i.length;a<o;a++)if(i[a].callback===r){i.splice(a,1);return}}}},{key:"dispatchEvent",value:function(n){if(n.type in this.listeners){for(var r=this.listeners[n.type],i=r.slice(),a=0,o=i.length;a<o;a++){var s=i[a];try{s.callback.call(this,n)}catch(u){Promise.resolve().then(function(){throw u})}s.options&&s.options.once&&this.removeEventListener(n.type,s.callback)}return!n.defaultPrevented}}}]),e}(),Mp=function(e){RP(n,e);var t=PP(n);function n(){var r;return Dp(this,n),r=t.call(this),r.listeners||fA.call(kl(r)),Object.defineProperty(kl(r),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(kl(r),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(kl(r),"reason",{value:void 0,writable:!0,configurable:!0}),r}return Rp(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)),Mf(lo(n.prototype),"dispatchEvent",this).call(this,i)}}]),n}(fA),hA=function(){function e(){Dp(this,e),Object.defineProperty(this,"signal",{value:new Mp,writable:!0,configurable:!0})}return Rp(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&&(hA.prototype[Symbol.toStringTag]="AbortController",Mp.prototype[Symbol.toStringTag]="AbortSignal");function OP(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 NP(e){typeof e=="function"&&(e={fetch:e});var t=e,n=t.fetch,r=t.Request,i=r===void 0?n.Request:r,a=t.AbortController,o=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,s=o===void 0?!1:o;if(!OP({fetch:n,Request:i,AbortController:a,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:n,Request:u};var u=i;(u&&!u.prototype.hasOwnProperty("signal")||s)&&(u=function(h,d){var p;d&&d.signal&&(p=d.signal,delete d.signal);var m=new i(h,d);return p&&Object.defineProperty(m,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),m},u.prototype=i.prototype);var l=n,c=function(h,d){var p=u&&u.prototype.isPrototypeOf(h)?h.signal:d?d.signal:void 0;if(p){var m;try{m=new DOMException("Aborted","AbortError")}catch{m=new Error("Aborted"),m.name="AbortError"}if(p.aborted)return Promise.reject(m);var y=new Promise(function(w,A){p.addEventListener("abort",function(){return A(m)},{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([y,l(h,d)])}return l(h,d)};return{fetch:c,Request:u}}Cl.AbortController=hA,Cl.AbortSignal=Mp,Cl.abortableFetch=NP,Object.defineProperty(ua,"__esModule",{value:!0}),ua.AbortSignal=ua.AbortController=void 0;const dA=Cl;var Pf=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 zP=typeof Pf().AbortController>"u"?dA.AbortController:Pf().AbortController;ua.AbortController=zP;let UP=typeof Pf().AbortController>"u"?dA.AbortSignal:Pf().AbortSignal;ua.AbortSignal=UP;var Pp={};Object.defineProperty(Pp,"__esModule",{value:!0});const GP=ua;class HP{}class VP{constructor(){this.signals=new Set,this.abortController=new GP.AbortController}addSignal(t=new HP){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()}}Pp.default=VP;var Lp={};Object.defineProperty(Lp,"__esModule",{value:!0});class jP{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)})}}Lp.default=jP;var pA=cf&&cf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bp,"__esModule",{value:!0});const $P=ua,qP=pA(Pp),WP=pA(Lp);class Lf{constructor({fill:t,cache:n}){if(typeof t!="function")throw new TypeError("must pass a fill function");if(typeof n!="object")throw new TypeError("must pass a cache object");if(typeof n.get!="function"||typeof n.set!="function"||typeof n.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=n,this.fillCallback=t}static isAbortException(t){return t.name==="AbortError"||t.code==="ERR_ABORTED"||t.message==="AbortError: aborted"||t.message==="Error: aborted"}evict(t,n){this.cache.get(t)===n&&this.cache.delete(t)}fill(t,n,r,i){const a=new qP.default,o=new WP.default;o.addCallback(i);const s={aborter:a,promise:this.fillCallback(n,a.signal,u=>{o.callback(u)}),settled:!1,statusReporter:o,get aborted(){return this.aborter.signal.aborted}};s.aborter.addSignal(r),s.aborter.signal.addEventListener("abort",()=>{s.settled||this.evict(t,s)}),s.promise.then(()=>{s.settled=!0},()=>{s.settled=!0,this.evict(t,s)}).catch(u=>{throw console.error(u),u}),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 $P.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const a=this.cache.get(t);return a?a.aborted&&!a.settled?(this.evict(t,a),this.get(t,n,r,i)):a.settled?a.promise:(a.aborter.addSignal(r),a.statusReporter.addCallback(i),Lf.checkSinglePromise(a.promise,r)):(this.fill(t,n,r,i),Lf.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}}Bp.default=Lf;var ZP=cf&&cf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(uA,"__esModule",{value:!0});const YP=ZP(Bp);var Of=uA.default=YP.default;class QP{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 XP=QP;const Nf=ll(XP);class ui{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 ui(t.min,t.max))}toString(){return this.ranges.map(t=>`[${t.min}-${t.max}]`).join(",")}union(t){const n=this.getRanges().concat(t.getRanges()).sort(this.rangeOrder),r=[];let i=n[0];for(let a=1;a<n.length;a+=1){const o=n[a];o.min()>i.max()+1?(r.push(i),i=o):o.max()>i.max()&&(i=new ui(i.min(),o.max()))}return r.push(i),r.length===1?r[0]:new ui(r)}intersection(t){let n=this,r=t;const i=this.ranges(),a=r.ranges(),o=i.length,s=a.length;let u=0,l=0;const c=[];for(;u<o&&l<s;){n=i[u],r=a[l];const f=Math.max(n.min(),r.min()),h=Math.min(n.max(),r.max());h>=f&&c.push(new ui(f,h)),n.max()>r.max()?l+=1:u+=1}if(c.length===0)throw new Error("found range of length 0");return c.length===1?c[0]:new ui(c)}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 KP=4,gA=0,mA=1,JP=2;function uo(e){let t=e.length;for(;--t>=0;)e[t]=0}const eL=0,bA=1,tL=2,nL=3,rL=258,Op=29,Tl=256,Il=Tl+1+Op,co=30,Np=19,yA=2*Il+1,ca=15,zp=16,iL=7,Up=256,wA=16,vA=17,xA=18,Gp=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]),zf=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]),aL=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),AA=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),oL=512,br=new Array((Il+2)*2);uo(br);const Bl=new Array(co*2);uo(Bl);const Dl=new Array(oL);uo(Dl);const Rl=new Array(rL-nL+1);uo(Rl);const Hp=new Array(Op);uo(Hp);const Uf=new Array(co);uo(Uf);function Vp(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 EA,_A,SA;function jp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const CA=e=>e<256?Dl[e]:Dl[256+(e>>>7)],Fl=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},jt=(e,t,n)=>{e.bi_valid>zp-n?(e.bi_buf|=t<<e.bi_valid&65535,Fl(e,e.bi_buf),e.bi_buf=t>>zp-e.bi_valid,e.bi_valid+=n-zp):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},Kn=(e,t,n)=>{jt(e,n[t*2],n[t*2+1])},kA=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},sL=e=>{e.bi_valid===16?(Fl(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)},lL=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length;let l,c,f,h,d,p,m=0;for(h=0;h<=ca;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<yA;l++)c=e.heap[l],h=n[n[c*2+1]*2+1]+1,h>u&&(h=u,m++),n[c*2+1]=h,!(c>r)&&(e.bl_count[h]++,d=0,c>=s&&(d=o[c-s]),p=n[c*2],e.opt_len+=p*(h+d),a&&(e.static_len+=p*(i[c*2+1]+d)));if(m!==0){do{for(h=u-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(h=u;h!==0;h--)for(c=e.bl_count[h];c!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),c--)}},TA=(e,t,n)=>{const r=new Array(ca+1);let i=0,a,o;for(a=1;a<=ca;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let s=e[o*2+1];s!==0&&(e[o*2]=kA(r[s]++,s))}},uL=()=>{let e,t,n,r,i;const a=new Array(ca+1);for(n=0,r=0;r<Op-1;r++)for(Hp[r]=n,e=0;e<1<<Gp[r];e++)Rl[n++]=r;for(Rl[n-1]=r,i=0,r=0;r<16;r++)for(Uf[r]=i,e=0;e<1<<zf[r];e++)Dl[i++]=r;for(i>>=7;r<co;r++)for(Uf[r]=i<<7,e=0;e<1<<zf[r]-7;e++)Dl[256+i++]=r;for(t=0;t<=ca;t++)a[t]=0;for(e=0;e<=143;)br[e*2+1]=8,e++,a[8]++;for(;e<=255;)br[e*2+1]=9,e++,a[9]++;for(;e<=279;)br[e*2+1]=7,e++,a[7]++;for(;e<=287;)br[e*2+1]=8,e++,a[8]++;for(TA(br,Il+1,a),e=0;e<co;e++)Bl[e*2+1]=5,Bl[e*2]=kA(e,5);EA=new Vp(br,Gp,Tl+1,Il,ca),_A=new Vp(Bl,zf,0,co,ca),SA=new Vp(new Array(0),aL,0,Np,iL)},IA=e=>{let t;for(t=0;t<Il;t++)e.dyn_ltree[t*2]=0;for(t=0;t<co;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Np;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Up*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},BA=e=>{e.bi_valid>8?Fl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},DA=(e,t,n,r)=>{const i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},$p=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&DA(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!DA(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},RA=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?Kn(e,i,t):(o=Rl[i],Kn(e,o+Tl+1,t),s=Gp[o],s!==0&&(i-=Hp[o],jt(e,i,s)),r--,o=CA(r),Kn(e,o,n),s=zf[o],s!==0&&(r-=Uf[o],jt(e,r,s)));while(a<e.sym_next);Kn(e,Up,t)},qp=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems;let o,s,u=-1,l;for(e.heap_len=0,e.heap_max=yA,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=u,o=e.heap_len>>1;o>=1;o--)$p(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],$p(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,$p(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],lL(e,t),TA(n,u,e.bl_count)},FA=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<u&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[wA*2]++):s<=10?e.bl_tree[vA*2]++:e.bl_tree[xA*2]++,s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4))},MA=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<u&&a===o)){if(s<l)do Kn(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Kn(e,a,e.bl_tree),s--),Kn(e,wA,e.bl_tree),jt(e,s-3,2)):s<=10?(Kn(e,vA,e.bl_tree),jt(e,s-3,3)):(Kn(e,xA,e.bl_tree),jt(e,s-11,7));s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4)}},cL=e=>{let t;for(FA(e,e.dyn_ltree,e.l_desc.max_code),FA(e,e.dyn_dtree,e.d_desc.max_code),qp(e,e.bl_desc),t=Np-1;t>=3&&e.bl_tree[AA[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},fL=(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[AA[i]*2+1],3);MA(e,e.dyn_ltree,t-1),MA(e,e.dyn_dtree,n-1)},hL=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return gA;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return mA;for(n=32;n<Tl;n++)if(e.dyn_ltree[n*2]!==0)return mA;return gA};let PA=!1;const dL=e=>{PA||(uL(),PA=!0),e.l_desc=new jp(e.dyn_ltree,EA),e.d_desc=new jp(e.dyn_dtree,_A),e.bl_desc=new jp(e.bl_tree,SA),e.bi_buf=0,e.bi_valid=0,IA(e)},LA=(e,t,n,r)=>{jt(e,(eL<<1)+(r?1:0),3),BA(e),Fl(e,n),Fl(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},pL=e=>{jt(e,bA<<1,3),Kn(e,Up,br),sL(e)},gL=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===JP&&(e.strm.data_type=hL(e)),qp(e,e.l_desc),qp(e,e.d_desc),o=cL(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?LA(e,t,n,r):e.strategy===KP||a===i?(jt(e,(bA<<1)+(r?1:0),3),RA(e,br,Bl)):(jt(e,(tL<<1)+(r?1:0),3),fL(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),RA(e,e.dyn_ltree,e.dyn_dtree)),IA(e),r&&BA(e)},mL=(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[(Rl[n]+Tl+1)*2]++,e.dyn_dtree[CA(t)*2]++),e.sym_next===e.sym_end);var bL=dL,yL=LA,wL=gL,vL=mL,xL=pL,AL={_tr_init:bL,_tr_stored_block:yL,_tr_flush_block:wL,_tr_tally:vL,_tr_align:xL},Ml=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};const EL=()=>{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},_L=new Uint32Array(EL());var pt=(e,t,n,r)=>{const i=_L,a=r+n;e^=-1;for(let o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1},fo={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:SL,_tr_stored_block:Wp,_tr_flush_block:CL,_tr_tally:ci,_tr_align:kL}=AL,{Z_NO_FLUSH:fi,Z_PARTIAL_FLUSH:TL,Z_FULL_FLUSH:IL,Z_FINISH:hn,Z_BLOCK:OA,Z_OK:vt,Z_STREAM_END:NA,Z_STREAM_ERROR:Jn,Z_DATA_ERROR:BL,Z_BUF_ERROR:Zp,Z_DEFAULT_COMPRESSION:DL,Z_FILTERED:RL,Z_HUFFMAN_ONLY:Gf,Z_RLE:FL,Z_FIXED:ML,Z_DEFAULT_STRATEGY:PL,Z_UNKNOWN:LL,Z_DEFLATED:Hf}=Pl,OL=9,NL=15,zL=8,UL=29,Yp=256+1+UL,GL=30,HL=19,VL=2*Yp+1,jL=15,pe=3,hi=258,er=hi+pe+1,$L=32,ho=42,Qp=57,Xp=69,Kp=73,Jp=91,eg=103,fa=113,Ll=666,Ft=1,po=2,ha=3,go=4,qL=3,da=(e,t)=>(e.msg=fo[t],t),zA=e=>e*2-(e>4?9:0),di=e=>{let t=e.length;for(;--t>=0;)e[t]=0},WL=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 pi=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const Xt=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)=>{CL(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Xt(e.strm)},Ae=(e,t)=>{e.pending_buf[e.pending++]=t},Ol=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},tg=(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=Ml(e.adler,t,i,n):e.state.wrap===2&&(e.adler=pt(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},UA=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match;const u=e.strstart>e.w_size-er?e.strstart-(e.w_size-er):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+hi;let d=l[r+o-1],p=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+o]!==p||l[i+o-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(a=hi-(h-r),r=h-hi,a>o){if(e.match_start=t,o=a,a>=s)break;d=l[r+o-1],p=l[r+o]}}while((t=f[t&c])>u&&--n!==0);return o<=e.lookahead?o:e.lookahead},mo=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-er)&&(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),WL(e),r+=t),e.strm.avail_in===0)break;if(n=tg(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=pe)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=pi(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=pi(e,e.ins_h,e.window[i+pe-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<pe)););}while(e.lookahead<er&&e.strm.avail_in!==0)},GA=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==hn||t===fi||r!==i+e.strm.avail_in)))break;o=t===hn&&r===i+e.strm.avail_in?1:0,Wp(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Xt(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&&(tg(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?go:t!==fi&&t!==hn&&e.strm.avail_in===0&&e.strstart===e.block_start?po:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(tg(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===hn)&&t!==fi&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=t===hn&&e.strm.avail_in===0&&r===i?1:0,Wp(e,e.block_start,r,o),e.block_start+=r,Xt(e.strm)),o?ha:Ft)},ng=(e,t)=>{let n,r;for(;;){if(e.lookahead<er){if(mo(e),e.lookahead<er&&t===fi)return Ft;if(e.lookahead===0)break}if(n=0,e.lookahead>=pe&&(e.ins_h=pi(e,e.ins_h,e.window[e.strstart+pe-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-er&&(e.match_length=UA(e,n)),e.match_length>=pe)if(r=ci(e,e.strstart-e.match_start,e.match_length-pe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=pe){e.match_length--;do e.strstart++,e.ins_h=pi(e,e.ins_h,e.window[e.strstart+pe-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=pi(e,e.ins_h,e.window[e.strstart+1]);else r=ci(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Kt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=e.strstart<pe-1?e.strstart:pe-1,t===hn?(Kt(e,!0),e.strm.avail_out===0?ha:go):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?Ft:po},bo=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<er){if(mo(e),e.lookahead<er&&t===fi)return Ft;if(e.lookahead===0)break}if(n=0,e.lookahead>=pe&&(e.ins_h=pi(e,e.ins_h,e.window[e.strstart+pe-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=pe-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-er&&(e.match_length=UA(e,n),e.match_length<=5&&(e.strategy===RL||e.match_length===pe&&e.strstart-e.match_start>4096)&&(e.match_length=pe-1)),e.prev_length>=pe&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-pe,r=ci(e,e.strstart-1-e.prev_match,e.prev_length-pe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=pi(e,e.ins_h,e.window[e.strstart+pe-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=pe-1,e.strstart++,r&&(Kt(e,!1),e.strm.avail_out===0))return Ft}else if(e.match_available){if(r=ci(e,0,e.window[e.strstart-1]),r&&Kt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ft}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=ci(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<pe-1?e.strstart:pe-1,t===hn?(Kt(e,!0),e.strm.avail_out===0?ha:go):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?Ft:po},ZL=(e,t)=>{let n,r,i,a;const o=e.window;for(;;){if(e.lookahead<=hi){if(mo(e),e.lookahead<=hi&&t===fi)return Ft;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=pe&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+hi;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=hi-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=pe?(n=ci(e,1,e.match_length-pe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=ci(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Kt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=0,t===hn?(Kt(e,!0),e.strm.avail_out===0?ha:go):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?Ft:po},YL=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(mo(e),e.lookahead===0)){if(t===fi)return Ft;break}if(e.match_length=0,n=ci(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Kt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=0,t===hn?(Kt(e,!0),e.strm.avail_out===0?ha:go):e.sym_next&&(Kt(e,!1),e.strm.avail_out===0)?Ft:po};function tr(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 Nl=[new tr(0,0,0,0,GA),new tr(4,4,8,4,ng),new tr(4,5,16,8,ng),new tr(4,6,32,32,ng),new tr(4,4,16,16,bo),new tr(8,16,32,32,bo),new tr(8,16,128,128,bo),new tr(8,32,128,256,bo),new tr(32,128,258,1024,bo),new tr(32,258,258,4096,bo)],QL=e=>{e.window_size=2*e.w_size,di(e.head),e.max_lazy_match=Nl[e.level].max_lazy,e.good_match=Nl[e.level].good_length,e.nice_match=Nl[e.level].nice_length,e.max_chain_length=Nl[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=pe-1,e.match_available=0,e.ins_h=0};function XL(){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=Hf,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(VL*2),this.dyn_dtree=new Uint16Array((2*GL+1)*2),this.bl_tree=new Uint16Array((2*HL+1)*2),di(this.dyn_ltree),di(this.dyn_dtree),di(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(jL+1),this.heap=new Uint16Array(2*Yp+1),di(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Yp+1),di(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 zl=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ho&&t.status!==Qp&&t.status!==Xp&&t.status!==Kp&&t.status!==Jp&&t.status!==eg&&t.status!==fa&&t.status!==Ll?1:0},HA=e=>{if(zl(e))return da(e,Jn);e.total_in=e.total_out=0,e.data_type=LL;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Qp:t.wrap?ho:fa,e.adler=t.wrap===2?0:1,t.last_flush=-2,SL(t),vt},VA=e=>{const t=HA(e);return t===vt&&QL(e.state),t},KL=(e,t)=>zl(e)||e.state.wrap!==2?Jn:(e.state.gzhead=t,vt),jA=(e,t,n,r,i,a)=>{if(!e)return Jn;let o=1;if(t===DL&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>OL||n!==Hf||r<8||r>15||t<0||t>9||a<0||a>ML||r===8&&o!==1)return da(e,Jn);r===8&&(r=9);const s=new XL;return e.state=s,s.strm=e,s.status=ho,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+pe-1)/pe),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=a,s.method=n,VA(e)},JL=(e,t)=>jA(e,t,Hf,NL,zL,PL),eO=(e,t)=>{if(zl(e)||t>OA||t<0)return e?da(e,Jn):Jn;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Ll&&t!==hn)return da(e,e.avail_out===0?Zp:Jn);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Xt(e),e.avail_out===0)return n.last_flush=-1,vt}else if(e.avail_in===0&&zA(t)<=zA(r)&&t!==hn)return da(e,Zp);if(n.status===Ll&&e.avail_in!==0)return da(e,Zp);if(n.status===ho&&n.wrap===0&&(n.status=fa),n.status===ho){let i=Hf+(n.w_bits-8<<4)<<8,a=-1;if(n.strategy>=Gf||n.level<2?a=0:n.level<6?a=1:n.level===6?a=2:a=3,i|=a<<6,n.strstart!==0&&(i|=$L),i+=31-i%31,Ol(n,i),n.strstart!==0&&(Ol(n,e.adler>>>16),Ol(n,e.adler&65535)),e.adler=1,n.status=fa,Xt(e),n.pending!==0)return n.last_flush=-1,vt}if(n.status===Qp){if(e.adler=0,Ae(n,31),Ae(n,139),Ae(n,8),n.gzhead)Ae(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)),Ae(n,n.gzhead.time&255),Ae(n,n.gzhead.time>>8&255),Ae(n,n.gzhead.time>>16&255),Ae(n,n.gzhead.time>>24&255),Ae(n,n.level===9?2:n.strategy>=Gf||n.level<2?4:0),Ae(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Ae(n,n.gzhead.extra.length&255),Ae(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=pt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Xp;else if(Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,n.level===9?2:n.strategy>=Gf||n.level<2?4:0),Ae(n,qL),n.status=fa,Xt(e),n.pending!==0)return n.last_flush=-1,vt}if(n.status===Xp){if(n.gzhead.extra){let i=n.pending,a=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+a>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,Xt(e),n.pending!==0)return n.last_flush=-1,vt;i=0,a-=s}let o=new Uint8Array(n.gzhead.extra);n.pending_buf.set(o.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Kp}if(n.status===Kp){if(n.gzhead.name){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),Xt(e),n.pending!==0)return n.last_flush=-1,vt;i=0}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,Ae(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Jp}if(n.status===Jp){if(n.gzhead.comment){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),Xt(e),n.pending!==0)return n.last_flush=-1,vt;i=0}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,Ae(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i))}n.status=eg}if(n.status===eg){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Xt(e),n.pending!==0))return n.last_flush=-1,vt;Ae(n,e.adler&255),Ae(n,e.adler>>8&255),e.adler=0}if(n.status=fa,Xt(e),n.pending!==0)return n.last_flush=-1,vt}if(e.avail_in!==0||n.lookahead!==0||t!==fi&&n.status!==Ll){let i=n.level===0?GA(n,t):n.strategy===Gf?YL(n,t):n.strategy===FL?ZL(n,t):Nl[n.level].func(n,t);if((i===ha||i===go)&&(n.status=Ll),i===Ft||i===ha)return e.avail_out===0&&(n.last_flush=-1),vt;if(i===po&&(t===TL?kL(n):t!==OA&&(Wp(n,0,0,!1),t===IL&&(di(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Xt(e),e.avail_out===0))return n.last_flush=-1,vt}return t!==hn?vt:n.wrap<=0?NA:(n.wrap===2?(Ae(n,e.adler&255),Ae(n,e.adler>>8&255),Ae(n,e.adler>>16&255),Ae(n,e.adler>>24&255),Ae(n,e.total_in&255),Ae(n,e.total_in>>8&255),Ae(n,e.total_in>>16&255),Ae(n,e.total_in>>24&255)):(Ol(n,e.adler>>>16),Ol(n,e.adler&65535)),Xt(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?vt:NA)},tO=e=>{if(zl(e))return Jn;const t=e.state.status;return e.state=null,t===fa?da(e,BL):vt},nO=(e,t)=>{let n=t.length;if(zl(e))return Jn;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==ho||r.lookahead)return Jn;if(i===1&&(e.adler=Ml(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(di(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(t.subarray(n-r.w_size,n),0),t=u,n=r.w_size}const a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,mo(r);r.lookahead>=pe;){let u=r.strstart,l=r.lookahead-(pe-1);do r.ins_h=pi(r,r.ins_h,r.window[u+pe-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--l);r.strstart=u,r.lookahead=pe-1,mo(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=pe-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,vt};var rO=JL,iO=jA,aO=VA,oO=HA,sO=KL,lO=eO,uO=tO,cO=nO,fO="pako deflate (from Nodeca project)",Ul={deflateInit:rO,deflateInit2:iO,deflateReset:aO,deflateResetKeep:oO,deflateSetHeader:sO,deflate:lO,deflateEnd:uO,deflateSetDictionary:cO,deflateInfo:fO};const hO=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var dO=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)hO(n,r)&&(e[r]=n[r])}}return e},pO=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,a=e.length;r<a;r++){let o=e[r];n.set(o,i),i+=o.length}return n},Vf={assign:dO,flattenChunks:pO};let $A=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{$A=!1}const Gl=new Uint8Array(256);for(let e=0;e<256;e++)Gl[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Gl[254]=Gl[254]=1;var gO=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};const mO=(e,t)=>{if(t<65534&&e.subarray&&$A)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 bO=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const a=new Array(n*2);for(i=0,r=0;r<n;){let o=e[r++];if(o<128){a[i++]=o;continue}let s=Gl[o];if(s>4){a[i++]=65533,r+=s-1;continue}for(o&=s===2?31:s===3?15:7;s>1&&r<n;)o=o<<6|e[r++]&63,s--;if(s>1){a[i++]=65533;continue}o<65536?a[i++]=o:(o-=65536,a[i++]=55296|o>>10&1023,a[i++]=56320|o&1023)}return mO(a,i)},yO=(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+Gl[e[n]]>t?n:t},Hl={string2buf:gO,buf2string:bO,utf8border:yO};function wO(){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 qA=wO;const WA=Object.prototype.toString,{Z_NO_FLUSH:vO,Z_SYNC_FLUSH:xO,Z_FULL_FLUSH:AO,Z_FINISH:EO,Z_OK:jf,Z_STREAM_END:_O,Z_DEFAULT_COMPRESSION:SO,Z_DEFAULT_STRATEGY:CO,Z_DEFLATED:kO}=Pl;function rg(e){this.options=Vf.assign({level:SO,method:kO,chunkSize:16384,windowBits:15,memLevel:8,strategy:CO},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 qA,this.strm.avail_out=0;let n=Ul.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==jf)throw new Error(fo[n]);if(t.header&&Ul.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=Hl.string2buf(t.dictionary):WA.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Ul.deflateSetDictionary(this.strm,r),n!==jf)throw new Error(fo[n]);this._dict_set=!0}}rg.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,a;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?EO:vO,typeof e=="string"?n.input=Hl.string2buf(e):WA.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===xO||a===AO)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Ul.deflate(n,a),i===_O)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Ul.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===jf;if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0},rg.prototype.onData=function(e){this.chunks.push(e)},rg.prototype.onEnd=function(e){e===jf&&(this.result=Vf.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const $f=16209,TO=16191;var IO=function(t,n){let r,i,a,o,s,u,l,c,f,h,d,p,m,y,w,A,S,_,T,I,B,R,M,G;const N=t.state;r=t.next_in,M=t.input,i=r+(t.avail_in-5),a=t.next_out,G=t.output,o=a-(n-t.avail_out),s=a+(t.avail_out-257),u=N.dmax,l=N.wsize,c=N.whave,f=N.wnext,h=N.window,d=N.hold,p=N.bits,m=N.lencode,y=N.distcode,w=(1<<N.lenbits)-1,A=(1<<N.distbits)-1;e:do{p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),S=m[d&w];t:for(;;){if(_=S>>>24,d>>>=_,p-=_,_=S>>>16&255,_===0)G[a++]=S&65535;else if(_&16){T=S&65535,_&=15,_&&(p<_&&(d+=M[r++]<<p,p+=8),T+=d&(1<<_)-1,d>>>=_,p-=_),p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),S=y[d&A];n:for(;;){if(_=S>>>24,d>>>=_,p-=_,_=S>>>16&255,_&16){if(I=S&65535,_&=15,p<_&&(d+=M[r++]<<p,p+=8,p<_&&(d+=M[r++]<<p,p+=8)),I+=d&(1<<_)-1,I>u){t.msg="invalid distance too far back",N.mode=$f;break e}if(d>>>=_,p-=_,_=a-o,I>_){if(_=I-_,_>c&&N.sane){t.msg="invalid distance too far back",N.mode=$f;break e}if(B=0,R=h,f===0){if(B+=l-_,_<T){T-=_;do G[a++]=h[B++];while(--_);B=a-I,R=G}}else if(f<_){if(B+=l+f-_,_-=f,_<T){T-=_;do G[a++]=h[B++];while(--_);if(B=0,f<T){_=f,T-=_;do G[a++]=h[B++];while(--_);B=a-I,R=G}}}else if(B+=f-_,_<T){T-=_;do G[a++]=h[B++];while(--_);B=a-I,R=G}for(;T>2;)G[a++]=R[B++],G[a++]=R[B++],G[a++]=R[B++],T-=3;T&&(G[a++]=R[B++],T>1&&(G[a++]=R[B++]))}else{B=a-I;do G[a++]=G[B++],G[a++]=G[B++],G[a++]=G[B++],T-=3;while(T>2);T&&(G[a++]=G[B++],T>1&&(G[a++]=G[B++]))}}else if(_&64){t.msg="invalid distance code",N.mode=$f;break e}else{S=y[(S&65535)+(d&(1<<_)-1)];continue n}break}}else if(_&64)if(_&32){N.mode=TO;break e}else{t.msg="invalid literal/length code",N.mode=$f;break e}else{S=m[(S&65535)+(d&(1<<_)-1)];continue t}break}}while(r<i&&a<s);T=p>>3,r-=T,p-=T<<3,d&=(1<<p)-1,t.next_in=r,t.next_out=a,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=a<s?257+(s-a):257-(a-s),N.hold=d,N.bits=p};const yo=15,ZA=852,YA=592,QA=0,ig=1,XA=2,BO=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]),DO=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]),RO=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]),FO=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 Vl=(e,t,n,r,i,a,o,s)=>{const u=s.bits;let l=0,c=0,f=0,h=0,d=0,p=0,m=0,y=0,w=0,A=0,S,_,T,I,B,R=null,M;const G=new Uint16Array(yo+1),N=new Uint16Array(yo+1);let re=null,se,te,ge;for(l=0;l<=yo;l++)G[l]=0;for(c=0;c<r;c++)G[t[n+c]]++;for(d=u,h=yo;h>=1&&G[h]===0;h--);if(d>h&&(d=h),h===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,s.bits=1,0;for(f=1;f<h&&G[f]===0;f++);for(d<f&&(d=f),y=1,l=1;l<=yo;l++)if(y<<=1,y-=G[l],y<0)return-1;if(y>0&&(e===QA||h!==1))return-1;for(N[1]=0,l=1;l<yo;l++)N[l+1]=N[l]+G[l];for(c=0;c<r;c++)t[n+c]!==0&&(o[N[t[n+c]]++]=c);if(e===QA?(R=re=o,M=20):e===ig?(R=BO,re=DO,M=257):(R=RO,re=FO,M=0),A=0,c=0,l=f,B=a,p=d,m=0,T=-1,w=1<<d,I=w-1,e===ig&&w>ZA||e===XA&&w>YA)return 1;for(;;){se=l-m,o[c]+1<M?(te=0,ge=o[c]):o[c]>=M?(te=re[o[c]-M],ge=R[o[c]-M]):(te=32+64,ge=0),S=1<<l-m,_=1<<p,f=_;do _-=S,i[B+(A>>m)+_]=se<<24|te<<16|ge|0;while(_!==0);for(S=1<<l-1;A&S;)S>>=1;if(S!==0?(A&=S-1,A+=S):A=0,c++,--G[l]===0){if(l===h)break;l=t[n+o[c]]}if(l>d&&(A&I)!==T){for(m===0&&(m=d),B+=f,p=l-m,y=1<<p;p+m<h&&(y-=G[p+m],!(y<=0));)p++,y<<=1;if(w+=1<<p,e===ig&&w>ZA||e===XA&&w>YA)return 1;T=A&I,i[T]=d<<24|p<<16|B-a|0}}return A!==0&&(i[B+A]=l-m<<24|64<<16|0),s.bits=d,0};const MO=0,KA=1,JA=2,{Z_FINISH:e3,Z_BLOCK:PO,Z_TREES:qf,Z_OK:pa,Z_STREAM_END:LO,Z_NEED_DICT:OO,Z_STREAM_ERROR:dn,Z_DATA_ERROR:t3,Z_MEM_ERROR:n3,Z_BUF_ERROR:NO,Z_DEFLATED:r3}=Pl,Wf=16180,i3=16181,a3=16182,o3=16183,s3=16184,l3=16185,u3=16186,c3=16187,f3=16188,h3=16189,Zf=16190,yr=16191,ag=16192,d3=16193,og=16194,p3=16195,g3=16196,m3=16197,b3=16198,Yf=16199,Qf=16200,y3=16201,w3=16202,v3=16203,x3=16204,A3=16205,sg=16206,E3=16207,_3=16208,qe=16209,S3=16210,C3=16211,zO=852,UO=592,GO=15,k3=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function HO(){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 ga=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<Wf||t.mode>C3?1:0},T3=e=>{if(ga(e))return dn;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=Wf,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(zO),t.distcode=t.distdyn=new Int32Array(UO),t.sane=1,t.back=-1,pa},I3=e=>{if(ga(e))return dn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,T3(e)},B3=(e,t)=>{let n;if(ga(e))return dn;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?dn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,I3(e))},D3=(e,t)=>{if(!e)return dn;const n=new HO;e.state=n,n.strm=e,n.window=null,n.mode=Wf;const r=B3(e,t);return r!==pa&&(e.state=null),r},VO=e=>D3(e,GO);let R3=!0,lg,ug;const jO=e=>{if(R3){lg=new Int32Array(512),ug=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(Vl(KA,e.lens,0,288,lg,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Vl(JA,e.lens,0,32,ug,0,e.work,{bits:5}),R3=!1}e.lencode=lg,e.lenbits=9,e.distcode=ug,e.distbits=5},F3=(e,t,n,r)=>{let i;const a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},$O=(e,t)=>{let n,r,i,a,o,s,u,l,c,f,h,d,p,m,y=0,w,A,S,_,T,I,B,R;const M=new Uint8Array(4);let G,N;const re=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ga(e)||!e.output||!e.input&&e.avail_in!==0)return dn;n=e.state,n.mode===yr&&(n.mode=ag),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,f=s,h=u,R=pa;e:for(;;)switch(n.mode){case Wf:if(n.wrap===0){n.mode=ag;break}for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=pt(n.check,M,2,0),l=0,c=0,n.mode=i3;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)!==r3){e.msg="unknown compression method",n.mode=qe;break}if(l>>>=4,c-=4,B=(l&15)+8,n.wbits===0&&(n.wbits=B),B>15||B>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?h3:yr,l=0,c=0;break;case i3:for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.flags=l,(n.flags&255)!==r3){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&&(M[0]=l&255,M[1]=l>>>8&255,n.check=pt(n.check,M,2,0)),l=0,c=0,n.mode=a3;case a3:for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=pt(n.check,M,4,0)),l=0,c=0,n.mode=o3;case o3:for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=pt(n.check,M,2,0)),l=0,c=0,n.mode=s3;case s3:if(n.flags&1024){for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=pt(n.check,M,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=l3;case l3:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(B=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+d),B)),n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,a)),s-=d,a+=d,n.length-=d),n.length))break e;n.length=0,n.mode=u3;case u3:if(n.flags&2048){if(s===0)break e;d=0;do B=r[a+d++],n.head&&B&&n.length<65536&&(n.head.name+=String.fromCharCode(B));while(B&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,a)),s-=d,a+=d,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=c3;case c3:if(n.flags&4096){if(s===0)break e;d=0;do B=r[a+d++],n.head&&B&&n.length<65536&&(n.head.comment+=String.fromCharCode(B));while(B&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,a)),s-=d,a+=d,B)break e}else n.head&&(n.head.comment=null);n.mode=f3;case f3:if(n.flags&512){for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=qe;break}l=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=yr;break;case h3:for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}e.adler=n.check=k3(l),l=0,c=0,n.mode=Zf;case Zf:if(n.havedict===0)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,OO;e.adler=n.check=1,n.mode=yr;case yr:if(t===PO||t===qf)break e;case ag:if(n.last){l>>>=c&7,c-=c&7,n.mode=sg;break}for(;c<3;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}switch(n.last=l&1,l>>>=1,c-=1,l&3){case 0:n.mode=d3;break;case 1:if(jO(n),n.mode=Yf,t===qf){l>>>=2,c-=2;break e}break;case 2:n.mode=g3;break;case 3:e.msg="invalid block type",n.mode=qe}l>>>=2,c-=2;break;case d3:for(l>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=qe;break}if(n.length=l&65535,l=0,c=0,n.mode=og,t===qf)break e;case og:n.mode=p3;case p3:if(d=n.length,d){if(d>s&&(d=s),d>u&&(d=u),d===0)break e;i.set(r.subarray(a,a+d),o),s-=d,a+=d,u-=d,o+=d,n.length-=d;break}n.mode=yr;break;case g3:for(;c<14;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.nlen=(l&31)+257,l>>>=5,c-=5,n.ndist=(l&31)+1,l>>>=5,c-=5,n.ncode=(l&15)+4,l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=qe;break}n.have=0,n.mode=m3;case m3:for(;n.have<n.ncode;){for(;c<3;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.lens[re[n.have++]]=l&7,l>>>=3,c-=3}for(;n.have<19;)n.lens[re[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},R=Vl(MO,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,R){e.msg="invalid code lengths set",n.mode=qe;break}n.have=0,n.mode=b3;case b3:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(S<16)l>>>=w,c-=w,n.lens[n.have++]=S;else{if(S===16){for(N=w+2;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(l>>>=w,c-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=qe;break}B=n.lens[n.have-1],d=3+(l&3),l>>>=2,c-=2}else if(S===17){for(N=w+3;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=w,c-=w,B=0,d=3+(l&7),l>>>=3,c-=3}else{for(N=w+7;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=w,c-=w,B=0,d=11+(l&127),l>>>=7,c-=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++]=B}}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,G={bits:n.lenbits},R=Vl(KA,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,R){e.msg="invalid literal/lengths set",n.mode=qe;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},R=Vl(JA,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,R){e.msg="invalid distances set",n.mode=qe;break}if(n.mode=Yf,t===qf)break e;case Yf:n.mode=Qf;case Qf:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,IO(e,h),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,n.mode===yr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(A&&!(A&240)){for(_=w,T=A,I=S;y=n.lencode[I+((l&(1<<_+T)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,n.length=S,A===0){n.mode=A3;break}if(A&32){n.back=-1,n.mode=yr;break}if(A&64){e.msg="invalid literal/length code",n.mode=qe;break}n.extra=A&15,n.mode=y3;case y3:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=w3;case w3:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(!(A&240)){for(_=w,T=A,I=S;y=n.distcode[I+((l&(1<<_+T)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,A&64){e.msg="invalid distance code",n.mode=qe;break}n.offset=S,n.extra=A&15,n.mode=v3;case v3:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=qe;break}n.mode=x3;case x3:if(u===0)break e;if(d=h-u,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),m=n.window}else m=i,p=o-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[o++]=m[p++];while(--d);n.length===0&&(n.mode=Qf);break;case A3:if(u===0)break e;i[o++]=n.length,u--,n.mode=Qf;break;case sg:if(n.wrap){for(;c<32;){if(s===0)break e;s--,l|=r[a++]<<c,c+=8}if(h-=u,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?pt(n.check,i,h,o-h):Ml(n.check,i,h,o-h)),h=u,n.wrap&4&&(n.flags?l:k3(l))!==n.check){e.msg="incorrect data check",n.mode=qe;break}l=0,c=0}n.mode=E3;case E3:if(n.wrap&&n.flags){for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=qe;break}l=0,c=0}n.mode=_3;case _3:R=LO;break e;case qe:R=t3;break e;case S3:return n3;case C3:default:return dn}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<qe&&(n.mode<sg||t!==e3))&&F3(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?pt(n.check,i,h,e.next_out-h):Ml(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===yr?128:0)+(n.mode===Yf||n.mode===og?256:0),(f===0&&h===0||t===e3)&&R===pa&&(R=NO),R},qO=e=>{if(ga(e))return dn;let t=e.state;return t.window&&(t.window=null),e.state=null,pa},WO=(e,t)=>{if(ga(e))return dn;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,pa):dn},ZO=(e,t)=>{const n=t.length;let r,i,a;return ga(e)||(r=e.state,r.wrap!==0&&r.mode!==Zf)?dn:r.mode===Zf&&(i=1,i=Ml(i,t,n,0),i!==r.check)?t3:(a=F3(e,t,n,n),a?(r.mode=S3,n3):(r.havedict=1,pa))};var YO=I3,QO=B3,XO=T3,KO=VO,JO=D3,eN=$O,tN=qO,nN=WO,rN=ZO,iN="pako inflate (from Nodeca project)",wr={inflateReset:YO,inflateReset2:QO,inflateResetKeep:XO,inflateInit:KO,inflateInit2:JO,inflate:eN,inflateEnd:tN,inflateGetHeader:nN,inflateSetDictionary:rN,inflateInfo:iN};function aN(){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 oN=aN;const M3=Object.prototype.toString,{Z_NO_FLUSH:sN,Z_FINISH:lN,Z_OK:jl,Z_STREAM_END:cg,Z_NEED_DICT:fg,Z_STREAM_ERROR:uN,Z_DATA_ERROR:P3,Z_MEM_ERROR:cN}=Pl;function $l(e){this.options=Vf.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 qA,this.strm.avail_out=0;let n=wr.inflateInit2(this.strm,t.windowBits);if(n!==jl)throw new Error(fo[n]);if(this.header=new oN,wr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Hl.string2buf(t.dictionary):M3.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=wr.inflateSetDictionary(this.strm,t.dictionary),n!==jl)))throw new Error(fo[n])}$l.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let a,o,s;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?lN:sN,M3.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=wr.inflate(n,o),a===fg&&i&&(a=wr.inflateSetDictionary(n,i),a===jl?a=wr.inflate(n,o):a===P3&&(a=fg));n.avail_in>0&&a===cg&&n.state.wrap>0&&e[n.next_in]!==0;)wr.inflateReset(n),a=wr.inflate(n,o);switch(a){case uN:case P3:case fg:case cN:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===cg))if(this.options.to==="string"){let u=Hl.utf8border(n.output,n.next_out),l=n.next_out-u,c=Hl.buf2string(n.output,u);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(u,u+l),0),this.onData(c)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===jl&&s===0)){if(a===cg)return a=wr.inflateEnd(this.strm),this.onEnd(a),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===jl&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Vf.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function hg(e,t){const n=new $l(t);if(n.push(e),n.err)throw n.msg||fo[n.err];return n.result}function fN(e,t){return t=t||{},t.raw=!0,hg(e,t)}var hN=$l,dN=hg,pN=fN,gN=hg,mN=Pl,bN={Inflate:hN,inflate:dN,inflateRaw:pN,ungzip:gN,constants:mN};const{Inflate:hG,inflate:dG,inflateRaw:yN,ungzip:pG}=bN;var wN=yN;function vN(e){return wN(e.subarray(2))}let xN=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function AN(e){e.sort((i,a)=>Number(i.offset)-Number(a.offset));const t=[];let n,r;for(const i of e)n&&r&&Number(i.offset)-r<=2e3?(n.length=BigInt(Number(n.length)+Number(i.length)-r+Number(i.offset)),n.blocks.push(i)):t.push(n={blocks:[i],length:i.length,offset:i.offset}),r=Number(n.offset)+Number(n.length);return t}function Xf(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new xN("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const EN=1,_N=2,SN=3;function dg(e,t,n,r){return e<r&&t>=n}function CN(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:{[SN]:new Ie().array("items",{length:"itemCount",type:new Ie().floatle("score")}),[_N]:new Ie().array("items",{length:"itemCount",type:new Ie().endianess(t).int32("start").floatle("score")}),[EN]:new Ie().array("items",{length:"itemCount",type:new Ie().endianess(t).int32("start").int32("end").floatle("score")})}}),bigBedParser:i,summaryParser:n,leafParser:r}}class L3{constructor(t,n,r,i,a,o){if(this.bbi=t,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=i,this.isCompressed=a,this.blockType=o,this.featureCache=new Of({cache:new Nf({maxSize:1e3}),fill:async(u,l)=>{const c=Number(u.length),f=Number(u.offset),{buffer:h}=await this.bbi.read(me.Buffer.alloc(c),0,c,f,{signal:l});return h}}),!(r>=0))throw new Error("invalid cirTreeOffset!");const s=CN(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}async readWigData(t,n,r,i,a){try{const{refsByName:o,bbi:s,cirTreeOffset:u,isBigEndian:l}=this,c=o[t];c===void 0&&i.complete();const f={chrId:c,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=s.read(me.Buffer.alloc(48),0,48,Number(u),a));const{buffer:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],m=0;const y=(_,T,I)=>{try{const B=_.subarray(T),R=this.leafParser.parse(B);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(G=>w(G)).map(G=>Number(G.blockOffset));M.length>0&&S(M,I+1)}}catch(B){i.error(B)}},w=_=>{const{startChrom:T,startBase:I,endChrom:B,endBase:R}=_;return(T<c||T===c&&I<=r)&&(B>c||B===c&&R>=n)},A=async(_,T,I)=>{try{const B=T.max()-T.min(),R=T.min(),M=await this.featureCache.get(`${B}_${R}`,{length:B,offset:R},a==null?void 0:a.signal);for(const G of _)T.contains(G)&&(y(M,G-R,I),m-=1,m===0&&this.readFeatures(i,p,{...a,request:f}))}catch(B){i.error(B)}},S=(_,T)=>{try{m+=_.length;const I=4+Number(d)*32;let B=new ui(_[0],_[0]+I);for(let R=1;R<_.length;R+=1){const M=new ui(_[R],_[R]+I);B=B.union(M)}B.getRanges().map(R=>A(_,R,T))}catch(I){i.error(I)}};return S([Number(u)+48],1)}catch(o){i.error(o)}}parseSummaryBlock(t,n,r){const i=[];let a=n;const o=new DataView(t.buffer,t.byteOffset,t.length);for(;a<t.byteLength;){const s=o.getUint32(a,!0);a+=4;const u=o.getUint32(a,!0);a+=4;const l=o.getUint32(a,!0);a+=4;const c=o.getUint32(a,!0);a+=4;const f=o.getFloat32(a,!0);a+=4;const h=o.getFloat32(a,!0);a+=4;const d=o.getFloat32(a,!0);a+=4,a+=4,(!r||s===r.chrId&&dg(u,l,r.start,r.end))&&i.push({start:u,end:l,maxScore:h,minScore:f,summary:!0,score:d/(c||1)})}return i}parseBigBedBlock(t,n,r,i){const a=[];let o=n;for(;o<t.byteLength;){const s=this.bigBedParser.parse(t.subarray(o));s.uniqueId=`bb-${r+o}`,a.push(s),o+=s.offset}return i?a.filter(s=>dg(s.start,s.end,i.start,i.end)):a}parseBigWigBlock(t,n,r){const i=t.subarray(n),a=new DataView(i.buffer,i.byteOffset,i.length);let o=0;o+=4;const s=a.getInt32(o,!0);o+=8;const u=a.getUint32(o,!0);o+=4;const l=a.getUint32(o,!0);o+=4;const c=a.getUint8(o);o+=2;const f=a.getUint16(o,!0);o+=2;const h=new Array(f);switch(c){case 1:{for(let d=0;d<f;d++){const p=a.getInt32(o,!0);o+=4;const m=a.getInt32(o,!0);o+=4;const y=a.getFloat32(o,!0);o+=4,h[d]={start:p,end:m,score:y}}break}case 2:{for(let d=0;d<f;d++){const p=a.getInt32(o,!0);o+=4;const m=a.getFloat32(o,!0);o+=4,h[d]={score:m,start:p,end:p+l}}break}case 3:{for(let d=0;d<f;d++){const p=a.getFloat32(o,!0);o+=4;const m=s+d*u;h[d]={score:p,start:m,end:m+l}}break}}return r?h.filter(d=>dg(d.start,d.end,r.start,r.end)):h}async readFeatures(t,n,r={}){try{const{blockType:i,isCompressed:a}=this,{signal:o,request:s}=r,u=AN(n);Xf(o),await Promise.all(u.map(async l=>{Xf(o);const{length:c,offset:f}=l,h=await this.featureCache.get(`${c}_${f}`,l,o);for(const d of l.blocks){Xf(o);let p=Number(d.offset)-Number(l.offset),m=h;switch(a&&(m=vN(h.subarray(p)),p=0),Xf(o),i){case"summary":{t.next(this.parseSummaryBlock(m,p,s));break}case"bigwig":{t.next(this.parseBigWigBlock(m,p,s));break}case"bigbed":{t.next(this.parseBigBedBlock(m,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 pg=function(e,t){return pg=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])},pg(e,t)};function gg(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");pg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function kN(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})}function O3(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function ql(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 mg(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function bg(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function wo(e){return this instanceof wo?(this.v=e,this):new wo(e)}function TN(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(h){r[h]&&(i[h]=function(d){return new Promise(function(p,m){a.push([h,d,p,m])>1||s(h,d)})})}function s(h,d){try{u(r[h](d))}catch(p){f(a[0][3],p)}}function u(h){h.value instanceof wo?Promise.resolve(h.value.v).then(l,c):f(a[0][2],h)}function l(h){s("next",h)}function c(h){s("throw",h)}function f(h,d){h(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function IN(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 ql=="function"?ql(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(s,u){o=e[a](o),i(s,u,o.done,o.value)})}}function i(a,o,s,u){Promise.resolve(u).then(function(l){a({value:l,done:s})},o)}}typeof SuppressedError=="function"&&SuppressedError;function lt(e){return typeof e=="function"}function N3(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 yg=N3(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
458
+ */(function(e){const t=ff,n=K0,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{const 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 o(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,b){if(typeof v=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(v)}return u(v,g,b)}s.poolSize=8192;function u(v,g,b){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(Ct(v,ArrayBuffer)||v&&Ct(v.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ct(v,SharedArrayBuffer)||v&&Ct(v.buffer,SharedArrayBuffer)))return m(v,g,b);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,b);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,b);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,b){return u(v,g,b)},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 c(v,g,b){return l(v),v<=0?o(v):g!==void 0?typeof b=="string"?o(v).fill(g,b):o(v).fill(g):o(v)}s.alloc=function(v,g,b){return c(v,g,b)};function f(v){return l(v),o(v<0?0:w(v)|0)}s.allocUnsafe=function(v){return f(v)},s.allocUnsafeSlow=function(v){return f(v)};function h(v,g){if((typeof g!="string"||g==="")&&(g="utf8"),!s.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const b=S(v,g)|0;let k=o(b);const F=k.write(v,g);return F!==b&&(k=k.slice(0,F)),k}function d(v){const g=v.length<0?0:w(v.length)|0,b=o(g);for(let k=0;k<g;k+=1)b[k]=v[k]&255;return b}function p(v){if(Ct(v,Uint8Array)){const g=new Uint8Array(v);return m(g.buffer,g.byteOffset,g.byteLength)}return d(v)}function m(v,g,b){if(g<0||v.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(v.byteLength<g+(b||0))throw new RangeError('"length" is outside of buffer bounds');let k;return g===void 0&&b===void 0?k=new Uint8Array(v):b===void 0?k=new Uint8Array(v,g):k=new Uint8Array(v,g,b),Object.setPrototypeOf(k,s.prototype),k}function y(v){if(s.isBuffer(v)){const g=w(v.length)|0,b=o(g);return b.length===0||v.copy(b,0,0,g),b}if(v.length!==void 0)return typeof v.length!="number"||Cr(v.length)?o(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 A(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,b){if(Ct(g,Uint8Array)&&(g=s.from(g,g.offset,g.byteLength)),Ct(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),!s.isBuffer(g)||!s.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===b)return 0;let k=g.length,F=b.length;for(let O=0,j=Math.min(k,F);O<j;++O)if(g[O]!==b[O]){k=g[O],F=b[O];break}return k<F?-1:F<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,b){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(b===void 0)for(b=0,k=0;k<g.length;++k)b+=g[k].length;const F=s.allocUnsafe(b);let O=0;for(k=0;k<g.length;++k){let j=g[k];if(Ct(j,Uint8Array))O+j.length>F.length?(s.isBuffer(j)||(j=s.from(j)),j.copy(F,O)):Uint8Array.prototype.set.call(F,j,O);else if(s.isBuffer(j))j.copy(F,O);else throw new TypeError('"list" argument must be an Array of Buffers');O+=j.length}return F};function S(v,g){if(s.isBuffer(v))return v.length;if(ArrayBuffer.isView(v)||Ct(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 b=v.length,k=arguments.length>2&&arguments[2]===!0;if(!k&&b===0)return 0;let F=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return ce(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return wi(v).length;default:if(F)return k?-1:ce(v).length;g=(""+g).toLowerCase(),F=!0}}s.byteLength=S;function _(v,g,b){let k=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,g>>>=0,b<=g))return"";for(v||(v="utf8");;)switch(v){case"hex":return We(this,g,b);case"utf8":case"utf-8":return te(this,g,b);case"ascii":return De(this,g,b);case"latin1":case"binary":return Je(this,g,b);case"base64":return se(this,g,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,g,b);default:if(k)throw new TypeError("Unknown encoding: "+v);v=(v+"").toLowerCase(),k=!0}}s.prototype._isBuffer=!0;function T(v,g,b){const k=v[g];v[g]=v[b],v[b]=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 b=0;b<g;b+=2)T(this,b,b+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 b=0;b<g;b+=4)T(this,b,b+3),T(this,b+1,b+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 b=0;b<g;b+=8)T(this,b,b+7),T(this,b+1,b+6),T(this,b+2,b+5),T(this,b+3,b+4);return this},s.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?te(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 b=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,b).replace(/(.{2})/g,"$1 ").trim(),this.length>b&&(g+=" ... "),"<Buffer "+g+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(g,b,k,F,O){if(Ct(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(b===void 0&&(b=0),k===void 0&&(k=g?g.length:0),F===void 0&&(F=0),O===void 0&&(O=this.length),b<0||k>g.length||F<0||O>this.length)throw new RangeError("out of range index");if(F>=O&&b>=k)return 0;if(F>=O)return-1;if(b>=k)return 1;if(b>>>=0,k>>>=0,F>>>=0,O>>>=0,this===g)return 0;let j=O-F,fe=k-b;const He=Math.min(j,fe),Pe=this.slice(F,O),Ze=g.slice(b,k);for(let Ce=0;Ce<He;++Ce)if(Pe[Ce]!==Ze[Ce]){j=Pe[Ce],fe=Ze[Ce];break}return j<fe?-1:fe<j?1:0};function I(v,g,b,k,F){if(v.length===0)return-1;if(typeof b=="string"?(k=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,Cr(b)&&(b=F?0:v.length-1),b<0&&(b=v.length+b),b>=v.length){if(F)return-1;b=v.length-1}else if(b<0)if(F)b=0;else return-1;if(typeof g=="string"&&(g=s.from(g,k)),s.isBuffer(g))return g.length===0?-1:B(v,g,b,k,F);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?F?Uint8Array.prototype.indexOf.call(v,g,b):Uint8Array.prototype.lastIndexOf.call(v,g,b):B(v,[g],b,k,F);throw new TypeError("val must be string, number or Buffer")}function B(v,g,b,k,F){let O=1,j=v.length,fe=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;O=2,j/=2,fe/=2,b/=2}function He(Ze,Ce){return O===1?Ze[Ce]:Ze.readUInt16BE(Ce*O)}let Pe;if(F){let Ze=-1;for(Pe=b;Pe<j;Pe++)if(He(v,Pe)===He(g,Ze===-1?0:Pe-Ze)){if(Ze===-1&&(Ze=Pe),Pe-Ze+1===fe)return Ze*O}else Ze!==-1&&(Pe-=Pe-Ze),Ze=-1}else for(b+fe>j&&(b=j-fe),Pe=b;Pe>=0;Pe--){let Ze=!0;for(let Ce=0;Ce<fe;Ce++)if(He(v,Pe+Ce)!==He(g,Ce)){Ze=!1;break}if(Ze)return Pe}return-1}s.prototype.includes=function(g,b,k){return this.indexOf(g,b,k)!==-1},s.prototype.indexOf=function(g,b,k){return I(this,g,b,k,!0)},s.prototype.lastIndexOf=function(g,b,k){return I(this,g,b,k,!1)};function R(v,g,b,k){b=Number(b)||0;const F=v.length-b;k?(k=Number(k),k>F&&(k=F)):k=F;const O=g.length;k>O/2&&(k=O/2);let j;for(j=0;j<k;++j){const fe=parseInt(g.substr(j*2,2),16);if(Cr(fe))return j;v[b+j]=fe}return j}function M(v,g,b,k){return vi(ce(g,v.length-b),v,b,k)}function G(v,g,b,k){return vi(qt(g),v,b,k)}function N(v,g,b,k){return vi(wi(g),v,b,k)}function re(v,g,b,k){return vi(yi(g,v.length-b),v,b,k)}s.prototype.write=function(g,b,k,F){if(b===void 0)F="utf8",k=this.length,b=0;else if(k===void 0&&typeof b=="string")F=b,k=this.length,b=0;else if(isFinite(b))b=b>>>0,isFinite(k)?(k=k>>>0,F===void 0&&(F="utf8")):(F=k,k=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const O=this.length-b;if((k===void 0||k>O)&&(k=O),g.length>0&&(k<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");let j=!1;for(;;)switch(F){case"hex":return R(this,g,b,k);case"utf8":case"utf-8":return M(this,g,b,k);case"ascii":case"latin1":case"binary":return G(this,g,b,k);case"base64":return N(this,g,b,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,g,b,k);default:if(j)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),j=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(v,g,b){return g===0&&b===v.length?t.fromByteArray(v):t.fromByteArray(v.slice(g,b))}function te(v,g,b){b=Math.min(v.length,b);const k=[];let F=g;for(;F<b;){const O=v[F];let j=null,fe=O>239?4:O>223?3:O>191?2:1;if(F+fe<=b){let He,Pe,Ze,Ce;switch(fe){case 1:O<128&&(j=O);break;case 2:He=v[F+1],(He&192)===128&&(Ce=(O&31)<<6|He&63,Ce>127&&(j=Ce));break;case 3:He=v[F+1],Pe=v[F+2],(He&192)===128&&(Pe&192)===128&&(Ce=(O&15)<<12|(He&63)<<6|Pe&63,Ce>2047&&(Ce<55296||Ce>57343)&&(j=Ce));break;case 4:He=v[F+1],Pe=v[F+2],Ze=v[F+3],(He&192)===128&&(Pe&192)===128&&(Ze&192)===128&&(Ce=(O&15)<<18|(He&63)<<12|(Pe&63)<<6|Ze&63,Ce>65535&&Ce<1114112&&(j=Ce))}}j===null?(j=65533,fe=1):j>65535&&(j-=65536,k.push(j>>>10&1023|55296),j=56320|j&1023),k.push(j),F+=fe}return Xe(k)}const ge=4096;function Xe(v){const g=v.length;if(g<=ge)return String.fromCharCode.apply(String,v);let b="",k=0;for(;k<g;)b+=String.fromCharCode.apply(String,v.slice(k,k+=ge));return b}function De(v,g,b){let k="";b=Math.min(v.length,b);for(let F=g;F<b;++F)k+=String.fromCharCode(v[F]&127);return k}function Je(v,g,b){let k="";b=Math.min(v.length,b);for(let F=g;F<b;++F)k+=String.fromCharCode(v[F]);return k}function We(v,g,b){const k=v.length;(!g||g<0)&&(g=0),(!b||b<0||b>k)&&(b=k);let F="";for(let O=g;O<b;++O)F+=xi[v[O]];return F}function et(v,g,b){const k=v.slice(g,b);let F="";for(let O=0;O<k.length-1;O+=2)F+=String.fromCharCode(k[O]+k[O+1]*256);return F}s.prototype.slice=function(g,b){const k=this.length;g=~~g,b=b===void 0?k:~~b,g<0?(g+=k,g<0&&(g=0)):g>k&&(g=k),b<0?(b+=k,b<0&&(b=0)):b>k&&(b=k),b<g&&(b=g);const F=this.subarray(g,b);return Object.setPrototypeOf(F,s.prototype),F};function _e(v,g,b){if(v%1!==0||v<0)throw new RangeError("offset is not uint");if(v+g>b)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(g,b,k){g=g>>>0,b=b>>>0,k||_e(g,b,this.length);let F=this[g],O=1,j=0;for(;++j<b&&(O*=256);)F+=this[g+j]*O;return F},s.prototype.readUintBE=s.prototype.readUIntBE=function(g,b,k){g=g>>>0,b=b>>>0,k||_e(g,b,this.length);let F=this[g+--b],O=1;for(;b>0&&(O*=256);)F+=this[g+--b]*O;return F},s.prototype.readUint8=s.prototype.readUInt8=function(g,b){return g=g>>>0,b||_e(g,1,this.length),this[g]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(g,b){return g=g>>>0,b||_e(g,2,this.length),this[g]|this[g+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(g,b){return g=g>>>0,b||_e(g,2,this.length),this[g]<<8|this[g+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(g,b){return g=g>>>0,b||_e(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,b){return g=g>>>0,b||_e(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,H(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&q(g,this.length-8);const F=b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,O=this[++g]+this[++g]*2**8+this[++g]*2**16+k*2**24;return BigInt(F)+(BigInt(O)<<BigInt(32))}),s.prototype.readBigUInt64BE=Wt(function(g){g=g>>>0,H(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&q(g,this.length-8);const F=b*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],O=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+k;return(BigInt(F)<<BigInt(32))+BigInt(O)}),s.prototype.readIntLE=function(g,b,k){g=g>>>0,b=b>>>0,k||_e(g,b,this.length);let F=this[g],O=1,j=0;for(;++j<b&&(O*=256);)F+=this[g+j]*O;return O*=128,F>=O&&(F-=Math.pow(2,8*b)),F},s.prototype.readIntBE=function(g,b,k){g=g>>>0,b=b>>>0,k||_e(g,b,this.length);let F=b,O=1,j=this[g+--F];for(;F>0&&(O*=256);)j+=this[g+--F]*O;return O*=128,j>=O&&(j-=Math.pow(2,8*b)),j},s.prototype.readInt8=function(g,b){return g=g>>>0,b||_e(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},s.prototype.readInt16LE=function(g,b){g=g>>>0,b||_e(g,2,this.length);const k=this[g]|this[g+1]<<8;return k&32768?k|4294901760:k},s.prototype.readInt16BE=function(g,b){g=g>>>0,b||_e(g,2,this.length);const k=this[g+1]|this[g]<<8;return k&32768?k|4294901760:k},s.prototype.readInt32LE=function(g,b){return g=g>>>0,b||_e(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},s.prototype.readInt32BE=function(g,b){return g=g>>>0,b||_e(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,H(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&q(g,this.length-8);const F=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(k<<24);return(BigInt(F)<<BigInt(32))+BigInt(b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),s.prototype.readBigInt64BE=Wt(function(g){g=g>>>0,H(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&q(g,this.length-8);const F=(b<<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+k)}),s.prototype.readFloatLE=function(g,b){return g=g>>>0,b||_e(g,4,this.length),n.read(this,g,!0,23,4)},s.prototype.readFloatBE=function(g,b){return g=g>>>0,b||_e(g,4,this.length),n.read(this,g,!1,23,4)},s.prototype.readDoubleLE=function(g,b){return g=g>>>0,b||_e(g,8,this.length),n.read(this,g,!0,52,8)},s.prototype.readDoubleBE=function(g,b){return g=g>>>0,b||_e(g,8,this.length),n.read(this,g,!1,52,8)};function Se(v,g,b,k,F,O){if(!s.isBuffer(v))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>F||g<O)throw new RangeError('"value" argument is out of bounds');if(b+k>v.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(g,b,k,F){if(g=+g,b=b>>>0,k=k>>>0,!F){const fe=Math.pow(2,8*k)-1;Se(this,g,b,k,fe,0)}let O=1,j=0;for(this[b]=g&255;++j<k&&(O*=256);)this[b+j]=g/O&255;return b+k},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(g,b,k,F){if(g=+g,b=b>>>0,k=k>>>0,!F){const fe=Math.pow(2,8*k)-1;Se(this,g,b,k,fe,0)}let O=k-1,j=1;for(this[b+O]=g&255;--O>=0&&(j*=256);)this[b+O]=g/j&255;return b+k},s.prototype.writeUint8=s.prototype.writeUInt8=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,1,255,0),this[b]=g&255,b+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,2,65535,0),this[b]=g&255,this[b+1]=g>>>8,b+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,2,65535,0),this[b]=g>>>8,this[b+1]=g&255,b+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,4,4294967295,0),this[b+3]=g>>>24,this[b+2]=g>>>16,this[b+1]=g>>>8,this[b]=g&255,b+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,4,4294967295,0),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4};function gt(v,g,b,k,F){x(g,k,F,v,b,7);let O=Number(g&BigInt(4294967295));v[b++]=O,O=O>>8,v[b++]=O,O=O>>8,v[b++]=O,O=O>>8,v[b++]=O;let j=Number(g>>BigInt(32)&BigInt(4294967295));return v[b++]=j,j=j>>8,v[b++]=j,j=j>>8,v[b++]=j,j=j>>8,v[b++]=j,b}function $t(v,g,b,k,F){x(g,k,F,v,b,7);let O=Number(g&BigInt(4294967295));v[b+7]=O,O=O>>8,v[b+6]=O,O=O>>8,v[b+5]=O,O=O>>8,v[b+4]=O;let j=Number(g>>BigInt(32)&BigInt(4294967295));return v[b+3]=j,j=j>>8,v[b+2]=j,j=j>>8,v[b+1]=j,j=j>>8,v[b]=j,b+8}s.prototype.writeBigUInt64LE=Wt(function(g,b=0){return gt(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Wt(function(g,b=0){return $t(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(g,b,k,F){if(g=+g,b=b>>>0,!F){const He=Math.pow(2,8*k-1);Se(this,g,b,k,He-1,-He)}let O=0,j=1,fe=0;for(this[b]=g&255;++O<k&&(j*=256);)g<0&&fe===0&&this[b+O-1]!==0&&(fe=1),this[b+O]=(g/j>>0)-fe&255;return b+k},s.prototype.writeIntBE=function(g,b,k,F){if(g=+g,b=b>>>0,!F){const He=Math.pow(2,8*k-1);Se(this,g,b,k,He-1,-He)}let O=k-1,j=1,fe=0;for(this[b+O]=g&255;--O>=0&&(j*=256);)g<0&&fe===0&&this[b+O+1]!==0&&(fe=1),this[b+O]=(g/j>>0)-fe&255;return b+k},s.prototype.writeInt8=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,1,127,-128),g<0&&(g=255+g+1),this[b]=g&255,b+1},s.prototype.writeInt16LE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,2,32767,-32768),this[b]=g&255,this[b+1]=g>>>8,b+2},s.prototype.writeInt16BE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,2,32767,-32768),this[b]=g>>>8,this[b+1]=g&255,b+2},s.prototype.writeInt32LE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,4,2147483647,-2147483648),this[b]=g&255,this[b+1]=g>>>8,this[b+2]=g>>>16,this[b+3]=g>>>24,b+4},s.prototype.writeInt32BE=function(g,b,k){return g=+g,b=b>>>0,k||Se(this,g,b,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4},s.prototype.writeBigInt64LE=Wt(function(g,b=0){return gt(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Wt(function(g,b=0){return $t(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ne(v,g,b,k,F,O){if(b+k>v.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function L(v,g,b,k,F){return g=+g,b=b>>>0,F||Ne(v,g,b,4),n.write(v,g,b,k,23,4),b+4}s.prototype.writeFloatLE=function(g,b,k){return L(this,g,b,!0,k)},s.prototype.writeFloatBE=function(g,b,k){return L(this,g,b,!1,k)};function P(v,g,b,k,F){return g=+g,b=b>>>0,F||Ne(v,g,b,8),n.write(v,g,b,k,52,8),b+8}s.prototype.writeDoubleLE=function(g,b,k){return P(this,g,b,!0,k)},s.prototype.writeDoubleBE=function(g,b,k){return P(this,g,b,!1,k)},s.prototype.copy=function(g,b,k,F){if(!s.isBuffer(g))throw new TypeError("argument should be a Buffer");if(k||(k=0),!F&&F!==0&&(F=this.length),b>=g.length&&(b=g.length),b||(b=0),F>0&&F<k&&(F=k),F===k||g.length===0||this.length===0)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(k<0||k>=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-b<F-k&&(F=g.length-b+k);const O=F-k;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(b,k,F):Uint8Array.prototype.set.call(g,this.subarray(k,F),b),O},s.prototype.fill=function(g,b,k,F){if(typeof g=="string"){if(typeof b=="string"?(F=b,b=0,k=this.length):typeof k=="string"&&(F=k,k=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 j=g.charCodeAt(0);(F==="utf8"&&j<128||F==="latin1")&&(g=j)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(b<0||this.length<b||this.length<k)throw new RangeError("Out of range index");if(k<=b)return this;b=b>>>0,k=k===void 0?this.length:k>>>0,g||(g=0);let O;if(typeof g=="number")for(O=b;O<k;++O)this[O]=g;else{const j=s.isBuffer(g)?g:s.from(g,F),fe=j.length;if(fe===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(O=0;O<k-b;++O)this[O+b]=j[O%fe]}return this};const $={};function V(v,g,b){$[v]=class extends b{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}`}}}V("ERR_BUFFER_OUT_OF_BOUNDS",function(v){return v?`${v} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),V("ERR_INVALID_ARG_TYPE",function(v,g){return`The "${v}" argument must be of type number. Received type ${typeof g}`},TypeError),V("ERR_OUT_OF_RANGE",function(v,g,b){let k=`The value of "${v}" is out of range.`,F=b;return Number.isInteger(b)&&Math.abs(b)>2**32?F=Z(String(b)):typeof b=="bigint"&&(F=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(F=Z(F)),F+="n"),k+=` It must be ${g}. Received ${F}`,k},RangeError);function Z(v){let g="",b=v.length;const k=v[0]==="-"?1:0;for(;b>=k+4;b-=3)g=`_${v.slice(b-3,b)}${g}`;return`${v.slice(0,b)}${g}`}function C(v,g,b){H(g,"offset"),(v[g]===void 0||v[g+b]===void 0)&&q(g,v.length-(b+1))}function x(v,g,b,k,F,O){if(v>b||v<g){const j=typeof g=="bigint"?"n":"";let fe;throw O>3?g===0||g===BigInt(0)?fe=`>= 0${j} and < 2${j} ** ${(O+1)*8}${j}`:fe=`>= -(2${j} ** ${(O+1)*8-1}${j}) and < 2 ** ${(O+1)*8-1}${j}`:fe=`>= ${g}${j} and <= ${b}${j}`,new $.ERR_OUT_OF_RANGE("value",fe,v)}C(k,F,O)}function H(v,g){if(typeof v!="number")throw new $.ERR_INVALID_ARG_TYPE(g,"number",v)}function q(v,g,b){throw Math.floor(v)!==v?(H(v,b),new $.ERR_OUT_OF_RANGE(b||"offset","an integer",v)):g<0?new $.ERR_BUFFER_OUT_OF_BOUNDS:new $.ERR_OUT_OF_RANGE(b||"offset",`>= ${b?1:0} and <= ${g}`,v)}const ue=/[^+/0-9A-Za-z-_]/g;function ne(v){if(v=v.split("=")[0],v=v.trim().replace(ue,""),v.length<2)return"";for(;v.length%4!==0;)v=v+"=";return v}function ce(v,g){g=g||1/0;let b;const k=v.length;let F=null;const O=[];for(let j=0;j<k;++j){if(b=v.charCodeAt(j),b>55295&&b<57344){if(!F){if(b>56319){(g-=3)>-1&&O.push(239,191,189);continue}else if(j+1===k){(g-=3)>-1&&O.push(239,191,189);continue}F=b;continue}if(b<56320){(g-=3)>-1&&O.push(239,191,189),F=b;continue}b=(F-55296<<10|b-56320)+65536}else F&&(g-=3)>-1&&O.push(239,191,189);if(F=null,b<128){if((g-=1)<0)break;O.push(b)}else if(b<2048){if((g-=2)<0)break;O.push(b>>6|192,b&63|128)}else if(b<65536){if((g-=3)<0)break;O.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((g-=4)<0)break;O.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return O}function qt(v){const g=[];for(let b=0;b<v.length;++b)g.push(v.charCodeAt(b)&255);return g}function yi(v,g){let b,k,F;const O=[];for(let j=0;j<v.length&&!((g-=2)<0);++j)b=v.charCodeAt(j),k=b>>8,F=b%256,O.push(F),O.push(k);return O}function wi(v){return t.toByteArray(ne(v))}function vi(v,g,b,k){let F;for(F=0;F<k&&!(F+b>=g.length||F>=v.length);++F)g[F+b]=v[F];return F}function Ct(v,g){return v instanceof g||v!=null&&v.constructor!=null&&v.constructor.name!=null&&v.constructor.name===g.name}function Cr(v){return v!==v}const xi=function(){const v="0123456789abcdef",g=new Array(256);for(let b=0;b<16;++b){const k=b*16;for(let F=0;F<16;++F)g[k+F]=v[b]+v[F]}return g}();function Wt(v){return typeof BigInt>"u"?nr:v}function nr(){throw new Error("BigInt not supported")}})(me);const vv=xe({__proto__:null,default:ll(me)},[me]),dt={},k7=Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})),J0=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 me.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||J0.fetch&&J0.fetch.bind(J0);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");n.overrides&&(this.baseOverrides=n.overrides),this.fetchImplementation=r}async fetch(t,n){let r;try{r=await this.fetchImplementation(t,n)}catch(i){if(`${i}`.includes("Failed to fetch"))console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`),r=await this.fetchImplementation(t,{...n,cache:"reload"});else throw i}return r}async read(t,n=0,r,i=0,a={}){const{headers:o={},signal:s,overrides:u={}}=a;r<1/0?o.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(o.range=`bytes=${i}-`);const l={...this.baseOverrides,...u,headers:{...o,...u.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s},c=await this.fetch(this.url,l);if(!c.ok)throw new Error(`HTTP ${c.status} ${c.statusText} ${this.url}`);if(c.status===200&&i===0||c.status===206){const f=await this.getBufferFromResponse(c),h=f.copy(t,n,0,Math.min(r,f.length)),d=c.headers.get("content-range"),p=/\/(\d+)$/.exec(d||"");return p&&p[1]&&(this._stat={size:parseInt(p[1],10)}),{bytesRead:h,buffer:t}}throw c.status===200?new Error("${this.url} fetch returned status 200, expected 206"):new Error(`HTTP ${c.status} fetching ${this.url}`)}async readFile(t={}){let n,r;typeof t=="string"?(n=t,r={}):(n=t.encoding,r=t,delete r.encoding);const{headers:i={},signal:a,overrides:o={}}=r,s={headers:i,method:"GET",redirect:"follow",mode:"cors",signal:a,...this.baseOverrides,...o},u=await this.fetch(this.url,s);if(!u)throw new Error("generic-filehandle failed to fetch");if(u.status!==200)throw Object.assign(new Error(`HTTP ${u.status} fetching ${this.url}`),{status:u.status});if(n==="utf8")return u.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(u)}async stat(){if(!this._stat){const t=me.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 xv(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 T7(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 I7{constructor(t){this.blob=t,this.size=t.size}async read(t,n=0,r,i=0){if(!r)return{bytesRead:0,buffer:t};const a=i,o=a+r,s=await xv(this.blob.slice(a,o)),u=me.Buffer.from(s);return{bytesRead:u.copy(t,n),buffer:u}}async readFile(t){let n;if(typeof t=="string"?n=t:n=t&&t.encoding,n==="utf8")return T7(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await xv(this.blob);return me.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function Av(e,t={}){return new Qi(e,t)}function B7(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return Av(e,r);if(t!==void 0)return new dt(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const ul=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:I7,LocalFile:dt,RemoteFile:Qi,fromUrl:Av,open:B7},Symbol.toStringTag,{value:"Module"}));var pr={};(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(a,o){return Object.prototype.hasOwnProperty.call(a,o)}e.assign=function(a){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var s=o.shift();if(s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var u in s)n(s,u)&&(a[u]=s[u])}}return a},e.shrinkBuf=function(a,o){return a.length===o?a:a.subarray?a.subarray(0,o):(a.length=o,a)};var r={arraySet:function(a,o,s,u,l){if(o.subarray&&a.subarray){a.set(o.subarray(s,s+u),l);return}for(var c=0;c<u;c++)a[l+c]=o[s+c]},flattenChunks:function(a){var o,s,u,l,c,f;for(u=0,o=0,s=a.length;o<s;o++)u+=a[o].length;for(f=new Uint8Array(u),l=0,o=0,s=a.length;o<s;o++)c=a[o],f.set(c,l),l+=c.length;return f}},i={arraySet:function(a,o,s,u,l){for(var c=0;c<u;c++)a[l+c]=o[s+c]},flattenChunks:function(a){return[].concat.apply([],a)}};e.setTyped=function(a){a?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})(pr);var cl={},Wn={},Xa={},D7=pr,R7=4,Ev=0,_v=1,F7=2;function Ka(e){for(var t=e.length;--t>=0;)e[t]=0}var M7=0,Sv=1,P7=2,L7=3,O7=258,ep=29,fl=256,hl=fl+1+ep,Ja=30,tp=19,Cv=2*hl+1,Xi=15,np=16,N7=7,rp=256,kv=16,Tv=17,Iv=18,ip=[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],hf=[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],z7=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Bv=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],U7=512,gr=new Array((hl+2)*2);Ka(gr);var dl=new Array(Ja*2);Ka(dl);var pl=new Array(U7);Ka(pl);var gl=new Array(O7-L7+1);Ka(gl);var ap=new Array(ep);Ka(ap);var df=new Array(Ja);Ka(df);function op(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 Dv,Rv,Fv;function sp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Mv(e){return e<256?pl[e]:pl[256+(e>>>7)]}function ml(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>np-n?(e.bi_buf|=t<<e.bi_valid&65535,ml(e,e.bi_buf),e.bi_buf=t>>np-e.bi_valid,e.bi_valid+=n-np):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Zn(e,t,n){Gt(e,n[t*2],n[t*2+1])}function Pv(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function G7(e){e.bi_valid===16?(ml(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 H7(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length,l,c,f,h,d,p,m=0;for(h=0;h<=Xi;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<Cv;l++)c=e.heap[l],h=n[n[c*2+1]*2+1]+1,h>u&&(h=u,m++),n[c*2+1]=h,!(c>r)&&(e.bl_count[h]++,d=0,c>=s&&(d=o[c-s]),p=n[c*2],e.opt_len+=p*(h+d),a&&(e.static_len+=p*(i[c*2+1]+d)));if(m!==0){do{for(h=u-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(h=u;h!==0;h--)for(c=e.bl_count[h];c!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),c--)}}function Lv(e,t,n){var r=new Array(Xi+1),i=0,a,o;for(a=1;a<=Xi;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=Pv(r[s]++,s))}}function V7(){var e,t,n,r,i,a=new Array(Xi+1);for(n=0,r=0;r<ep-1;r++)for(ap[r]=n,e=0;e<1<<ip[r];e++)gl[n++]=r;for(gl[n-1]=r,i=0,r=0;r<16;r++)for(df[r]=i,e=0;e<1<<hf[r];e++)pl[i++]=r;for(i>>=7;r<Ja;r++)for(df[r]=i<<7,e=0;e<1<<hf[r]-7;e++)pl[256+i++]=r;for(t=0;t<=Xi;t++)a[t]=0;for(e=0;e<=143;)gr[e*2+1]=8,e++,a[8]++;for(;e<=255;)gr[e*2+1]=9,e++,a[9]++;for(;e<=279;)gr[e*2+1]=7,e++,a[7]++;for(;e<=287;)gr[e*2+1]=8,e++,a[8]++;for(Lv(gr,hl+1,a),e=0;e<Ja;e++)dl[e*2+1]=5,dl[e*2]=Pv(e,5);Dv=new op(gr,ip,fl+1,hl,Xi),Rv=new op(dl,hf,0,Ja,Xi),Fv=new op(new Array(0),z7,0,tp,N7)}function Ov(e){var t;for(t=0;t<hl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ja;t++)e.dyn_dtree[t*2]=0;for(t=0;t<tp;t++)e.bl_tree[t*2]=0;e.dyn_ltree[rp*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Nv(e){e.bi_valid>8?ml(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 j7(e,t,n,r){Nv(e),r&&(ml(e,n),ml(e,~n)),D7.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function zv(e,t,n,r){var i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function lp(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&zv(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!zv(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function Uv(e,t,n){var r,i,a=0,o,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],i=e.pending_buf[e.l_buf+a],a++,r===0?Zn(e,i,t):(o=gl[i],Zn(e,o+fl+1,t),s=ip[o],s!==0&&(i-=ap[o],Gt(e,i,s)),r--,o=Mv(r),Zn(e,o,n),s=hf[o],s!==0&&(r-=df[o],Gt(e,r,s)));while(a<e.last_lit);Zn(e,rp,t)}function up(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,u=-1,l;for(e.heap_len=0,e.heap_max=Cv,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=u,o=e.heap_len>>1;o>=1;o--)lp(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],lp(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,lp(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],H7(e,t),Lv(n,u,e.bl_count)}function Gv(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<u&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[kv*2]++):s<=10?e.bl_tree[Tv*2]++:e.bl_tree[Iv*2]++,s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4))}function Hv(e,t,n){var r,i=-1,a,o=t[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<u&&a===o)){if(s<l)do Zn(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Zn(e,a,e.bl_tree),s--),Zn(e,kv,e.bl_tree),Gt(e,s-3,2)):s<=10?(Zn(e,Tv,e.bl_tree),Gt(e,s-3,3)):(Zn(e,Iv,e.bl_tree),Gt(e,s-11,7));s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4)}}function $7(e){var t;for(Gv(e,e.dyn_ltree,e.l_desc.max_code),Gv(e,e.dyn_dtree,e.d_desc.max_code),up(e,e.bl_desc),t=tp-1;t>=3&&e.bl_tree[Bv[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function q7(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[Bv[i]*2+1],3);Hv(e,e.dyn_ltree,t-1),Hv(e,e.dyn_dtree,n-1)}function W7(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return Ev;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return _v;for(n=32;n<fl;n++)if(e.dyn_ltree[n*2]!==0)return _v;return Ev}var Vv=!1;function Z7(e){Vv||(V7(),Vv=!0),e.l_desc=new sp(e.dyn_ltree,Dv),e.d_desc=new sp(e.dyn_dtree,Rv),e.bl_desc=new sp(e.bl_tree,Fv),e.bi_buf=0,e.bi_valid=0,Ov(e)}function jv(e,t,n,r){Gt(e,(M7<<1)+(r?1:0),3),j7(e,t,n,!0)}function Y7(e){Gt(e,Sv<<1,3),Zn(e,rp,gr),G7(e)}function Q7(e,t,n,r){var i,a,o=0;e.level>0?(e.strm.data_type===F7&&(e.strm.data_type=W7(e)),up(e,e.l_desc),up(e,e.d_desc),o=$7(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?jv(e,t,n,r):e.strategy===R7||a===i?(Gt(e,(Sv<<1)+(r?1:0),3),Uv(e,gr,dl)):(Gt(e,(P7<<1)+(r?1:0),3),q7(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Uv(e,e.dyn_ltree,e.dyn_dtree)),Ov(e),r&&Nv(e)}function X7(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[(gl[n]+fl+1)*2]++,e.dyn_dtree[Mv(t)*2]++),e.last_lit===e.lit_bufsize-1}Xa._tr_init=Z7,Xa._tr_stored_block=jv,Xa._tr_flush_block=Q7,Xa._tr_tally=X7,Xa._tr_align=Y7;function K7(e,t,n,r){for(var i=e&65535|0,a=e>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0}var $v=K7;function J7(){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 eM=J7();function tM(e,t,n,r){var i=eM,a=r+n;e^=-1;for(var o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1}var qv=tM,cp={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"},Rt=pr,ln=Xa,Wv=$v,ti=qv,nM=cp,Ki=0,rM=1,iM=3,ni=4,Zv=5,Yn=0,Yv=1,un=-2,aM=-3,fp=-5,oM=-1,sM=1,pf=2,lM=3,uM=4,cM=0,fM=2,gf=8,hM=9,dM=15,pM=8,gM=29,mM=256,hp=mM+1+gM,bM=30,yM=19,wM=2*hp+1,vM=15,de=3,ri=258,Cn=ri+de+1,xM=32,mf=42,dp=69,bf=73,yf=91,wf=103,Ji=113,bl=666,st=1,yl=2,ea=3,eo=4,AM=3;function ii(e,t){return e.msg=nM[t],t}function Qv(e){return(e<<1)-(e>4?9:0)}function ai(e){for(var t=e.length;--t>=0;)e[t]=0}function oi(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Rt.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 wt(e,t){ln._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,oi(e.strm)}function ve(e,t){e.pending_buf[e.pending++]=t}function wl(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function EM(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Rt.arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=Wv(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ti(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function Xv(e,t){var n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-Cn?e.strstart-(e.w_size-Cn):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+ri,d=l[r+o-1],p=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+o]!==p||l[i+o-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(a=ri-(h-r),r=h-ri,a>o){if(e.match_start=t,o=a,a>=s)break;d=l[r+o-1],p=l[r+o]}}while((t=f[t&c])>u&&--n!==0);return o<=e.lookahead?o:e.lookahead}function ta(e){var t=e.w_size,n,r,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Cn)){Rt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);a+=t}if(e.strm.avail_in===0)break;if(r=EM(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=de)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+de-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<de)););}while(e.lookahead<Cn&&e.strm.avail_in!==0)}function _M(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ta(e),e.lookahead===0&&t===Ki)return st;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,wt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Cn&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=0,t===ni?(wt(e,!0),e.strm.avail_out===0?ea:eo):(e.strstart>e.block_start&&(wt(e,!1),e.strm.avail_out===0),st)}function pp(e,t){for(var n,r;;){if(e.lookahead<Cn){if(ta(e),e.lookahead<Cn&&t===Ki)return st;if(e.lookahead===0)break}if(n=0,e.lookahead>=de&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-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-Cn&&(e.match_length=Xv(e,n)),e.match_length>=de)if(r=ln._tr_tally(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=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-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=ln._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=e.strstart<de-1?e.strstart:de-1,t===ni?(wt(e,!0),e.strm.avail_out===0?ea:eo):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:yl}function to(e,t){for(var n,r,i;;){if(e.lookahead<Cn){if(ta(e),e.lookahead<Cn&&t===Ki)return st;if(e.lookahead===0)break}if(n=0,e.lookahead>=de&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-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=de-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Cn&&(e.match_length=Xv(e,n),e.match_length<=5&&(e.strategy===sM||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=ln._tr_tally(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=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-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=de-1,e.strstart++,r&&(wt(e,!1),e.strm.avail_out===0))return st}else if(e.match_available){if(r=ln._tr_tally(e,0,e.window[e.strstart-1]),r&&wt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return st}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=ln._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<de-1?e.strstart:de-1,t===ni?(wt(e,!0),e.strm.avail_out===0?ea:eo):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:yl}function SM(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=ri){if(ta(e),e.lookahead<=ri&&t===Ki)return st;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=de&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+ri;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=ri-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=de?(n=ln._tr_tally(e,1,e.match_length-de),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=ln._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=0,t===ni?(wt(e,!0),e.strm.avail_out===0?ea:eo):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:yl}function CM(e,t){for(var n;;){if(e.lookahead===0&&(ta(e),e.lookahead===0)){if(t===Ki)return st;break}if(e.match_length=0,n=ln._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=0,t===ni?(wt(e,!0),e.strm.avail_out===0?ea:eo):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:yl}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 no;no=[new Qn(0,0,0,0,_M),new Qn(4,4,8,4,pp),new Qn(4,5,16,8,pp),new Qn(4,6,32,32,pp),new Qn(4,4,16,16,to),new Qn(8,16,32,32,to),new Qn(8,16,128,128,to),new Qn(8,32,128,256,to),new Qn(32,128,258,1024,to),new Qn(32,258,258,4096,to)];function kM(e){e.window_size=2*e.w_size,ai(e.head),e.max_lazy_match=no[e.level].max_lazy,e.good_match=no[e.level].good_length,e.nice_match=no[e.level].nice_length,e.max_chain_length=no[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 TM(){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=gf,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 Rt.Buf16(wM*2),this.dyn_dtree=new Rt.Buf16((2*bM+1)*2),this.bl_tree=new Rt.Buf16((2*yM+1)*2),ai(this.dyn_ltree),ai(this.dyn_dtree),ai(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Rt.Buf16(vM+1),this.heap=new Rt.Buf16(2*hp+1),ai(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Rt.Buf16(2*hp+1),ai(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 Kv(e){var t;return!e||!e.state?ii(e,un):(e.total_in=e.total_out=0,e.data_type=fM,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?mf:Ji,e.adler=t.wrap===2?0:1,t.last_flush=Ki,ln._tr_init(t),Yn)}function Jv(e){var t=Kv(e);return t===Yn&&kM(e.state),t}function IM(e,t){return!e||!e.state||e.state.wrap!==2?un:(e.state.gzhead=t,Yn)}function ex(e,t,n,r,i,a){if(!e)return un;var o=1;if(t===oM&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>hM||n!==gf||r<8||r>15||t<0||t>9||a<0||a>uM)return ii(e,un);r===8&&(r=9);var s=new TM;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+de-1)/de),s.window=new Rt.Buf8(s.w_size*2),s.head=new Rt.Buf16(s.hash_size),s.prev=new Rt.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Rt.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=t,s.strategy=a,s.method=n,Jv(e)}function BM(e,t){return ex(e,t,gf,dM,pM,cM)}function DM(e,t){var n,r,i,a;if(!e||!e.state||t>Zv||t<0)return e?ii(e,un):un;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===bl&&t!==ni)return ii(e,e.avail_out===0?fp:un);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===mf)if(r.wrap===2)e.adler=0,ve(r,31),ve(r,139),ve(r,8),r.gzhead?(ve(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)),ve(r,r.gzhead.time&255),ve(r,r.gzhead.time>>8&255),ve(r,r.gzhead.time>>16&255),ve(r,r.gzhead.time>>24&255),ve(r,r.level===9?2:r.strategy>=pf||r.level<2?4:0),ve(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(ve(r,r.gzhead.extra.length&255),ve(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=ti(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=dp):(ve(r,0),ve(r,0),ve(r,0),ve(r,0),ve(r,0),ve(r,r.level===9?2:r.strategy>=pf||r.level<2?4:0),ve(r,AM),r.status=Ji);else{var o=gf+(r.w_bits-8<<4)<<8,s=-1;r.strategy>=pf||r.level<2?s=0:r.level<6?s=1:r.level===6?s=2:s=3,o|=s<<6,r.strstart!==0&&(o|=xM),o+=31-o%31,r.status=Ji,wl(r,o),r.strstart!==0&&(wl(r,e.adler>>>16),wl(r,e.adler&65535)),e.adler=1}if(r.status===dp)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=ti(e.adler,r.pending_buf,r.pending-i,i)),oi(e),i=r.pending,r.pending===r.pending_buf_size));)ve(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=ti(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=bf)}else r.status=bf;if(r.status===bf)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=ti(e.adler,r.pending_buf,r.pending-i,i)),oi(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}r.gzindex<r.gzhead.name.length?a=r.gzhead.name.charCodeAt(r.gzindex++)&255:a=0,ve(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=ti(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=yf)}else r.status=yf;if(r.status===yf)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=ti(e.adler,r.pending_buf,r.pending-i,i)),oi(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}r.gzindex<r.gzhead.comment.length?a=r.gzhead.comment.charCodeAt(r.gzindex++)&255:a=0,ve(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=ti(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=wf)}else r.status=wf;if(r.status===wf&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&oi(e),r.pending+2<=r.pending_buf_size&&(ve(r,e.adler&255),ve(r,e.adler>>8&255),e.adler=0,r.status=Ji)):r.status=Ji),r.pending!==0){if(oi(e),e.avail_out===0)return r.last_flush=-1,Yn}else if(e.avail_in===0&&Qv(t)<=Qv(n)&&t!==ni)return ii(e,fp);if(r.status===bl&&e.avail_in!==0)return ii(e,fp);if(e.avail_in!==0||r.lookahead!==0||t!==Ki&&r.status!==bl){var u=r.strategy===pf?CM(r,t):r.strategy===lM?SM(r,t):no[r.level].func(r,t);if((u===ea||u===eo)&&(r.status=bl),u===st||u===ea)return e.avail_out===0&&(r.last_flush=-1),Yn;if(u===yl&&(t===rM?ln._tr_align(r):t!==Zv&&(ln._tr_stored_block(r,0,0,!1),t===iM&&(ai(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),oi(e),e.avail_out===0))return r.last_flush=-1,Yn}return t!==ni?Yn:r.wrap<=0?Yv:(r.wrap===2?(ve(r,e.adler&255),ve(r,e.adler>>8&255),ve(r,e.adler>>16&255),ve(r,e.adler>>24&255),ve(r,e.total_in&255),ve(r,e.total_in>>8&255),ve(r,e.total_in>>16&255),ve(r,e.total_in>>24&255)):(wl(r,e.adler>>>16),wl(r,e.adler&65535)),oi(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Yn:Yv)}function RM(e){var t;return!e||!e.state?un:(t=e.state.status,t!==mf&&t!==dp&&t!==bf&&t!==yf&&t!==wf&&t!==Ji&&t!==bl?ii(e,un):(e.state=null,t===Ji?ii(e,aM):Yn))}function FM(e,t){var n=t.length,r,i,a,o,s,u,l,c;if(!e||!e.state||(r=e.state,o=r.wrap,o===2||o===1&&r.status!==mf||r.lookahead))return un;for(o===1&&(e.adler=Wv(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(o===0&&(ai(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new Rt.Buf8(r.w_size),Rt.arraySet(c,t,n-r.w_size,r.w_size,0),t=c,n=r.w_size),s=e.avail_in,u=e.next_in,l=e.input,e.avail_in=n,e.next_in=0,e.input=t,ta(r);r.lookahead>=de;){i=r.strstart,a=r.lookahead-(de-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+de-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--a);r.strstart=i,r.lookahead=de-1,ta(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=u,e.input=l,e.avail_in=s,r.wrap=o,Yn}Wn.deflateInit=BM,Wn.deflateInit2=ex,Wn.deflateReset=Jv,Wn.deflateResetKeep=Kv,Wn.deflateSetHeader=IM,Wn.deflate=DM,Wn.deflateEnd=RM,Wn.deflateSetDictionary=FM,Wn.deflateInfo="pako deflate (from Nodeca project)";var na={},vf=pr,tx=!0,nx=!0;try{String.fromCharCode.apply(null,[0])}catch{tx=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{nx=!1}for(var vl=new vf.Buf8(256),si=0;si<256;si++)vl[si]=si>=252?6:si>=248?5:si>=240?4:si>=224?3:si>=192?2:1;vl[254]=vl[254]=1,na.string2buf=function(e){var t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new vf.Buf8(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};function rx(e,t){if(t<65534&&(e.subarray&&nx||!e.subarray&&tx))return String.fromCharCode.apply(null,vf.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}na.buf2binstring=function(e){return rx(e,e.length)},na.binstring2buf=function(e){for(var t=new vf.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},na.buf2string=function(e,t){var n,r,i,a,o=t||e.length,s=new Array(o*2);for(r=0,n=0;n<o;){if(i=e[n++],i<128){s[r++]=i;continue}if(a=vl[i],a>4){s[r++]=65533,n+=a-1;continue}for(i&=a===2?31:a===3?15:7;a>1&&n<o;)i=i<<6|e[n++]&63,a--;if(a>1){s[r++]=65533;continue}i<65536?s[r++]=i:(i-=65536,s[r++]=55296|i>>10&1023,s[r++]=56320|i&1023)}return rx(s,r)},na.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+vl[e[n]]>t?n:t};function MM(){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 ix=MM,xl=Wn,Al=pr,gp=na,mp=cp,PM=ix,ax=Object.prototype.toString,LM=0,bp=4,ro=0,ox=1,sx=2,OM=-1,NM=0,zM=8;function ra(e){if(!(this instanceof ra))return new ra(e);this.options=Al.assign({level:OM,method:zM,chunkSize:16384,windowBits:15,memLevel:8,strategy:NM,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 PM,this.strm.avail_out=0;var n=xl.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==ro)throw new Error(mp[n]);if(t.header&&xl.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=gp.string2buf(t.dictionary):ax.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=xl.deflateSetDictionary(this.strm,r),n!==ro)throw new Error(mp[n]);this._dict_set=!0}}ra.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;a=t===~~t?t:t===!0?bp:LM,typeof e=="string"?n.input=gp.string2buf(e):ax.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 Al.Buf8(r),n.next_out=0,n.avail_out=r),i=xl.deflate(n,a),i!==ox&&i!==ro)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(a===bp||a===sx))&&(this.options.to==="string"?this.onData(gp.buf2binstring(Al.shrinkBuf(n.output,n.next_out))):this.onData(Al.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==ox);return a===bp?(i=xl.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ro):(a===sx&&(this.onEnd(ro),n.avail_out=0),!0)},ra.prototype.onData=function(e){this.chunks.push(e)},ra.prototype.onEnd=function(e){e===ro&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Al.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function yp(e,t){var n=new ra(t);if(n.push(e,!0),n.err)throw n.msg||mp[n.err];return n.result}function UM(e,t){return t=t||{},t.raw=!0,yp(e,t)}function GM(e,t){return t=t||{},t.gzip=!0,yp(e,t)}cl.Deflate=ra,cl.deflate=yp,cl.deflateRaw=UM,cl.gzip=GM;var El={},kn={},xf=30,HM=12,VM=function(t,n){var r,i,a,o,s,u,l,c,f,h,d,p,m,y,w,A,S,_,T,I,B,R,M,G,N;r=t.state,i=t.next_in,G=t.input,a=i+(t.avail_in-5),o=t.next_out,N=t.output,s=o-(n-t.avail_out),u=o+(t.avail_out-257),l=r.dmax,c=r.wsize,f=r.whave,h=r.wnext,d=r.window,p=r.hold,m=r.bits,y=r.lencode,w=r.distcode,A=(1<<r.lenbits)-1,S=(1<<r.distbits)-1;e:do{m<15&&(p+=G[i++]<<m,m+=8,p+=G[i++]<<m,m+=8),_=y[p&A];t:for(;;){if(T=_>>>24,p>>>=T,m-=T,T=_>>>16&255,T===0)N[o++]=_&65535;else if(T&16){I=_&65535,T&=15,T&&(m<T&&(p+=G[i++]<<m,m+=8),I+=p&(1<<T)-1,p>>>=T,m-=T),m<15&&(p+=G[i++]<<m,m+=8,p+=G[i++]<<m,m+=8),_=w[p&S];n:for(;;){if(T=_>>>24,p>>>=T,m-=T,T=_>>>16&255,T&16){if(B=_&65535,T&=15,m<T&&(p+=G[i++]<<m,m+=8,m<T&&(p+=G[i++]<<m,m+=8)),B+=p&(1<<T)-1,B>l){t.msg="invalid distance too far back",r.mode=xf;break e}if(p>>>=T,m-=T,T=o-s,B>T){if(T=B-T,T>f&&r.sane){t.msg="invalid distance too far back",r.mode=xf;break e}if(R=0,M=d,h===0){if(R+=c-T,T<I){I-=T;do N[o++]=d[R++];while(--T);R=o-B,M=N}}else if(h<T){if(R+=c+h-T,T-=h,T<I){I-=T;do N[o++]=d[R++];while(--T);if(R=0,h<I){T=h,I-=T;do N[o++]=d[R++];while(--T);R=o-B,M=N}}}else if(R+=h-T,T<I){I-=T;do N[o++]=d[R++];while(--T);R=o-B,M=N}for(;I>2;)N[o++]=M[R++],N[o++]=M[R++],N[o++]=M[R++],I-=3;I&&(N[o++]=M[R++],I>1&&(N[o++]=M[R++]))}else{R=o-B;do N[o++]=N[R++],N[o++]=N[R++],N[o++]=N[R++],I-=3;while(I>2);I&&(N[o++]=N[R++],I>1&&(N[o++]=N[R++]))}}else if(T&64){t.msg="invalid distance code",r.mode=xf;break e}else{_=w[(_&65535)+(p&(1<<T)-1)];continue n}break}}else if(T&64)if(T&32){r.mode=HM;break e}else{t.msg="invalid literal/length code",r.mode=xf;break e}else{_=y[(_&65535)+(p&(1<<T)-1)];continue t}break}}while(i<a&&o<u);I=m>>3,i-=I,m-=I<<3,p&=(1<<m)-1,t.next_in=i,t.next_out=o,t.avail_in=i<a?5+(a-i):5-(i-a),t.avail_out=o<u?257+(u-o):257-(o-u),r.hold=p,r.bits=m},lx=pr,io=15,ux=852,cx=592,fx=0,wp=1,hx=2,jM=[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],$M=[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],qM=[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],WM=[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],ZM=function(t,n,r,i,a,o,s,u){var l=u.bits,c=0,f=0,h=0,d=0,p=0,m=0,y=0,w=0,A=0,S=0,_,T,I,B,R,M=null,G=0,N,re=new lx.Buf16(io+1),se=new lx.Buf16(io+1),te=null,ge=0,Xe,De,Je;for(c=0;c<=io;c++)re[c]=0;for(f=0;f<i;f++)re[n[r+f]]++;for(p=l,d=io;d>=1&&re[d]===0;d--);if(p>d&&(p=d),d===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,u.bits=1,0;for(h=1;h<d&&re[h]===0;h++);for(p<h&&(p=h),w=1,c=1;c<=io;c++)if(w<<=1,w-=re[c],w<0)return-1;if(w>0&&(t===fx||d!==1))return-1;for(se[1]=0,c=1;c<io;c++)se[c+1]=se[c]+re[c];for(f=0;f<i;f++)n[r+f]!==0&&(s[se[n[r+f]]++]=f);if(t===fx?(M=te=s,N=19):t===wp?(M=jM,G-=257,te=$M,ge-=257,N=256):(M=qM,te=WM,N=-1),S=0,f=0,c=h,R=o,m=p,y=0,I=-1,A=1<<p,B=A-1,t===wp&&A>ux||t===hx&&A>cx)return 1;for(;;){Xe=c-y,s[f]<N?(De=0,Je=s[f]):s[f]>N?(De=te[ge+s[f]],Je=M[G+s[f]]):(De=32+64,Je=0),_=1<<c-y,T=1<<m,h=T;do T-=_,a[R+(S>>y)+T]=Xe<<24|De<<16|Je|0;while(T!==0);for(_=1<<c-1;S&_;)_>>=1;if(_!==0?(S&=_-1,S+=_):S=0,f++,--re[c]===0){if(c===d)break;c=n[r+s[f]]}if(c>p&&(S&B)!==I){for(y===0&&(y=p),R+=h,m=c-y,w=1<<m;m+y<d&&(w-=re[m+y],!(w<=0));)m++,w<<=1;if(A+=1<<m,t===wp&&A>ux||t===hx&&A>cx)return 1;I=S&B,a[I]=p<<24|m<<16|R-o|0}}return S!==0&&(a[R+S]=c-y<<24|64<<16|0),u.bits=p,0},Xt=pr,vp=$v,Xn=qv,YM=VM,_l=ZM,QM=0,dx=1,px=2,gx=4,XM=5,Af=6,ia=0,KM=1,JM=2,cn=-2,mx=-3,bx=-4,eP=-5,yx=8,wx=1,vx=2,xx=3,Ax=4,Ex=5,_x=6,Sx=7,Cx=8,kx=9,Tx=10,Ef=11,mr=12,xp=13,Ix=14,Ap=15,Bx=16,Dx=17,Rx=18,Fx=19,_f=20,Sf=21,Mx=22,Px=23,Lx=24,Ox=25,Nx=26,Ep=27,zx=28,Ux=29,$e=30,Gx=31,tP=32,nP=852,rP=592,iP=15,aP=iP;function Hx(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function oP(){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 Vx(e){var t;return!e||!e.state?cn:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=wx,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(nP),t.distcode=t.distdyn=new Xt.Buf32(rP),t.sane=1,t.back=-1,ia)}function jx(e){var t;return!e||!e.state?cn:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Vx(e))}function $x(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))?cn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,jx(e))}function qx(e,t){var n,r;return e?(r=new oP,e.state=r,r.window=null,n=$x(e,t),n!==ia&&(e.state=null),n):cn}function sP(e){return qx(e,aP)}var Wx=!0,_p,Sp;function lP(e){if(Wx){var t;for(_p=new Xt.Buf32(512),Sp=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(_l(dx,e.lens,0,288,_p,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;_l(px,e.lens,0,32,Sp,0,e.work,{bits:5}),Wx=!1}e.lencode=_p,e.lenbits=9,e.distcode=Sp,e.distbits=5}function Zx(e,t,n,r){var i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Xt.Buf8(a.wsize)),r>=a.wsize?(Xt.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),Xt.arraySet(a.window,t,n-r,i,a.wnext),r-=i,r?(Xt.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}function uP(e,t){var n,r,i,a,o,s,u,l,c,f,h,d,p,m,y=0,w,A,S,_,T,I,B,R,M=new Xt.Buf8(4),G,N,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 cn;n=e.state,n.mode===mr&&(n.mode=xp),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,f=s,h=u,R=ia;e:for(;;)switch(n.mode){case wx:if(n.wrap===0){n.mode=xp;break}for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.wrap&2&&l===35615){n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0),l=0,c=0,n.mode=vx;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=$e;break}if((l&15)!==yx){e.msg="unknown compression method",n.mode=$e;break}if(l>>>=4,c-=4,B=(l&15)+8,n.wbits===0)n.wbits=B;else if(B>n.wbits){e.msg="invalid window size",n.mode=$e;break}n.dmax=1<<B,e.adler=n.check=1,n.mode=l&512?Tx:mr,l=0,c=0;break;case vx:for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.flags=l,(n.flags&255)!==yx){e.msg="unknown compression method",n.mode=$e;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=$e;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0)),l=0,c=0,n.mode=xx;case xx:for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=Xn(n.check,M,4,0)),l=0,c=0,n.mode=Ax;case Ax:for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=Xn(n.check,M,2,0)),l=0,c=0,n.mode=Ex;case Ex:if(n.flags&1024){for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=Xn(n.check,M,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=_x;case _x:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(B=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Xt.arraySet(n.head.extra,r,a,d,B)),n.flags&512&&(n.check=Xn(n.check,r,d,a)),s-=d,a+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Sx;case Sx:if(n.flags&2048){if(s===0)break e;d=0;do B=r[a+d++],n.head&&B&&n.length<65536&&(n.head.name+=String.fromCharCode(B));while(B&&d<s);if(n.flags&512&&(n.check=Xn(n.check,r,d,a)),s-=d,a+=d,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Cx;case Cx:if(n.flags&4096){if(s===0)break e;d=0;do B=r[a+d++],n.head&&B&&n.length<65536&&(n.head.comment+=String.fromCharCode(B));while(B&&d<s);if(n.flags&512&&(n.check=Xn(n.check,r,d,a)),s-=d,a+=d,B)break e}else n.head&&(n.head.comment=null);n.mode=kx;case kx:if(n.flags&512){for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=$e;break}l=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=mr;break;case Tx:for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}e.adler=n.check=Hx(l),l=0,c=0,n.mode=Ef;case Ef:if(n.havedict===0)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,JM;e.adler=n.check=1,n.mode=mr;case mr:if(t===XM||t===Af)break e;case xp:if(n.last){l>>>=c&7,c-=c&7,n.mode=Ep;break}for(;c<3;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}switch(n.last=l&1,l>>>=1,c-=1,l&3){case 0:n.mode=Ix;break;case 1:if(lP(n),n.mode=_f,t===Af){l>>>=2,c-=2;break e}break;case 2:n.mode=Dx;break;case 3:e.msg="invalid block type",n.mode=$e}l>>>=2,c-=2;break;case Ix:for(l>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=$e;break}if(n.length=l&65535,l=0,c=0,n.mode=Ap,t===Af)break e;case Ap:n.mode=Bx;case Bx:if(d=n.length,d){if(d>s&&(d=s),d>u&&(d=u),d===0)break e;Xt.arraySet(i,r,a,d,o),s-=d,a+=d,u-=d,o+=d,n.length-=d;break}n.mode=mr;break;case Dx:for(;c<14;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.nlen=(l&31)+257,l>>>=5,c-=5,n.ndist=(l&31)+1,l>>>=5,c-=5,n.ncode=(l&15)+4,l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=$e;break}n.have=0,n.mode=Rx;case Rx:for(;n.have<n.ncode;){for(;c<3;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.lens[re[n.have++]]=l&7,l>>>=3,c-=3}for(;n.have<19;)n.lens[re[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},R=_l(QM,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,R){e.msg="invalid code lengths set",n.mode=$e;break}n.have=0,n.mode=Fx;case Fx:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(S<16)l>>>=w,c-=w,n.lens[n.have++]=S;else{if(S===16){for(N=w+2;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(l>>>=w,c-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=$e;break}B=n.lens[n.have-1],d=3+(l&3),l>>>=2,c-=2}else if(S===17){for(N=w+3;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=w,c-=w,B=0,d=3+(l&7),l>>>=3,c-=3}else{for(N=w+7;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=w,c-=w,B=0,d=11+(l&127),l>>>=7,c-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=$e;break}for(;d--;)n.lens[n.have++]=B}}if(n.mode===$e)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=$e;break}if(n.lenbits=9,G={bits:n.lenbits},R=_l(dx,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,R){e.msg="invalid literal/lengths set",n.mode=$e;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},R=_l(px,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,R){e.msg="invalid distances set",n.mode=$e;break}if(n.mode=_f,t===Af)break e;case _f:n.mode=Sf;case Sf:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,YM(e,h),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,n.mode===mr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(A&&!(A&240)){for(_=w,T=A,I=S;y=n.lencode[I+((l&(1<<_+T)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,n.length=S,A===0){n.mode=Nx;break}if(A&32){n.back=-1,n.mode=mr;break}if(A&64){e.msg="invalid literal/length code",n.mode=$e;break}n.extra=A&15,n.mode=Mx;case Mx:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Px;case Px:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(!(A&240)){for(_=w,T=A,I=S;y=n.distcode[I+((l&(1<<_+T)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,A&64){e.msg="invalid distance code",n.mode=$e;break}n.offset=S,n.extra=A&15,n.mode=Lx;case Lx:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=$e;break}n.mode=Ox;case Ox:if(u===0)break e;if(d=h-u,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=$e;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),m=n.window}else m=i,p=o-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[o++]=m[p++];while(--d);n.length===0&&(n.mode=Sf);break;case Nx:if(u===0)break e;i[o++]=n.length,u--,n.mode=Sf;break;case Ep:if(n.wrap){for(;c<32;){if(s===0)break e;s--,l|=r[a++]<<c,c+=8}if(h-=u,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?Xn(n.check,i,h,o-h):vp(n.check,i,h,o-h)),h=u,(n.flags?l:Hx(l))!==n.check){e.msg="incorrect data check",n.mode=$e;break}l=0,c=0}n.mode=zx;case zx:if(n.wrap&&n.flags){for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=$e;break}l=0,c=0}n.mode=Ux;case Ux:R=KM;break e;case $e:R=mx;break e;case Gx:return bx;case tP:default:return cn}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<$e&&(n.mode<Ep||t!==gx))&&Zx(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?Xn(n.check,i,h,e.next_out-h):vp(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===mr?128:0)+(n.mode===_f||n.mode===Ap?256:0),(f===0&&h===0||t===gx)&&R===ia&&(R=eP),R}function cP(e){if(!e||!e.state)return cn;var t=e.state;return t.window&&(t.window=null),e.state=null,ia}function fP(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?cn:(n.head=t,t.done=!1,ia)}function hP(e,t){var n=t.length,r,i,a;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==Ef)?cn:r.mode===Ef&&(i=1,i=vp(i,t,n,0),i!==r.check)?mx:(a=Zx(e,t,n,n),a?(r.mode=Gx,bx):(r.havedict=1,ia))}kn.inflateReset=jx,kn.inflateReset2=$x,kn.inflateResetKeep=Vx,kn.inflateInit=sP,kn.inflateInit2=qx,kn.inflate=uP,kn.inflateEnd=cP,kn.inflateGetHeader=fP,kn.inflateSetDictionary=hP,kn.inflateInfo="pako inflate (from Nodeca project)";var Yx={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 dP(){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 pP=dP,ao=kn,Sl=pr,Cf=na,nt=Yx,Cp=cp,gP=ix,mP=pP,Qx=Object.prototype.toString;function aa(e){if(!(this instanceof aa))return new aa(e);this.options=Sl.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 gP,this.strm.avail_out=0;var n=ao.inflateInit2(this.strm,t.windowBits);if(n!==nt.Z_OK)throw new Error(Cp[n]);if(this.header=new mP,ao.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Cf.string2buf(t.dictionary):Qx.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ao.inflateSetDictionary(this.strm,t.dictionary),n!==nt.Z_OK)))throw new Error(Cp[n])}aa.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s,u,l,c=!1;if(this.ended)return!1;o=t===~~t?t:t===!0?nt.Z_FINISH:nt.Z_NO_FLUSH,typeof e=="string"?n.input=Cf.binstring2buf(e):Qx.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),a=ao.inflate(n,nt.Z_NO_FLUSH),a===nt.Z_NEED_DICT&&i&&(a=ao.inflateSetDictionary(this.strm,i)),a===nt.Z_BUF_ERROR&&c===!0&&(a=nt.Z_OK,c=!1),a!==nt.Z_STREAM_END&&a!==nt.Z_OK)return this.onEnd(a),this.ended=!0,!1;n.next_out&&(n.avail_out===0||a===nt.Z_STREAM_END||n.avail_in===0&&(o===nt.Z_FINISH||o===nt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Cf.utf8border(n.output,n.next_out),u=n.next_out-s,l=Cf.buf2string(n.output,s),n.next_out=u,n.avail_out=r-u,u&&Sl.arraySet(n.output,n.output,s,u,0),this.onData(l)):this.onData(Sl.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(c=!0)}while((n.avail_in>0||n.avail_out===0)&&a!==nt.Z_STREAM_END);return a===nt.Z_STREAM_END&&(o=nt.Z_FINISH),o===nt.Z_FINISH?(a=ao.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===nt.Z_OK):(o===nt.Z_SYNC_FLUSH&&(this.onEnd(nt.Z_OK),n.avail_out=0),!0)},aa.prototype.onData=function(e){this.chunks.push(e)},aa.prototype.onEnd=function(e){e===nt.Z_OK&&(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 kp(e,t){var n=new aa(t);if(n.push(e,!0),n.err)throw n.msg||Cp[n.err];return n.result}function bP(e,t){return t=t||{},t.raw=!0,kp(e,t)}El.Inflate=aa,El.inflate=kp,El.inflateRaw=bP,El.ungzip=kp;var yP=pr.assign,wP=cl,vP=El,xP=Yx,Xx={};yP(Xx,wP,vP,xP);var kf=Xx;async function li(e){try{let t,n=0,r=0;const i=[];let a=0,o;do{const u=e.subarray(n);if(o=new kf.Inflate,{strm:t}=o,o.push(u,kf.Z_SYNC_FLUSH),o.err)throw new Error(o.msg);n+=t.next_in,i[r]=o.result,a+=i[r].length,r+=1}while(t.avail_in);const s=new Uint8Array(a);for(let u=0,l=0;u<i.length;u++)s.set(i[u],l),l+=i[u].length;return me.Buffer.from(s)}catch(t){throw`${t}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function Kx(e,t){try{let n;const{minv:r,maxv:i}=t;let a=r.blockPosition,o=r.dataPosition;const s=[],u=[],l=[];let c=0,f=0;do{const p=e.subarray(a-r.blockPosition),m=new kf.Inflate;if({strm:n}=m,m.push(p,kf.Z_SYNC_FLUSH),m.err)throw new Error(m.msg);const y=m.result;s.push(y);let w=y.length;u.push(a),l.push(o),s.length===1&&r.dataPosition&&(s[0]=s[0].subarray(r.dataPosition),w=s[0].length);const A=a;if(a+=n.next_in,o+=w,A>=i.blockPosition){s[f]=s[f].subarray(0,i.blockPosition===r.blockPosition?i.dataPosition-r.dataPosition+1:i.dataPosition+1),u.push(a),l.push(o),c+=s[f].length;break}c+=s[f].length,f++}while(n.avail_in);const h=new Uint8Array(c);for(let p=0,m=0;p<s.length;p++)h.set(s[p],m),m+=s[p].length;return{buffer:me.Buffer.from(h),cpositions:u,dpositions:l}}catch(n){throw`${n}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):n}}var AP=Le,fn=null;try{fn=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 Jx={},eA={};function oa(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=eA[e],r)?r:(n=Oe(e,(e|0)<0?-1:0,!0),i&&(eA[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=Jx[e],r)?r:(n=Oe(e,e<0?-1:0,!1),i&&(Jx[e]=n),n))}Le.fromInt=oa;function hn(e,t){if(isNaN(e))return t?sa:dn;if(t){if(e<0)return sa;if(e>=nA)return sA}else{if(e<=-rA)return Vt;if(e+1>=rA)return oA}return e<0?hn(-e,t).neg():Oe(e%oo|0,e/oo|0,t)}Le.fromNumber=hn;function Oe(e,t,n){return new Le(e,t,n)}Le.fromBits=Oe;var Tf=Math.pow;function Tp(e,t,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return dn;if(typeof t=="number"?(n=t,t=!1):t=!!t,n=n||10,n<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(r===0)return Tp(e.substring(1),t,n).neg();for(var i=hn(Tf(n,8)),a=dn,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),u=parseInt(e.substring(o,o+s),n);if(s<8){var l=hn(Tf(n,s));a=a.mul(l).add(hn(u))}else a=a.mul(i),a=a.add(hn(u))}return a.unsigned=t,a}Le.fromString=Tp;function Tn(e,t){return typeof e=="number"?hn(e,t):typeof e=="string"?Tp(e,t):Oe(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Le.fromValue=Tn;var tA=65536,EP=1<<24,oo=tA*tA,nA=oo*oo,rA=nA/2,iA=oa(EP),dn=oa(0);Le.ZERO=dn;var sa=oa(0,!0);Le.UZERO=sa;var so=oa(1);Le.ONE=so;var aA=oa(1,!0);Le.UONE=aA;var Ip=oa(-1);Le.NEG_ONE=Ip;var oA=Oe(-1,2147483647,!1);Le.MAX_VALUE=oA;var sA=Oe(-1,-1,!0);Le.MAX_UNSIGNED_VALUE=sA;var Vt=Oe(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)*oo+(this.low>>>0):this.high*oo+(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=hn(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var a=hn(Tf(t,6),this.unsigned),o=this,s="";;){var u=o.div(a),l=o.sub(u.mul(a)).toInt()>>>0,c=l.toString(t);if(o=u,o.isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+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=Tn(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=Tn(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(so)},Y.neg=Y.negate,Y.add=function(t){Ht(t)||(t=Tn(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,a=this.low&65535,o=t.high>>>16,s=t.high&65535,u=t.low>>>16,l=t.low&65535,c=0,f=0,h=0,d=0;return d+=a+l,h+=d>>>16,d&=65535,h+=i+u,f+=h>>>16,h&=65535,f+=r+s,c+=f>>>16,f&=65535,c+=n+o,c&=65535,Oe(h<<16|d,c<<16|f,this.unsigned)},Y.subtract=function(t){return Ht(t)||(t=Tn(t)),this.add(t.neg())},Y.sub=Y.subtract,Y.multiply=function(t){if(this.isZero())return dn;if(Ht(t)||(t=Tn(t)),fn){var n=fn.mul(this.low,this.high,t.low,t.high);return Oe(n,fn.get_high(),this.unsigned)}if(t.isZero())return dn;if(this.eq(Vt))return t.isOdd()?Vt:dn;if(t.eq(Vt))return this.isOdd()?Vt:dn;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(iA)&&t.lt(iA))return hn(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,a=this.low>>>16,o=this.low&65535,s=t.high>>>16,u=t.high&65535,l=t.low>>>16,c=t.low&65535,f=0,h=0,d=0,p=0;return p+=o*c,d+=p>>>16,p&=65535,d+=a*c,h+=d>>>16,d&=65535,d+=o*l,h+=d>>>16,d&=65535,h+=i*c,f+=h>>>16,h&=65535,h+=a*l,f+=h>>>16,h&=65535,h+=o*u,f+=h>>>16,h&=65535,f+=r*c+i*l+a*u+o*s,f&=65535,Oe(d<<16|p,f<<16|h,this.unsigned)},Y.mul=Y.multiply,Y.divide=function(t){if(Ht(t)||(t=Tn(t)),t.isZero())throw Error("division by zero");if(fn){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?fn.div_u:fn.div_s)(this.low,this.high,t.low,t.high);return Oe(n,fn.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?sa:dn;var r,i,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return sa;if(t.gt(this.shru(1)))return aA;a=sa}else{if(this.eq(Vt)){if(t.eq(so)||t.eq(Ip))return Vt;if(t.eq(Vt))return so;var o=this.shr(1);return r=o.div(t).shl(1),r.eq(dn)?t.isNegative()?so:Ip:(i=this.sub(t.mul(r)),a=r.add(i.div(t)),a)}else if(t.eq(Vt))return this.unsigned?sa:dn;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=dn}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),u=s<=48?1:Tf(2,s-48),l=hn(r),c=l.mul(t);c.isNegative()||c.gt(i);)r-=u,l=hn(r,this.unsigned),c=l.mul(t);l.isZero()&&(l=so),a=a.add(l),i=i.sub(c)}return a},Y.div=Y.divide,Y.modulo=function(t){if(Ht(t)||(t=Tn(t)),fn){var n=(this.unsigned?fn.rem_u:fn.rem_s)(this.low,this.high,t.low,t.high);return Oe(n,fn.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},Y.mod=Y.modulo,Y.rem=Y.modulo,Y.not=function(){return Oe(~this.low,~this.high,this.unsigned)},Y.and=function(t){return Ht(t)||(t=Tn(t)),Oe(this.low&t.low,this.high&t.high,this.unsigned)},Y.or=function(t){return Ht(t)||(t=Tn(t)),Oe(this.low|t.low,this.high|t.high,this.unsigned)},Y.xor=function(t){return Ht(t)||(t=Tn(t)),Oe(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?Oe(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Oe(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?Oe(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Oe(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 Oe(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?Oe(n,0,this.unsigned):Oe(n>>>t-32,0,this.unsigned)},Y.shru=Y.shiftRightUnsigned,Y.shr_u=Y.shiftRightUnsigned,Y.toSigned=function(){return this.unsigned?Oe(this.low,this.high,!1):this},Y.toUnsigned=function(){return this.unsigned?this:Oe(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 If=ll(AP),Bf=1;class _P{constructor({filehandle:t,path:n}){if(t)this.filehandle=t;else if(n)this.filehandle=new dt(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(t,n=0,r=!0){const i=If.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=me.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=me.Buffer.allocUnsafe(i),await this.filehandle.read(t,0,i,8);for(let a=0;a<n;a+=1){const o=this._readLongWithOverflow(t,a*16),s=this._readLongWithOverflow(t,a*16+8);r[a+1]=[o,s]}return r}async getLastBlock(){const t=await this._getIndex();if(t.length)return t[t.length-1]}async getRelevantBlocksForRead(t,n){const r=n+t;if(t===0)return[];const i=await this._getIndex(),a=[],o=(h,d)=>{const p=h[Bf],m=d?d[Bf]:1/0;return p<=n&&m>n?0:p<n?-1:1};let s=0,u=i.length-1,l=Math.floor(i.length/2),c=o(i[l],i[l+1]);for(;c!==0;)c>0?u=l-1:c<0&&(s=l+1),l=Math.ceil((u-s)/2)+s,c=o(i[l],i[l+1]);a.push(i[l]);let f=l+1;for(;f<i.length&&(a.push(i[f]),!(i[f][Bf]>=r));f+=1);return a[a.length-1][Bf]<r&&a.push([]),a}}class lA{constructor({filehandle:t,path:n,gziFilehandle:r,gziPath:i}){if(t)this.filehandle=t;else if(n)this.filehandle=new dt(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 _P({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=me.Buffer.allocUnsafe(4),{bytesRead:i}=await this.filehandle.read(r,0,4,n-28-4);if(i!==4)throw new Error("read error");const a=r.readUInt32LE(0);return t+a}async _readAndUncompressBlock(t,[n],[r]){let i=r;i||(i=(await this.filehandle.stat()).size);const a=i-n;return await this.filehandle.read(t,0,a,n),await li(t.slice(0,a))}async read(t,n,r,i){const a=await this.gzi.getRelevantBlocksForRead(r,i),o=me.Buffer.allocUnsafe(32768*2);let s=n,u=0;for(let l=0;l<a.length-1;l+=1){const c=await this._readAndUncompressBlock(o,a[l],a[l+1]),[,f]=a[l],h=f>=i?0:i-f,d=Math.min(i+r,f+c.length)-f;h>=0&&h<c.length&&(c.copy(t,s,h,d),s+=d-h,u+=d-h)}return{bytesRead:u,buffer:t}}}function uA(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function SP(e,t){const n=await e.readFile(t);if(!(n&&n.length))throw new Error("No data read from FASTA index (FAI) file");let r=0,i;const a=n.toString("utf8").split(/\r?\n/).filter(o=>/\S/.test(o)).map(o=>o.split(" ")).filter(o=>o[0]!=="").map(o=>((!i||i.name!==o[0])&&(i={name:o[0],id:r},r+=1),{id:i.id,name:o[0],length:+o[1],start:0,end:+o[1],offset:+o[2],lineLength:+o[3],lineBytes:+o[4]}));return{name:Object.fromEntries(a.map(o=>[o.name,o])),id:Object.fromEntries(a.map(o=>[o.id,o]))}}class cA{constructor({fasta:t,fai:n,path:r,faiPath:i,chunkSizeLimit:a=1e6}){if(t)this.fasta=t;else if(r)this.fasta=new dt(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 dt(i);else if(r)this.fai=new dt(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile");this.chunkSizeLimit=a}async _getIndexes(t){return this.indexes||(this.indexes=SP(this.fai,t)),this.indexes}async getSequenceNames(t){return Object.keys((await this._getIndexes(t)).name)}async getSequenceSizes(t){const n={},r=await this._getIndexes(t),i=Object.values(r.id);for(let a=0;a<i.length;a+=1)n[i[a].name]=i[a].length;return n}async getSequenceSize(t,n){var r;return(r=(await this._getIndexes(n)).name[t])===null||r===void 0?void 0:r.length}async hasReferenceSequence(t,n){return!!(await this._getIndexes(n)).name[t]}async getResiduesById(t,n,r,i){const a=(await this._getIndexes(i)).id[t];if(a)return this._fetchFromIndexEntry(a,n,r,i)}async getResiduesByName(t,n,r,i){const a=(await this._getIndexes(i)).name[t];if(a)return this._fetchFromIndexEntry(a,n,r,i)}async getSequence(t,n,r,i){return this.getResiduesByName(t,n,r,i)}async _fetchFromIndexEntry(t,n=0,r,i){let a=r;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((a===void 0||a>t.length)&&(a=t.length),n>=a)return"";const o=uA(t,n),s=uA(t,a)-o;if(s>this.chunkSizeLimit)throw new Error(`data size of ${s.toLocaleString()} bytes exceeded chunk size limit of ${this.chunkSizeLimit.toLocaleString()} bytes`);const u=Buffer.allocUnsafe(s);return await this.fasta.read(u,0,s,o,i),u.toString("utf8").replace(/\s+/g,"")}}class CP extends cA{constructor({fasta:t,path:n,fai:r,faiPath:i,gzi:a,gziPath:o,chunkSizeLimit:s}){super({fasta:t,path:n,fai:r,faiPath:i,chunkSizeLimit:s}),t&&a?this.fasta=new lA({filehandle:t,gziFilehandle:a}):n&&o&&(this.fasta=new lA({path:n,gziPath:o}))}}function fA(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
459
+ `),[i,...a]=n.split(" "),o=r.join("").replace(/\s/g,"");return{id:i,description:a.join(" "),sequence:o}})}class kP{constructor({fasta:t,path:n}){if(t)this.fasta=t;else if(n)this.fasta=new dt(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const i=r.toString("utf8");return fA(i)})}async fetch(t,n,r){const a=(await this.data).find(s=>s.id===t),o=r-n;if(!a)throw new Error(`no sequence with id ${t} exists`);return a.sequence.substr(n,o)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const TP=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:CP,FetchableSmallFasta:kP,IndexedFasta:cA,parseSmallFasta:fA},Symbol.toStringTag,{value:"Module"})),Df=BigInt(32);function IP(e,t,n){const r=+!!n,i=+!n;return BigInt(e.getInt32(t,n)*i+e.getInt32(t+4,n)*r)<<Df|BigInt(e.getUint32(t,n)*r+e.getUint32(t+4,n)*i)}function BP(e,t,n){const r=e.getUint32(t,n),i=e.getUint32(t+4,n),a=+!!n,o=+!n;return BigInt(r*o+i*a)<<Df|BigInt(r*a+i*o)}function DP(e,t,n,r){const i=Number(n>>Df),a=Number(n&BigInt(4294967295));r?(e.setInt32(t+4,i,r),e.setUint32(t,a,r)):(e.setInt32(t,i,r),e.setUint32(t+4,a,r))}function RP(e,t,n,r){const i=Number(n>>Df),a=Number(n&BigInt(4294967295));r?(e.setUint32(t+4,i,r),e.setUint32(t,a,r)):(e.setUint32(t,i,r),e.setUint32(t+4,a,r))}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return IP(this,e,t)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(e,t){return BP(this,e,t)}),"setBigInt64"in DataView||(DataView.prototype.setBigInt64=function(e,t,n){DP(this,e,t,n)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,n){RP(this,e,t,n)});class FP{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+`
460
+ `}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,la="___parser_",Bn={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},Rf={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"},Ff={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 Mn{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new Mn}primitiveGenerateN(t,n){const r=Rf[t],i=Ff[t];n.pushCode(`${n.generateVariable(this.varName)} = dataView.get${r}(offset, ${i});`),n.pushCode(`offset += ${Bn[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 Bn))throw new Error(`Array element type "${n.type}" is unkown.`);return this.setNextParser("array",t,n)}choice(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n)throw new Error("tag and choices are are required for choice.");if(!n.tag)throw new Error("tag is requird for choice.");if(!n.choices)throw new Error("choices is required for choice.");for(const r in n.choices){const i=parseInt(r,10),a=n.choices[i];if(isNaN(i))throw new Error(`Choice key "${r}" is not a number.`);if(typeof a=="string"&&!In.has(a)&&!(a in Bn))throw new Error(`Choice type "${a}" is unkown.`)}return this.setNextParser("choice",t,n)}nest(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.type)throw new Error("type is required for nest.");if(!(n.type instanceof Mn)&&!In.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof Mn)&&!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 Bn)&&!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 FP(t,this.useContextVariables);return n.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(n),n.pushCode(`return ${la+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 ${la+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(Bn).indexOf(this.type)>=0)t=Bn[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=Bn[this.options.type]:this.options.type instanceof Mn&&(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 Mn;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=(c=0)=>{let f=0;for(let h=c;h<t.bitFields.length;h++){const d=t.bitFields[h].options.length;if(f+d>32)break;f+=d}return f},a=c=>(c<=8?(t.pushCode(`${r} = dataView.getUint8(offset);`),c=8):c<=16?(t.pushCode(`${r} = dataView.getUint16(offset);`),c=16):c<=24?(t.pushCode(`${r} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`),c=24):(t.pushCode(`${r} = dataView.getUint32(offset);`),c=32),t.pushCode(`offset += ${c/8};`),c);let o=0;const s=this.endian==="be";let u=0,l=0;t.bitFields.forEach((c,f)=>{let h=c.options.length;if(h>l){if(l){const m=-1>>>32-l;t.pushCode(`${c.varName} = (${r} & 0x${m.toString(16)}) << ${h-l};`),h-=l}o=0,l=u=a(i(f)-l)}const d=s?u-o-h:o,p=-1>>>32-h;t.pushCode(`${c.varName} ${h<c.options.length?"|=":"="} ${r} >> ${d} & 0x${p.toString(16)};`),c.options.length===32&&t.pushCode(`${c.varName} >>>= 0`),c.options.assert&&c.generateAssert(t),c.options.formatter&&c.generateFormatter(t,c.varName,c.options.formatter),o+=h,l-=h}),t.bitFields=[]}}generateSeek(t){const n=t.generateOption(this.options.length);t.pushCode(`offset += ${n};`)}generateString(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable(),i=this.options.encoding,a=i.toLowerCase()==="hex",o='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){const s=this.options.length;t.pushCode(`var ${r} = offset;`),t.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${r} < ${s});`);const u=`offset - ${r} < ${s} ? offset - 1 : offset`;t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, ${u}), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, ${u}));`)}else if(this.options.length){const s=t.generateOption(this.options.length);t.pushCode(a?`${n} = Array.from(buffer.subarray(offset, offset + ${s}), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(offset, offset + ${s}));`),t.pushCode(`offset += ${s};`)}else this.options.zeroTerminated?(t.pushCode(`var ${r} = offset;`),t.pushCode("while(dataView.getUint8(offset++) !== 0);"),t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, offset - 1), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset - 1));`)):this.options.greedy&&(t.pushCode(`var ${r} = offset;`),t.pushCode("while(buffer.length > offset++);"),t.pushCode(a?`${n} = Array.from(buffer.subarray(${r}, offset), ${o}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset));`));this.options.stripNull&&t.pushCode(`${n} = ${n}.replace(/\\x00+$/g, '')`)}generateBuffer(t){const n=t.generateVariable(this.varName);if(typeof this.options.readUntil=="function"){const r=this.options.readUntil,i=t.generateTmpVariable(),a=t.generateTmpVariable();t.pushCode(`var ${i} = offset;`),t.pushCode(`var ${a} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${a} = dataView.getUint8(offset);`);const o=t.addImport(r);t.pushCode(`if (${o}.call(${t.generateVariable()}, ${a}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${n} = buffer.subarray(${i}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${n} = buffer.subarray(offset);`);else{const r=t.generateOption(this.options.length);t.pushCode(`${n} = buffer.subarray(offset, offset + ${r});`),t.pushCode(`offset += ${r};`)}this.options.clone&&t.pushCode(`${n} = buffer.constructor.from(${n});`)}generateArray(t){const n=t.generateOption(this.options.length),r=t.generateOption(this.options.lengthInBytes),i=this.options.type,a=t.generateTmpVariable(),o=t.generateVariable(this.varName),s=t.generateTmpVariable(),u=this.options.key,l=typeof u=="string";if(l?t.pushCode(`${o} = {};`):t.pushCode(`${o} = [];`),typeof this.options.readUntil=="function"?t.pushCode("do {"):this.options.readUntil==="eof"?t.pushCode(`for (var ${a} = 0; offset < buffer.length; ${a}++) {`):r!==void 0?t.pushCode(`for (var ${a} = offset + ${r}; offset < ${a}; ) {`):t.pushCode(`for (var ${a} = ${n}; ${a} > 0; ${a}--) {`),typeof i=="string")if(In.get(i)){const c=t.generateTmpVariable();if(t.pushCode(`var ${c} = ${la+i}(offset, {`),t.useContextVariables){const f=t.generateVariable();t.pushCode(`$parent: ${f},`),t.pushCode(`$root: ${f}.$root,`),!this.options.readUntil&&r===void 0&&t.pushCode(`$index: ${n} - ${a},`)}t.pushCode("});"),t.pushCode(`var ${s} = ${c}.result; offset = ${c}.offset;`),i!==this.alias&&t.addReference(i)}else{const c=Rf[i],f=Ff[i];t.pushCode(`var ${s} = dataView.get${c}(offset, ${f});`),t.pushCode(`offset += ${Bn[i]};`)}else if(i instanceof Mn){t.pushCode(`var ${s} = {};`);const c=t.generateVariable();t.pushScope(s),t.useContextVariables&&(t.pushCode(`${s}.$parent = ${c};`),t.pushCode(`${s}.$root = ${c}.$root;`),!this.options.readUntil&&r===void 0&&t.pushCode(`${s}.$index = ${n} - ${a};`)),i.generate(t),t.useContextVariables&&(t.pushCode(`delete ${s}.$parent;`),t.pushCode(`delete ${s}.$root;`),t.pushCode(`delete ${s}.$index;`)),t.popScope()}if(l?t.pushCode(`${o}[${s}.${u}] = ${s};`):t.pushCode(`${o}.push(${s});`),t.pushCode("}"),typeof this.options.readUntil=="function"){const c=this.options.readUntil,f=t.addImport(c);t.pushCode(`while (!${f}.call(${t.generateVariable()}, ${s}, buffer.subarray(offset)));`)}}generateChoiceCase(t,n,r){if(typeof r=="string"){const i=t.generateVariable(this.varName);if(In.has(r)){const a=t.generateTmpVariable();t.pushCode(`var ${a} = ${la+r}(offset, {`),t.useContextVariables&&(t.pushCode(`$parent: ${i}.$parent,`),t.pushCode(`$root: ${i}.$root,`)),t.pushCode("});"),t.pushCode(`${i} = ${a}.result; offset = ${a}.offset;`),r!==this.alias&&t.addReference(r)}else{const a=Rf[r],o=Ff[r];t.pushCode(`${i} = dataView.get${a}(offset, ${o});`),t.pushCode(`offset += ${Bn[r]}`)}}else r instanceof Mn&&(t.pushPath(n),r.generate(t),t.popPath(n))}generateChoice(t){const n=t.generateOption(this.options.tag),r=t.generateVariable(this.varName);if(this.varName&&(t.pushCode(`${r} = {};`),t.useContextVariables)){const i=t.generateVariable();t.pushCode(`${r}.$parent = ${i};`),t.pushCode(`${r}.$root = ${i}.$root;`)}t.pushCode(`switch(${n}) {`);for(const i in this.options.choices){const a=parseInt(i,10),o=this.options.choices[a];t.pushCode(`case ${a}:`),this.generateChoiceCase(t,this.varName,o),t.pushCode("break;")}t.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(t,this.varName,this.options.defaultChoice):t.generateError(`"Met undefined tag value " + ${n} + " at choice"`),t.pushCode("}"),this.varName&&t.useContextVariables&&(t.pushCode(`delete ${r}.$parent;`),t.pushCode(`delete ${r}.$root;`))}generateNest(t){const n=t.generateVariable(this.varName);if(this.options.type instanceof Mn){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} = ${la+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 u=this.options.readUntil,l=t.generateTmpVariable(),c=t.generateTmpVariable();t.pushCode(`var ${l} = offset;`),t.pushCode(`var ${c} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${c} = dataView.getUint8(offset);`);const f=t.addImport(u);t.pushCode(`if (${f}.call(${t.generateVariable()}, ${c}, 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 u=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${u});`),t.pushCode(`offset += ${u};`)}this.options.clone&&t.pushCode(`${r} = buffer.constructor.from(${r});`);const i=t.generateTmpVariable(),a=t.generateTmpVariable(),o=t.generateTmpVariable(),s=t.addImport(this.options.wrapper);if(t.pushCode(`${r} = ${s}.call(this, ${r}).subarray(0);`),t.pushCode(`var ${i} = buffer;`),t.pushCode(`var ${a} = offset;`),t.pushCode(`var ${o} = dataView;`),t.pushCode(`buffer = ${r};`),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof Mn)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 u=t.generateTmpVariable();t.pushCode(`var ${u} = ${la+this.options.type}(0);`),t.pushCode(`${n} = ${u}.result;`),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode(`buffer = ${i};`),t.pushCode(`dataView = ${o};`),t.pushCode(`offset = ${a};`)}generateFormatter(t,n,r){if(typeof r=="function"){const i=t.addImport(r);t.pushCode(`${n} = ${i}.call(${t.generateVariable()}, ${n});`)}}generatePointer(t){const n=this.options.type,r=t.generateOption(this.options.offset),i=t.generateTmpVariable(),a=t.generateVariable(this.varName);if(t.pushCode(`var ${i} = offset;`),t.pushCode(`offset = ${r};`),this.options.type instanceof Mn){if(t.pushCode(`${a} = {};`),t.useContextVariables){const o=t.generateVariable();t.pushCode(`${a}.$parent = ${o};`),t.pushCode(`${a}.$root = ${o}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode(`delete ${a}.$parent;`),t.pushCode(`delete ${a}.$root;`))}else if(In.has(this.options.type)){const o=t.generateTmpVariable();if(t.pushCode(`var ${o} = ${la+this.options.type}(offset, {`),t.useContextVariables){const s=t.generateVariable();t.pushCode(`$parent: ${s},`),t.pushCode(`$root: ${s}.$root,`)}t.pushCode("});"),t.pushCode(`${a} = ${o}.result; offset = ${o}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(Bn).indexOf(this.options.type)>=0){const o=Rf[n],s=Ff[n];t.pushCode(`${a} = dataView.get${o}(offset, ${s});`),t.pushCode(`offset += ${Bn[n]};`)}t.pushCode(`offset = ${i};`)}generateSaveOffset(t){const n=t.generateVariable(this.varName);t.pushCode(`${n} = offset`)}};var hA={},Bp={},ua={},Cl={};Object.defineProperty(Cl,"__esModule",{value:!0});function Dp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dA(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 Rp(e,t,n){return t&&dA(e.prototype,t),n&&dA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function MP(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&&Fp(e,t)}function lo(e){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lo(e)}function Fp(e,t){return Fp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Fp(e,t)}function PP(){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 kl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LP(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 kl(e)}function OP(e){var t=PP();return function(){var r=lo(e),i;if(t){var a=lo(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return LP(this,i)}}function NP(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=lo(e),e!==null););return e}function Mf(){return typeof Reflect<"u"&&Reflect.get?Mf=Reflect.get.bind():Mf=function(t,n,r){var i=NP(t,n);if(i){var a=Object.getOwnPropertyDescriptor(i,n);return a.get?a.get.call(arguments.length<3?t:r):a.value}},Mf.apply(this,arguments)}var pA=function(){function e(){Dp(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return Rp(e,[{key:"addEventListener",value:function(n,r,i){n in this.listeners||(this.listeners[n]=[]),this.listeners[n].push({callback:r,options:i})}},{key:"removeEventListener",value:function(n,r){if(n in this.listeners){for(var i=this.listeners[n],a=0,o=i.length;a<o;a++)if(i[a].callback===r){i.splice(a,1);return}}}},{key:"dispatchEvent",value:function(n){if(n.type in this.listeners){for(var r=this.listeners[n.type],i=r.slice(),a=0,o=i.length;a<o;a++){var s=i[a];try{s.callback.call(this,n)}catch(u){Promise.resolve().then(function(){throw u})}s.options&&s.options.once&&this.removeEventListener(n.type,s.callback)}return!n.defaultPrevented}}}]),e}(),Mp=function(e){MP(n,e);var t=OP(n);function n(){var r;return Dp(this,n),r=t.call(this),r.listeners||pA.call(kl(r)),Object.defineProperty(kl(r),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(kl(r),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(kl(r),"reason",{value:void 0,writable:!0,configurable:!0}),r}return Rp(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)),Mf(lo(n.prototype),"dispatchEvent",this).call(this,i)}}]),n}(pA),gA=function(){function e(){Dp(this,e),Object.defineProperty(this,"signal",{value:new Mp,writable:!0,configurable:!0})}return Rp(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&&(gA.prototype[Symbol.toStringTag]="AbortController",Mp.prototype[Symbol.toStringTag]="AbortSignal");function zP(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 UP(e){typeof e=="function"&&(e={fetch:e});var t=e,n=t.fetch,r=t.Request,i=r===void 0?n.Request:r,a=t.AbortController,o=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,s=o===void 0?!1:o;if(!zP({fetch:n,Request:i,AbortController:a,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:n,Request:u};var u=i;(u&&!u.prototype.hasOwnProperty("signal")||s)&&(u=function(h,d){var p;d&&d.signal&&(p=d.signal,delete d.signal);var m=new i(h,d);return p&&Object.defineProperty(m,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),m},u.prototype=i.prototype);var l=n,c=function(h,d){var p=u&&u.prototype.isPrototypeOf(h)?h.signal:d?d.signal:void 0;if(p){var m;try{m=new DOMException("Aborted","AbortError")}catch{m=new Error("Aborted"),m.name="AbortError"}if(p.aborted)return Promise.reject(m);var y=new Promise(function(w,A){p.addEventListener("abort",function(){return A(m)},{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([y,l(h,d)])}return l(h,d)};return{fetch:c,Request:u}}Cl.AbortController=gA,Cl.AbortSignal=Mp,Cl.abortableFetch=UP,Object.defineProperty(ua,"__esModule",{value:!0}),ua.AbortSignal=ua.AbortController=void 0;const mA=Cl;var Pf=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 GP=typeof Pf().AbortController>"u"?mA.AbortController:Pf().AbortController;ua.AbortController=GP;let HP=typeof Pf().AbortController>"u"?mA.AbortSignal:Pf().AbortSignal;ua.AbortSignal=HP;var Pp={};Object.defineProperty(Pp,"__esModule",{value:!0});const VP=ua;class jP{}class $P{constructor(){this.signals=new Set,this.abortController=new VP.AbortController}addSignal(t=new jP){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()}}Pp.default=$P;var Lp={};Object.defineProperty(Lp,"__esModule",{value:!0});class qP{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)})}}Lp.default=qP;var bA=cf&&cf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bp,"__esModule",{value:!0});const WP=ua,ZP=bA(Pp),YP=bA(Lp);class Lf{constructor({fill:t,cache:n}){if(typeof t!="function")throw new TypeError("must pass a fill function");if(typeof n!="object")throw new TypeError("must pass a cache object");if(typeof n.get!="function"||typeof n.set!="function"||typeof n.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=n,this.fillCallback=t}static isAbortException(t){return t.name==="AbortError"||t.code==="ERR_ABORTED"||t.message==="AbortError: aborted"||t.message==="Error: aborted"}evict(t,n){this.cache.get(t)===n&&this.cache.delete(t)}fill(t,n,r,i){const a=new ZP.default,o=new YP.default;o.addCallback(i);const s={aborter:a,promise:this.fillCallback(n,a.signal,u=>{o.callback(u)}),settled:!1,statusReporter:o,get aborted(){return this.aborter.signal.aborted}};s.aborter.addSignal(r),s.aborter.signal.addEventListener("abort",()=>{s.settled||this.evict(t,s)}),s.promise.then(()=>{s.settled=!0},()=>{s.settled=!0,this.evict(t,s)}).catch(u=>{throw console.error(u),u}),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 WP.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const a=this.cache.get(t);return a?a.aborted&&!a.settled?(this.evict(t,a),this.get(t,n,r,i)):a.settled?a.promise:(a.aborter.addSignal(r),a.statusReporter.addCallback(i),Lf.checkSinglePromise(a.promise,r)):(this.fill(t,n,r,i),Lf.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}}Bp.default=Lf;var QP=cf&&cf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hA,"__esModule",{value:!0});const XP=QP(Bp);var Of=hA.default=XP.default;class KP{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 JP=KP;const Nf=ll(JP);class ui{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 ui(t.min,t.max))}toString(){return this.ranges.map(t=>`[${t.min}-${t.max}]`).join(",")}union(t){const n=this.getRanges().concat(t.getRanges()).sort(this.rangeOrder),r=[];let i=n[0];for(let a=1;a<n.length;a+=1){const o=n[a];o.min()>i.max()+1?(r.push(i),i=o):o.max()>i.max()&&(i=new ui(i.min(),o.max()))}return r.push(i),r.length===1?r[0]:new ui(r)}intersection(t){let n=this,r=t;const i=this.ranges(),a=r.ranges(),o=i.length,s=a.length;let u=0,l=0;const c=[];for(;u<o&&l<s;){n=i[u],r=a[l];const f=Math.max(n.min(),r.min()),h=Math.min(n.max(),r.max());h>=f&&c.push(new ui(f,h)),n.max()>r.max()?l+=1:u+=1}if(c.length===0)throw new Error("found range of length 0");return c.length===1?c[0]:new ui(c)}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 eL=4,yA=0,wA=1,tL=2;function uo(e){let t=e.length;for(;--t>=0;)e[t]=0}const nL=0,vA=1,rL=2,iL=3,aL=258,Op=29,Tl=256,Il=Tl+1+Op,co=30,Np=19,xA=2*Il+1,ca=15,zp=16,oL=7,Up=256,AA=16,EA=17,_A=18,Gp=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]),zf=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]),sL=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),SA=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lL=512,br=new Array((Il+2)*2);uo(br);const Bl=new Array(co*2);uo(Bl);const Dl=new Array(lL);uo(Dl);const Rl=new Array(aL-iL+1);uo(Rl);const Hp=new Array(Op);uo(Hp);const Uf=new Array(co);uo(Uf);function Vp(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 CA,kA,TA;function jp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const IA=e=>e<256?Dl[e]:Dl[256+(e>>>7)],Fl=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},jt=(e,t,n)=>{e.bi_valid>zp-n?(e.bi_buf|=t<<e.bi_valid&65535,Fl(e,e.bi_buf),e.bi_buf=t>>zp-e.bi_valid,e.bi_valid+=n-zp):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},Kn=(e,t,n)=>{jt(e,n[t*2],n[t*2+1])},BA=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},uL=e=>{e.bi_valid===16?(Fl(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)},cL=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length;let l,c,f,h,d,p,m=0;for(h=0;h<=ca;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<xA;l++)c=e.heap[l],h=n[n[c*2+1]*2+1]+1,h>u&&(h=u,m++),n[c*2+1]=h,!(c>r)&&(e.bl_count[h]++,d=0,c>=s&&(d=o[c-s]),p=n[c*2],e.opt_len+=p*(h+d),a&&(e.static_len+=p*(i[c*2+1]+d)));if(m!==0){do{for(h=u-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(h=u;h!==0;h--)for(c=e.bl_count[h];c!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),c--)}},DA=(e,t,n)=>{const r=new Array(ca+1);let i=0,a,o;for(a=1;a<=ca;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let s=e[o*2+1];s!==0&&(e[o*2]=BA(r[s]++,s))}},fL=()=>{let e,t,n,r,i;const a=new Array(ca+1);for(n=0,r=0;r<Op-1;r++)for(Hp[r]=n,e=0;e<1<<Gp[r];e++)Rl[n++]=r;for(Rl[n-1]=r,i=0,r=0;r<16;r++)for(Uf[r]=i,e=0;e<1<<zf[r];e++)Dl[i++]=r;for(i>>=7;r<co;r++)for(Uf[r]=i<<7,e=0;e<1<<zf[r]-7;e++)Dl[256+i++]=r;for(t=0;t<=ca;t++)a[t]=0;for(e=0;e<=143;)br[e*2+1]=8,e++,a[8]++;for(;e<=255;)br[e*2+1]=9,e++,a[9]++;for(;e<=279;)br[e*2+1]=7,e++,a[7]++;for(;e<=287;)br[e*2+1]=8,e++,a[8]++;for(DA(br,Il+1,a),e=0;e<co;e++)Bl[e*2+1]=5,Bl[e*2]=BA(e,5);CA=new Vp(br,Gp,Tl+1,Il,ca),kA=new Vp(Bl,zf,0,co,ca),TA=new Vp(new Array(0),sL,0,Np,oL)},RA=e=>{let t;for(t=0;t<Il;t++)e.dyn_ltree[t*2]=0;for(t=0;t<co;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Np;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Up*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},FA=e=>{e.bi_valid>8?Fl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},MA=(e,t,n,r)=>{const i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},$p=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&MA(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!MA(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},PA=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?Kn(e,i,t):(o=Rl[i],Kn(e,o+Tl+1,t),s=Gp[o],s!==0&&(i-=Hp[o],jt(e,i,s)),r--,o=IA(r),Kn(e,o,n),s=zf[o],s!==0&&(r-=Uf[o],jt(e,r,s)));while(a<e.sym_next);Kn(e,Up,t)},qp=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems;let o,s,u=-1,l;for(e.heap_len=0,e.heap_max=xA,o=0;o<a;o++)n[o*2]!==0?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):n[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=u,o=e.heap_len>>1;o>=1;o--)$p(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],$p(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,$p(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],cL(e,t),DA(n,u,e.bl_count)},LA=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<u&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[AA*2]++):s<=10?e.bl_tree[EA*2]++:e.bl_tree[_A*2]++,s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4))},OA=(e,t,n)=>{let r,i=-1,a,o=t[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<u&&a===o)){if(s<l)do Kn(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Kn(e,a,e.bl_tree),s--),Kn(e,AA,e.bl_tree),jt(e,s-3,2)):s<=10?(Kn(e,EA,e.bl_tree),jt(e,s-3,3)):(Kn(e,_A,e.bl_tree),jt(e,s-11,7));s=0,i=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4)}},hL=e=>{let t;for(LA(e,e.dyn_ltree,e.l_desc.max_code),LA(e,e.dyn_dtree,e.d_desc.max_code),qp(e,e.bl_desc),t=Np-1;t>=3&&e.bl_tree[SA[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},dL=(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[SA[i]*2+1],3);OA(e,e.dyn_ltree,t-1),OA(e,e.dyn_dtree,n-1)},pL=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return yA;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return wA;for(n=32;n<Tl;n++)if(e.dyn_ltree[n*2]!==0)return wA;return yA};let NA=!1;const gL=e=>{NA||(fL(),NA=!0),e.l_desc=new jp(e.dyn_ltree,CA),e.d_desc=new jp(e.dyn_dtree,kA),e.bl_desc=new jp(e.bl_tree,TA),e.bi_buf=0,e.bi_valid=0,RA(e)},zA=(e,t,n,r)=>{jt(e,(nL<<1)+(r?1:0),3),FA(e),Fl(e,n),Fl(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},mL=e=>{jt(e,vA<<1,3),Kn(e,Up,br),uL(e)},bL=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===tL&&(e.strm.data_type=pL(e)),qp(e,e.l_desc),qp(e,e.d_desc),o=hL(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?zA(e,t,n,r):e.strategy===eL||a===i?(jt(e,(vA<<1)+(r?1:0),3),PA(e,br,Bl)):(jt(e,(rL<<1)+(r?1:0),3),dL(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),PA(e,e.dyn_ltree,e.dyn_dtree)),RA(e),r&&FA(e)},yL=(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[(Rl[n]+Tl+1)*2]++,e.dyn_dtree[IA(t)*2]++),e.sym_next===e.sym_end);var wL=gL,vL=zA,xL=bL,AL=yL,EL=mL,_L={_tr_init:wL,_tr_stored_block:vL,_tr_flush_block:xL,_tr_tally:AL,_tr_align:EL},Ml=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};const SL=()=>{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},CL=new Uint32Array(SL());var pt=(e,t,n,r)=>{const i=CL,a=r+n;e^=-1;for(let o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1},fo={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:kL,_tr_stored_block:Wp,_tr_flush_block:TL,_tr_tally:ci,_tr_align:IL}=_L,{Z_NO_FLUSH:fi,Z_PARTIAL_FLUSH:BL,Z_FULL_FLUSH:DL,Z_FINISH:pn,Z_BLOCK:UA,Z_OK:vt,Z_STREAM_END:GA,Z_STREAM_ERROR:Jn,Z_DATA_ERROR:RL,Z_BUF_ERROR:Zp,Z_DEFAULT_COMPRESSION:FL,Z_FILTERED:ML,Z_HUFFMAN_ONLY:Gf,Z_RLE:PL,Z_FIXED:LL,Z_DEFAULT_STRATEGY:OL,Z_UNKNOWN:NL,Z_DEFLATED:Hf}=Pl,zL=9,UL=15,GL=8,HL=29,Yp=256+1+HL,VL=30,jL=19,$L=2*Yp+1,qL=15,pe=3,hi=258,er=hi+pe+1,WL=32,ho=42,Qp=57,Xp=69,Kp=73,Jp=91,eg=103,fa=113,Ll=666,Ft=1,po=2,ha=3,go=4,ZL=3,da=(e,t)=>(e.msg=fo[t],t),HA=e=>e*2-(e>4?9:0),di=e=>{let t=e.length;for(;--t>=0;)e[t]=0},YL=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 pi=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const Kt=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))},Jt=(e,t)=>{TL(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Kt(e.strm)},Ae=(e,t)=>{e.pending_buf[e.pending++]=t},Ol=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},tg=(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=Ml(e.adler,t,i,n):e.state.wrap===2&&(e.adler=pt(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},VA=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match;const u=e.strstart>e.w_size-er?e.strstart-(e.w_size-er):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+hi;let d=l[r+o-1],p=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+o]!==p||l[i+o-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(a=hi-(h-r),r=h-hi,a>o){if(e.match_start=t,o=a,a>=s)break;d=l[r+o-1],p=l[r+o]}}while((t=f[t&c])>u&&--n!==0);return o<=e.lookahead?o:e.lookahead},mo=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-er)&&(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),YL(e),r+=t),e.strm.avail_in===0)break;if(n=tg(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=pe)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=pi(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=pi(e,e.ins_h,e.window[i+pe-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<pe)););}while(e.lookahead<er&&e.strm.avail_in!==0)},jA=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==pn||t===fi||r!==i+e.strm.avail_in)))break;o=t===pn&&r===i+e.strm.avail_in?1:0,Wp(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Kt(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&&(tg(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?go:t!==fi&&t!==pn&&e.strm.avail_in===0&&e.strstart===e.block_start?po:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(tg(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===pn)&&t!==fi&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=t===pn&&e.strm.avail_in===0&&r===i?1:0,Wp(e,e.block_start,r,o),e.block_start+=r,Kt(e.strm)),o?ha:Ft)},ng=(e,t)=>{let n,r;for(;;){if(e.lookahead<er){if(mo(e),e.lookahead<er&&t===fi)return Ft;if(e.lookahead===0)break}if(n=0,e.lookahead>=pe&&(e.ins_h=pi(e,e.ins_h,e.window[e.strstart+pe-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-er&&(e.match_length=VA(e,n)),e.match_length>=pe)if(r=ci(e,e.strstart-e.match_start,e.match_length-pe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=pe){e.match_length--;do e.strstart++,e.ins_h=pi(e,e.ins_h,e.window[e.strstart+pe-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=pi(e,e.ins_h,e.window[e.strstart+1]);else r=ci(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Jt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=e.strstart<pe-1?e.strstart:pe-1,t===pn?(Jt(e,!0),e.strm.avail_out===0?ha:go):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:po},bo=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<er){if(mo(e),e.lookahead<er&&t===fi)return Ft;if(e.lookahead===0)break}if(n=0,e.lookahead>=pe&&(e.ins_h=pi(e,e.ins_h,e.window[e.strstart+pe-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=pe-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-er&&(e.match_length=VA(e,n),e.match_length<=5&&(e.strategy===ML||e.match_length===pe&&e.strstart-e.match_start>4096)&&(e.match_length=pe-1)),e.prev_length>=pe&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-pe,r=ci(e,e.strstart-1-e.prev_match,e.prev_length-pe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=pi(e,e.ins_h,e.window[e.strstart+pe-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=pe-1,e.strstart++,r&&(Jt(e,!1),e.strm.avail_out===0))return Ft}else if(e.match_available){if(r=ci(e,0,e.window[e.strstart-1]),r&&Jt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ft}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=ci(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<pe-1?e.strstart:pe-1,t===pn?(Jt(e,!0),e.strm.avail_out===0?ha:go):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:po},QL=(e,t)=>{let n,r,i,a;const o=e.window;for(;;){if(e.lookahead<=hi){if(mo(e),e.lookahead<=hi&&t===fi)return Ft;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=pe&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+hi;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=hi-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=pe?(n=ci(e,1,e.match_length-pe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=ci(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Jt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=0,t===pn?(Jt(e,!0),e.strm.avail_out===0?ha:go):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:po},XL=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(mo(e),e.lookahead===0)){if(t===fi)return Ft;break}if(e.match_length=0,n=ci(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Jt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=0,t===pn?(Jt(e,!0),e.strm.avail_out===0?ha:go):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:po};function tr(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 Nl=[new tr(0,0,0,0,jA),new tr(4,4,8,4,ng),new tr(4,5,16,8,ng),new tr(4,6,32,32,ng),new tr(4,4,16,16,bo),new tr(8,16,32,32,bo),new tr(8,16,128,128,bo),new tr(8,32,128,256,bo),new tr(32,128,258,1024,bo),new tr(32,258,258,4096,bo)],KL=e=>{e.window_size=2*e.w_size,di(e.head),e.max_lazy_match=Nl[e.level].max_lazy,e.good_match=Nl[e.level].good_length,e.nice_match=Nl[e.level].nice_length,e.max_chain_length=Nl[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=pe-1,e.match_available=0,e.ins_h=0};function JL(){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=Hf,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($L*2),this.dyn_dtree=new Uint16Array((2*VL+1)*2),this.bl_tree=new Uint16Array((2*jL+1)*2),di(this.dyn_ltree),di(this.dyn_dtree),di(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(qL+1),this.heap=new Uint16Array(2*Yp+1),di(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Yp+1),di(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 zl=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ho&&t.status!==Qp&&t.status!==Xp&&t.status!==Kp&&t.status!==Jp&&t.status!==eg&&t.status!==fa&&t.status!==Ll?1:0},$A=e=>{if(zl(e))return da(e,Jn);e.total_in=e.total_out=0,e.data_type=NL;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Qp:t.wrap?ho:fa,e.adler=t.wrap===2?0:1,t.last_flush=-2,kL(t),vt},qA=e=>{const t=$A(e);return t===vt&&KL(e.state),t},eO=(e,t)=>zl(e)||e.state.wrap!==2?Jn:(e.state.gzhead=t,vt),WA=(e,t,n,r,i,a)=>{if(!e)return Jn;let o=1;if(t===FL&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>zL||n!==Hf||r<8||r>15||t<0||t>9||a<0||a>LL||r===8&&o!==1)return da(e,Jn);r===8&&(r=9);const s=new JL;return e.state=s,s.strm=e,s.status=ho,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+pe-1)/pe),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=a,s.method=n,qA(e)},tO=(e,t)=>WA(e,t,Hf,UL,GL,OL),nO=(e,t)=>{if(zl(e)||t>UA||t<0)return e?da(e,Jn):Jn;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Ll&&t!==pn)return da(e,e.avail_out===0?Zp:Jn);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Kt(e),e.avail_out===0)return n.last_flush=-1,vt}else if(e.avail_in===0&&HA(t)<=HA(r)&&t!==pn)return da(e,Zp);if(n.status===Ll&&e.avail_in!==0)return da(e,Zp);if(n.status===ho&&n.wrap===0&&(n.status=fa),n.status===ho){let i=Hf+(n.w_bits-8<<4)<<8,a=-1;if(n.strategy>=Gf||n.level<2?a=0:n.level<6?a=1:n.level===6?a=2:a=3,i|=a<<6,n.strstart!==0&&(i|=WL),i+=31-i%31,Ol(n,i),n.strstart!==0&&(Ol(n,e.adler>>>16),Ol(n,e.adler&65535)),e.adler=1,n.status=fa,Kt(e),n.pending!==0)return n.last_flush=-1,vt}if(n.status===Qp){if(e.adler=0,Ae(n,31),Ae(n,139),Ae(n,8),n.gzhead)Ae(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)),Ae(n,n.gzhead.time&255),Ae(n,n.gzhead.time>>8&255),Ae(n,n.gzhead.time>>16&255),Ae(n,n.gzhead.time>>24&255),Ae(n,n.level===9?2:n.strategy>=Gf||n.level<2?4:0),Ae(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Ae(n,n.gzhead.extra.length&255),Ae(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=pt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Xp;else if(Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,n.level===9?2:n.strategy>=Gf||n.level<2?4:0),Ae(n,ZL),n.status=fa,Kt(e),n.pending!==0)return n.last_flush=-1,vt}if(n.status===Xp){if(n.gzhead.extra){let i=n.pending,a=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+a>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,Kt(e),n.pending!==0)return n.last_flush=-1,vt;i=0,a-=s}let o=new Uint8Array(n.gzhead.extra);n.pending_buf.set(o.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Kp}if(n.status===Kp){if(n.gzhead.name){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),Kt(e),n.pending!==0)return n.last_flush=-1,vt;i=0}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,Ae(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Jp}if(n.status===Jp){if(n.gzhead.comment){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),Kt(e),n.pending!==0)return n.last_flush=-1,vt;i=0}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,Ae(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i))}n.status=eg}if(n.status===eg){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Kt(e),n.pending!==0))return n.last_flush=-1,vt;Ae(n,e.adler&255),Ae(n,e.adler>>8&255),e.adler=0}if(n.status=fa,Kt(e),n.pending!==0)return n.last_flush=-1,vt}if(e.avail_in!==0||n.lookahead!==0||t!==fi&&n.status!==Ll){let i=n.level===0?jA(n,t):n.strategy===Gf?XL(n,t):n.strategy===PL?QL(n,t):Nl[n.level].func(n,t);if((i===ha||i===go)&&(n.status=Ll),i===Ft||i===ha)return e.avail_out===0&&(n.last_flush=-1),vt;if(i===po&&(t===BL?IL(n):t!==UA&&(Wp(n,0,0,!1),t===DL&&(di(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Kt(e),e.avail_out===0))return n.last_flush=-1,vt}return t!==pn?vt:n.wrap<=0?GA:(n.wrap===2?(Ae(n,e.adler&255),Ae(n,e.adler>>8&255),Ae(n,e.adler>>16&255),Ae(n,e.adler>>24&255),Ae(n,e.total_in&255),Ae(n,e.total_in>>8&255),Ae(n,e.total_in>>16&255),Ae(n,e.total_in>>24&255)):(Ol(n,e.adler>>>16),Ol(n,e.adler&65535)),Kt(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?vt:GA)},rO=e=>{if(zl(e))return Jn;const t=e.state.status;return e.state=null,t===fa?da(e,RL):vt},iO=(e,t)=>{let n=t.length;if(zl(e))return Jn;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==ho||r.lookahead)return Jn;if(i===1&&(e.adler=Ml(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(di(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(t.subarray(n-r.w_size,n),0),t=u,n=r.w_size}const a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,mo(r);r.lookahead>=pe;){let u=r.strstart,l=r.lookahead-(pe-1);do r.ins_h=pi(r,r.ins_h,r.window[u+pe-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--l);r.strstart=u,r.lookahead=pe-1,mo(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=pe-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,vt};var aO=tO,oO=WA,sO=qA,lO=$A,uO=eO,cO=nO,fO=rO,hO=iO,dO="pako deflate (from Nodeca project)",Ul={deflateInit:aO,deflateInit2:oO,deflateReset:sO,deflateResetKeep:lO,deflateSetHeader:uO,deflate:cO,deflateEnd:fO,deflateSetDictionary:hO,deflateInfo:dO};const pO=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var gO=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)pO(n,r)&&(e[r]=n[r])}}return e},mO=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,a=e.length;r<a;r++){let o=e[r];n.set(o,i),i+=o.length}return n},Vf={assign:gO,flattenChunks:mO};let ZA=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{ZA=!1}const Gl=new Uint8Array(256);for(let e=0;e<256;e++)Gl[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Gl[254]=Gl[254]=1;var bO=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};const yO=(e,t)=>{if(t<65534&&e.subarray&&ZA)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 wO=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const a=new Array(n*2);for(i=0,r=0;r<n;){let o=e[r++];if(o<128){a[i++]=o;continue}let s=Gl[o];if(s>4){a[i++]=65533,r+=s-1;continue}for(o&=s===2?31:s===3?15:7;s>1&&r<n;)o=o<<6|e[r++]&63,s--;if(s>1){a[i++]=65533;continue}o<65536?a[i++]=o:(o-=65536,a[i++]=55296|o>>10&1023,a[i++]=56320|o&1023)}return yO(a,i)},vO=(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+Gl[e[n]]>t?n:t},Hl={string2buf:bO,buf2string:wO,utf8border:vO};function xO(){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 YA=xO;const QA=Object.prototype.toString,{Z_NO_FLUSH:AO,Z_SYNC_FLUSH:EO,Z_FULL_FLUSH:_O,Z_FINISH:SO,Z_OK:jf,Z_STREAM_END:CO,Z_DEFAULT_COMPRESSION:kO,Z_DEFAULT_STRATEGY:TO,Z_DEFLATED:IO}=Pl;function rg(e){this.options=Vf.assign({level:kO,method:IO,chunkSize:16384,windowBits:15,memLevel:8,strategy:TO},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 YA,this.strm.avail_out=0;let n=Ul.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==jf)throw new Error(fo[n]);if(t.header&&Ul.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=Hl.string2buf(t.dictionary):QA.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Ul.deflateSetDictionary(this.strm,r),n!==jf)throw new Error(fo[n]);this._dict_set=!0}}rg.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,a;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?SO:AO,typeof e=="string"?n.input=Hl.string2buf(e):QA.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===EO||a===_O)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Ul.deflate(n,a),i===CO)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Ul.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===jf;if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0},rg.prototype.onData=function(e){this.chunks.push(e)},rg.prototype.onEnd=function(e){e===jf&&(this.result=Vf.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const $f=16209,BO=16191;var DO=function(t,n){let r,i,a,o,s,u,l,c,f,h,d,p,m,y,w,A,S,_,T,I,B,R,M,G;const N=t.state;r=t.next_in,M=t.input,i=r+(t.avail_in-5),a=t.next_out,G=t.output,o=a-(n-t.avail_out),s=a+(t.avail_out-257),u=N.dmax,l=N.wsize,c=N.whave,f=N.wnext,h=N.window,d=N.hold,p=N.bits,m=N.lencode,y=N.distcode,w=(1<<N.lenbits)-1,A=(1<<N.distbits)-1;e:do{p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),S=m[d&w];t:for(;;){if(_=S>>>24,d>>>=_,p-=_,_=S>>>16&255,_===0)G[a++]=S&65535;else if(_&16){T=S&65535,_&=15,_&&(p<_&&(d+=M[r++]<<p,p+=8),T+=d&(1<<_)-1,d>>>=_,p-=_),p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),S=y[d&A];n:for(;;){if(_=S>>>24,d>>>=_,p-=_,_=S>>>16&255,_&16){if(I=S&65535,_&=15,p<_&&(d+=M[r++]<<p,p+=8,p<_&&(d+=M[r++]<<p,p+=8)),I+=d&(1<<_)-1,I>u){t.msg="invalid distance too far back",N.mode=$f;break e}if(d>>>=_,p-=_,_=a-o,I>_){if(_=I-_,_>c&&N.sane){t.msg="invalid distance too far back",N.mode=$f;break e}if(B=0,R=h,f===0){if(B+=l-_,_<T){T-=_;do G[a++]=h[B++];while(--_);B=a-I,R=G}}else if(f<_){if(B+=l+f-_,_-=f,_<T){T-=_;do G[a++]=h[B++];while(--_);if(B=0,f<T){_=f,T-=_;do G[a++]=h[B++];while(--_);B=a-I,R=G}}}else if(B+=f-_,_<T){T-=_;do G[a++]=h[B++];while(--_);B=a-I,R=G}for(;T>2;)G[a++]=R[B++],G[a++]=R[B++],G[a++]=R[B++],T-=3;T&&(G[a++]=R[B++],T>1&&(G[a++]=R[B++]))}else{B=a-I;do G[a++]=G[B++],G[a++]=G[B++],G[a++]=G[B++],T-=3;while(T>2);T&&(G[a++]=G[B++],T>1&&(G[a++]=G[B++]))}}else if(_&64){t.msg="invalid distance code",N.mode=$f;break e}else{S=y[(S&65535)+(d&(1<<_)-1)];continue n}break}}else if(_&64)if(_&32){N.mode=BO;break e}else{t.msg="invalid literal/length code",N.mode=$f;break e}else{S=m[(S&65535)+(d&(1<<_)-1)];continue t}break}}while(r<i&&a<s);T=p>>3,r-=T,p-=T<<3,d&=(1<<p)-1,t.next_in=r,t.next_out=a,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=a<s?257+(s-a):257-(a-s),N.hold=d,N.bits=p};const yo=15,XA=852,KA=592,JA=0,ig=1,e3=2,RO=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]),FO=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]),MO=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]),PO=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 Vl=(e,t,n,r,i,a,o,s)=>{const u=s.bits;let l=0,c=0,f=0,h=0,d=0,p=0,m=0,y=0,w=0,A=0,S,_,T,I,B,R=null,M;const G=new Uint16Array(yo+1),N=new Uint16Array(yo+1);let re=null,se,te,ge;for(l=0;l<=yo;l++)G[l]=0;for(c=0;c<r;c++)G[t[n+c]]++;for(d=u,h=yo;h>=1&&G[h]===0;h--);if(d>h&&(d=h),h===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,s.bits=1,0;for(f=1;f<h&&G[f]===0;f++);for(d<f&&(d=f),y=1,l=1;l<=yo;l++)if(y<<=1,y-=G[l],y<0)return-1;if(y>0&&(e===JA||h!==1))return-1;for(N[1]=0,l=1;l<yo;l++)N[l+1]=N[l]+G[l];for(c=0;c<r;c++)t[n+c]!==0&&(o[N[t[n+c]]++]=c);if(e===JA?(R=re=o,M=20):e===ig?(R=RO,re=FO,M=257):(R=MO,re=PO,M=0),A=0,c=0,l=f,B=a,p=d,m=0,T=-1,w=1<<d,I=w-1,e===ig&&w>XA||e===e3&&w>KA)return 1;for(;;){se=l-m,o[c]+1<M?(te=0,ge=o[c]):o[c]>=M?(te=re[o[c]-M],ge=R[o[c]-M]):(te=32+64,ge=0),S=1<<l-m,_=1<<p,f=_;do _-=S,i[B+(A>>m)+_]=se<<24|te<<16|ge|0;while(_!==0);for(S=1<<l-1;A&S;)S>>=1;if(S!==0?(A&=S-1,A+=S):A=0,c++,--G[l]===0){if(l===h)break;l=t[n+o[c]]}if(l>d&&(A&I)!==T){for(m===0&&(m=d),B+=f,p=l-m,y=1<<p;p+m<h&&(y-=G[p+m],!(y<=0));)p++,y<<=1;if(w+=1<<p,e===ig&&w>XA||e===e3&&w>KA)return 1;T=A&I,i[T]=d<<24|p<<16|B-a|0}}return A!==0&&(i[B+A]=l-m<<24|64<<16|0),s.bits=d,0};const LO=0,t3=1,n3=2,{Z_FINISH:r3,Z_BLOCK:OO,Z_TREES:qf,Z_OK:pa,Z_STREAM_END:NO,Z_NEED_DICT:zO,Z_STREAM_ERROR:gn,Z_DATA_ERROR:i3,Z_MEM_ERROR:a3,Z_BUF_ERROR:UO,Z_DEFLATED:o3}=Pl,Wf=16180,s3=16181,l3=16182,u3=16183,c3=16184,f3=16185,h3=16186,d3=16187,p3=16188,g3=16189,Zf=16190,yr=16191,ag=16192,m3=16193,og=16194,b3=16195,y3=16196,w3=16197,v3=16198,Yf=16199,Qf=16200,x3=16201,A3=16202,E3=16203,_3=16204,S3=16205,sg=16206,C3=16207,k3=16208,qe=16209,T3=16210,I3=16211,GO=852,HO=592,VO=15,B3=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function jO(){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 ga=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<Wf||t.mode>I3?1:0},D3=e=>{if(ga(e))return gn;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=Wf,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(GO),t.distcode=t.distdyn=new Int32Array(HO),t.sane=1,t.back=-1,pa},R3=e=>{if(ga(e))return gn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,D3(e)},F3=(e,t)=>{let n;if(ga(e))return gn;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?gn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,R3(e))},M3=(e,t)=>{if(!e)return gn;const n=new jO;e.state=n,n.strm=e,n.window=null,n.mode=Wf;const r=F3(e,t);return r!==pa&&(e.state=null),r},$O=e=>M3(e,VO);let P3=!0,lg,ug;const qO=e=>{if(P3){lg=new Int32Array(512),ug=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(Vl(t3,e.lens,0,288,lg,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Vl(n3,e.lens,0,32,ug,0,e.work,{bits:5}),P3=!1}e.lencode=lg,e.lenbits=9,e.distcode=ug,e.distbits=5},L3=(e,t,n,r)=>{let i;const a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},WO=(e,t)=>{let n,r,i,a,o,s,u,l,c,f,h,d,p,m,y=0,w,A,S,_,T,I,B,R;const M=new Uint8Array(4);let G,N;const re=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ga(e)||!e.output||!e.input&&e.avail_in!==0)return gn;n=e.state,n.mode===yr&&(n.mode=ag),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,f=s,h=u,R=pa;e:for(;;)switch(n.mode){case Wf:if(n.wrap===0){n.mode=ag;break}for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=pt(n.check,M,2,0),l=0,c=0,n.mode=s3;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)!==o3){e.msg="unknown compression method",n.mode=qe;break}if(l>>>=4,c-=4,B=(l&15)+8,n.wbits===0&&(n.wbits=B),B>15||B>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?g3:yr,l=0,c=0;break;case s3:for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.flags=l,(n.flags&255)!==o3){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&&(M[0]=l&255,M[1]=l>>>8&255,n.check=pt(n.check,M,2,0)),l=0,c=0,n.mode=l3;case l3:for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=pt(n.check,M,4,0)),l=0,c=0,n.mode=u3;case u3:for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=pt(n.check,M,2,0)),l=0,c=0,n.mode=c3;case c3:if(n.flags&1024){for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=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=pt(n.check,M,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=f3;case f3:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(B=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+d),B)),n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,a)),s-=d,a+=d,n.length-=d),n.length))break e;n.length=0,n.mode=h3;case h3:if(n.flags&2048){if(s===0)break e;d=0;do B=r[a+d++],n.head&&B&&n.length<65536&&(n.head.name+=String.fromCharCode(B));while(B&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,a)),s-=d,a+=d,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=d3;case d3:if(n.flags&4096){if(s===0)break e;d=0;do B=r[a+d++],n.head&&B&&n.length<65536&&(n.head.comment+=String.fromCharCode(B));while(B&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,a)),s-=d,a+=d,B)break e}else n.head&&(n.head.comment=null);n.mode=p3;case p3:if(n.flags&512){for(;c<16;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=qe;break}l=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=yr;break;case g3:for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}e.adler=n.check=B3(l),l=0,c=0,n.mode=Zf;case Zf:if(n.havedict===0)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,zO;e.adler=n.check=1,n.mode=yr;case yr:if(t===OO||t===qf)break e;case ag:if(n.last){l>>>=c&7,c-=c&7,n.mode=sg;break}for(;c<3;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}switch(n.last=l&1,l>>>=1,c-=1,l&3){case 0:n.mode=m3;break;case 1:if(qO(n),n.mode=Yf,t===qf){l>>>=2,c-=2;break e}break;case 2:n.mode=y3;break;case 3:e.msg="invalid block type",n.mode=qe}l>>>=2,c-=2;break;case m3:for(l>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=qe;break}if(n.length=l&65535,l=0,c=0,n.mode=og,t===qf)break e;case og:n.mode=b3;case b3:if(d=n.length,d){if(d>s&&(d=s),d>u&&(d=u),d===0)break e;i.set(r.subarray(a,a+d),o),s-=d,a+=d,u-=d,o+=d,n.length-=d;break}n.mode=yr;break;case y3:for(;c<14;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.nlen=(l&31)+257,l>>>=5,c-=5,n.ndist=(l&31)+1,l>>>=5,c-=5,n.ncode=(l&15)+4,l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=qe;break}n.have=0,n.mode=w3;case w3:for(;n.have<n.ncode;){for(;c<3;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.lens[re[n.have++]]=l&7,l>>>=3,c-=3}for(;n.have<19;)n.lens[re[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},R=Vl(LO,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,R){e.msg="invalid code lengths set",n.mode=qe;break}n.have=0,n.mode=v3;case v3:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(S<16)l>>>=w,c-=w,n.lens[n.have++]=S;else{if(S===16){for(N=w+2;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(l>>>=w,c-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=qe;break}B=n.lens[n.have-1],d=3+(l&3),l>>>=2,c-=2}else if(S===17){for(N=w+3;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=w,c-=w,B=0,d=3+(l&7),l>>>=3,c-=3}else{for(N=w+7;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=w,c-=w,B=0,d=11+(l&127),l>>>=7,c-=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++]=B}}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,G={bits:n.lenbits},R=Vl(t3,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,R){e.msg="invalid literal/lengths set",n.mode=qe;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},R=Vl(n3,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,R){e.msg="invalid distances set",n.mode=qe;break}if(n.mode=Yf,t===qf)break e;case Yf:n.mode=Qf;case Qf:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,DO(e,h),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,n.mode===yr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(A&&!(A&240)){for(_=w,T=A,I=S;y=n.lencode[I+((l&(1<<_+T)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,n.length=S,A===0){n.mode=S3;break}if(A&32){n.back=-1,n.mode=yr;break}if(A&64){e.msg="invalid literal/length code",n.mode=qe;break}n.extra=A&15,n.mode=x3;case x3:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=A3;case A3:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(!(A&240)){for(_=w,T=A,I=S;y=n.distcode[I+((l&(1<<_+T)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,A&64){e.msg="invalid distance code",n.mode=qe;break}n.offset=S,n.extra=A&15,n.mode=E3;case E3:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=qe;break}n.mode=_3;case _3:if(u===0)break e;if(d=h-u,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),m=n.window}else m=i,p=o-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[o++]=m[p++];while(--d);n.length===0&&(n.mode=Qf);break;case S3:if(u===0)break e;i[o++]=n.length,u--,n.mode=Qf;break;case sg:if(n.wrap){for(;c<32;){if(s===0)break e;s--,l|=r[a++]<<c,c+=8}if(h-=u,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?pt(n.check,i,h,o-h):Ml(n.check,i,h,o-h)),h=u,n.wrap&4&&(n.flags?l:B3(l))!==n.check){e.msg="incorrect data check",n.mode=qe;break}l=0,c=0}n.mode=C3;case C3:if(n.wrap&&n.flags){for(;c<32;){if(s===0)break e;s--,l+=r[a++]<<c,c+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=qe;break}l=0,c=0}n.mode=k3;case k3:R=NO;break e;case qe:R=i3;break e;case T3:return a3;case I3:default:return gn}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<qe&&(n.mode<sg||t!==r3))&&L3(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?pt(n.check,i,h,e.next_out-h):Ml(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===yr?128:0)+(n.mode===Yf||n.mode===og?256:0),(f===0&&h===0||t===r3)&&R===pa&&(R=UO),R},ZO=e=>{if(ga(e))return gn;let t=e.state;return t.window&&(t.window=null),e.state=null,pa},YO=(e,t)=>{if(ga(e))return gn;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,pa):gn},QO=(e,t)=>{const n=t.length;let r,i,a;return ga(e)||(r=e.state,r.wrap!==0&&r.mode!==Zf)?gn:r.mode===Zf&&(i=1,i=Ml(i,t,n,0),i!==r.check)?i3:(a=L3(e,t,n,n),a?(r.mode=T3,a3):(r.havedict=1,pa))};var XO=R3,KO=F3,JO=D3,eN=$O,tN=M3,nN=WO,rN=ZO,iN=YO,aN=QO,oN="pako inflate (from Nodeca project)",wr={inflateReset:XO,inflateReset2:KO,inflateResetKeep:JO,inflateInit:eN,inflateInit2:tN,inflate:nN,inflateEnd:rN,inflateGetHeader:iN,inflateSetDictionary:aN,inflateInfo:oN};function sN(){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 lN=sN;const O3=Object.prototype.toString,{Z_NO_FLUSH:uN,Z_FINISH:cN,Z_OK:jl,Z_STREAM_END:cg,Z_NEED_DICT:fg,Z_STREAM_ERROR:fN,Z_DATA_ERROR:N3,Z_MEM_ERROR:hN}=Pl;function $l(e){this.options=Vf.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 YA,this.strm.avail_out=0;let n=wr.inflateInit2(this.strm,t.windowBits);if(n!==jl)throw new Error(fo[n]);if(this.header=new lN,wr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Hl.string2buf(t.dictionary):O3.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=wr.inflateSetDictionary(this.strm,t.dictionary),n!==jl)))throw new Error(fo[n])}$l.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let a,o,s;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?cN:uN,O3.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=wr.inflate(n,o),a===fg&&i&&(a=wr.inflateSetDictionary(n,i),a===jl?a=wr.inflate(n,o):a===N3&&(a=fg));n.avail_in>0&&a===cg&&n.state.wrap>0&&e[n.next_in]!==0;)wr.inflateReset(n),a=wr.inflate(n,o);switch(a){case fN:case N3:case fg:case hN:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===cg))if(this.options.to==="string"){let u=Hl.utf8border(n.output,n.next_out),l=n.next_out-u,c=Hl.buf2string(n.output,u);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(u,u+l),0),this.onData(c)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===jl&&s===0)){if(a===cg)return a=wr.inflateEnd(this.strm),this.onEnd(a),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===jl&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Vf.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function hg(e,t){const n=new $l(t);if(n.push(e),n.err)throw n.msg||fo[n.err];return n.result}function dN(e,t){return t=t||{},t.raw=!0,hg(e,t)}var pN=$l,gN=hg,mN=dN,bN=hg,yN=Pl,wN={Inflate:pN,inflate:gN,inflateRaw:mN,ungzip:bN,constants:yN};const{Inflate:pG,inflate:gG,inflateRaw:vN,ungzip:mG}=wN;var xN=vN;function AN(e){return xN(e.subarray(2))}let EN=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function _N(e){e.sort((i,a)=>Number(i.offset)-Number(a.offset));const t=[];let n,r;for(const i of e)n&&r&&Number(i.offset)-r<=2e3?(n.length=BigInt(Number(n.length)+Number(i.length)-r+Number(i.offset)),n.blocks.push(i)):t.push(n={blocks:[i],length:i.length,offset:i.offset}),r=Number(n.offset)+Number(n.length);return t}function Xf(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new EN("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const SN=1,CN=2,kN=3;function dg(e,t,n,r){return e<r&&t>=n}function TN(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:{[kN]:new Ie().array("items",{length:"itemCount",type:new Ie().floatle("score")}),[CN]:new Ie().array("items",{length:"itemCount",type:new Ie().endianess(t).int32("start").floatle("score")}),[SN]:new Ie().array("items",{length:"itemCount",type:new Ie().endianess(t).int32("start").int32("end").floatle("score")})}}),bigBedParser:i,summaryParser:n,leafParser:r}}class z3{constructor(t,n,r,i,a,o){if(this.bbi=t,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=i,this.isCompressed=a,this.blockType=o,this.featureCache=new Of({cache:new Nf({maxSize:1e3}),fill:async(u,l)=>{const c=Number(u.length),f=Number(u.offset),{buffer:h}=await this.bbi.read(me.Buffer.alloc(c),0,c,f,{signal:l});return h}}),!(r>=0))throw new Error("invalid cirTreeOffset!");const s=TN(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}async readWigData(t,n,r,i,a){try{const{refsByName:o,bbi:s,cirTreeOffset:u,isBigEndian:l}=this,c=o[t];c===void 0&&i.complete();const f={chrId:c,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=s.read(me.Buffer.alloc(48),0,48,Number(u),a));const{buffer:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],m=0;const y=(_,T,I)=>{try{const B=_.subarray(T),R=this.leafParser.parse(B);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(G=>w(G)).map(G=>Number(G.blockOffset));M.length>0&&S(M,I+1)}}catch(B){i.error(B)}},w=_=>{const{startChrom:T,startBase:I,endChrom:B,endBase:R}=_;return(T<c||T===c&&I<=r)&&(B>c||B===c&&R>=n)},A=async(_,T,I)=>{try{const B=T.max()-T.min(),R=T.min(),M=await this.featureCache.get(`${B}_${R}`,{length:B,offset:R},a==null?void 0:a.signal);for(const G of _)T.contains(G)&&(y(M,G-R,I),m-=1,m===0&&this.readFeatures(i,p,{...a,request:f}))}catch(B){i.error(B)}},S=(_,T)=>{try{m+=_.length;const I=4+Number(d)*32;let B=new ui(_[0],_[0]+I);for(let R=1;R<_.length;R+=1){const M=new ui(_[R],_[R]+I);B=B.union(M)}B.getRanges().map(R=>A(_,R,T))}catch(I){i.error(I)}};return S([Number(u)+48],1)}catch(o){i.error(o)}}parseSummaryBlock(t,n,r){const i=[];let a=n;const o=new DataView(t.buffer,t.byteOffset,t.length);for(;a<t.byteLength;){const s=o.getUint32(a,!0);a+=4;const u=o.getUint32(a,!0);a+=4;const l=o.getUint32(a,!0);a+=4;const c=o.getUint32(a,!0);a+=4;const f=o.getFloat32(a,!0);a+=4;const h=o.getFloat32(a,!0);a+=4;const d=o.getFloat32(a,!0);a+=4,a+=4,(!r||s===r.chrId&&dg(u,l,r.start,r.end))&&i.push({start:u,end:l,maxScore:h,minScore:f,summary:!0,score:d/(c||1)})}return i}parseBigBedBlock(t,n,r,i){const a=[];let o=n;for(;o<t.byteLength;){const s=this.bigBedParser.parse(t.subarray(o));s.uniqueId=`bb-${r+o}`,a.push(s),o+=s.offset}return i?a.filter(s=>dg(s.start,s.end,i.start,i.end)):a}parseBigWigBlock(t,n,r){const i=t.subarray(n),a=new DataView(i.buffer,i.byteOffset,i.length);let o=0;o+=4;const s=a.getInt32(o,!0);o+=8;const u=a.getUint32(o,!0);o+=4;const l=a.getUint32(o,!0);o+=4;const c=a.getUint8(o);o+=2;const f=a.getUint16(o,!0);o+=2;const h=new Array(f);switch(c){case 1:{for(let d=0;d<f;d++){const p=a.getInt32(o,!0);o+=4;const m=a.getInt32(o,!0);o+=4;const y=a.getFloat32(o,!0);o+=4,h[d]={start:p,end:m,score:y}}break}case 2:{for(let d=0;d<f;d++){const p=a.getInt32(o,!0);o+=4;const m=a.getFloat32(o,!0);o+=4,h[d]={score:m,start:p,end:p+l}}break}case 3:{for(let d=0;d<f;d++){const p=a.getFloat32(o,!0);o+=4;const m=s+d*u;h[d]={score:p,start:m,end:m+l}}break}}return r?h.filter(d=>dg(d.start,d.end,r.start,r.end)):h}async readFeatures(t,n,r={}){try{const{blockType:i,isCompressed:a}=this,{signal:o,request:s}=r,u=_N(n);Xf(o),await Promise.all(u.map(async l=>{Xf(o);const{length:c,offset:f}=l,h=await this.featureCache.get(`${c}_${f}`,l,o);for(const d of l.blocks){Xf(o);let p=Number(d.offset)-Number(l.offset),m=h;switch(a&&(m=AN(h.subarray(p)),p=0),Xf(o),i){case"summary":{t.next(this.parseSummaryBlock(m,p,s));break}case"bigwig":{t.next(this.parseBigWigBlock(m,p,s));break}case"bigbed":{t.next(this.parseBigBedBlock(m,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 pg=function(e,t){return pg=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])},pg(e,t)};function gg(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");pg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function IN(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})}function U3(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function ql(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 mg(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function bg(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function wo(e){return this instanceof wo?(this.v=e,this):new wo(e)}function BN(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(h){r[h]&&(i[h]=function(d){return new Promise(function(p,m){a.push([h,d,p,m])>1||s(h,d)})})}function s(h,d){try{u(r[h](d))}catch(p){f(a[0][3],p)}}function u(h){h.value instanceof wo?Promise.resolve(h.value.v).then(l,c):f(a[0][2],h)}function l(h){s("next",h)}function c(h){s("throw",h)}function f(h,d){h(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function DN(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 ql=="function"?ql(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(o){return new Promise(function(s,u){o=e[a](o),i(s,u,o.done,o.value)})}}function i(a,o,s,u){Promise.resolve(u).then(function(l){a({value:l,done:s})},o)}}typeof SuppressedError=="function"&&SuppressedError;function lt(e){return typeof e=="function"}function G3(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 yg=G3(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
452
461
  `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
453
- `):"",this.name="UnsubscriptionError",this.errors=n}});function z3(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var wg=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,a;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=ql(o),u=s.next();!u.done;u=s.next()){var l=u.value;l.remove(this)}}catch(m){t={error:m}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(lt(c))try{c()}catch(m){a=m instanceof yg?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=ql(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{G3(p)}catch(m){a=a??[],m instanceof yg?a=bg(bg([],mg(a)),mg(m.errors)):a.push(m)}}}catch(m){r={error:m}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(a)throw new yg(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)G3(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)&&z3(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&z3(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();wg.EMPTY;function U3(e){return e instanceof wg||e&&"closed"in e&&lt(e.remove)&&lt(e.add)&&lt(e.unsubscribe)}function G3(e){lt(e)?e():e.unsubscribe()}var H3={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},V3={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,bg([e,t],mg(n)))},clearTimeout:function(e){var t=V3.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function j3(e){V3.setTimeout(function(){throw e})}function $3(){}function BN(e){e()}var vg=function(e){gg(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,U3(n)&&n.add(r)):r.destination=MN,r}return t.create=function(n,r,i){return new Kf(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}(wg),DN=Function.prototype.bind;function xg(e,t){return DN.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){Jf(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Jf(r)}else Jf(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Jf(n)}},e}(),Kf=function(e){gg(t,e);function t(n,r,i){var a=e.call(this)||this,o;if(lt(n)||!n)o={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;a&&H3.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return a.unsubscribe()},o={next:n.next&&xg(n.next,s),error:n.error&&xg(n.error,s),complete:n.complete&&xg(n.complete,s)}):o=n}return a.destination=new RN(o),a}return t}(vg);function Jf(e){j3(e)}function FN(e){throw e}var MN={closed:!0,next:$3,error:FN,complete:$3},Ag=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function q3(e){return e}function PN(e){return e.length===0?q3:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var pn=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,a=ON(t)?t:new Kf(t,n,r);return BN(function(){var o=i,s=o.operator,u=o.source;a.add(s?s.call(a,u):u?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=W3(n),new n(function(i,a){var o=new Kf({next:function(s){try{t(s)}catch(u){a(u),o.unsubscribe()}},error:a,complete:i});r.subscribe(o)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Ag]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return PN(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=W3(t),new t(function(r,i){var a;n.subscribe(function(o){return a=o},function(o){return i(o)},function(){return r(a)})})},e.create=function(t){return new e(t)},e}();function W3(e){var t;return(t=e??H3.Promise)!==null&&t!==void 0?t:Promise}function LN(e){return e&&lt(e.next)&&lt(e.error)&&lt(e.complete)}function ON(e){return e&&e instanceof vg||LN(e)&&U3(e)}function NN(e){return lt(e==null?void 0:e.lift)}function vo(e){return function(t){if(NN(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 Wl(e,t,n,r,i){return new zN(e,t,n,r,i)}var zN=function(e){gg(t,e);function t(n,r,i,a,o,s){var u=e.call(this,n)||this;return u.onFinalize=o,u.shouldUnsubscribe=s,u._next=r?function(l){try{r(l)}catch(c){n.error(c)}}:e.prototype._next,u._error=a?function(l){try{a(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,u}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}(vg),UN=new pn(function(e){return e.complete()});function GN(e){return e&&lt(e.schedule)}function Z3(e){return e[e.length-1]}function HN(e){return GN(Z3(e))?e.pop():void 0}function VN(e,t){return typeof Z3(e)=="number"?e.pop():t}var Y3=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function Q3(e){return lt(e==null?void 0:e.then)}function X3(e){return lt(e[Ag])}function K3(e){return Symbol.asyncIterator&&lt(e==null?void 0:e[Symbol.asyncIterator])}function J3(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 jN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var eE=jN();function tE(e){return lt(e==null?void 0:e[eE])}function nE(e){return TN(this,arguments,function(){var n,r,i,a;return O3(this,function(o){switch(o.label){case 0:n=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,wo(n.read())];case 3:return r=o.sent(),i=r.value,a=r.done,a?[4,wo(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,wo(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function rE(e){return lt(e==null?void 0:e.getReader)}function xo(e){if(e instanceof pn)return e;if(e!=null){if(X3(e))return $N(e);if(Y3(e))return qN(e);if(Q3(e))return WN(e);if(K3(e))return iE(e);if(tE(e))return ZN(e);if(rE(e))return YN(e)}throw J3(e)}function $N(e){return new pn(function(t){var n=e[Ag]();if(lt(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function qN(e){return new pn(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function WN(e){return new pn(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,j3)})}function ZN(e){return new pn(function(t){var n,r;try{for(var i=ql(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function iE(e){return new pn(function(t){QN(e,t).catch(function(n){return t.error(n)})})}function YN(e){return iE(nE(e))}function QN(e,t){var n,r,i,a;return kN(this,void 0,void 0,function(){var o,s;return O3(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=IN(e),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:u.sent(),u.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 gi(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function aE(e,t){return t===void 0&&(t=0),vo(function(n,r){n.subscribe(Wl(r,function(i){return gi(r,e,function(){return r.next(i)},t)},function(){return gi(r,e,function(){return r.complete()},t)},function(i){return gi(r,e,function(){return r.error(i)},t)}))})}function oE(e,t){return t===void 0&&(t=0),vo(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function XN(e,t){return xo(e).pipe(oE(t),aE(t))}function KN(e,t){return xo(e).pipe(oE(t),aE(t))}function JN(e,t){return new pn(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function ez(e,t){return new pn(function(n){var r;return gi(n,t,function(){r=e[eE](),gi(n,t,function(){var i,a,o;try{i=r.next(),a=i.value,o=i.done}catch(s){n.error(s);return}o?n.complete():n.next(a)},0,!0)}),function(){return lt(r==null?void 0:r.return)&&r.return()}})}function sE(e,t){if(!e)throw new Error("Iterable cannot be null");return new pn(function(n){gi(n,t,function(){var r=e[Symbol.asyncIterator]();gi(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function tz(e,t){return sE(nE(e),t)}function nz(e,t){if(e!=null){if(X3(e))return XN(e,t);if(Y3(e))return JN(e,t);if(Q3(e))return KN(e,t);if(K3(e))return sE(e,t);if(tE(e))return ez(e,t);if(rE(e))return tz(e,t)}throw J3(e)}function rz(e,t){return t?nz(e,t):xo(e)}var iz=N3(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function lE(e,t){var n=typeof t=="object";return new Promise(function(r,i){var a=new Kf({next:function(o){r(o),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new iz)}});e.subscribe(a)})}function uE(e,t){return vo(function(n,r){var i=0;n.subscribe(Wl(r,function(a){r.next(e.call(t,a,i++))}))})}function az(e,t,n,r,i,a,o,s){var u=[],l=0,c=0,f=!1,h=function(){f&&!u.length&&!l&&t.complete()},d=function(m){return l<r?p(m):u.push(m)},p=function(m){a&&t.next(m),l++;var y=!1;xo(n(m,c++)).subscribe(Wl(t,function(w){i==null||i(w),a?d(w):t.next(w)},function(){y=!0},void 0,function(){if(y)try{l--;for(var w=function(){var A=u.shift();o?gi(t,o,function(){return p(A)}):p(A)};u.length&&l<r;)w();h()}catch(A){t.error(A)}}))};return e.subscribe(Wl(t,d,function(){f=!0,h()})),function(){s==null||s()}}function cE(e,t,n){return n===void 0&&(n=1/0),lt(t)?cE(function(r,i){return uE(function(a,o){return t(r,a,i,o)})(xo(e(r,i)))},n):(typeof t=="number"&&(n=t),vo(function(r,i){return az(r,i,e,n)}))}function oz(e){return e===void 0&&(e=1/0),cE(q3,e)}function sz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=HN(e),r=VN(e,1/0),i=e;return i.length?i.length===1?xo(i[0]):oz(r)(rz(i,n)):UN}function lz(e,t,n,r,i){return function(a,o){var s=n,u=t,l=0;a.subscribe(Wl(o,function(c){var f=l++;u=s?e(u,c,f):(s=!0,c),r&&o.next(u)},i&&function(){s&&o.next(u),o.complete()}))}}function fE(e,t){return vo(lz(e,t,arguments.length>=2,!1,!0))}var uz=function(e,t){return e.push(t),e};function cz(){return vo(function(e,t){fE(uz,[])(e).subscribe(t)})}const hE=-2003829722,Eg=-2021002517;function fz(e){return new TextDecoder().decode(e)}function dE(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"),a=new Ie().endianess(t).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");return{chromTreeParser:i,totalSummaryParser:r,headerParser:n,isLeafNode:a}}class pE{getHeader(t){return this.headerP||(this.headerP=this._getHeader(t).catch(n=>{throw this.headerP=void 0,n})),this.headerP}constructor(t){const{filehandle:n,renameRefSeqs:r=o=>o,path:i,url:a}=t;if(this.renameRefSeqs=r,n)this.bbi=n;else if(a)this.bbi=new Qi(a);else if(i)this.bbi=new dt(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(me.Buffer.alloc(n),0,n,0,t),i=this._isBigEndian(r),a=dE(i),o=a.headerParser.parse(r),{magic:s,asOffset:u,totalSummaryOffset:l}=o;if(o.fileType=s===Eg?"bigbed":"bigwig",u>n||l>n)return this._getMainHeader(t,n*2);if(u){const c=Number(o.asOffset);o.autoSql=fz(r.subarray(c,r.indexOf(0,c)))}if(o.totalSummaryOffset>n-8*5)return this._getMainHeader(t,n*2);if(o.totalSummaryOffset){const c=r.subarray(Number(o.totalSummaryOffset)),f=a.totalSummaryParser.parse(c);o.totalSummary={...f,basesCovered:Number(f.basesCovered)}}return{...o,isBigEndian:i}}_isBigEndian(t){let n=t.readInt32LE(0);if(n===hE||n===Eg)return!1;if(n=t.readInt32BE(0),n===hE||n===Eg)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(t,n){const r=t.isBigEndian,i=r?"big":"little",a=[],o={};let s=Number(t.unzoomedDataOffset);const u=Number(t.chromTreeOffset);for(;s%4!==0;)s+=1;const l=s-u,{buffer:c}=await this.bbi.read(me.Buffer.alloc(l),0,l,Number(u),n),f=dE(r),{keySize:h}=f.chromTreeParser.parse(c),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"),m=32,y=async w=>{let A=w;if(A>=c.length)throw new Error("reading beyond end of buffer");const S=f.isLeafNode.parse(c.subarray(A)),{isLeafNode:_,cnt:T}=S;if(A+=S.offset,_)for(let I=0;I<T;I+=1){const B=d.parse(c.subarray(A));A+=B.offset;const{key:R,refId:M,refSize:G}=B,N={name:R,id:M,length:G};o[this.renameRefSeqs(R)]=M,a[M]=N}else{const I=[];for(let B=0;B<T;B+=1){const R=p.parse(c.subarray(A)),{childOffset:M}=R;A+=R.offset,I.push(y(Number(M)-Number(u)))}await Promise.all(I)}};return await y(m),{refsByName:o,refsByNumber:a}}async getUnzoomedView(t){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:i,isBigEndian:a,fileType:o}=await this.getHeader(t);return new L3(this.bbi,r,n,a,i>0,o)}async getFeatureStream(t,n,r,i){await this.getHeader(i);const a=this.renameRefSeqs(t);let o;const{basesPerSpan:s,scale:u}=i||{};return s?o=await this.getView(1/s,i):u?o=await this.getView(u,i):o=await this.getView(1,i),new pn(l=>{o.readWigData(a,n,r,l,i)})}async getFeatures(t,n,r,i){const a=await this.getFeatureStream(t,n,r,i);return(await lE(a.pipe(cz()))).flat()}}class hz extends pE{async getView(t,n){const{zoomLevels:r,refsByName:i,fileSize:a,isBigEndian:o,uncompressBufSize:s}=await this.getHeader(n),u=1/t;let l=r.length;a||(l-=1);for(let c=l;c>=0;c-=1){const f=r[c];if(f&&f.reductionLevel<=2*u){const h=Number(f.indexOffset);return new L3(this.bbi,i,h,o,s>0,"summary")}}return this.getUnzoomedView(n)}}function dz(e){return e.filter(t=>!!t)}class pz extends pE{constructor(){super(...arguments),this.readIndicesCache=new Of({cache:new Nf({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(me.Buffer.alloc(64),0,64,Number(n)),a=r?"big":"little",o=new Ie().endianess(a).uint16("size").uint16("count").uint64("offset").parse(i),{count:s,offset:u}=o;if(s===0)return[];const l=20,c=l*s,{buffer:f}=await this.bbi.read(me.Buffer.alloc(c),0,c,Number(u)),h=new Ie().endianess(a).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),d=[];for(let p=0;p<s;p+=1)d.push(h.parse(f.subarray(p*l)));return d}async searchExtraIndexBlocks(t,n={}){const{isBigEndian:r}=await this.getHeader(n),i=await this.readIndices(n);if(i.length===0)return[];const a=i.map(async o=>{const{offset:s,field:u}=o,{buffer:l}=await this.bbi.read(me.Buffer.alloc(32),0,32,Number(s),n),c=r?"big":"little",f=new Ie().endianess(c).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),{blockSize:h,keySize:d,valSize:p}=f.parse(l),m=new Ie().endianess(c).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:new Ie().array("leafkeys",{length:"cnt",type:new Ie().endianess(c).string("key",{length:d,stripNull:!0}).uint64("offset")}),1:new Ie().array("keys",{length:"cnt",type:new Ie().endianess(c).string("key",{length:d,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),y=async A=>{const S=Number(A),_=4+h*(d+p),{buffer:T}=await this.bbi.read(me.Buffer.alloc(_),0,_,S,n),I=m.parse(T);if(I.leafkeys){let B;for(let R=0;R<I.leafkeys.length;R+=1){const{key:M}=I.leafkeys[R];if(t.localeCompare(M)<0&&B)return y(B);B=I.leafkeys[R].offset}return y(B)}for(let B=0;B<I.keys.length;B+=1)if(I.keys[B].key===t)return{...I.keys[B],field:u}},w=32;return y(Number(s)+w)});return dz(await Promise.all(a))}async searchExtraIndex(t,n={}){const r=await this.searchExtraIndexBlocks(t,n);if(r.length===0)return[];const i=await this.getUnzoomedView(n),a=r.map(s=>new pn(u=>{i.readFeatures(u,[s],n)}).pipe(fE((u,l)=>u.concat(l)),uE(u=>{for(const l of u)l.field=s.field;return u})));return(await lE(sz(...a))).filter(s=>{var u;return((u=s.rest)===null||u===void 0?void 0:u.split(" ")[(s.field||0)-3])===t})}}const gE=Object.freeze(Object.defineProperty({__proto__:null,BigBed:pz,BigWig:hz},Symbol.toStringTag,{value:"Module"}));function gz(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function Ao(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,Ao)}gz(Ao,Error),Ao.buildMessage=function(e,t){var n={literal:function(l){return'"'+i(l.text)+'"'},class:function(l){var c="",f;for(f=0;f<l.parts.length;f++)c+=l.parts[f]instanceof Array?a(l.parts[f][0])+"-"+a(l.parts[f][1]):a(l.parts[f]);return"["+(l.inverted?"^":"")+c+"]"},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(c){return"\\x0"+r(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+r(c)})}function a(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+r(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+r(c)})}function o(l){return n[l.type](l)}function s(l){var c=new Array(l.length),f,h;for(f=0;f<l.length;f++)c[f]=o(l[f]);if(c.sort(),c.length>0){for(f=1,h=1;f<c.length;f++)c[f-1]!==c[f]&&(c[h]=c[f],h++);c.length=h}switch(c.length){case 1:return c[0];case 2:return c[0]+" or "+c[1];default:return c.slice(0,-1).join(", ")+", or "+c[c.length-1]}}function u(l){return l?'"'+i(l)+'"':"end of input"}return"Expected "+s(e)+" but "+u(t)+" found."};function mz(e,t){t=t!==void 0?t:{};var n={},r={declaration:z_},i=z_,a="(",o=Re("(",!1),s=")",u=Re(")",!1),l=function(E,z,Q,X){return{type:E,name:z,comment:Q,fields:X}},c="simple",f=Re("simple",!1),h="object",d=Re("object",!1),p="table",m=Re("table",!1),y="auto",w=Re("auto",!1),A="primary",S=Re("primary",!1),_="index",T=Re("index",!1),I="unique",B=Re("unique",!1),R=function(E,z){return z},M=function(E,z){return E.name&&z.unshift(E),z},G="#",N=Re("#",!1),re=";",se=Re(";",!1),te=function(E,z,Q){return{type:E,name:z,comment:Q}},ge="[",Xe=Re("[",!1),De="]",Ke=Re("]",!1),We=function(E,z,Q,X){return{type:E,size:z,name:Q,comment:X}},Je=function(E,z,Q,X){return{type:E,vals:z,name:Q,comment:X}},_e=",",Se=Re(",",!1),gt=function(E,z){return z.unshift(E),z},$t="int",Ne=Re("int",!1),L="uint",P=Re("uint",!1),$="short",V=Re("short",!1),Z="ushort",C=Re("ushort",!1),x="byte",H=Re("byte",!1),q="ubyte",ue=Re("ubyte",!1),ne="float",ce=Re("float",!1),qt="char",yi=Re("char",!1),wi="string",vi=Re("string",!1),Ct="lstring",Cr=Re("lstring",!1),xi="enum",Wt=Re("enum",!1),nr="double",v=Re("double",!1),g="bigint",b=Re("bigint",!1),k="set",F=Re("set",!1),O=function(E,z){return E+" "+z},j=/^[a-zA-Z_]/,fe=Eu([["a","z"],["A","Z"],"_"],!1,!1),He=/^[a-zA-Z0-9_]/,Pe=Eu([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Ze=function(E){return P_()},Ce=/^[^\n\r]/,B_=Eu([`
454
- `,"\r"],!0,!1),LU=function(E){return E.join("").replace(/^"/,"").replace(/"$/,"")},OU=L_("integer"),D_=/^[0-9]/,R_=Eu([["0","9"]],!1,!1),NU=function(){return parseInt(P_(),10)},zU=L_("whitespace"),F_=/^[ \t\n\r]/,M_=Eu([" "," ",`
455
- `,"\r"],!1,!1),D=0,Mt=0,wh=[{line:1,column:1}],rr=0,sm=[],ae=0,vh;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 P_(){return e.substring(Mt,D)}function Re(E,z){return{type:"literal",text:E,ignoreCase:z}}function Eu(E,z,Q){return{type:"class",parts:E,inverted:z,ignoreCase:Q}}function UU(){return{type:"end"}}function L_(E){return{type:"other",description:E}}function O_(E){var z=wh[E],Q;if(z)return z;for(Q=E-1;!wh[Q];)Q--;for(z=wh[Q],z={line:z.line,column:z.column};Q<E;)e.charCodeAt(Q)===10?(z.line++,z.column=1):z.column++,Q++;return wh[E]=z,z}function N_(E,z){var Q=O_(E),X=O_(z);return{start:{offset:E,line:Q.line,column:Q.column},end:{offset:z,line:X.line,column:X.column}}}function oe(E){D<rr||(D>rr&&(rr=D,sm=[]),sm.push(E))}function GU(E,z,Q){return new Ao(Ao.buildMessage(E,z),E,z,Q)}function z_(){var E,z,Q,X,ie,ze,Ye,bn,Ai,kr,Ei,Tr,_i,Ir;return E=D,z=be(),z!==n?(Q=U_(),Q!==n?(X=be(),X!==n?(ie=G_(),ie!==n?(ze=be(),ze!==n?(Ye=xh(),Ye!==n?(bn=be(),bn!==n?(e.charCodeAt(D)===40?(Ai=a,D++):(Ai=n,ae===0&&oe(o)),Ai!==n?(kr=be(),kr!==n?(Ei=HU(),Ei!==n?(Tr=be(),Tr!==n?(e.charCodeAt(D)===41?(_i=s,D++):(_i=n,ae===0&&oe(u)),_i!==n?(Ir=be(),Ir!==n?(Mt=E,z=l(Q,ie,Ye,Ei),E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n),E}function U_(){var E;return e.substr(D,6)===c?(E=c,D+=6):(E=n,ae===0&&oe(f)),E===n&&(e.substr(D,6)===h?(E=h,D+=6):(E=n,ae===0&&oe(d)),E===n&&(e.substr(D,5)===p?(E=p,D+=5):(E=n,ae===0&&oe(m)))),E}function G_(){var E,z,Q,X;return E=Fn(),E===n&&(E=D,z=Fn(),z!==n?(Q=H_(),Q!==n?(z=[z,Q],E=z):(D=E,E=n)):(D=E,E=n),E===n&&(E=D,z=Fn(),z!==n?(e.substr(D,4)===y?(Q=y,D+=4):(Q=n,ae===0&&oe(w)),Q!==n?(z=[z,Q],E=z):(D=E,E=n)):(D=E,E=n),E===n&&(E=D,z=Fn(),z!==n?(Q=H_(),Q!==n?(e.substr(D,4)===y?(X=y,D+=4):(X=n,ae===0&&oe(w)),X!==n?(z=[z,Q,X],E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)))),E}function H_(){var E;return e.substr(D,7)===A?(E=A,D+=7):(E=n,ae===0&&oe(S)),E===n&&(e.substr(D,5)===_?(E=_,D+=5):(E=n,ae===0&&oe(T)),E===n&&(e.substr(D,6)===I?(E=I,D+=6):(E=n,ae===0&&oe(B)))),E}function xh(){var E;return E=V_(),E===n&&(E=be()),E}function HU(){var E,z,Q,X,ie,ze,Ye;if(E=D,z=lm(),z!==n)if(Q=be(),Q!==n){for(X=[],ie=D,ze=be(),ze!==n?(Ye=lm(),Ye!==n?(Mt=ie,ze=R(z,Ye),ie=ze):(D=ie,ie=n)):(D=ie,ie=n);ie!==n;)X.push(ie),ie=D,ze=be(),ze!==n?(Ye=lm(),Ye!==n?(Mt=ie,ze=R(z,Ye),ie=ze):(D=ie,ie=n)):(D=ie,ie=n);X!==n?(ie=be(),ie!==n?(Mt=E,z=M(z,X),E=z):(D=E,E=n)):(D=E,E=n)}else D=E,E=n;else D=E,E=n;return E}function VU(){var E;return e.charCodeAt(D)===35?(E=G,D++):(E=n,ae===0&&oe(N)),E}function jU(){var E,z,Q,X,ie;return E=D,z=be(),z!==n?(Q=VU(),Q!==n?(X=V_(),X!==n?(ie=be(),ie!==n?(z=[z,Q,X,ie],E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n),E}function lm(){var E,z,Q,X,ie,ze,Ye,bn,Ai,kr,Ei,Tr,_i,Ir;return E=D,z=um(),z!==n?(Q=be(),Q!==n?(X=Fn(),X!==n?(ie=be(),ie!==n?(e.charCodeAt(D)===59?(ze=re,D++):(ze=n,ae===0&&oe(se)),ze!==n?(Ye=be(),Ye!==n?(bn=xh(),bn!==n?(Mt=E,z=te(z,X,bn),E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n),E===n&&(E=D,z=um(),z!==n?(Q=be(),Q!==n?(e.charCodeAt(D)===91?(X=ge,D++):(X=n,ae===0&&oe(Xe)),X!==n?(ie=be(),ie!==n?(ze=qU(),ze!==n?(Ye=be(),Ye!==n?(e.charCodeAt(D)===93?(bn=De,D++):(bn=n,ae===0&&oe(Ke)),bn!==n?(Ai=be(),Ai!==n?(kr=Fn(),kr!==n?(Ei=be(),Ei!==n?(e.charCodeAt(D)===59?(Tr=re,D++):(Tr=n,ae===0&&oe(se)),Tr!==n?(_i=be(),_i!==n?(Ir=xh(),Ir!==n?(Mt=E,z=We(z,ze,kr,Ir),E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n),E===n&&(E=D,z=um(),z!==n?(Q=be(),Q!==n?(e.charCodeAt(D)===40?(X=a,D++):(X=n,ae===0&&oe(o)),X!==n?(ie=be(),ie!==n?(ze=$U(),ze!==n?(Ye=be(),Ye!==n?(e.charCodeAt(D)===41?(bn=s,D++):(bn=n,ae===0&&oe(u)),bn!==n?(Ai=be(),Ai!==n?(kr=Fn(),kr!==n?(Ei=be(),Ei!==n?(e.charCodeAt(D)===59?(Tr=re,D++):(Tr=n,ae===0&&oe(se)),Tr!==n?(_i=be(),_i!==n?(Ir=xh(),Ir!==n?(Mt=E,z=Je(z,ze,kr,Ir),E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n),E===n&&(E=jU()))),E}function $U(){var E,z,Q,X,ie,ze,Ye;if(E=D,z=Fn(),z!==n){for(Q=[],X=D,e.charCodeAt(D)===44?(ie=_e,D++):(ie=n,ae===0&&oe(Se)),ie!==n?(ze=be(),ze!==n?(Ye=Fn(),Ye!==n?(Mt=X,ie=R(z,Ye),X=ie):(D=X,X=n)):(D=X,X=n)):(D=X,X=n);X!==n;)Q.push(X),X=D,e.charCodeAt(D)===44?(ie=_e,D++):(ie=n,ae===0&&oe(Se)),ie!==n?(ze=be(),ze!==n?(Ye=Fn(),Ye!==n?(Mt=X,ie=R(z,Ye),X=ie):(D=X,X=n)):(D=X,X=n)):(D=X,X=n);Q!==n?(Mt=E,z=gt(z,Q),E=z):(D=E,E=n)}else D=E,E=n;return E}function um(){var E,z,Q,X;return e.substr(D,3)===$t?(E=$t,D+=3):(E=n,ae===0&&oe(Ne)),E===n&&(e.substr(D,4)===L?(E=L,D+=4):(E=n,ae===0&&oe(P)),E===n&&(e.substr(D,5)===$?(E=$,D+=5):(E=n,ae===0&&oe(V)),E===n&&(e.substr(D,6)===Z?(E=Z,D+=6):(E=n,ae===0&&oe(C)),E===n&&(e.substr(D,4)===x?(E=x,D+=4):(E=n,ae===0&&oe(H)),E===n&&(e.substr(D,5)===q?(E=q,D+=5):(E=n,ae===0&&oe(ue)),E===n&&(e.substr(D,5)===ne?(E=ne,D+=5):(E=n,ae===0&&oe(ce)),E===n&&(e.substr(D,4)===qt?(E=qt,D+=4):(E=n,ae===0&&oe(yi)),E===n&&(e.substr(D,6)===wi?(E=wi,D+=6):(E=n,ae===0&&oe(vi)),E===n&&(e.substr(D,7)===Ct?(E=Ct,D+=7):(E=n,ae===0&&oe(Cr)),E===n&&(e.substr(D,4)===xi?(E=xi,D+=4):(E=n,ae===0&&oe(Wt)),E===n&&(e.substr(D,6)===nr?(E=nr,D+=6):(E=n,ae===0&&oe(v)),E===n&&(e.substr(D,6)===g?(E=g,D+=6):(E=n,ae===0&&oe(b)),E===n&&(e.substr(D,3)===k?(E=k,D+=3):(E=n,ae===0&&oe(F)),E===n&&(E=D,z=U_(),z!==n?(Q=be(),Q!==n?(X=G_(),X!==n?(Mt=E,z=O(z,X),E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n))))))))))))))),E}function qU(){var E;return E=WU(),E===n&&(E=Fn()),E}function Fn(){var E,z,Q,X,ie;if(E=D,z=D,j.test(e.charAt(D))?(Q=e.charAt(D),D++):(Q=n,ae===0&&oe(fe)),Q!==n){for(X=[],He.test(e.charAt(D))?(ie=e.charAt(D),D++):(ie=n,ae===0&&oe(Pe));ie!==n;)X.push(ie),He.test(e.charAt(D))?(ie=e.charAt(D),D++):(ie=n,ae===0&&oe(Pe));X!==n?(Q=[Q,X],z=Q):(D=z,z=n)}else D=z,z=n;return z!==n&&(Mt=E,z=Ze()),E=z,E}function V_(){var E,z,Q;for(E=D,z=[],Ce.test(e.charAt(D))?(Q=e.charAt(D),D++):(Q=n,ae===0&&oe(B_));Q!==n;)z.push(Q),Ce.test(e.charAt(D))?(Q=e.charAt(D),D++):(Q=n,ae===0&&oe(B_));return z!==n&&(Mt=E,z=LU(z)),E=z,E}function WU(){var E,z,Q,X;if(ae++,E=D,z=be(),z!==n){if(Q=[],D_.test(e.charAt(D))?(X=e.charAt(D),D++):(X=n,ae===0&&oe(R_)),X!==n)for(;X!==n;)Q.push(X),D_.test(e.charAt(D))?(X=e.charAt(D),D++):(X=n,ae===0&&oe(R_));else Q=n;Q!==n?(Mt=E,z=NU(),E=z):(D=E,E=n)}else D=E,E=n;return ae--,E===n&&(z=n,ae===0&&oe(OU)),E}function be(){var E,z;for(ae++,E=[],F_.test(e.charAt(D))?(z=e.charAt(D),D++):(z=n,ae===0&&oe(M_));z!==n;)E.push(z),F_.test(e.charAt(D))?(z=e.charAt(D),D++):(z=n,ae===0&&oe(M_));return ae--,E===n&&(z=n,ae===0&&oe(zU)),E}if(vh=i(),vh!==n&&D===e.length)return vh;throw vh!==n&&D<e.length&&oe(UU()),GU(sm,rr<e.length?e.charAt(rr):null,rr<e.length?N_(rr,rr+1):N_(rr,rr))}var mE={SyntaxError:Ao,parse:mz};const bz=ll(mE),_g=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
462
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function H3(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var wg=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,a;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=ql(o),u=s.next();!u.done;u=s.next()){var l=u.value;l.remove(this)}}catch(m){t={error:m}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(lt(c))try{c()}catch(m){a=m instanceof yg?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=ql(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{j3(p)}catch(m){a=a??[],m instanceof yg?a=bg(bg([],mg(a)),mg(m.errors)):a.push(m)}}}catch(m){r={error:m}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(a)throw new yg(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)j3(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)&&H3(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&H3(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();wg.EMPTY;function V3(e){return e instanceof wg||e&&"closed"in e&&lt(e.remove)&&lt(e.add)&&lt(e.unsubscribe)}function j3(e){lt(e)?e():e.unsubscribe()}var $3={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},q3={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,bg([e,t],mg(n)))},clearTimeout:function(e){var t=q3.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function W3(e){q3.setTimeout(function(){throw e})}function Z3(){}function RN(e){e()}var vg=function(e){gg(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,V3(n)&&n.add(r)):r.destination=LN,r}return t.create=function(n,r,i){return new Kf(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}(wg),FN=Function.prototype.bind;function xg(e,t){return FN.call(e,t)}var MN=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){Jf(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Jf(r)}else Jf(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Jf(n)}},e}(),Kf=function(e){gg(t,e);function t(n,r,i){var a=e.call(this)||this,o;if(lt(n)||!n)o={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;a&&$3.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return a.unsubscribe()},o={next:n.next&&xg(n.next,s),error:n.error&&xg(n.error,s),complete:n.complete&&xg(n.complete,s)}):o=n}return a.destination=new MN(o),a}return t}(vg);function Jf(e){W3(e)}function PN(e){throw e}var LN={closed:!0,next:Z3,error:PN,complete:Z3},Ag=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Y3(e){return e}function ON(e){return e.length===0?Y3:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var mn=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,a=zN(t)?t:new Kf(t,n,r);return RN(function(){var o=i,s=o.operator,u=o.source;a.add(s?s.call(a,u):u?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=Q3(n),new n(function(i,a){var o=new Kf({next:function(s){try{t(s)}catch(u){a(u),o.unsubscribe()}},error:a,complete:i});r.subscribe(o)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Ag]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ON(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=Q3(t),new t(function(r,i){var a;n.subscribe(function(o){return a=o},function(o){return i(o)},function(){return r(a)})})},e.create=function(t){return new e(t)},e}();function Q3(e){var t;return(t=e??$3.Promise)!==null&&t!==void 0?t:Promise}function NN(e){return e&&lt(e.next)&&lt(e.error)&&lt(e.complete)}function zN(e){return e&&e instanceof vg||NN(e)&&V3(e)}function UN(e){return lt(e==null?void 0:e.lift)}function vo(e){return function(t){if(UN(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 Wl(e,t,n,r,i){return new GN(e,t,n,r,i)}var GN=function(e){gg(t,e);function t(n,r,i,a,o,s){var u=e.call(this,n)||this;return u.onFinalize=o,u.shouldUnsubscribe=s,u._next=r?function(l){try{r(l)}catch(c){n.error(c)}}:e.prototype._next,u._error=a?function(l){try{a(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,u}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}(vg),HN=new mn(function(e){return e.complete()});function VN(e){return e&&lt(e.schedule)}function X3(e){return e[e.length-1]}function jN(e){return VN(X3(e))?e.pop():void 0}function $N(e,t){return typeof X3(e)=="number"?e.pop():t}var K3=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function J3(e){return lt(e==null?void 0:e.then)}function eE(e){return lt(e[Ag])}function tE(e){return Symbol.asyncIterator&&lt(e==null?void 0:e[Symbol.asyncIterator])}function nE(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 qN(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var rE=qN();function iE(e){return lt(e==null?void 0:e[rE])}function aE(e){return BN(this,arguments,function(){var n,r,i,a;return U3(this,function(o){switch(o.label){case 0:n=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,wo(n.read())];case 3:return r=o.sent(),i=r.value,a=r.done,a?[4,wo(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,wo(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function oE(e){return lt(e==null?void 0:e.getReader)}function xo(e){if(e instanceof mn)return e;if(e!=null){if(eE(e))return WN(e);if(K3(e))return ZN(e);if(J3(e))return YN(e);if(tE(e))return sE(e);if(iE(e))return QN(e);if(oE(e))return XN(e)}throw nE(e)}function WN(e){return new mn(function(t){var n=e[Ag]();if(lt(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ZN(e){return new mn(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function YN(e){return new mn(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,W3)})}function QN(e){return new mn(function(t){var n,r;try{for(var i=ql(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function sE(e){return new mn(function(t){KN(e,t).catch(function(n){return t.error(n)})})}function XN(e){return sE(aE(e))}function KN(e,t){var n,r,i,a;return IN(this,void 0,void 0,function(){var o,s;return U3(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=DN(e),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:u.sent(),u.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 gi(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function lE(e,t){return t===void 0&&(t=0),vo(function(n,r){n.subscribe(Wl(r,function(i){return gi(r,e,function(){return r.next(i)},t)},function(){return gi(r,e,function(){return r.complete()},t)},function(i){return gi(r,e,function(){return r.error(i)},t)}))})}function uE(e,t){return t===void 0&&(t=0),vo(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function JN(e,t){return xo(e).pipe(uE(t),lE(t))}function ez(e,t){return xo(e).pipe(uE(t),lE(t))}function tz(e,t){return new mn(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function nz(e,t){return new mn(function(n){var r;return gi(n,t,function(){r=e[rE](),gi(n,t,function(){var i,a,o;try{i=r.next(),a=i.value,o=i.done}catch(s){n.error(s);return}o?n.complete():n.next(a)},0,!0)}),function(){return lt(r==null?void 0:r.return)&&r.return()}})}function cE(e,t){if(!e)throw new Error("Iterable cannot be null");return new mn(function(n){gi(n,t,function(){var r=e[Symbol.asyncIterator]();gi(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function rz(e,t){return cE(aE(e),t)}function iz(e,t){if(e!=null){if(eE(e))return JN(e,t);if(K3(e))return tz(e,t);if(J3(e))return ez(e,t);if(tE(e))return cE(e,t);if(iE(e))return nz(e,t);if(oE(e))return rz(e,t)}throw nE(e)}function az(e,t){return t?iz(e,t):xo(e)}var oz=G3(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function fE(e,t){var n=typeof t=="object";return new Promise(function(r,i){var a=new Kf({next:function(o){r(o),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new oz)}});e.subscribe(a)})}function hE(e,t){return vo(function(n,r){var i=0;n.subscribe(Wl(r,function(a){r.next(e.call(t,a,i++))}))})}function sz(e,t,n,r,i,a,o,s){var u=[],l=0,c=0,f=!1,h=function(){f&&!u.length&&!l&&t.complete()},d=function(m){return l<r?p(m):u.push(m)},p=function(m){a&&t.next(m),l++;var y=!1;xo(n(m,c++)).subscribe(Wl(t,function(w){i==null||i(w),a?d(w):t.next(w)},function(){y=!0},void 0,function(){if(y)try{l--;for(var w=function(){var A=u.shift();o?gi(t,o,function(){return p(A)}):p(A)};u.length&&l<r;)w();h()}catch(A){t.error(A)}}))};return e.subscribe(Wl(t,d,function(){f=!0,h()})),function(){s==null||s()}}function dE(e,t,n){return n===void 0&&(n=1/0),lt(t)?dE(function(r,i){return hE(function(a,o){return t(r,a,i,o)})(xo(e(r,i)))},n):(typeof t=="number"&&(n=t),vo(function(r,i){return sz(r,i,e,n)}))}function lz(e){return e===void 0&&(e=1/0),dE(Y3,e)}function uz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=jN(e),r=$N(e,1/0),i=e;return i.length?i.length===1?xo(i[0]):lz(r)(az(i,n)):HN}function cz(e,t,n,r,i){return function(a,o){var s=n,u=t,l=0;a.subscribe(Wl(o,function(c){var f=l++;u=s?e(u,c,f):(s=!0,c),r&&o.next(u)},i&&function(){s&&o.next(u),o.complete()}))}}function pE(e,t){return vo(cz(e,t,arguments.length>=2,!1,!0))}var fz=function(e,t){return e.push(t),e};function hz(){return vo(function(e,t){pE(fz,[])(e).subscribe(t)})}const gE=-2003829722,Eg=-2021002517;function dz(e){return new TextDecoder().decode(e)}function mE(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"),a=new Ie().endianess(t).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");return{chromTreeParser:i,totalSummaryParser:r,headerParser:n,isLeafNode:a}}class bE{getHeader(t){return this.headerP||(this.headerP=this._getHeader(t).catch(n=>{throw this.headerP=void 0,n})),this.headerP}constructor(t){const{filehandle:n,renameRefSeqs:r=o=>o,path:i,url:a}=t;if(this.renameRefSeqs=r,n)this.bbi=n;else if(a)this.bbi=new Qi(a);else if(i)this.bbi=new dt(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(me.Buffer.alloc(n),0,n,0,t),i=this._isBigEndian(r),a=mE(i),o=a.headerParser.parse(r),{magic:s,asOffset:u,totalSummaryOffset:l}=o;if(o.fileType=s===Eg?"bigbed":"bigwig",u>n||l>n)return this._getMainHeader(t,n*2);if(u){const c=Number(o.asOffset);o.autoSql=dz(r.subarray(c,r.indexOf(0,c)))}if(o.totalSummaryOffset>n-8*5)return this._getMainHeader(t,n*2);if(o.totalSummaryOffset){const c=r.subarray(Number(o.totalSummaryOffset)),f=a.totalSummaryParser.parse(c);o.totalSummary={...f,basesCovered:Number(f.basesCovered)}}return{...o,isBigEndian:i}}_isBigEndian(t){let n=t.readInt32LE(0);if(n===gE||n===Eg)return!1;if(n=t.readInt32BE(0),n===gE||n===Eg)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(t,n){const r=t.isBigEndian,i=r?"big":"little",a=[],o={};let s=Number(t.unzoomedDataOffset);const u=Number(t.chromTreeOffset);for(;s%4!==0;)s+=1;const l=s-u,{buffer:c}=await this.bbi.read(me.Buffer.alloc(l),0,l,Number(u),n),f=mE(r),{keySize:h}=f.chromTreeParser.parse(c),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"),m=32,y=async w=>{let A=w;if(A>=c.length)throw new Error("reading beyond end of buffer");const S=f.isLeafNode.parse(c.subarray(A)),{isLeafNode:_,cnt:T}=S;if(A+=S.offset,_)for(let I=0;I<T;I+=1){const B=d.parse(c.subarray(A));A+=B.offset;const{key:R,refId:M,refSize:G}=B,N={name:R,id:M,length:G};o[this.renameRefSeqs(R)]=M,a[M]=N}else{const I=[];for(let B=0;B<T;B+=1){const R=p.parse(c.subarray(A)),{childOffset:M}=R;A+=R.offset,I.push(y(Number(M)-Number(u)))}await Promise.all(I)}};return await y(m),{refsByName:o,refsByNumber:a}}async getUnzoomedView(t){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:i,isBigEndian:a,fileType:o}=await this.getHeader(t);return new z3(this.bbi,r,n,a,i>0,o)}async getFeatureStream(t,n,r,i){await this.getHeader(i);const a=this.renameRefSeqs(t);let o;const{basesPerSpan:s,scale:u}=i||{};return s?o=await this.getView(1/s,i):u?o=await this.getView(u,i):o=await this.getView(1,i),new mn(l=>{o.readWigData(a,n,r,l,i)})}async getFeatures(t,n,r,i){const a=await this.getFeatureStream(t,n,r,i);return(await fE(a.pipe(hz()))).flat()}}class pz extends bE{async getView(t,n){const{zoomLevels:r,refsByName:i,fileSize:a,isBigEndian:o,uncompressBufSize:s}=await this.getHeader(n),u=1/t;let l=r.length;a||(l-=1);for(let c=l;c>=0;c-=1){const f=r[c];if(f&&f.reductionLevel<=2*u){const h=Number(f.indexOffset);return new z3(this.bbi,i,h,o,s>0,"summary")}}return this.getUnzoomedView(n)}}function gz(e){return e.filter(t=>!!t)}class mz extends bE{constructor(){super(...arguments),this.readIndicesCache=new Of({cache:new Nf({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(me.Buffer.alloc(64),0,64,Number(n)),a=r?"big":"little",o=new Ie().endianess(a).uint16("size").uint16("count").uint64("offset").parse(i),{count:s,offset:u}=o;if(s===0)return[];const l=20,c=l*s,{buffer:f}=await this.bbi.read(me.Buffer.alloc(c),0,c,Number(u)),h=new Ie().endianess(a).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),d=[];for(let p=0;p<s;p+=1)d.push(h.parse(f.subarray(p*l)));return d}async searchExtraIndexBlocks(t,n={}){const{isBigEndian:r}=await this.getHeader(n),i=await this.readIndices(n);if(i.length===0)return[];const a=i.map(async o=>{const{offset:s,field:u}=o,{buffer:l}=await this.bbi.read(me.Buffer.alloc(32),0,32,Number(s),n),c=r?"big":"little",f=new Ie().endianess(c).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),{blockSize:h,keySize:d,valSize:p}=f.parse(l),m=new Ie().endianess(c).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:new Ie().array("leafkeys",{length:"cnt",type:new Ie().endianess(c).string("key",{length:d,stripNull:!0}).uint64("offset")}),1:new Ie().array("keys",{length:"cnt",type:new Ie().endianess(c).string("key",{length:d,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),y=async A=>{const S=Number(A),_=4+h*(d+p),{buffer:T}=await this.bbi.read(me.Buffer.alloc(_),0,_,S,n),I=m.parse(T);if(I.leafkeys){let B;for(let R=0;R<I.leafkeys.length;R+=1){const{key:M}=I.leafkeys[R];if(t.localeCompare(M)<0&&B)return y(B);B=I.leafkeys[R].offset}return y(B)}for(let B=0;B<I.keys.length;B+=1)if(I.keys[B].key===t)return{...I.keys[B],field:u}},w=32;return y(Number(s)+w)});return gz(await Promise.all(a))}async searchExtraIndex(t,n={}){const r=await this.searchExtraIndexBlocks(t,n);if(r.length===0)return[];const i=await this.getUnzoomedView(n),a=r.map(s=>new mn(u=>{i.readFeatures(u,[s],n)}).pipe(pE((u,l)=>u.concat(l)),hE(u=>{for(const l of u)l.field=s.field;return u})));return(await fE(uz(...a))).filter(s=>{var u;return((u=s.rest)===null||u===void 0?void 0:u.split(" ")[(s.field||0)-3])===t})}}const yE=Object.freeze(Object.defineProperty({__proto__:null,BigBed:mz,BigWig:pz},Symbol.toStringTag,{value:"Module"}));function bz(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function Ao(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,Ao)}bz(Ao,Error),Ao.buildMessage=function(e,t){var n={literal:function(l){return'"'+i(l.text)+'"'},class:function(l){var c="",f;for(f=0;f<l.parts.length;f++)c+=l.parts[f]instanceof Array?a(l.parts[f][0])+"-"+a(l.parts[f][1]):a(l.parts[f]);return"["+(l.inverted?"^":"")+c+"]"},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(c){return"\\x0"+r(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+r(c)})}function a(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+r(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+r(c)})}function o(l){return n[l.type](l)}function s(l){var c=new Array(l.length),f,h;for(f=0;f<l.length;f++)c[f]=o(l[f]);if(c.sort(),c.length>0){for(f=1,h=1;f<c.length;f++)c[f-1]!==c[f]&&(c[h]=c[f],h++);c.length=h}switch(c.length){case 1:return c[0];case 2:return c[0]+" or "+c[1];default:return c.slice(0,-1).join(", ")+", or "+c[c.length-1]}}function u(l){return l?'"'+i(l)+'"':"end of input"}return"Expected "+s(e)+" but "+u(t)+" found."};function yz(e,t){t=t!==void 0?t:{};var n={},r={declaration:H_},i=H_,a="(",o=Re("(",!1),s=")",u=Re(")",!1),l=function(E,z,Q,X){return{type:E,name:z,comment:Q,fields:X}},c="simple",f=Re("simple",!1),h="object",d=Re("object",!1),p="table",m=Re("table",!1),y="auto",w=Re("auto",!1),A="primary",S=Re("primary",!1),_="index",T=Re("index",!1),I="unique",B=Re("unique",!1),R=function(E,z){return z},M=function(E,z){return E.name&&z.unshift(E),z},G="#",N=Re("#",!1),re=";",se=Re(";",!1),te=function(E,z,Q){return{type:E,name:z,comment:Q}},ge="[",Xe=Re("[",!1),De="]",Je=Re("]",!1),We=function(E,z,Q,X){return{type:E,size:z,name:Q,comment:X}},et=function(E,z,Q,X){return{type:E,vals:z,name:Q,comment:X}},_e=",",Se=Re(",",!1),gt=function(E,z){return z.unshift(E),z},$t="int",Ne=Re("int",!1),L="uint",P=Re("uint",!1),$="short",V=Re("short",!1),Z="ushort",C=Re("ushort",!1),x="byte",H=Re("byte",!1),q="ubyte",ue=Re("ubyte",!1),ne="float",ce=Re("float",!1),qt="char",yi=Re("char",!1),wi="string",vi=Re("string",!1),Ct="lstring",Cr=Re("lstring",!1),xi="enum",Wt=Re("enum",!1),nr="double",v=Re("double",!1),g="bigint",b=Re("bigint",!1),k="set",F=Re("set",!1),O=function(E,z){return E+" "+z},j=/^[a-zA-Z_]/,fe=_u([["a","z"],["A","Z"],"_"],!1,!1),He=/^[a-zA-Z0-9_]/,Pe=_u([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Ze=function(E){return N_()},Ce=/^[^\n\r]/,F_=_u([`
463
+ `,"\r"],!0,!1),NU=function(E){return E.join("").replace(/^"/,"").replace(/"$/,"")},zU=z_("integer"),M_=/^[0-9]/,P_=_u([["0","9"]],!1,!1),UU=function(){return parseInt(N_(),10)},GU=z_("whitespace"),L_=/^[ \t\n\r]/,O_=_u([" "," ",`
464
+ `,"\r"],!1,!1),D=0,Mt=0,wh=[{line:1,column:1}],rr=0,sm=[],ae=0,vh;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 N_(){return e.substring(Mt,D)}function Re(E,z){return{type:"literal",text:E,ignoreCase:z}}function _u(E,z,Q){return{type:"class",parts:E,inverted:z,ignoreCase:Q}}function HU(){return{type:"end"}}function z_(E){return{type:"other",description:E}}function U_(E){var z=wh[E],Q;if(z)return z;for(Q=E-1;!wh[Q];)Q--;for(z=wh[Q],z={line:z.line,column:z.column};Q<E;)e.charCodeAt(Q)===10?(z.line++,z.column=1):z.column++,Q++;return wh[E]=z,z}function G_(E,z){var Q=U_(E),X=U_(z);return{start:{offset:E,line:Q.line,column:Q.column},end:{offset:z,line:X.line,column:X.column}}}function oe(E){D<rr||(D>rr&&(rr=D,sm=[]),sm.push(E))}function VU(E,z,Q){return new Ao(Ao.buildMessage(E,z),E,z,Q)}function H_(){var E,z,Q,X,ie,ze,Ye,wn,Ai,kr,Ei,Tr,_i,Ir;return E=D,z=be(),z!==n?(Q=V_(),Q!==n?(X=be(),X!==n?(ie=j_(),ie!==n?(ze=be(),ze!==n?(Ye=xh(),Ye!==n?(wn=be(),wn!==n?(e.charCodeAt(D)===40?(Ai=a,D++):(Ai=n,ae===0&&oe(o)),Ai!==n?(kr=be(),kr!==n?(Ei=jU(),Ei!==n?(Tr=be(),Tr!==n?(e.charCodeAt(D)===41?(_i=s,D++):(_i=n,ae===0&&oe(u)),_i!==n?(Ir=be(),Ir!==n?(Mt=E,z=l(Q,ie,Ye,Ei),E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n),E}function V_(){var E;return e.substr(D,6)===c?(E=c,D+=6):(E=n,ae===0&&oe(f)),E===n&&(e.substr(D,6)===h?(E=h,D+=6):(E=n,ae===0&&oe(d)),E===n&&(e.substr(D,5)===p?(E=p,D+=5):(E=n,ae===0&&oe(m)))),E}function j_(){var E,z,Q,X;return E=Fn(),E===n&&(E=D,z=Fn(),z!==n?(Q=$_(),Q!==n?(z=[z,Q],E=z):(D=E,E=n)):(D=E,E=n),E===n&&(E=D,z=Fn(),z!==n?(e.substr(D,4)===y?(Q=y,D+=4):(Q=n,ae===0&&oe(w)),Q!==n?(z=[z,Q],E=z):(D=E,E=n)):(D=E,E=n),E===n&&(E=D,z=Fn(),z!==n?(Q=$_(),Q!==n?(e.substr(D,4)===y?(X=y,D+=4):(X=n,ae===0&&oe(w)),X!==n?(z=[z,Q,X],E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)))),E}function $_(){var E;return e.substr(D,7)===A?(E=A,D+=7):(E=n,ae===0&&oe(S)),E===n&&(e.substr(D,5)===_?(E=_,D+=5):(E=n,ae===0&&oe(T)),E===n&&(e.substr(D,6)===I?(E=I,D+=6):(E=n,ae===0&&oe(B)))),E}function xh(){var E;return E=q_(),E===n&&(E=be()),E}function jU(){var E,z,Q,X,ie,ze,Ye;if(E=D,z=lm(),z!==n)if(Q=be(),Q!==n){for(X=[],ie=D,ze=be(),ze!==n?(Ye=lm(),Ye!==n?(Mt=ie,ze=R(z,Ye),ie=ze):(D=ie,ie=n)):(D=ie,ie=n);ie!==n;)X.push(ie),ie=D,ze=be(),ze!==n?(Ye=lm(),Ye!==n?(Mt=ie,ze=R(z,Ye),ie=ze):(D=ie,ie=n)):(D=ie,ie=n);X!==n?(ie=be(),ie!==n?(Mt=E,z=M(z,X),E=z):(D=E,E=n)):(D=E,E=n)}else D=E,E=n;else D=E,E=n;return E}function $U(){var E;return e.charCodeAt(D)===35?(E=G,D++):(E=n,ae===0&&oe(N)),E}function qU(){var E,z,Q,X,ie;return E=D,z=be(),z!==n?(Q=$U(),Q!==n?(X=q_(),X!==n?(ie=be(),ie!==n?(z=[z,Q,X,ie],E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n),E}function lm(){var E,z,Q,X,ie,ze,Ye,wn,Ai,kr,Ei,Tr,_i,Ir;return E=D,z=um(),z!==n?(Q=be(),Q!==n?(X=Fn(),X!==n?(ie=be(),ie!==n?(e.charCodeAt(D)===59?(ze=re,D++):(ze=n,ae===0&&oe(se)),ze!==n?(Ye=be(),Ye!==n?(wn=xh(),wn!==n?(Mt=E,z=te(z,X,wn),E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n),E===n&&(E=D,z=um(),z!==n?(Q=be(),Q!==n?(e.charCodeAt(D)===91?(X=ge,D++):(X=n,ae===0&&oe(Xe)),X!==n?(ie=be(),ie!==n?(ze=ZU(),ze!==n?(Ye=be(),Ye!==n?(e.charCodeAt(D)===93?(wn=De,D++):(wn=n,ae===0&&oe(Je)),wn!==n?(Ai=be(),Ai!==n?(kr=Fn(),kr!==n?(Ei=be(),Ei!==n?(e.charCodeAt(D)===59?(Tr=re,D++):(Tr=n,ae===0&&oe(se)),Tr!==n?(_i=be(),_i!==n?(Ir=xh(),Ir!==n?(Mt=E,z=We(z,ze,kr,Ir),E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n),E===n&&(E=D,z=um(),z!==n?(Q=be(),Q!==n?(e.charCodeAt(D)===40?(X=a,D++):(X=n,ae===0&&oe(o)),X!==n?(ie=be(),ie!==n?(ze=WU(),ze!==n?(Ye=be(),Ye!==n?(e.charCodeAt(D)===41?(wn=s,D++):(wn=n,ae===0&&oe(u)),wn!==n?(Ai=be(),Ai!==n?(kr=Fn(),kr!==n?(Ei=be(),Ei!==n?(e.charCodeAt(D)===59?(Tr=re,D++):(Tr=n,ae===0&&oe(se)),Tr!==n?(_i=be(),_i!==n?(Ir=xh(),Ir!==n?(Mt=E,z=et(z,ze,kr,Ir),E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n)):(D=E,E=n),E===n&&(E=qU()))),E}function WU(){var E,z,Q,X,ie,ze,Ye;if(E=D,z=Fn(),z!==n){for(Q=[],X=D,e.charCodeAt(D)===44?(ie=_e,D++):(ie=n,ae===0&&oe(Se)),ie!==n?(ze=be(),ze!==n?(Ye=Fn(),Ye!==n?(Mt=X,ie=R(z,Ye),X=ie):(D=X,X=n)):(D=X,X=n)):(D=X,X=n);X!==n;)Q.push(X),X=D,e.charCodeAt(D)===44?(ie=_e,D++):(ie=n,ae===0&&oe(Se)),ie!==n?(ze=be(),ze!==n?(Ye=Fn(),Ye!==n?(Mt=X,ie=R(z,Ye),X=ie):(D=X,X=n)):(D=X,X=n)):(D=X,X=n);Q!==n?(Mt=E,z=gt(z,Q),E=z):(D=E,E=n)}else D=E,E=n;return E}function um(){var E,z,Q,X;return e.substr(D,3)===$t?(E=$t,D+=3):(E=n,ae===0&&oe(Ne)),E===n&&(e.substr(D,4)===L?(E=L,D+=4):(E=n,ae===0&&oe(P)),E===n&&(e.substr(D,5)===$?(E=$,D+=5):(E=n,ae===0&&oe(V)),E===n&&(e.substr(D,6)===Z?(E=Z,D+=6):(E=n,ae===0&&oe(C)),E===n&&(e.substr(D,4)===x?(E=x,D+=4):(E=n,ae===0&&oe(H)),E===n&&(e.substr(D,5)===q?(E=q,D+=5):(E=n,ae===0&&oe(ue)),E===n&&(e.substr(D,5)===ne?(E=ne,D+=5):(E=n,ae===0&&oe(ce)),E===n&&(e.substr(D,4)===qt?(E=qt,D+=4):(E=n,ae===0&&oe(yi)),E===n&&(e.substr(D,6)===wi?(E=wi,D+=6):(E=n,ae===0&&oe(vi)),E===n&&(e.substr(D,7)===Ct?(E=Ct,D+=7):(E=n,ae===0&&oe(Cr)),E===n&&(e.substr(D,4)===xi?(E=xi,D+=4):(E=n,ae===0&&oe(Wt)),E===n&&(e.substr(D,6)===nr?(E=nr,D+=6):(E=n,ae===0&&oe(v)),E===n&&(e.substr(D,6)===g?(E=g,D+=6):(E=n,ae===0&&oe(b)),E===n&&(e.substr(D,3)===k?(E=k,D+=3):(E=n,ae===0&&oe(F)),E===n&&(E=D,z=V_(),z!==n?(Q=be(),Q!==n?(X=j_(),X!==n?(Mt=E,z=O(z,X),E=z):(D=E,E=n)):(D=E,E=n)):(D=E,E=n))))))))))))))),E}function ZU(){var E;return E=YU(),E===n&&(E=Fn()),E}function Fn(){var E,z,Q,X,ie;if(E=D,z=D,j.test(e.charAt(D))?(Q=e.charAt(D),D++):(Q=n,ae===0&&oe(fe)),Q!==n){for(X=[],He.test(e.charAt(D))?(ie=e.charAt(D),D++):(ie=n,ae===0&&oe(Pe));ie!==n;)X.push(ie),He.test(e.charAt(D))?(ie=e.charAt(D),D++):(ie=n,ae===0&&oe(Pe));X!==n?(Q=[Q,X],z=Q):(D=z,z=n)}else D=z,z=n;return z!==n&&(Mt=E,z=Ze()),E=z,E}function q_(){var E,z,Q;for(E=D,z=[],Ce.test(e.charAt(D))?(Q=e.charAt(D),D++):(Q=n,ae===0&&oe(F_));Q!==n;)z.push(Q),Ce.test(e.charAt(D))?(Q=e.charAt(D),D++):(Q=n,ae===0&&oe(F_));return z!==n&&(Mt=E,z=NU(z)),E=z,E}function YU(){var E,z,Q,X;if(ae++,E=D,z=be(),z!==n){if(Q=[],M_.test(e.charAt(D))?(X=e.charAt(D),D++):(X=n,ae===0&&oe(P_)),X!==n)for(;X!==n;)Q.push(X),M_.test(e.charAt(D))?(X=e.charAt(D),D++):(X=n,ae===0&&oe(P_));else Q=n;Q!==n?(Mt=E,z=UU(),E=z):(D=E,E=n)}else D=E,E=n;return ae--,E===n&&(z=n,ae===0&&oe(zU)),E}function be(){var E,z;for(ae++,E=[],L_.test(e.charAt(D))?(z=e.charAt(D),D++):(z=n,ae===0&&oe(O_));z!==n;)E.push(z),L_.test(e.charAt(D))?(z=e.charAt(D),D++):(z=n,ae===0&&oe(O_));return ae--,E===n&&(z=n,ae===0&&oe(GU)),E}if(vh=i(),vh!==n&&D===e.length)return vh;throw vh!==n&&D<e.length&&oe(HU()),VU(sm,rr<e.length?e.charAt(rr):null,rr<e.length?G_(rr,rr+1):G_(rr,rr))}var wE={SyntaxError:Ao,parse:yz};const wz=ll(wE),_g=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
456
465
  "bigChain pairwise alignment"
457
466
  (
458
467
  string chrom; "Reference sequence chromosome or scaffold"
@@ -611,17 +620,17 @@ Reason: ${s.message}`)}));if(n.isViewSpec(a))return a.baseUrl=(o=i.match(/^[^?#]
611
620
  float score; "Floating point score."
612
621
  char[1] leftStatus; "Gap/break annotation for preceding block"
613
622
  char[1] rightStatus; "Gap/break annotation for following block"
614
- )`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,mE.parse(t.trim())]));function Sg(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 yz={".":0,"-":-1,"+":1};function wz(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 vz{constructor(t={}){if(t.autoSql)this.autoSql=Sg(bz.parse(t.autoSql));else if(t.type){if(!_g[t.type])throw new Error("Type not found");this.autoSql=Sg(_g[t.type])}else this.autoSql=Sg(_g.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(t,n={}){const{autoSql:r}=this,{uniqueId:i}=n,a=Array.isArray(t)?t:t.split(" ");let o={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&wz(a))for(let s=0;s<r.fields.length;s++){const u=r.fields[s];let l=a[s];const{isNumeric:c,isArray:f,arrayIsNumeric:h,name:d}=u;if(l==null)break;if(l!=="."){if(c){const p=Number(l);l=Number.isNaN(p)?l:p}else f&&(l=l.split(","),l[l.length-1]===""&&l.pop(),h&&(l=l.map(p=>Number(p))));o[d]=l}}else{const s=["chrom","chromStart","chromEnd","name"];o=Object.fromEntries(a.map((u,l)=>[s[l]||"field"+l,u])),o.chromStart=+o.chromStart,o.chromEnd=+o.chromEnd,Number.isNaN(Number.parseFloat(o.field4))||(o.score=+o.field4,delete o.field4),(o.field5==="+"||o.field5==="-")&&(o.strand=o.field5,delete o.field5)}return i&&(o.uniqueId=i),o.strand=yz[o.strand]||0,o.chrom=decodeURIComponent(o.chrom),o}}const xz=Object.freeze(Object.defineProperty({__proto__:null,default:vz},Symbol.toStringTag,{value:"Module"}));let bE=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 Eo(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new bE(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 yE=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 Az(e){return new Promise(t=>setTimeout(t,e))}function Ez(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}function _z(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 Sz(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function Cz(e={}){return"aborted"in e?{signal:e}:e}function wE(e,t){const n=[];let r;if(e.length===0)return e;e.sort((i,a)=>{const o=i.minv.blockPosition-a.minv.blockPosition;return o===0?i.minv.dataPosition-a.minv.dataPosition:o});for(const i of e)(!t||i.maxv.compareTo(t)>0)&&(r===void 0?(n.push(i),r=i):Sz(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function vE(e,t){return{lineCount:Ez(If.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function eh(e,t){return e?e.compareTo(t)>0?t:e:t}function kz(e,t=n=>n){let n=0,r=0;const i=[],a={};for(let o=0;o<e.length;o+=1)if(!e[o]){if(r<o){let s=e.toString("utf8",r,o);s=t(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}let xE=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const Tz=21578050;function Iz(e,t){return e-e%t}function Bz(e,t){return e-e%t+t}function Dz(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 _o extends xE{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)!==Tz)throw new Error("Not a BAI file");const r=n.readInt32LE(4),a=((1<<(5+1)*3)-1)/7;let o=8,s;const u=new Array(r);for(let l=0;l<r;l++){const c=n.readInt32LE(o);let f;o+=4;const h={};for(let m=0;m<c;m+=1){const y=n.readUInt32LE(o);if(o+=4,y===a+1)o+=4,f=vE(n,o+16),o+=32;else{if(y>a+1)throw new Error("bai index contains too many bins, please use CSI");{const w=n.readInt32LE(o);o+=4;const A=new Array(w);for(let S=0;S<w;S++){const _=Eo(n,o);o+=8;const T=Eo(n,o);o+=8,s=eh(s,_),A[S]=new yE(_,T,y)}h[y]=A}}}const d=n.readInt32LE(o);o+=4;const p=new Array(d);for(let m=0;m<d;m++){const y=Eo(n,o);o+=8,s=eh(s,y),p[m]=y}u[l]={binIndex:h,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:s,maxBlockSize:65536,indices:u,refCount:r}}async indexCov(t,n,r,i={}){const o=n!==void 0,u=(await this.parse(i)).indices[t];if(!u)return[];const{linearIndex:l=[],stats:c}=u;if(l.length===0)return[];const f=r===void 0?(l.length-1)*16384:Bz(r,16384),h=n===void 0?0:Iz(n,16384),d=o?new Array((f-h)/16384):new Array(l.length-1),p=l[l.length-1].blockPosition;if(f>(l.length-1)*16384)throw new Error("query outside of range of linear index");let m=l[h/16384].blockPosition;for(let y=h/16384,w=0;y<f/16384;y++,w++)d[w]={score:l[y+1].blockPosition-m,start:y*16384,end:y*16384+16384},m=l[y+1].blockPosition;return d.map(y=>({...y,score:y.score*((c==null?void 0:c.lineCount)||0)/p}))}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.indices[t];if(!o)return[];const s=Dz(n,r),u=[];for(const[d,p]of s)for(let m=d;m<=p;m++)if(o.binIndex[m]){const y=o.binIndex[m];for(const w of y)u.push(w)}const l=o.linearIndex.length;let c;const f=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=f;d<=h;++d){const p=o.linearIndex[d];p&&(!c||p.compareTo(c)<0)&&(c=p)}return wE(u,c)}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 mi=me.Buffer,Cg=[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"&&(Cg=new Int32Array(Cg));function AE(e){if(mi.isBuffer(e))return e;var t=typeof mi.alloc=="function"&&typeof mi.from=="function";if(typeof e=="number")return t?mi.alloc(e):new mi(e);if(typeof e=="string")return t?mi.from(e):new mi(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function Rz(e){var t=AE(4);return t.writeInt32BE(e,0),t}function kg(e,t){e=AE(e),mi.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=~~t^-1,r=0;r<e.length;r++)n=Cg[(n^e[r])&255]^n>>>8;return n^-1}function Tg(){return Rz(kg.apply(null,arguments))}Tg.signed=function(){return kg.apply(null,arguments)},Tg.unsigned=function(){return kg.apply(null,arguments)>>>0};var Fz=Tg;const Mz=ll(Fz),Pz=21582659,Lz=38359875;function Oz(e,t){return e*2**t}function EE(e,t){return Math.floor(e/2**t)}let th=class extends xE{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n){var r,i;return((i=(r=(await this.parse(n)).indices[t])===null||r===void 0?void 0:r.stats)===null||i===void 0?void 0:i.lineCount)||0}async indexCov(){return[]}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",a={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!a)throw new Error(`invalid Tabix preset format flags ${r}`);const o={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),u=s?String.fromCharCode(s):"",l=t.readInt32LE(n+20),c=t.readInt32LE(n+24);return{columnNumbers:o,coordinateType:i,metaValue:s,metaChar:u,skipLines:l,format:a,formatFlags:r,...kz(t.subarray(n+28,n+28+c),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await li(n);let i;if(r.readUInt32LE(0)===Pz)i=1;else if(r.readUInt32LE(0)===Lz)i=2;else throw new Error("Not a CSI file");this.minShift=r.readInt32LE(4),this.depth=r.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const a=r.readInt32LE(12),o=a>=30?this.parseAuxData(r,16):void 0,s=r.readInt32LE(16+a);let u=16+a+4,l;const c=new Array(s);for(let f=0;f<s;f++){const h=r.readInt32LE(u);u+=4;const d={};let p;for(let m=0;m<h;m++){const y=r.readUInt32LE(u);if(u+=4,y>this.maxBinNumber)p=vE(r,u+28),u+=28+16;else{l=eh(l,Eo(r,u)),u+=8;const w=r.readInt32LE(u);u+=4;const A=new Array(w);for(let S=0;S<w;S+=1){const _=Eo(r,u);u+=8;const T=Eo(r,u);u+=8,l=eh(l,_),A[S]=new yE(_,T,y)}d[y]=A}}c[f]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:l,indices:c,refCount:s,csi:!0,maxBlockSize:65536,...o}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i),o=a==null?void 0:a.indices[t];if(!o)return[];const s=this.reg2bins(n,r);if(s.length===0)return[];const u=[];for(const[l,c]of s)for(let f=l;f<=c;f++)if(o.binIndex[f]){const h=o.binIndex[f];for(const d of h)u.push(d)}return wE(u,new bE(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,a=this.minShift+this.depth*3;const o=[];for(;r<=this.depth;a-=3,i+=Oz(1,r*3),r+=1){const s=i+EE(t,a),u=i+EE(n,a);if(u-s+o.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);o.push([s,u])}return o}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}};const gn={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},_E="=ACMGRSVTWYHKDBN".split(""),Zl="MIDNSHP=X???????".split("");class SE{constructor(t){this.data={},this._tagList=[],this._allTagsParsed=!1;const{bytes:n,fileOffset:r}=t,{byteArray:i,start:a}=n;this.data={},this.bytes=n,this._id=r,this._refID=i.readInt32LE(a+4),this.data.start=i.readInt32LE(a+8),this.flags=(i.readInt32LE(a+16)&4294901760)>>16}get(t){return this[t]?this.data[t]?this.data[t]:(this.data[t]=this[t](),this.data[t]):this._get(t.toLowerCase())}end(){return this.get("start")+this.get("length_on_ref")}seq_id(){return this._refID}_get(t){return t in this.data?this.data[t]:(this.data[t]=this._parseTag(t),this.data[t])}_tags(){this._parseAllTags();let t=["seq"];this.isSegmentUnmapped()||t.push("start","end","strand","score","qual","MQ","CIGAR","length_on_ref","template_length"),this.isPaired()&&t.push("next_segment_position","pair_orientation"),t=t.concat(this._tagList||[]);for(const r of Object.keys(this.data))r[0]!=="_"&&r!=="next_seq_id"&&t.push(r);const n={};return t.filter(r=>{if(r in this.data&&this.data[r]===void 0||r==="CG"||r==="cg")return!1;const i=r.toLowerCase(),a=n[i];return n[i]=!0,!a})}parent(){}children(){return this.get("subfeatures")}id(){return this._id}mq(){const t=(this.get("_bin_mq_nl")&65280)>>8;return t===255?void 0:t}score(){return this.get("mq")}qual(){var t;return(t=this.qualRaw())===null||t===void 0?void 0:t.join(" ")}qualRaw(){if(this.isSegmentUnmapped())return;const{start:t,byteArray:n}=this.bytes,r=t+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes"),i=this.get("seq_length");return n.subarray(r,r+i)}strand(){return this.isReverseComplemented()?-1:1}multi_segment_next_segment_strand(){if(!this.isMateUnmapped())return this.isMateReverseComplemented()?-1:1}name(){return this.get("_read_name")}_read_name(){const t=this.get("_l_read_name"),{byteArray:n,start:r}=this.bytes;return n.toString("ascii",r+36,r+36+t-1)}_parseTag(t){if(this._allTagsParsed)return;const{byteArray:n,start:r}=this.bytes;let i=this._tagOffset||r+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes")+this.get("seq_length");const a=this.bytes.end;let o;for(;i<a&&o!==t;){const s=String.fromCharCode(n[i],n[i+1]);o=s.toLowerCase();const u=String.fromCharCode(n[i+2]);i+=3;let l;switch(u){case"A":{l=String.fromCharCode(n[i]),i+=1;break}case"i":{l=n.readInt32LE(i),i+=4;break}case"I":{l=n.readUInt32LE(i),i+=4;break}case"c":{l=n.readInt8(i),i+=1;break}case"C":{l=n.readUInt8(i),i+=1;break}case"s":{l=n.readInt16LE(i),i+=2;break}case"S":{l=n.readUInt16LE(i),i+=2;break}case"f":{l=n.readFloatLE(i),i+=4;break}case"Z":case"H":{for(l="";i<=a;){const c=n[i++];if(c===0)break;l+=String.fromCharCode(c)}break}case"B":{l="";const c=n[i++],f=String.fromCharCode(c),h=n.readInt32LE(i);if(i+=4,f==="i")if(s==="CG")for(let d=0;d<h;d++){const p=n.readInt32LE(i),m=p>>4,y=Zl[p&15];l+=m+y,i+=4}else for(let d=0;d<h;d++)l+=n.readInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="I")if(s==="CG")for(let d=0;d<h;d++){const p=n.readUInt32LE(i),m=p>>4,y=Zl[p&15];l+=m+y,i+=4}else for(let d=0;d<h;d++)l+=n.readUInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="s")for(let d=0;d<h;d++)l+=n.readInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="S")for(let d=0;d<h;d++)l+=n.readUInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="c")for(let d=0;d<h;d++)l+=n.readInt8(i),d+1<h&&(l+=","),i+=1;if(f==="C")for(let d=0;d<h;d++)l+=n.readUInt8(i),d+1<h&&(l+=","),i+=1;if(f==="f")for(let d=0;d<h;d++)l+=n.readFloatLE(i),d+1<h&&(l+=","),i+=4;break}default:console.warn(`Unknown BAM tag type '${u}', tags may be incomplete`),l=void 0,i=a}if(this._tagOffset=i,this._tagList.push(s),o===t)return l;this.data[o]=l}this._allTagsParsed=!0}_parseAllTags(){this._parseTag("")}_parseCigar(t){return t.match(/\d+\D/g).map(n=>[n.match(/\D/)[0].toUpperCase(),Number.parseInt(n,10)])}isPaired(){return!!(this.flags&gn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&gn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&gn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&gn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&gn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&gn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&gn.BAM_FREAD1)}isRead2(){return!!(this.flags&gn.BAM_FREAD2)}isSecondary(){return!!(this.flags&gn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&gn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&gn.BAM_FDUP)}isSupplementary(){return!!(this.flags&gn.BAM_FSUPPLEMENTARY)}cigar(){if(this.isSegmentUnmapped())return;const{byteArray:t,start:n}=this.bytes,r=this.get("_n_cigar_op");let i=n+36+this.get("_l_read_name");const a=this.get("seq_length");let o="",s=0,u=t.readInt32LE(i),l=u>>4,c=Zl[u&15];if(c==="S"&&l===a)return i+=4,u=t.readInt32LE(i),l=u>>4,c=Zl[u&15],c!=="N"&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(let f=0;f<r;++f)u=t.readInt32LE(i),l=u>>4,c=Zl[u&15],o+=l+c,c!=="H"&&c!=="S"&&c!=="I"&&(s+=l),i+=4;return this.data.length_on_ref=s,o}_flags(){}length_on_ref(){return this.data.length_on_ref?this.data.length_on_ref:(this.get("cigar"),this.data.length_on_ref)}_n_cigar_op(){return this.get("_flag_nc")&65535}_l_read_name(){return this.get("_bin_mq_nl")&255}_seq_bytes(){return this.get("seq_length")+1>>1}getReadBases(){return this.seq()}seq(){const{byteArray:t,start:n}=this.bytes,r=n+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4,i=this.get("_seq_bytes"),a=this.get("seq_length");let o="",s=0;for(let u=0;u<i;++u){const l=t[r+u];o+=_E[(l&240)>>4],s++,s<a&&(o+=_E[l&15],s++)}return o}getPairOrientation(){if(!this.isSegmentUnmapped()&&!this.isMateUnmapped()&&this._refID===this._next_refid()){const t=this.isReverseComplemented()?"R":"F",n=this.isMateReverseComplemented()?"R":"F";let r=" ",i=" ";this.isRead1()?(r="1",i="2"):this.isRead2()&&(r="2",i="1");const a=[];return this.template_length()>0?(a[0]=t,a[1]=r,a[2]=n,a[3]=i):(a[2]=t,a[3]=r,a[0]=n,a[1]=i),a.join("")}return""}_bin_mq_nl(){return this.bytes.byteArray.readInt32LE(this.bytes.start+12)}_flag_nc(){return this.bytes.byteArray.readInt32LE(this.bytes.start+16)}seq_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+20)}_next_refid(){return this.bytes.byteArray.readInt32LE(this.bytes.start+24)}_next_pos(){return this.bytes.byteArray.readInt32LE(this.bytes.start+28)}template_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+32)}toJSON(){const t={};for(const n of Object.keys(this))n.charAt(0)==="_"||n==="bytes"||(t[n]=this[n]);return t}}function CE(e){const t=e.split(/\r?\n/),n=[];for(const r of t){const[i,...a]=r.split(/\t/);i&&n.push({tag:i.slice(1),data:a.map(o=>{const[s,u]=o.split(":",2);return{tag:s,value:u}})})}return n}const kE=21840194,TE=65536;async function Nz(e){let t=[];for await(const n of e)t=t.concat(n);return t}class zz{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 IE{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:a,baiUrl:o,csiPath:s,csiFilehandle:u,csiUrl:l,htsget:c,yieldThreadTime:f=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new Of({cache:new Nf({maxSize:50}),fill:async(d,p)=>{const{chunk:m,opts:y}=d,{data:w,cpositions:A,dpositions:S}=await this._readChunk({chunk:m,opts:{...y,signal:p}});return this.readBamFeatures(w,A,S,m)}}),this.renameRefSeq=h,t)this.bam=t;else if(n)this.bam=new dt(n);else if(r)this.bam=new Qi(r);else if(c)this.htsget=!0,this.bam=new zz;else throw new Error("unable to initialize bam");if(u)this.index=new th({filehandle:u});else if(s)this.index=new th({filehandle:new dt(s)});else if(l)this.index=new th({filehandle:new Qi(l)});else if(a)this.index=new _o({filehandle:a});else if(i)this.index=new _o({filehandle:new dt(i)});else if(o)this.index=new _o({filehandle:new Qi(o)});else if(n)this.index=new _o({filehandle:new dt(`${n}.bai`)});else if(r)this.index=new _o({filehandle:new Qi(`${r}.bai`)});else if(c)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=f}async getHeaderPre(t){const n=Cz(t);if(!this.index)return;const r=await this.index.parse(n),i=r.firstDataLine?r.firstDataLine.blockPosition+65535:void 0;let a;if(i){const c=i+TE,f=await this.bam.read(me.Buffer.alloc(c),0,c,0,n);if(!f.bytesRead)throw new Error("Error reading header");a=f.buffer.subarray(0,Math.min(f.bytesRead,i))}else a=await this.bam.readFile(n);const o=await li(a);if(o.readInt32LE(0)!==kE)throw new Error("Not a BAM file");const s=o.readInt32LE(4);this.header=o.toString("utf8",8,8+s);const{chrToIndex:u,indexToChr:l}=await this._readRefSeqs(s+8,65535,n);return this.chrToIndex=u,this.indexToChr=l,CE(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+TE,{bytesRead:a,buffer:o}=await this.bam.read(me.Buffer.alloc(i),0,n,0,r);if(!a)throw new Error("Error reading refseqs from header");const s=await li(o.subarray(0,Math.min(a,n))),u=s.readInt32LE(t);let l=t+4;const c={},f=[];for(let h=0;h<u;h+=1){const d=s.readInt32LE(l),p=this.renameRefSeq(s.toString("utf8",l+4,l+4+d-1)),m=s.readInt32LE(l+d+4);if(c[p]=h,f.push({refName:p,length:m}),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:c,indexToChr:f}}async getRecordsForRange(t,n,r,i){return Nz(this.streamRecordsForRange(t,n,r,i))}async*streamRecordsForRange(t,n,r,i){var a;await this.getHeader(i);const o=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];if(o===void 0||!this.index)yield[];else{const s=await this.index.blocksForRange(o,n-1,r,i);yield*this._fetchChunkFeatures(s,o,n,r,i)}}async*_fetchChunkFeatures(t,n,r,i,a={}){const{viewAsPairs:o}=a,s=[];let u=!1;for(const l of t){const c=await this.featureCache.get(l.toString(),{chunk:l,opts:a},a.signal),f=[];for(const h of c)if(h.seq_id()===n)if(h.get("start")>=i){u=!0;break}else h.get("end")>=r&&f.push(h);if(s.push(f),yield f,u)break}_z(a.signal),o&&(yield this.fetchPairs(n,s,a))}async fetchPairs(t,n,r){const{pairAcrossChr:i,maxInsertSize:a=2e5}=r,o={},s={};n.map(h=>{const d={};for(const p of h){const m=p.name(),y=p.id();d[m]||(d[m]=0),d[m]++,s[y]=1}for(const[p,m]of Object.entries(d))m===1&&(o[p]=!0)});const u=[];n.map(h=>{for(const d of h){const p=d.name(),m=d.get("start"),y=d._next_pos(),w=d._next_refid();this.index&&o[p]&&(i||w===t&&Math.abs(m-y)<a)&&u.push(this.index.blocksForRange(w,y,y+1,r))}});const l=new Map,c=await Promise.all(u);for(const h of c.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:m,chunk:y}=await this._readChunk({chunk:h,opts:r}),w=[];for(const A of await this.readBamFeatures(d,p,m,y))o[A.get("name")]&&!s[A.id()]&&w.push(A);return w}))).flat()}async _readRegion(t,n,r={}){const{bytesRead:i,buffer:a}=await this.bam.read(me.Buffer.alloc(n),0,n,t,r);return a.subarray(0,Math.min(i,n))}async _readChunk({chunk:t,opts:n}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n),{buffer:i,cpositions:a,dpositions:o}=await Yx(r,t);return{data:i,cpositions:a,dpositions:o,chunk:t}}async readBamFeatures(t,n,r,i){let a=0;const o=[];let s=0,u=+Date.now();for(;a+4<t.length;){const l=t.readInt32LE(a),c=a+4+l-1;if(r){for(;a+i.minv.dataPosition>=r[s++];);s--}if(c<t.length){const f=new SE({bytes:{byteArray:t,start:a,end:c},fileOffset:n.length>0?n[s]*256+(a-r[s])+i.minv.dataPosition+1:Mz.signed(t.slice(a,c))});o.push(f),this.yieldThreadTime&&+Date.now()-u>this.yieldThreadTime&&(await Az(1),u=+Date.now())}a=c+1}return o}async hasRefSeq(t){var n,r;const i=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return i===void 0?!1:(r=this.index)===null||r===void 0?void 0:r.hasRefSeq(i)}async lineCount(t){var n;const r=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return r===void 0||!this.index?0:this.index.lineCount(r)}async indexCov(t,n,r){var i;if(!this.index)return[];await this.index.parse();const a=(i=this.chrToIndex)===null||i===void 0?void 0:i[t];return a===void 0?[]:this.index.indexCov(a,n,r)}async blocksForRange(t,n,r,i){var a;if(!this.index)return[];await this.index.parse();const o=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];return o===void 0?[]:this.index.blocksForRange(o,n,r,i)}}async function BE(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:a}=r;if(i.startsWith("data:"))return me.Buffer.from(i.split(",")[1],"base64");{const{referer:o,...s}=a,u=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...s}});if(!u.ok)throw new Error(`HTTP ${u.status} fetching ${i}: ${await u.text()}`);return me.Buffer.from(await u.arrayBuffer())}}));return me.Buffer.concat(await Promise.all(n.map(r=>li(r))))}class Uz extends IE{constructor(t){super({htsget:!0}),this.baseUrl=t.baseUrl,this.trackId=t.trackId}async*streamRecordsForRange(t,n,r,i){var a;const s=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${t}&start=${n}&end=${r}&format=BAM`,u=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];if(u===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 c=await l.json(),f=await BE(c.htsget.urls.slice(1),i);yield*this._fetchChunkFeatures([{buffer:f,_fetchedSize:void 0,bin:0,compareTo(){return 0},toUniqueString(){return`${t}_${n}_${r}`},fetchedSize(){return 0},minv:{dataPosition:0,blockPosition:0,compareTo:()=>0},maxv:{dataPosition:Number.MAX_SAFE_INTEGER,blockPosition:0,compareTo:()=>0},toString(){return`${t}_${n}_${r}`}}],u,n,r,i)}}async _readChunk({chunk:t}){if(!t.buffer)throw new Error("expected chunk.buffer in htsget");return{data:t.buffer,cpositions:[],dpositions:[],chunk:t}}async getHeader(t={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,r=await fetch(n,t);if(!r.ok)throw new Error(`HTTP ${r.status} fetching ${n}: ${await r.text()}`);const i=await r.json(),a=await BE(i.htsget.urls,t);if(a.readInt32LE(0)!==kE)throw new Error("Not a BAM file");const o=a.readInt32LE(4),s=a.toString("utf8",8,8+o),u=CE(s),l=[],c={},f=u.filter(h=>h.tag==="SQ");for(const[h,d]of f.entries()){let p="",m=0;for(const y of d.data)y.tag==="SN"?p=y.value:y.tag==="LN"&&(m=+y.value);c[p]=h,l[h]={refName:p,length:m}}return this.chrToIndex=c,this.indexToChr=l,u}}const Gz=Object.freeze(Object.defineProperty({__proto__:null,BAI:_o,BamFile:IE,BamRecord:SE,CSI:th,HtsgetFile:Uz},Symbol.toStringTag,{value:"Module"}));function DE(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class Hz extends Error{}function So(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new Hz("aborted");throw t.code="ERR_ABORTED",t}}}function Vz(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function RE(e,t){const n=[];let r=null;return e.length===0?e:(e.sort(function(i,a){const o=i.minv.blockPosition-a.minv.blockPosition;return o!==0?o:i.minv.dataPosition-a.minv.dataPosition}),e.forEach(i=>{(!t||i.maxv.compareTo(t)>0)&&(r===null?(n.push(i),r=i):Vz(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class Ig{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 Co(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Ig(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 nh{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 FE{constructor({filehandle:t,renameRefSeqs:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}async getMetadata(t={}){const{indices:n,...r}=await this.parse(t);return r}_findFirstData(t,n){return t?t.compareTo(n)>0?n:t:n}async parse(t={}){return this.parseP||(this.parseP=this._parse(t).catch(n=>{throw this.parseP=void 0,n})),this.parseP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}const jz=21578324,ME=14;function $z(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 rh extends FE{async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:o}=r.indices[i];return o?o.lineCount:-1}async _parse(t={}){const n=await this.filehandle.readFile(t),r=await li(n);if(So(t.signal),r.readUInt32LE(0)!==jz)throw new Error("Not a TBI file");const i=r.readInt32LE(4),a=r.readInt32LE(8),o=a&65536?"zero-based-half-open":"1-based-closed",u={0:"generic",1:"SAM",2:"VCF"}[a&15];if(!u)throw new Error(`invalid Tabix preset format flags ${a}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},c=r.readInt32LE(24),f=5,h=((1<<(f+1)*3)-1)/7,d=2**(14+f*3),p=c?String.fromCharCode(c):null,m=r.readInt32LE(28),y=r.readInt32LE(32),{refNameToId:w,refIdToName:A}=this._parseNameBytes(r.slice(36,36+y));let S=36+y,_;return{indices:new Array(i).fill(0).map(()=>{const I=r.readInt32LE(S);S+=4;const B={};let R;for(let N=0;N<I;N+=1){const re=r.readUInt32LE(S);if(S+=4,re>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(re===h+1){const se=r.readInt32LE(S);S+=4,se===2&&(R=this.parsePseudoBin(r,S)),S+=16*se}else{const se=r.readInt32LE(S);S+=4;const te=new Array(se);for(let ge=0;ge<se;ge+=1){const Xe=Co(r,S),De=Co(r,S+8);S+=16,_=this._findFirstData(_,Xe),te[ge]=new nh(Xe,De,re)}B[re]=te}}const M=r.readInt32LE(S);S+=4;const G=new Array(M);for(let N=0;N<M;N+=1)G[N]=Co(r,S),S+=8,_=this._findFirstData(_,G[N]);return{binIndex:B,linearIndex:G,stats:R}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:m,firstDataLine:_,columnNumbers:l,coordinateType:o,format:u,refIdToName:A,refNameToId:w,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:DE(If.fromBytesLE(t.slice(n+16,n+24),!0))}}_parseNameBytes(t){let n=0,r=0;const i=[],a={};for(let o=0;o<t.length;o+=1)if(!t[o]){if(r<o){let s=t.toString("utf8",r,o);s=this.renameRefSeq(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.refNameToId[t],s=a.indices[o];if(!s)return[];(s.linearIndex.length?s.linearIndex[n>>ME>=s.linearIndex.length?s.linearIndex.length-1:n>>ME]:new Ig(0,0))||console.warn("querying outside of possible tabix range");const l=$z(n,r),c=[];for(const[m,y]of l)for(let w=m;w<=y;w++)if(s.binIndex[w])for(const A of s.binIndex[w])c.push(new nh(A.minv,A.maxv,w));const f=s.linearIndex.length;let h=null;const d=Math.min(n>>14,f-1),p=Math.min(r>>14,f-1);for(let m=d;m<=p;++m){const y=s.linearIndex[m];y&&(!h||y.compareTo(h)<0)&&(h=y)}return RE(c,h)}}const qz=21582659,Wz=38359875;function Zz(e,t){return e*2**t}function PE(e,t){return Math.floor(e/2**t)}class Bg extends FE{constructor(t){super(t),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:o}=r.indices[i];return o?o.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",a={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!a)throw new Error(`invalid Tabix preset format flags ${r}`);const o={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),u=s?String.fromCharCode(s):null,l=t.readInt32LE(n+20),c=t.readInt32LE(n+24),{refIdToName:f,refNameToId:h}=this._parseNameBytes(t.slice(n+28,n+28+c));return{refIdToName:f,refNameToId:h,skipLines:l,metaChar:u,columnNumbers:o,format:a,coordinateType:i}}_parseNameBytes(t){let n=0,r=0;const i=[],a={};for(let o=0;o<t.length;o+=1)if(!t[o]){if(r<o){let s=t.toString("utf8",r,o);s=this.renameRefSeq(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}async _parse(t={}){const n=await li(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===qz)r=1;else if(n.readUInt32LE(0)===Wz)r=2;else throw new Error("Not a CSI file");this.minShift=n.readInt32LE(4),this.depth=n.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const i=2**(this.minShift+this.depth*3),a=n.readInt32LE(12),o=a&&a>=30?this.parseAuxData(n,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},s=n.readInt32LE(16+a);let u,l=16+a+4;const c=new Array(s).fill(0).map(()=>{const f=n.readInt32LE(l);l+=4;const h={};let d;for(let p=0;p<f;p+=1){const m=n.readUInt32LE(l);if(m>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=4+8+4+16+16;else{const y=Co(n,l+4);u=this._findFirstData(u,y);const w=n.readInt32LE(l+12);l+=16;const A=new Array(w);for(let S=0;S<w;S+=1){const _=Co(n,l),T=Co(n,l+8);l+=16,A[S]=new nh(_,T,m)}h[m]=A}}return{binIndex:h,stats:d}});return{...o,csi:!0,refCount:s,maxBlockSize:65536,firstDataLine:u,csiVersion:r,indices:c,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:DE(If.fromBytesLE(t.slice(n+28,n+36),!0))}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.refNameToId[t],s=a.indices[o];if(!s)return[];const u=this.reg2bins(n,r),l=[];for(const[c,f]of u)for(let h=c;h<=f;h++)if(s.binIndex[h])for(const d of s.binIndex[h])l.push(new nh(d.minv,d.maxv,h));return RE(l,new Ig(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,a=this.minShift+this.depth*3;const o=[];for(;r<=this.depth;a-=3,i+=Zz(1,r*3),r+=1){const s=i+PE(t,a),u=i+PE(n,a);if(u-s+o.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);o.push([s,u])}return o}}const Dg=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Yz(e){return new Promise(t=>setTimeout(t,e))}class Qz{constructor({path:t,filehandle:n,tbiPath:r,tbiFilehandle:i,csiPath:a,csiFilehandle:o,yieldTime:s=500,chunkSizeLimit:u=5e7,renameRefSeqs:l=f=>f,chunkCacheSize:c=5*2**20}){if(n)this.filehandle=n;else if(t)this.filehandle=new dt(t);else throw new TypeError("must provide either filehandle or path");if(i)this.index=new rh({filehandle:i,renameRefSeqs:l});else if(o)this.index=new Bg({filehandle:o,renameRefSeqs:l});else if(r)this.index=new rh({filehandle:new dt(r),renameRefSeqs:l});else if(a)this.index=new Bg({filehandle:new dt(a),renameRefSeqs:l});else if(t)this.index=new rh({filehandle:new dt(`${t}.tbi`),renameRefSeqs:l});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, or csiPath");this.chunkSizeLimit=u,this.renameRefSeq=l,this.yieldTime=s,this.chunkCache=new Of({cache:new Nf({maxSize:Math.floor(c/65536)}),fill:(f,h)=>this.readChunk(f,{signal:h})})}async getLines(t,n,r,i){var a;let o,s={},u;if(i===void 0)throw new TypeError("line callback must be provided");if(typeof i=="function"?u=i:(s=i,u=i.lineCallback,o=i.signal),t===void 0)throw new TypeError("must provide a reference sequence name");if(!u)throw new TypeError("line callback must be provided");const l=await this.index.getMetadata(s);So(o);const c=n??0,f=r??l.maxRefLength;if(!(c<=f))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(c===f)return;const h=await this.index.blocksForRange(t,c,f,s);So(o);for(const p of h){const m=p.fetchedSize();if(m>this.chunkSizeLimit)throw new Error(`Too much data. Chunk size ${m.toLocaleString()} bytes exceeds chunkSizeLimit of ${this.chunkSizeLimit.toLocaleString()}.`)}let d=Date.now();for(const p of h){let m;const{buffer:y,cpositions:w,dpositions:A}=await this.chunkCache.get(p.toString(),p,o);So(o);let S=0,_=0;for(;S<y.length;){const T=y.indexOf(`
615
- `,S);if(T===-1)break;const I=y.slice(S,T),B=(a=Dg==null?void 0:Dg.decode(I))!==null&&a!==void 0?a:I.toString();if(A){for(;S+p.minv.dataPosition>=A[_++];);_--}const{startCoordinate:R,overlaps:M}=this.checkLine(l,t,c,f,B);if(m!==void 0&&R!==void 0&&m>R)throw new Error(`Lines not sorted by start coordinate (${m} > ${R}), this file is not usable with Tabix.`);if(m=R,M)u(B.trim(),w[_]*256+(S-A[_])+p.minv.dataPosition+1);else if(R!==void 0&&R>=f)return;this.yieldTime&&d-Date.now()>this.yieldTime&&(d=Date.now(),So(o),await Yz(1)),S=T+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:n,metaChar:r,maxBlockSize:i}=await this.getMetadata(t);So(t.signal);const a=((n==null?void 0:n.blockPosition)||0)+i,o=await this._readRegion(0,a,t),s=await li(o);if(r){let u=-1;const l=`
616
- `.charCodeAt(0),c=r.charCodeAt(0);for(let f=0;f<s.length&&!(f===u+1&&s[f]!==c);f+=1)s[f]===l&&(u=f);return s.slice(0,u+1)}return s}async getHeader(t={}){return(await this.getHeaderBuffer(t)).toString("utf8")}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,n,r,i,a){const{columnNumbers:o,metaChar:s,coordinateType:u,format:l}=t;if(s&&a.startsWith(s))return{overlaps:!1};let{ref:c,start:f,end:h}=o;c||(c=0),f||(f=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(c,f,h);let p=1,m=0,y="",w=-1/0;for(let A=0;A<a.length+1;A+=1)if(a[A]===" "||A===a.length){if(p===c){if(this.renameRefSeq(a.slice(m,A))!==n)return{overlaps:!1}}else if(p===f){if(w=parseInt(a.slice(m,A),10),u==="1-based-closed"&&(w-=1),w>=i)return{startCoordinate:w,overlaps:!1};if((h===0||h===f)&&w+1<=r)return{startCoordinate:w,overlaps:!1}}else if(l==="VCF"&&p===4)y=a.slice(m,A);else if(p===h&&(l==="VCF"?this._getVcfEnd(w,y,a.slice(m,A)):parseInt(a.slice(m,A),10))<=r)return{overlaps:!1};if(m=A+1,p+=1,p>d)break}return{startCoordinate:w,overlaps:!0}}_getVcfEnd(t,n,r){let i=t+n.length;const a=r.includes("SVTYPE=TRA");if(r[0]!=="."&&!a){let o=";";for(let s=0;s<r.length;s+=1){if(o===";"&&r.slice(s,s+4)==="END="){let u=r.indexOf(";",s);u===-1&&(u=r.length),i=parseInt(r.slice(s+4,u),10);break}o=r[s]}}else if(a)return t+1;return i}async lineCount(t,n={}){return this.index.lineCount(t,n)}async _readRegion(t,n,r={}){const i=me.Buffer.alloc(n),{bytesRead:a,buffer:o}=await this.filehandle.read(i,0,n,t,r);return o.slice(0,a)}async readChunk(t,n={}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n);return Yx(r,t)}}const Xz=Object.freeze(Object.defineProperty({__proto__:null,CSI:Bg,TBI:rh,TabixIndexedFile:Qz},Symbol.toStringTag,{value:"Module"}));var Rg={exports:{}},ko=typeof Reflect=="object"?Reflect:null,LE=ko&&typeof ko.apply=="function"?ko.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},ih;ko&&typeof ko.ownKeys=="function"?ih=ko.ownKeys:Object.getOwnPropertySymbols?ih=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:ih=function(t){return Object.getOwnPropertyNames(t)};function Kz(e){console&&console.warn&&console.warn(e)}var OE=Number.isNaN||function(t){return t!==t};function Be(){Be.init.call(this)}Rg.exports=Be,Rg.exports.once=nU,Be.EventEmitter=Be,Be.prototype._events=void 0,Be.prototype._eventsCount=0,Be.prototype._maxListeners=void 0;var NE=10;function ah(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 NE},set:function(e){if(typeof e!="number"||e<0||OE(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");NE=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||OE(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 zE(e){return e._maxListeners===void 0?Be.defaultMaxListeners:e._maxListeners}Be.prototype.getMaxListeners=function(){return zE(this)},Be.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=t==="error",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var o;if(n.length>0&&(o=n[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=a[t];if(u===void 0)return!1;if(typeof u=="function")LE(u,this,n);else for(var l=u.length,c=jE(u,l),r=0;r<l;++r)LE(c[r],this,n);return!0};function UE(e,t,n,r){var i,a,o;if(ah(n),a=e._events,a===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)o=a[t]=n,++e._eventsCount;else if(typeof o=="function"?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),i=zE(e),i>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,Kz(s)}return e}Be.prototype.addListener=function(t,n){return UE(this,t,n,!1)},Be.prototype.on=Be.prototype.addListener,Be.prototype.prependListener=function(t,n){return UE(this,t,n,!0)};function Jz(){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 GE(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=Jz.bind(r);return i.listener=n,r.wrapFn=i,i}Be.prototype.once=function(t,n){return ah(n),this.on(t,GE(this,t,n)),this},Be.prototype.prependOnceListener=function(t,n){return ah(n),this.prependListener(t,GE(this,t,n)),this},Be.prototype.removeListener=function(t,n){var r,i,a,o,s;if(ah(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(a=-1,o=r.length-1;o>=0;o--)if(r[o]===n||r[o].listener===n){s=r[o].listener,a=o;break}if(a<0)return this;a===0?r.shift():eU(r,a),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 a=Object.keys(r),o;for(i=0;i<a.length;++i)o=a[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(t,n[i]);return this};function HE(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?tU(i):jE(i,i.length)}Be.prototype.listeners=function(t){return HE(this,t,!0)},Be.prototype.rawListeners=function(t){return HE(this,t,!1)},Be.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):VE.call(e,t)},Be.prototype.listenerCount=VE;function VE(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?ih(this._events):[]};function jE(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function eU(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function tU(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function nU(e,t){return new Promise(function(n,r){function i(o){e.removeListener(t,a),r(o)}function a(){typeof e.removeListener=="function"&&e.removeListener("error",i),n([].slice.call(arguments))}$E(e,t,a,{once:!0}),t!=="error"&&rU(e,i,{once:!0})})}function rU(e,t,n){typeof e.on=="function"&&$E(e,"error",t,n)}function $E(e,t,n,r){if(typeof e.on=="function")r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var Fg=Rg.exports,Mg={exports:{}};typeof Object.create=="function"?Mg.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Mg.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 To=Mg.exports,Pg,qE;function WE(){return qE||(qE=1,Pg=Fg.EventEmitter),Pg}const ZE=m7(S7);var Lg,YE;function iU(){if(YE)return Lg;YE=1;function e(p,m){var y=Object.keys(p);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(p);m&&(w=w.filter(function(A){return Object.getOwnPropertyDescriptor(p,A).enumerable})),y.push.apply(y,w)}return y}function t(p){for(var m=1;m<arguments.length;m++){var y=arguments[m]!=null?arguments[m]:{};m%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,m,y){return m=o(m),m in p?Object.defineProperty(p,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):p[m]=y,p}function r(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function i(p,m){for(var y=0;y<m.length;y++){var w=m[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(p,o(w.key),w)}}function a(p,m,y){return m&&i(p.prototype,m),y&&i(p,y),Object.defineProperty(p,"prototype",{writable:!1}),p}function o(p){var m=s(p,"string");return typeof m=="symbol"?m:String(m)}function s(p,m){if(typeof p!="object"||p===null)return p;var y=p[Symbol.toPrimitive];if(y!==void 0){var w=y.call(p,m||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)}var u=me,l=u.Buffer,c=ZE,f=c.inspect,h=f&&f.custom||"inspect";function d(p,m,y){l.prototype.copy.call(p,m,y)}return Lg=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return a(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,A=""+w.data;w=w.next;)A+=y+w.data;return A}},{key:"concat",value:function(y){if(this.length===0)return l.alloc(0);for(var w=l.allocUnsafe(y>>>0),A=this.head,S=0;A;)d(A.data,w,S),S+=A.data.length,A=A.next;return w}},{key:"consume",value:function(y,w){var A;return y<this.head.data.length?(A=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?A=this.shift():A=w?this._getString(y):this._getBuffer(y),A}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var w=this.head,A=1,S=w.data;for(y-=S.length;w=w.next;){var _=w.data,T=y>_.length?_.length:y;if(T===_.length?S+=_:S+=_.slice(0,y),y-=T,y===0){T===_.length?(++A,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=_.slice(T));break}++A}return this.length-=A,S}},{key:"_getBuffer",value:function(y){var w=l.allocUnsafe(y),A=this.head,S=1;for(A.data.copy(w),y-=A.data.length;A=A.next;){var _=A.data,T=y>_.length?_.length:y;if(_.copy(w,w.length-y,0,T),y-=T,y===0){T===_.length?(++S,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=_.slice(T));break}++S}return this.length-=S,w}},{key:h,value:function(y,w){return f(this,t(t({},w),{},{depth:0,customInspect:!1}))}}]),p}(),Lg}var Og,QE;function XE(){if(QE)return Og;QE=1;function e(o,s){var u=this,l=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return l||c?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,o)):process.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(f){!s&&f?u._writableState?u._writableState.errorEmitted?process.nextTick(n,u):(u._writableState.errorEmitted=!0,process.nextTick(t,u,f)):process.nextTick(t,u,f):s?(process.nextTick(n,u),s(f)):process.nextTick(n,u)}),this)}function t(o,s){i(o,s),n(o)}function n(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(o,s){o.emit("error",s)}function a(o,s){var u=o._readableState,l=o._writableState;u&&u.autoDestroy||l&&l.autoDestroy?o.destroy(s):o.emit("error",s)}return Og={destroy:e,undestroy:r,errorOrDestroy:a},Og}var Ng={},KE;function Io(){if(KE)return Ng;KE=1;function e(s,u){s.prototype=Object.create(u.prototype),s.prototype.constructor=s,s.__proto__=u}var t={};function n(s,u,l){l||(l=Error);function c(h,d,p){return typeof u=="string"?u:u(h,d,p)}var f=function(h){e(d,h);function d(p,m,y){return h.call(this,c(p,m,y))||this}return d}(l);f.prototype.name=l.name,f.prototype.code=s,t[s]=f}function r(s,u){if(Array.isArray(s)){var l=s.length;return s=s.map(function(c){return String(c)}),l>2?"one of ".concat(u," ").concat(s.slice(0,l-1).join(", "),", or ")+s[l-1]:l===2?"one of ".concat(u," ").concat(s[0]," or ").concat(s[1]):"of ".concat(u," ").concat(s[0])}else return"of ".concat(u," ").concat(String(s))}function i(s,u,l){return s.substr(!l||l<0?0:+l,u.length)===u}function a(s,u,l){return(l===void 0||l>s.length)&&(l=s.length),s.substring(l-u.length,l)===u}function o(s,u,l){return typeof l!="number"&&(l=0),l+u.length>s.length?!1:s.indexOf(u,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,u){return'The value "'+u+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,u,l){var c;typeof u=="string"&&i(u,"not ")?(c="must not be",u=u.replace(/^not /,"")):c="must be";var f;if(a(s," argument"))f="The ".concat(s," ").concat(c," ").concat(r(u,"type"));else{var h=o(s,".")?"property":"argument";f='The "'.concat(s,'" ').concat(h," ").concat(c," ").concat(r(u,"type"))}return f+=". Received type ".concat(typeof l),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ng.codes=t,Ng}var zg,JE;function e_(){if(JE)return zg;JE=1;var e=Io().codes.ERR_INVALID_OPT_VALUE;function t(r,i,a){return r.highWaterMark!=null?r.highWaterMark:i?r[a]:null}function n(r,i,a,o){var s=t(i,o,a);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?a:"highWaterMark";throw new e(u,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return zg={getHighWaterMark:n},zg}var Ug,t_;function aU(){if(t_)return Ug;t_=1,Ug=e;function e(n,r){if(t("noDeprecation"))return n;var i=!1;function a(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return n.apply(this,arguments)}return a}function t(n){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return Ug}var Gg,n_;function r_(){if(n_)return Gg;n_=1,Gg=R;function e(L){var P=this;this.next=null,this.entry=null,this.finish=function(){Ne(P,L)}}var t;R.WritableState=I;var n={deprecate:aU()},r=WE(),i=me.Buffer,a=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(L){return i.from(L)}function s(L){return i.isBuffer(L)||L instanceof a}var u=XE(),l=e_(),c=l.getHighWaterMark,f=Io().codes,h=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,w=f.ERR_STREAM_NULL_VALUES,A=f.ERR_STREAM_WRITE_AFTER_END,S=f.ERR_UNKNOWN_ENCODING,_=u.errorOrDestroy;To(R,r);function T(){}function I(L,P,$){t=t||Bo(),L=L||{},typeof $!="boolean"&&($=P instanceof t),this.objectMode=!!L.objectMode,$&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=c(this,L,"writableHighWaterMark",$),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var V=L.decodeStrings===!1;this.decodeStrings=!V,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Z){Xe(P,Z)},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)}I.prototype.getBuffer=function(){for(var P=this.bufferedRequest,$=[];P;)$.push(P),P=P.next;return $},function(){try{Object.defineProperty(I.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var B;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(P){return B.call(this,P)?!0:this!==R?!1:P&&P._writableState instanceof I}})):B=function(P){return P instanceof this};function R(L){t=t||Bo();var P=this instanceof t;if(!P&&!B.call(R,this))return new R(L);this._writableState=new I(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 m)};function M(L,P){var $=new A;_(L,$),process.nextTick(P,$)}function G(L,P,$,V){var Z;return $===null?Z=new w:typeof $!="string"&&!P.objectMode&&(Z=new h("chunk",["string","Buffer"],$)),Z?(_(L,Z),process.nextTick(V,Z),!1):!0}R.prototype.write=function(L,P,$){var V=this._writableState,Z=!1,C=!V.objectMode&&s(L);return C&&!i.isBuffer(L)&&(L=o(L)),typeof P=="function"&&($=P,P=null),C?P="buffer":P||(P=V.defaultEncoding),typeof $!="function"&&($=T),V.ending?M(this,$):(C||G(this,V,L,$))&&(V.pendingcb++,Z=re(this,V,C,L,P,$)),Z},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&&We(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 S(P);return this._writableState.defaultEncoding=P,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function N(L,P,$){return!L.objectMode&&L.decodeStrings!==!1&&typeof P=="string"&&(P=i.from(P,$)),P}Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function re(L,P,$,V,Z,C){if(!$){var x=N(P,V,Z);V!==x&&($=!0,Z="buffer",V=x)}var H=P.objectMode?1:V.length;P.length+=H;var q=P.length<P.highWaterMark;if(q||(P.needDrain=!0),P.writing||P.corked){var ue=P.lastBufferedRequest;P.lastBufferedRequest={chunk:V,encoding:Z,isBuf:$,callback:C,next:null},ue?ue.next=P.lastBufferedRequest:P.bufferedRequest=P.lastBufferedRequest,P.bufferedRequestCount+=1}else se(L,P,!1,H,V,Z,C);return q}function se(L,P,$,V,Z,C,x){P.writelen=V,P.writecb=x,P.writing=!0,P.sync=!0,P.destroyed?P.onwrite(new y("write")):$?L._writev(Z,P.onwrite):L._write(Z,C,P.onwrite),P.sync=!1}function te(L,P,$,V,Z){--P.pendingcb,$?(process.nextTick(Z,V),process.nextTick(gt,L,P),L._writableState.errorEmitted=!0,_(L,V)):(Z(V),L._writableState.errorEmitted=!0,_(L,V),gt(L,P))}function ge(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}function Xe(L,P){var $=L._writableState,V=$.sync,Z=$.writecb;if(typeof Z!="function")throw new p;if(ge($),P)te(L,$,V,P,Z);else{var C=Je($)||L.destroyed;!C&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest&&We(L,$),V?process.nextTick(De,L,$,C,Z):De(L,$,C,Z)}}function De(L,P,$,V){$||Ke(L,P),P.pendingcb--,V(),gt(L,P)}function Ke(L,P){P.length===0&&P.needDrain&&(P.needDrain=!1,L.emit("drain"))}function We(L,P){P.bufferProcessing=!0;var $=P.bufferedRequest;if(L._writev&&$&&$.next){var V=P.bufferedRequestCount,Z=new Array(V),C=P.corkedRequestsFree;C.entry=$;for(var x=0,H=!0;$;)Z[x]=$,$.isBuf||(H=!1),$=$.next,x+=1;Z.allBuffers=H,se(L,P,!0,P.length,Z,"",C.finish),P.pendingcb++,P.lastBufferedRequest=null,C.next?(P.corkedRequestsFree=C.next,C.next=null):P.corkedRequestsFree=new e(P),P.bufferedRequestCount=0}else{for(;$;){var q=$.chunk,ue=$.encoding,ne=$.callback,ce=P.objectMode?1:q.length;if(se(L,P,!1,ce,q,ue,ne),$=$.next,P.bufferedRequestCount--,P.writing)break}$===null&&(P.lastBufferedRequest=null)}P.bufferedRequest=$,P.bufferProcessing=!1}R.prototype._write=function(L,P,$){$(new d("_write()"))},R.prototype._writev=null,R.prototype.end=function(L,P,$){var V=this._writableState;return typeof L=="function"?($=L,L=null,P=null):typeof P=="function"&&($=P,P=null),L!=null&&this.write(L,P),V.corked&&(V.corked=1,this.uncork()),V.ending||$t(this,V,$),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Je(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function _e(L,P){L._final(function($){P.pendingcb--,$&&_(L,$),P.prefinished=!0,L.emit("prefinish"),gt(L,P)})}function Se(L,P){!P.prefinished&&!P.finalCalled&&(typeof L._final=="function"&&!P.destroyed?(P.pendingcb++,P.finalCalled=!0,process.nextTick(_e,L,P)):(P.prefinished=!0,L.emit("prefinish")))}function gt(L,P){var $=Je(P);if($&&(Se(L,P),P.pendingcb===0&&(P.finished=!0,L.emit("finish"),P.autoDestroy))){var V=L._readableState;(!V||V.autoDestroy&&V.endEmitted)&&L.destroy()}return $}function $t(L,P,$){P.ending=!0,gt(L,P),$&&(P.finished?process.nextTick($):L.once("finish",$)),P.ended=!0,L.writable=!1}function Ne(L,P,$){var V=L.entry;for(L.entry=null;V;){var Z=V.callback;P.pendingcb--,Z($),V=V.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=u.destroy,R.prototype._undestroy=u.undestroy,R.prototype._destroy=function(L,P){P(L)},Gg}var Hg,i_;function Bo(){if(i_)return Hg;i_=1;var e=Object.keys||function(l){var c=[];for(var f in l)c.push(f);return c};Hg=o;var t=c_(),n=r_();To(o,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var a=r[i];o.prototype[a]||(o.prototype[a]=n.prototype[a])}function o(l){if(!(this instanceof o))return new o(l);t.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(u,this)}function u(l){l.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),Hg}var Vg={},jg={exports:{}};(function(e,t){var n=me,r=n.Buffer;function i(o,s){for(var u in o)s[u]=o[u]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a);function a(o,s,u){return r(o,s,u)}i(r,a),a.from=function(o,s,u){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,u)},a.alloc=function(o,s,u){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=r(o);return s!==void 0?typeof u=="string"?l.fill(s,u):l.fill(s):l.fill(0),l},a.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},a.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)}})(jg,jg.exports);var oU=jg.exports,$g=oU.Buffer,a_=$g.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 sU(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 lU(e){var t=sU(e);if(typeof t!="string"&&($g.isEncoding===a_||!a_(e)))throw new Error("Unknown encoding: "+e);return t||e}var uU=Vg.StringDecoder=Yl;function Yl(e){this.encoding=lU(e);var t;switch(this.encoding){case"utf16le":this.text=gU,this.end=mU,t=4;break;case"utf8":this.fillLast=hU,t=4;break;case"base64":this.text=bU,this.end=yU,t=3;break;default:this.write=wU,this.end=vU;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=$g.allocUnsafe(t)}Yl.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||""},Yl.prototype.end=pU,Yl.prototype.text=dU,Yl.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 qg(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function cU(e,t,n){var r=t.length-1;if(r<n)return 0;var i=qg(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=qg(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=qg(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function fU(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 hU(e){var t=this.lastTotal-this.lastNeed,n=fU(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 dU(e,t){var n=cU(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 pU(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function gU(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 mU(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 bU(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 yU(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function wU(e){return e.toString(this.encoding)}function vU(e){return e&&e.length?this.write(e):""}var Wg,o_;function Zg(){if(o_)return Wg;o_=1;var e=Io().codes.ERR_STREAM_PREMATURE_CLOSE;function t(a){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,u=new Array(s),l=0;l<s;l++)u[l]=arguments[l];a.apply(this,u)}}}function n(){}function r(a){return a.setHeader&&typeof a.abort=="function"}function i(a,o,s){if(typeof o=="function")return i(a,null,o);o||(o={}),s=t(s||n);var u=o.readable||o.readable!==!1&&a.readable,l=o.writable||o.writable!==!1&&a.writable,c=function(){a.writable||h()},f=a._writableState&&a._writableState.finished,h=function(){l=!1,f=!0,u||s.call(a)},d=a._readableState&&a._readableState.endEmitted,p=function(){u=!1,d=!0,l||s.call(a)},m=function(S){s.call(a,S)},y=function(){var S;if(u&&!d)return(!a._readableState||!a._readableState.ended)&&(S=new e),s.call(a,S);if(l&&!f)return(!a._writableState||!a._writableState.ended)&&(S=new e),s.call(a,S)},w=function(){a.req.on("finish",h)};return r(a)?(a.on("complete",h),a.on("abort",y),a.req?w():a.on("request",w)):l&&!a._writableState&&(a.on("end",c),a.on("close",c)),a.on("end",p),a.on("finish",h),o.error!==!1&&a.on("error",m),a.on("close",y),function(){a.removeListener("complete",h),a.removeListener("abort",y),a.removeListener("request",w),a.req&&a.req.removeListener("finish",h),a.removeListener("end",c),a.removeListener("close",c),a.removeListener("finish",h),a.removeListener("end",p),a.removeListener("error",m),a.removeListener("close",y)}}return Wg=i,Wg}var Yg,s_;function xU(){if(s_)return Yg;s_=1;var e;function t(S,_,T){return _=n(_),_ in S?Object.defineProperty(S,_,{value:T,enumerable:!0,configurable:!0,writable:!0}):S[_]=T,S}function n(S){var _=r(S,"string");return typeof _=="symbol"?_:String(_)}function r(S,_){if(typeof S!="object"||S===null)return S;var T=S[Symbol.toPrimitive];if(T!==void 0){var I=T.call(S,_||"default");if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_==="string"?String:Number)(S)}var i=Zg(),a=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),f=Symbol("stream");function h(S,_){return{value:S,done:_}}function d(S){var _=S[a];if(_!==null){var T=S[f].read();T!==null&&(S[l]=null,S[a]=null,S[o]=null,_(h(T,!1)))}}function p(S){process.nextTick(d,S)}function m(S,_){return function(T,I){S.then(function(){if(_[u]){T(h(void 0,!0));return}_[c](T,I)},I)}}var y=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var _=this,T=this[s];if(T!==null)return Promise.reject(T);if(this[u])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(M,G){process.nextTick(function(){_[s]?G(_[s]):M(h(void 0,!0))})});var I=this[l],B;if(I)B=new Promise(m(I,this));else{var R=this[f].read();if(R!==null)return Promise.resolve(h(R,!1));B=new Promise(this[c])}return this[l]=B,B}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var _=this;return new Promise(function(T,I){_[f].destroy(null,function(B){if(B){I(B);return}T(h(void 0,!0))})})}),e),y),A=function(_){var T,I=Object.create(w,(T={},t(T,f,{value:_,writable:!0}),t(T,a,{value:null,writable:!0}),t(T,o,{value:null,writable:!0}),t(T,s,{value:null,writable:!0}),t(T,u,{value:_._readableState.endEmitted,writable:!0}),t(T,c,{value:function(R,M){var G=I[f].read();G?(I[l]=null,I[a]=null,I[o]=null,R(h(G,!1))):(I[a]=R,I[o]=M)},writable:!0}),T));return I[l]=null,i(_,function(B){if(B&&B.code!=="ERR_STREAM_PREMATURE_CLOSE"){var R=I[o];R!==null&&(I[l]=null,I[a]=null,I[o]=null,R(B)),I[s]=B;return}var M=I[a];M!==null&&(I[l]=null,I[a]=null,I[o]=null,M(h(void 0,!0))),I[u]=!0}),_.on("readable",p.bind(null,I)),I};return Yg=A,Yg}var Qg,l_;function AU(){return l_||(l_=1,Qg=function(){throw new Error("Readable.from is not available in the browser")}),Qg}var Xg,u_;function c_(){if(u_)return Xg;u_=1,Xg=M;var e;M.ReadableState=R,Fg.EventEmitter;var t=function(x,H){return x.listeners(H).length},n=WE(),r=me.Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(C){return r.from(C)}function o(C){return r.isBuffer(C)||C instanceof i}var s=ZE,u;s&&s.debuglog?u=s.debuglog("stream"):u=function(){};var l=iU(),c=XE(),f=e_(),h=f.getHighWaterMark,d=Io().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_STREAM_PUSH_AFTER_EOF,y=d.ERR_METHOD_NOT_IMPLEMENTED,w=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A,S,_;To(M,n);var T=c.errorOrDestroy,I=["error","close","destroy","pause","resume"];function B(C,x,H){if(typeof C.prependListener=="function")return C.prependListener(x,H);!C._events||!C._events[x]?C.on(x,H):Array.isArray(C._events[x])?C._events[x].unshift(H):C._events[x]=[H,C._events[x]]}function R(C,x,H){e=e||Bo(),C=C||{},typeof H!="boolean"&&(H=x instanceof e),this.objectMode=!!C.objectMode,H&&(this.objectMode=this.objectMode||!!C.readableObjectMode),this.highWaterMark=h(this,C,"readableHighWaterMark",H),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=C.emitClose!==!1,this.autoDestroy=!!C.autoDestroy,this.destroyed=!1,this.defaultEncoding=C.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,C.encoding&&(A||(A=Vg.StringDecoder),this.decoder=new A(C.encoding),this.encoding=C.encoding)}function M(C){if(e=e||Bo(),!(this instanceof M))return new M(C);var x=this instanceof e;this._readableState=new R(C,this,x),this.readable=!0,C&&(typeof C.read=="function"&&(this._read=C.read),typeof C.destroy=="function"&&(this._destroy=C.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=c.destroy,M.prototype._undestroy=c.undestroy,M.prototype._destroy=function(C,x){x(C)},M.prototype.push=function(C,x){var H=this._readableState,q;return H.objectMode?q=!0:typeof C=="string"&&(x=x||H.defaultEncoding,x!==H.encoding&&(C=r.from(C,x),x=""),q=!0),G(this,C,x,!1,q)},M.prototype.unshift=function(C){return G(this,C,null,!0,!1)};function G(C,x,H,q,ue){u("readableAddChunk",x);var ne=C._readableState;if(x===null)ne.reading=!1,Xe(C,ne);else{var ce;if(ue||(ce=re(ne,x)),ce)T(C,ce);else if(ne.objectMode||x&&x.length>0)if(typeof x!="string"&&!ne.objectMode&&Object.getPrototypeOf(x)!==r.prototype&&(x=a(x)),q)ne.endEmitted?T(C,new w):N(C,ne,x,!0);else if(ne.ended)T(C,new m);else{if(ne.destroyed)return!1;ne.reading=!1,ne.decoder&&!H?(x=ne.decoder.write(x),ne.objectMode||x.length!==0?N(C,ne,x,!1):We(C,ne)):N(C,ne,x,!1)}else q||(ne.reading=!1,We(C,ne))}return!ne.ended&&(ne.length<ne.highWaterMark||ne.length===0)}function N(C,x,H,q){x.flowing&&x.length===0&&!x.sync?(x.awaitDrain=0,C.emit("data",H)):(x.length+=x.objectMode?1:H.length,q?x.buffer.unshift(H):x.buffer.push(H),x.needReadable&&De(C)),We(C,x)}function re(C,x){var H;return!o(x)&&typeof x!="string"&&x!==void 0&&!C.objectMode&&(H=new p("chunk",["string","Buffer","Uint8Array"],x)),H}M.prototype.isPaused=function(){return this._readableState.flowing===!1},M.prototype.setEncoding=function(C){A||(A=Vg.StringDecoder);var x=new A(C);this._readableState.decoder=x,this._readableState.encoding=this._readableState.decoder.encoding;for(var H=this._readableState.buffer.head,q="";H!==null;)q+=x.write(H.data),H=H.next;return this._readableState.buffer.clear(),q!==""&&this._readableState.buffer.push(q),this._readableState.length=q.length,this};var se=1073741824;function te(C){return C>=se?C=se:(C--,C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C++),C}function ge(C,x){return C<=0||x.length===0&&x.ended?0:x.objectMode?1:C!==C?x.flowing&&x.length?x.buffer.head.data.length:x.length:(C>x.highWaterMark&&(x.highWaterMark=te(C)),C<=x.length?C:x.ended?x.length:(x.needReadable=!0,0))}M.prototype.read=function(C){u("read",C),C=parseInt(C,10);var x=this._readableState,H=C;if(C!==0&&(x.emittedReadable=!1),C===0&&x.needReadable&&((x.highWaterMark!==0?x.length>=x.highWaterMark:x.length>0)||x.ended))return u("read: emitReadable",x.length,x.ended),x.length===0&&x.ended?$(this):De(this),null;if(C=ge(C,x),C===0&&x.ended)return x.length===0&&$(this),null;var q=x.needReadable;u("need readable",q),(x.length===0||x.length-C<x.highWaterMark)&&(q=!0,u("length less than watermark",q)),x.ended||x.reading?(q=!1,u("reading or ended",q)):q&&(u("do read"),x.reading=!0,x.sync=!0,x.length===0&&(x.needReadable=!0),this._read(x.highWaterMark),x.sync=!1,x.reading||(C=ge(H,x)));var ue;return C>0?ue=P(C,x):ue=null,ue===null?(x.needReadable=x.length<=x.highWaterMark,C=0):(x.length-=C,x.awaitDrain=0),x.length===0&&(x.ended||(x.needReadable=!0),H!==C&&x.ended&&$(this)),ue!==null&&this.emit("data",ue),ue};function Xe(C,x){if(u("onEofChunk"),!x.ended){if(x.decoder){var H=x.decoder.end();H&&H.length&&(x.buffer.push(H),x.length+=x.objectMode?1:H.length)}x.ended=!0,x.sync?De(C):(x.needReadable=!1,x.emittedReadable||(x.emittedReadable=!0,Ke(C)))}}function De(C){var x=C._readableState;u("emitReadable",x.needReadable,x.emittedReadable),x.needReadable=!1,x.emittedReadable||(u("emitReadable",x.flowing),x.emittedReadable=!0,process.nextTick(Ke,C))}function Ke(C){var x=C._readableState;u("emitReadable_",x.destroyed,x.length,x.ended),!x.destroyed&&(x.length||x.ended)&&(C.emit("readable"),x.emittedReadable=!1),x.needReadable=!x.flowing&&!x.ended&&x.length<=x.highWaterMark,L(C)}function We(C,x){x.readingMore||(x.readingMore=!0,process.nextTick(Je,C,x))}function Je(C,x){for(;!x.reading&&!x.ended&&(x.length<x.highWaterMark||x.flowing&&x.length===0);){var H=x.length;if(u("maybeReadMore read 0"),C.read(0),H===x.length)break}x.readingMore=!1}M.prototype._read=function(C){T(this,new y("_read()"))},M.prototype.pipe=function(C,x){var H=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=C;break;case 1:q.pipes=[q.pipes,C];break;default:q.pipes.push(C);break}q.pipesCount+=1,u("pipe count=%d opts=%j",q.pipesCount,x);var ue=(!x||x.end!==!1)&&C!==process.stdout&&C!==process.stderr,ne=ue?qt:nr;q.endEmitted?process.nextTick(ne):H.once("end",ne),C.on("unpipe",ce);function ce(v,g){u("onunpipe"),v===H&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,vi())}function qt(){u("onend"),C.end()}var yi=_e(H);C.on("drain",yi);var wi=!1;function vi(){u("cleanup"),C.removeListener("close",xi),C.removeListener("finish",Wt),C.removeListener("drain",yi),C.removeListener("error",Cr),C.removeListener("unpipe",ce),H.removeListener("end",qt),H.removeListener("end",nr),H.removeListener("data",Ct),wi=!0,q.awaitDrain&&(!C._writableState||C._writableState.needDrain)&&yi()}H.on("data",Ct);function Ct(v){u("ondata");var g=C.write(v);u("dest.write",g),g===!1&&((q.pipesCount===1&&q.pipes===C||q.pipesCount>1&&Z(q.pipes,C)!==-1)&&!wi&&(u("false write response, pause",q.awaitDrain),q.awaitDrain++),H.pause())}function Cr(v){u("onerror",v),nr(),C.removeListener("error",Cr),t(C,"error")===0&&T(C,v)}B(C,"error",Cr);function xi(){C.removeListener("finish",Wt),nr()}C.once("close",xi);function Wt(){u("onfinish"),C.removeListener("close",xi),nr()}C.once("finish",Wt);function nr(){u("unpipe"),H.unpipe(C)}return C.emit("pipe",H),q.flowing||(u("pipe resume"),H.resume()),C};function _e(C){return function(){var H=C._readableState;u("pipeOnDrain",H.awaitDrain),H.awaitDrain&&H.awaitDrain--,H.awaitDrain===0&&t(C,"data")&&(H.flowing=!0,L(C))}}M.prototype.unpipe=function(C){var x=this._readableState,H={hasUnpiped:!1};if(x.pipesCount===0)return this;if(x.pipesCount===1)return C&&C!==x.pipes?this:(C||(C=x.pipes),x.pipes=null,x.pipesCount=0,x.flowing=!1,C&&C.emit("unpipe",this,H),this);if(!C){var q=x.pipes,ue=x.pipesCount;x.pipes=null,x.pipesCount=0,x.flowing=!1;for(var ne=0;ne<ue;ne++)q[ne].emit("unpipe",this,{hasUnpiped:!1});return this}var ce=Z(x.pipes,C);return ce===-1?this:(x.pipes.splice(ce,1),x.pipesCount-=1,x.pipesCount===1&&(x.pipes=x.pipes[0]),C.emit("unpipe",this,H),this)},M.prototype.on=function(C,x){var H=n.prototype.on.call(this,C,x),q=this._readableState;return C==="data"?(q.readableListening=this.listenerCount("readable")>0,q.flowing!==!1&&this.resume()):C==="readable"&&!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.flowing=!1,q.emittedReadable=!1,u("on readable",q.length,q.reading),q.length?De(this):q.reading||process.nextTick(gt,this)),H},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(C,x){var H=n.prototype.removeListener.call(this,C,x);return C==="readable"&&process.nextTick(Se,this),H},M.prototype.removeAllListeners=function(C){var x=n.prototype.removeAllListeners.apply(this,arguments);return(C==="readable"||C===void 0)&&process.nextTick(Se,this),x};function Se(C){var x=C._readableState;x.readableListening=C.listenerCount("readable")>0,x.resumeScheduled&&!x.paused?x.flowing=!0:C.listenerCount("data")>0&&C.resume()}function gt(C){u("readable nexttick read 0"),C.read(0)}M.prototype.resume=function(){var C=this._readableState;return C.flowing||(u("resume"),C.flowing=!C.readableListening,$t(this,C)),C.paused=!1,this};function $t(C,x){x.resumeScheduled||(x.resumeScheduled=!0,process.nextTick(Ne,C,x))}function Ne(C,x){u("resume",x.reading),x.reading||C.read(0),x.resumeScheduled=!1,C.emit("resume"),L(C),x.flowing&&!x.reading&&C.read(0)}M.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function L(C){var x=C._readableState;for(u("flow",x.flowing);x.flowing&&C.read()!==null;);}M.prototype.wrap=function(C){var x=this,H=this._readableState,q=!1;C.on("end",function(){if(u("wrapped end"),H.decoder&&!H.ended){var ce=H.decoder.end();ce&&ce.length&&x.push(ce)}x.push(null)}),C.on("data",function(ce){if(u("wrapped data"),H.decoder&&(ce=H.decoder.write(ce)),!(H.objectMode&&ce==null)&&!(!H.objectMode&&(!ce||!ce.length))){var qt=x.push(ce);qt||(q=!0,C.pause())}});for(var ue in C)this[ue]===void 0&&typeof C[ue]=="function"&&(this[ue]=function(qt){return function(){return C[qt].apply(C,arguments)}}(ue));for(var ne=0;ne<I.length;ne++)C.on(I[ne],this.emit.bind(this,I[ne]));return this._read=function(ce){u("wrapped _read",ce),q&&(q=!1,C.resume())},this},typeof Symbol=="function"&&(M.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=xU()),S(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(C,x){if(x.length===0)return null;var H;return x.objectMode?H=x.buffer.shift():!C||C>=x.length?(x.decoder?H=x.buffer.join(""):x.buffer.length===1?H=x.buffer.first():H=x.buffer.concat(x.length),x.buffer.clear()):H=x.buffer.consume(C,x.decoder),H}function $(C){var x=C._readableState;u("endReadable",x.endEmitted),x.endEmitted||(x.ended=!0,process.nextTick(V,x,C))}function V(C,x){if(u("endReadableNT",C.endEmitted,C.length),!C.endEmitted&&C.length===0&&(C.endEmitted=!0,x.readable=!1,x.emit("end"),C.autoDestroy)){var H=x._writableState;(!H||H.autoDestroy&&H.finished)&&x.destroy()}}typeof Symbol=="function"&&(M.from=function(C,x){return _===void 0&&(_=AU()),_(M,C,x)});function Z(C,x){for(var H=0,q=C.length;H<q;H++)if(C[H]===x)return H;return-1}return Xg}var Kg,f_;function h_(){if(f_)return Kg;f_=1,Kg=s;var e=Io().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,a=Bo();To(s,a);function o(c,f){var h=this._transformState;h.transforming=!1;var d=h.writecb;if(d===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),d(c);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function s(c){if(!(this instanceof s))return new s(c);a.call(this,c),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",u)}function u(){var c=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){l(c,f,h)}):l(this,null,null)}s.prototype.push=function(c,f){return this._transformState.needTransform=!1,a.prototype.push.call(this,c,f)},s.prototype._transform=function(c,f,h){h(new t("_transform()"))},s.prototype._write=function(c,f,h){var d=this._transformState;if(d.writecb=h,d.writechunk=c,d.writeencoding=f,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},s.prototype._read=function(c){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},s.prototype._destroy=function(c,f){a.prototype._destroy.call(this,c,function(h){f(h)})};function l(c,f,h){if(f)return c.emit("error",f);if(h!=null&&c.push(h),c._writableState.length)throw new i;if(c._transformState.transforming)throw new r;return c.push(null)}return Kg}var Jg,d_;function EU(){if(d_)return Jg;d_=1,Jg=t;var e=h_();To(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)},Jg}var em,p_;function _U(){if(p_)return em;p_=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=Io().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function a(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,d,p,m){m=t(m);var y=!1;h.on("close",function(){y=!0}),e===void 0&&(e=Zg()),e(h,{readable:d,writable:p},function(A){if(A)return m(A);y=!0,m()});var w=!1;return function(A){if(!y&&!w){if(w=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();m(A||new i("pipe"))}}}function u(h){h()}function l(h,d){return h.pipe(d)}function c(h){return!h.length||typeof h[h.length-1]!="function"?a:h.pop()}function f(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var m=c(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var y,w=d.map(function(A,S){var _=S<d.length-1,T=S>0;return s(A,_,T,function(I){y||(y=I),I&&w.forEach(u),!_&&(w.forEach(u),m(y))})});return d.reduce(l)}return em=f,em}var g_=mn,tm=Fg.EventEmitter,SU=To;SU(mn,tm),mn.Readable=c_(),mn.Writable=r_(),mn.Duplex=Bo(),mn.Transform=h_(),mn.PassThrough=EU(),mn.finished=Zg(),mn.pipeline=_U(),mn.Stream=mn;function mn(){tm.call(this)}mn.prototype.pipe=function(e,t){var n=this;function r(c){e.writable&&e.write(c)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",o),n.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function u(c){if(l(),tm.listenerCount(this,"error")===0)throw c}n.on("error",u),e.on("error",u);function l(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",o),n.removeListener("close",s),n.removeListener("error",u),e.removeListener("error",u),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 Ql(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function m_(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function Xl(e){return m_(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function vr(e){return m_(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function b_(e){if(!(e&&e.length)||e===".")return{};const t={};return e.replace(/\r?\n$/,"").split(";").forEach(n=>{const r=n.split("=",2);if(!(r[1]&&r[1].length))return;r[0]=r[0].trim();let i=t[r[0].trim()];i||(i=[],t[r[0]]=i),i.push(...r[1].split(",").map(a=>a.trim()).map(Ql))}),t}function y_(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&Ql(t[0]),source:t[1]&&Ql(t[1]),type:t[2]&&Ql(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:b_(t[8])}}function w_(e){const t=/^\s*##\s*(\S+)\s*(.*)/.exec(e);if(!t)return null;const[,n]=t;let[,,r]=t;const i={directive:n};if(r.length&&(r=r.replace(/\r?\n$/,""),i.value=r),n==="sequence-region"){const a=r.split(/\s+/,3);return{...i,seq_id:a[0],start:a[1]&&a[1].replace(/\D/g,""),end:a[2]&&a[2].replace(/\D/g,"")}}else if(n==="genome-build"){const[a,o]=r.split(/\s+/,2);return{...i,source:a,buildName:o}}return i}function v_(e){const t=[];return Object.entries(e).forEach(([n,r])=>{if(!r)return;let i;r.hasOwnProperty("toString")?i=Xl(r.toString()):Array.isArray(r)?i=r.map(Xl).join(","):i=Xl(r),t.push(`${Xl(n)}=${i}`)}),t.length?t.join(";"):"."}function CU(e,t){const n=e.attributes===null||e.attributes===void 0?".":v_(e.attributes),i=`${[e.seq_id===null?".":vr(e.seq_id),e.source===null?".":vr(e.source),e.type===null?".":vr(e.type),e.start===null?".":vr(e.start),e.end===null?".":vr(e.end),e.score===null?".":vr(e.score),e.strand===null?".":vr(e.strand),e.phase===null?".":vr(e.phase),n].join(" ")}
617
- `;return t[i]?"":(t[i]=!0,i)}function oh(e,t){if(Array.isArray(e))return e.map(r=>oh(r,t)).join("");const n=[CU(e,t)];return kU(e)&&n.push(...e.child_features.map(r=>oh(r,t)),...e.derived_features.map(r=>oh(r,t))),n.join("")}function x_(e){return oh(e,{})}function A_(e){let t=`##${e.directive}`;return e.value&&(t+=` ${e.value}`),t+=`
618
- `,t}function E_(e){return`# ${e.comment}
623
+ )`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,wE.parse(t.trim())]));function Sg(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 vz={".":0,"-":-1,"+":1};function xz(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 Az{constructor(t={}){if(t.autoSql)this.autoSql=Sg(wz.parse(t.autoSql));else if(t.type){if(!_g[t.type])throw new Error("Type not found");this.autoSql=Sg(_g[t.type])}else this.autoSql=Sg(_g.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(t,n={}){const{autoSql:r}=this,{uniqueId:i}=n,a=Array.isArray(t)?t:t.split(" ");let o={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&xz(a))for(let s=0;s<r.fields.length;s++){const u=r.fields[s];let l=a[s];const{isNumeric:c,isArray:f,arrayIsNumeric:h,name:d}=u;if(l==null)break;if(l!=="."){if(c){const p=Number(l);l=Number.isNaN(p)?l:p}else f&&(l=l.split(","),l[l.length-1]===""&&l.pop(),h&&(l=l.map(p=>Number(p))));o[d]=l}}else{const s=["chrom","chromStart","chromEnd","name"];o=Object.fromEntries(a.map((u,l)=>[s[l]||"field"+l,u])),o.chromStart=+o.chromStart,o.chromEnd=+o.chromEnd,Number.isNaN(Number.parseFloat(o.field4))||(o.score=+o.field4,delete o.field4),(o.field5==="+"||o.field5==="-")&&(o.strand=o.field5,delete o.field5)}return i&&(o.uniqueId=i),o.strand=vz[o.strand]||0,o.chrom=decodeURIComponent(o.chrom),o}}const Ez=Object.freeze(Object.defineProperty({__proto__:null,default:Az},Symbol.toStringTag,{value:"Module"}));let vE=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 Eo(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new vE(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 xE=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 _z(e){return new Promise(t=>setTimeout(t,e))}function Sz(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}function Cz(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 kz(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function Tz(e={}){return"aborted"in e?{signal:e}:e}function AE(e,t){const n=[];let r;if(e.length===0)return e;e.sort((i,a)=>{const o=i.minv.blockPosition-a.minv.blockPosition;return o===0?i.minv.dataPosition-a.minv.dataPosition:o});for(const i of e)(!t||i.maxv.compareTo(t)>0)&&(r===void 0?(n.push(i),r=i):kz(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function EE(e,t){return{lineCount:Sz(If.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function eh(e,t){return e?e.compareTo(t)>0?t:e:t}function Iz(e,t=n=>n){let n=0,r=0;const i=[],a={};for(let o=0;o<e.length;o+=1)if(!e[o]){if(r<o){let s=e.toString("utf8",r,o);s=t(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}let _E=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const Bz=21578050;function Dz(e,t){return e-e%t}function Rz(e,t){return e-e%t+t}function Fz(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 _o extends _E{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)!==Bz)throw new Error("Not a BAI file");const r=n.readInt32LE(4),a=((1<<(5+1)*3)-1)/7;let o=8,s;const u=new Array(r);for(let l=0;l<r;l++){const c=n.readInt32LE(o);let f;o+=4;const h={};for(let m=0;m<c;m+=1){const y=n.readUInt32LE(o);if(o+=4,y===a+1)o+=4,f=EE(n,o+16),o+=32;else{if(y>a+1)throw new Error("bai index contains too many bins, please use CSI");{const w=n.readInt32LE(o);o+=4;const A=new Array(w);for(let S=0;S<w;S++){const _=Eo(n,o);o+=8;const T=Eo(n,o);o+=8,s=eh(s,_),A[S]=new xE(_,T,y)}h[y]=A}}}const d=n.readInt32LE(o);o+=4;const p=new Array(d);for(let m=0;m<d;m++){const y=Eo(n,o);o+=8,s=eh(s,y),p[m]=y}u[l]={binIndex:h,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:s,maxBlockSize:65536,indices:u,refCount:r}}async indexCov(t,n,r,i={}){const o=n!==void 0,u=(await this.parse(i)).indices[t];if(!u)return[];const{linearIndex:l=[],stats:c}=u;if(l.length===0)return[];const f=r===void 0?(l.length-1)*16384:Rz(r,16384),h=n===void 0?0:Dz(n,16384),d=o?new Array((f-h)/16384):new Array(l.length-1),p=l[l.length-1].blockPosition;if(f>(l.length-1)*16384)throw new Error("query outside of range of linear index");let m=l[h/16384].blockPosition;for(let y=h/16384,w=0;y<f/16384;y++,w++)d[w]={score:l[y+1].blockPosition-m,start:y*16384,end:y*16384+16384},m=l[y+1].blockPosition;return d.map(y=>({...y,score:y.score*((c==null?void 0:c.lineCount)||0)/p}))}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.indices[t];if(!o)return[];const s=Fz(n,r),u=[];for(const[d,p]of s)for(let m=d;m<=p;m++)if(o.binIndex[m]){const y=o.binIndex[m];for(const w of y)u.push(w)}const l=o.linearIndex.length;let c;const f=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=f;d<=h;++d){const p=o.linearIndex[d];p&&(!c||p.compareTo(c)<0)&&(c=p)}return AE(u,c)}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 mi=me.Buffer,Cg=[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"&&(Cg=new Int32Array(Cg));function SE(e){if(mi.isBuffer(e))return e;var t=typeof mi.alloc=="function"&&typeof mi.from=="function";if(typeof e=="number")return t?mi.alloc(e):new mi(e);if(typeof e=="string")return t?mi.from(e):new mi(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function Mz(e){var t=SE(4);return t.writeInt32BE(e,0),t}function kg(e,t){e=SE(e),mi.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=~~t^-1,r=0;r<e.length;r++)n=Cg[(n^e[r])&255]^n>>>8;return n^-1}function Tg(){return Mz(kg.apply(null,arguments))}Tg.signed=function(){return kg.apply(null,arguments)},Tg.unsigned=function(){return kg.apply(null,arguments)>>>0};var Pz=Tg;const Lz=ll(Pz),Oz=21582659,Nz=38359875;function zz(e,t){return e*2**t}function CE(e,t){return Math.floor(e/2**t)}let th=class extends _E{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n){var r,i;return((i=(r=(await this.parse(n)).indices[t])===null||r===void 0?void 0:r.stats)===null||i===void 0?void 0:i.lineCount)||0}async indexCov(){return[]}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",a={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!a)throw new Error(`invalid Tabix preset format flags ${r}`);const o={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),u=s?String.fromCharCode(s):"",l=t.readInt32LE(n+20),c=t.readInt32LE(n+24);return{columnNumbers:o,coordinateType:i,metaValue:s,metaChar:u,skipLines:l,format:a,formatFlags:r,...Iz(t.subarray(n+28,n+28+c),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await li(n);let i;if(r.readUInt32LE(0)===Oz)i=1;else if(r.readUInt32LE(0)===Nz)i=2;else throw new Error("Not a CSI file");this.minShift=r.readInt32LE(4),this.depth=r.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const a=r.readInt32LE(12),o=a>=30?this.parseAuxData(r,16):void 0,s=r.readInt32LE(16+a);let u=16+a+4,l;const c=new Array(s);for(let f=0;f<s;f++){const h=r.readInt32LE(u);u+=4;const d={};let p;for(let m=0;m<h;m++){const y=r.readUInt32LE(u);if(u+=4,y>this.maxBinNumber)p=EE(r,u+28),u+=28+16;else{l=eh(l,Eo(r,u)),u+=8;const w=r.readInt32LE(u);u+=4;const A=new Array(w);for(let S=0;S<w;S+=1){const _=Eo(r,u);u+=8;const T=Eo(r,u);u+=8,l=eh(l,_),A[S]=new xE(_,T,y)}d[y]=A}}c[f]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:l,indices:c,refCount:s,csi:!0,maxBlockSize:65536,...o}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i),o=a==null?void 0:a.indices[t];if(!o)return[];const s=this.reg2bins(n,r);if(s.length===0)return[];const u=[];for(const[l,c]of s)for(let f=l;f<=c;f++)if(o.binIndex[f]){const h=o.binIndex[f];for(const d of h)u.push(d)}return AE(u,new vE(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,a=this.minShift+this.depth*3;const o=[];for(;r<=this.depth;a-=3,i+=zz(1,r*3),r+=1){const s=i+CE(t,a),u=i+CE(n,a);if(u-s+o.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);o.push([s,u])}return o}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}};const bn={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},kE="=ACMGRSVTWYHKDBN".split(""),Zl="MIDNSHP=X???????".split("");class TE{constructor(t){this.data={},this._tagList=[],this._allTagsParsed=!1;const{bytes:n,fileOffset:r}=t,{byteArray:i,start:a}=n;this.data={},this.bytes=n,this._id=r,this._refID=i.readInt32LE(a+4),this.data.start=i.readInt32LE(a+8),this.flags=(i.readInt32LE(a+16)&4294901760)>>16}get(t){return this[t]?this.data[t]?this.data[t]:(this.data[t]=this[t](),this.data[t]):this._get(t.toLowerCase())}end(){return this.get("start")+this.get("length_on_ref")}seq_id(){return this._refID}_get(t){return t in this.data?this.data[t]:(this.data[t]=this._parseTag(t),this.data[t])}_tags(){this._parseAllTags();let t=["seq"];this.isSegmentUnmapped()||t.push("start","end","strand","score","qual","MQ","CIGAR","length_on_ref","template_length"),this.isPaired()&&t.push("next_segment_position","pair_orientation"),t=t.concat(this._tagList||[]);for(const r of Object.keys(this.data))r[0]!=="_"&&r!=="next_seq_id"&&t.push(r);const n={};return t.filter(r=>{if(r in this.data&&this.data[r]===void 0||r==="CG"||r==="cg")return!1;const i=r.toLowerCase(),a=n[i];return n[i]=!0,!a})}parent(){}children(){return this.get("subfeatures")}id(){return this._id}mq(){const t=(this.get("_bin_mq_nl")&65280)>>8;return t===255?void 0:t}score(){return this.get("mq")}qual(){var t;return(t=this.qualRaw())===null||t===void 0?void 0:t.join(" ")}qualRaw(){if(this.isSegmentUnmapped())return;const{start:t,byteArray:n}=this.bytes,r=t+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes"),i=this.get("seq_length");return n.subarray(r,r+i)}strand(){return this.isReverseComplemented()?-1:1}multi_segment_next_segment_strand(){if(!this.isMateUnmapped())return this.isMateReverseComplemented()?-1:1}name(){return this.get("_read_name")}_read_name(){const t=this.get("_l_read_name"),{byteArray:n,start:r}=this.bytes;return n.toString("ascii",r+36,r+36+t-1)}_parseTag(t){if(this._allTagsParsed)return;const{byteArray:n,start:r}=this.bytes;let i=this._tagOffset||r+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes")+this.get("seq_length");const a=this.bytes.end;let o;for(;i<a&&o!==t;){const s=String.fromCharCode(n[i],n[i+1]);o=s.toLowerCase();const u=String.fromCharCode(n[i+2]);i+=3;let l;switch(u){case"A":{l=String.fromCharCode(n[i]),i+=1;break}case"i":{l=n.readInt32LE(i),i+=4;break}case"I":{l=n.readUInt32LE(i),i+=4;break}case"c":{l=n.readInt8(i),i+=1;break}case"C":{l=n.readUInt8(i),i+=1;break}case"s":{l=n.readInt16LE(i),i+=2;break}case"S":{l=n.readUInt16LE(i),i+=2;break}case"f":{l=n.readFloatLE(i),i+=4;break}case"Z":case"H":{for(l="";i<=a;){const c=n[i++];if(c===0)break;l+=String.fromCharCode(c)}break}case"B":{l="";const c=n[i++],f=String.fromCharCode(c),h=n.readInt32LE(i);if(i+=4,f==="i")if(s==="CG")for(let d=0;d<h;d++){const p=n.readInt32LE(i),m=p>>4,y=Zl[p&15];l+=m+y,i+=4}else for(let d=0;d<h;d++)l+=n.readInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="I")if(s==="CG")for(let d=0;d<h;d++){const p=n.readUInt32LE(i),m=p>>4,y=Zl[p&15];l+=m+y,i+=4}else for(let d=0;d<h;d++)l+=n.readUInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="s")for(let d=0;d<h;d++)l+=n.readInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="S")for(let d=0;d<h;d++)l+=n.readUInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="c")for(let d=0;d<h;d++)l+=n.readInt8(i),d+1<h&&(l+=","),i+=1;if(f==="C")for(let d=0;d<h;d++)l+=n.readUInt8(i),d+1<h&&(l+=","),i+=1;if(f==="f")for(let d=0;d<h;d++)l+=n.readFloatLE(i),d+1<h&&(l+=","),i+=4;break}default:console.warn(`Unknown BAM tag type '${u}', tags may be incomplete`),l=void 0,i=a}if(this._tagOffset=i,this._tagList.push(s),o===t)return l;this.data[o]=l}this._allTagsParsed=!0}_parseAllTags(){this._parseTag("")}_parseCigar(t){return t.match(/\d+\D/g).map(n=>[n.match(/\D/)[0].toUpperCase(),Number.parseInt(n,10)])}isPaired(){return!!(this.flags&bn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&bn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&bn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&bn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&bn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&bn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&bn.BAM_FREAD1)}isRead2(){return!!(this.flags&bn.BAM_FREAD2)}isSecondary(){return!!(this.flags&bn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&bn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&bn.BAM_FDUP)}isSupplementary(){return!!(this.flags&bn.BAM_FSUPPLEMENTARY)}cigar(){if(this.isSegmentUnmapped())return;const{byteArray:t,start:n}=this.bytes,r=this.get("_n_cigar_op");let i=n+36+this.get("_l_read_name");const a=this.get("seq_length");let o="",s=0,u=t.readInt32LE(i),l=u>>4,c=Zl[u&15];if(c==="S"&&l===a)return i+=4,u=t.readInt32LE(i),l=u>>4,c=Zl[u&15],c!=="N"&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(let f=0;f<r;++f)u=t.readInt32LE(i),l=u>>4,c=Zl[u&15],o+=l+c,c!=="H"&&c!=="S"&&c!=="I"&&(s+=l),i+=4;return this.data.length_on_ref=s,o}_flags(){}length_on_ref(){return this.data.length_on_ref?this.data.length_on_ref:(this.get("cigar"),this.data.length_on_ref)}_n_cigar_op(){return this.get("_flag_nc")&65535}_l_read_name(){return this.get("_bin_mq_nl")&255}_seq_bytes(){return this.get("seq_length")+1>>1}getReadBases(){return this.seq()}seq(){const{byteArray:t,start:n}=this.bytes,r=n+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4,i=this.get("_seq_bytes"),a=this.get("seq_length");let o="",s=0;for(let u=0;u<i;++u){const l=t[r+u];o+=kE[(l&240)>>4],s++,s<a&&(o+=kE[l&15],s++)}return o}getPairOrientation(){if(!this.isSegmentUnmapped()&&!this.isMateUnmapped()&&this._refID===this._next_refid()){const t=this.isReverseComplemented()?"R":"F",n=this.isMateReverseComplemented()?"R":"F";let r=" ",i=" ";this.isRead1()?(r="1",i="2"):this.isRead2()&&(r="2",i="1");const a=[];return this.template_length()>0?(a[0]=t,a[1]=r,a[2]=n,a[3]=i):(a[2]=t,a[3]=r,a[0]=n,a[1]=i),a.join("")}return""}_bin_mq_nl(){return this.bytes.byteArray.readInt32LE(this.bytes.start+12)}_flag_nc(){return this.bytes.byteArray.readInt32LE(this.bytes.start+16)}seq_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+20)}_next_refid(){return this.bytes.byteArray.readInt32LE(this.bytes.start+24)}_next_pos(){return this.bytes.byteArray.readInt32LE(this.bytes.start+28)}template_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+32)}toJSON(){const t={};for(const n of Object.keys(this))n.charAt(0)==="_"||n==="bytes"||(t[n]=this[n]);return t}}function IE(e){const t=e.split(/\r?\n/),n=[];for(const r of t){const[i,...a]=r.split(/\t/);i&&n.push({tag:i.slice(1),data:a.map(o=>{const[s,u]=o.split(":",2);return{tag:s,value:u}})})}return n}const BE=21840194,DE=65536;async function Uz(e){let t=[];for await(const n of e)t=t.concat(n);return t}class Gz{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 RE{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:a,baiUrl:o,csiPath:s,csiFilehandle:u,csiUrl:l,htsget:c,yieldThreadTime:f=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new Of({cache:new Nf({maxSize:50}),fill:async(d,p)=>{const{chunk:m,opts:y}=d,{data:w,cpositions:A,dpositions:S}=await this._readChunk({chunk:m,opts:{...y,signal:p}});return this.readBamFeatures(w,A,S,m)}}),this.renameRefSeq=h,t)this.bam=t;else if(n)this.bam=new dt(n);else if(r)this.bam=new Qi(r);else if(c)this.htsget=!0,this.bam=new Gz;else throw new Error("unable to initialize bam");if(u)this.index=new th({filehandle:u});else if(s)this.index=new th({filehandle:new dt(s)});else if(l)this.index=new th({filehandle:new Qi(l)});else if(a)this.index=new _o({filehandle:a});else if(i)this.index=new _o({filehandle:new dt(i)});else if(o)this.index=new _o({filehandle:new Qi(o)});else if(n)this.index=new _o({filehandle:new dt(`${n}.bai`)});else if(r)this.index=new _o({filehandle:new Qi(`${r}.bai`)});else if(c)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=f}async getHeaderPre(t){const n=Tz(t);if(!this.index)return;const r=await this.index.parse(n),i=r.firstDataLine?r.firstDataLine.blockPosition+65535:void 0;let a;if(i){const c=i+DE,f=await this.bam.read(me.Buffer.alloc(c),0,c,0,n);if(!f.bytesRead)throw new Error("Error reading header");a=f.buffer.subarray(0,Math.min(f.bytesRead,i))}else a=await this.bam.readFile(n);const o=await li(a);if(o.readInt32LE(0)!==BE)throw new Error("Not a BAM file");const s=o.readInt32LE(4);this.header=o.toString("utf8",8,8+s);const{chrToIndex:u,indexToChr:l}=await this._readRefSeqs(s+8,65535,n);return this.chrToIndex=u,this.indexToChr=l,IE(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+DE,{bytesRead:a,buffer:o}=await this.bam.read(me.Buffer.alloc(i),0,n,0,r);if(!a)throw new Error("Error reading refseqs from header");const s=await li(o.subarray(0,Math.min(a,n))),u=s.readInt32LE(t);let l=t+4;const c={},f=[];for(let h=0;h<u;h+=1){const d=s.readInt32LE(l),p=this.renameRefSeq(s.toString("utf8",l+4,l+4+d-1)),m=s.readInt32LE(l+d+4);if(c[p]=h,f.push({refName:p,length:m}),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:c,indexToChr:f}}async getRecordsForRange(t,n,r,i){return Uz(this.streamRecordsForRange(t,n,r,i))}async*streamRecordsForRange(t,n,r,i){var a;await this.getHeader(i);const o=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];if(o===void 0||!this.index)yield[];else{const s=await this.index.blocksForRange(o,n-1,r,i);yield*this._fetchChunkFeatures(s,o,n,r,i)}}async*_fetchChunkFeatures(t,n,r,i,a={}){const{viewAsPairs:o}=a,s=[];let u=!1;for(const l of t){const c=await this.featureCache.get(l.toString(),{chunk:l,opts:a},a.signal),f=[];for(const h of c)if(h.seq_id()===n)if(h.get("start")>=i){u=!0;break}else h.get("end")>=r&&f.push(h);if(s.push(f),yield f,u)break}Cz(a.signal),o&&(yield this.fetchPairs(n,s,a))}async fetchPairs(t,n,r){const{pairAcrossChr:i,maxInsertSize:a=2e5}=r,o={},s={};n.map(h=>{const d={};for(const p of h){const m=p.name(),y=p.id();d[m]||(d[m]=0),d[m]++,s[y]=1}for(const[p,m]of Object.entries(d))m===1&&(o[p]=!0)});const u=[];n.map(h=>{for(const d of h){const p=d.name(),m=d.get("start"),y=d._next_pos(),w=d._next_refid();this.index&&o[p]&&(i||w===t&&Math.abs(m-y)<a)&&u.push(this.index.blocksForRange(w,y,y+1,r))}});const l=new Map,c=await Promise.all(u);for(const h of c.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:m,chunk:y}=await this._readChunk({chunk:h,opts:r}),w=[];for(const A of await this.readBamFeatures(d,p,m,y))o[A.get("name")]&&!s[A.id()]&&w.push(A);return w}))).flat()}async _readRegion(t,n,r={}){const{bytesRead:i,buffer:a}=await this.bam.read(me.Buffer.alloc(n),0,n,t,r);return a.subarray(0,Math.min(i,n))}async _readChunk({chunk:t,opts:n}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n),{buffer:i,cpositions:a,dpositions:o}=await Kx(r,t);return{data:i,cpositions:a,dpositions:o,chunk:t}}async readBamFeatures(t,n,r,i){let a=0;const o=[];let s=0,u=+Date.now();for(;a+4<t.length;){const l=t.readInt32LE(a),c=a+4+l-1;if(r){for(;a+i.minv.dataPosition>=r[s++];);s--}if(c<t.length){const f=new TE({bytes:{byteArray:t,start:a,end:c},fileOffset:n.length>0?n[s]*256+(a-r[s])+i.minv.dataPosition+1:Lz.signed(t.slice(a,c))});o.push(f),this.yieldThreadTime&&+Date.now()-u>this.yieldThreadTime&&(await _z(1),u=+Date.now())}a=c+1}return o}async hasRefSeq(t){var n,r;const i=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return i===void 0?!1:(r=this.index)===null||r===void 0?void 0:r.hasRefSeq(i)}async lineCount(t){var n;const r=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return r===void 0||!this.index?0:this.index.lineCount(r)}async indexCov(t,n,r){var i;if(!this.index)return[];await this.index.parse();const a=(i=this.chrToIndex)===null||i===void 0?void 0:i[t];return a===void 0?[]:this.index.indexCov(a,n,r)}async blocksForRange(t,n,r,i){var a;if(!this.index)return[];await this.index.parse();const o=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];return o===void 0?[]:this.index.blocksForRange(o,n,r,i)}}async function FE(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:a}=r;if(i.startsWith("data:"))return me.Buffer.from(i.split(",")[1],"base64");{const{referer:o,...s}=a,u=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...s}});if(!u.ok)throw new Error(`HTTP ${u.status} fetching ${i}: ${await u.text()}`);return me.Buffer.from(await u.arrayBuffer())}}));return me.Buffer.concat(await Promise.all(n.map(r=>li(r))))}class Hz extends RE{constructor(t){super({htsget:!0}),this.baseUrl=t.baseUrl,this.trackId=t.trackId}async*streamRecordsForRange(t,n,r,i){var a;const s=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${t}&start=${n}&end=${r}&format=BAM`,u=(a=this.chrToIndex)===null||a===void 0?void 0:a[t];if(u===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 c=await l.json(),f=await FE(c.htsget.urls.slice(1),i);yield*this._fetchChunkFeatures([{buffer:f,_fetchedSize:void 0,bin:0,compareTo(){return 0},toUniqueString(){return`${t}_${n}_${r}`},fetchedSize(){return 0},minv:{dataPosition:0,blockPosition:0,compareTo:()=>0},maxv:{dataPosition:Number.MAX_SAFE_INTEGER,blockPosition:0,compareTo:()=>0},toString(){return`${t}_${n}_${r}`}}],u,n,r,i)}}async _readChunk({chunk:t}){if(!t.buffer)throw new Error("expected chunk.buffer in htsget");return{data:t.buffer,cpositions:[],dpositions:[],chunk:t}}async getHeader(t={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,r=await fetch(n,t);if(!r.ok)throw new Error(`HTTP ${r.status} fetching ${n}: ${await r.text()}`);const i=await r.json(),a=await FE(i.htsget.urls,t);if(a.readInt32LE(0)!==BE)throw new Error("Not a BAM file");const o=a.readInt32LE(4),s=a.toString("utf8",8,8+o),u=IE(s),l=[],c={},f=u.filter(h=>h.tag==="SQ");for(const[h,d]of f.entries()){let p="",m=0;for(const y of d.data)y.tag==="SN"?p=y.value:y.tag==="LN"&&(m=+y.value);c[p]=h,l[h]={refName:p,length:m}}return this.chrToIndex=c,this.indexToChr=l,u}}const Vz=Object.freeze(Object.defineProperty({__proto__:null,BAI:_o,BamFile:RE,BamRecord:TE,CSI:th,HtsgetFile:Hz},Symbol.toStringTag,{value:"Module"}));function ME(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class jz extends Error{}function So(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new jz("aborted");throw t.code="ERR_ABORTED",t}}}function $z(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function PE(e,t){const n=[];let r=null;return e.length===0?e:(e.sort(function(i,a){const o=i.minv.blockPosition-a.minv.blockPosition;return o!==0?o:i.minv.dataPosition-a.minv.dataPosition}),e.forEach(i=>{(!t||i.maxv.compareTo(t)>0)&&(r===null?(n.push(i),r=i):$z(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class Ig{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 Co(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Ig(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 nh{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 LE{constructor({filehandle:t,renameRefSeqs:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}async getMetadata(t={}){const{indices:n,...r}=await this.parse(t);return r}_findFirstData(t,n){return t?t.compareTo(n)>0?n:t:n}async parse(t={}){return this.parseP||(this.parseP=this._parse(t).catch(n=>{throw this.parseP=void 0,n})),this.parseP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}const qz=21578324,OE=14;function Wz(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 rh extends LE{async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:o}=r.indices[i];return o?o.lineCount:-1}async _parse(t={}){const n=await this.filehandle.readFile(t),r=await li(n);if(So(t.signal),r.readUInt32LE(0)!==qz)throw new Error("Not a TBI file");const i=r.readInt32LE(4),a=r.readInt32LE(8),o=a&65536?"zero-based-half-open":"1-based-closed",u={0:"generic",1:"SAM",2:"VCF"}[a&15];if(!u)throw new Error(`invalid Tabix preset format flags ${a}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},c=r.readInt32LE(24),f=5,h=((1<<(f+1)*3)-1)/7,d=2**(14+f*3),p=c?String.fromCharCode(c):null,m=r.readInt32LE(28),y=r.readInt32LE(32),{refNameToId:w,refIdToName:A}=this._parseNameBytes(r.slice(36,36+y));let S=36+y,_;return{indices:new Array(i).fill(0).map(()=>{const I=r.readInt32LE(S);S+=4;const B={};let R;for(let N=0;N<I;N+=1){const re=r.readUInt32LE(S);if(S+=4,re>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(re===h+1){const se=r.readInt32LE(S);S+=4,se===2&&(R=this.parsePseudoBin(r,S)),S+=16*se}else{const se=r.readInt32LE(S);S+=4;const te=new Array(se);for(let ge=0;ge<se;ge+=1){const Xe=Co(r,S),De=Co(r,S+8);S+=16,_=this._findFirstData(_,Xe),te[ge]=new nh(Xe,De,re)}B[re]=te}}const M=r.readInt32LE(S);S+=4;const G=new Array(M);for(let N=0;N<M;N+=1)G[N]=Co(r,S),S+=8,_=this._findFirstData(_,G[N]);return{binIndex:B,linearIndex:G,stats:R}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:m,firstDataLine:_,columnNumbers:l,coordinateType:o,format:u,refIdToName:A,refNameToId:w,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:ME(If.fromBytesLE(t.slice(n+16,n+24),!0))}}_parseNameBytes(t){let n=0,r=0;const i=[],a={};for(let o=0;o<t.length;o+=1)if(!t[o]){if(r<o){let s=t.toString("utf8",r,o);s=this.renameRefSeq(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.refNameToId[t],s=a.indices[o];if(!s)return[];(s.linearIndex.length?s.linearIndex[n>>OE>=s.linearIndex.length?s.linearIndex.length-1:n>>OE]:new Ig(0,0))||console.warn("querying outside of possible tabix range");const l=Wz(n,r),c=[];for(const[m,y]of l)for(let w=m;w<=y;w++)if(s.binIndex[w])for(const A of s.binIndex[w])c.push(new nh(A.minv,A.maxv,w));const f=s.linearIndex.length;let h=null;const d=Math.min(n>>14,f-1),p=Math.min(r>>14,f-1);for(let m=d;m<=p;++m){const y=s.linearIndex[m];y&&(!h||y.compareTo(h)<0)&&(h=y)}return PE(c,h)}}const Zz=21582659,Yz=38359875;function Qz(e,t){return e*2**t}function NE(e,t){return Math.floor(e/2**t)}class Bg extends LE{constructor(t){super(t),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:o}=r.indices[i];return o?o.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",a={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!a)throw new Error(`invalid Tabix preset format flags ${r}`);const o={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),u=s?String.fromCharCode(s):null,l=t.readInt32LE(n+20),c=t.readInt32LE(n+24),{refIdToName:f,refNameToId:h}=this._parseNameBytes(t.slice(n+28,n+28+c));return{refIdToName:f,refNameToId:h,skipLines:l,metaChar:u,columnNumbers:o,format:a,coordinateType:i}}_parseNameBytes(t){let n=0,r=0;const i=[],a={};for(let o=0;o<t.length;o+=1)if(!t[o]){if(r<o){let s=t.toString("utf8",r,o);s=this.renameRefSeq(s),i[n]=s,a[s]=n}r=o+1,n+=1}return{refNameToId:a,refIdToName:i}}async _parse(t={}){const n=await li(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===Zz)r=1;else if(n.readUInt32LE(0)===Yz)r=2;else throw new Error("Not a CSI file");this.minShift=n.readInt32LE(4),this.depth=n.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const i=2**(this.minShift+this.depth*3),a=n.readInt32LE(12),o=a&&a>=30?this.parseAuxData(n,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},s=n.readInt32LE(16+a);let u,l=16+a+4;const c=new Array(s).fill(0).map(()=>{const f=n.readInt32LE(l);l+=4;const h={};let d;for(let p=0;p<f;p+=1){const m=n.readUInt32LE(l);if(m>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=4+8+4+16+16;else{const y=Co(n,l+4);u=this._findFirstData(u,y);const w=n.readInt32LE(l+12);l+=16;const A=new Array(w);for(let S=0;S<w;S+=1){const _=Co(n,l),T=Co(n,l+8);l+=16,A[S]=new nh(_,T,m)}h[m]=A}}return{binIndex:h,stats:d}});return{...o,csi:!0,refCount:s,maxBlockSize:65536,firstDataLine:u,csiVersion:r,indices:c,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:ME(If.fromBytesLE(t.slice(n+28,n+36),!0))}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=await this.parse(i);if(!a)return[];const o=a.refNameToId[t],s=a.indices[o];if(!s)return[];const u=this.reg2bins(n,r),l=[];for(const[c,f]of u)for(let h=c;h<=f;h++)if(s.binIndex[h])for(const d of s.binIndex[h])l.push(new nh(d.minv,d.maxv,h));return PE(l,new Ig(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,a=this.minShift+this.depth*3;const o=[];for(;r<=this.depth;a-=3,i+=Qz(1,r*3),r+=1){const s=i+NE(t,a),u=i+NE(n,a);if(u-s+o.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);o.push([s,u])}return o}}const Dg=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Xz(e){return new Promise(t=>setTimeout(t,e))}class Kz{constructor({path:t,filehandle:n,tbiPath:r,tbiFilehandle:i,csiPath:a,csiFilehandle:o,yieldTime:s=500,chunkSizeLimit:u=5e7,renameRefSeqs:l=f=>f,chunkCacheSize:c=5*2**20}){if(n)this.filehandle=n;else if(t)this.filehandle=new dt(t);else throw new TypeError("must provide either filehandle or path");if(i)this.index=new rh({filehandle:i,renameRefSeqs:l});else if(o)this.index=new Bg({filehandle:o,renameRefSeqs:l});else if(r)this.index=new rh({filehandle:new dt(r),renameRefSeqs:l});else if(a)this.index=new Bg({filehandle:new dt(a),renameRefSeqs:l});else if(t)this.index=new rh({filehandle:new dt(`${t}.tbi`),renameRefSeqs:l});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, or csiPath");this.chunkSizeLimit=u,this.renameRefSeq=l,this.yieldTime=s,this.chunkCache=new Of({cache:new Nf({maxSize:Math.floor(c/65536)}),fill:(f,h)=>this.readChunk(f,{signal:h})})}async getLines(t,n,r,i){var a;let o,s={},u;if(i===void 0)throw new TypeError("line callback must be provided");if(typeof i=="function"?u=i:(s=i,u=i.lineCallback,o=i.signal),t===void 0)throw new TypeError("must provide a reference sequence name");if(!u)throw new TypeError("line callback must be provided");const l=await this.index.getMetadata(s);So(o);const c=n??0,f=r??l.maxRefLength;if(!(c<=f))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(c===f)return;const h=await this.index.blocksForRange(t,c,f,s);So(o);for(const p of h){const m=p.fetchedSize();if(m>this.chunkSizeLimit)throw new Error(`Too much data. Chunk size ${m.toLocaleString()} bytes exceeds chunkSizeLimit of ${this.chunkSizeLimit.toLocaleString()}.`)}let d=Date.now();for(const p of h){let m;const{buffer:y,cpositions:w,dpositions:A}=await this.chunkCache.get(p.toString(),p,o);So(o);let S=0,_=0;for(;S<y.length;){const T=y.indexOf(`
624
+ `,S);if(T===-1)break;const I=y.slice(S,T),B=(a=Dg==null?void 0:Dg.decode(I))!==null&&a!==void 0?a:I.toString();if(A){for(;S+p.minv.dataPosition>=A[_++];);_--}const{startCoordinate:R,overlaps:M}=this.checkLine(l,t,c,f,B);if(m!==void 0&&R!==void 0&&m>R)throw new Error(`Lines not sorted by start coordinate (${m} > ${R}), this file is not usable with Tabix.`);if(m=R,M)u(B.trim(),w[_]*256+(S-A[_])+p.minv.dataPosition+1);else if(R!==void 0&&R>=f)return;this.yieldTime&&d-Date.now()>this.yieldTime&&(d=Date.now(),So(o),await Xz(1)),S=T+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:n,metaChar:r,maxBlockSize:i}=await this.getMetadata(t);So(t.signal);const a=((n==null?void 0:n.blockPosition)||0)+i,o=await this._readRegion(0,a,t),s=await li(o);if(r){let u=-1;const l=`
625
+ `.charCodeAt(0),c=r.charCodeAt(0);for(let f=0;f<s.length&&!(f===u+1&&s[f]!==c);f+=1)s[f]===l&&(u=f);return s.slice(0,u+1)}return s}async getHeader(t={}){return(await this.getHeaderBuffer(t)).toString("utf8")}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,n,r,i,a){const{columnNumbers:o,metaChar:s,coordinateType:u,format:l}=t;if(s&&a.startsWith(s))return{overlaps:!1};let{ref:c,start:f,end:h}=o;c||(c=0),f||(f=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(c,f,h);let p=1,m=0,y="",w=-1/0;for(let A=0;A<a.length+1;A+=1)if(a[A]===" "||A===a.length){if(p===c){if(this.renameRefSeq(a.slice(m,A))!==n)return{overlaps:!1}}else if(p===f){if(w=parseInt(a.slice(m,A),10),u==="1-based-closed"&&(w-=1),w>=i)return{startCoordinate:w,overlaps:!1};if((h===0||h===f)&&w+1<=r)return{startCoordinate:w,overlaps:!1}}else if(l==="VCF"&&p===4)y=a.slice(m,A);else if(p===h&&(l==="VCF"?this._getVcfEnd(w,y,a.slice(m,A)):parseInt(a.slice(m,A),10))<=r)return{overlaps:!1};if(m=A+1,p+=1,p>d)break}return{startCoordinate:w,overlaps:!0}}_getVcfEnd(t,n,r){let i=t+n.length;const a=r.includes("SVTYPE=TRA");if(r[0]!=="."&&!a){let o=";";for(let s=0;s<r.length;s+=1){if(o===";"&&r.slice(s,s+4)==="END="){let u=r.indexOf(";",s);u===-1&&(u=r.length),i=parseInt(r.slice(s+4,u),10);break}o=r[s]}}else if(a)return t+1;return i}async lineCount(t,n={}){return this.index.lineCount(t,n)}async _readRegion(t,n,r={}){const i=me.Buffer.alloc(n),{bytesRead:a,buffer:o}=await this.filehandle.read(i,0,n,t,r);return o.slice(0,a)}async readChunk(t,n={}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n);return Kx(r,t)}}const Jz=Object.freeze(Object.defineProperty({__proto__:null,CSI:Bg,TBI:rh,TabixIndexedFile:Kz},Symbol.toStringTag,{value:"Module"}));var Rg={exports:{}},ko=typeof Reflect=="object"?Reflect:null,zE=ko&&typeof ko.apply=="function"?ko.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},ih;ko&&typeof ko.ownKeys=="function"?ih=ko.ownKeys:Object.getOwnPropertySymbols?ih=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:ih=function(t){return Object.getOwnPropertyNames(t)};function eU(e){console&&console.warn&&console.warn(e)}var UE=Number.isNaN||function(t){return t!==t};function Be(){Be.init.call(this)}Rg.exports=Be,Rg.exports.once=iU,Be.EventEmitter=Be,Be.prototype._events=void 0,Be.prototype._eventsCount=0,Be.prototype._maxListeners=void 0;var GE=10;function ah(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 GE},set:function(e){if(typeof e!="number"||e<0||UE(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");GE=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||UE(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 HE(e){return e._maxListeners===void 0?Be.defaultMaxListeners:e._maxListeners}Be.prototype.getMaxListeners=function(){return HE(this)},Be.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=t==="error",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var o;if(n.length>0&&(o=n[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=a[t];if(u===void 0)return!1;if(typeof u=="function")zE(u,this,n);else for(var l=u.length,c=WE(u,l),r=0;r<l;++r)zE(c[r],this,n);return!0};function VE(e,t,n,r){var i,a,o;if(ah(n),a=e._events,a===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)o=a[t]=n,++e._eventsCount;else if(typeof o=="function"?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),i=HE(e),i>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,eU(s)}return e}Be.prototype.addListener=function(t,n){return VE(this,t,n,!1)},Be.prototype.on=Be.prototype.addListener,Be.prototype.prependListener=function(t,n){return VE(this,t,n,!0)};function tU(){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 jE(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=tU.bind(r);return i.listener=n,r.wrapFn=i,i}Be.prototype.once=function(t,n){return ah(n),this.on(t,jE(this,t,n)),this},Be.prototype.prependOnceListener=function(t,n){return ah(n),this.prependListener(t,jE(this,t,n)),this},Be.prototype.removeListener=function(t,n){var r,i,a,o,s;if(ah(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(a=-1,o=r.length-1;o>=0;o--)if(r[o]===n||r[o].listener===n){s=r[o].listener,a=o;break}if(a<0)return this;a===0?r.shift():nU(r,a),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 a=Object.keys(r),o;for(i=0;i<a.length;++i)o=a[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(t,n[i]);return this};function $E(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?rU(i):WE(i,i.length)}Be.prototype.listeners=function(t){return $E(this,t,!0)},Be.prototype.rawListeners=function(t){return $E(this,t,!1)},Be.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):qE.call(e,t)},Be.prototype.listenerCount=qE;function qE(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?ih(this._events):[]};function WE(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function nU(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function rU(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function iU(e,t){return new Promise(function(n,r){function i(o){e.removeListener(t,a),r(o)}function a(){typeof e.removeListener=="function"&&e.removeListener("error",i),n([].slice.call(arguments))}ZE(e,t,a,{once:!0}),t!=="error"&&aU(e,i,{once:!0})})}function aU(e,t,n){typeof e.on=="function"&&ZE(e,"error",t,n)}function ZE(e,t,n,r){if(typeof e.on=="function")r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var Fg=Rg.exports,Mg={exports:{}};typeof Object.create=="function"?Mg.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Mg.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 To=Mg.exports,Pg,YE;function QE(){return YE||(YE=1,Pg=Fg.EventEmitter),Pg}const XE=y7(k7);var Lg,KE;function oU(){if(KE)return Lg;KE=1;function e(p,m){var y=Object.keys(p);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(p);m&&(w=w.filter(function(A){return Object.getOwnPropertyDescriptor(p,A).enumerable})),y.push.apply(y,w)}return y}function t(p){for(var m=1;m<arguments.length;m++){var y=arguments[m]!=null?arguments[m]:{};m%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,m,y){return m=o(m),m in p?Object.defineProperty(p,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):p[m]=y,p}function r(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function i(p,m){for(var y=0;y<m.length;y++){var w=m[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(p,o(w.key),w)}}function a(p,m,y){return m&&i(p.prototype,m),y&&i(p,y),Object.defineProperty(p,"prototype",{writable:!1}),p}function o(p){var m=s(p,"string");return typeof m=="symbol"?m:String(m)}function s(p,m){if(typeof p!="object"||p===null)return p;var y=p[Symbol.toPrimitive];if(y!==void 0){var w=y.call(p,m||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)}var u=me,l=u.Buffer,c=XE,f=c.inspect,h=f&&f.custom||"inspect";function d(p,m,y){l.prototype.copy.call(p,m,y)}return Lg=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return a(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,A=""+w.data;w=w.next;)A+=y+w.data;return A}},{key:"concat",value:function(y){if(this.length===0)return l.alloc(0);for(var w=l.allocUnsafe(y>>>0),A=this.head,S=0;A;)d(A.data,w,S),S+=A.data.length,A=A.next;return w}},{key:"consume",value:function(y,w){var A;return y<this.head.data.length?(A=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?A=this.shift():A=w?this._getString(y):this._getBuffer(y),A}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var w=this.head,A=1,S=w.data;for(y-=S.length;w=w.next;){var _=w.data,T=y>_.length?_.length:y;if(T===_.length?S+=_:S+=_.slice(0,y),y-=T,y===0){T===_.length?(++A,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=_.slice(T));break}++A}return this.length-=A,S}},{key:"_getBuffer",value:function(y){var w=l.allocUnsafe(y),A=this.head,S=1;for(A.data.copy(w),y-=A.data.length;A=A.next;){var _=A.data,T=y>_.length?_.length:y;if(_.copy(w,w.length-y,0,T),y-=T,y===0){T===_.length?(++S,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=_.slice(T));break}++S}return this.length-=S,w}},{key:h,value:function(y,w){return f(this,t(t({},w),{},{depth:0,customInspect:!1}))}}]),p}(),Lg}var Og,JE;function e_(){if(JE)return Og;JE=1;function e(o,s){var u=this,l=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return l||c?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,o)):process.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(f){!s&&f?u._writableState?u._writableState.errorEmitted?process.nextTick(n,u):(u._writableState.errorEmitted=!0,process.nextTick(t,u,f)):process.nextTick(t,u,f):s?(process.nextTick(n,u),s(f)):process.nextTick(n,u)}),this)}function t(o,s){i(o,s),n(o)}function n(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(o,s){o.emit("error",s)}function a(o,s){var u=o._readableState,l=o._writableState;u&&u.autoDestroy||l&&l.autoDestroy?o.destroy(s):o.emit("error",s)}return Og={destroy:e,undestroy:r,errorOrDestroy:a},Og}var Ng={},t_;function Io(){if(t_)return Ng;t_=1;function e(s,u){s.prototype=Object.create(u.prototype),s.prototype.constructor=s,s.__proto__=u}var t={};function n(s,u,l){l||(l=Error);function c(h,d,p){return typeof u=="string"?u:u(h,d,p)}var f=function(h){e(d,h);function d(p,m,y){return h.call(this,c(p,m,y))||this}return d}(l);f.prototype.name=l.name,f.prototype.code=s,t[s]=f}function r(s,u){if(Array.isArray(s)){var l=s.length;return s=s.map(function(c){return String(c)}),l>2?"one of ".concat(u," ").concat(s.slice(0,l-1).join(", "),", or ")+s[l-1]:l===2?"one of ".concat(u," ").concat(s[0]," or ").concat(s[1]):"of ".concat(u," ").concat(s[0])}else return"of ".concat(u," ").concat(String(s))}function i(s,u,l){return s.substr(!l||l<0?0:+l,u.length)===u}function a(s,u,l){return(l===void 0||l>s.length)&&(l=s.length),s.substring(l-u.length,l)===u}function o(s,u,l){return typeof l!="number"&&(l=0),l+u.length>s.length?!1:s.indexOf(u,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,u){return'The value "'+u+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,u,l){var c;typeof u=="string"&&i(u,"not ")?(c="must not be",u=u.replace(/^not /,"")):c="must be";var f;if(a(s," argument"))f="The ".concat(s," ").concat(c," ").concat(r(u,"type"));else{var h=o(s,".")?"property":"argument";f='The "'.concat(s,'" ').concat(h," ").concat(c," ").concat(r(u,"type"))}return f+=". Received type ".concat(typeof l),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ng.codes=t,Ng}var zg,n_;function r_(){if(n_)return zg;n_=1;var e=Io().codes.ERR_INVALID_OPT_VALUE;function t(r,i,a){return r.highWaterMark!=null?r.highWaterMark:i?r[a]:null}function n(r,i,a,o){var s=t(i,o,a);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?a:"highWaterMark";throw new e(u,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return zg={getHighWaterMark:n},zg}var Ug,i_;function sU(){if(i_)return Ug;i_=1,Ug=e;function e(n,r){if(t("noDeprecation"))return n;var i=!1;function a(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return n.apply(this,arguments)}return a}function t(n){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return Ug}var Gg,a_;function o_(){if(a_)return Gg;a_=1,Gg=R;function e(L){var P=this;this.next=null,this.entry=null,this.finish=function(){Ne(P,L)}}var t;R.WritableState=I;var n={deprecate:sU()},r=QE(),i=me.Buffer,a=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(L){return i.from(L)}function s(L){return i.isBuffer(L)||L instanceof a}var u=e_(),l=r_(),c=l.getHighWaterMark,f=Io().codes,h=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,w=f.ERR_STREAM_NULL_VALUES,A=f.ERR_STREAM_WRITE_AFTER_END,S=f.ERR_UNKNOWN_ENCODING,_=u.errorOrDestroy;To(R,r);function T(){}function I(L,P,$){t=t||Bo(),L=L||{},typeof $!="boolean"&&($=P instanceof t),this.objectMode=!!L.objectMode,$&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=c(this,L,"writableHighWaterMark",$),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var V=L.decodeStrings===!1;this.decodeStrings=!V,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Z){Xe(P,Z)},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)}I.prototype.getBuffer=function(){for(var P=this.bufferedRequest,$=[];P;)$.push(P),P=P.next;return $},function(){try{Object.defineProperty(I.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var B;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(P){return B.call(this,P)?!0:this!==R?!1:P&&P._writableState instanceof I}})):B=function(P){return P instanceof this};function R(L){t=t||Bo();var P=this instanceof t;if(!P&&!B.call(R,this))return new R(L);this._writableState=new I(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 m)};function M(L,P){var $=new A;_(L,$),process.nextTick(P,$)}function G(L,P,$,V){var Z;return $===null?Z=new w:typeof $!="string"&&!P.objectMode&&(Z=new h("chunk",["string","Buffer"],$)),Z?(_(L,Z),process.nextTick(V,Z),!1):!0}R.prototype.write=function(L,P,$){var V=this._writableState,Z=!1,C=!V.objectMode&&s(L);return C&&!i.isBuffer(L)&&(L=o(L)),typeof P=="function"&&($=P,P=null),C?P="buffer":P||(P=V.defaultEncoding),typeof $!="function"&&($=T),V.ending?M(this,$):(C||G(this,V,L,$))&&(V.pendingcb++,Z=re(this,V,C,L,P,$)),Z},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&&We(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 S(P);return this._writableState.defaultEncoding=P,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function N(L,P,$){return!L.objectMode&&L.decodeStrings!==!1&&typeof P=="string"&&(P=i.from(P,$)),P}Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function re(L,P,$,V,Z,C){if(!$){var x=N(P,V,Z);V!==x&&($=!0,Z="buffer",V=x)}var H=P.objectMode?1:V.length;P.length+=H;var q=P.length<P.highWaterMark;if(q||(P.needDrain=!0),P.writing||P.corked){var ue=P.lastBufferedRequest;P.lastBufferedRequest={chunk:V,encoding:Z,isBuf:$,callback:C,next:null},ue?ue.next=P.lastBufferedRequest:P.bufferedRequest=P.lastBufferedRequest,P.bufferedRequestCount+=1}else se(L,P,!1,H,V,Z,C);return q}function se(L,P,$,V,Z,C,x){P.writelen=V,P.writecb=x,P.writing=!0,P.sync=!0,P.destroyed?P.onwrite(new y("write")):$?L._writev(Z,P.onwrite):L._write(Z,C,P.onwrite),P.sync=!1}function te(L,P,$,V,Z){--P.pendingcb,$?(process.nextTick(Z,V),process.nextTick(gt,L,P),L._writableState.errorEmitted=!0,_(L,V)):(Z(V),L._writableState.errorEmitted=!0,_(L,V),gt(L,P))}function ge(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}function Xe(L,P){var $=L._writableState,V=$.sync,Z=$.writecb;if(typeof Z!="function")throw new p;if(ge($),P)te(L,$,V,P,Z);else{var C=et($)||L.destroyed;!C&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest&&We(L,$),V?process.nextTick(De,L,$,C,Z):De(L,$,C,Z)}}function De(L,P,$,V){$||Je(L,P),P.pendingcb--,V(),gt(L,P)}function Je(L,P){P.length===0&&P.needDrain&&(P.needDrain=!1,L.emit("drain"))}function We(L,P){P.bufferProcessing=!0;var $=P.bufferedRequest;if(L._writev&&$&&$.next){var V=P.bufferedRequestCount,Z=new Array(V),C=P.corkedRequestsFree;C.entry=$;for(var x=0,H=!0;$;)Z[x]=$,$.isBuf||(H=!1),$=$.next,x+=1;Z.allBuffers=H,se(L,P,!0,P.length,Z,"",C.finish),P.pendingcb++,P.lastBufferedRequest=null,C.next?(P.corkedRequestsFree=C.next,C.next=null):P.corkedRequestsFree=new e(P),P.bufferedRequestCount=0}else{for(;$;){var q=$.chunk,ue=$.encoding,ne=$.callback,ce=P.objectMode?1:q.length;if(se(L,P,!1,ce,q,ue,ne),$=$.next,P.bufferedRequestCount--,P.writing)break}$===null&&(P.lastBufferedRequest=null)}P.bufferedRequest=$,P.bufferProcessing=!1}R.prototype._write=function(L,P,$){$(new d("_write()"))},R.prototype._writev=null,R.prototype.end=function(L,P,$){var V=this._writableState;return typeof L=="function"?($=L,L=null,P=null):typeof P=="function"&&($=P,P=null),L!=null&&this.write(L,P),V.corked&&(V.corked=1,this.uncork()),V.ending||$t(this,V,$),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function et(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function _e(L,P){L._final(function($){P.pendingcb--,$&&_(L,$),P.prefinished=!0,L.emit("prefinish"),gt(L,P)})}function Se(L,P){!P.prefinished&&!P.finalCalled&&(typeof L._final=="function"&&!P.destroyed?(P.pendingcb++,P.finalCalled=!0,process.nextTick(_e,L,P)):(P.prefinished=!0,L.emit("prefinish")))}function gt(L,P){var $=et(P);if($&&(Se(L,P),P.pendingcb===0&&(P.finished=!0,L.emit("finish"),P.autoDestroy))){var V=L._readableState;(!V||V.autoDestroy&&V.endEmitted)&&L.destroy()}return $}function $t(L,P,$){P.ending=!0,gt(L,P),$&&(P.finished?process.nextTick($):L.once("finish",$)),P.ended=!0,L.writable=!1}function Ne(L,P,$){var V=L.entry;for(L.entry=null;V;){var Z=V.callback;P.pendingcb--,Z($),V=V.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=u.destroy,R.prototype._undestroy=u.undestroy,R.prototype._destroy=function(L,P){P(L)},Gg}var Hg,s_;function Bo(){if(s_)return Hg;s_=1;var e=Object.keys||function(l){var c=[];for(var f in l)c.push(f);return c};Hg=o;var t=d_(),n=o_();To(o,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var a=r[i];o.prototype[a]||(o.prototype[a]=n.prototype[a])}function o(l){if(!(this instanceof o))return new o(l);t.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(u,this)}function u(l){l.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),Hg}var Vg={},jg={exports:{}};(function(e,t){var n=me,r=n.Buffer;function i(o,s){for(var u in o)s[u]=o[u]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a);function a(o,s,u){return r(o,s,u)}i(r,a),a.from=function(o,s,u){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,u)},a.alloc=function(o,s,u){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=r(o);return s!==void 0?typeof u=="string"?l.fill(s,u):l.fill(s):l.fill(0),l},a.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},a.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)}})(jg,jg.exports);var lU=jg.exports,$g=lU.Buffer,l_=$g.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 uU(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 cU(e){var t=uU(e);if(typeof t!="string"&&($g.isEncoding===l_||!l_(e)))throw new Error("Unknown encoding: "+e);return t||e}var fU=Vg.StringDecoder=Yl;function Yl(e){this.encoding=cU(e);var t;switch(this.encoding){case"utf16le":this.text=bU,this.end=yU,t=4;break;case"utf8":this.fillLast=pU,t=4;break;case"base64":this.text=wU,this.end=vU,t=3;break;default:this.write=xU,this.end=AU;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=$g.allocUnsafe(t)}Yl.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||""},Yl.prototype.end=mU,Yl.prototype.text=gU,Yl.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 qg(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function hU(e,t,n){var r=t.length-1;if(r<n)return 0;var i=qg(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=qg(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=qg(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function dU(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 pU(e){var t=this.lastTotal-this.lastNeed,n=dU(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 gU(e,t){var n=hU(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 mU(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function bU(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 yU(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 wU(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 vU(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function xU(e){return e.toString(this.encoding)}function AU(e){return e&&e.length?this.write(e):""}var Wg,u_;function Zg(){if(u_)return Wg;u_=1;var e=Io().codes.ERR_STREAM_PREMATURE_CLOSE;function t(a){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,u=new Array(s),l=0;l<s;l++)u[l]=arguments[l];a.apply(this,u)}}}function n(){}function r(a){return a.setHeader&&typeof a.abort=="function"}function i(a,o,s){if(typeof o=="function")return i(a,null,o);o||(o={}),s=t(s||n);var u=o.readable||o.readable!==!1&&a.readable,l=o.writable||o.writable!==!1&&a.writable,c=function(){a.writable||h()},f=a._writableState&&a._writableState.finished,h=function(){l=!1,f=!0,u||s.call(a)},d=a._readableState&&a._readableState.endEmitted,p=function(){u=!1,d=!0,l||s.call(a)},m=function(S){s.call(a,S)},y=function(){var S;if(u&&!d)return(!a._readableState||!a._readableState.ended)&&(S=new e),s.call(a,S);if(l&&!f)return(!a._writableState||!a._writableState.ended)&&(S=new e),s.call(a,S)},w=function(){a.req.on("finish",h)};return r(a)?(a.on("complete",h),a.on("abort",y),a.req?w():a.on("request",w)):l&&!a._writableState&&(a.on("end",c),a.on("close",c)),a.on("end",p),a.on("finish",h),o.error!==!1&&a.on("error",m),a.on("close",y),function(){a.removeListener("complete",h),a.removeListener("abort",y),a.removeListener("request",w),a.req&&a.req.removeListener("finish",h),a.removeListener("end",c),a.removeListener("close",c),a.removeListener("finish",h),a.removeListener("end",p),a.removeListener("error",m),a.removeListener("close",y)}}return Wg=i,Wg}var Yg,c_;function EU(){if(c_)return Yg;c_=1;var e;function t(S,_,T){return _=n(_),_ in S?Object.defineProperty(S,_,{value:T,enumerable:!0,configurable:!0,writable:!0}):S[_]=T,S}function n(S){var _=r(S,"string");return typeof _=="symbol"?_:String(_)}function r(S,_){if(typeof S!="object"||S===null)return S;var T=S[Symbol.toPrimitive];if(T!==void 0){var I=T.call(S,_||"default");if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_==="string"?String:Number)(S)}var i=Zg(),a=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),f=Symbol("stream");function h(S,_){return{value:S,done:_}}function d(S){var _=S[a];if(_!==null){var T=S[f].read();T!==null&&(S[l]=null,S[a]=null,S[o]=null,_(h(T,!1)))}}function p(S){process.nextTick(d,S)}function m(S,_){return function(T,I){S.then(function(){if(_[u]){T(h(void 0,!0));return}_[c](T,I)},I)}}var y=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var _=this,T=this[s];if(T!==null)return Promise.reject(T);if(this[u])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(M,G){process.nextTick(function(){_[s]?G(_[s]):M(h(void 0,!0))})});var I=this[l],B;if(I)B=new Promise(m(I,this));else{var R=this[f].read();if(R!==null)return Promise.resolve(h(R,!1));B=new Promise(this[c])}return this[l]=B,B}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var _=this;return new Promise(function(T,I){_[f].destroy(null,function(B){if(B){I(B);return}T(h(void 0,!0))})})}),e),y),A=function(_){var T,I=Object.create(w,(T={},t(T,f,{value:_,writable:!0}),t(T,a,{value:null,writable:!0}),t(T,o,{value:null,writable:!0}),t(T,s,{value:null,writable:!0}),t(T,u,{value:_._readableState.endEmitted,writable:!0}),t(T,c,{value:function(R,M){var G=I[f].read();G?(I[l]=null,I[a]=null,I[o]=null,R(h(G,!1))):(I[a]=R,I[o]=M)},writable:!0}),T));return I[l]=null,i(_,function(B){if(B&&B.code!=="ERR_STREAM_PREMATURE_CLOSE"){var R=I[o];R!==null&&(I[l]=null,I[a]=null,I[o]=null,R(B)),I[s]=B;return}var M=I[a];M!==null&&(I[l]=null,I[a]=null,I[o]=null,M(h(void 0,!0))),I[u]=!0}),_.on("readable",p.bind(null,I)),I};return Yg=A,Yg}var Qg,f_;function _U(){return f_||(f_=1,Qg=function(){throw new Error("Readable.from is not available in the browser")}),Qg}var Xg,h_;function d_(){if(h_)return Xg;h_=1,Xg=M;var e;M.ReadableState=R,Fg.EventEmitter;var t=function(x,H){return x.listeners(H).length},n=QE(),r=me.Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(C){return r.from(C)}function o(C){return r.isBuffer(C)||C instanceof i}var s=XE,u;s&&s.debuglog?u=s.debuglog("stream"):u=function(){};var l=oU(),c=e_(),f=r_(),h=f.getHighWaterMark,d=Io().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_STREAM_PUSH_AFTER_EOF,y=d.ERR_METHOD_NOT_IMPLEMENTED,w=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A,S,_;To(M,n);var T=c.errorOrDestroy,I=["error","close","destroy","pause","resume"];function B(C,x,H){if(typeof C.prependListener=="function")return C.prependListener(x,H);!C._events||!C._events[x]?C.on(x,H):Array.isArray(C._events[x])?C._events[x].unshift(H):C._events[x]=[H,C._events[x]]}function R(C,x,H){e=e||Bo(),C=C||{},typeof H!="boolean"&&(H=x instanceof e),this.objectMode=!!C.objectMode,H&&(this.objectMode=this.objectMode||!!C.readableObjectMode),this.highWaterMark=h(this,C,"readableHighWaterMark",H),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=C.emitClose!==!1,this.autoDestroy=!!C.autoDestroy,this.destroyed=!1,this.defaultEncoding=C.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,C.encoding&&(A||(A=Vg.StringDecoder),this.decoder=new A(C.encoding),this.encoding=C.encoding)}function M(C){if(e=e||Bo(),!(this instanceof M))return new M(C);var x=this instanceof e;this._readableState=new R(C,this,x),this.readable=!0,C&&(typeof C.read=="function"&&(this._read=C.read),typeof C.destroy=="function"&&(this._destroy=C.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=c.destroy,M.prototype._undestroy=c.undestroy,M.prototype._destroy=function(C,x){x(C)},M.prototype.push=function(C,x){var H=this._readableState,q;return H.objectMode?q=!0:typeof C=="string"&&(x=x||H.defaultEncoding,x!==H.encoding&&(C=r.from(C,x),x=""),q=!0),G(this,C,x,!1,q)},M.prototype.unshift=function(C){return G(this,C,null,!0,!1)};function G(C,x,H,q,ue){u("readableAddChunk",x);var ne=C._readableState;if(x===null)ne.reading=!1,Xe(C,ne);else{var ce;if(ue||(ce=re(ne,x)),ce)T(C,ce);else if(ne.objectMode||x&&x.length>0)if(typeof x!="string"&&!ne.objectMode&&Object.getPrototypeOf(x)!==r.prototype&&(x=a(x)),q)ne.endEmitted?T(C,new w):N(C,ne,x,!0);else if(ne.ended)T(C,new m);else{if(ne.destroyed)return!1;ne.reading=!1,ne.decoder&&!H?(x=ne.decoder.write(x),ne.objectMode||x.length!==0?N(C,ne,x,!1):We(C,ne)):N(C,ne,x,!1)}else q||(ne.reading=!1,We(C,ne))}return!ne.ended&&(ne.length<ne.highWaterMark||ne.length===0)}function N(C,x,H,q){x.flowing&&x.length===0&&!x.sync?(x.awaitDrain=0,C.emit("data",H)):(x.length+=x.objectMode?1:H.length,q?x.buffer.unshift(H):x.buffer.push(H),x.needReadable&&De(C)),We(C,x)}function re(C,x){var H;return!o(x)&&typeof x!="string"&&x!==void 0&&!C.objectMode&&(H=new p("chunk",["string","Buffer","Uint8Array"],x)),H}M.prototype.isPaused=function(){return this._readableState.flowing===!1},M.prototype.setEncoding=function(C){A||(A=Vg.StringDecoder);var x=new A(C);this._readableState.decoder=x,this._readableState.encoding=this._readableState.decoder.encoding;for(var H=this._readableState.buffer.head,q="";H!==null;)q+=x.write(H.data),H=H.next;return this._readableState.buffer.clear(),q!==""&&this._readableState.buffer.push(q),this._readableState.length=q.length,this};var se=1073741824;function te(C){return C>=se?C=se:(C--,C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C++),C}function ge(C,x){return C<=0||x.length===0&&x.ended?0:x.objectMode?1:C!==C?x.flowing&&x.length?x.buffer.head.data.length:x.length:(C>x.highWaterMark&&(x.highWaterMark=te(C)),C<=x.length?C:x.ended?x.length:(x.needReadable=!0,0))}M.prototype.read=function(C){u("read",C),C=parseInt(C,10);var x=this._readableState,H=C;if(C!==0&&(x.emittedReadable=!1),C===0&&x.needReadable&&((x.highWaterMark!==0?x.length>=x.highWaterMark:x.length>0)||x.ended))return u("read: emitReadable",x.length,x.ended),x.length===0&&x.ended?$(this):De(this),null;if(C=ge(C,x),C===0&&x.ended)return x.length===0&&$(this),null;var q=x.needReadable;u("need readable",q),(x.length===0||x.length-C<x.highWaterMark)&&(q=!0,u("length less than watermark",q)),x.ended||x.reading?(q=!1,u("reading or ended",q)):q&&(u("do read"),x.reading=!0,x.sync=!0,x.length===0&&(x.needReadable=!0),this._read(x.highWaterMark),x.sync=!1,x.reading||(C=ge(H,x)));var ue;return C>0?ue=P(C,x):ue=null,ue===null?(x.needReadable=x.length<=x.highWaterMark,C=0):(x.length-=C,x.awaitDrain=0),x.length===0&&(x.ended||(x.needReadable=!0),H!==C&&x.ended&&$(this)),ue!==null&&this.emit("data",ue),ue};function Xe(C,x){if(u("onEofChunk"),!x.ended){if(x.decoder){var H=x.decoder.end();H&&H.length&&(x.buffer.push(H),x.length+=x.objectMode?1:H.length)}x.ended=!0,x.sync?De(C):(x.needReadable=!1,x.emittedReadable||(x.emittedReadable=!0,Je(C)))}}function De(C){var x=C._readableState;u("emitReadable",x.needReadable,x.emittedReadable),x.needReadable=!1,x.emittedReadable||(u("emitReadable",x.flowing),x.emittedReadable=!0,process.nextTick(Je,C))}function Je(C){var x=C._readableState;u("emitReadable_",x.destroyed,x.length,x.ended),!x.destroyed&&(x.length||x.ended)&&(C.emit("readable"),x.emittedReadable=!1),x.needReadable=!x.flowing&&!x.ended&&x.length<=x.highWaterMark,L(C)}function We(C,x){x.readingMore||(x.readingMore=!0,process.nextTick(et,C,x))}function et(C,x){for(;!x.reading&&!x.ended&&(x.length<x.highWaterMark||x.flowing&&x.length===0);){var H=x.length;if(u("maybeReadMore read 0"),C.read(0),H===x.length)break}x.readingMore=!1}M.prototype._read=function(C){T(this,new y("_read()"))},M.prototype.pipe=function(C,x){var H=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=C;break;case 1:q.pipes=[q.pipes,C];break;default:q.pipes.push(C);break}q.pipesCount+=1,u("pipe count=%d opts=%j",q.pipesCount,x);var ue=(!x||x.end!==!1)&&C!==process.stdout&&C!==process.stderr,ne=ue?qt:nr;q.endEmitted?process.nextTick(ne):H.once("end",ne),C.on("unpipe",ce);function ce(v,g){u("onunpipe"),v===H&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,vi())}function qt(){u("onend"),C.end()}var yi=_e(H);C.on("drain",yi);var wi=!1;function vi(){u("cleanup"),C.removeListener("close",xi),C.removeListener("finish",Wt),C.removeListener("drain",yi),C.removeListener("error",Cr),C.removeListener("unpipe",ce),H.removeListener("end",qt),H.removeListener("end",nr),H.removeListener("data",Ct),wi=!0,q.awaitDrain&&(!C._writableState||C._writableState.needDrain)&&yi()}H.on("data",Ct);function Ct(v){u("ondata");var g=C.write(v);u("dest.write",g),g===!1&&((q.pipesCount===1&&q.pipes===C||q.pipesCount>1&&Z(q.pipes,C)!==-1)&&!wi&&(u("false write response, pause",q.awaitDrain),q.awaitDrain++),H.pause())}function Cr(v){u("onerror",v),nr(),C.removeListener("error",Cr),t(C,"error")===0&&T(C,v)}B(C,"error",Cr);function xi(){C.removeListener("finish",Wt),nr()}C.once("close",xi);function Wt(){u("onfinish"),C.removeListener("close",xi),nr()}C.once("finish",Wt);function nr(){u("unpipe"),H.unpipe(C)}return C.emit("pipe",H),q.flowing||(u("pipe resume"),H.resume()),C};function _e(C){return function(){var H=C._readableState;u("pipeOnDrain",H.awaitDrain),H.awaitDrain&&H.awaitDrain--,H.awaitDrain===0&&t(C,"data")&&(H.flowing=!0,L(C))}}M.prototype.unpipe=function(C){var x=this._readableState,H={hasUnpiped:!1};if(x.pipesCount===0)return this;if(x.pipesCount===1)return C&&C!==x.pipes?this:(C||(C=x.pipes),x.pipes=null,x.pipesCount=0,x.flowing=!1,C&&C.emit("unpipe",this,H),this);if(!C){var q=x.pipes,ue=x.pipesCount;x.pipes=null,x.pipesCount=0,x.flowing=!1;for(var ne=0;ne<ue;ne++)q[ne].emit("unpipe",this,{hasUnpiped:!1});return this}var ce=Z(x.pipes,C);return ce===-1?this:(x.pipes.splice(ce,1),x.pipesCount-=1,x.pipesCount===1&&(x.pipes=x.pipes[0]),C.emit("unpipe",this,H),this)},M.prototype.on=function(C,x){var H=n.prototype.on.call(this,C,x),q=this._readableState;return C==="data"?(q.readableListening=this.listenerCount("readable")>0,q.flowing!==!1&&this.resume()):C==="readable"&&!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.flowing=!1,q.emittedReadable=!1,u("on readable",q.length,q.reading),q.length?De(this):q.reading||process.nextTick(gt,this)),H},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(C,x){var H=n.prototype.removeListener.call(this,C,x);return C==="readable"&&process.nextTick(Se,this),H},M.prototype.removeAllListeners=function(C){var x=n.prototype.removeAllListeners.apply(this,arguments);return(C==="readable"||C===void 0)&&process.nextTick(Se,this),x};function Se(C){var x=C._readableState;x.readableListening=C.listenerCount("readable")>0,x.resumeScheduled&&!x.paused?x.flowing=!0:C.listenerCount("data")>0&&C.resume()}function gt(C){u("readable nexttick read 0"),C.read(0)}M.prototype.resume=function(){var C=this._readableState;return C.flowing||(u("resume"),C.flowing=!C.readableListening,$t(this,C)),C.paused=!1,this};function $t(C,x){x.resumeScheduled||(x.resumeScheduled=!0,process.nextTick(Ne,C,x))}function Ne(C,x){u("resume",x.reading),x.reading||C.read(0),x.resumeScheduled=!1,C.emit("resume"),L(C),x.flowing&&!x.reading&&C.read(0)}M.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function L(C){var x=C._readableState;for(u("flow",x.flowing);x.flowing&&C.read()!==null;);}M.prototype.wrap=function(C){var x=this,H=this._readableState,q=!1;C.on("end",function(){if(u("wrapped end"),H.decoder&&!H.ended){var ce=H.decoder.end();ce&&ce.length&&x.push(ce)}x.push(null)}),C.on("data",function(ce){if(u("wrapped data"),H.decoder&&(ce=H.decoder.write(ce)),!(H.objectMode&&ce==null)&&!(!H.objectMode&&(!ce||!ce.length))){var qt=x.push(ce);qt||(q=!0,C.pause())}});for(var ue in C)this[ue]===void 0&&typeof C[ue]=="function"&&(this[ue]=function(qt){return function(){return C[qt].apply(C,arguments)}}(ue));for(var ne=0;ne<I.length;ne++)C.on(I[ne],this.emit.bind(this,I[ne]));return this._read=function(ce){u("wrapped _read",ce),q&&(q=!1,C.resume())},this},typeof Symbol=="function"&&(M.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=EU()),S(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(C,x){if(x.length===0)return null;var H;return x.objectMode?H=x.buffer.shift():!C||C>=x.length?(x.decoder?H=x.buffer.join(""):x.buffer.length===1?H=x.buffer.first():H=x.buffer.concat(x.length),x.buffer.clear()):H=x.buffer.consume(C,x.decoder),H}function $(C){var x=C._readableState;u("endReadable",x.endEmitted),x.endEmitted||(x.ended=!0,process.nextTick(V,x,C))}function V(C,x){if(u("endReadableNT",C.endEmitted,C.length),!C.endEmitted&&C.length===0&&(C.endEmitted=!0,x.readable=!1,x.emit("end"),C.autoDestroy)){var H=x._writableState;(!H||H.autoDestroy&&H.finished)&&x.destroy()}}typeof Symbol=="function"&&(M.from=function(C,x){return _===void 0&&(_=_U()),_(M,C,x)});function Z(C,x){for(var H=0,q=C.length;H<q;H++)if(C[H]===x)return H;return-1}return Xg}var Kg,p_;function g_(){if(p_)return Kg;p_=1,Kg=s;var e=Io().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,a=Bo();To(s,a);function o(c,f){var h=this._transformState;h.transforming=!1;var d=h.writecb;if(d===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),d(c);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function s(c){if(!(this instanceof s))return new s(c);a.call(this,c),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",u)}function u(){var c=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){l(c,f,h)}):l(this,null,null)}s.prototype.push=function(c,f){return this._transformState.needTransform=!1,a.prototype.push.call(this,c,f)},s.prototype._transform=function(c,f,h){h(new t("_transform()"))},s.prototype._write=function(c,f,h){var d=this._transformState;if(d.writecb=h,d.writechunk=c,d.writeencoding=f,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},s.prototype._read=function(c){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},s.prototype._destroy=function(c,f){a.prototype._destroy.call(this,c,function(h){f(h)})};function l(c,f,h){if(f)return c.emit("error",f);if(h!=null&&c.push(h),c._writableState.length)throw new i;if(c._transformState.transforming)throw new r;return c.push(null)}return Kg}var Jg,m_;function SU(){if(m_)return Jg;m_=1,Jg=t;var e=g_();To(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)},Jg}var em,b_;function CU(){if(b_)return em;b_=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=Io().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function a(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,d,p,m){m=t(m);var y=!1;h.on("close",function(){y=!0}),e===void 0&&(e=Zg()),e(h,{readable:d,writable:p},function(A){if(A)return m(A);y=!0,m()});var w=!1;return function(A){if(!y&&!w){if(w=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();m(A||new i("pipe"))}}}function u(h){h()}function l(h,d){return h.pipe(d)}function c(h){return!h.length||typeof h[h.length-1]!="function"?a:h.pop()}function f(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var m=c(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var y,w=d.map(function(A,S){var _=S<d.length-1,T=S>0;return s(A,_,T,function(I){y||(y=I),I&&w.forEach(u),!_&&(w.forEach(u),m(y))})});return d.reduce(l)}return em=f,em}var y_=yn,tm=Fg.EventEmitter,kU=To;kU(yn,tm),yn.Readable=d_(),yn.Writable=o_(),yn.Duplex=Bo(),yn.Transform=g_(),yn.PassThrough=SU(),yn.finished=Zg(),yn.pipeline=CU(),yn.Stream=yn;function yn(){tm.call(this)}yn.prototype.pipe=function(e,t){var n=this;function r(c){e.writable&&e.write(c)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",o),n.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function u(c){if(l(),tm.listenerCount(this,"error")===0)throw c}n.on("error",u),e.on("error",u);function l(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",o),n.removeListener("close",s),n.removeListener("error",u),e.removeListener("error",u),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 Ql(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function w_(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function Xl(e){return w_(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function vr(e){return w_(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function v_(e){if(!(e&&e.length)||e===".")return{};const t={};return e.replace(/\r?\n$/,"").split(";").forEach(n=>{const r=n.split("=",2);if(!(r[1]&&r[1].length))return;r[0]=r[0].trim();let i=t[r[0].trim()];i||(i=[],t[r[0]]=i),i.push(...r[1].split(",").map(a=>a.trim()).map(Ql))}),t}function x_(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&Ql(t[0]),source:t[1]&&Ql(t[1]),type:t[2]&&Ql(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:v_(t[8])}}function A_(e){const t=/^\s*##\s*(\S+)\s*(.*)/.exec(e);if(!t)return null;const[,n]=t;let[,,r]=t;const i={directive:n};if(r.length&&(r=r.replace(/\r?\n$/,""),i.value=r),n==="sequence-region"){const a=r.split(/\s+/,3);return{...i,seq_id:a[0],start:a[1]&&a[1].replace(/\D/g,""),end:a[2]&&a[2].replace(/\D/g,"")}}else if(n==="genome-build"){const[a,o]=r.split(/\s+/,2);return{...i,source:a,buildName:o}}return i}function E_(e){const t=[];return Object.entries(e).forEach(([n,r])=>{if(!r)return;let i;r.hasOwnProperty("toString")?i=Xl(r.toString()):Array.isArray(r)?i=r.map(Xl).join(","):i=Xl(r),t.push(`${Xl(n)}=${i}`)}),t.length?t.join(";"):"."}function TU(e,t){const n=e.attributes===null||e.attributes===void 0?".":E_(e.attributes),i=`${[e.seq_id===null?".":vr(e.seq_id),e.source===null?".":vr(e.source),e.type===null?".":vr(e.type),e.start===null?".":vr(e.start),e.end===null?".":vr(e.end),e.score===null?".":vr(e.score),e.strand===null?".":vr(e.strand),e.phase===null?".":vr(e.phase),n].join(" ")}
626
+ `;return t[i]?"":(t[i]=!0,i)}function oh(e,t){if(Array.isArray(e))return e.map(r=>oh(r,t)).join("");const n=[TU(e,t)];return IU(e)&&n.push(...e.child_features.map(r=>oh(r,t)),...e.derived_features.map(r=>oh(r,t))),n.join("")}function __(e){return oh(e,{})}function S_(e){let t=`##${e.directive}`;return e.value&&(t+=` ${e.value}`),t+=`
627
+ `,t}function C_(e){return`# ${e.comment}
619
628
  `}function nm(e){return`>${e.id}${e.description?` ${e.description}`:""}
620
629
  ${e.sequence}
621
- `}function sh(e){function t(n){return"attributes"in n?x_(n):"directive"in n?A_(n):"sequence"in n?nm(n):"comment"in n?E_(n):`# (invalid item found during format)
622
- `}return Array.isArray(e)?e.map(t):t(e)}function kU(e){return e.child_features!==void 0&&e.derived_features!==void 0}const TU=Object.freeze(Object.defineProperty({__proto__:null,escape:Xl,escapeColumn:vr,formatAttributes:v_,formatComment:E_,formatDirective:A_,formatFeature:x_,formatItem:sh,formatSequence:nm,parseAttributes:b_,parseDirective:w_,parseFeature:y_,unescape:Ql},Symbol.toStringTag,{value:"Module"})),__={Parent:"child_features",Derives_from:"derived_features"};class S_{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 C_{constructor(t){this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};const n=()=>{};this.featureCallback=t.featureCallback||n,this.endCallback=t.endCallback||n,this.commentCallback=t.commentCallback||n,this.errorCallback=t.errorCallback||n,this.directiveCallback=t.directiveCallback||n,this.sequenceCallback=t.sequenceCallback||n,this.disableDerivesFromReferences=t.disableDerivesFromReferences||!1,this.bufferSize=t.bufferSize===void 0?1e3:t.bufferSize}addLine(t){if(this.fastaParser){this.fastaParser.addLine(t);return}if(this.eof)return;if(this.lineNumber+=1,/^\s*[^#\s>]/.test(t)){this._bufferLine(t);return}const n=/^\s*(#+)(.*)/.exec(t);if(n){const[,r]=n;let[,,i]=n;if(r.length===3)this._emitAllUnderConstructionFeatures();else if(r.length===2){const a=w_(t);a&&(a.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new S_(this.sequenceCallback)):this._emitItem(a))}else i=i.replace(/\s*/,""),this._emitItem({comment:i})}else if(!/^\s*$/.test(t))if(/^\s*>/.test(t))this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new S_(this.sequenceCallback),this.fastaParser.addLine(t);else{const r=t.replace(/\r?\n?$/g,"");throw new Error(`GFF3 parse error. Cannot parse '${r}'.`)}}finish(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}_emitItem(t){Array.isArray(t)?this.featureCallback(t):"directive"in t?this.directiveCallback(t):"comment"in t&&this.commentCallback(t)}_enforceBufferSizeLimit(t=0){const n=r=>{r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach(a=>{delete this._underConstructionById[a],delete this._completedReferences[a]}),r.forEach(a=>{a.child_features&&a.child_features.forEach(o=>n(o)),a.derived_features&&a.derived_features.forEach(o=>n(o))}))};for(;this._underConstructionTopLevel.length+t>this.bufferSize;){const r=this._underConstructionTopLevel.shift();r&&(this._emitItem(r),n(r))}}_emitAllUnderConstructionFeatures(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${Object.keys(this._underConstructionOrphans)}`)}_bufferLine(t){var n,r,i;const o={...y_(t),child_features:[],derived_features:[]},s=((n=o.attributes)===null||n===void 0?void 0:n.ID)||[],u=((r=o.attributes)===null||r===void 0?void 0:r.Parent)||[],l=this.disableDerivesFromReferences?[]:((i=o.attributes)===null||i===void 0?void 0:i.Derives_from)||[];if(!s.length&&!u.length&&!l.length){this._emitItem([o]);return}let c;s.forEach(f=>{const h=this._underConstructionById[f];h?(h[h.length-1].type!==o.type&&this._parseError(`multi-line feature "${f}" has inconsistent types: "${o.type}", "${h[h.length-1].type}"`),h.push(o),c=h):(c=[o],this._enforceBufferSizeLimit(1),!u.length&&!l.length&&this._underConstructionTopLevel.push(c),this._underConstructionById[f]=c,this._resolveReferencesTo(c,f))}),this._resolveReferencesFrom(c||[o],{Parent:u,Derives_from:l},s)}_resolveReferencesTo(t,n){const r=this._underConstructionOrphans[n];r&&(t.forEach(i=>{i.child_features.push(...r.Parent)}),t.forEach(i=>{i.derived_features.push(...r.Derives_from)}),delete this._underConstructionOrphans[n])}_parseError(t){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${t}`)}_resolveReferencesFrom(t,n,r){function i(a,o,s){let u=a[o];u||(u={},a[o]=u);const l=u[s]||!1;return u[s]=!0,l}n.Parent.forEach(a=>{const o=this._underConstructionById[a];if(o){const s=__.Parent;r.filter(u=>i(this._completedReferences,u,`Parent,${a}`)).length||o.forEach(u=>{u[s].push(t)})}else{let s=this._underConstructionOrphans[a];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[a]=s),s.Parent.push(t)}}),n.Derives_from.forEach(a=>{const o=this._underConstructionById[a];if(o){const s=__.Derives_from;r.filter(u=>i(this._completedReferences,u,`Derives_from,${a}`)).length||o.forEach(u=>{u[s].push(t)})}else{let s=this._underConstructionOrphans[a];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[a]=s),s.Derives_from.push(t)}})}}function rm(e){process&&process.nextTick?process.nextTick(e):e()}function k_(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 IU extends g_.Transform{constructor(t={}){super({objectMode:!0}),this.textBuffer="";const n=k_(t);this.encoding=t.encoding||"utf8",this.decoder=new uU;const r=this.push.bind(this);this.parser=new C_({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)),rm(r)}_flush(t){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),rm(t)}}function BU(e={}){return new IU(e)}function DU(e,t={}){if(!e)return[];const n=k_(t),r=[],i=r.push.bind(r),a=new C_({featureCallback:n.parseFeatures?i:void 0,directiveCallback:n.parseDirectives?i:void 0,commentCallback:n.parseComments?i:void 0,sequenceCallback:n.parseSequences?i:void 0,disableDerivesFromReferences:n.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:o=>{throw o}});return e.split(/\r?\n/).forEach(a.addLine.bind(a)),a.finish(),r}function RU(e){const t=[],n=[];e.forEach(i=>{"sequence"in i?n.push(i):t.push(i)});let r=t.map(sh).join("");return n.length&&(r+=`##FASTA
623
- `,r+=n.map(nm).join("")),r}class T_ extends g_.Transform{constructor(t={}){super(Object.assign(t,{objectMode:!0})),this.linesSinceLastSyncMark=0,this.haveWeEmittedData=!1,this.fastaMode=!1,this.minLinesBetweenSyncMarks=t.minSyncLines||100,this.insertVersionDirective=t.insertVersionDirective||!1}_transform(t,n,r){let i;if(!this.haveWeEmittedData&&this.insertVersionDirective){const a=Array.isArray(t)?t[0]:t;"directive"in a&&a.directive!=="gff-version"&&this.push(`##gff-version 3
630
+ `}function sh(e){function t(n){return"attributes"in n?__(n):"directive"in n?S_(n):"sequence"in n?nm(n):"comment"in n?C_(n):`# (invalid item found during format)
631
+ `}return Array.isArray(e)?e.map(t):t(e)}function IU(e){return e.child_features!==void 0&&e.derived_features!==void 0}const BU=Object.freeze(Object.defineProperty({__proto__:null,escape:Xl,escapeColumn:vr,formatAttributes:E_,formatComment:C_,formatDirective:S_,formatFeature:__,formatItem:sh,formatSequence:nm,parseAttributes:v_,parseDirective:A_,parseFeature:x_,unescape:Ql},Symbol.toStringTag,{value:"Module"})),k_={Parent:"child_features",Derives_from:"derived_features"};class T_{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 I_{constructor(t){this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};const n=()=>{};this.featureCallback=t.featureCallback||n,this.endCallback=t.endCallback||n,this.commentCallback=t.commentCallback||n,this.errorCallback=t.errorCallback||n,this.directiveCallback=t.directiveCallback||n,this.sequenceCallback=t.sequenceCallback||n,this.disableDerivesFromReferences=t.disableDerivesFromReferences||!1,this.bufferSize=t.bufferSize===void 0?1e3:t.bufferSize}addLine(t){if(this.fastaParser){this.fastaParser.addLine(t);return}if(this.eof)return;if(this.lineNumber+=1,/^\s*[^#\s>]/.test(t)){this._bufferLine(t);return}const n=/^\s*(#+)(.*)/.exec(t);if(n){const[,r]=n;let[,,i]=n;if(r.length===3)this._emitAllUnderConstructionFeatures();else if(r.length===2){const a=A_(t);a&&(a.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new T_(this.sequenceCallback)):this._emitItem(a))}else i=i.replace(/\s*/,""),this._emitItem({comment:i})}else if(!/^\s*$/.test(t))if(/^\s*>/.test(t))this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new T_(this.sequenceCallback),this.fastaParser.addLine(t);else{const r=t.replace(/\r?\n?$/g,"");throw new Error(`GFF3 parse error. Cannot parse '${r}'.`)}}finish(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}_emitItem(t){Array.isArray(t)?this.featureCallback(t):"directive"in t?this.directiveCallback(t):"comment"in t&&this.commentCallback(t)}_enforceBufferSizeLimit(t=0){const n=r=>{r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach(a=>{delete this._underConstructionById[a],delete this._completedReferences[a]}),r.forEach(a=>{a.child_features&&a.child_features.forEach(o=>n(o)),a.derived_features&&a.derived_features.forEach(o=>n(o))}))};for(;this._underConstructionTopLevel.length+t>this.bufferSize;){const r=this._underConstructionTopLevel.shift();r&&(this._emitItem(r),n(r))}}_emitAllUnderConstructionFeatures(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${Object.keys(this._underConstructionOrphans)}`)}_bufferLine(t){var n,r,i;const o={...x_(t),child_features:[],derived_features:[]},s=((n=o.attributes)===null||n===void 0?void 0:n.ID)||[],u=((r=o.attributes)===null||r===void 0?void 0:r.Parent)||[],l=this.disableDerivesFromReferences?[]:((i=o.attributes)===null||i===void 0?void 0:i.Derives_from)||[];if(!s.length&&!u.length&&!l.length){this._emitItem([o]);return}let c;s.forEach(f=>{const h=this._underConstructionById[f];h?(h[h.length-1].type!==o.type&&this._parseError(`multi-line feature "${f}" has inconsistent types: "${o.type}", "${h[h.length-1].type}"`),h.push(o),c=h):(c=[o],this._enforceBufferSizeLimit(1),!u.length&&!l.length&&this._underConstructionTopLevel.push(c),this._underConstructionById[f]=c,this._resolveReferencesTo(c,f))}),this._resolveReferencesFrom(c||[o],{Parent:u,Derives_from:l},s)}_resolveReferencesTo(t,n){const r=this._underConstructionOrphans[n];r&&(t.forEach(i=>{i.child_features.push(...r.Parent)}),t.forEach(i=>{i.derived_features.push(...r.Derives_from)}),delete this._underConstructionOrphans[n])}_parseError(t){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${t}`)}_resolveReferencesFrom(t,n,r){function i(a,o,s){let u=a[o];u||(u={},a[o]=u);const l=u[s]||!1;return u[s]=!0,l}n.Parent.forEach(a=>{const o=this._underConstructionById[a];if(o){const s=k_.Parent;r.filter(u=>i(this._completedReferences,u,`Parent,${a}`)).length||o.forEach(u=>{u[s].push(t)})}else{let s=this._underConstructionOrphans[a];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[a]=s),s.Parent.push(t)}}),n.Derives_from.forEach(a=>{const o=this._underConstructionById[a];if(o){const s=k_.Derives_from;r.filter(u=>i(this._completedReferences,u,`Derives_from,${a}`)).length||o.forEach(u=>{u[s].push(t)})}else{let s=this._underConstructionOrphans[a];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[a]=s),s.Derives_from.push(t)}})}}function rm(e){process&&process.nextTick?process.nextTick(e):e()}function B_(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 DU extends y_.Transform{constructor(t={}){super({objectMode:!0}),this.textBuffer="";const n=B_(t);this.encoding=t.encoding||"utf8",this.decoder=new fU;const r=this.push.bind(this);this.parser=new I_({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)),rm(r)}_flush(t){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),rm(t)}}function RU(e={}){return new DU(e)}function FU(e,t={}){if(!e)return[];const n=B_(t),r=[],i=r.push.bind(r),a=new I_({featureCallback:n.parseFeatures?i:void 0,directiveCallback:n.parseDirectives?i:void 0,commentCallback:n.parseComments?i:void 0,sequenceCallback:n.parseSequences?i:void 0,disableDerivesFromReferences:n.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:o=>{throw o}});return e.split(/\r?\n/).forEach(a.addLine.bind(a)),a.finish(),r}function MU(e){const t=[],n=[];e.forEach(i=>{"sequence"in i?n.push(i):t.push(i)});let r=t.map(sh).join("");return n.length&&(r+=`##FASTA
632
+ `,r+=n.map(nm).join("")),r}class D_ extends y_.Transform{constructor(t={}){super(Object.assign(t,{objectMode:!0})),this.linesSinceLastSyncMark=0,this.haveWeEmittedData=!1,this.fastaMode=!1,this.minLinesBetweenSyncMarks=t.minSyncLines||100,this.insertVersionDirective=t.insertVersionDirective||!1}_transform(t,n,r){let i;if(!this.haveWeEmittedData&&this.insertVersionDirective){const a=Array.isArray(t)?t[0]:t;"directive"in a&&a.directive!=="gff-version"&&this.push(`##gff-version 3
624
633
  `)}if("sequence"in t&&!this.fastaMode&&(this.push(`##FASTA
625
634
  `),this.fastaMode=!0),Array.isArray(t)?i=t.map(sh).join(""):i=sh(t),this.push(i),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
626
635
  `),this.linesSinceLastSyncMark=0;else{let a=0;for(let o=0;o<i.length;o+=1)i[o]===`
627
- `&&(a+=1);this.linesSinceLastSyncMark+=a}this.haveWeEmittedData=!0,rm(r)}}function FU(e={}){return new T_(e)}function MU(e,t,n={}){const r={insertVersionDirective:!0,...n};return new Promise((i,a)=>{e.pipe(new T_(r)).on("end",()=>i(null)).on("error",a).pipe(t)})}const PU=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:BU,parseStringSync:DU,formatSync:RU,formatStream:FU,formatFile:MU,util:TU}},Symbol.toStringTag,{value:"Module"}));he.GenomeSpy=pv,he.embed=p7,he.favIcon=d7,he.html=it,he.icon=h7,he.loadSpec=gv,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
636
+ `&&(a+=1);this.linesSinceLastSyncMark+=a}this.haveWeEmittedData=!0,rm(r)}}function PU(e={}){return new D_(e)}function LU(e,t,n={}){const r={insertVersionDirective:!0,...n};return new Promise((i,a)=>{e.pipe(new D_(r)).on("end",()=>i(null)).on("error",a).pipe(t)})}const OU=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:RU,parseStringSync:FU,formatSync:MU,formatStream:PU,formatFile:LU,util:BU}},Symbol.toStringTag,{value:"Module"}));he.GenomeSpy=bv,he.embed=m7,he.favIcon=g7,he.html=Ke,he.icon=p7,he.loadSpec=yv,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});