@genome-spy/core 0.58.0 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/{index-DwLfOHEk.js → index-5ajWdKly.js} +1 -1
- package/dist/bundle/{index-vgGDWUPz.js → index-B03-Om4z.js} +1 -1
- package/dist/bundle/index-Bg7C4Xat.js +2750 -0
- package/dist/bundle/{index-CalimFw3.js → index-C3QR8Lv6.js} +79 -79
- package/dist/bundle/{index-Dec7VcMU.js → index-g8iXgW0W.js} +281 -256
- package/dist/bundle/index.es.js +3132 -3143
- package/dist/bundle/index.js +150 -149
- package/dist/bundle/{long-BviWyoZx.js → long-B-FASCSo.js} +45 -45
- package/dist/schema.json +8 -3
- package/dist/src/data/flowNode.d.ts.map +1 -1
- package/dist/src/data/sources/dataSource.d.ts.map +1 -1
- package/dist/src/data/transforms/identifier.d.ts.map +1 -1
- package/dist/src/data/transforms/measureText.js +1 -1
- package/dist/src/data/transforms/regexFold.d.ts.map +1 -1
- package/dist/src/data/transforms/regexFold.js +10 -0
- package/dist/src/data/transforms/regexFold.test.js +13 -0
- package/dist/src/fonts/bmFontManager.js +2 -2
- package/dist/src/fonts/bmFontMetrics.d.ts.map +1 -1
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +0 -13
- package/dist/src/gl/arrayBuilder.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.d.ts +1 -1
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/marks/link.d.ts.map +1 -1
- package/dist/src/marks/link.js +1 -1
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/point.d.ts +1 -1
- package/dist/src/marks/point.d.ts.map +1 -1
- package/dist/src/spec/sampleView.d.ts +12 -1
- package/dist/src/tooltip/dataTooltipHandler.js +1 -1
- package/dist/src/types/viewContext.d.ts +0 -15
- package/dist/src/utils/indexer.d.ts +0 -2
- package/dist/src/utils/indexer.d.ts.map +1 -1
- package/dist/src/utils/reservationMap.d.ts +4 -4
- package/dist/src/utils/reservationMap.d.ts.map +1 -1
- package/dist/src/utils/scaleNull.d.ts +0 -2
- package/dist/src/utils/scaleNull.d.ts.map +1 -1
- package/dist/src/utils/trees.d.ts +2 -2
- package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
- package/dist/src/view/layout/rectangle.d.ts.map +1 -1
- package/dist/src/view/paramMediator.js +2 -2
- package/dist/src/view/scaleResolution.d.ts.map +1 -1
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +0 -4
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/package.json +4 -5
- package/dist/bundle/index-DS2hvLgl.js +0 -3425
package/dist/bundle/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
(function(Ue,
|
|
1
|
+
(function(Ue,Qe){typeof exports=="object"&&typeof module<"u"?Qe(exports):typeof define=="function"&&define.amd?define(["exports"],Qe):(Ue=typeof globalThis<"u"?globalThis:Ue||self,Qe(Ue.genomeSpyEmbed={}))})(this,function(Ue){"use strict";var F9=Object.defineProperty;var Hx=Ue=>{throw TypeError(Ue)};var M9=(Ue,Qe,Je)=>Qe in Ue?F9(Ue,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Ue[Qe]=Je;var Ut=(Ue,Qe,Je)=>M9(Ue,typeof Qe!="symbol"?Qe+"":Qe,Je),Jd=(Ue,Qe,Je)=>Qe.has(Ue)||Hx("Cannot "+Je);var X=(Ue,Qe,Je)=>(Jd(Ue,Qe,"read from private field"),Je?Je.call(Ue):Qe.get(Ue)),ve=(Ue,Qe,Je)=>Qe.has(Ue)?Hx("Cannot add the same private member more than once"):Qe instanceof WeakSet?Qe.add(Ue):Qe.set(Ue,Je),Pe=(Ue,Qe,Je,Fi)=>(Jd(Ue,Qe,"write to private field"),Fi?Fi.call(Ue,Je):Qe.set(Ue,Je),Je),he=(Ue,Qe,Je)=>(Jd(Ue,Qe,"access private method"),Je);var Vx=(Ue,Qe,Je,Fi)=>({set _(tu){Pe(Ue,Qe,tu,Je)},get _(){return X(Ue,Qe,Fi)}});var Px,Ei,Ga,va,Lr,Si,Io,To,Aa,Ea,Do,qx,jx,Gn,Nr,$d,e0,Bo,Zl,Wx,rr,_o,en,Sa,Fe,t0,n0,ur,r0,Qx,Yx,i0,o0,Jl,s0,ki,a0,Zx,Ca,c0,ko,Ia,Ta,Da,Ba,Hn,Ha,l0,_a,Xl,Xx,ir,ka,Ci,Ii,tn,u0,f0,h0,Kx,Ro,Fo,Mo,Ra,Po,Lo,Fa,d0,Ma,p0,Ti,No,Pa,La,Oo,Na,Oa,or,Di,Or,zr,zo,Uo,nn,Bi,Go,Ve,Ri,Jx,Va,g0,m0,b0,$x,$l,ev,Ho,za,Ur,_i,Vo,pn,eu,tv,nv,rv;function Qe(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Je(t,e,n){return t.fields=e||[],t.fname=n,t}function Fi(t){return t==null?null:t.fname}function tu(t){return t==null?null:t.fields}function iv(t){return t.length===1?ov(t[0]):sv(t)}const ov=t=>function(e){return e[t]},sv=t=>{const e=t.length;return function(n){for(let r=0;r<e;++r)n=n[t[r]];return n}};function mt(t){throw Error(t)}function av(t){const e=[],n=t.length;let r=null,o=0,i="",s,a,c;t=t+"";function l(){e.push(i+t.substring(s,a)),i="",s=a+1}for(s=a=0;a<n;++a)if(c=t[a],c==="\\")i+=t.substring(s,a++),s=a;else if(c===r)l(),r=null,o=-1;else{if(r)continue;s===o&&c==='"'||s===o&&c==="'"?(s=a+1,r=c):c==="."&&!o?a>s?l():s=a+1:c==="["?(a>s&&l(),o=s=a+1):c==="]"&&(o||mt("Access path missing open bracket: "+t),o>0&&l(),o=0,s=a+1)}return o&&mt("Access path missing closing bracket: "+t),r&&mt("Access path missing closing quote: "+t),a>s&&(a++,l()),e}function qa(t,e,n){const r=av(t);return t=r.length===1?r[0]:t,Je((n&&n.get||iv)(r),[t],e||t)}qa("id");const ja=Je(t=>t,[],"identity");Je(()=>0,[],"zero"),Je(()=>1,[],"one"),Je(()=>!0,[],"true"),Je(()=>!1,[],"false");var Dt=Array.isArray;function Rt(t){return t===Object(t)}function bn(t){return t[t.length-1]}function qo(t){return t==null||t===""?null:+t}const y0=t=>e=>t*Math.exp(e),w0=t=>e=>Math.log(t*e),cv=t=>e=>Math.sign(e)*Math.log1p(Math.abs(e/t)),lv=t=>e=>Math.sign(e)*Math.expm1(Math.abs(e))*t,Wa=t=>e=>e<0?-Math.pow(-e,t):Math.pow(e,t);function nu(t,e,n,r){const o=n(t[0]),i=n(bn(t)),s=(i-o)*e;return[r(o-s),r(i-s)]}function uv(t,e){return nu(t,e,qo,ja)}function fv(t,e){var n=Math.sign(t[0]);return nu(t,e,w0(n),y0(n))}function hv(t,e,n){return nu(t,e,Wa(n),Wa(1/n))}function Qa(t,e,n,r,o){const i=r(t[0]),s=r(bn(t)),a=e!=null?r(e):(i+s)/2;return[o(a+(i-a)*n),o(a+(s-a)*n)]}function x0(t,e,n){return Qa(t,e,n,qo,ja)}function v0(t,e,n){const r=Math.sign(t[0]);return Qa(t,e,n,w0(r),y0(r))}function ru(t,e,n,r){return Qa(t,e,n,Wa(r),Wa(1/r))}function dv(t,e,n,r){return Qa(t,e,n,cv(r),lv(r))}function iu(t){return t!=null?Dt(t)?t:[t]:[]}function pv(t,e,n){let r=t[0],o=t[1],i;return o<r&&(i=o,o=r,r=i),i=o-r,i>=n-e?[e,n]:[r=Math.min(Math.max(r,e),n-i),r+i]}function on(t){return typeof t=="function"}const gv="descending";function A0(t,e,n){n=n||{},e=iu(e)||[];const r=[],o=[],i={},s=n.comparator||mv;return iu(t).forEach((a,c)=>{a!=null&&(r.push(e[c]===gv?-1:1),o.push(a=on(a)?a:qa(a,null,n)),(tu(a)||[]).forEach(l=>i[l]=1))}),o.length===0?null:Je(s(o,r),Object.keys(i))}const E0=(t,e)=>(t<e||t==null)&&e!=null?-1:(t>e||e==null)&&t!=null?1:(e=e instanceof Date?+e:e,(t=t instanceof Date?+t:t)!==t&&e===e?-1:e!==e&&t===t?1:0),mv=(t,e)=>t.length===1?bv(t[0],e[0]):yv(t,e,t.length),bv=(t,e)=>function(n,r){return E0(t(n),t(r))*e},yv=(t,e,n)=>(e.push(0),function(r,o){let i,s=0,a=-1;for(;s===0&&++a<n;)i=t[a],s=E0(i(r),i(o));return s*e[a]});function wv(t){for(let e,n,r=1,o=arguments.length;r<o;++r){e=arguments[r];for(n in e)t[n]=e[n]}return t}const xv=Object.prototype.hasOwnProperty;function Mi(t,e){return xv.call(t,e)}function jo(t){return typeof t=="boolean"}function vv(t){return Object.prototype.toString.call(t)==="[object Date]"}function Av(t){return t&&on(t[Symbol.iterator])}function Gt(t){return typeof t=="number"}function Ev(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function nt(t){return typeof t=="string"}function S0(t,e){const n=t[0],r=bn(t),o=+e;return o?o===1?r:n+o*(r-n):n}function Ya(t){return t&&bn(t)-t[0]||0}function ou(t){return Dt(t)?"["+t.map(ou)+"]":Rt(t)||nt(t)?JSON.stringify(t).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):t}function Sv(t){return t==null||t===""?null:!t||t==="false"||t==="0"?!1:!!t}const Cv=t=>Gt(t)||vv(t)?t:Date.parse(t);function Iv(t,e){return e=e||Cv,t==null||t===""?null:e(t)}function Tv(t){return t==null||t===""?null:t+""}function Za(t){const e={},n=t.length;for(let r=0;r<n;++r)e[t[r]]=!0;return e}/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const Xa=globalThis,su=Xa.ShadowRoot&&(Xa.ShadyCSS===void 0||Xa.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,C0=Symbol(),I0=new WeakMap;let Dv=class{constructor(e,n,r){if(this._$cssResult$=!0,r!==C0)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(su&&e===void 0){const r=n!==void 0&&n.length===1;r&&(e=I0.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&I0.set(n,e))}return e}toString(){return this.cssText}};const Bv=t=>new Dv(typeof t=="string"?t:t+"",void 0,C0),_v=(t,e)=>{if(su)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const r=document.createElement("style"),o=Xa.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=n.cssText,t.appendChild(r)}},T0=su?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const r of e.cssRules)n+=r.cssText;return Bv(n)})(t):t;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:kv,defineProperty:Rv,getOwnPropertyDescriptor:Fv,getOwnPropertyNames:Mv,getOwnPropertySymbols:Pv,getPrototypeOf:Lv}=Object,fr=globalThis,D0=fr.trustedTypes,Nv=D0?D0.emptyScript:"",au=fr.reactiveElementPolyfillSupport,Wo=(t,e)=>t,cu={toAttribute(t,e){switch(e){case Boolean:t=t?Nv:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},B0=(t,e)=>!kv(t,e),_0={attribute:!0,type:String,converter:cu,reflect:!1,hasChanged:B0};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),fr.litPropertyMetadata??(fr.litPropertyMetadata=new WeakMap);class Pi extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=_0){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(e,n),!n.noAccessor){const r=Symbol(),o=this.getPropertyDescriptor(e,r,n);o!==void 0&&Rv(this.prototype,e,o)}}static getPropertyDescriptor(e,n,r){const{get:o,set:i}=Fv(this.prototype,e)??{get(){return this[n]},set(s){this[n]=s}};return{get(){return o==null?void 0:o.call(this)},set(s){const a=o==null?void 0:o.call(this);i.call(this,s),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_0}static _$Ei(){if(this.hasOwnProperty(Wo("elementProperties")))return;const e=Lv(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Wo("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Wo("properties"))){const n=this.properties,r=[...Mv(n),...Pv(n)];for(const o of r)this.createProperty(o,n[o])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[r,o]of n)this.elementProperties.set(r,o)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const o=this._$Eu(n,r);o!==void 0&&this._$Eh.set(o,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const o of r)n.unshift(T0(o))}else e!==void 0&&n.push(T0(e));return n}static _$Eu(e,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(n=>n(this))}addController(e){var n;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)==null||n.call(e))}removeController(e){var n;(n=this._$EO)==null||n.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return _v(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(n=>{var r;return(r=n.hostConnected)==null?void 0:r.call(n)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(n=>{var r;return(r=n.hostDisconnected)==null?void 0:r.call(n)})}attributeChangedCallback(e,n,r){this._$AK(e,r)}_$EC(e,n){var i;const r=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,r);if(o!==void 0&&r.reflect===!0){const s=(((i=r.converter)==null?void 0:i.toAttribute)!==void 0?r.converter:cu).toAttribute(n,r.type);this._$Em=e,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(e,n){var i;const r=this.constructor,o=r._$Eh.get(e);if(o!==void 0&&this._$Em!==o){const s=r.getPropertyOptions(o),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((i=s.converter)==null?void 0:i.fromAttribute)!==void 0?s.converter:cu;this._$Em=o,this[o]=a.fromAttribute(n,s.type),this._$Em=null}}requestUpdate(e,n,r){if(e!==void 0){if(r??(r=this.constructor.getPropertyOptions(e)),!(r.hasChanged??B0)(this[e],n))return;this.P(e,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,n,r){this._$AL.has(e)||this._$AL.set(e,n),r.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!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[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[i,s]of o)s.wrapped!==!0||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],s)}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(o=>{var i;return(i=o.hostUpdate)==null?void 0:i.call(o)}),this.update(n)):this._$EU()}catch(o){throw e=!1,this._$EU(),o}e&&this._$AE(n)}willUpdate(e){}_$AE(e){var n;(n=this._$EO)==null||n.forEach(r=>{var o;return(o=r.hostUpdated)==null?void 0:o.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(e){}firstUpdated(e){}}Pi.elementStyles=[],Pi.shadowRootOptions={mode:"open"},Pi[Wo("elementProperties")]=new Map,Pi[Wo("finalized")]=new Map,au==null||au({ReactiveElement:Pi}),(fr.reactiveElementVersions??(fr.reactiveElementVersions=[])).push("2.0.4");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const Qo=globalThis,Ka=Qo.trustedTypes,k0=Ka?Ka.createPolicy("lit-html",{createHTML:t=>t}):void 0,R0="$lit$",hr=`lit$${Math.random().toFixed(9).slice(2)}$`,F0="?"+hr,Ov=`<${F0}>`,qr=document,Yo=()=>qr.createComment(""),Zo=t=>t===null||typeof t!="object"&&typeof t!="function",lu=Array.isArray,zv=t=>lu(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",uu=`[
|
|
14
|
+
\f\r]`,Xo=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,M0=/-->/g,P0=/>/g,jr=RegExp(`>|${uu}(?:([^\\s"'>=/]+)(${uu}*=${uu}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),L0=/'/g,N0=/"/g,O0=/^(?:script|style|textarea|title)$/i,Uv=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),ot=Uv(1),Wr=Symbol.for("lit-noChange"),pt=Symbol.for("lit-nothing"),z0=new WeakMap,Qr=qr.createTreeWalker(qr,129);function U0(t,e){if(!lu(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return k0!==void 0?k0.createHTML(e):e}const Gv=(t,e)=>{const n=t.length-1,r=[];let o,i=e===2?"<svg>":e===3?"<math>":"",s=Xo;for(let a=0;a<n;a++){const c=t[a];let l,u,f=-1,h=0;for(;h<c.length&&(s.lastIndex=h,u=s.exec(c),u!==null);)h=s.lastIndex,s===Xo?u[1]==="!--"?s=M0:u[1]!==void 0?s=P0:u[2]!==void 0?(O0.test(u[2])&&(o=RegExp("</"+u[2],"g")),s=jr):u[3]!==void 0&&(s=jr):s===jr?u[0]===">"?(s=o??Xo,f=-1):u[1]===void 0?f=-2:(f=s.lastIndex-u[2].length,l=u[1],s=u[3]===void 0?jr:u[3]==='"'?N0:L0):s===N0||s===L0?s=jr:s===M0||s===P0?s=Xo:(s=jr,o=void 0);const d=s===jr&&t[a+1].startsWith("/>")?" ":"";i+=s===Xo?c+Ov:f>=0?(r.push(l),c.slice(0,f)+R0+c.slice(f)+hr+d):c+hr+(f===-2?a:d)}return[U0(t,i+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class Ko{constructor({strings:e,_$litType$:n},r){let o;this.parts=[];let i=0,s=0;const a=e.length-1,c=this.parts,[l,u]=Gv(e,n);if(this.el=Ko.createElement(l,r),Qr.currentNode=this.el.content,n===2||n===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(o=Qr.nextNode())!==null&&c.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const f of o.getAttributeNames())if(f.endsWith(R0)){const h=u[s++],d=o.getAttribute(f).split(hr),p=/([.?@])?(.*)/.exec(h);c.push({type:1,index:i,name:p[2],strings:d,ctor:p[1]==="."?Vv:p[1]==="?"?qv:p[1]==="@"?jv:Ja}),o.removeAttribute(f)}else f.startsWith(hr)&&(c.push({type:6,index:i}),o.removeAttribute(f));if(O0.test(o.tagName)){const f=o.textContent.split(hr),h=f.length-1;if(h>0){o.textContent=Ka?Ka.emptyScript:"";for(let d=0;d<h;d++)o.append(f[d],Yo()),Qr.nextNode(),c.push({type:2,index:++i});o.append(f[h],Yo())}}}else if(o.nodeType===8)if(o.data===F0)c.push({type:2,index:i});else{let f=-1;for(;(f=o.data.indexOf(hr,f+1))!==-1;)c.push({type:7,index:i}),f+=hr.length-1}i++}}static createElement(e,n){const r=qr.createElement("template");return r.innerHTML=e,r}}function Li(t,e,n=t,r){var s,a;if(e===Wr)return e;let o=r!==void 0?(s=n._$Co)==null?void 0:s[r]:n._$Cl;const i=Zo(e)?void 0:e._$litDirective$;return(o==null?void 0:o.constructor)!==i&&((a=o==null?void 0:o._$AO)==null||a.call(o,!1),i===void 0?o=void 0:(o=new i(t),o._$AT(t,n,r)),r!==void 0?(n._$Co??(n._$Co=[]))[r]=o:n._$Cl=o),o!==void 0&&(e=Li(t,o._$AS(t,e.values),o,r)),e}class Hv{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:n},parts:r}=this._$AD,o=((e==null?void 0:e.creationScope)??qr).importNode(n,!0);Qr.currentNode=o;let i=Qr.nextNode(),s=0,a=0,c=r[0];for(;c!==void 0;){if(s===c.index){let l;c.type===2?l=new Jo(i,i.nextSibling,this,e):c.type===1?l=new c.ctor(i,c.name,c.strings,this,e):c.type===6&&(l=new Wv(i,this,e)),this._$AV.push(l),c=r[++a]}s!==(c==null?void 0:c.index)&&(i=Qr.nextNode(),s++)}return Qr.currentNode=qr,o}p(e){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,n),n+=r.strings.length-2):r._$AI(e[n])),n++}}class Jo{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,n,r,o){this.type=2,this._$AH=pt,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=o,this._$Cv=(o==null?void 0:o.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Li(this,e,n),Zo(e)?e===pt||e==null||e===""?(this._$AH!==pt&&this._$AR(),this._$AH=pt):e!==this._$AH&&e!==Wr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):zv(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==pt&&Zo(this._$AH)?this._$AA.nextSibling.data=e:this.T(qr.createTextNode(e)),this._$AH=e}$(e){var i;const{values:n,_$litType$:r}=e,o=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Ko.createElement(U0(r.h,r.h[0]),this.options)),r);if(((i=this._$AH)==null?void 0:i._$AD)===o)this._$AH.p(n);else{const s=new Hv(o,this),a=s.u(this.options);s.p(n),this.T(a),this._$AH=s}}_$AC(e){let n=z0.get(e.strings);return n===void 0&&z0.set(e.strings,n=new Ko(e)),n}k(e){lu(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,o=0;for(const i of e)o===n.length?n.push(r=new Jo(this.O(Yo()),this.O(Yo()),this,this.options)):r=n[o],r._$AI(i),o++;o<n.length&&(this._$AR(r&&r._$AB.nextSibling,o),n.length=o)}_$AR(e=this._$AA.nextSibling,n){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,n);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var n;this._$AM===void 0&&(this._$Cv=e,(n=this._$AP)==null||n.call(this,e))}}class Ja{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,r,o,i){this.type=1,this._$AH=pt,this._$AN=void 0,this.element=e,this.name=n,this._$AM=o,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=pt}_$AI(e,n=this,r,o){const i=this.strings;let s=!1;if(i===void 0)e=Li(this,e,n,0),s=!Zo(e)||e!==this._$AH&&e!==Wr,s&&(this._$AH=e);else{const a=e;let c,l;for(e=i[0],c=0;c<i.length-1;c++)l=Li(this,a[r+c],n,c),l===Wr&&(l=this._$AH[c]),s||(s=!Zo(l)||l!==this._$AH[c]),l===pt?e=pt:e!==pt&&(e+=(l??"")+i[c+1]),this._$AH[c]=l}s&&!o&&this.j(e)}j(e){e===pt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Vv extends Ja{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===pt?void 0:e}}class qv extends Ja{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==pt)}}class jv extends Ja{constructor(e,n,r,o,i){super(e,n,r,o,i),this.type=5}_$AI(e,n=this){if((e=Li(this,e,n,0)??pt)===Wr)return;const r=this._$AH,o=e===pt&&r!==pt||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==pt&&(r===pt||o);o&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n;typeof this._$AH=="function"?this._$AH.call(((n=this.options)==null?void 0:n.host)??this.element,e):this._$AH.handleEvent(e)}}let Wv=class{constructor(e,n,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Li(this,e)}};const fu=Qo.litHtmlPolyfillSupport;fu==null||fu(Ko,Jo),(Qo.litHtmlVersions??(Qo.litHtmlVersions=[])).push("3.2.1");const $o=(t,e,n)=>{const r=(n==null?void 0:n.renderBefore)??e;let o=r._$litPart$;if(o===void 0){const i=(n==null?void 0:n.renderBefore)??null;r._$litPart$=o=new Jo(e.insertBefore(Yo(),i),i,void 0,n??{})}return o._$AI(t),o};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/class
|
|
20
|
-
\r]`),n=
|
|
21
|
-
`)}function
|
|
19
|
+
*/class $a extends Pi{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;const e=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=e.firstChild),e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=$o(n,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return Wr}}$a._$litElement$=!0,$a.finalized=!0,(Px=globalThis.litElementHydrateSupport)==null||Px.call(globalThis,{LitElement:$a});const hu=globalThis.litElementPolyfillSupport;hu==null||hu({LitElement:$a}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");var G0={},du={},pu=34,es=10,gu=13;function H0(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function Qv(t,e){var n=H0(t);return function(r,o){return e(n(r),o,t)}}function V0(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var o in r)o in e||n.push(e[o]=o)}),n}function jt(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Yv(t){return t<0?"-"+jt(-t,6):t>9999?"+"+jt(t,6):jt(t,4)}function Zv(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":Yv(t.getUTCFullYear())+"-"+jt(t.getUTCMonth()+1,2)+"-"+jt(t.getUTCDate(),2)+(o?"T"+jt(e,2)+":"+jt(n,2)+":"+jt(r,2)+"."+jt(o,3)+"Z":r?"T"+jt(e,2)+":"+jt(n,2)+":"+jt(r,2)+"Z":n||e?"T"+jt(e,2)+":"+jt(n,2)+"Z":"")}function q0(t){var e=new RegExp('["'+t+`
|
|
20
|
+
\r]`),n=t.charCodeAt(0);function r(f,h){var d,p,y=o(f,function(v,b){if(d)return d(v,b-1);p=v,d=h?Qv(v,h):H0(v)});return y.columns=p||[],y}function o(f,h){var d=[],p=f.length,y=0,v=0,b,A=p<=0,C=!1;f.charCodeAt(p-1)===es&&--p,f.charCodeAt(p-1)===gu&&--p;function E(){if(A)return du;if(C)return C=!1,G0;var R,B=y,O;if(f.charCodeAt(B)===pu){for(;y++<p&&f.charCodeAt(y)!==pu||f.charCodeAt(++y)===pu;);return(R=y)>=p?A=!0:(O=f.charCodeAt(y++))===es?C=!0:O===gu&&(C=!0,f.charCodeAt(y)===es&&++y),f.slice(B+1,R-1).replace(/""/g,'"')}for(;y<p;){if((O=f.charCodeAt(R=y++))===es)C=!0;else if(O===gu)C=!0,f.charCodeAt(y)===es&&++y;else if(O!==n)continue;return f.slice(B,R)}return A=!0,f.slice(B,p)}for(;(b=E())!==du;){for(var I=[];b!==G0&&b!==du;)I.push(b),b=E();h&&(I=h(I,v++))==null||d.push(I)}return d}function i(f,h){return f.map(function(d){return h.map(function(p){return u(d[p])}).join(t)})}function s(f,h){return h==null&&(h=V0(f)),[h.map(u).join(t)].concat(i(f,h)).join(`
|
|
21
|
+
`)}function a(f,h){return h==null&&(h=V0(f)),i(f,h).join(`
|
|
22
22
|
`)}function c(f){return f.map(l).join(`
|
|
23
|
-
`)}function l(f){return f.map(u).join(e)}function u(f){return f==null?"":f instanceof Date?G3(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:c,formatRow:l,formatValue:u}}var H3=lg(" "),V3=H3.parseRows;function q3(e){return e}function j3(e){if(e==null)return q3;var t,n,r=e.scale[0],i=e.scale[1],o=e.translate[0],a=e.translate[1];return function(s,c){c||(t=n=0);var l=2,u=s.length,f=new Array(u);for(f[0]=(t+=s[0])*r+o,f[1]=(n+=s[1])*i+a;l<u;)f[l]=s[l],++l;return f}}function W3(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function Z3(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return ug(e,n)})}:ug(e,t)}function ug(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,o=fg(e,t);return n==null&&r==null?{type:"Feature",properties:i,geometry:o}:r==null?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}function fg(e,t){var n=j3(e.transform),r=e.arcs;function i(u,f){f.length&&f.pop();for(var h=r[u<0?~u:u],d=0,p=h.length;d<p;++d)f.push(n(h[d],d));u<0&&W3(f,p)}function o(u){return n(u)}function a(u){for(var f=[],h=0,d=u.length;h<d;++h)i(u[h],f);return f.length<2&&f.push(f[0]),f}function s(u){for(var f=a(u);f.length<4;)f.push(f[0]);return f}function c(u){return u.map(s)}function l(u){var f=u.type,h;switch(f){case"GeometryCollection":return{type:f,geometries:u.geometries.map(l)};case"Point":h=o(u.coordinates);break;case"MultiPoint":h=u.coordinates.map(o);break;case"LineString":h=a(u.arcs);break;case"MultiLineString":h=u.arcs.map(a);break;case"Polygon":h=c(u.arcs);break;case"MultiPolygon":h=u.arcs.map(c);break;default:return null}return{type:f,coordinates:h}}return l(t)}function Y3(e,t){var n={},r={},i={},o=[],a=-1;t.forEach(function(l,u){var f=e.arcs[l<0?~l:l],h;f.length<3&&!f[1][0]&&!f[1][1]&&(h=t[++a],t[a]=l,t[u]=h)}),t.forEach(function(l){var u=s(l),f=u[0],h=u[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 b=p===d?d:d.concat(p);r[b.start=d.start]=i[b.end=p.end]=b}else r[d.start]=i[d.end]=d;else if(d=r[h])if(delete r[d.start],d.unshift(l),d.start=f,p=i[f]){delete i[p.end];var v=p===d?d:p.concat(d);r[v.start=p.start]=i[v.end=d.end]=v}else r[d.start]=i[d.end]=d;else d=[l],r[d.start=f]=i[d.end=h]=d});function s(l){var u=e.arcs[l<0?~l:l],f=u[0],h;return e.transform?(h=[0,0],u.forEach(function(d){h[0]+=d[0],h[1]+=d[1]})):h=u[u.length-1],l<0?[h,f]:[f,h]}function c(l,u){for(var f in l){var h=l[f];delete u[h.start],delete h.start,delete h.end,h.forEach(function(d){n[d<0?~d:d]=1}),o.push(h)}}return c(i,r),c(r,i),t.forEach(function(l){n[l<0?~l:l]||o.push([l])}),o}function Q3(e){return fg(e,X3.apply(this,arguments))}function X3(e,t,n){var r,i,o;if(arguments.length>1)r=K3(e,t,n);else for(i=0,r=new Array(o=e.arcs.length);i<o;++i)r[i]=i;return{type:"MultiLineString",arcs:Y3(e,r)}}function K3(e,t,n){var r=[],i=[],o;function a(f){var h=f<0?~f:f;(i[h]||(i[h]=[])).push({i:f,g:o})}function s(f){f.forEach(a)}function c(f){f.forEach(s)}function l(f){f.forEach(c)}function u(f){switch(o=f,f.type){case"GeometryCollection":f.geometries.forEach(u);break;case"LineString":s(f.arcs);break;case"MultiLineString":case"Polygon":c(f.arcs);break;case"MultiPolygon":l(f.arcs);break}}return u(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 di(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function J3(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function co(e){let t,n,r;e.length!==2?(t=di,n=(s,c)=>di(e(s),c),r=(s,c)=>e(s)-c):(t=e===di||e===J3?e:$3,n=e,r=e);function i(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const f=l+u>>>1;n(s[f],c)<0?l=f+1:u=f}while(l<u)}return l}function o(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const f=l+u>>>1;n(s[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function a(s,c,l=0,u=s.length){const f=i(s,c,l,u-1);return f>l&&r(s[f-1],c)>-r(s[f],c)?f-1:f}return{left:i,center:a,right:o}}function $3(){return 0}function hg(e){return e===null?NaN:+e}function*eE(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const dg=co(di),Cr=dg.right;dg.left,co(hg).center;function tE(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&++n}return n}function nE(e,t){let n=0,r,i=0,o=0;if(t===void 0)for(let a of e)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of e)(s=t(s,++a,e))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function rE(e,t){let n,r;for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));return[n,r]}class tr extends Map{constructor(t,n=aE){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(pg(this,t))}has(t){return super.has(pg(this,t))}set(t,n){return super.set(iE(this,t),n)}delete(t){return super.delete(oE(this,t))}}function pg({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function iE({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function oE({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function aE(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ff(e){return e}function jc(e,...t){return gg(e,ff,ff,t)}function sE(e,...t){return gg(e,Array.from,ff,t)}function gg(e,t,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new tr,c=r[a++];let l=-1;for(const u of o){const f=c(u,++l,o),h=s.get(f);h?h.push(u):s.set(f,[u])}for(const[u,f]of s)s.set(u,i(f,a));return t(s)}(e,0)}function cE(e=di){if(e===di)return mg;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function mg(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const lE=Math.sqrt(50),uE=Math.sqrt(10),fE=Math.sqrt(2);function Wc(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=lE?10:o>=uE?5:o>=fE?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Wc(e,t,n*2):[s,c,l]}function Zc(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?Wc(t,e,n):Wc(e,t,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)c[l]=(o-l)/-a;else for(let l=0;l<s;++l)c[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)c[l]=(i+l)/-a;else for(let l=0;l<s;++l)c[l]=(i+l)*a;return c}function hf(e,t,n){return t=+t,e=+e,n=+n,Wc(e,t,n)[2]}function pi(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?hf(t,e,n):hf(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function df(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function pf(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function bg(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?mg:cE(i);r>n;){if(r-n>600){const c=r-n+1,l=t-n+1,u=Math.log(c),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(c-f)/c)*(l-c/2<0?-1:1),d=Math.max(n,Math.floor(t-l*f/c+h)),p=Math.min(r,Math.floor(t+(c-l)*f/c+h));bg(e,t,d,p,i)}const o=e[t];let a=n,s=r;for(Ra(e,n,t),i(e[r],o)>0&&Ra(e,n,r);a<s;){for(Ra(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?Ra(e,n,s):(++s,Ra(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Ra(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function hE(e,t,n){if(e=Float64Array.from(eE(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return pf(e);if(t>=1)return df(e);var r,i=(r-1)*t,o=Math.floor(i),a=df(bg(e,o).subarray(0,o+1)),s=pf(e.subarray(o+1));return a+(s-a)*(i-o)}}function yg(e,t,n=hg){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,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function dE(e,t){let n=0,r=0;if(t===void 0)for(let i of e)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of e)(o=t(o,++i,e))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function pE(e,t){return hE(e,.5,t)}function Fa(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Ma(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 gE(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Yc(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 lo(e){return e=Yc(Math.abs(e)),e?e[1]:NaN}function mE(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function bE(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var yE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function uo(e){if(!(t=yE.exec(e)))throw new Error("invalid format: "+e);var t;return new gf({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]})}uo.prototype=gf.prototype;function gf(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+""}gf.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 wE(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 wg;function xE(e,t){var n=Yc(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(wg=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Yc(e,Math.max(0,t+o-1))[0]}function xg(e,t){var n=Yc(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 vg={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:gE,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)=>xg(e*100,t),r:xg,s:xE,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ag(e){return e}var Eg=Array.prototype.map,Sg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vE(e){var t=e.grouping===void 0||e.thousands===void 0?Ag:mE(Eg.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Ag:bE(Eg.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(f){f=uo(f);var h=f.fill,d=f.align,p=f.sign,b=f.symbol,v=f.zero,y=f.width,A=f.comma,_=f.precision,E=f.trim,C=f.type;C==="n"?(A=!0,C="g"):vg[C]||(_===void 0&&(_=12),E=!0,C="g"),(v||h==="0"&&d==="=")&&(v=!0,h="0",d="=");var R=b==="$"?n:b==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",D=b==="$"?r:/[%p]/.test(C)?a:"",O=vg[C],F=/[defgprs%]/.test(C);_=_===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function P(S){var Z=R,Q=D,se,ce,fe;if(C==="c")Q=O(S)+Q,S="";else{S=+S;var le=S<0||1/S<0;if(S=isNaN(S)?c:O(Math.abs(S),_),E&&(S=wE(S)),le&&+S==0&&p!=="+"&&(le=!1),Z=(le?p==="("?p:s:p==="-"||p==="("?"":p)+Z,Q=(C==="s"?Sg[8+wg/3]:"")+Q+(le&&p==="("?")":""),F){for(se=-1,ce=S.length;++se<ce;)if(fe=S.charCodeAt(se),48>fe||fe>57){Q=(fe===46?i+S.slice(se+1):S.slice(se))+Q,S=S.slice(0,se);break}}}A&&!v&&(S=t(S,1/0));var Ee=Z.length+S.length+Q.length,pe=Ee<y?new Array(y-Ee+1).join(h):"";switch(A&&v&&(S=t(pe+S,pe.length?y-Q.length:1/0),pe=""),d){case"<":S=Z+S+Q+pe;break;case"=":S=Z+pe+S+Q;break;case"^":S=pe.slice(0,Ee=pe.length>>1)+Z+S+Q+pe.slice(Ee);break;default:S=pe+Z+S+Q;break}return o(S)}return P.toString=function(){return f+""},P}function u(f,h){var d=l((f=uo(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(lo(h)/3)))*3,b=Math.pow(10,-p),v=Sg[8+p/3];return function(y){return d(b*y)+v}}return{format:l,formatPrefix:u}}var Qc,Nt,_g;AE({thousands:",",grouping:[3],currency:["$",""]});function AE(e){return Qc=vE(e),Nt=Qc.format,_g=Qc.formatPrefix,Qc}function EE(e){return Math.max(0,-lo(Math.abs(e)))}function SE(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(lo(t)/3)))*3-lo(Math.abs(e)))}function _E(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,lo(t)-lo(e))+1}const mf=new Date,bf=new Date;function wt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const c=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return c;let l;do c.push(l=new Date(+o)),t(o,s),e(o);while(l<o&&o<a);return c},i.filter=o=>wt(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(mf.setTime(+o),bf.setTime(+a),e(mf),e(bf),Math.floor(n(mf,bf))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const fo=wt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);fo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?wt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):fo),fo.range;const nr=1e3,pn=nr*60,rr=pn*60,ir=rr*24,yf=ir*7,Cg=ir*30,wf=ir*365,or=wt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());or.range;const Xc=wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*pn)},(e,t)=>(t-e)/pn,e=>e.getMinutes());Xc.range;const Kc=wt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*pn)},(e,t)=>(t-e)/pn,e=>e.getUTCMinutes());Kc.range;const Jc=wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*pn)},(e,t)=>{e.setTime(+e+t*rr)},(e,t)=>(t-e)/rr,e=>e.getHours());Jc.range;const $c=wt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*rr)},(e,t)=>(t-e)/rr,e=>e.getUTCHours());$c.range;const Tr=wt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pn)/ir,e=>e.getDate()-1);Tr.range;const gi=wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>e.getUTCDate()-1);gi.range;const Tg=wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>Math.floor(e/ir));Tg.range;function mi(e){return wt(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())*pn)/yf)}const Pa=mi(0),el=mi(1),CE=mi(2),TE=mi(3),ho=mi(4),IE=mi(5),DE=mi(6);Pa.range,el.range,CE.range,TE.range,ho.range,IE.range,DE.range;function bi(e){return wt(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)/yf)}const La=bi(0),tl=bi(1),kE=bi(2),BE=bi(3),po=bi(4),RE=bi(5),FE=bi(6);La.range,tl.range,kE.range,BE.range,po.range,RE.range,FE.range;const Na=wt(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());Na.range;const Oa=wt(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());Oa.range;const On=wt(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());On.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:wt(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)}),On.range;const zn=wt(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());zn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:wt(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)}),zn.range;function Ig(e,t,n,r,i,o){const a=[[or,1,nr],[or,5,5*nr],[or,15,15*nr],[or,30,30*nr],[o,1,pn],[o,5,5*pn],[o,15,15*pn],[o,30,30*pn],[i,1,rr],[i,3,3*rr],[i,6,6*rr],[i,12,12*rr],[r,1,ir],[r,2,2*ir],[n,1,yf],[t,1,Cg],[t,3,3*Cg],[e,1,wf]];function s(l,u,f){const h=u<l;h&&([l,u]=[u,l]);const d=f&&typeof f.range=="function"?f:c(l,u,f),p=d?d.range(l,+u+1):[];return h?p.reverse():p}function c(l,u,f){const h=Math.abs(u-l)/f,d=co(([,,v])=>v).right(a,h);if(d===a.length)return e.every(pi(l/wf,u/wf,f));if(d===0)return fo.every(Math.max(pi(l,u,f),1));const[p,b]=a[h/a[d-1][2]<a[d][2]/h?d-1:d];return p.every(b)}return[s,c]}const[ME,PE]=Ig(zn,Oa,La,Tg,$c,Kc),[LE,NE]=Ig(On,Na,Pa,Tr,Jc,Xc),za="year",Ua="quarter",Ga="month",Ha="week",Va="date",nl="day",xf="dayofyear",qa="hours",ja="minutes",Wa="seconds",rl="milliseconds";[za,Ua,Ga,Ha,Va,nl,xf,qa,ja,Wa,rl].reduce((e,t,n)=>(e[t]=1+n,e),{});const OE={[za]:On,[Ua]:Na.every(3),[Ga]:Na,[Ha]:Pa,[Va]:Tr,[nl]:Tr,[xf]:Tr,[qa]:Jc,[ja]:Xc,[Wa]:or,[rl]:fo},zE={[za]:zn,[Ua]:Oa.every(3),[Ga]:Oa,[Ha]:La,[Va]:gi,[nl]:gi,[xf]:gi,[qa]:$c,[ja]:Kc,[Wa]:or,[rl]:fo};function UE(e){return OE[e]}function GE(e){return zE[e]}function vf(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 Af(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 Za(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Dg(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,c=e.shortMonths,l=Ya(i),u=Qa(i),f=Ya(o),h=Qa(o),d=Ya(a),p=Qa(a),b=Ya(s),v=Qa(s),y=Ya(c),A=Qa(c),_={a:le,A:Ee,b:pe,B:_e,c:null,d:Pg,e:Pg,f:uS,g:xS,G:AS,H:sS,I:cS,j:lS,L:Lg,m:fS,M:hS,p:Ce,q:we,Q:Hg,s:Vg,S:dS,u:pS,U:gS,V:mS,w:bS,W:yS,x:null,X:null,y:wS,Y:vS,Z:ES,"%":Gg},E={a:Te,A:Ve,b:Le,B:j,c:null,d:Og,e:Og,f:TS,g:NS,G:zS,H:SS,I:_S,j:CS,L:zg,m:IS,M:DS,p:q,q:re,Q:Hg,s:Vg,S:kS,u:BS,U:RS,V:FS,w:MS,W:PS,x:null,X:null,y:LS,Y:OS,Z:US,"%":Gg},C={a:P,A:S,b:Z,B:Q,c:se,d:Fg,e:Fg,f:rS,g:Rg,G:Bg,H:Mg,I:Mg,j:$E,L:nS,m:JE,M:eS,p:F,q:KE,Q:oS,s:aS,S:tS,u:WE,U:ZE,V:YE,w:jE,W:QE,x:ce,X:fe,y:Rg,Y:Bg,Z:XE,"%":iS};_.x=R(n,_),_.X=R(r,_),_.c=R(t,_),E.x=R(n,E),E.X=R(r,E),E.c=R(t,E);function R($,ue){return function(L){var I=[],ee=-1,oe=0,Ie=$.length,ye,xe,Be;for(L instanceof Date||(L=new Date(+L));++ee<Ie;)$.charCodeAt(ee)===37&&(I.push($.slice(oe,ee)),(xe=kg[ye=$.charAt(++ee)])!=null?ye=$.charAt(++ee):xe=ye==="e"?" ":"0",(Be=ue[ye])&&(ye=Be(L,xe)),I.push(ye),oe=ee+1);return I.push($.slice(oe,ee)),I.join("")}}function D($,ue){return function(L){var I=Za(1900,void 0,1),ee=O(I,$,L+="",0),oe,Ie;if(ee!=L.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(ue&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(oe=Af(Za(I.y,0,1)),Ie=oe.getUTCDay(),oe=Ie>4||Ie===0?tl.ceil(oe):tl(oe),oe=gi.offset(oe,(I.V-1)*7),I.y=oe.getUTCFullYear(),I.m=oe.getUTCMonth(),I.d=oe.getUTCDate()+(I.w+6)%7):(oe=vf(Za(I.y,0,1)),Ie=oe.getDay(),oe=Ie>4||Ie===0?el.ceil(oe):el(oe),oe=Tr.offset(oe,(I.V-1)*7),I.y=oe.getFullYear(),I.m=oe.getMonth(),I.d=oe.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),Ie="Z"in I?Af(Za(I.y,0,1)).getUTCDay():vf(Za(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(Ie+5)%7:I.w+I.U*7-(Ie+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,Af(I)):vf(I)}}function O($,ue,L,I){for(var ee=0,oe=ue.length,Ie=L.length,ye,xe;ee<oe;){if(I>=Ie)return-1;if(ye=ue.charCodeAt(ee++),ye===37){if(ye=ue.charAt(ee++),xe=C[ye in kg?ue.charAt(ee++):ye],!xe||(I=xe($,L,I))<0)return-1}else if(ye!=L.charCodeAt(I++))return-1}return I}function F($,ue,L){var I=l.exec(ue.slice(L));return I?($.p=u.get(I[0].toLowerCase()),L+I[0].length):-1}function P($,ue,L){var I=d.exec(ue.slice(L));return I?($.w=p.get(I[0].toLowerCase()),L+I[0].length):-1}function S($,ue,L){var I=f.exec(ue.slice(L));return I?($.w=h.get(I[0].toLowerCase()),L+I[0].length):-1}function Z($,ue,L){var I=y.exec(ue.slice(L));return I?($.m=A.get(I[0].toLowerCase()),L+I[0].length):-1}function Q($,ue,L){var I=b.exec(ue.slice(L));return I?($.m=v.get(I[0].toLowerCase()),L+I[0].length):-1}function se($,ue,L){return O($,t,ue,L)}function ce($,ue,L){return O($,n,ue,L)}function fe($,ue,L){return O($,r,ue,L)}function le($){return a[$.getDay()]}function Ee($){return o[$.getDay()]}function pe($){return c[$.getMonth()]}function _e($){return s[$.getMonth()]}function Ce($){return i[+($.getHours()>=12)]}function we($){return 1+~~($.getMonth()/3)}function Te($){return a[$.getUTCDay()]}function Ve($){return o[$.getUTCDay()]}function Le($){return c[$.getUTCMonth()]}function j($){return s[$.getUTCMonth()]}function q($){return i[+($.getUTCHours()>=12)]}function re($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var ue=R($+="",_);return ue.toString=function(){return $},ue},parse:function($){var ue=D($+="",!1);return ue.toString=function(){return $},ue},utcFormat:function($){var ue=R($+="",E);return ue.toString=function(){return $},ue},utcParse:function($){var ue=D($+="",!0);return ue.toString=function(){return $},ue}}}var kg={"-":"",_:" ",0:"0"},Et=/^\s*\d+/,HE=/^%/,VE=/[\\^$*+?|[\]().{}]/g;function We(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function qE(e){return e.replace(VE,"\\$&")}function Ya(e){return new RegExp("^(?:"+e.map(qE).join("|")+")","i")}function Qa(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function jE(e,t,n){var r=Et.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function WE(e,t,n){var r=Et.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ZE(e,t,n){var r=Et.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function YE(e,t,n){var r=Et.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function QE(e,t,n){var r=Et.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Bg(e,t,n){var r=Et.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Rg(e,t,n){var r=Et.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function XE(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 KE(e,t,n){var r=Et.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function JE(e,t,n){var r=Et.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Fg(e,t,n){var r=Et.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function $E(e,t,n){var r=Et.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Mg(e,t,n){var r=Et.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function eS(e,t,n){var r=Et.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function tS(e,t,n){var r=Et.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function nS(e,t,n){var r=Et.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function rS(e,t,n){var r=Et.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function iS(e,t,n){var r=HE.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function oS(e,t,n){var r=Et.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function aS(e,t,n){var r=Et.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Pg(e,t){return We(e.getDate(),t,2)}function sS(e,t){return We(e.getHours(),t,2)}function cS(e,t){return We(e.getHours()%12||12,t,2)}function lS(e,t){return We(1+Tr.count(On(e),e),t,3)}function Lg(e,t){return We(e.getMilliseconds(),t,3)}function uS(e,t){return Lg(e,t)+"000"}function fS(e,t){return We(e.getMonth()+1,t,2)}function hS(e,t){return We(e.getMinutes(),t,2)}function dS(e,t){return We(e.getSeconds(),t,2)}function pS(e){var t=e.getDay();return t===0?7:t}function gS(e,t){return We(Pa.count(On(e)-1,e),t,2)}function Ng(e){var t=e.getDay();return t>=4||t===0?ho(e):ho.ceil(e)}function mS(e,t){return e=Ng(e),We(ho.count(On(e),e)+(On(e).getDay()===4),t,2)}function bS(e){return e.getDay()}function yS(e,t){return We(el.count(On(e)-1,e),t,2)}function wS(e,t){return We(e.getFullYear()%100,t,2)}function xS(e,t){return e=Ng(e),We(e.getFullYear()%100,t,2)}function vS(e,t){return We(e.getFullYear()%1e4,t,4)}function AS(e,t){var n=e.getDay();return e=n>=4||n===0?ho(e):ho.ceil(e),We(e.getFullYear()%1e4,t,4)}function ES(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+We(t/60|0,"0",2)+We(t%60,"0",2)}function Og(e,t){return We(e.getUTCDate(),t,2)}function SS(e,t){return We(e.getUTCHours(),t,2)}function _S(e,t){return We(e.getUTCHours()%12||12,t,2)}function CS(e,t){return We(1+gi.count(zn(e),e),t,3)}function zg(e,t){return We(e.getUTCMilliseconds(),t,3)}function TS(e,t){return zg(e,t)+"000"}function IS(e,t){return We(e.getUTCMonth()+1,t,2)}function DS(e,t){return We(e.getUTCMinutes(),t,2)}function kS(e,t){return We(e.getUTCSeconds(),t,2)}function BS(e){var t=e.getUTCDay();return t===0?7:t}function RS(e,t){return We(La.count(zn(e)-1,e),t,2)}function Ug(e){var t=e.getUTCDay();return t>=4||t===0?po(e):po.ceil(e)}function FS(e,t){return e=Ug(e),We(po.count(zn(e),e)+(zn(e).getUTCDay()===4),t,2)}function MS(e){return e.getUTCDay()}function PS(e,t){return We(tl.count(zn(e)-1,e),t,2)}function LS(e,t){return We(e.getUTCFullYear()%100,t,2)}function NS(e,t){return e=Ug(e),We(e.getUTCFullYear()%100,t,2)}function OS(e,t){return We(e.getUTCFullYear()%1e4,t,4)}function zS(e,t){var n=e.getUTCDay();return e=n>=4||n===0?po(e):po.ceil(e),We(e.getUTCFullYear()%1e4,t,4)}function US(){return"+0000"}function Gg(){return"%"}function Hg(e){return+e}function Vg(e){return Math.floor(+e/1e3)}var go,Ef,qg,Sf,jg;GS({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 GS(e){return go=Dg(e),Ef=go.format,qg=go.parse,Sf=go.utcFormat,jg=go.utcParse,go}function il(e){const t={};return n=>t[n]||(t[n]=e(n))}function Wg(e,t,n){n=n||{},Lt(n)||yt(`Invalid time multi-format specifier: ${n}`);const r=t(Wa),i=t(ja),o=t(qa),a=t(Va),s=t(Ha),c=t(Ga),l=t(Ua),u=t(za),f=e(n[rl]||".%L"),h=e(n[Wa]||":%S"),d=e(n[ja]||"%I:%M"),p=e(n[qa]||"%I %p"),b=e(n[Va]||n[nl]||"%a %d"),v=e(n[Ha]||"%b %d"),y=e(n[Ga]||"%B"),A=e(n[Ua]||"%B"),_=e(n[za]||"%Y");return E=>(r(E)<E?f:i(E)<E?h:o(E)<E?d:a(E)<E?p:c(E)<E?s(E)<E?b:v:u(E)<E?l(E)<E?y:A:_)(E)}function Zg(e){const t=il(e.format),n=il(e.utcFormat);return{timeFormat:r=>it(r)?t(r):Wg(t,UE,r),utcFormat:r=>it(r)?n(r):Wg(n,GE,r),timeParse:il(e.parse),utcParse:il(e.utcParse)}}let _f;HS();function HS(){return _f=Zg({format:Ef,parse:qg,utcFormat:Sf,utcParse:jg})}function VS(e){return Zg(Dg(e))}function qS(e){return arguments.length?_f=VS(e):_f}const jS=e=>e!=null&&e===e,WS=e=>e==="true"||e==="false"||e===!0||e===!1,ZS=e=>!Number.isNaN(Date.parse(e)),Yg=e=>!Number.isNaN(+e)&&!(e instanceof Date),YS=e=>Yg(e)&&Number.isInteger(+e),Qg={boolean:m3,integer:va,number:va,date:y3,string:w3,unknown:Lc},ol=[WS,YS,Yg,ZS],QS=["boolean","integer","number","date"];function XS(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=ol.length,i=ol.map((o,a)=>a+1);for(let o=0,a=0,s,c;o<n;++o)for(c=t?e[o][t]:e[o],s=0;s<r;++s)if(i[s]&&jS(c)&&!ol[s](c)&&(i[s]=0,++a,a===ol.length))return"string";return QS[i.reduce((o,a)=>o===0?a:o,0)-1]}function KS(e,t){return t.reduce((n,r)=>(n[r]=XS(e,r),n),{})}function Xg(e){const t=function(n,r){const i={delimiter:e};return Cf(n,r?f3(r,i):i)};return t.responseType="text",t}function Cf(e,t){return t.header&&(e=t.header.map($u).join(t.delimiter)+`
|
|
24
|
-
`+
|
|
23
|
+
`)}function l(f){return f.map(u).join(t)}function u(f){return f==null?"":f instanceof Date?Zv(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:o,format:s,formatBody:a,formatRows:c,formatRow:l,formatValue:u}}var Xv=q0(" "),Kv=Xv.parseRows;function Jv(t){return t}function $v(t){if(t==null)return Jv;var e,n,r=t.scale[0],o=t.scale[1],i=t.translate[0],s=t.translate[1];return function(a,c){c||(e=n=0);var l=2,u=a.length,f=new Array(u);for(f[0]=(e+=a[0])*r+i,f[1]=(n+=a[1])*o+s;l<u;)f[l]=a[l],++l;return f}}function eA(t,e){for(var n,r=t.length,o=r-e;o<--r;)n=t[o],t[o++]=t[r],t[r]=n}function tA(t,e){return typeof e=="string"&&(e=t.objects[e]),e.type==="GeometryCollection"?{type:"FeatureCollection",features:e.geometries.map(function(n){return j0(t,n)})}:j0(t,e)}function j0(t,e){var n=e.id,r=e.bbox,o=e.properties==null?{}:e.properties,i=W0(t,e);return n==null&&r==null?{type:"Feature",properties:o,geometry:i}:r==null?{type:"Feature",id:n,properties:o,geometry:i}:{type:"Feature",id:n,bbox:r,properties:o,geometry:i}}function W0(t,e){var n=$v(t.transform),r=t.arcs;function o(u,f){f.length&&f.pop();for(var h=r[u<0?~u:u],d=0,p=h.length;d<p;++d)f.push(n(h[d],d));u<0&&eA(f,p)}function i(u){return n(u)}function s(u){for(var f=[],h=0,d=u.length;h<d;++h)o(u[h],f);return f.length<2&&f.push(f[0]),f}function a(u){for(var f=s(u);f.length<4;)f.push(f[0]);return f}function c(u){return u.map(a)}function l(u){var f=u.type,h;switch(f){case"GeometryCollection":return{type:f,geometries:u.geometries.map(l)};case"Point":h=i(u.coordinates);break;case"MultiPoint":h=u.coordinates.map(i);break;case"LineString":h=s(u.arcs);break;case"MultiLineString":h=u.arcs.map(s);break;case"Polygon":h=c(u.arcs);break;case"MultiPolygon":h=u.arcs.map(c);break;default:return null}return{type:f,coordinates:h}}return l(e)}function nA(t,e){var n={},r={},o={},i=[],s=-1;e.forEach(function(l,u){var f=t.arcs[l<0?~l:l],h;f.length<3&&!f[1][0]&&!f[1][1]&&(h=e[++s],e[s]=l,e[u]=h)}),e.forEach(function(l){var u=a(l),f=u[0],h=u[1],d,p;if(d=o[f])if(delete o[d.end],d.push(l),d.end=h,p=r[h]){delete r[p.start];var y=p===d?d:d.concat(p);r[y.start=d.start]=o[y.end=p.end]=y}else r[d.start]=o[d.end]=d;else if(d=r[h])if(delete r[d.start],d.unshift(l),d.start=f,p=o[f]){delete o[p.end];var v=p===d?d:p.concat(d);r[v.start=p.start]=o[v.end=d.end]=v}else r[d.start]=o[d.end]=d;else d=[l],r[d.start=f]=o[d.end=h]=d});function a(l){var u=t.arcs[l<0?~l:l],f=u[0],h;return t.transform?(h=[0,0],u.forEach(function(d){h[0]+=d[0],h[1]+=d[1]})):h=u[u.length-1],l<0?[h,f]:[f,h]}function c(l,u){for(var f in l){var h=l[f];delete u[h.start],delete h.start,delete h.end,h.forEach(function(d){n[d<0?~d:d]=1}),i.push(h)}}return c(o,r),c(r,o),e.forEach(function(l){n[l<0?~l:l]||i.push([l])}),i}function rA(t){return W0(t,iA.apply(this,arguments))}function iA(t,e,n){var r,o,i;if(arguments.length>1)r=oA(t,e,n);else for(o=0,r=new Array(i=t.arcs.length);o<i;++o)r[o]=o;return{type:"MultiLineString",arcs:nA(t,r)}}function oA(t,e,n){var r=[],o=[],i;function s(f){var h=f<0?~f:f;(o[h]||(o[h]=[])).push({i:f,g:i})}function a(f){f.forEach(s)}function c(f){f.forEach(a)}function l(f){f.forEach(c)}function u(f){switch(i=f,f.type){case"GeometryCollection":f.geometries.forEach(u);break;case"LineString":a(f.arcs);break;case"MultiLineString":case"Polygon":c(f.arcs);break;case"MultiPolygon":l(f.arcs);break}}return u(e),o.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 Yr(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function sA(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ni(t){let e,n,r;t.length!==2?(e=Yr,n=(a,c)=>Yr(t(a),c),r=(a,c)=>t(a)-c):(e=t===Yr||t===sA?t:aA,n=t,r=t);function o(a,c,l=0,u=a.length){if(l<u){if(e(c,c)!==0)return u;do{const f=l+u>>>1;n(a[f],c)<0?l=f+1:u=f}while(l<u)}return l}function i(a,c,l=0,u=a.length){if(l<u){if(e(c,c)!==0)return u;do{const f=l+u>>>1;n(a[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function s(a,c,l=0,u=a.length){const f=o(a,c,l,u-1);return f>l&&r(a[f-1],c)>-r(a[f],c)?f-1:f}return{left:o,center:s,right:i}}function aA(){return 0}function Q0(t){return t===null?NaN:+t}function*cA(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const Y0=Ni(Yr),dr=Y0.right;Y0.left,Ni(Q0).center;function lA(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&++n}return n}function uA(t,e){let n=0,r,o=0,i=0;if(e===void 0)for(let s of t)s!=null&&(s=+s)>=s&&(r=s-o,o+=r/++n,i+=r*(s-o));else{let s=-1;for(let a of t)(a=e(a,++s,t))!=null&&(a=+a)>=a&&(r=a-o,o+=r/++n,i+=r*(a-o))}if(n>1)return i/(n-1)}function fA(t,e){let n,r;for(const o of t)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)));return[n,r]}class Vn extends Map{constructor(e,n=pA){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,o]of e)this.set(r,o)}get(e){return super.get(Z0(this,e))}has(e){return super.has(Z0(this,e))}set(e,n){return super.set(hA(this,e),n)}delete(e){return super.delete(dA(this,e))}}function Z0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function hA({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function dA({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function pA(t){return t!==null&&typeof t=="object"?t.valueOf():t}function mu(t){return t}function ec(t,...e){return X0(t,mu,mu,e)}function gA(t,...e){return X0(t,Array.from,mu,e)}function X0(t,e,n,r){return function o(i,s){if(s>=r.length)return n(i);const a=new Vn,c=r[s++];let l=-1;for(const u of i){const f=c(u,++l,i),h=a.get(f);h?h.push(u):a.set(f,[u])}for(const[u,f]of a)a.set(u,o(f,s));return e(a)}(t,0)}function mA(t=Yr){if(t===Yr)return K0;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function K0(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const bA=Math.sqrt(50),yA=Math.sqrt(10),wA=Math.sqrt(2);function tc(t,e,n){const r=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),s=i>=bA?10:i>=yA?5:i>=wA?2:1;let a,c,l;return o<0?(l=Math.pow(10,-o)/s,a=Math.round(t*l),c=Math.round(e*l),a/l<t&&++a,c/l>e&&--c,l=-l):(l=Math.pow(10,o)*s,a=Math.round(t/l),c=Math.round(e/l),a*l<t&&++a,c*l>e&&--c),c<a&&.5<=n&&n<2?tc(t,e,n*2):[a,c,l]}function nc(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[o,i,s]=r?tc(e,t,n):tc(t,e,n);if(!(i>=o))return[];const a=i-o+1,c=new Array(a);if(r)if(s<0)for(let l=0;l<a;++l)c[l]=(i-l)/-s;else for(let l=0;l<a;++l)c[l]=(i-l)*s;else if(s<0)for(let l=0;l<a;++l)c[l]=(o+l)/-s;else for(let l=0;l<a;++l)c[l]=(o+l)*s;return c}function bu(t,e,n){return e=+e,t=+t,n=+n,tc(t,e,n)[2]}function Zr(t,e,n){e=+e,t=+t,n=+n;const r=e<t,o=r?bu(e,t,n):bu(t,e,n);return(r?-1:1)*(o<0?1/-o:o)}function yu(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function wu(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function J0(t,e,n=0,r=1/0,o){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(o=o===void 0?K0:mA(o);r>n;){if(r-n>600){const c=r-n+1,l=e-n+1,u=Math.log(c),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(c-f)/c)*(l-c/2<0?-1:1),d=Math.max(n,Math.floor(e-l*f/c+h)),p=Math.min(r,Math.floor(e+(c-l)*f/c+h));J0(t,e,d,p,o)}const i=t[e];let s=n,a=r;for(ts(t,n,e),o(t[r],i)>0&&ts(t,n,r);s<a;){for(ts(t,s,a),++s,--a;o(t[s],i)<0;)++s;for(;o(t[a],i)>0;)--a}o(t[n],i)===0?ts(t,n,a):(++a,ts(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function ts(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function xA(t,e,n){if(t=Float64Array.from(cA(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return wu(t);if(e>=1)return yu(t);var r,o=(r-1)*e,i=Math.floor(o),s=yu(J0(t,i).subarray(0,i+1)),a=wu(t.subarray(i+1));return s+(a-s)*(o-i)}}function $0(t,e,n=Q0){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,o=(r-1)*e,i=Math.floor(o),s=+n(t[i],i,t),a=+n(t[i+1],i+1,t);return s+(a-s)*(o-i)}}function vA(t,e){let n=0,r=0;if(e===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(++n,r+=o);else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(i=+i)>=i&&(++n,r+=i)}if(n)return r/n}function AA(t,e){return xA(t,.5,e)}function ns(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((e-t)/n))|0,i=new Array(o);++r<o;)i[r]=t+r*n;return i}function rs(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let o of t)(o=+e(o,++r,t))&&(n+=o)}return n}function EA(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function rc(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Oi(t){return t=rc(Math.abs(t)),t?t[1]:NaN}function SA(t,e){return function(n,r){for(var o=n.length,i=[],s=0,a=t[0],c=0;o>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),i.push(n.substring(o-=a,o+a)),!((c+=a+1)>r));)a=t[s=(s+1)%t.length];return i.reverse().join(e)}}function CA(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var IA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function zi(t){if(!(e=IA.exec(t)))throw new Error("invalid format: "+t);var e;return new xu({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}zi.prototype=xu.prototype;function xu(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}xu.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 TA(t){e:for(var e=t.length,n=1,r=-1,o;n<e;++n)switch(t[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+t[n])break e;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(o+1):t}var ep;function DA(t,e){var n=rc(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(ep=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+rc(t,Math.max(0,e+i-1))[0]}function tp(t,e){var n=rc(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const np={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:EA,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>tp(t*100,e),r:tp,s:DA,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function rp(t){return t}var ip=Array.prototype.map,op=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function BA(t){var e=t.grouping===void 0||t.thousands===void 0?rp:SA(ip.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?rp:CA(ip.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function l(f){f=zi(f);var h=f.fill,d=f.align,p=f.sign,y=f.symbol,v=f.zero,b=f.width,A=f.comma,C=f.precision,E=f.trim,I=f.type;I==="n"?(A=!0,I="g"):np[I]||(C===void 0&&(C=12),E=!0,I="g"),(v||h==="0"&&d==="=")&&(v=!0,h="0",d="=");var R=y==="$"?n:y==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",B=y==="$"?r:/[%p]/.test(I)?s:"",O=np[I],F=/[defgprs%]/.test(I);C=C===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function P(S){var Q=R,Z=B,ae,ce,fe;if(I==="c")Z=O(S)+Z,S="";else{S=+S;var le=S<0||1/S<0;if(S=isNaN(S)?c:O(Math.abs(S),C),E&&(S=TA(S)),le&&+S==0&&p!=="+"&&(le=!1),Q=(le?p==="("?p:a:p==="-"||p==="("?"":p)+Q,Z=(I==="s"?op[8+ep/3]:"")+Z+(le&&p==="("?")":""),F){for(ae=-1,ce=S.length;++ae<ce;)if(fe=S.charCodeAt(ae),48>fe||fe>57){Z=(fe===46?o+S.slice(ae+1):S.slice(ae))+Z,S=S.slice(0,ae);break}}}A&&!v&&(S=e(S,1/0));var Ee=Q.length+S.length+Z.length,pe=Ee<b?new Array(b-Ee+1).join(h):"";switch(A&&v&&(S=e(pe+S,pe.length?b-Z.length:1/0),pe=""),d){case"<":S=Q+S+Z+pe;break;case"=":S=Q+pe+S+Z;break;case"^":S=pe.slice(0,Ee=pe.length>>1)+Q+S+Z+pe.slice(Ee);break;default:S=pe+Q+S+Z;break}return i(S)}return P.toString=function(){return f+""},P}function u(f,h){var d=l((f=zi(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Oi(h)/3)))*3,y=Math.pow(10,-p),v=op[8+p/3];return function(b){return d(y*b)+v}}return{format:l,formatPrefix:u}}var ic,Ft,sp;_A({thousands:",",grouping:[3],currency:["$",""]});function _A(t){return ic=BA(t),Ft=ic.format,sp=ic.formatPrefix,ic}function kA(t){return Math.max(0,-Oi(Math.abs(t)))}function RA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Oi(e)/3)))*3-Oi(Math.abs(t)))}function FA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Oi(e)-Oi(t))+1}const vu=new Date,Au=new Date;function bt(t,e,n,r){function o(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(t(i=new Date(+i)),i),o.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),o.round=i=>{const s=o(i),a=o.ceil(i);return i-s<a-i?s:a},o.offset=(i,s)=>(e(i=new Date(+i),s==null?1:Math.floor(s)),i),o.range=(i,s,a)=>{const c=[];if(i=o.ceil(i),a=a==null?1:Math.floor(a),!(i<s)||!(a>0))return c;let l;do c.push(l=new Date(+i)),e(i,a),t(i);while(l<i&&i<s);return c},o.filter=i=>bt(s=>{if(s>=s)for(;t(s),!i(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!i(s););else for(;--a>=0;)for(;e(s,1),!i(s););}),n&&(o.count=(i,s)=>(vu.setTime(+i),Au.setTime(+s),t(vu),t(Au),Math.floor(n(vu,Au))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?s=>r(s)%i===0:s=>o.count(0,s)%i===0):o)),o}const Ui=bt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ui.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?bt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ui),Ui.range;const qn=1e3,sn=qn*60,jn=sn*60,Wn=jn*24,Eu=Wn*7,ap=Wn*30,Su=Wn*365,Qn=bt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*qn)},(t,e)=>(e-t)/qn,t=>t.getUTCSeconds());Qn.range;const oc=bt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*qn)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getMinutes());oc.range;const sc=bt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getUTCMinutes());sc.range;const ac=bt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*qn-t.getMinutes()*sn)},(t,e)=>{t.setTime(+t+e*jn)},(t,e)=>(e-t)/jn,t=>t.getHours());ac.range;const cc=bt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*jn)},(t,e)=>(e-t)/jn,t=>t.getUTCHours());cc.range;const pr=bt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*sn)/Wn,t=>t.getDate()-1);pr.range;const Xr=bt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Wn,t=>t.getUTCDate()-1);Xr.range;const cp=bt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Wn,t=>Math.floor(t/Wn));cp.range;function Kr(t){return bt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*sn)/Eu)}const is=Kr(0),lc=Kr(1),MA=Kr(2),PA=Kr(3),Gi=Kr(4),LA=Kr(5),NA=Kr(6);is.range,lc.range,MA.range,PA.range,Gi.range,LA.range,NA.range;function Jr(t){return bt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Eu)}const os=Jr(0),uc=Jr(1),OA=Jr(2),zA=Jr(3),Hi=Jr(4),UA=Jr(5),GA=Jr(6);os.range,uc.range,OA.range,zA.range,Hi.range,UA.range,GA.range;const ss=bt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());ss.range;const as=bt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());as.range;const Dn=bt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Dn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:bt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}),Dn.range;const Bn=bt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Bn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:bt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}),Bn.range;function lp(t,e,n,r,o,i){const s=[[Qn,1,qn],[Qn,5,5*qn],[Qn,15,15*qn],[Qn,30,30*qn],[i,1,sn],[i,5,5*sn],[i,15,15*sn],[i,30,30*sn],[o,1,jn],[o,3,3*jn],[o,6,6*jn],[o,12,12*jn],[r,1,Wn],[r,2,2*Wn],[n,1,Eu],[e,1,ap],[e,3,3*ap],[t,1,Su]];function a(l,u,f){const h=u<l;h&&([l,u]=[u,l]);const d=f&&typeof f.range=="function"?f:c(l,u,f),p=d?d.range(l,+u+1):[];return h?p.reverse():p}function c(l,u,f){const h=Math.abs(u-l)/f,d=Ni(([,,v])=>v).right(s,h);if(d===s.length)return t.every(Zr(l/Su,u/Su,f));if(d===0)return Ui.every(Math.max(Zr(l,u,f),1));const[p,y]=s[h/s[d-1][2]<s[d][2]/h?d-1:d];return p.every(y)}return[a,c]}const[HA,VA]=lp(Bn,as,os,cp,cc,sc),[qA,jA]=lp(Dn,ss,is,pr,ac,oc),cs="year",ls="quarter",us="month",fs="week",hs="date",fc="day",Cu="dayofyear",ds="hours",ps="minutes",gs="seconds",hc="milliseconds";[cs,ls,us,fs,hs,fc,Cu,ds,ps,gs,hc].reduce((t,e,n)=>(t[e]=1+n,t),{});const WA={[cs]:Dn,[ls]:ss.every(3),[us]:ss,[fs]:is,[hs]:pr,[fc]:pr,[Cu]:pr,[ds]:ac,[ps]:oc,[gs]:Qn,[hc]:Ui},QA={[cs]:Bn,[ls]:as.every(3),[us]:as,[fs]:os,[hs]:Xr,[fc]:Xr,[Cu]:Xr,[ds]:cc,[ps]:sc,[gs]:Qn,[hc]:Ui};function YA(t){return WA[t]}function ZA(t){return QA[t]}function Iu(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Tu(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ms(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function up(t){var e=t.dateTime,n=t.date,r=t.time,o=t.periods,i=t.days,s=t.shortDays,a=t.months,c=t.shortMonths,l=bs(o),u=ys(o),f=bs(i),h=ys(i),d=bs(s),p=ys(s),y=bs(a),v=ys(a),b=bs(c),A=ys(c),C={a:le,A:Ee,b:pe,B:Ce,c:null,d:mp,e:mp,f:y3,g:D3,G:_3,H:g3,I:m3,j:b3,L:bp,m:w3,M:x3,p:Ie,q:we,Q:Ep,s:Sp,S:v3,u:A3,U:E3,V:S3,w:C3,W:I3,x:null,X:null,y:T3,Y:B3,Z:k3,"%":Ap},E={a:Te,A:He,b:Le,B:j,c:null,d:wp,e:wp,f:P3,g:j3,G:Q3,H:R3,I:F3,j:M3,L:xp,m:L3,M:N3,p:q,q:re,Q:Ep,s:Sp,S:O3,u:z3,U:U3,V:G3,w:H3,W:V3,x:null,X:null,y:q3,Y:W3,Z:Y3,"%":Ap},I={a:P,A:S,b:Q,B:Z,c:ae,d:pp,e:pp,f:f3,g:dp,G:hp,H:gp,I:gp,j:a3,L:u3,m:s3,M:c3,p:F,q:o3,Q:d3,s:p3,S:l3,u:e3,U:t3,V:n3,w:$A,W:r3,x:ce,X:fe,y:dp,Y:hp,Z:i3,"%":h3};C.x=R(n,C),C.X=R(r,C),C.c=R(e,C),E.x=R(n,E),E.X=R(r,E),E.c=R(e,E);function R($,ue){return function(L){var D=[],ee=-1,oe=0,De=$.length,ye,xe,ke;for(L instanceof Date||(L=new Date(+L));++ee<De;)$.charCodeAt(ee)===37&&(D.push($.slice(oe,ee)),(xe=fp[ye=$.charAt(++ee)])!=null?ye=$.charAt(++ee):xe=ye==="e"?" ":"0",(ke=ue[ye])&&(ye=ke(L,xe)),D.push(ye),oe=ee+1);return D.push($.slice(oe,ee)),D.join("")}}function B($,ue){return function(L){var D=ms(1900,void 0,1),ee=O(D,$,L+="",0),oe,De;if(ee!=L.length)return null;if("Q"in D)return new Date(D.Q);if("s"in D)return new Date(D.s*1e3+("L"in D?D.L:0));if(ue&&!("Z"in D)&&(D.Z=0),"p"in D&&(D.H=D.H%12+D.p*12),D.m===void 0&&(D.m="q"in D?D.q:0),"V"in D){if(D.V<1||D.V>53)return null;"w"in D||(D.w=1),"Z"in D?(oe=Tu(ms(D.y,0,1)),De=oe.getUTCDay(),oe=De>4||De===0?uc.ceil(oe):uc(oe),oe=Xr.offset(oe,(D.V-1)*7),D.y=oe.getUTCFullYear(),D.m=oe.getUTCMonth(),D.d=oe.getUTCDate()+(D.w+6)%7):(oe=Iu(ms(D.y,0,1)),De=oe.getDay(),oe=De>4||De===0?lc.ceil(oe):lc(oe),oe=pr.offset(oe,(D.V-1)*7),D.y=oe.getFullYear(),D.m=oe.getMonth(),D.d=oe.getDate()+(D.w+6)%7)}else("W"in D||"U"in D)&&("w"in D||(D.w="u"in D?D.u%7:"W"in D?1:0),De="Z"in D?Tu(ms(D.y,0,1)).getUTCDay():Iu(ms(D.y,0,1)).getDay(),D.m=0,D.d="W"in D?(D.w+6)%7+D.W*7-(De+5)%7:D.w+D.U*7-(De+6)%7);return"Z"in D?(D.H+=D.Z/100|0,D.M+=D.Z%100,Tu(D)):Iu(D)}}function O($,ue,L,D){for(var ee=0,oe=ue.length,De=L.length,ye,xe;ee<oe;){if(D>=De)return-1;if(ye=ue.charCodeAt(ee++),ye===37){if(ye=ue.charAt(ee++),xe=I[ye in fp?ue.charAt(ee++):ye],!xe||(D=xe($,L,D))<0)return-1}else if(ye!=L.charCodeAt(D++))return-1}return D}function F($,ue,L){var D=l.exec(ue.slice(L));return D?($.p=u.get(D[0].toLowerCase()),L+D[0].length):-1}function P($,ue,L){var D=d.exec(ue.slice(L));return D?($.w=p.get(D[0].toLowerCase()),L+D[0].length):-1}function S($,ue,L){var D=f.exec(ue.slice(L));return D?($.w=h.get(D[0].toLowerCase()),L+D[0].length):-1}function Q($,ue,L){var D=b.exec(ue.slice(L));return D?($.m=A.get(D[0].toLowerCase()),L+D[0].length):-1}function Z($,ue,L){var D=y.exec(ue.slice(L));return D?($.m=v.get(D[0].toLowerCase()),L+D[0].length):-1}function ae($,ue,L){return O($,e,ue,L)}function ce($,ue,L){return O($,n,ue,L)}function fe($,ue,L){return O($,r,ue,L)}function le($){return s[$.getDay()]}function Ee($){return i[$.getDay()]}function pe($){return c[$.getMonth()]}function Ce($){return a[$.getMonth()]}function Ie($){return o[+($.getHours()>=12)]}function we($){return 1+~~($.getMonth()/3)}function Te($){return s[$.getUTCDay()]}function He($){return i[$.getUTCDay()]}function Le($){return c[$.getUTCMonth()]}function j($){return a[$.getUTCMonth()]}function q($){return o[+($.getUTCHours()>=12)]}function re($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var ue=R($+="",C);return ue.toString=function(){return $},ue},parse:function($){var ue=B($+="",!1);return ue.toString=function(){return $},ue},utcFormat:function($){var ue=R($+="",E);return ue.toString=function(){return $},ue},utcParse:function($){var ue=B($+="",!0);return ue.toString=function(){return $},ue}}}var fp={"-":"",_:" ",0:"0"},vt=/^\s*\d+/,XA=/^%/,KA=/[\\^$*+?|[\]().{}]/g;function je(t,e,n){var r=t<0?"-":"",o=(r?-t:t)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(e)+o:o)}function JA(t){return t.replace(KA,"\\$&")}function bs(t){return new RegExp("^(?:"+t.map(JA).join("|")+")","i")}function ys(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function $A(t,e,n){var r=vt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function e3(t,e,n){var r=vt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function t3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function n3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function r3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function hp(t,e,n){var r=vt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function dp(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function i3(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function o3(t,e,n){var r=vt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function s3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function pp(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function a3(t,e,n){var r=vt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function gp(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function c3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function l3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function u3(t,e,n){var r=vt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function f3(t,e,n){var r=vt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function h3(t,e,n){var r=XA.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function d3(t,e,n){var r=vt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function p3(t,e,n){var r=vt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function mp(t,e){return je(t.getDate(),e,2)}function g3(t,e){return je(t.getHours(),e,2)}function m3(t,e){return je(t.getHours()%12||12,e,2)}function b3(t,e){return je(1+pr.count(Dn(t),t),e,3)}function bp(t,e){return je(t.getMilliseconds(),e,3)}function y3(t,e){return bp(t,e)+"000"}function w3(t,e){return je(t.getMonth()+1,e,2)}function x3(t,e){return je(t.getMinutes(),e,2)}function v3(t,e){return je(t.getSeconds(),e,2)}function A3(t){var e=t.getDay();return e===0?7:e}function E3(t,e){return je(is.count(Dn(t)-1,t),e,2)}function yp(t){var e=t.getDay();return e>=4||e===0?Gi(t):Gi.ceil(t)}function S3(t,e){return t=yp(t),je(Gi.count(Dn(t),t)+(Dn(t).getDay()===4),e,2)}function C3(t){return t.getDay()}function I3(t,e){return je(lc.count(Dn(t)-1,t),e,2)}function T3(t,e){return je(t.getFullYear()%100,e,2)}function D3(t,e){return t=yp(t),je(t.getFullYear()%100,e,2)}function B3(t,e){return je(t.getFullYear()%1e4,e,4)}function _3(t,e){var n=t.getDay();return t=n>=4||n===0?Gi(t):Gi.ceil(t),je(t.getFullYear()%1e4,e,4)}function k3(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+je(e/60|0,"0",2)+je(e%60,"0",2)}function wp(t,e){return je(t.getUTCDate(),e,2)}function R3(t,e){return je(t.getUTCHours(),e,2)}function F3(t,e){return je(t.getUTCHours()%12||12,e,2)}function M3(t,e){return je(1+Xr.count(Bn(t),t),e,3)}function xp(t,e){return je(t.getUTCMilliseconds(),e,3)}function P3(t,e){return xp(t,e)+"000"}function L3(t,e){return je(t.getUTCMonth()+1,e,2)}function N3(t,e){return je(t.getUTCMinutes(),e,2)}function O3(t,e){return je(t.getUTCSeconds(),e,2)}function z3(t){var e=t.getUTCDay();return e===0?7:e}function U3(t,e){return je(os.count(Bn(t)-1,t),e,2)}function vp(t){var e=t.getUTCDay();return e>=4||e===0?Hi(t):Hi.ceil(t)}function G3(t,e){return t=vp(t),je(Hi.count(Bn(t),t)+(Bn(t).getUTCDay()===4),e,2)}function H3(t){return t.getUTCDay()}function V3(t,e){return je(uc.count(Bn(t)-1,t),e,2)}function q3(t,e){return je(t.getUTCFullYear()%100,e,2)}function j3(t,e){return t=vp(t),je(t.getUTCFullYear()%100,e,2)}function W3(t,e){return je(t.getUTCFullYear()%1e4,e,4)}function Q3(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Hi(t):Hi.ceil(t),je(t.getUTCFullYear()%1e4,e,4)}function Y3(){return"+0000"}function Ap(){return"%"}function Ep(t){return+t}function Sp(t){return Math.floor(+t/1e3)}var Vi,Du,Cp,Bu,Ip;Z3({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 Z3(t){return Vi=up(t),Du=Vi.format,Cp=Vi.parse,Bu=Vi.utcFormat,Ip=Vi.utcParse,Vi}function dc(t){const e={};return n=>e[n]||(e[n]=t(n))}function Tp(t,e,n){n=n||{},Rt(n)||mt(`Invalid time multi-format specifier: ${n}`);const r=e(gs),o=e(ps),i=e(ds),s=e(hs),a=e(fs),c=e(us),l=e(ls),u=e(cs),f=t(n[hc]||".%L"),h=t(n[gs]||":%S"),d=t(n[ps]||"%I:%M"),p=t(n[ds]||"%I %p"),y=t(n[hs]||n[fc]||"%a %d"),v=t(n[fs]||"%b %d"),b=t(n[us]||"%B"),A=t(n[ls]||"%B"),C=t(n[cs]||"%Y");return E=>(r(E)<E?f:o(E)<E?h:i(E)<E?d:s(E)<E?p:c(E)<E?a(E)<E?y:v:u(E)<E?l(E)<E?b:A:C)(E)}function Dp(t){const e=dc(t.format),n=dc(t.utcFormat);return{timeFormat:r=>nt(r)?e(r):Tp(e,YA,r),utcFormat:r=>nt(r)?n(r):Tp(n,ZA,r),timeParse:dc(t.parse),utcParse:dc(t.utcParse)}}let _u;X3();function X3(){return _u=Dp({format:Du,parse:Cp,utcFormat:Bu,utcParse:Ip})}function K3(t){return Dp(up(t))}function J3(t){return arguments.length?_u=K3(t):_u}const $3=t=>t!=null&&t===t,eE=t=>t==="true"||t==="false"||t===!0||t===!1,tE=t=>!Number.isNaN(Date.parse(t)),Bp=t=>!Number.isNaN(+t)&&!(t instanceof Date),nE=t=>Bp(t)&&Number.isInteger(+t),_p={boolean:Sv,integer:qo,number:qo,date:Iv,string:Tv,unknown:ja},pc=[eE,nE,Bp,tE],rE=["boolean","integer","number","date"];function iE(t,e){if(!t||!t.length)return"unknown";const n=t.length,r=pc.length,o=pc.map((i,s)=>s+1);for(let i=0,s=0,a,c;i<n;++i)for(c=e?t[i][e]:t[i],a=0;a<r;++a)if(o[a]&&$3(c)&&!pc[a](c)&&(o[a]=0,++s,s===pc.length))return"string";return rE[o.reduce((i,s)=>i===0?s:i,0)-1]}function oE(t,e){return e.reduce((n,r)=>(n[r]=iE(t,r),n),{})}function kp(t){const e=function(n,r){const o={delimiter:t};return ku(n,r?wv(r,o):o)};return e.responseType="text",e}function ku(t,e){return e.header&&(t=e.header.map(ou).join(e.delimiter)+`
|
|
24
|
+
`+t),q0(e.delimiter).parse(t+"")}ku.responseType="text";function sE(t){return typeof Buffer=="function"&&on(Buffer.isBuffer)?Buffer.isBuffer(t):!1}function Ru(t,e){const n=e&&e.property?qa(e.property):ja;return Rt(t)&&!sE(t)?aE(n(t),e):n(JSON.parse(t))}Ru.responseType="json";function aE(t,e){return!Dt(t)&&Av(t)&&(t=[...t]),e&&e.copy?JSON.parse(JSON.stringify(t)):t}const cE={interior:(t,e)=>t!==e,exterior:(t,e)=>t===e};function Rp(t,e){let n,r,o,i;return t=Ru(t,e),e&&e.feature?(n=tA,o=e.feature):e&&e.mesh?(n=rA,o=e.mesh,i=cE[e.filter]):mt("Missing TopoJSON feature or mesh parameter."),r=(r=t.objects[o])?n(t,r,i):mt("Invalid TopoJSON object: "+o),r&&r.features||[r]}Rp.responseType="json";const Fu={dsv:ku,csv:kp(","),tsv:kp(" "),json:Ru,topojson:Rp};function Mu(t,e){return arguments.length>1?(Fu[t]=e,this):Mi(Fu,t)?Fu[t]:null}function Fp(t,e,n,r){e=e||{};const o=Mu(e.type||"json");return o||mt("Unknown data format type: "+e.type),t=o(t,e),e.parse&&lE(t,e.parse,n,r),Mi(t,"columns")&&delete t.columns,t}function lE(t,e,n,r){if(!t.length)return;const o=J3();n=n||o.timeParse,r=r||o.utcParse;let i=t.columns||Object.keys(t[0]),s,a,c,l,u,f;e==="auto"&&(e=oE(t,i)),i=Object.keys(e);const h=i.map(d=>{const p=e[d];let y,v;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return y=p.split(/:(.+)?/,2),v=y[1],(v[0]==="'"&&v[v.length-1]==="'"||v[0]==='"'&&v[v.length-1]==='"')&&(v=v.slice(1,-1)),(y[0]==="utc"?r:n)(v);if(!_p[p])throw Error("Illegal format pattern: "+d+":"+p);return _p[p]});for(c=0,u=t.length,f=i.length;c<u;++c)for(s=t[c],l=0;l<f;++l)a=i[l],s[a]=h[l](s[a])}/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/const
|
|
28
|
+
*/const uE={ATTRIBUTE:1},fE=t=>(...e)=>({_$litDirective$:t,values:e});let hE=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,r){this._$Ct=e,this._$AM=n,this._$Ci=r}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}};/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2018 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
-
*/const
|
|
32
|
+
*/const Mp="important",dE=" !"+Mp,pE=fE(class extends hE{constructor(t){var e;if(super(t),t.type!==uE.ATTRIBUTE||t.name!=="style"||((e=t.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return r==null?e:e+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(t,[e]){const{style:n}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?n.removeProperty(r):n[r]=null);for(const r in e){const o=e[r];if(o!=null){this.ft.add(r);const i=typeof o=="string"&&o.endsWith(dE);r.includes("-")||i?n.setProperty(r,i?o.slice(0,-11):o,i?Mp:""):n[r]=o}}return Wr}}),gE="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",mE=`
|
|
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;
|
|
@@ -222,9 +222,9 @@
|
|
|
222
222
|
font-size: 14px;
|
|
223
223
|
padding: 10px;
|
|
224
224
|
}
|
|
225
|
-
`;function
|
|
225
|
+
`;function bE(t,e){var n=t.getBoundingClientRect();return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}function gc(t,e){return t.length==e.length&&t.every((n,r)=>t[r]===e[r])}function Wt(t){return Array.isArray(t)?t:typeof t<"u"?[t]:[]}function ws(t){return t[t.length-1]}class yE{constructor(e){this.container=e,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(e){e!=this._visible&&(this.element.style.display=e?null:"none",this._visible=e)}get visible(){return this._visible}get enabled(){return ws(this.enabledStack)??!0}pushEnabledState(e){this.enabledStack.push(e),e||(this.visible=!1)}popEnabledState(){this.enabledStack.pop()}handleMouseMove(e){this.mouseCoords=bE(this.container,e);const n=performance.now();!this.visible&&!this._isPenalty()&&n-this._previousMove>500&&(this._penaltyUntil=n+70),this._lastCoords&&wE(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 o=n+20;o>this.container.clientWidth-this.element.offsetWidth&&(o=n-20-this.element.offsetWidth),this.element.style.left=o+"px",this.element.style.top=Math.min(r+20,this.container.clientHeight-this.element.offsetHeight)+"px"}setContent(e){if(!e||!this.enabled||this._isPenalty()){this.visible&&($o("",this.element),this.visible=!1),this._previousTooltipDatum=void 0;return}$o(e,this.element),this.visible=!0,this.updatePlacement()}clear(){this._previousTooltipDatum=void 0,this.setContent(void 0)}updateWithDatum(e,n){e!==this._previousTooltipDatum&&(this._previousTooltipDatum=e,n||(n=r=>Promise.resolve(ot` ${JSON.stringify(r)} `)),n(e).then(r=>this.setContent(r)).catch(r=>{if(r!=="debounced")throw r}))}_isPenalty(){return this._penaltyUntil&&this._penaltyUntil>performance.now()}}function wE(t,e){let n=0;for(let r=0;r<t.length;r++)n+=(t[r]-e[r])**2;return Math.sqrt(n)}/* @license twgl.js 4.24.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
|
|
226
226
|
Available via the MIT license.
|
|
227
|
-
see: http://github.com/greggman/twgl.js for details */const kf=5120,Ka=5121,Bf=5122,Rf=5123,Ff=5124,Mf=5125,Pf=5126,h_=32819,d_=32820,p_=33635,g_=5131,m_=33640,b_=35899,y_=35902,w_=36269,x_=34042,em={};{const e=em;e[kf]=Int8Array,e[Ka]=Uint8Array,e[Bf]=Int16Array,e[Rf]=Uint16Array,e[Ff]=Int32Array,e[Mf]=Uint32Array,e[Pf]=Float32Array,e[h_]=Uint16Array,e[d_]=Uint16Array,e[p_]=Uint16Array,e[g_]=Uint16Array,e[m_]=Uint32Array,e[b_]=Uint32Array,e[y_]=Uint32Array,e[w_]=Uint32Array,e[x_]=Uint32Array}function Lf(e){if(e instanceof Int8Array)return kf;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)return Ka;if(e instanceof Int16Array)return Bf;if(e instanceof Uint16Array)return Rf;if(e instanceof Int32Array)return Ff;if(e instanceof Uint32Array)return Mf;if(e instanceof Float32Array)return Pf;throw new Error("unsupported typed array type")}function v_(e){if(e===Int8Array)return kf;if(e===Uint8Array||e===Uint8ClampedArray)return Ka;if(e===Int16Array)return Bf;if(e===Uint16Array)return Rf;if(e===Int32Array)return Ff;if(e===Uint32Array)return Mf;if(e===Float32Array)return Pf;throw new Error("unsupported typed array type")}function A_(e){const t=em[e];if(!t)throw new Error("unknown gl type");return t}const sl=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 E_(...e){console.error(...e)}function tm(...e){console.warn(...e)}function S_(e,t){return typeof WebGLBuffer<"u"&&t instanceof WebGLBuffer}function nm(e,t){return typeof WebGLRenderbuffer<"u"&&t instanceof WebGLRenderbuffer}function cl(e,t){return typeof WebGLTexture<"u"&&t instanceof WebGLTexture}function __(e,t){return typeof WebGLSampler<"u"&&t instanceof WebGLSampler}const rm=35044,Un=34962,C_=34963,T_=34660,I_=5120,D_=5121,k_=5122,B_=5123,R_=5124,F_=5125,M_=5126,im={attribPrefix:""};function om(e,t,n,r,i){e.bindBuffer(t,n),e.bufferData(t,r,i||rm)}function am(e,t,n,r){if(S_(e,t))return t;n=n||Un;const i=e.createBuffer();return om(e,n,i,t,r),i}function sm(e){return e==="indices"}function P_(e){return e instanceof Int8Array||e instanceof Uint8Array}function L_(e){return e===Int8Array||e===Uint8Array}function N_(e){return e.length?e:e.data}const O_=/coord|texture/i,z_=/color|colour/i;function cm(e,t){let n;if(O_.test(e)?n=2:z_.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 U_(e,t){return e.numComponents||e.size||cm(t,N_(e).length)}function Nf(e,t){if(sl(e))return e;if(sl(e.data))return e.data;Array.isArray(e)&&(e={data:e});let n=e.type;return n||(sm(t)?n=Uint16Array:n=Float32Array),new n(e.data)}function G_(e,t){const n={};return Object.keys(t).forEach(function(r){if(!sm(r)){const i=t[r],o=i.attrib||i.name||i.attribName||im.attribPrefix+r;if(i.value){if(!Array.isArray(i.value)&&!sl(i.value))throw new Error("array.value is not array or typedarray");n[o]={value:i.value}}else{let a,s,c,l;if(i.buffer&&i.buffer instanceof WebGLBuffer)a=i.buffer,l=i.numComponents||i.size,s=i.type,c=i.normalize;else if(typeof i=="number"||typeof i.data=="number"){const u=i.data||i,f=i.type||Float32Array,h=u*f.BYTES_PER_ELEMENT;s=v_(f),c=i.normalize!==void 0?i.normalize:L_(f),l=i.numComponents||i.size||cm(r,u),a=e.createBuffer(),e.bindBuffer(Un,a),e.bufferData(Un,h,i.drawType||rm)}else{const u=Nf(i,r);a=am(e,u,void 0,i.drawType),s=Lf(u),c=i.normalize!==void 0?i.normalize:P_(u),l=U_(i,r)}n[o]={buffer:a,numComponents:l,type:s,normalize:c,stride:i.stride||0,offset:i.offset||0,divisor:i.divisor===void 0?void 0:i.divisor,drawType:i.drawType}}}}),e.bindBuffer(Un,null),n}function H_(e,t,n,r){n=Nf(n),r!==void 0?(e.bindBuffer(Un,t.buffer),e.bufferSubData(Un,r,n)):om(e,Un,t.buffer,n,t.drawType)}function V_(e,t){return t===I_||t===D_?1:t===k_||t===B_?2:t===R_||t===F_||t===M_?4:0}const Of=["position","positions","a_position"];function q_(e,t){let n,r;for(r=0;r<Of.length&&(n=Of[r],!(n in t||(n=im.attribPrefix+n,n in t)));++r);r===Of.length&&(n=Object.keys(t)[0]);const i=t[n];if(!i.buffer)return 1;e.bindBuffer(Un,i.buffer);const o=e.getBufferParameter(Un,T_);e.bindBuffer(Un,null);const a=V_(e,i.type),s=o/a,c=i.numComponents||i.size,l=s/c;if(l%1!==0)throw new Error(`numComponents ${c} not correct for length ${length}`);return l}function j_(e,t,n){const r=G_(e,t),i=Object.assign({},n||{});i.attribs=Object.assign({},n?n.attribs:{},r);const o=t.indices;if(o){const a=Nf(o,"indices");i.indices=am(e,a,C_),i.numElements=a.length,i.elementType=Lf(a)}else i.numElements||(i.numElements=q_(e,i.attribs));return i}function mo(e){return!!e.texStorage2D}const zf=function(){const e={},t={};function n(r){const i=r.constructor.name;if(!e[i]){for(const o in r)if(typeof r[o]=="number"){const a=t[r[o]];t[r[o]]=a?`${a} | ${o}`:o}e[i]=!0}}return function(i,o){return n(i),t[o]||(typeof o=="number"?`0x${o.toString(16)}`:o)}}(),Ir={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},bo=sl,lm=function(){let e;return function(){return e=e||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),e}}(),Uf=6406,gn=6407,ot=6408,Gf=6409,Hf=6410,yo=6402,Vf=34041,ll=33071,W_=9728,Z_=9729,ar=3553,sr=34067,Dr=32879,kr=35866,ul=34069,Y_=34070,Q_=34071,X_=34072,K_=34073,J_=34074,qf=10241,jf=10240,fl=10242,hl=10243,um=32882,$_=33082,e4=33083,t4=33084,n4=33085,Wf=3317,fm=3314,hm=32878,dm=3316,pm=3315,gm=32877,r4=37443,i4=37441,o4=37440,a4=33321,s4=36756,c4=33325,l4=33326,u4=33330,f4=33329,h4=33338,d4=33337,p4=33340,g4=33339,m4=33323,b4=36757,y4=33327,w4=33328,x4=33336,v4=33335,A4=33332,E4=33331,S4=33334,_4=33333,C4=32849,T4=35905,I4=36194,D4=36758,k4=35898,B4=35901,R4=34843,F4=34837,M4=36221,P4=36239,L4=36215,N4=36233,O4=36209,z4=36227,U4=32856,G4=35907,H4=36759,V4=32855,q4=32854,j4=32857,W4=34842,Z4=34836,Y4=36220,Q4=36238,X4=36975,K4=36214,J4=36232,$4=36226,eC=36208,tC=33189,nC=33190,rC=36012,iC=36013,oC=35056,Br=5120,lt=5121,dl=5122,wo=5123,pl=5124,yi=5125,Ot=5126,mm=32819,bm=32820,ym=33635,In=5131,Ja=36193,Zf=33640,aC=35899,sC=35902,cC=36269,lC=34042,$a=33319,wi=33320,es=6403,xi=36244,vi=36248,Rr=36249,uC={};{const e=uC;e[Uf]={numColorComponents:1},e[Gf]={numColorComponents:1},e[Hf]={numColorComponents:2},e[gn]={numColorComponents:3},e[ot]={numColorComponents:4},e[es]={numColorComponents:1},e[xi]={numColorComponents:1},e[$a]={numColorComponents:2},e[wi]={numColorComponents:2},e[gn]={numColorComponents:3},e[vi]={numColorComponents:3},e[ot]={numColorComponents:4},e[Rr]={numColorComponents:4},e[yo]={numColorComponents:1},e[Vf]={numColorComponents:2}}let Yf;function gl(e){if(!Yf){const t={};t[Uf]={textureFormat:Uf,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[lt,In,Ja,Ot]},t[Gf]={textureFormat:Gf,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[lt,In,Ja,Ot]},t[Hf]={textureFormat:Hf,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[lt,In,Ja,Ot]},t[gn]={textureFormat:gn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[lt,In,Ja,Ot,ym]},t[ot]={textureFormat:ot,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[lt,In,Ja,Ot,mm,bm]},t[yo]={textureFormat:yo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[yi,wo]},t[a4]={textureFormat:es,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[lt]},t[s4]={textureFormat:es,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[Br]},t[c4]={textureFormat:es,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Ot,In]},t[l4]={textureFormat:es,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Ot]},t[u4]={textureFormat:xi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[lt]},t[f4]={textureFormat:xi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[Br]},t[A4]={textureFormat:xi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[wo]},t[E4]={textureFormat:xi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[dl]},t[S4]={textureFormat:xi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[yi]},t[_4]={textureFormat:xi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[pl]},t[m4]={textureFormat:$a,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[lt]},t[b4]={textureFormat:$a,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[Br]},t[y4]={textureFormat:$a,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Ot,In]},t[w4]={textureFormat:$a,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Ot]},t[x4]={textureFormat:wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[lt]},t[v4]={textureFormat:wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Br]},t[h4]={textureFormat:wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[wo]},t[d4]={textureFormat:wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[dl]},t[p4]={textureFormat:wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[yi]},t[g4]={textureFormat:wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[pl]},t[C4]={textureFormat:gn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[lt]},t[T4]={textureFormat:gn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[lt]},t[I4]={textureFormat:gn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[lt,ym]},t[D4]={textureFormat:gn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[Br]},t[k4]={textureFormat:gn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Ot,In,aC]},t[B4]={textureFormat:gn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Ot,In,sC]},t[R4]={textureFormat:gn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Ot,In]},t[F4]={textureFormat:gn,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Ot]},t[M4]={textureFormat:vi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[lt]},t[P4]={textureFormat:vi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[Br]},t[L4]={textureFormat:vi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[wo]},t[N4]={textureFormat:vi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[dl]},t[O4]={textureFormat:vi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[yi]},t[z4]={textureFormat:vi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[pl]},t[U4]={textureFormat:ot,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[lt]},t[G4]={textureFormat:ot,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[lt]},t[H4]={textureFormat:ot,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[Br]},t[V4]={textureFormat:ot,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[lt,bm,Zf]},t[q4]={textureFormat:ot,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[lt,mm]},t[j4]={textureFormat:ot,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Zf]},t[W4]={textureFormat:ot,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Ot,In]},t[Z4]={textureFormat:ot,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Ot]},t[Y4]={textureFormat:Rr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[lt]},t[Q4]={textureFormat:Rr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Br]},t[X4]={textureFormat:Rr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Zf]},t[K4]={textureFormat:Rr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[wo]},t[J4]={textureFormat:Rr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[dl]},t[$4]={textureFormat:Rr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[pl]},t[eC]={textureFormat:Rr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[yi]},t[tC]={textureFormat:yo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[wo,yi]},t[nC]={textureFormat:yo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[yi]},t[rC]={textureFormat:yo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ot]},t[oC]={textureFormat:Vf,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[lC]},t[iC]={textureFormat:Vf,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[cC]},Object.keys(t).forEach(function(n){const r=t[n];r.bytesPerElementMap={},r.bytesPerElement.forEach(function(i,o){const a=r.type[o];r.bytesPerElementMap[a]=i})}),Yf=t}return Yf[e]}function fC(e,t){const n=gl(e);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[t];if(r===void 0)throw"unknown internal format";return r}function xo(e){const t=gl(e);if(!t)throw"unknown internal format";return{format:t.textureFormat,type:t.type[0]}}function wm(e){return(e&e-1)===0}function hC(e,t,n,r){if(!mo(e))return wm(t)&&wm(n);const i=gl(r);if(!i)throw"unknown internal format";return i.colorRenderable&&i.textureFilterable}function dC(e){const t=gl(e);if(!t)throw"unknown internal format";return t.textureFilterable}function xm(e,t,n){return bo(t)?Lf(t):n||lt}function ml(e,t,n,r,i){if(i%1!==0)throw"can't guess dimensions";if(!n&&!r){const o=Math.sqrt(i/(t===sr?6:1));o%1===0?(n=o,r=o):(n=i,r=1)}else if(r){if(!n&&(n=i/r,n%1))throw"can't guess dimensions"}else if(r=i/n,r%1)throw"can't guess dimensions";return{width:n,height:r}}function vo(e,t){t.colorspaceConversion!==void 0&&e.pixelStorei(r4,t.colorspaceConversion),t.premultiplyAlpha!==void 0&&e.pixelStorei(i4,t.premultiplyAlpha),t.flipY!==void 0&&e.pixelStorei(o4,t.flipY)}function vm(e){e.pixelStorei(Wf,4),mo(e)&&(e.pixelStorei(fm,0),e.pixelStorei(hm,0),e.pixelStorei(dm,0),e.pixelStorei(pm,0),e.pixelStorei(gm,0))}function pC(e,t,n,r){r.minMag&&(n.call(e,t,qf,r.minMag),n.call(e,t,jf,r.minMag)),r.min&&n.call(e,t,qf,r.min),r.mag&&n.call(e,t,jf,r.mag),r.wrap&&(n.call(e,t,fl,r.wrap),n.call(e,t,hl,r.wrap),(t===Dr||__(e,t))&&n.call(e,t,um,r.wrap)),r.wrapR&&n.call(e,t,um,r.wrapR),r.wrapS&&n.call(e,t,fl,r.wrapS),r.wrapT&&n.call(e,t,hl,r.wrapT),r.minLod&&n.call(e,t,$_,r.minLod),r.maxLod&&n.call(e,t,e4,r.maxLod),r.baseLevel&&n.call(e,t,t4,r.baseLevel),r.maxLevel&&n.call(e,t,n4,r.maxLevel)}function Am(e,t,n){const r=n.target||ar;e.bindTexture(r,t),pC(e,r,e.texParameteri,n)}function gC(e){return e=e||Ir.textureColor,bo(e)?e:new Uint8Array([e[0]*255,e[1]*255,e[2]*255,e[3]*255])}function Qf(e,t,n,r,i,o){n=n||Ir.textureOptions,o=o||ot;const a=n.target||ar;if(r=r||n.width,i=i||n.height,e.bindTexture(a,t),hC(e,r,i,o))e.generateMipmap(a);else{const s=dC(o)?Z_:W_;e.texParameteri(a,qf,s),e.texParameteri(a,jf,s),e.texParameteri(a,fl,ll),e.texParameteri(a,hl,ll)}}function ts(e){return e.auto===!0||e.auto===void 0&&e.level===void 0}function Xf(e,t){return t=t||{},t.cubeFaceOrder||[ul,Y_,Q_,X_,K_,J_]}function Kf(e,t){const r=Xf(e,t).map(function(i,o){return{face:i,ndx:o}});return r.sort(function(i,o){return i.face-o.face}),r}function Em(e,t,n,r){r=r||Ir.textureOptions;const i=r.target||ar,o=r.level||0;let a=n.width,s=n.height;const c=r.internalFormat||r.format||ot,l=xo(c),u=r.format||l.format,f=r.type||l.type;if(vo(e,r),e.bindTexture(i,t),i===sr){const h=n.width,d=n.height;let p,b;if(h/6===d)p=d,b=[0,0,1,0,2,0,3,0,4,0,5,0];else if(d/6===h)p=h,b=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===d/2)p=h/3,b=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===d/3)p=h/2,b=[0,0,1,0,0,1,1,1,0,2,1,2];else throw"can't figure out cube map from element: "+(n.src?n.src:n.nodeName);const v=lm();v?(v.canvas.width=p,v.canvas.height=p,a=p,s=p,Kf(e,r).forEach(function(y){const A=b[y.ndx*2+0]*p,_=b[y.ndx*2+1]*p;v.drawImage(n,A,_,p,p,0,0,p,p),e.texImage2D(y.face,o,c,u,f,v.canvas)}),v.canvas.width=1,v.canvas.height=1):typeof createImageBitmap<"u"&&(a=p,s=p,Kf(e,r).forEach(function(y){const A=b[y.ndx*2+0]*p,_=b[y.ndx*2+1]*p;e.texImage2D(y.face,o,c,p,p,0,u,f,null),createImageBitmap(n,A,_,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(E){vo(e,r),e.bindTexture(i,t),e.texImage2D(y.face,o,c,u,f,E),ts(r)&&Qf(e,t,r,a,s,c)})}))}else if(i===Dr||i===kr){const h=Math.min(n.width,n.height),d=Math.max(n.width,n.height),p=d/h;if(p%1!==0)throw"can not compute 3D dimensions of element";const b=n.width===d?1:0,v=n.height===d?1:0;e.pixelStorei(Wf,1),e.pixelStorei(fm,n.width),e.pixelStorei(hm,0),e.pixelStorei(gm,0),e.texImage3D(i,o,c,h,h,h,0,u,f,null);for(let y=0;y<p;++y){const A=y*h*b,_=y*h*v;e.pixelStorei(dm,A),e.pixelStorei(pm,_),e.texSubImage3D(i,o,0,0,y,h,h,1,u,f,n)}vm(e)}else e.texImage2D(i,o,c,u,f,n);ts(r)&&Qf(e,t,r,a,s,c),Am(e,t,r)}function ns(){}function mC(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 bC(e,t){return t===void 0&&!mC(e)?"anonymous":t}function yC(e,t,n){n=n||ns;let r;if(t=t!==void 0?t:Ir.crossOrigin,t=bC(e,t),typeof Image<"u"){r=new Image,t!==void 0&&(r.crossOrigin=t);const i=function(){r.removeEventListener("error",o),r.removeEventListener("load",a),r=null},o=function(){const c="couldn't load image: "+e;E_(c),n(c,r),i()},a=function(){n(null,r),i()};return r.addEventListener("error",o),r.addEventListener("load",a),r.src=e,r}else if(typeof ImageBitmap<"u"){let i,o;const a=function(){n(i,o)},s={};t&&(s.mode="cors"),fetch(e,s).then(function(c){if(!c.ok)throw c;return c.blob()}).then(function(c){return createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(c){o=c,setTimeout(a)}).catch(function(c){i=c,setTimeout(a)}),r=null}return r}function Sm(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof ImageData<"u"&&e instanceof ImageData||typeof HTMLElement<"u"&&e instanceof HTMLElement}function Jf(e,t,n){return Sm(e)?(setTimeout(function(){n(null,e)}),e):yC(e,t,n)}function $f(e,t,n){n=n||Ir.textureOptions;const r=n.target||ar;if(e.bindTexture(r,t),n.color===!1)return;const i=gC(n.color);if(r===sr)for(let o=0;o<6;++o)e.texImage2D(ul+o,0,ot,1,1,0,ot,lt,i);else r===Dr||r===kr?e.texImage3D(r,0,ot,1,1,1,0,ot,lt,i):e.texImage2D(r,0,ot,1,1,0,ot,lt,i)}function wC(e,t,n,r){return r=r||ns,n=n||Ir.textureOptions,$f(e,t,n),n=Object.assign({},n),Jf(n.src,n.crossOrigin,function(o,a){o?r(o,t,a):(Em(e,t,a,n),r(null,t,a))})}function xC(e,t,n,r){r=r||ns;const i=n.src;if(i.length!==6)throw"there must be 6 urls for a cubemap";const o=n.level||0,a=n.internalFormat||n.format||ot,s=xo(a),c=n.format||s.format,l=n.type||lt,u=n.target||ar;if(u!==sr)throw"target must be TEXTURE_CUBE_MAP";$f(e,t,n),n=Object.assign({},n);let f=6;const h=[],d=Xf(e,n);let p;function b(v){return function(y,A){--f,y?h.push(y):A.width!==A.height?h.push("cubemap face img is not a square: "+A.src):(vo(e,n),e.bindTexture(u,t),f===5?Xf().forEach(function(_){e.texImage2D(_,o,a,c,l,A)}):e.texImage2D(v,o,a,c,l,A),ts(n)&&e.generateMipmap(u)),f===0&&r(h.length?h:void 0,t,p)}}p=i.map(function(v,y){return Jf(v,n.crossOrigin,b(d[y]))})}function vC(e,t,n,r){r=r||ns;const i=n.src,o=n.internalFormat||n.format||ot,a=xo(o),s=n.format||a.format,c=n.type||lt,l=n.target||kr;if(l!==Dr&&l!==kr)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";$f(e,t,n),n=Object.assign({},n);let u=i.length;const f=[];let h;const d=n.level||0;let p=n.width,b=n.height;const v=i.length;let y=!0;function A(_){return function(E,C){if(--u,E)f.push(E);else{if(vo(e,n),e.bindTexture(l,t),y){y=!1,p=n.width||C.width,b=n.height||C.height,e.texImage3D(l,d,o,p,b,v,0,s,c,null);for(let R=0;R<v;++R)e.texSubImage3D(l,d,0,0,R,p,b,1,s,c,C)}else{let R=C,D;(C.width!==p||C.height!==b)&&(D=lm(),R=D.canvas,D.canvas.width=p,D.canvas.height=b,D.drawImage(C,0,0,p,b)),e.texSubImage3D(l,d,0,0,_,p,b,1,s,c,R),D&&R===D.canvas&&(D.canvas.width=0,D.canvas.height=0)}ts(n)&&e.generateMipmap(l)}u===0&&r(f.length?f:void 0,t,h)}}h=i.map(function(_,E){return Jf(_,n.crossOrigin,A(E))})}function _m(e,t,n,r){r=r||Ir.textureOptions;const i=r.target||ar;e.bindTexture(i,t);let o=r.width,a=r.height,s=r.depth;const c=r.level||0,l=r.internalFormat||r.format||ot,u=xo(l),f=r.format||u.format,h=r.type||xm(e,n,u.type);if(bo(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const v=A_(h);n=new v(n)}const d=fC(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+zf(e,f);let b;if(i===Dr||i===kr)if(!o&&!a&&!s){const v=Math.cbrt(p);if(v%1!==0)throw"can't guess cube size of array of numElements: "+p;o=v,a=v,s=v}else o&&(!a||!s)?(b=ml(e,i,a,s,p/o),a=b.width,s=b.height):a&&(!o||!s)?(b=ml(e,i,o,s,p/a),o=b.width,s=b.height):(b=ml(e,i,o,a,p/s),o=b.width,a=b.height);else b=ml(e,i,o,a,p),o=b.width,a=b.height;if(vm(e),e.pixelStorei(Wf,r.unpackAlignment||1),vo(e,r),i===sr){const v=d/n.BYTES_PER_ELEMENT,y=p/6*v;Kf(e,r).forEach(A=>{const _=y*A.ndx,E=n.subarray(_,_+y);e.texImage2D(A.face,c,l,o,a,0,f,h,E)})}else i===Dr||i===kr?e.texImage3D(i,c,l,o,a,s,0,f,h,n):e.texImage2D(i,c,l,o,a,0,f,h,n);return{width:o,height:a,depth:s,type:h}}function AC(e,t,n){const r=n.target||ar;e.bindTexture(r,t);const i=n.level||0,o=n.internalFormat||n.format||ot,a=xo(o),s=n.format||a.format,c=n.type||a.type;if(vo(e,n),r===sr)for(let l=0;l<6;++l)e.texImage2D(ul+l,i,o,n.width,n.height,0,s,c,null);else r===Dr||r===kr?e.texImage3D(r,i,o,n.width,n.height,n.depth,0,s,c,null):e.texImage2D(r,i,o,n.width,n.height,0,s,c,null)}function rs(e,t,n){n=n||ns,t=t||Ir.textureOptions;const r=e.createTexture(),i=t.target||ar;let o=t.width||1,a=t.height||1;const s=t.internalFormat||ot;e.bindTexture(i,r),i===sr&&(e.texParameteri(i,fl,ll),e.texParameteri(i,hl,ll));let c=t.src;if(c)if(typeof c=="function"&&(c=c(e,t)),typeof c=="string")wC(e,r,t,n);else if(bo(c)||Array.isArray(c)&&(typeof c[0]=="number"||Array.isArray(c[0])||bo(c[0]))){const l=_m(e,r,c,t);o=l.width,a=l.height}else Array.isArray(c)&&(typeof c[0]=="string"||Sm(c[0]))?i===sr?xC(e,r,t,n):vC(e,r,t,n):(Em(e,r,c,t),o=c.width,a=c.height);else AC(e,r,t);return ts(t)&&Qf(e,r,t,o,a,s),Am(e,r,t),r}function EC(e,t,n,r,i,o){r=r||n.width,i=i||n.height,o=o||n.depth;const a=n.target||ar;e.bindTexture(a,t);const s=n.level||0,c=n.internalFormat||n.format||ot,l=xo(c),u=n.format||l.format;let f;const h=n.src;if(h&&(bo(h)||Array.isArray(h)&&typeof h[0]=="number")?f=n.type||xm(e,h,l.type):f=n.type||l.type,a===sr)for(let d=0;d<6;++d)e.texImage2D(ul+d,s,c,r,i,0,u,f,null);else a===Dr||a===kr?e.texImage3D(a,s,c,r,i,o,0,u,f,null):e.texImage2D(a,s,c,r,i,0,u,f,null)}const SC=tm,bl=33984,_C=35048,yl=34962,CC=34963,eh=35345,Cm=35718,TC=35721,IC=35971,DC=35382,kC=35396,BC=35398,RC=35392,FC=35395,wl=5126,Tm=35664,Im=35665,Dm=35666,th=5124,km=35667,Bm=35668,Rm=35669,Fm=35670,Mm=35671,Pm=35672,Lm=35673,Nm=35674,Om=35675,zm=35676,MC=35678,PC=35680,LC=35679,NC=35682,OC=35685,zC=35686,UC=35687,GC=35688,HC=35689,VC=35690,qC=36289,jC=36292,WC=36293,nh=5125,Um=36294,Gm=36295,Hm=36296,ZC=36298,YC=36299,QC=36300,XC=36303,KC=36306,JC=36307,$C=36308,e6=36311,xl=3553,vl=34067,rh=32879,Al=35866,Oe={};function Vm(e,t){return Oe[t].bindPoint}function t6(e,t){return function(n){e.uniform1f(t,n)}}function n6(e,t){return function(n){e.uniform1fv(t,n)}}function r6(e,t){return function(n){e.uniform2fv(t,n)}}function i6(e,t){return function(n){e.uniform3fv(t,n)}}function o6(e,t){return function(n){e.uniform4fv(t,n)}}function qm(e,t){return function(n){e.uniform1i(t,n)}}function jm(e,t){return function(n){e.uniform1iv(t,n)}}function Wm(e,t){return function(n){e.uniform2iv(t,n)}}function Zm(e,t){return function(n){e.uniform3iv(t,n)}}function Ym(e,t){return function(n){e.uniform4iv(t,n)}}function a6(e,t){return function(n){e.uniform1ui(t,n)}}function s6(e,t){return function(n){e.uniform1uiv(t,n)}}function c6(e,t){return function(n){e.uniform2uiv(t,n)}}function l6(e,t){return function(n){e.uniform3uiv(t,n)}}function u6(e,t){return function(n){e.uniform4uiv(t,n)}}function f6(e,t){return function(n){e.uniformMatrix2fv(t,!1,n)}}function h6(e,t){return function(n){e.uniformMatrix3fv(t,!1,n)}}function d6(e,t){return function(n){e.uniformMatrix4fv(t,!1,n)}}function p6(e,t){return function(n){e.uniformMatrix2x3fv(t,!1,n)}}function g6(e,t){return function(n){e.uniformMatrix3x2fv(t,!1,n)}}function m6(e,t){return function(n){e.uniformMatrix2x4fv(t,!1,n)}}function b6(e,t){return function(n){e.uniformMatrix4x2fv(t,!1,n)}}function y6(e,t){return function(n){e.uniformMatrix3x4fv(t,!1,n)}}function w6(e,t){return function(n){e.uniformMatrix4x3fv(t,!1,n)}}function Wt(e,t,n,r){const i=Vm(e,t);return mo(e)?function(o){let a,s;cl(e,o)?(a=o,s=null):(a=o.texture,s=o.sampler),e.uniform1i(r,n),e.activeTexture(bl+n),e.bindTexture(i,a),e.bindSampler(n,s)}:function(o){e.uniform1i(r,n),e.activeTexture(bl+n),e.bindTexture(i,o)}}function Zt(e,t,n,r,i){const o=Vm(e,t),a=new Int32Array(i);for(let s=0;s<i;++s)a[s]=n+s;return mo(e)?function(s){e.uniform1iv(r,a),s.forEach(function(c,l){e.activeTexture(bl+a[l]);let u,f;cl(e,c)?(u=c,f=null):(u=c.texture,f=c.sampler),e.bindSampler(n,f),e.bindTexture(o,u)})}:function(s){e.uniform1iv(r,a),s.forEach(function(c,l){e.activeTexture(bl+a[l]),e.bindTexture(o,c)})}}Oe[wl]={Type:Float32Array,size:4,setter:t6,arraySetter:n6},Oe[Tm]={Type:Float32Array,size:8,setter:r6,cols:2},Oe[Im]={Type:Float32Array,size:12,setter:i6,cols:3},Oe[Dm]={Type:Float32Array,size:16,setter:o6,cols:4},Oe[th]={Type:Int32Array,size:4,setter:qm,arraySetter:jm},Oe[km]={Type:Int32Array,size:8,setter:Wm,cols:2},Oe[Bm]={Type:Int32Array,size:12,setter:Zm,cols:3},Oe[Rm]={Type:Int32Array,size:16,setter:Ym,cols:4},Oe[nh]={Type:Uint32Array,size:4,setter:a6,arraySetter:s6},Oe[Um]={Type:Uint32Array,size:8,setter:c6,cols:2},Oe[Gm]={Type:Uint32Array,size:12,setter:l6,cols:3},Oe[Hm]={Type:Uint32Array,size:16,setter:u6,cols:4},Oe[Fm]={Type:Uint32Array,size:4,setter:qm,arraySetter:jm},Oe[Mm]={Type:Uint32Array,size:8,setter:Wm,cols:2},Oe[Pm]={Type:Uint32Array,size:12,setter:Zm,cols:3},Oe[Lm]={Type:Uint32Array,size:16,setter:Ym,cols:4},Oe[Nm]={Type:Float32Array,size:32,setter:f6,rows:2,cols:2},Oe[Om]={Type:Float32Array,size:48,setter:h6,rows:3,cols:3},Oe[zm]={Type:Float32Array,size:64,setter:d6,rows:4,cols:4},Oe[OC]={Type:Float32Array,size:32,setter:p6,rows:2,cols:3},Oe[zC]={Type:Float32Array,size:32,setter:m6,rows:2,cols:4},Oe[UC]={Type:Float32Array,size:48,setter:g6,rows:3,cols:2},Oe[GC]={Type:Float32Array,size:48,setter:y6,rows:3,cols:4},Oe[HC]={Type:Float32Array,size:64,setter:b6,rows:4,cols:2},Oe[VC]={Type:Float32Array,size:64,setter:w6,rows:4,cols:3},Oe[MC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:xl},Oe[PC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:vl},Oe[LC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:rh},Oe[NC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:xl},Oe[qC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:Al},Oe[jC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:Al},Oe[WC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:vl},Oe[ZC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:xl},Oe[YC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:rh},Oe[QC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:vl},Oe[XC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:Al},Oe[KC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:xl},Oe[JC]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:rh},Oe[$C]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:vl},Oe[e6]={Type:null,size:0,setter:Wt,arraySetter:Zt,bindPoint:Al};function El(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(yl,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribPointer(t,n.numComponents||n.size,n.type||wl,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Fr(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(yl,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||th,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Sl(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(yl,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||nh,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function ih(e,t,n){const r=n.size,i=n.count;return function(o){e.bindBuffer(yl,o.buffer);const a=o.size||o.numComponents||r,s=a/i,c=o.type||wl,u=Oe[c].size*a,f=o.normalize||!1,h=o.offset||0,d=u/i;for(let p=0;p<i;++p)e.enableVertexAttribArray(t+p),e.vertexAttribPointer(t+p,s,c,f,u,h+d*p),o.divisor!==void 0&&e.vertexAttribDivisor(t+p,o.divisor)}}const bt={};bt[wl]={size:4,setter:El},bt[Tm]={size:8,setter:El},bt[Im]={size:12,setter:El},bt[Dm]={size:16,setter:El},bt[th]={size:4,setter:Fr},bt[km]={size:8,setter:Fr},bt[Bm]={size:12,setter:Fr},bt[Rm]={size:16,setter:Fr},bt[nh]={size:4,setter:Sl},bt[Um]={size:8,setter:Sl},bt[Gm]={size:12,setter:Sl},bt[Hm]={size:16,setter:Sl},bt[Fm]={size:4,setter:Fr},bt[Mm]={size:8,setter:Fr},bt[Pm]={size:12,setter:Fr},bt[Lm]={size:16,setter:Fr},bt[Nm]={size:4,setter:ih,count:2},bt[Om]={size:9,setter:ih,count:3},bt[zm]={size:16,setter:ih,count:4};function Qm(e){const t=e.name;return t.startsWith("gl_")||t.startsWith("webgl_")}const x6=/(\.|\[|]|\w+)/g,v6=e=>e>="0"&&e<="9";function Xm(e,t,n,r){const i=e.split(x6).filter(s=>s!=="");let o=0,a="";for(;;){const s=i[o++];a+=s;const c=v6(s[0]),l=c?parseInt(s):s;if(c&&(a+=i[o++]),o===i.length){n[l]=t;break}else{const f=i[o++],h=f==="[",d=n[l]||(h?[]:{});n[l]=d,n=d,r[a]=r[a]||function(p){return function(b){t1(p,b)}}(d),a+=f}}}function A6(e,t){let n=0;function r(s,c,l){const u=c.name.endsWith("[0]"),f=c.type,h=Oe[f];if(!h)throw new Error(`unknown type: 0x${f.toString(16)}`);let d;if(h.bindPoint){const p=n;n+=c.size,u?d=h.arraySetter(e,f,p,l,c.size):d=h.setter(e,f,p,l,c.size)}else h.arraySetter&&u?d=h.arraySetter(e,l):d=h.setter(e,l);return d.location=l,d}const i={},o={},a=e.getProgramParameter(t,Cm);for(let s=0;s<a;++s){const c=e.getActiveUniform(t,s);if(Qm(c))continue;let l=c.name;l.endsWith("[0]")&&(l=l.substr(0,l.length-3));const u=e.getUniformLocation(t,c.name);if(u){const f=r(t,c,u);i[l]=f,Xm(l,f,o,i)}}return i}function E6(e,t){const n={},r=e.getProgramParameter(t,IC);for(let i=0;i<r;++i){const o=e.getTransformFeedbackVarying(t,i);n[o.name]={index:i,type:o.type,size:o.size}}return n}function S6(e,t){const n=e.getProgramParameter(t,Cm),r=[],i=[];for(let s=0;s<n;++s){i.push(s),r.push({});const c=e.getActiveUniform(t,s);r[s].name=c.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(s){const c=s[0],l=s[1];e.getActiveUniforms(t,i,e[c]).forEach(function(u,f){r[f][l]=u})});const o={},a=e.getProgramParameter(t,DC);for(let s=0;s<a;++s){const c=e.getActiveUniformBlockName(t,s),l={index:e.getUniformBlockIndex(t,c),usedByVertexShader:e.getActiveUniformBlockParameter(t,s,kC),usedByFragmentShader:e.getActiveUniformBlockParameter(t,s,BC),size:e.getActiveUniformBlockParameter(t,s,RC),uniformIndices:e.getActiveUniformBlockParameter(t,s,FC)};l.used=l.usedByVertexShader||l.usedByFragmentShader,o[c]=l}return{blockSpecs:o,uniformData:r}}const Km=/\[\d+\]\.$/,_6=(e,t)=>((e+(t-1))/t|0)*t;function C6(e,t,n,r){if(t||n){r=r||1;const o=e.length/4;return function(a){let s=0,c=0;for(let l=0;l<o;++l){for(let u=0;u<r;++u)e[s++]=a[c++];s+=4-r}}}else return function(i){i.length?e.set(i):e[0]=i}}function T6(e,t,n,r){const i=n.blockSpecs,o=n.uniformData,a=i[r];if(!a)return SC("no uniform block object named:",r),{name:r,uniforms:{}};const s=new ArrayBuffer(a.size),c=e.createBuffer(),l=a.index;e.bindBuffer(eh,c),e.uniformBlockBinding(t,a.index,l);let u=r+".";Km.test(u)&&(u=u.replace(Km,"."));const f={},h={},d={};return a.uniformIndices.forEach(function(p){const b=o[p];let v=b.name;v.startsWith(u)&&(v=v.substr(u.length));const y=v.endsWith("[0]");y&&(v=v.substr(0,v.length-3));const A=Oe[b.type],_=A.Type,E=y?_6(A.size,16)*b.size:A.size*b.size,C=new _(s,b.offset,E/_.BYTES_PER_ELEMENT);f[v]=C;const R=C6(C,y,A.rows,A.cols);h[v]=R,Xm(v,R,d,h)}),{name:r,array:s,asFloat:new Float32Array(s),buffer:c,uniforms:f,setters:h}}function Jm(e,t,n){return T6(e,t.program,t.uniformBlockSpec,n)}function $m(e,t,n){const i=(t.uniformBlockSpec||t).blockSpecs[n.name];if(i){const o=i.index;return e.bindBufferRange(eh,o,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function e1(e,t,n){$m(e,t,n)&&e.bufferData(eh,n.array,_C)}function is(e,t){const n=e.setters;for(const r in t){const i=n[r];if(i){const o=t[r];i(o)}}}function t1(e,t){for(const n in t){const r=e[n];typeof r=="function"?r(t[n]):t1(e[n],t[n])}}function Ai(e,...t){const n=e.uniformSetters||e,r=t.length;for(let i=0;i<r;++i){const o=t[i];if(Array.isArray(o)){const a=o.length;for(let s=0;s<a;++s)Ai(n,o[s])}else for(const a in o){const s=n[a];s&&s(o[a])}}}function I6(e,t){const n={},r=e.getProgramParameter(t,TC);for(let i=0;i<r;++i){const o=e.getActiveAttrib(t,i);if(Qm(o))continue;const a=e.getAttribLocation(t,o.name),s=bt[o.type],c=s.setter(e,a,s);c.location=a,n[o.name]=c}return n}function D6(e,t){for(const n in t){const r=e[n];r&&r(t[n])}}function Ei(e,t,n){n.vertexArrayObject?e.bindVertexArray(n.vertexArrayObject):(D6(t.attribSetters||t,n.attribs),n.indices&&e.bindBuffer(CC,n.indices))}function k6(e,t){const n=A6(e,t),r=I6(e,t),i={program:t,uniformSetters:n,attribSetters:r};return mo(e)&&(i.uniformBlockSpec=S6(e,t),i.transformFeedbackInfo=E6(e,t)),i}const B6=4,n1=5123;function _l(e,t,n,r,i,o){n=n===void 0?B6:n;const a=t.indices,s=t.elementType,c=r===void 0?t.numElements:r;i=i===void 0?0:i,s||a?o!==void 0?e.drawElementsInstanced(n,c,s===void 0?n1:t.elementType,i,o):e.drawElements(n,c,s===void 0?n1:t.elementType,i):o!==void 0?e.drawArraysInstanced(n,i,c,o):e.drawArrays(n,i,c)}const R6=36160,Si=36161,F6=3553,M6=5121,P6=6402,L6=6408,N6=33190,O6=36012,z6=35056,U6=36013,G6=32854,H6=32855,V6=36194,r1=33189,i1=6401,o1=36168,oh=34041,ah=36064,Cl=36096,a1=36128,sh=33306,ch=33071,lh=9729,s1=[{format:L6,type:M6,min:lh,wrap:ch},{format:oh}],Dn={};Dn[oh]=sh,Dn[i1]=a1,Dn[o1]=a1,Dn[P6]=Cl,Dn[r1]=Cl,Dn[N6]=Cl,Dn[O6]=Cl,Dn[z6]=sh,Dn[U6]=sh;function q6(e,t){return Dn[e]||Dn[t]}const Mr={};Mr[G6]=!0,Mr[H6]=!0,Mr[V6]=!0,Mr[oh]=!0,Mr[r1]=!0,Mr[i1]=!0,Mr[o1]=!0;function j6(e){return Mr[e]}const W6=32;function Z6(e){return e>=ah&&e<ah+W6}function Y6(e,t,n,r){const i=R6,o=e.createFramebuffer();e.bindFramebuffer(i,o),n=n||e.drawingBufferWidth,r=r||e.drawingBufferHeight,t=t||s1;const a=[],s={framebuffer:o,attachments:[],width:n,height:r};return t.forEach(function(c,l){let u=c.attachment;const f=c.samples,h=c.format;let d=c.attachmentPoint||q6(h,c.internalFormat);if(d||(d=ah+l),Z6(d)&&a.push(d),!u)if(f!==void 0||j6(h))u=e.createRenderbuffer(),e.bindRenderbuffer(Si,u),f>1?e.renderbufferStorageMultisample(Si,f,h,n,r):e.renderbufferStorage(Si,h,n,r);else{const p=Object.assign({},c);p.width=n,p.height=r,p.auto===void 0&&(p.auto=!1,p.min=p.min||p.minMag||lh,p.mag=p.mag||p.minMag||lh,p.wrapS=p.wrapS||p.wrap||ch,p.wrapT=p.wrapT||p.wrap||ch),u=rs(e,p)}if(nm(e,u))e.framebufferRenderbuffer(i,d,Si,u);else if(cl(e,u))c.layer!==void 0?e.framebufferTextureLayer(i,d,u,c.level||0,c.layer):e.framebufferTexture2D(i,d,c.target||F6,u,c.level||0);else throw new Error("unknown attachment type");s.attachments.push(u)}),e.drawBuffers&&e.drawBuffers(a),s}function Q6(e,t,n,r,i){r=r||e.drawingBufferWidth,i=i||e.drawingBufferHeight,t.width=r,t.height=i,n=n||s1,n.forEach(function(o,a){const s=t.attachments[a],c=o.format,l=o.samples;if(l!==void 0||nm(e,s))e.bindRenderbuffer(Si,s),l>1?e.renderbufferStorageMultisample(Si,l,c,r,i):e.renderbufferStorage(Si,c,r,i);else if(cl(e,s))EC(e,s,o,r,i);else throw new Error("unknown attachment type")})}function X6(e,t,n){const r=e.createVertexArray();return e.bindVertexArray(r),t.length||(t=[t]),t.forEach(function(i){Ei(e,i,n)}),e.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const K6=/^(.*?)_/;function J6(e,t){zf(e,0);const n=e.getExtension(t);if(n){const r={},i=K6.exec(t)[1],o="_"+i;for(const a in n){const s=n[a],c=typeof s=="function",l=c?i:o;let u=a;a.endsWith(l)&&(u=a.substring(0,a.length-l.length)),e[u]!==void 0?!c&&e[u]!==s&&tm(u,e[u],s,a):c?e[u]=function(f){return function(){return f.apply(n,arguments)}}(s):(e[u]=s,r[u]=s)}r.constructor={name:n.constructor.name},zf(r,0)}return n}const c1=["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 l1(e){for(let t=0;t<c1.length;++t)J6(e,c1[t])}function $6(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){l1(r);break}return r}function e8(e,t){return $6(e,t)}const t8=`out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
|
|
227
|
+
see: http://github.com/greggman/twgl.js for details */const Pu=5120,xs=5121,Lu=5122,Nu=5123,Ou=5124,zu=5125,Uu=5126,xE=32819,vE=32820,AE=33635,EE=5131,SE=33640,CE=35899,IE=35902,TE=36269,DE=34042,Pp={};{const t=Pp;t[Pu]=Int8Array,t[xs]=Uint8Array,t[Lu]=Int16Array,t[Nu]=Uint16Array,t[Ou]=Int32Array,t[zu]=Uint32Array,t[Uu]=Float32Array,t[xE]=Uint16Array,t[vE]=Uint16Array,t[AE]=Uint16Array,t[EE]=Uint16Array,t[SE]=Uint32Array,t[CE]=Uint32Array,t[IE]=Uint32Array,t[TE]=Uint32Array,t[DE]=Uint32Array}function Gu(t){if(t instanceof Int8Array)return Pu;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)return xs;if(t instanceof Int16Array)return Lu;if(t instanceof Uint16Array)return Nu;if(t instanceof Int32Array)return Ou;if(t instanceof Uint32Array)return zu;if(t instanceof Float32Array)return Uu;throw new Error("unsupported typed array type")}function BE(t){if(t===Int8Array)return Pu;if(t===Uint8Array||t===Uint8ClampedArray)return xs;if(t===Int16Array)return Lu;if(t===Uint16Array)return Nu;if(t===Int32Array)return Ou;if(t===Uint32Array)return zu;if(t===Float32Array)return Uu;throw new Error("unsupported typed array type")}function _E(t){const e=Pp[t];if(!e)throw new Error("unknown gl type");return e}const mc=typeof SharedArrayBuffer<"u"?function(e){return e&&e.buffer&&(e.buffer instanceof ArrayBuffer||e.buffer instanceof SharedArrayBuffer)}:function(e){return e&&e.buffer&&e.buffer instanceof ArrayBuffer};function kE(...t){console.error(...t)}function Lp(...t){console.warn(...t)}function RE(t,e){return typeof WebGLBuffer<"u"&&e instanceof WebGLBuffer}function Np(t,e){return typeof WebGLRenderbuffer<"u"&&e instanceof WebGLRenderbuffer}function bc(t,e){return typeof WebGLTexture<"u"&&e instanceof WebGLTexture}function FE(t,e){return typeof WebGLSampler<"u"&&e instanceof WebGLSampler}const Op=35044,_n=34962,ME=34963,PE=34660,LE=5120,NE=5121,OE=5122,zE=5123,UE=5124,GE=5125,HE=5126,zp={attribPrefix:""};function Up(t,e,n,r,o){t.bindBuffer(e,n),t.bufferData(e,r,o||Op)}function Gp(t,e,n,r){if(RE(t,e))return e;n=n||_n;const o=t.createBuffer();return Up(t,n,o,e,r),o}function Hp(t){return t==="indices"}function VE(t){return t instanceof Int8Array||t instanceof Uint8Array}function qE(t){return t===Int8Array||t===Uint8Array}function jE(t){return t.length?t:t.data}const WE=/coord|texture/i,QE=/color|colour/i;function Vp(t,e){let n;if(WE.test(t)?n=2:QE.test(t)?n=4:n=3,e%n>0)throw new Error(`Can not guess numComponents for attribute '${t}'. Tried ${n} but ${e} values is not evenly divisible by ${n}. You should specify it.`);return n}function YE(t,e){return t.numComponents||t.size||Vp(e,jE(t).length)}function Hu(t,e){if(mc(t))return t;if(mc(t.data))return t.data;Array.isArray(t)&&(t={data:t});let n=t.type;return n||(Hp(e)?n=Uint16Array:n=Float32Array),new n(t.data)}function ZE(t,e){const n={};return Object.keys(e).forEach(function(r){if(!Hp(r)){const o=e[r],i=o.attrib||o.name||o.attribName||zp.attribPrefix+r;if(o.value){if(!Array.isArray(o.value)&&!mc(o.value))throw new Error("array.value is not array or typedarray");n[i]={value:o.value}}else{let s,a,c,l;if(o.buffer&&o.buffer instanceof WebGLBuffer)s=o.buffer,l=o.numComponents||o.size,a=o.type,c=o.normalize;else if(typeof o=="number"||typeof o.data=="number"){const u=o.data||o,f=o.type||Float32Array,h=u*f.BYTES_PER_ELEMENT;a=BE(f),c=o.normalize!==void 0?o.normalize:qE(f),l=o.numComponents||o.size||Vp(r,u),s=t.createBuffer(),t.bindBuffer(_n,s),t.bufferData(_n,h,o.drawType||Op)}else{const u=Hu(o,r);s=Gp(t,u,void 0,o.drawType),a=Gu(u),c=o.normalize!==void 0?o.normalize:VE(u),l=YE(o,r)}n[i]={buffer:s,numComponents:l,type:a,normalize:c,stride:o.stride||0,offset:o.offset||0,divisor:o.divisor===void 0?void 0:o.divisor,drawType:o.drawType}}}}),t.bindBuffer(_n,null),n}function XE(t,e,n,r){n=Hu(n),r!==void 0?(t.bindBuffer(_n,e.buffer),t.bufferSubData(_n,r,n)):Up(t,_n,e.buffer,n,e.drawType)}function KE(t,e){return e===LE||e===NE?1:e===OE||e===zE?2:e===UE||e===GE||e===HE?4:0}const Vu=["position","positions","a_position"];function JE(t,e){let n,r;for(r=0;r<Vu.length&&(n=Vu[r],!(n in e||(n=zp.attribPrefix+n,n in e)));++r);r===Vu.length&&(n=Object.keys(e)[0]);const o=e[n];if(!o.buffer)return 1;t.bindBuffer(_n,o.buffer);const i=t.getBufferParameter(_n,PE);t.bindBuffer(_n,null);const s=KE(t,o.type),a=i/s,c=o.numComponents||o.size,l=a/c;if(l%1!==0)throw new Error(`numComponents ${c} not correct for length ${length}`);return l}function $E(t,e,n){const r=ZE(t,e),o=Object.assign({},n||{});o.attribs=Object.assign({},n?n.attribs:{},r);const i=e.indices;if(i){const s=Hu(i,"indices");o.indices=Gp(t,s,ME),o.numElements=s.length,o.elementType=Gu(s)}else o.numElements||(o.numElements=JE(t,o.attribs));return o}function qi(t){return!!t.texStorage2D}const qu=function(){const t={},e={};function n(r){const o=r.constructor.name;if(!t[o]){for(const i in r)if(typeof r[i]=="number"){const s=e[r[i]];e[r[i]]=s?`${s} | ${i}`:i}t[o]=!0}}return function(o,i){return n(o),e[i]||(typeof i=="number"?`0x${i.toString(16)}`:i)}}(),gr={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},ji=mc,qp=function(){let t;return function(){return t=t||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),t}}(),jp=6406,kn=6407,st=6408,Wp=6409,Qp=6410,vs=6402,Yp=34041,yc=33071,eS=9728,tS=9729,Yn=3553,Zn=34067,mr=32879,br=35866,wc=34069,nS=34070,rS=34071,iS=34072,oS=34073,sS=34074,ju=10241,Wu=10240,xc=10242,vc=10243,Zp=32882,aS=33082,cS=33083,lS=33084,uS=33085,Qu=3317,Xp=3314,Kp=32878,Jp=3316,$p=3315,eg=32877,fS=37443,hS=37441,dS=37440,pS=33321,gS=36756,mS=33325,bS=33326,yS=33330,wS=33329,xS=33338,vS=33337,AS=33340,ES=33339,SS=33323,CS=36757,IS=33327,TS=33328,DS=33336,BS=33335,_S=33332,kS=33331,RS=33334,FS=33333,MS=32849,PS=35905,LS=36194,NS=36758,OS=35898,zS=35901,US=34843,GS=34837,HS=36221,VS=36239,qS=36215,jS=36233,WS=36209,QS=36227,YS=32856,ZS=35907,XS=36759,KS=32855,JS=32854,$S=32857,e4=34842,t4=34836,n4=36220,r4=36238,i4=36975,o4=36214,s4=36232,a4=36226,c4=36208,l4=33189,u4=33190,f4=36012,h4=36013,d4=35056,yr=5120,at=5121,Ac=5122,Wi=5123,Ec=5124,$r=5125,Mt=5126,tg=32819,ng=32820,rg=33635,yn=5131,As=36193,Yu=33640,p4=35899,g4=35902,m4=36269,b4=34042,Sc=33319,Qi=33320,Cc=6403,Yi=36244,Zi=36248,ei=36249;let Zu;function Ic(t){if(!Zu){const e={};e[jp]={textureFormat:jp,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,yn,As,Mt]},e[Wp]={textureFormat:Wp,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,yn,As,Mt]},e[Qp]={textureFormat:Qp,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[at,yn,As,Mt]},e[kn]={textureFormat:kn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[at,yn,As,Mt,rg]},e[st]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[at,yn,As,Mt,tg,ng]},e[vs]={textureFormat:vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[$r,Wi]},e[pS]={textureFormat:Cc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[at]},e[gS]={textureFormat:Cc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[yr]},e[mS]={textureFormat:Cc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Mt,yn]},e[bS]={textureFormat:Cc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[yS]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[at]},e[wS]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[yr]},e[_S]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Wi]},e[kS]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Ac]},e[RS]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[$r]},e[FS]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ec]},e[SS]={textureFormat:Sc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[at]},e[CS]={textureFormat:Sc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[yr]},e[IS]={textureFormat:Sc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Mt,yn]},e[TS]={textureFormat:Sc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Mt]},e[DS]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[at]},e[BS]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[yr]},e[xS]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Wi]},e[vS]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ac]},e[AS]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[$r]},e[ES]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Ec]},e[MS]={textureFormat:kn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[PS]={textureFormat:kn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[LS]={textureFormat:kn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[at,rg]},e[NS]={textureFormat:kn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[yr]},e[OS]={textureFormat:kn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,yn,p4]},e[zS]={textureFormat:kn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,yn,g4]},e[US]={textureFormat:kn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Mt,yn]},e[GS]={textureFormat:kn,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Mt]},e[HS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[at]},e[VS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[yr]},e[qS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Wi]},e[jS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Ac]},e[WS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[$r]},e[QS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Ec]},e[YS]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[ZS]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[XS]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[yr]},e[KS]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[at,ng,Yu]},e[JS]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[at,tg]},e[$S]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Yu]},e[e4]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Mt,yn]},e[t4]={textureFormat:st,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Mt]},e[n4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[at]},e[r4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[yr]},e[i4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Yu]},e[o4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Wi]},e[s4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Ac]},e[a4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Ec]},e[c4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[$r]},e[l4]={textureFormat:vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Wi,$r]},e[u4]={textureFormat:vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[$r]},e[f4]={textureFormat:vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[d4]={textureFormat:Yp,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[b4]},e[h4]={textureFormat:Yp,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[m4]},Object.keys(e).forEach(function(n){const r=e[n];r.bytesPerElementMap={},r.bytesPerElement.forEach(function(o,i){const s=r.type[i];r.bytesPerElementMap[s]=o})}),Zu=e}return Zu[t]}function y4(t,e){const n=Ic(t);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[e];if(r===void 0)throw"unknown internal format";return r}function Xi(t){const e=Ic(t);if(!e)throw"unknown internal format";return{format:e.textureFormat,type:e.type[0]}}function ig(t){return(t&t-1)===0}function w4(t,e,n,r){if(!qi(t))return ig(e)&&ig(n);const o=Ic(r);if(!o)throw"unknown internal format";return o.colorRenderable&&o.textureFilterable}function x4(t){const e=Ic(t);if(!e)throw"unknown internal format";return e.textureFilterable}function og(t,e,n){return ji(e)?Gu(e):n||at}function Tc(t,e,n,r,o){if(o%1!==0)throw"can't guess dimensions";if(!n&&!r){const i=Math.sqrt(o/(e===Zn?6:1));i%1===0?(n=i,r=i):(n=o,r=1)}else if(r){if(!n&&(n=o/r,n%1))throw"can't guess dimensions"}else if(r=o/n,r%1)throw"can't guess dimensions";return{width:n,height:r}}function Ki(t,e){e.colorspaceConversion!==void 0&&t.pixelStorei(fS,e.colorspaceConversion),e.premultiplyAlpha!==void 0&&t.pixelStorei(hS,e.premultiplyAlpha),e.flipY!==void 0&&t.pixelStorei(dS,e.flipY)}function sg(t){t.pixelStorei(Qu,4),qi(t)&&(t.pixelStorei(Xp,0),t.pixelStorei(Kp,0),t.pixelStorei(Jp,0),t.pixelStorei($p,0),t.pixelStorei(eg,0))}function v4(t,e,n,r){r.minMag&&(n.call(t,e,ju,r.minMag),n.call(t,e,Wu,r.minMag)),r.min&&n.call(t,e,ju,r.min),r.mag&&n.call(t,e,Wu,r.mag),r.wrap&&(n.call(t,e,xc,r.wrap),n.call(t,e,vc,r.wrap),(e===mr||FE(t,e))&&n.call(t,e,Zp,r.wrap)),r.wrapR&&n.call(t,e,Zp,r.wrapR),r.wrapS&&n.call(t,e,xc,r.wrapS),r.wrapT&&n.call(t,e,vc,r.wrapT),r.minLod&&n.call(t,e,aS,r.minLod),r.maxLod&&n.call(t,e,cS,r.maxLod),r.baseLevel&&n.call(t,e,lS,r.baseLevel),r.maxLevel&&n.call(t,e,uS,r.maxLevel)}function ag(t,e,n){const r=n.target||Yn;t.bindTexture(r,e),v4(t,r,t.texParameteri,n)}function A4(t){return t=t||gr.textureColor,ji(t)?t:new Uint8Array([t[0]*255,t[1]*255,t[2]*255,t[3]*255])}function Xu(t,e,n,r,o,i){n=n||gr.textureOptions,i=i||st;const s=n.target||Yn;if(r=r||n.width,o=o||n.height,t.bindTexture(s,e),w4(t,r,o,i))t.generateMipmap(s);else{const a=x4(i)?tS:eS;t.texParameteri(s,ju,a),t.texParameteri(s,Wu,a),t.texParameteri(s,xc,yc),t.texParameteri(s,vc,yc)}}function Es(t){return t.auto===!0||t.auto===void 0&&t.level===void 0}function Ku(t,e){return e=e||{},e.cubeFaceOrder||[wc,nS,rS,iS,oS,sS]}function Ju(t,e){const r=Ku(t,e).map(function(o,i){return{face:o,ndx:i}});return r.sort(function(o,i){return o.face-i.face}),r}function cg(t,e,n,r){r=r||gr.textureOptions;const o=r.target||Yn,i=r.level||0;let s=n.width,a=n.height;const c=r.internalFormat||r.format||st,l=Xi(c),u=r.format||l.format,f=r.type||l.type;if(Ki(t,r),t.bindTexture(o,e),o===Zn){const h=n.width,d=n.height;let p,y;if(h/6===d)p=d,y=[0,0,1,0,2,0,3,0,4,0,5,0];else if(d/6===h)p=h,y=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===d/2)p=h/3,y=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===d/3)p=h/2,y=[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 v=qp();v?(v.canvas.width=p,v.canvas.height=p,s=p,a=p,Ju(t,r).forEach(function(b){const A=y[b.ndx*2+0]*p,C=y[b.ndx*2+1]*p;v.drawImage(n,A,C,p,p,0,0,p,p),t.texImage2D(b.face,i,c,u,f,v.canvas)}),v.canvas.width=1,v.canvas.height=1):typeof createImageBitmap<"u"&&(s=p,a=p,Ju(t,r).forEach(function(b){const A=y[b.ndx*2+0]*p,C=y[b.ndx*2+1]*p;t.texImage2D(b.face,i,c,p,p,0,u,f,null),createImageBitmap(n,A,C,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(E){Ki(t,r),t.bindTexture(o,e),t.texImage2D(b.face,i,c,u,f,E),Es(r)&&Xu(t,e,r,s,a,c)})}))}else if(o===mr||o===br){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 y=n.width===d?1:0,v=n.height===d?1:0;t.pixelStorei(Qu,1),t.pixelStorei(Xp,n.width),t.pixelStorei(Kp,0),t.pixelStorei(eg,0),t.texImage3D(o,i,c,h,h,h,0,u,f,null);for(let b=0;b<p;++b){const A=b*h*y,C=b*h*v;t.pixelStorei(Jp,A),t.pixelStorei($p,C),t.texSubImage3D(o,i,0,0,b,h,h,1,u,f,n)}sg(t)}else t.texImage2D(o,i,c,u,f,n);Es(r)&&Xu(t,e,r,s,a,c),ag(t,e,r)}function Ss(){}function E4(t){if(typeof document<"u"){const e=document.createElement("a");return e.href=t,e.hostname===location.hostname&&e.port===location.port&&e.protocol===location.protocol}else{const e=new URL(location.href).origin;return new URL(t,location.href).origin===e}}function S4(t,e){return e===void 0&&!E4(t)?"anonymous":e}function C4(t,e,n){n=n||Ss;let r;if(e=e!==void 0?e:gr.crossOrigin,e=S4(t,e),typeof Image<"u"){r=new Image,e!==void 0&&(r.crossOrigin=e);const o=function(){r.removeEventListener("error",i),r.removeEventListener("load",s),r=null},i=function(){const c="couldn't load image: "+t;kE(c),n(c,r),o()},s=function(){n(null,r),o()};return r.addEventListener("error",i),r.addEventListener("load",s),r.src=t,r}else if(typeof ImageBitmap<"u"){let o,i;const s=function(){n(o,i)},a={};e&&(a.mode="cors"),fetch(t,a).then(function(c){if(!c.ok)throw c;return c.blob()}).then(function(c){return createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(c){i=c,setTimeout(s)}).catch(function(c){o=c,setTimeout(s)}),r=null}return r}function lg(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof ImageData<"u"&&t instanceof ImageData||typeof HTMLElement<"u"&&t instanceof HTMLElement}function $u(t,e,n){return lg(t)?(setTimeout(function(){n(null,t)}),t):C4(t,e,n)}function ef(t,e,n){n=n||gr.textureOptions;const r=n.target||Yn;if(t.bindTexture(r,e),n.color===!1)return;const o=A4(n.color);if(r===Zn)for(let i=0;i<6;++i)t.texImage2D(wc+i,0,st,1,1,0,st,at,o);else r===mr||r===br?t.texImage3D(r,0,st,1,1,1,0,st,at,o):t.texImage2D(r,0,st,1,1,0,st,at,o)}function I4(t,e,n,r){return r=r||Ss,n=n||gr.textureOptions,ef(t,e,n),n=Object.assign({},n),$u(n.src,n.crossOrigin,function(i,s){i?r(i,e,s):(cg(t,e,s,n),r(null,e,s))})}function T4(t,e,n,r){r=r||Ss;const o=n.src;if(o.length!==6)throw"there must be 6 urls for a cubemap";const i=n.level||0,s=n.internalFormat||n.format||st,a=Xi(s),c=n.format||a.format,l=n.type||at,u=n.target||Yn;if(u!==Zn)throw"target must be TEXTURE_CUBE_MAP";ef(t,e,n),n=Object.assign({},n);let f=6;const h=[],d=Ku(t,n);let p;function y(v){return function(b,A){--f,b?h.push(b):A.width!==A.height?h.push("cubemap face img is not a square: "+A.src):(Ki(t,n),t.bindTexture(u,e),f===5?Ku().forEach(function(C){t.texImage2D(C,i,s,c,l,A)}):t.texImage2D(v,i,s,c,l,A),Es(n)&&t.generateMipmap(u)),f===0&&r(h.length?h:void 0,e,p)}}p=o.map(function(v,b){return $u(v,n.crossOrigin,y(d[b]))})}function D4(t,e,n,r){r=r||Ss;const o=n.src,i=n.internalFormat||n.format||st,s=Xi(i),a=n.format||s.format,c=n.type||at,l=n.target||br;if(l!==mr&&l!==br)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";ef(t,e,n),n=Object.assign({},n);let u=o.length;const f=[];let h;const d=n.level||0;let p=n.width,y=n.height;const v=o.length;let b=!0;function A(C){return function(E,I){if(--u,E)f.push(E);else{if(Ki(t,n),t.bindTexture(l,e),b){b=!1,p=n.width||I.width,y=n.height||I.height,t.texImage3D(l,d,i,p,y,v,0,a,c,null);for(let R=0;R<v;++R)t.texSubImage3D(l,d,0,0,R,p,y,1,a,c,I)}else{let R=I,B;(I.width!==p||I.height!==y)&&(B=qp(),R=B.canvas,B.canvas.width=p,B.canvas.height=y,B.drawImage(I,0,0,p,y)),t.texSubImage3D(l,d,0,0,C,p,y,1,a,c,R),B&&R===B.canvas&&(B.canvas.width=0,B.canvas.height=0)}Es(n)&&t.generateMipmap(l)}u===0&&r(f.length?f:void 0,e,h)}}h=o.map(function(C,E){return $u(C,n.crossOrigin,A(E))})}function ug(t,e,n,r){r=r||gr.textureOptions;const o=r.target||Yn;t.bindTexture(o,e);let i=r.width,s=r.height,a=r.depth;const c=r.level||0,l=r.internalFormat||r.format||st,u=Xi(l),f=r.format||u.format,h=r.type||og(t,n,u.type);if(ji(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const v=_E(h);n=new v(n)}const d=y4(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+qu(t,f);let y;if(o===mr||o===br)if(!i&&!s&&!a){const v=Math.cbrt(p);if(v%1!==0)throw"can't guess cube size of array of numElements: "+p;i=v,s=v,a=v}else i&&(!s||!a)?(y=Tc(t,o,s,a,p/i),s=y.width,a=y.height):s&&(!i||!a)?(y=Tc(t,o,i,a,p/s),i=y.width,a=y.height):(y=Tc(t,o,i,s,p/a),i=y.width,s=y.height);else y=Tc(t,o,i,s,p),i=y.width,s=y.height;if(sg(t),t.pixelStorei(Qu,r.unpackAlignment||1),Ki(t,r),o===Zn){const v=d/n.BYTES_PER_ELEMENT,b=p/6*v;Ju(t,r).forEach(A=>{const C=b*A.ndx,E=n.subarray(C,C+b);t.texImage2D(A.face,c,l,i,s,0,f,h,E)})}else o===mr||o===br?t.texImage3D(o,c,l,i,s,a,0,f,h,n):t.texImage2D(o,c,l,i,s,0,f,h,n);return{width:i,height:s,depth:a,type:h}}function B4(t,e,n){const r=n.target||Yn;t.bindTexture(r,e);const o=n.level||0,i=n.internalFormat||n.format||st,s=Xi(i),a=n.format||s.format,c=n.type||s.type;if(Ki(t,n),r===Zn)for(let l=0;l<6;++l)t.texImage2D(wc+l,o,i,n.width,n.height,0,a,c,null);else r===mr||r===br?t.texImage3D(r,o,i,n.width,n.height,n.depth,0,a,c,null):t.texImage2D(r,o,i,n.width,n.height,0,a,c,null)}function Cs(t,e,n){n=n||Ss,e=e||gr.textureOptions;const r=t.createTexture(),o=e.target||Yn;let i=e.width||1,s=e.height||1;const a=e.internalFormat||st;t.bindTexture(o,r),o===Zn&&(t.texParameteri(o,xc,yc),t.texParameteri(o,vc,yc));let c=e.src;if(c)if(typeof c=="function"&&(c=c(t,e)),typeof c=="string")I4(t,r,e,n);else if(ji(c)||Array.isArray(c)&&(typeof c[0]=="number"||Array.isArray(c[0])||ji(c[0]))){const l=ug(t,r,c,e);i=l.width,s=l.height}else Array.isArray(c)&&(typeof c[0]=="string"||lg(c[0]))?o===Zn?T4(t,r,e,n):D4(t,r,e,n):(cg(t,r,c,e),i=c.width,s=c.height);else B4(t,r,e);return Es(e)&&Xu(t,r,e,i,s,a),ag(t,r,e),r}function _4(t,e,n,r,o,i){r=r||n.width,o=o||n.height,i=i||n.depth;const s=n.target||Yn;t.bindTexture(s,e);const a=n.level||0,c=n.internalFormat||n.format||st,l=Xi(c),u=n.format||l.format;let f;const h=n.src;if(h&&(ji(h)||Array.isArray(h)&&typeof h[0]=="number")?f=n.type||og(t,h,l.type):f=n.type||l.type,s===Zn)for(let d=0;d<6;++d)t.texImage2D(wc+d,a,c,r,o,0,u,f,null);else s===mr||s===br?t.texImage3D(s,a,c,r,o,i,0,u,f,null):t.texImage2D(s,a,c,r,o,0,u,f,null)}const k4=Lp,Dc=33984,R4=35048,Bc=34962,F4=34963,tf=35345,fg=35718,M4=35721,P4=35971,L4=35382,N4=35396,O4=35398,z4=35392,U4=35395,_c=5126,hg=35664,dg=35665,pg=35666,nf=5124,gg=35667,mg=35668,bg=35669,yg=35670,wg=35671,xg=35672,vg=35673,Ag=35674,Eg=35675,Sg=35676,G4=35678,H4=35680,V4=35679,q4=35682,j4=35685,W4=35686,Q4=35687,Y4=35688,Z4=35689,X4=35690,K4=36289,J4=36292,$4=36293,rf=5125,Cg=36294,Ig=36295,Tg=36296,eC=36298,tC=36299,nC=36300,rC=36303,iC=36306,oC=36307,sC=36308,aC=36311,kc=3553,Rc=34067,of=32879,Fc=35866,Oe={};function Dg(t,e){return Oe[e].bindPoint}function cC(t,e){return function(n){t.uniform1f(e,n)}}function lC(t,e){return function(n){t.uniform1fv(e,n)}}function uC(t,e){return function(n){t.uniform2fv(e,n)}}function fC(t,e){return function(n){t.uniform3fv(e,n)}}function hC(t,e){return function(n){t.uniform4fv(e,n)}}function Bg(t,e){return function(n){t.uniform1i(e,n)}}function _g(t,e){return function(n){t.uniform1iv(e,n)}}function kg(t,e){return function(n){t.uniform2iv(e,n)}}function Rg(t,e){return function(n){t.uniform3iv(e,n)}}function Fg(t,e){return function(n){t.uniform4iv(e,n)}}function dC(t,e){return function(n){t.uniform1ui(e,n)}}function pC(t,e){return function(n){t.uniform1uiv(e,n)}}function gC(t,e){return function(n){t.uniform2uiv(e,n)}}function mC(t,e){return function(n){t.uniform3uiv(e,n)}}function bC(t,e){return function(n){t.uniform4uiv(e,n)}}function yC(t,e){return function(n){t.uniformMatrix2fv(e,!1,n)}}function wC(t,e){return function(n){t.uniformMatrix3fv(e,!1,n)}}function xC(t,e){return function(n){t.uniformMatrix4fv(e,!1,n)}}function vC(t,e){return function(n){t.uniformMatrix2x3fv(e,!1,n)}}function AC(t,e){return function(n){t.uniformMatrix3x2fv(e,!1,n)}}function EC(t,e){return function(n){t.uniformMatrix2x4fv(e,!1,n)}}function SC(t,e){return function(n){t.uniformMatrix4x2fv(e,!1,n)}}function CC(t,e){return function(n){t.uniformMatrix3x4fv(e,!1,n)}}function IC(t,e){return function(n){t.uniformMatrix4x3fv(e,!1,n)}}function Ht(t,e,n,r){const o=Dg(t,e);return qi(t)?function(i){let s,a;bc(t,i)?(s=i,a=null):(s=i.texture,a=i.sampler),t.uniform1i(r,n),t.activeTexture(Dc+n),t.bindTexture(o,s),t.bindSampler(n,a)}:function(i){t.uniform1i(r,n),t.activeTexture(Dc+n),t.bindTexture(o,i)}}function Vt(t,e,n,r,o){const i=Dg(t,e),s=new Int32Array(o);for(let a=0;a<o;++a)s[a]=n+a;return qi(t)?function(a){t.uniform1iv(r,s),a.forEach(function(c,l){t.activeTexture(Dc+s[l]);let u,f;bc(t,c)?(u=c,f=null):(u=c.texture,f=c.sampler),t.bindSampler(n,f),t.bindTexture(i,u)})}:function(a){t.uniform1iv(r,s),a.forEach(function(c,l){t.activeTexture(Dc+s[l]),t.bindTexture(i,c)})}}Oe[_c]={Type:Float32Array,size:4,setter:cC,arraySetter:lC},Oe[hg]={Type:Float32Array,size:8,setter:uC,cols:2},Oe[dg]={Type:Float32Array,size:12,setter:fC,cols:3},Oe[pg]={Type:Float32Array,size:16,setter:hC,cols:4},Oe[nf]={Type:Int32Array,size:4,setter:Bg,arraySetter:_g},Oe[gg]={Type:Int32Array,size:8,setter:kg,cols:2},Oe[mg]={Type:Int32Array,size:12,setter:Rg,cols:3},Oe[bg]={Type:Int32Array,size:16,setter:Fg,cols:4},Oe[rf]={Type:Uint32Array,size:4,setter:dC,arraySetter:pC},Oe[Cg]={Type:Uint32Array,size:8,setter:gC,cols:2},Oe[Ig]={Type:Uint32Array,size:12,setter:mC,cols:3},Oe[Tg]={Type:Uint32Array,size:16,setter:bC,cols:4},Oe[yg]={Type:Uint32Array,size:4,setter:Bg,arraySetter:_g},Oe[wg]={Type:Uint32Array,size:8,setter:kg,cols:2},Oe[xg]={Type:Uint32Array,size:12,setter:Rg,cols:3},Oe[vg]={Type:Uint32Array,size:16,setter:Fg,cols:4},Oe[Ag]={Type:Float32Array,size:32,setter:yC,rows:2,cols:2},Oe[Eg]={Type:Float32Array,size:48,setter:wC,rows:3,cols:3},Oe[Sg]={Type:Float32Array,size:64,setter:xC,rows:4,cols:4},Oe[j4]={Type:Float32Array,size:32,setter:vC,rows:2,cols:3},Oe[W4]={Type:Float32Array,size:32,setter:EC,rows:2,cols:4},Oe[Q4]={Type:Float32Array,size:48,setter:AC,rows:3,cols:2},Oe[Y4]={Type:Float32Array,size:48,setter:CC,rows:3,cols:4},Oe[Z4]={Type:Float32Array,size:64,setter:SC,rows:4,cols:2},Oe[X4]={Type:Float32Array,size:64,setter:IC,rows:4,cols:3},Oe[G4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:kc},Oe[H4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Rc},Oe[V4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:of},Oe[q4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:kc},Oe[K4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Fc},Oe[J4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Fc},Oe[$4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Rc},Oe[eC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:kc},Oe[tC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:of},Oe[nC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Rc},Oe[rC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Fc},Oe[iC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:kc},Oe[oC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:of},Oe[sC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Rc},Oe[aC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Fc};function Mc(t,e){return function(n){if(n.value)switch(t.disableVertexAttribArray(e),n.value.length){case 4:t.vertexAttrib4fv(e,n.value);break;case 3:t.vertexAttrib3fv(e,n.value);break;case 2:t.vertexAttrib2fv(e,n.value);break;case 1:t.vertexAttrib1fv(e,n.value);break;default:throw new Error("the length of a float constant value must be between 1 and 4!")}else t.bindBuffer(Bc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribPointer(e,n.numComponents||n.size,n.type||_c,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function wr(t,e){return function(n){if(n.value)if(t.disableVertexAttribArray(e),n.value.length===4)t.vertexAttrib4iv(e,n.value);else throw new Error("The length of an integer constant value must be 4!");else t.bindBuffer(Bc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||nf,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function Pc(t,e){return function(n){if(n.value)if(t.disableVertexAttribArray(e),n.value.length===4)t.vertexAttrib4uiv(e,n.value);else throw new Error("The length of an unsigned integer constant value must be 4!");else t.bindBuffer(Bc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||rf,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function sf(t,e,n){const r=n.size,o=n.count;return function(i){t.bindBuffer(Bc,i.buffer);const s=i.size||i.numComponents||r,a=s/o,c=i.type||_c,u=Oe[c].size*s,f=i.normalize||!1,h=i.offset||0,d=u/o;for(let p=0;p<o;++p)t.enableVertexAttribArray(e+p),t.vertexAttribPointer(e+p,a,c,f,u,h+d*p),i.divisor!==void 0&&t.vertexAttribDivisor(e+p,i.divisor)}}const gt={};gt[_c]={size:4,setter:Mc},gt[hg]={size:8,setter:Mc},gt[dg]={size:12,setter:Mc},gt[pg]={size:16,setter:Mc},gt[nf]={size:4,setter:wr},gt[gg]={size:8,setter:wr},gt[mg]={size:12,setter:wr},gt[bg]={size:16,setter:wr},gt[rf]={size:4,setter:Pc},gt[Cg]={size:8,setter:Pc},gt[Ig]={size:12,setter:Pc},gt[Tg]={size:16,setter:Pc},gt[yg]={size:4,setter:wr},gt[wg]={size:8,setter:wr},gt[xg]={size:12,setter:wr},gt[vg]={size:16,setter:wr},gt[Ag]={size:4,setter:sf,count:2},gt[Eg]={size:9,setter:sf,count:3},gt[Sg]={size:16,setter:sf,count:4};function Mg(t){const e=t.name;return e.startsWith("gl_")||e.startsWith("webgl_")}const TC=/(\.|\[|]|\w+)/g,DC=t=>t>="0"&&t<="9";function Pg(t,e,n,r){const o=t.split(TC).filter(a=>a!=="");let i=0,s="";for(;;){const a=o[i++];s+=a;const c=DC(a[0]),l=c?parseInt(a):a;if(c&&(s+=o[i++]),i===o.length){n[l]=e;break}else{const f=o[i++],h=f==="[",d=n[l]||(h?[]:{});n[l]=d,n=d,r[s]=r[s]||function(p){return function(y){Ug(p,y)}}(d),s+=f}}}function BC(t,e){let n=0;function r(a,c,l){const u=c.name.endsWith("[0]"),f=c.type,h=Oe[f];if(!h)throw new Error(`unknown type: 0x${f.toString(16)}`);let d;if(h.bindPoint){const p=n;n+=c.size,u?d=h.arraySetter(t,f,p,l,c.size):d=h.setter(t,f,p,l,c.size)}else h.arraySetter&&u?d=h.arraySetter(t,l):d=h.setter(t,l);return d.location=l,d}const o={},i={},s=t.getProgramParameter(e,fg);for(let a=0;a<s;++a){const c=t.getActiveUniform(e,a);if(Mg(c))continue;let l=c.name;l.endsWith("[0]")&&(l=l.substr(0,l.length-3));const u=t.getUniformLocation(e,c.name);if(u){const f=r(e,c,u);o[l]=f,Pg(l,f,i,o)}}return o}function _C(t,e){const n={},r=t.getProgramParameter(e,P4);for(let o=0;o<r;++o){const i=t.getTransformFeedbackVarying(e,o);n[i.name]={index:o,type:i.type,size:i.size}}return n}function kC(t,e){const n=t.getProgramParameter(e,fg),r=[],o=[];for(let a=0;a<n;++a){o.push(a),r.push({});const c=t.getActiveUniform(e,a);r[a].name=c.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(a){const c=a[0],l=a[1];t.getActiveUniforms(e,o,t[c]).forEach(function(u,f){r[f][l]=u})});const i={},s=t.getProgramParameter(e,L4);for(let a=0;a<s;++a){const c=t.getActiveUniformBlockName(e,a),l={index:t.getUniformBlockIndex(e,c),usedByVertexShader:t.getActiveUniformBlockParameter(e,a,N4),usedByFragmentShader:t.getActiveUniformBlockParameter(e,a,O4),size:t.getActiveUniformBlockParameter(e,a,z4),uniformIndices:t.getActiveUniformBlockParameter(e,a,U4)};l.used=l.usedByVertexShader||l.usedByFragmentShader,i[c]=l}return{blockSpecs:i,uniformData:r}}const Lg=/\[\d+\]\.$/,RC=(t,e)=>((t+(e-1))/e|0)*e;function FC(t,e,n,r){if(e||n){r=r||1;const i=t.length/4;return function(s){let a=0,c=0;for(let l=0;l<i;++l){for(let u=0;u<r;++u)t[a++]=s[c++];a+=4-r}}}else return function(o){o.length?t.set(o):t[0]=o}}function MC(t,e,n,r){const o=n.blockSpecs,i=n.uniformData,s=o[r];if(!s)return k4("no uniform block object named:",r),{name:r,uniforms:{}};const a=new ArrayBuffer(s.size),c=t.createBuffer(),l=s.index;t.bindBuffer(tf,c),t.uniformBlockBinding(e,s.index,l);let u=r+".";Lg.test(u)&&(u=u.replace(Lg,"."));const f={},h={},d={};return s.uniformIndices.forEach(function(p){const y=i[p];let v=y.name;v.startsWith(u)&&(v=v.substr(u.length));const b=v.endsWith("[0]");b&&(v=v.substr(0,v.length-3));const A=Oe[y.type],C=A.Type,E=b?RC(A.size,16)*y.size:A.size*y.size,I=new C(a,y.offset,E/C.BYTES_PER_ELEMENT);f[v]=I;const R=FC(I,b,A.rows,A.cols);h[v]=R,Pg(v,R,d,h)}),{name:r,array:a,asFloat:new Float32Array(a),buffer:c,uniforms:f,setters:h}}function Ng(t,e,n){return MC(t,e.program,e.uniformBlockSpec,n)}function Og(t,e,n){const o=(e.uniformBlockSpec||e).blockSpecs[n.name];if(o){const i=o.index;return t.bindBufferRange(tf,i,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function zg(t,e,n){Og(t,e,n)&&t.bufferData(tf,n.array,R4)}function Is(t,e){const n=t.setters;for(const r in e){const o=n[r];if(o){const i=e[r];o(i)}}}function Ug(t,e){for(const n in e){const r=t[n];typeof r=="function"?r(e[n]):Ug(t[n],e[n])}}function ti(t,...e){const n=t.uniformSetters||t,r=e.length;for(let o=0;o<r;++o){const i=e[o];if(Array.isArray(i)){const s=i.length;for(let a=0;a<s;++a)ti(n,i[a])}else for(const s in i){const a=n[s];a&&a(i[s])}}}function PC(t,e){const n={},r=t.getProgramParameter(e,M4);for(let o=0;o<r;++o){const i=t.getActiveAttrib(e,o);if(Mg(i))continue;const s=t.getAttribLocation(e,i.name),a=gt[i.type],c=a.setter(t,s,a);c.location=s,n[i.name]=c}return n}function LC(t,e){for(const n in e){const r=t[n];r&&r(e[n])}}function ni(t,e,n){n.vertexArrayObject?t.bindVertexArray(n.vertexArrayObject):(LC(e.attribSetters||e,n.attribs),n.indices&&t.bindBuffer(F4,n.indices))}function NC(t,e){const n=BC(t,e),r=PC(t,e),o={program:e,uniformSetters:n,attribSetters:r};return qi(t)&&(o.uniformBlockSpec=kC(t,e),o.transformFeedbackInfo=_C(t,e)),o}const OC=4,Gg=5123;function Lc(t,e,n,r,o,i){n=n===void 0?OC:n;const s=e.indices,a=e.elementType,c=r===void 0?e.numElements:r;o=o===void 0?0:o,a||s?i!==void 0?t.drawElementsInstanced(n,c,a===void 0?Gg:e.elementType,o,i):t.drawElements(n,c,a===void 0?Gg:e.elementType,o):i!==void 0?t.drawArraysInstanced(n,o,c,i):t.drawArrays(n,o,c)}const zC=36160,ri=36161,UC=3553,GC=5121,HC=6402,VC=6408,qC=33190,jC=36012,WC=35056,QC=36013,YC=32854,ZC=32855,XC=36194,Hg=33189,Vg=6401,qg=36168,af=34041,cf=36064,Nc=36096,jg=36128,lf=33306,uf=33071,ff=9729,Wg=[{format:VC,type:GC,min:ff,wrap:uf},{format:af}],wn={};wn[af]=lf,wn[Vg]=jg,wn[qg]=jg,wn[HC]=Nc,wn[Hg]=Nc,wn[qC]=Nc,wn[jC]=Nc,wn[WC]=lf,wn[QC]=lf;function KC(t,e){return wn[t]||wn[e]}const xr={};xr[YC]=!0,xr[ZC]=!0,xr[XC]=!0,xr[af]=!0,xr[Hg]=!0,xr[Vg]=!0,xr[qg]=!0;function JC(t){return xr[t]}const $C=32;function e6(t){return t>=cf&&t<cf+$C}function t6(t,e,n,r){const o=zC,i=t.createFramebuffer();t.bindFramebuffer(o,i),n=n||t.drawingBufferWidth,r=r||t.drawingBufferHeight,e=e||Wg;const s=[],a={framebuffer:i,attachments:[],width:n,height:r};return e.forEach(function(c,l){let u=c.attachment;const f=c.samples,h=c.format;let d=c.attachmentPoint||KC(h,c.internalFormat);if(d||(d=cf+l),e6(d)&&s.push(d),!u)if(f!==void 0||JC(h))u=t.createRenderbuffer(),t.bindRenderbuffer(ri,u),f>1?t.renderbufferStorageMultisample(ri,f,h,n,r):t.renderbufferStorage(ri,h,n,r);else{const p=Object.assign({},c);p.width=n,p.height=r,p.auto===void 0&&(p.auto=!1,p.min=p.min||p.minMag||ff,p.mag=p.mag||p.minMag||ff,p.wrapS=p.wrapS||p.wrap||uf,p.wrapT=p.wrapT||p.wrap||uf),u=Cs(t,p)}if(Np(t,u))t.framebufferRenderbuffer(o,d,ri,u);else if(bc(t,u))c.layer!==void 0?t.framebufferTextureLayer(o,d,u,c.level||0,c.layer):t.framebufferTexture2D(o,d,c.target||UC,u,c.level||0);else throw new Error("unknown attachment type");a.attachments.push(u)}),t.drawBuffers&&t.drawBuffers(s),a}function n6(t,e,n,r,o){r=r||t.drawingBufferWidth,o=o||t.drawingBufferHeight,e.width=r,e.height=o,n=n||Wg,n.forEach(function(i,s){const a=e.attachments[s],c=i.format,l=i.samples;if(l!==void 0||Np(t,a))t.bindRenderbuffer(ri,a),l>1?t.renderbufferStorageMultisample(ri,l,c,r,o):t.renderbufferStorage(ri,c,r,o);else if(bc(t,a))_4(t,a,i,r,o);else throw new Error("unknown attachment type")})}function r6(t,e,n){const r=t.createVertexArray();return t.bindVertexArray(r),e.length||(e=[e]),e.forEach(function(o){ni(t,o,n)}),t.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const i6=/^(.*?)_/;function o6(t,e){qu(t,0);const n=t.getExtension(e);if(n){const r={},o=i6.exec(e)[1],i="_"+o;for(const s in n){const a=n[s],c=typeof a=="function",l=c?o:i;let u=s;s.endsWith(l)&&(u=s.substring(0,s.length-l.length)),t[u]!==void 0?!c&&t[u]!==a&&Lp(u,t[u],a,s):c?t[u]=function(f){return function(){return f.apply(n,arguments)}}(a):(t[u]=a,r[u]=a)}r.constructor={name:n.constructor.name},qu(r,0)}return n}const Qg=["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 Yg(t){for(let e=0;e<Qg.length;++e)o6(t,Qg[e])}function s6(t,e){const n=["webgl2","webgl","experimental-webgl"];let r=null;for(let o=0;o<n.length;++o)if(r=t.getContext(n[o],e),r){Yg(r);break}return r}function a6(t,e){return s6(t,e)}const c6=`out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
|
|
228
228
|
#if defined(ROUNDED_CORNERS) || defined(STROKED)
|
|
229
229
|
out vec2 vPosInPixels;
|
|
230
230
|
#endif
|
|
@@ -232,7 +232,7 @@ out vec2 vHalfSizeInPixels;/***Clamps the minimumSize and returns an opacity tha
|
|
|
232
232
|
#if defined(ROUNDED_CORNERS) || defined(STROKED)
|
|
233
233
|
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);
|
|
234
234
|
#endif
|
|
235
|
-
gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,
|
|
235
|
+
gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,l6=`#if defined(ROUNDED_CORNERS) || defined(STROKED)
|
|
236
236
|
in vec2 vPosInPixels;
|
|
237
237
|
#endif
|
|
238
238
|
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){
|
|
@@ -246,74 +246,74 @@ fragColor=distanceToColor(d,vFillColor,vStrokeColor,vHalfStrokeWidth);if(fragCol
|
|
|
246
246
|
#else
|
|
247
247
|
fragColor=vFillColor;
|
|
248
248
|
#endif
|
|
249
|
-
if(uPickingEnabled){fragColor=vPickingColor;}}`,
|
|
249
|
+
if(uPickingEnabled){fragColor=vPickingColor;}}`,u6=`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
250
|
#pragma markUniforms
|
|
251
|
-
};`;function Gn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Pr(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 uh=Symbol("implicit");function fh(){var e=new tr,t=[],n=[],r=uh;function i(o){let a=e.get(o);if(a===void 0){if(r!==uh)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new tr;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return fh(t,n).unknown(r)},Gn.apply(i,arguments),i}function Ao(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function os(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Lr(){}var _i=.7,Eo=1/_i,So="\\s*([+-]?\\d+)\\s*",as="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i8=/^#([0-9a-f]{3,8})$/,o8=new RegExp(`^rgb\\(${So},${So},${So}\\)$`),a8=new RegExp(`^rgb\\(${Hn},${Hn},${Hn}\\)$`),s8=new RegExp(`^rgba\\(${So},${So},${So},${as}\\)$`),c8=new RegExp(`^rgba\\(${Hn},${Hn},${Hn},${as}\\)$`),l8=new RegExp(`^hsl\\(${as},${Hn},${Hn}\\)$`),u8=new RegExp(`^hsla\\(${as},${Hn},${Hn},${as}\\)$`),u1={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};Ao(Lr,Nr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:f1,formatHex:f1,formatHex8:f8,formatHsl:h8,formatRgb:h1,toString:h1});function f1(){return this.rgb().formatHex()}function f8(){return this.rgb().formatHex8()}function h8(){return b1(this).formatHsl()}function h1(){return this.rgb().formatRgb()}function Nr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=i8.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?d1(t):n===3?new St(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Tl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Tl(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=o8.exec(e))?new St(t[1],t[2],t[3],1):(t=a8.exec(e))?new St(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=s8.exec(e))?Tl(t[1],t[2],t[3],t[4]):(t=c8.exec(e))?Tl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=l8.exec(e))?m1(t[1],t[2]/100,t[3]/100,1):(t=u8.exec(e))?m1(t[1],t[2]/100,t[3]/100,t[4]):u1.hasOwnProperty(e)?d1(u1[e]):e==="transparent"?new St(NaN,NaN,NaN,0):null}function d1(e){return new St(e>>16&255,e>>8&255,e&255,1)}function Tl(e,t,n,r){return r<=0&&(e=t=n=NaN),new St(e,t,n,r)}function hh(e){return e instanceof Lr||(e=Nr(e)),e?(e=e.rgb(),new St(e.r,e.g,e.b,e.opacity)):new St}function Il(e,t,n,r){return arguments.length===1?hh(e):new St(e,t,n,r??1)}function St(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ao(St,Il,os(Lr,{brighter(e){return e=e==null?Eo:Math.pow(Eo,e),new St(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_i:Math.pow(_i,e),new St(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new St(Ci(this.r),Ci(this.g),Ci(this.b),Dl(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:p1,formatHex:p1,formatHex8:d8,formatRgb:g1,toString:g1}));function p1(){return`#${Ti(this.r)}${Ti(this.g)}${Ti(this.b)}`}function d8(){return`#${Ti(this.r)}${Ti(this.g)}${Ti(this.b)}${Ti((isNaN(this.opacity)?1:this.opacity)*255)}`}function g1(){const e=Dl(this.opacity);return`${e===1?"rgb(":"rgba("}${Ci(this.r)}, ${Ci(this.g)}, ${Ci(this.b)}${e===1?")":`, ${e})`}`}function Dl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ci(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ti(e){return e=Ci(e),(e<16?"0":"")+e.toString(16)}function m1(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new kn(e,t,n,r)}function b1(e){if(e instanceof kn)return new kn(e.h,e.s,e.l,e.opacity);if(e instanceof Lr||(e=Nr(e)),!e)return new kn;if(e instanceof kn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new kn(a,s,c,e.opacity)}function dh(e,t,n,r){return arguments.length===1?b1(e):new kn(e,t,n,r??1)}function kn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ao(kn,dh,os(Lr,{brighter(e){return e=e==null?Eo:Math.pow(Eo,e),new kn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_i:Math.pow(_i,e),new kn(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 St(ph(e>=240?e-240:e+120,i,r),ph(e,i,r),ph(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new kn(y1(this.h),kl(this.s),kl(this.l),Dl(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=Dl(this.opacity);return`${e===1?"hsl(":"hsla("}${y1(this.h)}, ${kl(this.s)*100}%, ${kl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function y1(e){return e=(e||0)%360,e<0?e+360:e}function kl(e){return Math.max(0,Math.min(1,e||0))}function ph(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 w1=Math.PI/180,x1=180/Math.PI,Bl=18,v1=.96422,A1=1,E1=.82521,S1=4/29,_o=6/29,_1=3*_o*_o,p8=_o*_o*_o;function C1(e){if(e instanceof Vn)return new Vn(e.l,e.a,e.b,e.opacity);if(e instanceof cr)return T1(e);e instanceof St||(e=hh(e));var t=wh(e.r),n=wh(e.g),r=wh(e.b),i=mh((.2225045*t+.7168786*n+.0606169*r)/A1),o,a;return t===n&&n===r?o=a=i:(o=mh((.4360747*t+.3850649*n+.1430804*r)/v1),a=mh((.0139322*t+.0971045*n+.7141733*r)/E1)),new Vn(116*i-16,500*(o-i),200*(i-a),e.opacity)}function gh(e,t,n,r){return arguments.length===1?C1(e):new Vn(e,t,n,r??1)}function Vn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Ao(Vn,gh,os(Lr,{brighter(e){return new Vn(this.l+Bl*(e??1),this.a,this.b,this.opacity)},darker(e){return new Vn(this.l-Bl*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=v1*bh(t),e=A1*bh(e),n=E1*bh(n),new St(yh(3.1338561*t-1.6168667*e-.4906146*n),yh(-.9787684*t+1.9161415*e+.033454*n),yh(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function mh(e){return e>p8?Math.pow(e,1/3):e/_1+S1}function bh(e){return e>_o?e*e*e:_1*(e-S1)}function yh(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function wh(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function g8(e){if(e instanceof cr)return new cr(e.h,e.c,e.l,e.opacity);if(e instanceof Vn||(e=C1(e)),e.a===0&&e.b===0)return new cr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*x1;return new cr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function xh(e,t,n,r){return arguments.length===1?g8(e):new cr(e,t,n,r??1)}function cr(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function T1(e){if(isNaN(e.h))return new Vn(e.l,0,0,e.opacity);var t=e.h*w1;return new Vn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Ao(cr,xh,os(Lr,{brighter(e){return new cr(this.h,this.c,this.l+Bl*(e??1),this.opacity)},darker(e){return new cr(this.h,this.c,this.l-Bl*(e??1),this.opacity)},rgb(){return T1(this).rgb()}}));var I1=-.14861,vh=1.78277,Ah=-.29227,Rl=-.90649,ss=1.97294,D1=ss*Rl,k1=ss*vh,B1=vh*Ah-Rl*I1;function m8(e){if(e instanceof Ii)return new Ii(e.h,e.s,e.l,e.opacity);e instanceof St||(e=hh(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(B1*r+D1*t-k1*n)/(B1+D1-k1),o=r-i,a=(ss*(n-i)-Ah*o)/Rl,s=Math.sqrt(a*a+o*o)/(ss*i*(1-i)),c=s?Math.atan2(a,o)*x1-120:NaN;return new Ii(c<0?c+360:c,s,i,e.opacity)}function Eh(e,t,n,r){return arguments.length===1?m8(e):new Ii(e,t,n,r??1)}function Ii(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ao(Ii,Eh,os(Lr,{brighter(e){return e=e==null?Eo:Math.pow(Eo,e),new Ii(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_i:Math.pow(_i,e),new Ii(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*w1,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new St(255*(t+n*(I1*r+vh*i)),255*(t+n*(Ah*r+Rl*i)),255*(t+n*(ss*r)),this.opacity)}}));function R1(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function F1(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return R1((n-r/t)*t,a,i,o,s)}}function M1(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return R1((n-r/t)*t,i,o,a,s)}}const Fl=e=>()=>e;function P1(e,t){return function(n){return e+n*t}}function b8(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 Ml(e,t){var n=t-e;return n?P1(e,n>180||n<-180?n-360*Math.round(n/360):n):Fl(isNaN(e)?t:e)}function y8(e){return(e=+e)==1?_t:function(t,n){return n-t?b8(t,n,e):Fl(isNaN(t)?n:t)}}function _t(e,t){var n=t-e;return n?P1(e,n):Fl(isNaN(e)?t:e)}const Sh=function e(t){var n=y8(t);function r(i,o){var a=n((i=Il(i)).r,(o=Il(o)).r),s=n(i.g,o.g),c=n(i.b,o.b),l=_t(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=e,r}(1);function L1(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=Il(t[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=e(r),i=e(i),o=e(o),s.opacity=1,function(c){return s.r=r(c),s.g=i(c),s.b=o(c),s+""}}}var w8=L1(F1),x8=L1(M1);function _h(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function N1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function v8(e,t){return(N1(t)?_h:O1)(e,t)}function O1(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Or(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function z1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Bn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function U1(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]=Or(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Ch=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Th=new RegExp(Ch.source,"g");function A8(e){return function(){return e}}function E8(e){return function(t){return e(t)+""}}function G1(e,t){var n=Ch.lastIndex=Th.lastIndex=0,r,i,o,a=-1,s=[],c=[];for(e=e+"",t=t+"";(r=Ch.exec(e))&&(i=Th.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,c.push({i:a,x:Bn(r,i)})),n=Th.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?E8(c[0].x):A8(t):(t=c.length,function(l){for(var u=0,f;u<t;++u)s[(f=c[u]).i]=f.x(l);return s.join("")})}function Or(e,t){var n=typeof t,r;return t==null||n==="boolean"?Fl(t):(n==="number"?Bn:n==="string"?(r=Nr(t))?(t=r,Sh):G1:t instanceof Nr?Sh:t instanceof Date?z1:N1(t)?_h:Array.isArray(t)?O1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?U1:Bn)(e,t)}function S8(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function _8(e,t){var n=Ml(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function cs(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var H1=180/Math.PI,Ih={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function V1(e,t,n,r,i,o){var a,s,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*H1,skewX:Math.atan(c)*H1,scaleX:a,scaleY:s}}var Pl;function C8(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ih:V1(t.a,t.b,t.c,t.d,t.e,t.f)}function T8(e){return e==null||(Pl||(Pl=document.createElementNS("http://www.w3.org/2000/svg","g")),Pl.setAttribute("transform",e),!(e=Pl.transform.baseVal.consolidate()))?Ih:(e=e.matrix,V1(e.a,e.b,e.c,e.d,e.e,e.f))}function q1(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,u,f,h,d,p){if(l!==f||u!==h){var b=d.push("translate(",null,t,null,n);p.push({i:b-4,x:Bn(l,f)},{i:b-2,x:Bn(u,h)})}else(f||h)&&d.push("translate("+f+t+h+n)}function a(l,u,f,h){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Bn(l,u)})):u&&f.push(i(f)+"rotate("+u+r)}function s(l,u,f,h){l!==u?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Bn(l,u)}):u&&f.push(i(f)+"skewX("+u+r)}function c(l,u,f,h,d,p){if(l!==f||u!==h){var b=d.push(i(d)+"scale(",null,",",null,")");p.push({i:b-4,x:Bn(l,f)},{i:b-2,x:Bn(u,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(l,u){var f=[],h=[];return l=e(l),u=e(u),o(l.translateX,l.translateY,u.translateX,u.translateY,f,h),a(l.rotate,u.rotate,f,h),s(l.skewX,u.skewX,f,h),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,f,h),l=u=null,function(d){for(var p=-1,b=h.length,v;++p<b;)f[(v=h[p]).i]=v.x(d);return f.join("")}}}var I8=q1(C8,"px, ","px)","deg)"),D8=q1(T8,", ",")",")"),k8=1e-12;function j1(e){return((e=Math.exp(e))+1/e)/2}function B8(e){return((e=Math.exp(e))-1/e)/2}function R8(e){return((e=Math.exp(2*e))-1)/(e+1)}const F8=function e(t,n,r){function i(o,a){var s=o[0],c=o[1],l=o[2],u=a[0],f=a[1],h=a[2],d=u-s,p=f-c,b=d*d+p*p,v,y;if(b<k8)y=Math.log(h/l)/t,v=function(D){return[s+D*d,c+D*p,l*Math.exp(t*D*y)]};else{var A=Math.sqrt(b),_=(h*h-l*l+r*b)/(2*l*n*A),E=(h*h-l*l-r*b)/(2*h*n*A),C=Math.log(Math.sqrt(_*_+1)-_),R=Math.log(Math.sqrt(E*E+1)-E);y=(R-C)/t,v=function(D){var O=D*y,F=j1(C),P=l/(n*A)*(F*R8(t*O+C)-B8(C));return[s+P*d,c+P*p,l*F/j1(t*O+C)]}}return v.duration=y*1e3*t/Math.SQRT2,v}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,c=s*s;return e(a,s,c)},i}(Math.SQRT2,2,4);function W1(e){return function(t,n){var r=e((t=dh(t)).h,(n=dh(n)).h),i=_t(t.s,n.s),o=_t(t.l,n.l),a=_t(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const M8=W1(Ml);var P8=W1(_t);function L8(e,t){var n=_t((e=gh(e)).l,(t=gh(t)).l),r=_t(e.a,t.a),i=_t(e.b,t.b),o=_t(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=i(a),e.opacity=o(a),e+""}}function Z1(e){return function(t,n){var r=e((t=xh(t)).h,(n=xh(n)).h),i=_t(t.c,n.c),o=_t(t.l,n.l),a=_t(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const N8=Z1(Ml);var O8=Z1(_t);function Y1(e){return function t(n){n=+n;function r(i,o){var a=e((i=Eh(i)).h,(o=Eh(o)).h),s=_t(i.s,o.s),c=_t(i.l,o.l),l=_t(i.opacity,o.opacity);return function(u){return i.h=a(u),i.s=s(u),i.l=c(Math.pow(u,n)),i.opacity=l(u),i+""}}return r.gamma=t,r}(1)}const z8=Y1(Ml);var U8=Y1(_t);function Dh(e,t){t===void 0&&(t=e,e=Or);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function G8(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}const H8=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Or,interpolateArray:v8,interpolateBasis:F1,interpolateBasisClosed:M1,interpolateCubehelix:z8,interpolateCubehelixLong:U8,interpolateDate:z1,interpolateDiscrete:S8,interpolateHcl:N8,interpolateHclLong:O8,interpolateHsl:M8,interpolateHslLong:P8,interpolateHue:_8,interpolateLab:L8,interpolateNumber:Bn,interpolateNumberArray:_h,interpolateObject:U1,interpolateRgb:Sh,interpolateRgbBasis:w8,interpolateRgbBasisClosed:x8,interpolateRound:cs,interpolateString:G1,interpolateTransformCss:I8,interpolateTransformSvg:D8,interpolateZoom:F8,piecewise:Dh,quantize:G8},Symbol.toStringTag,{value:"Module"}));function V8(e){return function(){return e}}function kh(e){return+e}var Q1=[0,1];function Jt(e){return e}function Bh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:V8(isNaN(t)?NaN:.5)}function q8(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function j8(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Bh(i,r),o=n(a,o)):(r=Bh(r,i),o=n(o,a)),function(s){return o(r(s))}}function W8(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Bh(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var c=Cr(e,s,1,r)-1;return o[c](i[c](s))}}function ls(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ll(){var e=Q1,t=Q1,n=Or,r,i,o,a=Jt,s,c,l;function u(){var h=Math.min(e.length,t.length);return a!==Jt&&(a=q8(e[0],e[h-1])),s=h>2?W8:j8,c=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(c||(c=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(t,e.map(r),Bn)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,kh),u()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=cs,u()},f.clamp=function(h){return arguments.length?(a=h?!0:Jt,u()):a!==Jt},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,d){return r=h,i=d,u()}}function X1(){return Ll()(Jt,Jt)}function K1(e,t,n,r){var i=pi(e,t,n),o;switch(r=uo(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=SE(i,a))&&(r.precision=o),_g(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=_E(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=EE(i))&&(r.precision=o-(r.type==="%")*2);break}}return Nt(r)}function Di(e){var t=e.domain;return e.ticks=function(n){var r=t();return Zc(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return K1(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],c,l,u=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);u-- >0;){if(l=hf(a,s,n),l===c)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function J1(){var e=X1();return e.copy=function(){return ls(e,J1())},Gn.apply(e,arguments),Di(e)}function $1(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,kh),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return $1(e).unknown(t)},e=arguments.length?Array.from(e,kh):[0,1],Di(n)}function eb(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function tb(e){return Math.log(e)}function nb(e){return Math.exp(e)}function Z8(e){return-Math.log(-e)}function Y8(e){return-Math.exp(-e)}function Q8(e){return isFinite(e)?+("1e"+e):e<0?0:e}function X8(e){return e===10?Q8:e===Math.E?Math.exp:t=>Math.pow(e,t)}function K8(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 rb(e){return(t,n)=>-e(-t,n)}function Rh(e){const t=e(tb,nb),n=t.domain;let r=10,i,o;function a(){return i=K8(r),o=X8(r),n()[0]<0?(i=rb(i),o=rb(o),e(Z8,Y8)):e(tb,nb),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const c=n();let l=c[0],u=c[c.length-1];const f=u<l;f&&([l,u]=[u,l]);let h=i(l),d=i(u),p,b;const v=s==null?10:+s;let y=[];if(!(r%1)&&d-h<v){if(h=Math.floor(h),d=Math.ceil(d),l>0){for(;h<=d;++h)for(p=1;p<r;++p)if(b=h<0?p/o(-h):p*o(h),!(b<l)){if(b>u)break;y.push(b)}}else for(;h<=d;++h)for(p=r-1;p>=1;--p)if(b=h>0?p/o(-h):p*o(h),!(b<l)){if(b>u)break;y.push(b)}y.length*2<v&&(y=Zc(l,u,v))}else y=Zc(h,d,Math.min(d-h,v)).map(o);return f?y.reverse():y},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=uo(c)).precision==null&&(c.trim=!0),c=Nt(c)),s===1/0)return c;const l=Math.max(1,r*s/t.ticks().length);return u=>{let f=u/o(Math.round(i(u)));return f*r<r-.5&&(f*=r),f<=l?c(u):""}},t.nice=()=>n(eb(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function Fh(){const e=Rh(Ll()).domain([1,10]);return e.copy=()=>ls(e,Fh()).base(e.base()),Gn.apply(e,arguments),e}function ib(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ob(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Mh(e){var t=1,n=e(ib(t),ob(t));return n.constant=function(r){return arguments.length?e(ib(t=+r),ob(t)):t},Di(n)}function ab(){var e=Mh(Ll());return e.copy=function(){return ls(e,ab()).constant(e.constant())},Gn.apply(e,arguments)}function sb(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function J8(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function $8(e){return e<0?-e*e:e*e}function Ph(e){var t=e(Jt,Jt),n=1;function r(){return n===1?e(Jt,Jt):n===.5?e(J8,$8):e(sb(n),sb(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Di(t)}function Lh(){var e=Ph(Ll());return e.copy=function(){return ls(e,Lh()).exponent(e.exponent())},Gn.apply(e,arguments),e}function e5(){return Lh.apply(null,arguments).exponent(.5)}function cb(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=yg(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[Cr(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(di),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return cb().domain(e).range(t).unknown(r)},Gn.apply(o,arguments)}function lb(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(c){return c!=null&&c<=c?i[Cr(r,c,0,n)]:o}function s(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return a}return a.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,s()):[e,t]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,s()):i.slice()},a.invertExtent=function(c){var l=i.indexOf(c);return l<0?[NaN,NaN]:l<1?[e,r[0]]:l>=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return lb().domain([e,t]).range(i).unknown(o)},Gn.apply(Di(a),arguments)}function ub(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Cr(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return ub().domain(e).range(t).unknown(n)},Gn.apply(i,arguments)}function t5(e){return new Date(e)}function n5(e){return e instanceof Date?+e:+new Date(+e)}function Nh(e,t,n,r,i,o,a,s,c,l){var u=X1(),f=u.invert,h=u.domain,d=l(".%L"),p=l(":%S"),b=l("%I:%M"),v=l("%I %p"),y=l("%a %d"),A=l("%b %d"),_=l("%B"),E=l("%Y");function C(R){return(c(R)<R?d:s(R)<R?p:a(R)<R?b:o(R)<R?v:r(R)<R?i(R)<R?y:A:n(R)<R?_:E)(R)}return u.invert=function(R){return new Date(f(R))},u.domain=function(R){return arguments.length?h(Array.from(R,n5)):h().map(t5)},u.ticks=function(R){var D=h();return e(D[0],D[D.length-1],R??10)},u.tickFormat=function(R,D){return D==null?C:l(D)},u.nice=function(R){var D=h();return(!R||typeof R.range!="function")&&(R=t(D[0],D[D.length-1],R??10)),R?h(eb(D,R)):u},u.copy=function(){return ls(u,Nh(e,t,n,r,i,o,a,s,c,l))},u}function r5(){return Gn.apply(Nh(LE,NE,On,Na,Pa,Tr,Jc,Xc,or,Ef).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function i5(){return Gn.apply(Nh(ME,PE,zn,Oa,La,gi,$c,Kc,or,Sf).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Nl(){var e=0,t=1,n,r,i,o,a=Jt,s=!1,c;function l(f){return f==null||isNaN(f=+f)?c:a(i===0?.5:(f=(o(f)-n)*i,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([e,t]=f,n=o(e=+e),r=o(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?(a=f,l):a};function u(f){return function(h){var d,p;return arguments.length?([d,p]=h,a=f(d,p),l):[a(0),a(1)]}}return l.range=u(Or),l.rangeRound=u(cs),l.unknown=function(f){return arguments.length?(c=f,l):c},function(f){return o=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),l}}function zr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Oh(){var e=Di(Nl()(Jt));return e.copy=function(){return zr(e,Oh())},Pr.apply(e,arguments)}function fb(){var e=Rh(Nl()).domain([1,10]);return e.copy=function(){return zr(e,fb()).base(e.base())},Pr.apply(e,arguments)}function hb(){var e=Mh(Nl());return e.copy=function(){return zr(e,hb()).constant(e.constant())},Pr.apply(e,arguments)}function zh(){var e=Ph(Nl());return e.copy=function(){return zr(e,zh()).exponent(e.exponent())},Pr.apply(e,arguments)}function o5(){return zh.apply(null,arguments).exponent(.5)}function Ol(){var e=0,t=.5,n=1,r=1,i,o,a,s,c,l=Jt,u,f=!1,h;function d(b){return isNaN(b=+b)?h:(b=.5+((b=+u(b))-o)*(r*b<r*o?s:c),l(f?Math.max(0,Math.min(1,b)):b))}d.domain=function(b){return arguments.length?([e,t,n]=b,i=u(e=+e),o=u(t=+t),a=u(n=+n),s=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,d):[e,t,n]},d.clamp=function(b){return arguments.length?(f=!!b,d):f},d.interpolator=function(b){return arguments.length?(l=b,d):l};function p(b){return function(v){var y,A,_;return arguments.length?([y,A,_]=v,l=Dh(b,[y,A,_]),d):[l(0),l(.5),l(1)]}}return d.range=p(Or),d.rangeRound=p(cs),d.unknown=function(b){return arguments.length?(h=b,d):h},function(b){return u=b,i=b(e),o=b(t),a=b(n),s=i===o?0:.5/(o-i),c=o===a?0:.5/(a-o),r=o<i?-1:1,d}}function db(){var e=Di(Ol()(Jt));return e.copy=function(){return zr(e,db())},Pr.apply(e,arguments)}function pb(){var e=Rh(Ol()).domain([.1,1,10]);return e.copy=function(){return zr(e,pb()).base(e.base())},Pr.apply(e,arguments)}function gb(){var e=Mh(Ol());return e.copy=function(){return zr(e,gb()).constant(e.constant())},Pr.apply(e,arguments)}function Uh(){var e=Ph(Ol());return e.copy=function(){return zr(e,Uh()).exponent(e.exponent())},Pr.apply(e,arguments)}function a5(){return Uh.apply(null,arguments).exponent(.5)}function qn(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const s5=qn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),c5=qn("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),l5=qn("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),u5=qn("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),f5=qn("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),h5=qn("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),d5=qn("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),p5=qn("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),g5=qn("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),m5=qn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function Gh(e,t,n){const r=e-t+n*2;return e?r>0?r:1:0}const b5="identity",Co="linear",Ur="log",us="pow",fs="sqrt",zl="symlog",mb="time",bb="utc",jn="sequential",To="diverging",Hh="quantile",yb="quantize",wb="threshold",Vh="ordinal",qh="point",xb="band",jh="bin-ordinal",xt="continuous",hs="discrete",ds="discretizing",mn="interpolating",vb="temporal";function y5(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 w5(e){return function(t){const n=e.range();let r=t[0],i=t[1],o=-1,a,s,c,l;for(i<r&&(s=r,r=i,i=s),c=0,l=n.length;c<l;++c)n[c]>=r&&n[c]<=i&&(o<0&&(o=c),a=c);if(!(o<0))return r=e.invertExtent(n[o]),i=e.invertExtent(n[a]),[r[0]===void 0?r[1]:r[0],i[1]===void 0?i[0]:i[1]]}}function Wh(){const e=fh().unknown(void 0),t=e.domain,n=e.range;let r=[0,1],i,o,a=!1,s=0,c=0,l=.5;delete e.unknown;function u(){const f=t().length,h=r[1]<r[0],d=r[1-h],p=Gh(f,s,c);let b=r[h-0];i=(d-b)/(p||1),a&&(i=Math.floor(i)),b+=(d-b-i*(f-s))*l,o=i*(1-s),a&&(b=Math.round(b),o=Math.round(o));const v=Fa(f).map(y=>b+i*y);return n(h?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),u()):t()},e.range=function(f){return arguments.length?(r=[+f[0],+f[1]],u()):r.slice()},e.rangeRound=function(f){return r=[+f[0],+f[1]],a=!0,u()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(f){return arguments.length?(a=!!f,u()):a},e.padding=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),s=c,u()):s},e.paddingInner=function(f){return arguments.length?(s=Math.max(0,Math.min(1,f)),u()):s},e.paddingOuter=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),u()):c},e.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),u()):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 b=+f[0],v=+f[1],y,A,_;if(!(b!==b||v!==v)&&(v<b&&(_=b,b=v,v=_),!(v<d[0]||b>r[1-h])))return y=Math.max(0,Cr(d,b)-1),A=b===v?y:Cr(d,v)-1,b-d[y]>o+1e-10&&++y,h&&(_=y,y=p-A,A=p-_),y>A?void 0:t().slice(y,A+1)},e.invert=function(f){const h=e.invertRange([f,f]);return h&&h[0]},e.copy=function(){return Wh().domain(t()).range(r).round(a).paddingInner(s).paddingOuter(c).align(l)},u()}function Ab(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return Ab(t())},e}function x5(){return Ab(Wh().paddingInner(1))}var v5=Array.prototype.map;function A5(e){return v5.call(e,va)}const E5=Array.prototype.slice;function Eb(){let e=[],t=[];function n(r){return r==null||r!==r?void 0:t[(Cr(e,r)-1)%t.length]}return n.domain=function(r){return arguments.length?(e=A5(r),n):e.slice()},n.range=function(r){return arguments.length?(t=E5.call(r),n):t.slice()},n.tickFormat=function(r,i){return K1(e[0],Tn(e),r??10,i)},n.copy=function(){return Eb().domain(n.domain()).range(n.range())},n}const Ul=new Map,S5=Symbol("vega_scale");function _5(e){return e[S5]=!0,e}function C5(e,t,n){const r=function(){const o=t();return o.invertRange||(o.invertRange=o.invert?y5(o):o.invertExtent?w5(o):void 0),o.type=e,_5(o)};return r.metadata=Uc(Ju(n)),r}function Xe(e,t,n){return arguments.length>1?(Ul.set(e,C5(e,t,n)),this):T5(e)?Ul.get(e):void 0}Xe(b5,$1),Xe(Co,J1,xt),Xe(Ur,Fh,[xt,Ur]),Xe(us,Lh,xt),Xe(fs,e5,xt),Xe(zl,ab,xt),Xe(mb,r5,[xt,vb]),Xe(bb,i5,[xt,vb]),Xe(jn,Oh,[xt,mn]),Xe(`${jn}-${Co}`,Oh,[xt,mn]),Xe(`${jn}-${Ur}`,fb,[xt,mn,Ur]),Xe(`${jn}-${us}`,zh,[xt,mn]),Xe(`${jn}-${fs}`,o5,[xt,mn]),Xe(`${jn}-${zl}`,hb,[xt,mn]),Xe(`${To}-${Co}`,db,[xt,mn]),Xe(`${To}-${Ur}`,pb,[xt,mn,Ur]),Xe(`${To}-${us}`,Uh,[xt,mn]),Xe(`${To}-${fs}`,a5,[xt,mn]),Xe(`${To}-${zl}`,gb,[xt,mn]),Xe(Hh,cb,[ds,Hh]),Xe(yb,lb,ds),Xe(wb,ub,ds),Xe(jh,Eb,[hs,ds]),Xe(Vh,fh,hs),Xe(xb,Wh,hs),Xe(qh,x5,hs);function T5(e){return Ul.has(e)}function ps(e,t){const n=Ul.get(e);return n&&n.metadata[t]}function Rt(e){return ps(e,xt)}function Gr(e){return ps(e,hs)}function ki(e){return ps(e,ds)}function Sb(e){return ps(e,Ur)}function Gl(e){return ps(e,mn)}function I5(e,t){const n=t[0],r=Tn(t)-n;return function(i){return e(n+i*r)}}function Hl(e,t,n){return Dh(_b(t||"rgb",n),e)}function D5(e,t){const n=new Array(t),r=t+1;for(let i=0;i<t;)n[i]=e(++i/r);return n}function _b(e,t){const n=H8[k5(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function k5(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const B5={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"},R5={accent:c5,category10:s5,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:l5,observable10:u5,paired:f5,pastel1:h5,pastel2:d5,set1:p5,set2:g5,set3:m5,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function Cb(e){if(Bt(e))return 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 Tb(e,t){for(const n in e)Zh(n,t(e[n]))}const Ib={};Tb(R5,Cb),Tb(B5,e=>Hl(Cb(e)));function Zh(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(Ib[e]=t,this):Ib[e]}function Ke(e,t=e){if(/^[A-Za-z0-9_]+$/.test(e)){const n=function(i){e in i||F5(i,e)},r=new Function("validator",`
|
|
251
|
+
};`;function Rn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function vr(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const hf=Symbol("implicit");function df(){var t=new Vn,e=[],n=[],r=hf;function o(i){let s=t.get(i);if(s===void 0){if(r!==hf)return r;t.set(i,s=e.push(i)-1)}return n[s%n.length]}return o.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new Vn;for(const s of i)t.has(s)||t.set(s,e.push(s)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return df(e,n).unknown(r)},Rn.apply(o,arguments),o}function Ji(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ts(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ar(){}var ii=.7,$i=1/ii,eo="\\s*([+-]?\\d+)\\s*",Ds="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f6=/^#([0-9a-f]{3,8})$/,h6=new RegExp(`^rgb\\(${eo},${eo},${eo}\\)$`),d6=new RegExp(`^rgb\\(${Fn},${Fn},${Fn}\\)$`),p6=new RegExp(`^rgba\\(${eo},${eo},${eo},${Ds}\\)$`),g6=new RegExp(`^rgba\\(${Fn},${Fn},${Fn},${Ds}\\)$`),m6=new RegExp(`^hsl\\(${Ds},${Fn},${Fn}\\)$`),b6=new RegExp(`^hsla\\(${Ds},${Fn},${Fn},${Ds}\\)$`),Zg={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};Ji(Ar,Er,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Xg,formatHex:Xg,formatHex8:y6,formatHsl:w6,formatRgb:Kg,toString:Kg});function Xg(){return this.rgb().formatHex()}function y6(){return this.rgb().formatHex8()}function w6(){return nm(this).formatHsl()}function Kg(){return this.rgb().formatRgb()}function Er(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=f6.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Jg(e):n===3?new At(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Oc(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Oc(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=h6.exec(t))?new At(e[1],e[2],e[3],1):(e=d6.exec(t))?new At(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=p6.exec(t))?Oc(e[1],e[2],e[3],e[4]):(e=g6.exec(t))?Oc(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=m6.exec(t))?tm(e[1],e[2]/100,e[3]/100,1):(e=b6.exec(t))?tm(e[1],e[2]/100,e[3]/100,e[4]):Zg.hasOwnProperty(t)?Jg(Zg[t]):t==="transparent"?new At(NaN,NaN,NaN,0):null}function Jg(t){return new At(t>>16&255,t>>8&255,t&255,1)}function Oc(t,e,n,r){return r<=0&&(t=e=n=NaN),new At(t,e,n,r)}function pf(t){return t instanceof Ar||(t=Er(t)),t?(t=t.rgb(),new At(t.r,t.g,t.b,t.opacity)):new At}function zc(t,e,n,r){return arguments.length===1?pf(t):new At(t,e,n,r??1)}function At(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Ji(At,zc,Ts(Ar,{brighter(t){return t=t==null?$i:Math.pow($i,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ii:Math.pow(ii,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new At(oi(this.r),oi(this.g),oi(this.b),Uc(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:$g,formatHex:$g,formatHex8:x6,formatRgb:em,toString:em}));function $g(){return`#${si(this.r)}${si(this.g)}${si(this.b)}`}function x6(){return`#${si(this.r)}${si(this.g)}${si(this.b)}${si((isNaN(this.opacity)?1:this.opacity)*255)}`}function em(){const t=Uc(this.opacity);return`${t===1?"rgb(":"rgba("}${oi(this.r)}, ${oi(this.g)}, ${oi(this.b)}${t===1?")":`, ${t})`}`}function Uc(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function oi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function si(t){return t=oi(t),(t<16?"0":"")+t.toString(16)}function tm(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xn(t,e,n,r)}function nm(t){if(t instanceof xn)return new xn(t.h,t.s,t.l,t.opacity);if(t instanceof Ar||(t=Er(t)),!t)return new xn;if(t instanceof xn)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),s=NaN,a=i-o,c=(i+o)/2;return a?(e===i?s=(n-r)/a+(n<r)*6:n===i?s=(r-e)/a+2:s=(e-n)/a+4,a/=c<.5?i+o:2-i-o,s*=60):a=c>0&&c<1?0:s,new xn(s,a,c,t.opacity)}function gf(t,e,n,r){return arguments.length===1?nm(t):new xn(t,e,n,r??1)}function xn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ji(xn,gf,Ts(Ar,{brighter(t){return t=t==null?$i:Math.pow($i,t),new xn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ii:Math.pow(ii,t),new xn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new At(mf(t>=240?t-240:t+120,o,r),mf(t,o,r),mf(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new xn(rm(this.h),Gc(this.s),Gc(this.l),Uc(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 t=Uc(this.opacity);return`${t===1?"hsl(":"hsla("}${rm(this.h)}, ${Gc(this.s)*100}%, ${Gc(this.l)*100}%${t===1?")":`, ${t})`}`}}));function rm(t){return t=(t||0)%360,t<0?t+360:t}function Gc(t){return Math.max(0,Math.min(1,t||0))}function mf(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const im=Math.PI/180,om=180/Math.PI,Hc=18,sm=.96422,am=1,cm=.82521,lm=4/29,to=6/29,um=3*to*to,v6=to*to*to;function fm(t){if(t instanceof Mn)return new Mn(t.l,t.a,t.b,t.opacity);if(t instanceof Xn)return hm(t);t instanceof At||(t=pf(t));var e=vf(t.r),n=vf(t.g),r=vf(t.b),o=yf((.2225045*e+.7168786*n+.0606169*r)/am),i,s;return e===n&&n===r?i=s=o:(i=yf((.4360747*e+.3850649*n+.1430804*r)/sm),s=yf((.0139322*e+.0971045*n+.7141733*r)/cm)),new Mn(116*o-16,500*(i-o),200*(o-s),t.opacity)}function bf(t,e,n,r){return arguments.length===1?fm(t):new Mn(t,e,n,r??1)}function Mn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Ji(Mn,bf,Ts(Ar,{brighter(t){return new Mn(this.l+Hc*(t??1),this.a,this.b,this.opacity)},darker(t){return new Mn(this.l-Hc*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=sm*wf(e),t=am*wf(t),n=cm*wf(n),new At(xf(3.1338561*e-1.6168667*t-.4906146*n),xf(-.9787684*e+1.9161415*t+.033454*n),xf(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function yf(t){return t>v6?Math.pow(t,1/3):t/um+lm}function wf(t){return t>to?t*t*t:um*(t-lm)}function xf(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function vf(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function A6(t){if(t instanceof Xn)return new Xn(t.h,t.c,t.l,t.opacity);if(t instanceof Mn||(t=fm(t)),t.a===0&&t.b===0)return new Xn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*om;return new Xn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Af(t,e,n,r){return arguments.length===1?A6(t):new Xn(t,e,n,r??1)}function Xn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function hm(t){if(isNaN(t.h))return new Mn(t.l,0,0,t.opacity);var e=t.h*im;return new Mn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Ji(Xn,Af,Ts(Ar,{brighter(t){return new Xn(this.h,this.c,this.l+Hc*(t??1),this.opacity)},darker(t){return new Xn(this.h,this.c,this.l-Hc*(t??1),this.opacity)},rgb(){return hm(this).rgb()}}));var dm=-.14861,Ef=1.78277,Sf=-.29227,Vc=-.90649,Bs=1.97294,pm=Bs*Vc,gm=Bs*Ef,mm=Ef*Sf-Vc*dm;function E6(t){if(t instanceof ai)return new ai(t.h,t.s,t.l,t.opacity);t instanceof At||(t=pf(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(mm*r+pm*e-gm*n)/(mm+pm-gm),i=r-o,s=(Bs*(n-o)-Sf*i)/Vc,a=Math.sqrt(s*s+i*i)/(Bs*o*(1-o)),c=a?Math.atan2(s,i)*om-120:NaN;return new ai(c<0?c+360:c,a,o,t.opacity)}function Cf(t,e,n,r){return arguments.length===1?E6(t):new ai(t,e,n,r??1)}function ai(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ji(ai,Cf,Ts(Ar,{brighter(t){return t=t==null?$i:Math.pow($i,t),new ai(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ii:Math.pow(ii,t),new ai(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*im,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new At(255*(e+n*(dm*r+Ef*o)),255*(e+n*(Sf*r+Vc*o)),255*(e+n*(Bs*r)),this.opacity)}}));function bm(t,e,n,r,o){var i=t*t,s=i*t;return((1-3*t+3*i-s)*e+(4-6*i+3*s)*n+(1+3*t+3*i-3*s)*r+s*o)/6}function ym(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[r],i=t[r+1],s=r>0?t[r-1]:2*o-i,a=r<e-1?t[r+2]:2*i-o;return bm((n-r/e)*e,s,o,i,a)}}function wm(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),o=t[(r+e-1)%e],i=t[r%e],s=t[(r+1)%e],a=t[(r+2)%e];return bm((n-r/e)*e,o,i,s,a)}}const qc=t=>()=>t;function xm(t,e){return function(n){return t+n*e}}function S6(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function jc(t,e){var n=e-t;return n?xm(t,n>180||n<-180?n-360*Math.round(n/360):n):qc(isNaN(t)?e:t)}function C6(t){return(t=+t)==1?Et:function(e,n){return n-e?S6(e,n,t):qc(isNaN(e)?n:e)}}function Et(t,e){var n=e-t;return n?xm(t,n):qc(isNaN(t)?e:t)}const If=function t(e){var n=C6(e);function r(o,i){var s=n((o=zc(o)).r,(i=zc(i)).r),a=n(o.g,i.g),c=n(o.b,i.b),l=Et(o.opacity,i.opacity);return function(u){return o.r=s(u),o.g=a(u),o.b=c(u),o.opacity=l(u),o+""}}return r.gamma=t,r}(1);function vm(t){return function(e){var n=e.length,r=new Array(n),o=new Array(n),i=new Array(n),s,a;for(s=0;s<n;++s)a=zc(e[s]),r[s]=a.r||0,o[s]=a.g||0,i[s]=a.b||0;return r=t(r),o=t(o),i=t(i),a.opacity=1,function(c){return a.r=r(c),a.g=o(c),a.b=i(c),a+""}}}var I6=vm(ym),T6=vm(wm);function Tf(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=t[o]*(1-i)+e[o]*i;return r}}function Am(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function D6(t,e){return(Am(e)?Tf:Em)(t,e)}function Em(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=Sr(t[s],e[s]);for(;s<n;++s)i[s]=e[s];return function(a){for(s=0;s<r;++s)i[s]=o[s](a);return i}}function Sm(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function vn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Cm(t,e){var n={},r={},o;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(o in e)o in t?n[o]=Sr(t[o],e[o]):r[o]=e[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Df=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bf=new RegExp(Df.source,"g");function B6(t){return function(){return t}}function _6(t){return function(e){return t(e)+""}}function Im(t,e){var n=Df.lastIndex=Bf.lastIndex=0,r,o,i,s=-1,a=[],c=[];for(t=t+"",e=e+"";(r=Df.exec(t))&&(o=Bf.exec(e));)(i=o.index)>n&&(i=e.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(r=r[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,c.push({i:s,x:vn(r,o)})),n=Bf.lastIndex;return n<e.length&&(i=e.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?c[0]?_6(c[0].x):B6(e):(e=c.length,function(l){for(var u=0,f;u<e;++u)a[(f=c[u]).i]=f.x(l);return a.join("")})}function Sr(t,e){var n=typeof e,r;return e==null||n==="boolean"?qc(e):(n==="number"?vn:n==="string"?(r=Er(e))?(e=r,If):Im:e instanceof Er?If:e instanceof Date?Sm:Am(e)?Tf:Array.isArray(e)?Em:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Cm:vn)(t,e)}function k6(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function R6(t,e){var n=jc(+t,+e);return function(r){var o=n(r);return o-360*Math.floor(o/360)}}function _s(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Tm=180/Math.PI,_f={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Dm(t,e,n,r,o,i){var s,a,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,c/=a),t*r<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*Tm,skewX:Math.atan(c)*Tm,scaleX:s,scaleY:a}}var Wc;function F6(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?_f:Dm(e.a,e.b,e.c,e.d,e.e,e.f)}function M6(t){return t==null||(Wc||(Wc=document.createElementNS("http://www.w3.org/2000/svg","g")),Wc.setAttribute("transform",t),!(t=Wc.transform.baseVal.consolidate()))?_f:(t=t.matrix,Dm(t.a,t.b,t.c,t.d,t.e,t.f))}function Bm(t,e,n,r){function o(l){return l.length?l.pop()+" ":""}function i(l,u,f,h,d,p){if(l!==f||u!==h){var y=d.push("translate(",null,e,null,n);p.push({i:y-4,x:vn(l,f)},{i:y-2,x:vn(u,h)})}else(f||h)&&d.push("translate("+f+e+h+n)}function s(l,u,f,h){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),h.push({i:f.push(o(f)+"rotate(",null,r)-2,x:vn(l,u)})):u&&f.push(o(f)+"rotate("+u+r)}function a(l,u,f,h){l!==u?h.push({i:f.push(o(f)+"skewX(",null,r)-2,x:vn(l,u)}):u&&f.push(o(f)+"skewX("+u+r)}function c(l,u,f,h,d,p){if(l!==f||u!==h){var y=d.push(o(d)+"scale(",null,",",null,")");p.push({i:y-4,x:vn(l,f)},{i:y-2,x:vn(u,h)})}else(f!==1||h!==1)&&d.push(o(d)+"scale("+f+","+h+")")}return function(l,u){var f=[],h=[];return l=t(l),u=t(u),i(l.translateX,l.translateY,u.translateX,u.translateY,f,h),s(l.rotate,u.rotate,f,h),a(l.skewX,u.skewX,f,h),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,f,h),l=u=null,function(d){for(var p=-1,y=h.length,v;++p<y;)f[(v=h[p]).i]=v.x(d);return f.join("")}}}var P6=Bm(F6,"px, ","px)","deg)"),L6=Bm(M6,", ",")",")"),N6=1e-12;function _m(t){return((t=Math.exp(t))+1/t)/2}function O6(t){return((t=Math.exp(t))-1/t)/2}function z6(t){return((t=Math.exp(2*t))-1)/(t+1)}const U6=function t(e,n,r){function o(i,s){var a=i[0],c=i[1],l=i[2],u=s[0],f=s[1],h=s[2],d=u-a,p=f-c,y=d*d+p*p,v,b;if(y<N6)b=Math.log(h/l)/e,v=function(B){return[a+B*d,c+B*p,l*Math.exp(e*B*b)]};else{var A=Math.sqrt(y),C=(h*h-l*l+r*y)/(2*l*n*A),E=(h*h-l*l-r*y)/(2*h*n*A),I=Math.log(Math.sqrt(C*C+1)-C),R=Math.log(Math.sqrt(E*E+1)-E);b=(R-I)/e,v=function(B){var O=B*b,F=_m(I),P=l/(n*A)*(F*z6(e*O+I)-O6(I));return[a+P*d,c+P*p,l*F/_m(e*O+I)]}}return v.duration=b*1e3*e/Math.SQRT2,v}return o.rho=function(i){var s=Math.max(.001,+i),a=s*s,c=a*a;return t(s,a,c)},o}(Math.SQRT2,2,4);function km(t){return function(e,n){var r=t((e=gf(e)).h,(n=gf(n)).h),o=Et(e.s,n.s),i=Et(e.l,n.l),s=Et(e.opacity,n.opacity);return function(a){return e.h=r(a),e.s=o(a),e.l=i(a),e.opacity=s(a),e+""}}}const G6=km(jc);var H6=km(Et);function V6(t,e){var n=Et((t=bf(t)).l,(e=bf(e)).l),r=Et(t.a,e.a),o=Et(t.b,e.b),i=Et(t.opacity,e.opacity);return function(s){return t.l=n(s),t.a=r(s),t.b=o(s),t.opacity=i(s),t+""}}function Rm(t){return function(e,n){var r=t((e=Af(e)).h,(n=Af(n)).h),o=Et(e.c,n.c),i=Et(e.l,n.l),s=Et(e.opacity,n.opacity);return function(a){return e.h=r(a),e.c=o(a),e.l=i(a),e.opacity=s(a),e+""}}}const q6=Rm(jc);var j6=Rm(Et);function Fm(t){return function e(n){n=+n;function r(o,i){var s=t((o=Cf(o)).h,(i=Cf(i)).h),a=Et(o.s,i.s),c=Et(o.l,i.l),l=Et(o.opacity,i.opacity);return function(u){return o.h=s(u),o.s=a(u),o.l=c(Math.pow(u,n)),o.opacity=l(u),o+""}}return r.gamma=e,r}(1)}const W6=Fm(jc);var Q6=Fm(Et);function kf(t,e){e===void 0&&(e=t,t=Sr);for(var n=0,r=e.length-1,o=e[0],i=new Array(r<0?0:r);n<r;)i[n]=t(o,o=e[++n]);return function(s){var a=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[a](s-a)}}function Y6(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}const Z6=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Sr,interpolateArray:D6,interpolateBasis:ym,interpolateBasisClosed:wm,interpolateCubehelix:W6,interpolateCubehelixLong:Q6,interpolateDate:Sm,interpolateDiscrete:k6,interpolateHcl:q6,interpolateHclLong:j6,interpolateHsl:G6,interpolateHslLong:H6,interpolateHue:R6,interpolateLab:V6,interpolateNumber:vn,interpolateNumberArray:Tf,interpolateObject:Cm,interpolateRgb:If,interpolateRgbBasis:I6,interpolateRgbBasisClosed:T6,interpolateRound:_s,interpolateString:Im,interpolateTransformCss:P6,interpolateTransformSvg:L6,interpolateZoom:U6,piecewise:kf,quantize:Y6},Symbol.toStringTag,{value:"Module"}));function X6(t){return function(){return t}}function Rf(t){return+t}var Mm=[0,1];function Qt(t){return t}function Ff(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:X6(isNaN(e)?NaN:.5)}function K6(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function J6(t,e,n){var r=t[0],o=t[1],i=e[0],s=e[1];return o<r?(r=Ff(o,r),i=n(s,i)):(r=Ff(r,o),i=n(i,s)),function(a){return i(r(a))}}function $6(t,e,n){var r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)o[s]=Ff(t[s],t[s+1]),i[s]=n(e[s],e[s+1]);return function(a){var c=dr(t,a,1,r)-1;return i[c](o[c](a))}}function ks(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Qc(){var t=Mm,e=Mm,n=Sr,r,o,i,s=Qt,a,c,l;function u(){var h=Math.min(t.length,e.length);return s!==Qt&&(s=K6(t[0],t[h-1])),a=h>2?$6:J6,c=l=null,f}function f(h){return h==null||isNaN(h=+h)?i:(c||(c=a(t.map(r),e,n)))(r(s(h)))}return f.invert=function(h){return s(o((l||(l=a(e,t.map(r),vn)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Rf),u()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),u()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=_s,u()},f.clamp=function(h){return arguments.length?(s=h?!0:Qt,u()):s!==Qt},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,d){return r=h,o=d,u()}}function Pm(){return Qc()(Qt,Qt)}function Lm(t,e,n,r){var o=Zr(t,e,n),i;switch(r=zi(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(i=RA(o,s))&&(r.precision=i),sp(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=FA(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=kA(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ft(r)}function ci(t){var e=t.domain;return t.ticks=function(n){var r=e();return nc(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var o=e();return Lm(o[0],o[o.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),o=0,i=r.length-1,s=r[o],a=r[i],c,l,u=10;for(a<s&&(l=s,s=a,a=l,l=o,o=i,i=l);u-- >0;){if(l=bu(s,a,n),l===c)return r[o]=s,r[i]=a,e(r);if(l>0)s=Math.floor(s/l)*l,a=Math.ceil(a/l)*l;else if(l<0)s=Math.ceil(s*l)/l,a=Math.floor(a*l)/l;else break;c=l}return t},t}function Nm(){var t=Pm();return t.copy=function(){return ks(t,Nm())},Rn.apply(t,arguments),ci(t)}function Om(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Rf),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Om(t).unknown(e)},t=arguments.length?Array.from(t,Rf):[0,1],ci(n)}function zm(t,e){t=t.slice();var n=0,r=t.length-1,o=t[n],i=t[r],s;return i<o&&(s=n,n=r,r=s,s=o,o=i,i=s),t[n]=e.floor(o),t[r]=e.ceil(i),t}function Um(t){return Math.log(t)}function Gm(t){return Math.exp(t)}function e8(t){return-Math.log(-t)}function t8(t){return-Math.exp(-t)}function n8(t){return isFinite(t)?+("1e"+t):t<0?0:t}function r8(t){return t===10?n8:t===Math.E?Math.exp:e=>Math.pow(t,e)}function i8(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Hm(t){return(e,n)=>-t(-e,n)}function Mf(t){const e=t(Um,Gm),n=e.domain;let r=10,o,i;function s(){return o=i8(r),i=r8(r),n()[0]<0?(o=Hm(o),i=Hm(i),t(e8,t8)):t(Um,Gm),e}return e.base=function(a){return arguments.length?(r=+a,s()):r},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const c=n();let l=c[0],u=c[c.length-1];const f=u<l;f&&([l,u]=[u,l]);let h=o(l),d=o(u),p,y;const v=a==null?10:+a;let b=[];if(!(r%1)&&d-h<v){if(h=Math.floor(h),d=Math.ceil(d),l>0){for(;h<=d;++h)for(p=1;p<r;++p)if(y=h<0?p/i(-h):p*i(h),!(y<l)){if(y>u)break;b.push(y)}}else for(;h<=d;++h)for(p=r-1;p>=1;--p)if(y=h>0?p/i(-h):p*i(h),!(y<l)){if(y>u)break;b.push(y)}b.length*2<v&&(b=nc(l,u,v))}else b=nc(h,d,Math.min(d-h,v)).map(i);return f?b.reverse():b},e.tickFormat=(a,c)=>{if(a==null&&(a=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=zi(c)).precision==null&&(c.trim=!0),c=Ft(c)),a===1/0)return c;const l=Math.max(1,r*a/e.ticks().length);return u=>{let f=u/i(Math.round(o(u)));return f*r<r-.5&&(f*=r),f<=l?c(u):""}},e.nice=()=>n(zm(n(),{floor:a=>i(Math.floor(o(a))),ceil:a=>i(Math.ceil(o(a)))})),e}function Pf(){const t=Mf(Qc()).domain([1,10]);return t.copy=()=>ks(t,Pf()).base(t.base()),Rn.apply(t,arguments),t}function Vm(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function qm(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Lf(t){var e=1,n=t(Vm(e),qm(e));return n.constant=function(r){return arguments.length?t(Vm(e=+r),qm(e)):e},ci(n)}function jm(){var t=Lf(Qc());return t.copy=function(){return ks(t,jm()).constant(t.constant())},Rn.apply(t,arguments)}function Wm(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function o8(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function s8(t){return t<0?-t*t:t*t}function Nf(t){var e=t(Qt,Qt),n=1;function r(){return n===1?t(Qt,Qt):n===.5?t(o8,s8):t(Wm(n),Wm(1/n))}return e.exponent=function(o){return arguments.length?(n=+o,r()):n},ci(e)}function Of(){var t=Nf(Qc());return t.copy=function(){return ks(t,Of()).exponent(t.exponent())},Rn.apply(t,arguments),t}function a8(){return Of.apply(null,arguments).exponent(.5)}function Qm(){var t=[],e=[],n=[],r;function o(){var s=0,a=Math.max(1,e.length);for(n=new Array(a-1);++s<a;)n[s-1]=$0(t,s/a);return i}function i(s){return s==null||isNaN(s=+s)?r:e[dr(n,s)]}return i.invertExtent=function(s){var a=e.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},i.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let a of s)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(Yr),o()},i.range=function(s){return arguments.length?(e=Array.from(s),o()):e.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return Qm().domain(t).range(e).unknown(r)},Rn.apply(i,arguments)}function Ym(){var t=0,e=1,n=1,r=[.5],o=[0,1],i;function s(c){return c!=null&&c<=c?o[dr(r,c,0,n)]:i}function a(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return s}return s.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,a()):[t,e]},s.range=function(c){return arguments.length?(n=(o=Array.from(c)).length-1,a()):o.slice()},s.invertExtent=function(c){var l=o.indexOf(c);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},s.unknown=function(c){return arguments.length&&(i=c),s},s.thresholds=function(){return r.slice()},s.copy=function(){return Ym().domain([t,e]).range(o).unknown(i)},Rn.apply(ci(s),arguments)}function Zm(){var t=[.5],e=[0,1],n,r=1;function o(i){return i!=null&&i<=i?e[dr(t,i,0,r)]:n}return o.domain=function(i){return arguments.length?(t=Array.from(i),r=Math.min(t.length,e.length-1),o):t.slice()},o.range=function(i){return arguments.length?(e=Array.from(i),r=Math.min(t.length,e.length-1),o):e.slice()},o.invertExtent=function(i){var s=e.indexOf(i);return[t[s-1],t[s]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Zm().domain(t).range(e).unknown(n)},Rn.apply(o,arguments)}function c8(t){return new Date(t)}function l8(t){return t instanceof Date?+t:+new Date(+t)}function zf(t,e,n,r,o,i,s,a,c,l){var u=Pm(),f=u.invert,h=u.domain,d=l(".%L"),p=l(":%S"),y=l("%I:%M"),v=l("%I %p"),b=l("%a %d"),A=l("%b %d"),C=l("%B"),E=l("%Y");function I(R){return(c(R)<R?d:a(R)<R?p:s(R)<R?y:i(R)<R?v:r(R)<R?o(R)<R?b:A:n(R)<R?C:E)(R)}return u.invert=function(R){return new Date(f(R))},u.domain=function(R){return arguments.length?h(Array.from(R,l8)):h().map(c8)},u.ticks=function(R){var B=h();return t(B[0],B[B.length-1],R??10)},u.tickFormat=function(R,B){return B==null?I:l(B)},u.nice=function(R){var B=h();return(!R||typeof R.range!="function")&&(R=e(B[0],B[B.length-1],R??10)),R?h(zm(B,R)):u},u.copy=function(){return ks(u,zf(t,e,n,r,o,i,s,a,c,l))},u}function u8(){return Rn.apply(zf(qA,jA,Dn,ss,is,pr,ac,oc,Qn,Du).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function f8(){return Rn.apply(zf(HA,VA,Bn,as,os,Xr,cc,sc,Qn,Bu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Yc(){var t=0,e=1,n,r,o,i,s=Qt,a=!1,c;function l(f){return f==null||isNaN(f=+f)?c:s(o===0?.5:(f=(i(f)-n)*o,a?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([t,e]=f,n=i(t=+t),r=i(e=+e),o=n===r?0:1/(r-n),l):[t,e]},l.clamp=function(f){return arguments.length?(a=!!f,l):a},l.interpolator=function(f){return arguments.length?(s=f,l):s};function u(f){return function(h){var d,p;return arguments.length?([d,p]=h,s=f(d,p),l):[s(0),s(1)]}}return l.range=u(Sr),l.rangeRound=u(_s),l.unknown=function(f){return arguments.length?(c=f,l):c},function(f){return i=f,n=f(t),r=f(e),o=n===r?0:1/(r-n),l}}function Cr(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Uf(){var t=ci(Yc()(Qt));return t.copy=function(){return Cr(t,Uf())},vr.apply(t,arguments)}function Xm(){var t=Mf(Yc()).domain([1,10]);return t.copy=function(){return Cr(t,Xm()).base(t.base())},vr.apply(t,arguments)}function Km(){var t=Lf(Yc());return t.copy=function(){return Cr(t,Km()).constant(t.constant())},vr.apply(t,arguments)}function Gf(){var t=Nf(Yc());return t.copy=function(){return Cr(t,Gf()).exponent(t.exponent())},vr.apply(t,arguments)}function h8(){return Gf.apply(null,arguments).exponent(.5)}function Zc(){var t=0,e=.5,n=1,r=1,o,i,s,a,c,l=Qt,u,f=!1,h;function d(y){return isNaN(y=+y)?h:(y=.5+((y=+u(y))-i)*(r*y<r*i?a:c),l(f?Math.max(0,Math.min(1,y)):y))}d.domain=function(y){return arguments.length?([t,e,n]=y,o=u(t=+t),i=u(e=+e),s=u(n=+n),a=o===i?0:.5/(i-o),c=i===s?0:.5/(s-i),r=i<o?-1:1,d):[t,e,n]},d.clamp=function(y){return arguments.length?(f=!!y,d):f},d.interpolator=function(y){return arguments.length?(l=y,d):l};function p(y){return function(v){var b,A,C;return arguments.length?([b,A,C]=v,l=kf(y,[b,A,C]),d):[l(0),l(.5),l(1)]}}return d.range=p(Sr),d.rangeRound=p(_s),d.unknown=function(y){return arguments.length?(h=y,d):h},function(y){return u=y,o=y(t),i=y(e),s=y(n),a=o===i?0:.5/(i-o),c=i===s?0:.5/(s-i),r=i<o?-1:1,d}}function Jm(){var t=ci(Zc()(Qt));return t.copy=function(){return Cr(t,Jm())},vr.apply(t,arguments)}function $m(){var t=Mf(Zc()).domain([.1,1,10]);return t.copy=function(){return Cr(t,$m()).base(t.base())},vr.apply(t,arguments)}function e1(){var t=Lf(Zc());return t.copy=function(){return Cr(t,e1()).constant(t.constant())},vr.apply(t,arguments)}function Hf(){var t=Nf(Zc());return t.copy=function(){return Cr(t,Hf()).exponent(t.exponent())},vr.apply(t,arguments)}function d8(){return Hf.apply(null,arguments).exponent(.5)}function Pn(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const p8=Pn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),g8=Pn("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),m8=Pn("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),b8=Pn("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),y8=Pn("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),w8=Pn("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),x8=Pn("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),v8=Pn("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),A8=Pn("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),E8=Pn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function Vf(t,e,n){const r=t-e+n*2;return t?r>0?r:1:0}const S8="identity",no="linear",Ir="log",Rs="pow",Fs="sqrt",Xc="symlog",t1="time",n1="utc",Ln="sequential",ro="diverging",qf="quantile",r1="quantize",i1="threshold",jf="ordinal",Wf="point",o1="band",Qf="bin-ordinal",yt="continuous",Ms="discrete",Ps="discretizing",an="interpolating",s1="temporal";function C8(t){return function(e){let n=e[0],r=e[1],o;return r<n&&(o=n,n=r,r=o),[t.invert(n),t.invert(r)]}}function I8(t){return function(e){const n=t.range();let r=e[0],o=e[1],i=-1,s,a,c,l;for(o<r&&(a=r,r=o,o=a),c=0,l=n.length;c<l;++c)n[c]>=r&&n[c]<=o&&(i<0&&(i=c),s=c);if(!(i<0))return r=t.invertExtent(n[i]),o=t.invertExtent(n[s]),[r[0]===void 0?r[1]:r[0],o[1]===void 0?o[0]:o[1]]}}function Yf(){const t=df().unknown(void 0),e=t.domain,n=t.range;let r=[0,1],o,i,s=!1,a=0,c=0,l=.5;delete t.unknown;function u(){const f=e().length,h=r[1]<r[0],d=r[1-h],p=Vf(f,a,c);let y=r[h-0];o=(d-y)/(p||1),s&&(o=Math.floor(o)),y+=(d-y-o*(f-a))*l,i=o*(1-a),s&&(y=Math.round(y),i=Math.round(i));const v=ns(f).map(b=>y+o*b);return n(h?v.reverse():v)}return t.domain=function(f){return arguments.length?(e(f),u()):e()},t.range=function(f){return arguments.length?(r=[+f[0],+f[1]],u()):r.slice()},t.rangeRound=function(f){return r=[+f[0],+f[1]],s=!0,u()},t.bandwidth=function(){return i},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,u()):s},t.padding=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),a=c,u()):a},t.paddingInner=function(f){return arguments.length?(a=Math.max(0,Math.min(1,f)),u()):a},t.paddingOuter=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),u()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),u()):l},t.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 y=+f[0],v=+f[1],b,A,C;if(!(y!==y||v!==v)&&(v<y&&(C=y,y=v,v=C),!(v<d[0]||y>r[1-h])))return b=Math.max(0,dr(d,y)-1),A=y===v?b:dr(d,v)-1,y-d[b]>i+1e-10&&++b,h&&(C=b,b=p-A,A=p-C),b>A?void 0:e().slice(b,A+1)},t.invert=function(f){const h=t.invertRange([f,f]);return h&&h[0]},t.copy=function(){return Yf().domain(e()).range(r).round(s).paddingInner(a).paddingOuter(c).align(l)},u()}function a1(t){const e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return a1(e())},t}function T8(){return a1(Yf().paddingInner(1))}var D8=Array.prototype.map;function B8(t){return D8.call(t,qo)}const _8=Array.prototype.slice;function c1(){let t=[],e=[];function n(r){return r==null||r!==r?void 0:e[(dr(t,r)-1)%e.length]}return n.domain=function(r){return arguments.length?(t=B8(r),n):t.slice()},n.range=function(r){return arguments.length?(e=_8.call(r),n):e.slice()},n.tickFormat=function(r,o){return Lm(t[0],bn(t),r??10,o)},n.copy=function(){return c1().domain(n.domain()).range(n.range())},n}const Kc=new Map,k8=Symbol("vega_scale");function R8(t){return t[k8]=!0,t}function F8(t,e,n){const r=function(){const i=e();return i.invertRange||(i.invertRange=i.invert?C8(i):i.invertExtent?I8(i):void 0),i.type=t,R8(i)};return r.metadata=Za(iu(n)),r}function Ye(t,e,n){return arguments.length>1?(Kc.set(t,F8(t,e,n)),this):M8(t)?Kc.get(t):void 0}Ye(S8,Om),Ye(no,Nm,yt),Ye(Ir,Pf,[yt,Ir]),Ye(Rs,Of,yt),Ye(Fs,a8,yt),Ye(Xc,jm,yt),Ye(t1,u8,[yt,s1]),Ye(n1,f8,[yt,s1]),Ye(Ln,Uf,[yt,an]),Ye(`${Ln}-${no}`,Uf,[yt,an]),Ye(`${Ln}-${Ir}`,Xm,[yt,an,Ir]),Ye(`${Ln}-${Rs}`,Gf,[yt,an]),Ye(`${Ln}-${Fs}`,h8,[yt,an]),Ye(`${Ln}-${Xc}`,Km,[yt,an]),Ye(`${ro}-${no}`,Jm,[yt,an]),Ye(`${ro}-${Ir}`,$m,[yt,an,Ir]),Ye(`${ro}-${Rs}`,Hf,[yt,an]),Ye(`${ro}-${Fs}`,d8,[yt,an]),Ye(`${ro}-${Xc}`,e1,[yt,an]),Ye(qf,Qm,[Ps,qf]),Ye(r1,Ym,Ps),Ye(i1,Zm,Ps),Ye(Qf,c1,[Ms,Ps]),Ye(jf,df,Ms),Ye(o1,Yf,Ms),Ye(Wf,T8,Ms);function M8(t){return Kc.has(t)}function Ls(t,e){const n=Kc.get(t);return n&&n.metadata[e]}function Bt(t){return Ls(t,yt)}function Tr(t){return Ls(t,Ms)}function li(t){return Ls(t,Ps)}function l1(t){return Ls(t,Ir)}function Jc(t){return Ls(t,an)}function P8(t,e){const n=e[0],r=bn(e)-n;return function(o){return t(n+o*r)}}function $c(t,e,n){return kf(u1(e||"rgb",n),t)}function L8(t,e){const n=new Array(e),r=e+1;for(let o=0;o<e;)n[o]=t(++o/r);return n}function u1(t,e){const n=Z6[N8(t)];return e!=null&&n&&n.gamma?n.gamma(e):n}function N8(t){return"interpolate"+t.toLowerCase().split("-").map(e=>e[0].toUpperCase()+e.slice(1)).join("")}const O8={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"},z8={accent:g8,category10:p8,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:m8,observable10:b8,paired:y8,pastel1:w8,pastel2:x8,set1:v8,set2:A8,set3:E8,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function f1(t){if(Dt(t))return t;const e=t.length/6|0,n=new Array(e);for(let r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}function h1(t,e){for(const n in t)Zf(n,e(t[n]))}const d1={};h1(z8,f1),h1(O8,t=>$c(f1(t)));function Zf(t,e){return t=t&&t.toLowerCase(),arguments.length>1?(d1[t]=e,this):d1[t]}function Ze(t,e=t){if(/^[A-Za-z0-9_]+$/.test(t)){const n=function(o){t in o||U8(o,t)},r=new Function("validator",`
|
|
252
252
|
let validated = !validator;
|
|
253
253
|
return function accessField(datum) {
|
|
254
254
|
if (!validated) {
|
|
255
255
|
validator(datum);
|
|
256
256
|
validated = true;
|
|
257
257
|
}
|
|
258
|
-
return datum[${JSON.stringify(
|
|
259
|
-
}`)(n);return et(r,[e],t)}else return Pc(e)}function F5(e,t){throw new Error(`Invalid field "${t}". Available fields or properties: ${Object.keys(e).join(", ")}`)}const M5="RawCode",P5="Literal",L5="Property",N5="Identifier",O5="ArrayExpression",z5="BinaryExpression",U5="CallExpression",G5="ConditionalExpression",H5="LogicalExpression",V5="MemberExpression",q5="ObjectExpression",j5="UnaryExpression";function Rn(e){this.type=e}Rn.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=W5(this),n=0,r=t.length;n<r;++n)if(t[n].visit(e))return 1};function W5(e){switch(e.type){case O5:return e.elements;case z5:case H5:return[e.left,e.right];case U5:return[e.callee].concat(e.arguments);case G5:return[e.test,e.consequent,e.alternate];case V5:return[e.object,e.property];case q5:return e.properties;case L5:return[e.key,e.value];case j5:return[e.argument];case N5:case P5:case M5:default:return[]}}var Wn,Ae,ie,zt,Je,Vl=1,gs=2,Bi=3,Hr=4,ql=5,Ri=6,$t=7,ms=8,Z5=9;Wn={},Wn[Vl]="Boolean",Wn[gs]="<end>",Wn[Bi]="Identifier",Wn[Hr]="Keyword",Wn[ql]="Null",Wn[Ri]="Numeric",Wn[$t]="Punctuator",Wn[ms]="String",Wn[Z5]="RegularExpression";var Y5="ArrayExpression",Q5="BinaryExpression",X5="CallExpression",K5="ConditionalExpression",Db="Identifier",J5="Literal",$5="LogicalExpression",eT="MemberExpression",tT="ObjectExpression",nT="Property",rT="UnaryExpression",Ct="Unexpected token %0",iT="Unexpected number",oT="Unexpected string",aT="Unexpected identifier",sT="Unexpected reserved word",cT="Unexpected end of input",Yh="Invalid regular expression",Qh="Invalid regular expression: missing /",kb="Octal literals are not allowed in strict mode.",lT="Duplicate data property in object literal not allowed in strict mode",Ft="ILLEGAL",bs="Disabled.",uT=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]"),fT=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-\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0DF3\\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 jl(e,t){if(!e)throw new Error("ASSERT: "+t)}function lr(e){return e>=48&&e<=57}function Xh(e){return"0123456789abcdefABCDEF".includes(e)}function ys(e){return"01234567".includes(e)}function hT(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].includes(e)}function ws(e){return e===10||e===13||e===8232||e===8233}function xs(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&uT.test(String.fromCharCode(e))}function Wl(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&fT.test(String.fromCharCode(e))}const dT={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 Bb(){for(;ie<zt;){const e=Ae.charCodeAt(ie);if(hT(e)||ws(e))++ie;else break}}function Kh(e){var t,n,r,i=0;for(n=e==="u"?4:2,t=0;t<n;++t)ie<zt&&Xh(Ae[ie])?(r=Ae[ie++],i=i*16+"0123456789abcdef".indexOf(r.toLowerCase())):Ze({},Ct,Ft);return String.fromCharCode(i)}function pT(){var e,t,n,r;for(e=Ae[ie],t=0,e==="}"&&Ze({},Ct,Ft);ie<zt&&(e=Ae[ie++],!!Xh(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&Ze({},Ct,Ft),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function Rb(){var e,t;for(e=Ae.charCodeAt(ie++),t=String.fromCharCode(e),e===92&&(Ae.charCodeAt(ie)!==117&&Ze({},Ct,Ft),++ie,e=Kh("u"),(!e||e==="\\"||!xs(e.charCodeAt(0)))&&Ze({},Ct,Ft),t=e);ie<zt&&(e=Ae.charCodeAt(ie),!!Wl(e));)++ie,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),Ae.charCodeAt(ie)!==117&&Ze({},Ct,Ft),++ie,e=Kh("u"),(!e||e==="\\"||!Wl(e.charCodeAt(0)))&&Ze({},Ct,Ft),t+=e);return t}function gT(){var e,t;for(e=ie++;ie<zt;){if(t=Ae.charCodeAt(ie),t===92)return ie=e,Rb();if(Wl(t))++ie;else break}return Ae.slice(e,ie)}function mT(){var e,t,n;return e=ie,t=Ae.charCodeAt(ie)===92?Rb():gT(),t.length===1?n=Bi:dT.hasOwnProperty(t)?n=Hr:t==="null"?n=ql:t==="true"||t==="false"?n=Vl:n=Bi,{type:n,value:t,start:e,end:ie}}function Jh(){var e=ie,t=Ae.charCodeAt(ie),n,r=Ae[ie],i,o,a;switch(t){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++ie,{type:$t,value:String.fromCharCode(t),start:e,end:ie};default:if(n=Ae.charCodeAt(ie+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 ie+=2,{type:$t,value:String.fromCharCode(t)+String.fromCharCode(n),start:e,end:ie};case 33:case 61:return ie+=2,Ae.charCodeAt(ie)===61&&++ie,{type:$t,value:Ae.slice(e,ie),start:e,end:ie}}}if(a=Ae.substr(ie,4),a===">>>=")return ie+=4,{type:$t,value:a,start:e,end:ie};if(o=a.substr(0,3),o===">>>"||o==="<<="||o===">>=")return ie+=3,{type:$t,value:o,start:e,end:ie};if(i=o.substr(0,2),r===i[1]&&"+-<>&|".includes(r)||i==="=>")return ie+=2,{type:$t,value:i,start:e,end:ie};if(i==="//"&&Ze({},Ct,Ft),"<>=!+-*%&|^/".includes(r))return++ie,{type:$t,value:r,start:e,end:ie};Ze({},Ct,Ft)}function bT(e){let t="";for(;ie<zt&&Xh(Ae[ie]);)t+=Ae[ie++];return t.length===0&&Ze({},Ct,Ft),xs(Ae.charCodeAt(ie))&&Ze({},Ct,Ft),{type:Ri,value:parseInt("0x"+t,16),start:e,end:ie}}function yT(e){let t="0"+Ae[ie++];for(;ie<zt&&ys(Ae[ie]);)t+=Ae[ie++];return(xs(Ae.charCodeAt(ie))||lr(Ae.charCodeAt(ie)))&&Ze({},Ct,Ft),{type:Ri,value:parseInt(t,8),octal:!0,start:e,end:ie}}function Fb(){var e,t,n;if(n=Ae[ie],jl(lr(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=ie,e="",n!=="."){if(e=Ae[ie++],n=Ae[ie],e==="0"){if(n==="x"||n==="X")return++ie,bT(t);if(ys(n))return yT(t);n&&lr(n.charCodeAt(0))&&Ze({},Ct,Ft)}for(;lr(Ae.charCodeAt(ie));)e+=Ae[ie++];n=Ae[ie]}if(n==="."){for(e+=Ae[ie++];lr(Ae.charCodeAt(ie));)e+=Ae[ie++];n=Ae[ie]}if(n==="e"||n==="E")if(e+=Ae[ie++],n=Ae[ie],(n==="+"||n==="-")&&(e+=Ae[ie++]),lr(Ae.charCodeAt(ie)))for(;lr(Ae.charCodeAt(ie));)e+=Ae[ie++];else Ze({},Ct,Ft);return xs(Ae.charCodeAt(ie))&&Ze({},Ct,Ft),{type:Ri,value:parseFloat(e),start:t,end:ie}}function wT(){var e="",t,n,r,i,o=!1;for(t=Ae[ie],jl(t==="'"||t==='"',"String literal must starts with a quote"),n=ie,++ie;ie<zt;)if(r=Ae[ie++],r===t){t="";break}else if(r==="\\")if(r=Ae[ie++],!r||!ws(r.charCodeAt(0)))switch(r){case"u":case"x":Ae[ie]==="{"?(++ie,e+=pT()):e+=Kh(r);break;case"n":e+=`
|
|
260
|
-
`;break;case"r":
|
|
261
|
-
`&&++ie;else{if(ws(r.charCodeAt(0)))break;e+=r}return t!==""&&Ze({},Ct,Ft),{type:ms,value:e,octal:o,start:n,end:ie}}function xT(e,t){let n=e;t.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(r,i)=>{if(parseInt(i,16)<=1114111)return"x";Ze({},Yh)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{Ze({},Yh)}try{return new RegExp(e,t)}catch{return null}}function vT(){var e,t,n,r,i;for(e=Ae[ie],jl(e==="/","Regular expression literal must start with a slash"),t=Ae[ie++],n=!1,r=!1;ie<zt;)if(e=Ae[ie++],t+=e,e==="\\")e=Ae[ie++],ws(e.charCodeAt(0))&&Ze({},Qh),t+=e;else if(ws(e.charCodeAt(0)))Ze({},Qh);else if(n)e==="]"&&(n=!1);else if(e==="/"){r=!0;break}else e==="["&&(n=!0);return r||Ze({},Qh),i=t.substr(1,t.length-2),{value:i,literal:t}}function AT(){var e,t,n;for(t="",n="";ie<zt&&(e=Ae[ie],!!Wl(e.charCodeAt(0)));)++ie,e==="\\"&&ie<zt?Ze({},Ct,Ft):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&Ze({},Yh,n),{value:n,literal:t}}function ET(){var e,t,n,r;return Je=null,Bb(),e=ie,t=vT(),n=AT(),r=xT(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:ie}}function ST(e){return e.type===Bi||e.type===Hr||e.type===Vl||e.type===ql}function Mb(){if(Bb(),ie>=zt)return{type:gs,start:ie,end:ie};const e=Ae.charCodeAt(ie);return xs(e)?mT():e===40||e===41||e===59?Jh():e===39||e===34?wT():e===46?lr(Ae.charCodeAt(ie+1))?Fb():Jh():lr(e)?Fb():Jh()}function en(){const e=Je;return ie=e.end,Je=Mb(),ie=e.end,e}function Pb(){const e=ie;Je=Mb(),ie=e}function _T(e){const t=new Rn(Y5);return t.elements=e,t}function Lb(e,t,n){const r=new Rn(e==="||"||e==="&&"?$5:Q5);return r.operator=e,r.left=t,r.right=n,r}function CT(e,t){const n=new Rn(X5);return n.callee=e,n.arguments=t,n}function TT(e,t,n){const r=new Rn(K5);return r.test=e,r.consequent=t,r.alternate=n,r}function $h(e){const t=new Rn(Db);return t.name=e,t}function vs(e){const t=new Rn(J5);return t.value=e.value,t.raw=Ae.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function Nb(e,t,n){const r=new Rn(eT);return r.computed=e==="[",r.object=t,r.property=n,r.computed||(n.member=!0),r}function IT(e){const t=new Rn(tT);return t.properties=e,t}function Ob(e,t,n){const r=new Rn(nT);return r.key=t,r.value=n,r.kind=e,r}function DT(e,t){const n=new Rn(rT);return n.operator=e,n.argument=t,n.prefix=!0,n}function Ze(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(o,a)=>(jl(a<r.length,"Message reference must be in range"),r[a]));throw n=new Error(i),n.index=ie,n.description=i,n}function Zl(e){e.type===gs&&Ze(e,cT),e.type===Ri&&Ze(e,iT),e.type===ms&&Ze(e,oT),e.type===Bi&&Ze(e,aT),e.type===Hr&&Ze(e,sT),Ze(e,Ct,e.value)}function Ut(e){const t=en();(t.type!==$t||t.value!==e)&&Zl(t)}function st(e){return Je.type===$t&&Je.value===e}function ed(e){return Je.type===Hr&&Je.value===e}function kT(){const e=[];for(ie=Je.start,Ut("[");!st("]");)st(",")?(en(),e.push(null)):(e.push(Fi()),st("]")||Ut(","));return en(),_T(e)}function zb(){ie=Je.start;const e=en();return e.type===ms||e.type===Ri?(e.octal&&Ze(e,kb),vs(e)):$h(e.value)}function BT(){var e,t,n,r;if(ie=Je.start,e=Je,e.type===Bi)return n=zb(),Ut(":"),r=Fi(),Ob("init",n,r);if(e.type===gs||e.type===$t)Zl(e);else return t=zb(),Ut(":"),r=Fi(),Ob("init",t,r)}function RT(){var e=[],t,n,r,i={},o=String;for(ie=Je.start,Ut("{");!st("}");)t=BT(),t.key.type===Db?n=t.key.name:n=o(t.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(i,r)?Ze({},lT):i[r]=!0,e.push(t),st("}")||Ut(",");return Ut("}"),IT(e)}function FT(){Ut("(");const e=td();return Ut(")"),e}const MT={if:1};function PT(){var e,t,n;if(st("("))return FT();if(st("["))return kT();if(st("{"))return RT();if(e=Je.type,ie=Je.start,e===Bi||MT[Je.value])n=$h(en().value);else if(e===ms||e===Ri)Je.octal&&Ze(Je,kb),n=vs(en());else{if(e===Hr)throw new Error(bs);e===Vl?(t=en(),t.value=t.value==="true",n=vs(t)):e===ql?(t=en(),t.value=null,n=vs(t)):st("/")||st("/=")?(n=vs(ET()),Pb()):Zl(en())}return n}function LT(){const e=[];if(Ut("("),!st(")"))for(;ie<zt&&(e.push(Fi()),!st(")"));)Ut(",");return Ut(")"),e}function NT(){ie=Je.start;const e=en();return ST(e)||Zl(e),$h(e.value)}function OT(){return Ut("."),NT()}function zT(){Ut("[");const e=td();return Ut("]"),e}function UT(){var e,t,n;for(e=PT();;)if(st("."))n=OT(),e=Nb(".",e,n);else if(st("("))t=LT(),e=CT(e,t);else if(st("["))n=zT(),e=Nb("[",e,n);else break;return e}function Ub(){const e=UT();if(Je.type===$t&&(st("++")||st("--")))throw new Error(bs);return e}function Yl(){var e,t;if(Je.type!==$t&&Je.type!==Hr)t=Ub();else{if(st("++")||st("--"))throw new Error(bs);if(st("+")||st("-")||st("~")||st("!"))e=en(),t=Yl(),t=DT(e.value,t);else{if(ed("delete")||ed("void")||ed("typeof"))throw new Error(bs);t=Ub()}}return t}function Gb(e){let t=0;if(e.type!==$t&&e.type!==Hr)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 GT(){var e,t,n,r,i,o,a,s,c,l;if(e=Je,c=Yl(),r=Je,i=Gb(r),i===0)return c;for(r.prec=i,en(),t=[e,Je],a=Yl(),o=[c,r,a];(i=Gb(Je))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,c=o.pop(),t.pop(),n=Lb(s,c,a),o.push(n);r=en(),r.prec=i,o.push(r),t.push(Je),n=Yl(),o.push(n)}for(l=o.length-1,n=o[l],t.pop();l>1;)t.pop(),n=Lb(o[l-1].value,o[l-2],n),l-=2;return n}function Fi(){var e,t,n;return e=GT(),st("?")&&(en(),t=Fi(),Ut(":"),n=Fi(),e=TT(e,t,n)),e}function td(){const e=Fi();if(st(","))throw new Error(bs);return e}function HT(e){Ae=e,ie=0,zt=Ae.length,Je=null,Pb();const t=td();if(Je.type!==gs)throw new Error("Unexpect token after expression.");return t}var VT={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 Hb(e){function t(a,s,c,l){let u=e(s[0]);return c&&(u=c+"("+u+")",c.lastIndexOf("new ",0)===0&&(u="("+u+")")),u+"."+a+(l<0?"":l===0?"()":"("+s.slice(1).map(e).join(",")+")")}function n(a,s,c){return l=>t(a,l,s,c)}const r="new Date",i="String",o="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",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(a){a.length<3&&yt("Missing arguments to clamp function."),a.length>3&&yt("Too many arguments to clamp function.");const s=a.map(e);return"Math.max("+s[1]+", Math.min("+s[2]+","+s[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:r,date:n("getDate",r,0),day:n("getDay",r,0),year:n("getFullYear",r,0),month:n("getMonth",r,0),hours:n("getHours",r,0),minutes:n("getMinutes",r,0),seconds:n("getSeconds",r,0),milliseconds:n("getMilliseconds",r,0),time:n("getTime",r,0),timezoneoffset:n("getTimezoneOffset",r,0),utcdate:n("getUTCDate",r,0),utcday:n("getUTCDay",r,0),utcyear:n("getUTCFullYear",r,0),utcmonth:n("getUTCMonth",r,0),utchours:n("getUTCHours",r,0),utcminutes:n("getUTCMinutes",r,0),utcseconds:n("getUTCSeconds",r,0),utcmilliseconds:n("getUTCMilliseconds",r,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",i,0),lower:n("toLowerCase",i,0),substring:n("substring",i),split:n("split",i),trim:n("trim",i,0),regexp:o,test:n("test",o),if:function(a){a.length<3&&yt("Missing arguments to if function."),a.length>3&&yt("Too many arguments to if function.");const s=a.map(e);return"("+s[0]+"?"+s[1]+":"+s[2]+")"}}}function qT(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function jT(e){e=e||{};const t=e.allowed?Uc(e.allowed):{},n=e.forbidden?Uc(e.forbidden):{},r=e.constants||VT,i=(e.functions||Hb)(f),o=e.globalvar,a=e.fieldvar,s=dn(o)?o:p=>`${o}["${p}"]`;let c={},l={},u=0;function f(p){if(it(p))return p;const b=h[p.type];return b==null&&yt("Unsupported type: "+p.type),b(p)}const h={Literal:p=>p.raw,Identifier:p=>{const b=p.name;return u>0?b:oo(n,b)?yt("Illegal identifier: "+b):oo(r,b)?r[b]:oo(t,b)?b:(c[b]=1,s(b))},MemberExpression:p=>{const b=!p.computed,v=f(p.object);b&&(u+=1);const y=f(p.property);return v===a&&(l[qT(y)]=1),b&&(u-=1),v+(b?"."+y:"["+y+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&yt("Illegal callee type: "+p.callee.type);const b=p.callee.name,v=p.arguments,y=oo(i,b)&&i[b];return y||yt("Unrecognized function: "+b),dn(y)?y(v):y+"("+v.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=>{u+=1;const b=f(p.key);return u-=1,b+":"+f(p.value)}};function d(p){const b={code:f(p),globals:Object.keys(c),fields:Object.keys(l)};return c={},l={},b}return d.functions=i,d.constants=r,d}function Vb(e,t,n){return n=(n-e)/(t-e),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function Io(e,t=0,n=1){return Math.max(t,Math.min(n,e))}function WT(e,t,n){return Io((n-e)/(t-e),0,1)}const Zn=1,Vr=2,nd=4;class rd{constructor(t){ve(this,Yi);qt(this,"stats",{count:0,first:null});qt(this,"paramMediatorProvider",null);this.paramMediatorProvider=t,this.children=[],this.parent=void 0,this.completed=!1}get behavior(){return 0}get label(){return`(${this.constructor.name})`}reset(){this.completed=!1;for(const t of this.children)t.reset();this.stats.count=0,this.stats.first=null}initialize(){}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),he(this,Yi,Rc).call(this),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){var n;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,he(n=this.parent,Yi,Rc).call(n),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,he(this,Yi,Rc).call(this);else throw new Error("Trying to remove an unknown child node!")}excise(){var t;if(this.isRoot())throw new Error("Cannot excise root node!");if(this.isTerminal())this.parent.removeChild(this);else if(this.children.length==1){const n=this.children[0];n.setParent(this.parent),this.parent.children[this.parent.children.indexOf(this)]=n,he(t=this.parent,Yi,Rc).call(t),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.label}${"identifier"in this&&this.identifier?": "+this.identifier:""}
|
|
262
|
-
${n}`}handle(
|
|
258
|
+
return datum[${JSON.stringify(t)}];
|
|
259
|
+
}`)(n);return Je(r,[t],e)}else return qa(t)}function U8(t,e){throw new Error(`Invalid field "${e}". Available fields or properties: ${Object.keys(t).join(", ")}`)}const G8="RawCode",H8="Literal",V8="Property",q8="Identifier",j8="ArrayExpression",W8="BinaryExpression",Q8="CallExpression",Y8="ConditionalExpression",Z8="LogicalExpression",X8="MemberExpression",K8="ObjectExpression",J8="UnaryExpression";function An(t){this.type=t}An.prototype.visit=function(t){let e,n,r;if(t(this))return 1;for(e=$8(this),n=0,r=e.length;n<r;++n)if(e[n].visit(t))return 1};function $8(t){switch(t.type){case j8:return t.elements;case W8:case Z8:return[t.left,t.right];case Q8:return[t.callee].concat(t.arguments);case Y8:return[t.test,t.consequent,t.alternate];case X8:return[t.object,t.property];case K8:return t.properties;case V8:return[t.key,t.value];case J8:return[t.argument];case q8:case H8:case G8:default:return[]}}var Nn,Ae,ie,Pt,Xe,el=1,Ns=2,ui=3,Dr=4,tl=5,fi=6,Yt=7,Os=8,e5=9;Nn={},Nn[el]="Boolean",Nn[Ns]="<end>",Nn[ui]="Identifier",Nn[Dr]="Keyword",Nn[tl]="Null",Nn[fi]="Numeric",Nn[Yt]="Punctuator",Nn[Os]="String",Nn[e5]="RegularExpression";var t5="ArrayExpression",n5="BinaryExpression",r5="CallExpression",i5="ConditionalExpression",p1="Identifier",o5="Literal",s5="LogicalExpression",a5="MemberExpression",c5="ObjectExpression",l5="Property",u5="UnaryExpression",St="Unexpected token %0",f5="Unexpected number",h5="Unexpected string",d5="Unexpected identifier",p5="Unexpected reserved word",g5="Unexpected end of input",Xf="Invalid regular expression",Kf="Invalid regular expression: missing /",g1="Octal literals are not allowed in strict mode.",m5="Duplicate data property in object literal not allowed in strict mode",_t="ILLEGAL",zs="Disabled.",b5=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\\u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F6C\\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]"),y5=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-\\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\\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 nl(t,e){if(!t)throw new Error("ASSERT: "+e)}function Kn(t){return t>=48&&t<=57}function Jf(t){return"0123456789abcdefABCDEF".includes(t)}function Us(t){return"01234567".includes(t)}function w5(t){return t===32||t===9||t===11||t===12||t===160||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(t)}function Gs(t){return t===10||t===13||t===8232||t===8233}function Hs(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&b5.test(String.fromCharCode(t))}function rl(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===92||t>=128&&y5.test(String.fromCharCode(t))}const x5={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 m1(){for(;ie<Pt;){const t=Ae.charCodeAt(ie);if(w5(t)||Gs(t))++ie;else break}}function $f(t){var e,n,r,o=0;for(n=t==="u"?4:2,e=0;e<n;++e)ie<Pt&&Jf(Ae[ie])?(r=Ae[ie++],o=o*16+"0123456789abcdef".indexOf(r.toLowerCase())):We({},St,_t);return String.fromCharCode(o)}function v5(){var t,e,n,r;for(t=Ae[ie],e=0,t==="}"&&We({},St,_t);ie<Pt&&(t=Ae[ie++],!!Jf(t));)e=e*16+"0123456789abcdef".indexOf(t.toLowerCase());return(e>1114111||t!=="}")&&We({},St,_t),e<=65535?String.fromCharCode(e):(n=(e-65536>>10)+55296,r=(e-65536&1023)+56320,String.fromCharCode(n,r))}function b1(){var t,e;for(t=Ae.charCodeAt(ie++),e=String.fromCharCode(t),t===92&&(Ae.charCodeAt(ie)!==117&&We({},St,_t),++ie,t=$f("u"),(!t||t==="\\"||!Hs(t.charCodeAt(0)))&&We({},St,_t),e=t);ie<Pt&&(t=Ae.charCodeAt(ie),!!rl(t));)++ie,e+=String.fromCharCode(t),t===92&&(e=e.substr(0,e.length-1),Ae.charCodeAt(ie)!==117&&We({},St,_t),++ie,t=$f("u"),(!t||t==="\\"||!rl(t.charCodeAt(0)))&&We({},St,_t),e+=t);return e}function A5(){var t,e;for(t=ie++;ie<Pt;){if(e=Ae.charCodeAt(ie),e===92)return ie=t,b1();if(rl(e))++ie;else break}return Ae.slice(t,ie)}function E5(){var t,e,n;return t=ie,e=Ae.charCodeAt(ie)===92?b1():A5(),e.length===1?n=ui:x5.hasOwnProperty(e)?n=Dr:e==="null"?n=tl:e==="true"||e==="false"?n=el:n=ui,{type:n,value:e,start:t,end:ie}}function eh(){var t=ie,e=Ae.charCodeAt(ie),n,r=Ae[ie],o,i,s;switch(e){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++ie,{type:Yt,value:String.fromCharCode(e),start:t,end:ie};default:if(n=Ae.charCodeAt(ie+1),n===61)switch(e){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return ie+=2,{type:Yt,value:String.fromCharCode(e)+String.fromCharCode(n),start:t,end:ie};case 33:case 61:return ie+=2,Ae.charCodeAt(ie)===61&&++ie,{type:Yt,value:Ae.slice(t,ie),start:t,end:ie}}}if(s=Ae.substr(ie,4),s===">>>=")return ie+=4,{type:Yt,value:s,start:t,end:ie};if(i=s.substr(0,3),i===">>>"||i==="<<="||i===">>=")return ie+=3,{type:Yt,value:i,start:t,end:ie};if(o=i.substr(0,2),r===o[1]&&"+-<>&|".includes(r)||o==="=>")return ie+=2,{type:Yt,value:o,start:t,end:ie};if(o==="//"&&We({},St,_t),"<>=!+-*%&|^/".includes(r))return++ie,{type:Yt,value:r,start:t,end:ie};We({},St,_t)}function S5(t){let e="";for(;ie<Pt&&Jf(Ae[ie]);)e+=Ae[ie++];return e.length===0&&We({},St,_t),Hs(Ae.charCodeAt(ie))&&We({},St,_t),{type:fi,value:parseInt("0x"+e,16),start:t,end:ie}}function C5(t){let e="0"+Ae[ie++];for(;ie<Pt&&Us(Ae[ie]);)e+=Ae[ie++];return(Hs(Ae.charCodeAt(ie))||Kn(Ae.charCodeAt(ie)))&&We({},St,_t),{type:fi,value:parseInt(e,8),octal:!0,start:t,end:ie}}function y1(){var t,e,n;if(n=Ae[ie],nl(Kn(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),e=ie,t="",n!=="."){if(t=Ae[ie++],n=Ae[ie],t==="0"){if(n==="x"||n==="X")return++ie,S5(e);if(Us(n))return C5(e);n&&Kn(n.charCodeAt(0))&&We({},St,_t)}for(;Kn(Ae.charCodeAt(ie));)t+=Ae[ie++];n=Ae[ie]}if(n==="."){for(t+=Ae[ie++];Kn(Ae.charCodeAt(ie));)t+=Ae[ie++];n=Ae[ie]}if(n==="e"||n==="E")if(t+=Ae[ie++],n=Ae[ie],(n==="+"||n==="-")&&(t+=Ae[ie++]),Kn(Ae.charCodeAt(ie)))for(;Kn(Ae.charCodeAt(ie));)t+=Ae[ie++];else We({},St,_t);return Hs(Ae.charCodeAt(ie))&&We({},St,_t),{type:fi,value:parseFloat(t),start:e,end:ie}}function I5(){var t="",e,n,r,o,i=!1;for(e=Ae[ie],nl(e==="'"||e==='"',"String literal must starts with a quote"),n=ie,++ie;ie<Pt;)if(r=Ae[ie++],r===e){e="";break}else if(r==="\\")if(r=Ae[ie++],!r||!Gs(r.charCodeAt(0)))switch(r){case"u":case"x":Ae[ie]==="{"?(++ie,t+=v5()):t+=$f(r);break;case"n":t+=`
|
|
260
|
+
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:Us(r)?(o="01234567".indexOf(r),o!==0&&(i=!0),ie<Pt&&Us(Ae[ie])&&(i=!0,o=o*8+"01234567".indexOf(Ae[ie++]),"0123".includes(r)&&ie<Pt&&Us(Ae[ie])&&(o=o*8+"01234567".indexOf(Ae[ie++]))),t+=String.fromCharCode(o)):t+=r;break}else r==="\r"&&Ae[ie]===`
|
|
261
|
+
`&&++ie;else{if(Gs(r.charCodeAt(0)))break;t+=r}return e!==""&&We({},St,_t),{type:Os,value:t,octal:i,start:n,end:ie}}function T5(t,e){let n=t;e.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(r,o)=>{if(parseInt(o,16)<=1114111)return"x";We({},Xf)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{We({},Xf)}try{return new RegExp(t,e)}catch{return null}}function D5(){var t,e,n,r,o;for(t=Ae[ie],nl(t==="/","Regular expression literal must start with a slash"),e=Ae[ie++],n=!1,r=!1;ie<Pt;)if(t=Ae[ie++],e+=t,t==="\\")t=Ae[ie++],Gs(t.charCodeAt(0))&&We({},Kf),e+=t;else if(Gs(t.charCodeAt(0)))We({},Kf);else if(n)t==="]"&&(n=!1);else if(t==="/"){r=!0;break}else t==="["&&(n=!0);return r||We({},Kf),o=e.substr(1,e.length-2),{value:o,literal:e}}function B5(){var t,e,n;for(e="",n="";ie<Pt&&(t=Ae[ie],!!rl(t.charCodeAt(0)));)++ie,t==="\\"&&ie<Pt?We({},St,_t):(n+=t,e+=t);return n.search(/[^gimuy]/g)>=0&&We({},Xf,n),{value:n,literal:e}}function _5(){var t,e,n,r;return Xe=null,m1(),t=ie,e=D5(),n=B5(),r=T5(e.value,n.value),{literal:e.literal+n.literal,value:r,regex:{pattern:e.value,flags:n.value},start:t,end:ie}}function k5(t){return t.type===ui||t.type===Dr||t.type===el||t.type===tl}function w1(){if(m1(),ie>=Pt)return{type:Ns,start:ie,end:ie};const t=Ae.charCodeAt(ie);return Hs(t)?E5():t===40||t===41||t===59?eh():t===39||t===34?I5():t===46?Kn(Ae.charCodeAt(ie+1))?y1():eh():Kn(t)?y1():eh()}function Zt(){const t=Xe;return ie=t.end,Xe=w1(),ie=t.end,t}function x1(){const t=ie;Xe=w1(),ie=t}function R5(t){const e=new An(t5);return e.elements=t,e}function v1(t,e,n){const r=new An(t==="||"||t==="&&"?s5:n5);return r.operator=t,r.left=e,r.right=n,r}function F5(t,e){const n=new An(r5);return n.callee=t,n.arguments=e,n}function M5(t,e,n){const r=new An(i5);return r.test=t,r.consequent=e,r.alternate=n,r}function th(t){const e=new An(p1);return e.name=t,e}function Vs(t){const e=new An(o5);return e.value=t.value,e.raw=Ae.slice(t.start,t.end),t.regex&&(e.raw==="//"&&(e.raw="/(?:)/"),e.regex=t.regex),e}function A1(t,e,n){const r=new An(a5);return r.computed=t==="[",r.object=e,r.property=n,r.computed||(n.member=!0),r}function P5(t){const e=new An(c5);return e.properties=t,e}function E1(t,e,n){const r=new An(l5);return r.key=e,r.value=n,r.kind=t,r}function L5(t,e){const n=new An(u5);return n.operator=t,n.argument=e,n.prefix=!0,n}function We(t,e){var n,r=Array.prototype.slice.call(arguments,2),o=e.replace(/%(\d)/g,(i,s)=>(nl(s<r.length,"Message reference must be in range"),r[s]));throw n=new Error(o),n.index=ie,n.description=o,n}function il(t){t.type===Ns&&We(t,g5),t.type===fi&&We(t,f5),t.type===Os&&We(t,h5),t.type===ui&&We(t,d5),t.type===Dr&&We(t,p5),We(t,St,t.value)}function Lt(t){const e=Zt();(e.type!==Yt||e.value!==t)&&il(e)}function it(t){return Xe.type===Yt&&Xe.value===t}function nh(t){return Xe.type===Dr&&Xe.value===t}function N5(){const t=[];for(ie=Xe.start,Lt("[");!it("]");)it(",")?(Zt(),t.push(null)):(t.push(hi()),it("]")||Lt(","));return Zt(),R5(t)}function S1(){ie=Xe.start;const t=Zt();return t.type===Os||t.type===fi?(t.octal&&We(t,g1),Vs(t)):th(t.value)}function O5(){var t,e,n,r;if(ie=Xe.start,t=Xe,t.type===ui)return n=S1(),Lt(":"),r=hi(),E1("init",n,r);if(t.type===Ns||t.type===Yt)il(t);else return e=S1(),Lt(":"),r=hi(),E1("init",e,r)}function z5(){var t=[],e,n,r,o={},i=String;for(ie=Xe.start,Lt("{");!it("}");)e=O5(),e.key.type===p1?n=e.key.name:n=i(e.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(o,r)?We({},m5):o[r]=!0,t.push(e),it("}")||Lt(",");return Lt("}"),P5(t)}function U5(){Lt("(");const t=rh();return Lt(")"),t}const G5={if:1};function H5(){var t,e,n;if(it("("))return U5();if(it("["))return N5();if(it("{"))return z5();if(t=Xe.type,ie=Xe.start,t===ui||G5[Xe.value])n=th(Zt().value);else if(t===Os||t===fi)Xe.octal&&We(Xe,g1),n=Vs(Zt());else{if(t===Dr)throw new Error(zs);t===el?(e=Zt(),e.value=e.value==="true",n=Vs(e)):t===tl?(e=Zt(),e.value=null,n=Vs(e)):it("/")||it("/=")?(n=Vs(_5()),x1()):il(Zt())}return n}function V5(){const t=[];if(Lt("("),!it(")"))for(;ie<Pt&&(t.push(hi()),!it(")"));)Lt(",");return Lt(")"),t}function q5(){ie=Xe.start;const t=Zt();return k5(t)||il(t),th(t.value)}function j5(){return Lt("."),q5()}function W5(){Lt("[");const t=rh();return Lt("]"),t}function Q5(){var t,e,n;for(t=H5();;)if(it("."))n=j5(),t=A1(".",t,n);else if(it("("))e=V5(),t=F5(t,e);else if(it("["))n=W5(),t=A1("[",t,n);else break;return t}function C1(){const t=Q5();if(Xe.type===Yt&&(it("++")||it("--")))throw new Error(zs);return t}function ol(){var t,e;if(Xe.type!==Yt&&Xe.type!==Dr)e=C1();else{if(it("++")||it("--"))throw new Error(zs);if(it("+")||it("-")||it("~")||it("!"))t=Zt(),e=ol(),e=L5(t.value,e);else{if(nh("delete")||nh("void")||nh("typeof"))throw new Error(zs);e=C1()}}return e}function I1(t){let e=0;if(t.type!==Yt&&t.type!==Dr)return 0;switch(t.value){case"||":e=1;break;case"&&":e=2;break;case"|":e=3;break;case"^":e=4;break;case"&":e=5;break;case"==":case"!=":case"===":case"!==":e=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":e=7;break;case"<<":case">>":case">>>":e=8;break;case"+":case"-":e=9;break;case"*":case"/":case"%":e=11;break}return e}function Y5(){var t,e,n,r,o,i,s,a,c,l;if(t=Xe,c=ol(),r=Xe,o=I1(r),o===0)return c;for(r.prec=o,Zt(),e=[t,Xe],s=ol(),i=[c,r,s];(o=I1(Xe))>0;){for(;i.length>2&&o<=i[i.length-2].prec;)s=i.pop(),a=i.pop().value,c=i.pop(),e.pop(),n=v1(a,c,s),i.push(n);r=Zt(),r.prec=o,i.push(r),e.push(Xe),n=ol(),i.push(n)}for(l=i.length-1,n=i[l],e.pop();l>1;)e.pop(),n=v1(i[l-1].value,i[l-2],n),l-=2;return n}function hi(){var t,e,n;return t=Y5(),it("?")&&(Zt(),e=hi(),Lt(":"),n=hi(),t=M5(t,e,n)),t}function rh(){const t=hi();if(it(","))throw new Error(zs);return t}function Z5(t){Ae=t,ie=0,Pt=Ae.length,Xe=null,x1();const e=rh();if(Xe.type!==Ns)throw new Error("Unexpect token after expression.");return e}var X5={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 T1(t){function e(s,a,c,l){let u=t(a[0]);return c&&(u=c+"("+u+")",c.lastIndexOf("new ",0)===0&&(u="("+u+")")),u+"."+s+(l<0?"":l===0?"()":"("+a.slice(1).map(t).join(",")+")")}function n(s,a,c){return l=>e(s,l,a,c)}const r="new Date",o="String",i="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(s){s.length<3&&mt("Missing arguments to clamp function."),s.length>3&&mt("Too many arguments to clamp function.");const a=s.map(t);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[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",o,0),lower:n("toLowerCase",o,0),substring:n("substring",o),split:n("split",o),trim:n("trim",o,0),regexp:i,test:n("test",i),if:function(s){s.length<3&&mt("Missing arguments to if function."),s.length>3&&mt("Too many arguments to if function.");const a=s.map(t);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function K5(t){const e=t&&t.length-1;return e&&(t[0]==='"'&&t[e]==='"'||t[0]==="'"&&t[e]==="'")?t.slice(1,-1):t}function J5(t){t=t||{};const e=t.allowed?Za(t.allowed):{},n=t.forbidden?Za(t.forbidden):{},r=t.constants||X5,o=(t.functions||T1)(f),i=t.globalvar,s=t.fieldvar,a=on(i)?i:p=>`${i}["${p}"]`;let c={},l={},u=0;function f(p){if(nt(p))return p;const y=h[p.type];return y==null&&mt("Unsupported type: "+p.type),y(p)}const h={Literal:p=>p.raw,Identifier:p=>{const y=p.name;return u>0?y:Mi(n,y)?mt("Illegal identifier: "+y):Mi(r,y)?r[y]:Mi(e,y)?y:(c[y]=1,a(y))},MemberExpression:p=>{const y=!p.computed,v=f(p.object);y&&(u+=1);const b=f(p.property);return v===s&&(l[K5(b)]=1),y&&(u-=1),v+(y?"."+b:"["+b+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&mt("Illegal callee type: "+p.callee.type);const y=p.callee.name,v=p.arguments,b=Mi(o,y)&&o[y];return b||mt("Unrecognized function: "+y),on(b)?b(v):b+"("+v.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=>{u+=1;const y=f(p.key);return u-=1,y+":"+f(p.value)}};function d(p){const y={code:f(p),globals:Object.keys(c),fields:Object.keys(l)};return c={},l={},y}return d.functions=o,d.constants=r,d}function D1(t,e,n){return n=(n-t)/(e-t),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function io(t,e=0,n=1){return Math.max(e,Math.min(n,t))}function $5(t,e,n){return io((n-t)/(e-t),0,1)}const On=1,Br=2,ih=4;class oh{constructor(e){ve(this,Ei);Ut(this,"stats",{count:0,first:null});Ut(this,"paramMediatorProvider",null);this.paramMediatorProvider=e,this.children=[],this.parent=void 0,this.completed=!1}get behavior(){return 0}get label(){return`(${this.constructor.name})`}reset(){this.completed=!1;for(const e of this.children)e.reset();this.stats.count=0,this.stats.first=null}initialize(){}setParent(e){this.parent=e}addChild(e){if(e.parent)throw new Error("Cannot add the child! It already has a parent.");return this.children.push(e),e.setParent(this),he(this,Ei,Ga).call(this),this}adopt(e){e.parent&&e.parent.removeChild(e),this.addChild(e)}adoptChildrenOf(e){for(const n of e.children)this.adopt(n)}insertAsParent(e){var n;if(this.isRoot())throw new Error("Cannot insert a new parent for a root node!");e.parent=this.parent,this.parent.children[this.parent.children.indexOf(this)]=e,he(n=this.parent,Ei,Ga).call(n),this.parent=void 0,e.addChild(this)}removeChild(e){const n=this.children.indexOf(e);if(n>-1)this.children.splice(n,1),e.parent=void 0,he(this,Ei,Ga).call(this);else throw new Error("Trying to remove an unknown child node!")}excise(){var e;if(this.isRoot())throw new Error("Cannot excise root node!");if(this.isTerminal())this.parent.removeChild(this);else if(this.children.length==1){const n=this.children[0];n.setParent(this.parent),this.parent.children[this.parent.children.indexOf(this)]=n,he(e=this.parent,Ei,Ga).call(e),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(e){e(this);for(const n of this.children)n.visit(e);e.afterChildren&&e.afterChildren(this)}subtreeToString(e=0){const n=this.children.map(r=>r.subtreeToString(e+1)).join("");return`${" ".repeat(e*2)}* ${this.label}${"identifier"in this&&this.identifier?": "+this.identifier:""}
|
|
262
|
+
${n}`}handle(e){this._propagate(e)}complete(){this.completed=!0;for(const e of this.children)e.complete()}beginBatch(e){for(const n of this.children)n.beginBatch(e)}get paramMediator(){if(this.paramMediatorProvider)return this.paramMediatorProvider.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(e){}}Ei=new WeakSet,Ga=function(){this._propagate=Function("children","stats",ns(this.children.length).map(e=>`const child${e} = children[${e}];`).join(`
|
|
263
263
|
`)+`return function propagate(datum) {
|
|
264
264
|
if (stats.count === 0) {
|
|
265
265
|
stats.first = structuredClone(datum);
|
|
266
266
|
}
|
|
267
267
|
stats.count++;
|
|
268
|
-
${
|
|
268
|
+
${ns(this.children.length).map(e=>`child${e}.handle(datum);`).join(`
|
|
269
269
|
`)}
|
|
270
|
-
};`)(this.children,this.stats)};function
|
|
270
|
+
};`)(this.children,this.stats)};function B1(t){return t.type=="file"}function eI(t){return t.type=="facet"}class wt extends oh{constructor(n,r){super(r);ve(this,va);Pe(this,va,n.type)}get label(){return X(this,va)}}va=new WeakMap;const cn="_uniqueId",_1=1e4,k1=[null];class sh extends wt{get behavior(){return Br}constructor(e){super(e),this.params=e,this.as=e.as??cn,this._blocks=[],this._usedBlocks=0,this._id=-1}initialize(){}reset(){super.reset(),this._usedBlocks=0,this._id=-1}handle(e){e[this.as]=this._nextId(),this._propagate(e)}_nextId(){return++this._id%_1==0&&(this._id=this._getBlock()*_1),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const e=k1.length;return k1[e]=this,this._blocks.push(e),this._usedBlocks++,e}}function R1(t){return{type:"single",datum:t,uniqueId:t==null?void 0:t[cn]}}function F1(t){return t??(t=[]),{type:"multi",data:new Map(t.map(e=>[e[cn],e]))}}function tI(t,{add:e,remove:n,toggle:r}){const o=t.data;for(const i of e??[])o.set(i[cn],i);for(const i of n??[])o.delete(i[cn]);for(const i of r??[]){const s=i[cn];o.has(s)?o.delete(s):o.set(s,i)}return{type:"multi",data:o}}function nI(t,e,n=!0){if(!t||!e)return!1;if(P1(t))return t.uniqueId==null?n:t.uniqueId===e[cn];if(ah(t))return t.data.size==0?n:t.data.has(e[cn]);throw new Error("Not a selection: "+JSON.stringify(t))}function M1(t){return`selectionTest(${al(t.param)}, datum, ${!!(t.empty??!0)})`}function P1(t){return t.type==="single"}function ah(t){return t.type==="multi"}function L1(t){const e=typeof t=="string"?{type:t}:t;return ch(e)&&(e.on??(e.on="click"),e.on==="click"&&(e.toggle=!0)),e}function ch(t){return t&&t.type=="point"}const N1={clamp:io,isArray:Dt,isBoolean:jo,isDefined(t){return t!==void 0},isNumber:Gt,isObject:Rt,isRegExp:Ev,isString:nt,isValid(t){return t!=null&&t===t},lerp:S0,linearstep:$5,replace(t,e,n){return String(t).replace(e,n)},smoothstep:D1,selectionTest:nI};function rI(t){const e=T1(t);for(const n in N1)e[n]=`this.${n}`;return e}const iI=J5({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:rI});function oI(t,e={}){try{const n=Z5(t),r=iI(n),o=Function("datum","globalObject",`"use strict";
|
|
271
271
|
try {
|
|
272
272
|
return (${r.code});
|
|
273
273
|
} catch (e) {
|
|
274
|
-
throw new Error("Error evaluating expression: " + ${JSON.stringify(
|
|
275
|
-
}`).bind(
|
|
276
|
-
${r.type} ${
|
|
274
|
+
throw new Error("Error evaluating expression: " + ${JSON.stringify(t)} + ", " + e.message, e);
|
|
275
|
+
}`).bind(N1),i=s=>o(s,e);return i.fields=r.fields,i.globals=r.globals,i.code=r.code,i}catch(n){throw new Error(`Invalid expression: ${t}, ${n.message}`)}}class sI{constructor(e){ve(this,Lr);Ut(this,"paramListeners");ve(this,Si,new Map);ve(this,Io,new Map);ve(this,To,new Map);ve(this,Aa);Pe(this,Aa,e??(()=>{})),Pe(this,Lr,new Map),this.paramListeners=new Map}registerParam(e){const n=e.name;if("value"in e&&"expr"in e)throw new Error(`The parameter "${n}" must not have both value and expr properties!`);let r;if(e.push=="outer"){const o=this.findMediatorForParam(n);if(!o)throw new Error(`Parameter "${n}" not found in outer scope!`);const i=o.paramConfigs.get(n);if("expr"in i||"select"in i)throw new Error(`The outer parameter "${n}" must not have expr or select properties!`);r=o.getSetter(n),X(this,Si).set(n,r)}else if("value"in e)r=this.allocateSetter(n,e.value);else if("expr"in e){const o=this.createExpression(e.expr),i=this.allocateSetter(n,o(null));o.addListener(()=>i(o(null))),r=s=>{}}else r=this.allocateSetter(n,null);if("select"in e){const o=L1(e.select);ch(o)&&r(o.toggle?F1():R1(null))}return X(this,To).set(n,e),r}allocateSetter(e,n,r=!1){if(al(e),X(this,Si).has(e))throw new Error("Setter already allocated for parameter: "+e);const o=i=>{const s=X(this,Lr).get(e);if(i!==s){X(this,Lr).set(e,i);const a=this.paramListeners.get(e);if(a&&!r)for(const c of a)c()}};return o(n),X(this,Si).set(e,o),o}getSetter(e){const n=X(this,Si).get(e);if(!n)throw new Error("Setter not found for parameter: "+e);return n}getValue(e){return X(this,Lr).get(e)}findValue(e){const n=this.findMediatorForParam(e);return n==null?void 0:n.getValue(e)}get paramConfigs(){return X(this,To)}findMediatorForParam(e){var n;return X(this,Lr).has(e)?this:(n=X(this,Aa).call(this))==null?void 0:n.findMediatorForParam(e)}createExpression(e){if(X(this,Io).has(e))return X(this,Io).get(e);const n={},r=oI(e,n),o=new Map;for(const s of r.globals){const a=this.findMediatorForParam(s);if(!a)throw new Error(`Unknown variable "${s}" in expression: ${e}`);o.set(s,a),Object.defineProperty(n,s,{enumerable:!0,get(){return a.getValue(s)}})}const i=new Set;return r.addListener=s=>{for(const[a,c]of o){const l=c.paramListeners.get(a)??new Set;c.paramListeners.set(a,l),l.add(s),i.add(s)}},r.invalidate=()=>{var s;for(const[a,c]of o)for(const l of i)(s=c.paramListeners.get(a))==null||s.delete(l)},r.identifier=()=>r.code,X(this,Io).set(e,r),r}evaluateAndGet(e){return this.createExpression(e)()}hasPointSelections(){for(const e of X(this,To).values())if(cI(e)){const n=e.select;if(nt(n)){if(n=="point")return!0}else if(n.type=="point")return!0}return!1}}Lr=new WeakMap,Si=new WeakMap,Io=new WeakMap,To=new WeakMap,Aa=new WeakMap;function qt(t){return typeof t=="object"&&t!=null&&"expr"in t&&nt(t.expr)}function Kt(t){if(qt(t))throw new Error(`ExprRef ${JSON.stringify(t)} not allowed here. Expected a scalar value.`);return t}function aI(t){return("expr"in t||"bind"in t)&&!("select"in t)}function cI(t){return!("expr"in t||"bind"in t)&&"select"in t}function sl(t,e,n){const r={...e},o=[],i=s=>{o.push(s),o.length===1&&queueMicrotask(()=>{n(o.slice()),o.length=0})};for(const[s,a]of Object.entries(e))if(qt(a)){const c=t.createExpression(a.expr);n&&c.addListener(()=>i(s)),Object.defineProperty(r,s,{enumerable:!0,get(){return c()}})}else r[s]=a;return r}function al(t){if(!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t))throw new Error(`Invalid parameter name: ${t}. Must be a valid JavaScript identifier.`);return t}function lI(t){return Object.assign(()=>t,{addListener:()=>{},invalidate:()=>{},identifier:()=>"constant",fields:[],globals:[],code:JSON.stringify(t)})}function O1(t,e,n){if(!t)return;function r(i){const s=i;return s.fields??(s.fields=[]),s.constant=s.fields.length===0,s.channelDef=e,s.channel=t,s.scaleChannel=((Jt(e)&&e.resolutionChannel)??(Qs(t)&&t))||void 0,"param"in e?(s.predicate=n.createExpression(M1(e)),s.predicate.param=e.param,s.predicate.empty=e.empty??!0):(s.predicate=lI(!0),s.predicate.empty=!1),s.asNumberAccessor=()=>s,s}function o(i){if(qt(i)){const s=r(n.createExpression(i.expr));if(s.fields.length>0)throw new Error("Expression in DatumDef/ValueDef cannot access data fields: "+i.expr);return s}else{const s=i;return r(()=>s)}}if(_r(e))try{return r(Ze(e.field))}catch(i){throw new Error(`Invalid field definition: ${i.message}`)}else{if(js(e))return r(n.createExpression(e.expr));if(qs(e))return o(e.datum);if(ln(e))return o(e.value);throw new Error(`Invalid channel definition: "${t}": ${JSON.stringify(e)}! The channel definition must contain one of the following properties: "field", "datum", "value" or "expr".`)}}function uI(t,e,n){const r=[];if(pI(e)||gI(e)){const o=Array.isArray(e.condition)?e.condition:[e.condition];for(const i of o)r.push(O1(t,i,n))}if(r.push(O1(t,e,n)),r.filter(o=>!o.constant).length>1)throw new Error("Only one accessor can be non-constant. Channel: "+t);return r}function fI(t,e){const n={},r=o=>{var i;return(i=t.getScaleResolution(o))==null?void 0:i.scale};for(const[o,i]of Object.entries(e))i&&(n[o]=hI(uI(o,i,t.paramMediator),r));return n}function hI(t,e){if(t.length===1)return z1(t[0],e);const n=t.map(i=>i.predicate),r=t.map(i=>z1(i,e));return Object.assign(i=>{for(let s=0;s<r.length;s++)if(n[s](i))return r[s](i)},{constant:!1,accessors:r.map(i=>i.accessors[0]),dataAccessor:r.map(i=>i.dataAccessor).find(i=>i),scale:r.map(i=>i.scale).find(i=>i),channelDef:t.at(-1).channelDef})}function z1(t,e){const{channel:n,scaleChannel:r,channelDef:o}=t,i=t.scaleChannel?e(r):void 0;if(r&&!i)throw new Error(`Missing scale! "${n}": ${JSON.stringify(o)}`);return Object.assign(i?s=>i(t(s)):s=>t(s),{scale:i,constant:t.constant,accessors:[t],dataAccessor:t.constant?void 0:t,channelDef:o})}function ln(t){return t&&"value"in t}function _r(t){return t&&"field"in t}function qs(t){return t&&"datum"in t}function Jt(t){return _r(t)||qs(t)||js(t)||U1(t)}function dI(t,e){const n=t.mark.encoding[e];if(Jt(n))return n;throw new Error("Not a channel def with scale!")}function U1(t){return t&&"chrom"in t}function js(t){return t&&"expr"in t}function pI(t){return(_r(t)||qs(t))&&"condition"in t}function gI(t){return ln(t)&&"condition"in t}const oo=["x","y"],mI=["x2","y2"],bI=[...oo,...mI];function G1(t){return oo.includes(t)}function Ws(t){return bI.includes(t)}const H1={x:"x2",y:"y2"},V1=Object.fromEntries(Object.entries(H1).map(t=>[t[1],t[0]]));function lh(t){return t in V1}function yI(t){const e=H1[t];if(e)return e;throw new Error(`${t} has no secondary channel!`)}function di(t){return V1[t]??t}function kr(t){return["color","fill","stroke"].includes(di(t))}function cl(t){return["shape"].includes(t)}function Qs(t){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(t)}function wI(t){switch(t){case"shape":return["circle","square","cross","diamond","triangle-up","triangle-right","triangle-down","triangle-left","tick-up","tick-right","tick-down","tick-left"]}}function q1(t){if(!cl(t))throw new Error("Not a discrete channel: "+t);const e=new Map(wI(t).map((n,r)=>[n,r]));return n=>{const r=e.get(n);if(r!==void 0)return r;throw new Error(`Invalid value for "${t}" channel: ${n}`)}}function uh(){const t=e=>e;return t.invert=e=>e,t.copy=uh,t.invertRange=()=>{},t.type="null",t}const ll="attr_",xI="uDomain_",vI="range_",AI="accessor_",j1="scale_",EI="getScaled_",fh="uRangeTexture_",hh="uParam_",ul="checkSelection_",SI=3402823466e29;function CI(t){const e=t.match(/^(?:(\w+)-)?(\w+)$/);if(!e)throw new Error("Not a scale type: "+t);return{family:e[1]||"continuous",transform:e[2]}}function Ys(t,e){return`${AI}${t}_${e}`}function II(t,e,n){let r;if(cl(t))r=pi(q1(t)(n));else if(nt(n))if(kr(t))r=kI(n);else throw new Error(`String values are not supported on the "${t}" channel: ${n}`);else if(jo(n))r=pi(n?1:0);else if(n===null)if(kr(t))r=pi([0,0,0]);else throw new Error(`null value is not supported on the "${t}" chanel.`);else r=pi(n);const o=Ys(t,e),i=`
|
|
276
|
+
${r.type} ${o}() {
|
|
277
277
|
// Constant value
|
|
278
278
|
return ${r};
|
|
279
|
-
}`;return{channel:
|
|
280
|
-
uniform ${n} ${
|
|
281
|
-
${n} ${
|
|
279
|
+
}`;return{channel:t,accessorGlsl:i,accessorFunctionName:o}}function TI(t,e){let n="float",r=c=>c;kr(t)&&(n="vec3",r=c=>X1(c));const o=`u${LI(t)}_${e}`,i=` // Dynamic value
|
|
280
|
+
uniform ${n} ${o};`,s=Ys(t,e);let a=`
|
|
281
|
+
${n} ${s}() {
|
|
282
282
|
// Dynamic value
|
|
283
|
-
return ${i};
|
|
284
|
-
}`;return{channel:e,uniformName:i,uniformGlsl:o,accessorGlsl:s,accessorFunctionName:a,adjuster:r}}function c2(e,t,n,r=[e]){const{attributeType:i}=Ts(t,e),o=Jl+hd(r),a=`in highp ${i} ${o};`,s=Cs(e,n),c=`
|
|
285
|
-
${i} ${s}() {
|
|
286
283
|
return ${o};
|
|
287
|
-
}`;return{channel:
|
|
288
|
-
${
|
|
284
|
+
}`;return{channel:t,uniformName:o,uniformGlsl:i,accessorGlsl:a,accessorFunctionName:s,adjuster:r}}function W1(t,e,n,r=[t]){const{attributeType:o}=Zs(e,t),i=ll+ph(r),s=`in highp ${o} ${i};`,a=Ys(t,n),c=`
|
|
285
|
+
${o} ${a}() {
|
|
289
286
|
return ${i};
|
|
290
|
-
}`;return{channel:
|
|
291
|
-
${
|
|
292
|
-
|
|
287
|
+
}`;return{channel:t,attributeName:i,attributeGlsl:s,accessorGlsl:c,accessorFunctionName:a}}function DI(t,e,n){const{attributeType:r}=Zs(e,t),o=ll+ph(t),i=` uniform highp ${r} ${o};`,s=Ys(t,n),a=`
|
|
288
|
+
${r} ${s}() {
|
|
289
|
+
return ${o};
|
|
290
|
+
}`;return{channel:t,uniformName:o,uniformGlsl:i,accessorGlsl:a,accessorFunctionName:s}}function BI(t,e,n){e??(e=uh());const r=di(t),o=xI+r,i=vI+r,{hp:s,attributeType:a}=Zs(e,t),c=e.domain?e.domain().length:void 0;let l;const u=[];u.push(""),u.push("/".repeat(70)),u.push(`// Channel: ${t}`),u.push("");const{transform:f}=CI(e.type),h=(B,...O)=>RI.apply(null,[B,"value",...O]);let d;switch(f){case"linear":d=h("scaleLinear","domain",i);break;case"log":d=h("scaleLog","domain",i,e.base());break;case"symlog":d=h("scaleSymlog","domain",i,e.constant());break;case"pow":case"sqrt":d=h("scalePow","domain",i,e.exponent());break;case"index":case"locus":d=h("scaleBandHp","domain",i,e.paddingInner(),e.paddingOuter(),e.align(),n.band??.5);break;case"point":case"band":d=h("scaleBand","domain",i,e.paddingInner(),e.paddingOuter(),e.align(),n.band??.5);break;case"ordinal":case"null":case"identity":d=h("scaleIdentity");break;case"threshold":break;default:throw new Error(`Unsupported scale type: ${e.type}! ${t}: ${JSON.stringify(n)}`)}const p=tb(e,t);let y;if(p&&t==r){const B=e.props.range??[];if(qt(B)||B.some(qt)){if(p.length<1||p.length>4)throw new Error(`A range with ExprRefs must have 1-4 elements, not ${p.length}! Range: ${JSON.stringify(p)}`);y=` uniform ${Y1(p.length)} ${i};`}else if(p.length&&p.every(Gt)){const O=K1(p);u.push(`const ${O.type} ${i} = ${O};`)}}const v=Z1(t);let b;if(kr(t)){const B=fh+r;if(t==r&&u.push(`uniform sampler2D ${B};`),Bt(e.type))b=`getInterpolatedColor(${B}, transformed)`;else if(Tr(e.type)||li(e.type))b=`getDiscreteColor(${B}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(e.type==="ordinal"||li(e.type)){const B=fh+r;t==r&&u.push(`uniform sampler2D ${B};`),b=`getDiscreteColor(${B}, int(transformed)).r`}const A=[],C=Bt(e.type)&&c>2,E=li(e.type)||C;if(A.push("int slot = 0;"),E){const B=o;A.push(C?`while (slot < ${B}.length() - 2 && value >= ${B}[slot + 1]) { slot++; }`:`while (slot < ${B}.length() && value >= ${B}[slot]) { slot++; }`)}const I=Bt(e.type)||li(e.type)||["band","point"].includes(e.type);if(d){const B=o;I&&(s?A.push(`vec3 domain = ${B};`):A.push(`vec2 domain = vec2(${B}[slot], ${B}[slot + 1]);`)),A.push(`float transformed = ${d};`),C&&A.push(`transformed = (float(slot) + transformed) / (float(${B}.length() - 1));`)}else A.push("float transformed = float(slot);");"clamp"in e&&e.clamp()&&A.push(`transformed = clampToRange(transformed, ${K1(p)});`),A.push(`return ${b??"transformed"};`),u.push(`
|
|
291
|
+
${v} ${j1}${t}(${a} value) {
|
|
292
|
+
${A.map(B=>` ${B}
|
|
293
293
|
`).join("")}
|
|
294
294
|
}`);const R=u.join(`
|
|
295
|
-
`);if(
|
|
296
|
-
${
|
|
295
|
+
`);if(I&&t==r){const B=Bt(e.type)||li(e.type)?c:2;l=s?` highp vec3 ${o};`:` mediump float ${o}[${B}];`}return{glsl:R,domainUniformName:o,domainUniform:l,rangeUniformName:i,rangeUniform:y}}function _I(t,e){const n=Z1(t),r=[],o=[];for(let i=0;i<e.length;i++){const s=e[i],a=Ys(t,i),{param:c,empty:l}=s.predicate;r.push(c?`${ul}${c}(${!!l})`:null),o.push(s.scaleChannel?`return ${j1}${t}(${a}());`:`return ${a}();`)}return`${n} ${EI}${t}() {
|
|
296
|
+
${NI(r,o)}
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
#define ${
|
|
300
|
-
${
|
|
299
|
+
#define ${t}_DEFINED`}function Q1(t){if(!Gt(t))throw new Error(`Not a number: ${t}`);if(t==1/0)return""+SI;if(t==-1/0)return""+-3402823466e29;{let e=`${t}`;return/^(-)?\d+$/.test(e)&&(e+=".0"),e}}function pi(t){typeof t=="number"&&(t=[t]);const e=t.length;if(e<1||e>4)throw new Error("Invalid number of components: "+e);const n=Y1(e),r=`${n}(${t.map(Q1).join(", ")})`;return Object.assign(r,{type:n,numComponents:e})}function Y1(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error("Invalid number of components: "+t)}}function Z1(t){return kr(t)?"vec3":t=="uniqueId"?"uint":"float"}function X1(t){const e=Er(t).rgb();return[e.r,e.g,e.b].map(n=>n/255)}function kI(t){return pi(X1(t))}function K1(t){return pi([t[0],ws(t)])}function RI(t,...e){const n=[];for(const r of e)Gt(r)?n.push(Q1(r)):Dt(r)?n.push(pi(r)):n.push(r);return`${t}(${n.join(", ")})`}function Zs(t,e){var s;const n=t&&Tr(t.type),r=t&&J1(t.type),o=r&&FI(t.domain()),i=o?{attributeType:"uvec2",arrayConstructor:Uint32Array}:r?{attributeType:"uint",arrayConstructor:Uint32Array}:n?{attributeType:"uint",arrayConstructor:Uint16Array}:e=="uniqueId"?{attributeType:"uint",arrayConstructor:Uint32Array}:{attributeType:"float",arrayConstructor:Float32Array};return Object.assign(i,{numComponents:+(((s=i.attributeType.match(/^vec([234])$/))==null?void 0:s[1])??1),discrete:n,hp:r,largeHp:o})}function J1(t){return t=="index"||t=="locus"}function FI(t){return t[1]>2**32}const dh=2**12;function $1(t,e=[]){const n=t%dh,r=(t-n)/dh;return e[0]=r,e[1]=n,e}function MI(t){const e=t%dh;return[t-e,e]}function PI(t){return[...MI(t[0]),t[1]-t[0]]}function eb(t){const e=new Vn([],JSON.stringify);for(const[n,r]of Object.entries(t)){const o=r.channelDef;if(_r(o)){const s=[o.field,r.scale?(Bt(r.scale.type)||li(r.scale.type))??!1:!1];e.set(s,[...e.get(s)??[],n])}}return e}function ph(t){return Wt(t).join("_")}function LI(t){return t[0].toUpperCase()+t.slice(1)}const tb=(t,e)=>Jc(t.type)||Bt(t.type)&&kr(e)?[0,1]:t.range?t.range():void 0;function NI(t,e){if(t.length!=e.length)throw new Error("Unequal array lengths");const n=t.length;if(n==0)return"";if(n==1&&t[0]==null)return e[0];const r=[];for(let o=0;o<n;o++){const i=t[o],s=o==0?`if (${i})`:i==null&&o==n-1?"else":`else if (${i})`;r.push(` ${s} {
|
|
300
|
+
${e[o]}
|
|
301
301
|
}`)}return r.join(`
|
|
302
|
-
`)}const
|
|
303
|
-
`),n=this.pushers.map((r,
|
|
304
|
-
`);this.pushAll=new Function("that",`${
|
|
302
|
+
`)}const nb=1e4;class OI{constructor(e){ve(this,Do);ve(this,Ea,!1);this.size=e,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}configure(){if(X(this,Ea))throw new Error("Already configured!");he(this,Do,qx).call(this),he(this,Do,jx).call(this),Pe(this,Ea,!0)}addConverter(e,n){const r=this.createUpdater(ll+e,n.numComponents||1,n.targetArrayType??Float32Array,n.arrayReference),o=n.f;this.dataUpdaters.push(n.arrayReference?i=>r(o(i)):i=>r(o(i)))}createUpdater(e,n,r=Float32Array,o=void 0){if(!Gt(this.size))throw new Error("The number of vertices must be defined!");let i,s,a=0;const c=new r(this.size*n);if(this.arrays[e]={data:c,numComponents:n},n==1){let l=0;const u=f=>{l=+f};i=()=>{c[a++]=l},s=u}else{let l=o??[0];const u=o?f=>{}:f=>{l=f};switch(n){case 1:break;case 2:i=()=>{c[a++]=l[0],c[a++]=l[1]},s=u;break;case 3:i=()=>{c[a++]=l[0],c[a++]=l[1],c[a++]=l[2]},s=u;break;case 4:i=()=>{c[a++]=l[0],c[a++]=l[1],c[a++]=l[2],c[a++]=l[3]},s=u;break;default:throw new Error("Invalid numComponents: "+n)}}return this.pushers.push(i),s}pushAll(){throw new Error("Call configure() first!")}updateFromDatum(e){throw new Error("Call configure() first!")}pushFromDatum(e){this.updateFromDatum(e),this.pushAll()}}Ea=new WeakMap,Do=new WeakSet,qx=function(){if(this.size>nb){const e=this.pushers.map((r,o)=>`const p${o} = that.pushers[${o}];`).join(`
|
|
303
|
+
`),n=this.pushers.map((r,o)=>` p${o}();`).join(`
|
|
304
|
+
`);this.pushAll=new Function("that",`${e}
|
|
305
305
|
return function unrolledPushAll() {
|
|
306
306
|
${n}
|
|
307
307
|
that.vertexCount++;
|
|
308
|
-
};`)(this)}else this.pushAll=()=>{for(let
|
|
309
|
-
`),n=this.dataUpdaters.map((r,
|
|
310
|
-
`);this.updateFromDatum=new Function("that","datum",`${
|
|
308
|
+
};`)(this)}else this.pushAll=()=>{for(let e=0;e<this.pushers.length;e++)this.pushers[e]();this.vertexCount++}},jx=function(){if(this.size>nb){const e=this.dataUpdaters.map((r,o)=>`const u${o} = that.dataUpdaters[${o}];`).join(`
|
|
309
|
+
`),n=this.dataUpdaters.map((r,o)=>` u${o}(datum);`).join(`
|
|
310
|
+
`);this.updateFromDatum=new Function("that","datum",`${e}
|
|
311
311
|
return function unrolledUpdateFromDatum(datum) {
|
|
312
312
|
${n}
|
|
313
|
-
};`)(this)}else this.updateFromDatum=
|
|
313
|
+
};`)(this)}else this.updateFromDatum=e=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](e)}};const Xs=5,gh=127;function mh(t){const e=[];for(let p=0;p<=gh;p++)e.push(void 0);const n=new Map;for(const p of t.chars)p.id<=gh?e[p.id]=p:n.set(p.id,p);const r=8722;n.has(r)||n.set(r,e[45]);function o(p){return(p<=gh?e[p]:n.get(p))||e[63]}function i(p){return o(p.charCodeAt(0))}const s=t.common.base,a=i("x"),c=i("X"),l=i("q"),u=a.height-Xs*2,f=c.height-Xs*2,h=l.height-a.height+l.yoffset-a.yoffset;function d(p,y=1){let v=0;for(let b=0;b<p.length;b++)v+=o(p.charCodeAt(b)).xadvance;return v/s*y}return{measureWidth:d,getCharByCode:o,getChar:i,xHeight:u,capHeight:f,descent:h,common:t.common}}const rb=2**31-1,zI=-2147483648;function UI(t,e,n,r=n){const o=new Array(t);o.fill(rb);let i=zI,s=-1/0,a=!1;const c=new Array(t);c.fill(0);const l=e[0],f=(e[1]-e[0])/t,h=(b,A)=>{const C=(b-l)/f,E=Math.floor(C);return io(A&&E==C?E-1:E,0,t-1)};function d(b,A,C){if(a)return;if(A>i)i=A;else{a=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}const E=n(b);if(E<s){a=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}s=E;const I=h(E,!1);o[I]>A&&(o[I]=A),c[I]<C&&(c[I]=C)}function p(b,A,C){if(a)return;if(A>i)i=A;else{a=!0,console.debug("Items (vertices) are not ordered properly. Disabling binned index.");return}const E=n(b),I=r(b);if(E<s){a=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}else if(I<E){a=!0,console.debug("End index is less than start index. Disabling binned index. Datum: ",b);return}s=E;const R=h(E,!1),B=h(I,!0);for(let O=R;O<=B;O++)o[O]>A&&(o[O]=A),c[O]<C&&(c[O]=C)}const y=(b,A,C=[0,0])=>{const E=h(b,!1),I=h(A,!0),R=o[E],B=Math.max(c[I],R);return C[0]=R,C[1]=B,C},v=()=>{if(a)return;for(let A=1;A<c.length;A++)c[A]<c[A-1]&&(c[A]=c[A-1]);let b=!0;for(let A=o.length-1;A>0;A--)b&&o[A]==rb?(o[A]=c[A],b=!1):o[A-1]>o[A]&&(o[A-1]=o[A]);return y};return d.getIndex=v,p.getIndex=v,n==r?d:p}function GI(){let t=0,e,n=0;const r=new Map,o=i=>(i===e||(n=r.get(i),n===void 0&&(n=t++,r.set(i,n)),e=i),n);return o.addAll=i=>{for(const s of i)o(s)},o.invert=i=>{for(const s of r.entries())if(s[1]==i)return s[0]},o.domain=()=>[...r.keys()],o}class Ks{constructor({encoders:e,numVertices:n=void 0,attributes:r=[]}){this.encoders=e,this.variableEncoders=Object.fromEntries(Object.entries(e).filter(([i,s])=>r.includes(i)&&s&&!s.constant));const o=[...eb(e).entries()].filter(([i,s])=>i[1]&&s.length>1).map(([i,s])=>s);this.allocatedVertices=n,this.variableBuilder=new OI(n);for(const[i,s]of Object.entries(this.variableEncoders)){const a=s.dataAccessor;if(!a)continue;const c=o.find(C=>C.find(E=>E==i));if(c&&i!=c[0])continue;const l=a.asNumberAccessor(),u=s.scale,{largeHp:f,arrayConstructor:h,discrete:d,numComponents:p}=Zs(u,i),y=[0,0];let v;u&&d&&"domain"in u&&(v=GI(),v.addAll(u.domain()));const b=v?C=>v(a(C)):f?C=>$1(l(C),y):l,A=c?ph(c):i;this.variableBuilder.addConverter(A,{f:b,numComponents:p,arrayReference:f?y:void 0,targetArrayType:h})}this.lastOffset=0,this.rangeMap=new Vn([],JSON.stringify)}registerBatch(e){var i;const n=this.lastOffset,r=this.variableBuilder.vertexCount,o=r-n;o&&this.rangeMap.set(e,{offset:n,count:o,xIndex:(i=this.xIndexer)==null?void 0:i.getIndex()}),this.lastOffset=r}addBatches(e){for(const[n,r]of e)this.addBatch(n,r)}addBatch(e,n,r=0,o=n.length){this.prepareXIndexer(n,r,o);for(let i=r;i<o;i++){const s=n[i];this.variableBuilder.pushFromDatum(s),this.addToXIndex(s)}this.registerBatch(e)}prepareXIndexer(e,n=0,r=n+e.length){var l;const o=()=>{this.addToXIndex=u=>{},this.xIndexer=void 0},i=(l=this.encoders.x)==null?void 0:l.channelDef;if(!("buildIndex"in i)||!i.buildIndex||!e.length||r-n<0){o();return}const s=u=>{var f;return u&&Bt((f=u.scale)==null?void 0:f.type)&&u},a=s(this.variableEncoders.x),c=s(this.variableEncoders.x2);if(a&&!a.constant&&(!c||!c.constant)){const u=a.dataAccessor.asNumberAccessor(),f=c?c.dataAccessor.asNumberAccessor():u,h=[u(e[n]),f(e[r-1])];if(h[1]>h[0]){this.xIndexer=UI(50,h,u,f);let d=this.variableBuilder.vertexCount;this.addToXIndex=p=>{let y=this.variableBuilder.vertexCount;this.xIndexer(p,d,y),d=y}}else o()}else o()}addToXIndex(e){}toArrays(){return{arrays:this.variableBuilder.arrays,vertexCount:this.variableBuilder.vertexCount,allocatedVertices:this.allocatedVertices,rangeMap:this.rangeMap}}}class HI extends Ks{constructor({encoders:e,attributes:n,numItems:r}){super({encoders:e,attributes:n,numVertices:r*6}),this.variableBuilder.configure();const o=this.variableBuilder.pushAll;this.pushAllSixTimes=r>500?new Function("pushAll",`return function unrolledPushAllSixTimes() {
|
|
314
314
|
pushAll(); pushAll(); pushAll(); pushAll(); pushAll(); pushAll();
|
|
315
|
-
};`)(
|
|
316
|
-
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);}bool isEmptyBinarySearchTexture(highp usampler2D s){return textureSize(s,0).x==1&&texelFetch(s,ivec2(0,0),0).r==0u;}bool binarySearchTexture(highp usampler2D s,uint value){int texSize=textureSize(s,0).x;int left=0;int right=texSize-1;while(left<=right){int mid=left+(right-left)/2;uint midValue=texelFetch(s,ivec2(mid,0),0).r;if(midValue==value){return true;}if(midValue<value){left=mid+1;}else{right=mid-1;}}return false;}/***Calculates a gamma for antialiasing opacity based on the color.*/float getGammaForColor(vec3 rgb){return mix(1.25,0.75,smoothstep(0.0,1.0,dot(rgb,vec3(0.299,0.587,0.114))));}/***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);}}`,
|
|
315
|
+
};`)(o):function(){o(),o(),o(),o(),o(),o()}}addBatch(e,n,r=0,o=n.length){if(!(o<=r)){this.prepareXIndexer(n,r,o);for(let i=r;i<o;i++){const s=n[i];this.variableBuilder.updateFromDatum(s),this.pushAllSixTimes(),this.addToXIndex(s)}this.registerBatch(e)}}}class VI extends Ks{constructor({encoders:e,attributes:n,tessellationThreshold:r=1/0,visibleRange:o=[-1/0,1/0],numItems:i}){super({encoders:e,attributes:n,numVertices:r==1/0?i*6:void 0}),this.visibleRange=o,this.tessellationThreshold=r||1/0,this.updateSide=this.variableBuilder.createUpdater("side",1),this.updatePos=this.variableBuilder.createUpdater("pos",1),this.variableBuilder.configure()}addBatch(e,n,r=0,o=n.length){this.prepareXIndexer(n,r,o);for(let i=r;i<o;i++){const s=n[i];this.variableBuilder.updateFromDatum(s),this.updateSide(-.5),this.updatePos(0),this.variableBuilder.pushAll();const a=1;for(let c=0;c<=a;c++)this.updatePos(c/a),this.updateSide(-.5),this.variableBuilder.pushAll(),this.updateSide(.5),this.variableBuilder.pushAll();this.variableBuilder.pushAll(),this.addToXIndex(s)}this.registerBatch(e)}}class qI extends Ks{constructor({encoders:e,attributes:n,numItems:r=void 0}){super({encoders:e,attributes:n,numVertices:r}),this.variableBuilder.configure()}}class jI extends Ks{constructor({encoders:e,attributes:n,numItems:r=void 0}){super({encoders:e,attributes:n,numVertices:r}),this.variableBuilder.configure()}toArrays(){const e=this.variableBuilder.arrays;for(let n of Object.values(e))n.divisor=1;return super.toArrays()}}class WI extends Ks{constructor({encoders:e,attributes:n,fontMetrics:r,properties:o,numCharacters:i=void 0}){super({encoders:e,attributes:n,numVertices:i*6}),this.metadata=r,this.metrics=r,this.properties=o;const a=e.text.channelDef;this.numberFormat=!ln(a)&&"format"in a&&a.format?Ft(a.format):c=>c,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(e,n,r=0,o=n.length){const i=this.properties.align||"left",s=this.properties.logoLetters??!1,a=this.metadata.common.base,c=this.metadata.common.scaleH;let l=-5;switch(this.properties.baseline){case"top":l+=this.metrics.capHeight;break;case"middle":l+=this.metrics.capHeight/2;break;case"bottom":l-=this.metrics.descent;break}const u=this.encoders.text,f=[0,0];this.updateVertexCoord(f);const h=[0,0];this.updateTextureCoord(h),this.prepareXIndexer(n,r,o);for(let d=r;d<o;d++){const p=n[d],y=this.numberFormat(u(p)),v=nt(y)?y:y===null?"":""+y;if(v.length==0)continue;this.variableBuilder.updateFromDatum(p);const b=s?v.length:this.metrics.measureWidth(v);this.updateWidth(b);let A=i=="right"?-b:i=="center"?-b/2:0;if(!s){const R=this.metrics.getCharByCode(v.charCodeAt(0));A-=(R.width-R.xadvance)/a/2}let C=-.5,E=1,I=1;for(let R=0;R<v.length;R++){const B=this.metrics.getCharByCode(v.charCodeAt(R)),O=s?1:B.xadvance/a;if(B.id==32){A+=O;continue}s?(I=(B.width+Xs*2)/B.width,A=-I/2,E=(B.height+Xs*2)/B.height,C=-.5-Xs/B.height):(E=B.height/a,C=-(B.height+B.yoffset+l)/a,I=B.width/a);const F=B.x,P=B.y;f[0]=A,f[1]=C+E,h[0]=F/c,h[1]=P/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=C+E,h[0]=(F+B.width)/c,h[1]=P/c,this.variableBuilder.pushAll(),f[0]=A,f[1]=C,h[0]=F/c,h[1]=(P+B.height)/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=C+E,h[0]=(F+B.width)/c,h[1]=P/c,this.variableBuilder.pushAll(),f[0]=A,f[1]=C,h[0]=F/c,h[1]=(P+B.height)/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=C,h[0]=(F+B.width)/c,h[1]=(P+B.height)/c,this.variableBuilder.pushAll(),A+=O}this.addToXIndex(p)}this.registerBatch(e)}}const ib=`#define PI 3.141593
|
|
316
|
+
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);}bool isEmptyBinarySearchTexture(highp usampler2D s){return textureSize(s,0).x==1&&texelFetch(s,ivec2(0,0),0).r==0u;}bool binarySearchTexture(highp usampler2D s,uint value){int texSize=textureSize(s,0).x;int left=0;int right=texSize-1;while(left<=right){int mid=left+(right-left)/2;uint midValue=texelFetch(s,ivec2(mid,0),0).r;if(midValue==value){return true;}if(midValue<value){left=mid+1;}else{right=mid-1;}}return false;}/***Calculates a gamma for antialiasing opacity based on the color.*/float getGammaForColor(vec3 rgb){return mix(1.25,0.75,smoothstep(0.0,1.0,dot(rgb,vec3(0.299,0.587,0.114))));}/***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);}}`,QI="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));}",YI=`/***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;
|
|
317
317
|
#if !defined(SAMPLE_FACET_UNIFORM) && !defined(SAMPLE_FACET_TEXTURE)
|
|
318
318
|
SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1.0);}
|
|
319
319
|
#elif defined(SAMPLE_FACET_UNIFORM)
|
|
@@ -321,44 +321,44 @@ SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1
|
|
|
321
321
|
#elif defined(SAMPLE_FACET_TEXTURE)
|
|
322
322
|
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);}
|
|
323
323
|
#endif
|
|
324
|
-
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;}}`,
|
|
324
|
+
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;}}`,ZI=`/**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){
|
|
325
325
|
#ifdef uniqueId_DEFINED
|
|
326
326
|
uint id=attr_uniqueId;vPickingColor=vec4(ivec4(id>>0,id>>8,id>>16,id>>24)&0xFF)/float(0xFF);
|
|
327
327
|
#else
|
|
328
328
|
vPickingColor=vec4(1.0);
|
|
329
329
|
#endif
|
|
330
|
-
return true;}return false;}`,
|
|
330
|
+
return true;}return false;}`,XI="in highp vec4 vPickingColor;",fl=Symbol("cacheMap");function hl(t,e,n){let r=Js(t).get(e);return r===void 0&&(r=n(e),Js(t).set(e,r)),r}function KI(t,e){Js(t).delete(e)}function dl(t,e){const n=Js(t);for(const r of n.keys())r.startsWith(e)&&n.delete(r);Js(t).delete(e)}function ob(t){t[fl]=new Map}function Js(t){return t[fl]||ob(t),t[fl]}function JI(t,e,n,r){const o=nt(t)?t:t.name,i=!nt(t)&&t.extent||[0,1];if(n===void 0&&!nt(t)&&(n=t.count),o){const s=Zf(o);if(on(s)){const a=sb(s,{extent:i,count:n});return $s(e,{minMag:e.LINEAR,format:e.RGB,height:1,wrap:e.CLAMP_TO_EDGE},a,r)}else{if(Dt(s))return bh(s,e);throw new Error("Unknown scheme: "+o)}}}function $I(t,e="rgb",n,r){const o=$c(t,nt(e)?e:e.type,nt(e)?void 0:e.gamma),i=sb(o);return $s(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},i,r)}function eT(t,e,n,r){const o=Math.max(t.length,n||0),i=new Float32Array(o);for(let s=0;s<o;s++)i[s]=t[s%t.length];return $s(e,{minMag:e.NEAREST,format:e.RED,internalFormat:e.R32F,height:1},i,r)}function bh(t,e,n,r){const o=ab(t,n);return $s(e,{minMag:e.NEAREST,format:e.RGB,height:1},o,r)}function sb(t,{extent:e=[0,1],reverse:n=!1,count:r=256}={}){const o=e[0],i=ws(e)-o,s=ns(r).map(a=>a/(r-1)).map(a=>o+a/i).map(t);return n&&s.reverse(),ab(s)}function ab(t,e){const n=Math.max(t.length,e||0),r=new Uint8Array(n*3);for(let o=0;o<n;o++){const i=t[o%t.length],s=Er(i);if(!s)throw new Error(`Invalid color "${i}" in the scheme ${JSON.stringify(t)}!`);const a=s.rgb();r[o*3+0]=a.r,r[o*3+1]=a.g,r[o*3+2]=a.b}return r}class tT{constructor(e,n,r,o={}){this._container=e,this._sizeSource=n??(()=>({width:void 0,height:void 0})),this._shaderCache=new Map,this.rangeTextures=new WeakMap,this.selectionTextures=new WeakMap;const i=document.createElement("canvas");e.appendChild(i);const s=a6(i,{antialias:!0,depth:!1,premultipliedAlpha:!0,...o});if(!s)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!qi(s))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");if(Yg(s),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),this.canvas=i,this.gl=s,this._pickingAttachmentOptions=[{format:s.RGBA,type:s.UNSIGNED_BYTE,minMag:s.LINEAR,wrap:s.CLAMP_TO_EDGE}],this._pickingBufferInfo=t6(s,this._pickingAttachmentOptions),s.bindFramebuffer(s.FRAMEBUFFER,null),this.adjustGl(),this._updateDpr(),this._clearColor=[0,0,0,0],r){const a=Er(r).rgb();this._clearColor=[a.r/255,a.g/255,a.b/255,a.opacity]}}invalidateSize(){this._logicalCanvasSize=void 0,this._updateDpr(),this.adjustGl()}_updateDpr(){this.dpr=window.devicePixelRatio}compileShader(e,n){const r="#version 300 es",o="precision mediump float;";Dt(n)&&(n=n.join(`
|
|
331
331
|
|
|
332
|
-
`));const
|
|
332
|
+
`));const i=this.gl,s=n.replaceAll(/ {2,}|^\s*\/\/.*$/gm,"");let a=this._shaderCache.get(s);if(!a){const c=[r,o,n].join(`
|
|
333
333
|
|
|
334
|
-
`);
|
|
335
|
-
`).map((a
|
|
334
|
+
`);a=i.createShader(e),i.shaderSource(a,c),i.compileShader(a),this._shaderCache.set(s,a)}return a}adjustGl(){const e=this.getLogicalCanvasSize();this.canvas.style.width=`${e.width}px`,this.canvas.style.height=`${e.height}px`;const n=this.getPhysicalCanvasSize(e);this.canvas.width=n.width,this.canvas.height=n.height,n6(this.gl,this._pickingBufferInfo,this._pickingAttachmentOptions)}finalize(){this.canvas.remove()}getPhysicalCanvasSize(e){return e=e||this.getLogicalCanvasSize(),{width:e.width*this.dpr,height:e.height*this.dpr}}getLogicalCanvasSize(){if(this._logicalCanvasSize)return this._logicalCanvasSize;const e=this._sizeSource(),n=window.getComputedStyle(this._container,null),r=e.width??this._container.clientWidth-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight),o=e.height??this._container.clientHeight-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom);return this._logicalCanvasSize={width:r,height:o},this._logicalCanvasSize}readPickingPixel(e,n){const r=this.gl;e*=this.dpr,n*=this.dpr;const o=this.getPhysicalCanvasSize().height,i=new Uint8Array(4);return r.bindFramebuffer(r.FRAMEBUFFER,this._pickingBufferInfo.framebuffer),r.readPixels(e,o-n-1,1,1,r.RGBA,r.UNSIGNED_BYTE,i),r.bindFramebuffer(r.FRAMEBUFFER,null),i}clearAll(){const e=this.gl,{width:n,height:r}=this.getPhysicalCanvasSize();e.viewport(0,0,n,r),e.disable(e.SCISSOR_TEST),e.clearColor(...this._clearColor),e.clear(e.COLOR_BUFFER_BIT)}createRangeTexture(e,n=!1){const r=this.rangeTextures.get(e);if(!n&&r)return;function o(s,a){return Tr(a.type)?a.domain().length:a.type=="threshold"?a.domain().length+1:a.type=="quantize"||a.type=="quantile"?s??4:s}const i=e.channel;if(kr(i)){const s=e.scale,a=s.props,c=s.range();let l;if(a.scheme)if(s.type=="threshold"&&c)l=bh(c,this.gl,s.domain().length,r);else{let u=nt(a.scheme)?void 0:a.scheme.count;u=o(u,s),l=JI(a.scheme,this.gl,u,r)}else Jc(s.type)||Bt(s.type)&&c.length>1?l=$I(c,a.interpolate,this.gl,r):l=bh(c,this.gl,s.domain().length,r);this.rangeTextures.set(e,l)}else{const s=e.scale;if(s.type==="ordinal"||li(s.type)){const a=cl(i)?q1(i):l=>l,c=s.range();this.rangeTextures.set(e,eT(c.map(a),this.gl,s.domain().length,r))}}}createSelectionTexture(e,n=!0){if(!ah(e))throw new Error("Not a multi-point selection, cannot create texture");const r=Array.from(e.data.keys()),o=r.length>0?r.sort((c,l)=>c-l):[0],i=this.selectionTextures.get(e),s=this.gl,a=$s(this.gl,{level:0,minMag:s.NEAREST,format:s.RED_INTEGER,internalFormat:s.R32UI,height:1,width:o.length},new Uint32Array(o),n?i:!1);this.selectionTextures.set(e,a)}}function nT(t,e="",n=0){const r=/ERROR:\s*\d+:(\d+)/gi,o=[...e.matchAll(r)],i=new Map(o.map((s,a)=>{const c=parseInt(s[1]),l=o[a+1],u=l?l.index:e.length,f=e.substring(s.index,u);return[c-1,f]}));return t.split(`
|
|
335
|
+
`).map((s,a)=>{const c=i.get(a);return`${a+1+n}: ${s}${c?`
|
|
336
336
|
|
|
337
337
|
^^^ ${c}`:""}`}).join(`
|
|
338
|
-
`)}function
|
|
339
|
-
Error compiling: ${
|
|
340
|
-
return ${
|
|
341
|
-
}`)}}else if(
|
|
342
|
-
uniform highp usampler2D ${P};`);const S=this.getContext().glHelper,
|
|
343
|
-
return binarySearchTexture(${
|
|
344
|
-
}`),S.createSelectionTexture(O);const
|
|
345
|
-
`+(this.encoders.uniqueId&&
|
|
338
|
+
`)}function rT(t,e,n){const r=t.createProgram();t.attachShader(r,e),t.attachShader(r,n),t.linkProgram(r);function o(){let i,s;if(!t.getProgramParameter(r,t.LINK_STATUS)){i=t.getProgramInfoLog(r);for(const c of[e,n])t.getShaderParameter(c,t.COMPILE_STATUS)||(i=t.getShaderInfoLog(c),s=nT(t.getShaderSource(c),i,0)+`
|
|
339
|
+
Error compiling: ${i}`,t.deleteShader(c));t.deleteProgram(r)}if(i)return{message:i,detail:s}}return{program:r,getProgramErrors:o}}function $s(t,e,n,r){return r?ug(t,r,n,e):r=Cs(t,{...e,src:n}),r}function cb(...t){const e={get(n,r,o){for(const i of t){const a=i()[r];if(a!==void 0)return a}},has(n,r,o){for(const i of t){const s=i();if(r in s)return!0}return!1}};return new Proxy({},e)}function iT(t){return nt(t)||Gt(t)||jo(t)}class gi extends Error{constructor(e,n){super(e),this.name="ViewError",this.view=n}}const oT="SAMPLE_FACET_UNIFORM",lb="SAMPLE_FACET_TEXTURE",ub="uSelectionTexture_";class ea{constructor(e){ve(this,Gn,[]);this.unitView=e,this.encoders=void 0,this.bufferInfo=void 0,this.bytesPerElement=new Map,this.programInfo=void 0,this.vertexArrayInfo=void 0,this.viewUniformInfo=void 0,this.markUniformInfo=void 0,this.markUniformsAltered=!0,this.selectionTextureOps=[],this.rangeMap=new sT,this.defaultProperties={get clip(){return["x","y"].map(n=>e.getScaleResolution(n)).some(n=>(n==null?void 0:n.isZoomable())??!1)},xOffset:0,yOffset:0,minBufferSize:0},this.properties=cb(typeof this.unitView.spec.mark=="object"?()=>this.unitView.spec.mark:()=>({}),()=>this.defaultProperties)}augmentDefaultProperties(e){Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors(e))}get opaque(){return!1}getAttributes(){throw new Error("Not implemented!")}getSupportedChannels(){return["sample","facetIndex","x","y","color","opacity","search","uniqueId"]}getDefaultEncoding(){const e={sample:void 0,uniqueId:void 0};return this.isPickingParticipant()&&(e.uniqueId={field:cn}),e}fixEncoding(e){return e}setupExprRefsNeedingGraphicsUpdate(e){const n=this.getSupportedChannels(),r={};for(const i of e){const s=this.properties[i];if(s&&qt(s)){const a=this.unitView.paramMediator.createExpression(s.expr);a.addListener(()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()}),n.includes(i)||Object.defineProperty(r,i,{get(){return a()}})}}const o=this.properties;this.properties=cb(()=>r,()=>o)}get encoding(){return hl(this,"encoding",()=>{var s;const e=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=a=>{const c=this.properties[a];return iT(c)||qt(c)?{value:c}:void 0},o=Object.fromEntries(this.getSupportedChannels().map(a=>[a,r(a)]).filter(a=>ln(a[1]))),i=this.fixEncoding({...e,...o,...n});for(const a of Object.keys(i))this.getSupportedChannels().includes(a)||delete i[a];return i.x&&((s=i.x).buildIndex??(s.buildIndex=!0)),i})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=fI(this.unitView,this.encoding)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return lb;if(this.unitView.getLayoutAncestors().find(e=>"samples"in e.spec))return oT}createAndLinkShaders(e,n,r=[]){const o=this.getAttributes(),i=this.encoders,s=this.getSampleFacetMode();s&&r.push(`#define ${s}`);const a="// view: "+this.unitView.getPathString();let c=[];const l=new Set,u=eb(i),f=[],h=Object.values(i).flatMap(I=>I.accessors).map(I=>I.predicate).filter(I=>I.param),d=new Map;for(const I of h){const R=I.param,B=this.unitView.paramMediator,O=B.getValue(R);if(!O)throw new Error(`Cannot infer selection type as the parameter "${R}" has no value. Please ensure that the parameter is properly defined!`);const F=ll+"uniqueId";if(P1(O)){if(!d.has(R)){const P=hh+al(R);d.set(R,"single"),f.push(" // Selection parameter"),f.push(` uniform highp uint ${P};`),X(this,Gn).push(()=>{this.registerMarkUniformValue(P,{expr:R},S=>S.uniqueId??0)}),c.push(`bool ${ul}${R}(bool empty) {
|
|
340
|
+
return ${hh}${R} == ${F} || (empty && ${hh}${R} == 0u);
|
|
341
|
+
}`)}}else if(ah(O)&&!d.has(R)){d.set(R,"multi");const P=ub+al(R);c.push(`// Selection texture
|
|
342
|
+
uniform highp usampler2D ${P};`);const S=this.getContext().glHelper,Q=S.selectionTextures;this.selectionTextureOps.push(()=>{const ce=B.getValue(R),fe=Q.get(ce);if(!fe)throw new Error(`Bug: no selection texture found for "${R}"!`);ti(this.programInfo,{[P]:fe})});const Z=ub+R;c.push(`bool ${ul}${R}(bool empty) {
|
|
343
|
+
return binarySearchTexture(${Z}, ${F}) || (empty && isEmptyBinarySearchTexture(${Z}));
|
|
344
|
+
}`),S.createSelectionTexture(O);const ae=B.createExpression(R);ae.addListener(()=>{const ce=ae(null);S.createSelectionTexture(ce),this.getContext().animator.requestRender()})}}const p=(I,R,B,O)=>{const F=R.channelDef;if(ln(F))if(qt(F.value)){const{uniformName:P,uniformGlsl:S,accessorGlsl:Q,adjuster:Z}=TI(I,B);c.push(Q),f.push(S),X(this,Gn).push(()=>{this.registerMarkUniformValue(P,F.value,Z)})}else c.push(II(I,B,F.value).accessorGlsl);else if(qs(F)){const{uniformName:P,uniformGlsl:S,accessorGlsl:Q}=DI(I,O,B);f.push(S),c.push(Q);const{largeHp:Z,discrete:ae}=Zs(O,I),ce=ae&&"domain"in O?fe=>O.domain().indexOf(fe):Z?$1:fe=>+fe;X(this,Gn).push(()=>{this.registerMarkUniformValue(P,F.datum,ce)})}else if(_r(F)){const P=u.get([F.field,!0]),{attributeGlsl:S,accessorGlsl:Q}=W1(I,O,B,P!=null&&P.includes(I)?P:void 0);l.add(S),c.push(Q)}else if(js(F)){const{attributeGlsl:P,accessorGlsl:S}=W1(I,O,B);l.add(P),c.push(S)}else throw new gi(`Unsupported channel definition: ${JSON.stringify(F)}`,this.unitView)};for(const[I,R]of Object.entries(i)){if(!o.includes(I))continue;const{channelDef:B,accessors:O,scale:F}=R;for(let P=0;P<O.length;P++)p(I,O[P],P,F);if(F){const P=Jt(B)&&B.resolutionChannel||I,S=Qs(P)?this.unitView.getScaleResolution(P):null,{glsl:Q,domainUniform:Z,domainUniformName:ae,rangeUniform:ce,rangeUniformName:fe}=BI(I,F,B);c.push(Q),f.push(Z),f.push(ce),ce&&X(this,Gn).push(()=>{const le=this.createMarkUniformSetter(fe),Ee=()=>le(tb(F,I));S.addEventListener("range",Ee),Ee()}),Z&&X(this,Gn).push(()=>{const le=this.createMarkUniformSetter(ae),Ee=()=>{const pe=Tr(F.type)?[0,F.domain().length]:F.domain();le(J1(F.type)?PI(pe):pe)};S.addEventListener("domain",Ee),Ee()})}c.push(_I(I,O))}const y=[...d.keys()].map(I=>`${ul}${I}(false)`);c.push(`bool isPointSelected() {
|
|
345
|
+
`+(this.encoders.uniqueId&&y.length>0?` return ${y.join(" || ")};`:" return false;")+`
|
|
346
346
|
}`);const v=`precision highp float;
|
|
347
|
-
precision highp int;`,
|
|
348
|
-
`));r=r.map(
|
|
349
|
-
`),...c,UI,GI,t],_=[v,s,...r,x2,HI,n],E=this.gl;this.programStatus=QI(E,this.glHelper.compileShader(E.VERTEX_SHADER,A),this.glHelper.compileShader(E.FRAGMENT_SHADER,_))}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=k6(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=Jm(this.gl,this.programInfo,"View"),this.markUniformInfo=Jm(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),Ai(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of X(this,$n))n();Pe(this,$n,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),o=a=>{if(a==null)throw new Error(`Trying to set null/undefined value for uniform: ${t}${Yt(n)?`Expr: ${n.expr}`:""}`);i(a)};if(Yt(n)){const a=this.unitView.paramMediator.createExpression(n.expr),s=()=>o(r(a(null)));a.addListener(s),s()}else o(r(n))}deleteGraphicsData(){const t=this.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),t.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let n=0;n<8;n++)t.disableVertexAttribArray(n);Object.values(this.bufferInfo.attribs).forEach(n=>this.gl.deleteBuffer(n.buffer)),this.bufferInfo.indices&&this.gl.deleteBuffer(this.bufferInfo.indices),this.bufferInfo=void 0}}updateBufferInfo(t){if(this.gl.bindVertexArray(null),this.bufferInfo&&t.vertexCount<=this.bufferInfo.allocatedVertices)for(const[n,r]of Object.entries(t.arrays))r.data&&H_(this.gl,this.bufferInfo.attribs[n],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=j_(this.gl,t.arrays,{numElements:t.vertexCount}),this.bufferInfo.allocatedVertices=t.allocatedVertices;for(const[n,r]of Object.entries(t.arrays))this.bytesPerElement.set(n,r.data.BYTES_PER_ELEMENT)}}get glHelper(){return this.getContext().glHelper}get gl(){return this.glHelper.gl}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}isReady(){return this.bufferInfo&&this.programInfo}isPickingParticipant(){if(this.properties.tooltip===null&&!this.unitView.paramMediator.hasPointSelections())return!1;for(const t of this.unitView.getLayoutAncestors())if(!t.isPickingSupported())return!1;return!0}bindOrSetMarkUniformBlock(){this.markUniformsAltered?(e1(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):$m(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(t){const n=this.glHelper,r=this.gl,i=[];i.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=X6(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[a,s]of Object.entries(this.encoding))if(on(s)){const c=on(s)&&s.resolutionChannel||a;if(_s(c)){const l=this.unitView.getScaleResolution(c),u=n.rangeTextures.get(l);u&&i.push(()=>Ai(this.programInfo,{[ld+a]:u}))}}i.push(...this.selectionTextureOps),this.getSampleFacetMode()==_2&&i.push(()=>{let a;for(const s of this.unitView.getLayoutAncestors())if(a=s.getSampleFacetTexture(),a)break;if(!a)throw new Error("No facet texture available. This is bug.");Ai(this.programInfo,{uSampleFacetTexture:a})});const o=(t.picking??!1)&&this.isPickingParticipant();return i.push(()=>is(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:o})),this.opaque||t.picking?i.push(()=>r.disable(r.BLEND)):i.push(()=>r.enable(r.BLEND)),i}prepareSampleFacetRendering(t){const n=t.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(n&&r){const i=n.locSize?n.locSize.location:0,o=n.locSize?n.locSize.size:1;if(i>1||i+o<0)return!1;const a=n.targetLocSize?n.targetLocSize.location:i,s=n.targetLocSize?n.targetLocSize.size:o;this.gl.uniform4f(r.location,i,o,a,s)}return!0}render(t){}createRenderCallback(t,n){var f;if(!this.bufferInfo)return()=>{};const r=this;let i;const o=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,a=o&&Rt(o.type),s=["index","locus"].includes(o==null?void 0:o.type)?-1:0,c=[0,0];i=h=>{if(a&&h.xIndex){const d=o.domain(),p=h.xIndex(d[0]+s,d[1],c),b=p[0],v=p[1]-b;v>0&&t(b,v)}else t(h.offset,h.count)};const l=this.rangeMap.get(void 0).count==0?n.facetId:void 0,u=this.rangeMap.get(l);return n.sampleFacetRenderingOptions?function(){u.count&&r.prepareSampleFacetRendering(n)&&i(u)}:function(){u.count&&i(u)}}setViewport(t,n){t=t.flatten();const r=this.unitView.context.devicePixelRatio,i=this.gl,o=this.properties,a=this.glHelper.getLogicalCanvasSize(),s=.5,c=(o.xOffset??0)+s,l=(o.yOffset??0)+s;let u,f=t;if(o.clip!=="never"&&(o.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 b=[f.x,a.height-f.y2,f.width,f.height].map(_=>_*r),v=b.map(_=>Math.floor(_)),y=b[0]-v[0],A=b[1]-v[1];i.viewport(...v),i.scissor(...v),i.enable(i.SCISSOR_TEST),u={uViewOffset:[(c+h+y/r)/f.width,-(l+d-A/r)/f.height],uViewScale:p}}else{if(!t.isDefined())return!1;i.viewport(0,0,a.width*r,a.height*r),i.disable(i.SCISSOR_TEST),u={uViewOffset:[(t.x+c)/a.width,(a.height-t.y-l-t.height)/a.height],uViewScale:[t.width/a.width,t.height/a.height]}}return is(this.viewUniformInfo,{...u,uViewportSize:[t.width,t.height],uDevicePixelRatio:r}),e1(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(t,n){}}$n=new WeakMap;class JI extends tr{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 md(e,t){const n=fI(t);let r=e[t]&&{...e[t]},i=e[n]&&{...e[n]};if(!(yn(r)||yn(i))){if(r){if(!on(e[t]))return;if(i){if(r.type!="quantitative"){const o=(1-(r.band||1))/2;r.band=o,i.band=-o}}else if(r.type=="quantitative")i={datum:0,contributesToScaleDomain:!1};else{i={...r};const o=(1-(r.band??1))/2;r.band=0+o,i.band=1-o}}else r={value:0},i={value:1};e[t]=r,e[n]=i}}function T2(e,t){e.stroke||(t?e.stroke={value:null}:e.stroke={resolutionChannel:"color",...e.color}),yn(e.stroke)&&e.stroke.value===null&&(e.strokeWidth={value:0}),e.strokeOpacity||(e.strokeOpacity={resolutionChannel:"opacity",...e.opacity})}function I2(e,t){yn(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 $I extends Bs{constructor(n){super(n);ve(this,ni);this.augmentDefaultProperties({x2:void 0,y2:void 0,filled:!0,color:"#4c78a8",opacity:1,strokeWidth:3,cornerRadius:0,minWidth:.5,minHeight:.5,minOpacity:1})}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 tu(this,"opaque",()=>!he(this,ni,yp).call(this)&&!he(this,ni,wp).call(this)&&yn(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return md(n,"x"),md(n,"y"),T2(n,this.properties.filled),I2(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];he(this,ni,yp).call(this)&&n.push("ROUNDED_CORNERS"),he(this,ni,wp).call(this)&&n.push("STROKED"),this.createAndLinkShaders(t8,n8,[r8,...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();if(!n){console.debug("No collector");return}const r=n.getItemCount(),i=new MI({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});i.addBatches(n.facetBatches);const o=i.toArrays();this.rangeMap.migrateEntries(o.rangeMap),this.updateBufferInfo(o)}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>Ei(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,o)=>{_l(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,o,i)},n)}findDatumAt(n,r){n=Kt(n);const i=this.unitView.getCollector().facetBatches.get(n);if(!i)return;const o=this.encoders,a=o.x.scale.type;if(Gr(a)){const s=o.x.dataAccessor;return i.find(c=>r==s(c))}else{const s=o.x.dataAccessor,c=o.x2.dataAccessor;return i.find(l=>r>=s(l)&&r<c(l))}}}ni=new WeakSet,yp=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},wp=function(){const n=this.encoding.strokeWidth;return!(yn(n)&&!n.value)||"condition"in n};const eD=`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(){
|
|
347
|
+
precision highp int;`,b=I=>I.replace("#pragma markUniforms",f.join(`
|
|
348
|
+
`));r=r.map(b),e=b(e),n=b(n);const A=[v,a,...r,ib,QI,[...l].join(`
|
|
349
|
+
`),...c,YI,ZI,e],C=[v,a,...r,ib,XI,n],E=this.gl;this.programStatus=rT(E,this.glHelper.compileShader(E.VERTEX_SHADER,A),this.glHelper.compileShader(E.FRAGMENT_SHADER,C))}finalizeGraphicsInitialization(){const e=this.programStatus.getProgramErrors();if(e){e.detail&&console.warn(e.detail);const n=new Error("Cannot create shader program: "+e.message);throw n.view=this.unitView,n}this.programInfo=NC(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=Ng(this.gl,this.programInfo,"View"),this.markUniformInfo=Ng(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),ti(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of X(this,Gn))n();Pe(this,Gn,void 0)}createMarkUniformSetter(e){const n=this.markUniformInfo.setters[e];if(!n)throw new Error(`Uniform "${e}" not found int the Mark block!`);return r=>{n(r),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(e,n,r=o=>o){const o=this.createMarkUniformSetter(e),i=s=>{if(s==null)throw new Error(`Trying to set null/undefined value for uniform: ${e}${qt(n)?`Expr: ${n.expr}`:""}`);o(s)};if(qt(n)){const s=this.unitView.paramMediator.createExpression(n.expr),a=()=>i(r(s(null)));s.addListener(a),a()}else i(r(n))}deleteGraphicsData(){const e=this.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),e.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let n=0;n<8;n++)e.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(e){if(this.gl.bindVertexArray(null),this.bufferInfo&&e.vertexCount<=this.bufferInfo.allocatedVertices)for(const[n,r]of Object.entries(e.arrays))r.data&&XE(this.gl,this.bufferInfo.attribs[n],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=$E(this.gl,e.arrays,{numElements:e.vertexCount}),this.bufferInfo.allocatedVertices=e.allocatedVertices;for(const[n,r]of Object.entries(e.arrays))this.bytesPerElement.set(n,r.data.BYTES_PER_ELEMENT)}}get glHelper(){return this.getContext().glHelper}get gl(){return this.glHelper.gl}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}isReady(){return this.bufferInfo&&this.programInfo}isPickingParticipant(){if(this.properties.tooltip===null&&!this.unitView.paramMediator.hasPointSelections())return!1;for(const e of this.unitView.getLayoutAncestors())if(!e.isPickingSupported())return!1;return!0}bindOrSetMarkUniformBlock(){this.markUniformsAltered?(zg(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):Og(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(e){const n=this.glHelper,r=this.gl,o=[];o.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=r6(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[s,a]of Object.entries(this.encoding))if(Jt(a)){const c=Jt(a)&&a.resolutionChannel||s;if(Qs(c)){const l=this.unitView.getScaleResolution(c),u=n.rangeTextures.get(l);u&&o.push(()=>ti(this.programInfo,{[fh+s]:u}))}}o.push(...this.selectionTextureOps),this.getSampleFacetMode()==lb&&o.push(()=>{let s;for(const a of this.unitView.getLayoutAncestors())if(s=a.getSampleFacetTexture(),s)break;if(!s)throw new Error("No facet texture available. This is bug.");ti(this.programInfo,{uSampleFacetTexture:s})});const i=(e.picking??!1)&&this.isPickingParticipant();return o.push(()=>Is(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:i})),this.opaque||e.picking?o.push(()=>r.disable(r.BLEND)):o.push(()=>r.enable(r.BLEND)),o}prepareSampleFacetRendering(e){const n=e.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(n&&r){const o=n.locSize?n.locSize.location:0,i=n.locSize?n.locSize.size:1;if(o>1||o+i<0)return!1;const s=n.targetLocSize?n.targetLocSize.location:o,a=n.targetLocSize?n.targetLocSize.size:i;this.gl.uniform4f(r.location,o,i,s,a)}return!0}render(e){}createRenderCallback(e,n){var f;if(!this.bufferInfo)return()=>{};const r=this;let o;const i=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,s=i&&Bt(i.type),a=["index","locus"].includes(i==null?void 0:i.type)?-1:0,c=[0,0];o=h=>{if(s&&h.xIndex){const d=i.domain(),p=h.xIndex(d[0]+a,d[1],c),y=p[0],v=p[1]-y;v>0&&e(y,v)}else e(h.offset,h.count)};const l=this.rangeMap.get(void 0).count==0?n.facetId:void 0,u=this.rangeMap.get(l);return n.sampleFacetRenderingOptions?function(){u.count&&r.prepareSampleFacetRendering(n)&&o(u)}:function(){u.count&&o(u)}}setViewport(e,n){e=e.flatten();const r=this.unitView.context.devicePixelRatio,o=this.gl,i=this.properties,s=this.glHelper.getLogicalCanvasSize(),a=.5,c=(i.xOffset??0)+a,l=(i.yOffset??0)+a;let u,f=e;if(i.clip!=="never"&&(i.clip||n)){let h=0,d=0,p;if(n){if(f=e.intersect(n).flatten(),!f.isDefined())return!1;p=[e.width/f.width,e.height/f.height],d=Math.max(0,e.y2-n.y2),h=Math.min(0,e.x-n.x)}else p=[1,1];const y=[f.x,s.height-f.y2,f.width,f.height].map(C=>C*r),v=y.map(C=>Math.floor(C)),b=y[0]-v[0],A=y[1]-v[1];o.viewport(...v),o.scissor(...v),o.enable(o.SCISSOR_TEST),u={uViewOffset:[(c+h+b/r)/f.width,-(l+d-A/r)/f.height],uViewScale:p}}else{if(!e.isDefined())return!1;o.viewport(0,0,s.width*r,s.height*r),o.disable(o.SCISSOR_TEST),u={uViewOffset:[(e.x+c)/s.width,(s.height-e.y-l-e.height)/s.height],uViewScale:[e.width/s.width,e.height/s.height]}}return Is(this.viewUniformInfo,{...u,uViewportSize:[e.width,e.height],uDevicePixelRatio:r}),zg(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(e,n){}}Gn=new WeakMap;class sT extends Vn{constructor(){super([],JSON.stringify)}get(e){let n=super.get(e);return n===void 0&&(n={offset:0,count:0,xIndex:void 0},super.set(e,n)),n}migrateEntries(e){for(const[n,r]of this.entries())e.has(n)||(r.offset=0,r.count=0,r.xIndex=void 0);for(const[n,r]of e.entries())Object.assign(this.get(n),r)}}function yh(t,e){const n=yI(e);let r=t[e]&&{...t[e]},o=t[n]&&{...t[n]};if(!(ln(r)||ln(o))){if(r){if(!Jt(t[e]))return;if(o){if(r.type!="quantitative"){const i=(1-(r.band||1))/2;r.band=i,o.band=-i}}else if(r.type=="quantitative")o={datum:0,contributesToScaleDomain:!1};else{o={...r};const i=(1-(r.band??1))/2;r.band=0+i,o.band=1-i}}else r={value:0},o={value:1};t[e]=r,t[n]=o}}function fb(t,e){t.stroke||(e?t.stroke={value:null}:t.stroke={resolutionChannel:"color",...t.color}),ln(t.stroke)&&t.stroke.value===null&&(t.strokeWidth={value:0}),t.strokeOpacity||(t.strokeOpacity={resolutionChannel:"opacity",...t.opacity})}function hb(t,e){ln(t.fill)&&t.fill.value===null?t.fillOpacity={value:0}:t.fill||(t.fill={resolutionChannel:"color",...t.color},!e&&!t.fillOpacity&&(t.fillOpacity={value:0})),t.fillOpacity||(e?t.fillOpacity={resolutionChannel:"opacity",...t.opacity}:t.fillOpacity={value:0})}class aT extends ea{constructor(n){super(n);ve(this,Nr);this.augmentDefaultProperties({x2:void 0,y2:void 0,filled:!0,color:"#4c78a8",opacity:1,strokeWidth:3,cornerRadius:0,minWidth:.5,minHeight:.5,minOpacity:1})}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 hl(this,"opaque",()=>!he(this,Nr,$d).call(this)&&!he(this,Nr,e0).call(this)&&ln(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return yh(n,"x"),yh(n,"y"),fb(n,this.properties.filled),hb(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];he(this,Nr,$d).call(this)&&n.push("ROUNDED_CORNERS"),he(this,Nr,e0).call(this)&&n.push("STROKED"),this.createAndLinkShaders(c6,l6,[u6,...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();if(!n){console.debug("No collector");return}const r=n.getItemCount(),o=new HI({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});o.addBatches(n.facetBatches);const i=o.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.updateBufferInfo(i)}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>ni(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((o,i)=>{Lc(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,i,o)},n)}findDatumAt(n,r){n=Wt(n);const o=this.unitView.getCollector().facetBatches.get(n);if(!o)return;const i=this.encoders,s=i.x.scale.type;if(Tr(s)){const a=i.x.dataAccessor;return o.find(c=>r==a(c))}else{const a=i.x.dataAccessor,c=i.x2.dataAccessor;return o.find(l=>r>=a(l)&&r<c(l))}}}Nr=new WeakSet,$d=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},e0=function(){const n=this.encoding.strokeWidth;return!(ln(n)&&!n.value)||"condition"in n};const cT=`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(){
|
|
350
350
|
#if defined(dx_DEFINED) || defined(dy_DEFINED)
|
|
351
351
|
return vec2(getScaled_dx(),getScaled_dy())/uViewportSize;
|
|
352
352
|
#else
|
|
353
353
|
return vec2(0.0,0.0);
|
|
354
354
|
#endif
|
|
355
|
-
}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=max((diameter+padding),uPickingEnabled ? uMinPickingSize : 0.0)*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();}`,
|
|
355
|
+
}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=max((diameter+padding),uPickingEnabled ? uMinPickingSize : 0.0)*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();}`,lT="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;}}",uT=`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 float uMinPickingSize;uniform mediump float uScaleFactor;uniform mediump float uZoomLevel;uniform highp float uSemanticThreshold;uniform mediump float uGradientStrength;
|
|
356
356
|
#pragma markUniforms
|
|
357
|
-
};`;class
|
|
357
|
+
};`;class db extends wt{constructor(e){super(e),this.params=e,this.k=e.size||500,this.reset()}reset(){super.reset(),this.reservoir=[],this.W=void 0,this.ingester=this._initialIngester}_initialIngester(e){this.reservoir.push(e),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(e){++this.i==this.next&&(this.reservoir[Math.floor(Math.random()*this.k)]=e,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(e){this.ingester(e)}complete(){for(const e of this.reservoir)this._propagate(e);super.complete()}}function fT(t,e,n){const r=new db({type:"sample",size:t});for(const o of e)r.handle(n(o));return r.complete(),r.reservoir}const hT={};class dT extends ea{constructor(n){super(n);ve(this,Zl);ve(this,Bo,()=>0);this.augmentDefaultProperties({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,minPickingSize:2});const r=this.properties.semanticZoomFraction;if(r!=null)if(qt(r)){const o=this.unitView.paramMediator.createExpression(r.expr);o.addListener(()=>this.getContext().animator.requestRender()),Pe(this,Bo,o)}else Pe(this,Bo,()=>r)}getAttributes(){return["uniqueId","facetIndex","x","y","size","semanticScore","shape","strokeWidth","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(),...hT}}fixEncoding(n){return fb(n,this.properties.filled),hb(n,this.properties.filled),delete n.color,delete n.opacity,n}initializeData(){var r,o;super.initializeData();const n=(o=(r=this.encoders.semanticScore)==null?void 0:r.dataAccessor)==null?void 0:o.asNumberAccessor();n&&(this.sampledSemanticScores=Float32Array.from(fT(1e4,this.unitView.getCollector().getData(),n)),this.sampledSemanticScores.sort((i,s)=>i-s))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(cT,lT,[uT])}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),this.registerMarkUniformValue("uMinPickingSize",n.minPickingSize)}updateGraphicsData(){const n=this.unitView.getCollector();if(!n){console.debug("No collector");return}const r=n.getItemCount(),o=new qI({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(r,this.properties.minBufferSize||0)});o.addBatches(n.facetBatches);const i=o.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.updateBufferInfo(i)}getSemanticThreshold(){if(this.sampledSemanticScores){const n=Math.max(0,1-X(this,Bo).call(this)*this.unitView.getZoomLevel());if(n<=0)return-1/0;if(n>=1)return 1/0;{const r=this.sampledSemanticScores;return $0(r,n)}}else return-1}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>{Is(this.markUniformInfo,{uScaleFactor:he(this,Zl,Wx).call(this),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>ni(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((o,i)=>{i&&Lc(r,this.vertexArrayInfo,r.POINTS,i,o)},n)}}Bo=new WeakMap,Zl=new WeakSet,Wx=function(){const n=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/n),1/3)};const pT="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();}",gT="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;}}",mT=`layout(std140)uniform Mark{uniform mediump float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;uniform mediump float uStrokeDashOffset;
|
|
358
358
|
#pragma markUniforms
|
|
359
|
-
};`;class
|
|
359
|
+
};`;class bT extends ea{constructor(e){super(e),this.dashTextureSize=0,this.augmentDefaultProperties({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(e){if(!(e.x&&e.y&&e.x2&&e.y2))if(e.x&&e.x2&&!e.y)e.y={value:.5},e.y2=e.y;else if(e.y&&e.y2&&!e.x)e.x={value:.5},e.x2=e.x;else if(e.x&&!e.y)e.y={value:0},e.y2={value:1},e.x2=e.x;else if(e.y&&!e.x)e.x={value:0},e.x2={value:1},e.y2=e.y;else if(e.x&&e.y&&e.y2)e.x2=e.x;else if(e.y&&e.x&&e.x2)e.y2=e.y;else if(e.y&&e.x)if(!e.x2&&Jt(e.y)&&e.y.type=="quantitative")e.x2=e.x,e.y2={datum:0};else if(!e.y2&&Jt(e.x)&&e.x.type=="quantitative")e.y2=e.y,e.x2={datum:0};else throw new Error("A bug!");else throw new Error("At a minimum, either the x or y channel must be defined in the rule mark's encoding: "+JSON.stringify(e));return e}async initializeGraphics(){await super.initializeGraphics();const e=this.gl,n=yT(this.properties.strokeDash);this.dashTexture=Cs(e,{level:0,mag:e.NEAREST,min:e.NEAREST,internalFormat:e.R8,format:e.RED,src:n,height:1}),this.dashTextureSize=n.length,this.createAndLinkShaders(pT,gT,[mT])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties;this.registerMarkUniformValue("uMinLength",e.minLength),this.registerMarkUniformValue("uStrokeCap",e.strokeCap??"butt",n=>["butt","square","round"].indexOf(n)),Is(this.markUniformInfo,{uDashTextureSize:+this.dashTextureSize}),this.markUniformsAltered=!0}updateGraphicsData(){const e=this.unitView.getCollector();if(!e){console.debug("No collector");return}const n=e.getItemCount(),r=new VI({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(n,this.properties.minBufferSize||0)});r.addBatches(e.facetBatches);const o=r.toArrays();this.rangeMap.migrateEntries(o.rangeMap),this.updateBufferInfo(o)}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>ti(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>ni(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((r,o)=>Lc(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,o,r),e)}}function yT(t){if(!t)return new Uint8Array(0);if(t.length==0||t.length%2||t.findIndex(i=>Math.round(i)!=i||i<1||i>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(t));const e=t.reduce((i,s)=>i+s),n=new Uint8Array(e);let r=!0,o=0;for(let i of t){for(;i;)n[o++]=r&&255||0,i--;r=!r}return n}const wT="out vec4 vColor;out float vSize;out float vNormalLengthInPixels;out float vGamma;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;}vec2 strip=vec2(float(gl_VertexID/2)/float(uSegmentBreaks),float(gl_VertexID % 2)-0.5);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&&(!uNoFadingOnPointSelection||!isPointSelected())){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);vGamma=getGammaForColor(color);vSize=paddedSize;setupPicking();}",xT="in vec4 vColor;in float vSize;in float vNormalLengthInPixels;in float vGamma;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);opacity=pow(opacity,vGamma);fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",vT=`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;uniform bool uNoFadingOnPointSelection;uniform int uSegmentBreaks;
|
|
360
360
|
#pragma markUniforms
|
|
361
|
-
};`,
|
|
361
|
+
};`,AT=["arc","dome","diagonal","line"],ET=["vertical","horizontal"];class ST extends ea{constructor(e){super(e),this.augmentDefaultProperties({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,noFadingOnPointSelection:!0,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","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(e){return e.x2||(Jt(e.x)?e.x2={datum:0}:e.x2=e.x),e.y2||(Jt(e.y)?e.y2={datum:0}:e.y2=e.y),e}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(wT,xT,[vT])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties;this.registerMarkUniformValue("uArcFadingDistance",e.arcFadingDistance,n=>n||[0,0]),this.registerMarkUniformValue("uArcHeightFactor",e.arcHeightFactor),this.registerMarkUniformValue("uMinArcHeight",e.minArcHeight),this.registerMarkUniformValue("uMinPickingSize",e.minPickingSize),this.registerMarkUniformValue("uShape",e.linkShape,n=>AT.indexOf(n)),this.registerMarkUniformValue("uOrient",e.orient,n=>ET.indexOf(n)),this.registerMarkUniformValue("uClampApex",e.clampApex,n=>!!n),this.registerMarkUniformValue("uMaxChordLength",e.maxChordLength),this.registerMarkUniformValue("uSegmentBreaks",e.segments,n=>n),this.registerMarkUniformValue("uNoFadingOnPointSelection",e.noFadingOnPointSelection,n=>!!n)}updateGraphicsData(){const e=this.unitView.getCollector();if(!e){console.debug("No collector");return}const n=e.getItemCount(),r=new jI({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});r.addBatches(e.facetBatches);const o=r.toArrays();this.rangeMap.migrateEntries(o.rangeMap),this.arrays=Object.fromEntries(Object.entries(o.arrays).map(([i,s])=>[i,{...s,data:void 0}])),this.updateBufferInfo(o)}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>this.bindOrSetMarkUniformBlock()),this._baseInstanceExt?n.push(()=>ni(this.gl,this.programInfo,this.vertexArrayInfo)):n.push(()=>this.gl.bindVertexArray(null)),n}render(e){const n=this.gl,r=()=>(this.markUniformInfo.uniforms.uSegmentBreaks[0]+1)*2;return this._baseInstanceExt?this.createRenderCallback((o,i)=>{this._baseInstanceExt.drawArraysInstancedBaseInstanceWEBGL(n.TRIANGLE_STRIP,0,r(),i,o)},e):this.createRenderCallback((o,i)=>{for(const s of Object.entries(this.bufferInfo.attribs)){const[a,c]=s;c.buffer&&c.numComponents&&c.divisor&&(c.offset=o*this.arrays[a].numComponents*this.bytesPerElement.get(a))}ni(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,r(),i)},e)}}const CT=`in mediump vec2 vertexCoord;in lowp vec2 textureCoord;in float width;out vec2 vTexCoord;out vec4 vColor;out float vSlope;out float vEdgeFadeOpacity;out float vGamma;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);
|
|
362
362
|
#if defined(x2_DEFINED) || defined(y2_DEFINED)
|
|
363
363
|
ivec2 align=fixAlignForAngle(uAlign,angleInDegrees);
|
|
364
364
|
#else
|
|
@@ -371,9 +371,9 @@ vec2 pos=applySampleFacet(vec2(x,y));
|
|
|
371
371
|
#ifdef y2_DEFINED
|
|
372
372
|
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;}
|
|
373
373
|
#endif
|
|
374
|
-
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);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vGamma=getGammaForColor(color);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();}`,
|
|
374
|
+
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);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vGamma=getGammaForColor(color);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();}`,IT="uniform sampler2D uTexture;in vec2 vTexCoord;in float vEdgeFadeOpacity;in vec4 vColor;in float vSlope;in float vGamma;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*=clamp(vEdgeFadeOpacity,0.0,1.0);opa=pow(opa,vGamma);fragColor=vColor*opa;if(uPickingEnabled){fragColor=vPickingColor;}}",TT=`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;
|
|
375
375
|
#pragma markUniforms
|
|
376
|
-
};`,
|
|
376
|
+
};`,DT={left:-1,center:0,right:1},BT={top:-1,middle:0,bottom:1,alphabetic:1};class _T extends ea{constructor(e){super(e),this.augmentDefaultProperties({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?e.context.fontManager.getFont(this.properties.font,this.properties.fontStyle,this.properties.fontWeight):e.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(e){for(const n of oo)this.properties.fitToBand&&yh(e,n);return e}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(CT,IT,[TT])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=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",e.paddingX),this.registerMarkUniformValue("uPaddingY",e.paddingY),this.registerMarkUniformValue("uFlushX",e.flushX,n=>!!n),this.registerMarkUniformValue("uFlushY",e.flushY,n=>!!n),this.registerMarkUniformValue("uSqueeze",e.squeeze,n=>!!n),Is(this.markUniformInfo,{uAlign:[DT[e.align],BT[e.baseline]],uD:[e.dx,-e.dy],uLogoLetter:!!e.logoLetters,uViewportEdgeFadeWidth:[e.viewportEdgeFadeWidthTop,e.viewportEdgeFadeWidthRight,e.viewportEdgeFadeWidthBottom,e.viewportEdgeFadeWidthLeft],uViewportEdgeFadeDistance:[e.viewportEdgeFadeDistanceTop,e.viewportEdgeFadeDistanceRight,e.viewportEdgeFadeDistanceBottom,e.viewportEdgeFadeDistanceLeft]})}updateGraphicsData(){const e=this.unitView.getCollector();if(!e){console.debug("No collector");return}const n=e.getData(),r=this.encoding,o=this.encoders.text;let i=0;const s="format"in r.text?Ft(r.text.format):l=>l;for(const l of n){const u=s(o(l)),f=nt(u)?u:u===null?"":""+u;i+=f&&f.length||0}const a=new WI({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(i,this.properties.minBufferSize||1024)});a.addBatches(e.facetBatches);const c=a.toArrays();this.rangeMap.migrateEntries(c.rangeMap),this.updateBufferInfo(c)}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>{ti(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>ni(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((r,o)=>Lc(n,this.vertexArrayInfo,n.TRIANGLES,o,r),e)}}const pb=1;function wh(){let t=[0,1],e=[0,1],n=1,r=1,o=0,i=0,s=.5,a=0;const l=u=>(u+s-t[0])/n*r+e[0];return l.invert=u=>(u-e[0])/r*n+t[0]-s,l.domain=function(u){if(arguments.length){t=fA(u),n=t[1]-t[0];const f=t[0]===0&&t[0]===0;if(n<pb&&!f){n=pb;const h=(t[0]+t[1])/2;t[0]=h-n/2,t[1]=h+n/2}return l}else return t.slice()},l.range=function(u){return arguments.length?(e=[...u],r=e[1]-e[0],l):e},l.numberingOffset=function(u){return arguments.length?(a=u,l):a},l.padding=function(u){return arguments.length?(i=u,o=Math.min(1,u),l):o},l.paddingInner=function(u){return arguments.length?(o=Math.min(1,u),l):o},l.paddingOuter=function(u){return arguments.length?(i=u,l):i},l.align=function(u){return arguments.length?(s=Math.max(0,Math.min(1,u)),l):s},l.step=()=>r/n,l.bandwidth=()=>l.step(),l.ticks=u=>{const f=l.align(),h=l.numberingOffset();return nc(t[0]-f+h,t[1]-f+h,Math.min(u,Math.ceil(n))).filter(Number.isInteger).map(d=>d-a)},l.tickFormat=(u,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const d=Zr(t[0],t[1],Math.min(u,Math.ceil(n)))<1e5?Ft(","):Ft(".3s");return p=>d(p+a)},l.copy=()=>wh().domain(t).range(e).paddingInner(o).paddingOuter(i).numberingOffset(a),l}function kT(){const t=wh().numberingOffset(1);let e;t.genome=function(r){return arguments.length?(e=r,t):e},t.ticks=r=>{if(!e)return[];const o=t.domain(),i=t.numberingOffset(),[s,a]=[Math.max(o[0],0),Math.min(o[1],e.totalSize-1)].map(u=>e.toChromosome(u)),c=Math.max(1,Zr(o[0],o[1],r)),l=[];for(let u=s.index;u<=a.index;u++){const f=e.chromosomes[u],h=Math.max(f.continuousStart+c,o[0]-(o[0]-f.continuousStart)%c),d=Math.min(f.continuousEnd-c/4,o[1]+1);for(let p=h;p<=d;p+=c){const y=p-i;y>=o[0]&&y<o[1]&&l.push(y)}}return l},t.tickFormat=(r,o)=>{if(!e)return;if(o)throw new Error("Locus scale's tickFormat does not support a specifier!");const i=t.domain(),s=i[1]-i[0],a=t.numberingOffset(),l=Zr(i[0],i[1],Math.min(r,Math.ceil(s)))<1e6?Ft(","):Ft(".3s"),u=f=>f-e.toChromosome(f).continuousStart;return f=>l(u(f)+a)};const n=t.copy;return t.copy=()=>n().genome(e),t}function RT(t){return t.type=="locus"}function pl(t,e,n){if(n=n||[],t.some(s=>s===null)){if(t.every(s=>s===null))return null;throw console.warn(t),new Error("Cannot merge objects with nulls!")}const r={},o=(s,a)=>s===a||so(s)&&so(a)||so(s)&&a===!0||s===!0&&Rt(a),i=s=>{for(let a in s){const c=s[a];if(!n.includes(a)&&c!==void 0)if(r[a]!==void 0&&!o(r[a],c))console.warn(`Conflicting property ${a} of ${e}: (${JSON.stringify(r[a])} and ${JSON.stringify(s[a])}). Using ${JSON.stringify(r[a])}.`);else{const l=r[a];if(so(l))so(c)&&(r[a]=pl([l,c],a));else if(so(c)){if(!(l===!0||l===void 0))throw new Error("Bug in merge! Target is: "+l);r[a]=pl([{},c],a)}else r[a]=c}}};for(const s of t)i(s);return r}function so(t){return Rt(t)&&!Array.isArray(t)}/*!
|
|
377
377
|
* Adapted from vega-encode:
|
|
378
378
|
* https://github.com/vega/vega/blob/master/packages/vega-encode/src/ticks.js
|
|
379
379
|
*
|
|
@@ -381,7 +381,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
|
|
|
381
381
|
* All rights reserved.
|
|
382
382
|
*
|
|
383
383
|
* BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
|
|
384
|
-
*/function
|
|
384
|
+
*/function gb(t,e,n){return Gt(e)&&n!=null&&(e=Math.min(e,~~(Ya(t.domain())/n)||1)),Rt(e)&&(e.step,e=e.interval),e}function mb(t,e,n){var r=t.range(),o=Math.floor(r[0]),i=Math.ceil(bn(r));if(o>i&&(r=i,i=o,o=r),e=e.filter(function(a){return a=t(a),o<=a&&a<=i}),n>0&&e.length>1){for(var s=[e[0],bn(e)];e.length>n&&e.length>=3;)e=e.filter(function(a,c){return!(c%2)});e.length<3&&(e=s)}return e}function FT(t,e){return t.bins?mb(t,MT(t.bins,e)):t.ticks?t.ticks(e):t.domain()}function MT(t,e){var n=t.length,r=~~(n/(e||n));return r<2?t.slice():t.filter(function(o,i){return!(i%r)})}function PT(t,e,n){var r=t.tickFormat?t.tickFormat(e,n):n?Ft(n):String;if(l1(t.type)){var o=NT(n);r=t.bins?o:LT(r,o)}return r}function LT(t,e){return function(n){return t(n)?e(n):""}}function NT(t){var e=zi(t||",");if(e.precision==null){switch(e.precision=12,e.type){case"%":e.precision-=2;break;case"e":e.precision-=1;break}return OT(Ft(e),Ft(".1f")(1)[1])}else return Ft(e)}function OT(t,e){return function(n){var r=t(n),o=r.indexOf(e),i,s;if(o<0)return r;for(i=zT(r,o),s=i<r.length?r.slice(i):"";--i>o;)if(r[i]!=="0"){++i;break}return r.slice(0,i)+s}}function zT(t,e){var n=t.lastIndexOf("e"),r;if(n>0)return n;for(n=t.length;--n>e;)if(r=t.charCodeAt(n),r>=48&&r<=57)return n+1}/*!
|
|
385
385
|
* Adapted from vega-encode:
|
|
386
386
|
* https://github.com/vega/vega/blob/master/packages/vega-encode/src/Scale.js
|
|
387
387
|
*
|
|
@@ -389,7 +389,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
|
|
|
389
389
|
* All rights reserved.
|
|
390
390
|
*
|
|
391
391
|
* BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
|
|
392
|
-
*/const
|
|
392
|
+
*/const UT="locus",GT="index";var HT=5;function VT(t){const e=t.type;return!t.bins&&(e===no||e===Rs||e===Fs)}function bb(t){return Bt(t)&&![Ln,GT,UT].includes(t)}function yb(t){return t||{warn:(e,...n)=>console.warn(e,...n)}}var qT=Za(["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 wb(t,e,n){n=yb(n);for(const r in t)if(!qT[r]){if(r==="padding"&&bb(e.type))continue;on(e[r])?e[r](t[r]):n.warn("Unsupported scale property: "+r)}JT(e,t,KT(e,t,YT(e,t,n)))}function jT(t,e){const n=WT(t),r=Ye(n);if(!r)throw new Error("Unknown scale type: "+n);const o=r();return!t.domain&&Bt(o.type)&&(t.domain=[0,0]),wb(t,o,e),o}function WT(t){var e=t.type,n="",r;return e===Ln?Ln+"-"+no:(QT(t)&&(r=t.rawDomain?t.rawDomain.length:t.domain?t.domain.length+ +(t.domainMid!=null):0,n=r===2?Ln+"-":r===3?ro+"-":""),(n+e||no).toLowerCase())}function QT(t){const e=t.type;return Bt(e)&&e!==t1&&e!==n1&&(t.scheme||t.range&&t.range.length&&t.range.every(nt))}function YT(t,e,n){if(!t.domain)return 0;n=yb(n);var r=ZT(t,e.domainRaw,n);if(r>-1)return r;var o=e.domain,i=t.type,s=e.zero||e.zero===void 0&&VT(t),a,c;return o?(bb(i)&&e.padding&&o[0]!==bn(o)&&(o=XT(i,o,e.range,e.padding,e.exponent,e.constant)),(s||e.domainMin!=null||e.domainMax!=null||e.domainMid!=null)&&(a=(o=o.slice()).length-1||1,s&&(o[0]>0&&(o[0]=0),o[a]<0&&(o[a]=0)),e.domainMin!=null&&(o[0]=e.domainMin),e.domainMax!=null&&(o[a]=e.domainMax),e.domainMid!=null&&(c=e.domainMid,(c<o[0]||c>o[a])&&n.warn("Scale domainMid exceeds domain min or max.",c),o.splice(a,0,c))),t.domain(xb(i,o,n)),i===jf&&t.unknown(e.domainImplicit?hf:void 0),e.nice&&t.nice&&t.nice(e.nice!==!0&&gb(t,e.nice)||null),o.length):0}function ZT(t,e,n){return e?(t.domain(xb(t.type,e,n)),e.length):-1}function XT(t,e,n,r,o,i){n??(n=[0,1]);var s=Math.abs(bn(n)-n[0]),a=s/(s-2*r),c=t===Ir?v0(e,null,a):t===Fs?ru(e,null,a,.5):t===Rs?ru(e,null,a,o||1):t===Xc?dv(e,null,a,i||1):x0(e,null,a);return e=e.slice(),e[0]=c[0],e[e.length-1]=c[1],e}function xb(t,e,n){if(l1(t)){var r=Math.abs(e.reduce(function(o,i){return o+(i<0?-1:i>0?1:0)},0));r!==e.length&&n.warn("Log scale domain includes zero: "+ou(e))}return e}function KT(t,e,n){let r=e.bins;if(r&&!Dt(r)){const o=(r.start==null||r.stop==null)&&t.domain(),i=r.start==null?o[0]:r.start,s=r.stop==null?bn(o):r.stop,a=r.step;a||mt("Scale bins parameter missing step property."),r=ns(i,s+a,a)}return r?t.bins=r:t.bins&&delete t.bins,t.type===Qf&&(r?!e.domain&&!e.domainRaw&&(t.domain(r),n=r.length):t.bins=t.domain()),n}function JT(t,e,n){var r=t.type,o=e.round||!1,i=e.range;if(e.rangeStep!=null)i=$T(r,e,n);else if(e.scheme&&(i=eD(r,e,n),on(i))){if(t.interpolator)return t.interpolator(i);mt(`Scale type ${r} does not support interpolating color schemes.`)}if(i&&Jc(r))return t.interpolator($c(xh(i,e.reverse),e.interpolate,e.interpolateGamma));i&&e.interpolate&&t.interpolate?t.interpolate(u1(e.interpolate,e.interpolateGamma)):on(t.round)?t.round(o):on(t.rangeRound)&&t.interpolate(o?_s:Sr),i&&t.range(xh(i,e.reverse))}function $T(t,e,n){t!==o1&&t!==Wf&&mt("Only band and point scales support rangeStep.");var r=(e.paddingOuter!=null?e.paddingOuter:e.padding)||0,o=t===Wf?1:(e.paddingInner!=null?e.paddingInner:e.padding)||0;return[0,e.rangeStep*Vf(n,o,r)]}function eD(t,e,n){var r=e.schemeExtent,o,i;return Dt(e.scheme)?i=$c(e.scheme,e.interpolate,e.interpolateGamma):(o=e.scheme.toLowerCase(),i=Zf(o),i||mt(`Unrecognized scheme name: ${e.scheme}`)),n=t===i1?n+1:t===Qf?n-1:t===qf||t===r1?+e.schemeCount||HT:n,Jc(t)?vb(i,r,e.reverse):on(i)?L8(vb(i,r),n):t===jf?i:i.slice(0,n)}function vb(t,e,n){return on(t)&&(e||n)?P8(t,xh(e||[0,1],n)):t}function xh(t,e){return e?t.slice().reverse():t}const Ab=Ft(",d");function tD(t,e){return t.chrom+":"+Ab(Math.floor(t.pos+1))+"-"+(t.chrom!=e.chrom?e.chrom+":":"")+Ab(Math.ceil(e.pos))}const Eb={dm6:`chr3R 32079331
|
|
393
393
|
chr3L 28110227
|
|
394
394
|
chr2R 25286936
|
|
395
395
|
chrX 23542271
|
|
@@ -510,12 +510,12 @@ chr18 90702639
|
|
|
510
510
|
chr19 61431566
|
|
511
511
|
chrX 171031299
|
|
512
512
|
chrY 91744698
|
|
513
|
-
chrM 16299`};function
|
|
514
|
-
`).map(t=>{const n=t.split(" ");return{name:n[0],size:parseInt(n[1])}})}const QD=/^([A-Za-z]+:)?\/\//;function Rs(e,t){if(t&&QD.test(t))return t;const n=typeof e=="function"?e():e;if(!n)return t;if(!t)return n;if(/[#?]/.test(n))throw new Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);return U2(n)+t}function U2(e){const t=e.replace(/[^/]*$/,"");return t===""?void 0:t.endsWith("://")?e+"/":t}class XD{constructor(t){if(this.config={name:"custom",...t},"baseUrl"in t)throw new Error("The `baseUrl` property in genome config has been removed in GenomeSpy v0.52.0. Use `url` instead. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.");if(!wd(t))throw new Error("Not a genome configuration: "+JSON.stringify(t));if(this.chromosomes=[],this.cumulativeChromPositions=new Map,this.chromosomesByName=new Map,this.startByIndex=[],this.totalSize=0,H2(this.config))this.setChromSizes(this.config.contigs);else if(!xd(this.config)){const n=YD(this.config.name);if(n)this.setChromSizes(n);else throw new Error(`Unknown genome: ${this.config.name}. Please provide contigs or a URL. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.`)}}get name(){return this.config.name}async load(t){if(xd(this.config))try{const n=Rs(t,this.config.url),r=await fetch(n);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);this.setChromSizes(KD(await r.text()))}catch(n){throw new Error(`Could not load chrom sizes: ${this.config.url}. Reason: ${n.message}`)}}hasChrPrefix(){return this.chromosomes.some(t=>t.name.startsWith("chr"))}setChromSizes(t){let n=0;this.startByIndex=[0];for(let r=0;r<t.length;r++){this.startByIndex.push(n);const i=t[r].size,o={...t[r],continuousStart:n,continuousEnd:n+i,continuousInterval:[n,n+i],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(o);const a=o.name.replace(/^chr/i,"");for(const s of["chr"+a,"CHR"+a,"Chr"+a,o.number,""+o.number,a,o.name])this.cumulativeChromPositions.set(s,n),this.chromosomesByName.set(s,o);n+=o.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(t,n){let r=this.cumulativeChromPositions.get(t);if(r===void 0)throw new Error("Unknown chromosome/contig: "+t);return r+ +n}toChromosome(t){if(t>this.totalSize)return;t=Math.floor(t);const n=Cr(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 ZD(...this.toChromosomalInterval(t))}toChromosomalInterval(t){const n=this.toChromosomal(t[0]+.5),r=this.toChromosomal(t[1]-.5);return r.pos+=1,[n,r]}toContinuousInterval(t){var i;let[n,r]=t;return r||(r=n),[this.toContinuous(n.chrom,n.pos??0),this.toContinuous(r.chrom,r.pos??((i=this.chromosomesByName.get(r.chrom))==null?void 0:i.size))]}toDiscreteChromosomeIntervals(t){const n=t[0],r=t[1],i=[];if(n.chrom===r.chrom)i.push({chrom:n.chrom,startPos:n.pos,endPos:r.pos});else{const o=this.chromosomes.findIndex(s=>s.name===n.chrom),a=this.chromosomes.findIndex(s=>s.name===r.chrom);i.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[o].size});for(let s=o+1;s<a;s++)i.push({chrom:this.chromosomes[s].name,startPos:0,endPos:this.chromosomes[s].size});i.push({chrom:r.chrom,startPos:0,endPos:r.pos})}return i}continuousToDiscreteChromosomeIntervals(t){return this.toDiscreteChromosomeIntervals([this.toChromosomal(t[0]),this.toChromosomal(t[1])])}parseInterval(t){const n=t.match(/^(chr[0-9A-Z]+)(?::([0-9,]+)(?:-(?:(chr[0-9A-Z]+):)?([0-9,]+))?)?$/);if(n){const r=n[1];if(n.slice(2).every(s=>s===void 0)){const s=this.getChromosome(r);return s?[s.continuousStart,s.continuousEnd]:void 0}const i=n[3]||r,o=parseInt(n[2].replace(/,/g,"")),a=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):o;return[this.toContinuous(r,o-1),this.toContinuous(i,a)]}}}function KD(e){return V3(e).map(([t,n])=>({name:t,size:parseInt(n)}))}function G2(e){return Lt(e)&&"chrom"in e}function JD(e){return e.every(G2)}function wd(e){return Lt(e)&&("name"in e||xd(e)||H2(e))}function xd(e){return wd(e)&&"url"in e}function H2(e){return wd(e)&&"contigs"in e}class Fs extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof Fs&&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 vd extends Fs{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 V2 extends Fs{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 q2 extends V2{constructor(){super(),this.type="nominal"}}class $D extends Fs{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 j2={quantitative:vd,index:vd,locus:vd,nominal:q2,ordinal:V2};function W2(e,t){if(e=="quantitative"&&ek(t)){const n=new $D(t);return n.type=e,n}else if(j2[e]){const n=new j2[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function ek(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function tk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function nk(e,t,n){return e*Math.pow(t/e,n)}Xe("index",bd,["continuous"]),Xe("locus",ED,["continuous"]),Xe("null",cd,[]);const Z2="quantitative",Y2="ordinal",Q2="nominal",X2="locus",rk="index";class ik{constructor(t){ve(this,Fe);ve(this,mr);ve(this,sa,{domain:new Set,range:new Set});ve(this,ln);ve(this,gc,new Set);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){X(this,sa)[t].add(n)}removeEventListener(t,n){X(this,sa)[t].delete(n)}addMember(t){var a;const{channel:n,channelDef:r}=t;if(n!="sample"&&!r.type&&!sd(n))throw new Error(`The "type" property must be defined in channel definition: "${n}": ${JSON.stringify(r)}. Must be one of: "quantitative", "ordinal", "nominal", "locus", "index"`);const i=n=="sample"?"nominal":r.type,o=(a=r==null?void 0:r.scale)==null?void 0:a.name;if(o){if(this.name!==void 0&&o!=this.name)throw new Error(`Shared scales have conflicting names: "${o}" vs. "${this.name}"!`);this.name=o}if(!this.type)this.type=i;else if(i!==this.type&&!sd(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(t)}getDataDomain(){return this.members.map(t=>{var n;return(n=t.dataDomainSource)==null?void 0:n.call(t,t.channel,this.type)}).filter(t=>!!t).reduce((t,n)=>t.extendAll(n))}reconfigure(){const t=X(this,ln);if(!t||t.type=="null")return;const n=he(this,Fe,zA).call(this),r=t.domain(),i=he(this,Fe,Ep).call(this,!0);if(P2({...i,range:void 0},t),t.props=i,he(this,Fe,Sp).call(this),Rt(t.type)&&Pe(this,mr,he(this,Fe,Cp).call(this)),!n){he(this,Fe,Er).call(this,"domain");return}const o=t.domain();al(o,r)||(this.isZoomable()?t.domain(r):he(this,Fe,no).call(this)?(t.domain(r),this.zoomTo(o,500)):he(this,Fe,Er).call(this,"domain"))}get scale(){if(X(this,ln))return X(this,ln);const t=he(this,Fe,Ep).call(this),n=ND({...t,range:void 0});n.props=t,"unknown"in n&&n.unknown(null),Pe(this,ln,n),he(this,Fe,Sp).call(this),SD(n)&&n.genome(this.getGenome()),Rt(n.type)&&Pe(this,mr,he(this,Fe,Cp).call(this));const r=n.range;if(r){const i=()=>he(this,Fe,Er).call(this,"range");n.range=function(o){if(arguments.length)r(o),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 he(this,Fe,no).call(this)&&al(he(this,Fe,Wu).call(this),this.getDomain())}isZoomable(){return he(this,Fe,no).call(this)&&!!this.scale.props.zoom}zoom(t,n,r){if(!he(this,Fe,no).call(this))return!1;const i=this.scale,o=i.domain();let a=[...o],s=i.invert(n);switch(i.props.reverse&&(r=-r),"align"in i&&(s+=i.align()),i.type){case"linear":case"index":case"locus":a=n3(a,r||0),a=zp(a,s,t);break;case"log":a=r3(a,r||0),a=Up(a,s,t);break;case"pow":case"sqrt":{const c=i;a=i3(a,r||0,c.exponent()),a=Ku(a,s,t,c.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return X(this,mr)&&(a=a3(a,X(this,mr)[0],X(this,mr)[1])),[0,1].some(c=>a[c]!=o[c])?(i.domain(a),he(this,Fe,Er).call(this,"domain"),!0):!1}async zoomTo(t,n=!1){if(Aa(n)&&(n=n?700:0),!he(this,Fe,no).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(t),i=X(this,Fe,vp).animator,o=this.scale,a=o.domain();if(n>0&&a.length==2){const s=a[1]-a[0],c=r[1]-r[0],l=a[0]+s/2,u=r[0]+c/2,f=a[0]==r[0],h=a[1]==r[1];await i.transition({duration:n,easingFunction:tk,onUpdate:d=>{const p=nk(s,c,d),b=s==c?d:(s-p)/(s-c),v=b*u+(1-b)*l,y=[f?a[0]:v-p/2,h?a[1]:v+p/2];o.domain(y),he(this,Fe,Er).call(this,"domain")}}),o.domain(r),he(this,Fe,Er).call(this,"domain")}else o.domain(r),i==null||i.requestRender(),he(this,Fe,Er).call(this,"domain")}resetZoom(){if(!he(this,Fe,no).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=he(this,Fe,Wu).call(this);return[0,1].some(r=>n[r]!=t[r])?(X(this,ln).domain(n),he(this,Fe,Er).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?zc(X(this,mr))/zc(this.scale.domain()):1}getAxisLength(){if(this.channel!=="x"&&this.channel!=="y")throw new Error("Axis length is only defined for x and y channels!");const t=this.members.map(n=>{var r;return(r=n.view.coords)==null?void 0:r[this.channel==="x"?"width":"height"]}).filter(n=>n>0);return t.length?t.reduce((n,r)=>Math.min(n,r),1e4):0}getGenome(){var n;if(this.type!=="locus")return;const t=(n=X(this,Fe,vp).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 G2(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&JD(t)?this.getGenome().toContinuousInterval(t):t}}mr=new WeakMap,sa=new WeakMap,ln=new WeakMap,gc=new WeakMap,Fe=new WeakSet,xp=function(){return this.members[0].view},vp=function(){return X(this,Fe,xp).context},Er=function(t){for(const n of X(this,sa)[t].values())n({type:t,scaleResolution:this})},Ap=function(){return!!he(this,Fe,_p).call(this)},zA=function(){const t=X(this,ln);if(!t)return!1;const n=t.domain();return Rt(t.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},UA=function(){const t=this.members.map(n=>n.channelDef.scale).filter(n=>n!==void 0);return ru(t,"scale",["domain"])},Ep=function(t=!1){const n=he(this,Fe,UA).call(this);if(n===null||n.type=="null")return{type:"null"};const r={...he(this,Fe,GA).call(this,this.type),...n};r.type||(r.type=ok(this.channel,this.type));const i=he(this,Fe,Wu).call(this,t);return i&&i.length>0?r.domain=i:Gr(r.type)&&(r.domain=new q2),!r.domain&&r.domainMid!==void 0&&(r.domain=[r.domainMin??0,r.domainMax??1]),this.channel=="y"&&Gr(r.type)&&r.reverse==null&&(r.reverse=!0),r.range&&r.scheme&&delete r.scheme,!("zoom"in r)&&["index","locus"].includes(r.type)&&(r.zoom=!0),ak(r,this.channel),r},Sp=function(){const t=X(this,ln).props,n=t.range;if(X(this,gc).forEach(i=>i.invalidate()),!n||!Bt(n))return;const r=(i,o)=>o?i.slice().reverse():i;if(n.some(Yt)){let i;const o=()=>{X(this,ln).range(r(i.map(a=>a()),t.reverse))};i=n.map(a=>{if(Yt(a)){const s=X(this,Fe,xp).paramMediator.createExpression(a.expr);return s.addListener(o),X(this,gc).add(s),()=>s(null)}else return()=>a}),o()}else X(this,ln).range(r(n,t.reverse))},Wu=function(t=!1){return he(this,Fe,_p).call(this)??(this.type==X2?this.getGenome().getExtent():t?this.getDataDomain():[])},_p=function(){const t=this.members.map(n=>n.channelDef).filter(n=>{var r;return(r=n.scale)==null?void 0:r.domain}).map(n=>W2(n.type,this.fromComplexInterval(n.scale.domain)));if(t.length>0)return t.reduce((n,r)=>n.extendAll(r))},no=function(){const t=this.scale.type;return Rt(t)},Cp=function(){const t=this.scale.props,n=t.zoom;if(sk(n)&&Bt(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():X(this,ln).domain()},GA=function(t){const n=this.channel,r={};return he(this,Fe,Ap).call(this)&&(r.zero=!1),Ss(n)?r.nice=!he(this,Fe,Ap).call(this):jr(n)?r.scheme=t==Q2?"tableau10":t==Y2?"blues":"viridis":Kl(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r};function ok(e,t){if(t==rk||t==X2){if(n2(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"],sample:["null",void 0,void 0]},i=["sample"].includes(e)?"null":n[e]?n[e][[Q2,Y2,Z2].indexOf(t)]:t==Z2?"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 ak(e,t){Ss(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&Rt(e.type)&&(e.clamp=!0)}function sk(e){return Lt(e)}function Ad(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of Kt(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function Ed(...e){for(const t of e)if(t!==void 0)return t}class ck{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=Xa(this.members))==null?void 0:t.view.getScaleResolution(this.channel)}addMember(t){const{view:n}=t,r=n.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! Channel: ${this.channel}, existing views: [${this.members.map(i=>i.view.getPathString()).join(", ")}], new view: ${n.getPathString()}.`);this.members.push(t)}getAxisProps(){return tu(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:ru(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=o=>{var s;const a=aI(o.view,o.channel);if(!yn(a))return{member:o,explicitTitle:Ed("axis"in a?(s=a.axis)==null?void 0:s.title:void 0,a.title),implicitTitle:Ed(qr(a)?a.field:void 0,Es(a)?a.expr:void 0)}},n=this.members.map(t),r=n.filter(o=>{var a;if(sd(o.member.channel)&&!o.explicitTitle){const s=Mi(o.member.channel);return((a=n.find(c=>c.member.view==o.member.view&&c.member.channel==s))==null?void 0:a.explicitTitle)===void 0}return!0}),i=new Set(r.map(o=>Ed(o.explicitTitle,o.implicitTitle)).filter(it));return i.size?[...i].join(", "):null}}function K2(e,t,{spacing:n,devicePixelRatio:r,offset:i,reverse:o}={}){n=n||0,i=i||0;let a=0,s=0;for(const p of e)a+=iu(p.px)+(Sd(p)?0:n),s+=iu(p.grow);a-=n;const c=Math.max(0,t-a),l=r!==void 0?p=>Math.round(p*r)/r:p=>p,u=[],f=[],h=p=>{const b=u.length;if(!b)return;const v=(p?n:0)*(o?-1:1);d-=v;for(let y=0;y<b;y++)f.push({location:d+(y+1)/(b+1)*v,size:0});d+=v,u.length=0};let d=o?Math.max(t,a):0+i;if(e.length==1&&Sd(e[0]))return[{location:d,size:0}];for(let p=0;p<e.length;p++){const b=e[p];if(Sd(b))u.push(b);else{h(f.length>0);const v=iu(b.px)+(s?iu(b.grow)/s*c:0);o&&(d-=v),f.push({location:l(d),size:l(v)}),o?d-=n:d+=v+n}}return d+=o?n:-n,h(!1),f}function lk(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 pp=class pp{constructor(t,n){ve(this,mc);this.width=t,this.height=n}addPadding(t){return he(this,mc,Tp).call(this,t.width,t.height)}subtractPadding(t){return he(this,mc,Tp).call(this,-t.width,-t.height)}isGrowing(){return!!(this.width.grow||this.height.grow)}};mc=new WeakSet,Tp=function(t,n){return new pp({px:(this.width.px??0)+t,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Wr=pp;const Ms=Object.freeze({px:0,grow:0}),J2=new Wr(Ms,Ms);function Sd(e){return!e.px&&!e.grow}function iu(e){return e||0}function uk(e){return e&&(jt(e.px)||jt(e.grow))}function $2(e){if(ny(e))throw new Error("parseSizeDef does not accept step-based sizes.");if(uk(e))return e;if(jt(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 Gt{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 Gt(this.top+t,this.right+t,this.bottom+t,this.left+t)}add(t){return new Gt(this.top+t.top,this.right+t.right,this.bottom+t.bottom,this.left+t.left)}subtract(t){return new Gt(this.top-t.top,this.right-t.right,this.bottom-t.bottom,this.left-t.left)}union(t){return new Gt(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 Gt(0,this.right,0,this.left)}getVertical(){return new Gt(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):_d}static createFromRecord(t){return new Gt(t.top,t.right,t.bottom,t.left)}static zero(){return _d}static createUniformPadding(t){return new Gt(t,t,t,t)}}const _d=Gt.createUniformPadding(0);Object.freeze(_d);function Ps(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}function fk(e){if(!e)return e;if(/[?#]/.test(e))throw new Error(`Invalid base URL: ${e} - cannot contain query or hash.`);return e.endsWith("/")?e:e+"/"}const hk="VISIT_SKIP",Ls="VISIT_STOP",ey=e=>e;class ty{constructor(t,n,r,i,o,a={}){ve(this,er);ve(this,ca,{});ve(this,bc,{});ve(this,yc,{});ve(this,wc);ve(this,xc);qt(this,"opacityFunction",ey);qt(this,"facetCoords",new tr([],JSON.stringify));var s;if(!t)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=r,this.dataParent=i,this.name=t.name||o,this.spec=t,this.resolutions={scale:{},axis:{}},v2(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...a},this.needsAxes={x:!1,y:!1},this.paramMediator=new $T(()=>{var c;return(c=this.dataParent)==null?void 0:c.paramMediator}),t.params)for(const c of t.params)this.paramMediator.registerParam(c);if(!((s=this.layoutParent)!=null&&s.options.layeredChildren)){const c=l=>this.paramMediator.findMediatorForParam(l)?void 0:this.paramMediator.allocateSetter(l,0);Pe(this,xc,c("height")),Pe(this,wc,c("width"))}}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>Gt.createFromConfig(this.spec.padding))}getOverhang(){return Gt.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Wr(he(this,er,Fc).call(this,"width"),he(this,er,Fc).call(this,"height")):J2)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return J2;const t=this.getSize();return new Wr(he(this,er,Fc).call(this,"viewportWidth")??t.width,he(this,er,Fc).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 he(this,er,Ip).call(this,"layoutParent")}getDataAncestors(){return he(this,er,Ip).call(this,"dataParent")}handleBroadcast(t){for(const n of X(this,ca)[t.type]||[])n(t)}_addBroadcastHandler(t,n){let r=X(this,ca)[t];r||(r=[],X(this,ca)[t]=r),r.push(n)}handleInteractionEvent(t,n,r){const i=r?X(this,bc):X(this,yc);for(const o of i[n.type]||[])o(t,n)}addInteractionEventListener(t,n,r){const i=r?X(this,bc):X(this,yc);let o=i[t];o||(o=[],i[t]=o),o.push(n)}visit(t){try{const n=t(this);if(t.postOrder&&t.postOrder(this),n!==Ls)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===ey)&&(this.opacityFunction=pk(this))}onBeforeRender(){}render(t,n,r={}){var i,o;r.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(r.facetId,r.clipRect?n.intersect(r.clipRect):n),(i=X(this,wc))==null||i.call(this,n.width),(o=X(this,xc))==null||o.call(this,n.height)}getEncoding(){const t=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...t,...n};for(const[i,o]of Object.entries(r))o===null&&delete r[i];return r}getFacetAccessor(t){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(t){var r;const n=this.getEncoding().sample;return qr(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(t){const n=Mi(t);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(t){const n=Mi(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 Rs(()=>{var t;return(t=this.dataParent)==null?void 0:t.getBaseUrl()},fk(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const t=this.spec.title;if(t)return it(t)?t:Yt(t.text)?this.paramMediator.evaluateAndGet(t.text.expr):t.text}_cache(t,n){return tu(this,t,n)}_invalidateCacheByPrefix(t,n="self"){switch(n){case"self":nu(this,t);break;case"ancestors":for(const r of this.getLayoutAncestors())nu(r,t);break;case"progeny":this.visit(r=>nu(r,t));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(t){}}ca=new WeakMap,bc=new WeakMap,yc=new WeakMap,wc=new WeakMap,xc=new WeakMap,er=new WeakSet,Fc=function(t){var i;let n=this.spec[t];const r=t=="viewportWidth"||t=="viewportHeight";if(ny(n)){if(r)throw new Li(`Cannot use step-based size with "${t}"!`,this);const o=n.step,a=(i=this.getScaleResolution(t=="width"?"x":"y"))==null?void 0:i.scale;if(a){let s=0;if(Gr(a.type))s=a.domain().length;else if(["locus","index"].includes(a.type)){const l=a.domain();s=Xa(l)-l[0]}else throw new Li(`Cannot use step-based size with "${a.type}" scale!`,this);const c=a;return s=Gh(s,c.paddingInner(),c.paddingOuter()),{px:s*o,grow:0}}else throw new Li("Cannot use 'step' size with missing scale!",this)}else return(n&&$2(n))??(r?void 0:{px:0,grow:1})},Ip=function(t){const n=[];let r=this;do n.push(r),r=r[t];while(r);return n};function dk(e){return"unitsPerPixel"in e}function pk(e){const t="opacity"in e.spec?e.spec.opacity:void 0;if(t!==void 0){if(jt(t))return n=>n*t;if(dk(t)){const n=o=>{var s;const a=(s=e.getScaleResolution(o))==null?void 0:s.scale;if(["linear","index","locus"].includes(a==null?void 0:a.type))return a},r=t.channel?n(t.channel):n("x")??n("y");if(!r)throw new Li("Cannot find a resolved quantitative scale for dynamic opacity!",e);const i=Fh().domain(t.unitsPerPixel).range(t.values).clamp(!0);return o=>{const s=zc(r.domain())/1e3;return i(s)*o}}else if(Yt(t)){const n=e.paramMediator.createExpression(t.expr);return n.addListener(()=>e.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const ny=e=>!!(e!=null&&e.step),gk={point:oD,rect:$I,rule:lD,link:mD,text:AD};class an extends ty{constructor(n,r,i,o,a,s){super(n,r,i,o,a,s);ve(this,qu);ve(this,vc);this.spec=n;const c=gk[this.getMarkType()];if(c)this.mark=new c(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),Pe(this,vc,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(l=>{var u;return(u=this.getScaleResolution(l))==null?void 0:u.addEventListener("domain",()=>X(this,vc).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0},he(this,qu,HA).call(this)}render(n,r,i={}){super.render(n,r,i),this.isConfiguredVisible()&&(n.pushView(this,r),n.renderMark(this.mark,i),n.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}getEncoding(){const n=super.getEncoding(),r=this.mark.getSupportedChannels();for(const i of Object.keys(n))r.includes(i)||delete n[i];return n}resolve(n){n||(this.resolve("scale"),this.resolve("axis"));const r=this.mark.encoding;for(const[i,o]of Object.entries(r)){if(!on(o))continue;const a=Mi(o.resolutionChannel??i);if(!_s(a)||n=="axis"&&!Ss(a))continue;let s=this;for(;(s.getConfiguredOrDefaultResolution(a,n)=="forced"||s.dataParent&&["shared","excluded","forced"].includes(s.dataParent.getConfiguredOrDefaultResolution(a,n)))&&s.getConfiguredOrDefaultResolution(a,n)!="excluded";)s=s.dataParent;if(n=="axis"&&Ss(i)&&n2(a))s.resolutions[n][a]||(s.resolutions[n][a]=new ck(a)),s.resolutions[n][a].addMember({view:this,channel:i,channelDef:o});else if(n=="scale"&&_s(i)){if(!s.resolutions[n][a]){const l=new ik(a);s.resolutions[n][a]=l,l.addEventListener("range",u=>{var f;(f=this.context.glHelper)==null||f.createRangeTexture(u.scaleResolution,!0)})}const c=this.getLayoutAncestors().some(l=>!l.options.contributesToScaleDomain)||on(o)&&o.contributesToScaleDomain===!1?void 0:this.extractDataDomain.bind(this);s.resolutions[n][a].addMember({view:this,channel:i,channelDef:o,dataDomainSource:c})}}}getDataAccessor(n){var r;return(r=this.mark.encoders[n])==null?void 0:r.dataAccessor}getFacetAccessor(n){const r=this.getDataAccessor("sample");return r||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}extractDataDomain(n,r){var o;let i=W2(r);return(((o=this.mark.encoders[n])==null?void 0:o.accessors)??[]).filter(a=>a.scaleChannel).forEach(a=>{if(a.constant)i.extend(a({}));else{const s=this.getCollector();s!=null&&s.completed&&s.visitData(c=>i.extend(a(c)))}}),i}getZoomLevel(){const n=r=>{var i;return((i=this.getScaleResolution(r))==null?void 0:i.getZoomLevel())??1};return Do.map(n).reduce((r,i)=>r*i,1)}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0),n.target=this,!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return n=="x"?"shared":"independent"}}vc=new WeakMap,qu=new WeakSet,HA=function(){for(const[n,r]of this.paramMediator.paramConfigs){if(!("select"in r))continue;const i=Kb(r.select);if(ad(i)){let a=0;const s=this.paramMediator.getSetter(n),c=()=>{var f;const u=this.context.getCurrentHover();return((f=u==null?void 0:u.mark)==null?void 0:f.unitView)===this?u.datum:null},l=(u,f)=>{const h=f.uiEvent,d=c(),p=d?d[bn]:0;let b;if(i.toggle)if(h.shiftKey){if(d){const y=this.paramMediator.getValue(n);b=YT(y,{toggle:[d]})}}else b=Yb(d?[d]:null);else p!=a&&(a=p,b=Zb(d));b!==void 0&&s(b)};this.addInteractionEventListener(["mouseover","pointerover"].includes(i.on)?"mousemove":"click",l)}}};function*Cd(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of Cd(r,[...t,n]))yield i;else yield[[...t,n],r]}const ry=2147483647,mk=iy([ry]);function iy(e){let t=0;for(let n=0,r=e.length;n<r;n++)t=Math.max(t,e[n]);return Math.floor(Math.log2(t)/4)+1}function bk(e){const t=iy(e);let n=Array.from({length:e.length},(o,a)=>a),r=new Array(e.length);const i=new Array(16);for(let o=0;o<t;o++){i.fill(0);const a=o*4,s=Math.pow(16,o),c=l=>{const u=e[n[l]];return o>=mk?u>ry?Math.floor(u/s)%16:0:u>>a&15};for(let l=0;l<e.length;l++)i[c(l)]++;for(let l=1;l<16;l++)i[l]+=i[l-1];for(let l=e.length-1;l>=0;l--)r[--i[c(l)]]=n[l];[n,r]=[r,n]}return n}class oy extends rd{constructor(n){super();ve(this,un);ve(this,br,[]);ve(this,Ac,Ke(bn));ve(this,Xi,[]);ve(this,Ki);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=new tr([],JSON.stringify),he(this,un,Dp).call(this)}get behavior(){return nd}get label(){return"collect"}reset(){super.reset(),he(this,un,Dp).call(this)}handle(n){X(this,br).push(n)}beginBatch(n){ZT(n)&&(Pe(this,br,[]),this.facetBatches.set(Kt(n.facetId),X(this,br)))}complete(){var o,a;Pe(this,br,[]);const n=(o=this.params)==null?void 0:o.sort,r=n?Gp(n.field,n.order):void 0,i=s=>{r&&s.sort(r)};if((a=this.params.groupby)!=null&&a.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const s=this.facetBatches.get(void 0),c=this.params.groupby.map(u=>Ke(u)),l=c.length>1?jc(s,...c):yk(s,c[0]);this.facetBatches.clear();for(const[u,f]of Cd(l))this.facetBatches.set(u,f)}for(const s of this.facetBatches.values())i(s);he(this,un,VA).call(this),he(this,un,kp).call(this),super.complete();for(const s of this.observers)s(this)}repropagate(){for(const n of this.children)n.reset();he(this,un,kp).call(this);for(const n of this.children)n.complete()}getData(){switch(he(this,un,Bp).call(this),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())yield*i}}}}}visitData(n){he(this,un,Bp).call(this);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}findDatumByUniqueId(n){if(!X(this,Xi).length)return;const r=co(c=>c.start).right,i=X(this,Ac),o=co(c=>i(a(c))).left,a=c=>{const l=r(X(this,Ki),c),u=X(this,Ki)[l-1];return!u||c>=u.stop?void 0:this.facetBatches.get(u.facetId)[c-u.start]},s=o(X(this,Xi),n);if(s>=0){const c=a(X(this,Xi)[s]);if(c&&i(c)===n)return c}}}br=new WeakMap,Ac=new WeakMap,Xi=new WeakMap,Ki=new WeakMap,un=new WeakSet,Dp=function(){Pe(this,br,[]),this.facetBatches.clear(),this.facetBatches.set(void 0,X(this,br))},kp=function(){if(this.children.length)for(const[n,r]of this.facetBatches.entries()){if(n){const i={type:"facet",facetId:n};for(const o of this.children)o.beginBatch(i)}for(let i=0,o=r.length;i<o;i++)this._propagate(r[i])}},Bp=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},VA=function(){var a;Pe(this,Ki,[]);const n=(a=this.facetBatches.values().next().value)==null?void 0:a[0];if(n==null||!(bn in n))return;let r=0;const i=[],o=X(this,Ac);for(const[s,c]of this.facetBatches){X(this,Ki).push({start:r,stop:r+c.length,facetId:s}),r+=c.length;for(let l=0,u=c.length;l<u;l++)i.push(o(c[l]))}Pe(this,Xi,bk(i))};function yk(e,t){const n=new Map;for(let r=0,i=e.length;r<i;r++){const o=e[r],a=t(o);let s=n.get(a);s||(s=[],n.set(a,s)),s.push(o)}return n}class ou{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,n){let r=this.length++;for(;r>0;){const i=r-1>>1,o=this.values[i];if(n>=o)break;this.ids[r]=this.ids[i],this.values[r]=o,r=i}this.ids[r]=t,this.values[r]=n}pop(){if(this.length===0)return;const t=this.ids[0];if(this.length--,this.length>0){const n=this.ids[0]=this.ids[this.length],r=this.values[0]=this.values[this.length],i=this.length>>1;let o=0;for(;o<i;){let a=(o<<1)+1;const s=a+1;let c=this.ids[a],l=this.values[a];const u=this.values[s];if(s<this.length&&u<l&&(a=s,c=this.ids[s],l=u),l>=r)break;this.ids[o]=c,this.values[o]=l,o=a}this.ids[o]=n,this.values[o]=r}return t}peek(){if(this.length!==0)return this.ids[0]}peekValue(){if(this.length!==0)return this.values[0]}shrink(){this.ids.length=this.values.length=this.length}}class wk extends vt{get behavior(){return Zn}constructor(t){super(t),this.params=t,this.startAccessor=Ke(t.start),this.endAccessor=Ke(t.end),this.chromAccessor=t.chrom?Ke(t.chrom):n=>{},this.weightAccessor=t.weight?Ke(t.weight):n=>1,this.as={coverage:t.as??"coverage",start:t.asStart??t.start,end:t.asEnd??t.end,chrom:t.asChrom??t.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([n,r])=>r).map(([n,r])=>`${JSON.stringify(r)}: ${n}`).join(", ")+"};"),this.ends=new ou}reset(){super.reset(),this.initialize()}initialize(){const t=this.as.coverage,n=this.as.end,r=this.as.chrom,i=this.startAccessor,o=this.endAccessor,a=this.chromAccessor,s=this.weightAccessor;let c,l,u,f=0,h=NaN;const d=this.ends;d.clear();const p=y=>{this._propagate(y),c=null},b=(y,A,_)=>{if(y==A)return;let E=!1;c&&(c[t]===_?(c[n]=A,E=!0):c[t]!=0&&p(c)),E||(c=this.createSegment(y,A,_,u))},v=()=>{let y=0;for(;(y=d.peekValue())!==void 0;)b(h,y,f),h=y,f-=d.pop();h=NaN,c&&p(c)};this.handle=y=>{const A=i(y);let _=0;for(;(_=d.peekValue())!==void 0&&_<A;)b(h,_,f),h=_,f-=d.pop();if(r){let C=a(y);C!==l&&(v(),u=C,l=u)}isNaN(h)||b(h,A,f),h=A;const E=s(y);f+=E,d.push(E,o(y))},this.complete=()=>{v(),super.complete()},this.beginBatch=y=>{v(),l=null,super.beginBatch(y)}}}function xk(e,t,n=0,r=e.length){const i=new ou,o=r-n;let a;for(a=0;a<t&&a<o;a++)i.push(a,e[n+a]);for(;a<o;a++){const l=e[n+a];l>=i.peekValue()&&(i.push(a,l),i.pop())}const s=[];let c;for(;(c=i.pop())!==void 0;)s.push(n+c);return s.reverse()}class vk{constructor(t,n=-1/0,r=1/0){this.maxSize=t,this.lowerLimit=n,this.upperLimit=r;const i=this.maxSize*2+1;this.lowerLimits=new Float64Array(i),this.upperLimits=new Float64Array(i),this.lowerChildren=new Int32Array(i),this.upperChildren=new Int32Array(i),this.reset()}reset(){this.lowerLimits.fill(0),this.upperLimits.fill(0),this.lowerChildren.fill(0),this.upperChildren.fill(0),this.n=1,this.lowerLimits[0]=this.lowerLimit,this.upperLimits[0]=this.upperLimit}_findSlot(t,n,r=0){if(t>=this.lowerLimits[r]&&n<=this.upperLimits[r]){const i=this.lowerChildren[r];if(i){const o=this._findSlot(t,n,i);return o>=0?o:this._findSlot(t,n,this.upperChildren[r])}else return r}else return-1}reserve(t,n){if(n-t<=0)throw new Error("Cannot reserve an empty or negative-size slot!");if(this.n+1>this.lowerLimits.length)return!1;const r=this._findSlot(t,n);if(r<0)return!1;const i=this.n++,o=this.n++;return this.lowerLimits[i]=this.lowerLimits[r],this.upperLimits[i]=t,this.lowerLimits[o]=n,this.upperLimits[o]=this.upperLimits[r],this.lowerChildren[r]=i,this.upperChildren[r]=o,!0}}class Ak extends vt{get behavior(){return nd}constructor(t,n){if(super(t),this.params=t,this._data=[],this.channel=t.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.posAccessor=Ke(this.params.pos),this.posBisector=co(this.posAccessor),this.scoreAccessor=Ke(this.params.score),this.widthAccessor=Ke(this.params.width),this.laneAccessor=this.params.lane?Ke(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 vk(200));this.schedule(),super.complete()}_filterAndPropagate(){super.reset();const t=this.resolution.scale,n=this.resolution.getAxisLength();if(!n)return;for(const a of this.reservationMaps.values())a.reset();const r=t.domain(),o=xk(this._scores,70,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const a of o){const s=this._data[a],c=t(this.posAccessor(s))*n,l=this.widthAccessor(s)/2+this.padding;this.reservationMaps.get(this.laneAccessor(s)).reserve(c-l,c+l)&&this._propagate(s)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class Ek extends vt{constructor(t,n){super(t,n),this.params=t,this.predicate=void 0}initialize(){let t="";if(Sk(this.params))t=this.params.expr;else if(_k(this.params))t=Qb(this.params);else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramMediator.createExpression(t),this.predicate.addListener(()=>this.repropagate())}handle(t){this.predicate(t)&&this._propagate(t)}}function Sk(e){return"expr"in e}function _k(e){return"param"in e}class Ck extends vt{get behavior(){return Zn}constructor(t){super(t),this.params=t;const n=t.index;if(t.fields){const r=Kt(t.fields).map(o=>Ke(o)),i=Kt(t.as||t.fields);if(r.length!==i.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${i.length}) do not match!`);this.handle=o=>{const a=r.map((c,l)=>c(o)??[]),s=a[0].length;for(let c=0;c<s;c++){const l=Object.assign({},o);for(let u=0;u<r.length;u++)l[i[u]]=c<a[u].length?a[u][c]:null;n&&(l[n]=c),this._propagate(l)}}}else this.handle=r=>{for(let i=0;i<r.length;i++){const o=Object.assign({},r[i]);n&&(o[n]=i),this._propagate(o)}}}}const Tk=48;function*Ik(e,t=","){const n=t.charCodeAt(0);let r=0;for(let i=0;i<e.length;i++){const o=e.charCodeAt(i);o==n?(yield r,r=0):r=r*10+o-Tk}yield r}class Dk extends vt{get behavior(){return Zn}constructor(t){super(t);const n=Ke(t.exons??"exons"),r=Ke(t.start??"start"),[i,o]=t.as||["exonStart","exonEnd"];this.handle=a=>{let s=r(a),c=s,l=!0;const u=n(a);for(const f of Ik(u)){if(l)c=s+f;else{s=c+f;const h=Object.assign({},a);h[i]=c,h[o]=s,this._propagate(h)}l=!l}}}}class kk extends vt{get behavior(){return Zn}constructor(t){super(t);const n=Kt(t.field).map(o=>Ke(o)),r=Kt(t.separator),i=Kt(t.as||t.field);if(n.length!==r.length||n.length!==i.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${n.length}), and "as" (${i.length}) do not match!`);this.handle=o=>{if(n.some(c=>!c(o)))return;const a=n.map((c,l)=>c(o).split(r[l]));Bk(a,o);const s=a[0].length;for(let c=0;c<s;c++){const l=Object.assign({},o);for(let u=0;u<n.length;u++)l[i[u]]=a[u][c];this._propagate(l)}}}}function Bk(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 Rk extends vt{get behavior(){return Vr}constructor(t,n){super(t,n),this.params=t,this.as=t.as,this.fn=void 0}initialize(){this.fn=this.paramMediator.createExpression(this.params.expr),this.fn.addListener(()=>this.repropagate())}handle(t){t[this.as]=this.fn(t),this._propagate(t)}}class ay extends vt{get behavior(){return Vr}constructor(t,n){t={channel:"x",...t},super(t),this.params=t;const r=t.channel;if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const i=n.getScaleResolution(r).getGenome();if(!i)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const o=Ke(t.chrom),a=Kt(t.pos).map(p=>Ke(p)),s=Kt(t.as);if(a.length!=s.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=Kt(t.offset);let l;if(c.length==0)l=new Array(a.length).fill(0);else if(c.length==1)l=new Array(a.length).fill(c[0]);else if(c.length==a.length)l=c;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(t.offset)}!`);const u=new Function("datum","chromOffset","posAccessors",s.map((p,b)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${b}](datum) - ${l[b]};`).join(`
|
|
515
|
-
`));let f,h=0;const d=p=>{if(p!==f){if(h=i.cumulativeChromPositions.get(p),h===void 0)return;f=p}return h};this.handle=p=>{const b=o(p),v=d(b);if(v===void 0)throw new Error(`Unknown chromosome/contig "${b}" in datum: ${JSON.stringify(p)}`);u(p,v,a),this._propagate(p)}}}const Fk=["Lato-Regular.png"],Mk=JSON.parse('[{"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}]'),sy={pages:Fk,chars:Mk,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 Pk extends vt{get behavior(){return Vr}constructor(t){super(t),this.params=t;const n=pd(sy),r=Ke(t.field),i=t.as,o=t.fontSize;this.handle=a=>{const s=r(a);s!==void 0?a[i]=n.measureWidth(s,o):a[i]=0,this._propagate(a)}}}const Lk=65536;class Nk extends vt{get behavior(){return Vr}constructor(t){super(t),this.params=t}reset(){super.reset(),this.initialize()}initialize(){const t=this.params,n=t.as||"lane",r=jt(t.spacing)?t.spacing:1,i=Ke(t.start),o=Ke(t.end);if(!t.preference!=!t.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(t.preference){const a=new Float64Array(Lk),s=Ke(t.preference),c=t.preferredOrder;let l=1/0;this.handle=u=>{const f=i(u);f<l&&a.fill(-1/0),l=f;const h=c.indexOf(s(u));let d=-1;if(h>=0&&a[h]<f)d=h;else{const p=i(u);for(d=0;d<a.length&&!(a[d]<p);d++);if(d>=a.length)throw new Error("Out of lanes!")}a[d]=o(u)+r,u[n]=d,this._propagate(u)}}else{const a=new ou,s=new ou;let c=-1/0,l=0;this.handle=u=>{const f=i(u);for(;a.length&&(a.peekValue()<=f||f<c);){const d=a.pop();s.push(d,d)}c=f;let h=s.pop();h===void 0&&(h=l++),u[n]=h,this._propagate(u),a.push(h,o(u)+r)}}}}class Ok extends vt{get behavior(){return Zn}constructor(t){if(super(t),this.params=t,t.as&&t.as.length!=t.fields.length)throw new Error('"fields" and "as" have unequal lengths!');const n=t.fields.map(i=>Ke(i)),r=t.as?t.as:n.map(io);this.handle=i=>{const o={};for(let a=0;a<n.length;a++)o[r[a]]=n[a](i);this._propagate(o)}}}class zk extends vt{get behavior(){return Vr}constructor(t){super(t),this.params=t;const n=new RegExp(t.regex),r=typeof t.as=="string"?[t.as]:t.as,i=Ke(t.field);this.handle=o=>{const a=i(o);if(it(a)){const s=a.match(n);if(s){if(s.length-1!=r.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let c=0;c<r.length;c++)o[r[c]]=s[c+1]}else if(t.skipInvalidInput)for(let c=0;c<r.length;c++)o[r[c]]=void 0;else throw new Error(`"${a}" does not match the given regex: ${n.toString()}`)}else if(!t.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof a}, field content: "${a}".`);this._propagate(o)}}}class Uk extends vt{get behavior(){return Zn}constructor(t){super(t),this.params=t;const n=Kt(t.columnRegex).map(h=>new RegExp(h)),r=Kt(t.asValue);if(n.length!=r.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const i=t.skipRegex?new RegExp(t.skipRegex):void 0,o=t.asKey||"sample";let a,s,c;const l=h=>{var v;const d=Object.keys(h);for(const y of n)if(!d.some(A=>y.test(A)))throw new Error(`No columns matching the regex ${y.toString()} found in the data!`);const p=new Map;for(const[y,A]of n.entries())for(const _ of d){const E=(v=A.exec(_))==null?void 0:v[1];if(E!==void 0){let C=p.get(E);C||(C=[],p.set(E,C)),C[y]=_}}a=[...p.entries()],s=d.filter(y=>!n.some(A=>A.test(y))&&!(i&&i.test(y)));const b=[...s.map(y=>JSON.stringify(y)+": datum["+JSON.stringify(y)+"]"),JSON.stringify(o)+": sampleId",...r.map((y,A)=>JSON.stringify(y)+`: datum[attrs[${A}]]`)];c=new Function("datum","sampleId","attrs",`return {
|
|
516
|
-
`+
|
|
513
|
+
chrM 16299`};function nD(t){if(!(t in Eb))throw new Error(`Unknown assembly: ${t}`);return Eb[t].split(`
|
|
514
|
+
`).map(e=>{const n=e.split(" ");return{name:n[0],size:parseInt(n[1])}})}const rD=/^([A-Za-z]+:)?\/\//;function ta(t,e){if(e&&rD.test(e))return e;const n=typeof t=="function"?t():t;if(!n)return e;if(!e)return n;if(/[#?]/.test(n))throw new Error(`Cannot append to a url with query or hash. Append: ${e}, base: ${n}`);return Sb(n)+e}function Sb(t){const e=t.replace(/[^/]*$/,"");return e===""?void 0:e.endsWith("://")?t+"/":e}class iD{constructor(e){if(this.config={name:"custom",...e},"baseUrl"in e)throw new Error("The `baseUrl` property in genome config has been removed in GenomeSpy v0.52.0. Use `url` instead. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.");if(!vh(e))throw new Error("Not a genome configuration: "+JSON.stringify(e));if(this.chromosomes=[],this.cumulativeChromPositions=new Map,this.chromosomesByName=new Map,this.startByIndex=[],this.totalSize=0,Ib(this.config))this.setChromSizes(this.config.contigs);else if(!Ah(this.config)){const n=nD(this.config.name);if(n)this.setChromSizes(n);else throw new Error(`Unknown genome: ${this.config.name}. Please provide contigs or a URL. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.`)}}get name(){return this.config.name}async load(e){if(Ah(this.config))try{const n=ta(e,this.config.url),r=await fetch(n);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);this.setChromSizes(oD(await r.text()))}catch(n){throw new Error(`Could not load chrom sizes: ${this.config.url}. Reason: ${n.message}`)}}hasChrPrefix(){return this.chromosomes.some(e=>e.name.startsWith("chr"))}setChromSizes(e){let n=0;this.startByIndex=[0];for(let r=0;r<e.length;r++){this.startByIndex.push(n);const o=e[r].size,i={...e[r],continuousStart:n,continuousEnd:n+o,continuousInterval:[n,n+o],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(i);const s=i.name.replace(/^chr/i,"");for(const a of["chr"+s,"CHR"+s,"Chr"+s,i.number,""+i.number,s,i.name])this.cumulativeChromPositions.set(a,n),this.chromosomesByName.set(a,i);n+=i.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(e,n){let r=this.cumulativeChromPositions.get(e);if(r===void 0)throw new Error("Unknown chromosome/contig: "+e);return r+ +n}toChromosome(e){if(e>this.totalSize)return;e=Math.floor(e);const n=dr(this.startByIndex,e)-1;if(n>0&&n<=this.chromosomes.length)return this.chromosomes[n-1]}toChromosomal(e){const n=this.toChromosome(e);if(n)return{chrom:n.name,pos:Math.floor(e)-n.continuousStart}}getChromosome(e){return this.chromosomesByName.get(e)}formatInterval(e){return tD(...this.toChromosomalInterval(e))}toChromosomalInterval(e){const n=this.toChromosomal(e[0]+.5),r=this.toChromosomal(e[1]-.5);return r.pos+=1,[n,r]}toContinuousInterval(e){var o;let[n,r]=e;return r||(r=n),[this.toContinuous(n.chrom,n.pos??0),this.toContinuous(r.chrom,r.pos??((o=this.chromosomesByName.get(r.chrom))==null?void 0:o.size))]}toDiscreteChromosomeIntervals(e){const n=e[0],r=e[1],o=[];if(n.chrom===r.chrom)o.push({chrom:n.chrom,startPos:n.pos,endPos:r.pos});else{const i=this.chromosomes.findIndex(a=>a.name===n.chrom),s=this.chromosomes.findIndex(a=>a.name===r.chrom);o.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[i].size});for(let a=i+1;a<s;a++)o.push({chrom:this.chromosomes[a].name,startPos:0,endPos:this.chromosomes[a].size});o.push({chrom:r.chrom,startPos:0,endPos:r.pos})}return o}continuousToDiscreteChromosomeIntervals(e){return this.toDiscreteChromosomeIntervals([this.toChromosomal(e[0]),this.toChromosomal(e[1])])}parseInterval(e){const n=e.match(/^(chr[0-9A-Z]+)(?::([0-9,]+)(?:-(?:(chr[0-9A-Z]+):)?([0-9,]+))?)?$/);if(n){const r=n[1];if(n.slice(2).every(a=>a===void 0)){const a=this.getChromosome(r);return a?[a.continuousStart,a.continuousEnd]:void 0}const o=n[3]||r,i=parseInt(n[2].replace(/,/g,"")),s=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):i;return[this.toContinuous(r,i-1),this.toContinuous(o,s)]}}}function oD(t){return Kv(t).map(([e,n])=>({name:e,size:parseInt(n)}))}function Cb(t){return Rt(t)&&"chrom"in t}function sD(t){return t.every(Cb)}function vh(t){return Rt(t)&&("name"in t||Ah(t)||Ib(t))}function Ah(t){return vh(t)&&"url"in t}function Ib(t){return vh(t)&&"contigs"in t}class na extends Array{constructor(){super(),this.type=void 0}extend(e){return this}extendAll(e){if(e instanceof na&&e.type!=this.type)throw new Error(`Cannot combine different types of domains: ${this.type} and ${e.type}`);for(const n of e)this.extend(n);return this}extendAllWithAccessor(e,n){for(const r of e)this.extend(n(r));return this}}class Eh extends na{constructor(){super(),this.type="quantitative"}extend(e){return e==null||Number.isNaN(e)?this:(e=+e,this.length?e<this[0]?this[0]=e:e>this[1]&&(this[1]=e):(this.push(e),this.push(e)),this)}}class Tb extends na{constructor(){super(),this.type="ordinal",this.uniqueValues=new Set}extend(e){return e==null||Number.isNaN(e)?this:(this.uniqueValues.has(e)||(this.uniqueValues.add(e),this.push(e)),this)}}class Db extends Tb{constructor(){super(),this.type="nominal"}}class aD extends na{constructor(e){super();let n=0;for(let r=1;r<e.length;r++)n+=Math.sign(e[r]-e[r-1]);if(Math.abs(n)!=e.length-1)throw new Error("Piecewise domain must be strictly increasing or decreasing: "+JSON.stringify(e));e.forEach(r=>this.push(r))}extend(e){if(this.includes(e))return this;throw new Error("Piecewise domains are immutable and cannot be unioned!")}}const Bb={quantitative:Eh,index:Eh,locus:Eh,nominal:Db,ordinal:Tb};function _b(t,e){if(t=="quantitative"&&cD(e)){const n=new aD(e);return n.type=t,n}else if(Bb[t]){const n=new Bb[t];return n.type=t,e&&n.extendAll(e),n}throw new Error("Unknown type: "+t)}function cD(t){return t&&t.length>0&&t.length!=2&&t.every(e=>typeof e=="number")}function lD(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function uD(t,e,n){return t*Math.pow(e/t,n)}Ye("index",wh,["continuous"]),Ye("locus",kT,["continuous"]),Ye("null",uh,[]);const kb="quantitative",Rb="ordinal",Fb="nominal",Mb="locus",fD="index";class hD{constructor(e){ve(this,Fe);ve(this,rr);ve(this,_o,{domain:new Set,range:new Set});ve(this,en);ve(this,Sa,new Set);this.channel=e,this.members=[],this.type=null,this.name=void 0}addEventListener(e,n){X(this,_o)[e].add(n)}removeEventListener(e,n){X(this,_o)[e].delete(n)}addMember(e){var s;const{channel:n,channelDef:r}=e;if(n!="sample"&&!r.type&&!lh(n))throw new Error(`The "type" property must be defined in channel definition: "${n}": ${JSON.stringify(r)}. Must be one of: "quantitative", "ordinal", "nominal", "locus", "index"`);const o=n=="sample"?"nominal":r.type,i=(s=r==null?void 0:r.scale)==null?void 0:s.name;if(i){if(this.name!==void 0&&i!=this.name)throw new Error(`Shared scales have conflicting names: "${i}" vs. "${this.name}"!`);this.name=i}if(!this.type)this.type=o;else if(o!==this.type&&!lh(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${o}. Use "resolve: independent" for channel ${this.channel}`);this.members.push(e)}getDataDomain(){return this.members.map(e=>{var n;return(n=e.dataDomainSource)==null?void 0:n.call(e,e.channel,this.type)}).filter(e=>!!e).reduce((e,n)=>e.extendAll(n))}reconfigure(){const e=X(this,en);if(!e||e.type=="null")return;const n=he(this,Fe,Qx).call(this),r=e.domain(),o=he(this,Fe,i0).call(this,!0);if(wb({...o,range:void 0},e),e.props=o,he(this,Fe,o0).call(this),Bt(e.type)&&Pe(this,rr,he(this,Fe,a0).call(this)),!n){he(this,Fe,ur).call(this,"domain");return}const i=e.domain();gc(i,r)||(this.isZoomable()?e.domain(r):he(this,Fe,ki).call(this)?(e.domain(r),this.zoomTo(i,500)):he(this,Fe,ur).call(this,"domain"))}get scale(){if(X(this,en))return X(this,en);const e=he(this,Fe,i0).call(this),n=jT({...e,range:void 0});n.props=e,"unknown"in n&&n.unknown(null),Pe(this,en,n),he(this,Fe,o0).call(this),RT(n)&&n.genome(this.getGenome()),Bt(n.type)&&Pe(this,rr,he(this,Fe,a0).call(this));const r=n.range;if(r){const o=()=>he(this,Fe,ur).call(this,"range");n.range=function(i){if(arguments.length)r(i),o();else return r()},o()}return n}getDomain(){return this.scale.domain()}getComplexDomain(){var e;return((e=this.getGenome())==null?void 0:e.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return he(this,Fe,ki).call(this)&&gc(he(this,Fe,Jl).call(this),this.getDomain())}isZoomable(){return he(this,Fe,ki).call(this)&&!!this.scale.props.zoom}zoom(e,n,r){if(!he(this,Fe,ki).call(this))return!1;const o=this.scale,i=o.domain();let s=[...i],a=o.invert(n);switch(o.props.reverse&&(r=-r),"align"in o&&(a+=o.align()),o.type){case"linear":case"index":case"locus":s=uv(s,r||0),s=x0(s,a,e);break;case"log":s=fv(s,r||0),s=v0(s,a,e);break;case"pow":case"sqrt":{const c=o;s=hv(s,r||0,c.exponent()),s=ru(s,a,e,c.exponent());break}default:throw new Error("Zooming is not implemented for: "+o.type)}return X(this,rr)&&(s=pv(s,X(this,rr)[0],X(this,rr)[1])),[0,1].some(c=>s[c]!=i[c])?(o.domain(s),he(this,Fe,ur).call(this,"domain"),!0):!1}async zoomTo(e,n=!1){if(jo(n)&&(n=n?700:0),!he(this,Fe,ki).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(e),o=X(this,Fe,n0).animator,i=this.scale,s=i.domain();if(n>0&&s.length==2){const a=s[1]-s[0],c=r[1]-r[0],l=s[0]+a/2,u=r[0]+c/2,f=s[0]==r[0],h=s[1]==r[1];await o.transition({duration:n,easingFunction:lD,onUpdate:d=>{const p=uD(a,c,d),y=a==c?d:(a-p)/(a-c),v=y*u+(1-y)*l,b=[f?s[0]:v-p/2,h?s[1]:v+p/2];i.domain(b),he(this,Fe,ur).call(this,"domain")}}),i.domain(r),he(this,Fe,ur).call(this,"domain")}else i.domain(r),o==null||o.requestRender(),he(this,Fe,ur).call(this,"domain")}resetZoom(){if(!he(this,Fe,ki).call(this))throw new Error("Not a zoomable scale!");const e=this.getDomain(),n=he(this,Fe,Jl).call(this);return[0,1].some(r=>n[r]!=e[r])?(X(this,en).domain(n),he(this,Fe,ur).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?Ya(X(this,rr))/Ya(this.scale.domain()):1}getAxisLength(){if(this.channel!=="x"&&this.channel!=="y")throw new Error("Axis length is only defined for x and y channels!");const e=this.members.map(n=>{var r;return(r=n.view.coords)==null?void 0:r[this.channel==="x"?"width":"height"]}).filter(n=>n>0);return e.length?e.reduce((n,r)=>Math.min(n,r),1e4):0}getGenome(){var n;if(this.type!=="locus")return;const e=(n=X(this,Fe,n0).genomeStore)==null?void 0:n.getGenome();if(!e)throw new Error("No genome has been defined!");return e}invertToComplex(e){const n=this.scale;if("invert"in n){const r=n.invert(e);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(e){const n=this.getGenome();return n?n.toChromosomal(e):e}fromComplex(e){return Cb(e)?this.getGenome().toContinuous(e.chrom,e.pos):e}fromComplexInterval(e){return this.type==="locus"&&sD(e)?this.getGenome().toContinuousInterval(e):e}}rr=new WeakMap,_o=new WeakMap,en=new WeakMap,Sa=new WeakMap,Fe=new WeakSet,t0=function(){return this.members[0].view},n0=function(){return X(this,Fe,t0).context},ur=function(e){for(const n of X(this,_o)[e].values())n({type:e,scaleResolution:this})},r0=function(){return!!he(this,Fe,s0).call(this)},Qx=function(){const e=X(this,en);if(!e)return!1;const n=e.domain();return Bt(e.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},Yx=function(){const e=this.members.map(n=>n.channelDef.scale).filter(n=>n!==void 0);return pl(e,"scale",["domain"])},i0=function(e=!1){const n=he(this,Fe,Yx).call(this);if(n===null||n.type=="null")return{type:"null"};const r={...he(this,Fe,Zx).call(this,this.type),...n};r.type||(r.type=dD(this.channel,this.type));const o=he(this,Fe,Jl).call(this,e);return o&&o.length>0?r.domain=o:Tr(r.type)&&(r.domain=new Db),!r.domain&&r.domainMid!==void 0&&(r.domain=[r.domainMin??0,r.domainMax??1]),this.channel=="y"&&Tr(r.type)&&r.reverse==null&&(r.reverse=!0),r.range&&r.scheme&&delete r.scheme,!("zoom"in r)&&["index","locus"].includes(r.type)&&(r.zoom=!0),pD(r,this.channel),r},o0=function(){const e=X(this,en).props,n=e.range;if(X(this,Sa).forEach(o=>o.invalidate()),!n||!Dt(n))return;const r=(o,i)=>i?o.slice().reverse():o;if(n.some(qt)){let o;const i=()=>{X(this,en).range(r(o.map(s=>s()),e.reverse))};o=n.map(s=>{if(qt(s)){const a=X(this,Fe,t0).paramMediator.createExpression(s.expr);return a.addListener(i),X(this,Sa).add(a),()=>a(null)}else return()=>s}),i()}else X(this,en).range(r(n,e.reverse))},Jl=function(e=!1){return he(this,Fe,s0).call(this)??(this.type==Mb?this.getGenome().getExtent():e?this.getDataDomain():[])},s0=function(){const e=this.members.map(n=>n.channelDef).filter(n=>{var r;return(r=n.scale)==null?void 0:r.domain}).map(n=>_b(n.type,this.fromComplexInterval(n.scale.domain)));if(e.length>0)return e.reduce((n,r)=>n.extendAll(r))},ki=function(){const e=this.scale.type;return Bt(e)},a0=function(){const e=this.scale.props,n=e.zoom;if(gD(n)&&Dt(n.extent))return this.fromComplexInterval(n.extent);if(n)return e.type=="locus"?this.getGenome().getExtent():X(this,en).domain()},Zx=function(e){const n=this.channel,r={};return he(this,Fe,r0).call(this)&&(r.zero=!1),Ws(n)?r.nice=!he(this,Fe,r0).call(this):kr(n)?r.scheme=e==Fb?"tableau10":e==Rb?"blues":"viridis":cl(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r};function dD(t,e){if(e==fD||e==Mb){if(G1(t))return e;throw new Error(`${t} does not support ${e} 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"],sample:["null",void 0,void 0]},o=["sample"].includes(t)?"null":n[t]?n[t][[Fb,Rb,kb].indexOf(e)]:e==kb?"linear":"ordinal";if(o===void 0)throw new Error(`Channel "${t}" is not compatible with "${e}" data type. Use of a proper scale may be needed.`);return o}function pD(t,e){Ws(e)&&t.type!=="ordinal"&&(t.range=[0,1]),e=="opacity"&&Bt(t.type)&&(t.clamp=!0)}function gD(t){return Rt(t)}function Sh(t){const e=new Set;function n(r){for(const o of Object.values(r.resolutions.scale))e.add(o)}for(const r of Wt(t)){r.visit(n);for(const o of r.getDataAncestors()){if(!o.options.contributesToScaleDomain)break;n(o)}}e.forEach(r=>r.reconfigure())}function Ch(...t){for(const e of t)if(e!==void 0)return e}class mD{constructor(e){this.channel=e,this.members=[]}get scaleResolution(){var e;return(e=ws(this.members))==null?void 0:e.view.getScaleResolution(this.channel)}addMember(e){const{view:n}=e,r=n.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! Channel: ${this.channel}, existing views: [${this.members.map(o=>o.view.getPathString()).join(", ")}], new view: ${n.getPathString()}.`);this.members.push(e)}getAxisProps(){return hl(this,"axisProps",()=>{const e=this.members.map(n=>{const r=n.view.mark.encoding[n.channel];return"axis"in r&&r.axis});return e.length>0&&e.some(n=>n===null)?null:pl(e.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const e=i=>{var a;const s=dI(i.view,i.channel);if(!ln(s))return{member:i,explicitTitle:Ch("axis"in s?(a=s.axis)==null?void 0:a.title:void 0,s.title),implicitTitle:Ch(_r(s)?s.field:void 0,js(s)?s.expr:void 0)}},n=this.members.map(e),r=n.filter(i=>{var s;if(lh(i.member.channel)&&!i.explicitTitle){const a=di(i.member.channel);return((s=n.find(c=>c.member.view==i.member.view&&c.member.channel==a))==null?void 0:s.explicitTitle)===void 0}return!0}),o=new Set(r.map(i=>Ch(i.explicitTitle,i.implicitTitle)).filter(nt));return o.size?[...o].join(", "):null}}function Pb(t,e,{spacing:n,devicePixelRatio:r,offset:o,reverse:i}={}){n=n||0,o=o||0;let s=0,a=0;for(const p of t)s+=gl(p.px)+(Ih(p)?0:n),a+=gl(p.grow);s-=n;const c=Math.max(0,e-s),l=r!==void 0?p=>Math.round(p*r)/r:p=>p,u=[],f=[],h=p=>{const y=u.length;if(!y)return;const v=(p?n:0)*(i?-1:1);d-=v;for(let b=0;b<y;b++)f.push({location:d+(b+1)/(y+1)*v,size:0});d+=v,u.length=0};let d=i?Math.max(e,s):0+o;if(t.length==1&&Ih(t[0]))return[{location:d,size:0}];for(let p=0;p<t.length;p++){const y=t[p];if(Ih(y))u.push(y);else{h(f.length>0);const v=gl(y.px)+(a?gl(y.grow)/a*c:0);i&&(d-=v),f.push({location:l(d),size:l(v)}),i?d-=n:d+=v+n}}return d+=i?n:-n,h(!1),f}function bD(t){let e=0,n=0;for(const r of t)e=Math.max(e,r.px??0),n=Math.max(n,r.grow??0);return{px:e,grow:n}}const Zd=class Zd{constructor(e,n){ve(this,Ca);this.width=e,this.height=n}addPadding(e){return he(this,Ca,c0).call(this,e.width,e.height)}subtractPadding(e){return he(this,Ca,c0).call(this,-e.width,-e.height)}isGrowing(){return!!(this.width.grow||this.height.grow)}};Ca=new WeakSet,c0=function(e,n){return new Zd({px:(this.width.px??0)+e,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Rr=Zd;const ra=Object.freeze({px:0,grow:0}),Lb=new Rr(ra,ra);function Ih(t){return!t.px&&!t.grow}function gl(t){return t||0}function yD(t){return t&&(Gt(t.px)||Gt(t.grow))}function Nb(t){if(Ub(t))throw new Error("parseSizeDef does not accept step-based sizes.");if(yD(t))return t;if(Gt(t))return{px:t,grow:0};if(t==="container")return{px:0,grow:1};if(!t)return{px:0,grow:1};throw new Error(`Invalid sizeDef: ${t}`)}class Nt{constructor(e,n,r,o){this.top=e||0,this.right=n||0,this.bottom=r||0,this.left=o||0}get width(){return this.left+this.right}get height(){return this.top+this.bottom}expand(e){return e<=0?this:new Nt(this.top+e,this.right+e,this.bottom+e,this.left+e)}add(e){return new Nt(this.top+e.top,this.right+e.right,this.bottom+e.bottom,this.left+e.left)}subtract(e){return new Nt(this.top-e.top,this.right-e.right,this.bottom-e.bottom,this.left-e.left)}union(e){return new Nt(Math.max(this.top,e.top),Math.max(this.right,e.right),Math.max(this.bottom,e.bottom),Math.max(this.left,e.left))}getHorizontal(){return new Nt(0,this.right,0,this.left)}getVertical(){return new Nt(this.top,0,this.bottom,0)}get horizontalTotal(){return this.left+this.right}get verticalTotal(){return this.top+this.bottom}static createFromConfig(e){return typeof e=="number"?this.createUniformPadding(e):e?this.createFromRecord(e):Th}static createFromRecord(e){return new Nt(e.top,e.right,e.bottom,e.left)}static zero(){return Th}static createUniformPadding(e){return new Nt(e,e,e,e)}}const Th=Nt.createUniformPadding(0);Object.freeze(Th);function ia(t,e){return!e||/^(data:|([A-Za-z]+:)?\/\/)/.test(t)||t.startsWith("/")?t:(e.endsWith("/")||(e+="/"),e+t)}function wD(t){if(!t)return t;if(/[?#]/.test(t))throw new Error(`Invalid base URL: ${t} - cannot contain query or hash.`);return t.endsWith("/")?t:t+"/"}const xD="VISIT_SKIP",oa="VISIT_STOP",Ob=t=>t;class zb{constructor(e,n,r,o,i,s={}){ve(this,Hn);ve(this,ko,{});ve(this,Ia,{});ve(this,Ta,{});ve(this,Da);ve(this,Ba);Ut(this,"opacityFunction",Ob);Ut(this,"facetCoords",new Vn([],JSON.stringify));var a;if(!e)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=r,this.dataParent=o,this.name=e.name||i,this.spec=e,this.resolutions={scale:{},axis:{}},ob(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...s},this.needsAxes={x:!1,y:!1},this.paramMediator=new sI(()=>{var c;return(c=this.dataParent)==null?void 0:c.paramMediator}),e.params)for(const c of e.params)this.paramMediator.registerParam(c);if(!((a=this.layoutParent)!=null&&a.options.layeredChildren)){const c=l=>this.paramMediator.findMediatorForParam(l)?void 0:this.paramMediator.allocateSetter(l,0);Pe(this,Ba,c("height")),Pe(this,Da,c("width"))}}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>Nt.createFromConfig(this.spec.padding))}getOverhang(){return Nt.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Rr(he(this,Hn,Ha).call(this,"width"),he(this,Hn,Ha).call(this,"height")):Lb)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return Lb;const e=this.getSize();return new Rr(he(this,Hn,Ha).call(this,"viewportWidth")??e.width,he(this,Hn,Ha).call(this,"viewportHeight")??e.height)}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(e=>e.isConfiguredVisible())}getEffectiveOpacity(){var e;return this.opacityFunction(((e=this.layoutParent)==null?void 0:e.getEffectiveOpacity())??1)}getPathString(){return this.getLayoutAncestors().map(e=>e.name).reverse().join("/")}getLayoutAncestors(){return he(this,Hn,l0).call(this,"layoutParent")}getDataAncestors(){return he(this,Hn,l0).call(this,"dataParent")}handleBroadcast(e){for(const n of X(this,ko)[e.type]||[])n(e)}_addBroadcastHandler(e,n){let r=X(this,ko)[e];r||(r=[],X(this,ko)[e]=r),r.push(n)}handleInteractionEvent(e,n,r){const o=r?X(this,Ia):X(this,Ta);for(const i of o[n.type]||[])i(e,n)}addInteractionEventListener(e,n,r){const o=r?X(this,Ia):X(this,Ta);let i=o[e];i||(i=[],o[e]=i),i.push(n)}visit(e){try{const n=e(this);if(e.postOrder&&e.postOrder(this),n!==oa)return n}catch(n){throw n.view=this,n}}getDescendants(){const e=[];return this.visit(n=>{e.push(n)}),e}configureViewOpacity(){(!this.opacityFunction||this.opacityFunction===Ob)&&(this.opacityFunction=AD(this))}onBeforeRender(){}render(e,n,r={}){var o,i;r.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(r.facetId,r.clipRect?n.intersect(r.clipRect):n),(o=X(this,Da))==null||o.call(this,n.width),(i=X(this,Ba))==null||i.call(this,n.height)}getEncoding(){const e=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...e,...n};for(const[o,i]of Object.entries(r))i===null&&delete r[o];return r}getFacetAccessor(e){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(e){var r;const n=this.getEncoding().sample;return _r(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(e){const n=di(e);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(e){const n=di(e);return this.getDataAncestors().map(r=>r.resolutions.axis[n]).find(r=>r)}getConfiguredResolution(e,n){var r,o;return(o=(r=this.spec.resolve)==null?void 0:r[n])==null?void 0:o[e]}getConfiguredOrDefaultResolution(e,n){return this.getConfiguredResolution(e,n)??this.getConfiguredResolution("default",n)??this.getDefaultResolution(e,n)}getDefaultResolution(e,n){return"independent"}getBaseUrl(){return ta(()=>{var e;return(e=this.dataParent)==null?void 0:e.getBaseUrl()},wD(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const e=this.spec.title;if(e)return nt(e)?e:qt(e.text)?this.paramMediator.evaluateAndGet(e.text.expr):e.text}_cache(e,n){return hl(this,e,n)}_invalidateCacheByPrefix(e,n="self"){switch(n){case"self":dl(this,e);break;case"ancestors":for(const r of this.getLayoutAncestors())dl(r,e);break;case"progeny":this.visit(r=>dl(r,e));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(e){}}ko=new WeakMap,Ia=new WeakMap,Ta=new WeakMap,Da=new WeakMap,Ba=new WeakMap,Hn=new WeakSet,Ha=function(e){var o;let n=this.spec[e];const r=e=="viewportWidth"||e=="viewportHeight";if(Ub(n)){if(r)throw new gi(`Cannot use step-based size with "${e}"!`,this);const i=n.step,s=(o=this.getScaleResolution(e=="width"?"x":"y"))==null?void 0:o.scale;if(s){let a=0;if(Tr(s.type))a=s.domain().length;else if(["locus","index"].includes(s.type)){const l=s.domain();a=ws(l)-l[0]}else throw new gi(`Cannot use step-based size with "${s.type}" scale!`,this);const c=s;return a=Vf(a,c.paddingInner(),c.paddingOuter()),{px:a*i,grow:0}}else throw new gi("Cannot use 'step' size with missing scale!",this)}else return(n&&Nb(n))??(r?void 0:{px:0,grow:1})},l0=function(e){const n=[];let r=this;do n.push(r),r=r[e];while(r);return n};function vD(t){return"unitsPerPixel"in t}function AD(t){const e="opacity"in t.spec?t.spec.opacity:void 0;if(e!==void 0){if(Gt(e))return n=>n*e;if(vD(e)){const n=i=>{var a;const s=(a=t.getScaleResolution(i))==null?void 0:a.scale;if(["linear","index","locus"].includes(s==null?void 0:s.type))return s},r=e.channel?n(e.channel):n("x")??n("y");if(!r)throw new gi("Cannot find a resolved quantitative scale for dynamic opacity!",t);const o=Pf().domain(e.unitsPerPixel).range(e.values).clamp(!0);return i=>{const a=Ya(r.domain())/1e3;return o(a)*i}}else if(qt(e)){const n=t.paramMediator.createExpression(e.expr);return n.addListener(()=>t.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const Ub=t=>!!(t!=null&&t.step),ED={point:dT,rect:aT,rule:bT,link:ST,text:_T};class $t extends zb{constructor(n,r,o,i,s,a){super(n,r,o,i,s,a);ve(this,Xl);ve(this,_a);this.spec=n;const c=ED[this.getMarkType()];if(c)this.mark=new c(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),Pe(this,_a,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(l=>{var u;return(u=this.getScaleResolution(l))==null?void 0:u.addEventListener("domain",()=>X(this,_a).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0},he(this,Xl,Xx).call(this)}render(n,r,o={}){super.render(n,r,o),this.isConfiguredVisible()&&(n.pushView(this,r),n.renderMark(this.mark,o),n.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}getEncoding(){const n=super.getEncoding(),r=this.mark.getSupportedChannels();for(const o of Object.keys(n))r.includes(o)||delete n[o];return n}resolve(n){n||(this.resolve("scale"),this.resolve("axis"));const r=this.mark.encoding;for(const[o,i]of Object.entries(r)){if(!Jt(i))continue;const s=di(i.resolutionChannel??o);if(!Qs(s)||n=="axis"&&!Ws(s))continue;let a=this;for(;(a.getConfiguredOrDefaultResolution(s,n)=="forced"||a.dataParent&&["shared","excluded","forced"].includes(a.dataParent.getConfiguredOrDefaultResolution(s,n)))&&a.getConfiguredOrDefaultResolution(s,n)!="excluded";)a=a.dataParent;if(n=="axis"&&Ws(o)&&G1(s))a.resolutions[n][s]||(a.resolutions[n][s]=new mD(s)),a.resolutions[n][s].addMember({view:this,channel:o,channelDef:i});else if(n=="scale"&&Qs(o)){if(!a.resolutions[n][s]){const l=new hD(s);a.resolutions[n][s]=l,l.addEventListener("range",u=>{var f;(f=this.context.glHelper)==null||f.createRangeTexture(u.scaleResolution,!0)})}const c=this.getLayoutAncestors().some(l=>!l.options.contributesToScaleDomain)||Jt(i)&&i.contributesToScaleDomain===!1?void 0:this.extractDataDomain.bind(this);a.resolutions[n][s].addMember({view:this,channel:o,channelDef:i,dataDomainSource:c})}}}getDataAccessor(n){var r;return(r=this.mark.encoders[n])==null?void 0:r.dataAccessor}getFacetAccessor(n){const r=this.getDataAccessor("sample");return r||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}extractDataDomain(n,r){var i;let o=_b(r);return(((i=this.mark.encoders[n])==null?void 0:i.accessors)??[]).filter(s=>s.scaleChannel).forEach(s=>{if(s.constant)o.extend(s({}));else{const a=this.getCollector();a!=null&&a.completed&&a.visitData(c=>o.extend(s(c)))}}),o}getZoomLevel(){const n=r=>{var o;return((o=this.getScaleResolution(r))==null?void 0:o.getZoomLevel())??1};return oo.map(n).reduce((r,o)=>r*o,1)}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0),n.target=this,!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return n=="x"?"shared":"independent"}}_a=new WeakMap,Xl=new WeakSet,Xx=function(){for(const[n,r]of this.paramMediator.paramConfigs){if(!("select"in r))continue;const o=L1(r.select);if(ch(o)){let s=0;const a=this.paramMediator.getSetter(n),c=()=>{var f;const u=this.context.getCurrentHover();return((f=u==null?void 0:u.mark)==null?void 0:f.unitView)===this?u.datum:null},l=(u,f)=>{const h=f.uiEvent,d=c(),p=d?d[cn]:0;let y;if(o.toggle)if(h.shiftKey){if(d){const b=this.paramMediator.getValue(n);y=tI(b,{toggle:[d]})}}else y=F1(d?[d]:null);else p!=s&&(s=p,y=R1(d));y!==void 0&&a(y)};this.addInteractionEventListener(["mouseover","pointerover"].includes(o.on)?"mousemove":"click",l)}}};function*Dh(t,e=[]){for(const[n,r]of t.entries())if(r instanceof Map)for(const o of Dh(r,[...e,n]))yield o;else yield[[...e,n],r]}const Gb=2147483647,SD=Hb([Gb]);function Hb(t){let e=0;for(let n=0,r=t.length;n<r;n++)e=Math.max(e,t[n]);return Math.floor(Math.log2(e)/4)+1}function CD(t){const e=Hb(t);let n=Array.from({length:t.length},(i,s)=>s),r=new Array(t.length);const o=new Array(16);for(let i=0;i<e;i++){o.fill(0);const s=i*4,a=Math.pow(16,i),c=l=>{const u=t[n[l]];return i>=SD?u>Gb?Math.floor(u/a)%16:0:u>>s&15};for(let l=0;l<t.length;l++)o[c(l)]++;for(let l=1;l<16;l++)o[l]+=o[l-1];for(let l=t.length-1;l>=0;l--)r[--o[c(l)]]=n[l];[n,r]=[r,n]}return n}class Vb extends oh{constructor(n){super();ve(this,tn);ve(this,ir,[]);ve(this,ka,Ze(cn));ve(this,Ci,[]);ve(this,Ii);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=new Vn([],JSON.stringify),he(this,tn,u0).call(this)}get behavior(){return ih}get label(){return"collect"}reset(){super.reset(),he(this,tn,u0).call(this)}handle(n){X(this,ir).push(n)}beginBatch(n){eI(n)&&(Pe(this,ir,[]),this.facetBatches.set(Wt(n.facetId),X(this,ir)))}complete(){var i,s;Pe(this,ir,[]);const n=(i=this.params)==null?void 0:i.sort,r=n?A0(n.field,n.order):void 0,o=a=>{r&&a.sort(r)};if((s=this.params.groupby)!=null&&s.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const a=this.facetBatches.get(void 0),c=this.params.groupby.map(u=>Ze(u)),l=c.length>1?ec(a,...c):ID(a,c[0]);this.facetBatches.clear();for(const[u,f]of Dh(l))this.facetBatches.set(u,f)}for(const a of this.facetBatches.values())o(a);he(this,tn,Kx).call(this),he(this,tn,f0).call(this),super.complete();for(const a of this.observers)a(this)}repropagate(){for(const n of this.children)n.reset();he(this,tn,f0).call(this);for(const n of this.children)n.complete()}getData(){switch(he(this,tn,h0).call(this),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const n=this.facetBatches;return{[Symbol.iterator]:function*(){for(const o of n.values())yield*o}}}}}visitData(n){he(this,tn,h0).call(this);for(const r of this.facetBatches.values())for(let o=0;o<r.length;o++)n(r[o])}getItemCount(){let n=0;for(const r of this.facetBatches.values())n+=r.length;return n}findDatumByUniqueId(n){if(!X(this,Ci).length)return;const r=Ni(c=>c.start).right,o=X(this,ka),i=Ni(c=>o(s(c))).left,s=c=>{const l=r(X(this,Ii),c),u=X(this,Ii)[l-1];return!u||c>=u.stop?void 0:this.facetBatches.get(u.facetId)[c-u.start]},a=i(X(this,Ci),n);if(a>=0){const c=s(X(this,Ci)[a]);if(c&&o(c)===n)return c}}}ir=new WeakMap,ka=new WeakMap,Ci=new WeakMap,Ii=new WeakMap,tn=new WeakSet,u0=function(){Pe(this,ir,[]),this.facetBatches.clear(),this.facetBatches.set(void 0,X(this,ir))},f0=function(){if(this.children.length)for(const[n,r]of this.facetBatches.entries()){if(n){const o={type:"facet",facetId:n};for(const i of this.children)i.beginBatch(o)}for(let o=0,i=r.length;o<i;o++)this._propagate(r[o])}},h0=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},Kx=function(){var s;Pe(this,Ii,[]);const n=(s=this.facetBatches.values().next().value)==null?void 0:s[0];if(n==null||!(cn in n))return;let r=0;const o=[],i=X(this,ka);for(const[a,c]of this.facetBatches){X(this,Ii).push({start:r,stop:r+c.length,facetId:a}),r+=c.length;for(let l=0,u=c.length;l<u;l++)o.push(i(c[l]))}Pe(this,Ci,CD(o))};function ID(t,e){const n=new Map;for(let r=0,o=t.length;r<o;r++){const i=t[r],s=e(i);let a=n.get(s);a||(a=[],n.set(s,a)),a.push(i)}return n}class ml{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(e,n){let r=this.length++;for(;r>0;){const o=r-1>>1,i=this.values[o];if(n>=i)break;this.ids[r]=this.ids[o],this.values[r]=i,r=o}this.ids[r]=e,this.values[r]=n}pop(){if(this.length===0)return;const e=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],o=this.length>>1;let i=0;for(;i<o;){let s=(i<<1)+1;const a=s+1;let c=this.ids[s],l=this.values[s];const u=this.values[a];if(a<this.length&&u<l&&(s=a,c=this.ids[a],l=u),l>=r)break;this.ids[i]=c,this.values[i]=l,i=s}this.ids[i]=n,this.values[i]=r}return e}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 TD extends wt{get behavior(){return On}constructor(e){super(e),this.params=e,this.startAccessor=Ze(e.start),this.endAccessor=Ze(e.end),this.chromAccessor=e.chrom?Ze(e.chrom):n=>{},this.weightAccessor=e.weight?Ze(e.weight):n=>1,this.as={coverage:e.as??"coverage",start:e.asStart??e.start,end:e.asEnd??e.end,chrom:e.asChrom??e.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 ml}reset(){super.reset(),this.initialize()}initialize(){const e=this.as.coverage,n=this.as.end,r=this.as.chrom,o=this.startAccessor,i=this.endAccessor,s=this.chromAccessor,a=this.weightAccessor;let c,l,u,f=0,h=NaN;const d=this.ends;d.clear();const p=b=>{this._propagate(b),c=null},y=(b,A,C)=>{if(b==A)return;let E=!1;c&&(c[e]===C?(c[n]=A,E=!0):c[e]!=0&&p(c)),E||(c=this.createSegment(b,A,C,u))},v=()=>{let b=0;for(;(b=d.peekValue())!==void 0;)y(h,b,f),h=b,f-=d.pop();h=NaN,c&&p(c)};this.handle=b=>{const A=o(b);let C=0;for(;(C=d.peekValue())!==void 0&&C<A;)y(h,C,f),h=C,f-=d.pop();if(r){let I=s(b);I!==l&&(v(),u=I,l=u)}isNaN(h)||y(h,A,f),h=A;const E=a(b);f+=E,d.push(E,i(b))},this.complete=()=>{v(),super.complete()},this.beginBatch=b=>{v(),l=null,super.beginBatch(b)}}}function DD(t,e,n=0,r=t.length){const o=new ml,i=r-n;let s;for(s=0;s<e&&s<i;s++)o.push(s,t[n+s]);for(;s<i;s++){const l=t[n+s];l>=o.peekValue()&&(o.push(s,l),o.pop())}const a=[];let c;for(;(c=o.pop())!==void 0;)a.push(n+c);return a.reverse()}class BD{constructor(e,n=-1/0,r=1/0){this.maxSize=e,this.lowerLimit=n,this.upperLimit=r;const o=this.maxSize*2+1;this.lowerLimits=new Float64Array(o),this.upperLimits=new Float64Array(o),this.lowerChildren=new Int32Array(o),this.upperChildren=new Int32Array(o),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(e,n,r=0){if(e>=this.lowerLimits[r]&&n<=this.upperLimits[r]){const o=this.lowerChildren[r];if(o){const i=this._findSlot(e,n,o);return i>=0?i:this._findSlot(e,n,this.upperChildren[r])}else return r}else return-1}reserve(e,n){if(n-e<=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(e,n);if(r<0)return!1;const o=this.n++,i=this.n++;return this.lowerLimits[o]=this.lowerLimits[r],this.upperLimits[o]=e,this.lowerLimits[i]=n,this.upperLimits[i]=this.upperLimits[r],this.lowerChildren[r]=o,this.upperChildren[r]=i,!0}}class _D extends wt{get behavior(){return ih}constructor(e,n){if(super(e),this.params=e,this._data=[],this.channel=e.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.posAccessor=Ze(this.params.pos),this.posBisector=Ni(this.posAccessor),this.scoreAccessor=Ze(this.params.score),this.widthAccessor=Ze(this.params.width),this.laneAccessor=this.params.lane?Ze(this.params.lane):o=>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",o=>this.schedule()),n._addBroadcastHandler("layoutComputed",()=>this.schedule())}complete(){const e=this.posAccessor;this._data.sort((n,r)=>e(n)-e(r)),this._scores=this._data.map(this.scoreAccessor);for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new BD(200));this.schedule(),super.complete()}_filterAndPropagate(){super.reset();const e=this.resolution.scale,n=this.resolution.getAxisLength();if(!n)return;for(const s of this.reservationMaps.values())s.reset();const r=e.domain(),i=DD(this._scores,70,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of i){const a=this._data[s],c=e(this.posAccessor(a))*n,l=this.widthAccessor(a)/2+this.padding;this.reservationMaps.get(this.laneAccessor(a)).reserve(c-l,c+l)&&this._propagate(a)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(e){this._data.push(e)}}class kD extends wt{constructor(e,n){super(e,n),this.params=e,this.predicate=void 0}initialize(){let e="";if(RD(this.params))e=this.params.expr;else if(FD(this.params))e=M1(this.params);else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramMediator.createExpression(e),this.predicate.addListener(()=>this.repropagate())}handle(e){this.predicate(e)&&this._propagate(e)}}function RD(t){return"expr"in t}function FD(t){return"param"in t}class MD extends wt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=e.index;if(e.fields){const r=Wt(e.fields).map(i=>Ze(i)),o=Wt(e.as||e.fields);if(r.length!==o.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${o.length}) do not match!`);this.handle=i=>{const s=r.map((c,l)=>c(i)??[]),a=s[0].length;for(let c=0;c<a;c++){const l=Object.assign({},i);for(let u=0;u<r.length;u++)l[o[u]]=c<s[u].length?s[u][c]:null;n&&(l[n]=c),this._propagate(l)}}}else this.handle=r=>{for(let o=0;o<r.length;o++){const i=Object.assign({},r[o]);n&&(i[n]=o),this._propagate(i)}}}}const PD=48;function*LD(t,e=","){const n=e.charCodeAt(0);let r=0;for(let o=0;o<t.length;o++){const i=t.charCodeAt(o);i==n?(yield r,r=0):r=r*10+i-PD}yield r}class ND extends wt{get behavior(){return On}constructor(e){super(e);const n=Ze(e.exons??"exons"),r=Ze(e.start??"start"),[o,i]=e.as||["exonStart","exonEnd"];this.handle=s=>{let a=r(s),c=a,l=!0;const u=n(s);for(const f of LD(u)){if(l)c=a+f;else{a=c+f;const h=Object.assign({},s);h[o]=c,h[i]=a,this._propagate(h)}l=!l}}}}class OD extends wt{get behavior(){return On}constructor(e){super(e);const n=Wt(e.field).map(i=>Ze(i)),r=Wt(e.separator),o=Wt(e.as||e.field);if(n.length!==r.length||n.length!==o.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${n.length}), and "as" (${o.length}) do not match!`);this.handle=i=>{if(n.some(c=>!c(i)))return;const s=n.map((c,l)=>c(i).split(r[l]));zD(s,i);const a=s[0].length;for(let c=0;c<a;c++){const l=Object.assign({},i);for(let u=0;u<n.length;u++)l[o[u]]=s[u][c];this._propagate(l)}}}}function zD(t,e){const n=t.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(e))}class UD extends wt{get behavior(){return Br}constructor(e,n){super(e,n),this.params=e,this.as=e.as,this.fn=void 0}initialize(){this.fn=this.paramMediator.createExpression(this.params.expr),this.fn.addListener(()=>this.repropagate())}handle(e){e[this.as]=this.fn(e),this._propagate(e)}}class qb extends wt{get behavior(){return Br}constructor(e,n){e={channel:"x",...e},super(e),this.params=e;const r=e.channel;if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const o=n.getScaleResolution(r).getGenome();if(!o)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const i=Ze(e.chrom),s=Wt(e.pos).map(p=>Ze(p)),a=Wt(e.as);if(s.length!=a.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=Wt(e.offset);let l;if(c.length==0)l=new Array(s.length).fill(0);else if(c.length==1)l=new Array(s.length).fill(c[0]);else if(c.length==s.length)l=c;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(e.offset)}!`);const u=new Function("datum","chromOffset","posAccessors",a.map((p,y)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${y}](datum) - ${l[y]};`).join(`
|
|
515
|
+
`));let f,h=0;const d=p=>{if(p!==f){if(h=o.cumulativeChromPositions.get(p),h===void 0)return;f=p}return h};this.handle=p=>{const y=i(p),v=d(y);if(v===void 0)throw new Error(`Unknown chromosome/contig "${y}" in datum: ${JSON.stringify(p)}`);u(p,v,s),this._propagate(p)}}}const jb={chars:JSON.parse('[{"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}]'),common:{lineHeight:50.400000000000006,base:41.454,scaleW:512,scaleH:512,pages:1,packed:0,alphaChnl:0,redChnl:0,greenChnl:0,blueChnl:0}};class GD extends wt{get behavior(){return Br}constructor(e){super(e),this.params=e;const n=mh(jb),r=Ze(e.field),o=e.as,i=e.fontSize;this.handle=s=>{const a=r(s);a!==void 0?s[o]=n.measureWidth(a,i):s[o]=0,this._propagate(s)}}}const HD=65536;class VD extends wt{get behavior(){return Br}constructor(e){super(e),this.params=e}reset(){super.reset(),this.initialize()}initialize(){const e=this.params,n=e.as||"lane",r=Gt(e.spacing)?e.spacing:1,o=Ze(e.start),i=Ze(e.end);if(!e.preference!=!e.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(e.preference){const s=new Float64Array(HD),a=Ze(e.preference),c=e.preferredOrder;let l=1/0;this.handle=u=>{const f=o(u);f<l&&s.fill(-1/0),l=f;const h=c.indexOf(a(u));let d=-1;if(h>=0&&s[h]<f)d=h;else{const p=o(u);for(d=0;d<s.length&&!(s[d]<p);d++);if(d>=s.length)throw new Error("Out of lanes!")}s[d]=i(u)+r,u[n]=d,this._propagate(u)}}else{const s=new ml,a=new ml;let c=-1/0,l=0;this.handle=u=>{const f=o(u);for(;s.length&&(s.peekValue()<=f||f<c);){const d=s.pop();a.push(d,d)}c=f;let h=a.pop();h===void 0&&(h=l++),u[n]=h,this._propagate(u),s.push(h,i(u)+r)}}}}class qD extends wt{get behavior(){return On}constructor(e){if(super(e),this.params=e,e.as&&e.as.length!=e.fields.length)throw new Error('"fields" and "as" have unequal lengths!');const n=e.fields.map(o=>Ze(o)),r=e.as?e.as:n.map(Fi);this.handle=o=>{const i={};for(let s=0;s<n.length;s++)i[r[s]]=n[s](o);this._propagate(i)}}}class jD extends wt{get behavior(){return Br}constructor(e){super(e),this.params=e;const n=new RegExp(e.regex),r=typeof e.as=="string"?[e.as]:e.as,o=Ze(e.field);this.handle=i=>{const s=o(i);if(nt(s)){const a=s.match(n);if(a){if(a.length-1!=r.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let c=0;c<r.length;c++)i[r[c]]=a[c+1]}else if(e.skipInvalidInput)for(let c=0;c<r.length;c++)i[r[c]]=void 0;else throw new Error(`"${s}" does not match the given regex: ${n.toString()}`)}else if(!e.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof s}, field content: "${s}".`);this._propagate(i)}}}class WD extends wt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=Wt(e.columnRegex).map(h=>new RegExp(h));for(const h of n)if(RegExp("|"+h.source).exec("").length-1!=1)throw new Error(`Regex ${h.toString()} must have exactly one capturing group!`);const r=Wt(e.asValue);if(n.length!=r.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const o=e.skipRegex?new RegExp(e.skipRegex):void 0,i=e.asKey||"sample";let s,a,c;const l=h=>{var v;const d=Object.keys(h);for(const b of n)if(!d.some(A=>b.test(A)))throw new Error(`No columns matching the regex ${b.toString()} found in the data!`);const p=new Map;for(const[b,A]of n.entries())for(const C of d){const E=(v=A.exec(C))==null?void 0:v[1];if(E!==void 0){let I=p.get(E);I||(I=[],p.set(E,I)),I[b]=C}}s=[...p.entries()],a=d.filter(b=>!n.some(A=>A.test(b))&&!(o&&o.test(b)));const y=[...a.map(b=>JSON.stringify(b)+": datum["+JSON.stringify(b)+"]"),JSON.stringify(i)+": sampleId",...r.map((b,A)=>JSON.stringify(b)+`: datum[attrs[${A}]]`)];c=new Function("datum","sampleId","attrs",`return {
|
|
516
|
+
`+y.join(`,
|
|
517
517
|
`)+`
|
|
518
|
-
};`)},u=h=>{a||l(h);for(let d=0;d<a.length;d++){const[p,b]=a[d],v=c(h,p,b);this._propagate(v)}},f=h=>{l(h),u(h),this.handle=u};this.handle=f,this.beginBatch=h=>{qb(h)&&(this.handle=f),super.beginBatch(h)}}}class Gk extends vt{get behavior(){return Vr}constructor(t){super(t),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?Gp(t.sort.field,t.sort.order):void 0,i=t.field?Ke(t.field):()=>1,o=t.groupby.map(u=>Ke(u)),a=sE(this.buffer,u=>o.map(f=>f(u)).join()).map(u=>u[1]);let s=u=>!0;if(t.baseField){const u=Ke(t.baseField);s=f=>u(f)!==null}let c,l;switch(t.offset){case"normalize":c=(u,f)=>u/f,l=(u,f)=>Ma(u,f);break;case"center":c=(u,f)=>u-f/2,l=(u,f)=>Ma(u,f);break;case"information":{const u=Math.log2(t.cardinality??4);c=(f,h)=>f/h,l=(f,h)=>{const p=Ma(f,A=>+!s(A)),b=Ma(f,h),v=b-p;let y=0;for(let A=0;A<f.length;A++){const _=f[A];if(s(_)){const E=h(_)/v;y-=E*Math.log2(E)}}return v/(u-(y+0))*(v/b)}}break;default:c=(u,f)=>u,l=(u,f)=>1}for(const u of a){r&&u.sort(r);const f=l(u,i);let h=0;for(const d of u){const p=h+i(d);s(d)&&(d[n[0]]=c(h,f),d[n[1]]=c(p,f),this._propagate(d),h=p)}}super.complete()}}class Hk extends vt{get behavior(){return Zn}constructor(t){super(t),this.params=t;const n=Ke(t.field??"sequence"),[r,i]=t.as??["pos","sequence"];this.handle=o=>{const a=Object.assign({},o,{[i]:"",[r]:0}),s=n(o);for(let c=0;c<s.length;c++){const l=Object.assign({},a);l[r]=c,l[i]=s.charAt(c),this._propagate(l)}}}}const cy={count:e=>e.length,valid:tE,sum:Ma,min:pf,max:df,mean:dE,median:pE,variance:nE};class Vk extends vt{get behavior(){return Zn}constructor(t){if(super(t),this.params=t,this.buffer=[],this.ops=[],this.as=[],t.fields){if(t.fields.length!=t.ops.length)throw new Error("Fields and ops must have the same length!");if(t.as&&t.as.length!=t.ops.length)throw new Error('If "as" is defined, "fields" and "as" must have the same length!');t.fields.forEach((n,r)=>{const i=Ke(n),o=cy[t.ops[r]];this.ops.push(a=>o(a,i)),this.as.push(t.as?t.as[r]:`${t.ops[r]}_${t.fields[r]}`)})}else this.ops.push(n=>cy.count(n)),this.as.push("count")}reset(){super.reset(),this.buffer=[]}handle(t){this.buffer.push(t)}complete(){const t=this.params,n=t==null?void 0:t.groupby;if((n==null?void 0:n.length)>0){const r=n.map(o=>Ke(o)),i=jc(this.buffer,...r);for(const[o,a]of Cd(i)){const s={};for(let c=0;c<n.length;c++)s[n[c]]=o[c];this.ops.forEach((c,l)=>{s[this.as[l]]=c(a)}),this._propagate(s)}}else{const r={};this.ops.forEach((i,o)=>{r[this.as[o]]=i(this.buffer)}),this._propagate(r)}super.complete()}}const qk={aggregate:Vk,collect:oy,coverage:wk,filterScoredLabels:Ak,filter:Ek,flatten:Ck,flattenCompressedExons:Dk,flattenDelimited:kk,flattenSequence:Hk,formula:Rk,identifier:id,linearizeGenomicCoordinate:ay,measureText:Pk,pileup:Nk,project:Ok,regexExtract:zk,regexFold:Uk,sample:D2,stack:Gk};function jk(e,t){const n=qk[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function ly(e){if(!hy(e)&&!fy(e))return;const t={...e.format};if(t.type??(t.type=fy(e)&&Zk(rn(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 Wk(e){var t;return((t=Df(e))==null?void 0:t.responseType)??"text"}function Zk(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const uy=e=>typeof e!="object"?Yk:Qk,Yk=e=>({data:e}),Qk=e=>e;function fy(e){return"url"in e}class Ro extends rd{constructor(n){super();qt(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 hy(e){return"values"in e}class Xk extends Ro{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!")}get label(){return"inlineSource"}isTrivial(){const t=this.params.values,n=Array.isArray(t)?t[0]:t;return!!(n&&Object.keys(n).length==0&&n.constructor===Object)}loadSynchronously(){const t=this.params.values;let n=[],r=i=>i;if(Array.isArray(t))t.length>0&&(n=t,r=uy(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=Jg(t,ly(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 Kk(e){return"url"in e}class Jk extends Ro{constructor(t,n){super(n),this.params=Ql(n.paramMediator,t,()=>this.load()),this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}get label(){return"urlSource"}async load(){const t=rn(this.params.url),n=Array.isArray(t)?t:[t],r=ly(this.params),i=Wk(r.type);if(n.length===0||!n[0]){this.reset(),this.complete();return}const o=async s=>{try{const c=Rs(this.baseUrl,s),l=await fetch(c);if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return typeof l[i]=="function"?l[i]():l.text()}catch(c){throw new Error(`Could not load data: ${s}. Reason: ${c.message}`)}},a=(s,c)=>{try{const l=Jg(s,r);this.beginBatch({type:"file",url:c});for(const u of l)this._propagate(u)}catch(l){throw new Error(`Cannot parse: ${c}: ${l.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(n.map(s=>o(s).then(a))),this.setLoadingStatus("complete")}catch(s){this.setLoadingStatus("error",s.message)}this.complete()}}function $k(e){return"sequence"in e}class eB extends Ro{constructor(t,n){if(super(n),this.sequence=Ql(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!")}get label(){return"sequenceSource"}loadSynchronously(){const t=rn(this.sequence.as)??"data",n=rn(this.sequence.start)??0,r=rn(this.sequence.step)??1,i=rn(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let o=n;o<i;o+=r)this._propagate({[t]:o});this.complete()}async load(){this.loadSynchronously()}}class Td extends Ro{constructor(n,r){super(n);qt(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 o=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof an||o.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(o.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)}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(),Ad(this.view)}}class tB extends Td{constructor(n,r){const i={axis:{},...n};super(r,i.channel);qt(this,"ticks",[]);this.params=n}get label(){return"axisTickSource"}async load(){this.ticks=null,this.onDomainChanged()}onDomainChanged(){const n=this.scaleResolution.scale,r=this.scaleResolution.getAxisLength(),i=this.params.axis,o=l=>25+60*Vb(100,700,l),a=jt(i.tickCount)?i.tickCount:Math.round(r/o(r)),s=B2(n,a,i.tickMinStep),c=i.values?R2(n,i.values,s):_D(n,s);if(this.ticks==null||!al(c,this.ticks)){this.ticks=c;const l=TD(n,a,i.format);this.publishData([c.map(u=>({value:u,label:l(u)}))])}}}class nB extends Td{constructor(t,n){super(n,t.channel)}get label(){return"axisGenomeSource"}async load(){this.publishData([this.genome.chromosomes])}}function au(e,t,n=!0){let r,i=a=>{};return function(...s){return new Promise((c,l)=>{const u=()=>{clearTimeout(r),i=f=>{},c(e(...s))};n&&i("debounced"),clearTimeout(r),i=l,r=window.setTimeout(u,typeof t=="function"?t():t)})}}class Ns extends Td{constructor(){super(...arguments);ve(this,la,new AbortController);ve(this,ua,[0,0]);ve(this,fa,[0,0]);ve(this,Ec,0);qt(this,"params")}setupDebouncing(n){const r=()=>rn(n.debounce),i=n.debounceMode;if(i=="domain")this.onDomainChanged=au(this.onDomainChanged.bind(this),r,!1);else if(i=="window")this.loadInterval=au(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+i)}onDomainChanged(n){var i;Pe(this,fa,n);const r=rn((i=this.params)==null?void 0:i.windowSize)??-1;n[1]-n[0]>r||this.callIfWindowsChanged(n,r,async o=>{await this.initializedPromise,this.loadInterval(o)})}reloadLastDomain(){const n=X(this,fa);Pe(this,fa,[0,0]),Pe(this,ua,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){X(this,la).abort(),this.setLoadingStatus("loading"),Pe(this,la,new AbortController);const i=X(this,la).signal,o=this.genome.continuousToDiscreteChromosomeIntervals(n);try{const a=await Promise.all(o.map(async s=>r(s,i)));if(!i.aborted)return this.setLoadingStatus("complete"),a}catch(a){if(!i.aborted)throw this.setLoadingStatus("error",a.message),a}}callIfWindowsChanged(n,r,i){const o=[Math.max(Math.floor(n[0]/r)*r,0),Math.min(Math.ceil(n[1]/r)*r,this.genome.totalSize)],a=X(this,ua);(r!==X(this,Ec)||o[0]<a[0]||o[1]>a[1])&&(Pe(this,ua,o),Pe(this,Ec,r),i(o))}}la=new WeakMap,ua=new WeakMap,fa=new WeakMap,Ec=new WeakMap;class rB extends Ns{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(()=>HR),Promise.resolve().then(()=>cF),Promise.resolve().then(()=>Hs)]).then(([{Buffer:o},{IndexedFasta:a},{RemoteFile:s}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const c=l=>new s(Ps(l,this.view.getBaseUrl()));this.fasta=new a({fasta:c(this.params.url),fai:c(this.params.indexUrl??this.params.url+".fai")}),i()})})}get label(){return"bigWigSource"}async loadInterval(t){const n=await this.discretizeAndLoad(t,async(r,i)=>this.fasta.getSequence(r.chrom,r.startPos,r.endPos,{signal:i}).then(o=>({chrom:r.chrom,start:r.startPos,sequence:o})));n&&this.publishData([n])}}class iB extends Ns{constructor(n,r){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},o=Ql(r.paramMediator,i,a=>{a.includes("url")?he(this,Sc,Rp).call(this).then(()=>this.reloadLastDomain()):a.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,o.channel);ve(this,Sc);ve(this,ha,[]);ve(this,da);if(this.params=o,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),he(this,Sc,Rp).call(this)}get label(){return"bigWigSource"}async onDomainChanged(n){await this.initializedPromise;const r=this.scaleResolution.getAxisLength()||700,i=oB(n,r,X(this,ha)),o=Math.max(i*r,5e3);this.callIfWindowsChanged(n,o,a=>this.loadInterval(a,i))}async loadInterval(n,r){const i=.5/r/rn(this.params.pixelsPerBin),o=await this.discretizeAndLoad(n,(a,s)=>X(this,da).getFeatures(a.chrom,a.startPos,a.endPos,{scale:i,signal:s}).then(c=>c.map(l=>({chrom:a.chrom,start:l.start,end:l.end,score:l.score}))));o&&this.publishData(o)}}ha=new WeakMap,da=new WeakMap,Sc=new WeakSet,Rp=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>xv),Promise.resolve().then(()=>Hs)]).then(([{BigWig:i},{RemoteFile:o}])=>{Pe(this,da,new i({filehandle:new o(Ps(rn(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),X(this,da).getHeader().then(a=>{Pe(this,ha,a.zoomLevels.map(s=>s.reductionLevel).reverse()),X(this,ha).push(1),this.setLoadingStatus("complete"),n()}).catch(a=>{this.load(),this.setLoadingStatus("error",`${rn(this.params.url)}: ${a.message}`),r(a)})})}),this.initializedPromise};function oB(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class aB extends Ns{constructor(n,r){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},o=Ql(r.paramMediator,i,a=>{a.includes("url")?he(this,_c,Fp).call(this).then(()=>this.reloadLastDomain()):a.includes("windowSize")&&this.reloadLastDomain()});super(r,o.channel);ve(this,_c);qt(this,"parser");qt(this,"bbi");qt(this,"parseLine");if(this.params=o,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),he(this,_c,Fp).call(this)}get label(){return"bigBedSource"}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,o)=>this.bbi.getFeatures(i.chrom,i.startPos,i.endPos,{signal:o}).then(a=>a.map(s=>this.parseLine(i.chrom,s))));r&&this.publishData(r)}}_c=new WeakSet,Fp=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>R7),Promise.resolve().then(()=>xv),Promise.resolve().then(()=>Hs)]).then(([i,{BigBed:o},{RemoteFile:a}])=>{const s=i.default;this.bbi=new o({filehandle:new a(Ps(rn(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async c=>{this.parser=new s({autoSql:c.autoSql});try{const l=sB(this.parser);this.parseLine=(u,f)=>l(u,f.start,f.end,f.rest)}catch{this.parseLine=(u,f)=>this.parser.parseLine(`${u} ${f.start} ${f.end} ${f.rest}`)}this.setLoadingStatus("complete"),n()}).catch(c=>{this.load(),this.setLoadingStatus("error",`${rn(this.params.url)}: ${c.message}`),r(c)})})}),this.initializedPromise};function sB(e){const t=e.autoSql.fields.filter(A=>A.type).slice(3);let n=0,r="",i=0,o={};const a=" ",s=a.charCodeAt(0),c=48,l=45;function u(){let A=r.indexOf(a,n);A<0&&(A=i);const _=r.substring(n,A);return n=A+1,_}function f(){let A=0,_=r.charCodeAt(n),E=1;_===l&&(E=-1,n++,_=r.charCodeAt(n));do{if(_===s){n++;break}A=A*10+_-c,_=r.charCodeAt(++n)}while(n<i);return A*E}const h=t.map(A=>`${JSON.stringify(A.name)}: ${A.isNumeric?"0":"emptyString"}`),d=new Function(`
|
|
518
|
+
};`)},u=h=>{s||l(h);for(let d=0;d<s.length;d++){const[p,y]=s[d],v=c(h,p,y);this._propagate(v)}},f=h=>{l(h),u(h),this.handle=u};this.handle=f,this.beginBatch=h=>{B1(h)&&(this.handle=f),super.beginBatch(h)}}}class QD extends wt{get behavior(){return Br}constructor(e){super(e),this.params=e,this.buffer=[]}reset(){this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const e=this.params,n=e.as||["y0","y1"],r=e.sort?A0(e.sort.field,e.sort.order):void 0,o=e.field?Ze(e.field):()=>1,i=e.groupby.map(u=>Ze(u)),s=gA(this.buffer,u=>i.map(f=>f(u)).join()).map(u=>u[1]);let a=u=>!0;if(e.baseField){const u=Ze(e.baseField);a=f=>u(f)!==null}let c,l;switch(e.offset){case"normalize":c=(u,f)=>u/f,l=(u,f)=>rs(u,f);break;case"center":c=(u,f)=>u-f/2,l=(u,f)=>rs(u,f);break;case"information":{const u=Math.log2(e.cardinality??4);c=(f,h)=>f/h,l=(f,h)=>{const p=rs(f,A=>+!a(A)),y=rs(f,h),v=y-p;let b=0;for(let A=0;A<f.length;A++){const C=f[A];if(a(C)){const E=h(C)/v;b-=E*Math.log2(E)}}return v/(u-(b+0))*(v/y)}}break;default:c=(u,f)=>u,l=(u,f)=>1}for(const u of s){r&&u.sort(r);const f=l(u,o);let h=0;for(const d of u){const p=h+o(d);a(d)&&(d[n[0]]=c(h,f),d[n[1]]=c(p,f),this._propagate(d),h=p)}}super.complete()}}class YD extends wt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=Ze(e.field??"sequence"),[r,o]=e.as??["pos","sequence"];this.handle=i=>{const s=Object.assign({},i,{[o]:"",[r]:0}),a=n(i);for(let c=0;c<a.length;c++){const l=Object.assign({},s);l[r]=c,l[o]=a.charAt(c),this._propagate(l)}}}}const Wb={count:t=>t.length,valid:lA,sum:rs,min:wu,max:yu,mean:vA,median:AA,variance:uA};class ZD extends wt{get behavior(){return On}constructor(e){if(super(e),this.params=e,this.buffer=[],this.ops=[],this.as=[],e.fields){if(e.fields.length!=e.ops.length)throw new Error("Fields and ops must have the same length!");if(e.as&&e.as.length!=e.ops.length)throw new Error('If "as" is defined, "fields" and "as" must have the same length!');e.fields.forEach((n,r)=>{const o=Ze(n),i=Wb[e.ops[r]];this.ops.push(s=>i(s,o)),this.as.push(e.as?e.as[r]:`${e.ops[r]}_${e.fields[r]}`)})}else this.ops.push(n=>Wb.count(n)),this.as.push("count")}reset(){super.reset(),this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const e=this.params,n=e==null?void 0:e.groupby;if((n==null?void 0:n.length)>0){const r=n.map(i=>Ze(i)),o=ec(this.buffer,...r);for(const[i,s]of Dh(o)){const a={};for(let c=0;c<n.length;c++)a[n[c]]=i[c];this.ops.forEach((c,l)=>{a[this.as[l]]=c(s)}),this._propagate(a)}}else{const r={};this.ops.forEach((o,i)=>{r[this.as[i]]=o(this.buffer)}),this._propagate(r)}super.complete()}}const XD={aggregate:ZD,collect:Vb,coverage:TD,filterScoredLabels:_D,filter:kD,flatten:MD,flattenCompressedExons:ND,flattenDelimited:OD,flattenSequence:YD,formula:UD,identifier:sh,linearizeGenomicCoordinate:qb,measureText:GD,pileup:VD,project:qD,regexExtract:jD,regexFold:WD,sample:db,stack:QD};function KD(t,e){const n=XD[t.type];if(n)return new n(t,e);throw new Error("Unknown transform: "+t.type)}function Qb(t){if(!Xb(t)&&!Zb(t))return;const e={...t.format};if(e.type??(e.type=Zb(t)&&$D(Kt(t.url))),e.parse??(e.parse="auto"),!e.type)throw new Error("Format for the data source was not defined and it could not be inferred: "+JSON.stringify(t));return e}function JD(t){var e;return((e=Mu(t))==null?void 0:e.responseType)??"text"}function $D(t){var e;if(Array.isArray(t)&&(t=t[0]),t)return(e=t.match(/\.(csv|tsv|json)/))==null?void 0:e[1]}const Yb=t=>typeof t!="object"?eB:tB,eB=t=>({data:t}),tB=t=>t;function Zb(t){return"url"in t}class ao extends oh{constructor(n){super();Ut(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 Xb(t){return"values"in t}class nB extends ao{constructor(e,n){var r;if(super(n),this.params=e,typeof e.values=="string"&&!((r=e==null?void 0:e.format)!=null&&r.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}get label(){return"inlineSource"}isTrivial(){const e=this.params.values,n=Array.isArray(e)?e[0]:e;return!!(n&&Object.keys(n).length==0&&n.constructor===Object)}loadSynchronously(){const e=this.params.values;let n=[],r=o=>o;if(Array.isArray(e))e.length>0&&(n=e,r=Yb(e[0]));else if(typeof e=="object")n=[e];else if(typeof e=="string")n=Fp(e,Qb(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 o of n)this._propagate(r(o));this.complete()}async load(){this.loadSynchronously()}}function rB(t){return"url"in t}class iB extends ao{constructor(e,n){super(n),this.params=sl(n.paramMediator,e,()=>this.load()),this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}get label(){return"urlSource"}async load(){const e=Kt(this.params.url),n=Array.isArray(e)?e:[e],r=Qb(this.params),o=JD(r.type);if(n.length===0||!n[0]){this.reset(),this.complete();return}const i=async a=>{try{const c=ta(this.baseUrl,a),l=await fetch(c);if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return typeof l[o]=="function"?l[o]():l.text()}catch(c){throw new Error(`Could not load data: ${a}. Reason: ${c.message}`)}},s=(a,c)=>{try{const l=Fp(a,r);this.beginBatch({type:"file",url:c});for(const u of l)this._propagate(u)}catch(l){throw new Error(`Cannot parse: ${c}: ${l.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(n.map(a=>i(a).then(s))),this.setLoadingStatus("complete")}catch(a){this.setLoadingStatus("error",a.message)}this.complete()}}function oB(t){return"sequence"in t}class sB extends ao{constructor(e,n){if(super(n),this.sequence=sl(n.paramMediator,e.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!")}get label(){return"sequenceSource"}loadSynchronously(){const e=Kt(this.sequence.as)??"data",n=Kt(this.sequence.start)??0,r=Kt(this.sequence.step)??1,o=Kt(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let i=n;i<o;i+=r)this._propagate({[e]:i});this.complete()}async load(){this.loadSynchronously()}}class Bh extends ao{constructor(n,r){super(n);Ut(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 i=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof $t||i.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(i.join(" "))}const o=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",o),this.view.context.addBroadcastListener("layoutComputed",o)}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 o of r)this._propagate(o);this.complete(),Sh(this.view)}}class aB extends Bh{constructor(n,r){const o={...n};super(r,o.channel);Ut(this,"ticks",[]);this.params=n}get label(){return"axisTickSource"}async load(){this.ticks=null,this.onDomainChanged()}onDomainChanged(){const n=this.scaleResolution.scale,r=this.scaleResolution.getAxisLength(),o=this.params.axis,i=l=>25+60*D1(100,700,l),s=Gt(o.tickCount)?o.tickCount:Math.round(r/i(r)),a=gb(n,s,o.tickMinStep),c=o.values?mb(n,o.values,a):FT(n,a);if(this.ticks==null||!gc(c,this.ticks)){this.ticks=c;const l=PT(n,s,o.format);this.publishData([c.map(u=>({value:u,label:l(u)}))])}}}class cB extends Bh{constructor(e,n){super(n,e.channel)}get label(){return"axisGenomeSource"}async load(){this.publishData([this.genome.chromosomes])}}function bl(t,e,n=!0){let r,o=s=>{};return function(...a){return new Promise((c,l)=>{const u=()=>{clearTimeout(r),o=f=>{},c(t(...a))};n&&o("debounced"),clearTimeout(r),o=l,r=window.setTimeout(u,typeof e=="function"?e():e)})}}class sa extends Bh{constructor(){super(...arguments);ve(this,Ro,new AbortController);ve(this,Fo,[0,0]);ve(this,Mo,[0,0]);ve(this,Ra,0);Ut(this,"params")}setupDebouncing(n){const r=()=>Kt(n.debounce),o=n.debounceMode;if(o=="domain")this.onDomainChanged=bl(this.onDomainChanged.bind(this),r,!1);else if(o=="window")this.loadInterval=bl(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+o)}onDomainChanged(n){var o;Pe(this,Mo,n);const r=Kt((o=this.params)==null?void 0:o.windowSize)??-1;n[1]-n[0]>r||this.callIfWindowsChanged(n,r,async i=>{await this.initializedPromise,this.loadInterval(i)})}reloadLastDomain(){const n=X(this,Mo);Pe(this,Mo,[0,0]),Pe(this,Fo,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){X(this,Ro).abort(),this.setLoadingStatus("loading"),Pe(this,Ro,new AbortController);const o=X(this,Ro).signal,i=this.genome.continuousToDiscreteChromosomeIntervals(n);try{const s=await Promise.all(i.map(async a=>r(a,o)));if(!o.aborted)return this.setLoadingStatus("complete"),s}catch(s){if(!o.aborted)throw this.setLoadingStatus("error",s.message),s}}callIfWindowsChanged(n,r,o){const i=[Math.max(Math.floor(n[0]/r)*r,0),Math.min(Math.ceil(n[1]/r)*r,this.genome.totalSize)],s=X(this,Fo);(r!==X(this,Ra)||i[0]<s[0]||i[1]>s[1])&&(Pe(this,Fo,i),Pe(this,Ra,r),o(i))}}Ro=new WeakMap,Fo=new WeakMap,Mo=new WeakMap,Ra=new WeakMap;class lB extends sa{constructor(e,n){const r={channel:"x",windowSize:7e3,debounce:200,debounceMode:"window",...e};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(o=>{Promise.all([Promise.resolve().then(()=>Y_),Promise.resolve().then(()=>pk),Promise.resolve().then(()=>fa)]).then(([{Buffer:i},{IndexedFasta:s},{RemoteFile:a}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=i));const c=l=>new a(ia(l,this.view.getBaseUrl()));this.fasta=new s({fasta:c(this.params.url),fai:c(this.params.indexUrl??this.params.url+".fai")}),o()})})}get label(){return"bigWigSource"}async loadInterval(e){const n=await this.discretizeAndLoad(e,async(r,o)=>this.fasta.getSequence(r.chrom,r.startPos,r.endPos,{signal:o}).then(i=>({chrom:r.chrom,start:r.startPos,sequence:i})));n&&this.publishData([n])}}class uB extends sa{constructor(n,r){const o={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},i=sl(r.paramMediator,o,s=>{s.includes("url")?he(this,Fa,d0).call(this).then(()=>this.reloadLastDomain()):s.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,i.channel);ve(this,Fa);ve(this,Po,[]);ve(this,Lo);if(this.params=i,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),he(this,Fa,d0).call(this)}get label(){return"bigWigSource"}async onDomainChanged(n){await this.initializedPromise;const r=this.scaleResolution.getAxisLength()||700,o=fB(n,r,X(this,Po)),i=Math.max(o*r,5e3);this.callIfWindowsChanged(n,i,s=>this.loadInterval(s,o))}async loadInterval(n,r){const o=.5/r/Kt(this.params.pixelsPerBin),i=await this.discretizeAndLoad(n,(s,a)=>X(this,Lo).getFeatures(s.chrom,s.startPos,s.endPos,{scale:o,signal:a}).then(c=>c.map(l=>({chrom:s.chrom,start:l.start,end:l.end,score:l.score}))));i&&this.publishData(i)}}Po=new WeakMap,Lo=new WeakMap,Fa=new WeakSet,d0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>Dw),Promise.resolve().then(()=>fa)]).then(([{BigWig:o},{RemoteFile:i}])=>{Pe(this,Lo,new o({filehandle:new i(ia(Kt(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),X(this,Lo).getHeader().then(s=>{Pe(this,Po,s.zoomLevels.map(a=>a.reductionLevel).reverse()),X(this,Po).push(1),this.setLoadingStatus("complete"),n()}).catch(s=>{this.load(),this.setLoadingStatus("error",`${Kt(this.params.url)}: ${s.message}`),r(s)})})}),this.initializedPromise};function fB(t,e,n){const r=(t[1]-t[0])/e;return n.find(o=>o<r)??n.at(-1)}class hB extends sa{constructor(n,r){const o={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},i=sl(r.paramMediator,o,s=>{s.includes("url")?he(this,Ma,p0).call(this).then(()=>this.reloadLastDomain()):s.includes("windowSize")&&this.reloadLastDomain()});super(r,i.channel);ve(this,Ma);Ut(this,"parser");Ut(this,"bbi");Ut(this,"parseLine");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),he(this,Ma,p0).call(this)}get label(){return"bigBedSource"}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(o,i)=>this.bbi.getFeatures(o.chrom,o.startPos,o.endPos,{signal:i}).then(s=>s.map(a=>this.parseLine(o.chrom,a))));r&&this.publishData(r)}}Ma=new WeakSet,p0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>DF),Promise.resolve().then(()=>Dw),Promise.resolve().then(()=>fa)]).then(([o,{BigBed:i},{RemoteFile:s}])=>{const a=o.default;this.bbi=new i({filehandle:new s(ia(Kt(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async c=>{this.parser=new a({autoSql:c.autoSql});try{const l=dB(this.parser);this.parseLine=(u,f)=>l(u,f.start,f.end,f.rest)}catch{this.parseLine=(u,f)=>this.parser.parseLine(`${u} ${f.start} ${f.end} ${f.rest}`)}this.setLoadingStatus("complete"),n()}).catch(c=>{this.load(),this.setLoadingStatus("error",`${Kt(this.params.url)}: ${c.message}`),r(c)})})}),this.initializedPromise};function dB(t){const e=t.autoSql.fields.filter(A=>A.type).slice(3);let n=0,r="",o=0,i={};const s=" ",a=s.charCodeAt(0),c=48,l=45;function u(){let A=r.indexOf(s,n);A<0&&(A=o);const C=r.substring(n,A);return n=A+1,C}function f(){let A=0,C=r.charCodeAt(n),E=1;C===l&&(E=-1,n++,C=r.charCodeAt(n));do{if(C===a){n++;break}A=A*10+C-c,C=r.charCodeAt(++n)}while(n<o);return A*E}const h=e.map(A=>`${JSON.stringify(A.name)}: ${A.isNumeric?"0":"emptyString"}`),d=new Function(`
|
|
519
519
|
const emptyString = "";
|
|
520
520
|
return function makeTemplate(chrom, chromStart, chromEnd) {
|
|
521
521
|
return {
|
|
@@ -525,109 +525,109 @@ chrM 16299`};function YD(e){if(!(e in z2))throw new Error(`Unknown assembly: ${e
|
|
|
525
525
|
${h.join(`,
|
|
526
526
|
`)}
|
|
527
527
|
}
|
|
528
|
-
};`)(),p=
|
|
528
|
+
};`)(),p=e.map(A=>{const C=A.type,E=JSON.stringify(A.name);if(["ubyte","int","uint"].includes(C))return`d[${E}] = parseInt();`;if(A.isNumeric)return`d[${E}] = Number(parseString());`;if(["char","string","lstring"].includes(C))return`d[${E}] = parseString();`;throw new Error("Unsupported type: "+C)}),y=pB(p,50).map((A,C)=>Function("parseInt","parseString",`return function parseFieldChunk${C}(d) {
|
|
529
529
|
${A.join(`
|
|
530
530
|
`)}
|
|
531
|
-
}`)(f,u));function v(A){r=A,
|
|
532
|
-
`),{parseSequences:!1})}}
|
|
533
|
-
`)+" };");return n.properties=t,n}function py(e){let t=[];do t=t.concat(Object.keys(e)),e=Object.getPrototypeOf(e);while(e&&e!==Object.prototype);return Array.from(new Set(t))}class su extends vt{constructor(){super({type:"clone"});ve(this,ga);ve(this,Ic,n=>n);const n=r=>{const i=py(r);(!X(this,ga)||!al(i,X(this,ga)))&&(Pe(this,ga,i),Pe(this,Ic,EB(r)));const o=X(this,Ic);this.handle=a=>this._propagate(o(a)),this.handle(r)};this.handle=n,this.beginBatch=r=>{qb(r)&&(this.handle=n),super.beginBatch(r)}}get behavior(){return Zn}}ga=new WeakMap,Ic=new WeakMap;function SB(e){return"name"in e}class gy extends Ro{constructor(n,r,i){super(r);ve(this,Dc);this.provider=i,this.params=n}get identifier(){return this.params.name}get label(){return"namedSource"}updateDynamicData(n){Pe(this,Dc,n),this.loadSynchronously()}loadSynchronously(){const n=X(this,Dc)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(n))n.length>0&&(r=uy(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()}}Dc=new WeakMap;class my{constructor(){this._dataSourcesByHost=new Map,this._collectorsByHost=new Map,this._observers=new Map}get dataSources(){return[...new Set(this._dataSourcesByHost.values()).values()]}get collectors(){return[...this._collectorsByHost.values()]}addObserver(t,n){let r=this._observers.get(n);r||(r=[],this._observers.set(n,r)),r.push(t)}_relayObserverCallback(t,n){const r=this._observers.get(n);if(r)for(const i of r)i(t)}addDataSource(t,n){this._dataSourcesByHost.set(n,t)}findDataSourceByKey(t){return this._dataSourcesByHost.get(t)}findNamedDataSource(t){let n,r=[];for(const[i,o]of this._dataSourcesByHost.entries())if(o instanceof gy&&t==o.identifier){if(n&&n!==o)throw new Error(`Found multiple instances of named data: ${t}. Data flow optimization is broken (it's a bug).`);n=o,r.push(i)}if(n)return{dataSource:n,hosts:r}}addCollector(t,n){this._collectorsByHost.set(n,t),t.observers.push(r=>this._relayObserverCallback(r,n))}findCollectorByKey(t){return this._collectorsByHost.get(t)}initialize(){for(const t of this.dataSources)t.visit(n=>n.initialize())}}function _B(e,t){const n=new Map,r=[];for(const i of e)n.set(i,{ref:i,children:[]});for(const i of n.values()){const o=n.get(t(i.ref));o?o.children.push(i):r.push(i)}return r}function by(e,t,n){var i,o;const r=(i=t.preOrder)==null?void 0:i.call(t,e);if(r)return r;for(const a of n(e)){const s=by(a,t,n);if(s==="stop")return s}return(o=t.postOrder)==null?void 0:o.call(t,e)}function CB(e,t){return by(e,t,n=>n.children)}function TB(e,t){const n=[],r=[];let i;const o=t??new my,a=[];function s(d,p=()=>{}){if(!i)throw p()||new Error("Cannot append data flow node, no parent exist!");return i.addChild(d),i=d,n.push(d),d}function c(d,p){return s(d,()=>new Error("Cannot append a transform because no (inherited) data are available! "))}function l(d,p){for(const b of d){let v;try{v=jk(b,p)}catch(y){throw console.warn(y),new Error(`Cannot initialize "${b.type}" transform: ${y}`)}v.behavior&Vr&&c(new su),c(v)}}function u(){return n.findLastIndex(d=>d instanceof id)>n.findLastIndex(d=>d instanceof Ro)}const f=d=>{if(d.spec.data){const p=SB(d.spec.data)?new gy(d.spec.data,d,d.context.getNamedDataFromProvider):hB(d.spec.data,d);i=p,n.push(p),o.addDataSource(p,d)}if(d.spec.transform&&l(d.spec.transform,d),d instanceof an){if(!i)throw new Error(`A unit view (${d.getPathString()}) has no (inherited) data source`);const p=IB(d);if(p){a.push(p.rewrite);for(const v of p.transforms)c(v)}d.mark.isPickingParticipant()&&!u()&&(c(new su),c(new id({type:"identifier"})));const b=new oy({type:"collect",groupby:d.getFacetFields(),sort:DB(d,p==null?void 0:p.rewrittenEncoding)});s(b),o.addCollector(b,d)}},h=_B(e.getDescendants(),d=>d.dataParent);for(const d of h)CB(d,{preOrder:p=>{r.push({view:p.ref,nodeStackDepth:n.length}),f(p.ref)},postOrder:()=>{const{nodeStackDepth:p}=r.pop();n.length=p,i=n.at(-1)}});return a.forEach(d=>d()),o}function IB(e){var o;const t=[],n={},r=[];for(const[a,s]of Object.entries(e.getEncoding())){const c=a;Ss(c)&&t2(s)&&r.push({channel:c,chromPosDef:s})}const i=jc(r,a=>Mi(a.channel),a=>a.chromPosDef.chrom);for(const[a,s]of i.entries())for(const[c,l]of s.entries()){const u=[],f=[],h=[];for(const{channel:d,chromPosDef:p}of l){const b=A=>A.replace(/[^A-Za-z0-9_]/g,""),v=["_linearized_",b(p.chrom),"_",b(p.pos)].join(""),y={...((o=e.spec.encoding)==null?void 0:o[d])??e.getEncoding()[d]??{},field:v};delete y.chrom,delete y.pos,!y.type&&p.type&&(y.type=p.type),n[d]=y,u.push(p.pos),h.push(p.offset??0),f.push(v)}t.push(new su),t.push(new ay({type:"linearizeGenomicCoordinate",channel:a,chrom:c,pos:u,offset:h,as:f},e))}return t.length?{transforms:t,rewrittenEncoding:n,rewrite:()=>{e.spec.encoding={...e.spec.encoding,...n},VI(e.mark,"encoding")}}:void 0}function DB(e,t){var r;const n={...e.getEncoding(),...t}.x;if(on(n)&&(r=e.getScaleResolution("x"))!=null&&r.isZoomable()){if(qr(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!As(n)){if(Es(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function yy(e,t=void 0){if(e.parent!==t)return!1;for(const n of e.children)if(!yy(n,e))return!1;return!0}function Id(e,t=!1){if(e.behavior&nd&&(t=!0),e instanceof su)if(t)t=!1;else{const n=e.children[0];e.excise(),n&&Id(n,t);return}e.behavior&Zn&&(t=!1);for(let n=0,r=e.children.length;n<r;n++)Id(e.children[n],t||r>1)}function kB(e){const t=[...e._dataSourcesByHost.entries()],n=new Map;for(const r of t){const i=r[1];i.identifier&&!n.has(i.identifier)&&n.set(i.identifier,i)}e._dataSourcesByHost.clear();for(let[r,i]of t){const o=n.get(i.identifier);o&&(o.adoptChildrenOf(i),i=o),e.addDataSource(i,r)}}function BB(e){if(Id(e),!yy(e))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function RB(e){kB(e);for(const t of e.dataSources)BB(t)}function FB(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 MB(e){for(const t of Do){const n=e.getScaleResolution(t);n&&!n.name&&n.isZoomable()&&(n.name=`${t}_at_root`)}}async function PB(e,t,n){const r=e.import;if(!("url"in r))throw new Error("Not an url import: "+JSON.stringify(r));const i=Rs(t,r.url);let o;try{const a=await fetch(i);if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);o=await a.json()}catch(a){throw new Error(`Could not load imported view spec: ${i}. Reason: ${a.message}`)}if(n.isViewSpec(o))return o.baseUrl=Rs(U2(r.url),o.baseUrl),o;throw new Error(`The imported spec "${i}" is not a view spec: ${JSON.stringify(e)}`)}function LB(e){const t=e.getSize(),n=e.getPadding(),r=(i,o)=>i.grow>0?void 0:i.px+o;return{width:r(t.width,n.horizontalTotal),height:r(t.height,n.verticalTotal)}}function ur(e){return()=>e}const Pn=class Pn{static create(t,n,r,i){return new Pn(ur(t),ur(n),ur(r),ur(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"?ur(i):typeof i=="function"?i:this._passThrough(r)};return new Pn(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new Pn(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 Pn(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 Pn(()=>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 Pn(()=>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 Pn(ur(this.x),ur(this.y),ur(this.width),ur(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)}`}};qt(Pn,"ZERO",Pn.create(0,0,0,0));let fr=Pn;class wy{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class xy extends wy{constructor(t,n){super(t),this.webGLHelper=n,this.buffer=[],this.coords=void 0,this.views=new Set}pushView(t,n){this.views.add(t),this.coords=n}renderMark(t,n){if(this.globalOptions.picking&&!t.isPickingParticipant())return;const r=t.render(n);r&&this.buffer.push({mark:t,callback:r,coords:this.coords,clipRect:n.clipRect})}render(){if(this.batch||this._buildBatch(),this.batch.length==0)return;const t=this.webGLHelper.gl,n=this.globalOptions.picking;t.bindFramebuffer(t.FRAMEBUFFER,n?this.webGLHelper._pickingBufferInfo.framebuffer:null),this.webGLHelper.clearAll();for(const r of this.views)r.onBeforeRender();for(const r of this.batch)r();n&&t.bindFramebuffer(t.FRAMEBUFFER,null)}_buildBatch(){this.batch=[];let t=!0,n=!0;const r=a=>()=>{t&&a()},i=a=>()=>{t&&n&&a()},o=jc(this.buffer.reverse(),a=>a.mark);for(const[a,s]of[...o.entries()].reverse()){if(!a.isReady())continue;this.batch.push(()=>{t=a.unitView.getEffectiveOpacity()>0}),this.batch.push(...a.prepareRender(this.globalOptions).map(l=>r(l)));let c;for(const l of s){const u=l.coords;u.equals(c)||this.batch.push(r(()=>{n=a.setViewport(u,l.clipRect)})),this.batch.push(i(l.callback)),c=l.coords}}}}class NB extends wy{constructor(...t){super({}),this.contexts=t}pushView(t,n){for(const r of this.contexts)r.pushView(t,n)}popView(t){for(const n of this.contexts)n.popView(t)}renderMark(t,n){for(const r of this.contexts)r.renderMark(t,n)}}class OB{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 Yn{static fromMouseEvent(t){return new Yn(t.clientX,t.clientY)}constructor(t,n){this.x=t,this.y=n}subtract(t){return new Yn(this.x-t.x,this.y-t.y)}add(t){return new Yn(this.x-t.x,this.y-t.y)}multiply(t){return new Yn(this.x*t,this.y*t)}get length(){return Math.sqrt(this.x**2+this.y**2)}equals(t){return t?t===this||t.x===this.x&&t.y===this.y:!1}}const zB=e=>new Promise(t=>setTimeout(t,e));function UB(e){const t=e.requestAnimationFrame||window.requestAnimationFrame,n=e.signal,r=()=>new Promise((i,o)=>{if(n!=null&&n.aborted)return o("aborted");const a=performance.now(),s=a+(e.duration||1e3),c=typeof e.from=="number"?e.from:0,l=typeof e.to=="number"?e.to:1,u=e.easingFunction||(b=>b),f=b=>(b-a)/(s-a),h=b=>b*(l-c)+c,d=b=>Math.max(0,Math.min(1,b)),p=b=>{n!=null&&n.aborted?o("aborted"):(e.onUpdate(h(u(d(f(b))))),b<s?t(p):(e.onUpdate(h(u(1))),i()))};t(p)});return e.delay?n!=null&&n.aborted?Promise.reject("aborted"):zB(e.delay).then(r):r()}class GB{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 UB({requestAnimationFrame:n=>this.requestTransition(n),...t})}}function Dd(e,t,n,r,i){let o=0,a=!0,s=structuredClone(i),c=s;function l(h,d,p,b){return d+(h-d)*Math.pow(2,-p/b)}function u(h){if(a)return;const d=h-o;o=h;for(const b of Object.keys(c))s[b]=l(s[b],c[b],d,n);t(s);let p=-1/0;for(const b of Object.keys(c))p=Math.max(p,Math.abs(c[b]-s[b]));p<r?(s=c,t(s),a=!0,p!=0&&e.requestRender()):e.requestTransition(b=>u(b))}function f(h){c=h,a&&(a=!1,o=+document.timeline.currentTime,u(o))}return f.stop=()=>{a=!0},f}class HB{constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new XD(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 VB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133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LllxOBQAKYnOTmTS5cgPx8mpupq8Pn4xHj9bq5IHn9QDicmguqryczSuAfIdtAGuG/IDMYDFsEIwCz44noaOLPv5GYgOlpgkGorKSzjWPHlHbZLAGwH9a0RBpgWehBNNoPebK+pAbU1LAeDAaDwZDLKzBEYiiRCCTiTZU3pjsRh4upqmL/fo4epaODR4vFMs88Q1kZgQCxGLZ9DXIdGbhDZy579mAwGAyGrMnloxAhPhSPBw4n7lYjV2tZFBWhCKC+Xsv/x5xuLy1FtsxlRwAgF05BBevBYDAYTAqojETZc4m25xLRKDMzSAC2b6ekhCeS88sCoOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",qB={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class jB{constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new tr([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:pd(sy),texture:t?this._createTextureNow(VB):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(it(r)&&(r=qB[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const i={family:t,style:n,weight:r};let o=this._fonts.get(i);return o||(o={metrics:void 0,texture:void 0},this._fonts.set(i,o),this._promises.push(this._loadFontEntry(o,i))),o}async _loadFontEntry(t,n){try{const r=await this._loadMetadata(n.family),i=ZB(r,n),o=this.fontRepository+vy(n.family)+"/"+i.replace(/\.\w+/,""),a=this._createTexture(o+".png"),s=this._loadFont(o+".json");t.texture=await a,t.metrics=await s}catch{console.warn(`Cannot load font: "${n.family}". Using the embedded default font.`),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=>pd(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=vy(t);let r=this._metadataPromises.get(n);if(!r){const i=this.fontRepository+n+"/METADATA.pb";r=fetch(i).then(o=>{if(!o.ok)throw new Error("Could not load font metadata. Response status: "+o.status+", url: "+i);return o}).then(o=>o.text()).then(o=>WB(o)).catch(o=>{console.warn(o.message)}),this._metadataPromises.set(n,r)}return r}getDefaultFont(){return this._defaultFontEntry}_createTexture(t){const n=this._webGLHelper.gl;return new Promise((r,i)=>{rs(n,{src:t,min:n.LINEAR},(o,a,s)=>{o?i(o):r(a)})})}_createTextureNow(t){const n=this._webGLHelper.gl;let r;const i=new Promise((o,a)=>{r=rs(n,{src:t,min:n.LINEAR},(s,c,l)=>{s?a(s):o(c)})});return this._promises.push(i),r}}function vy(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function WB(e){const t=e.split(`
|
|
534
|
-
`),n=[];let r;for(const
|
|
535
|
-
`))if(
|
|
531
|
+
}`)(f,u));function v(A){r=A,o=A.length,n=0}function b(A,C,E,I){v(I),i=d(A,C,E);for(const R of y)R(i);return i}return b}function pB(t,e){return Array.from({length:Math.ceil(t.length/e)},(n,r)=>t.slice(r*e,r*e+e))}class gB extends sa{constructor(n,r){const o={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,o.channel);ve(this,Ti);Ut(this,"chrPrefixFixer",n=>n);if(this.params=o,!this.params.url)throw new Error("No URL provided for BamSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>QF),Promise.resolve().then(()=>fa)]).then(([{BamFile:s},{RemoteFile:a}])=>{const c=l=>new a(ia(l,this.view.getBaseUrl()));Pe(this,Ti,new s({bamFilehandle:c(this.params.url),baiFilehandle:c(this.params.indexUrl??this.params.url+".bai")})),X(this,Ti).getHeader().then(l=>{var h,d;const u=this.genome.hasChrPrefix(),f=(d=(h=X(this,Ti).indexToChr)==null?void 0:h[0])==null?void 0:d.refName.startsWith("chr");u&&!f?this.chrPrefixFixer=p=>p.replace("chr",""):!u&&f&&(this.chrPrefixFixer=p=>"chr"+p),i()})})})}get label(){return"bamSource"}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(o,i)=>X(this,Ti).getRecordsForRange(this.chrPrefixFixer(o.chrom),o.startPos,o.endPos,{signal:i}).then(s=>s.map(a=>({chrom:o.chrom,start:a.start,end:a.end,name:a.name,cigar:a.CIGAR,mapq:a.mq,strand:a.strand===1?"+":"-"}))));r&&this.publishData(r)}}Ti=new WeakMap;class Kb extends sa{constructor(n,r){const o={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",addChrPrefix:!1,...n};super(r,o.channel);ve(this,No);if(this.params=o,!this.params.url)throw new Error("No URL provided for TabixSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>r9),Promise.resolve().then(()=>fa)]).then(async([{TabixIndexedFile:s},{RemoteFile:a}])=>{const c=u=>new a(ia(u,this.view.getBaseUrl()));Pe(this,No,new s({filehandle:c(this.params.url),tbiFilehandle:c(this.params.indexUrl??this.params.url+".tbi"),renameRefSeqs:this.params.addChrPrefix===!0?u=>"chr"+u:this.params.addChrPrefix?u=>this.params.addChrPrefix+u:void 0}));const l=await X(this,No).getHeader();await this._handleHeader(l),i()})})}async loadInterval(n){await this.initializedPromise;const r=await this.discretizeAndLoad(n,async(o,i)=>{const s=[];return await X(this,No).getLines(o.chrom,o.startPos,o.endPos,{lineCallback:a=>{s.push(a)},signal:i}),this._parseFeatures(s)});r&&this.publishData(r)}async _handleHeader(n){}_parseFeatures(n){return[]}}No=new WeakMap;class mB extends Kb{constructor(){super(...arguments);ve(this,Pa)}get label(){return"gff3Source"}async _handleHeader(n){Pe(this,Pa,(await Promise.resolve().then(()=>A9)).default)}_parseFeatures(n){var o;return(o=X(this,Pa))==null?void 0:o.parseStringSync(n.join(`
|
|
532
|
+
`),{parseSequences:!1})}}Pa=new WeakMap;class bB extends Kb{constructor(){super(...arguments);ve(this,La)}get label(){return"vcfSource"}async _handleHeader(n){const r=(await Promise.resolve().then(()=>C9)).default;Pe(this,La,new r({header:n}))}_parseFeatures(n){return n.map(r=>{const o=X(this,La).parseLine(r);return delete o.GENOTYPES,o.SAMPLES=o.SAMPLES(),o})}}La=new WeakMap;function yB(t,e){if(Xb(t))return new nB(t,e);if(rB(t))return new iB(t,e);if(oB(t))return new sB(t,e);if(wB(t))return DB(t.lazy,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function wB(t){return"lazy"in t}function xB(t){return(t==null?void 0:t.type)=="axisTicks"}function vB(t){return(t==null?void 0:t.type)=="axisGenome"}function AB(t){return(t==null?void 0:t.type)=="indexedFasta"}function EB(t){return(t==null?void 0:t.type)=="bigwig"}function SB(t){return(t==null?void 0:t.type)=="bigbed"}function CB(t){return(t==null?void 0:t.type)=="bam"}function IB(t){return(t==null?void 0:t.type)=="gff3"}function TB(t){return(t==null?void 0:t.type)=="vcf"}function DB(t,e){if(xB(t))return new aB(t,e);if(vB(t))return new cB(t,e);if(AB(t))return new lB(t,e);if(EB(t))return new uB(t,e);if(SB(t))return new hB(t,e);if(CB(t))return new gB(t,e);if(IB(t))return new mB(t,e);if(TB(t))return new bB(t,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function BB(t){const e=Jb(t).filter(r=>typeof r=="string"),n=new Function("source","return { "+e.map(r=>JSON.stringify(r)).map(r=>`${r}: source[${r}]`).join(`,
|
|
533
|
+
`)+" };");return n.properties=e,n}function Jb(t){let e=[];do e=e.concat(Object.keys(t)),t=Object.getPrototypeOf(t);while(t&&t!==Object.prototype);return Array.from(new Set(e))}class yl extends wt{constructor(){super({type:"clone"});ve(this,Oo);ve(this,Na,n=>n);const n=r=>{const o=Jb(r);(!X(this,Oo)||!gc(o,X(this,Oo)))&&(Pe(this,Oo,o),Pe(this,Na,BB(r)));const i=X(this,Na);this.handle=s=>this._propagate(i(s)),this.handle(r)};this.handle=n,this.beginBatch=r=>{B1(r)&&(this.handle=n),super.beginBatch(r)}}get behavior(){return On}}Oo=new WeakMap,Na=new WeakMap;function _B(t){return"name"in t}class $b extends ao{constructor(n,r,o){super(r);ve(this,Oa);this.provider=o,this.params=n}get identifier(){return this.params.name}get label(){return"namedSource"}updateDynamicData(n){Pe(this,Oa,n),this.loadSynchronously()}loadSynchronously(){const n=X(this,Oa)??this.provider(this.params.name)??[];let r=o=>o;if(Array.isArray(n))n.length>0&&(r=Yb(n[0]));else throw new Error(`Named data "${this.params.name}" is not an array!`);this.reset(),this.beginBatch({type:"file"});for(const o of n)this._propagate(r(o));this.complete()}async load(){this.loadSynchronously()}}Oa=new WeakMap;class e2{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(e,n){let r=this._observers.get(n);r||(r=[],this._observers.set(n,r)),r.push(e)}_relayObserverCallback(e,n){const r=this._observers.get(n);if(r)for(const o of r)o(e)}addDataSource(e,n){this._dataSourcesByHost.set(n,e)}findDataSourceByKey(e){return this._dataSourcesByHost.get(e)}findNamedDataSource(e){let n,r=[];for(const[o,i]of this._dataSourcesByHost.entries())if(i instanceof $b&&e==i.identifier){if(n&&n!==i)throw new Error(`Found multiple instances of named data: ${e}. Data flow optimization is broken (it's a bug).`);n=i,r.push(o)}if(n)return{dataSource:n,hosts:r}}addCollector(e,n){this._collectorsByHost.set(n,e),e.observers.push(r=>this._relayObserverCallback(r,n))}findCollectorByKey(e){return this._collectorsByHost.get(e)}initialize(){for(const e of this.dataSources)e.visit(n=>n.initialize())}}function kB(t,e){const n=new Map,r=[];for(const o of t)n.set(o,{ref:o,children:[]});for(const o of n.values()){const i=n.get(e(o.ref));i?i.children.push(o):r.push(o)}return r}function t2(t,e,n){var o,i;const r=(o=e.preOrder)==null?void 0:o.call(e,t);if(r)return r;for(const s of n(t)){const a=t2(s,e,n);if(a==="stop")return a}return(i=e.postOrder)==null?void 0:i.call(e,t)}function RB(t,e){return t2(t,e,n=>n.children)}function FB(t,e){const n=[],r=[];let o;const i=e??new e2,s=[];function a(d,p=()=>{}){if(!o)throw p()||new Error("Cannot append data flow node, no parent exist!");return o.addChild(d),o=d,n.push(d),d}function c(d,p){return a(d,()=>new Error("Cannot append a transform because no (inherited) data are available! "))}function l(d,p){for(const y of d){let v;try{v=KD(y,p)}catch(b){throw console.warn(b),new Error(`Cannot initialize "${y.type}" transform: ${b}`)}v.behavior&Br&&c(new yl),c(v)}}function u(){return n.findLastIndex(d=>d instanceof sh)>n.findLastIndex(d=>d instanceof ao)}const f=d=>{if(d.spec.data){const p=_B(d.spec.data)?new $b(d.spec.data,d,d.context.getNamedDataFromProvider):yB(d.spec.data,d);o=p,n.push(p),i.addDataSource(p,d)}if(d.spec.transform&&l(d.spec.transform,d),d instanceof $t){if(!o)throw new Error(`A unit view (${d.getPathString()}) has no (inherited) data source`);const p=MB(d);if(p){s.push(p.rewrite);for(const v of p.transforms)c(v)}d.mark.isPickingParticipant()&&!u()&&(c(new yl),c(new sh({type:"identifier"})));const y=new Vb({type:"collect",groupby:d.getFacetFields(),sort:PB(d,p==null?void 0:p.rewrittenEncoding)});a(y),i.addCollector(y,d)}},h=kB(t.getDescendants(),d=>d.dataParent);for(const d of h)RB(d,{preOrder:p=>{r.push({view:p.ref,nodeStackDepth:n.length}),f(p.ref)},postOrder:()=>{const{nodeStackDepth:p}=r.pop();n.length=p,o=n.at(-1)}});return s.forEach(d=>d()),i}function MB(t){var i;const e=[],n={},r=[];for(const[s,a]of Object.entries(t.getEncoding())){const c=s;Ws(c)&&U1(a)&&r.push({channel:c,chromPosDef:a})}const o=ec(r,s=>di(s.channel),s=>s.chromPosDef.chrom);for(const[s,a]of o.entries())for(const[c,l]of a.entries()){const u=[],f=[],h=[];for(const{channel:d,chromPosDef:p}of l){const y=A=>A.replace(/[^A-Za-z0-9_]/g,""),v=["_linearized_",y(p.chrom),"_",y(p.pos)].join(""),b={...((i=t.spec.encoding)==null?void 0:i[d])??t.getEncoding()[d]??{},field:v};delete b.chrom,delete b.pos,!b.type&&p.type&&(b.type=p.type),n[d]=b,u.push(p.pos),h.push(p.offset??0),f.push(v)}e.push(new yl),e.push(new qb({type:"linearizeGenomicCoordinate",channel:s,chrom:c,pos:u,offset:h,as:f},t))}return e.length?{transforms:e,rewrittenEncoding:n,rewrite:()=>{t.spec.encoding={...t.spec.encoding,...n},KI(t.mark,"encoding")}}:void 0}function PB(t,e){var r;const n={...t.getEncoding(),...e}.x;if(Jt(n)&&(r=t.getScaleResolution("x"))!=null&&r.isZoomable()){if(_r(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!qs(n)){if(js(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function n2(t,e=void 0){if(t.parent!==e)return!1;for(const n of t.children)if(!n2(n,t))return!1;return!0}function _h(t,e=!1){if(t.behavior&ih&&(e=!0),t instanceof yl)if(e)e=!1;else{const n=t.children[0];t.excise(),n&&_h(n,e);return}t.behavior&On&&(e=!1);for(let n=0,r=t.children.length;n<r;n++)_h(t.children[n],e||r>1)}function LB(t){const e=[...t._dataSourcesByHost.entries()],n=new Map;for(const r of e){const o=r[1];o.identifier&&!n.has(o.identifier)&&n.set(o.identifier,o)}t._dataSourcesByHost.clear();for(let[r,o]of e){const i=n.get(o.identifier);i&&(i.adoptChildrenOf(o),o=i),t.addDataSource(o,r)}}function NB(t){if(_h(t),!n2(t))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function OB(t){LB(t);for(const e of t.dataSources)NB(e)}function zB(t){const e=new Set;t.visit(n=>{for(const r of Object.values(n.resolutions.scale)){const o=r.name;if(o&&e.has(o))throw new Error(`The same scale name "${o}" occurs in multiple scale resolutions!`);e.add(o)}})}function UB(t){for(const e of oo){const n=t.getScaleResolution(e);n&&!n.name&&n.isZoomable()&&(n.name=`${e}_at_root`)}}async function GB(t,e,n){const r=t.import;if(!("url"in r))throw new Error("Not an url import: "+JSON.stringify(r));const o=ta(e,r.url);let i;try{const s=await fetch(o);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);i=await s.json()}catch(s){throw new Error(`Could not load imported view spec: ${o}. Reason: ${s.message}`)}if(n.isViewSpec(i))return i.baseUrl=ta(Sb(r.url),i.baseUrl),i;throw new Error(`The imported spec "${o}" is not a view spec: ${JSON.stringify(t)}`)}function HB(t){const e=t.getSize(),n=t.getPadding(),r=(o,i)=>o.grow>0?void 0:o.px+i;return{width:r(e.width,n.horizontalTotal),height:r(e.height,n.verticalTotal)}}function Jn(t){return()=>t}const Cn=class Cn{static create(e,n,r,o){return new Cn(Jn(e),Jn(n),Jn(r),Jn(o))}_offset(e,n){const r=this["_"+e];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(e){return this._offset(e,0)}constructor(e,n,r,o){this._x=e,this._y=n,this._width=r,this._height=o}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(e){return e?this===e||this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height:!1}modify(e){if(!Object.keys(e).length)return this;const n=r=>{const o=e[r];return typeof o=="number"?Jn(o):typeof o=="function"?o:this._passThrough(r)};return new Cn(n("x"),n("y"),n("width"),n("height"))}translate(e,n){return e===0&&n===0?this:new Cn(this._offset("x",e),this._offset("y",n),this._passThrough("width"),this._passThrough("height"))}translateBy(e){return this.translate(e.x,e.y)}expand(e,n=1){return e.left==0&&e.top==0&&e.right==0&&e.bottom==0?this:new Cn(e.left?this._offset("x",-e.left*n):this._passThrough("x"),e.top?this._offset("y",-e.top*n):this._passThrough("y"),e.width?this._offset("width",e.width*n):this._passThrough("width"),e.height?this._offset("height",e.height*n):this._passThrough("height"))}shrink(e){return this.expand(e,-1)}intersect(e){return this===e||e==null?this:new Cn(()=>Math.max(this.x,e.x),()=>Math.max(this.y,e.y),()=>Math.min(this.x2,e.x2)-Math.max(this.x,e.x),()=>Math.min(this.y2,e.y2)-Math.max(this.y,e.y))}union(e){return this===e||e==null?this:new Cn(()=>Math.min(this.x,e.x),()=>Math.min(this.y,e.y),()=>Math.max(this.x2,e.x2)-Math.min(this.x,e.x),()=>Math.max(this.y2,e.y2)-Math.min(this.y,e.y))}isDefined(){return this.width>=0&&this.height>=0}flatten(){return new Cn(Jn(this.x),Jn(this.y),Jn(this.width),Jn(this.height))}containsPoint(e,n){return e>=this.x&&e<this.x2&&n>=this.y&&n<this.y2}normalizePoint(e,n){return{x:(e-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)}`}};Ut(Cn,"ZERO",Cn.create(0,0,0,0));let $n=Cn;class r2{constructor(e){this.globalOptions=e}pushView(e,n){}popView(e){}renderMark(e,n){}}class i2 extends r2{constructor(e,n){super(e),this.webGLHelper=n,this.buffer=[],this.coords=void 0,this.views=new Set}pushView(e,n){this.views.add(e),this.coords=n}renderMark(e,n){if(this.globalOptions.picking&&!e.isPickingParticipant())return;const r=e.render(n);r&&this.buffer.push({mark:e,callback:r,coords:this.coords,clipRect:n.clipRect})}render(){if(this.batch||this._buildBatch(),this.batch.length==0)return;const e=this.webGLHelper.gl,n=this.globalOptions.picking;e.bindFramebuffer(e.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&&e.bindFramebuffer(e.FRAMEBUFFER,null)}_buildBatch(){this.batch=[];let e=!0,n=!0;const r=s=>()=>{e&&s()},o=s=>()=>{e&&n&&s()},i=ec(this.buffer.reverse(),s=>s.mark);for(const[s,a]of[...i.entries()].reverse()){if(!s.isReady())continue;this.batch.push(()=>{e=s.unitView.getEffectiveOpacity()>0}),this.batch.push(...s.prepareRender(this.globalOptions).map(l=>r(l)));let c;for(const l of a){const u=l.coords;u.equals(c)||this.batch.push(r(()=>{n=s.setViewport(u,l.clipRect)})),this.batch.push(o(l.callback)),c=l.coords}}}}class VB extends r2{constructor(...e){super({}),this.contexts=e}pushView(e,n){for(const r of this.contexts)r.pushView(e,n)}popView(e){for(const n of this.contexts)n.popView(e)}renderMark(e,n){for(const r of this.contexts)r.renderMark(e,n)}}class qB{constructor(e,n){this.point=e,this.uiEvent=n,this.stopped=!1,this.target=void 0}stopPropagation(){this.stopped=!0}get type(){return this.uiEvent.type}}class zn{static fromMouseEvent(e){return new zn(e.clientX,e.clientY)}constructor(e,n){this.x=e,this.y=n}subtract(e){return new zn(this.x-e.x,this.y-e.y)}add(e){return new zn(this.x-e.x,this.y-e.y)}multiply(e){return new zn(this.x*e,this.y*e)}get length(){return Math.sqrt(this.x**2+this.y**2)}equals(e){return e?e===this||e.x===this.x&&e.y===this.y:!1}}const jB=t=>new Promise(e=>setTimeout(e,t));function WB(t){const e=t.requestAnimationFrame||window.requestAnimationFrame,n=t.signal,r=()=>new Promise((o,i)=>{if(n!=null&&n.aborted)return i("aborted");const s=performance.now(),a=s+(t.duration||1e3),c=typeof t.from=="number"?t.from:0,l=typeof t.to=="number"?t.to:1,u=t.easingFunction||(y=>y),f=y=>(y-s)/(a-s),h=y=>y*(l-c)+c,d=y=>Math.max(0,Math.min(1,y)),p=y=>{n!=null&&n.aborted?i("aborted"):(t.onUpdate(h(u(d(f(y))))),y<a?e(p):(t.onUpdate(h(u(1))),o()))};e(p)});return t.delay?n!=null&&n.aborted?Promise.reject("aborted"):jB(t.delay).then(r):r()}class QB{constructor(e){this._renderCallback=e,this._renderRequested=!1,this._warn=!1,this.transitions=[]}requestTransition(e){this.cancelTransition(e),this.transitions.push(e),this.requestRender()}cancelTransition(e){const n=this.transitions.indexOf(e);n>=0&&this.transitions.splice(n,1)}requestRender(){this._renderRequested?this._warn&&console.warn("Render already requested!"):(this._renderRequested=!0,window.requestAnimationFrame(e=>{this._renderRequested=!1;const n=this.transitions;this.transitions=[];let r;for(;r=n.shift();)r(e);this._renderCallback(e)}))}transition(e){return WB({requestAnimationFrame:n=>this.requestTransition(n),...e})}}function kh(t,e,n,r,o){let i=0,s=!0,a=structuredClone(o),c=a;function l(h,d,p,y){return d+(h-d)*Math.pow(2,-p/y)}function u(h){if(s)return;const d=h-i;i=h;for(const y of Object.keys(c))a[y]=l(a[y],c[y],d,n);e(a);let p=-1/0;for(const y of Object.keys(c))p=Math.max(p,Math.abs(c[y]-a[y]));p<r?(a=c,e(a),s=!0,p!=0&&t.requestRender()):t.requestTransition(y=>u(y))}function f(h){c=h,s&&(s=!1,i=+document.timeline.currentTime,u(i))}return f.stop=()=>{s=!0},f}class YB{constructor(e){this.genomes=new Map,this.baseUrl=e}async initialize(e){const n=new iD(e);return this.genomes.set(n.name,n),Promise.all([...this.genomes.values()].map(r=>r.load(this.baseUrl)))}getGenome(e){if(!this.genomes.size)throw new Error("No genomes have been configured!");if(e){const n=this.genomes.get(e);if(!n)throw new Error(`No genome with the name ${e} 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 ZB="data:image/png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U4ODBTa8G23zAMBgMJgK4eTMxNZUAxse5cYNgkEQCnvFSXs7OnZvodNMpK5MG6OUdG+nrkwa49YB9+9gwzJ0/BoPBCMDwcOLllxOBQAKYnOTmTS5cgPx8mpupq8Pn4xHj9bq5IHn9QDicmguqryczSuAfIdtAGuG/IDMYDFsEIwCz44noaOLPv5GYgOlpgkGorKSzjWPHlHbZLAGwH9a0RBpgWehBNNoPebK+pAbU1LAeDAaDwZDLKzBEYiiRCCTiTZU3pjsRh4upqmL/fo4epaODR4vFMs88Q1kZgQCxGLZ9DXIdGbhDZy579mAwGAyGrMnloxAhPhSPBw4n7lYjV2tZFBWhCKC+Xsv/x5xuLy1FtsxlRwAgF05BBevBYDAYTAqojETZc4m25xLRKDMzSAC2b6ekhCeS88sCoOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",XB={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class KB{constructor(e){this._webGLHelper=e,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new Vn([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:mh(jb),texture:e?this._createTextureNow(ZB):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(e,n="normal",r="regular"){if(nt(r)&&(r=XB[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const o={family:e,style:n,weight:r};let i=this._fonts.get(o);return i||(i={metrics:void 0,texture:void 0},this._fonts.set(o,i),this._promises.push(this._loadFontEntry(i,o))),i}async _loadFontEntry(e,n){try{const r=await this._loadMetadata(n.family),o=$B(r,n),i=this.fontRepository+o2(n.family)+"/"+o.replace(/\.\w+/,""),s=this._createTexture(i+".png"),a=this._loadFont(i+".json");e.texture=await s,e.metrics=await a}catch{console.warn(`Cannot load font: "${n.family}". Using the embedded default font.`),e.metrics=this._defaultFontEntry.metrics,e.texture=this._defaultFontEntry.texture}}_loadFont(e){let n=this._fontPromises.get(e);return n||(n=fetch(e).then(r=>{if(!r.ok)throw new Error("Could not load font: "+r.status);return r}).then(r=>r.json()).then(r=>mh(r)),this._fontPromises.set(e,n)),n}_loadMetadata(e){const n=o2(e);let r=this._metadataPromises.get(n);if(!r){const o=this.fontRepository+n+"/METADATA.pb";r=fetch(o).then(i=>{if(!i.ok)throw new Error("Could not load font metadata. Response status: "+i.status+", url: "+o);return i}).then(i=>i.text()).then(i=>JB(i)).catch(i=>{console.warn(i.message)}),this._metadataPromises.set(n,r)}return r}getDefaultFont(){return this._defaultFontEntry}_createTexture(e){const n=this._webGLHelper.gl;return new Promise((r,o)=>{Cs(n,{src:e,min:n.LINEAR},(i,s,a)=>{i?o(i):r(s)})})}_createTextureNow(e){const n=this._webGLHelper.gl;let r;const o=new Promise((i,s)=>{r=Cs(n,{src:e,min:n.LINEAR},(a,c,l)=>{a?s(a):i(c)})});return this._promises.push(o),r}}function o2(t){return t.toLowerCase().replaceAll(/[^\w]/g,"")}function JB(t){const e=t.split(`
|
|
534
|
+
`),n=[];let r;for(const o of e)if(o.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}),o.startsWith("}")&&(n.push(r),r=void 0),r){let i=o.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(i){const s=i[1];r[s]=i[2]}if(i=o.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),i){const s=i[1];r[s]=+i[2]}}return n}function $B(t,e){let n,r=Number.POSITIVE_INFINITY;for(const o of t)if(e.family.localeCompare(o.name,void 0,{sensitivity:"accent"})==0&&e.style==o.style){const i=Math.abs(e.weight-o.weight);i<r&&(r=i,n=o)}return n==null?void 0:n.filename}function e_(t,e){const n=[];let r;for(const o of t.split(`
|
|
535
|
+
`))if(o.startsWith(">"))r={identifier:o.match(/>(\S+)/)[1],sequence:""},n.push(r);else if(r)r.sequence+=o.trim();else throw new Error("Invalid fasta file!");return n}class t_{constructor(e,n){this.animator=e,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=kh(e,r=>{var i;const o=r.x-this.lastValue;this.lastValue=r.x,(i=this.callback)==null||i.call(this,o)},40,.1,{x:0})}cancel(){this.lastValue!==this.targetValue&&(this.targetValue=S0([this.lastValue,this.targetValue],.3),this.smoother({x:this.targetValue}))}setMomentum(e,n){if(this.disabled){n(e);return}this.callback=n;const r=io(this.targetValue+e-this.lastValue,-this.maxDistance,this.maxDistance);this.targetValue=this.lastValue+r,this.smoother({x:this.targetValue})}}function n_(t){const e={},n=["string","number","boolean"],r=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const o in t){const i=o;!r.includes(o)&&n.includes(typeof t[i])&&(e[i]=t[i])}return e}const s2=new Map;async function r_(t,e,n){const r=t.symbol;let o=s2.get(r)??await s_(t.symbol);return o?(s2.set(r,o),ot`
|
|
536
536
|
<div class="title">
|
|
537
|
-
<strong>${
|
|
538
|
-
${
|
|
537
|
+
<strong>${o.name}</strong>
|
|
538
|
+
${o.description}
|
|
539
539
|
</div>
|
|
540
|
-
<p class="summary">${
|
|
540
|
+
<p class="summary">${o.summary}</p>
|
|
541
541
|
<p class="source">Source: NCBI RefSeq Gene</p>
|
|
542
|
-
`):null}async function
|
|
542
|
+
`):null}async function i_(t){console.log("Searching: "+t);const e={mode:"cors"},r=(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&term=${t}[GENE]&sort=relevance&retmode=json`,e).then(o=>o.json())).esearchresult.idlist[0];return r?(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id=${r}&retmode=json`,e).then(s=>s.json())).result[r]:null}const o_=bl(i_,500);function s_(t){return o_(t)}const a_=Ft(".4~r"),c_=Ft(".4~e");function a2(t){return t==null?ot` <span class="na">NA</span> `:nt(t)?t.substring(0,30):Number.isInteger(t)?""+t:Gt(t)?Math.abs(t)>Math.pow(10,8)||Math.abs(t)<Math.pow(10,-8)?c_(t):a_(t):jo(t)?t?"True":"False":Dt(t)?ot`${t.map((e,n)=>[a2(e),n<t.length-1?", ":pt])}`:"?"+typeof t+" "+t}async function l_(t,e,n){const r=(l,u)=>{var f;for(const[h,d]of Object.entries(e.encoders))if((f=d==null?void 0:d.dataAccessor)!=null&&f.fields.includes(l))switch(h){case"color":case"fill":case"stroke":return ot`
|
|
543
543
|
<span
|
|
544
544
|
class="color-legend"
|
|
545
545
|
style=${`background-color: ${d(u)}`}
|
|
546
546
|
></span>
|
|
547
|
-
`}return""},
|
|
547
|
+
`}return""},o=(l,u)=>{const f=l.filter(([h,d])=>!h.startsWith("_"));if(f.length!==0)return f.map(([h,d])=>d!==null&&typeof d=="object"&&!Array.isArray(d)?ot`${o(Object.entries(d),(u||"")+h+".")}`:ot`
|
|
548
548
|
<tr>
|
|
549
549
|
<th>${u}${h}</th>
|
|
550
|
-
<td>${
|
|
550
|
+
<td>${a2(d)} ${r(h,t)}</td>
|
|
551
551
|
</tr>
|
|
552
|
-
`)},o
|
|
552
|
+
`)},i=o(Object.entries(t));if(!i)return;const s=ot`
|
|
553
553
|
<table class="attributes">
|
|
554
|
-
${
|
|
554
|
+
${i}
|
|
555
555
|
</table>
|
|
556
|
-
`,
|
|
556
|
+
`,a=e.unitView.getTitleText(),c=a?ot`
|
|
557
557
|
<div class="title">
|
|
558
|
-
<strong>${
|
|
558
|
+
<strong>${a}</strong>
|
|
559
559
|
</div>
|
|
560
|
-
`:"";return ct`${c}${a}`}class Os extends ty{constructor(t,n,r,i,o,a){super(t,n,r,i,o,a),this.spec=t}async initializeChildren(){}*[Symbol.iterator](){}replaceChild(t,n){throw new Error("Not implemented")}visit(t){let n;try{n=t(this)}catch(r){throw r.view=this,r}if(n===Ls)return n;if(n!==hk){t.beforeChildren&&t.beforeChildren(this);for(const r of this){const i=r.visit(t);if(i===Ls)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 Os)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,Ls}),n}getDefaultResolution(t,n){return"shared"}}class zs extends Os{constructor(n,r,i,o,a,s){super(n,r,i,o,a,{layersChildren:!0,...s});ve(this,yr,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){Pe(this,yr,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!Pd(i)&&!Md(i))throw new Li("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return X(this,yr).slice()}*[Symbol.iterator](){for(const n of X(this,yr))yield n}render(n,r,i={}){if(super.render(n,r,i),!!this.isConfiguredVisible()){n.pushView(this,r);for(const o of X(this,yr))o.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=X(this,yr).length-1;r>=0;r--)if(X(this,yr)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}yr=new WeakMap;class Sy{constructor(t,n){this.n=t,this.maxCols=n??1/0}get nRows(){return this.maxCols==1/0?1:Math.ceil(this.n/this.maxCols)}get nCols(){return Math.min(this.n,this.maxCols)}get rowIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<r;i++){const o=[];t.push(o);for(let a=0;a<n;a++){const s=i*n+a;s<this.n&&o.push(s)}}return t}get colIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<n;i++){const o=[];t.push(o);for(let a=0;a<r;a++){const s=a*n+i;s<this.n&&o.push(s)}}return t}getCellIndex(t,n){let r=0;if(this.maxCols==1/0)r=n==0?t:void 0;else{if(t>=this.maxCols)return;r=n*this.nCols+t}return r<this.n?r:void 0}getCellCoords(t){if(!(t<0||t>=this.n))return[t%this.nCols,Math.floor(t/this.nCols)]}}const iR="chromosome_ticks_and_labels",oR={x:"width",y:"height"};function kd(e){return e=="x"?"y":"x"}const cu={x:["bottom","top"],y:["left","right"]},Bd=Object.fromEntries(Object.entries(cu).map(([e,t])=>t.map(n=>[n,e])).flat(1));function Zr(e){return Bd[e]}class _y extends zs{constructor(t,n,r,i,o,a){const s=n=="locus",c={...s?sR:Cy,...aR(n,t),...t};super(s?cR(c,n):Ty(c,n),r,i,o,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...a}),this.axisProps=c}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return Bd[this.axisProps.orient]=="x"?new Wr(n,t):new Wr(t,n)}getPerpendicularSize(){return Rd(this.axisProps)}isPickingSupported(){return!1}}function Rd(e){const t=Zr(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 Cy={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 aR(e,t){const n=t.orient,r=e=="nominal"||e=="ordinal";let i="center",o="middle",a=t.labelAngle??((n=="top"||n=="bottom")&&r?-90:0);switch(n){case"left":i="right";break;case"right":i="left";break;case"top":case"bottom":Math.abs(a)>30?(i=a>0==(n=="bottom")?"left":"right",o="middle"):o=n=="top"?"alphabetic":"top";break}return{labelAlign:i,labelAngle:a,labelBaseline:o}}function Ty(e,t){const n={...e,extent:Rd(e)},r=Zr(n.orient),i=kd(r),o=n.orient=="bottom"||n.orient=="right"?1:-1,a=n.orient=="bottom"||n.orient=="left"?1:0,s=()=>({name:"domain",data:{values:[{}]},mark:{type:"rule",clip:!1,strokeDash:n.domainDash,strokeCap:n.domainCap,color:n.domainColor,[i]:a,size:n.domainWidth}}),c=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[i+"Offset"]:(n.tickSize+n.labelPadding)*o,[i]:a,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:t},text:{field:"label"}}}),l=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[i]:{value:a},[i+"2"]:{value:a-n.tickSize/n.extent*(a?1:-1)}}}),u=()=>({name:"title",data:{values:[{}]},mark:{type:"text",clip:!1,align:"center",baseline:n.orient=="bottom"?"bottom":"top",angle:[0,90,0,-90][["top","right","bottom","left"].indexOf(n.orient)],text:n.title,color:n.titleColor,[r]:.5,[i]:1-a}}),f=()=>{const d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:t}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(c()),d},h={resolve:{scale:{[r]:"forced"}},[oR[kd(r)]]:n.extent,data:{lazy:{type:"axisTicks",channel:r,axis:e}},layer:[]};return n.domain&&h.layer.push(s()),(n.ticks||n.labels)&&h.layer.push(f()),n.title&&h.layer.push(u()),h}const sR={...Cy,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 cR(e,t){const n={...e,extent:Rd(e)},r=Zr(n.orient),i=kd(r),o=n.orient=="bottom"||n.orient=="left"?1:0,a=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:e.chromTickDash,strokeDashOffset:e.chromTickDashOffset,[i]:o,[i+"2"]:o-n.chromTickSize/n.extent*(o?1:-1),color:e.chromTickColor,size:n.chromTickWidth}}),s=()=>{let u;switch(n.orient){case"top":u={y:0,angle:0,paddingX:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":u={y:1,angle:0,paddingX:4,dy:n.chromLabelPadding+n.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":u={x:1,angle:-90,paddingY:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":u={x:0,angle:90,align:"right",paddingY:4,dy:-n.chromLabelPadding};break;default:u={}}return{name:"chromosome_labels",mark:{type:"text",size:n.chromLabelFontSize,font:n.chromLabelFont,fontWeight:n.chromLabelFontWeight,fontStyle:n.chromLabelFontStyle,color:n.chromLabelColor,align:e.chromLabelAlign,baseline:"alphabetic",clip:!1,...u},encoding:{[r+"2"]:{field:"continuousEnd",type:t},text:{field:"name"}}}};let c;switch(n.orient){case"bottom":case"top":c={};break;case"left":c={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":c={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:c={}}const l=Ty({...e,...c},t);if(e.chromTicks||e.chromLabels){const u={name:iR,data:{lazy:{type:"axisGenome",channel:Zr(n.orient)}},encoding:{[r]:{field:"continuousStart",type:t,band:0}},layer:[]};if(e.chromTicks&&u.layer.push(a()),e.chromLabels){u.layer.push(s());let f;l.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(d=>d.name=="labels").forEach(d=>{f=d.mark})),f&&(n.orient=="top"||n.orient=="bottom"?(f.viewportEdgeFadeWidthLeft=30,f.viewportEdgeFadeDistanceLeft=40):(f.viewportEdgeFadeWidthBottom=30,f.viewportEdgeFadeDistanceBottom=40))}l.layer.push(u)}return l}class lR extends zs{constructor(t,n,r,i,o,a){const c={...n=="locus"?uR:Iy,...t};super(pR(c,n),r,i,o,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...a}),this.axisProps=c}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const Iy={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},uR={...Iy,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function fR(e,t){const n=e,r=Zr(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 hR(e,t){const n=e,r=Zr(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 dR(e,t){const n=e,r=Zr(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 pR(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(dR(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(hR(n,t)),n.grid&&n.gridOpacity>0&&r.push(fR(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Zr(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const Dy={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"},gR={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},mR={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},bR={start:0,middle:.5,end:1},yR={start:"left",middle:"center",end:"right"};function wR(e){if(!e)return;const t=it(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":gR,overlay:mR}[t.style]??{},r={...Dy,...n,...t};let i={},o={x:0,y:0};const a=bR[r.anchor??"middle"];switch(r.orient){case"top":o={x:a,y:1},i={baseline:"alphabetic",angle:0};break;case"right":o={x:1,y:1-a},i={baseline:"alphabetic",angle:90};break;case"bottom":o={x:a,y:0},i={baseline:"top",angle:0};break;case"left":o={x:0,y:a},i={baseline:"alphabetic",angle:-90};break}const s={...Dy,...i,...n,...t},c={xOffset:0,yOffset:0};switch(r.orient){case"top":c.yOffset=-s.offset;break;case"right":c.xOffset=s.offset;break;case"bottom":c.yOffset=s.offset;break;case"left":c.xOffset=-s.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...o,...c,text:s.text,align:s.align??yR[s.anchor],angle:s.angle,baseline:s.baseline,dx:s.dx,dy:s.dy,color:s.color,font:s.font,size:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight}}}class xR{constructor(t){ve(this,$i);ve(this,ri,0);ve(this,ii,0);Pe(this,$i,new Array(t))}push(t){X(this,$i)[X(this,ri)]=t,Pe(this,ri,(X(this,ri)+1)%this.size),Pe(this,ii,Math.min(X(this,ii)+1,this.size))}get(){const t=X(this,$i);return X(this,ii)<this.size?t.slice(0,X(this,ii)):t.slice(X(this,ri),this.size).concat(t.slice(0,X(this,ri)))}get size(){return X(this,$i).length}get length(){return X(this,ii)}}$i=new WeakMap,ri=new WeakMap,ii=new WeakMap;let Ni,ky=0;function By(){return performance.now()-ky<50}function vR(e){return function(...t){ky=performance.now(),e(...t)}}function AR(e,t,n,r,i){if(n=vR(n),e.type=="wheel"){e.uiEvent.preventDefault();const o=e.uiEvent,a=o.deltaMode?120:1;if(!o.deltaX&&!o.deltaY)return;Ni==null||Ni.stop();let{x:s,y:c}=e.point;if(r){const l=r.mark.encoders;l.x&&!l.x2&&!l.x.constant&&(s=+l.x(r.datum)*t.width+t.x),l.y&&!l.y2&&!l.y.constant&&(c=(1-+l.y(r.datum))*t.height+t.y)}Math.abs(o.deltaX)<Math.abs(o.deltaY)?n({x:s,y:c,xDelta:0,yDelta:0,zDelta:o.deltaY*a/300}):n({x:s,y:c,xDelta:-o.deltaX*a,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){Ni&&Ni.stop();const o=new xR(30),a=e.uiEvent;a.preventDefault();let s=Yn.fromMouseEvent(a);const c=f=>{const h=Yn.fromMouseEvent(f);o.push({point:h,timestamp:performance.now()});const d=h.subtract(s);n({x:s.x,y:s.y,xDelta:d.x,yDelta:d.y,zDelta:0}),s=h},l=()=>{const h=performance.now(),d=o.get().filter(_=>h-_.timestamp<160);if(d.length<5||!i||ER(d))return;const p=d.at(-1),b=d[0],v=p.point.subtract(b.point).multiply(1/(p.timestamp-b.timestamp));let y=s.x,A=s.y;Ni=Dd(i,_=>{n({x:_.x,y:_.y,xDelta:y-_.x,yDelta:A-_.y,zDelta:0}),y=_.x,A=_.y},150,.5,{x:y,y:A}),Ni({x:s.x-v.x*250,y:s.y-v.y*250})},u=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),l()};document.addEventListener("mouseup",u,!1),document.addEventListener("mousemove",c,!1)}}function ER(e){const t=e[Math.floor(e.length/2)],n=t.point.subtract(e[0].point).multiply(t.timestamp-e[0].timestamp),r=e.at(-1).point.subtract(t.point).multiply(e.at(-1).timestamp-t.timestamp),i=n.length;return r.length/i<.4}class SR extends Os{constructor(n,r,i,o,a,s,c){super(n,r,i,o,a,c);ve(this,qe);ve(this,ma,1/0);ve(this,ba,10);ve(this,fn,[]);ve(this,eo,{});ve(this,ya,0);this.spec=n,Pe(this,ba,n.spacing??10),Pe(this,ma,s),Pe(this,fn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),X(this,fn).push(new Fy(n,this,X(this,ya))),PA(this,ya)._++}setChildren(n){Pe(this,fn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=X(this,fn).findIndex(o=>o.view==n);if(i>=0)X(this,fn)[i]=new Fy(r,this,X(this,ya));else throw new Error("Not my child view!")}get children(){return X(this,fn).map(n=>n.view)}get childCount(){return X(this,fn).length}async createAxes(){const n=[];for(const r of Do){const i=this.resolutions.axis[r];if(i){const o=i.getAxisProps();if(o){const a={title:i.getTitle(),orient:cu[r][0],...o},s=new _y(a,i.scaleResolution.type,this.context,this,this);n.push(s.initializeChildren()),X(this,eo)[r]=s}}}return Promise.all([...n,...X(this,fn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of X(this,fn))yield*n.getChildren();for(const n of Object.values(X(this,eo)))yield n}getOverhang(){return he(this,qe,jA).call(this).union(he(this,qe,Zu).call(this))}getSize(){return this._cache("size",()=>new Wr(he(this,qe,Pp).call(this,"column"),he(this,qe,Pp).call(this,"row")).addPadding(he(this,qe,Zu).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(he(this,qe,Zu).call(this)),n.pushView(this,r);const o={devicePixelRatio:this.context.devicePixelRatio},a=K2(he(this,qe,Mp).call(this,"column"),r.width,o),s=K2(he(this,qe,Mp).call(this,"row"),r.height,o),c=new Sy(X(this,qe,ro).length,X(this,ma)??1/0),l=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,f]of X(this,qe,ro).entries()){const{view:h,axes:d,gridLines:p,background:b,backgroundStroke:v,title:y}=f,[A,_]=c.getCellCoords(u),E=a[he(this,qe,Lp).call(this,"column",A)],C=s[he(this,qe,Lp).call(this,"row",_)],R=h.getViewportSize(),D=h.getSize(),O=h.getOverhang(),F=E.location-O.left,P=C.location-O.top,S=(Le,j)=>(Le[j].grow?(j=="width"?E:C).size:Le[j].px)+O[j],Z=S(R,"width"),Q=S(R,"height"),se=S(D,"width"),ce=S(D,"height"),fe=f.scrollbars.horizontal,le=f.scrollbars.vertical,Ee=fe?()=>l(fe.viewportOffset):()=>0,pe=le?()=>l(le.viewportOffset):()=>0,_e=new fr(()=>r.x+F,()=>r.y+P,()=>Z,()=>Q),Ce=h.isScrollable(),we=Ce?new fr(()=>r.x+F-Ee(),()=>r.y+P-pe(),()=>se,()=>ce):_e;f.coords=_e;const Te=i.clipRect?_e.intersect(i.clipRect):_e;b==null||b.render(n,Te,{...i,clipRect:void 0});for(const Le of Object.values(p))Le.render(n,_e,i);const Ve=IR(h)||Ce;Ve&&h.render(n,we,{...i,clipRect:Te}),v==null||v.render(n,Te,{...i,clipRect:void 0});for(const[Le,j]of Object.entries(d)){const q=Le=="left"||Le=="right"?"vertical":"horizontal",re=f.scrollbars[q],$=re?_e.modify(q=="vertical"?{y:()=>we.y,height:ce}:{x:()=>we.x,width:se}):_e,ue=Ry($,Le,j);let L=i.clipRect;re&&(L=ue.intersect(L).intersect(re?_e.modify(q=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),j.render(n,ue,{...i,clipRect:L})}for(const Le of Object.values(X(this,eo))){const q=Le.axisProps.orient;(q=="left"&&A==0||q=="right"&&A==c.nCols-1||q=="top"&&_==0||q=="bottom"&&_==c.nRows-1)&&Le.render(n,Ry(_e.shrink(f.view.getOverhang()),q,Le),i)}Ve||h.render(n,we,i);for(const Le of Object.values(f.scrollbars))Le.updateScrollbar(_e,we),Le.render(n,r,i);y==null||y.render(n,_e,i)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=X(this,qe,ro).find(o=>o.coords.containsPoint(n.point.x,n.point.y));for(const o of Object.values((r==null?void 0:r.scrollbars)??{}))if(o.coords.containsPoint(n.point.x,n.point.y)&&(o.propagateInteractionEvent(n),n.stopped))return;const i=r==null?void 0:r.view;i&&(i.propagateInteractionEvent(n),(i instanceof an||i instanceof zs)&&AR(n,r.coords,o=>he(this,qe,WA).call(this,r.coords,r.view,o),this.context.getCurrentHover(),this.context.animator)),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}ma=new WeakMap,ba=new WeakMap,fn=new WeakMap,eo=new WeakMap,ya=new WeakMap,qe=new WeakSet,ro=function(){return X(this,fn).filter(n=>n.view.isConfiguredVisible())},qA=function(){return new Sy(X(this,qe,ro).length,X(this,ma)??1/0)},Mc=function(n){const r=n=="column"?"width":"height",i=(o,a)=>o.map(s=>{const l=X(this,qe,ro)[s].getOverhangAndPadding();return n=="column"?a?l.right:l.left:a?l.bottom:l.top}).reduce((s,c)=>Math.max(s,c),0);return this._cache(`size/directionSizes/${n}`,()=>X(this,qe,qA)[n=="column"?"colIndices":"rowIndices"].map(o=>({axisBefore:i(o,0),axisAfter:i(o,1),view:lk(o.map(a=>X(this,qe,ro)[a].view.getViewportSize()[r]))})))},Mp=function(n){const r=he(this,qe,Mc).call(this,n),i=[];i.push(Ms);for(const[o,a]of r.entries())o>0&&i.push({px:X(this,ba),grow:0}),(o==0||this.wrappingFacet)&&i.push(Ms),i.push({px:a.axisBefore,grow:0}),i.push(a.view),i.push({px:a.axisAfter,grow:0}),(o==r.length-1||this.wrappingFacet)&&i.push(Ms);return i},Pp=function(n){let r=0,i=0;const o=n=="row"?this.spec.height:this.spec.width;if(o||o===0)return $2(o);const a=he(this,qe,Mc).call(this,n);for(const[s,c]of a.entries())s>0&&(i+=X(this,ba)),(s==0||this.wrappingFacet)&&(i+=0),i+=c.axisBefore,i+=c.view.px??0,r+=c.view.grow??0,i+=c.axisAfter,(s==a.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},Lp=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},jA=function(){const n=he(this,qe,Mc).call(this,"column"),r=he(this,qe,Mc).call(this,"row");return!n.length||!r.length?Gt.zero():new Gt(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},Zu=function(){const n=r=>{const i=Bd[r],o=X(this,eo)[i];return(o==null?void 0:o.axisProps.orient)!==r?0:Math.max(o.getPerpendicularSize()+(o.axisProps.offset??0),0)};return new Gt(n("top"),n("right"),n("bottom"),n("left"))},WA=function(n,r,i){for(const[o,a]of Object.entries(TR(r))){if(a.size<=0)continue;const s=n.normalizePoint(i.x,i.y),c=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:c.x-s.x,y:c.y-s.y};for(const u of a)u.zoom(2**i.zDelta,o=="y"?1-s[o]:s[o],o=="x"?l.x:-l.y)}this.context.animator.requestRender()};function _R(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 CR(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",opacity: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 TR(e){const t={x:new Set,y:new Set};return e.visit(n=>{for(const[r,i]of Object.entries(t)){const o=n.getScaleResolution(r);o&&o.isZoomable()&&i.add(o)}}),t}function IR(e){let t=!0;return e.visit(n=>{n instanceof an&&t&&(t=n.mark.properties.clip===!0)}),t}function Ry(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 Fy{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=fr.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,o="view"in i?i==null?void 0:i.view:void 0,a=_R(o);a&&(this.background=new an(a,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const s=CR(o);s&&(this.backgroundStroke=new an(s,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const c=wR(t.spec.title);if(c){const l=new an(c,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=l}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new My(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new My(this,"vertical"))}*getChildren(){this.background&&(yield this.background),this.backgroundStroke&&(yield this.backgroundStroke),this.title&&(yield this.title),yield*Object.values(this.axes),yield*Object.values(this.gridLines),yield this.view,yield*Object.values(this.scrollbars)}async createAxes(){const{view:t,axes:n,gridLines:r}=this,i=(s,c)=>{const l=s.getAxisProps();if(l===null)return;const u=l?{...l}:{};if(!u.orient){for(const f of cu[c])if(!n[f]){u.orient=f;break}if(!u.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(u.title??(u.title=s.getTitle()),!cu[c].includes(u.orient))throw new Error(`Invalid axis orientation "${u.orient}" on channel "${c}"!`);return u},o=async(s,c,l)=>{const u=i(s,c);if(u){if(n[u.orient])throw new Error(`An axis with the orient "${u.orient}" already exists!`);const f=new _y(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[u.orient]=f,await f.initializeChildren()}},a=async(s,c,l)=>{const u=i(s,c);if(u&&(u.grid||u.chromGrid)){const f=new lR(u,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[u.orient]=f,await f.initializeChildren()}};for(const s of["x","y"])if(t.needsAxes[s]){const c=t.resolutions.axis[s];if(!c)continue;await o(c,s,t)}for(const s of["x","y"])if(t.needsAxes[s]&&t.getConfiguredOrDefaultResolution(s,"axis")!="excluded"){const c=t.getAxisResolution(s);if(!c)continue;await a(c,s,t)}if(t instanceof zs){for(const s of t)for(const[c,l]of Object.entries(s.resolutions.axis)){const u=l.getAxisProps();u&&u.orient&&await o(l,c,s)}for(const s of t)for(const[c,l]of Object.entries(s.resolutions.axis)){const u=l.getAxisProps();u&&!u.orient&&await o(l,c,s)}}[...Object.values(n),...Object.values(r)].forEach(s=>s.visit(c=>{c instanceof an&&c.resolve("scale")}))}getOverhang(){const t=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+(r.axisProps.offset??0),0):0};return new Gt(t("top"),t("right"),t("bottom"),t("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}class My extends an{constructor(n,r){const i={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},n.layoutParent.context,n.layoutParent,n.view,"scrollbar-"+r,{blockEncodingInheritance:!0});ve(this,wa);ve(this,kc,fr.ZERO);ve(this,oi,0);ve(this,to,0);qt(this,"viewportOffset",0);this.config=i,Pe(this,wa,r),this.interpolateViewportOffset=Dd(this.context.animator,o=>{this.viewportOffset=o.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(o,a)=>{if(a.stopPropagation(),X(this,oi)<=0)return;const s=d=>r=="vertical"?d.clientY:d.clientX,c=a.uiEvent;c.preventDefault();const l=this.scrollOffset,u=s(c),f=d=>{const p=Io(s(d)-u+l,0,X(this,oi));this.interpolateViewportOffset({x:p/X(this,oi)*X(this,to)})},h=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h)};document.addEventListener("mouseup",h,!1),document.addEventListener("mousemove",f,!1)})}get scrollOffset(){return this.viewportOffset/X(this,to)*X(this,oi)}render(n,r,i){super.render(n,X(this,kc),i)}updateScrollbar(n,r){const i=this.config.scrollbarPadding,o=this.config.scrollbarSize,a=X(this,wa)=="horizontal"?"width":"height",s=Math.min(1,n[a]/r[a]),c=n[a]-2*i,l=s*c;Pe(this,oi,c-l),Pe(this,to,r[a]-n[a]),this.viewportOffset=Io(this.viewportOffset,0,X(this,to)),Pe(this,kc,X(this,wa)=="vertical"?new fr(()=>n.x+n.width-o-i,()=>n.y+i+this.scrollOffset,()=>o,()=>l):new fr(()=>n.x+i+this.scrollOffset,()=>n.y+n.height-o-i,()=>l,()=>o))}}wa=new WeakMap,kc=new WeakMap,oi=new WeakMap,to=new WeakMap;class Fd extends SR{constructor(t,n,r,i,o){super(t,n,r,i,o,Ld(t)?t.columns:lu(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=Ld(t)?t.concat:lu(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":lu(this.spec)&&t==="x"||Ny(this.spec)&&t==="y"?"shared":"independent"}}const Py="viewRoot";class DR{constructor(t={}){ve(this,xa,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,o,a,s,c)=>new r(i,o,a,s,i.name??c);this.addViewType(Pd,n(zs)),this.addViewType(Md,n(an)),this.addViewType(lu,n(Fd)),this.addViewType(Ny,n(Fd)),this.addViewType(Ld,n(Fd)),this.addViewType(RR,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){X(this,xa).set(t,n)}createView(t,n,r,i,o){for(const[a,s]of X(this,xa))if(a(t))return s(t,n,r,i,o);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(t)]))}isViewSpec(t){const n=[...X(this,xa).keys()].filter(r=>r(t));if(n.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return n.length==1}async createOrImportView(t,n,r,i,o,a){let s;if(BR(t)){let l;if("url"in t.import)if(this.options.allowImport)l=await PB(t,i.getBaseUrl(),n);else throw new Li("Importing views is not allowed!",r);else if("template"in t.import)l=Ly(t.import.template,i);else throw new Error("Invalid import: "+JSON.stringify(t));a==null||a(l),kR(l,t),s=l}else s=t;!i&&this.options.wrapRoot&&(Md(s)||Pd(s))&&o===Py&&(s={name:"implicitRoot",vconcat:[s]});const c=this.createView(s,n,r,i,o);return c instanceof Os&&await c.initializeChildren(),c}}xa=new WeakMap;function Ly(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 Ly(e,t.dataParent);throw new Error(`Cannot find template "${e}" in current view or its ancestors!`)}function kR(e,t){t.name!=null&&(e.name=t.name);const n=Bt(t.params)?t.params:Lt(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(o=>o.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 Md(e){return"mark"in e&&(it(e.mark)||Lt(e.mark))}function Pd(e){return"layer"in e&&Lt(e.layer)}function BR(e){return"import"in e}function lu(e){return"vconcat"in e&&Bt(e.vconcat)}function Ny(e){return"hconcat"in e&&Bt(e.hconcat)}function Ld(e){return"concat"in e&&Bt(e.concat)}function RR(e){return"samples"in e&&Lt(e.samples)&&"spec"in e&&Lt(e.spec)}function FR(e){const t=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of e.paramConfigs.values()){if(!eI(r))continue;const i=r.bind;if(!i||!("input"in i))continue;const o=r.name,a=e.getSetter(o),s=e.getValue(o),c=i.name??o,l=i.debounce?au(a,i.debounce,!1):a,u=`${t}-param-${o}`;if(i.input=="range")n.push(ct`<label for=${u}>${c}</label>
|
|
560
|
+
`:"";return ot`${c}${s}`}class aa extends zb{constructor(e,n,r,o,i,s){super(e,n,r,o,i,s),this.spec=e}async initializeChildren(){}*[Symbol.iterator](){}replaceChild(e,n){throw new Error("Not implemented")}visit(e){let n;try{n=e(this)}catch(r){throw r.view=this,r}if(n===oa)return n;if(n!==xD){e.beforeChildren&&e.beforeChildren(this);for(const r of this){const o=r.visit(e);if(o===oa)return o}e.afterChildren&&e.afterChildren(this),e.postOrder&&e.postOrder(this)}}findDescendantByPath(e){for(const n of this)if(n.name===e[0]){if(e.length==1)return n;if(n instanceof aa)return n.findDescendantByPath(e.slice(1))}}findChildByName(e){for(const n of this)if(n.name===e)return n}findDescendantByName(e){let n;return this.visit(r=>{if(r.name==e)return n=r,oa}),n}getDefaultResolution(e,n){return"shared"}}class ca extends aa{constructor(n,r,o,i,s,a){super(n,r,o,i,s,{layersChildren:!0,...a});ve(this,or,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){Pe(this,or,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,o=>{if(!Nh(o)&&!Lh(o))throw new gi("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return X(this,or).slice()}*[Symbol.iterator](){for(const n of X(this,or))yield n}render(n,r,o={}){if(super.render(n,r,o),!!this.isConfiguredVisible()){n.pushView(this,r);for(const i of X(this,or))i.render(n,r,o);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=X(this,or).length-1;r>=0;r--)if(X(this,or)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}or=new WeakMap;class c2{constructor(e,n){this.n=e,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 e=[],n=this.nCols,r=this.nRows;for(let o=0;o<r;o++){const i=[];e.push(i);for(let s=0;s<n;s++){const a=o*n+s;a<this.n&&i.push(a)}}return e}get colIndices(){const e=[],n=this.nCols,r=this.nRows;for(let o=0;o<n;o++){const i=[];e.push(i);for(let s=0;s<r;s++){const a=s*n+o;a<this.n&&i.push(a)}}return e}getCellIndex(e,n){let r=0;if(this.maxCols==1/0)r=n==0?e:void 0;else{if(e>=this.maxCols)return;r=n*this.nCols+e}return r<this.n?r:void 0}getCellCoords(e){if(!(e<0||e>=this.n))return[e%this.nCols,Math.floor(e/this.nCols)]}}const u_="chromosome_ticks_and_labels",f_={x:"width",y:"height"};function Rh(t){return t=="x"?"y":"x"}const wl={x:["bottom","top"],y:["left","right"]},Fh=Object.fromEntries(Object.entries(wl).map(([t,e])=>e.map(n=>[n,t])).flat(1));function Fr(t){return Fh[t]}class l2 extends ca{constructor(e,n,r,o,i,s){const a=n=="locus",c={...a?d_:u2,...h_(n,e),...e};super(a?p_(c,n):f2(c,n),r,o,i,`axis_${e.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...s}),this.axisProps=c}getSize(){const e={px:this.getPerpendicularSize()},n={grow:1};return Fh[this.axisProps.orient]=="x"?new Rr(n,e):new Rr(e,n)}getPerpendicularSize(){return Mh(this.axisProps)}isPickingSupported(){return!1}}function Mh(t){const e=Fr(t.orient);let n=t.ticks&&t.tickSize||0;return t.labels&&(n+=t.labelPadding,e=="x"?n+=t.labelFontSize:n+=30),t.title&&(n+=t.titlePadding+t.titleFontSize),n=Math.min(t.maxExtent||1/0,Math.max(t.minExtent||0,n)),n}const u2={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 h_(t,e){const n=e.orient,r=t=="nominal"||t=="ordinal";let o="center",i="middle",s=e.labelAngle??((n=="top"||n=="bottom")&&r?-90:0);switch(n){case"left":o="right";break;case"right":o="left";break;case"top":case"bottom":Math.abs(s)>30?(o=s>0==(n=="bottom")?"left":"right",i="middle"):i=n=="top"?"alphabetic":"top";break}return{labelAlign:o,labelAngle:s,labelBaseline:i}}function f2(t,e){const n={...t,extent:Mh(t)},r=Fr(n.orient),o=Rh(r),i=n.orient=="bottom"||n.orient=="right"?1:-1,s=n.orient=="bottom"||n.orient=="left"?1:0,a=()=>({name:"domain",data:{values:[{}]},mark:{type:"rule",clip:!1,strokeDash:n.domainDash,strokeCap:n.domainCap,color:n.domainColor,[o]:s,size:n.domainWidth}}),c=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[o+"Offset"]:(n.tickSize+n.labelPadding)*i,[o]:s,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:e},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:{[o]:{value:s},[o+"2"]:{value:s-n.tickSize/n.extent*(s?1:-1)}}}),u=()=>({name:"title",data:{values:[{}]},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,[o]:1-s}}),f=()=>{const d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:e}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(c()),d},h={resolve:{scale:{[r]:"forced"}},[f_[Rh(r)]]:n.extent,data:{lazy:{type:"axisTicks",channel:r,axis:t}},layer:[]};return n.domain&&h.layer.push(a()),(n.ticks||n.labels)&&h.layer.push(f()),n.title&&h.layer.push(u()),h}const d_={...u2,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 p_(t,e){const n={...t,extent:Mh(t)},r=Fr(n.orient),o=Rh(r),i=n.orient=="bottom"||n.orient=="left"?1:0,s=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:t.chromTickDash,strokeDashOffset:t.chromTickDashOffset,[o]:i,[o+"2"]:i-n.chromTickSize/n.extent*(i?1:-1),color:t.chromTickColor,size:n.chromTickWidth}}),a=()=>{let u;switch(n.orient){case"top":u={y:0,angle:0,paddingX:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":u={y:1,angle:0,paddingX:4,dy:n.chromLabelPadding+n.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":u={x:1,angle:-90,paddingY:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":u={x:0,angle:90,align:"right",paddingY:4,dy:-n.chromLabelPadding};break;default:u={}}return{name:"chromosome_labels",mark:{type:"text",size:n.chromLabelFontSize,font:n.chromLabelFont,fontWeight:n.chromLabelFontWeight,fontStyle:n.chromLabelFontStyle,color:n.chromLabelColor,align:t.chromLabelAlign,baseline:"alphabetic",clip:!1,...u},encoding:{[r+"2"]:{field:"continuousEnd",type:e},text:{field:"name"}}}};let c;switch(n.orient){case"bottom":case"top":c={};break;case"left":c={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":c={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:c={}}const l=f2({...t,...c},e);if(t.chromTicks||t.chromLabels){const u={name:u_,data:{lazy:{type:"axisGenome",channel:Fr(n.orient)}},encoding:{[r]:{field:"continuousStart",type:e,band:0}},layer:[]};if(t.chromTicks&&u.layer.push(s()),t.chromLabels){u.layer.push(a());let f;l.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(d=>d.name=="labels").forEach(d=>{f=d.mark})),f&&(n.orient=="top"||n.orient=="bottom"?(f.viewportEdgeFadeWidthLeft=30,f.viewportEdgeFadeDistanceLeft=40):(f.viewportEdgeFadeWidthBottom=30,f.viewportEdgeFadeDistanceBottom=40))}l.layer.push(u)}return l}class g_ extends ca{constructor(e,n,r,o,i,s){const c={...n=="locus"?m_:h2,...e};super(x_(c,n),r,o,i,`axisGrid_${e.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...s}),this.axisProps=c}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const h2={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},m_={...h2,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function b_(t,e){const n=t,r=Fr(n.orient);return{name:"grid_lines",data:{lazy:{type:"axisTicks",channel:r,axis:t}},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:e}}}}function y_(t,e){const n=t,r=Fr(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:e,band:0}}}}function w_(t,e){const n=t,r=Fr(n.orient);return{name:"chromosome_fill",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rect"},encoding:{[r]:{field:"continuousStart",type:e,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 x_(t,e){const n={...t},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(w_(n,e)),n.chromGrid&&n.chromGridOpacity>0&&r.push(y_(n,e)),n.grid&&n.gridOpacity>0&&r.push(b_(n,e)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Fr(t.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const d2={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"},v_={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},A_={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},E_={start:0,middle:.5,end:1},S_={start:"left",middle:"center",end:"right"};function C_(t){if(!t)return;const e=nt(t)?{text:t}:t;if(!e.text||e.orient=="none")return;const n={"track-title":v_,overlay:A_}[e.style]??{},r={...d2,...n,...e};let o={},i={x:0,y:0};const s=E_[r.anchor??"middle"];switch(r.orient){case"top":i={x:s,y:1},o={baseline:"alphabetic",angle:0};break;case"right":i={x:1,y:1-s},o={baseline:"alphabetic",angle:90};break;case"bottom":i={x:s,y:0},o={baseline:"top",angle:0};break;case"left":i={x:0,y:s},o={baseline:"alphabetic",angle:-90};break}const a={...d2,...o,...n,...e},c={xOffset:0,yOffset:0};switch(r.orient){case"top":c.yOffset=-a.offset;break;case"right":c.xOffset=a.offset;break;case"bottom":c.yOffset=a.offset;break;case"left":c.xOffset=-a.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...i,...c,text:a.text,align:a.align??S_[a.anchor],angle:a.angle,baseline:a.baseline,dx:a.dx,dy:a.dy,color:a.color,font:a.font,size:a.fontSize,fontStyle:a.fontStyle,fontWeight:a.fontWeight}}}class I_{constructor(e){ve(this,Di);ve(this,Or,0);ve(this,zr,0);Pe(this,Di,new Array(e))}push(e){X(this,Di)[X(this,Or)]=e,Pe(this,Or,(X(this,Or)+1)%this.size),Pe(this,zr,Math.min(X(this,zr)+1,this.size))}get(){const e=X(this,Di);return X(this,zr)<this.size?e.slice(0,X(this,zr)):e.slice(X(this,Or),this.size).concat(e.slice(0,X(this,Or)))}get size(){return X(this,Di).length}get length(){return X(this,zr)}}Di=new WeakMap,Or=new WeakMap,zr=new WeakMap;let mi,p2=0;function g2(){return performance.now()-p2<50}function T_(t){return function(...e){p2=performance.now(),t(...e)}}function D_(t,e,n,r,o){if(n=T_(n),t.type=="wheel"){t.uiEvent.preventDefault();const i=t.uiEvent,s=i.deltaMode?120:1;if(!i.deltaX&&!i.deltaY)return;mi==null||mi.stop();let{x:a,y:c}=t.point;if(r){const l=r.mark.encoders;l.x&&!l.x2&&!l.x.constant&&(a=+l.x(r.datum)*e.width+e.x),l.y&&!l.y2&&!l.y.constant&&(c=(1-+l.y(r.datum))*e.height+e.y)}Math.abs(i.deltaX)<Math.abs(i.deltaY)?n({x:a,y:c,xDelta:0,yDelta:0,zDelta:i.deltaY*s/300}):n({x:a,y:c,xDelta:-i.deltaX*s,yDelta:0,zDelta:0})}else if(t.type=="mousedown"&&t.uiEvent.button===0){mi&&mi.stop();const i=new I_(30),s=t.uiEvent;s.preventDefault();let a=zn.fromMouseEvent(s);const c=f=>{const h=zn.fromMouseEvent(f);i.push({point:h,timestamp:performance.now()});const d=h.subtract(a);n({x:a.x,y:a.y,xDelta:d.x,yDelta:d.y,zDelta:0}),a=h},l=()=>{const h=performance.now(),d=i.get().filter(C=>h-C.timestamp<160);if(d.length<5||!o||B_(d))return;const p=d.at(-1),y=d[0],v=p.point.subtract(y.point).multiply(1/(p.timestamp-y.timestamp));let b=a.x,A=a.y;mi=kh(o,C=>{n({x:C.x,y:C.y,xDelta:b-C.x,yDelta:A-C.y,zDelta:0}),b=C.x,A=C.y},150,.5,{x:b,y:A}),mi({x:a.x-v.x*250,y:a.y-v.y*250})},u=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),l()};document.addEventListener("mouseup",u,!1),document.addEventListener("mousemove",c,!1)}}function B_(t){const e=t[Math.floor(t.length/2)],n=e.point.subtract(t[0].point).multiply(e.timestamp-t[0].timestamp),r=t.at(-1).point.subtract(e.point).multiply(t.at(-1).timestamp-e.timestamp),o=n.length;return r.length/o<.4}class __ extends aa{constructor(n,r,o,i,s,a,c){super(n,r,o,i,s,c);ve(this,Ve);ve(this,zo,1/0);ve(this,Uo,10);ve(this,nn,[]);ve(this,Bi,{});ve(this,Go,0);this.spec=n,Pe(this,Uo,n.spacing??10),Pe(this,zo,a),Pe(this,nn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),X(this,nn).push(new b2(n,this,X(this,Go))),Vx(this,Go)._++}setChildren(n){Pe(this,nn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const o=X(this,nn).findIndex(i=>i.view==n);if(o>=0)X(this,nn)[o]=new b2(r,this,X(this,Go));else throw new Error("Not my child view!")}get children(){return X(this,nn).map(n=>n.view)}get childCount(){return X(this,nn).length}async createAxes(){const n=[];for(const r of oo){const o=this.resolutions.axis[r];if(o){const i=o.getAxisProps();if(i){const s={title:o.getTitle(),orient:wl[r][0],...i},a=new l2(s,o.scaleResolution.type,this.context,this,this);n.push(a.initializeChildren()),X(this,Bi)[r]=a}}}return Promise.all([...n,...X(this,nn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of X(this,nn))yield*n.getChildren();for(const n of Object.values(X(this,Bi)))yield n}getOverhang(){return he(this,Ve,$x).call(this).union(he(this,Ve,$l).call(this))}getSize(){return this._cache("size",()=>new Rr(he(this,Ve,m0).call(this,"column"),he(this,Ve,m0).call(this,"row")).addPadding(he(this,Ve,$l).call(this)))}render(n,r,o={}){if(super.render(n,r,o),!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(he(this,Ve,$l).call(this)),n.pushView(this,r);const i={devicePixelRatio:this.context.devicePixelRatio},s=Pb(he(this,Ve,g0).call(this,"column"),r.width,i),a=Pb(he(this,Ve,g0).call(this,"row"),r.height,i),c=new c2(X(this,Ve,Ri).length,X(this,zo)??1/0),l=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,f]of X(this,Ve,Ri).entries()){const{view:h,axes:d,gridLines:p,background:y,backgroundStroke:v,title:b}=f,[A,C]=c.getCellCoords(u),E=s[he(this,Ve,b0).call(this,"column",A)],I=a[he(this,Ve,b0).call(this,"row",C)],R=h.getViewportSize(),B=h.getSize(),O=h.getOverhang(),F=E.location-O.left,P=I.location-O.top,S=(Le,j)=>(Le[j].grow?(j=="width"?E:I).size:Le[j].px)+O[j],Q=S(R,"width"),Z=S(R,"height"),ae=S(B,"width"),ce=S(B,"height"),fe=f.scrollbars.horizontal,le=f.scrollbars.vertical,Ee=fe?()=>l(fe.viewportOffset):()=>0,pe=le?()=>l(le.viewportOffset):()=>0,Ce=new $n(()=>r.x+F,()=>r.y+P,()=>Q,()=>Z),Ie=h.isScrollable(),we=Ie?new $n(()=>r.x+F-Ee(),()=>r.y+P-pe(),()=>ae,()=>ce):Ce;f.coords=Ce;const Te=o.clipRect?Ce.intersect(o.clipRect):Ce;y==null||y.render(n,Te,{...o,clipRect:void 0});for(const Le of Object.values(p))Le.render(n,Ce,o);const He=M_(h)||Ie;He&&h.render(n,we,{...o,clipRect:Te}),v==null||v.render(n,Te,{...o,clipRect:void 0});for(const[Le,j]of Object.entries(d)){const q=Le=="left"||Le=="right"?"vertical":"horizontal",re=f.scrollbars[q],$=re?Ce.modify(q=="vertical"?{y:()=>we.y,height:ce}:{x:()=>we.x,width:ae}):Ce,ue=m2($,Le,j);let L=o.clipRect;re&&(L=ue.intersect(L).intersect(re?Ce.modify(q=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),j.render(n,ue,{...o,clipRect:L})}for(const Le of Object.values(X(this,Bi))){const q=Le.axisProps.orient;(q=="left"&&A==0||q=="right"&&A==c.nCols-1||q=="top"&&C==0||q=="bottom"&&C==c.nRows-1)&&Le.render(n,m2(Ce.shrink(f.view.getOverhang()),q,Le),o)}He||h.render(n,we,o);for(const Le of Object.values(f.scrollbars))Le.updateScrollbar(Ce,we),Le.render(n,r,o);b==null||b.render(n,Ce,o)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=X(this,Ve,Ri).find(i=>i.coords.containsPoint(n.point.x,n.point.y));for(const i of Object.values((r==null?void 0:r.scrollbars)??{}))if(i.coords.containsPoint(n.point.x,n.point.y)&&(i.propagateInteractionEvent(n),n.stopped))return;const o=r==null?void 0:r.view;o&&(o.propagateInteractionEvent(n),(o instanceof $t||o instanceof ca)&&D_(n,r.coords,i=>he(this,Ve,ev).call(this,r.coords,r.view,i),this.context.getCurrentHover(),this.context.animator)),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}zo=new WeakMap,Uo=new WeakMap,nn=new WeakMap,Bi=new WeakMap,Go=new WeakMap,Ve=new WeakSet,Ri=function(){return X(this,nn).filter(n=>n.view.isConfiguredVisible())},Jx=function(){return new c2(X(this,Ve,Ri).length,X(this,zo)??1/0)},Va=function(n){const r=n=="column"?"width":"height",o=(i,s)=>i.map(a=>{const l=X(this,Ve,Ri)[a].getOverhangAndPadding();return n=="column"?s?l.right:l.left:s?l.bottom:l.top}).reduce((a,c)=>Math.max(a,c),0);return this._cache(`size/directionSizes/${n}`,()=>X(this,Ve,Jx)[n=="column"?"colIndices":"rowIndices"].map(i=>({axisBefore:o(i,0),axisAfter:o(i,1),view:bD(i.map(s=>X(this,Ve,Ri)[s].view.getViewportSize()[r]))})))},g0=function(n){const r=he(this,Ve,Va).call(this,n),o=[];o.push(ra);for(const[i,s]of r.entries())i>0&&o.push({px:X(this,Uo),grow:0}),(i==0||this.wrappingFacet)&&o.push(ra),o.push({px:s.axisBefore,grow:0}),o.push(s.view),o.push({px:s.axisAfter,grow:0}),(i==r.length-1||this.wrappingFacet)&&o.push(ra);return o},m0=function(n){let r=0,o=0;const i=n=="row"?this.spec.height:this.spec.width;if(i||i===0)return Nb(i);const s=he(this,Ve,Va).call(this,n);for(const[a,c]of s.entries())a>0&&(o+=X(this,Uo)),(a==0||this.wrappingFacet)&&(o+=0),o+=c.axisBefore,o+=c.view.px??0,r+=c.view.grow??0,o+=c.axisAfter,(a==s.length-1||this.wrappingFacet)&&(o+=0);return{px:o,grow:r}},b0=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},$x=function(){const n=he(this,Ve,Va).call(this,"column"),r=he(this,Ve,Va).call(this,"row");return!n.length||!r.length?Nt.zero():new Nt(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},$l=function(){const n=r=>{const o=Fh[r],i=X(this,Bi)[o];return(i==null?void 0:i.axisProps.orient)!==r?0:Math.max(i.getPerpendicularSize()+(i.axisProps.offset??0),0)};return new Nt(n("top"),n("right"),n("bottom"),n("left"))},ev=function(n,r,o){for(const[i,s]of Object.entries(F_(r))){if(s.size<=0)continue;const a=n.normalizePoint(o.x,o.y),c=n.normalizePoint(o.x+o.xDelta,o.y+o.yDelta),l={x:c.x-a.x,y:c.y-a.y};for(const u of s)u.zoom(2**o.zDelta,i=="y"?1-a[i]:a[i],i=="x"?l.x:-l.y)}this.context.animator.requestRender()};function k_(t){if(!(!t||!t.fill||t.fillOpacity===0))return{configurableVisibility:!1,data:{values:[{}]},mark:{color:t.fill,opacity:t.fillOpacity??1,type:"rect",clip:!1,tooltip:null,minHeight:1,minOpacity:0}}}function R_(t){if(!(!t||!t.stroke||t.strokeWidth===0||t.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:t.strokeWidth??1,color:t.stroke??"lightgray",strokeCap:"square",opacity:t.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 F_(t){const e={x:new Set,y:new Set};return t.visit(n=>{for(const[r,o]of Object.entries(e)){const i=n.getScaleResolution(r);i&&i.isZoomable()&&o.add(i)}}),e}function M_(t){let e=!0;return t.visit(n=>{n instanceof $t&&e&&(e=n.mark.properties.clip===!0)}),e}function m2(t,e,n){const r=n.axisProps,o=n.getPerpendicularSize();if(e=="bottom")return t.translate(0,t.height+r.offset).modify({height:o});if(e=="top")return t.translate(0,-o-r.offset).modify({height:o});if(e=="left")return t.translate(-o-r.offset,0).modify({width:o});if(e=="right")return t.translate(t.width+r.offset,0).modify({width:o})}class b2{constructor(e,n,r){if(this.layoutParent=n,this.view=e,this.serial=r,this.background=void 0,this.backgroundStroke=void 0,this.axes={},this.gridLines={},this.scrollbars={},this.title=void 0,this.coords=$n.ZERO,e.needsAxes.x||e.needsAxes.y){const o=e.spec,i="view"in o?o==null?void 0:o.view:void 0,s=k_(i);s&&(this.background=new $t(s,n.context,n,e,"background"+r,{blockEncodingInheritance:!0}));const a=R_(i);a&&(this.backgroundStroke=new $t(a,n.context,n,e,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const c=C_(e.spec.title);if(c){const l=new $t(c,n.context,n,e,"title"+r,{blockEncodingInheritance:!0});this.title=l}}e.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new y2(this,"horizontal")),e.spec.viewportHeight!=null&&(this.scrollbars.vertical=new y2(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:e,axes:n,gridLines:r}=this,o=(a,c)=>{const l=a.getAxisProps();if(l===null)return;const u=l?{...l}:{};if(!u.orient){for(const f of wl[c])if(!n[f]){u.orient=f;break}if(!u.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(u.title??(u.title=a.getTitle()),!wl[c].includes(u.orient))throw new Error(`Invalid axis orientation "${u.orient}" on channel "${c}"!`);return u},i=async(a,c,l)=>{const u=o(a,c);if(u){if(n[u.orient])throw new Error(`An axis with the orient "${u.orient}" already exists!`);const f=new l2(u,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[u.orient]=f,await f.initializeChildren()}},s=async(a,c,l)=>{const u=o(a,c);if(u&&(u.grid||u.chromGrid)){const f=new g_(u,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[u.orient]=f,await f.initializeChildren()}};for(const a of["x","y"])if(e.needsAxes[a]){const c=e.resolutions.axis[a];if(!c)continue;await i(c,a,e)}for(const a of["x","y"])if(e.needsAxes[a]&&e.getConfiguredOrDefaultResolution(a,"axis")!="excluded"){const c=e.getAxisResolution(a);if(!c)continue;await s(c,a,e)}if(e instanceof ca){for(const a of e)for(const[c,l]of Object.entries(a.resolutions.axis)){const u=l.getAxisProps();u&&u.orient&&await i(l,c,a)}for(const a of e)for(const[c,l]of Object.entries(a.resolutions.axis)){const u=l.getAxisProps();u&&!u.orient&&await i(l,c,a)}}[...Object.values(n),...Object.values(r)].forEach(a=>a.visit(c=>{c instanceof $t&&c.resolve("scale")}))}getOverhang(){const e=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+(r.axisProps.offset??0),0):0};return new Nt(e("top"),e("right"),e("bottom"),e("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}class y2 extends $t{constructor(n,r){const o={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},n.layoutParent.context,n.layoutParent,n.view,"scrollbar-"+r,{blockEncodingInheritance:!0});ve(this,Ho);ve(this,za,$n.ZERO);ve(this,Ur,0);ve(this,_i,0);Ut(this,"viewportOffset",0);this.config=o,Pe(this,Ho,r),this.interpolateViewportOffset=kh(this.context.animator,i=>{this.viewportOffset=i.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(i,s)=>{if(s.stopPropagation(),X(this,Ur)<=0)return;const a=d=>r=="vertical"?d.clientY:d.clientX,c=s.uiEvent;c.preventDefault();const l=this.scrollOffset,u=a(c),f=d=>{const p=io(a(d)-u+l,0,X(this,Ur));this.interpolateViewportOffset({x:p/X(this,Ur)*X(this,_i)})},h=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h)};document.addEventListener("mouseup",h,!1),document.addEventListener("mousemove",f,!1)})}get scrollOffset(){return this.viewportOffset/X(this,_i)*X(this,Ur)}render(n,r,o){super.render(n,X(this,za),o)}updateScrollbar(n,r){const o=this.config.scrollbarPadding,i=this.config.scrollbarSize,s=X(this,Ho)=="horizontal"?"width":"height",a=Math.min(1,n[s]/r[s]),c=n[s]-2*o,l=a*c;Pe(this,Ur,c-l),Pe(this,_i,r[s]-n[s]),this.viewportOffset=io(this.viewportOffset,0,X(this,_i)),Pe(this,za,X(this,Ho)=="vertical"?new $n(()=>n.x+n.width-i-o,()=>n.y+o+this.scrollOffset,()=>i,()=>l):new $n(()=>n.x+o+this.scrollOffset,()=>n.y+n.height-i-o,()=>l,()=>i))}}Ho=new WeakMap,za=new WeakMap,Ur=new WeakMap,_i=new WeakMap;class Ph extends __{constructor(e,n,r,o,i){super(e,n,r,o,i,Oh(e)?e.columns:xl(e)?1:1/0),this.spec=e}async initializeChildren(){const e=this.spec,n=Oh(e)?e.concat:xl(e)?e.vconcat:e.hconcat;this.setChildren(await Promise.all(n.map((r,o)=>this.context.createOrImportView(r,this,this,"grid"+o)))),await this.createAxes()}getDefaultResolution(e,n){return n=="axis"?"independent":xl(this.spec)&&e==="x"||v2(this.spec)&&e==="y"?"shared":"independent"}}const w2="viewRoot";class P_{constructor(e={}){ve(this,Vo,new Map);this.options={allowImport:!0,wrapRoot:!0,...e};const n=r=>(o,i,s,a,c)=>new r(o,i,s,a,o.name??c);this.addViewType(Nh,n(ca)),this.addViewType(Lh,n($t)),this.addViewType(xl,n(Ph)),this.addViewType(v2,n(Ph)),this.addViewType(Oh,n(Ph)),this.addViewType(O_,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(e,n){X(this,Vo).set(e,n)}createView(e,n,r,o,i){for(const[s,a]of X(this,Vo))if(s(e))return a(e,n,r,o,i);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(e)]))}isViewSpec(e){const n=[...X(this,Vo).keys()].filter(r=>r(e));if(n.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return n.length==1}async createOrImportView(e,n,r,o,i,s){let a;if(N_(e)){let l;if("url"in e.import)if(this.options.allowImport)l=await GB(e,o.getBaseUrl(),n);else throw new gi("Importing views is not allowed!",r);else if("template"in e.import)l=x2(e.import.template,o);else throw new Error("Invalid import: "+JSON.stringify(e));s==null||s(l),L_(l,e),a=l}else a=e;!o&&this.options.wrapRoot&&(Lh(a)||Nh(a))&&i===w2&&(a={name:"implicitRoot",vconcat:[a]});const c=this.createView(a,n,r,o,i);return c instanceof aa&&await c.initializeChildren(),c}}Vo=new WeakMap;function x2(t,e){var r,o;const n=(o=(r=e.spec)==null?void 0:r.templates)==null?void 0:o[t];if(n)return structuredClone(n);if(e.dataParent)return x2(t,e.dataParent);throw new Error(`Cannot find template "${t}" in current view or its ancestors!`)}function L_(t,e){e.name!=null&&(t.name=e.name);const n=Dt(e.params)?e.params:Rt(e.params)?Object.entries(e.params).map(([r,o])=>({name:r,value:o})):[];if(n.length){t.params??(t.params=[]);for(const r of n){const o=t.params.findIndex(i=>i.name==r.name);o>=0&&(t.params[o]=r)}for(const r of n)t.params.some(o=>o.name==r.name)||t.params.push(r)}}function Lh(t){return"mark"in t&&(nt(t.mark)||Rt(t.mark))}function Nh(t){return"layer"in t&&Rt(t.layer)}function N_(t){return"import"in t}function xl(t){return"vconcat"in t&&Dt(t.vconcat)}function v2(t){return"hconcat"in t&&Dt(t.hconcat)}function Oh(t){return"concat"in t&&Dt(t.concat)}function O_(t){return"samples"in t&&Rt(t.samples)&&"spec"in t&&Rt(t.spec)}function z_(t){const e=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of t.paramConfigs.values()){if(!aI(r))continue;const o=r.bind;if(!o||!("input"in o))continue;const i=r.name,s=t.getSetter(i),a=t.getValue(i),c=o.name??i,l=o.debounce?bl(s,o.debounce,!1):s,u=`${e}-param-${i}`;if(o.input=="range")n.push(ot`<label for=${u}>${c}</label>
|
|
561
561
|
<div>
|
|
562
562
|
<input
|
|
563
563
|
id=${u}
|
|
564
564
|
type="range"
|
|
565
|
-
min=${
|
|
566
|
-
max=${
|
|
567
|
-
step=${
|
|
568
|
-
.value=${
|
|
565
|
+
min=${o.min??0}
|
|
566
|
+
max=${o.max??100}
|
|
567
|
+
step=${o.step??Zr(o.min,o.max,100)}
|
|
568
|
+
.value=${a}
|
|
569
569
|
@input=${f=>{l(f.target.valueAsNumber),f.target.nextElementSibling.textContent=f.target.valueAsNumber}}
|
|
570
|
-
/><span>${
|
|
571
|
-
</div>`);else if(
|
|
570
|
+
/><span>${a}</span>
|
|
571
|
+
</div>`);else if(o.input=="checkbox")n.push(ot`<label for=${u}>${c}</label>
|
|
572
572
|
<input
|
|
573
573
|
id=${u}
|
|
574
574
|
type="checkbox"
|
|
575
|
-
?checked=${
|
|
575
|
+
?checked=${a}
|
|
576
576
|
@input=${f=>l(f.target.checked)}
|
|
577
|
-
/>`);else if(
|
|
577
|
+
/>`);else if(o.input=="radio")n.push(ot`<span class="label">${c}</span>
|
|
578
578
|
<div class="radio-group">
|
|
579
|
-
${
|
|
579
|
+
${o.options.map((f,h)=>{var d;return ot`<label>
|
|
580
580
|
<input
|
|
581
581
|
type="radio"
|
|
582
|
-
name=${
|
|
582
|
+
name=${i}
|
|
583
583
|
value=${f}
|
|
584
|
-
.checked=${
|
|
584
|
+
.checked=${a==f}
|
|
585
585
|
@input=${p=>l(p.target.value)}
|
|
586
|
-
/>${((d=
|
|
586
|
+
/>${((d=o.labels)==null?void 0:d[h])??f}</label
|
|
587
587
|
>`})}
|
|
588
|
-
</div>`);else if(
|
|
588
|
+
</div>`);else if(o.input=="select")n.push(ot`<label for=${u}>${c}</label>
|
|
589
589
|
<select
|
|
590
590
|
id=${u}
|
|
591
591
|
@input=${f=>l(f.target.value)}
|
|
592
592
|
>
|
|
593
|
-
${
|
|
593
|
+
${o.options.map((f,h)=>{var d;return ot`<option
|
|
594
594
|
value=${f}
|
|
595
|
-
?selected=${
|
|
595
|
+
?selected=${a==f}
|
|
596
596
|
>
|
|
597
|
-
${((d=
|
|
597
|
+
${((d=o.labels)==null?void 0:d[h])??f}
|
|
598
598
|
</option>`})}
|
|
599
|
-
</select> `);else if(
|
|
599
|
+
</select> `);else if(o.input=="text"||o.input=="number"||o.input=="color")n.push(ot`<label for=${u}>${c}</label>
|
|
600
600
|
<div>
|
|
601
601
|
<input
|
|
602
602
|
id=${u}
|
|
603
|
-
type=${
|
|
604
|
-
placeholder=${
|
|
605
|
-
autocomplete=${
|
|
606
|
-
.value=${
|
|
603
|
+
type=${o.input}
|
|
604
|
+
placeholder=${o.placeholder??""}
|
|
605
|
+
autocomplete=${o.autocomplete??"off"}
|
|
606
|
+
.value=${a}
|
|
607
607
|
@focus=${f=>f.target.select()}
|
|
608
|
-
@input=${f=>{l(
|
|
608
|
+
@input=${f=>{l(o.input=="number"?f.target.valueAsNumber:f.target.value)}}
|
|
609
609
|
/>
|
|
610
|
-
</div>`);else throw new Error("Unsupported input type: "+
|
|
611
|
-
<div class=${
|
|
612
|
-
${
|
|
610
|
+
</div>`);else throw new Error("Unsupported input type: "+o.input);o.description&&n.push(ot`<div class="description">${o.description}</div>`)}return n}Mu("fasta",e_);class A2{constructor(e,n,r={}){ve(this,pn);this.container=e,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=n,this.viewFactory=new P_,this.namedDataProviders=[],this.animator=new QB(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=o=>o.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new t_(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:l_,refseqgene:r_,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._loadingViews=new Map,this._inputBindingContainer=void 0,this._mouseDownCoords=void 0}registerNamedDataProvider(e){this.namedDataProviders.unshift(e)}getNamedDataFromProvider(e){for(const n of this.namedDataProviders){const r=n(e);if(r)return r}}updateNamedData(e,n){const r=this.viewRoot.context.dataFlow.findNamedDataSource(e);if(!r)throw new Error("No such named data source: "+e);r.dataSource.updateDynamicData(n),Sh(r.hosts),this.animator.requestRender()}broadcast(e,n){var o;const r={type:e,payload:n};this.viewRoot.visit(i=>i.handleBroadcast(r)),(o=this._extraBroadcastListeners.get(e))==null||o.forEach(i=>i(r))}_updateLoadingIndicators(){const e=[],n=()=>[...this._loadingViews.values()].some(r=>r.status=="loading"||r.status=="error");for(const[r,o]of this._loadingViews){const i=r.coords;if(i){const s={left:`${i.x}px`,top:`${i.y}px`,width:`${i.width}px`,height:`${i.height}px`};e.push(ot`<div style=${pE(s)}>
|
|
611
|
+
<div class=${o.status}>
|
|
612
|
+
${o.status=="error"?ot`<span
|
|
613
613
|
>Loading
|
|
614
|
-
failed${
|
|
615
|
-
>`:
|
|
616
|
-
<img src="${
|
|
614
|
+
failed${o.detail?ot`: ${o.detail}`:pt}</span
|
|
615
|
+
>`:ot`
|
|
616
|
+
<img src="${gE}" alt="" />
|
|
617
617
|
<span>Loading...</span>
|
|
618
618
|
`}
|
|
619
619
|
</div>
|
|
620
|
-
</div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),ka(t,this.loadingIndicatorsElement)}destroy(){var n;const t=X(this,Sn,Yu);this.container.classList.remove("genome-spy"),t.classList.remove("loading");for(const[r,i]of this._keyboardListeners)for(const o of i)document.removeEventListener(r,o);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 HB(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new my,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new jB(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(c,l,u)=>{this._loadingViews.set(c,{status:l,detail:u}),this._updateLoadingIndicators()},addKeyboardListener:(c,l)=>{document.addEventListener(c,l);let u=this._keyboardListeners.get(c);u||(u=[],this._keyboardListeners.set(c,u)),u.push(l)},addBroadcastListener(c,l){const u=t._extraBroadcastListeners;let f=u.get(c);f||(f=new Set,u.set(c,f)),f.add(l)},removeBroadcastListener(c,l){var f;(f=t._extraBroadcastListeners.get(c))==null||f.delete(l)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:c=>t.viewFactory.isViewSpec(c),createView:function(c,l,u,f){return t.viewFactory.createView(c,n,l,u,f)},createOrImportView:async function(c,l,u,f,h){return t.viewFactory.createOrImportView(c,n,l,u,f,h)},highlightView:c=>{var l;if((l=this.container.querySelector(".view-highlight"))==null||l.remove(),c){const u=c.coords;if(u){const f=document.createElement("div");f.className="view-highlight",f.style.position="absolute",f.style.left=u.x+"px",f.style.top=u.y+"px",f.style.width=u.width+"px",f.style.height=u.height+"px",f.style.border="1px solid green",f.style.backgroundColor="rgba(0, 255, 0, 0.1)",f.style.pointerEvents="none",this.container.appendChild(f)}}}},r=this.spec;r.datasets&&this.registerNamedDataProvider(c=>r.datasets[c]),this.viewRoot=await n.createOrImportView(r,null,null,Py),X(this,Sn,Yu).style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",he(this,Sn,ZA).call(this),FB(this.viewRoot),MB(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(c=>c.configureViewOpacity()),this._glHelper.invalidateSize(),he(this,Sn,YA).call(this);const o=i.filter(c=>c instanceof an),a=TB(this.viewRoot,n.dataFlow);RB(a),this.broadcast("dataFlowBuilt",a),o.forEach(c=>c.mark.initializeEncoders());const s=Promise.all(o.map(c=>c.mark.initializeGraphics()));for(const c of o)a.addObserver(l=>{c.mark.initializeData();try{c.mark.updateGraphicsData()}catch(u){throw u.view=c,u}n.animator.requestRender()},c);await n.fontManager.waitUntilReady(),a.initialize(),await Promise.all(a.dataSources.map(c=>c.load())),Ad(this.viewRoot),this.broadcast("dataLoaded"),await s;for(const c of o)c.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(c=>nu(c,"size")),this._glHelper.invalidateSize()}async launch(){try{return he(this,Sn,QA).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),MR(this.container,n),!1}finally{X(this,Sn,Yu).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const t=this._glHelper.canvas;let n=performance.now();const r=i=>{var s,c;const o=performance.now(),a=o-n<200;if(i instanceof MouseEvent){const l=t.getBoundingClientRect(),u=new Yn(i.clientX-l.left-t.clientLeft,i.clientY-l.top-t.clientTop);i.type=="mousemove"&&!a&&(this.tooltip.handleMouseMove(i),this._tooltipUpdateRequested=!1,i.buttons==0&&!By()&&(this.renderPickingFramebuffer(),this._handlePicking(u.x,u.y)));const f=h=>{this.viewRoot.propagateInteractionEvent(new OB(u,h)),this._tooltipUpdateRequested||this.tooltip.clear()};if(i.type!="wheel"&&this._wheelInertia.cancel(),(i.type=="mousedown"||i.type=="mouseup")&&!By())this.renderPickingFramebuffer();else if(i.type=="wheel"){n=o,this._tooltipUpdateRequested=!1;const h=i;if(Math.abs(h.deltaX)>Math.abs(h.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const d=XB(h);this._wheelInertia.setMomentum(h.deltaY*(h.deltaMode?80:1),p=>{const b=new WheelEvent("wheel",{...d,deltaMode:0,deltaX:0,deltaY:p});f(b)}),h.preventDefault();return}}if(i.type=="click"){const h=this._currentHover?{type:i.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(d=>d.name).reverse(),datum:this._currentHover.datum}:{type:i.type,viewPath:null,datum:null};(s=this._eventListeners.get("click"))==null||s.forEach(d=>d(h))}(i.type!="click"||((c=this._mouseDownCoords)==null?void 0:c.subtract(Yn.fromMouseEvent(i)).length)<3)&&f(i)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(i=>t.addEventListener(i,r)),t.addEventListener("mousedown",i=>{this._mouseDownCoords=Yn.fromMouseEvent(i),document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),t.addEventListener("dragstart",i=>i.stopPropagation())}_handlePicking(t,n){var o;const r=this._glHelper.readPickingPixel(t,n),i=r[0]|r[1]<<8|r[2]<<16|r[3]<<24;if(i==0){this._currentHover=null;return}if(i!==((o=this._currentHover)==null?void 0:o.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(a=>{if(a instanceof an){if(a.mark.isPickingParticipant()&&[...a.facetCoords.values()].some(s=>s.containsPoint(t,n))){const s=a.getCollector().findDatumByUniqueId(i);s&&(this._currentHover={mark:a.mark,datum:s,uniqueId:i})}if(this._currentHover)return Ls}}),this._currentHover){const a=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async s=>{if(!a.isPickingParticipant())return;const c=a.properties.tooltip;if(c!==null){const l=(c==null?void 0:c.handler)??"default",u=this.tooltipHandlers[l];if(!u)throw new Error("No such tooltip handler: "+l);return u(s,a,c==null?void 0:c.params)}})}}updateTooltip(t,n){if(!this._tooltipUpdateRequested||!t)this.tooltip.updateWithDatum(t,n),this._tooltipUpdateRequested=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}computeLayout(){const t=this.viewRoot;if(!t)return;this.broadcast("layout");const n=this._glHelper.getLogicalCanvasSize();if(isNaN(n.width)||isNaN(n.height)){console.log(`NaN in canvas size: ${n.width}x${n.height}. Skipping computeLayout().`);return}this._renderingContext=new xy({picking:!1},this._glHelper),this._pickingContext=new xy({picking:!0},this._glHelper),t.render(new NB(this._renderingContext,this._pickingContext),fr.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 an&&n.getDataAccessor("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}}Sn=new WeakSet,Yu=function(){return this.container.querySelector(".canvas-wrapper")},ZA=function(){const t=[];this.viewRoot.visit(r=>{const i=r.paramMediator;t.push(...FR(i))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!t.length)){if(this._inputBindingContainer=uu("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&&ka(ct`<div class="gs-input-binding">${t}</div>`,this._inputBindingContainer)}},YA=function(){const t=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",window.devicePixelRatio),n=()=>{this._glHelper.invalidateSize(),t(window.devicePixelRatio),this.computeLayout(),this.renderAll()};if(this.viewRoot.getSize().isGrowing()){const o=new ResizeObserver(n);o.observe(this.container),this._destructionCallbacks.push(()=>o.disconnect())}let r=null;const i=()=>{r!=null&&(r(),n());const o=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);o.addEventListener("change",i),r=()=>{o.removeEventListener("change",i)}};i(),r&&this._destructionCallbacks.push(r)},QA=function(){this.container.classList.add("genome-spy");const t=document.createElement("style");t.innerHTML=c_,this.container.appendChild(t);const n=uu("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new ZI(n,()=>this.viewRoot?LB(this.viewRoot):{width:void 0,height:void 0},this.spec.background,{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=uu("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=uu("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new u_(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function MR(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 uu(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 PR="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",LR="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5'%20viewBox='0%200%2064%2064'%3e%3cpath%20d='M208.6%20548.2s11.2%2046.2%2031.2%2071c20%2024.9%2079.3%2061.6%2079.3%2061.6S385.6%20623%20438%20498.3c0%200%2018.1%201%2036-11.9%2017.7-12.7%2016.3-7.9%2021-24.8%200%200%2057%206.3%20131-9.7%2041.7-9.1%2084.3-26.3%20121.5-58.8%200%200-25.4-32.9-58-101.7-12.4-26.1-41.9-34.3-98.7-88L438.1%20391.2%20208.6%20548.2Z'%20style='fill-opacity:.11'%20transform='matrix(.10221%20.00684%20-.00671%20.10035%20-8%20-13.2)'/%3e%3cg%20transform='rotate(-35.4%2034.2%2080.8)%20scale(.10057)'%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'%20style='fill:%237fbbdd'/%3e%3cclipPath%20id='a'%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23a)'%3e%3cpath%20d='M386.9%20397.2c-15.6-13.6-51.8-22.4-96.3-16.7-44.5%205.8-93.8%2021.8-111.8%2031.6-10.6%205.7-27.3%2017.3-28.1%2027.2-1.2%2014.2%202.9%2037.8%2015%2052%206%207.2%2014.2%2012.1%2028.1%2014.1%2017.9%202.6%2059-24.8%2081.6-36.2%2024-12%2038.6-14.6%2063-22.2%200%200-47%2031.6-68.2%2047.4-30.6%2022.9-51.6%2028-57.3%2045.5-3.1%209.4-.7%2027.9%207.5%2037.6%209%2011%2012.8%2017.6%2034.2%2020.1%2012.7%201.5%2022%201.2%2059.8-28.6%2021.7-17.2%2055.9-59.2%2067-74.4%2016.2-22%2023.8-43.1%2021.3-59.6-3.7-23.6-8.4-31.3-15.8-37.8Z'%20style='fill:%23fff'%20transform='scale(.88664)%20rotate(31.2%20485%20792.2)'/%3e%3cpath%20d='M484.7%20379c-5.4-11.1-17.6-28.5-.8-53.8a739%20739%200%200%201%2044.2-60.6c13.2-16.3%2046.7-46.2%2059.6-52%2013-6%2033.3-8.7%2044.2.2%2011%209.1%2016.5%2020.6%2023%2032.7%207.4%2013.8%2012.4%2029.3%201.6%2042.8-15.4%2019.2-34.3%2017-61.6%2031.5-27.7%2014.8-42.3%2023.1-55.7%2035.9%200%200%2052.2-21.6%2082-31.2%2029.8-9.7%2059.8-20%2074.8-8.5s14.6%2015.5%2018.4%2031.2c4.7%2019.4-7.2%2038-20.1%2048.6-13%2010.7-34.3%2016-57.4%2021-30.5%206.8-96.6%2015.1-124%202.6-27.5-12.6-24.4-32.8-28.2-40.5Z'%20style='fill:%23fff'%20transform='scale(.87906)%20rotate(31.2%20487.2%20893.5)'/%3e%3c/g%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'%20style='fill:none;stroke:%23000;stroke-width:16.57px'/%3e%3c/g%3e%3cg%20transform='rotate(-4.2%20-78%20211)%20scale(.10057)'%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'%20style='fill:%237fbbdd'/%3e%3cclipPath%20id='b'%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23b)'%3e%3cpath%20d='M413.3%20402.7c17.5%2018.9%2010%2045.7%2028.4%2043.4%2021.7-2.7%2030.9-15.7%2031.6-32.7.7-17-1-19.5-7.1-38-6.1-18.7-18.2-23.2-43.4-18.2-20.8%204.1-17.8%203-24%2010-6.4%207-14.5%2026-14.5%2026s8.4-12.7%2029%209.5Z'%20style='fill:%23fff'%20transform='matrix(.90907%200%200%20.85852%2037%2052.2)'/%3e%3c/g%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'%20style='fill:none;stroke:%23000;stroke-width:16.57px'/%3e%3c/g%3e%3c/svg%3e";async function NR(e,t,n={}){let r;if(it(e)){if(r=document.querySelector(e),!r)throw new Error(`No such element: ${e}`)}else if(e instanceof HTMLElement)r=e;else throw new Error(`Invalid element: ${e}`);let i;try{const o=Lt(t)?t:await zy(t);if(o.baseUrl??(o.baseUrl=""),o.width??(o.width="container"),o.padding??(o.padding=10),r==document.body){const a=document.createElement("div");a.style.position="fixed",a.style.inset="0",a.style.overflow="hidden",r.appendChild(a),r=a}i=new Oy(r,o,n),OR(i,n),await i.launch()}catch(o){r.innerText=o.toString(),console.error(o)}return{finalize(){for(i.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(o,a){const s=i._eventListeners;let c=s.get(o);c||(c=new Set,s.set(o,c)),c.add(a)},removeEventListener(o,a){var c;(c=i._eventListeners.get(o))==null||c.delete(a)},getScaleResolutionByName(o){return i.getNamedScaleResolutions().get(o)},updateNamedData:i.updateNamedData.bind(i)}}function OR(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function zy(e){let t;try{const n=await fetch(e);if(!n.ok)throw new Error(`${n.status} ${n.statusText}`);t=await n.json()}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}function fu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zR(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 Nd={},Us={},Uy;function UR(){if(Uy)return Us;Uy=1,Us.byteLength=s,Us.toByteArray=l,Us.fromByteArray=h;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=r.length;i<o;++i)e[i]=r[i],t[r.charCodeAt(i)]=i;t[45]=62,t[95]=63;function a(d){var p=d.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=d.indexOf("=");b===-1&&(b=p);var v=b===p?0:4-b%4;return[b,v]}function s(d){var p=a(d),b=p[0],v=p[1];return(b+v)*3/4-v}function c(d,p,b){return(p+b)*3/4-b}function l(d){var p,b=a(d),v=b[0],y=b[1],A=new n(c(d,v,y)),_=0,E=y>0?v-4:v,C;for(C=0;C<E;C+=4)p=t[d.charCodeAt(C)]<<18|t[d.charCodeAt(C+1)]<<12|t[d.charCodeAt(C+2)]<<6|t[d.charCodeAt(C+3)],A[_++]=p>>16&255,A[_++]=p>>8&255,A[_++]=p&255;return y===2&&(p=t[d.charCodeAt(C)]<<2|t[d.charCodeAt(C+1)]>>4,A[_++]=p&255),y===1&&(p=t[d.charCodeAt(C)]<<10|t[d.charCodeAt(C+1)]<<4|t[d.charCodeAt(C+2)]>>2,A[_++]=p>>8&255,A[_++]=p&255),A}function u(d){return e[d>>18&63]+e[d>>12&63]+e[d>>6&63]+e[d&63]}function f(d,p,b){for(var v,y=[],A=p;A<b;A+=3)v=(d[A]<<16&16711680)+(d[A+1]<<8&65280)+(d[A+2]&255),y.push(u(v));return y.join("")}function h(d){for(var p,b=d.length,v=b%3,y=[],A=16383,_=0,E=b-v;_<E;_+=A)y.push(f(d,_,_+A>E?E:_+A));return v===1?(p=d[b-1],y.push(e[p>>2]+e[p<<4&63]+"==")):v===2&&(p=(d[b-2]<<8)+d[b-1],y.push(e[p>>10]+e[p>>4&63]+e[p<<2&63]+"=")),y.join("")}return Us}var hu={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var Gy;function GR(){return Gy||(Gy=1,hu.read=function(e,t,n,r,i){var o,a,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-u)-1,d>>=-u,u+=s;u>0;o=o*256+e[t+f],f+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=a*256+e[t+f],f+=h,u-=8);if(o===0)o=1-l;else{if(o===c)return a?NaN:(d?-1:1)*(1/0);a=a+Math.pow(2,r),o=o-l}return(d?-1:1)*a*Math.pow(2,o-r)},hu.write=function(e,t,n,r,i,o){var a,s,c,l=o*8-i-1,u=(1<<l)-1,f=u>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,b=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+f>=1?t+=h/c:t+=h*Math.pow(2,1-f),t*c>=2&&(a++,c/=2),a+f>=u?(s=0,a=u):a+f>=1?(s=(t*c-1)*Math.pow(2,i),a=a+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=s&255,d+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[n+d]=a&255,d+=p,a/=256,l-=8);e[n+d-p]|=b*128}),hu}/*!
|
|
620
|
+
</div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),$o(e,this.loadingIndicatorsElement)}destroy(){var n;const e=X(this,pn,eu);this.container.classList.remove("genome-spy"),e.classList.remove("loading");for(const[r,o]of this._keyboardListeners)for(const i of o)document.removeEventListener(r,i);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 YB(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const e=this,n={dataFlow:new e2,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new KB(this._glHelper),get devicePixelRatio(){return e._glHelper.dpr},requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(c,l,u)=>{this._loadingViews.set(c,{status:l,detail:u}),this._updateLoadingIndicators()},addKeyboardListener:(c,l)=>{document.addEventListener(c,l);let u=this._keyboardListeners.get(c);u||(u=[],this._keyboardListeners.set(c,u)),u.push(l)},addBroadcastListener(c,l){const u=e._extraBroadcastListeners;let f=u.get(c);f||(f=new Set,u.set(c,f)),f.add(l)},removeBroadcastListener(c,l){var f;(f=e._extraBroadcastListeners.get(c))==null||f.delete(l)},isViewConfiguredVisible:e.viewVisibilityPredicate,isViewSpec:c=>e.viewFactory.isViewSpec(c),createOrImportView:async function(c,l,u,f,h){return e.viewFactory.createOrImportView(c,n,l,u,f,h)},highlightView:c=>{var l;if((l=this.container.querySelector(".view-highlight"))==null||l.remove(),c){const u=c.coords;if(u){const f=document.createElement("div");f.className="view-highlight",f.style.position="absolute",f.style.left=u.x+"px",f.style.top=u.y+"px",f.style.width=u.width+"px",f.style.height=u.height+"px",f.style.border="1px solid green",f.style.backgroundColor="rgba(0, 255, 0, 0.1)",f.style.pointerEvents="none",this.container.appendChild(f)}}}},r=this.spec;r.datasets&&this.registerNamedDataProvider(c=>r.datasets[c]),this.viewRoot=await n.createOrImportView(r,null,null,w2),X(this,pn,eu).style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",he(this,pn,tv).call(this),zB(this.viewRoot),UB(this.viewRoot);const o=this.viewRoot.getDescendants();o.forEach(c=>c.configureViewOpacity()),this._glHelper.invalidateSize(),he(this,pn,nv).call(this);const i=o.filter(c=>c instanceof $t),s=FB(this.viewRoot,n.dataFlow);OB(s),this.broadcast("dataFlowBuilt",s),i.forEach(c=>c.mark.initializeEncoders());const a=Promise.all(i.map(c=>c.mark.initializeGraphics()));for(const c of i)s.addObserver(l=>{c.mark.initializeData();try{c.mark.updateGraphicsData()}catch(u){throw u.view=c,u}n.animator.requestRender()},c);await n.fontManager.waitUntilReady(),s.initialize(),await Promise.all(s.dataSources.map(c=>c.load())),Sh(this.viewRoot),this.broadcast("dataLoaded"),await a;for(const c of i)c.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(c=>dl(c,"size")),this._glHelper.invalidateSize()}async launch(){try{return he(this,pn,rv).call(this),await this._prepareViewsAndData(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),!0}catch(e){const n=`${e.view?`At "${e.view.getPathString()}": `:""}${e.toString()}`;return console.error(e.stack),U_(this.container,n),!1}finally{X(this,pn,eu).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const e=this._glHelper.canvas;let n=performance.now();const r=o=>{var a,c;const i=performance.now(),s=i-n<200;if(o instanceof MouseEvent){const l=e.getBoundingClientRect(),u=new zn(o.clientX-l.left-e.clientLeft,o.clientY-l.top-e.clientTop);o.type=="mousemove"&&!s&&(this.tooltip.handleMouseMove(o),this._tooltipUpdateRequested=!1,o.buttons==0&&!g2()&&(this.renderPickingFramebuffer(),this._handlePicking(u.x,u.y)));const f=h=>{this.viewRoot.propagateInteractionEvent(new qB(u,h)),this._tooltipUpdateRequested||this.tooltip.clear()};if(o.type!="wheel"&&this._wheelInertia.cancel(),(o.type=="mousedown"||o.type=="mouseup")&&!g2())this.renderPickingFramebuffer();else if(o.type=="wheel"){n=i,this._tooltipUpdateRequested=!1;const h=o;if(Math.abs(h.deltaX)>Math.abs(h.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const d=n_(h);this._wheelInertia.setMomentum(h.deltaY*(h.deltaMode?80:1),p=>{const y=new WheelEvent("wheel",{...d,deltaMode:0,deltaX:0,deltaY:p});f(y)}),h.preventDefault();return}}if(o.type=="click"){const h=this._currentHover?{type:o.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(d=>d.name).reverse(),datum:this._currentHover.datum}:{type:o.type,viewPath:null,datum:null};(a=this._eventListeners.get("click"))==null||a.forEach(d=>d(h))}(o.type!="click"||((c=this._mouseDownCoords)==null?void 0:c.subtract(zn.fromMouseEvent(o)).length)<3)&&f(o)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(o=>e.addEventListener(o,r)),e.addEventListener("mousedown",o=>{this._mouseDownCoords=zn.fromMouseEvent(o),document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),e.addEventListener("dragstart",o=>o.stopPropagation())}_handlePicking(e,n){var i;const r=this._glHelper.readPickingPixel(e,n),o=r[0]|r[1]<<8|r[2]<<16|r[3]<<24;if(o==0){this._currentHover=null;return}if(o!==((i=this._currentHover)==null?void 0:i.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(s=>{if(s instanceof $t){if(s.mark.isPickingParticipant()&&[...s.facetCoords.values()].some(a=>a.containsPoint(e,n))){const a=s.getCollector().findDatumByUniqueId(o);a&&(this._currentHover={mark:s.mark,datum:a,uniqueId:o})}if(this._currentHover)return oa}}),this._currentHover){const s=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async a=>{if(!s.isPickingParticipant())return;const c=s.properties.tooltip;if(c!==null){const l=(c==null?void 0:c.handler)??"default",u=this.tooltipHandlers[l];if(!u)throw new Error("No such tooltip handler: "+l);return u(a,s,c==null?void 0:c.params)}})}}updateTooltip(e,n){if(!this._tooltipUpdateRequested||!e)this.tooltip.updateWithDatum(e,n),this._tooltipUpdateRequested=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}computeLayout(){const e=this.viewRoot;if(!e)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 i2({picking:!1},this._glHelper),this._pickingContext=new i2({picking:!0},this._glHelper),e.render(new VB(this._renderingContext,this._pickingContext),$n.create(0,0,n.width,n.height)),this._updateLoadingIndicators(),this.broadcast("layoutComputed")}renderAll(){var e;(e=this._renderingContext)==null||e.render(),this._dirtyPickingBuffer=!0}renderPickingFramebuffer(){this._dirtyPickingBuffer&&(this._pickingContext.render(),this._dirtyPickingBuffer=!1)}getSearchableViews(){const e=[];return this.viewRoot.visit(n=>{n instanceof $t&&n.getDataAccessor("search")&&e.push(n)}),e}getNamedScaleResolutions(){const e=new Map;return this.viewRoot.visit(n=>{for(const r of Object.values(n.resolutions.scale))r.name&&e.set(r.name,r)}),e}}pn=new WeakSet,eu=function(){return this.container.querySelector(".canvas-wrapper")},tv=function(){const e=[];this.viewRoot.visit(r=>{const o=r.paramMediator;e.push(...z_(o))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!e.length)){if(this._inputBindingContainer=vl("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");e.length&&$o(ot`<div class="gs-input-binding">${e}</div>`,this._inputBindingContainer)}},nv=function(){const e=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",window.devicePixelRatio),n=()=>{this._glHelper.invalidateSize(),e(window.devicePixelRatio),this.computeLayout(),this.renderAll()};if(this.viewRoot.getSize().isGrowing()){const i=new ResizeObserver(n);i.observe(this.container),this._destructionCallbacks.push(()=>i.disconnect())}let r=null;const o=()=>{r!=null&&(r(),n());const i=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);i.addEventListener("change",o),r=()=>{i.removeEventListener("change",o)}};o(),r&&this._destructionCallbacks.push(r)},rv=function(){this.container.classList.add("genome-spy");const e=document.createElement("style");e.innerHTML=mE,this.container.appendChild(e);const n=vl("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new tT(n,()=>this.viewRoot?HB(this.viewRoot):{width:void 0,height:void 0},this.spec.background,{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=vl("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=vl("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new yE(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function U_(t,e){const n=document.createElement("div");n.className="message-box";const r=document.createElement("div");r.textContent=e,n.appendChild(r),t.appendChild(n)}function vl(t,e){const n=document.createElement(t);for(const[r,o]of Object.entries(e))["innerHTML","innerText","className"].includes(r)&&(n[r]=o),n.setAttribute(r,o);return n}const G_="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",H_="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5'%20viewBox='0%200%2064%2064'%3e%3cpath%20d='M208.6%20548.2s11.2%2046.2%2031.2%2071c20%2024.9%2079.3%2061.6%2079.3%2061.6S385.6%20623%20438%20498.3c0%200%2018.1%201%2036-11.9%2017.7-12.7%2016.3-7.9%2021-24.8%200%200%2057%206.3%20131-9.7%2041.7-9.1%2084.3-26.3%20121.5-58.8%200%200-25.4-32.9-58-101.7-12.4-26.1-41.9-34.3-98.7-88L438.1%20391.2%20208.6%20548.2Z'%20style='fill-opacity:.11'%20transform='matrix(.10221%20.00684%20-.00671%20.10035%20-8%20-13.2)'/%3e%3cg%20transform='rotate(-35.4%2034.2%2080.8)%20scale(.10057)'%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'%20style='fill:%237fbbdd'/%3e%3cclipPath%20id='a'%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23a)'%3e%3cpath%20d='M386.9%20397.2c-15.6-13.6-51.8-22.4-96.3-16.7-44.5%205.8-93.8%2021.8-111.8%2031.6-10.6%205.7-27.3%2017.3-28.1%2027.2-1.2%2014.2%202.9%2037.8%2015%2052%206%207.2%2014.2%2012.1%2028.1%2014.1%2017.9%202.6%2059-24.8%2081.6-36.2%2024-12%2038.6-14.6%2063-22.2%200%200-47%2031.6-68.2%2047.4-30.6%2022.9-51.6%2028-57.3%2045.5-3.1%209.4-.7%2027.9%207.5%2037.6%209%2011%2012.8%2017.6%2034.2%2020.1%2012.7%201.5%2022%201.2%2059.8-28.6%2021.7-17.2%2055.9-59.2%2067-74.4%2016.2-22%2023.8-43.1%2021.3-59.6-3.7-23.6-8.4-31.3-15.8-37.8Z'%20style='fill:%23fff'%20transform='scale(.88664)%20rotate(31.2%20485%20792.2)'/%3e%3cpath%20d='M484.7%20379c-5.4-11.1-17.6-28.5-.8-53.8a739%20739%200%200%201%2044.2-60.6c13.2-16.3%2046.7-46.2%2059.6-52%2013-6%2033.3-8.7%2044.2.2%2011%209.1%2016.5%2020.6%2023%2032.7%207.4%2013.8%2012.4%2029.3%201.6%2042.8-15.4%2019.2-34.3%2017-61.6%2031.5-27.7%2014.8-42.3%2023.1-55.7%2035.9%200%200%2052.2-21.6%2082-31.2%2029.8-9.7%2059.8-20%2074.8-8.5s14.6%2015.5%2018.4%2031.2c4.7%2019.4-7.2%2038-20.1%2048.6-13%2010.7-34.3%2016-57.4%2021-30.5%206.8-96.6%2015.1-124%202.6-27.5-12.6-24.4-32.8-28.2-40.5Z'%20style='fill:%23fff'%20transform='scale(.87906)%20rotate(31.2%20487.2%20893.5)'/%3e%3c/g%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'%20style='fill:none;stroke:%23000;stroke-width:16.57px'/%3e%3c/g%3e%3cg%20transform='rotate(-4.2%20-78%20211)%20scale(.10057)'%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'%20style='fill:%237fbbdd'/%3e%3cclipPath%20id='b'%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23b)'%3e%3cpath%20d='M413.3%20402.7c17.5%2018.9%2010%2045.7%2028.4%2043.4%2021.7-2.7%2030.9-15.7%2031.6-32.7.7-17-1-19.5-7.1-38-6.1-18.7-18.2-23.2-43.4-18.2-20.8%204.1-17.8%203-24%2010-6.4%207-14.5%2026-14.5%2026s8.4-12.7%2029%209.5Z'%20style='fill:%23fff'%20transform='matrix(.90907%200%200%20.85852%2037%2052.2)'/%3e%3c/g%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'%20style='fill:none;stroke:%23000;stroke-width:16.57px'/%3e%3c/g%3e%3c/svg%3e";async function V_(t,e,n={}){let r;if(nt(t)){if(r=document.querySelector(t),!r)throw new Error(`No such element: ${t}`)}else if(t instanceof HTMLElement)r=t;else throw new Error(`Invalid element: ${t}`);let o;try{const i=Rt(e)?e:await E2(e);if(i.baseUrl??(i.baseUrl=""),i.width??(i.width="container"),i.padding??(i.padding=10),r==document.body){const s=document.createElement("div");s.style.position="fixed",s.style.inset="0",s.style.overflow="hidden",r.appendChild(s),r=s}o=new A2(r,i,n),q_(o,n),await o.launch()}catch(i){r.innerText=i.toString(),console.error(i)}return{finalize(){for(o.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(i,s){const a=o._eventListeners;let c=a.get(i);c||(c=new Set,a.set(i,c)),c.add(s)},removeEventListener(i,s){var c;(c=o._eventListeners.get(i))==null||c.delete(s)},getScaleResolutionByName(i){return o.getNamedScaleResolutions().get(i)},updateNamedData:o.updateNamedData.bind(o)}}function q_(t,e){e.namedDataProvider&&t.registerNamedDataProvider(e.namedDataProvider)}async function E2(t){let e;try{const n=await fetch(t);if(!n.ok)throw new Error(`${n.status} ${n.statusText}`);e=await n.json()}catch(n){throw new Error(`Could not load or parse configuration: ${t}, reason: ${n.message}`)}if(!e.baseUrl){const n=t.match(/^[^?#]*\//);e.baseUrl=n&&n[0]||"./"}return e}function Al(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function j_(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var zh={},la={},S2;function W_(){if(S2)return la;S2=1,la.byteLength=a,la.toByteArray=l,la.fromByteArray=h;for(var t=[],e=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=r.length;o<i;++o)t[o]=r[o],e[r.charCodeAt(o)]=o;e[45]=62,e[95]=63;function s(d){var p=d.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=d.indexOf("=");y===-1&&(y=p);var v=y===p?0:4-y%4;return[y,v]}function a(d){var p=s(d),y=p[0],v=p[1];return(y+v)*3/4-v}function c(d,p,y){return(p+y)*3/4-y}function l(d){var p,y=s(d),v=y[0],b=y[1],A=new n(c(d,v,b)),C=0,E=b>0?v-4:v,I;for(I=0;I<E;I+=4)p=e[d.charCodeAt(I)]<<18|e[d.charCodeAt(I+1)]<<12|e[d.charCodeAt(I+2)]<<6|e[d.charCodeAt(I+3)],A[C++]=p>>16&255,A[C++]=p>>8&255,A[C++]=p&255;return b===2&&(p=e[d.charCodeAt(I)]<<2|e[d.charCodeAt(I+1)]>>4,A[C++]=p&255),b===1&&(p=e[d.charCodeAt(I)]<<10|e[d.charCodeAt(I+1)]<<4|e[d.charCodeAt(I+2)]>>2,A[C++]=p>>8&255,A[C++]=p&255),A}function u(d){return t[d>>18&63]+t[d>>12&63]+t[d>>6&63]+t[d&63]}function f(d,p,y){for(var v,b=[],A=p;A<y;A+=3)v=(d[A]<<16&16711680)+(d[A+1]<<8&65280)+(d[A+2]&255),b.push(u(v));return b.join("")}function h(d){for(var p,y=d.length,v=y%3,b=[],A=16383,C=0,E=y-v;C<E;C+=A)b.push(f(d,C,C+A>E?E:C+A));return v===1?(p=d[y-1],b.push(t[p>>2]+t[p<<4&63]+"==")):v===2&&(p=(d[y-2]<<8)+d[y-1],b.push(t[p>>10]+t[p>>4&63]+t[p<<2&63]+"=")),b.join("")}return la}var El={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var C2;function Q_(){return C2||(C2=1,El.read=function(t,e,n,r,o){var i,s,a=o*8-r-1,c=(1<<a)-1,l=c>>1,u=-7,f=n?o-1:0,h=n?-1:1,d=t[e+f];for(f+=h,i=d&(1<<-u)-1,d>>=-u,u+=a;u>0;i=i*256+t[e+f],f+=h,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=r;u>0;s=s*256+t[e+f],f+=h,u-=8);if(i===0)i=1-l;else{if(i===c)return s?NaN:(d?-1:1)*(1/0);s=s+Math.pow(2,r),i=i-l}return(d?-1:1)*s*Math.pow(2,i-r)},El.write=function(t,e,n,r,o,i){var s,a,c,l=i*8-o-1,u=(1<<l)-1,f=u>>1,h=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?1:-1,y=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?e+=h/c:e+=h*Math.pow(2,1-f),e*c>=2&&(s++,c/=2),s+f>=u?(a=0,s=u):s+f>=1?(a=(e*c-1)*Math.pow(2,o),s=s+f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[n+d]=a&255,d+=p,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;t[n+d]=s&255,d+=p,s/=256,l-=8);t[n+d-p]|=y*128}),El}/*!
|
|
621
621
|
* The buffer module from node.js, for the browser.
|
|
622
622
|
*
|
|
623
623
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
624
624
|
* @license MIT
|
|
625
|
-
*/var Hy;function Gs(){return Hy||(Hy=1,function(e){const t=UR(),n=GR(),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=o(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const k=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(k,m),k.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(k){if(k>i)throw new RangeError('The value "'+k+'" is invalid for option "size"');const m=new Uint8Array(k);return Object.setPrototypeOf(m,s.prototype),m}function s(k,m,w){if(typeof k=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(k)}return c(k,m,w)}s.poolSize=8192;function c(k,m,w){if(typeof k=="string")return h(k,m);if(ArrayBuffer.isView(k))return p(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(tt(k,ArrayBuffer)||k&&tt(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tt(k,SharedArrayBuffer)||k&&tt(k.buffer,SharedArrayBuffer)))return b(k,m,w);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const N=k.valueOf&&k.valueOf();if(N!=null&&N!==k)return s.from(N,m,w);const x=v(k);if(x)return x;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return s.from(k[Symbol.toPrimitive]("string"),m,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}s.from=function(k,m,w){return c(k,m,w)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function u(k,m,w){return l(k),k<=0?a(k):m!==void 0?typeof w=="string"?a(k).fill(m,w):a(k).fill(m):a(k)}s.alloc=function(k,m,w){return u(k,m,w)};function f(k){return l(k),a(k<0?0:y(k)|0)}s.allocUnsafe=function(k){return f(k)},s.allocUnsafeSlow=function(k){return f(k)};function h(k,m){if((typeof m!="string"||m==="")&&(m="utf8"),!s.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const w=_(k,m)|0;let N=a(w);const x=N.write(k,m);return x!==w&&(N=N.slice(0,x)),N}function d(k){const m=k.length<0?0:y(k.length)|0,w=a(m);for(let N=0;N<m;N+=1)w[N]=k[N]&255;return w}function p(k){if(tt(k,Uint8Array)){const m=new Uint8Array(k);return b(m.buffer,m.byteOffset,m.byteLength)}return d(k)}function b(k,m,w){if(m<0||k.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<m+(w||0))throw new RangeError('"length" is outside of buffer bounds');let N;return m===void 0&&w===void 0?N=new Uint8Array(k):w===void 0?N=new Uint8Array(k,m):N=new Uint8Array(k,m,w),Object.setPrototypeOf(N,s.prototype),N}function v(k){if(s.isBuffer(k)){const m=y(k.length)|0,w=a(m);return w.length===0||k.copy(w,0,0,m),w}if(k.length!==void 0)return typeof k.length!="number"||Pt(k.length)?a(0):d(k);if(k.type==="Buffer"&&Array.isArray(k.data))return d(k.data)}function y(k){if(k>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return k|0}function A(k){return+k!=k&&(k=0),s.alloc(+k)}s.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==s.prototype},s.compare=function(m,w){if(tt(m,Uint8Array)&&(m=s.from(m,m.offset,m.byteLength)),tt(w,Uint8Array)&&(w=s.from(w,w.offset,w.byteLength)),!s.isBuffer(m)||!s.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(m===w)return 0;let N=m.length,x=w.length;for(let z=0,V=Math.min(N,x);z<V;++z)if(m[z]!==w[z]){N=m[z],x=w[z];break}return N<x?-1:x<N?1:0},s.isEncoding=function(m){switch(String(m).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(m,w){if(!Array.isArray(m))throw new TypeError('"list" argument must be an Array of Buffers');if(m.length===0)return s.alloc(0);let N;if(w===void 0)for(w=0,N=0;N<m.length;++N)w+=m[N].length;const x=s.allocUnsafe(w);let z=0;for(N=0;N<m.length;++N){let V=m[N];if(tt(V,Uint8Array))z+V.length>x.length?(s.isBuffer(V)||(V=s.from(V)),V.copy(x,z)):Uint8Array.prototype.set.call(x,V,z);else if(s.isBuffer(V))V.copy(x,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=V.length}return x};function _(k,m){if(s.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||tt(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const w=k.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&w===0)return 0;let x=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return xe(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return nn(k).length;default:if(x)return N?-1:xe(k).length;m=(""+m).toLowerCase(),x=!0}}s.byteLength=_;function E(k,m,w){let N=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,m>>>=0,w<=m))return"";for(k||(k="utf8");;)switch(k){case"hex":return pe(this,m,w);case"utf8":case"utf-8":return se(this,m,w);case"ascii":return le(this,m,w);case"latin1":case"binary":return Ee(this,m,w);case"base64":return Q(this,m,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,m,w);default:if(N)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),N=!0}}s.prototype._isBuffer=!0;function C(k,m,w){const N=k[m];k[m]=k[w],k[w]=N}s.prototype.swap16=function(){const m=this.length;if(m%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<m;w+=2)C(this,w,w+1);return this},s.prototype.swap32=function(){const m=this.length;if(m%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<m;w+=4)C(this,w,w+3),C(this,w+1,w+2);return this},s.prototype.swap64=function(){const m=this.length;if(m%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<m;w+=8)C(this,w,w+7),C(this,w+1,w+6),C(this,w+2,w+5),C(this,w+3,w+4);return this},s.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?se(this,0,m):E.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(m){if(!s.isBuffer(m))throw new TypeError("Argument must be a Buffer");return this===m?!0:s.compare(this,m)===0},s.prototype.inspect=function(){let m="";const w=e.INSPECT_MAX_BYTES;return m=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(m+=" ... "),"<Buffer "+m+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(m,w,N,x,z){if(tt(m,Uint8Array)&&(m=s.from(m,m.offset,m.byteLength)),!s.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(w===void 0&&(w=0),N===void 0&&(N=m?m.length:0),x===void 0&&(x=0),z===void 0&&(z=this.length),w<0||N>m.length||x<0||z>this.length)throw new RangeError("out of range index");if(x>=z&&w>=N)return 0;if(x>=z)return-1;if(w>=N)return 1;if(w>>>=0,N>>>=0,x>>>=0,z>>>=0,this===m)return 0;let V=z-x,ae=N-w;const G=Math.min(V,ae),Y=this.slice(x,z),T=m.slice(w,N);for(let ne=0;ne<G;++ne)if(Y[ne]!==T[ne]){V=Y[ne],ae=T[ne];break}return V<ae?-1:ae<V?1:0};function R(k,m,w,N,x){if(k.length===0)return-1;if(typeof w=="string"?(N=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,Pt(w)&&(w=x?0:k.length-1),w<0&&(w=k.length+w),w>=k.length){if(x)return-1;w=k.length-1}else if(w<0)if(x)w=0;else return-1;if(typeof m=="string"&&(m=s.from(m,N)),s.isBuffer(m))return m.length===0?-1:D(k,m,w,N,x);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?x?Uint8Array.prototype.indexOf.call(k,m,w):Uint8Array.prototype.lastIndexOf.call(k,m,w):D(k,[m],w,N,x);throw new TypeError("val must be string, number or Buffer")}function D(k,m,w,N,x){let z=1,V=k.length,ae=m.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(k.length<2||m.length<2)return-1;z=2,V/=2,ae/=2,w/=2}function G(T,ne){return z===1?T[ne]:T.readUInt16BE(ne*z)}let Y;if(x){let T=-1;for(Y=w;Y<V;Y++)if(G(k,Y)===G(m,T===-1?0:Y-T)){if(T===-1&&(T=Y),Y-T+1===ae)return T*z}else T!==-1&&(Y-=Y-T),T=-1}else for(w+ae>V&&(w=V-ae),Y=w;Y>=0;Y--){let T=!0;for(let ne=0;ne<ae;ne++)if(G(k,Y+ne)!==G(m,ne)){T=!1;break}if(T)return Y}return-1}s.prototype.includes=function(m,w,N){return this.indexOf(m,w,N)!==-1},s.prototype.indexOf=function(m,w,N){return R(this,m,w,N,!0)},s.prototype.lastIndexOf=function(m,w,N){return R(this,m,w,N,!1)};function O(k,m,w,N){w=Number(w)||0;const x=k.length-w;N?(N=Number(N),N>x&&(N=x)):N=x;const z=m.length;N>z/2&&(N=z/2);let V;for(V=0;V<N;++V){const ae=parseInt(m.substr(V*2,2),16);if(Pt(ae))return V;k[w+V]=ae}return V}function F(k,m,w,N){return Dt(xe(m,k.length-w),k,w,N)}function P(k,m,w,N){return Dt(Be(m),k,w,N)}function S(k,m,w,N){return Dt(nn(m),k,w,N)}function Z(k,m,w,N){return Dt(gt(m,k.length-w),k,w,N)}s.prototype.write=function(m,w,N,x){if(w===void 0)x="utf8",N=this.length,w=0;else if(N===void 0&&typeof w=="string")x=w,N=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(N)?(N=N>>>0,x===void 0&&(x="utf8")):(x=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const z=this.length-w;if((N===void 0||N>z)&&(N=z),m.length>0&&(N<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");let V=!1;for(;;)switch(x){case"hex":return O(this,m,w,N);case"utf8":case"utf-8":return F(this,m,w,N);case"ascii":case"latin1":case"binary":return P(this,m,w,N);case"base64":return S(this,m,w,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,m,w,N);default:if(V)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),V=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(k,m,w){return m===0&&w===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(m,w))}function se(k,m,w){w=Math.min(k.length,w);const N=[];let x=m;for(;x<w;){const z=k[x];let V=null,ae=z>239?4:z>223?3:z>191?2:1;if(x+ae<=w){let G,Y,T,ne;switch(ae){case 1:z<128&&(V=z);break;case 2:G=k[x+1],(G&192)===128&&(ne=(z&31)<<6|G&63,ne>127&&(V=ne));break;case 3:G=k[x+1],Y=k[x+2],(G&192)===128&&(Y&192)===128&&(ne=(z&15)<<12|(G&63)<<6|Y&63,ne>2047&&(ne<55296||ne>57343)&&(V=ne));break;case 4:G=k[x+1],Y=k[x+2],T=k[x+3],(G&192)===128&&(Y&192)===128&&(T&192)===128&&(ne=(z&15)<<18|(G&63)<<12|(Y&63)<<6|T&63,ne>65535&&ne<1114112&&(V=ne))}}V===null?(V=65533,ae=1):V>65535&&(V-=65536,N.push(V>>>10&1023|55296),V=56320|V&1023),N.push(V),x+=ae}return fe(N)}const ce=4096;function fe(k){const m=k.length;if(m<=ce)return String.fromCharCode.apply(String,k);let w="",N=0;for(;N<m;)w+=String.fromCharCode.apply(String,k.slice(N,N+=ce));return w}function le(k,m,w){let N="";w=Math.min(k.length,w);for(let x=m;x<w;++x)N+=String.fromCharCode(k[x]&127);return N}function Ee(k,m,w){let N="";w=Math.min(k.length,w);for(let x=m;x<w;++x)N+=String.fromCharCode(k[x]);return N}function pe(k,m,w){const N=k.length;(!m||m<0)&&(m=0),(!w||w<0||w>N)&&(w=N);let x="";for(let z=m;z<w;++z)x+=Ht[k[z]];return x}function _e(k,m,w){const N=k.slice(m,w);let x="";for(let z=0;z<N.length-1;z+=2)x+=String.fromCharCode(N[z]+N[z+1]*256);return x}s.prototype.slice=function(m,w){const N=this.length;m=~~m,w=w===void 0?N:~~w,m<0?(m+=N,m<0&&(m=0)):m>N&&(m=N),w<0?(w+=N,w<0&&(w=0)):w>N&&(w=N),w<m&&(w=m);const x=this.subarray(m,w);return Object.setPrototypeOf(x,s.prototype),x};function Ce(k,m,w){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+m>w)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(m,w,N){m=m>>>0,w=w>>>0,N||Ce(m,w,this.length);let x=this[m],z=1,V=0;for(;++V<w&&(z*=256);)x+=this[m+V]*z;return x},s.prototype.readUintBE=s.prototype.readUIntBE=function(m,w,N){m=m>>>0,w=w>>>0,N||Ce(m,w,this.length);let x=this[m+--w],z=1;for(;w>0&&(z*=256);)x+=this[m+--w]*z;return x},s.prototype.readUint8=s.prototype.readUInt8=function(m,w){return m=m>>>0,w||Ce(m,1,this.length),this[m]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(m,w){return m=m>>>0,w||Ce(m,2,this.length),this[m]|this[m+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(m,w){return m=m>>>0,w||Ce(m,2,this.length),this[m]<<8|this[m+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(m,w){return m=m>>>0,w||Ce(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+this[m+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(m,w){return m=m>>>0,w||Ce(m,4,this.length),this[m]*16777216+(this[m+1]<<16|this[m+2]<<8|this[m+3])},s.prototype.readBigUInt64LE=nt(function(m){m=m>>>0,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(m,this.length-8);const x=w+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24,z=this[++m]+this[++m]*2**8+this[++m]*2**16+N*2**24;return BigInt(x)+(BigInt(z)<<BigInt(32))}),s.prototype.readBigUInt64BE=nt(function(m){m=m>>>0,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(m,this.length-8);const x=w*2**24+this[++m]*2**16+this[++m]*2**8+this[++m],z=this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+N;return(BigInt(x)<<BigInt(32))+BigInt(z)}),s.prototype.readIntLE=function(m,w,N){m=m>>>0,w=w>>>0,N||Ce(m,w,this.length);let x=this[m],z=1,V=0;for(;++V<w&&(z*=256);)x+=this[m+V]*z;return z*=128,x>=z&&(x-=Math.pow(2,8*w)),x},s.prototype.readIntBE=function(m,w,N){m=m>>>0,w=w>>>0,N||Ce(m,w,this.length);let x=w,z=1,V=this[m+--x];for(;x>0&&(z*=256);)V+=this[m+--x]*z;return z*=128,V>=z&&(V-=Math.pow(2,8*w)),V},s.prototype.readInt8=function(m,w){return m=m>>>0,w||Ce(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},s.prototype.readInt16LE=function(m,w){m=m>>>0,w||Ce(m,2,this.length);const N=this[m]|this[m+1]<<8;return N&32768?N|4294901760:N},s.prototype.readInt16BE=function(m,w){m=m>>>0,w||Ce(m,2,this.length);const N=this[m+1]|this[m]<<8;return N&32768?N|4294901760:N},s.prototype.readInt32LE=function(m,w){return m=m>>>0,w||Ce(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},s.prototype.readInt32BE=function(m,w){return m=m>>>0,w||Ce(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},s.prototype.readBigInt64LE=nt(function(m){m=m>>>0,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(m,this.length-8);const x=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(N<<24);return(BigInt(x)<<BigInt(32))+BigInt(w+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24)}),s.prototype.readBigInt64BE=nt(function(m){m=m>>>0,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(m,this.length-8);const x=(w<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(x)<<BigInt(32))+BigInt(this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+N)}),s.prototype.readFloatLE=function(m,w){return m=m>>>0,w||Ce(m,4,this.length),n.read(this,m,!0,23,4)},s.prototype.readFloatBE=function(m,w){return m=m>>>0,w||Ce(m,4,this.length),n.read(this,m,!1,23,4)},s.prototype.readDoubleLE=function(m,w){return m=m>>>0,w||Ce(m,8,this.length),n.read(this,m,!0,52,8)},s.prototype.readDoubleBE=function(m,w){return m=m>>>0,w||Ce(m,8,this.length),n.read(this,m,!1,52,8)};function we(k,m,w,N,x,z){if(!s.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>x||m<z)throw new RangeError('"value" argument is out of bounds');if(w+N>k.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(m,w,N,x){if(m=+m,w=w>>>0,N=N>>>0,!x){const ae=Math.pow(2,8*N)-1;we(this,m,w,N,ae,0)}let z=1,V=0;for(this[w]=m&255;++V<N&&(z*=256);)this[w+V]=m/z&255;return w+N},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(m,w,N,x){if(m=+m,w=w>>>0,N=N>>>0,!x){const ae=Math.pow(2,8*N)-1;we(this,m,w,N,ae,0)}let z=N-1,V=1;for(this[w+z]=m&255;--z>=0&&(V*=256);)this[w+z]=m/V&255;return w+N},s.prototype.writeUint8=s.prototype.writeUInt8=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,1,255,0),this[w]=m&255,w+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,2,65535,0),this[w]=m&255,this[w+1]=m>>>8,w+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,2,65535,0),this[w]=m>>>8,this[w+1]=m&255,w+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,4,4294967295,0),this[w+3]=m>>>24,this[w+2]=m>>>16,this[w+1]=m>>>8,this[w]=m&255,w+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,4,4294967295,0),this[w]=m>>>24,this[w+1]=m>>>16,this[w+2]=m>>>8,this[w+3]=m&255,w+4};function Te(k,m,w,N,x){I(m,N,x,k,w,7);let z=Number(m&BigInt(4294967295));k[w++]=z,z=z>>8,k[w++]=z,z=z>>8,k[w++]=z,z=z>>8,k[w++]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return k[w++]=V,V=V>>8,k[w++]=V,V=V>>8,k[w++]=V,V=V>>8,k[w++]=V,w}function Ve(k,m,w,N,x){I(m,N,x,k,w,7);let z=Number(m&BigInt(4294967295));k[w+7]=z,z=z>>8,k[w+6]=z,z=z>>8,k[w+5]=z,z=z>>8,k[w+4]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return k[w+3]=V,V=V>>8,k[w+2]=V,V=V>>8,k[w+1]=V,V=V>>8,k[w]=V,w+8}s.prototype.writeBigUInt64LE=nt(function(m,w=0){return Te(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=nt(function(m,w=0){return Ve(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(m,w,N,x){if(m=+m,w=w>>>0,!x){const G=Math.pow(2,8*N-1);we(this,m,w,N,G-1,-G)}let z=0,V=1,ae=0;for(this[w]=m&255;++z<N&&(V*=256);)m<0&&ae===0&&this[w+z-1]!==0&&(ae=1),this[w+z]=(m/V>>0)-ae&255;return w+N},s.prototype.writeIntBE=function(m,w,N,x){if(m=+m,w=w>>>0,!x){const G=Math.pow(2,8*N-1);we(this,m,w,N,G-1,-G)}let z=N-1,V=1,ae=0;for(this[w+z]=m&255;--z>=0&&(V*=256);)m<0&&ae===0&&this[w+z+1]!==0&&(ae=1),this[w+z]=(m/V>>0)-ae&255;return w+N},s.prototype.writeInt8=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,1,127,-128),m<0&&(m=255+m+1),this[w]=m&255,w+1},s.prototype.writeInt16LE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,2,32767,-32768),this[w]=m&255,this[w+1]=m>>>8,w+2},s.prototype.writeInt16BE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,2,32767,-32768),this[w]=m>>>8,this[w+1]=m&255,w+2},s.prototype.writeInt32LE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,4,2147483647,-2147483648),this[w]=m&255,this[w+1]=m>>>8,this[w+2]=m>>>16,this[w+3]=m>>>24,w+4},s.prototype.writeInt32BE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[w]=m>>>24,this[w+1]=m>>>16,this[w+2]=m>>>8,this[w+3]=m&255,w+4},s.prototype.writeBigInt64LE=nt(function(m,w=0){return Te(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=nt(function(m,w=0){return Ve(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Le(k,m,w,N,x,z){if(w+N>k.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function j(k,m,w,N,x){return m=+m,w=w>>>0,x||Le(k,m,w,4),n.write(k,m,w,N,23,4),w+4}s.prototype.writeFloatLE=function(m,w,N){return j(this,m,w,!0,N)},s.prototype.writeFloatBE=function(m,w,N){return j(this,m,w,!1,N)};function q(k,m,w,N,x){return m=+m,w=w>>>0,x||Le(k,m,w,8),n.write(k,m,w,N,52,8),w+8}s.prototype.writeDoubleLE=function(m,w,N){return q(this,m,w,!0,N)},s.prototype.writeDoubleBE=function(m,w,N){return q(this,m,w,!1,N)},s.prototype.copy=function(m,w,N,x){if(!s.isBuffer(m))throw new TypeError("argument should be a Buffer");if(N||(N=0),!x&&x!==0&&(x=this.length),w>=m.length&&(w=m.length),w||(w=0),x>0&&x<N&&(x=N),x===N||m.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),m.length-w<x-N&&(x=m.length-w+N);const z=x-N;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(w,N,x):Uint8Array.prototype.set.call(m,this.subarray(N,x),w),z},s.prototype.fill=function(m,w,N,x){if(typeof m=="string"){if(typeof w=="string"?(x=w,w=0,N=this.length):typeof N=="string"&&(x=N,N=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!s.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(m.length===1){const V=m.charCodeAt(0);(x==="utf8"&&V<128||x==="latin1")&&(m=V)}}else typeof m=="number"?m=m&255:typeof m=="boolean"&&(m=Number(m));if(w<0||this.length<w||this.length<N)throw new RangeError("Out of range index");if(N<=w)return this;w=w>>>0,N=N===void 0?this.length:N>>>0,m||(m=0);let z;if(typeof m=="number")for(z=w;z<N;++z)this[z]=m;else{const V=s.isBuffer(m)?m:s.from(m,x),ae=V.length;if(ae===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(z=0;z<N-w;++z)this[z+w]=V[z%ae]}return this};const re={};function $(k,m,w){re[k]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(x){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:x,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}$("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$("ERR_INVALID_ARG_TYPE",function(k,m){return`The "${k}" argument must be of type number. Received type ${typeof m}`},TypeError),$("ERR_OUT_OF_RANGE",function(k,m,w){let N=`The value of "${k}" is out of range.`,x=w;return Number.isInteger(w)&&Math.abs(w)>2**32?x=ue(String(w)):typeof w=="bigint"&&(x=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(x=ue(x)),x+="n"),N+=` It must be ${m}. Received ${x}`,N},RangeError);function ue(k){let m="",w=k.length;const N=k[0]==="-"?1:0;for(;w>=N+4;w-=3)m=`_${k.slice(w-3,w)}${m}`;return`${k.slice(0,w)}${m}`}function L(k,m,w){ee(m,"offset"),(k[m]===void 0||k[m+w]===void 0)&&oe(m,k.length-(w+1))}function I(k,m,w,N,x,z){if(k>w||k<m){const V=typeof m=="bigint"?"n":"";let ae;throw m===0||m===BigInt(0)?ae=`>= 0${V} and < 2${V} ** ${(z+1)*8}${V}`:ae=`>= -(2${V} ** ${(z+1)*8-1}${V}) and < 2 ** ${(z+1)*8-1}${V}`,new re.ERR_OUT_OF_RANGE("value",ae,k)}L(N,x,z)}function ee(k,m){if(typeof k!="number")throw new re.ERR_INVALID_ARG_TYPE(m,"number",k)}function oe(k,m,w){throw Math.floor(k)!==k?(ee(k,w),new re.ERR_OUT_OF_RANGE("offset","an integer",k)):m<0?new re.ERR_BUFFER_OUT_OF_BOUNDS:new re.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${m}`,k)}const Ie=/[^+/0-9A-Za-z-_]/g;function ye(k){if(k=k.split("=")[0],k=k.trim().replace(Ie,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function xe(k,m){m=m||1/0;let w;const N=k.length;let x=null;const z=[];for(let V=0;V<N;++V){if(w=k.charCodeAt(V),w>55295&&w<57344){if(!x){if(w>56319){(m-=3)>-1&&z.push(239,191,189);continue}else if(V+1===N){(m-=3)>-1&&z.push(239,191,189);continue}x=w;continue}if(w<56320){(m-=3)>-1&&z.push(239,191,189),x=w;continue}w=(x-55296<<10|w-56320)+65536}else x&&(m-=3)>-1&&z.push(239,191,189);if(x=null,w<128){if((m-=1)<0)break;z.push(w)}else if(w<2048){if((m-=2)<0)break;z.push(w>>6|192,w&63|128)}else if(w<65536){if((m-=3)<0)break;z.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((m-=4)<0)break;z.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return z}function Be(k){const m=[];for(let w=0;w<k.length;++w)m.push(k.charCodeAt(w)&255);return m}function gt(k,m){let w,N,x;const z=[];for(let V=0;V<k.length&&!((m-=2)<0);++V)w=k.charCodeAt(V),N=w>>8,x=w%256,z.push(x),z.push(N);return z}function nn(k){return t.toByteArray(ye(k))}function Dt(k,m,w,N){let x;for(x=0;x<N&&!(x+w>=m.length||x>=k.length);++x)m[x+w]=k[x];return x}function tt(k,m){return k instanceof m||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===m.name}function Pt(k){return k!==k}const Ht=function(){const k="0123456789abcdef",m=new Array(256);for(let w=0;w<16;++w){const N=w*16;for(let x=0;x<16;++x)m[N+x]=k[w]+k[x]}return m}();function nt(k){return typeof BigInt>"u"?Vt:k}function Vt(){throw new Error("BigInt not supported")}}(Nd)),Nd}var $e=Gs();const HR=Ye({__proto__:null,default:fu($e)},[$e]),Tt={},VR=Object.freeze(Object.defineProperty({__proto__:null,default:Tt},Symbol.toStringTag,{value:"Module"}));function Vy(e){return(typeof e=="object"&&e!==null&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}class Fn{async getBufferFromResponse(t){const n=await t.arrayBuffer();return $e.Buffer.from(n)}constructor(t,n={}){this.baseOverrides={},this.url=t;const r=n.fetch||globalThis.fetch.bind(globalThis);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`);try{r=await this.fetchImplementation(t,{...n,cache:"reload"})}catch(o){throw new Error(`${Vy(o)} fetching ${t}`,{cause:o})}}else throw new Error(`${Vy(i)} fetching ${t}`,{cause:i})}return r}async read(t,n=0,r,i=0,o={}){const{headers:a={},signal:s,overrides:c={}}=o;r<1/0?a.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(a.range=`bytes=${i}-`);const l=await this.fetch(this.url,{...this.baseOverrides,...c,headers:{...a,...c.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${this.url}`);if(l.status===200&&i===0||l.status===206){const u=await this.getBufferFromResponse(l),f=u.copy(t,n,0,Math.min(r,u.length)),h=l.headers.get("content-range"),d=/\/(\d+)$/.exec(h||"");return d!=null&&d[1]&&(this._stat={size:parseInt(d[1],10)}),{bytesRead:f,buffer:t}}throw l.status===200?new Error(`${this.url} fetch returned status 200, expected 206`):new Error(`HTTP ${l.status} fetching ${this.url}`)}async readFile(t={}){let n,r;typeof t=="string"?(n=t,r={}):(n=t.encoding,r=t,delete r.encoding);const{headers:i={},signal:o,overrides:a={}}=r,s=await this.fetch(this.url,{headers:i,method:"GET",redirect:"follow",mode:"cors",signal:o,...this.baseOverrides,...a});if(s.status!==200)throw new Error(`HTTP ${s.status} fetching ${this.url}`);if(n==="utf8")return s.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(s)}async stat(){if(!this._stat){const t=$e.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 qy(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 qR(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 jR{constructor(t){this.blob=t,this.size=t.size}async read(t,n=0,r,i=0){if(!r)return{bytesRead:0,buffer:t};const o=i,a=o+r,s=await qy(this.blob.slice(o,a)),c=$e.Buffer.from(s);return{bytesRead:c.copy(t,n),buffer:c}}async readFile(t){const n=typeof t=="string"?t:t==null?void 0:t.encoding;if(n==="utf8")return qR(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await qy(this.blob);return $e.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function jy(e,t={}){return new Fn(e,t)}function WR(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return jy(e,r);if(t!==void 0)return new Tt(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const Hs=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:jR,LocalFile:Tt,RemoteFile:Fn,fromUrl:jy,open:WR},Symbol.toStringTag,{value:"Module"}));var Od={},Wy;function Yr(){return Wy||(Wy=1,function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(o,a){return Object.prototype.hasOwnProperty.call(o,a)}e.assign=function(o){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var s=a.shift();if(s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var c in s)n(s,c)&&(o[c]=s[c])}}return o},e.shrinkBuf=function(o,a){return o.length===a?o:o.subarray?o.subarray(0,a):(o.length=a,o)};var r={arraySet:function(o,a,s,c,l){if(a.subarray&&o.subarray){o.set(a.subarray(s,s+c),l);return}for(var u=0;u<c;u++)o[l+u]=a[s+u]},flattenChunks:function(o){var a,s,c,l,u,f;for(c=0,a=0,s=o.length;a<s;a++)c+=o[a].length;for(f=new Uint8Array(c),l=0,a=0,s=o.length;a<s;a++)u=o[a],f.set(u,l),l+=u.length;return f}},i={arraySet:function(o,a,s,c,l){for(var u=0;u<c;u++)o[l+u]=a[s+u]},flattenChunks:function(o){return[].concat.apply([],o)}};e.setTyped=function(o){o?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)}(Od)),Od}var Fo={},Mn={},Oi={},Zy;function ZR(){if(Zy)return Oi;Zy=1;var e=Yr(),t=4,n=0,r=1,i=2;function o(x){for(var z=x.length;--z>=0;)x[z]=0}var a=0,s=1,c=2,l=3,u=258,f=29,h=256,d=h+1+f,p=30,b=19,v=2*d+1,y=15,A=16,_=7,E=256,C=16,R=17,D=18,O=[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],F=[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],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Z=512,Q=new Array((d+2)*2);o(Q);var se=new Array(p*2);o(se);var ce=new Array(Z);o(ce);var fe=new Array(u-l+1);o(fe);var le=new Array(f);o(le);var Ee=new Array(p);o(Ee);function pe(x,z,V,ae,G){this.static_tree=x,this.extra_bits=z,this.extra_base=V,this.elems=ae,this.max_length=G,this.has_stree=x&&x.length}var _e,Ce,we;function Te(x,z){this.dyn_tree=x,this.max_code=0,this.stat_desc=z}function Ve(x){return x<256?ce[x]:ce[256+(x>>>7)]}function Le(x,z){x.pending_buf[x.pending++]=z&255,x.pending_buf[x.pending++]=z>>>8&255}function j(x,z,V){x.bi_valid>A-V?(x.bi_buf|=z<<x.bi_valid&65535,Le(x,x.bi_buf),x.bi_buf=z>>A-x.bi_valid,x.bi_valid+=V-A):(x.bi_buf|=z<<x.bi_valid&65535,x.bi_valid+=V)}function q(x,z,V){j(x,V[z*2],V[z*2+1])}function re(x,z){var V=0;do V|=x&1,x>>>=1,V<<=1;while(--z>0);return V>>>1}function $(x){x.bi_valid===16?(Le(x,x.bi_buf),x.bi_buf=0,x.bi_valid=0):x.bi_valid>=8&&(x.pending_buf[x.pending++]=x.bi_buf&255,x.bi_buf>>=8,x.bi_valid-=8)}function ue(x,z){var V=z.dyn_tree,ae=z.max_code,G=z.stat_desc.static_tree,Y=z.stat_desc.has_stree,T=z.stat_desc.extra_bits,ne=z.stat_desc.extra_base,ke=z.stat_desc.max_length,g,K,J,B,H,W,Se=0;for(B=0;B<=y;B++)x.bl_count[B]=0;for(V[x.heap[x.heap_max]*2+1]=0,g=x.heap_max+1;g<v;g++)K=x.heap[g],B=V[V[K*2+1]*2+1]+1,B>ke&&(B=ke,Se++),V[K*2+1]=B,!(K>ae)&&(x.bl_count[B]++,H=0,K>=ne&&(H=T[K-ne]),W=V[K*2],x.opt_len+=W*(B+H),Y&&(x.static_len+=W*(G[K*2+1]+H)));if(Se!==0){do{for(B=ke-1;x.bl_count[B]===0;)B--;x.bl_count[B]--,x.bl_count[B+1]+=2,x.bl_count[ke]--,Se-=2}while(Se>0);for(B=ke;B!==0;B--)for(K=x.bl_count[B];K!==0;)J=x.heap[--g],!(J>ae)&&(V[J*2+1]!==B&&(x.opt_len+=(B-V[J*2+1])*V[J*2],V[J*2+1]=B),K--)}}function L(x,z,V){var ae=new Array(y+1),G=0,Y,T;for(Y=1;Y<=y;Y++)ae[Y]=G=G+V[Y-1]<<1;for(T=0;T<=z;T++){var ne=x[T*2+1];ne!==0&&(x[T*2]=re(ae[ne]++,ne))}}function I(){var x,z,V,ae,G,Y=new Array(y+1);for(V=0,ae=0;ae<f-1;ae++)for(le[ae]=V,x=0;x<1<<O[ae];x++)fe[V++]=ae;for(fe[V-1]=ae,G=0,ae=0;ae<16;ae++)for(Ee[ae]=G,x=0;x<1<<F[ae];x++)ce[G++]=ae;for(G>>=7;ae<p;ae++)for(Ee[ae]=G<<7,x=0;x<1<<F[ae]-7;x++)ce[256+G++]=ae;for(z=0;z<=y;z++)Y[z]=0;for(x=0;x<=143;)Q[x*2+1]=8,x++,Y[8]++;for(;x<=255;)Q[x*2+1]=9,x++,Y[9]++;for(;x<=279;)Q[x*2+1]=7,x++,Y[7]++;for(;x<=287;)Q[x*2+1]=8,x++,Y[8]++;for(L(Q,d+1,Y),x=0;x<p;x++)se[x*2+1]=5,se[x*2]=re(x,5);_e=new pe(Q,O,h+1,d,y),Ce=new pe(se,F,0,p,y),we=new pe(new Array(0),P,0,b,_)}function ee(x){var z;for(z=0;z<d;z++)x.dyn_ltree[z*2]=0;for(z=0;z<p;z++)x.dyn_dtree[z*2]=0;for(z=0;z<b;z++)x.bl_tree[z*2]=0;x.dyn_ltree[E*2]=1,x.opt_len=x.static_len=0,x.last_lit=x.matches=0}function oe(x){x.bi_valid>8?Le(x,x.bi_buf):x.bi_valid>0&&(x.pending_buf[x.pending++]=x.bi_buf),x.bi_buf=0,x.bi_valid=0}function Ie(x,z,V,ae){oe(x),Le(x,V),Le(x,~V),e.arraySet(x.pending_buf,x.window,z,V,x.pending),x.pending+=V}function ye(x,z,V,ae){var G=z*2,Y=V*2;return x[G]<x[Y]||x[G]===x[Y]&&ae[z]<=ae[V]}function xe(x,z,V){for(var ae=x.heap[V],G=V<<1;G<=x.heap_len&&(G<x.heap_len&&ye(z,x.heap[G+1],x.heap[G],x.depth)&&G++,!ye(z,ae,x.heap[G],x.depth));)x.heap[V]=x.heap[G],V=G,G<<=1;x.heap[V]=ae}function Be(x,z,V){var ae,G,Y=0,T,ne;if(x.last_lit!==0)do ae=x.pending_buf[x.d_buf+Y*2]<<8|x.pending_buf[x.d_buf+Y*2+1],G=x.pending_buf[x.l_buf+Y],Y++,ae===0?q(x,G,z):(T=fe[G],q(x,T+h+1,z),ne=O[T],ne!==0&&(G-=le[T],j(x,G,ne)),ae--,T=Ve(ae),q(x,T,V),ne=F[T],ne!==0&&(ae-=Ee[T],j(x,ae,ne)));while(Y<x.last_lit);q(x,E,z)}function gt(x,z){var V=z.dyn_tree,ae=z.stat_desc.static_tree,G=z.stat_desc.has_stree,Y=z.stat_desc.elems,T,ne,ke=-1,g;for(x.heap_len=0,x.heap_max=v,T=0;T<Y;T++)V[T*2]!==0?(x.heap[++x.heap_len]=ke=T,x.depth[T]=0):V[T*2+1]=0;for(;x.heap_len<2;)g=x.heap[++x.heap_len]=ke<2?++ke:0,V[g*2]=1,x.depth[g]=0,x.opt_len--,G&&(x.static_len-=ae[g*2+1]);for(z.max_code=ke,T=x.heap_len>>1;T>=1;T--)xe(x,V,T);g=Y;do T=x.heap[1],x.heap[1]=x.heap[x.heap_len--],xe(x,V,1),ne=x.heap[1],x.heap[--x.heap_max]=T,x.heap[--x.heap_max]=ne,V[g*2]=V[T*2]+V[ne*2],x.depth[g]=(x.depth[T]>=x.depth[ne]?x.depth[T]:x.depth[ne])+1,V[T*2+1]=V[ne*2+1]=g,x.heap[1]=g++,xe(x,V,1);while(x.heap_len>=2);x.heap[--x.heap_max]=x.heap[1],ue(x,z),L(V,ke,x.bl_count)}function nn(x,z,V){var ae,G=-1,Y,T=z[0*2+1],ne=0,ke=7,g=4;for(T===0&&(ke=138,g=3),z[(V+1)*2+1]=65535,ae=0;ae<=V;ae++)Y=T,T=z[(ae+1)*2+1],!(++ne<ke&&Y===T)&&(ne<g?x.bl_tree[Y*2]+=ne:Y!==0?(Y!==G&&x.bl_tree[Y*2]++,x.bl_tree[C*2]++):ne<=10?x.bl_tree[R*2]++:x.bl_tree[D*2]++,ne=0,G=Y,T===0?(ke=138,g=3):Y===T?(ke=6,g=3):(ke=7,g=4))}function Dt(x,z,V){var ae,G=-1,Y,T=z[0*2+1],ne=0,ke=7,g=4;for(T===0&&(ke=138,g=3),ae=0;ae<=V;ae++)if(Y=T,T=z[(ae+1)*2+1],!(++ne<ke&&Y===T)){if(ne<g)do q(x,Y,x.bl_tree);while(--ne!==0);else Y!==0?(Y!==G&&(q(x,Y,x.bl_tree),ne--),q(x,C,x.bl_tree),j(x,ne-3,2)):ne<=10?(q(x,R,x.bl_tree),j(x,ne-3,3)):(q(x,D,x.bl_tree),j(x,ne-11,7));ne=0,G=Y,T===0?(ke=138,g=3):Y===T?(ke=6,g=3):(ke=7,g=4)}}function tt(x){var z;for(nn(x,x.dyn_ltree,x.l_desc.max_code),nn(x,x.dyn_dtree,x.d_desc.max_code),gt(x,x.bl_desc),z=b-1;z>=3&&x.bl_tree[S[z]*2+1]===0;z--);return x.opt_len+=3*(z+1)+5+5+4,z}function Pt(x,z,V,ae){var G;for(j(x,z-257,5),j(x,V-1,5),j(x,ae-4,4),G=0;G<ae;G++)j(x,x.bl_tree[S[G]*2+1],3);Dt(x,x.dyn_ltree,z-1),Dt(x,x.dyn_dtree,V-1)}function Ht(x){var z=4093624447,V;for(V=0;V<=31;V++,z>>>=1)if(z&1&&x.dyn_ltree[V*2]!==0)return n;if(x.dyn_ltree[9*2]!==0||x.dyn_ltree[10*2]!==0||x.dyn_ltree[13*2]!==0)return r;for(V=32;V<h;V++)if(x.dyn_ltree[V*2]!==0)return r;return n}var nt=!1;function Vt(x){nt||(I(),nt=!0),x.l_desc=new Te(x.dyn_ltree,_e),x.d_desc=new Te(x.dyn_dtree,Ce),x.bl_desc=new Te(x.bl_tree,we),x.bi_buf=0,x.bi_valid=0,ee(x)}function k(x,z,V,ae){j(x,(a<<1)+(ae?1:0),3),Ie(x,z,V)}function m(x){j(x,s<<1,3),q(x,E,Q),$(x)}function w(x,z,V,ae){var G,Y,T=0;x.level>0?(x.strm.data_type===i&&(x.strm.data_type=Ht(x)),gt(x,x.l_desc),gt(x,x.d_desc),T=tt(x),G=x.opt_len+3+7>>>3,Y=x.static_len+3+7>>>3,Y<=G&&(G=Y)):G=Y=V+5,V+4<=G&&z!==-1?k(x,z,V,ae):x.strategy===t||Y===G?(j(x,(s<<1)+(ae?1:0),3),Be(x,Q,se)):(j(x,(c<<1)+(ae?1:0),3),Pt(x,x.l_desc.max_code+1,x.d_desc.max_code+1,T+1),Be(x,x.dyn_ltree,x.dyn_dtree)),ee(x),ae&&oe(x)}function N(x,z,V){return x.pending_buf[x.d_buf+x.last_lit*2]=z>>>8&255,x.pending_buf[x.d_buf+x.last_lit*2+1]=z&255,x.pending_buf[x.l_buf+x.last_lit]=V&255,x.last_lit++,z===0?x.dyn_ltree[V*2]++:(x.matches++,z--,x.dyn_ltree[(fe[V]+h+1)*2]++,x.dyn_dtree[Ve(z)*2]++),x.last_lit===x.lit_bufsize-1}return Oi._tr_init=Vt,Oi._tr_stored_block=k,Oi._tr_flush_block=w,Oi._tr_tally=N,Oi._tr_align=m,Oi}var zd,Yy;function Qy(){if(Yy)return zd;Yy=1;function e(t,n,r,i){for(var o=t&65535|0,a=t>>>16&65535|0,s=0;r!==0;){s=r>2e3?2e3:r,r-=s;do o=o+n[i++]|0,a=a+o|0;while(--s);o%=65521,a%=65521}return o|a<<16|0}return zd=e,zd}var Ud,Xy;function Ky(){if(Xy)return Ud;Xy=1;function e(){for(var r,i=[],o=0;o<256;o++){r=o;for(var a=0;a<8;a++)r=r&1?3988292384^r>>>1:r>>>1;i[o]=r}return i}var t=e();function n(r,i,o,a){var s=t,c=a+o;r^=-1;for(var l=a;l<c;l++)r=r>>>8^s[(r^i[l])&255];return r^-1}return Ud=n,Ud}var Gd,Jy;function Hd(){return Jy||(Jy=1,Gd={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"}),Gd}var $y;function YR(){if($y)return Mn;$y=1;var e=Yr(),t=ZR(),n=Qy(),r=Ky(),i=Hd(),o=0,a=1,s=3,c=4,l=5,u=0,f=1,h=-2,d=-3,p=-5,b=-1,v=1,y=2,A=3,_=4,E=0,C=2,R=8,D=9,O=15,F=8,P=29,S=256,Z=S+1+P,Q=30,se=19,ce=2*Z+1,fe=15,le=3,Ee=258,pe=Ee+le+1,_e=32,Ce=42,we=69,Te=73,Ve=91,Le=103,j=113,q=666,re=1,$=2,ue=3,L=4,I=3;function ee(g,K){return g.msg=i[K],K}function oe(g){return(g<<1)-(g>4?9:0)}function Ie(g){for(var K=g.length;--K>=0;)g[K]=0}function ye(g){var K=g.state,J=K.pending;J>g.avail_out&&(J=g.avail_out),J!==0&&(e.arraySet(g.output,K.pending_buf,K.pending_out,J,g.next_out),g.next_out+=J,K.pending_out+=J,g.total_out+=J,g.avail_out-=J,K.pending-=J,K.pending===0&&(K.pending_out=0))}function xe(g,K){t._tr_flush_block(g,g.block_start>=0?g.block_start:-1,g.strstart-g.block_start,K),g.block_start=g.strstart,ye(g.strm)}function Be(g,K){g.pending_buf[g.pending++]=K}function gt(g,K){g.pending_buf[g.pending++]=K>>>8&255,g.pending_buf[g.pending++]=K&255}function nn(g,K,J,B){var H=g.avail_in;return H>B&&(H=B),H===0?0:(g.avail_in-=H,e.arraySet(K,g.input,g.next_in,H,J),g.state.wrap===1?g.adler=n(g.adler,K,H,J):g.state.wrap===2&&(g.adler=r(g.adler,K,H,J)),g.next_in+=H,g.total_in+=H,H)}function Dt(g,K){var J=g.max_chain_length,B=g.strstart,H,W,Se=g.prev_length,ge=g.nice_match,be=g.strstart>g.w_size-pe?g.strstart-(g.w_size-pe):0,Ge=g.window,_n=g.w_mask,U=g.prev,Me=g.strstart+Ee,ft=Ge[B+Se-1],rt=Ge[B+Se];g.prev_length>=g.good_match&&(J>>=2),ge>g.lookahead&&(ge=g.lookahead);do if(H=K,!(Ge[H+Se]!==rt||Ge[H+Se-1]!==ft||Ge[H]!==Ge[B]||Ge[++H]!==Ge[B+1])){B+=2,H++;do;while(Ge[++B]===Ge[++H]&&Ge[++B]===Ge[++H]&&Ge[++B]===Ge[++H]&&Ge[++B]===Ge[++H]&&Ge[++B]===Ge[++H]&&Ge[++B]===Ge[++H]&&Ge[++B]===Ge[++H]&&Ge[++B]===Ge[++H]&&B<Me);if(W=Ee-(Me-B),B=Me-Ee,W>Se){if(g.match_start=K,Se=W,W>=ge)break;ft=Ge[B+Se-1],rt=Ge[B+Se]}}while((K=U[K&_n])>be&&--J!==0);return Se<=g.lookahead?Se:g.lookahead}function tt(g){var K=g.w_size,J,B,H,W,Se;do{if(W=g.window_size-g.lookahead-g.strstart,g.strstart>=K+(K-pe)){e.arraySet(g.window,g.window,K,K,0),g.match_start-=K,g.strstart-=K,g.block_start-=K,B=g.hash_size,J=B;do H=g.head[--J],g.head[J]=H>=K?H-K:0;while(--B);B=K,J=B;do H=g.prev[--J],g.prev[J]=H>=K?H-K:0;while(--B);W+=K}if(g.strm.avail_in===0)break;if(B=nn(g.strm,g.window,g.strstart+g.lookahead,W),g.lookahead+=B,g.lookahead+g.insert>=le)for(Se=g.strstart-g.insert,g.ins_h=g.window[Se],g.ins_h=(g.ins_h<<g.hash_shift^g.window[Se+1])&g.hash_mask;g.insert&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[Se+le-1])&g.hash_mask,g.prev[Se&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=Se,Se++,g.insert--,!(g.lookahead+g.insert<le)););}while(g.lookahead<pe&&g.strm.avail_in!==0)}function Pt(g,K){var J=65535;for(J>g.pending_buf_size-5&&(J=g.pending_buf_size-5);;){if(g.lookahead<=1){if(tt(g),g.lookahead===0&&K===o)return re;if(g.lookahead===0)break}g.strstart+=g.lookahead,g.lookahead=0;var B=g.block_start+J;if((g.strstart===0||g.strstart>=B)&&(g.lookahead=g.strstart-B,g.strstart=B,xe(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-pe&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=0,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):(g.strstart>g.block_start&&(xe(g,!1),g.strm.avail_out===0),re)}function Ht(g,K){for(var J,B;;){if(g.lookahead<pe){if(tt(g),g.lookahead<pe&&K===o)return re;if(g.lookahead===0)break}if(J=0,g.lookahead>=le&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+le-1])&g.hash_mask,J=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),J!==0&&g.strstart-J<=g.w_size-pe&&(g.match_length=Dt(g,J)),g.match_length>=le)if(B=t._tr_tally(g,g.strstart-g.match_start,g.match_length-le),g.lookahead-=g.match_length,g.match_length<=g.max_lazy_match&&g.lookahead>=le){g.match_length--;do g.strstart++,g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+le-1])&g.hash_mask,J=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart;while(--g.match_length!==0);g.strstart++}else g.strstart+=g.match_length,g.match_length=0,g.ins_h=g.window[g.strstart],g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+1])&g.hash_mask;else B=t._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++;if(B&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=g.strstart<le-1?g.strstart:le-1,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function nt(g,K){for(var J,B,H;;){if(g.lookahead<pe){if(tt(g),g.lookahead<pe&&K===o)return re;if(g.lookahead===0)break}if(J=0,g.lookahead>=le&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+le-1])&g.hash_mask,J=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),g.prev_length=g.match_length,g.prev_match=g.match_start,g.match_length=le-1,J!==0&&g.prev_length<g.max_lazy_match&&g.strstart-J<=g.w_size-pe&&(g.match_length=Dt(g,J),g.match_length<=5&&(g.strategy===v||g.match_length===le&&g.strstart-g.match_start>4096)&&(g.match_length=le-1)),g.prev_length>=le&&g.match_length<=g.prev_length){H=g.strstart+g.lookahead-le,B=t._tr_tally(g,g.strstart-1-g.prev_match,g.prev_length-le),g.lookahead-=g.prev_length-1,g.prev_length-=2;do++g.strstart<=H&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+le-1])&g.hash_mask,J=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart);while(--g.prev_length!==0);if(g.match_available=0,g.match_length=le-1,g.strstart++,B&&(xe(g,!1),g.strm.avail_out===0))return re}else if(g.match_available){if(B=t._tr_tally(g,0,g.window[g.strstart-1]),B&&xe(g,!1),g.strstart++,g.lookahead--,g.strm.avail_out===0)return re}else g.match_available=1,g.strstart++,g.lookahead--}return g.match_available&&(B=t._tr_tally(g,0,g.window[g.strstart-1]),g.match_available=0),g.insert=g.strstart<le-1?g.strstart:le-1,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function Vt(g,K){for(var J,B,H,W,Se=g.window;;){if(g.lookahead<=Ee){if(tt(g),g.lookahead<=Ee&&K===o)return re;if(g.lookahead===0)break}if(g.match_length=0,g.lookahead>=le&&g.strstart>0&&(H=g.strstart-1,B=Se[H],B===Se[++H]&&B===Se[++H]&&B===Se[++H])){W=g.strstart+Ee;do;while(B===Se[++H]&&B===Se[++H]&&B===Se[++H]&&B===Se[++H]&&B===Se[++H]&&B===Se[++H]&&B===Se[++H]&&B===Se[++H]&&H<W);g.match_length=Ee-(W-H),g.match_length>g.lookahead&&(g.match_length=g.lookahead)}if(g.match_length>=le?(J=t._tr_tally(g,1,g.match_length-le),g.lookahead-=g.match_length,g.strstart+=g.match_length,g.match_length=0):(J=t._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++),J&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=0,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function k(g,K){for(var J;;){if(g.lookahead===0&&(tt(g),g.lookahead===0)){if(K===o)return re;break}if(g.match_length=0,J=t._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++,J&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=0,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function m(g,K,J,B,H){this.good_length=g,this.max_lazy=K,this.nice_length=J,this.max_chain=B,this.func=H}var w;w=[new m(0,0,0,0,Pt),new m(4,4,8,4,Ht),new m(4,5,16,8,Ht),new m(4,6,32,32,Ht),new m(4,4,16,16,nt),new m(8,16,32,32,nt),new m(8,16,128,128,nt),new m(8,32,128,256,nt),new m(32,128,258,1024,nt),new m(32,258,258,4096,nt)];function N(g){g.window_size=2*g.w_size,Ie(g.head),g.max_lazy_match=w[g.level].max_lazy,g.good_match=w[g.level].good_length,g.nice_match=w[g.level].nice_length,g.max_chain_length=w[g.level].max_chain,g.strstart=0,g.block_start=0,g.lookahead=0,g.insert=0,g.match_length=g.prev_length=le-1,g.match_available=0,g.ins_h=0}function x(){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=R,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 e.Buf16(ce*2),this.dyn_dtree=new e.Buf16((2*Q+1)*2),this.bl_tree=new e.Buf16((2*se+1)*2),Ie(this.dyn_ltree),Ie(this.dyn_dtree),Ie(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(fe+1),this.heap=new e.Buf16(2*Z+1),Ie(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*Z+1),Ie(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 z(g){var K;return!g||!g.state?ee(g,h):(g.total_in=g.total_out=0,g.data_type=C,K=g.state,K.pending=0,K.pending_out=0,K.wrap<0&&(K.wrap=-K.wrap),K.status=K.wrap?Ce:j,g.adler=K.wrap===2?0:1,K.last_flush=o,t._tr_init(K),u)}function V(g){var K=z(g);return K===u&&N(g.state),K}function ae(g,K){return!g||!g.state||g.state.wrap!==2?h:(g.state.gzhead=K,u)}function G(g,K,J,B,H,W){if(!g)return h;var Se=1;if(K===b&&(K=6),B<0?(Se=0,B=-B):B>15&&(Se=2,B-=16),H<1||H>D||J!==R||B<8||B>15||K<0||K>9||W<0||W>_)return ee(g,h);B===8&&(B=9);var ge=new x;return g.state=ge,ge.strm=g,ge.wrap=Se,ge.gzhead=null,ge.w_bits=B,ge.w_size=1<<ge.w_bits,ge.w_mask=ge.w_size-1,ge.hash_bits=H+7,ge.hash_size=1<<ge.hash_bits,ge.hash_mask=ge.hash_size-1,ge.hash_shift=~~((ge.hash_bits+le-1)/le),ge.window=new e.Buf8(ge.w_size*2),ge.head=new e.Buf16(ge.hash_size),ge.prev=new e.Buf16(ge.w_size),ge.lit_bufsize=1<<H+6,ge.pending_buf_size=ge.lit_bufsize*4,ge.pending_buf=new e.Buf8(ge.pending_buf_size),ge.d_buf=1*ge.lit_bufsize,ge.l_buf=3*ge.lit_bufsize,ge.level=K,ge.strategy=W,ge.method=J,V(g)}function Y(g,K){return G(g,K,R,O,F,E)}function T(g,K){var J,B,H,W;if(!g||!g.state||K>l||K<0)return g?ee(g,h):h;if(B=g.state,!g.output||!g.input&&g.avail_in!==0||B.status===q&&K!==c)return ee(g,g.avail_out===0?p:h);if(B.strm=g,J=B.last_flush,B.last_flush=K,B.status===Ce)if(B.wrap===2)g.adler=0,Be(B,31),Be(B,139),Be(B,8),B.gzhead?(Be(B,(B.gzhead.text?1:0)+(B.gzhead.hcrc?2:0)+(B.gzhead.extra?4:0)+(B.gzhead.name?8:0)+(B.gzhead.comment?16:0)),Be(B,B.gzhead.time&255),Be(B,B.gzhead.time>>8&255),Be(B,B.gzhead.time>>16&255),Be(B,B.gzhead.time>>24&255),Be(B,B.level===9?2:B.strategy>=y||B.level<2?4:0),Be(B,B.gzhead.os&255),B.gzhead.extra&&B.gzhead.extra.length&&(Be(B,B.gzhead.extra.length&255),Be(B,B.gzhead.extra.length>>8&255)),B.gzhead.hcrc&&(g.adler=r(g.adler,B.pending_buf,B.pending,0)),B.gzindex=0,B.status=we):(Be(B,0),Be(B,0),Be(B,0),Be(B,0),Be(B,0),Be(B,B.level===9?2:B.strategy>=y||B.level<2?4:0),Be(B,I),B.status=j);else{var Se=R+(B.w_bits-8<<4)<<8,ge=-1;B.strategy>=y||B.level<2?ge=0:B.level<6?ge=1:B.level===6?ge=2:ge=3,Se|=ge<<6,B.strstart!==0&&(Se|=_e),Se+=31-Se%31,B.status=j,gt(B,Se),B.strstart!==0&&(gt(B,g.adler>>>16),gt(B,g.adler&65535)),g.adler=1}if(B.status===we)if(B.gzhead.extra){for(H=B.pending;B.gzindex<(B.gzhead.extra.length&65535)&&!(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>H&&(g.adler=r(g.adler,B.pending_buf,B.pending-H,H)),ye(g),H=B.pending,B.pending===B.pending_buf_size));)Be(B,B.gzhead.extra[B.gzindex]&255),B.gzindex++;B.gzhead.hcrc&&B.pending>H&&(g.adler=r(g.adler,B.pending_buf,B.pending-H,H)),B.gzindex===B.gzhead.extra.length&&(B.gzindex=0,B.status=Te)}else B.status=Te;if(B.status===Te)if(B.gzhead.name){H=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>H&&(g.adler=r(g.adler,B.pending_buf,B.pending-H,H)),ye(g),H=B.pending,B.pending===B.pending_buf_size)){W=1;break}B.gzindex<B.gzhead.name.length?W=B.gzhead.name.charCodeAt(B.gzindex++)&255:W=0,Be(B,W)}while(W!==0);B.gzhead.hcrc&&B.pending>H&&(g.adler=r(g.adler,B.pending_buf,B.pending-H,H)),W===0&&(B.gzindex=0,B.status=Ve)}else B.status=Ve;if(B.status===Ve)if(B.gzhead.comment){H=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>H&&(g.adler=r(g.adler,B.pending_buf,B.pending-H,H)),ye(g),H=B.pending,B.pending===B.pending_buf_size)){W=1;break}B.gzindex<B.gzhead.comment.length?W=B.gzhead.comment.charCodeAt(B.gzindex++)&255:W=0,Be(B,W)}while(W!==0);B.gzhead.hcrc&&B.pending>H&&(g.adler=r(g.adler,B.pending_buf,B.pending-H,H)),W===0&&(B.status=Le)}else B.status=Le;if(B.status===Le&&(B.gzhead.hcrc?(B.pending+2>B.pending_buf_size&&ye(g),B.pending+2<=B.pending_buf_size&&(Be(B,g.adler&255),Be(B,g.adler>>8&255),g.adler=0,B.status=j)):B.status=j),B.pending!==0){if(ye(g),g.avail_out===0)return B.last_flush=-1,u}else if(g.avail_in===0&&oe(K)<=oe(J)&&K!==c)return ee(g,p);if(B.status===q&&g.avail_in!==0)return ee(g,p);if(g.avail_in!==0||B.lookahead!==0||K!==o&&B.status!==q){var be=B.strategy===y?k(B,K):B.strategy===A?Vt(B,K):w[B.level].func(B,K);if((be===ue||be===L)&&(B.status=q),be===re||be===ue)return g.avail_out===0&&(B.last_flush=-1),u;if(be===$&&(K===a?t._tr_align(B):K!==l&&(t._tr_stored_block(B,0,0,!1),K===s&&(Ie(B.head),B.lookahead===0&&(B.strstart=0,B.block_start=0,B.insert=0))),ye(g),g.avail_out===0))return B.last_flush=-1,u}return K!==c?u:B.wrap<=0?f:(B.wrap===2?(Be(B,g.adler&255),Be(B,g.adler>>8&255),Be(B,g.adler>>16&255),Be(B,g.adler>>24&255),Be(B,g.total_in&255),Be(B,g.total_in>>8&255),Be(B,g.total_in>>16&255),Be(B,g.total_in>>24&255)):(gt(B,g.adler>>>16),gt(B,g.adler&65535)),ye(g),B.wrap>0&&(B.wrap=-B.wrap),B.pending!==0?u:f)}function ne(g){var K;return!g||!g.state?h:(K=g.state.status,K!==Ce&&K!==we&&K!==Te&&K!==Ve&&K!==Le&&K!==j&&K!==q?ee(g,h):(g.state=null,K===j?ee(g,d):u))}function ke(g,K){var J=K.length,B,H,W,Se,ge,be,Ge,_n;if(!g||!g.state||(B=g.state,Se=B.wrap,Se===2||Se===1&&B.status!==Ce||B.lookahead))return h;for(Se===1&&(g.adler=n(g.adler,K,J,0)),B.wrap=0,J>=B.w_size&&(Se===0&&(Ie(B.head),B.strstart=0,B.block_start=0,B.insert=0),_n=new e.Buf8(B.w_size),e.arraySet(_n,K,J-B.w_size,B.w_size,0),K=_n,J=B.w_size),ge=g.avail_in,be=g.next_in,Ge=g.input,g.avail_in=J,g.next_in=0,g.input=K,tt(B);B.lookahead>=le;){H=B.strstart,W=B.lookahead-(le-1);do B.ins_h=(B.ins_h<<B.hash_shift^B.window[H+le-1])&B.hash_mask,B.prev[H&B.w_mask]=B.head[B.ins_h],B.head[B.ins_h]=H,H++;while(--W);B.strstart=H,B.lookahead=le-1,tt(B)}return B.strstart+=B.lookahead,B.block_start=B.strstart,B.insert=B.lookahead,B.lookahead=0,B.match_length=B.prev_length=le-1,B.match_available=0,g.next_in=be,g.input=Ge,g.avail_in=ge,B.wrap=Se,u}return Mn.deflateInit=Y,Mn.deflateInit2=G,Mn.deflateReset=V,Mn.deflateResetKeep=z,Mn.deflateSetHeader=ae,Mn.deflate=T,Mn.deflateEnd=ne,Mn.deflateSetDictionary=ke,Mn.deflateInfo="pako deflate (from Nodeca project)",Mn}var zi={},ew;function tw(){if(ew)return zi;ew=1;var e=Yr(),t=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{t=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var r=new e.Buf8(256),i=0;i<256;i++)r[i]=i>=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1;r[254]=r[254]=1,zi.string2buf=function(a){var s,c,l,u,f,h=a.length,d=0;for(u=0;u<h;u++)c=a.charCodeAt(u),(c&64512)===55296&&u+1<h&&(l=a.charCodeAt(u+1),(l&64512)===56320&&(c=65536+(c-55296<<10)+(l-56320),u++)),d+=c<128?1:c<2048?2:c<65536?3:4;for(s=new e.Buf8(d),f=0,u=0;f<d;u++)c=a.charCodeAt(u),(c&64512)===55296&&u+1<h&&(l=a.charCodeAt(u+1),(l&64512)===56320&&(c=65536+(c-55296<<10)+(l-56320),u++)),c<128?s[f++]=c:c<2048?(s[f++]=192|c>>>6,s[f++]=128|c&63):c<65536?(s[f++]=224|c>>>12,s[f++]=128|c>>>6&63,s[f++]=128|c&63):(s[f++]=240|c>>>18,s[f++]=128|c>>>12&63,s[f++]=128|c>>>6&63,s[f++]=128|c&63);return s};function o(a,s){if(s<65534&&(a.subarray&&n||!a.subarray&&t))return String.fromCharCode.apply(null,e.shrinkBuf(a,s));for(var c="",l=0;l<s;l++)c+=String.fromCharCode(a[l]);return c}return zi.buf2binstring=function(a){return o(a,a.length)},zi.binstring2buf=function(a){for(var s=new e.Buf8(a.length),c=0,l=s.length;c<l;c++)s[c]=a.charCodeAt(c);return s},zi.buf2string=function(a,s){var c,l,u,f,h=s||a.length,d=new Array(h*2);for(l=0,c=0;c<h;){if(u=a[c++],u<128){d[l++]=u;continue}if(f=r[u],f>4){d[l++]=65533,c+=f-1;continue}for(u&=f===2?31:f===3?15:7;f>1&&c<h;)u=u<<6|a[c++]&63,f--;if(f>1){d[l++]=65533;continue}u<65536?d[l++]=u:(u-=65536,d[l++]=55296|u>>10&1023,d[l++]=56320|u&1023)}return o(d,l)},zi.utf8border=function(a,s){var c;for(s=s||a.length,s>a.length&&(s=a.length),c=s-1;c>=0&&(a[c]&192)===128;)c--;return c<0||c===0?s:c+r[a[c]]>s?c:s},zi}var Vd,nw;function rw(){if(nw)return Vd;nw=1;function e(){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}return Vd=e,Vd}var iw;function QR(){if(iw)return Fo;iw=1;var e=YR(),t=Yr(),n=tw(),r=Hd(),i=rw(),o=Object.prototype.toString,a=0,s=4,c=0,l=1,u=2,f=-1,h=0,d=8;function p(A){if(!(this instanceof p))return new p(A);this.options=t.assign({level:f,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},A||{});var _=this.options;_.raw&&_.windowBits>0?_.windowBits=-_.windowBits:_.gzip&&_.windowBits>0&&_.windowBits<16&&(_.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var E=e.deflateInit2(this.strm,_.level,_.method,_.windowBits,_.memLevel,_.strategy);if(E!==c)throw new Error(r[E]);if(_.header&&e.deflateSetHeader(this.strm,_.header),_.dictionary){var C;if(typeof _.dictionary=="string"?C=n.string2buf(_.dictionary):o.call(_.dictionary)==="[object ArrayBuffer]"?C=new Uint8Array(_.dictionary):C=_.dictionary,E=e.deflateSetDictionary(this.strm,C),E!==c)throw new Error(r[E]);this._dict_set=!0}}p.prototype.push=function(A,_){var E=this.strm,C=this.options.chunkSize,R,D;if(this.ended)return!1;D=_===~~_?_:_===!0?s:a,typeof A=="string"?E.input=n.string2buf(A):o.call(A)==="[object ArrayBuffer]"?E.input=new Uint8Array(A):E.input=A,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new t.Buf8(C),E.next_out=0,E.avail_out=C),R=e.deflate(E,D),R!==l&&R!==c)return this.onEnd(R),this.ended=!0,!1;(E.avail_out===0||E.avail_in===0&&(D===s||D===u))&&(this.options.to==="string"?this.onData(n.buf2binstring(t.shrinkBuf(E.output,E.next_out))):this.onData(t.shrinkBuf(E.output,E.next_out)))}while((E.avail_in>0||E.avail_out===0)&&R!==l);return D===s?(R=e.deflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===c):(D===u&&(this.onEnd(c),E.avail_out=0),!0)},p.prototype.onData=function(A){this.chunks.push(A)},p.prototype.onEnd=function(A){A===c&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};function b(A,_){var E=new p(_);if(E.push(A,!0),E.err)throw E.msg||r[E.err];return E.result}function v(A,_){return _=_||{},_.raw=!0,b(A,_)}function y(A,_){return _=_||{},_.gzip=!0,b(A,_)}return Fo.Deflate=p,Fo.deflate=b,Fo.deflateRaw=v,Fo.gzip=y,Fo}var Mo={},wn={},qd,ow;function XR(){if(ow)return qd;ow=1;var e=30,t=12;return qd=function(r,i){var o,a,s,c,l,u,f,h,d,p,b,v,y,A,_,E,C,R,D,O,F,P,S,Z,Q;o=r.state,a=r.next_in,Z=r.input,s=a+(r.avail_in-5),c=r.next_out,Q=r.output,l=c-(i-r.avail_out),u=c+(r.avail_out-257),f=o.dmax,h=o.wsize,d=o.whave,p=o.wnext,b=o.window,v=o.hold,y=o.bits,A=o.lencode,_=o.distcode,E=(1<<o.lenbits)-1,C=(1<<o.distbits)-1;e:do{y<15&&(v+=Z[a++]<<y,y+=8,v+=Z[a++]<<y,y+=8),R=A[v&E];t:for(;;){if(D=R>>>24,v>>>=D,y-=D,D=R>>>16&255,D===0)Q[c++]=R&65535;else if(D&16){O=R&65535,D&=15,D&&(y<D&&(v+=Z[a++]<<y,y+=8),O+=v&(1<<D)-1,v>>>=D,y-=D),y<15&&(v+=Z[a++]<<y,y+=8,v+=Z[a++]<<y,y+=8),R=_[v&C];n:for(;;){if(D=R>>>24,v>>>=D,y-=D,D=R>>>16&255,D&16){if(F=R&65535,D&=15,y<D&&(v+=Z[a++]<<y,y+=8,y<D&&(v+=Z[a++]<<y,y+=8)),F+=v&(1<<D)-1,F>f){r.msg="invalid distance too far back",o.mode=e;break e}if(v>>>=D,y-=D,D=c-l,F>D){if(D=F-D,D>d&&o.sane){r.msg="invalid distance too far back",o.mode=e;break e}if(P=0,S=b,p===0){if(P+=h-D,D<O){O-=D;do Q[c++]=b[P++];while(--D);P=c-F,S=Q}}else if(p<D){if(P+=h+p-D,D-=p,D<O){O-=D;do Q[c++]=b[P++];while(--D);if(P=0,p<O){D=p,O-=D;do Q[c++]=b[P++];while(--D);P=c-F,S=Q}}}else if(P+=p-D,D<O){O-=D;do Q[c++]=b[P++];while(--D);P=c-F,S=Q}for(;O>2;)Q[c++]=S[P++],Q[c++]=S[P++],Q[c++]=S[P++],O-=3;O&&(Q[c++]=S[P++],O>1&&(Q[c++]=S[P++]))}else{P=c-F;do Q[c++]=Q[P++],Q[c++]=Q[P++],Q[c++]=Q[P++],O-=3;while(O>2);O&&(Q[c++]=Q[P++],O>1&&(Q[c++]=Q[P++]))}}else if(D&64){r.msg="invalid distance code",o.mode=e;break e}else{R=_[(R&65535)+(v&(1<<D)-1)];continue n}break}}else if(D&64)if(D&32){o.mode=t;break e}else{r.msg="invalid literal/length code",o.mode=e;break e}else{R=A[(R&65535)+(v&(1<<D)-1)];continue t}break}}while(a<s&&c<u);O=y>>3,a-=O,y-=O<<3,v&=(1<<y)-1,r.next_in=a,r.next_out=c,r.avail_in=a<s?5+(s-a):5-(a-s),r.avail_out=c<u?257+(u-c):257-(c-u),o.hold=v,o.bits=y},qd}var jd,aw;function KR(){if(aw)return jd;aw=1;var e=Yr(),t=15,n=852,r=592,i=0,o=1,a=2,s=[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],c=[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],l=[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],u=[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];return jd=function(h,d,p,b,v,y,A,_){var E=_.bits,C=0,R=0,D=0,O=0,F=0,P=0,S=0,Z=0,Q=0,se=0,ce,fe,le,Ee,pe,_e=null,Ce=0,we,Te=new e.Buf16(t+1),Ve=new e.Buf16(t+1),Le=null,j=0,q,re,$;for(C=0;C<=t;C++)Te[C]=0;for(R=0;R<b;R++)Te[d[p+R]]++;for(F=E,O=t;O>=1&&Te[O]===0;O--);if(F>O&&(F=O),O===0)return v[y++]=1<<24|64<<16|0,v[y++]=1<<24|64<<16|0,_.bits=1,0;for(D=1;D<O&&Te[D]===0;D++);for(F<D&&(F=D),Z=1,C=1;C<=t;C++)if(Z<<=1,Z-=Te[C],Z<0)return-1;if(Z>0&&(h===i||O!==1))return-1;for(Ve[1]=0,C=1;C<t;C++)Ve[C+1]=Ve[C]+Te[C];for(R=0;R<b;R++)d[p+R]!==0&&(A[Ve[d[p+R]]++]=R);if(h===i?(_e=Le=A,we=19):h===o?(_e=s,Ce-=257,Le=c,j-=257,we=256):(_e=l,Le=u,we=-1),se=0,R=0,C=D,pe=y,P=F,S=0,le=-1,Q=1<<F,Ee=Q-1,h===o&&Q>n||h===a&&Q>r)return 1;for(;;){q=C-S,A[R]<we?(re=0,$=A[R]):A[R]>we?(re=Le[j+A[R]],$=_e[Ce+A[R]]):(re=96,$=0),ce=1<<C-S,fe=1<<P,D=fe;do fe-=ce,v[pe+(se>>S)+fe]=q<<24|re<<16|$|0;while(fe!==0);for(ce=1<<C-1;se&ce;)ce>>=1;if(ce!==0?(se&=ce-1,se+=ce):se=0,R++,--Te[C]===0){if(C===O)break;C=d[p+A[R]]}if(C>F&&(se&Ee)!==le){for(S===0&&(S=F),pe+=D,P=C-S,Z=1<<P;P+S<O&&(Z-=Te[P+S],!(Z<=0));)P++,Z<<=1;if(Q+=1<<P,h===o&&Q>n||h===a&&Q>r)return 1;le=se&Ee,v[le]=F<<24|P<<16|pe-y|0}}return se!==0&&(v[pe+se]=C-S<<24|64<<16|0),_.bits=F,0},jd}var sw;function JR(){if(sw)return wn;sw=1;var e=Yr(),t=Qy(),n=Ky(),r=XR(),i=KR(),o=0,a=1,s=2,c=4,l=5,u=6,f=0,h=1,d=2,p=-2,b=-3,v=-4,y=-5,A=8,_=1,E=2,C=3,R=4,D=5,O=6,F=7,P=8,S=9,Z=10,Q=11,se=12,ce=13,fe=14,le=15,Ee=16,pe=17,_e=18,Ce=19,we=20,Te=21,Ve=22,Le=23,j=24,q=25,re=26,$=27,ue=28,L=29,I=30,ee=31,oe=32,Ie=852,ye=592,xe=15,Be=xe;function gt(G){return(G>>>24&255)+(G>>>8&65280)+((G&65280)<<8)+((G&255)<<24)}function nn(){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 e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Dt(G){var Y;return!G||!G.state?p:(Y=G.state,G.total_in=G.total_out=Y.total=0,G.msg="",Y.wrap&&(G.adler=Y.wrap&1),Y.mode=_,Y.last=0,Y.havedict=0,Y.dmax=32768,Y.head=null,Y.hold=0,Y.bits=0,Y.lencode=Y.lendyn=new e.Buf32(Ie),Y.distcode=Y.distdyn=new e.Buf32(ye),Y.sane=1,Y.back=-1,f)}function tt(G){var Y;return!G||!G.state?p:(Y=G.state,Y.wsize=0,Y.whave=0,Y.wnext=0,Dt(G))}function Pt(G,Y){var T,ne;return!G||!G.state||(ne=G.state,Y<0?(T=0,Y=-Y):(T=(Y>>4)+1,Y<48&&(Y&=15)),Y&&(Y<8||Y>15))?p:(ne.window!==null&&ne.wbits!==Y&&(ne.window=null),ne.wrap=T,ne.wbits=Y,tt(G))}function Ht(G,Y){var T,ne;return G?(ne=new nn,G.state=ne,ne.window=null,T=Pt(G,Y),T!==f&&(G.state=null),T):p}function nt(G){return Ht(G,Be)}var Vt=!0,k,m;function w(G){if(Vt){var Y;for(k=new e.Buf32(512),m=new e.Buf32(32),Y=0;Y<144;)G.lens[Y++]=8;for(;Y<256;)G.lens[Y++]=9;for(;Y<280;)G.lens[Y++]=7;for(;Y<288;)G.lens[Y++]=8;for(i(a,G.lens,0,288,k,0,G.work,{bits:9}),Y=0;Y<32;)G.lens[Y++]=5;i(s,G.lens,0,32,m,0,G.work,{bits:5}),Vt=!1}G.lencode=k,G.lenbits=9,G.distcode=m,G.distbits=5}function N(G,Y,T,ne){var ke,g=G.state;return g.window===null&&(g.wsize=1<<g.wbits,g.wnext=0,g.whave=0,g.window=new e.Buf8(g.wsize)),ne>=g.wsize?(e.arraySet(g.window,Y,T-g.wsize,g.wsize,0),g.wnext=0,g.whave=g.wsize):(ke=g.wsize-g.wnext,ke>ne&&(ke=ne),e.arraySet(g.window,Y,T-ne,ke,g.wnext),ne-=ke,ne?(e.arraySet(g.window,Y,T-ne,ne,0),g.wnext=ne,g.whave=g.wsize):(g.wnext+=ke,g.wnext===g.wsize&&(g.wnext=0),g.whave<g.wsize&&(g.whave+=ke))),0}function x(G,Y){var T,ne,ke,g,K,J,B,H,W,Se,ge,be,Ge,_n,U=0,Me,ft,rt,kt,De,wr,dt,ze,pt=new e.Buf8(4),Ln,hn,Bc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!G||!G.state||!G.output||!G.input&&G.avail_in!==0)return p;T=G.state,T.mode===se&&(T.mode=ce),K=G.next_out,ke=G.output,B=G.avail_out,g=G.next_in,ne=G.input,J=G.avail_in,H=T.hold,W=T.bits,Se=J,ge=B,ze=f;e:for(;;)switch(T.mode){case _:if(T.wrap===0){T.mode=ce;break}for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(T.wrap&2&&H===35615){T.check=0,pt[0]=H&255,pt[1]=H>>>8&255,T.check=n(T.check,pt,2,0),H=0,W=0,T.mode=E;break}if(T.flags=0,T.head&&(T.head.done=!1),!(T.wrap&1)||(((H&255)<<8)+(H>>8))%31){G.msg="incorrect header check",T.mode=I;break}if((H&15)!==A){G.msg="unknown compression method",T.mode=I;break}if(H>>>=4,W-=4,dt=(H&15)+8,T.wbits===0)T.wbits=dt;else if(dt>T.wbits){G.msg="invalid window size",T.mode=I;break}T.dmax=1<<dt,G.adler=T.check=1,T.mode=H&512?Z:se,H=0,W=0;break;case E:for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(T.flags=H,(T.flags&255)!==A){G.msg="unknown compression method",T.mode=I;break}if(T.flags&57344){G.msg="unknown header flags set",T.mode=I;break}T.head&&(T.head.text=H>>8&1),T.flags&512&&(pt[0]=H&255,pt[1]=H>>>8&255,T.check=n(T.check,pt,2,0)),H=0,W=0,T.mode=C;case C:for(;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.head&&(T.head.time=H),T.flags&512&&(pt[0]=H&255,pt[1]=H>>>8&255,pt[2]=H>>>16&255,pt[3]=H>>>24&255,T.check=n(T.check,pt,4,0)),H=0,W=0,T.mode=R;case R:for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.head&&(T.head.xflags=H&255,T.head.os=H>>8),T.flags&512&&(pt[0]=H&255,pt[1]=H>>>8&255,T.check=n(T.check,pt,2,0)),H=0,W=0,T.mode=D;case D:if(T.flags&1024){for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.length=H,T.head&&(T.head.extra_len=H),T.flags&512&&(pt[0]=H&255,pt[1]=H>>>8&255,T.check=n(T.check,pt,2,0)),H=0,W=0}else T.head&&(T.head.extra=null);T.mode=O;case O:if(T.flags&1024&&(be=T.length,be>J&&(be=J),be&&(T.head&&(dt=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),e.arraySet(T.head.extra,ne,g,be,dt)),T.flags&512&&(T.check=n(T.check,ne,be,g)),J-=be,g+=be,T.length-=be),T.length))break e;T.length=0,T.mode=F;case F:if(T.flags&2048){if(J===0)break e;be=0;do dt=ne[g+be++],T.head&&dt&&T.length<65536&&(T.head.name+=String.fromCharCode(dt));while(dt&&be<J);if(T.flags&512&&(T.check=n(T.check,ne,be,g)),J-=be,g+=be,dt)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=P;case P:if(T.flags&4096){if(J===0)break e;be=0;do dt=ne[g+be++],T.head&&dt&&T.length<65536&&(T.head.comment+=String.fromCharCode(dt));while(dt&&be<J);if(T.flags&512&&(T.check=n(T.check,ne,be,g)),J-=be,g+=be,dt)break e}else T.head&&(T.head.comment=null);T.mode=S;case S:if(T.flags&512){for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(H!==(T.check&65535)){G.msg="header crc mismatch",T.mode=I;break}H=0,W=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),G.adler=T.check=0,T.mode=se;break;case Z:for(;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}G.adler=T.check=gt(H),H=0,W=0,T.mode=Q;case Q:if(T.havedict===0)return G.next_out=K,G.avail_out=B,G.next_in=g,G.avail_in=J,T.hold=H,T.bits=W,d;G.adler=T.check=1,T.mode=se;case se:if(Y===l||Y===u)break e;case ce:if(T.last){H>>>=W&7,W-=W&7,T.mode=$;break}for(;W<3;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}switch(T.last=H&1,H>>>=1,W-=1,H&3){case 0:T.mode=fe;break;case 1:if(w(T),T.mode=we,Y===u){H>>>=2,W-=2;break e}break;case 2:T.mode=pe;break;case 3:G.msg="invalid block type",T.mode=I}H>>>=2,W-=2;break;case fe:for(H>>>=W&7,W-=W&7;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if((H&65535)!==(H>>>16^65535)){G.msg="invalid stored block lengths",T.mode=I;break}if(T.length=H&65535,H=0,W=0,T.mode=le,Y===u)break e;case le:T.mode=Ee;case Ee:if(be=T.length,be){if(be>J&&(be=J),be>B&&(be=B),be===0)break e;e.arraySet(ke,ne,g,be,K),J-=be,g+=be,B-=be,K+=be,T.length-=be;break}T.mode=se;break;case pe:for(;W<14;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(T.nlen=(H&31)+257,H>>>=5,W-=5,T.ndist=(H&31)+1,H>>>=5,W-=5,T.ncode=(H&15)+4,H>>>=4,W-=4,T.nlen>286||T.ndist>30){G.msg="too many length or distance symbols",T.mode=I;break}T.have=0,T.mode=_e;case _e:for(;T.have<T.ncode;){for(;W<3;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.lens[Bc[T.have++]]=H&7,H>>>=3,W-=3}for(;T.have<19;)T.lens[Bc[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,Ln={bits:T.lenbits},ze=i(o,T.lens,0,19,T.lencode,0,T.work,Ln),T.lenbits=Ln.bits,ze){G.msg="invalid code lengths set",T.mode=I;break}T.have=0,T.mode=Ce;case Ce:for(;T.have<T.nlen+T.ndist;){for(;U=T.lencode[H&(1<<T.lenbits)-1],Me=U>>>24,ft=U>>>16&255,rt=U&65535,!(Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(rt<16)H>>>=Me,W-=Me,T.lens[T.have++]=rt;else{if(rt===16){for(hn=Me+2;W<hn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(H>>>=Me,W-=Me,T.have===0){G.msg="invalid bit length repeat",T.mode=I;break}dt=T.lens[T.have-1],be=3+(H&3),H>>>=2,W-=2}else if(rt===17){for(hn=Me+3;W<hn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=Me,W-=Me,dt=0,be=3+(H&7),H>>>=3,W-=3}else{for(hn=Me+7;W<hn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=Me,W-=Me,dt=0,be=11+(H&127),H>>>=7,W-=7}if(T.have+be>T.nlen+T.ndist){G.msg="invalid bit length repeat",T.mode=I;break}for(;be--;)T.lens[T.have++]=dt}}if(T.mode===I)break;if(T.lens[256]===0){G.msg="invalid code -- missing end-of-block",T.mode=I;break}if(T.lenbits=9,Ln={bits:T.lenbits},ze=i(a,T.lens,0,T.nlen,T.lencode,0,T.work,Ln),T.lenbits=Ln.bits,ze){G.msg="invalid literal/lengths set",T.mode=I;break}if(T.distbits=6,T.distcode=T.distdyn,Ln={bits:T.distbits},ze=i(s,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,Ln),T.distbits=Ln.bits,ze){G.msg="invalid distances set",T.mode=I;break}if(T.mode=we,Y===u)break e;case we:T.mode=Te;case Te:if(J>=6&&B>=258){G.next_out=K,G.avail_out=B,G.next_in=g,G.avail_in=J,T.hold=H,T.bits=W,r(G,ge),K=G.next_out,ke=G.output,B=G.avail_out,g=G.next_in,ne=G.input,J=G.avail_in,H=T.hold,W=T.bits,T.mode===se&&(T.back=-1);break}for(T.back=0;U=T.lencode[H&(1<<T.lenbits)-1],Me=U>>>24,ft=U>>>16&255,rt=U&65535,!(Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(ft&&!(ft&240)){for(kt=Me,De=ft,wr=rt;U=T.lencode[wr+((H&(1<<kt+De)-1)>>kt)],Me=U>>>24,ft=U>>>16&255,rt=U&65535,!(kt+Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=kt,W-=kt,T.back+=kt}if(H>>>=Me,W-=Me,T.back+=Me,T.length=rt,ft===0){T.mode=re;break}if(ft&32){T.back=-1,T.mode=se;break}if(ft&64){G.msg="invalid literal/length code",T.mode=I;break}T.extra=ft&15,T.mode=Ve;case Ve:if(T.extra){for(hn=T.extra;W<hn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.length+=H&(1<<T.extra)-1,H>>>=T.extra,W-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=Le;case Le:for(;U=T.distcode[H&(1<<T.distbits)-1],Me=U>>>24,ft=U>>>16&255,rt=U&65535,!(Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(!(ft&240)){for(kt=Me,De=ft,wr=rt;U=T.distcode[wr+((H&(1<<kt+De)-1)>>kt)],Me=U>>>24,ft=U>>>16&255,rt=U&65535,!(kt+Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=kt,W-=kt,T.back+=kt}if(H>>>=Me,W-=Me,T.back+=Me,ft&64){G.msg="invalid distance code",T.mode=I;break}T.offset=rt,T.extra=ft&15,T.mode=j;case j:if(T.extra){for(hn=T.extra;W<hn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.offset+=H&(1<<T.extra)-1,H>>>=T.extra,W-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){G.msg="invalid distance too far back",T.mode=I;break}T.mode=q;case q:if(B===0)break e;if(be=ge-B,T.offset>be){if(be=T.offset-be,be>T.whave&&T.sane){G.msg="invalid distance too far back",T.mode=I;break}be>T.wnext?(be-=T.wnext,Ge=T.wsize-be):Ge=T.wnext-be,be>T.length&&(be=T.length),_n=T.window}else _n=ke,Ge=K-T.offset,be=T.length;be>B&&(be=B),B-=be,T.length-=be;do ke[K++]=_n[Ge++];while(--be);T.length===0&&(T.mode=Te);break;case re:if(B===0)break e;ke[K++]=T.length,B--,T.mode=Te;break;case $:if(T.wrap){for(;W<32;){if(J===0)break e;J--,H|=ne[g++]<<W,W+=8}if(ge-=B,G.total_out+=ge,T.total+=ge,ge&&(G.adler=T.check=T.flags?n(T.check,ke,ge,K-ge):t(T.check,ke,ge,K-ge)),ge=B,(T.flags?H:gt(H))!==T.check){G.msg="incorrect data check",T.mode=I;break}H=0,W=0}T.mode=ue;case ue:if(T.wrap&&T.flags){for(;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(H!==(T.total&4294967295)){G.msg="incorrect length check",T.mode=I;break}H=0,W=0}T.mode=L;case L:ze=h;break e;case I:ze=b;break e;case ee:return v;case oe:default:return p}return G.next_out=K,G.avail_out=B,G.next_in=g,G.avail_in=J,T.hold=H,T.bits=W,(T.wsize||ge!==G.avail_out&&T.mode<I&&(T.mode<$||Y!==c))&&N(G,G.output,G.next_out,ge-G.avail_out),Se-=G.avail_in,ge-=G.avail_out,G.total_in+=Se,G.total_out+=ge,T.total+=ge,T.wrap&&ge&&(G.adler=T.check=T.flags?n(T.check,ke,ge,G.next_out-ge):t(T.check,ke,ge,G.next_out-ge)),G.data_type=T.bits+(T.last?64:0)+(T.mode===se?128:0)+(T.mode===we||T.mode===le?256:0),(Se===0&&ge===0||Y===c)&&ze===f&&(ze=y),ze}function z(G){if(!G||!G.state)return p;var Y=G.state;return Y.window&&(Y.window=null),G.state=null,f}function V(G,Y){var T;return!G||!G.state||(T=G.state,!(T.wrap&2))?p:(T.head=Y,Y.done=!1,f)}function ae(G,Y){var T=Y.length,ne,ke,g;return!G||!G.state||(ne=G.state,ne.wrap!==0&&ne.mode!==Q)?p:ne.mode===Q&&(ke=1,ke=t(ke,Y,T,0),ke!==ne.check)?b:(g=N(G,Y,T,T),g?(ne.mode=ee,v):(ne.havedict=1,f))}return wn.inflateReset=tt,wn.inflateReset2=Pt,wn.inflateResetKeep=Dt,wn.inflateInit=nt,wn.inflateInit2=Ht,wn.inflate=x,wn.inflateEnd=z,wn.inflateGetHeader=V,wn.inflateSetDictionary=ae,wn.inflateInfo="pako inflate (from Nodeca project)",wn}var Wd,cw;function lw(){return cw||(cw=1,Wd={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}),Wd}var Zd,uw;function $R(){if(uw)return Zd;uw=1;function e(){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}return Zd=e,Zd}var fw;function eF(){if(fw)return Mo;fw=1;var e=JR(),t=Yr(),n=tw(),r=lw(),i=Hd(),o=rw(),a=$R(),s=Object.prototype.toString;function c(f){if(!(this instanceof c))return new c(f);this.options=t.assign({chunkSize:16384,windowBits:0,to:""},f||{});var h=this.options;h.raw&&h.windowBits>=0&&h.windowBits<16&&(h.windowBits=-h.windowBits,h.windowBits===0&&(h.windowBits=-15)),h.windowBits>=0&&h.windowBits<16&&!(f&&f.windowBits)&&(h.windowBits+=32),h.windowBits>15&&h.windowBits<48&&(h.windowBits&15||(h.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var d=e.inflateInit2(this.strm,h.windowBits);if(d!==r.Z_OK)throw new Error(i[d]);if(this.header=new a,e.inflateGetHeader(this.strm,this.header),h.dictionary&&(typeof h.dictionary=="string"?h.dictionary=n.string2buf(h.dictionary):s.call(h.dictionary)==="[object ArrayBuffer]"&&(h.dictionary=new Uint8Array(h.dictionary)),h.raw&&(d=e.inflateSetDictionary(this.strm,h.dictionary),d!==r.Z_OK)))throw new Error(i[d])}c.prototype.push=function(f,h){var d=this.strm,p=this.options.chunkSize,b=this.options.dictionary,v,y,A,_,E,C=!1;if(this.ended)return!1;y=h===~~h?h:h===!0?r.Z_FINISH:r.Z_NO_FLUSH,typeof f=="string"?d.input=n.binstring2buf(f):s.call(f)==="[object ArrayBuffer]"?d.input=new Uint8Array(f):d.input=f,d.next_in=0,d.avail_in=d.input.length;do{if(d.avail_out===0&&(d.output=new t.Buf8(p),d.next_out=0,d.avail_out=p),v=e.inflate(d,r.Z_NO_FLUSH),v===r.Z_NEED_DICT&&b&&(v=e.inflateSetDictionary(this.strm,b)),v===r.Z_BUF_ERROR&&C===!0&&(v=r.Z_OK,C=!1),v!==r.Z_STREAM_END&&v!==r.Z_OK)return this.onEnd(v),this.ended=!0,!1;d.next_out&&(d.avail_out===0||v===r.Z_STREAM_END||d.avail_in===0&&(y===r.Z_FINISH||y===r.Z_SYNC_FLUSH))&&(this.options.to==="string"?(A=n.utf8border(d.output,d.next_out),_=d.next_out-A,E=n.buf2string(d.output,A),d.next_out=_,d.avail_out=p-_,_&&t.arraySet(d.output,d.output,A,_,0),this.onData(E)):this.onData(t.shrinkBuf(d.output,d.next_out))),d.avail_in===0&&d.avail_out===0&&(C=!0)}while((d.avail_in>0||d.avail_out===0)&&v!==r.Z_STREAM_END);return v===r.Z_STREAM_END&&(y=r.Z_FINISH),y===r.Z_FINISH?(v=e.inflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===r.Z_OK):(y===r.Z_SYNC_FLUSH&&(this.onEnd(r.Z_OK),d.avail_out=0),!0)},c.prototype.onData=function(f){this.chunks.push(f)},c.prototype.onEnd=function(f){f===r.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg};function l(f,h){var d=new c(h);if(d.push(f,!0),d.err)throw d.msg||i[d.err];return d.result}function u(f,h){return h=h||{},h.raw=!0,l(f,h)}return Mo.Inflate=c,Mo.inflate=l,Mo.inflateRaw=u,Mo.ungzip=l,Mo}var Yd,hw;function tF(){if(hw)return Yd;hw=1;var e=Yr().assign,t=QR(),n=eF(),r=lw(),i={};return e(i,t,n,r),Yd=i,Yd}var du=tF();async function Qr(e){try{let t,n=0,r=0;const i=[];let o=0,a;do{const c=e.subarray(n);if(a=new du.Inflate,{strm:t}=a,a.push(c,du.Z_SYNC_FLUSH),a.err)throw new Error(a.msg);n+=t.next_in,i[r]=a.result,o+=i[r].length,r+=1}while(t.avail_in);const s=new Uint8Array(o);for(let c=0,l=0;c<i.length;c++)s.set(i[c],l),l+=i[c].length;return $e.Buffer.from(s)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function dw(e,t){try{let n;const{minv:r,maxv:i}=t;let o=r.blockPosition,a=r.dataPosition;const s=[],c=[],l=[];let u=0,f=0;do{const p=e.subarray(o-r.blockPosition),b=new du.Inflate;if({strm:n}=b,b.push(p,du.Z_SYNC_FLUSH),b.err)throw new Error(b.msg);const v=b.result;s.push(v);let y=v.length;c.push(o),l.push(a),s.length===1&&r.dataPosition&&(s[0]=s[0].subarray(r.dataPosition),y=s[0].length);const A=o;if(o+=n.next_in,a+=y,A>=i.blockPosition){s[f]=s[f].subarray(0,i.blockPosition===r.blockPosition?i.dataPosition-r.dataPosition+1:i.dataPosition+1),c.push(o),l.push(a),u+=s[f].length;break}u+=s[f].length,f++}while(n.avail_in);const h=new Uint8Array(u);for(let p=0,b=0;p<s.length;p++)h.set(s[p],b),b+=s[p].length;return{buffer:$e.Buffer.from(h),cpositions:c,dpositions:l}}catch(n){throw/incorrect header check/.exec(`${n}`)?new Error("problem decompressing block: incorrect gzip header check"):n}}var Qd,pw;function nF(){if(pw)return Qd;pw=1,Qd=t;var e=null;try{e=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 t(P,S,Z){this.low=P|0,this.high=S|0,this.unsigned=!!Z}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0});function n(P){return(P&&P.__isLong__)===!0}t.isLong=n;var r={},i={};function o(P,S){var Z,Q,se;return S?(P>>>=0,(se=0<=P&&P<256)&&(Q=i[P],Q)?Q:(Z=s(P,(P|0)<0?-1:0,!0),se&&(i[P]=Z),Z)):(P|=0,(se=-128<=P&&P<128)&&(Q=r[P],Q)?Q:(Z=s(P,P<0?-1:0,!1),se&&(r[P]=Z),Z))}t.fromInt=o;function a(P,S){if(isNaN(P))return S?A:y;if(S){if(P<0)return A;if(P>=p)return D}else{if(P<=-b)return O;if(P+1>=b)return R}return P<0?a(-P,S).neg():s(P%d|0,P/d|0,S)}t.fromNumber=a;function s(P,S,Z){return new t(P,S,Z)}t.fromBits=s;var c=Math.pow;function l(P,S,Z){if(P.length===0)throw Error("empty string");if(P==="NaN"||P==="Infinity"||P==="+Infinity"||P==="-Infinity")return y;if(typeof S=="number"?(Z=S,S=!1):S=!!S,Z=Z||10,Z<2||36<Z)throw RangeError("radix");var Q;if((Q=P.indexOf("-"))>0)throw Error("interior hyphen");if(Q===0)return l(P.substring(1),S,Z).neg();for(var se=a(c(Z,8)),ce=y,fe=0;fe<P.length;fe+=8){var le=Math.min(8,P.length-fe),Ee=parseInt(P.substring(fe,fe+le),Z);if(le<8){var pe=a(c(Z,le));ce=ce.mul(pe).add(a(Ee))}else ce=ce.mul(se),ce=ce.add(a(Ee))}return ce.unsigned=S,ce}t.fromString=l;function u(P,S){return typeof P=="number"?a(P,S):typeof P=="string"?l(P,S):s(P.low,P.high,typeof S=="boolean"?S:P.unsigned)}t.fromValue=u;var f=65536,h=1<<24,d=f*f,p=d*d,b=p/2,v=o(h),y=o(0);t.ZERO=y;var A=o(0,!0);t.UZERO=A;var _=o(1);t.ONE=_;var E=o(1,!0);t.UONE=E;var C=o(-1);t.NEG_ONE=C;var R=s(-1,2147483647,!1);t.MAX_VALUE=R;var D=s(-1,-1,!0);t.MAX_UNSIGNED_VALUE=D;var O=s(0,-2147483648,!1);t.MIN_VALUE=O;var F=t.prototype;return F.toInt=function(){return this.unsigned?this.low>>>0:this.low},F.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},F.toString=function(S){if(S=S||10,S<2||36<S)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(O)){var Z=a(S),Q=this.div(Z),se=Q.mul(Z).sub(this);return Q.toString(S)+se.toInt().toString(S)}else return"-"+this.neg().toString(S);for(var ce=a(c(S,6),this.unsigned),fe=this,le="";;){var Ee=fe.div(ce),pe=fe.sub(Ee.mul(ce)).toInt()>>>0,_e=pe.toString(S);if(fe=Ee,fe.isZero())return _e+le;for(;_e.length<6;)_e="0"+_e;le=""+_e+le}},F.getHighBits=function(){return this.high},F.getHighBitsUnsigned=function(){return this.high>>>0},F.getLowBits=function(){return this.low},F.getLowBitsUnsigned=function(){return this.low>>>0},F.getNumBitsAbs=function(){if(this.isNegative())return this.eq(O)?64:this.neg().getNumBitsAbs();for(var S=this.high!=0?this.high:this.low,Z=31;Z>0&&!(S&1<<Z);Z--);return this.high!=0?Z+33:Z+1},F.isZero=function(){return this.high===0&&this.low===0},F.eqz=F.isZero,F.isNegative=function(){return!this.unsigned&&this.high<0},F.isPositive=function(){return this.unsigned||this.high>=0},F.isOdd=function(){return(this.low&1)===1},F.isEven=function(){return(this.low&1)===0},F.equals=function(S){return n(S)||(S=u(S)),this.unsigned!==S.unsigned&&this.high>>>31===1&&S.high>>>31===1?!1:this.high===S.high&&this.low===S.low},F.eq=F.equals,F.notEquals=function(S){return!this.eq(S)},F.neq=F.notEquals,F.ne=F.notEquals,F.lessThan=function(S){return this.comp(S)<0},F.lt=F.lessThan,F.lessThanOrEqual=function(S){return this.comp(S)<=0},F.lte=F.lessThanOrEqual,F.le=F.lessThanOrEqual,F.greaterThan=function(S){return this.comp(S)>0},F.gt=F.greaterThan,F.greaterThanOrEqual=function(S){return this.comp(S)>=0},F.gte=F.greaterThanOrEqual,F.ge=F.greaterThanOrEqual,F.compare=function(S){if(n(S)||(S=u(S)),this.eq(S))return 0;var Z=this.isNegative(),Q=S.isNegative();return Z&&!Q?-1:!Z&&Q?1:this.unsigned?S.high>>>0>this.high>>>0||S.high===this.high&&S.low>>>0>this.low>>>0?-1:1:this.sub(S).isNegative()?-1:1},F.comp=F.compare,F.negate=function(){return!this.unsigned&&this.eq(O)?O:this.not().add(_)},F.neg=F.negate,F.add=function(S){n(S)||(S=u(S));var Z=this.high>>>16,Q=this.high&65535,se=this.low>>>16,ce=this.low&65535,fe=S.high>>>16,le=S.high&65535,Ee=S.low>>>16,pe=S.low&65535,_e=0,Ce=0,we=0,Te=0;return Te+=ce+pe,we+=Te>>>16,Te&=65535,we+=se+Ee,Ce+=we>>>16,we&=65535,Ce+=Q+le,_e+=Ce>>>16,Ce&=65535,_e+=Z+fe,_e&=65535,s(we<<16|Te,_e<<16|Ce,this.unsigned)},F.subtract=function(S){return n(S)||(S=u(S)),this.add(S.neg())},F.sub=F.subtract,F.multiply=function(S){if(this.isZero())return y;if(n(S)||(S=u(S)),e){var Z=e.mul(this.low,this.high,S.low,S.high);return s(Z,e.get_high(),this.unsigned)}if(S.isZero())return y;if(this.eq(O))return S.isOdd()?O:y;if(S.eq(O))return this.isOdd()?O:y;if(this.isNegative())return S.isNegative()?this.neg().mul(S.neg()):this.neg().mul(S).neg();if(S.isNegative())return this.mul(S.neg()).neg();if(this.lt(v)&&S.lt(v))return a(this.toNumber()*S.toNumber(),this.unsigned);var Q=this.high>>>16,se=this.high&65535,ce=this.low>>>16,fe=this.low&65535,le=S.high>>>16,Ee=S.high&65535,pe=S.low>>>16,_e=S.low&65535,Ce=0,we=0,Te=0,Ve=0;return Ve+=fe*_e,Te+=Ve>>>16,Ve&=65535,Te+=ce*_e,we+=Te>>>16,Te&=65535,Te+=fe*pe,we+=Te>>>16,Te&=65535,we+=se*_e,Ce+=we>>>16,we&=65535,we+=ce*pe,Ce+=we>>>16,we&=65535,we+=fe*Ee,Ce+=we>>>16,we&=65535,Ce+=Q*_e+se*pe+ce*Ee+fe*le,Ce&=65535,s(Te<<16|Ve,Ce<<16|we,this.unsigned)},F.mul=F.multiply,F.divide=function(S){if(n(S)||(S=u(S)),S.isZero())throw Error("division by zero");if(e){if(!this.unsigned&&this.high===-2147483648&&S.low===-1&&S.high===-1)return this;var Z=(this.unsigned?e.div_u:e.div_s)(this.low,this.high,S.low,S.high);return s(Z,e.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?A:y;var Q,se,ce;if(this.unsigned){if(S.unsigned||(S=S.toUnsigned()),S.gt(this))return A;if(S.gt(this.shru(1)))return E;ce=A}else{if(this.eq(O)){if(S.eq(_)||S.eq(C))return O;if(S.eq(O))return _;var fe=this.shr(1);return Q=fe.div(S).shl(1),Q.eq(y)?S.isNegative()?_:C:(se=this.sub(S.mul(Q)),ce=Q.add(se.div(S)),ce)}else if(S.eq(O))return this.unsigned?A:y;if(this.isNegative())return S.isNegative()?this.neg().div(S.neg()):this.neg().div(S).neg();if(S.isNegative())return this.div(S.neg()).neg();ce=y}for(se=this;se.gte(S);){Q=Math.max(1,Math.floor(se.toNumber()/S.toNumber()));for(var le=Math.ceil(Math.log(Q)/Math.LN2),Ee=le<=48?1:c(2,le-48),pe=a(Q),_e=pe.mul(S);_e.isNegative()||_e.gt(se);)Q-=Ee,pe=a(Q,this.unsigned),_e=pe.mul(S);pe.isZero()&&(pe=_),ce=ce.add(pe),se=se.sub(_e)}return ce},F.div=F.divide,F.modulo=function(S){if(n(S)||(S=u(S)),e){var Z=(this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,S.low,S.high);return s(Z,e.get_high(),this.unsigned)}return this.sub(this.div(S).mul(S))},F.mod=F.modulo,F.rem=F.modulo,F.not=function(){return s(~this.low,~this.high,this.unsigned)},F.and=function(S){return n(S)||(S=u(S)),s(this.low&S.low,this.high&S.high,this.unsigned)},F.or=function(S){return n(S)||(S=u(S)),s(this.low|S.low,this.high|S.high,this.unsigned)},F.xor=function(S){return n(S)||(S=u(S)),s(this.low^S.low,this.high^S.high,this.unsigned)},F.shiftLeft=function(S){return n(S)&&(S=S.toInt()),(S&=63)===0?this:S<32?s(this.low<<S,this.high<<S|this.low>>>32-S,this.unsigned):s(0,this.low<<S-32,this.unsigned)},F.shl=F.shiftLeft,F.shiftRight=function(S){return n(S)&&(S=S.toInt()),(S&=63)===0?this:S<32?s(this.low>>>S|this.high<<32-S,this.high>>S,this.unsigned):s(this.high>>S-32,this.high>=0?0:-1,this.unsigned)},F.shr=F.shiftRight,F.shiftRightUnsigned=function(S){if(n(S)&&(S=S.toInt()),S&=63,S===0)return this;var Z=this.high;if(S<32){var Q=this.low;return s(Q>>>S|Z<<32-S,Z>>>S,this.unsigned)}else return S===32?s(Z,0,this.unsigned):s(Z>>>S-32,0,this.unsigned)},F.shru=F.shiftRightUnsigned,F.shr_u=F.shiftRightUnsigned,F.toSigned=function(){return this.unsigned?s(this.low,this.high,!1):this},F.toUnsigned=function(){return this.unsigned?this:s(this.low,this.high,!0)},F.toBytes=function(S){return S?this.toBytesLE():this.toBytesBE()},F.toBytesLE=function(){var S=this.high,Z=this.low;return[Z&255,Z>>>8&255,Z>>>16&255,Z>>>24,S&255,S>>>8&255,S>>>16&255,S>>>24]},F.toBytesBE=function(){var S=this.high,Z=this.low;return[S>>>24,S>>>16&255,S>>>8&255,S&255,Z>>>24,Z>>>16&255,Z>>>8&255,Z&255]},t.fromBytes=function(S,Z,Q){return Q?t.fromBytesLE(S,Z):t.fromBytesBE(S,Z)},t.fromBytesLE=function(S,Z){return new t(S[0]|S[1]<<8|S[2]<<16|S[3]<<24,S[4]|S[5]<<8|S[6]<<16|S[7]<<24,Z)},t.fromBytesBE=function(S,Z){return new t(S[4]<<24|S[5]<<16|S[6]<<8|S[7],S[0]<<24|S[1]<<16|S[2]<<8|S[3],Z)},Qd}var rF=nF();const pu=fu(rF),gu=1;class iF{constructor({filehandle:t,path:n}){if(t)this.filehandle=t;else if(n)this.filehandle=new Tt(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(t,n=0,r=!0){const i=pu.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=$e.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=$e.Buffer.allocUnsafe(i),await this.filehandle.read(t,0,i,8);for(let o=0;o<n;o+=1){const a=this._readLongWithOverflow(t,o*16),s=this._readLongWithOverflow(t,o*16+8);r[o+1]=[a,s]}return r}async getLastBlock(){const t=await this._getIndex();if(t.length)return t[t.length-1]}async getRelevantBlocksForRead(t,n){const r=n+t;if(t===0)return[];const i=await this._getIndex(),o=[],a=(h,d)=>{const p=h[gu],b=d?d[gu]:1/0;return p<=n&&b>n?0:p<n?-1:1};let s=0,c=i.length-1,l=Math.floor(i.length/2),u=a(i[l],i[l+1]);for(;u!==0;)u>0?c=l-1:u<0&&(s=l+1),l=Math.ceil((c-s)/2)+s,u=a(i[l],i[l+1]);o.push(i[l]);let f=l+1;for(;f<i.length&&(o.push(i[f]),!(i[f][gu]>=r));f+=1);return o[o.length-1][gu]<r&&o.push([]),o}}class gw{constructor({filehandle:t,path:n,gziFilehandle:r,gziPath:i}){if(t)this.filehandle=t;else if(n)this.filehandle=new Tt(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 iF({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=$e.Buffer.allocUnsafe(4),{bytesRead:i}=await this.filehandle.read(r,0,4,n-28-4);if(i!==4)throw new Error("read error");const o=r.readUInt32LE(0);return t+o}async _readAndUncompressBlock(t,[n],[r]){let i=r;i||(i=(await this.filehandle.stat()).size);const o=i-n;return await this.filehandle.read(t,0,o,n),await Qr(t.slice(0,o))}async read(t,n,r,i){const o=await this.gzi.getRelevantBlocksForRead(r,i),a=$e.Buffer.allocUnsafe(32768*2);let s=n,c=0;for(let l=0;l<o.length-1;l+=1){const u=await this._readAndUncompressBlock(a,o[l],o[l+1]),[,f]=o[l],h=f>=i?0:i-f,d=Math.min(i+r,f+u.length)-f;h>=0&&h<u.length&&(u.copy(t,s,h,d),s+=d-h,c+=d-h)}return{bytesRead:c,buffer:t}}}function mw(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function oF(e,t){const n=await e.readFile(t);if(!(n!=null&&n.length))throw new Error("No data read from FASTA index (FAI) file");let r=0,i;const o=n.toString("utf8").split(/\r?\n/).filter(a=>/\S/.test(a)).map(a=>a.split(" ")).filter(a=>a[0]!=="").map(a=>((!i||i.name!==a[0])&&(i={name:a[0],id:r},r+=1),{id:i.id,name:a[0],length:+a[1],start:0,end:+a[1],offset:+a[2],lineLength:+a[3],lineBytes:+a[4]}));return{name:Object.fromEntries(o.map(a=>[a.name,a])),id:Object.fromEntries(o.map(a=>[a.id,a]))}}class bw{constructor({fasta:t,fai:n,path:r,faiPath:i}){if(t)this.fasta=t;else if(r)this.fasta=new Tt(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 Tt(i);else if(r)this.fai=new Tt(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile")}async _getIndexes(t){return this.indexes||(this.indexes=oF(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);for(const i of Object.values(r.id))n[i.name]=i.length;return n}async getSequenceSize(t,n){var r;return(r=(await this._getIndexes(n)).name[t])===null||r===void 0?void 0:r.length}async hasReferenceSequence(t,n){return!!(await this._getIndexes(n)).name[t]}async getResiduesById(t,n,r,i){const o=(await this._getIndexes(i)).id[t];if(o)return this._fetchFromIndexEntry(o,n,r,i)}async getResiduesByName(t,n,r,i){const o=(await this._getIndexes(i)).name[t];if(o)return this._fetchFromIndexEntry(o,n,r,i)}async getSequence(t,n,r,i){return this.getResiduesByName(t,n,r,i)}async _fetchFromIndexEntry(t,n=0,r,i){let o=r;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((o===void 0||o>t.length)&&(o=t.length),n>=o)return"";const a=mw(t,n),s=mw(t,o)-a,c=$e.Buffer.allocUnsafe(s);return await this.fasta.read(c,0,s,a,i),c.toString("utf8").replace(/\s+/g,"")}}class aF extends bw{constructor({fasta:t,path:n,fai:r,faiPath:i,gzi:o,gziPath:a}){super({fasta:t,path:n,fai:r,faiPath:i}),t&&o?this.fasta=new gw({filehandle:t,gziFilehandle:o}):n&&a&&(this.fasta=new gw({path:n,gziPath:a}))}}function yw(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
|
|
626
|
-
`),[i,...o]=n.split(" "),a=r.join("").replace(/\s/g,"");return{id:i,description:o.join(" "),sequence:a}})}class sF{constructor({fasta:t,path:n}){if(t)this.fasta=t;else if(n)this.fasta=new Tt(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const i=r.toString("utf8");return yw(i)})}async fetch(t,n,r){const o=(await this.data).find(s=>s.id===t),a=r-n;if(!o)throw new Error(`no sequence with id ${t} exists`);return o.sequence.slice(n,a)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const cF=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:aF,FetchableSmallFasta:sF,IndexedFasta:bw,parseSmallFasta:yw},Symbol.toStringTag,{value:"Module"})),ww=BigInt(32);function lF(e,t,n){const r=+!!n,i=+!n;return BigInt(e.getInt32(t,n)*i+e.getInt32(t+4,n)*r)<<ww|BigInt(e.getUint32(t,n)*r+e.getUint32(t+4,n)*i)}function uF(e,t,n){const r=e.getUint32(t,n),i=e.getUint32(t+4,n),o=+!!n,a=+!n;return BigInt(r*a+i*o)<<ww|BigInt(r*o+i*a)}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return lF(this,e,t)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(e,t){return uF(this,e,t)});class fF{}class hF{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(t=new fF){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()}}class dF{constructor(){this.callbacks=new Set}addCallback(t=()=>{}){this.callbacks.add(t),t(this.currentMessage)}callback(t){this.currentMessage=t;for(const n of this.callbacks)n(t)}}class Ui{constructor({fill:t,cache:n}){if(typeof t!="function")throw new TypeError("must pass a fill function");if(typeof n!="object")throw new TypeError("must pass a cache object");if(typeof n.get!="function"||typeof n.set!="function"||typeof n.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=n,this.fillCallback=t}static isAbortException(t){return t.name==="AbortError"||t.code==="ERR_ABORTED"||t.message==="AbortError: aborted"||t.message==="Error: aborted"}evict(t,n){this.cache.get(t)===n&&this.cache.delete(t)}fill(t,n,r,i){const o=new hF,a=new dF;a.addCallback(i);const s={aborter:o,promise:this.fillCallback(n,o.signal,c=>{a.callback(c)}),settled:!1,statusReporter:a,get aborted(){return this.aborter.signal.aborted}};s.aborter.addSignal(r),s.aborter.signal.addEventListener("abort",()=>{s.settled||this.evict(t,s)}),s.promise.then(()=>{s.settled=!0},()=>{s.settled=!0,this.evict(t,s)}).catch(c=>{throw console.error(c),c}),this.cache.set(t,s)}static checkSinglePromise(t,n){function r(){if(n!=null&&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 AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const o=this.cache.get(t);return o?o.aborted&&!o.settled?(this.evict(t,o),this.get(t,n,r,i)):o.settled?o.promise:(o.aborter.addSignal(r),o.statusReporter.addCallback(i),Ui.checkSinglePromise(o.promise,r)):(this.fill(t,n,r,i),Ui.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}}var Xd,xw;function pF(){if(xw)return Xd;xw=1;class e{constructor(n={}){if(!(n.maxSize&&n.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=n.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(n,r){this.cache.set(n,r),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(n){if(this.cache.has(n))return this.cache.get(n);if(this.oldCache.has(n)){const r=this.oldCache.get(n);return this.oldCache.delete(n),this._set(n,r),r}}set(n,r){return this.cache.has(n)?this.cache.set(n,r):this._set(n,r),this}has(n){return this.cache.has(n)||this.oldCache.has(n)}peek(n){if(this.cache.has(n))return this.cache.get(n);if(this.oldCache.has(n))return this.oldCache.get(n)}delete(n){const r=this.cache.delete(n);return r&&this._size--,this.oldCache.delete(n)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[n]of this)yield n}*values(){for(const[,n]of this)yield n}*[Symbol.iterator](){for(const n of this.cache)yield n;for(const n of this.oldCache){const[r]=n;this.cache.has(r)||(yield n)}}get size(){let n=0;for(const r of this.oldCache.keys())this.cache.has(r)||n++;return this._size+n}}return Xd=e,Xd}var gF=pF();const mu=fu(gF);class Po{constructor(t){this.ranges=t}get min(){return this.ranges[0].min}get max(){return this.ranges.at(-1).max}contains(t){for(const n of this.ranges)if(n.min<=t&&n.max>=t)return!0;return!1}isContiguous(){return this.ranges.length>1}getRanges(){return this.ranges.map(t=>new Po([{min:t.min,max:t.max}]))}toString(){return this.ranges.map(t=>`[${t.min}-${t.max}]`).join(",")}union(t){const n=[...this.getRanges(),...t.getRanges()].sort((o,a)=>o.min<a.min?-1:o.min>a.min?1:o.max<a.max?-1:a.max>o.max?1:0),r=[];let i=n[0];for(const o of n)o.min>i.max+1?(r.push(i),i=o):o.max>i.max&&(i=new Po([{min:i.min,max:o.max}]));return r.push(i),r.length===1?r[0]:new Po(r)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const mF=4,vw=0,Aw=1,bF=2;function Lo(e){let t=e.length;for(;--t>=0;)e[t]=0}const yF=0,Ew=1,wF=2,xF=3,vF=258,Kd=29,Vs=256,qs=Vs+1+Kd,No=30,Jd=19,Sw=2*qs+1,Gi=15,$d=16,AF=7,e0=256,_w=16,Cw=17,Tw=18,t0=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]),bu=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]),EF=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Iw=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),SF=512,hr=new Array((qs+2)*2);Lo(hr);const js=new Array(No*2);Lo(js);const Ws=new Array(SF);Lo(Ws);const Zs=new Array(vF-xF+1);Lo(Zs);const n0=new Array(Kd);Lo(n0);const yu=new Array(No);Lo(yu);function r0(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 Dw,kw,Bw;function i0(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const Rw=e=>e<256?Ws[e]:Ws[256+(e>>>7)],Ys=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},tn=(e,t,n)=>{e.bi_valid>$d-n?(e.bi_buf|=t<<e.bi_valid&65535,Ys(e,e.bi_buf),e.bi_buf=t>>$d-e.bi_valid,e.bi_valid+=n-$d):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},Qn=(e,t,n)=>{tn(e,n[t*2],n[t*2+1])},Fw=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},_F=e=>{e.bi_valid===16?(Ys(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)},CF=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,u,f,h,d,p,b=0;for(h=0;h<=Gi;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<Sw;l++)u=e.heap[l],h=n[n[u*2+1]*2+1]+1,h>c&&(h=c,b++),n[u*2+1]=h,!(u>r)&&(e.bl_count[h]++,d=0,u>=s&&(d=a[u-s]),p=n[u*2],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[u*2+1]+d)));if(b!==0){do{for(h=c-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,b-=2}while(b>0);for(h=c;h!==0;h--)for(u=e.bl_count[h];u!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),u--)}},Mw=(e,t,n)=>{const r=new Array(Gi+1);let i=0,o,a;for(o=1;o<=Gi;o++)i=i+n[o-1]<<1,r[o]=i;for(a=0;a<=t;a++){let s=e[a*2+1];s!==0&&(e[a*2]=Fw(r[s]++,s))}},TF=()=>{let e,t,n,r,i;const o=new Array(Gi+1);for(n=0,r=0;r<Kd-1;r++)for(n0[r]=n,e=0;e<1<<t0[r];e++)Zs[n++]=r;for(Zs[n-1]=r,i=0,r=0;r<16;r++)for(yu[r]=i,e=0;e<1<<bu[r];e++)Ws[i++]=r;for(i>>=7;r<No;r++)for(yu[r]=i<<7,e=0;e<1<<bu[r]-7;e++)Ws[256+i++]=r;for(t=0;t<=Gi;t++)o[t]=0;for(e=0;e<=143;)hr[e*2+1]=8,e++,o[8]++;for(;e<=255;)hr[e*2+1]=9,e++,o[9]++;for(;e<=279;)hr[e*2+1]=7,e++,o[7]++;for(;e<=287;)hr[e*2+1]=8,e++,o[8]++;for(Mw(hr,qs+1,o),e=0;e<No;e++)js[e*2+1]=5,js[e*2]=Fw(e,5);Dw=new r0(hr,t0,Vs+1,qs,Gi),kw=new r0(js,bu,0,No,Gi),Bw=new r0(new Array(0),EF,0,Jd,AF)},Pw=e=>{let t;for(t=0;t<qs;t++)e.dyn_ltree[t*2]=0;for(t=0;t<No;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Jd;t++)e.bl_tree[t*2]=0;e.dyn_ltree[e0*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Lw=e=>{e.bi_valid>8?Ys(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Nw=(e,t,n,r)=>{const i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},o0=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&Nw(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Nw(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},Ow=(e,t,n)=>{let r,i,o=0,a,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?Qn(e,i,t):(a=Zs[i],Qn(e,a+Vs+1,t),s=t0[a],s!==0&&(i-=n0[a],tn(e,i,s)),r--,a=Rw(r),Qn(e,a,n),s=bu[a],s!==0&&(r-=yu[a],tn(e,r,s)));while(o<e.sym_next);Qn(e,e0,t)},a0=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,s,c=-1,l;for(e.heap_len=0,e.heap_max=Sw,a=0;a<o;a++)n[a*2]!==0?(e.heap[++e.heap_len]=c=a,e.depth[a]=0):n[a*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,a=e.heap_len>>1;a>=1;a--)o0(e,n,a);l=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],o0(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[l*2]=n[a*2]+n[s*2],e.depth[l]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[a*2+1]=n[s*2+1]=l,e.heap[1]=l++,o0(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],CF(e,t),Mw(n,c,e.bl_count)},zw=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,c=7,l=4;for(a===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=a,a=t[(r+1)*2+1],!(++s<c&&o===a)&&(s<l?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[_w*2]++):s<=10?e.bl_tree[Cw*2]++:e.bl_tree[Tw*2]++,s=0,i=o,a===0?(c=138,l=3):o===a?(c=6,l=3):(c=7,l=4))},Uw=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,c=7,l=4;for(a===0&&(c=138,l=3),r=0;r<=n;r++)if(o=a,a=t[(r+1)*2+1],!(++s<c&&o===a)){if(s<l)do Qn(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(Qn(e,o,e.bl_tree),s--),Qn(e,_w,e.bl_tree),tn(e,s-3,2)):s<=10?(Qn(e,Cw,e.bl_tree),tn(e,s-3,3)):(Qn(e,Tw,e.bl_tree),tn(e,s-11,7));s=0,i=o,a===0?(c=138,l=3):o===a?(c=6,l=3):(c=7,l=4)}},IF=e=>{let t;for(zw(e,e.dyn_ltree,e.l_desc.max_code),zw(e,e.dyn_dtree,e.d_desc.max_code),a0(e,e.bl_desc),t=Jd-1;t>=3&&e.bl_tree[Iw[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},DF=(e,t,n,r)=>{let i;for(tn(e,t-257,5),tn(e,n-1,5),tn(e,r-4,4),i=0;i<r;i++)tn(e,e.bl_tree[Iw[i]*2+1],3);Uw(e,e.dyn_ltree,t-1),Uw(e,e.dyn_dtree,n-1)},kF=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return vw;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Aw;for(n=32;n<Vs;n++)if(e.dyn_ltree[n*2]!==0)return Aw;return vw};let Gw=!1;const BF=e=>{Gw||(TF(),Gw=!0),e.l_desc=new i0(e.dyn_ltree,Dw),e.d_desc=new i0(e.dyn_dtree,kw),e.bl_desc=new i0(e.bl_tree,Bw),e.bi_buf=0,e.bi_valid=0,Pw(e)},Hw=(e,t,n,r)=>{tn(e,(yF<<1)+(r?1:0),3),Lw(e),Ys(e,n),Ys(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},RF=e=>{tn(e,Ew<<1,3),Qn(e,e0,hr),_F(e)},FF=(e,t,n,r)=>{let i,o,a=0;e.level>0?(e.strm.data_type===bF&&(e.strm.data_type=kF(e)),a0(e,e.l_desc),a0(e,e.d_desc),a=IF(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?Hw(e,t,n,r):e.strategy===mF||o===i?(tn(e,(Ew<<1)+(r?1:0),3),Ow(e,hr,js)):(tn(e,(wF<<1)+(r?1:0),3),DF(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),Ow(e,e.dyn_ltree,e.dyn_dtree)),Pw(e),r&&Lw(e)},MF=(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[(Zs[n]+Vs+1)*2]++,e.dyn_dtree[Rw(t)*2]++),e.sym_next===e.sym_end);var PF=BF,LF=Hw,NF=FF,OF=MF,zF=RF,UF={_tr_init:PF,_tr_stored_block:LF,_tr_flush_block:NF,_tr_tally:OF,_tr_align:zF},Qs=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,a=0;for(;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+t[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0};const GF=()=>{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},HF=new Uint32Array(GF());var It=(e,t,n,r)=>{const i=HF,o=r+n;e^=-1;for(let a=r;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1},Oo={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"},Xs={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:VF,_tr_stored_block:s0,_tr_flush_block:qF,_tr_tally:Xr,_tr_align:jF}=UF,{Z_NO_FLUSH:Kr,Z_PARTIAL_FLUSH:WF,Z_FULL_FLUSH:ZF,Z_FINISH:xn,Z_BLOCK:Vw,Z_OK:Mt,Z_STREAM_END:qw,Z_STREAM_ERROR:Xn,Z_DATA_ERROR:YF,Z_BUF_ERROR:c0,Z_DEFAULT_COMPRESSION:QF,Z_FILTERED:XF,Z_HUFFMAN_ONLY:wu,Z_RLE:KF,Z_FIXED:JF,Z_DEFAULT_STRATEGY:$F,Z_UNKNOWN:e9,Z_DEFLATED:xu}=Xs,t9=9,n9=15,r9=8,l0=256+1+29,i9=30,o9=19,a9=2*l0+1,s9=15,He=3,Jr=258,Kn=Jr+He+1,c9=32,zo=42,u0=57,f0=69,h0=73,d0=91,p0=103,Hi=113,Ks=666,Qt=1,Uo=2,Vi=3,Go=4,l9=3,qi=(e,t)=>(e.msg=Oo[t],t),jw=e=>e*2-(e>4?9:0),$r=e=>{let t=e.length;for(;--t>=0;)e[t]=0},u9=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 ei=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const sn=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))},cn=(e,t)=>{qF(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,sn(e.strm)},Qe=(e,t)=>{e.pending_buf[e.pending++]=t},Js=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},g0=(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=Qs(e.adler,t,i,n):e.state.wrap===2&&(e.adler=It(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Ww=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,a=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-Kn?e.strstart-(e.w_size-Kn):0,l=e.window,u=e.w_mask,f=e.prev,h=e.strstart+Jr;let d=l[r+a-1],p=l[r+a];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+a]!==p||l[i+a-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(o=Jr-(h-r),r=h-Jr,o>a){if(e.match_start=t,a=o,o>=s)break;d=l[r+a-1],p=l[r+a]}}while((t=f[t&u])>c&&--n!==0);return a<=e.lookahead?a:e.lookahead},Ho=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Kn)&&(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),u9(e),r+=t),e.strm.avail_in===0)break;if(n=g0(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=He)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=ei(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=ei(e,e.ins_h,e.window[i+He-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<He)););}while(e.lookahead<Kn&&e.strm.avail_in!==0)},Zw=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,a=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o||(o=e.strm.avail_out-o,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r<n&&(r===0&&t!==xn||t===Kr||r!==i+e.strm.avail_in)))break;a=t===xn&&r===i+e.strm.avail_in?1:0,s0(e,0,0,a),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,sn(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&&(g0(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(a===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?Go:t!==Kr&&t!==xn&&e.strm.avail_in===0&&e.strstart===e.block_start?Uo:(o=e.window_size-e.strstart,e.strm.avail_in>o&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(g0(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===xn)&&t!==Kr&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,a=t===xn&&e.strm.avail_in===0&&r===i?1:0,s0(e,e.block_start,r,a),e.block_start+=r,sn(e.strm)),a?Vi:Qt)},m0=(e,t)=>{let n,r;for(;;){if(e.lookahead<Kn){if(Ho(e),e.lookahead<Kn&&t===Kr)return Qt;if(e.lookahead===0)break}if(n=0,e.lookahead>=He&&(e.ins_h=ei(e,e.ins_h,e.window[e.strstart+He-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-Kn&&(e.match_length=Ww(e,n)),e.match_length>=He)if(r=Xr(e,e.strstart-e.match_start,e.match_length-He),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=He){e.match_length--;do e.strstart++,e.ins_h=ei(e,e.ins_h,e.window[e.strstart+He-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=ei(e,e.ins_h,e.window[e.strstart+1]);else r=Xr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(cn(e,!1),e.strm.avail_out===0))return Qt}return e.insert=e.strstart<He-1?e.strstart:He-1,t===xn?(cn(e,!0),e.strm.avail_out===0?Vi:Go):e.sym_next&&(cn(e,!1),e.strm.avail_out===0)?Qt:Uo},Vo=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<Kn){if(Ho(e),e.lookahead<Kn&&t===Kr)return Qt;if(e.lookahead===0)break}if(n=0,e.lookahead>=He&&(e.ins_h=ei(e,e.ins_h,e.window[e.strstart+He-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=He-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Kn&&(e.match_length=Ww(e,n),e.match_length<=5&&(e.strategy===XF||e.match_length===He&&e.strstart-e.match_start>4096)&&(e.match_length=He-1)),e.prev_length>=He&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-He,r=Xr(e,e.strstart-1-e.prev_match,e.prev_length-He),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=ei(e,e.ins_h,e.window[e.strstart+He-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=He-1,e.strstart++,r&&(cn(e,!1),e.strm.avail_out===0))return Qt}else if(e.match_available){if(r=Xr(e,0,e.window[e.strstart-1]),r&&cn(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Qt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Xr(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<He-1?e.strstart:He-1,t===xn?(cn(e,!0),e.strm.avail_out===0?Vi:Go):e.sym_next&&(cn(e,!1),e.strm.avail_out===0)?Qt:Uo},f9=(e,t)=>{let n,r,i,o;const a=e.window;for(;;){if(e.lookahead<=Jr){if(Ho(e),e.lookahead<=Jr&&t===Kr)return Qt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=He&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+Jr;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=Jr-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=He?(n=Xr(e,1,e.match_length-He),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Xr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(cn(e,!1),e.strm.avail_out===0))return Qt}return e.insert=0,t===xn?(cn(e,!0),e.strm.avail_out===0?Vi:Go):e.sym_next&&(cn(e,!1),e.strm.avail_out===0)?Qt:Uo},h9=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Ho(e),e.lookahead===0)){if(t===Kr)return Qt;break}if(e.match_length=0,n=Xr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(cn(e,!1),e.strm.avail_out===0))return Qt}return e.insert=0,t===xn?(cn(e,!0),e.strm.avail_out===0?Vi:Go):e.sym_next&&(cn(e,!1),e.strm.avail_out===0)?Qt:Uo};function Jn(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const $s=[new Jn(0,0,0,0,Zw),new Jn(4,4,8,4,m0),new Jn(4,5,16,8,m0),new Jn(4,6,32,32,m0),new Jn(4,4,16,16,Vo),new Jn(8,16,32,32,Vo),new Jn(8,16,128,128,Vo),new Jn(8,32,128,256,Vo),new Jn(32,128,258,1024,Vo),new Jn(32,258,258,4096,Vo)],d9=e=>{e.window_size=2*e.w_size,$r(e.head),e.max_lazy_match=$s[e.level].max_lazy,e.good_match=$s[e.level].good_length,e.nice_match=$s[e.level].nice_length,e.max_chain_length=$s[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=He-1,e.match_available=0,e.ins_h=0};function p9(){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=xu,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(a9*2),this.dyn_dtree=new Uint16Array((2*i9+1)*2),this.bl_tree=new Uint16Array((2*o9+1)*2),$r(this.dyn_ltree),$r(this.dyn_dtree),$r(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(s9+1),this.heap=new Uint16Array(2*l0+1),$r(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*l0+1),$r(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 ec=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==zo&&t.status!==u0&&t.status!==f0&&t.status!==h0&&t.status!==d0&&t.status!==p0&&t.status!==Hi&&t.status!==Ks?1:0},Yw=e=>{if(ec(e))return qi(e,Xn);e.total_in=e.total_out=0,e.data_type=e9;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?u0:t.wrap?zo:Hi,e.adler=t.wrap===2?0:1,t.last_flush=-2,VF(t),Mt},Qw=e=>{const t=Yw(e);return t===Mt&&d9(e.state),t},g9=(e,t)=>ec(e)||e.state.wrap!==2?Xn:(e.state.gzhead=t,Mt),Xw=(e,t,n,r,i,o)=>{if(!e)return Xn;let a=1;if(t===QF&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>t9||n!==xu||r<8||r>15||t<0||t>9||o<0||o>JF||r===8&&a!==1)return qi(e,Xn);r===8&&(r=9);const s=new p9;return e.state=s,s.strm=e,s.status=zo,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+He-1)/He),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=o,s.method=n,Qw(e)},m9=(e,t)=>Xw(e,t,xu,n9,r9,$F),b9=(e,t)=>{if(ec(e)||t>Vw||t<0)return e?qi(e,Xn):Xn;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Ks&&t!==xn)return qi(e,e.avail_out===0?c0:Xn);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(sn(e),e.avail_out===0)return n.last_flush=-1,Mt}else if(e.avail_in===0&&jw(t)<=jw(r)&&t!==xn)return qi(e,c0);if(n.status===Ks&&e.avail_in!==0)return qi(e,c0);if(n.status===zo&&n.wrap===0&&(n.status=Hi),n.status===zo){let i=xu+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=wu||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=c9),i+=31-i%31,Js(n,i),n.strstart!==0&&(Js(n,e.adler>>>16),Js(n,e.adler&65535)),e.adler=1,n.status=Hi,sn(e),n.pending!==0)return n.last_flush=-1,Mt}if(n.status===u0){if(e.adler=0,Qe(n,31),Qe(n,139),Qe(n,8),n.gzhead)Qe(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)),Qe(n,n.gzhead.time&255),Qe(n,n.gzhead.time>>8&255),Qe(n,n.gzhead.time>>16&255),Qe(n,n.gzhead.time>>24&255),Qe(n,n.level===9?2:n.strategy>=wu||n.level<2?4:0),Qe(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Qe(n,n.gzhead.extra.length&255),Qe(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=It(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=f0;else if(Qe(n,0),Qe(n,0),Qe(n,0),Qe(n,0),Qe(n,0),Qe(n,n.level===9?2:n.strategy>=wu||n.level<2?4:0),Qe(n,l9),n.status=Hi,sn(e),n.pending!==0)return n.last_flush=-1,Mt}if(n.status===f0){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=It(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,sn(e),n.pending!==0)return n.last_flush=-1,Mt;i=0,o-=s}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=It(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=h0}if(n.status===h0){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=It(e.adler,n.pending_buf,n.pending-i,i)),sn(e),n.pending!==0)return n.last_flush=-1,Mt;i=0}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,Qe(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=It(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=d0}if(n.status===d0){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=It(e.adler,n.pending_buf,n.pending-i,i)),sn(e),n.pending!==0)return n.last_flush=-1,Mt;i=0}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,Qe(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=It(e.adler,n.pending_buf,n.pending-i,i))}n.status=p0}if(n.status===p0){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(sn(e),n.pending!==0))return n.last_flush=-1,Mt;Qe(n,e.adler&255),Qe(n,e.adler>>8&255),e.adler=0}if(n.status=Hi,sn(e),n.pending!==0)return n.last_flush=-1,Mt}if(e.avail_in!==0||n.lookahead!==0||t!==Kr&&n.status!==Ks){let i=n.level===0?Zw(n,t):n.strategy===wu?h9(n,t):n.strategy===KF?f9(n,t):$s[n.level].func(n,t);if((i===Vi||i===Go)&&(n.status=Ks),i===Qt||i===Vi)return e.avail_out===0&&(n.last_flush=-1),Mt;if(i===Uo&&(t===WF?jF(n):t!==Vw&&(s0(n,0,0,!1),t===ZF&&($r(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),sn(e),e.avail_out===0))return n.last_flush=-1,Mt}return t!==xn?Mt:n.wrap<=0?qw:(n.wrap===2?(Qe(n,e.adler&255),Qe(n,e.adler>>8&255),Qe(n,e.adler>>16&255),Qe(n,e.adler>>24&255),Qe(n,e.total_in&255),Qe(n,e.total_in>>8&255),Qe(n,e.total_in>>16&255),Qe(n,e.total_in>>24&255)):(Js(n,e.adler>>>16),Js(n,e.adler&65535)),sn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Mt:qw)},y9=e=>{if(ec(e))return Xn;const t=e.state.status;return e.state=null,t===Hi?qi(e,YF):Mt},w9=(e,t)=>{let n=t.length;if(ec(e))return Xn;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==zo||r.lookahead)return Xn;if(i===1&&(e.adler=Qs(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&($r(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(t.subarray(n-r.w_size,n),0),t=c,n=r.w_size}const o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ho(r);r.lookahead>=He;){let c=r.strstart,l=r.lookahead-(He-1);do r.ins_h=ei(r,r.ins_h,r.window[c+He-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--l);r.strstart=c,r.lookahead=He-1,Ho(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=He-1,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,Mt};var x9=m9,v9=Xw,A9=Qw,E9=Yw,S9=g9,_9=b9,C9=y9,T9=w9,I9="pako deflate (from Nodeca project)",tc={deflateInit:x9,deflateInit2:v9,deflateReset:A9,deflateResetKeep:E9,deflateSetHeader:S9,deflate:_9,deflateEnd:C9,deflateSetDictionary:T9,deflateInfo:I9};const D9=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var k9=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)D9(n,r)&&(e[r]=n[r])}}return e},B9=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,o=e.length;r<o;r++){let a=e[r];n.set(a,i),i+=a.length}return n},vu={assign:k9,flattenChunks:B9};let Kw=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Kw=!1}const nc=new Uint8Array(256);for(let e=0;e<256;e++)nc[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;nc[254]=nc[254]=1;var R9=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),o=0,i=0;o<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};const F9=(e,t)=>{if(t<65534&&e.subarray&&Kw)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 M9=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const o=new Array(n*2);for(i=0,r=0;r<n;){let a=e[r++];if(a<128){o[i++]=a;continue}let s=nc[a];if(s>4){o[i++]=65533,r+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&r<n;)a=a<<6|e[r++]&63,s--;if(s>1){o[i++]=65533;continue}a<65536?o[i++]=a:(a-=65536,o[i++]=55296|a>>10&1023,o[i++]=56320|a&1023)}return F9(o,i)},P9=(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+nc[e[n]]>t?n:t},rc={string2buf:R9,buf2string:M9,utf8border:P9};function L9(){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 Jw=L9;const $w=Object.prototype.toString,{Z_NO_FLUSH:N9,Z_SYNC_FLUSH:O9,Z_FULL_FLUSH:z9,Z_FINISH:U9,Z_OK:Au,Z_STREAM_END:G9,Z_DEFAULT_COMPRESSION:H9,Z_DEFAULT_STRATEGY:V9,Z_DEFLATED:q9}=Xs;function b0(e){this.options=vu.assign({level:H9,method:q9,chunkSize:16384,windowBits:15,memLevel:8,strategy:V9},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 Jw,this.strm.avail_out=0;let n=tc.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Au)throw new Error(Oo[n]);if(t.header&&tc.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=rc.string2buf(t.dictionary):$w.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=tc.deflateSetDictionary(this.strm,r),n!==Au)throw new Error(Oo[n]);this._dict_set=!0}}b0.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?U9:N9,typeof e=="string"?n.input=rc.string2buf(e):$w.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===O9||o===z9)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=tc.deflate(n,o),i===G9)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=tc.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Au;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0},b0.prototype.onData=function(e){this.chunks.push(e)},b0.prototype.onEnd=function(e){e===Au&&(this.result=vu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const Eu=16209,j9=16191;var W9=function(t,n){let r,i,o,a,s,c,l,u,f,h,d,p,b,v,y,A,_,E,C,R,D,O,F,P;const S=t.state;r=t.next_in,F=t.input,i=r+(t.avail_in-5),o=t.next_out,P=t.output,a=o-(n-t.avail_out),s=o+(t.avail_out-257),c=S.dmax,l=S.wsize,u=S.whave,f=S.wnext,h=S.window,d=S.hold,p=S.bits,b=S.lencode,v=S.distcode,y=(1<<S.lenbits)-1,A=(1<<S.distbits)-1;e:do{p<15&&(d+=F[r++]<<p,p+=8,d+=F[r++]<<p,p+=8),_=b[d&y];t:for(;;){if(E=_>>>24,d>>>=E,p-=E,E=_>>>16&255,E===0)P[o++]=_&65535;else if(E&16){C=_&65535,E&=15,E&&(p<E&&(d+=F[r++]<<p,p+=8),C+=d&(1<<E)-1,d>>>=E,p-=E),p<15&&(d+=F[r++]<<p,p+=8,d+=F[r++]<<p,p+=8),_=v[d&A];n:for(;;){if(E=_>>>24,d>>>=E,p-=E,E=_>>>16&255,E&16){if(R=_&65535,E&=15,p<E&&(d+=F[r++]<<p,p+=8,p<E&&(d+=F[r++]<<p,p+=8)),R+=d&(1<<E)-1,R>c){t.msg="invalid distance too far back",S.mode=Eu;break e}if(d>>>=E,p-=E,E=o-a,R>E){if(E=R-E,E>u&&S.sane){t.msg="invalid distance too far back",S.mode=Eu;break e}if(D=0,O=h,f===0){if(D+=l-E,E<C){C-=E;do P[o++]=h[D++];while(--E);D=o-R,O=P}}else if(f<E){if(D+=l+f-E,E-=f,E<C){C-=E;do P[o++]=h[D++];while(--E);if(D=0,f<C){E=f,C-=E;do P[o++]=h[D++];while(--E);D=o-R,O=P}}}else if(D+=f-E,E<C){C-=E;do P[o++]=h[D++];while(--E);D=o-R,O=P}for(;C>2;)P[o++]=O[D++],P[o++]=O[D++],P[o++]=O[D++],C-=3;C&&(P[o++]=O[D++],C>1&&(P[o++]=O[D++]))}else{D=o-R;do P[o++]=P[D++],P[o++]=P[D++],P[o++]=P[D++],C-=3;while(C>2);C&&(P[o++]=P[D++],C>1&&(P[o++]=P[D++]))}}else if(E&64){t.msg="invalid distance code",S.mode=Eu;break e}else{_=v[(_&65535)+(d&(1<<E)-1)];continue n}break}}else if(E&64)if(E&32){S.mode=j9;break e}else{t.msg="invalid literal/length code",S.mode=Eu;break e}else{_=b[(_&65535)+(d&(1<<E)-1)];continue t}break}}while(r<i&&o<s);C=p>>3,r-=C,p-=C<<3,d&=(1<<p)-1,t.next_in=r,t.next_out=o,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=o<s?257+(s-o):257-(o-s),S.hold=d,S.bits=p};const qo=15,ex=852,tx=592,nx=0,y0=1,rx=2,Z9=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]),Y9=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]),Q9=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]),X9=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 ic=(e,t,n,r,i,o,a,s)=>{const c=s.bits;let l=0,u=0,f=0,h=0,d=0,p=0,b=0,v=0,y=0,A=0,_,E,C,R,D,O=null,F;const P=new Uint16Array(qo+1),S=new Uint16Array(qo+1);let Z=null,Q,se,ce;for(l=0;l<=qo;l++)P[l]=0;for(u=0;u<r;u++)P[t[n+u]]++;for(d=c,h=qo;h>=1&&P[h]===0;h--);if(d>h&&(d=h),h===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(f=1;f<h&&P[f]===0;f++);for(d<f&&(d=f),v=1,l=1;l<=qo;l++)if(v<<=1,v-=P[l],v<0)return-1;if(v>0&&(e===nx||h!==1))return-1;for(S[1]=0,l=1;l<qo;l++)S[l+1]=S[l]+P[l];for(u=0;u<r;u++)t[n+u]!==0&&(a[S[t[n+u]]++]=u);if(e===nx?(O=Z=a,F=20):e===y0?(O=Z9,Z=Y9,F=257):(O=Q9,Z=X9,F=0),A=0,u=0,l=f,D=o,p=d,b=0,C=-1,y=1<<d,R=y-1,e===y0&&y>ex||e===rx&&y>tx)return 1;for(;;){Q=l-b,a[u]+1<F?(se=0,ce=a[u]):a[u]>=F?(se=Z[a[u]-F],ce=O[a[u]-F]):(se=96,ce=0),_=1<<l-b,E=1<<p,f=E;do E-=_,i[D+(A>>b)+E]=Q<<24|se<<16|ce|0;while(E!==0);for(_=1<<l-1;A&_;)_>>=1;if(_!==0?(A&=_-1,A+=_):A=0,u++,--P[l]===0){if(l===h)break;l=t[n+a[u]]}if(l>d&&(A&R)!==C){for(b===0&&(b=d),D+=f,p=l-b,v=1<<p;p+b<h&&(v-=P[p+b],!(v<=0));)p++,v<<=1;if(y+=1<<p,e===y0&&y>ex||e===rx&&y>tx)return 1;C=A&R,i[C]=d<<24|p<<16|D-o|0}}return A!==0&&(i[D+A]=l-b<<24|64<<16|0),s.bits=d,0};const K9=0,ix=1,ox=2,{Z_FINISH:ax,Z_BLOCK:J9,Z_TREES:Su,Z_OK:ji,Z_STREAM_END:$9,Z_NEED_DICT:eM,Z_STREAM_ERROR:vn,Z_DATA_ERROR:sx,Z_MEM_ERROR:cx,Z_BUF_ERROR:tM,Z_DEFLATED:lx}=Xs,_u=16180,ux=16181,fx=16182,hx=16183,dx=16184,px=16185,gx=16186,mx=16187,bx=16188,yx=16189,Cu=16190,dr=16191,w0=16192,wx=16193,x0=16194,xx=16195,vx=16196,Ax=16197,Ex=16198,Tu=16199,Iu=16200,Sx=16201,_x=16202,Cx=16203,Tx=16204,Ix=16205,v0=16206,Dx=16207,kx=16208,ut=16209,Bx=16210,Rx=16211,nM=852,rM=592,iM=15,Fx=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function oM(){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 Wi=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<_u||t.mode>Rx?1:0},Mx=e=>{if(Wi(e))return vn;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=_u,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(nM),t.distcode=t.distdyn=new Int32Array(rM),t.sane=1,t.back=-1,ji},Px=e=>{if(Wi(e))return vn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Mx(e)},Lx=(e,t)=>{let n;if(Wi(e))return vn;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?vn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Px(e))},Nx=(e,t)=>{if(!e)return vn;const n=new oM;e.state=n,n.strm=e,n.window=null,n.mode=_u;const r=Lx(e,t);return r!==ji&&(e.state=null),r},aM=e=>Nx(e,iM);let Ox=!0,A0,E0;const sM=e=>{if(Ox){A0=new Int32Array(512),E0=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(ic(ix,e.lens,0,288,A0,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ic(ox,e.lens,0,32,E0,0,e.work,{bits:5}),Ox=!1}e.lencode=A0,e.lenbits=9,e.distcode=E0,e.distbits=5},zx=(e,t,n,r)=>{let i;const o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0},cM=(e,t)=>{let n,r,i,o,a,s,c,l,u,f,h,d,p,b,v=0,y,A,_,E,C,R,D,O;const F=new Uint8Array(4);let P,S;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Wi(e)||!e.output||!e.input&&e.avail_in!==0)return vn;n=e.state,n.mode===dr&&(n.mode=w0),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,f=s,h=c,O=ji;e:for(;;)switch(n.mode){case _u:if(n.wrap===0){n.mode=w0;break}for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,F[0]=l&255,F[1]=l>>>8&255,n.check=It(n.check,F,2,0),l=0,u=0,n.mode=ux;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=ut;break}if((l&15)!==lx){e.msg="unknown compression method",n.mode=ut;break}if(l>>>=4,u-=4,D=(l&15)+8,n.wbits===0&&(n.wbits=D),D>15||D>n.wbits){e.msg="invalid window size",n.mode=ut;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?yx:dr,l=0,u=0;break;case ux:for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==lx){e.msg="unknown compression method",n.mode=ut;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=ut;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,n.check=It(n.check,F,2,0)),l=0,u=0,n.mode=fx;case fx:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,F[2]=l>>>16&255,F[3]=l>>>24&255,n.check=It(n.check,F,4,0)),l=0,u=0,n.mode=hx;case hx:for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,n.check=It(n.check,F,2,0)),l=0,u=0,n.mode=dx;case dx:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,n.check=It(n.check,F,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=px;case px:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(D=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+d),D)),n.flags&512&&n.wrap&4&&(n.check=It(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=gx;case gx:if(n.flags&2048){if(s===0)break e;d=0;do D=r[o+d++],n.head&&D&&n.length<65536&&(n.head.name+=String.fromCharCode(D));while(D&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=It(n.check,r,d,o)),s-=d,o+=d,D)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=mx;case mx:if(n.flags&4096){if(s===0)break e;d=0;do D=r[o+d++],n.head&&D&&n.length<65536&&(n.head.comment+=String.fromCharCode(D));while(D&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=It(n.check,r,d,o)),s-=d,o+=d,D)break e}else n.head&&(n.head.comment=null);n.mode=bx;case bx:if(n.flags&512){for(;u<16;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=ut;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=dr;break;case yx:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}e.adler=n.check=Fx(l),l=0,u=0,n.mode=Cu;case Cu:if(n.havedict===0)return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,eM;e.adler=n.check=1,n.mode=dr;case dr:if(t===J9||t===Su)break e;case w0:if(n.last){l>>>=u&7,u-=u&7,n.mode=v0;break}for(;u<3;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=wx;break;case 1:if(sM(n),n.mode=Tu,t===Su){l>>>=2,u-=2;break e}break;case 2:n.mode=vx;break;case 3:e.msg="invalid block type",n.mode=ut}l>>>=2,u-=2;break;case wx:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=ut;break}if(n.length=l&65535,l=0,u=0,n.mode=x0,t===Su)break e;case x0:n.mode=xx;case xx:if(d=n.length,d){if(d>s&&(d=s),d>c&&(d=c),d===0)break e;i.set(r.subarray(o,o+d),a),s-=d,o+=d,c-=d,a+=d,n.length-=d;break}n.mode=dr;break;case vx:for(;u<14;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ut;break}n.have=0,n.mode=Ax;case Ax:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.lens[Z[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[Z[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,P={bits:n.lenbits},O=ic(K9,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,O){e.msg="invalid code lengths set",n.mode=ut;break}n.have=0,n.mode=Ex;case Ex:for(;n.have<n.nlen+n.ndist;){for(;v=n.lencode[l&(1<<n.lenbits)-1],y=v>>>24,A=v>>>16&255,_=v&65535,!(y<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(_<16)l>>>=y,u-=y,n.lens[n.have++]=_;else{if(_===16){for(S=y+2;u<S;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(l>>>=y,u-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=ut;break}D=n.lens[n.have-1],d=3+(l&3),l>>>=2,u-=2}else if(_===17){for(S=y+3;u<S;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=y,u-=y,D=0,d=3+(l&7),l>>>=3,u-=3}else{for(S=y+7;u<S;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=y,u-=y,D=0,d=11+(l&127),l>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ut;break}for(;d--;)n.lens[n.have++]=D}}if(n.mode===ut)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=ut;break}if(n.lenbits=9,P={bits:n.lenbits},O=ic(ix,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,O){e.msg="invalid literal/lengths set",n.mode=ut;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},O=ic(ox,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,O){e.msg="invalid distances set",n.mode=ut;break}if(n.mode=Tu,t===Su)break e;case Tu:n.mode=Iu;case Iu:if(s>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,W9(e,h),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===dr&&(n.back=-1);break}for(n.back=0;v=n.lencode[l&(1<<n.lenbits)-1],y=v>>>24,A=v>>>16&255,_=v&65535,!(y<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(A&&!(A&240)){for(E=y,C=A,R=_;v=n.lencode[R+((l&(1<<E+C)-1)>>E)],y=v>>>24,A=v>>>16&255,_=v&65535,!(E+y<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=E,u-=E,n.back+=E}if(l>>>=y,u-=y,n.back+=y,n.length=_,A===0){n.mode=Ix;break}if(A&32){n.back=-1,n.mode=dr;break}if(A&64){e.msg="invalid literal/length code",n.mode=ut;break}n.extra=A&15,n.mode=Sx;case Sx:if(n.extra){for(S=n.extra;u<S;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=_x;case _x:for(;v=n.distcode[l&(1<<n.distbits)-1],y=v>>>24,A=v>>>16&255,_=v&65535,!(y<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(!(A&240)){for(E=y,C=A,R=_;v=n.distcode[R+((l&(1<<E+C)-1)>>E)],y=v>>>24,A=v>>>16&255,_=v&65535,!(E+y<=u);){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}l>>>=E,u-=E,n.back+=E}if(l>>>=y,u-=y,n.back+=y,A&64){e.msg="invalid distance code",n.mode=ut;break}n.offset=_,n.extra=A&15,n.mode=Cx;case Cx:if(n.extra){for(S=n.extra;u<S;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ut;break}n.mode=Tx;case Tx:if(c===0)break e;if(d=h-c,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ut;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),b=n.window}else b=i,p=a-n.offset,d=n.length;d>c&&(d=c),c-=d,n.length-=d;do i[a++]=b[p++];while(--d);n.length===0&&(n.mode=Iu);break;case Ix:if(c===0)break e;i[a++]=n.length,c--,n.mode=Iu;break;case v0:if(n.wrap){for(;u<32;){if(s===0)break e;s--,l|=r[o++]<<u,u+=8}if(h-=c,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?It(n.check,i,h,a-h):Qs(n.check,i,h,a-h)),h=c,n.wrap&4&&(n.flags?l:Fx(l))!==n.check){e.msg="incorrect data check",n.mode=ut;break}l=0,u=0}n.mode=Dx;case Dx:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break e;s--,l+=r[o++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=ut;break}l=0,u=0}n.mode=kx;case kx:O=$9;break e;case ut:O=sx;break e;case Bx:return cx;case Rx:default:return vn}return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<ut&&(n.mode<v0||t!==ax))&&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&4&&h&&(e.adler=n.check=n.flags?It(n.check,i,h,e.next_out-h):Qs(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===dr?128:0)+(n.mode===Tu||n.mode===x0?256:0),(f===0&&h===0||t===ax)&&O===ji&&(O=tM),O},lM=e=>{if(Wi(e))return vn;let t=e.state;return t.window&&(t.window=null),e.state=null,ji},uM=(e,t)=>{if(Wi(e))return vn;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,ji):vn},fM=(e,t)=>{const n=t.length;let r,i,o;return Wi(e)||(r=e.state,r.wrap!==0&&r.mode!==Cu)?vn:r.mode===Cu&&(i=1,i=Qs(i,t,n,0),i!==r.check)?sx:(o=zx(e,t,n,n),o?(r.mode=Bx,cx):(r.havedict=1,ji))};var hM=Px,dM=Lx,pM=Mx,gM=aM,mM=Nx,bM=cM,yM=lM,wM=uM,xM=fM,vM="pako inflate (from Nodeca project)",pr={inflateReset:hM,inflateReset2:dM,inflateResetKeep:pM,inflateInit:gM,inflateInit2:mM,inflate:bM,inflateEnd:yM,inflateGetHeader:wM,inflateSetDictionary:xM,inflateInfo:vM};function AM(){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 EM=AM;const Ux=Object.prototype.toString,{Z_NO_FLUSH:SM,Z_FINISH:_M,Z_OK:oc,Z_STREAM_END:S0,Z_NEED_DICT:_0,Z_STREAM_ERROR:CM,Z_DATA_ERROR:Gx,Z_MEM_ERROR:TM}=Xs;function ac(e){this.options=vu.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 Jw,this.strm.avail_out=0;let n=pr.inflateInit2(this.strm,t.windowBits);if(n!==oc)throw new Error(Oo[n]);if(this.header=new EM,pr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=rc.string2buf(t.dictionary):Ux.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=pr.inflateSetDictionary(this.strm,t.dictionary),n!==oc)))throw new Error(Oo[n])}ac.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?_M:SM,Ux.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=pr.inflate(n,a),o===_0&&i&&(o=pr.inflateSetDictionary(n,i),o===oc?o=pr.inflate(n,a):o===Gx&&(o=_0));n.avail_in>0&&o===S0&&n.state.wrap>0&&e[n.next_in]!==0;)pr.inflateReset(n),o=pr.inflate(n,a);switch(o){case CM:case Gx:case _0:case TM:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===S0))if(this.options.to==="string"){let c=rc.utf8border(n.output,n.next_out),l=n.next_out-c,u=rc.buf2string(n.output,c);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(c,c+l),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===oc&&s===0)){if(o===S0)return o=pr.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},ac.prototype.onData=function(e){this.chunks.push(e)},ac.prototype.onEnd=function(e){e===oc&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=vu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function C0(e,t){const n=new ac(t);if(n.push(e),n.err)throw n.msg||Oo[n.err];return n.result}function IM(e,t){return t=t||{},t.raw=!0,C0(e,t)}var DM=ac,kM=C0,BM=IM,RM=C0,FM=Xs,MM={Inflate:DM,inflate:kM,inflateRaw:BM,ungzip:RM,constants:FM};const{Inflate:iL,inflate:oL,inflateRaw:PM,ungzip:aL}=MM;var LM=PM;function NM(e){return LM(e.subarray(2))}let OM=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function zM(e){e.sort((i,o)=>i.offset-o.offset);const t=[];let n,r;for(const i of e)n&&r&&i.offset-r<=2e3?(n.length=n.length+i.length-r+i.offset,n.blocks.push(i)):t.push(n={blocks:[i],length:i.length,offset:i.offset}),r=n.offset+n.length;return t}function Du(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new OM("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const T0=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function I0(e,t,n,r){return e<r&&t>=n}class Hx{constructor(t,n,r,i,o,a){if(this.bbi=t,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=i,this.isCompressed=o,this.blockType=a,this.featureCache=new Ui({cache:new mu({maxSize:1e3}),fill:async(s,c)=>{const l=s.length,u=s.offset,{buffer:f}=await this.bbi.read($e.Buffer.alloc(l),0,l,u,{signal:c});return f}}),!(r>=0))throw new Error("invalid cirTreeOffset!")}async readWigData(t,n,r,i,o){try{const{refsByName:a,bbi:s,cirTreeOffset:c,isBigEndian:l}=this,u=a[t];u===void 0&&i.complete();const f={chrId:u,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=s.read($e.Buffer.alloc(48),0,48,c,o));const{buffer:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],b=0;const v=!0,y=(C,R,D)=>{try{const F=C.subarray(R),P=new DataView(F.buffer,F.byteOffset,F.length);let S=0;const Z=P.getUint8(S);S+=2;const Q=P.getUint16(S,v);if(S+=2,Z===1){const se=[];for(let ce=0;ce<Q;ce++){const fe=P.getUint32(S,v);S+=4;const le=P.getUint32(S,v);S+=4;const Ee=P.getUint32(S,v);S+=4;const pe=P.getUint32(S,v);S+=4;const _e=Number(P.getBigUint64(S,v));S+=8;const Ce=Number(P.getBigUint64(S,v));S+=8,se.push({startChrom:fe,startBase:le,endBase:pe,endChrom:Ee,blockOffset:_e,blockSize:Ce,offset:S})}p=p.concat(se.filter(ce=>A(ce)).map(ce=>({offset:ce.blockOffset,length:ce.blockSize})))}else if(Z===0){const se=[];for(let fe=0;fe<Q;fe++){const le=P.getUint32(S,v);S+=4;const Ee=P.getUint32(S,v);S+=4;const pe=P.getUint32(S,v);S+=4;const _e=P.getUint32(S,v);S+=4;const Ce=Number(P.getBigUint64(S,v));S+=8,se.push({startChrom:le,startBase:Ee,endChrom:pe,endBase:_e,blockOffset:Ce,offset:S})}const ce=se.filter(fe=>A(fe)).map(fe=>fe.blockOffset);ce.length>0&&E(ce,D+1)}}catch(O){i.error(O)}},A=C=>{const{startChrom:R,startBase:D,endChrom:O,endBase:F}=C;return(R<u||R===u&&D<=r)&&(O>u||O===u&&F>=n)},_=async(C,R,D)=>{try{const O=R.max-R.min,F=R.min,P=await this.featureCache.get(`${O}_${F}`,{length:O,offset:F},o==null?void 0:o.signal);for(const S of C)R.contains(S)&&(y(P,S-F,D),b-=1,b===0&&this.readFeatures(i,p,{...o,request:f}).catch(Z=>{i.error(Z)}))}catch(O){i.error(O)}},E=(C,R)=>{try{b+=C.length;const D=4+d*32;let O=new Po([{min:C[0],max:C[0]+D}]);for(let F=1;F<C.length;F+=1){const P=new Po([{min:C[F],max:C[F]+D}]);O=O.union(P)}O.getRanges().map(F=>_(C,F,R))}catch(D){i.error(D)}};E([Number(c)+48],1);return}catch(a){i.error(a)}}parseSummaryBlock(t,n,r){const i=[];let o=n;const a=new DataView(t.buffer,t.byteOffset,t.length);for(;o<t.byteLength;){const s=a.getUint32(o,!0);o+=4;const c=a.getUint32(o,!0);o+=4;const l=a.getUint32(o,!0);o+=4;const u=a.getUint32(o,!0);o+=4;const f=a.getFloat32(o,!0);o+=4;const h=a.getFloat32(o,!0);o+=4;const d=a.getFloat32(o,!0);o+=4,o+=4,(!r||s===r.chrId&&I0(c,l,r.start,r.end))&&i.push({start:c,end:l,maxScore:h,minScore:f,summary:!0,score:d/(u||1)})}return i}parseBigBedBlock(t,n,r,i){var o;const a=[];let s=n;const c=!0,l=t,u=new DataView(l.buffer,l.byteOffset,l.length);for(;s<t.byteLength;){const f=s,h=u.getUint32(s,c);s+=4;const d=u.getInt32(s,c);s+=4;const p=u.getInt32(s,c);s+=4;let b=s;for(;b<t.length&&t[b]!==0;b++);const v=t.subarray(s,b),y=(o=T0==null?void 0:T0.decode(v))!==null&&o!==void 0?o:v.toString();s=b+1,a.push({chromId:h,start:d,end:p,rest:y,uniqueId:`bb-${r+f}`})}return i?a.filter(f=>I0(f.start,f.end,i.start,i.end)):a}parseBigWigBlock(t,n,r){const i=t.subarray(n),o=new DataView(i.buffer,i.byteOffset,i.length);let a=0;a+=4;const s=o.getInt32(a,!0);a+=8;const c=o.getUint32(a,!0);a+=4;const l=o.getUint32(a,!0);a+=4;const u=o.getUint8(a);a+=2;const f=o.getUint16(a,!0);a+=2;const h=new Array(f);switch(u){case 1:{for(let d=0;d<f;d++){const p=o.getInt32(a,!0);a+=4;const b=o.getInt32(a,!0);a+=4;const v=o.getFloat32(a,!0);a+=4,h[d]={start:p,end:b,score:v}}break}case 2:{for(let d=0;d<f;d++){const p=o.getInt32(a,!0);a+=4;const b=o.getFloat32(a,!0);a+=4,h[d]={score:b,start:p,end:p+l}}break}case 3:{for(let d=0;d<f;d++){const p=o.getFloat32(a,!0);a+=4;const b=s+d*c;h[d]={score:p,start:b,end:b+l}}break}}return r?h.filter(d=>I0(d.start,d.end,r.start,r.end)):h}async readFeatures(t,n,r={}){try{const{blockType:i,isCompressed:o}=this,{signal:a,request:s}=r,c=zM(n);Du(a),await Promise.all(c.map(async l=>{Du(a);const{length:u,offset:f}=l,h=await this.featureCache.get(`${u}_${f}`,l,a);for(const d of l.blocks){Du(a);let p=Number(d.offset)-Number(l.offset),b=h;switch(o&&(b=NM(h.subarray(p)),p=0),Du(a),i){case"summary":{t.next(this.parseSummaryBlock(b,p,s));break}case"bigwig":{t.next(this.parseBigWigBlock(b,p,s));break}case"bigbed":{t.next(this.parseBigBedBlock(b,p,Number(d.offset)*256,s));break}default:console.warn(`Don't know what to do with ${i}`)}}})),t.complete()}catch(i){t.error(i)}}}var D0=function(e,t){return D0=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])},D0(e,t)};function k0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");D0(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function UM(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?o(u.value):i(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})}function Vx(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function sc(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 B0(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function R0(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function jo(e){return this instanceof jo?(this.v=e,this):new jo(e)}function GM(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,f)}}function s(d,p){r[d]&&(i[d]=function(b){return new Promise(function(v,y){o.push([d,b,v,y])>1||c(d,b)})},p&&(i[d]=p(i[d])))}function c(d,p){try{l(r[d](p))}catch(b){h(o[0][3],b)}}function l(d){d.value instanceof jo?Promise.resolve(d.value.v).then(u,f):h(o[0][2],d)}function u(d){c("next",d)}function f(d){c("throw",d)}function h(d,p){d(p),o.shift(),o.length&&c(o[0][0],o[0][1])}}function HM(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 sc=="function"?sc(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(a){return new Promise(function(s,c){a=e[o](a),i(s,c,a.done,a.value)})}}function i(o,a,s,c){Promise.resolve(c).then(function(l){o({value:l,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function At(e){return typeof e=="function"}function qx(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 F0=qx(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
627
|
-
`+n.map(function(r,
|
|
628
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function jx(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var M0=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=sc(a),c=s.next();!c.done;c=s.next()){var l=c.value;l.remove(this)}}catch(b){t={error:b}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else a.remove(this);var u=this.initialTeardown;if(At(u))try{u()}catch(b){o=b instanceof F0?b.errors:[b]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=sc(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{Zx(p)}catch(b){o=o??[],b instanceof F0?o=R0(R0([],B0(o)),B0(b.errors)):o.push(b)}}}catch(b){r={error:b}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new F0(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Zx(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)&&jx(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&jx(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();M0.EMPTY;function Wx(e){return e instanceof M0||e&&"closed"in e&&At(e.remove)&&At(e.add)&&At(e.unsubscribe)}function Zx(e){At(e)?e():e.unsubscribe()}var Yx={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Qx={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,R0([e,t],B0(n)))},clearTimeout:function(e){var t=Qx.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Xx(e){Qx.setTimeout(function(){throw e})}function Kx(){}function VM(e){e()}var P0=function(e){k0(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Wx(n)&&n.add(r)):r.destination=ZM,r}return t.create=function(n,r,i){return new ku(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}(M0),qM=Function.prototype.bind;function L0(e,t){return qM.call(e,t)}var jM=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){Bu(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Bu(r)}else Bu(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Bu(n)}},e}(),ku=function(e){k0(t,e);function t(n,r,i){var o=e.call(this)||this,a;if(At(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Yx.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&L0(n.next,s),error:n.error&&L0(n.error,s),complete:n.complete&&L0(n.complete,s)}):a=n}return o.destination=new jM(a),o}return t}(P0);function Bu(e){Xx(e)}function WM(e){throw e}var ZM={closed:!0,next:Kx,error:WM,complete:Kx},N0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Jx(e){return e}function YM(e){return e.length===0?Jx:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var An=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=XM(t)?t:new ku(t,n,r);return VM(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=$x(n),new n(function(i,o){var a=new ku({next:function(s){try{t(s)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[N0]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return YM(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=$x(t),new t(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function $x(e){var t;return(t=e??Yx.Promise)!==null&&t!==void 0?t:Promise}function QM(e){return e&&At(e.next)&&At(e.error)&&At(e.complete)}function XM(e){return e&&e instanceof P0||QM(e)&&Wx(e)}function KM(e){return At(e==null?void 0:e.lift)}function Wo(e){return function(t){if(KM(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 cc(e,t,n,r,i){return new JM(e,t,n,r,i)}var JM=function(e){k0(t,e);function t(n,r,i,o,a,s){var c=e.call(this,n)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=r?function(l){try{r(l)}catch(u){n.error(u)}}:e.prototype._next,c._error=o?function(l){try{o(l)}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(P0),$M=new An(function(e){return e.complete()});function e7(e){return e&&At(e.schedule)}function ev(e){return e[e.length-1]}function t7(e){return e7(ev(e))?e.pop():void 0}function n7(e,t){return typeof ev(e)=="number"?e.pop():t}var tv=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function nv(e){return At(e==null?void 0:e.then)}function rv(e){return At(e[N0])}function iv(e){return Symbol.asyncIterator&&At(e==null?void 0:e[Symbol.asyncIterator])}function ov(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 r7(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var av=r7();function sv(e){return At(e==null?void 0:e[av])}function cv(e){return GM(this,arguments,function(){var n,r,i,o;return Vx(this,function(a){switch(a.label){case 0:n=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,jo(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,jo(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,jo(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function lv(e){return At(e==null?void 0:e.getReader)}function Zo(e){if(e instanceof An)return e;if(e!=null){if(rv(e))return i7(e);if(tv(e))return o7(e);if(nv(e))return a7(e);if(iv(e))return uv(e);if(sv(e))return s7(e);if(lv(e))return c7(e)}throw ov(e)}function i7(e){return new An(function(t){var n=e[N0]();if(At(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function o7(e){return new An(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function a7(e){return new An(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,Xx)})}function s7(e){return new An(function(t){var n,r;try{for(var i=sc(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function uv(e){return new An(function(t){l7(e,t).catch(function(n){return t.error(n)})})}function c7(e){return uv(cv(e))}function l7(e,t){var n,r,i,o;return UM(this,void 0,void 0,function(){var a,s;return Vx(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=HM(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(a=r.value,t.next(a),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Zi(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function fv(e,t){return t===void 0&&(t=0),Wo(function(n,r){n.subscribe(cc(r,function(i){return Zi(r,e,function(){return r.next(i)},t)},function(){return Zi(r,e,function(){return r.complete()},t)},function(i){return Zi(r,e,function(){return r.error(i)},t)}))})}function hv(e,t){return t===void 0&&(t=0),Wo(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function u7(e,t){return Zo(e).pipe(hv(t),fv(t))}function f7(e,t){return Zo(e).pipe(hv(t),fv(t))}function h7(e,t){return new An(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function d7(e,t){return new An(function(n){var r;return Zi(n,t,function(){r=e[av](),Zi(n,t,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return At(r==null?void 0:r.return)&&r.return()}})}function dv(e,t){if(!e)throw new Error("Iterable cannot be null");return new An(function(n){Zi(n,t,function(){var r=e[Symbol.asyncIterator]();Zi(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function p7(e,t){return dv(cv(e),t)}function g7(e,t){if(e!=null){if(rv(e))return u7(e,t);if(tv(e))return h7(e,t);if(nv(e))return f7(e,t);if(iv(e))return dv(e,t);if(sv(e))return d7(e,t);if(lv(e))return p7(e,t)}throw ov(e)}function m7(e,t){return t?g7(e,t):Zo(e)}var b7=qx(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function pv(e,t){return new Promise(function(n,r){var i=new ku({next:function(o){n(o),i.unsubscribe()},error:r,complete:function(){r(new b7)}});e.subscribe(i)})}function gv(e,t){return Wo(function(n,r){var i=0;n.subscribe(cc(r,function(o){r.next(e.call(t,o,i++))}))})}function y7(e,t,n,r,i,o,a,s){var c=[],l=0,u=0,f=!1,h=function(){f&&!c.length&&!l&&t.complete()},d=function(b){return l<r?p(b):c.push(b)},p=function(b){l++;var v=!1;Zo(n(b,u++)).subscribe(cc(t,function(y){t.next(y)},function(){v=!0},void 0,function(){if(v)try{l--;for(var y=function(){var A=c.shift();a||p(A)};c.length&&l<r;)y();h()}catch(A){t.error(A)}}))};return e.subscribe(cc(t,d,function(){f=!0,h()})),function(){}}function mv(e,t,n){return n===void 0&&(n=1/0),At(t)?mv(function(r,i){return gv(function(o,a){return t(r,o,i,a)})(Zo(e(r,i)))},n):(typeof t=="number"&&(n=t),Wo(function(r,i){return y7(r,i,e,n)}))}function w7(e){return e===void 0&&(e=1/0),mv(Jx,e)}function x7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=t7(e),r=n7(e,1/0),i=e;return i.length?i.length===1?Zo(i[0]):w7(r)(m7(i,n)):$M}function v7(e,t,n,r,i){return function(o,a){var s=n,c=t,l=0;o.subscribe(cc(a,function(u){var f=l++;c=s?e(c,u,f):(s=!0,u)},function(){s&&a.next(c),a.complete()}))}}function bv(e,t){return Wo(v7(e,t,arguments.length>=2,!1,!0))}var A7=function(e,t){return e.push(t),e};function E7(){return Wo(function(e,t){bv(A7,[])(e).subscribe(t)})}const yv=-2003829722,O0=-2021002517;class wv{getHeader(t){return this.headerP||(this.headerP=this._getHeader(t).catch(n=>{throw this.headerP=void 0,n})),this.headerP}constructor(t){const{filehandle:n,renameRefSeqs:r=a=>a,path:i,url:o}=t;if(this.renameRefSeqs=r,n)this.bbi=n;else if(o)this.bbi=new Fn(o);else if(i)this.bbi=new Tt(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:i}=await this.bbi.read($e.Buffer.alloc(n),0,n,0,t),o=this._isBigEndian(i),a=i,s=new DataView(a.buffer,a.byteOffset,a.length);let c=0;const l=s.getInt32(c,!0);c+=4;const u=s.getUint16(c,!0);c+=2;const f=s.getUint16(c,!0);c+=2;const h=Number(s.getBigUint64(c,!0));c+=8;const d=Number(s.getBigUint64(c,!0));c+=8;const p=Number(s.getBigUint64(c,!0));c+=8;const b=s.getUint16(c,!0);c+=2;const v=s.getUint16(c,!0);c+=2;const y=Number(s.getBigUint64(c,!0));c+=8;const A=Number(s.getBigUint64(c,!0));c+=8;const _=s.getUint32(c,!0);c+=4;const E=Number(s.getBigUint64(c,!0));c+=8;const C=[];for(let O=0;O<f;O++){const F=s.getUint32(c,!0);c+=4;const P=s.getUint32(c,!0);c+=4;const S=Number(s.getBigUint64(c,!0));c+=8;const Z=Number(s.getBigUint64(c,!0));c+=8,C.push({reductionLevel:F,reserved:P,dataOffset:S,indexOffset:Z})}const R=l===O0?"bigbed":"bigwig";if(y>n||A>n-8*5)return this._getMainHeader(t,n*2);let D;if(A){const O=i.subarray(Number(A));let F=0;const P=new DataView(O.buffer,O.byteOffset,O.length),S=Number(P.getBigUint64(F,!0));F+=8;const Z=P.getFloat64(F,!0);F+=8;const Q=P.getFloat64(F,!0);F+=8;const se=P.getFloat64(F,!0);F+=8;const ce=P.getFloat64(F,!0);F+=8,D={scoreMin:Z,scoreMax:Q,scoreSum:se,scoreSumSquares:ce,basesCovered:S}}else throw new Error("no stats");return{zoomLevels:C,magic:l,extHeaderOffset:E,numZoomLevels:f,fieldCount:b,totalSummary:D,definedFieldCount:v,uncompressBufSize:_,asOffset:y,chromTreeOffset:h,totalSummaryOffset:A,unzoomedDataOffset:d,unzoomedIndexOffset:p,fileType:R,version:u,isBigEndian:o,autoSql:y?i.subarray(y,i.indexOf(0,y)).toString():""}}_isBigEndian(t){let n=t.readInt32LE(0);if(n===yv||n===O0)return!1;if(n=t.readInt32BE(0),n===yv||n===O0)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(t,n){const i=!t.isBigEndian,o=[],a={};let s=t.unzoomedDataOffset;const c=t.chromTreeOffset;for(;s%4!==0;)s+=1;const l=s-c,{buffer:u}=await this.bbi.read($e.Buffer.alloc(l),0,l,Number(c),n),f=u,h=new DataView(f.buffer,f.byteOffset,f.length);let d=0;d+=4,d+=4;const p=h.getUint32(d,i);d+=4,d+=4,d+=8;const b=32,v=async y=>{let A=y;if(A>=u.length)throw new Error("reading beyond end of buffer");const _=h.getUint8(A);A+=2;const E=h.getUint16(A,i);if(A+=2,_)for(let C=0;C<E;C++){const R=u.subarray(A,A+p).toString().replaceAll("\0","");A+=p;const D=h.getUint32(A,i);A+=4;const O=h.getUint32(A,i);A+=4;const F={name:R,id:D,length:O};a[this.renameRefSeqs(R)]=D,o[D]=F}else{const C=[];for(let R=0;R<E;R++){A+=p;const D=Number(h.getBigUint64(A,i));A+=8,C.push(v(Number(D)-Number(c)))}await Promise.all(C)}};return await v(b),{refsByName:a,refsByNumber:o}}async getUnzoomedView(t){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:i,isBigEndian:o,fileType:a}=await this.getHeader(t);return new Hx(this.bbi,r,n,o,i>0,a)}async getFeatureStream(t,n,r,i){await this.getHeader(i);const o=this.renameRefSeqs(t);let a;const{basesPerSpan:s,scale:c}=i||{};return s?a=await this.getView(1/s,i):c?a=await this.getView(c,i):a=await this.getView(1,i),new An(l=>{a.readWigData(o,n,r,l,i).catch(u=>{l.error(u)})})}async getFeatures(t,n,r,i){const o=await this.getFeatureStream(t,n,r,i);return(await pv(o.pipe(E7()))).flat()}}class S7 extends wv{async getView(t,n){const{zoomLevels:r,refsByName:i,isBigEndian:o,uncompressBufSize:a}=await this.getHeader(n),s=1/t,c=r.length-1;for(let l=c;l>=0;l-=1){const u=r[l];if(u&&u.reductionLevel<=2*s)return new Hx(this.bbi,i,u.indexOffset,o,a>0,"summary")}return this.getUnzoomedView(n)}}function _7(e){return e.filter(t=>!!t)}class C7 extends wv{constructor(){super(...arguments),this.readIndicesCache=new Ui({cache:new mu({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($e.Buffer.alloc(64),0,64,Number(n)),o=!r,a=i,s=new DataView(a.buffer,a.byteOffset,a.length);let c=0;c+=2;const l=s.getUint16(c,o);c+=2;const u=Number(s.getBigUint64(c,o));if(c+=8,l===0)return[];const f=20,h=f*l,{buffer:d}=await this.bbi.read($e.Buffer.alloc(h),0,h,Number(u)),p=[];for(let b=0;b<l;b+=1){const v=d.subarray(b*f),y=new DataView(v.buffer,v.byteOffset,v.length);let A=0;const _=y.getInt16(A,o);A+=2;const E=y.getInt16(A,o);A+=2;const C=Number(y.getBigUint64(A,o));A+=12;const R=y.getInt16(A,o);p.push({type:_,fieldcount:E,offset:Number(C),field:R})}return p}async searchExtraIndexBlocks(t,n={}){const{isBigEndian:r}=await this.getHeader(n),i=await this.readIndices(n);if(i.length===0)return[];const o=i.map(async a=>{const{offset:s,field:c}=a,{buffer:l}=await this.bbi.read($e.Buffer.alloc(32),0,32,s,n),u=!r,f=l,h=new DataView(f.buffer,f.byteOffset,f.length);let d=0;d+=4;const p=h.getInt32(d,u);d+=4;const b=h.getInt32(d,u);d+=4;const v=h.getInt32(d,u);d+=4,d+=8;const y=async _=>{const E=Number(_),C=4+p*(b+v),{buffer:R}=await this.bbi.read($e.Buffer.alloc(C),0,C,E,n),D=R,O=new DataView(D.buffer,D.byteOffset,D.length);let F=0;const P=O.getInt8(F);F+=2;const S=O.getInt16(F,u);F+=2;const Z=[];if(P===0){const Q=[];for(let ce=0;ce<S;ce++){const fe=D.subarray(F,F+b).toString().replaceAll("\0","");F+=b;const le=Number(O.getBigUint64(F,u));F+=8,Q.push({key:fe,offset:le})}let se=0;for(const{key:ce,offset:fe}of Q){if(t.localeCompare(ce)<0&&se)return y(se);se=fe}return y(se)}else if(P===1){for(let Q=0;Q<S;Q++){const se=D.subarray(F,F+b).toString().replaceAll("\0","");F+=b;const ce=Number(O.getBigUint64(F,u));F+=8;const fe=O.getUint32(F,u);F+=4;const le=O.getUint32(F,u);F+=4,Z.push({key:se,offset:ce,length:fe,reserved:le})}for(const Q of Z)if(Q.key===t)return{...Q,field:c};return}};return y(s+32)});return _7(await Promise.all(o))}async searchExtraIndex(t,n={}){const r=await this.searchExtraIndexBlocks(t,n);if(r.length===0)return[];const i=await this.getUnzoomedView(n),o=r.map(s=>new An(c=>{i.readFeatures(c,[s],n).catch(l=>{c.error(l)})}).pipe(bv((c,l)=>c.concat(l)),gv(c=>{for(const l of c)l.field=s.field;return c})));return(await pv(x7(...o))).filter(s=>{var c;return((c=s.rest)===null||c===void 0?void 0:c.split(" ")[(s.field||0)-3])===t})}}const xv=Object.freeze(Object.defineProperty({__proto__:null,BigBed:C7,BigWig:S7},Symbol.toStringTag,{value:"Module"}));var z0,vv;function T7(){if(vv)return z0;vv=1;function e(r,i){function o(){this.constructor=r}o.prototype=i.prototype,r.prototype=new o}function t(r,i,o,a){this.message=r,this.expected=i,this.found=o,this.location=a,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}e(t,Error),t.buildMessage=function(r,i){var o={literal:function(h){return'"'+s(h.text)+'"'},class:function(h){var d="",p;for(p=0;p<h.parts.length;p++)d+=h.parts[p]instanceof Array?c(h.parts[p][0])+"-"+c(h.parts[p][1]):c(h.parts[p]);return"["+(h.inverted?"^":"")+d+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function a(h){return h.charCodeAt(0).toString(16).toUpperCase()}function s(h){return h.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(d){return"\\x0"+a(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+a(d)})}function c(h){return h.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(d){return"\\x0"+a(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+a(d)})}function l(h){return o[h.type](h)}function u(h){var d=new Array(h.length),p,b;for(p=0;p<h.length;p++)d[p]=l(h[p]);if(d.sort(),d.length>0){for(p=1,b=1;p<d.length;p++)d[p-1]!==d[p]&&(d[b]=d[p],b++);d.length=b}switch(d.length){case 1:return d[0];case 2:return d[0]+" or "+d[1];default:return d.slice(0,-1).join(", ")+", or "+d[d.length-1]}}function f(h){return h?'"'+s(h)+'"':"end of input"}return"Expected "+u(r)+" but "+f(i)+" found."};function n(r,i){i=i!==void 0?i:{};var o={},a={declaration:DA},s=DA,c="(",l=ze("(",!1),u=")",f=ze(")",!1),h=function(M,te,de,me){return{type:M,name:te,comment:de,fields:me}},d="simple",p=ze("simple",!1),b="object",v=ze("object",!1),y="table",A=ze("table",!1),_="auto",E=ze("auto",!1),C="primary",R=ze("primary",!1),D="index",O=ze("index",!1),F="unique",P=ze("unique",!1),S=function(M,te){return te},Z=function(M,te){return M.name&&te.unshift(M),te},Q="#",se=ze("#",!1),ce=";",fe=ze(";",!1),le=function(M,te,de){return{type:M,name:te,comment:de}},Ee="[",pe=ze("[",!1),_e="]",Ce=ze("]",!1),we=function(M,te,de,me){return{type:M,size:te,name:de,comment:me}},Te=function(M,te,de,me){return{type:M,vals:te,name:de,comment:me}},Ve=",",Le=ze(",",!1),j=function(M,te){return te.unshift(M),te},q="int",re=ze("int",!1),$="uint",ue=ze("uint",!1),L="short",I=ze("short",!1),ee="ushort",oe=ze("ushort",!1),Ie="byte",ye=ze("byte",!1),xe="ubyte",Be=ze("ubyte",!1),gt="float",nn=ze("float",!1),Dt="char",tt=ze("char",!1),Pt="string",Ht=ze("string",!1),nt="lstring",Vt=ze("lstring",!1),k="enum",m=ze("enum",!1),w="double",N=ze("double",!1),x="bigint",z=ze("bigint",!1),V="set",ae=ze("set",!1),G=function(M,te){return M+" "+te},Y=/^[a-zA-Z_]/,T=pt([["a","z"],["A","Z"],"_"],!1,!1),ne=/^[a-zA-Z0-9_]/,ke=pt([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),g=function(M){return dt()},K=/^[^\n\r]/,J=pt([`
|
|
629
|
-
`,"\r"],!0,!1),
|
|
630
|
-
`,"\r"],!1,!1),U=0,Me=0,
|
|
625
|
+
*/var I2;function ua(){return I2||(I2=1,function(t){const e=W_(),n=Q_(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=A,t.INSPECT_MAX_BYTES=50;const o=2147483647;t.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=i(),!a.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 i(){try{const _=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(_,m),_.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(_){if(_>o)throw new RangeError('The value "'+_+'" is invalid for option "size"');const m=new Uint8Array(_);return Object.setPrototypeOf(m,a.prototype),m}function a(_,m,w){if(typeof _=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(_)}return c(_,m,w)}a.poolSize=8192;function c(_,m,w){if(typeof _=="string")return h(_,m);if(ArrayBuffer.isView(_))return p(_);if(_==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _);if($e(_,ArrayBuffer)||_&&$e(_.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($e(_,SharedArrayBuffer)||_&&$e(_.buffer,SharedArrayBuffer)))return y(_,m,w);if(typeof _=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const N=_.valueOf&&_.valueOf();if(N!=null&&N!==_)return a.from(N,m,w);const x=v(_);if(x)return x;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _[Symbol.toPrimitive]=="function")return a.from(_[Symbol.toPrimitive]("string"),m,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _)}a.from=function(_,m,w){return c(_,m,w)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(_){if(typeof _!="number")throw new TypeError('"size" argument must be of type number');if(_<0)throw new RangeError('The value "'+_+'" is invalid for option "size"')}function u(_,m,w){return l(_),_<=0?s(_):m!==void 0?typeof w=="string"?s(_).fill(m,w):s(_).fill(m):s(_)}a.alloc=function(_,m,w){return u(_,m,w)};function f(_){return l(_),s(_<0?0:b(_)|0)}a.allocUnsafe=function(_){return f(_)},a.allocUnsafeSlow=function(_){return f(_)};function h(_,m){if((typeof m!="string"||m==="")&&(m="utf8"),!a.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const w=C(_,m)|0;let N=s(w);const x=N.write(_,m);return x!==w&&(N=N.slice(0,x)),N}function d(_){const m=_.length<0?0:b(_.length)|0,w=s(m);for(let N=0;N<m;N+=1)w[N]=_[N]&255;return w}function p(_){if($e(_,Uint8Array)){const m=new Uint8Array(_);return y(m.buffer,m.byteOffset,m.byteLength)}return d(_)}function y(_,m,w){if(m<0||_.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(_.byteLength<m+(w||0))throw new RangeError('"length" is outside of buffer bounds');let N;return m===void 0&&w===void 0?N=new Uint8Array(_):w===void 0?N=new Uint8Array(_,m):N=new Uint8Array(_,m,w),Object.setPrototypeOf(N,a.prototype),N}function v(_){if(a.isBuffer(_)){const m=b(_.length)|0,w=s(m);return w.length===0||_.copy(w,0,0,m),w}if(_.length!==void 0)return typeof _.length!="number"||kt(_.length)?s(0):d(_);if(_.type==="Buffer"&&Array.isArray(_.data))return d(_.data)}function b(_){if(_>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return _|0}function A(_){return+_!=_&&(_=0),a.alloc(+_)}a.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==a.prototype},a.compare=function(m,w){if($e(m,Uint8Array)&&(m=a.from(m,m.offset,m.byteLength)),$e(w,Uint8Array)&&(w=a.from(w,w.offset,w.byteLength)),!a.isBuffer(m)||!a.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(m===w)return 0;let N=m.length,x=w.length;for(let z=0,V=Math.min(N,x);z<V;++z)if(m[z]!==w[z]){N=m[z],x=w[z];break}return N<x?-1:x<N?1:0},a.isEncoding=function(m){switch(String(m).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(m,w){if(!Array.isArray(m))throw new TypeError('"list" argument must be an Array of Buffers');if(m.length===0)return a.alloc(0);let N;if(w===void 0)for(w=0,N=0;N<m.length;++N)w+=m[N].length;const x=a.allocUnsafe(w);let z=0;for(N=0;N<m.length;++N){let V=m[N];if($e(V,Uint8Array))z+V.length>x.length?(a.isBuffer(V)||(V=a.from(V)),V.copy(x,z)):Uint8Array.prototype.set.call(x,V,z);else if(a.isBuffer(V))V.copy(x,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=V.length}return x};function C(_,m){if(a.isBuffer(_))return _.length;if(ArrayBuffer.isView(_)||$e(_,ArrayBuffer))return _.byteLength;if(typeof _!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _);const w=_.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&w===0)return 0;let x=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return xe(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return Xt(_).length;default:if(x)return N?-1:xe(_).length;m=(""+m).toLowerCase(),x=!0}}a.byteLength=C;function E(_,m,w){let N=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,m>>>=0,w<=m))return"";for(_||(_="utf8");;)switch(_){case"hex":return pe(this,m,w);case"utf8":case"utf-8":return ae(this,m,w);case"ascii":return le(this,m,w);case"latin1":case"binary":return Ee(this,m,w);case"base64":return Z(this,m,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ce(this,m,w);default:if(N)throw new TypeError("Unknown encoding: "+_);_=(_+"").toLowerCase(),N=!0}}a.prototype._isBuffer=!0;function I(_,m,w){const N=_[m];_[m]=_[w],_[w]=N}a.prototype.swap16=function(){const m=this.length;if(m%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<m;w+=2)I(this,w,w+1);return this},a.prototype.swap32=function(){const m=this.length;if(m%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<m;w+=4)I(this,w,w+3),I(this,w+1,w+2);return this},a.prototype.swap64=function(){const m=this.length;if(m%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<m;w+=8)I(this,w,w+7),I(this,w+1,w+6),I(this,w+2,w+5),I(this,w+3,w+4);return this},a.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?ae(this,0,m):E.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(m){if(!a.isBuffer(m))throw new TypeError("Argument must be a Buffer");return this===m?!0:a.compare(this,m)===0},a.prototype.inspect=function(){let m="";const w=t.INSPECT_MAX_BYTES;return m=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(m+=" ... "),"<Buffer "+m+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(m,w,N,x,z){if($e(m,Uint8Array)&&(m=a.from(m,m.offset,m.byteLength)),!a.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(w===void 0&&(w=0),N===void 0&&(N=m?m.length:0),x===void 0&&(x=0),z===void 0&&(z=this.length),w<0||N>m.length||x<0||z>this.length)throw new RangeError("out of range index");if(x>=z&&w>=N)return 0;if(x>=z)return-1;if(w>=N)return 1;if(w>>>=0,N>>>=0,x>>>=0,z>>>=0,this===m)return 0;let V=z-x,se=N-w;const G=Math.min(V,se),Y=this.slice(x,z),T=m.slice(w,N);for(let ne=0;ne<G;++ne)if(Y[ne]!==T[ne]){V=Y[ne],se=T[ne];break}return V<se?-1:se<V?1:0};function R(_,m,w,N,x){if(_.length===0)return-1;if(typeof w=="string"?(N=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,kt(w)&&(w=x?0:_.length-1),w<0&&(w=_.length+w),w>=_.length){if(x)return-1;w=_.length-1}else if(w<0)if(x)w=0;else return-1;if(typeof m=="string"&&(m=a.from(m,N)),a.isBuffer(m))return m.length===0?-1:B(_,m,w,N,x);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?x?Uint8Array.prototype.indexOf.call(_,m,w):Uint8Array.prototype.lastIndexOf.call(_,m,w):B(_,[m],w,N,x);throw new TypeError("val must be string, number or Buffer")}function B(_,m,w,N,x){let z=1,V=_.length,se=m.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(_.length<2||m.length<2)return-1;z=2,V/=2,se/=2,w/=2}function G(T,ne){return z===1?T[ne]:T.readUInt16BE(ne*z)}let Y;if(x){let T=-1;for(Y=w;Y<V;Y++)if(G(_,Y)===G(m,T===-1?0:Y-T)){if(T===-1&&(T=Y),Y-T+1===se)return T*z}else T!==-1&&(Y-=Y-T),T=-1}else for(w+se>V&&(w=V-se),Y=w;Y>=0;Y--){let T=!0;for(let ne=0;ne<se;ne++)if(G(_,Y+ne)!==G(m,ne)){T=!1;break}if(T)return Y}return-1}a.prototype.includes=function(m,w,N){return this.indexOf(m,w,N)!==-1},a.prototype.indexOf=function(m,w,N){return R(this,m,w,N,!0)},a.prototype.lastIndexOf=function(m,w,N){return R(this,m,w,N,!1)};function O(_,m,w,N){w=Number(w)||0;const x=_.length-w;N?(N=Number(N),N>x&&(N=x)):N=x;const z=m.length;N>z/2&&(N=z/2);let V;for(V=0;V<N;++V){const se=parseInt(m.substr(V*2,2),16);if(kt(se))return V;_[w+V]=se}return V}function F(_,m,w,N){return It(xe(m,_.length-w),_,w,N)}function P(_,m,w,N){return It(ke(m),_,w,N)}function S(_,m,w,N){return It(Xt(m),_,w,N)}function Q(_,m,w,N){return It(dt(m,_.length-w),_,w,N)}a.prototype.write=function(m,w,N,x){if(w===void 0)x="utf8",N=this.length,w=0;else if(N===void 0&&typeof w=="string")x=w,N=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(N)?(N=N>>>0,x===void 0&&(x="utf8")):(x=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const z=this.length-w;if((N===void 0||N>z)&&(N=z),m.length>0&&(N<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");let V=!1;for(;;)switch(x){case"hex":return O(this,m,w,N);case"utf8":case"utf-8":return F(this,m,w,N);case"ascii":case"latin1":case"binary":return P(this,m,w,N);case"base64":return S(this,m,w,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,m,w,N);default:if(V)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),V=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Z(_,m,w){return m===0&&w===_.length?e.fromByteArray(_):e.fromByteArray(_.slice(m,w))}function ae(_,m,w){w=Math.min(_.length,w);const N=[];let x=m;for(;x<w;){const z=_[x];let V=null,se=z>239?4:z>223?3:z>191?2:1;if(x+se<=w){let G,Y,T,ne;switch(se){case 1:z<128&&(V=z);break;case 2:G=_[x+1],(G&192)===128&&(ne=(z&31)<<6|G&63,ne>127&&(V=ne));break;case 3:G=_[x+1],Y=_[x+2],(G&192)===128&&(Y&192)===128&&(ne=(z&15)<<12|(G&63)<<6|Y&63,ne>2047&&(ne<55296||ne>57343)&&(V=ne));break;case 4:G=_[x+1],Y=_[x+2],T=_[x+3],(G&192)===128&&(Y&192)===128&&(T&192)===128&&(ne=(z&15)<<18|(G&63)<<12|(Y&63)<<6|T&63,ne>65535&&ne<1114112&&(V=ne))}}V===null?(V=65533,se=1):V>65535&&(V-=65536,N.push(V>>>10&1023|55296),V=56320|V&1023),N.push(V),x+=se}return fe(N)}const ce=4096;function fe(_){const m=_.length;if(m<=ce)return String.fromCharCode.apply(String,_);let w="",N=0;for(;N<m;)w+=String.fromCharCode.apply(String,_.slice(N,N+=ce));return w}function le(_,m,w){let N="";w=Math.min(_.length,w);for(let x=m;x<w;++x)N+=String.fromCharCode(_[x]&127);return N}function Ee(_,m,w){let N="";w=Math.min(_.length,w);for(let x=m;x<w;++x)N+=String.fromCharCode(_[x]);return N}function pe(_,m,w){const N=_.length;(!m||m<0)&&(m=0),(!w||w<0||w>N)&&(w=N);let x="";for(let z=m;z<w;++z)x+=Ot[_[z]];return x}function Ce(_,m,w){const N=_.slice(m,w);let x="";for(let z=0;z<N.length-1;z+=2)x+=String.fromCharCode(N[z]+N[z+1]*256);return x}a.prototype.slice=function(m,w){const N=this.length;m=~~m,w=w===void 0?N:~~w,m<0?(m+=N,m<0&&(m=0)):m>N&&(m=N),w<0?(w+=N,w<0&&(w=0)):w>N&&(w=N),w<m&&(w=m);const x=this.subarray(m,w);return Object.setPrototypeOf(x,a.prototype),x};function Ie(_,m,w){if(_%1!==0||_<0)throw new RangeError("offset is not uint");if(_+m>w)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(m,w,N){m=m>>>0,w=w>>>0,N||Ie(m,w,this.length);let x=this[m],z=1,V=0;for(;++V<w&&(z*=256);)x+=this[m+V]*z;return x},a.prototype.readUintBE=a.prototype.readUIntBE=function(m,w,N){m=m>>>0,w=w>>>0,N||Ie(m,w,this.length);let x=this[m+--w],z=1;for(;w>0&&(z*=256);)x+=this[m+--w]*z;return x},a.prototype.readUint8=a.prototype.readUInt8=function(m,w){return m=m>>>0,w||Ie(m,1,this.length),this[m]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(m,w){return m=m>>>0,w||Ie(m,2,this.length),this[m]|this[m+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(m,w){return m=m>>>0,w||Ie(m,2,this.length),this[m]<<8|this[m+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(m,w){return m=m>>>0,w||Ie(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+this[m+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(m,w){return m=m>>>0,w||Ie(m,4,this.length),this[m]*16777216+(this[m+1]<<16|this[m+2]<<8|this[m+3])},a.prototype.readBigUInt64LE=et(function(m){m=m>>>0,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(m,this.length-8);const x=w+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24,z=this[++m]+this[++m]*2**8+this[++m]*2**16+N*2**24;return BigInt(x)+(BigInt(z)<<BigInt(32))}),a.prototype.readBigUInt64BE=et(function(m){m=m>>>0,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(m,this.length-8);const x=w*2**24+this[++m]*2**16+this[++m]*2**8+this[++m],z=this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+N;return(BigInt(x)<<BigInt(32))+BigInt(z)}),a.prototype.readIntLE=function(m,w,N){m=m>>>0,w=w>>>0,N||Ie(m,w,this.length);let x=this[m],z=1,V=0;for(;++V<w&&(z*=256);)x+=this[m+V]*z;return z*=128,x>=z&&(x-=Math.pow(2,8*w)),x},a.prototype.readIntBE=function(m,w,N){m=m>>>0,w=w>>>0,N||Ie(m,w,this.length);let x=w,z=1,V=this[m+--x];for(;x>0&&(z*=256);)V+=this[m+--x]*z;return z*=128,V>=z&&(V-=Math.pow(2,8*w)),V},a.prototype.readInt8=function(m,w){return m=m>>>0,w||Ie(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},a.prototype.readInt16LE=function(m,w){m=m>>>0,w||Ie(m,2,this.length);const N=this[m]|this[m+1]<<8;return N&32768?N|4294901760:N},a.prototype.readInt16BE=function(m,w){m=m>>>0,w||Ie(m,2,this.length);const N=this[m+1]|this[m]<<8;return N&32768?N|4294901760:N},a.prototype.readInt32LE=function(m,w){return m=m>>>0,w||Ie(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},a.prototype.readInt32BE=function(m,w){return m=m>>>0,w||Ie(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},a.prototype.readBigInt64LE=et(function(m){m=m>>>0,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(m,this.length-8);const x=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(N<<24);return(BigInt(x)<<BigInt(32))+BigInt(w+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24)}),a.prototype.readBigInt64BE=et(function(m){m=m>>>0,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(m,this.length-8);const x=(w<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(x)<<BigInt(32))+BigInt(this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+N)}),a.prototype.readFloatLE=function(m,w){return m=m>>>0,w||Ie(m,4,this.length),n.read(this,m,!0,23,4)},a.prototype.readFloatBE=function(m,w){return m=m>>>0,w||Ie(m,4,this.length),n.read(this,m,!1,23,4)},a.prototype.readDoubleLE=function(m,w){return m=m>>>0,w||Ie(m,8,this.length),n.read(this,m,!0,52,8)},a.prototype.readDoubleBE=function(m,w){return m=m>>>0,w||Ie(m,8,this.length),n.read(this,m,!1,52,8)};function we(_,m,w,N,x,z){if(!a.isBuffer(_))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>x||m<z)throw new RangeError('"value" argument is out of bounds');if(w+N>_.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(m,w,N,x){if(m=+m,w=w>>>0,N=N>>>0,!x){const se=Math.pow(2,8*N)-1;we(this,m,w,N,se,0)}let z=1,V=0;for(this[w]=m&255;++V<N&&(z*=256);)this[w+V]=m/z&255;return w+N},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(m,w,N,x){if(m=+m,w=w>>>0,N=N>>>0,!x){const se=Math.pow(2,8*N)-1;we(this,m,w,N,se,0)}let z=N-1,V=1;for(this[w+z]=m&255;--z>=0&&(V*=256);)this[w+z]=m/V&255;return w+N},a.prototype.writeUint8=a.prototype.writeUInt8=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,1,255,0),this[w]=m&255,w+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,2,65535,0),this[w]=m&255,this[w+1]=m>>>8,w+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,2,65535,0),this[w]=m>>>8,this[w+1]=m&255,w+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,4,4294967295,0),this[w+3]=m>>>24,this[w+2]=m>>>16,this[w+1]=m>>>8,this[w]=m&255,w+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,4,4294967295,0),this[w]=m>>>24,this[w+1]=m>>>16,this[w+2]=m>>>8,this[w+3]=m&255,w+4};function Te(_,m,w,N,x){D(m,N,x,_,w,7);let z=Number(m&BigInt(4294967295));_[w++]=z,z=z>>8,_[w++]=z,z=z>>8,_[w++]=z,z=z>>8,_[w++]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return _[w++]=V,V=V>>8,_[w++]=V,V=V>>8,_[w++]=V,V=V>>8,_[w++]=V,w}function He(_,m,w,N,x){D(m,N,x,_,w,7);let z=Number(m&BigInt(4294967295));_[w+7]=z,z=z>>8,_[w+6]=z,z=z>>8,_[w+5]=z,z=z>>8,_[w+4]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return _[w+3]=V,V=V>>8,_[w+2]=V,V=V>>8,_[w+1]=V,V=V>>8,_[w]=V,w+8}a.prototype.writeBigUInt64LE=et(function(m,w=0){return Te(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=et(function(m,w=0){return He(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(m,w,N,x){if(m=+m,w=w>>>0,!x){const G=Math.pow(2,8*N-1);we(this,m,w,N,G-1,-G)}let z=0,V=1,se=0;for(this[w]=m&255;++z<N&&(V*=256);)m<0&&se===0&&this[w+z-1]!==0&&(se=1),this[w+z]=(m/V>>0)-se&255;return w+N},a.prototype.writeIntBE=function(m,w,N,x){if(m=+m,w=w>>>0,!x){const G=Math.pow(2,8*N-1);we(this,m,w,N,G-1,-G)}let z=N-1,V=1,se=0;for(this[w+z]=m&255;--z>=0&&(V*=256);)m<0&&se===0&&this[w+z+1]!==0&&(se=1),this[w+z]=(m/V>>0)-se&255;return w+N},a.prototype.writeInt8=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,1,127,-128),m<0&&(m=255+m+1),this[w]=m&255,w+1},a.prototype.writeInt16LE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,2,32767,-32768),this[w]=m&255,this[w+1]=m>>>8,w+2},a.prototype.writeInt16BE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,2,32767,-32768),this[w]=m>>>8,this[w+1]=m&255,w+2},a.prototype.writeInt32LE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,4,2147483647,-2147483648),this[w]=m&255,this[w+1]=m>>>8,this[w+2]=m>>>16,this[w+3]=m>>>24,w+4},a.prototype.writeInt32BE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[w]=m>>>24,this[w+1]=m>>>16,this[w+2]=m>>>8,this[w+3]=m&255,w+4},a.prototype.writeBigInt64LE=et(function(m,w=0){return Te(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=et(function(m,w=0){return He(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Le(_,m,w,N,x,z){if(w+N>_.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function j(_,m,w,N,x){return m=+m,w=w>>>0,x||Le(_,m,w,4),n.write(_,m,w,N,23,4),w+4}a.prototype.writeFloatLE=function(m,w,N){return j(this,m,w,!0,N)},a.prototype.writeFloatBE=function(m,w,N){return j(this,m,w,!1,N)};function q(_,m,w,N,x){return m=+m,w=w>>>0,x||Le(_,m,w,8),n.write(_,m,w,N,52,8),w+8}a.prototype.writeDoubleLE=function(m,w,N){return q(this,m,w,!0,N)},a.prototype.writeDoubleBE=function(m,w,N){return q(this,m,w,!1,N)},a.prototype.copy=function(m,w,N,x){if(!a.isBuffer(m))throw new TypeError("argument should be a Buffer");if(N||(N=0),!x&&x!==0&&(x=this.length),w>=m.length&&(w=m.length),w||(w=0),x>0&&x<N&&(x=N),x===N||m.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),m.length-w<x-N&&(x=m.length-w+N);const z=x-N;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(w,N,x):Uint8Array.prototype.set.call(m,this.subarray(N,x),w),z},a.prototype.fill=function(m,w,N,x){if(typeof m=="string"){if(typeof w=="string"?(x=w,w=0,N=this.length):typeof N=="string"&&(x=N,N=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!a.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(m.length===1){const V=m.charCodeAt(0);(x==="utf8"&&V<128||x==="latin1")&&(m=V)}}else typeof m=="number"?m=m&255:typeof m=="boolean"&&(m=Number(m));if(w<0||this.length<w||this.length<N)throw new RangeError("Out of range index");if(N<=w)return this;w=w>>>0,N=N===void 0?this.length:N>>>0,m||(m=0);let z;if(typeof m=="number")for(z=w;z<N;++z)this[z]=m;else{const V=a.isBuffer(m)?m:a.from(m,x),se=V.length;if(se===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(z=0;z<N-w;++z)this[z+w]=V[z%se]}return this};const re={};function $(_,m,w){re[_]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${_}]`,this.stack,delete this.name}get code(){return _}set code(x){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:x,writable:!0})}toString(){return`${this.name} [${_}]: ${this.message}`}}}$("ERR_BUFFER_OUT_OF_BOUNDS",function(_){return _?`${_} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$("ERR_INVALID_ARG_TYPE",function(_,m){return`The "${_}" argument must be of type number. Received type ${typeof m}`},TypeError),$("ERR_OUT_OF_RANGE",function(_,m,w){let N=`The value of "${_}" is out of range.`,x=w;return Number.isInteger(w)&&Math.abs(w)>2**32?x=ue(String(w)):typeof w=="bigint"&&(x=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(x=ue(x)),x+="n"),N+=` It must be ${m}. Received ${x}`,N},RangeError);function ue(_){let m="",w=_.length;const N=_[0]==="-"?1:0;for(;w>=N+4;w-=3)m=`_${_.slice(w-3,w)}${m}`;return`${_.slice(0,w)}${m}`}function L(_,m,w){ee(m,"offset"),(_[m]===void 0||_[m+w]===void 0)&&oe(m,_.length-(w+1))}function D(_,m,w,N,x,z){if(_>w||_<m){const V=typeof m=="bigint"?"n":"";let se;throw m===0||m===BigInt(0)?se=`>= 0${V} and < 2${V} ** ${(z+1)*8}${V}`:se=`>= -(2${V} ** ${(z+1)*8-1}${V}) and < 2 ** ${(z+1)*8-1}${V}`,new re.ERR_OUT_OF_RANGE("value",se,_)}L(N,x,z)}function ee(_,m){if(typeof _!="number")throw new re.ERR_INVALID_ARG_TYPE(m,"number",_)}function oe(_,m,w){throw Math.floor(_)!==_?(ee(_,w),new re.ERR_OUT_OF_RANGE("offset","an integer",_)):m<0?new re.ERR_BUFFER_OUT_OF_BOUNDS:new re.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${m}`,_)}const De=/[^+/0-9A-Za-z-_]/g;function ye(_){if(_=_.split("=")[0],_=_.trim().replace(De,""),_.length<2)return"";for(;_.length%4!==0;)_=_+"=";return _}function xe(_,m){m=m||1/0;let w;const N=_.length;let x=null;const z=[];for(let V=0;V<N;++V){if(w=_.charCodeAt(V),w>55295&&w<57344){if(!x){if(w>56319){(m-=3)>-1&&z.push(239,191,189);continue}else if(V+1===N){(m-=3)>-1&&z.push(239,191,189);continue}x=w;continue}if(w<56320){(m-=3)>-1&&z.push(239,191,189),x=w;continue}w=(x-55296<<10|w-56320)+65536}else x&&(m-=3)>-1&&z.push(239,191,189);if(x=null,w<128){if((m-=1)<0)break;z.push(w)}else if(w<2048){if((m-=2)<0)break;z.push(w>>6|192,w&63|128)}else if(w<65536){if((m-=3)<0)break;z.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((m-=4)<0)break;z.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return z}function ke(_){const m=[];for(let w=0;w<_.length;++w)m.push(_.charCodeAt(w)&255);return m}function dt(_,m){let w,N,x;const z=[];for(let V=0;V<_.length&&!((m-=2)<0);++V)w=_.charCodeAt(V),N=w>>8,x=w%256,z.push(x),z.push(N);return z}function Xt(_){return e.toByteArray(ye(_))}function It(_,m,w,N){let x;for(x=0;x<N&&!(x+w>=m.length||x>=_.length);++x)m[x+w]=_[x];return x}function $e(_,m){return _ instanceof m||_!=null&&_.constructor!=null&&_.constructor.name!=null&&_.constructor.name===m.name}function kt(_){return _!==_}const Ot=function(){const _="0123456789abcdef",m=new Array(256);for(let w=0;w<16;++w){const N=w*16;for(let x=0;x<16;++x)m[N+x]=_[w]+_[x]}return m}();function et(_){return typeof BigInt>"u"?zt:_}function zt(){throw new Error("BigInt not supported")}}(zh)),zh}var Ke=ua();const Y_=Qe({__proto__:null,default:Al(Ke)},[Ke]),Ct={},Z_=Object.freeze(Object.defineProperty({__proto__:null,default:Ct},Symbol.toStringTag,{value:"Module"}));function T2(t){return(typeof t=="object"&&t!==null&&"message"in t?t.message:`${t}`).replace(/\.$/,"")}class En{async getBufferFromResponse(e){const n=await e.arrayBuffer();return Ke.Buffer.from(n)}constructor(e,n={}){this.baseOverrides={},this.url=e;const r=n.fetch||globalThis.fetch.bind(globalThis);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(e,n){let r;try{r=await this.fetchImplementation(e,n)}catch(o){if(`${o}`.includes("Failed to fetch")){console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);try{r=await this.fetchImplementation(e,{...n,cache:"reload"})}catch(i){throw new Error(`${T2(i)} fetching ${e}`,{cause:i})}}else throw new Error(`${T2(o)} fetching ${e}`,{cause:o})}return r}async read(e,n=0,r,o=0,i={}){const{headers:s={},signal:a,overrides:c={}}=i;r<1/0?s.range=`bytes=${o}-${o+r}`:r===1/0&&o!==0&&(s.range=`bytes=${o}-`);const l=await this.fetch(this.url,{...this.baseOverrides,...c,headers:{...s,...c.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:a});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${this.url}`);if(l.status===200&&o===0||l.status===206){const u=await this.getBufferFromResponse(l),f=u.copy(e,n,0,Math.min(r,u.length)),h=l.headers.get("content-range"),d=/\/(\d+)$/.exec(h||"");return d!=null&&d[1]&&(this._stat={size:parseInt(d[1],10)}),{bytesRead:f,buffer:e}}throw l.status===200?new Error(`${this.url} fetch returned status 200, expected 206`):new Error(`HTTP ${l.status} fetching ${this.url}`)}async readFile(e={}){let n,r;typeof e=="string"?(n=e,r={}):(n=e.encoding,r=e,delete r.encoding);const{headers:o={},signal:i,overrides:s={}}=r,a=await this.fetch(this.url,{headers:o,method:"GET",redirect:"follow",mode:"cors",signal:i,...this.baseOverrides,...s});if(a.status!==200)throw new Error(`HTTP ${a.status} fetching ${this.url}`);if(n==="utf8")return a.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(a)}async stat(){if(!this._stat){const e=Ke.Buffer.allocUnsafe(10);if(await this.read(e,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function D2(t){const e=new FileReader;return new Promise((n,r)=>{e.onerror=()=>{e.abort(),r(new Error("problem reading blob"))},e.onabort=()=>{r(new Error("blob reading was aborted"))},e.onload=()=>{e.result&&typeof e.result!="string"?n(e.result):r(new Error("unknown error reading blob"))},e.readAsArrayBuffer(t)})}function X_(t){const e=new FileReader;return new Promise((n,r)=>{e.onerror=()=>{e.abort(),r(new Error("problem reading blob"))},e.onabort=()=>{r(new Error("blob reading was aborted"))},e.onload=()=>{e.result&&typeof e.result=="string"?n(e.result):r(new Error("unknown error reading blob"))},e.readAsText(t)})}class K_{constructor(e){this.blob=e,this.size=e.size}async read(e,n=0,r,o=0){if(!r)return{bytesRead:0,buffer:e};const i=o,s=i+r,a=await D2(this.blob.slice(i,s)),c=Ke.Buffer.from(a);return{bytesRead:c.copy(e,n),buffer:c}}async readFile(e){const n=typeof e=="string"?e:e==null?void 0:e.encoding;if(n==="utf8")return X_(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await D2(this.blob);return Ke.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function B2(t,e={}){return new En(t,e)}function J_(t,e,n,r={}){if(n!==void 0)return n;if(t!==void 0)return B2(t,r);if(e!==void 0)return new Ct(e,r);throw new Error("no url, path, or filehandle provided, cannot open")}const fa=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:K_,LocalFile:Ct,RemoteFile:En,fromUrl:B2,open:J_},Symbol.toStringTag,{value:"Module"}));var Uh={},_2;function Mr(){return _2||(_2=1,function(t){var e=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(i,s){return Object.prototype.hasOwnProperty.call(i,s)}t.assign=function(i){for(var s=Array.prototype.slice.call(arguments,1);s.length;){var a=s.shift();if(a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(var c in a)n(a,c)&&(i[c]=a[c])}}return i},t.shrinkBuf=function(i,s){return i.length===s?i:i.subarray?i.subarray(0,s):(i.length=s,i)};var r={arraySet:function(i,s,a,c,l){if(s.subarray&&i.subarray){i.set(s.subarray(a,a+c),l);return}for(var u=0;u<c;u++)i[l+u]=s[a+u]},flattenChunks:function(i){var s,a,c,l,u,f;for(c=0,s=0,a=i.length;s<a;s++)c+=i[s].length;for(f=new Uint8Array(c),l=0,s=0,a=i.length;s<a;s++)u=i[s],f.set(u,l),l+=u.length;return f}},o={arraySet:function(i,s,a,c,l){for(var u=0;u<c;u++)i[l+u]=s[a+u]},flattenChunks:function(i){return[].concat.apply([],i)}};t.setTyped=function(i){i?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,r)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(e)}(Uh)),Uh}var co={},Sn={},bi={},k2;function $_(){if(k2)return bi;k2=1;var t=Mr(),e=4,n=0,r=1,o=2;function i(x){for(var z=x.length;--z>=0;)x[z]=0}var s=0,a=1,c=2,l=3,u=258,f=29,h=256,d=h+1+f,p=30,y=19,v=2*d+1,b=15,A=16,C=7,E=256,I=16,R=17,B=18,O=[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],F=[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],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Q=512,Z=new Array((d+2)*2);i(Z);var ae=new Array(p*2);i(ae);var ce=new Array(Q);i(ce);var fe=new Array(u-l+1);i(fe);var le=new Array(f);i(le);var Ee=new Array(p);i(Ee);function pe(x,z,V,se,G){this.static_tree=x,this.extra_bits=z,this.extra_base=V,this.elems=se,this.max_length=G,this.has_stree=x&&x.length}var Ce,Ie,we;function Te(x,z){this.dyn_tree=x,this.max_code=0,this.stat_desc=z}function He(x){return x<256?ce[x]:ce[256+(x>>>7)]}function Le(x,z){x.pending_buf[x.pending++]=z&255,x.pending_buf[x.pending++]=z>>>8&255}function j(x,z,V){x.bi_valid>A-V?(x.bi_buf|=z<<x.bi_valid&65535,Le(x,x.bi_buf),x.bi_buf=z>>A-x.bi_valid,x.bi_valid+=V-A):(x.bi_buf|=z<<x.bi_valid&65535,x.bi_valid+=V)}function q(x,z,V){j(x,V[z*2],V[z*2+1])}function re(x,z){var V=0;do V|=x&1,x>>>=1,V<<=1;while(--z>0);return V>>>1}function $(x){x.bi_valid===16?(Le(x,x.bi_buf),x.bi_buf=0,x.bi_valid=0):x.bi_valid>=8&&(x.pending_buf[x.pending++]=x.bi_buf&255,x.bi_buf>>=8,x.bi_valid-=8)}function ue(x,z){var V=z.dyn_tree,se=z.max_code,G=z.stat_desc.static_tree,Y=z.stat_desc.has_stree,T=z.stat_desc.extra_bits,ne=z.stat_desc.extra_base,_e=z.stat_desc.max_length,g,K,J,k,H,W,Se=0;for(k=0;k<=b;k++)x.bl_count[k]=0;for(V[x.heap[x.heap_max]*2+1]=0,g=x.heap_max+1;g<v;g++)K=x.heap[g],k=V[V[K*2+1]*2+1]+1,k>_e&&(k=_e,Se++),V[K*2+1]=k,!(K>se)&&(x.bl_count[k]++,H=0,K>=ne&&(H=T[K-ne]),W=V[K*2],x.opt_len+=W*(k+H),Y&&(x.static_len+=W*(G[K*2+1]+H)));if(Se!==0){do{for(k=_e-1;x.bl_count[k]===0;)k--;x.bl_count[k]--,x.bl_count[k+1]+=2,x.bl_count[_e]--,Se-=2}while(Se>0);for(k=_e;k!==0;k--)for(K=x.bl_count[k];K!==0;)J=x.heap[--g],!(J>se)&&(V[J*2+1]!==k&&(x.opt_len+=(k-V[J*2+1])*V[J*2],V[J*2+1]=k),K--)}}function L(x,z,V){var se=new Array(b+1),G=0,Y,T;for(Y=1;Y<=b;Y++)se[Y]=G=G+V[Y-1]<<1;for(T=0;T<=z;T++){var ne=x[T*2+1];ne!==0&&(x[T*2]=re(se[ne]++,ne))}}function D(){var x,z,V,se,G,Y=new Array(b+1);for(V=0,se=0;se<f-1;se++)for(le[se]=V,x=0;x<1<<O[se];x++)fe[V++]=se;for(fe[V-1]=se,G=0,se=0;se<16;se++)for(Ee[se]=G,x=0;x<1<<F[se];x++)ce[G++]=se;for(G>>=7;se<p;se++)for(Ee[se]=G<<7,x=0;x<1<<F[se]-7;x++)ce[256+G++]=se;for(z=0;z<=b;z++)Y[z]=0;for(x=0;x<=143;)Z[x*2+1]=8,x++,Y[8]++;for(;x<=255;)Z[x*2+1]=9,x++,Y[9]++;for(;x<=279;)Z[x*2+1]=7,x++,Y[7]++;for(;x<=287;)Z[x*2+1]=8,x++,Y[8]++;for(L(Z,d+1,Y),x=0;x<p;x++)ae[x*2+1]=5,ae[x*2]=re(x,5);Ce=new pe(Z,O,h+1,d,b),Ie=new pe(ae,F,0,p,b),we=new pe(new Array(0),P,0,y,C)}function ee(x){var z;for(z=0;z<d;z++)x.dyn_ltree[z*2]=0;for(z=0;z<p;z++)x.dyn_dtree[z*2]=0;for(z=0;z<y;z++)x.bl_tree[z*2]=0;x.dyn_ltree[E*2]=1,x.opt_len=x.static_len=0,x.last_lit=x.matches=0}function oe(x){x.bi_valid>8?Le(x,x.bi_buf):x.bi_valid>0&&(x.pending_buf[x.pending++]=x.bi_buf),x.bi_buf=0,x.bi_valid=0}function De(x,z,V,se){oe(x),Le(x,V),Le(x,~V),t.arraySet(x.pending_buf,x.window,z,V,x.pending),x.pending+=V}function ye(x,z,V,se){var G=z*2,Y=V*2;return x[G]<x[Y]||x[G]===x[Y]&&se[z]<=se[V]}function xe(x,z,V){for(var se=x.heap[V],G=V<<1;G<=x.heap_len&&(G<x.heap_len&&ye(z,x.heap[G+1],x.heap[G],x.depth)&&G++,!ye(z,se,x.heap[G],x.depth));)x.heap[V]=x.heap[G],V=G,G<<=1;x.heap[V]=se}function ke(x,z,V){var se,G,Y=0,T,ne;if(x.last_lit!==0)do se=x.pending_buf[x.d_buf+Y*2]<<8|x.pending_buf[x.d_buf+Y*2+1],G=x.pending_buf[x.l_buf+Y],Y++,se===0?q(x,G,z):(T=fe[G],q(x,T+h+1,z),ne=O[T],ne!==0&&(G-=le[T],j(x,G,ne)),se--,T=He(se),q(x,T,V),ne=F[T],ne!==0&&(se-=Ee[T],j(x,se,ne)));while(Y<x.last_lit);q(x,E,z)}function dt(x,z){var V=z.dyn_tree,se=z.stat_desc.static_tree,G=z.stat_desc.has_stree,Y=z.stat_desc.elems,T,ne,_e=-1,g;for(x.heap_len=0,x.heap_max=v,T=0;T<Y;T++)V[T*2]!==0?(x.heap[++x.heap_len]=_e=T,x.depth[T]=0):V[T*2+1]=0;for(;x.heap_len<2;)g=x.heap[++x.heap_len]=_e<2?++_e:0,V[g*2]=1,x.depth[g]=0,x.opt_len--,G&&(x.static_len-=se[g*2+1]);for(z.max_code=_e,T=x.heap_len>>1;T>=1;T--)xe(x,V,T);g=Y;do T=x.heap[1],x.heap[1]=x.heap[x.heap_len--],xe(x,V,1),ne=x.heap[1],x.heap[--x.heap_max]=T,x.heap[--x.heap_max]=ne,V[g*2]=V[T*2]+V[ne*2],x.depth[g]=(x.depth[T]>=x.depth[ne]?x.depth[T]:x.depth[ne])+1,V[T*2+1]=V[ne*2+1]=g,x.heap[1]=g++,xe(x,V,1);while(x.heap_len>=2);x.heap[--x.heap_max]=x.heap[1],ue(x,z),L(V,_e,x.bl_count)}function Xt(x,z,V){var se,G=-1,Y,T=z[0*2+1],ne=0,_e=7,g=4;for(T===0&&(_e=138,g=3),z[(V+1)*2+1]=65535,se=0;se<=V;se++)Y=T,T=z[(se+1)*2+1],!(++ne<_e&&Y===T)&&(ne<g?x.bl_tree[Y*2]+=ne:Y!==0?(Y!==G&&x.bl_tree[Y*2]++,x.bl_tree[I*2]++):ne<=10?x.bl_tree[R*2]++:x.bl_tree[B*2]++,ne=0,G=Y,T===0?(_e=138,g=3):Y===T?(_e=6,g=3):(_e=7,g=4))}function It(x,z,V){var se,G=-1,Y,T=z[0*2+1],ne=0,_e=7,g=4;for(T===0&&(_e=138,g=3),se=0;se<=V;se++)if(Y=T,T=z[(se+1)*2+1],!(++ne<_e&&Y===T)){if(ne<g)do q(x,Y,x.bl_tree);while(--ne!==0);else Y!==0?(Y!==G&&(q(x,Y,x.bl_tree),ne--),q(x,I,x.bl_tree),j(x,ne-3,2)):ne<=10?(q(x,R,x.bl_tree),j(x,ne-3,3)):(q(x,B,x.bl_tree),j(x,ne-11,7));ne=0,G=Y,T===0?(_e=138,g=3):Y===T?(_e=6,g=3):(_e=7,g=4)}}function $e(x){var z;for(Xt(x,x.dyn_ltree,x.l_desc.max_code),Xt(x,x.dyn_dtree,x.d_desc.max_code),dt(x,x.bl_desc),z=y-1;z>=3&&x.bl_tree[S[z]*2+1]===0;z--);return x.opt_len+=3*(z+1)+5+5+4,z}function kt(x,z,V,se){var G;for(j(x,z-257,5),j(x,V-1,5),j(x,se-4,4),G=0;G<se;G++)j(x,x.bl_tree[S[G]*2+1],3);It(x,x.dyn_ltree,z-1),It(x,x.dyn_dtree,V-1)}function Ot(x){var z=4093624447,V;for(V=0;V<=31;V++,z>>>=1)if(z&1&&x.dyn_ltree[V*2]!==0)return n;if(x.dyn_ltree[9*2]!==0||x.dyn_ltree[10*2]!==0||x.dyn_ltree[13*2]!==0)return r;for(V=32;V<h;V++)if(x.dyn_ltree[V*2]!==0)return r;return n}var et=!1;function zt(x){et||(D(),et=!0),x.l_desc=new Te(x.dyn_ltree,Ce),x.d_desc=new Te(x.dyn_dtree,Ie),x.bl_desc=new Te(x.bl_tree,we),x.bi_buf=0,x.bi_valid=0,ee(x)}function _(x,z,V,se){j(x,(s<<1)+(se?1:0),3),De(x,z,V)}function m(x){j(x,a<<1,3),q(x,E,Z),$(x)}function w(x,z,V,se){var G,Y,T=0;x.level>0?(x.strm.data_type===o&&(x.strm.data_type=Ot(x)),dt(x,x.l_desc),dt(x,x.d_desc),T=$e(x),G=x.opt_len+3+7>>>3,Y=x.static_len+3+7>>>3,Y<=G&&(G=Y)):G=Y=V+5,V+4<=G&&z!==-1?_(x,z,V,se):x.strategy===e||Y===G?(j(x,(a<<1)+(se?1:0),3),ke(x,Z,ae)):(j(x,(c<<1)+(se?1:0),3),kt(x,x.l_desc.max_code+1,x.d_desc.max_code+1,T+1),ke(x,x.dyn_ltree,x.dyn_dtree)),ee(x),se&&oe(x)}function N(x,z,V){return x.pending_buf[x.d_buf+x.last_lit*2]=z>>>8&255,x.pending_buf[x.d_buf+x.last_lit*2+1]=z&255,x.pending_buf[x.l_buf+x.last_lit]=V&255,x.last_lit++,z===0?x.dyn_ltree[V*2]++:(x.matches++,z--,x.dyn_ltree[(fe[V]+h+1)*2]++,x.dyn_dtree[He(z)*2]++),x.last_lit===x.lit_bufsize-1}return bi._tr_init=zt,bi._tr_stored_block=_,bi._tr_flush_block=w,bi._tr_tally=N,bi._tr_align=m,bi}var Gh,R2;function F2(){if(R2)return Gh;R2=1;function t(e,n,r,o){for(var i=e&65535|0,s=e>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do i=i+n[o++]|0,s=s+i|0;while(--a);i%=65521,s%=65521}return i|s<<16|0}return Gh=t,Gh}var Hh,M2;function P2(){if(M2)return Hh;M2=1;function t(){for(var r,o=[],i=0;i<256;i++){r=i;for(var s=0;s<8;s++)r=r&1?3988292384^r>>>1:r>>>1;o[i]=r}return o}var e=t();function n(r,o,i,s){var a=e,c=s+i;r^=-1;for(var l=s;l<c;l++)r=r>>>8^a[(r^o[l])&255];return r^-1}return Hh=n,Hh}var Vh,L2;function qh(){return L2||(L2=1,Vh={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"}),Vh}var N2;function ek(){if(N2)return Sn;N2=1;var t=Mr(),e=$_(),n=F2(),r=P2(),o=qh(),i=0,s=1,a=3,c=4,l=5,u=0,f=1,h=-2,d=-3,p=-5,y=-1,v=1,b=2,A=3,C=4,E=0,I=2,R=8,B=9,O=15,F=8,P=29,S=256,Q=S+1+P,Z=30,ae=19,ce=2*Q+1,fe=15,le=3,Ee=258,pe=Ee+le+1,Ce=32,Ie=42,we=69,Te=73,He=91,Le=103,j=113,q=666,re=1,$=2,ue=3,L=4,D=3;function ee(g,K){return g.msg=o[K],K}function oe(g){return(g<<1)-(g>4?9:0)}function De(g){for(var K=g.length;--K>=0;)g[K]=0}function ye(g){var K=g.state,J=K.pending;J>g.avail_out&&(J=g.avail_out),J!==0&&(t.arraySet(g.output,K.pending_buf,K.pending_out,J,g.next_out),g.next_out+=J,K.pending_out+=J,g.total_out+=J,g.avail_out-=J,K.pending-=J,K.pending===0&&(K.pending_out=0))}function xe(g,K){e._tr_flush_block(g,g.block_start>=0?g.block_start:-1,g.strstart-g.block_start,K),g.block_start=g.strstart,ye(g.strm)}function ke(g,K){g.pending_buf[g.pending++]=K}function dt(g,K){g.pending_buf[g.pending++]=K>>>8&255,g.pending_buf[g.pending++]=K&255}function Xt(g,K,J,k){var H=g.avail_in;return H>k&&(H=k),H===0?0:(g.avail_in-=H,t.arraySet(K,g.input,g.next_in,H,J),g.state.wrap===1?g.adler=n(g.adler,K,H,J):g.state.wrap===2&&(g.adler=r(g.adler,K,H,J)),g.next_in+=H,g.total_in+=H,H)}function It(g,K){var J=g.max_chain_length,k=g.strstart,H,W,Se=g.prev_length,ge=g.nice_match,be=g.strstart>g.w_size-pe?g.strstart-(g.w_size-pe):0,Ge=g.window,gn=g.w_mask,U=g.prev,Me=g.strstart+Ee,lt=Ge[k+Se-1],tt=Ge[k+Se];g.prev_length>=g.good_match&&(J>>=2),ge>g.lookahead&&(ge=g.lookahead);do if(H=K,!(Ge[H+Se]!==tt||Ge[H+Se-1]!==lt||Ge[H]!==Ge[k]||Ge[++H]!==Ge[k+1])){k+=2,H++;do;while(Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&k<Me);if(W=Ee-(Me-k),k=Me-Ee,W>Se){if(g.match_start=K,Se=W,W>=ge)break;lt=Ge[k+Se-1],tt=Ge[k+Se]}}while((K=U[K&gn])>be&&--J!==0);return Se<=g.lookahead?Se:g.lookahead}function $e(g){var K=g.w_size,J,k,H,W,Se;do{if(W=g.window_size-g.lookahead-g.strstart,g.strstart>=K+(K-pe)){t.arraySet(g.window,g.window,K,K,0),g.match_start-=K,g.strstart-=K,g.block_start-=K,k=g.hash_size,J=k;do H=g.head[--J],g.head[J]=H>=K?H-K:0;while(--k);k=K,J=k;do H=g.prev[--J],g.prev[J]=H>=K?H-K:0;while(--k);W+=K}if(g.strm.avail_in===0)break;if(k=Xt(g.strm,g.window,g.strstart+g.lookahead,W),g.lookahead+=k,g.lookahead+g.insert>=le)for(Se=g.strstart-g.insert,g.ins_h=g.window[Se],g.ins_h=(g.ins_h<<g.hash_shift^g.window[Se+1])&g.hash_mask;g.insert&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[Se+le-1])&g.hash_mask,g.prev[Se&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=Se,Se++,g.insert--,!(g.lookahead+g.insert<le)););}while(g.lookahead<pe&&g.strm.avail_in!==0)}function kt(g,K){var J=65535;for(J>g.pending_buf_size-5&&(J=g.pending_buf_size-5);;){if(g.lookahead<=1){if($e(g),g.lookahead===0&&K===i)return re;if(g.lookahead===0)break}g.strstart+=g.lookahead,g.lookahead=0;var k=g.block_start+J;if((g.strstart===0||g.strstart>=k)&&(g.lookahead=g.strstart-k,g.strstart=k,xe(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-pe&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=0,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):(g.strstart>g.block_start&&(xe(g,!1),g.strm.avail_out===0),re)}function Ot(g,K){for(var J,k;;){if(g.lookahead<pe){if($e(g),g.lookahead<pe&&K===i)return re;if(g.lookahead===0)break}if(J=0,g.lookahead>=le&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+le-1])&g.hash_mask,J=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),J!==0&&g.strstart-J<=g.w_size-pe&&(g.match_length=It(g,J)),g.match_length>=le)if(k=e._tr_tally(g,g.strstart-g.match_start,g.match_length-le),g.lookahead-=g.match_length,g.match_length<=g.max_lazy_match&&g.lookahead>=le){g.match_length--;do g.strstart++,g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+le-1])&g.hash_mask,J=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart;while(--g.match_length!==0);g.strstart++}else g.strstart+=g.match_length,g.match_length=0,g.ins_h=g.window[g.strstart],g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+1])&g.hash_mask;else k=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++;if(k&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=g.strstart<le-1?g.strstart:le-1,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function et(g,K){for(var J,k,H;;){if(g.lookahead<pe){if($e(g),g.lookahead<pe&&K===i)return re;if(g.lookahead===0)break}if(J=0,g.lookahead>=le&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+le-1])&g.hash_mask,J=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),g.prev_length=g.match_length,g.prev_match=g.match_start,g.match_length=le-1,J!==0&&g.prev_length<g.max_lazy_match&&g.strstart-J<=g.w_size-pe&&(g.match_length=It(g,J),g.match_length<=5&&(g.strategy===v||g.match_length===le&&g.strstart-g.match_start>4096)&&(g.match_length=le-1)),g.prev_length>=le&&g.match_length<=g.prev_length){H=g.strstart+g.lookahead-le,k=e._tr_tally(g,g.strstart-1-g.prev_match,g.prev_length-le),g.lookahead-=g.prev_length-1,g.prev_length-=2;do++g.strstart<=H&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+le-1])&g.hash_mask,J=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart);while(--g.prev_length!==0);if(g.match_available=0,g.match_length=le-1,g.strstart++,k&&(xe(g,!1),g.strm.avail_out===0))return re}else if(g.match_available){if(k=e._tr_tally(g,0,g.window[g.strstart-1]),k&&xe(g,!1),g.strstart++,g.lookahead--,g.strm.avail_out===0)return re}else g.match_available=1,g.strstart++,g.lookahead--}return g.match_available&&(k=e._tr_tally(g,0,g.window[g.strstart-1]),g.match_available=0),g.insert=g.strstart<le-1?g.strstart:le-1,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function zt(g,K){for(var J,k,H,W,Se=g.window;;){if(g.lookahead<=Ee){if($e(g),g.lookahead<=Ee&&K===i)return re;if(g.lookahead===0)break}if(g.match_length=0,g.lookahead>=le&&g.strstart>0&&(H=g.strstart-1,k=Se[H],k===Se[++H]&&k===Se[++H]&&k===Se[++H])){W=g.strstart+Ee;do;while(k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&H<W);g.match_length=Ee-(W-H),g.match_length>g.lookahead&&(g.match_length=g.lookahead)}if(g.match_length>=le?(J=e._tr_tally(g,1,g.match_length-le),g.lookahead-=g.match_length,g.strstart+=g.match_length,g.match_length=0):(J=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++),J&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=0,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function _(g,K){for(var J;;){if(g.lookahead===0&&($e(g),g.lookahead===0)){if(K===i)return re;break}if(g.match_length=0,J=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++,J&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=0,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function m(g,K,J,k,H){this.good_length=g,this.max_lazy=K,this.nice_length=J,this.max_chain=k,this.func=H}var w;w=[new m(0,0,0,0,kt),new m(4,4,8,4,Ot),new m(4,5,16,8,Ot),new m(4,6,32,32,Ot),new m(4,4,16,16,et),new m(8,16,32,32,et),new m(8,16,128,128,et),new m(8,32,128,256,et),new m(32,128,258,1024,et),new m(32,258,258,4096,et)];function N(g){g.window_size=2*g.w_size,De(g.head),g.max_lazy_match=w[g.level].max_lazy,g.good_match=w[g.level].good_length,g.nice_match=w[g.level].nice_length,g.max_chain_length=w[g.level].max_chain,g.strstart=0,g.block_start=0,g.lookahead=0,g.insert=0,g.match_length=g.prev_length=le-1,g.match_available=0,g.ins_h=0}function x(){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=R,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 t.Buf16(ce*2),this.dyn_dtree=new t.Buf16((2*Z+1)*2),this.bl_tree=new t.Buf16((2*ae+1)*2),De(this.dyn_ltree),De(this.dyn_dtree),De(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(fe+1),this.heap=new t.Buf16(2*Q+1),De(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*Q+1),De(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 z(g){var K;return!g||!g.state?ee(g,h):(g.total_in=g.total_out=0,g.data_type=I,K=g.state,K.pending=0,K.pending_out=0,K.wrap<0&&(K.wrap=-K.wrap),K.status=K.wrap?Ie:j,g.adler=K.wrap===2?0:1,K.last_flush=i,e._tr_init(K),u)}function V(g){var K=z(g);return K===u&&N(g.state),K}function se(g,K){return!g||!g.state||g.state.wrap!==2?h:(g.state.gzhead=K,u)}function G(g,K,J,k,H,W){if(!g)return h;var Se=1;if(K===y&&(K=6),k<0?(Se=0,k=-k):k>15&&(Se=2,k-=16),H<1||H>B||J!==R||k<8||k>15||K<0||K>9||W<0||W>C)return ee(g,h);k===8&&(k=9);var ge=new x;return g.state=ge,ge.strm=g,ge.wrap=Se,ge.gzhead=null,ge.w_bits=k,ge.w_size=1<<ge.w_bits,ge.w_mask=ge.w_size-1,ge.hash_bits=H+7,ge.hash_size=1<<ge.hash_bits,ge.hash_mask=ge.hash_size-1,ge.hash_shift=~~((ge.hash_bits+le-1)/le),ge.window=new t.Buf8(ge.w_size*2),ge.head=new t.Buf16(ge.hash_size),ge.prev=new t.Buf16(ge.w_size),ge.lit_bufsize=1<<H+6,ge.pending_buf_size=ge.lit_bufsize*4,ge.pending_buf=new t.Buf8(ge.pending_buf_size),ge.d_buf=1*ge.lit_bufsize,ge.l_buf=3*ge.lit_bufsize,ge.level=K,ge.strategy=W,ge.method=J,V(g)}function Y(g,K){return G(g,K,R,O,F,E)}function T(g,K){var J,k,H,W;if(!g||!g.state||K>l||K<0)return g?ee(g,h):h;if(k=g.state,!g.output||!g.input&&g.avail_in!==0||k.status===q&&K!==c)return ee(g,g.avail_out===0?p:h);if(k.strm=g,J=k.last_flush,k.last_flush=K,k.status===Ie)if(k.wrap===2)g.adler=0,ke(k,31),ke(k,139),ke(k,8),k.gzhead?(ke(k,(k.gzhead.text?1:0)+(k.gzhead.hcrc?2:0)+(k.gzhead.extra?4:0)+(k.gzhead.name?8:0)+(k.gzhead.comment?16:0)),ke(k,k.gzhead.time&255),ke(k,k.gzhead.time>>8&255),ke(k,k.gzhead.time>>16&255),ke(k,k.gzhead.time>>24&255),ke(k,k.level===9?2:k.strategy>=b||k.level<2?4:0),ke(k,k.gzhead.os&255),k.gzhead.extra&&k.gzhead.extra.length&&(ke(k,k.gzhead.extra.length&255),ke(k,k.gzhead.extra.length>>8&255)),k.gzhead.hcrc&&(g.adler=r(g.adler,k.pending_buf,k.pending,0)),k.gzindex=0,k.status=we):(ke(k,0),ke(k,0),ke(k,0),ke(k,0),ke(k,0),ke(k,k.level===9?2:k.strategy>=b||k.level<2?4:0),ke(k,D),k.status=j);else{var Se=R+(k.w_bits-8<<4)<<8,ge=-1;k.strategy>=b||k.level<2?ge=0:k.level<6?ge=1:k.level===6?ge=2:ge=3,Se|=ge<<6,k.strstart!==0&&(Se|=Ce),Se+=31-Se%31,k.status=j,dt(k,Se),k.strstart!==0&&(dt(k,g.adler>>>16),dt(k,g.adler&65535)),g.adler=1}if(k.status===we)if(k.gzhead.extra){for(H=k.pending;k.gzindex<(k.gzhead.extra.length&65535)&&!(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),ye(g),H=k.pending,k.pending===k.pending_buf_size));)ke(k,k.gzhead.extra[k.gzindex]&255),k.gzindex++;k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),k.gzindex===k.gzhead.extra.length&&(k.gzindex=0,k.status=Te)}else k.status=Te;if(k.status===Te)if(k.gzhead.name){H=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),ye(g),H=k.pending,k.pending===k.pending_buf_size)){W=1;break}k.gzindex<k.gzhead.name.length?W=k.gzhead.name.charCodeAt(k.gzindex++)&255:W=0,ke(k,W)}while(W!==0);k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),W===0&&(k.gzindex=0,k.status=He)}else k.status=He;if(k.status===He)if(k.gzhead.comment){H=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),ye(g),H=k.pending,k.pending===k.pending_buf_size)){W=1;break}k.gzindex<k.gzhead.comment.length?W=k.gzhead.comment.charCodeAt(k.gzindex++)&255:W=0,ke(k,W)}while(W!==0);k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),W===0&&(k.status=Le)}else k.status=Le;if(k.status===Le&&(k.gzhead.hcrc?(k.pending+2>k.pending_buf_size&&ye(g),k.pending+2<=k.pending_buf_size&&(ke(k,g.adler&255),ke(k,g.adler>>8&255),g.adler=0,k.status=j)):k.status=j),k.pending!==0){if(ye(g),g.avail_out===0)return k.last_flush=-1,u}else if(g.avail_in===0&&oe(K)<=oe(J)&&K!==c)return ee(g,p);if(k.status===q&&g.avail_in!==0)return ee(g,p);if(g.avail_in!==0||k.lookahead!==0||K!==i&&k.status!==q){var be=k.strategy===b?_(k,K):k.strategy===A?zt(k,K):w[k.level].func(k,K);if((be===ue||be===L)&&(k.status=q),be===re||be===ue)return g.avail_out===0&&(k.last_flush=-1),u;if(be===$&&(K===s?e._tr_align(k):K!==l&&(e._tr_stored_block(k,0,0,!1),K===a&&(De(k.head),k.lookahead===0&&(k.strstart=0,k.block_start=0,k.insert=0))),ye(g),g.avail_out===0))return k.last_flush=-1,u}return K!==c?u:k.wrap<=0?f:(k.wrap===2?(ke(k,g.adler&255),ke(k,g.adler>>8&255),ke(k,g.adler>>16&255),ke(k,g.adler>>24&255),ke(k,g.total_in&255),ke(k,g.total_in>>8&255),ke(k,g.total_in>>16&255),ke(k,g.total_in>>24&255)):(dt(k,g.adler>>>16),dt(k,g.adler&65535)),ye(g),k.wrap>0&&(k.wrap=-k.wrap),k.pending!==0?u:f)}function ne(g){var K;return!g||!g.state?h:(K=g.state.status,K!==Ie&&K!==we&&K!==Te&&K!==He&&K!==Le&&K!==j&&K!==q?ee(g,h):(g.state=null,K===j?ee(g,d):u))}function _e(g,K){var J=K.length,k,H,W,Se,ge,be,Ge,gn;if(!g||!g.state||(k=g.state,Se=k.wrap,Se===2||Se===1&&k.status!==Ie||k.lookahead))return h;for(Se===1&&(g.adler=n(g.adler,K,J,0)),k.wrap=0,J>=k.w_size&&(Se===0&&(De(k.head),k.strstart=0,k.block_start=0,k.insert=0),gn=new t.Buf8(k.w_size),t.arraySet(gn,K,J-k.w_size,k.w_size,0),K=gn,J=k.w_size),ge=g.avail_in,be=g.next_in,Ge=g.input,g.avail_in=J,g.next_in=0,g.input=K,$e(k);k.lookahead>=le;){H=k.strstart,W=k.lookahead-(le-1);do k.ins_h=(k.ins_h<<k.hash_shift^k.window[H+le-1])&k.hash_mask,k.prev[H&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=H,H++;while(--W);k.strstart=H,k.lookahead=le-1,$e(k)}return k.strstart+=k.lookahead,k.block_start=k.strstart,k.insert=k.lookahead,k.lookahead=0,k.match_length=k.prev_length=le-1,k.match_available=0,g.next_in=be,g.input=Ge,g.avail_in=ge,k.wrap=Se,u}return Sn.deflateInit=Y,Sn.deflateInit2=G,Sn.deflateReset=V,Sn.deflateResetKeep=z,Sn.deflateSetHeader=se,Sn.deflate=T,Sn.deflateEnd=ne,Sn.deflateSetDictionary=_e,Sn.deflateInfo="pako deflate (from Nodeca project)",Sn}var yi={},O2;function z2(){if(O2)return yi;O2=1;var t=Mr(),e=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{e=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var r=new t.Buf8(256),o=0;o<256;o++)r[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;r[254]=r[254]=1,yi.string2buf=function(s){var a,c,l,u,f,h=s.length,d=0;for(u=0;u<h;u++)c=s.charCodeAt(u),(c&64512)===55296&&u+1<h&&(l=s.charCodeAt(u+1),(l&64512)===56320&&(c=65536+(c-55296<<10)+(l-56320),u++)),d+=c<128?1:c<2048?2:c<65536?3:4;for(a=new t.Buf8(d),f=0,u=0;f<d;u++)c=s.charCodeAt(u),(c&64512)===55296&&u+1<h&&(l=s.charCodeAt(u+1),(l&64512)===56320&&(c=65536+(c-55296<<10)+(l-56320),u++)),c<128?a[f++]=c:c<2048?(a[f++]=192|c>>>6,a[f++]=128|c&63):c<65536?(a[f++]=224|c>>>12,a[f++]=128|c>>>6&63,a[f++]=128|c&63):(a[f++]=240|c>>>18,a[f++]=128|c>>>12&63,a[f++]=128|c>>>6&63,a[f++]=128|c&63);return a};function i(s,a){if(a<65534&&(s.subarray&&n||!s.subarray&&e))return String.fromCharCode.apply(null,t.shrinkBuf(s,a));for(var c="",l=0;l<a;l++)c+=String.fromCharCode(s[l]);return c}return yi.buf2binstring=function(s){return i(s,s.length)},yi.binstring2buf=function(s){for(var a=new t.Buf8(s.length),c=0,l=a.length;c<l;c++)a[c]=s.charCodeAt(c);return a},yi.buf2string=function(s,a){var c,l,u,f,h=a||s.length,d=new Array(h*2);for(l=0,c=0;c<h;){if(u=s[c++],u<128){d[l++]=u;continue}if(f=r[u],f>4){d[l++]=65533,c+=f-1;continue}for(u&=f===2?31:f===3?15:7;f>1&&c<h;)u=u<<6|s[c++]&63,f--;if(f>1){d[l++]=65533;continue}u<65536?d[l++]=u:(u-=65536,d[l++]=55296|u>>10&1023,d[l++]=56320|u&1023)}return i(d,l)},yi.utf8border=function(s,a){var c;for(a=a||s.length,a>s.length&&(a=s.length),c=a-1;c>=0&&(s[c]&192)===128;)c--;return c<0||c===0?a:c+r[s[c]]>a?c:a},yi}var jh,U2;function G2(){if(U2)return jh;U2=1;function t(){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}return jh=t,jh}var H2;function tk(){if(H2)return co;H2=1;var t=ek(),e=Mr(),n=z2(),r=qh(),o=G2(),i=Object.prototype.toString,s=0,a=4,c=0,l=1,u=2,f=-1,h=0,d=8;function p(A){if(!(this instanceof p))return new p(A);this.options=e.assign({level:f,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},A||{});var C=this.options;C.raw&&C.windowBits>0?C.windowBits=-C.windowBits:C.gzip&&C.windowBits>0&&C.windowBits<16&&(C.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var E=t.deflateInit2(this.strm,C.level,C.method,C.windowBits,C.memLevel,C.strategy);if(E!==c)throw new Error(r[E]);if(C.header&&t.deflateSetHeader(this.strm,C.header),C.dictionary){var I;if(typeof C.dictionary=="string"?I=n.string2buf(C.dictionary):i.call(C.dictionary)==="[object ArrayBuffer]"?I=new Uint8Array(C.dictionary):I=C.dictionary,E=t.deflateSetDictionary(this.strm,I),E!==c)throw new Error(r[E]);this._dict_set=!0}}p.prototype.push=function(A,C){var E=this.strm,I=this.options.chunkSize,R,B;if(this.ended)return!1;B=C===~~C?C:C===!0?a:s,typeof A=="string"?E.input=n.string2buf(A):i.call(A)==="[object ArrayBuffer]"?E.input=new Uint8Array(A):E.input=A,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new e.Buf8(I),E.next_out=0,E.avail_out=I),R=t.deflate(E,B),R!==l&&R!==c)return this.onEnd(R),this.ended=!0,!1;(E.avail_out===0||E.avail_in===0&&(B===a||B===u))&&(this.options.to==="string"?this.onData(n.buf2binstring(e.shrinkBuf(E.output,E.next_out))):this.onData(e.shrinkBuf(E.output,E.next_out)))}while((E.avail_in>0||E.avail_out===0)&&R!==l);return B===a?(R=t.deflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===c):(B===u&&(this.onEnd(c),E.avail_out=0),!0)},p.prototype.onData=function(A){this.chunks.push(A)},p.prototype.onEnd=function(A){A===c&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};function y(A,C){var E=new p(C);if(E.push(A,!0),E.err)throw E.msg||r[E.err];return E.result}function v(A,C){return C=C||{},C.raw=!0,y(A,C)}function b(A,C){return C=C||{},C.gzip=!0,y(A,C)}return co.Deflate=p,co.deflate=y,co.deflateRaw=v,co.gzip=b,co}var lo={},un={},Wh,V2;function nk(){if(V2)return Wh;V2=1;var t=30,e=12;return Wh=function(r,o){var i,s,a,c,l,u,f,h,d,p,y,v,b,A,C,E,I,R,B,O,F,P,S,Q,Z;i=r.state,s=r.next_in,Q=r.input,a=s+(r.avail_in-5),c=r.next_out,Z=r.output,l=c-(o-r.avail_out),u=c+(r.avail_out-257),f=i.dmax,h=i.wsize,d=i.whave,p=i.wnext,y=i.window,v=i.hold,b=i.bits,A=i.lencode,C=i.distcode,E=(1<<i.lenbits)-1,I=(1<<i.distbits)-1;e:do{b<15&&(v+=Q[s++]<<b,b+=8,v+=Q[s++]<<b,b+=8),R=A[v&E];t:for(;;){if(B=R>>>24,v>>>=B,b-=B,B=R>>>16&255,B===0)Z[c++]=R&65535;else if(B&16){O=R&65535,B&=15,B&&(b<B&&(v+=Q[s++]<<b,b+=8),O+=v&(1<<B)-1,v>>>=B,b-=B),b<15&&(v+=Q[s++]<<b,b+=8,v+=Q[s++]<<b,b+=8),R=C[v&I];n:for(;;){if(B=R>>>24,v>>>=B,b-=B,B=R>>>16&255,B&16){if(F=R&65535,B&=15,b<B&&(v+=Q[s++]<<b,b+=8,b<B&&(v+=Q[s++]<<b,b+=8)),F+=v&(1<<B)-1,F>f){r.msg="invalid distance too far back",i.mode=t;break e}if(v>>>=B,b-=B,B=c-l,F>B){if(B=F-B,B>d&&i.sane){r.msg="invalid distance too far back",i.mode=t;break e}if(P=0,S=y,p===0){if(P+=h-B,B<O){O-=B;do Z[c++]=y[P++];while(--B);P=c-F,S=Z}}else if(p<B){if(P+=h+p-B,B-=p,B<O){O-=B;do Z[c++]=y[P++];while(--B);if(P=0,p<O){B=p,O-=B;do Z[c++]=y[P++];while(--B);P=c-F,S=Z}}}else if(P+=p-B,B<O){O-=B;do Z[c++]=y[P++];while(--B);P=c-F,S=Z}for(;O>2;)Z[c++]=S[P++],Z[c++]=S[P++],Z[c++]=S[P++],O-=3;O&&(Z[c++]=S[P++],O>1&&(Z[c++]=S[P++]))}else{P=c-F;do Z[c++]=Z[P++],Z[c++]=Z[P++],Z[c++]=Z[P++],O-=3;while(O>2);O&&(Z[c++]=Z[P++],O>1&&(Z[c++]=Z[P++]))}}else if(B&64){r.msg="invalid distance code",i.mode=t;break e}else{R=C[(R&65535)+(v&(1<<B)-1)];continue n}break}}else if(B&64)if(B&32){i.mode=e;break e}else{r.msg="invalid literal/length code",i.mode=t;break e}else{R=A[(R&65535)+(v&(1<<B)-1)];continue t}break}}while(s<a&&c<u);O=b>>3,s-=O,b-=O<<3,v&=(1<<b)-1,r.next_in=s,r.next_out=c,r.avail_in=s<a?5+(a-s):5-(s-a),r.avail_out=c<u?257+(u-c):257-(c-u),i.hold=v,i.bits=b},Wh}var Qh,q2;function rk(){if(q2)return Qh;q2=1;var t=Mr(),e=15,n=852,r=592,o=0,i=1,s=2,a=[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],c=[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],l=[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],u=[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];return Qh=function(h,d,p,y,v,b,A,C){var E=C.bits,I=0,R=0,B=0,O=0,F=0,P=0,S=0,Q=0,Z=0,ae=0,ce,fe,le,Ee,pe,Ce=null,Ie=0,we,Te=new t.Buf16(e+1),He=new t.Buf16(e+1),Le=null,j=0,q,re,$;for(I=0;I<=e;I++)Te[I]=0;for(R=0;R<y;R++)Te[d[p+R]]++;for(F=E,O=e;O>=1&&Te[O]===0;O--);if(F>O&&(F=O),O===0)return v[b++]=1<<24|64<<16|0,v[b++]=1<<24|64<<16|0,C.bits=1,0;for(B=1;B<O&&Te[B]===0;B++);for(F<B&&(F=B),Q=1,I=1;I<=e;I++)if(Q<<=1,Q-=Te[I],Q<0)return-1;if(Q>0&&(h===o||O!==1))return-1;for(He[1]=0,I=1;I<e;I++)He[I+1]=He[I]+Te[I];for(R=0;R<y;R++)d[p+R]!==0&&(A[He[d[p+R]]++]=R);if(h===o?(Ce=Le=A,we=19):h===i?(Ce=a,Ie-=257,Le=c,j-=257,we=256):(Ce=l,Le=u,we=-1),ae=0,R=0,I=B,pe=b,P=F,S=0,le=-1,Z=1<<F,Ee=Z-1,h===i&&Z>n||h===s&&Z>r)return 1;for(;;){q=I-S,A[R]<we?(re=0,$=A[R]):A[R]>we?(re=Le[j+A[R]],$=Ce[Ie+A[R]]):(re=96,$=0),ce=1<<I-S,fe=1<<P,B=fe;do fe-=ce,v[pe+(ae>>S)+fe]=q<<24|re<<16|$|0;while(fe!==0);for(ce=1<<I-1;ae&ce;)ce>>=1;if(ce!==0?(ae&=ce-1,ae+=ce):ae=0,R++,--Te[I]===0){if(I===O)break;I=d[p+A[R]]}if(I>F&&(ae&Ee)!==le){for(S===0&&(S=F),pe+=B,P=I-S,Q=1<<P;P+S<O&&(Q-=Te[P+S],!(Q<=0));)P++,Q<<=1;if(Z+=1<<P,h===i&&Z>n||h===s&&Z>r)return 1;le=ae&Ee,v[le]=F<<24|P<<16|pe-b|0}}return ae!==0&&(v[pe+ae]=I-S<<24|64<<16|0),C.bits=F,0},Qh}var j2;function ik(){if(j2)return un;j2=1;var t=Mr(),e=F2(),n=P2(),r=nk(),o=rk(),i=0,s=1,a=2,c=4,l=5,u=6,f=0,h=1,d=2,p=-2,y=-3,v=-4,b=-5,A=8,C=1,E=2,I=3,R=4,B=5,O=6,F=7,P=8,S=9,Q=10,Z=11,ae=12,ce=13,fe=14,le=15,Ee=16,pe=17,Ce=18,Ie=19,we=20,Te=21,He=22,Le=23,j=24,q=25,re=26,$=27,ue=28,L=29,D=30,ee=31,oe=32,De=852,ye=592,xe=15,ke=xe;function dt(G){return(G>>>24&255)+(G>>>8&65280)+((G&65280)<<8)+((G&255)<<24)}function Xt(){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 t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function It(G){var Y;return!G||!G.state?p:(Y=G.state,G.total_in=G.total_out=Y.total=0,G.msg="",Y.wrap&&(G.adler=Y.wrap&1),Y.mode=C,Y.last=0,Y.havedict=0,Y.dmax=32768,Y.head=null,Y.hold=0,Y.bits=0,Y.lencode=Y.lendyn=new t.Buf32(De),Y.distcode=Y.distdyn=new t.Buf32(ye),Y.sane=1,Y.back=-1,f)}function $e(G){var Y;return!G||!G.state?p:(Y=G.state,Y.wsize=0,Y.whave=0,Y.wnext=0,It(G))}function kt(G,Y){var T,ne;return!G||!G.state||(ne=G.state,Y<0?(T=0,Y=-Y):(T=(Y>>4)+1,Y<48&&(Y&=15)),Y&&(Y<8||Y>15))?p:(ne.window!==null&&ne.wbits!==Y&&(ne.window=null),ne.wrap=T,ne.wbits=Y,$e(G))}function Ot(G,Y){var T,ne;return G?(ne=new Xt,G.state=ne,ne.window=null,T=kt(G,Y),T!==f&&(G.state=null),T):p}function et(G){return Ot(G,ke)}var zt=!0,_,m;function w(G){if(zt){var Y;for(_=new t.Buf32(512),m=new t.Buf32(32),Y=0;Y<144;)G.lens[Y++]=8;for(;Y<256;)G.lens[Y++]=9;for(;Y<280;)G.lens[Y++]=7;for(;Y<288;)G.lens[Y++]=8;for(o(s,G.lens,0,288,_,0,G.work,{bits:9}),Y=0;Y<32;)G.lens[Y++]=5;o(a,G.lens,0,32,m,0,G.work,{bits:5}),zt=!1}G.lencode=_,G.lenbits=9,G.distcode=m,G.distbits=5}function N(G,Y,T,ne){var _e,g=G.state;return g.window===null&&(g.wsize=1<<g.wbits,g.wnext=0,g.whave=0,g.window=new t.Buf8(g.wsize)),ne>=g.wsize?(t.arraySet(g.window,Y,T-g.wsize,g.wsize,0),g.wnext=0,g.whave=g.wsize):(_e=g.wsize-g.wnext,_e>ne&&(_e=ne),t.arraySet(g.window,Y,T-ne,_e,g.wnext),ne-=_e,ne?(t.arraySet(g.window,Y,T-ne,ne,0),g.wnext=ne,g.whave=g.wsize):(g.wnext+=_e,g.wnext===g.wsize&&(g.wnext=0),g.whave<g.wsize&&(g.whave+=_e))),0}function x(G,Y){var T,ne,_e,g,K,J,k,H,W,Se,ge,be,Ge,gn,U=0,Me,lt,tt,Tt,Be,sr,ft,ze,ht=new t.Buf8(4),In,rn,Ua=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!G||!G.state||!G.output||!G.input&&G.avail_in!==0)return p;T=G.state,T.mode===ae&&(T.mode=ce),K=G.next_out,_e=G.output,k=G.avail_out,g=G.next_in,ne=G.input,J=G.avail_in,H=T.hold,W=T.bits,Se=J,ge=k,ze=f;e:for(;;)switch(T.mode){case C:if(T.wrap===0){T.mode=ce;break}for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(T.wrap&2&&H===35615){T.check=0,ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0),H=0,W=0,T.mode=E;break}if(T.flags=0,T.head&&(T.head.done=!1),!(T.wrap&1)||(((H&255)<<8)+(H>>8))%31){G.msg="incorrect header check",T.mode=D;break}if((H&15)!==A){G.msg="unknown compression method",T.mode=D;break}if(H>>>=4,W-=4,ft=(H&15)+8,T.wbits===0)T.wbits=ft;else if(ft>T.wbits){G.msg="invalid window size",T.mode=D;break}T.dmax=1<<ft,G.adler=T.check=1,T.mode=H&512?Q:ae,H=0,W=0;break;case E:for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(T.flags=H,(T.flags&255)!==A){G.msg="unknown compression method",T.mode=D;break}if(T.flags&57344){G.msg="unknown header flags set",T.mode=D;break}T.head&&(T.head.text=H>>8&1),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,W=0,T.mode=I;case I:for(;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.head&&(T.head.time=H),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,ht[2]=H>>>16&255,ht[3]=H>>>24&255,T.check=n(T.check,ht,4,0)),H=0,W=0,T.mode=R;case R:for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.head&&(T.head.xflags=H&255,T.head.os=H>>8),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,W=0,T.mode=B;case B:if(T.flags&1024){for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.length=H,T.head&&(T.head.extra_len=H),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,W=0}else T.head&&(T.head.extra=null);T.mode=O;case O:if(T.flags&1024&&(be=T.length,be>J&&(be=J),be&&(T.head&&(ft=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),t.arraySet(T.head.extra,ne,g,be,ft)),T.flags&512&&(T.check=n(T.check,ne,be,g)),J-=be,g+=be,T.length-=be),T.length))break e;T.length=0,T.mode=F;case F:if(T.flags&2048){if(J===0)break e;be=0;do ft=ne[g+be++],T.head&&ft&&T.length<65536&&(T.head.name+=String.fromCharCode(ft));while(ft&&be<J);if(T.flags&512&&(T.check=n(T.check,ne,be,g)),J-=be,g+=be,ft)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=P;case P:if(T.flags&4096){if(J===0)break e;be=0;do ft=ne[g+be++],T.head&&ft&&T.length<65536&&(T.head.comment+=String.fromCharCode(ft));while(ft&&be<J);if(T.flags&512&&(T.check=n(T.check,ne,be,g)),J-=be,g+=be,ft)break e}else T.head&&(T.head.comment=null);T.mode=S;case S:if(T.flags&512){for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(H!==(T.check&65535)){G.msg="header crc mismatch",T.mode=D;break}H=0,W=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),G.adler=T.check=0,T.mode=ae;break;case Q:for(;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}G.adler=T.check=dt(H),H=0,W=0,T.mode=Z;case Z:if(T.havedict===0)return G.next_out=K,G.avail_out=k,G.next_in=g,G.avail_in=J,T.hold=H,T.bits=W,d;G.adler=T.check=1,T.mode=ae;case ae:if(Y===l||Y===u)break e;case ce:if(T.last){H>>>=W&7,W-=W&7,T.mode=$;break}for(;W<3;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}switch(T.last=H&1,H>>>=1,W-=1,H&3){case 0:T.mode=fe;break;case 1:if(w(T),T.mode=we,Y===u){H>>>=2,W-=2;break e}break;case 2:T.mode=pe;break;case 3:G.msg="invalid block type",T.mode=D}H>>>=2,W-=2;break;case fe:for(H>>>=W&7,W-=W&7;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if((H&65535)!==(H>>>16^65535)){G.msg="invalid stored block lengths",T.mode=D;break}if(T.length=H&65535,H=0,W=0,T.mode=le,Y===u)break e;case le:T.mode=Ee;case Ee:if(be=T.length,be){if(be>J&&(be=J),be>k&&(be=k),be===0)break e;t.arraySet(_e,ne,g,be,K),J-=be,g+=be,k-=be,K+=be,T.length-=be;break}T.mode=ae;break;case pe:for(;W<14;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(T.nlen=(H&31)+257,H>>>=5,W-=5,T.ndist=(H&31)+1,H>>>=5,W-=5,T.ncode=(H&15)+4,H>>>=4,W-=4,T.nlen>286||T.ndist>30){G.msg="too many length or distance symbols",T.mode=D;break}T.have=0,T.mode=Ce;case Ce:for(;T.have<T.ncode;){for(;W<3;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.lens[Ua[T.have++]]=H&7,H>>>=3,W-=3}for(;T.have<19;)T.lens[Ua[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,In={bits:T.lenbits},ze=o(i,T.lens,0,19,T.lencode,0,T.work,In),T.lenbits=In.bits,ze){G.msg="invalid code lengths set",T.mode=D;break}T.have=0,T.mode=Ie;case Ie:for(;T.have<T.nlen+T.ndist;){for(;U=T.lencode[H&(1<<T.lenbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(tt<16)H>>>=Me,W-=Me,T.lens[T.have++]=tt;else{if(tt===16){for(rn=Me+2;W<rn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(H>>>=Me,W-=Me,T.have===0){G.msg="invalid bit length repeat",T.mode=D;break}ft=T.lens[T.have-1],be=3+(H&3),H>>>=2,W-=2}else if(tt===17){for(rn=Me+3;W<rn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=Me,W-=Me,ft=0,be=3+(H&7),H>>>=3,W-=3}else{for(rn=Me+7;W<rn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=Me,W-=Me,ft=0,be=11+(H&127),H>>>=7,W-=7}if(T.have+be>T.nlen+T.ndist){G.msg="invalid bit length repeat",T.mode=D;break}for(;be--;)T.lens[T.have++]=ft}}if(T.mode===D)break;if(T.lens[256]===0){G.msg="invalid code -- missing end-of-block",T.mode=D;break}if(T.lenbits=9,In={bits:T.lenbits},ze=o(s,T.lens,0,T.nlen,T.lencode,0,T.work,In),T.lenbits=In.bits,ze){G.msg="invalid literal/lengths set",T.mode=D;break}if(T.distbits=6,T.distcode=T.distdyn,In={bits:T.distbits},ze=o(a,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,In),T.distbits=In.bits,ze){G.msg="invalid distances set",T.mode=D;break}if(T.mode=we,Y===u)break e;case we:T.mode=Te;case Te:if(J>=6&&k>=258){G.next_out=K,G.avail_out=k,G.next_in=g,G.avail_in=J,T.hold=H,T.bits=W,r(G,ge),K=G.next_out,_e=G.output,k=G.avail_out,g=G.next_in,ne=G.input,J=G.avail_in,H=T.hold,W=T.bits,T.mode===ae&&(T.back=-1);break}for(T.back=0;U=T.lencode[H&(1<<T.lenbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(lt&&!(lt&240)){for(Tt=Me,Be=lt,sr=tt;U=T.lencode[sr+((H&(1<<Tt+Be)-1)>>Tt)],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Tt+Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=Tt,W-=Tt,T.back+=Tt}if(H>>>=Me,W-=Me,T.back+=Me,T.length=tt,lt===0){T.mode=re;break}if(lt&32){T.back=-1,T.mode=ae;break}if(lt&64){G.msg="invalid literal/length code",T.mode=D;break}T.extra=lt&15,T.mode=He;case He:if(T.extra){for(rn=T.extra;W<rn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.length+=H&(1<<T.extra)-1,H>>>=T.extra,W-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=Le;case Le:for(;U=T.distcode[H&(1<<T.distbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(!(lt&240)){for(Tt=Me,Be=lt,sr=tt;U=T.distcode[sr+((H&(1<<Tt+Be)-1)>>Tt)],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Tt+Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=Tt,W-=Tt,T.back+=Tt}if(H>>>=Me,W-=Me,T.back+=Me,lt&64){G.msg="invalid distance code",T.mode=D;break}T.offset=tt,T.extra=lt&15,T.mode=j;case j:if(T.extra){for(rn=T.extra;W<rn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.offset+=H&(1<<T.extra)-1,H>>>=T.extra,W-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){G.msg="invalid distance too far back",T.mode=D;break}T.mode=q;case q:if(k===0)break e;if(be=ge-k,T.offset>be){if(be=T.offset-be,be>T.whave&&T.sane){G.msg="invalid distance too far back",T.mode=D;break}be>T.wnext?(be-=T.wnext,Ge=T.wsize-be):Ge=T.wnext-be,be>T.length&&(be=T.length),gn=T.window}else gn=_e,Ge=K-T.offset,be=T.length;be>k&&(be=k),k-=be,T.length-=be;do _e[K++]=gn[Ge++];while(--be);T.length===0&&(T.mode=Te);break;case re:if(k===0)break e;_e[K++]=T.length,k--,T.mode=Te;break;case $:if(T.wrap){for(;W<32;){if(J===0)break e;J--,H|=ne[g++]<<W,W+=8}if(ge-=k,G.total_out+=ge,T.total+=ge,ge&&(G.adler=T.check=T.flags?n(T.check,_e,ge,K-ge):e(T.check,_e,ge,K-ge)),ge=k,(T.flags?H:dt(H))!==T.check){G.msg="incorrect data check",T.mode=D;break}H=0,W=0}T.mode=ue;case ue:if(T.wrap&&T.flags){for(;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(H!==(T.total&4294967295)){G.msg="incorrect length check",T.mode=D;break}H=0,W=0}T.mode=L;case L:ze=h;break e;case D:ze=y;break e;case ee:return v;case oe:default:return p}return G.next_out=K,G.avail_out=k,G.next_in=g,G.avail_in=J,T.hold=H,T.bits=W,(T.wsize||ge!==G.avail_out&&T.mode<D&&(T.mode<$||Y!==c))&&N(G,G.output,G.next_out,ge-G.avail_out),Se-=G.avail_in,ge-=G.avail_out,G.total_in+=Se,G.total_out+=ge,T.total+=ge,T.wrap&&ge&&(G.adler=T.check=T.flags?n(T.check,_e,ge,G.next_out-ge):e(T.check,_e,ge,G.next_out-ge)),G.data_type=T.bits+(T.last?64:0)+(T.mode===ae?128:0)+(T.mode===we||T.mode===le?256:0),(Se===0&&ge===0||Y===c)&&ze===f&&(ze=b),ze}function z(G){if(!G||!G.state)return p;var Y=G.state;return Y.window&&(Y.window=null),G.state=null,f}function V(G,Y){var T;return!G||!G.state||(T=G.state,!(T.wrap&2))?p:(T.head=Y,Y.done=!1,f)}function se(G,Y){var T=Y.length,ne,_e,g;return!G||!G.state||(ne=G.state,ne.wrap!==0&&ne.mode!==Z)?p:ne.mode===Z&&(_e=1,_e=e(_e,Y,T,0),_e!==ne.check)?y:(g=N(G,Y,T,T),g?(ne.mode=ee,v):(ne.havedict=1,f))}return un.inflateReset=$e,un.inflateReset2=kt,un.inflateResetKeep=It,un.inflateInit=et,un.inflateInit2=Ot,un.inflate=x,un.inflateEnd=z,un.inflateGetHeader=V,un.inflateSetDictionary=se,un.inflateInfo="pako inflate (from Nodeca project)",un}var Yh,W2;function Q2(){return W2||(W2=1,Yh={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}),Yh}var Zh,Y2;function ok(){if(Y2)return Zh;Y2=1;function t(){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}return Zh=t,Zh}var Z2;function sk(){if(Z2)return lo;Z2=1;var t=ik(),e=Mr(),n=z2(),r=Q2(),o=qh(),i=G2(),s=ok(),a=Object.prototype.toString;function c(f){if(!(this instanceof c))return new c(f);this.options=e.assign({chunkSize:16384,windowBits:0,to:""},f||{});var h=this.options;h.raw&&h.windowBits>=0&&h.windowBits<16&&(h.windowBits=-h.windowBits,h.windowBits===0&&(h.windowBits=-15)),h.windowBits>=0&&h.windowBits<16&&!(f&&f.windowBits)&&(h.windowBits+=32),h.windowBits>15&&h.windowBits<48&&(h.windowBits&15||(h.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var d=t.inflateInit2(this.strm,h.windowBits);if(d!==r.Z_OK)throw new Error(o[d]);if(this.header=new s,t.inflateGetHeader(this.strm,this.header),h.dictionary&&(typeof h.dictionary=="string"?h.dictionary=n.string2buf(h.dictionary):a.call(h.dictionary)==="[object ArrayBuffer]"&&(h.dictionary=new Uint8Array(h.dictionary)),h.raw&&(d=t.inflateSetDictionary(this.strm,h.dictionary),d!==r.Z_OK)))throw new Error(o[d])}c.prototype.push=function(f,h){var d=this.strm,p=this.options.chunkSize,y=this.options.dictionary,v,b,A,C,E,I=!1;if(this.ended)return!1;b=h===~~h?h:h===!0?r.Z_FINISH:r.Z_NO_FLUSH,typeof f=="string"?d.input=n.binstring2buf(f):a.call(f)==="[object ArrayBuffer]"?d.input=new Uint8Array(f):d.input=f,d.next_in=0,d.avail_in=d.input.length;do{if(d.avail_out===0&&(d.output=new e.Buf8(p),d.next_out=0,d.avail_out=p),v=t.inflate(d,r.Z_NO_FLUSH),v===r.Z_NEED_DICT&&y&&(v=t.inflateSetDictionary(this.strm,y)),v===r.Z_BUF_ERROR&&I===!0&&(v=r.Z_OK,I=!1),v!==r.Z_STREAM_END&&v!==r.Z_OK)return this.onEnd(v),this.ended=!0,!1;d.next_out&&(d.avail_out===0||v===r.Z_STREAM_END||d.avail_in===0&&(b===r.Z_FINISH||b===r.Z_SYNC_FLUSH))&&(this.options.to==="string"?(A=n.utf8border(d.output,d.next_out),C=d.next_out-A,E=n.buf2string(d.output,A),d.next_out=C,d.avail_out=p-C,C&&e.arraySet(d.output,d.output,A,C,0),this.onData(E)):this.onData(e.shrinkBuf(d.output,d.next_out))),d.avail_in===0&&d.avail_out===0&&(I=!0)}while((d.avail_in>0||d.avail_out===0)&&v!==r.Z_STREAM_END);return v===r.Z_STREAM_END&&(b=r.Z_FINISH),b===r.Z_FINISH?(v=t.inflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===r.Z_OK):(b===r.Z_SYNC_FLUSH&&(this.onEnd(r.Z_OK),d.avail_out=0),!0)},c.prototype.onData=function(f){this.chunks.push(f)},c.prototype.onEnd=function(f){f===r.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg};function l(f,h){var d=new c(h);if(d.push(f,!0),d.err)throw d.msg||o[d.err];return d.result}function u(f,h){return h=h||{},h.raw=!0,l(f,h)}return lo.Inflate=c,lo.inflate=l,lo.inflateRaw=u,lo.ungzip=l,lo}var Xh,X2;function ak(){if(X2)return Xh;X2=1;var t=Mr().assign,e=tk(),n=sk(),r=Q2(),o={};return t(o,e,n,r),Xh=o,Xh}var Sl=ak();async function Pr(t){try{let e,n=0,r=0;const o=[];let i=0,s;do{const c=t.subarray(n);if(s=new Sl.Inflate,{strm:e}=s,s.push(c,Sl.Z_SYNC_FLUSH),s.err)throw new Error(s.msg);n+=e.next_in,o[r]=s.result,i+=o[r].length,r+=1}while(e.avail_in);const a=new Uint8Array(i);for(let c=0,l=0;c<o.length;c++)a.set(o[c],l),l+=o[c].length;return Ke.Buffer.from(a)}catch(e){throw/incorrect header check/.exec(`${e}`)?new Error("problem decompressing block: incorrect gzip header check"):e}}async function K2(t,e){try{let n;const{minv:r,maxv:o}=e;let i=r.blockPosition,s=r.dataPosition;const a=[],c=[],l=[];let u=0,f=0;do{const p=t.subarray(i-r.blockPosition),y=new Sl.Inflate;if({strm:n}=y,y.push(p,Sl.Z_SYNC_FLUSH),y.err)throw new Error(y.msg);const v=y.result;a.push(v);let b=v.length;c.push(i),l.push(s),a.length===1&&r.dataPosition&&(a[0]=a[0].subarray(r.dataPosition),b=a[0].length);const A=i;if(i+=n.next_in,s+=b,A>=o.blockPosition){a[f]=a[f].subarray(0,o.blockPosition===r.blockPosition?o.dataPosition-r.dataPosition+1:o.dataPosition+1),c.push(i),l.push(s),u+=a[f].length;break}u+=a[f].length,f++}while(n.avail_in);const h=new Uint8Array(u);for(let p=0,y=0;p<a.length;p++)h.set(a[p],y),y+=a[p].length;return{buffer:Ke.Buffer.from(h),cpositions:c,dpositions:l}}catch(n){throw/incorrect header check/.exec(`${n}`)?new Error("problem decompressing block: incorrect gzip header check"):n}}var Kh,J2;function ck(){if(J2)return Kh;J2=1,Kh=e;var t=null;try{t=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 e(P,S,Q){this.low=P|0,this.high=S|0,this.unsigned=!!Q}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0});function n(P){return(P&&P.__isLong__)===!0}e.isLong=n;var r={},o={};function i(P,S){var Q,Z,ae;return S?(P>>>=0,(ae=0<=P&&P<256)&&(Z=o[P],Z)?Z:(Q=a(P,(P|0)<0?-1:0,!0),ae&&(o[P]=Q),Q)):(P|=0,(ae=-128<=P&&P<128)&&(Z=r[P],Z)?Z:(Q=a(P,P<0?-1:0,!1),ae&&(r[P]=Q),Q))}e.fromInt=i;function s(P,S){if(isNaN(P))return S?A:b;if(S){if(P<0)return A;if(P>=p)return B}else{if(P<=-9223372036854776e3)return O;if(P+1>=y)return R}return P<0?s(-P,S).neg():a(P%d|0,P/d|0,S)}e.fromNumber=s;function a(P,S,Q){return new e(P,S,Q)}e.fromBits=a;var c=Math.pow;function l(P,S,Q){if(P.length===0)throw Error("empty string");if(P==="NaN"||P==="Infinity"||P==="+Infinity"||P==="-Infinity")return b;if(typeof S=="number"?(Q=S,S=!1):S=!!S,Q=Q||10,Q<2||36<Q)throw RangeError("radix");var Z;if((Z=P.indexOf("-"))>0)throw Error("interior hyphen");if(Z===0)return l(P.substring(1),S,Q).neg();for(var ae=s(c(Q,8)),ce=b,fe=0;fe<P.length;fe+=8){var le=Math.min(8,P.length-fe),Ee=parseInt(P.substring(fe,fe+le),Q);if(le<8){var pe=s(c(Q,le));ce=ce.mul(pe).add(s(Ee))}else ce=ce.mul(ae),ce=ce.add(s(Ee))}return ce.unsigned=S,ce}e.fromString=l;function u(P,S){return typeof P=="number"?s(P,S):typeof P=="string"?l(P,S):a(P.low,P.high,typeof S=="boolean"?S:P.unsigned)}e.fromValue=u;var f=65536,h=1<<24,d=f*f,p=d*d,y=p/2,v=i(h),b=i(0);e.ZERO=b;var A=i(0,!0);e.UZERO=A;var C=i(1);e.ONE=C;var E=i(1,!0);e.UONE=E;var I=i(-1);e.NEG_ONE=I;var R=a(-1,2147483647,!1);e.MAX_VALUE=R;var B=a(-1,-1,!0);e.MAX_UNSIGNED_VALUE=B;var O=a(0,-2147483648,!1);e.MIN_VALUE=O;var F=e.prototype;return F.toInt=function(){return this.unsigned?this.low>>>0:this.low},F.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},F.toString=function(S){if(S=S||10,S<2||36<S)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(O)){var Q=s(S),Z=this.div(Q),ae=Z.mul(Q).sub(this);return Z.toString(S)+ae.toInt().toString(S)}else return"-"+this.neg().toString(S);for(var ce=s(c(S,6),this.unsigned),fe=this,le="";;){var Ee=fe.div(ce),pe=fe.sub(Ee.mul(ce)).toInt()>>>0,Ce=pe.toString(S);if(fe=Ee,fe.isZero())return Ce+le;for(;Ce.length<6;)Ce="0"+Ce;le=""+Ce+le}},F.getHighBits=function(){return this.high},F.getHighBitsUnsigned=function(){return this.high>>>0},F.getLowBits=function(){return this.low},F.getLowBitsUnsigned=function(){return this.low>>>0},F.getNumBitsAbs=function(){if(this.isNegative())return this.eq(O)?64:this.neg().getNumBitsAbs();for(var S=this.high!=0?this.high:this.low,Q=31;Q>0&&!(S&1<<Q);Q--);return this.high!=0?Q+33:Q+1},F.isZero=function(){return this.high===0&&this.low===0},F.eqz=F.isZero,F.isNegative=function(){return!this.unsigned&&this.high<0},F.isPositive=function(){return this.unsigned||this.high>=0},F.isOdd=function(){return(this.low&1)===1},F.isEven=function(){return(this.low&1)===0},F.equals=function(S){return n(S)||(S=u(S)),this.unsigned!==S.unsigned&&this.high>>>31===1&&S.high>>>31===1?!1:this.high===S.high&&this.low===S.low},F.eq=F.equals,F.notEquals=function(S){return!this.eq(S)},F.neq=F.notEquals,F.ne=F.notEquals,F.lessThan=function(S){return this.comp(S)<0},F.lt=F.lessThan,F.lessThanOrEqual=function(S){return this.comp(S)<=0},F.lte=F.lessThanOrEqual,F.le=F.lessThanOrEqual,F.greaterThan=function(S){return this.comp(S)>0},F.gt=F.greaterThan,F.greaterThanOrEqual=function(S){return this.comp(S)>=0},F.gte=F.greaterThanOrEqual,F.ge=F.greaterThanOrEqual,F.compare=function(S){if(n(S)||(S=u(S)),this.eq(S))return 0;var Q=this.isNegative(),Z=S.isNegative();return Q&&!Z?-1:!Q&&Z?1:this.unsigned?S.high>>>0>this.high>>>0||S.high===this.high&&S.low>>>0>this.low>>>0?-1:1:this.sub(S).isNegative()?-1:1},F.comp=F.compare,F.negate=function(){return!this.unsigned&&this.eq(O)?O:this.not().add(C)},F.neg=F.negate,F.add=function(S){n(S)||(S=u(S));var Q=this.high>>>16,Z=this.high&65535,ae=this.low>>>16,ce=this.low&65535,fe=S.high>>>16,le=S.high&65535,Ee=S.low>>>16,pe=S.low&65535,Ce=0,Ie=0,we=0,Te=0;return Te+=ce+pe,we+=Te>>>16,Te&=65535,we+=ae+Ee,Ie+=we>>>16,we&=65535,Ie+=Z+le,Ce+=Ie>>>16,Ie&=65535,Ce+=Q+fe,Ce&=65535,a(we<<16|Te,Ce<<16|Ie,this.unsigned)},F.subtract=function(S){return n(S)||(S=u(S)),this.add(S.neg())},F.sub=F.subtract,F.multiply=function(S){if(this.isZero())return b;if(n(S)||(S=u(S)),t){var Q=t.mul(this.low,this.high,S.low,S.high);return a(Q,t.get_high(),this.unsigned)}if(S.isZero())return b;if(this.eq(O))return S.isOdd()?O:b;if(S.eq(O))return this.isOdd()?O:b;if(this.isNegative())return S.isNegative()?this.neg().mul(S.neg()):this.neg().mul(S).neg();if(S.isNegative())return this.mul(S.neg()).neg();if(this.lt(v)&&S.lt(v))return s(this.toNumber()*S.toNumber(),this.unsigned);var Z=this.high>>>16,ae=this.high&65535,ce=this.low>>>16,fe=this.low&65535,le=S.high>>>16,Ee=S.high&65535,pe=S.low>>>16,Ce=S.low&65535,Ie=0,we=0,Te=0,He=0;return He+=fe*Ce,Te+=He>>>16,He&=65535,Te+=ce*Ce,we+=Te>>>16,Te&=65535,Te+=fe*pe,we+=Te>>>16,Te&=65535,we+=ae*Ce,Ie+=we>>>16,we&=65535,we+=ce*pe,Ie+=we>>>16,we&=65535,we+=fe*Ee,Ie+=we>>>16,we&=65535,Ie+=Z*Ce+ae*pe+ce*Ee+fe*le,Ie&=65535,a(Te<<16|He,Ie<<16|we,this.unsigned)},F.mul=F.multiply,F.divide=function(S){if(n(S)||(S=u(S)),S.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&S.low===-1&&S.high===-1)return this;var Q=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,S.low,S.high);return a(Q,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?A:b;var Z,ae,ce;if(this.unsigned){if(S.unsigned||(S=S.toUnsigned()),S.gt(this))return A;if(S.gt(this.shru(1)))return E;ce=A}else{if(this.eq(O)){if(S.eq(C)||S.eq(I))return O;if(S.eq(O))return C;var fe=this.shr(1);return Z=fe.div(S).shl(1),Z.eq(b)?S.isNegative()?C:I:(ae=this.sub(S.mul(Z)),ce=Z.add(ae.div(S)),ce)}else if(S.eq(O))return this.unsigned?A:b;if(this.isNegative())return S.isNegative()?this.neg().div(S.neg()):this.neg().div(S).neg();if(S.isNegative())return this.div(S.neg()).neg();ce=b}for(ae=this;ae.gte(S);){Z=Math.max(1,Math.floor(ae.toNumber()/S.toNumber()));for(var le=Math.ceil(Math.log(Z)/Math.LN2),Ee=le<=48?1:c(2,le-48),pe=s(Z),Ce=pe.mul(S);Ce.isNegative()||Ce.gt(ae);)Z-=Ee,pe=s(Z,this.unsigned),Ce=pe.mul(S);pe.isZero()&&(pe=C),ce=ce.add(pe),ae=ae.sub(Ce)}return ce},F.div=F.divide,F.modulo=function(S){if(n(S)||(S=u(S)),t){var Q=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,S.low,S.high);return a(Q,t.get_high(),this.unsigned)}return this.sub(this.div(S).mul(S))},F.mod=F.modulo,F.rem=F.modulo,F.not=function(){return a(~this.low,~this.high,this.unsigned)},F.and=function(S){return n(S)||(S=u(S)),a(this.low&S.low,this.high&S.high,this.unsigned)},F.or=function(S){return n(S)||(S=u(S)),a(this.low|S.low,this.high|S.high,this.unsigned)},F.xor=function(S){return n(S)||(S=u(S)),a(this.low^S.low,this.high^S.high,this.unsigned)},F.shiftLeft=function(S){return n(S)&&(S=S.toInt()),(S&=63)===0?this:S<32?a(this.low<<S,this.high<<S|this.low>>>32-S,this.unsigned):a(0,this.low<<S-32,this.unsigned)},F.shl=F.shiftLeft,F.shiftRight=function(S){return n(S)&&(S=S.toInt()),(S&=63)===0?this:S<32?a(this.low>>>S|this.high<<32-S,this.high>>S,this.unsigned):a(this.high>>S-32,this.high>=0?0:-1,this.unsigned)},F.shr=F.shiftRight,F.shiftRightUnsigned=function(S){if(n(S)&&(S=S.toInt()),S&=63,S===0)return this;var Q=this.high;if(S<32){var Z=this.low;return a(Z>>>S|Q<<32-S,Q>>>S,this.unsigned)}else return S===32?a(Q,0,this.unsigned):a(Q>>>S-32,0,this.unsigned)},F.shru=F.shiftRightUnsigned,F.shr_u=F.shiftRightUnsigned,F.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},F.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},F.toBytes=function(S){return S?this.toBytesLE():this.toBytesBE()},F.toBytesLE=function(){var S=this.high,Q=this.low;return[Q&255,Q>>>8&255,Q>>>16&255,Q>>>24,S&255,S>>>8&255,S>>>16&255,S>>>24]},F.toBytesBE=function(){var S=this.high,Q=this.low;return[S>>>24,S>>>16&255,S>>>8&255,S&255,Q>>>24,Q>>>16&255,Q>>>8&255,Q&255]},e.fromBytes=function(S,Q,Z){return Z?e.fromBytesLE(S,Q):e.fromBytesBE(S,Q)},e.fromBytesLE=function(S,Q){return new e(S[0]|S[1]<<8|S[2]<<16|S[3]<<24,S[4]|S[5]<<8|S[6]<<16|S[7]<<24,Q)},e.fromBytesBE=function(S,Q){return new e(S[4]<<24|S[5]<<16|S[6]<<8|S[7],S[0]<<24|S[1]<<16|S[2]<<8|S[3],Q)},Kh}var lk=ck();const Cl=Al(lk),Il=1;class uk{constructor({filehandle:e,path:n}){if(e)this.filehandle=e;else if(n)this.filehandle=new Ct(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(e,n=0,r=!0){const o=Cl.fromBytesLE(e.slice(n,n+8),r);if(o.greaterThan(Number.MAX_SAFE_INTEGER)||o.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return o.toNumber()}_getIndex(){return this.index||(this.index=this._readIndex()),this.index}async _readIndex(){let e=Ke.Buffer.allocUnsafe(8);await this.filehandle.read(e,0,8,0);const n=this._readLongWithOverflow(e,0,!0);if(!n)return[[0,0]];const r=new Array(n+1);r[0]=[0,0];const o=8*2*n;if(o>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");e=Ke.Buffer.allocUnsafe(o),await this.filehandle.read(e,0,o,8);for(let i=0;i<n;i+=1){const s=this._readLongWithOverflow(e,i*16),a=this._readLongWithOverflow(e,i*16+8);r[i+1]=[s,a]}return r}async getLastBlock(){const e=await this._getIndex();if(e.length)return e[e.length-1]}async getRelevantBlocksForRead(e,n){const r=n+e;if(e===0)return[];const o=await this._getIndex(),i=[],s=(h,d)=>{const p=h[Il],y=d?d[Il]:1/0;return p<=n&&y>n?0:p<n?-1:1};let a=0,c=o.length-1,l=Math.floor(o.length/2),u=s(o[l],o[l+1]);for(;u!==0;)u>0?c=l-1:u<0&&(a=l+1),l=Math.ceil((c-a)/2)+a,u=s(o[l],o[l+1]);i.push(o[l]);let f=l+1;for(;f<o.length&&(i.push(o[f]),!(o[f][Il]>=r));f+=1);return i[i.length-1][Il]<r&&i.push([]),i}}class $2{constructor({filehandle:e,path:n,gziFilehandle:r,gziPath:o}){if(e)this.filehandle=e;else if(n)this.filehandle=new Ct(n);else throw new TypeError("either filehandle or path must be defined");if(!r&&!o&&!n)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new uk({filehandle:r,path:!r&&!o&&n?o:`${n}.gzi`})}async stat(){const e=await this.filehandle.stat();return Object.assign(e,{size:await this.getUncompressedFileSize(),blocks:void 0,blksize:void 0})}async getUncompressedFileSize(){const[,e]=await this.gzi.getLastBlock(),{size:n}=await this.filehandle.stat(),r=Ke.Buffer.allocUnsafe(4),{bytesRead:o}=await this.filehandle.read(r,0,4,n-28-4);if(o!==4)throw new Error("read error");const i=r.readUInt32LE(0);return e+i}async _readAndUncompressBlock(e,[n],[r]){let o=r;o||(o=(await this.filehandle.stat()).size);const i=o-n;return await this.filehandle.read(e,0,i,n),await Pr(e.slice(0,i))}async read(e,n,r,o){const i=await this.gzi.getRelevantBlocksForRead(r,o),s=Ke.Buffer.allocUnsafe(32768*2);let a=n,c=0;for(let l=0;l<i.length-1;l+=1){const u=await this._readAndUncompressBlock(s,i[l],i[l+1]),[,f]=i[l],h=f>=o?0:o-f,d=Math.min(o+r,f+u.length)-f;h>=0&&h<u.length&&(u.copy(e,a,h,d),a+=d-h,c+=d-h)}return{bytesRead:c,buffer:e}}}function ey(t,e){return t.offset+t.lineBytes*Math.floor(e/t.lineLength)+e%t.lineLength}async function fk(t,e){const n=await t.readFile(e);if(!(n!=null&&n.length))throw new Error("No data read from FASTA index (FAI) file");let r=0,o;const i=n.toString("utf8").split(/\r?\n/).filter(s=>/\S/.test(s)).map(s=>s.split(" ")).filter(s=>s[0]!=="").map(s=>((!o||o.name!==s[0])&&(o={name:s[0],id:r},r+=1),{id:o.id,name:s[0],length:+s[1],start:0,end:+s[1],offset:+s[2],lineLength:+s[3],lineBytes:+s[4]}));return{name:Object.fromEntries(i.map(s=>[s.name,s])),id:Object.fromEntries(i.map(s=>[s.id,s]))}}class ty{constructor({fasta:e,fai:n,path:r,faiPath:o}){if(e)this.fasta=e;else if(r)this.fasta=new Ct(r);else throw new Error("Need to pass filehandle for fasta or path to localfile");if(n)this.fai=n;else if(o)this.fai=new Ct(o);else if(r)this.fai=new Ct(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile")}async _getIndexes(e){return this.indexes||(this.indexes=fk(this.fai,e)),this.indexes}async getSequenceNames(e){return Object.keys((await this._getIndexes(e)).name)}async getSequenceSizes(e){const n={},r=await this._getIndexes(e);for(const o of Object.values(r.id))n[o.name]=o.length;return n}async getSequenceSize(e,n){var r;return(r=(await this._getIndexes(n)).name[e])===null||r===void 0?void 0:r.length}async hasReferenceSequence(e,n){return!!(await this._getIndexes(n)).name[e]}async getResiduesById(e,n,r,o){const i=(await this._getIndexes(o)).id[e];if(i)return this._fetchFromIndexEntry(i,n,r,o)}async getResiduesByName(e,n,r,o){const i=(await this._getIndexes(o)).name[e];if(i)return this._fetchFromIndexEntry(i,n,r,o)}async getSequence(e,n,r,o){return this.getResiduesByName(e,n,r,o)}async _fetchFromIndexEntry(e,n=0,r,o){let i=r;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((i===void 0||i>e.length)&&(i=e.length),n>=i)return"";const s=ey(e,n),a=ey(e,i)-s,c=Ke.Buffer.allocUnsafe(a);return await this.fasta.read(c,0,a,s,o),c.toString("utf8").replace(/\s+/g,"")}}class hk extends ty{constructor({fasta:e,path:n,fai:r,faiPath:o,gzi:i,gziPath:s}){super({fasta:e,path:n,fai:r,faiPath:o}),e&&i?this.fasta=new $2({filehandle:e,gziFilehandle:i}):n&&s&&(this.fasta=new $2({path:n,gziPath:s}))}}function ny(t){return t.split(">").filter(e=>/\S/.test(e)).map(e=>{const[n,...r]=e.split(`
|
|
626
|
+
`),[o,...i]=n.split(" "),s=r.join("").replace(/\s/g,"");return{id:o,description:i.join(" "),sequence:s}})}class dk{constructor({fasta:e,path:n}){if(e)this.fasta=e;else if(n)this.fasta=new Ct(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const o=r.toString("utf8");return ny(o)})}async fetch(e,n,r){const i=(await this.data).find(a=>a.id===e),s=r-n;if(!i)throw new Error(`no sequence with id ${e} exists`);return i.sequence.slice(n,s)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const pk=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:hk,FetchableSmallFasta:dk,IndexedFasta:ty,parseSmallFasta:ny},Symbol.toStringTag,{value:"Module"})),ry=BigInt(32);function gk(t,e,n){const r=+!!n,o=+!n;return BigInt(t.getInt32(e,n)*o+t.getInt32(e+4,n)*r)<<ry|BigInt(t.getUint32(e,n)*r+t.getUint32(e+4,n)*o)}function mk(t,e,n){const r=t.getUint32(e,n),o=t.getUint32(e+4,n),i=+!!n,s=+!n;return BigInt(r*s+o*i)<<ry|BigInt(r*i+o*s)}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(t,e){return gk(this,t,e)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(t,e){return mk(this,t,e)});class bk{}class yk{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(e=new bk){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(e),e.aborted?this.handleAborted(e):typeof e.addEventListener=="function"&&e.addEventListener("abort",()=>{this.handleAborted(e)})}handleAborted(e){this.signals.delete(e),this.signals.size===0&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}class wk{constructor(){this.callbacks=new Set}addCallback(e=()=>{}){this.callbacks.add(e),e(this.currentMessage)}callback(e){this.currentMessage=e;for(const n of this.callbacks)n(e)}}class wi{constructor({fill:e,cache:n}){if(typeof e!="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=e}static isAbortException(e){return e.name==="AbortError"||e.code==="ERR_ABORTED"||e.message==="AbortError: aborted"||e.message==="Error: aborted"}evict(e,n){this.cache.get(e)===n&&this.cache.delete(e)}fill(e,n,r,o){const i=new yk,s=new wk;s.addCallback(o);const a={aborter:i,promise:this.fillCallback(n,i.signal,c=>{s.callback(c)}),settled:!1,statusReporter:s,get aborted(){return this.aborter.signal.aborted}};a.aborter.addSignal(r),a.aborter.signal.addEventListener("abort",()=>{a.settled||this.evict(e,a)}),a.promise.then(()=>{a.settled=!0},()=>{a.settled=!0,this.evict(e,a)}).catch(c=>{throw console.error(c),c}),this.cache.set(e,a)}static checkSinglePromise(e,n){function r(){if(n!=null&&n.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return e.then(o=>(r(),o),o=>{throw r(),o})}has(e){return this.cache.has(e)}get(e,n,r,o){if(!r&&n instanceof AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const i=this.cache.get(e);return i?i.aborted&&!i.settled?(this.evict(e,i),this.get(e,n,r,o)):i.settled?i.promise:(i.aborter.addSignal(r),i.statusReporter.addCallback(o),wi.checkSinglePromise(i.promise,r)):(this.fill(e,n,r,o),wi.checkSinglePromise(this.cache.get(e).promise,r))}delete(e){const n=this.cache.get(e);n&&(n.settled||n.aborter.abort(),this.cache.delete(e))}clear(){const e=this.cache.keys();let n=0;for(let r=e.next();!r.done;r=e.next())this.delete(r.value),n+=1;return n}}var Jh,iy;function xk(){if(iy)return Jh;iy=1;class t{constructor(n={}){if(!(n.maxSize&&n.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=n.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(n,r){this.cache.set(n,r),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(n){if(this.cache.has(n))return this.cache.get(n);if(this.oldCache.has(n)){const r=this.oldCache.get(n);return this.oldCache.delete(n),this._set(n,r),r}}set(n,r){return this.cache.has(n)?this.cache.set(n,r):this._set(n,r),this}has(n){return this.cache.has(n)||this.oldCache.has(n)}peek(n){if(this.cache.has(n))return this.cache.get(n);if(this.oldCache.has(n))return this.oldCache.get(n)}delete(n){const r=this.cache.delete(n);return r&&this._size--,this.oldCache.delete(n)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[n]of this)yield n}*values(){for(const[,n]of this)yield n}*[Symbol.iterator](){for(const n of this.cache)yield n;for(const n of this.oldCache){const[r]=n;this.cache.has(r)||(yield n)}}get size(){let n=0;for(const r of this.oldCache.keys())this.cache.has(r)||n++;return this._size+n}}return Jh=t,Jh}var vk=xk();const Tl=Al(vk);class uo{constructor(e){this.ranges=e}get min(){return this.ranges[0].min}get max(){return this.ranges.at(-1).max}contains(e){for(const n of this.ranges)if(n.min<=e&&n.max>=e)return!0;return!1}isContiguous(){return this.ranges.length>1}getRanges(){return this.ranges.map(e=>new uo([{min:e.min,max:e.max}]))}toString(){return this.ranges.map(e=>`[${e.min}-${e.max}]`).join(",")}union(e){const n=[...this.getRanges(),...e.getRanges()].sort((i,s)=>i.min<s.min?-1:i.min>s.min?1:i.max<s.max?-1:s.max>i.max?1:0),r=[];let o=n[0];for(const i of n)i.min>o.max+1?(r.push(o),o=i):i.max>o.max&&(o=new uo([{min:o.min,max:i.max}]));return r.push(o),r.length===1?r[0]:new uo(r)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */function fo(t){let e=t.length;for(;--e>=0;)t[e]=0}const Ak=3,Ek=258,oy=29,Sk=256+1+oy,sy=30,Ck=512,Ik=new Array((Sk+2)*2);fo(Ik);const Tk=new Array(sy*2);fo(Tk);const Dk=new Array(Ck);fo(Dk);const Bk=new Array(Ek-Ak+1);fo(Bk);const _k=new Array(oy);fo(_k);const kk=new Array(sy);fo(kk);var $h=(t,e,n,r)=>{let o=t&65535|0,i=t>>>16&65535|0,s=0;for(;n!==0;){s=n>2e3?2e3:n,n-=s;do o=o+e[r++]|0,i=i+o|0;while(--s);o%=65521,i%=65521}return o|i<<16|0};const Rk=()=>{let t,e=[];for(var n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e},Fk=new Uint32Array(Rk());var Un=(t,e,n,r)=>{const o=Fk,i=r+n;t^=-1;for(let s=r;s<i;s++)t=t>>>8^o[(t^e[s])&255];return t^-1},ed={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"},ay={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const Mk=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Pk=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)Mk(n,r)&&(t[r]=n[r])}}return t},Lk=t=>{let e=0;for(let r=0,o=t.length;r<o;r++)e+=t[r].length;const n=new Uint8Array(e);for(let r=0,o=0,i=t.length;r<i;r++){let s=t[r];n.set(s,o),o+=s.length}return n},cy={assign:Pk,flattenChunks:Lk};let ly=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{ly=!1}const ha=new Uint8Array(256);for(let t=0;t<256;t++)ha[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;ha[254]=ha[254]=1;var Nk=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,n,r,o,i,s=t.length,a=0;for(o=0;o<s;o++)n=t.charCodeAt(o),(n&64512)===55296&&o+1<s&&(r=t.charCodeAt(o+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),o++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(a),i=0,o=0;i<a;o++)n=t.charCodeAt(o),(n&64512)===55296&&o+1<s&&(r=t.charCodeAt(o+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),o++)),n<128?e[i++]=n:n<2048?(e[i++]=192|n>>>6,e[i++]=128|n&63):n<65536?(e[i++]=224|n>>>12,e[i++]=128|n>>>6&63,e[i++]=128|n&63):(e[i++]=240|n>>>18,e[i++]=128|n>>>12&63,e[i++]=128|n>>>6&63,e[i++]=128|n&63);return e};const Ok=(t,e)=>{if(e<65534&&t.subarray&&ly)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let n="";for(let r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n};var zk=(t,e)=>{const n=e||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let r,o;const i=new Array(n*2);for(o=0,r=0;r<n;){let s=t[r++];if(s<128){i[o++]=s;continue}let a=ha[s];if(a>4){i[o++]=65533,r+=a-1;continue}for(s&=a===2?31:a===3?15:7;a>1&&r<n;)s=s<<6|t[r++]&63,a--;if(a>1){i[o++]=65533;continue}s<65536?i[o++]=s:(s-=65536,i[o++]=55296|s>>10&1023,i[o++]=56320|s&1023)}return Ok(i,o)},Uk=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let n=e-1;for(;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+ha[t[n]]>e?n:e},td={string2buf:Nk,buf2string:zk,utf8border:Uk};function Gk(){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 Hk=Gk;const Dl=16209,Vk=16191;var qk=function(e,n){let r,o,i,s,a,c,l,u,f,h,d,p,y,v,b,A,C,E,I,R,B,O,F,P;const S=e.state;r=e.next_in,F=e.input,o=r+(e.avail_in-5),i=e.next_out,P=e.output,s=i-(n-e.avail_out),a=i+(e.avail_out-257),c=S.dmax,l=S.wsize,u=S.whave,f=S.wnext,h=S.window,d=S.hold,p=S.bits,y=S.lencode,v=S.distcode,b=(1<<S.lenbits)-1,A=(1<<S.distbits)-1;e:do{p<15&&(d+=F[r++]<<p,p+=8,d+=F[r++]<<p,p+=8),C=y[d&b];t:for(;;){if(E=C>>>24,d>>>=E,p-=E,E=C>>>16&255,E===0)P[i++]=C&65535;else if(E&16){I=C&65535,E&=15,E&&(p<E&&(d+=F[r++]<<p,p+=8),I+=d&(1<<E)-1,d>>>=E,p-=E),p<15&&(d+=F[r++]<<p,p+=8,d+=F[r++]<<p,p+=8),C=v[d&A];n:for(;;){if(E=C>>>24,d>>>=E,p-=E,E=C>>>16&255,E&16){if(R=C&65535,E&=15,p<E&&(d+=F[r++]<<p,p+=8,p<E&&(d+=F[r++]<<p,p+=8)),R+=d&(1<<E)-1,R>c){e.msg="invalid distance too far back",S.mode=Dl;break e}if(d>>>=E,p-=E,E=i-s,R>E){if(E=R-E,E>u&&S.sane){e.msg="invalid distance too far back",S.mode=Dl;break e}if(B=0,O=h,f===0){if(B+=l-E,E<I){I-=E;do P[i++]=h[B++];while(--E);B=i-R,O=P}}else if(f<E){if(B+=l+f-E,E-=f,E<I){I-=E;do P[i++]=h[B++];while(--E);if(B=0,f<I){E=f,I-=E;do P[i++]=h[B++];while(--E);B=i-R,O=P}}}else if(B+=f-E,E<I){I-=E;do P[i++]=h[B++];while(--E);B=i-R,O=P}for(;I>2;)P[i++]=O[B++],P[i++]=O[B++],P[i++]=O[B++],I-=3;I&&(P[i++]=O[B++],I>1&&(P[i++]=O[B++]))}else{B=i-R;do P[i++]=P[B++],P[i++]=P[B++],P[i++]=P[B++],I-=3;while(I>2);I&&(P[i++]=P[B++],I>1&&(P[i++]=P[B++]))}}else if(E&64){e.msg="invalid distance code",S.mode=Dl;break e}else{C=v[(C&65535)+(d&(1<<E)-1)];continue n}break}}else if(E&64)if(E&32){S.mode=Vk;break e}else{e.msg="invalid literal/length code",S.mode=Dl;break e}else{C=y[(C&65535)+(d&(1<<E)-1)];continue t}break}}while(r<o&&i<a);I=p>>3,r-=I,p-=I<<3,d&=(1<<p)-1,e.next_in=r,e.next_out=i,e.avail_in=r<o?5+(o-r):5-(r-o),e.avail_out=i<a?257+(a-i):257-(i-a),S.hold=d,S.bits=p};const ho=15,uy=852,fy=592,hy=0,nd=1,dy=2,jk=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]),Wk=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]),Qk=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]),Yk=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 da=(t,e,n,r,o,i,s,a)=>{const c=a.bits;let l=0,u=0,f=0,h=0,d=0,p=0,y=0,v=0,b=0,A=0,C,E,I,R,B,O=null,F;const P=new Uint16Array(ho+1),S=new Uint16Array(ho+1);let Q=null,Z,ae,ce;for(l=0;l<=ho;l++)P[l]=0;for(u=0;u<r;u++)P[e[n+u]]++;for(d=c,h=ho;h>=1&&P[h]===0;h--);if(d>h&&(d=h),h===0)return o[i++]=1<<24|64<<16|0,o[i++]=1<<24|64<<16|0,a.bits=1,0;for(f=1;f<h&&P[f]===0;f++);for(d<f&&(d=f),v=1,l=1;l<=ho;l++)if(v<<=1,v-=P[l],v<0)return-1;if(v>0&&(t===hy||h!==1))return-1;for(S[1]=0,l=1;l<ho;l++)S[l+1]=S[l]+P[l];for(u=0;u<r;u++)e[n+u]!==0&&(s[S[e[n+u]]++]=u);if(t===hy?(O=Q=s,F=20):t===nd?(O=jk,Q=Wk,F=257):(O=Qk,Q=Yk,F=0),A=0,u=0,l=f,B=i,p=d,y=0,I=-1,b=1<<d,R=b-1,t===nd&&b>uy||t===dy&&b>fy)return 1;for(;;){Z=l-y,s[u]+1<F?(ae=0,ce=s[u]):s[u]>=F?(ae=Q[s[u]-F],ce=O[s[u]-F]):(ae=96,ce=0),C=1<<l-y,E=1<<p,f=E;do E-=C,o[B+(A>>y)+E]=Z<<24|ae<<16|ce|0;while(E!==0);for(C=1<<l-1;A&C;)C>>=1;if(C!==0?(A&=C-1,A+=C):A=0,u++,--P[l]===0){if(l===h)break;l=e[n+s[u]]}if(l>d&&(A&R)!==I){for(y===0&&(y=d),B+=f,p=l-y,v=1<<p;p+y<h&&(v-=P[p+y],!(v<=0));)p++,v<<=1;if(b+=1<<p,t===nd&&b>uy||t===dy&&b>fy)return 1;I=A&R,o[I]=d<<24|p<<16|B-i|0}}return A!==0&&(o[B+A]=l-y<<24|64<<16|0),a.bits=d,0};const Zk=0,py=1,gy=2,{Z_FINISH:my,Z_BLOCK:Xk,Z_TREES:Bl,Z_OK:xi,Z_STREAM_END:Kk,Z_NEED_DICT:Jk,Z_STREAM_ERROR:fn,Z_DATA_ERROR:by,Z_MEM_ERROR:yy,Z_BUF_ERROR:$k,Z_DEFLATED:wy}=ay,_l=16180,xy=16181,vy=16182,Ay=16183,Ey=16184,Sy=16185,Cy=16186,Iy=16187,Ty=16188,Dy=16189,kl=16190,er=16191,rd=16192,By=16193,id=16194,_y=16195,ky=16196,Ry=16197,Fy=16198,Rl=16199,Fl=16200,My=16201,Py=16202,Ly=16203,Ny=16204,Oy=16205,od=16206,zy=16207,Uy=16208,ct=16209,Gy=16210,Hy=16211,eR=852,tR=592,nR=15,Vy=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function rR(){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 vi=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<_l||e.mode>Hy?1:0},qy=t=>{if(vi(t))return fn;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=_l,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(eR),e.distcode=e.distdyn=new Int32Array(tR),e.sane=1,e.back=-1,xi},jy=t=>{if(vi(t))return fn;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,qy(t)},Wy=(t,e)=>{let n;if(vi(t))return fn;const r=t.state;return e<0?(n=0,e=-e):(n=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?fn:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,jy(t))},Qy=(t,e)=>{if(!t)return fn;const n=new rR;t.state=n,n.strm=t,n.window=null,n.mode=_l;const r=Wy(t,e);return r!==xi&&(t.state=null),r},iR=t=>Qy(t,nR);let Yy=!0,sd,ad;const oR=t=>{if(Yy){sd=new Int32Array(512),ad=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(da(py,t.lens,0,288,sd,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;da(gy,t.lens,0,32,ad,0,t.work,{bits:5}),Yy=!1}t.lencode=sd,t.lenbits=9,t.distcode=ad,t.distbits=5},Zy=(t,e,n,r)=>{let o;const i=t.state;return i.window===null&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),r>=i.wsize?(i.window.set(e.subarray(n-i.wsize,n),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>r&&(o=r),i.window.set(e.subarray(n-r,n-r+o),i.wnext),r-=o,r?(i.window.set(e.subarray(n-r,n),0),i.wnext=r,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0},sR=(t,e)=>{let n,r,o,i,s,a,c,l,u,f,h,d,p,y,v=0,b,A,C,E,I,R,B,O;const F=new Uint8Array(4);let P,S;const Q=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(vi(t)||!t.output||!t.input&&t.avail_in!==0)return fn;n=t.state,n.mode===er&&(n.mode=rd),s=t.next_out,o=t.output,c=t.avail_out,i=t.next_in,r=t.input,a=t.avail_in,l=n.hold,u=n.bits,f=a,h=c,O=xi;e:for(;;)switch(n.mode){case _l:if(n.wrap===0){n.mode=rd;break}for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,F[0]=l&255,F[1]=l>>>8&255,n.check=Un(n.check,F,2,0),l=0,u=0,n.mode=xy;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){t.msg="incorrect header check",n.mode=ct;break}if((l&15)!==wy){t.msg="unknown compression method",n.mode=ct;break}if(l>>>=4,u-=4,B=(l&15)+8,n.wbits===0&&(n.wbits=B),B>15||B>n.wbits){t.msg="invalid window size",n.mode=ct;break}n.dmax=1<<n.wbits,n.flags=0,t.adler=n.check=1,n.mode=l&512?Dy:er,l=0,u=0;break;case xy:for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==wy){t.msg="unknown compression method",n.mode=ct;break}if(n.flags&57344){t.msg="unknown header flags set",n.mode=ct;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,n.check=Un(n.check,F,2,0)),l=0,u=0,n.mode=vy;case vy:for(;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,F[2]=l>>>16&255,F[3]=l>>>24&255,n.check=Un(n.check,F,4,0)),l=0,u=0,n.mode=Ay;case Ay:for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,n.check=Un(n.check,F,2,0)),l=0,u=0,n.mode=Ey;case Ey:if(n.flags&1024){for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,n.check=Un(n.check,F,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=Sy;case Sy:if(n.flags&1024&&(d=n.length,d>a&&(d=a),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(i,i+d),B)),n.flags&512&&n.wrap&4&&(n.check=Un(n.check,r,d,i)),a-=d,i+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Cy;case Cy:if(n.flags&2048){if(a===0)break e;d=0;do B=r[i+d++],n.head&&B&&n.length<65536&&(n.head.name+=String.fromCharCode(B));while(B&&d<a);if(n.flags&512&&n.wrap&4&&(n.check=Un(n.check,r,d,i)),a-=d,i+=d,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Iy;case Iy:if(n.flags&4096){if(a===0)break e;d=0;do B=r[i+d++],n.head&&B&&n.length<65536&&(n.head.comment+=String.fromCharCode(B));while(B&&d<a);if(n.flags&512&&n.wrap&4&&(n.check=Un(n.check,r,d,i)),a-=d,i+=d,B)break e}else n.head&&(n.head.comment=null);n.mode=Ty;case Ty:if(n.flags&512){for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){t.msg="header crc mismatch",n.mode=ct;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=er;break;case Dy:for(;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}t.adler=n.check=Vy(l),l=0,u=0,n.mode=kl;case kl:if(n.havedict===0)return t.next_out=s,t.avail_out=c,t.next_in=i,t.avail_in=a,n.hold=l,n.bits=u,Jk;t.adler=n.check=1,n.mode=er;case er:if(e===Xk||e===Bl)break e;case rd:if(n.last){l>>>=u&7,u-=u&7,n.mode=od;break}for(;u<3;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=By;break;case 1:if(oR(n),n.mode=Rl,e===Bl){l>>>=2,u-=2;break e}break;case 2:n.mode=ky;break;case 3:t.msg="invalid block type",n.mode=ct}l>>>=2,u-=2;break;case By:for(l>>>=u&7,u-=u&7;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){t.msg="invalid stored block lengths",n.mode=ct;break}if(n.length=l&65535,l=0,u=0,n.mode=id,e===Bl)break e;case id:n.mode=_y;case _y:if(d=n.length,d){if(d>a&&(d=a),d>c&&(d=c),d===0)break e;o.set(r.subarray(i,i+d),s),a-=d,i+=d,c-=d,s+=d,n.length-=d;break}n.mode=er;break;case ky:for(;u<14;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=ct;break}n.have=0,n.mode=Ry;case Ry:for(;n.have<n.ncode;){for(;u<3;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.lens[Q[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[Q[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,P={bits:n.lenbits},O=da(Zk,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,O){t.msg="invalid code lengths set",n.mode=ct;break}n.have=0,n.mode=Fy;case Fy:for(;n.have<n.nlen+n.ndist;){for(;v=n.lencode[l&(1<<n.lenbits)-1],b=v>>>24,A=v>>>16&255,C=v&65535,!(b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(C<16)l>>>=b,u-=b,n.lens[n.have++]=C;else{if(C===16){for(S=b+2;u<S;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(l>>>=b,u-=b,n.have===0){t.msg="invalid bit length repeat",n.mode=ct;break}B=n.lens[n.have-1],d=3+(l&3),l>>>=2,u-=2}else if(C===17){for(S=b+3;u<S;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=b,u-=b,B=0,d=3+(l&7),l>>>=3,u-=3}else{for(S=b+7;u<S;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=b,u-=b,B=0,d=11+(l&127),l>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=ct;break}for(;d--;)n.lens[n.have++]=B}}if(n.mode===ct)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=ct;break}if(n.lenbits=9,P={bits:n.lenbits},O=da(py,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,O){t.msg="invalid literal/lengths set",n.mode=ct;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},O=da(gy,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,O){t.msg="invalid distances set",n.mode=ct;break}if(n.mode=Rl,e===Bl)break e;case Rl:n.mode=Fl;case Fl:if(a>=6&&c>=258){t.next_out=s,t.avail_out=c,t.next_in=i,t.avail_in=a,n.hold=l,n.bits=u,qk(t,h),s=t.next_out,o=t.output,c=t.avail_out,i=t.next_in,r=t.input,a=t.avail_in,l=n.hold,u=n.bits,n.mode===er&&(n.back=-1);break}for(n.back=0;v=n.lencode[l&(1<<n.lenbits)-1],b=v>>>24,A=v>>>16&255,C=v&65535,!(b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(A&&!(A&240)){for(E=b,I=A,R=C;v=n.lencode[R+((l&(1<<E+I)-1)>>E)],b=v>>>24,A=v>>>16&255,C=v&65535,!(E+b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=E,u-=E,n.back+=E}if(l>>>=b,u-=b,n.back+=b,n.length=C,A===0){n.mode=Oy;break}if(A&32){n.back=-1,n.mode=er;break}if(A&64){t.msg="invalid literal/length code",n.mode=ct;break}n.extra=A&15,n.mode=My;case My:if(n.extra){for(S=n.extra;u<S;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Py;case Py:for(;v=n.distcode[l&(1<<n.distbits)-1],b=v>>>24,A=v>>>16&255,C=v&65535,!(b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(!(A&240)){for(E=b,I=A,R=C;v=n.distcode[R+((l&(1<<E+I)-1)>>E)],b=v>>>24,A=v>>>16&255,C=v&65535,!(E+b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=E,u-=E,n.back+=E}if(l>>>=b,u-=b,n.back+=b,A&64){t.msg="invalid distance code",n.mode=ct;break}n.offset=C,n.extra=A&15,n.mode=Ly;case Ly:if(n.extra){for(S=n.extra;u<S;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=ct;break}n.mode=Ny;case Ny:if(c===0)break e;if(d=h-c,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=ct;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),y=n.window}else y=o,p=s-n.offset,d=n.length;d>c&&(d=c),c-=d,n.length-=d;do o[s++]=y[p++];while(--d);n.length===0&&(n.mode=Fl);break;case Oy:if(c===0)break e;o[s++]=n.length,c--,n.mode=Fl;break;case od:if(n.wrap){for(;u<32;){if(a===0)break e;a--,l|=r[i++]<<u,u+=8}if(h-=c,t.total_out+=h,n.total+=h,n.wrap&4&&h&&(t.adler=n.check=n.flags?Un(n.check,o,h,s-h):$h(n.check,o,h,s-h)),h=c,n.wrap&4&&(n.flags?l:Vy(l))!==n.check){t.msg="incorrect data check",n.mode=ct;break}l=0,u=0}n.mode=zy;case zy:if(n.wrap&&n.flags){for(;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){t.msg="incorrect length check",n.mode=ct;break}l=0,u=0}n.mode=Uy;case Uy:O=Kk;break e;case ct:O=by;break e;case Gy:return yy;case Hy:default:return fn}return t.next_out=s,t.avail_out=c,t.next_in=i,t.avail_in=a,n.hold=l,n.bits=u,(n.wsize||h!==t.avail_out&&n.mode<ct&&(n.mode<od||e!==my))&&Zy(t,t.output,t.next_out,h-t.avail_out),f-=t.avail_in,h-=t.avail_out,t.total_in+=f,t.total_out+=h,n.total+=h,n.wrap&4&&h&&(t.adler=n.check=n.flags?Un(n.check,o,h,t.next_out-h):$h(n.check,o,h,t.next_out-h)),t.data_type=n.bits+(n.last?64:0)+(n.mode===er?128:0)+(n.mode===Rl||n.mode===id?256:0),(f===0&&h===0||e===my)&&O===xi&&(O=$k),O},aR=t=>{if(vi(t))return fn;let e=t.state;return e.window&&(e.window=null),t.state=null,xi},cR=(t,e)=>{if(vi(t))return fn;const n=t.state;return n.wrap&2?(n.head=e,e.done=!1,xi):fn},lR=(t,e)=>{const n=e.length;let r,o,i;return vi(t)||(r=t.state,r.wrap!==0&&r.mode!==kl)?fn:r.mode===kl&&(o=1,o=$h(o,e,n,0),o!==r.check)?by:(i=Zy(t,e,n,n),i?(r.mode=Gy,yy):(r.havedict=1,xi))};var uR=jy,fR=Wy,hR=qy,dR=iR,pR=Qy,gR=sR,mR=aR,bR=cR,yR=lR,wR="pako inflate (from Nodeca project)",tr={inflateReset:uR,inflateReset2:fR,inflateResetKeep:hR,inflateInit:dR,inflateInit2:pR,inflate:gR,inflateEnd:mR,inflateGetHeader:bR,inflateSetDictionary:yR,inflateInfo:wR};function xR(){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 vR=xR;const Xy=Object.prototype.toString,{Z_NO_FLUSH:AR,Z_FINISH:ER,Z_OK:pa,Z_STREAM_END:cd,Z_NEED_DICT:ld,Z_STREAM_ERROR:SR,Z_DATA_ERROR:Ky,Z_MEM_ERROR:CR}=ay;function Ml(t){this.options=cy.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Hk,this.strm.avail_out=0;let n=tr.inflateInit2(this.strm,e.windowBits);if(n!==pa)throw new Error(ed[n]);if(this.header=new vR,tr.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=td.string2buf(e.dictionary):Xy.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=tr.inflateSetDictionary(this.strm,e.dictionary),n!==pa)))throw new Error(ed[n])}Ml.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize,o=this.options.dictionary;let i,s,a;if(this.ended)return!1;for(e===~~e?s=e:s=e===!0?ER:AR,Xy.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,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),i=tr.inflate(n,s),i===ld&&o&&(i=tr.inflateSetDictionary(n,o),i===pa?i=tr.inflate(n,s):i===Ky&&(i=ld));n.avail_in>0&&i===cd&&n.state.wrap>0&&t[n.next_in]!==0;)tr.inflateReset(n),i=tr.inflate(n,s);switch(i){case SR:case Ky:case ld:case CR:return this.onEnd(i),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||i===cd))if(this.options.to==="string"){let c=td.utf8border(n.output,n.next_out),l=n.next_out-c,u=td.buf2string(n.output,c);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(c,c+l),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(i===pa&&a===0)){if(i===cd)return i=tr.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},Ml.prototype.onData=function(t){this.chunks.push(t)},Ml.prototype.onEnd=function(t){t===pa&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=cy.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function IR(t,e){const n=new Ml(e);if(n.push(t),n.err)throw n.msg||ed[n.err];return n.result}function TR(t,e){return e=e||{},e.raw=!0,IR(t,e)}var DR=TR,BR={inflateRaw:DR};const{inflateRaw:_R}=BR;var kR=_R;function RR(t){return kR(t.subarray(2))}let FR=class extends Error{constructor(e){super(e),this.code="ERR_ABORTED"}};function MR(t){t.sort((o,i)=>o.offset-i.offset);const e=[];let n,r;for(const o of t)n&&r&&o.offset-r<=2e3?(n.length=n.length+o.length-r+o.offset,n.blocks.push(o)):e.push(n={blocks:[o],length:o.length,offset:o.offset}),r=n.offset+n.length;return e}function Pl(t){if(t&&t.aborted)if(typeof DOMException>"u"){const e=new FR("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}const ud=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function fd(t,e,n,r){return t<r&&e>=n}class Jy{constructor(e,n,r,o,i,s){if(this.bbi=e,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=o,this.isCompressed=i,this.blockType=s,this.featureCache=new wi({cache:new Tl({maxSize:1e3}),fill:async(a,c)=>{const l=a.length,u=a.offset,{buffer:f}=await this.bbi.read(Ke.Buffer.alloc(l),0,l,u,{signal:c});return f}}),!(r>=0))throw new Error("invalid cirTreeOffset!")}async readWigData(e,n,r,o,i){try{const{refsByName:s,bbi:a,cirTreeOffset:c,isBigEndian:l}=this,u=s[e];u===void 0&&o.complete();const f={chrId:u,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=a.read(Ke.Buffer.alloc(48),0,48,c,i));const{buffer:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],y=0;const v=!0,b=(I,R,B)=>{try{const F=I.subarray(R),P=new DataView(F.buffer,F.byteOffset,F.length);let S=0;const Q=P.getUint8(S);S+=2;const Z=P.getUint16(S,v);if(S+=2,Q===1){const ae=[];for(let ce=0;ce<Z;ce++){const fe=P.getUint32(S,v);S+=4;const le=P.getUint32(S,v);S+=4;const Ee=P.getUint32(S,v);S+=4;const pe=P.getUint32(S,v);S+=4;const Ce=Number(P.getBigUint64(S,v));S+=8;const Ie=Number(P.getBigUint64(S,v));S+=8,ae.push({startChrom:fe,startBase:le,endBase:pe,endChrom:Ee,blockOffset:Ce,blockSize:Ie,offset:S})}p=p.concat(ae.filter(ce=>A(ce)).map(ce=>({offset:ce.blockOffset,length:ce.blockSize})))}else if(Q===0){const ae=[];for(let fe=0;fe<Z;fe++){const le=P.getUint32(S,v);S+=4;const Ee=P.getUint32(S,v);S+=4;const pe=P.getUint32(S,v);S+=4;const Ce=P.getUint32(S,v);S+=4;const Ie=Number(P.getBigUint64(S,v));S+=8,ae.push({startChrom:le,startBase:Ee,endChrom:pe,endBase:Ce,blockOffset:Ie,offset:S})}const ce=ae.filter(fe=>A(fe)).map(fe=>fe.blockOffset);ce.length>0&&E(ce,B+1)}}catch(O){o.error(O)}},A=I=>{const{startChrom:R,startBase:B,endChrom:O,endBase:F}=I;return(R<u||R===u&&B<=r)&&(O>u||O===u&&F>=n)},C=async(I,R,B)=>{try{const O=R.max-R.min,F=R.min,P=await this.featureCache.get(`${O}_${F}`,{length:O,offset:F},i==null?void 0:i.signal);for(const S of I)R.contains(S)&&(b(P,S-F,B),y-=1,y===0&&this.readFeatures(o,p,{...i,request:f}).catch(Q=>{o.error(Q)}))}catch(O){o.error(O)}},E=(I,R)=>{try{y+=I.length;const B=4+d*32;let O=new uo([{min:I[0],max:I[0]+B}]);for(let F=1;F<I.length;F+=1){const P=new uo([{min:I[F],max:I[F]+B}]);O=O.union(P)}O.getRanges().map(F=>C(I,F,R))}catch(B){o.error(B)}};E([Number(c)+48],1);return}catch(s){o.error(s)}}parseSummaryBlock(e,n,r){const o=[];let i=n;const s=new DataView(e.buffer,e.byteOffset,e.length);for(;i<e.byteLength;){const a=s.getUint32(i,!0);i+=4;const c=s.getUint32(i,!0);i+=4;const l=s.getUint32(i,!0);i+=4;const u=s.getUint32(i,!0);i+=4;const f=s.getFloat32(i,!0);i+=4;const h=s.getFloat32(i,!0);i+=4;const d=s.getFloat32(i,!0);i+=4,i+=4,(!r||a===r.chrId&&fd(c,l,r.start,r.end))&&o.push({start:c,end:l,maxScore:h,minScore:f,summary:!0,score:d/(u||1)})}return o}parseBigBedBlock(e,n,r,o){var i;const s=[];let a=n;const c=!0,l=e,u=new DataView(l.buffer,l.byteOffset,l.length);for(;a<e.byteLength;){const f=a,h=u.getUint32(a,c);a+=4;const d=u.getInt32(a,c);a+=4;const p=u.getInt32(a,c);a+=4;let y=a;for(;y<e.length&&e[y]!==0;y++);const v=e.subarray(a,y),b=(i=ud==null?void 0:ud.decode(v))!==null&&i!==void 0?i:v.toString();a=y+1,s.push({chromId:h,start:d,end:p,rest:b,uniqueId:`bb-${r+f}`})}return o?s.filter(f=>fd(f.start,f.end,o.start,o.end)):s}parseBigWigBlock(e,n,r){const o=e.subarray(n),i=new DataView(o.buffer,o.byteOffset,o.length);let s=0;s+=4;const a=i.getInt32(s,!0);s+=8;const c=i.getUint32(s,!0);s+=4;const l=i.getUint32(s,!0);s+=4;const u=i.getUint8(s);s+=2;const f=i.getUint16(s,!0);s+=2;const h=new Array(f);switch(u){case 1:{for(let d=0;d<f;d++){const p=i.getInt32(s,!0);s+=4;const y=i.getInt32(s,!0);s+=4;const v=i.getFloat32(s,!0);s+=4,h[d]={start:p,end:y,score:v}}break}case 2:{for(let d=0;d<f;d++){const p=i.getInt32(s,!0);s+=4;const y=i.getFloat32(s,!0);s+=4,h[d]={score:y,start:p,end:p+l}}break}case 3:{for(let d=0;d<f;d++){const p=i.getFloat32(s,!0);s+=4;const y=a+d*c;h[d]={score:p,start:y,end:y+l}}break}}return r?h.filter(d=>fd(d.start,d.end,r.start,r.end)):h}async readFeatures(e,n,r={}){try{const{blockType:o,isCompressed:i}=this,{signal:s,request:a}=r,c=MR(n);Pl(s),await Promise.all(c.map(async l=>{Pl(s);const{length:u,offset:f}=l,h=await this.featureCache.get(`${u}_${f}`,l,s);for(const d of l.blocks){Pl(s);let p=Number(d.offset)-Number(l.offset),y=h;switch(i&&(y=RR(h.subarray(p)),p=0),Pl(s),o){case"summary":{e.next(this.parseSummaryBlock(y,p,a));break}case"bigwig":{e.next(this.parseBigWigBlock(y,p,a));break}case"bigbed":{e.next(this.parseBigBedBlock(y,p,Number(d.offset)*256,a));break}default:console.warn(`Don't know what to do with ${o}`)}}})),e.complete()}catch(o){e.error(o)}}}var hd=function(t,e){return hd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},hd(t,e)};function dd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");hd(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function PR(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{l(r.next(u))}catch(f){s(f)}}function c(u){try{l(r.throw(u))}catch(f){s(f)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})}function $y(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function ga(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function pd(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function gd(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function po(t){return this instanceof po?(this.v=t,this):new po(t)}function LR(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(d){return function(p){return Promise.resolve(p).then(d,f)}}function a(d,p){r[d]&&(o[d]=function(y){return new Promise(function(v,b){i.push([d,y,v,b])>1||c(d,y)})},p&&(o[d]=p(o[d])))}function c(d,p){try{l(r[d](p))}catch(y){h(i[0][3],y)}}function l(d){d.value instanceof po?Promise.resolve(d.value.v).then(u,f):h(i[0][2],d)}function u(d){c("next",d)}function f(d){c("throw",d)}function h(d,p){d(p),i.shift(),i.length&&c(i[0][0],i[0][1])}}function NR(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof ga=="function"?ga(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=t[i]&&function(s){return new Promise(function(a,c){s=t[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}typeof SuppressedError=="function"&&SuppressedError;function xt(t){return typeof t=="function"}function ew(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var md=ew(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
627
|
+
`+n.map(function(r,o){return o+1+") "+r.toString()}).join(`
|
|
628
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function tw(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var bd=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,o,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=ga(s),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(y){e={error:y}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}else s.remove(this);var u=this.initialTeardown;if(xt(u))try{u()}catch(y){i=y instanceof md?y.errors:[y]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=ga(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{rw(p)}catch(y){i=i??[],y instanceof md?i=gd(gd([],pd(i)),pd(y.errors)):i.push(y)}}}catch(y){r={error:y}}finally{try{d&&!d.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}if(i)throw new md(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)rw(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&tw(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&tw(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();bd.EMPTY;function nw(t){return t instanceof bd||t&&"closed"in t&&xt(t.remove)&&xt(t.add)&&xt(t.unsubscribe)}function rw(t){xt(t)?t():t.unsubscribe()}var OR={Promise:void 0},zR={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,gd([t,e],pd(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function iw(t){zR.setTimeout(function(){throw t})}function ow(){}function UR(t){t()}var yd=function(t){dd(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,nw(n)&&n.add(r)):r.destination=VR,r}return e.create=function(n,r,o){return new Ll(n,r,o)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(bd),GR=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Nl(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Nl(r)}else Nl(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Nl(n)}},t}(),Ll=function(t){dd(e,t);function e(n,r,o){var i=t.call(this)||this,s;return xt(n)||!n?s={next:n??void 0,error:r??void 0,complete:o??void 0}:s=n,i.destination=new GR(s),i}return e}(yd);function Nl(t){iw(t)}function HR(t){throw t}var VR={closed:!0,next:ow,error:HR,complete:ow},wd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function sw(t){return t}function qR(t){return t.length===0?sw:t.length===1?t[0]:function(n){return t.reduce(function(r,o){return o(r)},n)}}var hn=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var o=this,i=WR(e)?e:new Ll(e,n,r);return UR(function(){var s=o,a=s.operator,c=s.source;i.add(a?a.call(i,c):c?o._subscribe(i):o._trySubscribe(i))}),i},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=aw(n),new n(function(o,i){var s=new Ll({next:function(a){try{e(a)}catch(c){i(c),s.unsubscribe()}},error:i,complete:o});r.subscribe(s)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[wd]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return qR(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=aw(e),new e(function(r,o){var i;n.subscribe(function(s){return i=s},function(s){return o(s)},function(){return r(i)})})},t.create=function(e){return new t(e)},t}();function aw(t){var e;return(e=t??OR.Promise)!==null&&e!==void 0?e:Promise}function jR(t){return t&&xt(t.next)&&xt(t.error)&&xt(t.complete)}function WR(t){return t&&t instanceof yd||jR(t)&&nw(t)}function QR(t){return xt(t==null?void 0:t.lift)}function go(t){return function(e){if(QR(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function ma(t,e,n,r,o){return new YR(t,e,n,r,o)}var YR=function(t){dd(e,t);function e(n,r,o,i,s,a){var c=t.call(this,n)||this;return c.onFinalize=s,c.shouldUnsubscribe=a,c._next=r?function(l){try{r(l)}catch(u){n.error(u)}}:t.prototype._next,c._error=i?function(l){try{i(l)}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=o?function(){try{o()}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(yd),ZR=new hn(function(t){return t.complete()});function XR(t){return t&&xt(t.schedule)}function cw(t){return t[t.length-1]}function KR(t){return XR(cw(t))?t.pop():void 0}function JR(t,e){return typeof cw(t)=="number"?t.pop():e}var lw=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function uw(t){return xt(t==null?void 0:t.then)}function fw(t){return xt(t[wd])}function hw(t){return Symbol.asyncIterator&&xt(t==null?void 0:t[Symbol.asyncIterator])}function dw(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function $R(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var pw=$R();function gw(t){return xt(t==null?void 0:t[pw])}function mw(t){return LR(this,arguments,function(){var n,r,o,i;return $y(this,function(s){switch(s.label){case 0:n=t.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,po(n.read())];case 3:return r=s.sent(),o=r.value,i=r.done,i?[4,po(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,po(o)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function bw(t){return xt(t==null?void 0:t.getReader)}function mo(t){if(t instanceof hn)return t;if(t!=null){if(fw(t))return eF(t);if(lw(t))return tF(t);if(uw(t))return nF(t);if(hw(t))return yw(t);if(gw(t))return rF(t);if(bw(t))return iF(t)}throw dw(t)}function eF(t){return new hn(function(e){var n=t[wd]();if(xt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function tF(t){return new hn(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function nF(t){return new hn(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,iw)})}function rF(t){return new hn(function(e){var n,r;try{for(var o=ga(t),i=o.next();!i.done;i=o.next()){var s=i.value;if(e.next(s),e.closed)return}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}e.complete()})}function yw(t){return new hn(function(e){oF(t,e).catch(function(n){return e.error(n)})})}function iF(t){return yw(mw(t))}function oF(t,e){var n,r,o,i;return PR(this,void 0,void 0,function(){var s,a;return $y(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=NR(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(s=r.value,e.next(s),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),o={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(i=n.return)?[4,i.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Ai(t,e,n,r,o){r===void 0&&(r=0),o===void 0&&(o=!1);var i=e.schedule(function(){n(),o?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(i),!o)return i}function ww(t,e){return e===void 0&&(e=0),go(function(n,r){n.subscribe(ma(r,function(o){return Ai(r,t,function(){return r.next(o)},e)},function(){return Ai(r,t,function(){return r.complete()},e)},function(o){return Ai(r,t,function(){return r.error(o)},e)}))})}function xw(t,e){return e===void 0&&(e=0),go(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function sF(t,e){return mo(t).pipe(xw(e),ww(e))}function aF(t,e){return mo(t).pipe(xw(e),ww(e))}function cF(t,e){return new hn(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function lF(t,e){return new hn(function(n){var r;return Ai(n,e,function(){r=t[pw](),Ai(n,e,function(){var o,i,s;try{o=r.next(),i=o.value,s=o.done}catch(a){n.error(a);return}s?n.complete():n.next(i)},0,!0)}),function(){return xt(r==null?void 0:r.return)&&r.return()}})}function vw(t,e){if(!t)throw new Error("Iterable cannot be null");return new hn(function(n){Ai(n,e,function(){var r=t[Symbol.asyncIterator]();Ai(n,e,function(){r.next().then(function(o){o.done?n.complete():n.next(o.value)})},0,!0)})})}function uF(t,e){return vw(mw(t),e)}function fF(t,e){if(t!=null){if(fw(t))return sF(t,e);if(lw(t))return cF(t,e);if(uw(t))return aF(t,e);if(hw(t))return vw(t,e);if(gw(t))return lF(t,e);if(bw(t))return uF(t,e)}throw dw(t)}function hF(t,e){return e?fF(t,e):mo(t)}var dF=ew(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Aw(t,e){return new Promise(function(n,r){var o=new Ll({next:function(i){n(i),o.unsubscribe()},error:r,complete:function(){r(new dF)}});t.subscribe(o)})}function Ew(t,e){return go(function(n,r){var o=0;n.subscribe(ma(r,function(i){r.next(t.call(e,i,o++))}))})}function pF(t,e,n,r,o,i,s,a){var c=[],l=0,u=0,f=!1,h=function(){f&&!c.length&&!l&&e.complete()},d=function(y){return l<r?p(y):c.push(y)},p=function(y){l++;var v=!1;mo(n(y,u++)).subscribe(ma(e,function(b){e.next(b)},function(){v=!0},void 0,function(){if(v)try{l--;for(var b=function(){var A=c.shift();s||p(A)};c.length&&l<r;)b();h()}catch(A){e.error(A)}}))};return t.subscribe(ma(e,d,function(){f=!0,h()})),function(){}}function Sw(t,e,n){return n===void 0&&(n=1/0),xt(e)?Sw(function(r,o){return Ew(function(i,s){return e(r,i,o,s)})(mo(t(r,o)))},n):(typeof e=="number"&&(n=e),go(function(r,o){return pF(r,o,t,n)}))}function gF(t){return t===void 0&&(t=1/0),Sw(sw,t)}function mF(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=KR(t),r=JR(t,1/0),o=t;return o.length?o.length===1?mo(o[0]):gF(r)(hF(o,n)):ZR}function bF(t,e,n,r,o){return function(i,s){var a=n,c=e,l=0;i.subscribe(ma(s,function(u){var f=l++;c=a?t(c,u,f):(a=!0,u)},function(){a&&s.next(c),s.complete()}))}}function Cw(t,e){return go(bF(t,e,arguments.length>=2,!1,!0))}var yF=function(t,e){return t.push(e),t};function wF(){return go(function(t,e){Cw(yF,[])(t).subscribe(e)})}const Iw=-2003829722,xd=-2021002517;class Tw{getHeader(e){return this.headerP||(this.headerP=this._getHeader(e).catch(n=>{throw this.headerP=void 0,n})),this.headerP}constructor(e){const{filehandle:n,renameRefSeqs:r=s=>s,path:o,url:i}=e;if(this.renameRefSeqs=r,n)this.bbi=n;else if(i)this.bbi=new En(i);else if(o)this.bbi=new Ct(o);else throw new Error("no file given")}async _getHeader(e){const n=await this._getMainHeader(e),r=await this._readChromTree(n,e);return{...n,...r}}async _getMainHeader(e,n=2e3){const{buffer:o}=await this.bbi.read(Ke.Buffer.alloc(n),0,n,0,e),i=this._isBigEndian(o),s=o,a=new DataView(s.buffer,s.byteOffset,s.length);let c=0;const l=a.getInt32(c,!0);c+=4;const u=a.getUint16(c,!0);c+=2;const f=a.getUint16(c,!0);c+=2;const h=Number(a.getBigUint64(c,!0));c+=8;const d=Number(a.getBigUint64(c,!0));c+=8;const p=Number(a.getBigUint64(c,!0));c+=8;const y=a.getUint16(c,!0);c+=2;const v=a.getUint16(c,!0);c+=2;const b=Number(a.getBigUint64(c,!0));c+=8;const A=Number(a.getBigUint64(c,!0));c+=8;const C=a.getUint32(c,!0);c+=4;const E=Number(a.getBigUint64(c,!0));c+=8;const I=[];for(let O=0;O<f;O++){const F=a.getUint32(c,!0);c+=4;const P=a.getUint32(c,!0);c+=4;const S=Number(a.getBigUint64(c,!0));c+=8;const Q=Number(a.getBigUint64(c,!0));c+=8,I.push({reductionLevel:F,reserved:P,dataOffset:S,indexOffset:Q})}const R=l===xd?"bigbed":"bigwig";if(b>n||A>n-8*5)return this._getMainHeader(e,n*2);let B;if(A){const O=o.subarray(Number(A));let F=0;const P=new DataView(O.buffer,O.byteOffset,O.length),S=Number(P.getBigUint64(F,!0));F+=8;const Q=P.getFloat64(F,!0);F+=8;const Z=P.getFloat64(F,!0);F+=8;const ae=P.getFloat64(F,!0);F+=8;const ce=P.getFloat64(F,!0);F+=8,B={scoreMin:Q,scoreMax:Z,scoreSum:ae,scoreSumSquares:ce,basesCovered:S}}else throw new Error("no stats");return{zoomLevels:I,magic:l,extHeaderOffset:E,numZoomLevels:f,fieldCount:y,totalSummary:B,definedFieldCount:v,uncompressBufSize:C,asOffset:b,chromTreeOffset:h,totalSummaryOffset:A,unzoomedDataOffset:d,unzoomedIndexOffset:p,fileType:R,version:u,isBigEndian:i,autoSql:b?o.subarray(b,o.indexOf(0,b)).toString():""}}_isBigEndian(e){let n=e.readInt32LE(0);if(n===Iw||n===xd)return!1;if(n=e.readInt32BE(0),n===Iw||n===xd)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(e,n){const o=!e.isBigEndian,i=[],s={};let a=e.unzoomedDataOffset;const c=e.chromTreeOffset;for(;a%4!==0;)a+=1;const l=a-c,{buffer:u}=await this.bbi.read(Ke.Buffer.alloc(l),0,l,Number(c),n),f=u,h=new DataView(f.buffer,f.byteOffset,f.length);let d=0;d+=4,d+=4;const p=h.getUint32(d,o);d+=4,d+=4,d+=8;const y=32,v=async b=>{let A=b;if(A>=u.length)throw new Error("reading beyond end of buffer");const C=h.getUint8(A);A+=2;const E=h.getUint16(A,o);if(A+=2,C)for(let I=0;I<E;I++){const R=u.subarray(A,A+p).toString().replaceAll("\0","");A+=p;const B=h.getUint32(A,o);A+=4;const O=h.getUint32(A,o);A+=4;const F={name:R,id:B,length:O};s[this.renameRefSeqs(R)]=B,i[B]=F}else{const I=[];for(let R=0;R<E;R++){A+=p;const B=Number(h.getBigUint64(A,o));A+=8,I.push(v(Number(B)-Number(c)))}await Promise.all(I)}};return await v(y),{refsByName:s,refsByNumber:i}}async getUnzoomedView(e){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:o,isBigEndian:i,fileType:s}=await this.getHeader(e);return new Jy(this.bbi,r,n,i,o>0,s)}async getFeatureStream(e,n,r,o){await this.getHeader(o);const i=this.renameRefSeqs(e);let s;const{basesPerSpan:a,scale:c}=o||{};return a?s=await this.getView(1/a,o):c?s=await this.getView(c,o):s=await this.getView(1,o),new hn(l=>{s.readWigData(i,n,r,l,o).catch(u=>{l.error(u)})})}async getFeatures(e,n,r,o){const i=await this.getFeatureStream(e,n,r,o);return(await Aw(i.pipe(wF()))).flat()}}class xF extends Tw{async getView(e,n){const{zoomLevels:r,refsByName:o,isBigEndian:i,uncompressBufSize:s}=await this.getHeader(n),a=1/e,c=r.length-1;for(let l=c;l>=0;l-=1){const u=r[l];if(u&&u.reductionLevel<=2*a)return new Jy(this.bbi,o,u.indexOffset,i,s>0,"summary")}return this.getUnzoomedView(n)}}function vF(t){return t.filter(e=>!!e)}class AF extends Tw{constructor(){super(...arguments),this.readIndicesCache=new wi({cache:new Tl({maxSize:1}),fill:(e,n)=>this._readIndices({...e,signal:n})})}readIndices(e={}){const{signal:n,...r}=e;return this.readIndicesCache.get(JSON.stringify(r),e,n)}async getView(e,n){return this.getUnzoomedView(n)}async _readIndices(e){const{extHeaderOffset:n,isBigEndian:r}=await this.getHeader(e),{buffer:o}=await this.bbi.read(Ke.Buffer.alloc(64),0,64,Number(n)),i=!r,s=o,a=new DataView(s.buffer,s.byteOffset,s.length);let c=0;c+=2;const l=a.getUint16(c,i);c+=2;const u=Number(a.getBigUint64(c,i));if(c+=8,l===0)return[];const f=20,h=f*l,{buffer:d}=await this.bbi.read(Ke.Buffer.alloc(h),0,h,Number(u)),p=[];for(let y=0;y<l;y+=1){const v=d.subarray(y*f),b=new DataView(v.buffer,v.byteOffset,v.length);let A=0;const C=b.getInt16(A,i);A+=2;const E=b.getInt16(A,i);A+=2;const I=Number(b.getBigUint64(A,i));A+=12;const R=b.getInt16(A,i);p.push({type:C,fieldcount:E,offset:Number(I),field:R})}return p}async searchExtraIndexBlocks(e,n={}){const{isBigEndian:r}=await this.getHeader(n),o=await this.readIndices(n);if(o.length===0)return[];const i=o.map(async s=>{const{offset:a,field:c}=s,{buffer:l}=await this.bbi.read(Ke.Buffer.alloc(32),0,32,a,n),u=!r,f=l,h=new DataView(f.buffer,f.byteOffset,f.length);let d=0;d+=4;const p=h.getInt32(d,u);d+=4;const y=h.getInt32(d,u);d+=4;const v=h.getInt32(d,u);d+=4,d+=8;const b=async C=>{const E=Number(C),I=4+p*(y+v),{buffer:R}=await this.bbi.read(Ke.Buffer.alloc(I),0,I,E,n),B=R,O=new DataView(B.buffer,B.byteOffset,B.length);let F=0;const P=O.getInt8(F);F+=2;const S=O.getInt16(F,u);F+=2;const Q=[];if(P===0){const Z=[];for(let ce=0;ce<S;ce++){const fe=B.subarray(F,F+y).toString().replaceAll("\0","");F+=y;const le=Number(O.getBigUint64(F,u));F+=8,Z.push({key:fe,offset:le})}let ae=0;for(const{key:ce,offset:fe}of Z){if(e.localeCompare(ce)<0&&ae)return b(ae);ae=fe}return b(ae)}else if(P===1){for(let Z=0;Z<S;Z++){const ae=B.subarray(F,F+y).toString().replaceAll("\0","");F+=y;const ce=Number(O.getBigUint64(F,u));F+=8;const fe=O.getUint32(F,u);F+=4;const le=O.getUint32(F,u);F+=4,Q.push({key:ae,offset:ce,length:fe,reserved:le})}for(const Z of Q)if(Z.key===e)return{...Z,field:c};return}};return b(a+32)});return vF(await Promise.all(i))}async searchExtraIndex(e,n={}){const r=await this.searchExtraIndexBlocks(e,n);if(r.length===0)return[];const o=await this.getUnzoomedView(n),i=r.map(a=>new hn(c=>{o.readFeatures(c,[a],n).catch(l=>{c.error(l)})}).pipe(Cw((c,l)=>c.concat(l)),Ew(c=>{for(const l of c)l.field=a.field;return c})));return(await Aw(mF(...i))).filter(a=>{var c;return((c=a.rest)===null||c===void 0?void 0:c.split(" ")[(a.field||0)-3])===e})}}const Dw=Object.freeze(Object.defineProperty({__proto__:null,BigBed:AF,BigWig:xF},Symbol.toStringTag,{value:"Module"}));var vd,Bw;function EF(){if(Bw)return vd;Bw=1;function t(r,o){function i(){this.constructor=r}i.prototype=o.prototype,r.prototype=new i}function e(r,o,i,s){this.message=r,this.expected=o,this.found=i,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,e)}t(e,Error),e.buildMessage=function(r,o){var i={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var d="",p;for(p=0;p<h.parts.length;p++)d+=h.parts[p]instanceof Array?c(h.parts[p][0])+"-"+c(h.parts[p][1]):c(h.parts[p]);return"["+(h.inverted?"^":"")+d+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.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(d){return"\\x0"+s(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+s(d)})}function c(h){return h.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(d){return"\\x0"+s(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+s(d)})}function l(h){return i[h.type](h)}function u(h){var d=new Array(h.length),p,y;for(p=0;p<h.length;p++)d[p]=l(h[p]);if(d.sort(),d.length>0){for(p=1,y=1;p<d.length;p++)d[p-1]!==d[p]&&(d[y]=d[p],y++);d.length=y}switch(d.length){case 1:return d[0];case 2:return d[0]+" or "+d[1];default:return d.slice(0,-1).join(", ")+", or "+d[d.length-1]}}function f(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+u(r)+" but "+f(o)+" found."};function n(r,o){o=o!==void 0?o:{};var i={},s={declaration:Nx},a=Nx,c="(",l=ze("(",!1),u=")",f=ze(")",!1),h=function(M,te,de,me){return{type:M,name:te,comment:de,fields:me}},d="simple",p=ze("simple",!1),y="object",v=ze("object",!1),b="table",A=ze("table",!1),C="auto",E=ze("auto",!1),I="primary",R=ze("primary",!1),B="index",O=ze("index",!1),F="unique",P=ze("unique",!1),S=function(M,te){return te},Q=function(M,te){return M.name&&te.unshift(M),te},Z="#",ae=ze("#",!1),ce=";",fe=ze(";",!1),le=function(M,te,de){return{type:M,name:te,comment:de}},Ee="[",pe=ze("[",!1),Ce="]",Ie=ze("]",!1),we=function(M,te,de,me){return{type:M,size:te,name:de,comment:me}},Te=function(M,te,de,me){return{type:M,vals:te,name:de,comment:me}},He=",",Le=ze(",",!1),j=function(M,te){return te.unshift(M),te},q="int",re=ze("int",!1),$="uint",ue=ze("uint",!1),L="short",D=ze("short",!1),ee="ushort",oe=ze("ushort",!1),De="byte",ye=ze("byte",!1),xe="ubyte",ke=ze("ubyte",!1),dt="float",Xt=ze("float",!1),It="char",$e=ze("char",!1),kt="string",Ot=ze("string",!1),et="lstring",zt=ze("lstring",!1),_="enum",m=ze("enum",!1),w="double",N=ze("double",!1),x="bigint",z=ze("bigint",!1),V="set",se=ze("set",!1),G=function(M,te){return M+" "+te},Y=/^[a-zA-Z_]/,T=ht([["a","z"],["A","Z"],"_"],!1,!1),ne=/^[a-zA-Z0-9_]/,_e=ht([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),g=function(M){return ft()},K=/^[^\n\r]/,J=ht([`
|
|
629
|
+
`,"\r"],!0,!1),k=function(M){return M.join("").replace(/^"/,"").replace(/"$/,"")},H=rn("integer"),W=/^[0-9]/,Se=ht([["0","9"]],!1,!1),ge=function(){return parseInt(ft(),10)},be=rn("whitespace"),Ge=/^[ \t\n\r]/,gn=ht([" "," ",`
|
|
630
|
+
`,"\r"],!1,!1),U=0,Me=0,lt=[{line:1,column:1}],tt=0,Tt=[],Be=0,sr;if("startRule"in o){if(!(o.startRule in s))throw new Error(`Can't start parsing from rule "`+o.startRule+'".');a=s[o.startRule]}function ft(){return r.substring(Me,U)}function ze(M,te){return{type:"literal",text:M,ignoreCase:te}}function ht(M,te,de){return{type:"class",parts:M,inverted:te,ignoreCase:de}}function In(){return{type:"end"}}function rn(M){return{type:"other",description:M}}function Ua(M){var te=lt[M],de;if(te)return te;for(de=M-1;!lt[de];)de--;for(te=lt[de],te={line:te.line,column:te.column};de<M;)r.charCodeAt(de)===10?(te.line++,te.column=1):te.column++,de++;return lt[M]=te,te}function Lx(M,te){var de=Ua(M),me=Ua(te);return{start:{offset:M,line:de.line,column:de.column},end:{offset:te,line:me.line,column:me.column}}}function Ne(M){U<tt||(U>tt&&(tt=U,Tt=[]),Tt.push(M))}function I9(M,te,de){return new e(e.buildMessage(M,te),M,te,de)}function Nx(){var M,te,de,me,Re,rt,ut,mn,Gr,ar,Hr,cr,Vr,lr;return M=U,te=qe(),te!==i?(de=Ox(),de!==i?(me=qe(),me!==i?(Re=zx(),Re!==i?(rt=qe(),rt!==i?(ut=Kl(),ut!==i?(mn=qe(),mn!==i?(r.charCodeAt(U)===40?(Gr=c,U++):(Gr=i,Be===0&&Ne(l)),Gr!==i?(ar=qe(),ar!==i?(Hr=T9(),Hr!==i?(cr=qe(),cr!==i?(r.charCodeAt(U)===41?(Vr=u,U++):(Vr=i,Be===0&&Ne(f)),Vr!==i?(lr=qe(),lr!==i?(Me=M,te=h(de,Re,ut,Hr),M=te):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i),M}function Ox(){var M;return r.substr(U,6)===d?(M=d,U+=6):(M=i,Be===0&&Ne(p)),M===i&&(r.substr(U,6)===y?(M=y,U+=6):(M=i,Be===0&&Ne(v)),M===i&&(r.substr(U,5)===b?(M=b,U+=5):(M=i,Be===0&&Ne(A)))),M}function zx(){var M,te,de,me;return M=Tn(),M===i&&(M=U,te=Tn(),te!==i?(de=Ux(),de!==i?(te=[te,de],M=te):(U=M,M=i)):(U=M,M=i),M===i&&(M=U,te=Tn(),te!==i?(r.substr(U,4)===C?(de=C,U+=4):(de=i,Be===0&&Ne(E)),de!==i?(te=[te,de],M=te):(U=M,M=i)):(U=M,M=i),M===i&&(M=U,te=Tn(),te!==i?(de=Ux(),de!==i?(r.substr(U,4)===C?(me=C,U+=4):(me=i,Be===0&&Ne(E)),me!==i?(te=[te,de,me],M=te):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)))),M}function Ux(){var M;return r.substr(U,7)===I?(M=I,U+=7):(M=i,Be===0&&Ne(R)),M===i&&(r.substr(U,5)===B?(M=B,U+=5):(M=i,Be===0&&Ne(O)),M===i&&(r.substr(U,6)===F?(M=F,U+=6):(M=i,Be===0&&Ne(P)))),M}function Kl(){var M;return M=Gx(),M===i&&(M=qe()),M}function T9(){var M,te,de,me,Re,rt,ut;if(M=U,te=Xd(),te!==i)if(de=qe(),de!==i){for(me=[],Re=U,rt=qe(),rt!==i?(ut=Xd(),ut!==i?(Me=Re,rt=S(te,ut),Re=rt):(U=Re,Re=i)):(U=Re,Re=i);Re!==i;)me.push(Re),Re=U,rt=qe(),rt!==i?(ut=Xd(),ut!==i?(Me=Re,rt=S(te,ut),Re=rt):(U=Re,Re=i)):(U=Re,Re=i);me!==i?(Re=qe(),Re!==i?(Me=M,te=Q(te,me),M=te):(U=M,M=i)):(U=M,M=i)}else U=M,M=i;else U=M,M=i;return M}function D9(){var M;return r.charCodeAt(U)===35?(M=Z,U++):(M=i,Be===0&&Ne(ae)),M}function B9(){var M,te,de,me,Re;return M=U,te=qe(),te!==i?(de=D9(),de!==i?(me=Gx(),me!==i?(Re=qe(),Re!==i?(te=[te,de,me,Re],M=te):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i),M}function Xd(){var M,te,de,me,Re,rt,ut,mn,Gr,ar,Hr,cr,Vr,lr;return M=U,te=Kd(),te!==i?(de=qe(),de!==i?(me=Tn(),me!==i?(Re=qe(),Re!==i?(r.charCodeAt(U)===59?(rt=ce,U++):(rt=i,Be===0&&Ne(fe)),rt!==i?(ut=qe(),ut!==i?(mn=Kl(),mn!==i?(Me=M,te=le(te,me,mn),M=te):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i),M===i&&(M=U,te=Kd(),te!==i?(de=qe(),de!==i?(r.charCodeAt(U)===91?(me=Ee,U++):(me=i,Be===0&&Ne(pe)),me!==i?(Re=qe(),Re!==i?(rt=k9(),rt!==i?(ut=qe(),ut!==i?(r.charCodeAt(U)===93?(mn=Ce,U++):(mn=i,Be===0&&Ne(Ie)),mn!==i?(Gr=qe(),Gr!==i?(ar=Tn(),ar!==i?(Hr=qe(),Hr!==i?(r.charCodeAt(U)===59?(cr=ce,U++):(cr=i,Be===0&&Ne(fe)),cr!==i?(Vr=qe(),Vr!==i?(lr=Kl(),lr!==i?(Me=M,te=we(te,rt,ar,lr),M=te):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i),M===i&&(M=U,te=Kd(),te!==i?(de=qe(),de!==i?(r.charCodeAt(U)===40?(me=c,U++):(me=i,Be===0&&Ne(l)),me!==i?(Re=qe(),Re!==i?(rt=_9(),rt!==i?(ut=qe(),ut!==i?(r.charCodeAt(U)===41?(mn=u,U++):(mn=i,Be===0&&Ne(f)),mn!==i?(Gr=qe(),Gr!==i?(ar=Tn(),ar!==i?(Hr=qe(),Hr!==i?(r.charCodeAt(U)===59?(cr=ce,U++):(cr=i,Be===0&&Ne(fe)),cr!==i?(Vr=qe(),Vr!==i?(lr=Kl(),lr!==i?(Me=M,te=Te(te,rt,ar,lr),M=te):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i)):(U=M,M=i),M===i&&(M=B9()))),M}function _9(){var M,te,de,me,Re,rt,ut;if(M=U,te=Tn(),te!==i){for(de=[],me=U,r.charCodeAt(U)===44?(Re=He,U++):(Re=i,Be===0&&Ne(Le)),Re!==i?(rt=qe(),rt!==i?(ut=Tn(),ut!==i?(Me=me,Re=S(te,ut),me=Re):(U=me,me=i)):(U=me,me=i)):(U=me,me=i);me!==i;)de.push(me),me=U,r.charCodeAt(U)===44?(Re=He,U++):(Re=i,Be===0&&Ne(Le)),Re!==i?(rt=qe(),rt!==i?(ut=Tn(),ut!==i?(Me=me,Re=S(te,ut),me=Re):(U=me,me=i)):(U=me,me=i)):(U=me,me=i);de!==i?(Me=M,te=j(te,de),M=te):(U=M,M=i)}else U=M,M=i;return M}function Kd(){var M,te,de,me;return r.substr(U,3)===q?(M=q,U+=3):(M=i,Be===0&&Ne(re)),M===i&&(r.substr(U,4)===$?(M=$,U+=4):(M=i,Be===0&&Ne(ue)),M===i&&(r.substr(U,5)===L?(M=L,U+=5):(M=i,Be===0&&Ne(D)),M===i&&(r.substr(U,6)===ee?(M=ee,U+=6):(M=i,Be===0&&Ne(oe)),M===i&&(r.substr(U,4)===De?(M=De,U+=4):(M=i,Be===0&&Ne(ye)),M===i&&(r.substr(U,5)===xe?(M=xe,U+=5):(M=i,Be===0&&Ne(ke)),M===i&&(r.substr(U,5)===dt?(M=dt,U+=5):(M=i,Be===0&&Ne(Xt)),M===i&&(r.substr(U,4)===It?(M=It,U+=4):(M=i,Be===0&&Ne($e)),M===i&&(r.substr(U,6)===kt?(M=kt,U+=6):(M=i,Be===0&&Ne(Ot)),M===i&&(r.substr(U,7)===et?(M=et,U+=7):(M=i,Be===0&&Ne(zt)),M===i&&(r.substr(U,4)===_?(M=_,U+=4):(M=i,Be===0&&Ne(m)),M===i&&(r.substr(U,6)===w?(M=w,U+=6):(M=i,Be===0&&Ne(N)),M===i&&(r.substr(U,6)===x?(M=x,U+=6):(M=i,Be===0&&Ne(z)),M===i&&(r.substr(U,3)===V?(M=V,U+=3):(M=i,Be===0&&Ne(se)),M===i&&(M=U,te=Ox(),te!==i?(de=qe(),de!==i?(me=zx(),me!==i?(Me=M,te=G(te,me),M=te):(U=M,M=i)):(U=M,M=i)):(U=M,M=i))))))))))))))),M}function k9(){var M;return M=R9(),M===i&&(M=Tn()),M}function Tn(){var M,te,de,me,Re;if(M=U,te=U,Y.test(r.charAt(U))?(de=r.charAt(U),U++):(de=i,Be===0&&Ne(T)),de!==i){for(me=[],ne.test(r.charAt(U))?(Re=r.charAt(U),U++):(Re=i,Be===0&&Ne(_e));Re!==i;)me.push(Re),ne.test(r.charAt(U))?(Re=r.charAt(U),U++):(Re=i,Be===0&&Ne(_e));me!==i?(de=[de,me],te=de):(U=te,te=i)}else U=te,te=i;return te!==i&&(Me=M,te=g()),M=te,M}function Gx(){var M,te,de;for(M=U,te=[],K.test(r.charAt(U))?(de=r.charAt(U),U++):(de=i,Be===0&&Ne(J));de!==i;)te.push(de),K.test(r.charAt(U))?(de=r.charAt(U),U++):(de=i,Be===0&&Ne(J));return te!==i&&(Me=M,te=k(te)),M=te,M}function R9(){var M,te,de,me;if(Be++,M=U,te=qe(),te!==i){if(de=[],W.test(r.charAt(U))?(me=r.charAt(U),U++):(me=i,Be===0&&Ne(Se)),me!==i)for(;me!==i;)de.push(me),W.test(r.charAt(U))?(me=r.charAt(U),U++):(me=i,Be===0&&Ne(Se));else de=i;de!==i?(Me=M,te=ge(),M=te):(U=M,M=i)}else U=M,M=i;return Be--,M===i&&(te=i,Be===0&&Ne(H)),M}function qe(){var M,te;for(Be++,M=[],Ge.test(r.charAt(U))?(te=r.charAt(U),U++):(te=i,Be===0&&Ne(gn));te!==i;)M.push(te),Ge.test(r.charAt(U))?(te=r.charAt(U),U++):(te=i,Be===0&&Ne(gn));return Be--,M===i&&(te=i,Be===0&&Ne(be)),M}if(sr=a(),sr!==i&&U===r.length)return sr;throw sr!==i&&U<r.length&&Ne(In()),I9(Tt,tt<r.length?r.charAt(tt):null,tt<r.length?Lx(tt,tt+1):Lx(tt,tt))}return vd={SyntaxError:e,parse:n},vd}var _w=EF();const SF=Al(_w),Ad=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
|
|
631
631
|
"bigChain pairwise alignment"
|
|
632
632
|
(
|
|
633
633
|
string chrom; "Reference sequence chromosome or scaffold"
|
|
@@ -786,19 +786,20 @@ chrM 16299`};function YD(e){if(!(e in z2))throw new Error(`Unknown assembly: ${e
|
|
|
786
786
|
float score; "Floating point score."
|
|
787
787
|
char[1] leftStatus; "Gap/break annotation for preceding block"
|
|
788
788
|
char[1] rightStatus; "Gap/break annotation for following block"
|
|
789
|
-
)`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,Av.parse(t.trim())]));function G0(e){const t=new Set(["uint","int","float","long"]);return{...e,fields:e.fields.map(n=>({...n,isArray:n.size&&n.type!=="char",arrayIsNumeric:n.size&&t.has(n.type),isNumeric:!n.size&&t.has(n.type)})).filter(n=>!!n.name)}}const D7={".":0,"-":-1,"+":1};function k7(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 B7{constructor(t={}){if(t.autoSql)this.autoSql=G0(I7.parse(t.autoSql));else if(t.type){if(!U0[t.type])throw new Error("Type not found");this.autoSql=G0(U0[t.type])}else this.autoSql=G0(U0.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(t,n={}){const{autoSql:r}=this,{uniqueId:i}=n,o=Array.isArray(t)?t:t.split(" ");let a={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&k7(o))for(let s=0;s<r.fields.length;s++){const c=r.fields[s];let l=o[s];const{isNumeric:u,isArray:f,arrayIsNumeric:h,name:d}=c;if(l==null)break;if(l!=="."){if(u){const p=Number(l);l=Number.isNaN(p)?l:p}else f&&(l=l.split(","),l[l.length-1]===""&&l.pop(),h&&(l=l.map(Number)));a[d]=l}}else{const s=["chrom","chromStart","chromEnd","name"];a=Object.fromEntries(o.map((c,l)=>[s[l]||"field"+l,c])),a.chromStart=+a.chromStart,a.chromEnd=+a.chromEnd,Number.isNaN(Number.parseFloat(a.field4))||(a.score=+a.field4,delete a.field4),(a.field5==="+"||a.field5==="-")&&(a.strand=a.field5,delete a.field5)}return i&&(a.uniqueId=i),a.strand=D7[a.strand]||0,a.chrom=decodeURIComponent(a.chrom),a}}const R7=Object.freeze(Object.defineProperty({__proto__:null,default:B7},Symbol.toStringTag,{value:"Module"}));let Ev=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 Yo(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Ev(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 H0=class{constructor(t,n,r,i){this.minv=t,this.maxv=n,this.bin=r,this._fetchedSize=i}toUniqueString(){return`${this.minv.toString()}..${this.maxv.toString()} (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 F7(e){return new Promise(t=>setTimeout(t,e))}function M7(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 P7(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function L7(e={}){return"aborted"in e?{signal:e}:e}function Sv(e,t){const n=[];let r;if(e.length===0)return e;e.sort((i,o)=>{const a=i.minv.blockPosition-o.minv.blockPosition;return a===0?i.minv.dataPosition-o.minv.dataPosition:a});for(const i of e)(!t||i.maxv.compareTo(t)>0)&&(r===void 0?(n.push(i),r=i):P7(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function _v(e,t){return{lineCount:pu.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0).toNumber()}}function Ru(e,t){return e?e.compareTo(t)>0?t:e:t}function N7(e,t=n=>n){let n=0,r=0;const i=[],o={};for(let a=0;a<e.length;a+=1)if(!e[a]){if(r<a){let s=e.toString("utf8",r,a);s=t(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}let Cv=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const O7=21578050;function z7(e,t){return e-e%t}function U7(e,t){return e-e%t+t}function G7(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 Qo extends Cv{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)!==O7)throw new Error("Not a BAI file");const r=n.readInt32LE(4),o=((1<<(5+1)*3)-1)/7;let a=8,s;const c=new Array(r);for(let l=0;l<r;l++){const u=n.readInt32LE(a);let f;a+=4;const h={};for(let b=0;b<u;b+=1){const v=n.readUInt32LE(a);if(a+=4,v===o+1)a+=4,f=_v(n,a+16),a+=32;else{if(v>o+1)throw new Error("bai index contains too many bins, please use CSI");{const y=n.readInt32LE(a);a+=4;const A=new Array(y);for(let _=0;_<y;_++){const E=Yo(n,a);a+=8;const C=Yo(n,a);a+=8,s=Ru(s,E),A[_]=new H0(E,C,v)}h[v]=A}}}const d=n.readInt32LE(a);a+=4;const p=new Array(d);for(let b=0;b<d;b++){const v=Yo(n,a);a+=8,s=Ru(s,v),p[b]=v}c[l]={binIndex:h,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:s,maxBlockSize:65536,indices:c,refCount:r}}async indexCov(t,n,r,i={}){const a=n!==void 0,c=(await this.parse(i)).indices[t];if(!c)return[];const{linearIndex:l=[],stats:u}=c;if(l.length===0)return[];const f=r===void 0?(l.length-1)*16384:U7(r,16384),h=n===void 0?0:z7(n,16384),d=a?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 b=l[h/16384].blockPosition;for(let v=h/16384,y=0;v<f/16384;v++,y++)d[y]={score:l[v+1].blockPosition-b,start:v*16384,end:v*16384+16384},b=l[v+1].blockPosition;return d.map(v=>({...v,score:v.score*((u==null?void 0:u.lineCount)||0)/p}))}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const a=o.indices[t];if(!a)return[];const s=G7(n,r),c=[];for(const[d,p]of s)for(let b=d;b<=p;b++)if(a.binIndex[b]){const v=a.binIndex[b];for(const y of v)c.push(new H0(y.minv,y.maxv,b))}const l=a.linearIndex.length;let u;const f=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=f;d<=h;++d){const p=a.linearIndex[d];p&&(!u||p.compareTo(u)<0)&&(u=p)}return Sv(c,u)}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}let V0=[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"&&(V0=new Int32Array(V0));const H7=(e,t)=>{let n=t===0?0:~~t^-1;for(let r=0;r<e.length;r++)n=V0[(n^e[r])&255]^n>>>8;return n^-1},Tv=(e,t)=>$e.Buffer.from(e,t);function V7(e,t){const n=(r,i)=>t(Tv(r),i)>>>0;return n.signed=(r,i)=>t(Tv(r),i),n.unsigned=n,n.model=e,n}const q7=V7("crc-32",H7),j7=21582659,W7=38359875;function Z7(e,t){return e*2**t}function Iv(e,t){return Math.floor(e/2**t)}let Fu=class extends Cv{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n){var r,i;return((i=(r=(await this.parse(n)).indices[t])===null||r===void 0?void 0:r.stats)===null||i===void 0?void 0:i.lineCount)||0}async indexCov(){return[]}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),c=s?String.fromCharCode(s):"",l=t.readInt32LE(n+20),u=t.readInt32LE(n+24);return{columnNumbers:a,coordinateType:i,metaValue:s,metaChar:c,skipLines:l,format:o,formatFlags:r,...N7(t.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await Qr(n);let i;if(r.readUInt32LE(0)===j7)i=1;else if(r.readUInt32LE(0)===W7)i=2;else throw new Error("Not a CSI file");this.minShift=r.readInt32LE(4),this.depth=r.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const o=r.readInt32LE(12),a=o>=30?this.parseAuxData(r,16):void 0,s=r.readInt32LE(16+o);let c=16+o+4,l;const u=new Array(s);for(let f=0;f<s;f++){const h=r.readInt32LE(c);c+=4;const d={};let p;for(let b=0;b<h;b++){const v=r.readUInt32LE(c);if(c+=4,v>this.maxBinNumber)p=_v(r,c+28),c+=44;else{l=Ru(l,Yo(r,c)),c+=8;const y=r.readInt32LE(c);c+=4;const A=new Array(y);for(let _=0;_<y;_+=1){const E=Yo(r,c);c+=8;const C=Yo(r,c);c+=8,l=Ru(l,E),A[_]=new H0(E,C,v)}d[v]=A}}u[f]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:l,indices:u,refCount:s,csi:!0,maxBlockSize:65536,...a}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const a=(await this.parse(i)).indices[t];if(!a)return[];const s=this.reg2bins(n,r);if(s.length===0)return[];const c=[];for(const[l,u]of s)for(let f=l;f<=u;f++)if(a.binIndex[f]){const h=a.binIndex[f];for(const d of h)c.push(d)}return Sv(c,new Ev(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,o=this.minShift+this.depth*3;const a=[];for(;r<=this.depth;o-=3,i+=Z7(1,r*3),r+=1){const s=i+Iv(t,o),c=i+Iv(n,o);if(c-s+a.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);a.push([s,c])}return a}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}};const En={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},Dv="=ACMGRSVTWYHKDBN".split(""),lc="MIDNSHP=X???????".split("");class Xo{constructor(t){this.bytes=t.bytes,this.fileOffset=t.fileOffset}get byteArray(){return this.bytes.byteArray}get flags(){return(this.byteArray.readInt32LE(this.bytes.start+16)&4294901760)>>16}get ref_id(){return this.byteArray.readInt32LE(this.bytes.start+4)}get start(){return this.byteArray.readInt32LE(this.bytes.start+8)}get end(){return this.start+this.length_on_ref}get id(){return this.fileOffset}get mq(){const t=(this.bin_mq_nl&65280)>>8;return t===255?void 0:t}get score(){return this.mq}get qual(){if(this.isSegmentUnmapped())return;const t=this.b0+this.read_name_length+this.num_cigar_ops*4+this.num_seq_bytes;return this.byteArray.subarray(t,t+this.seq_length)}get strand(){return this.isReverseComplemented()?-1:1}get b0(){return this.bytes.start+36}get name(){return this.byteArray.toString("ascii",this.b0,this.b0+this.read_name_length-1)}get tags(){const{byteArray:t}=this.bytes;let n=this.b0+this.read_name_length+this.num_cigar_ops*4+this.num_seq_bytes+this.seq_length;const r=this.bytes.end,i={};for(;n<r;){const o=String.fromCharCode(t[n],t[n+1]),a=String.fromCharCode(t[n+2]);if(n+=3,a==="A")i[o]=String.fromCharCode(t[n]),n+=1;else if(a==="i")i[o]=t.readInt32LE(n),n+=4;else if(a==="I")i[o]=t.readUInt32LE(n),n+=4;else if(a==="c")i[o]=t.readInt8(n),n+=1;else if(a==="C")i[o]=t.readUInt8(n),n+=1;else if(a==="s")i[o]=t.readInt16LE(n),n+=2;else if(a==="S")i[o]=t.readUInt16LE(n),n+=2;else if(a==="f")i[o]=t.readFloatLE(n),n+=4;else if(a==="Z"||a==="H"){const s=[];for(;n<=r;){const c=t[n++];if(c!==0)s.push(String.fromCharCode(c));else break}i[o]=s.join("")}else if(a==="B"){const s=t[n++],c=String.fromCharCode(s),l=t.readInt32LE(n);if(n+=4,c==="i")if(o==="CG"){const u=[];for(let f=0;f<l;f++){const h=t.readInt32LE(n),d=h>>4,p=lc[h&15];u.push(d+p),n+=4}i[o]=u.join("")}else{const u=[];for(let f=0;f<l;f++)u.push(t.readInt32LE(n)),n+=4;i[o]=u}else if(c==="I")if(o==="CG"){const u=[];for(let f=0;f<l;f++){const h=t.readUInt32LE(n),d=h>>4,p=lc[h&15];u.push(d+p),n+=4}i[o]=u.join("")}else{const u=[];for(let f=0;f<l;f++)u.push(t.readUInt32LE(n)),n+=4;i[o]=u}else if(c==="s"){const u=[];for(let f=0;f<l;f++)u.push(t.readInt16LE(n)),n+=2;i[o]=u}else if(c==="S"){const u=[];for(let f=0;f<l;f++)u.push(t.readUInt16LE(n)),n+=2;i[o]=u}else if(c==="c"){const u=[];for(let f=0;f<l;f++)u.push(t.readInt8(n)),n+=1;i[o]=u}else if(c==="C"){const u=[];for(let f=0;f<l;f++)u.push(t.readUInt8(n)),n+=1;i[o]=u}else if(c==="f"){const u=[];for(let f=0;f<l;f++)u.push(t.readFloatLE(n)),n+=4;i[o]=u}}else{console.error("Unknown BAM tag type",a);break}}return i}isPaired(){return!!(this.flags&En.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&En.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&En.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&En.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&En.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&En.BAM_FMREVERSE)}isRead1(){return!!(this.flags&En.BAM_FREAD1)}isRead2(){return!!(this.flags&En.BAM_FREAD2)}isSecondary(){return!!(this.flags&En.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&En.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&En.BAM_FDUP)}isSupplementary(){return!!(this.flags&En.BAM_FSUPPLEMENTARY)}get cigarAndLength(){if(this.isSegmentUnmapped())return{length_on_ref:0,CIGAR:""};const t=this.num_cigar_ops;let n=this.b0+this.read_name_length;const r=[];let i=this.byteArray.readInt32LE(n),o=i>>4,a=lc[i&15];if(a==="S"&&o===this.seq_length)return n+=4,i=this.byteArray.readInt32LE(n),o=i>>4,a=lc[i&15],a!=="N"&&console.warn("CG tag with no N tag"),{CIGAR:this.tags.CG,length_on_ref:o};{let s=0;for(let c=0;c<t;++c)i=this.byteArray.readInt32LE(n),o=i>>4,a=lc[i&15],r.push(o+a),a!=="H"&&a!=="S"&&a!=="I"&&(s+=o),n+=4;return{CIGAR:r.join(""),length_on_ref:s}}}get length_on_ref(){return this.cigarAndLength.length_on_ref}get CIGAR(){return this.cigarAndLength.CIGAR}get num_cigar_ops(){return this.flag_nc&65535}get read_name_length(){return this.bin_mq_nl&255}get num_seq_bytes(){return this.seq_length+1>>1}get seq(){const{byteArray:t}=this.bytes,n=this.b0+this.read_name_length+this.num_cigar_ops*4,r=this.num_seq_bytes,i=this.seq_length,o=[];let a=0;for(let s=0;s<r;++s){const c=t[n+s];o.push(Dv[(c&240)>>4]),a++,a<i&&(o.push(Dv[c&15]),a++)}return o.join("")}get pair_orientation(){if(!this.isSegmentUnmapped()&&!this.isMateUnmapped()&&this.ref_id===this.next_refid){const t=this.isReverseComplemented()?"R":"F",n=this.isMateReverseComplemented()?"R":"F";let r=" ",i=" ";this.isRead1()?(r="1",i="2"):this.isRead2()&&(r="2",i="1");const o=[];return this.template_length>0?(o[0]=t,o[1]=r,o[2]=n,o[3]=i):(o[2]=t,o[3]=r,o[0]=n,o[1]=i),o.join("")}}get bin_mq_nl(){return this.byteArray.readInt32LE(this.bytes.start+12)}get flag_nc(){return this.byteArray.readInt32LE(this.bytes.start+16)}get seq_length(){return this.byteArray.readInt32LE(this.bytes.start+20)}get next_refid(){return this.byteArray.readInt32LE(this.bytes.start+24)}get next_pos(){return this.byteArray.readInt32LE(this.bytes.start+28)}get template_length(){return this.byteArray.readInt32LE(this.bytes.start+32)}toJSON(){const t={};for(const n of Object.keys(this))n.startsWith("_")||n==="bytes"||(t[n]=this[n]);return t}}function Mu(e,t){const n=Object.getOwnPropertyDescriptor(e.prototype,t);if(!n)throw new Error("OH NO, NO PROPERTY DESCRIPTOR");const r=n.get;if(!r)throw new Error("OH NO, NOT A GETTER");Object.defineProperty(e.prototype,t,{get(){const i=r.call(this);return Object.defineProperty(this,t,{value:i}),i}})}Mu(Xo,"tags"),Mu(Xo,"cigarAndLength"),Mu(Xo,"seq"),Mu(Xo,"qual");function kv(e){const t=e.split(/\r?\n/),n=[];for(const r of t){const[i,...o]=r.split(/\t/);i&&n.push({tag:i.slice(1),data:o.map(a=>{const s=a.indexOf(":"),c=a.slice(0,s),l=a.slice(s+1);return{tag:c,value:l}})})}return n}const Bv=21840194,Rv=65536;async function Y7(e){let t=[];for await(const n of e)t=t.concat(n);return t}class Q7{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 Fv{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:o,baiUrl:a,csiPath:s,csiFilehandle:c,csiUrl:l,htsget:u,yieldThreadTime:f=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new Ui({cache:new mu({maxSize:50}),fill:async(d,p)=>{const{chunk:b,opts:v}=d,{data:y,cpositions:A,dpositions:_}=await this._readChunk({chunk:b,opts:{...v,signal:p}});return this.readBamFeatures(y,A,_,b)}}),this.renameRefSeq=h,t)this.bam=t;else if(n)this.bam=new Tt(n);else if(r)this.bam=new Fn(r);else if(u)this.htsget=!0,this.bam=new Q7;else throw new Error("unable to initialize bam");if(c)this.index=new Fu({filehandle:c});else if(s)this.index=new Fu({filehandle:new Tt(s)});else if(l)this.index=new Fu({filehandle:new Fn(l)});else if(o)this.index=new Qo({filehandle:o});else if(i)this.index=new Qo({filehandle:new Tt(i)});else if(a)this.index=new Qo({filehandle:new Fn(a)});else if(n)this.index=new Qo({filehandle:new Tt(`${n}.bai`)});else if(r)this.index=new Qo({filehandle:new Fn(`${r}.bai`)});else if(u)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=f}async getHeaderPre(t){const n=L7(t);if(!this.index)return;const r=await this.index.parse(n),i=r.firstDataLine?r.firstDataLine.blockPosition+65535:void 0;let o;if(i){const u=i+Rv,f=await this.bam.read($e.Buffer.alloc(u),0,u,0,n);if(!f.bytesRead)throw new Error("Error reading header");o=f.buffer.subarray(0,Math.min(f.bytesRead,i))}else o=await this.bam.readFile(n);const a=await Qr(o);if(a.readInt32LE(0)!==Bv)throw new Error("Not a BAM file");const s=a.readInt32LE(4);this.header=a.toString("utf8",8,8+s);const{chrToIndex:c,indexToChr:l}=await this._readRefSeqs(s+8,65535,n);return this.chrToIndex=c,this.indexToChr=l,kv(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+Rv,{bytesRead:o,buffer:a}=await this.bam.read($e.Buffer.alloc(i),0,n,0,r);if(!o)throw new Error("Error reading refseqs from header");const s=await Qr(a.subarray(0,Math.min(o,n))),c=s.readInt32LE(t);let l=t+4;const u={},f=[];for(let h=0;h<c;h+=1){const d=s.readInt32LE(l),p=this.renameRefSeq(s.toString("utf8",l+4,l+4+d-1)),b=s.readInt32LE(l+d+4);if(u[p]=h,f.push({refName:p,length:b}),l=l+8+d,l>s.length)return console.warn(`BAM header is very big. Re-fetching ${n} bytes.`),this._readRefSeqs(t,n*2,r)}return{chrToIndex:u,indexToChr:f}}async getRecordsForRange(t,n,r,i){return Y7(this.streamRecordsForRange(t,n,r,i))}async*streamRecordsForRange(t,n,r,i){var o;await this.getHeader(i);const a=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(a===void 0||!this.index)yield[];else{const s=await this.index.blocksForRange(a,n-1,r,i);yield*this._fetchChunkFeatures(s,a,n,r,i)}}async*_fetchChunkFeatures(t,n,r,i,o={}){const{viewAsPairs:a}=o,s=[];let c=!1;for(const l of t){const u=await this.featureCache.get(l.toString(),{chunk:l,opts:o},o.signal),f=[];for(const h of u)if(h.ref_id===n)if(h.start>=i){c=!0;break}else h.end>=r&&f.push(h);if(s.push(f),yield f,c)break}M7(o.signal),a&&(yield this.fetchPairs(n,s,o))}async fetchPairs(t,n,r){const{pairAcrossChr:i,maxInsertSize:o=2e5}=r,a={},s={};n.map(h=>{const d={};for(const p of h){const b=p.name,v=p.id;d[b]||(d[b]=0),d[b]++,s[v]=1}for(const[p,b]of Object.entries(d))b===1&&(a[p]=!0)});const c=[];n.map(h=>{for(const d of h){const p=d.name,b=d.start,v=d.next_pos,y=d.next_refid;this.index&&a[p]&&(i||y===t&&Math.abs(b-v)<o)&&c.push(this.index.blocksForRange(y,v,v+1,r))}});const l=new Map,u=await Promise.all(c);for(const h of u.flat())l.has(h.toString())||l.set(h.toString(),h);return(await Promise.all([...l.values()].map(async h=>{const{data:d,cpositions:p,dpositions:b,chunk:v}=await this._readChunk({chunk:h,opts:r}),y=[];for(const A of await this.readBamFeatures(d,p,b,v))a[A.name]&&!s[A.id]&&y.push(A);return y}))).flat()}async _readRegion(t,n,r={}){const{bytesRead:i,buffer:o}=await this.bam.read($e.Buffer.alloc(n),0,n,t,r);return o.subarray(0,Math.min(i,n))}async _readChunk({chunk:t,opts:n}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n),{buffer:i,cpositions:o,dpositions:a}=await dw(r,t);return{data:i,cpositions:o,dpositions:a,chunk:t}}async readBamFeatures(t,n,r,i){let o=0;const a=[];let s=0,c=+Date.now();for(;o+4<t.length;){const l=t.readInt32LE(o),u=o+4+l-1;if(r){for(;o+i.minv.dataPosition>=r[s++];);s--}if(u<t.length){const f=new Xo({bytes:{byteArray:t,start:o,end:u},fileOffset:n.length>0?n[s]*256+(o-r[s])+i.minv.dataPosition+1:q7.signed(t.slice(o,u))});a.push(f),this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime&&(await F7(1),c=+Date.now())}o=u+1}return a}async hasRefSeq(t){var n,r;const i=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return i===void 0?!1:(r=this.index)===null||r===void 0?void 0:r.hasRefSeq(i)}async lineCount(t){var n;const r=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return r===void 0||!this.index?0:this.index.lineCount(r)}async indexCov(t,n,r){var i;if(!this.index)return[];await this.index.parse();const o=(i=this.chrToIndex)===null||i===void 0?void 0:i[t];return o===void 0?[]:this.index.indexCov(o,n,r)}async blocksForRange(t,n,r,i){var o;if(!this.index)return[];await this.index.parse();const a=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];return a===void 0?[]:this.index.blocksForRange(a,n,r,i)}}async function Mv(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:o}=r;if(i.startsWith("data:"))return $e.Buffer.from(i.split(",")[1],"base64");{const{referer:a,...s}=o,c=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...s}});if(!c.ok)throw new Error(`HTTP ${c.status} fetching ${i}: ${await c.text()}`);return $e.Buffer.from(await c.arrayBuffer())}}));return $e.Buffer.concat(await Promise.all(n.map(r=>Qr(r))))}class X7 extends Fv{constructor(t){super({htsget:!0}),this.baseUrl=t.baseUrl,this.trackId=t.trackId}async*streamRecordsForRange(t,n,r,i){var o;const s=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${t}&start=${n}&end=${r}&format=BAM`,c=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(c===void 0)yield[];else{const l=await fetch(s,{...i});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${s}: ${await l.text()}`);const u=await l.json(),f=await Mv(u.htsget.urls.slice(1),i);yield*this._fetchChunkFeatures([{buffer:f,_fetchedSize:void 0,bin:0,compareTo(){return 0},toUniqueString(){return`${t}_${n}_${r}`},fetchedSize(){return 0},minv:{dataPosition:0,blockPosition:0,compareTo:()=>0},maxv:{dataPosition:Number.MAX_SAFE_INTEGER,blockPosition:0,compareTo:()=>0},toString(){return`${t}_${n}_${r}`}}],c,n,r,i)}}async _readChunk({chunk:t}){if(!t.buffer)throw new Error("expected chunk.buffer in htsget");return{data:t.buffer,cpositions:[],dpositions:[],chunk:t}}async getHeader(t={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,r=await fetch(n,t);if(!r.ok)throw new Error(`HTTP ${r.status} fetching ${n}: ${await r.text()}`);const i=await r.json(),o=await Mv(i.htsget.urls,t);if(o.readInt32LE(0)!==Bv)throw new Error("Not a BAM file");const a=o.readInt32LE(4),s=o.toString("utf8",8,8+a),c=kv(s),l=[],u={},f=c.filter(h=>h.tag==="SQ");for(const[h,d]of f.entries()){let p="",b=0;for(const v of d.data)v.tag==="SN"?p=v.value:v.tag==="LN"&&(b=+v.value);u[p]=h,l[h]={refName:p,length:b}}return this.chrToIndex=u,this.indexToChr=l,c}}const K7=Object.freeze(Object.defineProperty({__proto__:null,BAI:Qo,BamFile:Fv,BamRecord:Xo,CSI:Fu,HtsgetFile:X7},Symbol.toStringTag,{value:"Module"}));function Pv(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class J7 extends Error{}function Ko(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new J7("aborted");throw t.code="ERR_ABORTED",t}}}function $7(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function Lv(e,t){const n=[];let r=null;return e.length===0?e:(e.sort(function(i,o){const a=i.minv.blockPosition-o.minv.blockPosition;return a!==0?a:i.minv.dataPosition-o.minv.dataPosition}),e.forEach(i=>{(!t||i.maxv.compareTo(t)>0)&&(r===null?(n.push(i),r=i):$7(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class q0{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}}function Jo(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new q0(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 Pu{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 Nv{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 eP=21578324,Ov=14;function tP(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 $o extends Nv{async lineCount(t,n={}){const r=await this.parse(n),i=r.refNameToId[t];if(i===void 0||!r.indices[i])return-1;const{stats:a}=r.indices[i];return a?a.lineCount:-1}async _parse(t={}){const n=await this.filehandle.readFile(t),r=await Qr(n);if(Ko(t.signal),r.readUInt32LE(0)!==eP)throw new Error("Not a TBI file");const i=r.readInt32LE(4),o=r.readInt32LE(8),a=o&65536?"zero-based-half-open":"1-based-closed",c={0:"generic",1:"SAM",2:"VCF"}[o&15];if(!c)throw new Error(`invalid Tabix preset format flags ${o}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},u=r.readInt32LE(24),f=5,h=((1<<(f+1)*3)-1)/7,d=2**(14+f*3),p=u?String.fromCharCode(u):null,b=r.readInt32LE(28),v=r.readInt32LE(32),{refNameToId:y,refIdToName:A}=this._parseNameBytes(r.slice(36,36+v));let _=36+v,E;return{indices:new Array(i).fill(0).map(()=>{const R=r.readInt32LE(_);_+=4;const D={};let O;for(let S=0;S<R;S+=1){const Z=r.readUInt32LE(_);if(_+=4,Z>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(Z===h+1){const Q=r.readInt32LE(_);_+=4,Q===2&&(O=this.parsePseudoBin(r,_)),_+=16*Q}else{const Q=r.readInt32LE(_);_+=4;const se=new Array(Q);for(let ce=0;ce<Q;ce+=1){const fe=Jo(r,_),le=Jo(r,_+8);_+=16,E=this._findFirstData(E,fe),se[ce]=new Pu(fe,le,Z)}D[Z]=se}}const F=r.readInt32LE(_);_+=4;const P=new Array(F);for(let S=0;S<F;S+=1)P[S]=Jo(r,_),_+=8,E=this._findFirstData(E,P[S]);return{binIndex:D,linearIndex:P,stats:O}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:b,firstDataLine:E,columnNumbers:l,coordinateType:a,format:c,refIdToName:A,refNameToId:y,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:Pv(pu.fromBytesLE(t.slice(n+16,n+24),!0))}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let a=0;a<t.length;a+=1)if(!t[a]){if(r<a){let s=t.toString("utf8",r,a);s=this.renameRefSeq(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i),a=o.refNameToId[t];if(a===void 0)return[];const s=o.indices[a];if(!s)return[];(s.linearIndex.length?s.linearIndex[n>>Ov>=s.linearIndex.length?s.linearIndex.length-1:n>>Ov]:new q0(0,0))||console.warn("querying outside of possible tabix range");const l=tP(n,r),u=[];for(const[b,v]of l)for(let y=b;y<=v;y++)if(s.binIndex[y])for(const A of s.binIndex[y])u.push(new Pu(A.minv,A.maxv,y));const f=s.linearIndex.length;let h=null;const d=Math.min(n>>14,f-1),p=Math.min(r>>14,f-1);for(let b=d;b<=p;++b){const v=s.linearIndex[b];v&&(!h||v.compareTo(h)<0)&&(h=v)}return Lv(u,h)}}const nP=21582659,rP=38359875;function iP(e,t){return e*2**t}function zv(e,t){return Math.floor(e/2**t)}class Lu extends Nv{constructor(t){super(t),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n={}){const r=await this.parse(n),i=r.refNameToId[t];if(i===void 0||!r.indices[i])return-1;const{stats:a}=r.indices[i];return a?a.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",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),c=s?String.fromCharCode(s):null,l=t.readInt32LE(n+20),u=t.readInt32LE(n+24),{refIdToName:f,refNameToId:h}=this._parseNameBytes(t.slice(n+28,n+28+u));return{refIdToName:f,refNameToId:h,skipLines:l,metaChar:c,columnNumbers:a,format:o,coordinateType:i}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let a=0;a<t.length;a+=1)if(!t[a]){if(r<a){let s=t.toString("utf8",r,a);s=this.renameRefSeq(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}async _parse(t={}){const n=await Qr(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===nP)r=1;else if(n.readUInt32LE(0)===rP)r=2;else throw new Error("Not a CSI file");this.minShift=n.readInt32LE(4),this.depth=n.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const i=2**(this.minShift+this.depth*3),o=n.readInt32LE(12),a=o&&o>=30?this.parseAuxData(n,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},s=n.readInt32LE(16+o);let c,l=16+o+4;const u=new Array(s).fill(0).map(()=>{const f=n.readInt32LE(l);l+=4;const h={};let d;for(let p=0;p<f;p+=1){const b=n.readUInt32LE(l);if(b>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=48;else{const v=Jo(n,l+4);c=this._findFirstData(c,v);const y=n.readInt32LE(l+12);l+=16;const A=new Array(y);for(let _=0;_<y;_+=1){const E=Jo(n,l),C=Jo(n,l+8);l+=16,A[_]=new Pu(E,C,b)}h[b]=A}}return{binIndex:h,stats:d}});return{...a,csi:!0,refCount:s,maxBlockSize:65536,firstDataLine:c,csiVersion:r,indices:u,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:Pv(pu.fromBytesLE(t.slice(n+28,n+36),!0))}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i),a=o.refNameToId[t];if(a===void 0)return[];const s=o.indices[a];if(!s)return[];const c=this.reg2bins(n,r),l=[];for(const[u,f]of c)for(let h=u;h<=f;h++)if(s.binIndex[h])for(const d of s.binIndex[h])l.push(new Pu(d.minv,d.maxv,h));return Lv(l,new q0(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,o=this.minShift+this.depth*3;const a=[];for(;r<=this.depth;o-=3,i+=iP(1,r*3),r+=1){const s=i+zv(t,o),c=i+zv(n,o);if(c-s+a.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);a.push([s,c])}return a}}const j0=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function oP(e){return new Promise(t=>setTimeout(t,e))}class aP{constructor({path:t,filehandle:n,url:r,tbiPath:i,tbiUrl:o,tbiFilehandle:a,csiPath:s,csiUrl:c,csiFilehandle:l,yieldTime:u=500,renameRefSeqs:f=d=>d,chunkCacheSize:h=5*2**20}){if(n)this.filehandle=n;else if(t)this.filehandle=new Tt(t);else if(r)this.filehandle=new Fn(r);else throw new TypeError("must provide either filehandle or path");if(a)this.index=new $o({filehandle:a,renameRefSeqs:f});else if(l)this.index=new Lu({filehandle:l,renameRefSeqs:f});else if(i)this.index=new $o({filehandle:new Tt(i),renameRefSeqs:f});else if(s)this.index=new Lu({filehandle:new Tt(s),renameRefSeqs:f});else if(t)this.index=new $o({filehandle:new Tt(`${t}.tbi`),renameRefSeqs:f});else if(c)this.index=new Lu({filehandle:new Fn(c)});else if(o)this.index=new $o({filehandle:new Fn(o)});else if(r)this.index=new $o({filehandle:new Fn(`${r}.tbi`)});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.renameRefSeq=f,this.yieldTime=u,this.chunkCache=new Ui({cache:new mu({maxSize:Math.floor(h/65536)}),fill:(d,p)=>this.readChunk(d,{signal:p})})}async getLines(t,n,r,i){var o;let a,s={},c;typeof i=="function"?c=i:(s=i,c=i.lineCallback,a=i.signal);const l=await this.index.getMetadata(s);Ko(a);const u=n??0,f=r??l.maxRefLength;if(!(u<=f))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(u===f)return;const h=await this.index.blocksForRange(t,u,f,s);Ko(a);let d=Date.now();for(const p of h){let b;const{buffer:v,cpositions:y,dpositions:A}=await this.chunkCache.get(p.toString(),p,a);Ko(a);let _=0,E=0;for(;_<v.length;){const C=v.indexOf(`
|
|
790
|
-
`,_);if(C===-1)break;const R=v.slice(_,C),D=(o=j0==null?void 0:j0.decode(R))!==null&&o!==void 0?o:R.toString();if(A){for(;_+p.minv.dataPosition>=A[E++];);E--}const{startCoordinate:O,overlaps:F}=this.checkLine(l,t,u,f,D);if(b!==void 0&&O!==void 0&&b>O)throw new Error(`Lines not sorted by start coordinate (${b} > ${O}), this file is not usable with Tabix.`);if(b=O,F)c(D.trim(),y[E]*256+(_-A[E])+p.minv.dataPosition+1);else if(O!==void 0&&O>=f)return;this.yieldTime&&d-Date.now()>this.yieldTime&&(d=Date.now(),Ko(a),await oP(1)),_=C+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:n,metaChar:r,maxBlockSize:i}=await this.getMetadata(t);Ko(t.signal);const o=((n==null?void 0:n.blockPosition)||0)+i,a=await this._readRegion(0,o,t),s=await Qr(a);if(r){let c=-1;const l=10,u=r.charCodeAt(0);for(let f=0;f<s.length&&!(f===c+1&&s[f]!==u);f+=1)s[f]===l&&(c=f);return s.slice(0,c+1)}return s}async getHeader(t={}){return(await this.getHeaderBuffer(t)).toString("utf8")}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,n,r,i,o){const{columnNumbers:a,metaChar:s,coordinateType:c,format:l}=t;if(s&&o.startsWith(s))return{overlaps:!1};let{ref:u,start:f,end:h}=a;u||(u=0),f||(f=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(u,f,h);let p=1,b=0,v="",y=-1/0;for(let A=0;A<o.length+1;A+=1)if(o[A]===" "||A===o.length){if(p===u){if(this.renameRefSeq(o.slice(b,A))!==n)return{overlaps:!1}}else if(p===f){if(y=parseInt(o.slice(b,A),10),c==="1-based-closed"&&(y-=1),y>=i)return{startCoordinate:y,overlaps:!1};if((h===0||h===f)&&y+1<=r)return{startCoordinate:y,overlaps:!1}}else if(l==="VCF"&&p===4)v=o.slice(b,A);else if(p===h&&(l==="VCF"?this._getVcfEnd(y,v,o.slice(b,A)):parseInt(o.slice(b,A),10))<=r)return{overlaps:!1};if(b=A+1,p+=1,p>d)break}return{startCoordinate:y,overlaps:!0}}_getVcfEnd(t,n,r){let i=t+n.length;const o=r.includes("SVTYPE=TRA");if(r[0]!=="."&&!o){let a=";";for(let s=0;s<r.length;s+=1){if(a===";"&&r.slice(s,s+4)==="END="){let c=r.indexOf(";",s);c===-1&&(c=r.length),i=parseInt(r.slice(s+4,c),10);break}a=r[s]}}else if(o)return t+1;return i}async lineCount(t,n={}){return this.index.lineCount(t,n)}async _readRegion(t,n,r={}){const i=$e.Buffer.alloc(n),{bytesRead:o,buffer:a}=await this.filehandle.read(i,0,n,t,r);return a.slice(0,o)}async readChunk(t,n={}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n);return dw(r,t)}}const sP=Object.freeze(Object.defineProperty({__proto__:null,CSI:Lu,TBI:$o,TabixIndexedFile:aP},Symbol.toStringTag,{value:"Module"}));var Nu={exports:{}},Uv;function W0(){if(Uv)return Nu.exports;Uv=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(C,R,D){return Function.prototype.apply.call(C,R,D)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:n=function(C){return Object.getOwnPropertyNames(C)};function r(E){console&&console.warn&&console.warn(E)}var i=Number.isNaN||function(C){return C!==C};function o(){o.init.call(this)}Nu.exports=o,Nu.exports.once=y,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(E){if(typeof E!="number"||E<0||i(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");a=E}}),o.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},o.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||i(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function c(E){return E._maxListeners===void 0?o.defaultMaxListeners:E._maxListeners}o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(C){for(var R=[],D=1;D<arguments.length;D++)R.push(arguments[D]);var O=C==="error",F=this._events;if(F!==void 0)O=O&&F.error===void 0;else if(!O)return!1;if(O){var P;if(R.length>0&&(P=R[0]),P instanceof Error)throw P;var S=new Error("Unhandled error."+(P?" ("+P.message+")":""));throw S.context=P,S}var Z=F[C];if(Z===void 0)return!1;if(typeof Z=="function")t(Z,this,R);else for(var Q=Z.length,se=p(Z,Q),D=0;D<Q;++D)t(se[D],this,R);return!0};function l(E,C,R,D){var O,F,P;if(s(R),F=E._events,F===void 0?(F=E._events=Object.create(null),E._eventsCount=0):(F.newListener!==void 0&&(E.emit("newListener",C,R.listener?R.listener:R),F=E._events),P=F[C]),P===void 0)P=F[C]=R,++E._eventsCount;else if(typeof P=="function"?P=F[C]=D?[R,P]:[P,R]:D?P.unshift(R):P.push(R),O=c(E),O>0&&P.length>O&&!P.warned){P.warned=!0;var S=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");S.name="MaxListenersExceededWarning",S.emitter=E,S.type=C,S.count=P.length,r(S)}return E}o.prototype.addListener=function(C,R){return l(this,C,R,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(C,R){return l(this,C,R,!0)};function u(){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 f(E,C,R){var D={fired:!1,wrapFn:void 0,target:E,type:C,listener:R},O=u.bind(D);return O.listener=R,D.wrapFn=O,O}o.prototype.once=function(C,R){return s(R),this.on(C,f(this,C,R)),this},o.prototype.prependOnceListener=function(C,R){return s(R),this.prependListener(C,f(this,C,R)),this},o.prototype.removeListener=function(C,R){var D,O,F,P,S;if(s(R),O=this._events,O===void 0)return this;if(D=O[C],D===void 0)return this;if(D===R||D.listener===R)--this._eventsCount===0?this._events=Object.create(null):(delete O[C],O.removeListener&&this.emit("removeListener",C,D.listener||R));else if(typeof D!="function"){for(F=-1,P=D.length-1;P>=0;P--)if(D[P]===R||D[P].listener===R){S=D[P].listener,F=P;break}if(F<0)return this;F===0?D.shift():b(D,F),D.length===1&&(O[C]=D[0]),O.removeListener!==void 0&&this.emit("removeListener",C,S||R)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(C){var R,D,O;if(D=this._events,D===void 0)return this;if(D.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):D[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete D[C]),this;if(arguments.length===0){var F=Object.keys(D),P;for(O=0;O<F.length;++O)P=F[O],P!=="removeListener"&&this.removeAllListeners(P);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(R=D[C],typeof R=="function")this.removeListener(C,R);else if(R!==void 0)for(O=R.length-1;O>=0;O--)this.removeListener(C,R[O]);return this};function h(E,C,R){var D=E._events;if(D===void 0)return[];var O=D[C];return O===void 0?[]:typeof O=="function"?R?[O.listener||O]:[O]:R?v(O):p(O,O.length)}o.prototype.listeners=function(C){return h(this,C,!0)},o.prototype.rawListeners=function(C){return h(this,C,!1)},o.listenerCount=function(E,C){return typeof E.listenerCount=="function"?E.listenerCount(C):d.call(E,C)},o.prototype.listenerCount=d;function d(E){var C=this._events;if(C!==void 0){var R=C[E];if(typeof R=="function")return 1;if(R!==void 0)return R.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function p(E,C){for(var R=new Array(C),D=0;D<C;++D)R[D]=E[D];return R}function b(E,C){for(;C+1<E.length;C++)E[C]=E[C+1];E.pop()}function v(E){for(var C=new Array(E.length),R=0;R<C.length;++R)C[R]=E[R].listener||E[R];return C}function y(E,C){return new Promise(function(R,D){function O(P){E.removeListener(C,F),D(P)}function F(){typeof E.removeListener=="function"&&E.removeListener("error",O),R([].slice.call(arguments))}_(E,C,F,{once:!0}),C!=="error"&&A(E,O,{once:!0})})}function A(E,C,R){typeof E.on=="function"&&_(E,"error",C,R)}function _(E,C,R,D){if(typeof E.on=="function")D.once?E.once(C,R):E.on(C,R);else if(typeof E.addEventListener=="function")E.addEventListener(C,function O(F){D.once&&E.removeEventListener(C,O),R(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E)}return Nu.exports}var Ou={exports:{}},Gv;function ea(){return Gv||(Gv=1,typeof Object.create=="function"?Ou.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Ou.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}),Ou.exports}var Z0,Hv;function Vv(){return Hv||(Hv=1,Z0=W0().EventEmitter),Z0}const qv=zR(VR);var Y0,jv;function cP(){if(jv)return Y0;jv=1;function e(p,b){var v=Object.keys(p);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(p);b&&(y=y.filter(function(A){return Object.getOwnPropertyDescriptor(p,A).enumerable})),v.push.apply(v,y)}return v}function t(p){for(var b=1;b<arguments.length;b++){var v=arguments[b]!=null?arguments[b]:{};b%2?e(Object(v),!0).forEach(function(y){n(p,y,v[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(v)):e(Object(v)).forEach(function(y){Object.defineProperty(p,y,Object.getOwnPropertyDescriptor(v,y))})}return p}function n(p,b,v){return b=a(b),b in p?Object.defineProperty(p,b,{value:v,enumerable:!0,configurable:!0,writable:!0}):p[b]=v,p}function r(p,b){if(!(p instanceof b))throw new TypeError("Cannot call a class as a function")}function i(p,b){for(var v=0;v<b.length;v++){var y=b[v];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,a(y.key),y)}}function o(p,b,v){return b&&i(p.prototype,b),Object.defineProperty(p,"prototype",{writable:!1}),p}function a(p){var b=s(p,"string");return typeof b=="symbol"?b:String(b)}function s(p,b){if(typeof p!="object"||p===null)return p;var v=p[Symbol.toPrimitive];if(v!==void 0){var y=v.call(p,b||"default");if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(p)}var c=Gs(),l=c.Buffer,u=qv,f=u.inspect,h=f&&f.custom||"inspect";function d(p,b,v){l.prototype.copy.call(p,b,v)}return Y0=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return o(p,[{key:"push",value:function(v){var y={data:v,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(v){var y={data:v,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var y=this.head,A=""+y.data;y=y.next;)A+=v+y.data;return A}},{key:"concat",value:function(v){if(this.length===0)return l.alloc(0);for(var y=l.allocUnsafe(v>>>0),A=this.head,_=0;A;)d(A.data,y,_),_+=A.data.length,A=A.next;return y}},{key:"consume",value:function(v,y){var A;return v<this.head.data.length?(A=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):v===this.head.data.length?A=this.shift():A=y?this._getString(v):this._getBuffer(v),A}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var y=this.head,A=1,_=y.data;for(v-=_.length;y=y.next;){var E=y.data,C=v>E.length?E.length:v;if(C===E.length?_+=E:_+=E.slice(0,v),v-=C,v===0){C===E.length?(++A,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=E.slice(C));break}++A}return this.length-=A,_}},{key:"_getBuffer",value:function(v){var y=l.allocUnsafe(v),A=this.head,_=1;for(A.data.copy(y),v-=A.data.length;A=A.next;){var E=A.data,C=v>E.length?E.length:v;if(E.copy(y,y.length-v,0,C),v-=C,v===0){C===E.length?(++_,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=E.slice(C));break}++_}return this.length-=_,y}},{key:h,value:function(v,y){return f(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),p}(),Y0}var Q0,Wv;function Zv(){if(Wv)return Q0;Wv=1;function e(a,s){var c=this,l=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return l||u?(s?s(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,a)):process.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(f){!s&&f?c._writableState?c._writableState.errorEmitted?process.nextTick(n,c):(c._writableState.errorEmitted=!0,process.nextTick(t,c,f)):process.nextTick(t,c,f):s?(process.nextTick(n,c),s(f)):process.nextTick(n,c)}),this)}function t(a,s){i(a,s),n(a)}function n(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(a,s){a.emit("error",s)}function o(a,s){var c=a._readableState,l=a._writableState;c&&c.autoDestroy||l&&l.autoDestroy?a.destroy(s):a.emit("error",s)}return Q0={destroy:e,undestroy:r,errorOrDestroy:o},Q0}var X0={},Yv;function ta(){if(Yv)return X0;Yv=1;function e(s,c){s.prototype=Object.create(c.prototype),s.prototype.constructor=s,s.__proto__=c}var t={};function n(s,c,l){l||(l=Error);function u(h,d,p){return typeof c=="string"?c:c(h,d,p)}var f=function(h){e(d,h);function d(p,b,v){return h.call(this,u(p,b,v))||this}return d}(l);f.prototype.name=l.name,f.prototype.code=s,t[s]=f}function r(s,c){if(Array.isArray(s)){var l=s.length;return s=s.map(function(u){return String(u)}),l>2?"one of ".concat(c," ").concat(s.slice(0,l-1).join(", "),", or ")+s[l-1]:l===2?"one of ".concat(c," ").concat(s[0]," or ").concat(s[1]):"of ".concat(c," ").concat(s[0])}else return"of ".concat(c," ").concat(String(s))}function i(s,c,l){return s.substr(0,c.length)===c}function o(s,c,l){return(l===void 0||l>s.length)&&(l=s.length),s.substring(l-c.length,l)===c}function a(s,c,l){return typeof l!="number"&&(l=0),l+c.length>s.length?!1:s.indexOf(c,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,c){return'The value "'+c+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,c,l){var u;typeof c=="string"&&i(c,"not ")?(u="must not be",c=c.replace(/^not /,"")):u="must be";var f;if(o(s," argument"))f="The ".concat(s," ").concat(u," ").concat(r(c,"type"));else{var h=a(s,".")?"property":"argument";f='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(c,"type"))}return f+=". Received type ".concat(typeof l),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),X0.codes=t,X0}var K0,Qv;function Xv(){if(Qv)return K0;Qv=1;var e=ta().codes.ERR_INVALID_OPT_VALUE;function t(r,i,o){return r.highWaterMark!=null?r.highWaterMark:i?r[o]:null}function n(r,i,o,a){var s=t(i,a,o);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var c=a?o:"highWaterMark";throw new e(c,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return K0={getHighWaterMark:n},K0}var J0,Kv;function lP(){if(Kv)return J0;Kv=1,J0=e;function e(n,r){if(t("noDeprecation"))return n;var i=!1;function o(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return n.apply(this,arguments)}return o}function t(n){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return J0}var $0,Jv;function $v(){if(Jv)return $0;Jv=1,$0=O;function e(j){var q=this;this.next=null,this.entry=null,this.finish=function(){Le(q,j)}}var t;O.WritableState=R;var n={deprecate:lP()},r=Vv(),i=Gs().Buffer,o=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(j){return i.from(j)}function s(j){return i.isBuffer(j)||j instanceof o}var c=Zv(),l=Xv(),u=l.getHighWaterMark,f=ta().codes,h=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,b=f.ERR_STREAM_CANNOT_PIPE,v=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,A=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,E=c.errorOrDestroy;ea()(O,r);function C(){}function R(j,q,re){t=t||na(),j=j||{},typeof re!="boolean"&&(re=q instanceof t),this.objectMode=!!j.objectMode,re&&(this.objectMode=this.objectMode||!!j.writableObjectMode),this.highWaterMark=u(this,j,"writableHighWaterMark",re),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var $=j.decodeStrings===!1;this.decodeStrings=!$,this.defaultEncoding=j.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ue){fe(q,ue)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=j.emitClose!==!1,this.autoDestroy=!!j.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}R.prototype.getBuffer=function(){for(var q=this.bufferedRequest,re=[];q;)re.push(q),q=q.next;return re},function(){try{Object.defineProperty(R.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var D;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(D=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(q){return D.call(this,q)?!0:this!==O?!1:q&&q._writableState instanceof R}})):D=function(q){return q instanceof this};function O(j){t=t||na();var q=this instanceof t;if(!q&&!D.call(O,this))return new O(j);this._writableState=new R(j,this,q),this.writable=!0,j&&(typeof j.write=="function"&&(this._write=j.write),typeof j.writev=="function"&&(this._writev=j.writev),typeof j.destroy=="function"&&(this._destroy=j.destroy),typeof j.final=="function"&&(this._final=j.final)),r.call(this)}O.prototype.pipe=function(){E(this,new b)};function F(j,q){var re=new A;E(j,re),process.nextTick(q,re)}function P(j,q,re,$){var ue;return re===null?ue=new y:typeof re!="string"&&!q.objectMode&&(ue=new h("chunk",["string","Buffer"],re)),ue?(E(j,ue),process.nextTick($,ue),!1):!0}O.prototype.write=function(j,q,re){var $=this._writableState,ue=!1,L=!$.objectMode&&s(j);return L&&!i.isBuffer(j)&&(j=a(j)),typeof q=="function"&&(re=q,q=null),L?q="buffer":q||(q=$.defaultEncoding),typeof re!="function"&&(re=C),$.ending?F(this,re):(L||P(this,$,j,re))&&($.pendingcb++,ue=Z(this,$,L,j,q,re)),ue},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var j=this._writableState;j.corked&&(j.corked--,!j.writing&&!j.corked&&!j.bufferProcessing&&j.bufferedRequest&&pe(this,j))},O.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=q.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((q+"").toLowerCase())>-1))throw new _(q);return this._writableState.defaultEncoding=q,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function S(j,q,re){return!j.objectMode&&j.decodeStrings!==!1&&typeof q=="string"&&(q=i.from(q,re)),q}Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Z(j,q,re,$,ue,L){if(!re){var I=S(q,$,ue);$!==I&&(re=!0,ue="buffer",$=I)}var ee=q.objectMode?1:$.length;q.length+=ee;var oe=q.length<q.highWaterMark;if(oe||(q.needDrain=!0),q.writing||q.corked){var Ie=q.lastBufferedRequest;q.lastBufferedRequest={chunk:$,encoding:ue,isBuf:re,callback:L,next:null},Ie?Ie.next=q.lastBufferedRequest:q.bufferedRequest=q.lastBufferedRequest,q.bufferedRequestCount+=1}else Q(j,q,!1,ee,$,ue,L);return oe}function Q(j,q,re,$,ue,L,I){q.writelen=$,q.writecb=I,q.writing=!0,q.sync=!0,q.destroyed?q.onwrite(new v("write")):re?j._writev(ue,q.onwrite):j._write(ue,L,q.onwrite),q.sync=!1}function se(j,q,re,$,ue){--q.pendingcb,re?(process.nextTick(ue,$),process.nextTick(Te,j,q),j._writableState.errorEmitted=!0,E(j,$)):(ue($),j._writableState.errorEmitted=!0,E(j,$),Te(j,q))}function ce(j){j.writing=!1,j.writecb=null,j.length-=j.writelen,j.writelen=0}function fe(j,q){var re=j._writableState,$=re.sync,ue=re.writecb;if(typeof ue!="function")throw new p;if(ce(re),q)se(j,re,$,q,ue);else{var L=_e(re)||j.destroyed;!L&&!re.corked&&!re.bufferProcessing&&re.bufferedRequest&&pe(j,re),$?process.nextTick(le,j,re,L,ue):le(j,re,L,ue)}}function le(j,q,re,$){re||Ee(j,q),q.pendingcb--,$(),Te(j,q)}function Ee(j,q){q.length===0&&q.needDrain&&(q.needDrain=!1,j.emit("drain"))}function pe(j,q){q.bufferProcessing=!0;var re=q.bufferedRequest;if(j._writev&&re&&re.next){var $=q.bufferedRequestCount,ue=new Array($),L=q.corkedRequestsFree;L.entry=re;for(var I=0,ee=!0;re;)ue[I]=re,re.isBuf||(ee=!1),re=re.next,I+=1;ue.allBuffers=ee,Q(j,q,!0,q.length,ue,"",L.finish),q.pendingcb++,q.lastBufferedRequest=null,L.next?(q.corkedRequestsFree=L.next,L.next=null):q.corkedRequestsFree=new e(q),q.bufferedRequestCount=0}else{for(;re;){var oe=re.chunk,Ie=re.encoding,ye=re.callback,xe=q.objectMode?1:oe.length;if(Q(j,q,!1,xe,oe,Ie,ye),re=re.next,q.bufferedRequestCount--,q.writing)break}re===null&&(q.lastBufferedRequest=null)}q.bufferedRequest=re,q.bufferProcessing=!1}O.prototype._write=function(j,q,re){re(new d("_write()"))},O.prototype._writev=null,O.prototype.end=function(j,q,re){var $=this._writableState;return typeof j=="function"?(re=j,j=null,q=null):typeof q=="function"&&(re=q,q=null),j!=null&&this.write(j,q),$.corked&&($.corked=1,this.uncork()),$.ending||Ve(this,$,re),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function _e(j){return j.ending&&j.length===0&&j.bufferedRequest===null&&!j.finished&&!j.writing}function Ce(j,q){j._final(function(re){q.pendingcb--,re&&E(j,re),q.prefinished=!0,j.emit("prefinish"),Te(j,q)})}function we(j,q){!q.prefinished&&!q.finalCalled&&(typeof j._final=="function"&&!q.destroyed?(q.pendingcb++,q.finalCalled=!0,process.nextTick(Ce,j,q)):(q.prefinished=!0,j.emit("prefinish")))}function Te(j,q){var re=_e(q);if(re&&(we(j,q),q.pendingcb===0&&(q.finished=!0,j.emit("finish"),q.autoDestroy))){var $=j._readableState;(!$||$.autoDestroy&&$.endEmitted)&&j.destroy()}return re}function Ve(j,q,re){q.ending=!0,Te(j,q),re&&(q.finished?process.nextTick(re):j.once("finish",re)),q.ended=!0,j.writable=!1}function Le(j,q,re){var $=j.entry;for(j.entry=null;$;){var ue=$.callback;q.pendingcb--,ue(re),$=$.next}q.corkedRequestsFree.next=j}return Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(q){this._writableState&&(this._writableState.destroyed=q)}}),O.prototype.destroy=c.destroy,O.prototype._undestroy=c.undestroy,O.prototype._destroy=function(j,q){q(j)},$0}var ep,eA;function na(){if(eA)return ep;eA=1;var e=Object.keys||function(l){var u=[];for(var f in l)u.push(f);return u};ep=a;var t=sA(),n=$v();ea()(a,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var o=r[i];a.prototype[o]||(a.prototype[o]=n.prototype[o])}function a(l){if(!(this instanceof a))return new a(l);t.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(c,this)}function c(l){l.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),ep}var tp={},zu={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var tA;function uP(){return tA||(tA=1,function(e,t){var n=Gs(),r=n.Buffer;function i(a,s){for(var c in a)s[c]=a[c]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o);function o(a,s,c){return r(a,s,c)}o.prototype=Object.create(r.prototype),i(r,o),o.from=function(a,s,c){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,s,c)},o.alloc=function(a,s,c){if(typeof a!="number")throw new TypeError("Argument must be a number");var l=r(a);return s!==void 0?typeof c=="string"?l.fill(s,c):l.fill(s):l.fill(0),l},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(a)}}(zu,zu.exports)),zu.exports}var nA;function np(){if(nA)return tp;nA=1;var e=uP().Buffer,t=e.isEncoding||function(y){switch(y=""+y,y&&y.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 n(y){if(!y)return"utf8";for(var A;;)switch(y){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 y;default:if(A)return;y=(""+y).toLowerCase(),A=!0}}function r(y){var A=n(y);if(typeof A!="string"&&(e.isEncoding===t||!t(y)))throw new Error("Unknown encoding: "+y);return A||y}tp.StringDecoder=i;function i(y){this.encoding=r(y);var A;switch(this.encoding){case"utf16le":this.text=f,this.end=h,A=4;break;case"utf8":this.fillLast=c,A=4;break;case"base64":this.text=d,this.end=p,A=3;break;default:this.write=b,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(A)}i.prototype.write=function(y){if(y.length===0)return"";var A,_;if(this.lastNeed){if(A=this.fillLast(y),A===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<y.length?A?A+this.text(y,_):this.text(y,_):A||""},i.prototype.end=u,i.prototype.text=l,i.prototype.fillLast=function(y){if(this.lastNeed<=y.length)return y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,y.length),this.lastNeed-=y.length};function o(y){return y<=127?0:y>>5===6?2:y>>4===14?3:y>>3===30?4:y>>6===2?-1:-2}function a(y,A,_){var E=A.length-1;if(E<_)return 0;var C=o(A[E]);return C>=0?(C>0&&(y.lastNeed=C-1),C):--E<_||C===-2?0:(C=o(A[E]),C>=0?(C>0&&(y.lastNeed=C-2),C):--E<_||C===-2?0:(C=o(A[E]),C>=0?(C>0&&(C===2?C=0:y.lastNeed=C-3),C):0))}function s(y,A,_){if((A[0]&192)!==128)return y.lastNeed=0,"�";if(y.lastNeed>1&&A.length>1){if((A[1]&192)!==128)return y.lastNeed=1,"�";if(y.lastNeed>2&&A.length>2&&(A[2]&192)!==128)return y.lastNeed=2,"�"}}function c(y){var A=this.lastTotal-this.lastNeed,_=s(this,y);if(_!==void 0)return _;if(this.lastNeed<=y.length)return y.copy(this.lastChar,A,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,A,0,y.length),this.lastNeed-=y.length}function l(y,A){var _=a(this,y,A);if(!this.lastNeed)return y.toString("utf8",A);this.lastTotal=_;var E=y.length-(_-this.lastNeed);return y.copy(this.lastChar,0,E),y.toString("utf8",A,E)}function u(y){var A=y&&y.length?this.write(y):"";return this.lastNeed?A+"�":A}function f(y,A){if((y.length-A)%2===0){var _=y.toString("utf16le",A);if(_){var E=_.charCodeAt(_.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",A,y.length-1)}function h(y){var A=y&&y.length?this.write(y):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return A+this.lastChar.toString("utf16le",0,_)}return A}function d(y,A){var _=(y.length-A)%3;return _===0?y.toString("base64",A):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",A,y.length-_))}function p(y){var A=y&&y.length?this.write(y):"";return this.lastNeed?A+this.lastChar.toString("base64",0,3-this.lastNeed):A}function b(y){return y.toString(this.encoding)}function v(y){return y&&y.length?this.write(y):""}return tp}var rp,rA;function ip(){if(rA)return rp;rA=1;var e=ta().codes.ERR_STREAM_PREMATURE_CLOSE;function t(o){var a=!1;return function(){if(!a){a=!0;for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];o.apply(this,c)}}}function n(){}function r(o){return o.setHeader&&typeof o.abort=="function"}function i(o,a,s){if(typeof a=="function")return i(o,null,a);a||(a={}),s=t(s||n);var c=a.readable||a.readable!==!1&&o.readable,l=a.writable||a.writable!==!1&&o.writable,u=function(){o.writable||h()},f=o._writableState&&o._writableState.finished,h=function(){l=!1,f=!0,c||s.call(o)},d=o._readableState&&o._readableState.endEmitted,p=function(){c=!1,d=!0,l||s.call(o)},b=function(_){s.call(o,_)},v=function(){var _;if(c&&!d)return(!o._readableState||!o._readableState.ended)&&(_=new e),s.call(o,_);if(l&&!f)return(!o._writableState||!o._writableState.ended)&&(_=new e),s.call(o,_)},y=function(){o.req.on("finish",h)};return r(o)?(o.on("complete",h),o.on("abort",v),o.req?y():o.on("request",y)):l&&!o._writableState&&(o.on("end",u),o.on("close",u)),o.on("end",p),o.on("finish",h),a.error!==!1&&o.on("error",b),o.on("close",v),function(){o.removeListener("complete",h),o.removeListener("abort",v),o.removeListener("request",y),o.req&&o.req.removeListener("finish",h),o.removeListener("end",u),o.removeListener("close",u),o.removeListener("finish",h),o.removeListener("end",p),o.removeListener("error",b),o.removeListener("close",v)}}return rp=i,rp}var op,iA;function fP(){if(iA)return op;iA=1;var e;function t(_,E,C){return E=n(E),E in _?Object.defineProperty(_,E,{value:C,enumerable:!0,configurable:!0,writable:!0}):_[E]=C,_}function n(_){var E=r(_,"string");return typeof E=="symbol"?E:String(E)}function r(_,E){if(typeof _!="object"||_===null)return _;var C=_[Symbol.toPrimitive];if(C!==void 0){var R=C.call(_,E||"default");if(typeof R!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(E==="string"?String:Number)(_)}var i=ip(),o=Symbol("lastResolve"),a=Symbol("lastReject"),s=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function h(_,E){return{value:_,done:E}}function d(_){var E=_[o];if(E!==null){var C=_[f].read();C!==null&&(_[l]=null,_[o]=null,_[a]=null,E(h(C,!1)))}}function p(_){process.nextTick(d,_)}function b(_,E){return function(C,R){_.then(function(){if(E[c]){C(h(void 0,!0));return}E[u](C,R)},R)}}var v=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var E=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[c])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(F,P){process.nextTick(function(){E[s]?P(E[s]):F(h(void 0,!0))})});var R=this[l],D;if(R)D=new Promise(b(R,this));else{var O=this[f].read();if(O!==null)return Promise.resolve(h(O,!1));D=new Promise(this[u])}return this[l]=D,D}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var E=this;return new Promise(function(C,R){E[f].destroy(null,function(D){if(D){R(D);return}C(h(void 0,!0))})})}),e),v),A=function(E){var C,R=Object.create(y,(C={},t(C,f,{value:E,writable:!0}),t(C,o,{value:null,writable:!0}),t(C,a,{value:null,writable:!0}),t(C,s,{value:null,writable:!0}),t(C,c,{value:E._readableState.endEmitted,writable:!0}),t(C,u,{value:function(O,F){var P=R[f].read();P?(R[l]=null,R[o]=null,R[a]=null,O(h(P,!1))):(R[o]=O,R[a]=F)},writable:!0}),C));return R[l]=null,i(E,function(D){if(D&&D.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=R[a];O!==null&&(R[l]=null,R[o]=null,R[a]=null,O(D)),R[s]=D;return}var F=R[o];F!==null&&(R[l]=null,R[o]=null,R[a]=null,F(h(void 0,!0))),R[c]=!0}),E.on("readable",p.bind(null,R)),R};return op=A,op}var ap,oA;function hP(){return oA||(oA=1,ap=function(){throw new Error("Readable.from is not available in the browser")}),ap}var sp,aA;function sA(){if(aA)return sp;aA=1,sp=F;var e;F.ReadableState=O,W0().EventEmitter;var t=function(I,ee){return I.listeners(ee).length},n=Vv(),r=Gs().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(L){return r.from(L)}function a(L){return r.isBuffer(L)||L instanceof i}var s=qv,c;s&&s.debuglog?c=s.debuglog("stream"):c=function(){};var l=cP(),u=Zv(),f=Xv(),h=f.getHighWaterMark,d=ta().codes,p=d.ERR_INVALID_ARG_TYPE,b=d.ERR_STREAM_PUSH_AFTER_EOF,v=d.ERR_METHOD_NOT_IMPLEMENTED,y=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A,_,E;ea()(F,n);var C=u.errorOrDestroy,R=["error","close","destroy","pause","resume"];function D(L,I,ee){if(typeof L.prependListener=="function")return L.prependListener(I,ee);!L._events||!L._events[I]?L.on(I,ee):Array.isArray(L._events[I])?L._events[I].unshift(ee):L._events[I]=[ee,L._events[I]]}function O(L,I,ee){e=e||na(),L=L||{},typeof ee!="boolean"&&(ee=I instanceof e),this.objectMode=!!L.objectMode,ee&&(this.objectMode=this.objectMode||!!L.readableObjectMode),this.highWaterMark=h(this,L,"readableHighWaterMark",ee),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=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.destroyed=!1,this.defaultEncoding=L.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,L.encoding&&(A||(A=np().StringDecoder),this.decoder=new A(L.encoding),this.encoding=L.encoding)}function F(L){if(e=e||na(),!(this instanceof F))return new F(L);var I=this instanceof e;this._readableState=new O(L,this,I),this.readable=!0,L&&(typeof L.read=="function"&&(this._read=L.read),typeof L.destroy=="function"&&(this._destroy=L.destroy)),n.call(this)}Object.defineProperty(F.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(I){this._readableState&&(this._readableState.destroyed=I)}}),F.prototype.destroy=u.destroy,F.prototype._undestroy=u.undestroy,F.prototype._destroy=function(L,I){I(L)},F.prototype.push=function(L,I){var ee=this._readableState,oe;return ee.objectMode?oe=!0:typeof L=="string"&&(I=I||ee.defaultEncoding,I!==ee.encoding&&(L=r.from(L,I),I=""),oe=!0),P(this,L,I,!1,oe)},F.prototype.unshift=function(L){return P(this,L,null,!0,!1)};function P(L,I,ee,oe,Ie){c("readableAddChunk",I);var ye=L._readableState;if(I===null)ye.reading=!1,fe(L,ye);else{var xe;if(Ie||(xe=Z(ye,I)),xe)C(L,xe);else if(ye.objectMode||I&&I.length>0)if(typeof I!="string"&&!ye.objectMode&&Object.getPrototypeOf(I)!==r.prototype&&(I=o(I)),oe)ye.endEmitted?C(L,new y):S(L,ye,I,!0);else if(ye.ended)C(L,new b);else{if(ye.destroyed)return!1;ye.reading=!1,ye.decoder&&!ee?(I=ye.decoder.write(I),ye.objectMode||I.length!==0?S(L,ye,I,!1):pe(L,ye)):S(L,ye,I,!1)}else oe||(ye.reading=!1,pe(L,ye))}return!ye.ended&&(ye.length<ye.highWaterMark||ye.length===0)}function S(L,I,ee,oe){I.flowing&&I.length===0&&!I.sync?(I.awaitDrain=0,L.emit("data",ee)):(I.length+=I.objectMode?1:ee.length,oe?I.buffer.unshift(ee):I.buffer.push(ee),I.needReadable&&le(L)),pe(L,I)}function Z(L,I){var ee;return!a(I)&&typeof I!="string"&&I!==void 0&&!L.objectMode&&(ee=new p("chunk",["string","Buffer","Uint8Array"],I)),ee}F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(L){A||(A=np().StringDecoder);var I=new A(L);this._readableState.decoder=I,this._readableState.encoding=this._readableState.decoder.encoding;for(var ee=this._readableState.buffer.head,oe="";ee!==null;)oe+=I.write(ee.data),ee=ee.next;return this._readableState.buffer.clear(),oe!==""&&this._readableState.buffer.push(oe),this._readableState.length=oe.length,this};var Q=1073741824;function se(L){return L>=Q?L=Q:(L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++),L}function ce(L,I){return L<=0||I.length===0&&I.ended?0:I.objectMode?1:L!==L?I.flowing&&I.length?I.buffer.head.data.length:I.length:(L>I.highWaterMark&&(I.highWaterMark=se(L)),L<=I.length?L:I.ended?I.length:(I.needReadable=!0,0))}F.prototype.read=function(L){c("read",L),L=parseInt(L,10);var I=this._readableState,ee=L;if(L!==0&&(I.emittedReadable=!1),L===0&&I.needReadable&&((I.highWaterMark!==0?I.length>=I.highWaterMark:I.length>0)||I.ended))return c("read: emitReadable",I.length,I.ended),I.length===0&&I.ended?re(this):le(this),null;if(L=ce(L,I),L===0&&I.ended)return I.length===0&&re(this),null;var oe=I.needReadable;c("need readable",oe),(I.length===0||I.length-L<I.highWaterMark)&&(oe=!0,c("length less than watermark",oe)),I.ended||I.reading?(oe=!1,c("reading or ended",oe)):oe&&(c("do read"),I.reading=!0,I.sync=!0,I.length===0&&(I.needReadable=!0),this._read(I.highWaterMark),I.sync=!1,I.reading||(L=ce(ee,I)));var Ie;return L>0?Ie=q(L,I):Ie=null,Ie===null?(I.needReadable=I.length<=I.highWaterMark,L=0):(I.length-=L,I.awaitDrain=0),I.length===0&&(I.ended||(I.needReadable=!0),ee!==L&&I.ended&&re(this)),Ie!==null&&this.emit("data",Ie),Ie};function fe(L,I){if(c("onEofChunk"),!I.ended){if(I.decoder){var ee=I.decoder.end();ee&&ee.length&&(I.buffer.push(ee),I.length+=I.objectMode?1:ee.length)}I.ended=!0,I.sync?le(L):(I.needReadable=!1,I.emittedReadable||(I.emittedReadable=!0,Ee(L)))}}function le(L){var I=L._readableState;c("emitReadable",I.needReadable,I.emittedReadable),I.needReadable=!1,I.emittedReadable||(c("emitReadable",I.flowing),I.emittedReadable=!0,process.nextTick(Ee,L))}function Ee(L){var I=L._readableState;c("emitReadable_",I.destroyed,I.length,I.ended),!I.destroyed&&(I.length||I.ended)&&(L.emit("readable"),I.emittedReadable=!1),I.needReadable=!I.flowing&&!I.ended&&I.length<=I.highWaterMark,j(L)}function pe(L,I){I.readingMore||(I.readingMore=!0,process.nextTick(_e,L,I))}function _e(L,I){for(;!I.reading&&!I.ended&&(I.length<I.highWaterMark||I.flowing&&I.length===0);){var ee=I.length;if(c("maybeReadMore read 0"),L.read(0),ee===I.length)break}I.readingMore=!1}F.prototype._read=function(L){C(this,new v("_read()"))},F.prototype.pipe=function(L,I){var ee=this,oe=this._readableState;switch(oe.pipesCount){case 0:oe.pipes=L;break;case 1:oe.pipes=[oe.pipes,L];break;default:oe.pipes.push(L);break}oe.pipesCount+=1,c("pipe count=%d opts=%j",oe.pipesCount,I);var Ie=(!I||I.end!==!1)&&L!==process.stdout&&L!==process.stderr,ye=Ie?Be:Vt;oe.endEmitted?process.nextTick(ye):ee.once("end",ye),L.on("unpipe",xe);function xe(k,m){c("onunpipe"),k===ee&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,Dt())}function Be(){c("onend"),L.end()}var gt=Ce(ee);L.on("drain",gt);var nn=!1;function Dt(){c("cleanup"),L.removeListener("close",Ht),L.removeListener("finish",nt),L.removeListener("drain",gt),L.removeListener("error",Pt),L.removeListener("unpipe",xe),ee.removeListener("end",Be),ee.removeListener("end",Vt),ee.removeListener("data",tt),nn=!0,oe.awaitDrain&&(!L._writableState||L._writableState.needDrain)&>()}ee.on("data",tt);function tt(k){c("ondata");var m=L.write(k);c("dest.write",m),m===!1&&((oe.pipesCount===1&&oe.pipes===L||oe.pipesCount>1&&ue(oe.pipes,L)!==-1)&&!nn&&(c("false write response, pause",oe.awaitDrain),oe.awaitDrain++),ee.pause())}function Pt(k){c("onerror",k),Vt(),L.removeListener("error",Pt),t(L,"error")===0&&C(L,k)}D(L,"error",Pt);function Ht(){L.removeListener("finish",nt),Vt()}L.once("close",Ht);function nt(){c("onfinish"),L.removeListener("close",Ht),Vt()}L.once("finish",nt);function Vt(){c("unpipe"),ee.unpipe(L)}return L.emit("pipe",ee),oe.flowing||(c("pipe resume"),ee.resume()),L};function Ce(L){return function(){var ee=L._readableState;c("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&t(L,"data")&&(ee.flowing=!0,j(L))}}F.prototype.unpipe=function(L){var I=this._readableState,ee={hasUnpiped:!1};if(I.pipesCount===0)return this;if(I.pipesCount===1)return L&&L!==I.pipes?this:(L||(L=I.pipes),I.pipes=null,I.pipesCount=0,I.flowing=!1,L&&L.emit("unpipe",this,ee),this);if(!L){var oe=I.pipes,Ie=I.pipesCount;I.pipes=null,I.pipesCount=0,I.flowing=!1;for(var ye=0;ye<Ie;ye++)oe[ye].emit("unpipe",this,{hasUnpiped:!1});return this}var xe=ue(I.pipes,L);return xe===-1?this:(I.pipes.splice(xe,1),I.pipesCount-=1,I.pipesCount===1&&(I.pipes=I.pipes[0]),L.emit("unpipe",this,ee),this)},F.prototype.on=function(L,I){var ee=n.prototype.on.call(this,L,I),oe=this._readableState;return L==="data"?(oe.readableListening=this.listenerCount("readable")>0,oe.flowing!==!1&&this.resume()):L==="readable"&&!oe.endEmitted&&!oe.readableListening&&(oe.readableListening=oe.needReadable=!0,oe.flowing=!1,oe.emittedReadable=!1,c("on readable",oe.length,oe.reading),oe.length?le(this):oe.reading||process.nextTick(Te,this)),ee},F.prototype.addListener=F.prototype.on,F.prototype.removeListener=function(L,I){var ee=n.prototype.removeListener.call(this,L,I);return L==="readable"&&process.nextTick(we,this),ee},F.prototype.removeAllListeners=function(L){var I=n.prototype.removeAllListeners.apply(this,arguments);return(L==="readable"||L===void 0)&&process.nextTick(we,this),I};function we(L){var I=L._readableState;I.readableListening=L.listenerCount("readable")>0,I.resumeScheduled&&!I.paused?I.flowing=!0:L.listenerCount("data")>0&&L.resume()}function Te(L){c("readable nexttick read 0"),L.read(0)}F.prototype.resume=function(){var L=this._readableState;return L.flowing||(c("resume"),L.flowing=!L.readableListening,Ve(this,L)),L.paused=!1,this};function Ve(L,I){I.resumeScheduled||(I.resumeScheduled=!0,process.nextTick(Le,L,I))}function Le(L,I){c("resume",I.reading),I.reading||L.read(0),I.resumeScheduled=!1,L.emit("resume"),j(L),I.flowing&&!I.reading&&L.read(0)}F.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function j(L){var I=L._readableState;for(c("flow",I.flowing);I.flowing&&L.read()!==null;);}F.prototype.wrap=function(L){var I=this,ee=this._readableState,oe=!1;L.on("end",function(){if(c("wrapped end"),ee.decoder&&!ee.ended){var xe=ee.decoder.end();xe&&xe.length&&I.push(xe)}I.push(null)}),L.on("data",function(xe){if(c("wrapped data"),ee.decoder&&(xe=ee.decoder.write(xe)),!(ee.objectMode&&xe==null)&&!(!ee.objectMode&&(!xe||!xe.length))){var Be=I.push(xe);Be||(oe=!0,L.pause())}});for(var Ie in L)this[Ie]===void 0&&typeof L[Ie]=="function"&&(this[Ie]=function(Be){return function(){return L[Be].apply(L,arguments)}}(Ie));for(var ye=0;ye<R.length;ye++)L.on(R[ye],this.emit.bind(this,R[ye]));return this._read=function(xe){c("wrapped _read",xe),oe&&(oe=!1,L.resume())},this},typeof Symbol=="function"&&(F.prototype[Symbol.asyncIterator]=function(){return _===void 0&&(_=fP()),_(this)}),Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(F.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(F.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(I){this._readableState&&(this._readableState.flowing=I)}}),F._fromList=q,Object.defineProperty(F.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function q(L,I){if(I.length===0)return null;var ee;return I.objectMode?ee=I.buffer.shift():!L||L>=I.length?(I.decoder?ee=I.buffer.join(""):I.buffer.length===1?ee=I.buffer.first():ee=I.buffer.concat(I.length),I.buffer.clear()):ee=I.buffer.consume(L,I.decoder),ee}function re(L){var I=L._readableState;c("endReadable",I.endEmitted),I.endEmitted||(I.ended=!0,process.nextTick($,I,L))}function $(L,I){if(c("endReadableNT",L.endEmitted,L.length),!L.endEmitted&&L.length===0&&(L.endEmitted=!0,I.readable=!1,I.emit("end"),L.autoDestroy)){var ee=I._writableState;(!ee||ee.autoDestroy&&ee.finished)&&I.destroy()}}typeof Symbol=="function"&&(F.from=function(L,I){return E===void 0&&(E=hP()),E(F,L,I)});function ue(L,I){for(var ee=0,oe=L.length;ee<oe;ee++)if(L[ee]===I)return ee;return-1}return sp}var cp,cA;function lA(){if(cA)return cp;cA=1,cp=s;var e=ta().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,o=na();ea()(s,o);function a(u,f){var h=this._transformState;h.transforming=!1;var d=h.writecb;if(d===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),d(u);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);o.call(this,u),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",c)}function c(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){l(u,f,h)}):l(this,null,null)}s.prototype.push=function(u,f){return this._transformState.needTransform=!1,o.prototype.push.call(this,u,f)},s.prototype._transform=function(u,f,h){h(new t("_transform()"))},s.prototype._write=function(u,f,h){var d=this._transformState;if(d.writecb=h,d.writechunk=u,d.writeencoding=f,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},s.prototype._read=function(u){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},s.prototype._destroy=function(u,f){o.prototype._destroy.call(this,u,function(h){f(h)})};function l(u,f,h){if(f)return u.emit("error",f);if(h!=null&&u.push(h),u._writableState.length)throw new i;if(u._transformState.transforming)throw new r;return u.push(null)}return cp}var lp,uA;function dP(){if(uA)return lp;uA=1,lp=t;var e=lA();ea()(t,e);function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return t.prototype._transform=function(n,r,i){i(null,n)},lp}var up,fA;function pP(){if(fA)return up;fA=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=ta().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function o(h){if(h)throw h}function a(h){return h.setHeader&&typeof h.abort=="function"}function s(h,d,p,b){b=t(b);var v=!1;h.on("close",function(){v=!0}),e===void 0&&(e=ip()),e(h,{readable:d,writable:p},function(A){if(A)return b(A);v=!0,b()});var y=!1;return function(A){if(!v&&!y){if(y=!0,a(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();b(A||new i("pipe"))}}}function c(h){h()}function l(h,d){return h.pipe(d)}function u(h){return!h.length||typeof h[h.length-1]!="function"?o:h.pop()}function f(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var b=u(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var v,y=d.map(function(A,_){var E=_<d.length-1,C=_>0;return s(A,E,C,function(R){v||(v=R),R&&y.forEach(c),!E&&(y.forEach(c),b(v))})});return d.reduce(l)}return up=f,up}var fp,hA;function gP(){if(hA)return fp;hA=1,fp=n;var e=W0().EventEmitter,t=ea();t(n,e),n.Readable=sA(),n.Writable=$v(),n.Duplex=na(),n.Transform=lA(),n.PassThrough=dP(),n.finished=ip(),n.pipeline=pP(),n.Stream=n;function n(){e.call(this)}return n.prototype.pipe=function(r,i){var o=this;function a(d){r.writable&&r.write(d)===!1&&o.pause&&o.pause()}o.on("data",a);function s(){o.readable&&o.resume&&o.resume()}r.on("drain",s),!r._isStdio&&(!i||i.end!==!1)&&(o.on("end",l),o.on("close",u));var c=!1;function l(){c||(c=!0,r.end())}function u(){c||(c=!0,typeof r.destroy=="function"&&r.destroy())}function f(d){if(h(),e.listenerCount(this,"error")===0)throw d}o.on("error",f),r.on("error",f);function h(){o.removeListener("data",a),r.removeListener("drain",s),o.removeListener("end",l),o.removeListener("close",u),o.removeListener("error",f),r.removeListener("error",f),o.removeListener("end",h),o.removeListener("close",h),r.removeListener("close",h)}return o.on("end",h),o.on("close",h),r.on("close",h),r.emit("pipe",o),r},fp}var dA=gP(),mP=np();function uc(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function pA(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function fc(e){return pA(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function gr(e){return pA(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function gA(e){if(!(e&&e.length)||e===".")return{};const t={};return e.replace(/\r?\n$/,"").split(";").forEach(n=>{const r=n.split("=",2);if(!(r[1]&&r[1].length))return;r[0]=r[0].trim();let i=t[r[0].trim()];i||(i=[],t[r[0]]=i),i.push(...r[1].split(",").map(o=>o.trim()).map(uc))}),t}function mA(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&uc(t[0]),source:t[1]&&uc(t[1]),type:t[2]&&uc(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:gA(t[8])}}function bA(e){const t=/^\s*##\s*(\S+)\s*(.*)/.exec(e);if(!t)return null;const[,n]=t;let[,,r]=t;const i={directive:n};if(r.length&&(r=r.replace(/\r?\n$/,""),i.value=r),n==="sequence-region"){const o=r.split(/\s+/,3);return{...i,seq_id:o[0],start:o[1]&&o[1].replace(/\D/g,""),end:o[2]&&o[2].replace(/\D/g,"")}}else if(n==="genome-build"){const[o,a]=r.split(/\s+/,2);return{...i,source:o,buildName:a}}return i}function yA(e){const t=[];return Object.entries(e).forEach(([n,r])=>{if(!r)return;let i;r.hasOwnProperty("toString")?i=fc(r.toString()):Array.isArray(r)?i=r.map(fc).join(","):i=fc(r),t.push(`${fc(n)}=${i}`)}),t.length?t.join(";"):"."}function bP(e,t){const n=e.attributes===null||e.attributes===void 0?".":yA(e.attributes),i=`${[e.seq_id===null?".":gr(e.seq_id),e.source===null?".":gr(e.source),e.type===null?".":gr(e.type),e.start===null?".":gr(e.start),e.end===null?".":gr(e.end),e.score===null?".":gr(e.score),e.strand===null?".":gr(e.strand),e.phase===null?".":gr(e.phase),n].join(" ")}
|
|
791
|
-
`;return t[i]?"":(t[i]=!0,i)}function Uu(e,t){if(Array.isArray(e))return e.map(r=>Uu(r,t)).join("");const n=[bP(e,t)];return yP(e)&&n.push(...e.child_features.map(r=>Uu(r,t)),...e.derived_features.map(r=>Uu(r,t))),n.join("")}function wA(e){return Uu(e,{})}function xA(e){let t=`##${e.directive}`;return e.value&&(t+=` ${e.value}`),t+=`
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
${
|
|
795
|
-
|
|
796
|
-
`}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
`)
|
|
800
|
-
`),this.
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
${
|
|
804
|
-
${
|
|
789
|
+
)`},Symbol.toStringTag,{value:"Module"}))).map(([t,e])=>[t,_w.parse(e.trim())]));function Ed(t){const e=new Set(["uint","int","float","long"]);return{...t,fields:t.fields.map(n=>({...n,isArray:n.size&&n.type!=="char",arrayIsNumeric:n.size&&e.has(n.type),isNumeric:!n.size&&e.has(n.type)})).filter(n=>!!n.name)}}const CF={".":0,"-":-1,"+":1};function IF(t){var e;return t.length>=12&&!Number.isNaN(parseInt(t[9],10))&&((e=t[10])===null||e===void 0?void 0:e.split(",").filter(n=>!!n).length)===parseInt(t[9],10)}class TF{constructor(e={}){if(e.autoSql)this.autoSql=Ed(SF.parse(e.autoSql));else if(e.type){if(!Ad[e.type])throw new Error("Type not found");this.autoSql=Ed(Ad[e.type])}else this.autoSql=Ed(Ad.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(e,n={}){const{autoSql:r}=this,{uniqueId:o}=n,i=Array.isArray(e)?e:e.split(" ");let s={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&IF(i))for(let a=0;a<r.fields.length;a++){const c=r.fields[a];let l=i[a];const{isNumeric:u,isArray:f,arrayIsNumeric:h,name:d}=c;if(l==null)break;if(l!=="."){if(u){const p=Number(l);l=Number.isNaN(p)?l:p}else f&&(l=l.split(","),l[l.length-1]===""&&l.pop(),h&&(l=l.map(Number)));s[d]=l}}else{const a=["chrom","chromStart","chromEnd","name"];s=Object.fromEntries(i.map((c,l)=>[a[l]||"field"+l,c])),s.chromStart=+s.chromStart,s.chromEnd=+s.chromEnd,Number.isNaN(Number.parseFloat(s.field4))||(s.score=+s.field4,delete s.field4),(s.field5==="+"||s.field5==="-")&&(s.strand=s.field5,delete s.field5)}return o&&(s.uniqueId=o),s.strand=CF[s.strand]||0,s.chrom=decodeURIComponent(s.chrom),s}}const DF=Object.freeze(Object.defineProperty({__proto__:null,default:TF},Symbol.toStringTag,{value:"Module"}));let kw=class{constructor(e,n){this.blockPosition=e,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}static min(...e){let n,r=0;for(;!n;r+=1)n=e[r];for(;r<e.length;r+=1)n.compareTo(e[r])>0&&(n=e[r]);return n}};function bo(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new kw(t[e+7]*1099511627776+t[e+6]*4294967296+t[e+5]*16777216+t[e+4]*65536+t[e+3]*256+t[e+2],t[e+1]<<8|t[e])}let Sd=class{constructor(e,n,r,o){this.minv=e,this.maxv=n,this.bin=r,this._fetchedSize=o}toUniqueString(){return`${this.minv.toString()}..${this.maxv.toString()} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(e){return this.minv.compareTo(e.minv)||this.maxv.compareTo(e.maxv)||this.bin-e.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}};function BF(t){return new Promise(e=>setTimeout(e,t))}function _F(t){if(t&&t.aborted)if(typeof DOMException>"u"){const e=new Error("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}function kF(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function RF(t={}){return"aborted"in t?{signal:t}:t}function Rw(t,e){const n=[];let r;if(t.length===0)return t;t.sort((o,i)=>{const s=o.minv.blockPosition-i.minv.blockPosition;return s===0?o.minv.dataPosition-i.minv.dataPosition:s});for(const o of t)(!e||o.maxv.compareTo(e)>0)&&(r===void 0?(n.push(o),r=o):kF(r,o)?o.maxv.compareTo(r.maxv)>0&&(r.maxv=o.maxv):(n.push(o),r=o));return n}function Fw(t,e){return{lineCount:Cl.fromBytesLE(Array.prototype.slice.call(t,e,e+8),!0).toNumber()}}function Ol(t,e){return t?t.compareTo(e)>0?e:t:e}function FF(t,e=n=>n){let n=0,r=0;const o=[],i={};for(let s=0;s<t.length;s+=1)if(!t[s]){if(r<s){let a=t.toString("utf8",r,s);a=e(a),o[n]=a,i[a]=n}r=s+1,n+=1}return{refNameToId:i,refIdToName:o}}let Mw=class{constructor({filehandle:e,renameRefSeq:n=r=>r}){this.filehandle=e,this.renameRefSeq=n}};const MF=21578050;function PF(t,e){return t-t%e}function LF(t,e){return t-t%e+e}function NF(t,e){return e-=1,[[0,0],[1+(t>>26),1+(e>>26)],[9+(t>>23),9+(e>>23)],[73+(t>>20),73+(e>>20)],[585+(t>>17),585+(e>>17)],[4681+(t>>14),4681+(e>>14)]]}class yo extends Mw{async lineCount(e,n){var r,o;return((o=(r=(await this.parse(n)).indices[e])===null||r===void 0?void 0:r.stats)===null||o===void 0?void 0:o.lineCount)||0}async _parse(e){const n=await this.filehandle.readFile(e);if(n.readUInt32LE(0)!==MF)throw new Error("Not a BAI file");const r=n.readInt32LE(4),i=((1<<(5+1)*3)-1)/7;let s=8,a;const c=new Array(r);for(let l=0;l<r;l++){const u=n.readInt32LE(s);let f;s+=4;const h={};for(let y=0;y<u;y+=1){const v=n.readUInt32LE(s);if(s+=4,v===i+1)s+=4,f=Fw(n,s+16),s+=32;else{if(v>i+1)throw new Error("bai index contains too many bins, please use CSI");{const b=n.readInt32LE(s);s+=4;const A=new Array(b);for(let C=0;C<b;C++){const E=bo(n,s);s+=8;const I=bo(n,s);s+=8,a=Ol(a,E),A[C]=new Sd(E,I,v)}h[v]=A}}}const d=n.readInt32LE(s);s+=4;const p=new Array(d);for(let y=0;y<d;y++){const v=bo(n,s);s+=8,a=Ol(a,v),p[y]=v}c[l]={binIndex:h,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:a,maxBlockSize:65536,indices:c,refCount:r}}async indexCov(e,n,r,o={}){const s=n!==void 0,c=(await this.parse(o)).indices[e];if(!c)return[];const{linearIndex:l=[],stats:u}=c;if(l.length===0)return[];const f=r===void 0?(l.length-1)*16384:LF(r,16384),h=n===void 0?0:PF(n,16384),d=s?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 y=l[h/16384].blockPosition;for(let v=h/16384,b=0;v<f/16384;v++,b++)d[b]={score:l[v+1].blockPosition-y,start:v*16384,end:v*16384+16384},y=l[v+1].blockPosition;return d.map(v=>({...v,score:v.score*((u==null?void 0:u.lineCount)||0)/p}))}async blocksForRange(e,n,r,o={}){n<0&&(n=0);const i=await this.parse(o);if(!i)return[];const s=i.indices[e];if(!s)return[];const a=NF(n,r),c=[];for(const[d,p]of a)for(let y=d;y<=p;y++)if(s.binIndex[y]){const v=s.binIndex[y];for(const b of v)c.push(new Sd(b.minv,b.maxv,y))}const l=s.linearIndex.length;let u;const f=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=f;d<=h;++d){const p=s.linearIndex[d];p&&(!u||p.compareTo(u)<0)&&(u=p)}return Rw(c,u)}async parse(e={}){return this.setupP||(this.setupP=this._parse(e).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(e,n={}){var r;return!!(!((r=(await this.parse(n)).indices[e])===null||r===void 0)&&r.binIndex)}}let Cd=[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"&&(Cd=new Int32Array(Cd));const OF=(t,e)=>{let n=e===0?0:~~e^-1;for(let r=0;r<t.length;r++)n=Cd[(n^t[r])&255]^n>>>8;return n^-1},Pw=(t,e)=>Ke.Buffer.from(t,e);function zF(t,e){const n=(r,o)=>e(Pw(r),o)>>>0;return n.signed=(r,o)=>e(Pw(r),o),n.unsigned=n,n.model=t,n}const UF=zF("crc-32",OF),GF=21582659,HF=38359875;function VF(t,e){return t*2**e}function Lw(t,e){return Math.floor(t/2**e)}let zl=class extends Mw{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(e,n){var r,o;return((o=(r=(await this.parse(n)).indices[e])===null||r===void 0?void 0:r.stats)===null||o===void 0?void 0:o.lineCount)||0}async indexCov(){return[]}parseAuxData(e,n){const r=e.readInt32LE(n),o=r&65536?"zero-based-half-open":"1-based-closed",i={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!i)throw new Error(`invalid Tabix preset format flags ${r}`);const s={ref:e.readInt32LE(n+4),start:e.readInt32LE(n+8),end:e.readInt32LE(n+12)},a=e.readInt32LE(n+16),c=a?String.fromCharCode(a):"",l=e.readInt32LE(n+20),u=e.readInt32LE(n+24);return{columnNumbers:s,coordinateType:o,metaValue:a,metaChar:c,skipLines:l,format:i,formatFlags:r,...FF(e.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(e){const n=await this.filehandle.readFile(e),r=await Pr(n);let o;if(r.readUInt32LE(0)===GF)o=1;else if(r.readUInt32LE(0)===HF)o=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 i=r.readInt32LE(12),s=i>=30?this.parseAuxData(r,16):void 0,a=r.readInt32LE(16+i);let c=16+i+4,l;const u=new Array(a);for(let f=0;f<a;f++){const h=r.readInt32LE(c);c+=4;const d={};let p;for(let y=0;y<h;y++){const v=r.readUInt32LE(c);if(c+=4,v>this.maxBinNumber)p=Fw(r,c+28),c+=44;else{l=Ol(l,bo(r,c)),c+=8;const b=r.readInt32LE(c);c+=4;const A=new Array(b);for(let C=0;C<b;C+=1){const E=bo(r,c);c+=8;const I=bo(r,c);c+=8,l=Ol(l,E),A[C]=new Sd(E,I,v)}d[v]=A}}u[f]={binIndex:d,stats:p}}return{csiVersion:o,firstDataLine:l,indices:u,refCount:a,csi:!0,maxBlockSize:65536,...s}}async blocksForRange(e,n,r,o={}){n<0&&(n=0);const s=(await this.parse(o)).indices[e];if(!s)return[];const a=this.reg2bins(n,r);if(a.length===0)return[];const c=[];for(const[l,u]of a)for(let f=l;f<=u;f++)if(s.binIndex[f]){const h=s.binIndex[f];for(const d of h)c.push(d)}return Rw(c,new kw(0,0))}reg2bins(e,n){e-=1,e<1&&(e=1),n>2**50&&(n=2**34),n-=1;let r=0,o=0,i=this.minShift+this.depth*3;const s=[];for(;r<=this.depth;i-=3,o+=VF(1,r*3),r+=1){const a=o+Lw(e,i),c=o+Lw(n,i);if(c-a+s.length>this.maxBinNumber)throw new Error(`query ${e}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);s.push([a,c])}return s}async parse(e={}){return this.setupP||(this.setupP=this._parse(e).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(e,n={}){var r;return!!(!((r=(await this.parse(n)).indices[e])===null||r===void 0)&&r.binIndex)}};const dn={BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048},Nw="=ACMGRSVTWYHKDBN".split(""),ba="MIDNSHP=X???????".split("");class wo{constructor(e){this.bytes=e.bytes,this.fileOffset=e.fileOffset}get byteArray(){return this.bytes.byteArray}get flags(){return(this.byteArray.readInt32LE(this.bytes.start+16)&4294901760)>>16}get ref_id(){return this.byteArray.readInt32LE(this.bytes.start+4)}get start(){return this.byteArray.readInt32LE(this.bytes.start+8)}get end(){return this.start+this.length_on_ref}get id(){return this.fileOffset}get mq(){const e=(this.bin_mq_nl&65280)>>8;return e===255?void 0:e}get score(){return this.mq}get qual(){if(this.isSegmentUnmapped())return;const e=this.b0+this.read_name_length+this.num_cigar_ops*4+this.num_seq_bytes;return this.byteArray.subarray(e,e+this.seq_length)}get strand(){return this.isReverseComplemented()?-1:1}get b0(){return this.bytes.start+36}get name(){return this.byteArray.toString("ascii",this.b0,this.b0+this.read_name_length-1)}get tags(){const{byteArray:e}=this.bytes;let n=this.b0+this.read_name_length+this.num_cigar_ops*4+this.num_seq_bytes+this.seq_length;const r=this.bytes.end,o={};for(;n<r;){const i=String.fromCharCode(e[n],e[n+1]),s=String.fromCharCode(e[n+2]);if(n+=3,s==="A")o[i]=String.fromCharCode(e[n]),n+=1;else if(s==="i")o[i]=e.readInt32LE(n),n+=4;else if(s==="I")o[i]=e.readUInt32LE(n),n+=4;else if(s==="c")o[i]=e.readInt8(n),n+=1;else if(s==="C")o[i]=e.readUInt8(n),n+=1;else if(s==="s")o[i]=e.readInt16LE(n),n+=2;else if(s==="S")o[i]=e.readUInt16LE(n),n+=2;else if(s==="f")o[i]=e.readFloatLE(n),n+=4;else if(s==="Z"||s==="H"){const a=[];for(;n<=r;){const c=e[n++];if(c!==0)a.push(String.fromCharCode(c));else break}o[i]=a.join("")}else if(s==="B"){const a=e[n++],c=String.fromCharCode(a),l=e.readInt32LE(n);if(n+=4,c==="i")if(i==="CG"){const u=[];for(let f=0;f<l;f++){const h=e.readInt32LE(n),d=h>>4,p=ba[h&15];u.push(d+p),n+=4}o[i]=u.join("")}else{const u=[];for(let f=0;f<l;f++)u.push(e.readInt32LE(n)),n+=4;o[i]=u}else if(c==="I")if(i==="CG"){const u=[];for(let f=0;f<l;f++){const h=e.readUInt32LE(n),d=h>>4,p=ba[h&15];u.push(d+p),n+=4}o[i]=u.join("")}else{const u=[];for(let f=0;f<l;f++)u.push(e.readUInt32LE(n)),n+=4;o[i]=u}else if(c==="s"){const u=[];for(let f=0;f<l;f++)u.push(e.readInt16LE(n)),n+=2;o[i]=u}else if(c==="S"){const u=[];for(let f=0;f<l;f++)u.push(e.readUInt16LE(n)),n+=2;o[i]=u}else if(c==="c"){const u=[];for(let f=0;f<l;f++)u.push(e.readInt8(n)),n+=1;o[i]=u}else if(c==="C"){const u=[];for(let f=0;f<l;f++)u.push(e.readUInt8(n)),n+=1;o[i]=u}else if(c==="f"){const u=[];for(let f=0;f<l;f++)u.push(e.readFloatLE(n)),n+=4;o[i]=u}}else{console.error("Unknown BAM tag type",s);break}}return o}isPaired(){return!!(this.flags&dn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&dn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&dn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&dn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&dn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&dn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&dn.BAM_FREAD1)}isRead2(){return!!(this.flags&dn.BAM_FREAD2)}isSecondary(){return!!(this.flags&dn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&dn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&dn.BAM_FDUP)}isSupplementary(){return!!(this.flags&dn.BAM_FSUPPLEMENTARY)}get cigarAndLength(){if(this.isSegmentUnmapped())return{length_on_ref:0,CIGAR:""};const e=this.num_cigar_ops;let n=this.b0+this.read_name_length;const r=[];let o=this.byteArray.readInt32LE(n),i=o>>4,s=ba[o&15];if(s==="S"&&i===this.seq_length)return n+=4,o=this.byteArray.readInt32LE(n),i=o>>4,s=ba[o&15],s!=="N"&&console.warn("CG tag with no N tag"),{CIGAR:this.tags.CG,length_on_ref:i};{let a=0;for(let c=0;c<e;++c)o=this.byteArray.readInt32LE(n),i=o>>4,s=ba[o&15],r.push(i+s),s!=="H"&&s!=="S"&&s!=="I"&&(a+=i),n+=4;return{CIGAR:r.join(""),length_on_ref:a}}}get length_on_ref(){return this.cigarAndLength.length_on_ref}get CIGAR(){return this.cigarAndLength.CIGAR}get num_cigar_ops(){return this.flag_nc&65535}get read_name_length(){return this.bin_mq_nl&255}get num_seq_bytes(){return this.seq_length+1>>1}get seq(){const{byteArray:e}=this.bytes,n=this.b0+this.read_name_length+this.num_cigar_ops*4,r=this.num_seq_bytes,o=this.seq_length,i=[];let s=0;for(let a=0;a<r;++a){const c=e[n+a];i.push(Nw[(c&240)>>4]),s++,s<o&&(i.push(Nw[c&15]),s++)}return i.join("")}get pair_orientation(){if(!this.isSegmentUnmapped()&&!this.isMateUnmapped()&&this.ref_id===this.next_refid){const e=this.isReverseComplemented()?"R":"F",n=this.isMateReverseComplemented()?"R":"F";let r=" ",o=" ";this.isRead1()?(r="1",o="2"):this.isRead2()&&(r="2",o="1");const i=[];return this.template_length>0?(i[0]=e,i[1]=r,i[2]=n,i[3]=o):(i[2]=e,i[3]=r,i[0]=n,i[1]=o),i.join("")}}get bin_mq_nl(){return this.byteArray.readInt32LE(this.bytes.start+12)}get flag_nc(){return this.byteArray.readInt32LE(this.bytes.start+16)}get seq_length(){return this.byteArray.readInt32LE(this.bytes.start+20)}get next_refid(){return this.byteArray.readInt32LE(this.bytes.start+24)}get next_pos(){return this.byteArray.readInt32LE(this.bytes.start+28)}get template_length(){return this.byteArray.readInt32LE(this.bytes.start+32)}toJSON(){const e={};for(const n of Object.keys(this))n.startsWith("_")||n==="bytes"||(e[n]=this[n]);return e}}function Ul(t,e){const n=Object.getOwnPropertyDescriptor(t.prototype,e);if(!n)throw new Error("OH NO, NO PROPERTY DESCRIPTOR");const r=n.get;if(!r)throw new Error("OH NO, NOT A GETTER");Object.defineProperty(t.prototype,e,{get(){const o=r.call(this);return Object.defineProperty(this,e,{value:o}),o}})}Ul(wo,"tags"),Ul(wo,"cigarAndLength"),Ul(wo,"seq"),Ul(wo,"qual");function Ow(t){const e=t.split(/\r?\n/),n=[];for(const r of e){const[o,...i]=r.split(/\t/);o&&n.push({tag:o.slice(1),data:i.map(s=>{const a=s.indexOf(":"),c=s.slice(0,a),l=s.slice(a+1);return{tag:c,value:l}})})}return n}const zw=21840194,Uw=65536;async function qF(t){let e=[];for await(const n of t)e=e.concat(n);return e}class jF{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 Gw{constructor({bamFilehandle:e,bamPath:n,bamUrl:r,baiPath:o,baiFilehandle:i,baiUrl:s,csiPath:a,csiFilehandle:c,csiUrl:l,htsget:u,yieldThreadTime:f=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new wi({cache:new Tl({maxSize:50}),fill:async(d,p)=>{const{chunk:y,opts:v}=d,{data:b,cpositions:A,dpositions:C}=await this._readChunk({chunk:y,opts:{...v,signal:p}});return this.readBamFeatures(b,A,C,y)}}),this.renameRefSeq=h,e)this.bam=e;else if(n)this.bam=new Ct(n);else if(r)this.bam=new En(r);else if(u)this.htsget=!0,this.bam=new jF;else throw new Error("unable to initialize bam");if(c)this.index=new zl({filehandle:c});else if(a)this.index=new zl({filehandle:new Ct(a)});else if(l)this.index=new zl({filehandle:new En(l)});else if(i)this.index=new yo({filehandle:i});else if(o)this.index=new yo({filehandle:new Ct(o)});else if(s)this.index=new yo({filehandle:new En(s)});else if(n)this.index=new yo({filehandle:new Ct(`${n}.bai`)});else if(r)this.index=new yo({filehandle:new En(`${r}.bai`)});else if(u)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=f}async getHeaderPre(e){const n=RF(e);if(!this.index)return;const r=await this.index.parse(n),o=r.firstDataLine?r.firstDataLine.blockPosition+65535:void 0;let i;if(o){const u=o+Uw,f=await this.bam.read(Ke.Buffer.alloc(u),0,u,0,n);if(!f.bytesRead)throw new Error("Error reading header");i=f.buffer.subarray(0,Math.min(f.bytesRead,o))}else i=await this.bam.readFile(n);const s=await Pr(i);if(s.readInt32LE(0)!==zw)throw new Error("Not a BAM file");const a=s.readInt32LE(4);this.header=s.toString("utf8",8,8+a);const{chrToIndex:c,indexToChr:l}=await this._readRefSeqs(a+8,65535,n);return this.chrToIndex=c,this.indexToChr=l,Ow(this.header)}getHeader(e){return this.headerP||(this.headerP=this.getHeaderPre(e).catch(n=>{throw this.headerP=void 0,n})),this.headerP}async getHeaderText(e={}){return await this.getHeader(e),this.header}async _readRefSeqs(e,n,r){if(e>n)return this._readRefSeqs(e,n*2,r);const o=n+Uw,{bytesRead:i,buffer:s}=await this.bam.read(Ke.Buffer.alloc(o),0,n,0,r);if(!i)throw new Error("Error reading refseqs from header");const a=await Pr(s.subarray(0,Math.min(i,n))),c=a.readInt32LE(e);let l=e+4;const u={},f=[];for(let h=0;h<c;h+=1){const d=a.readInt32LE(l),p=this.renameRefSeq(a.toString("utf8",l+4,l+4+d-1)),y=a.readInt32LE(l+d+4);if(u[p]=h,f.push({refName:p,length:y}),l=l+8+d,l>a.length)return console.warn(`BAM header is very big. Re-fetching ${n} bytes.`),this._readRefSeqs(e,n*2,r)}return{chrToIndex:u,indexToChr:f}}async getRecordsForRange(e,n,r,o){return qF(this.streamRecordsForRange(e,n,r,o))}async*streamRecordsForRange(e,n,r,o){var i;await this.getHeader(o);const s=(i=this.chrToIndex)===null||i===void 0?void 0:i[e];if(s===void 0||!this.index)yield[];else{const a=await this.index.blocksForRange(s,n-1,r,o);yield*this._fetchChunkFeatures(a,s,n,r,o)}}async*_fetchChunkFeatures(e,n,r,o,i={}){const{viewAsPairs:s}=i,a=[];let c=!1;for(const l of e){const u=await this.featureCache.get(l.toString(),{chunk:l,opts:i},i.signal),f=[];for(const h of u)if(h.ref_id===n)if(h.start>=o){c=!0;break}else h.end>=r&&f.push(h);if(a.push(f),yield f,c)break}_F(i.signal),s&&(yield this.fetchPairs(n,a,i))}async fetchPairs(e,n,r){const{pairAcrossChr:o,maxInsertSize:i=2e5}=r,s={},a={};n.map(h=>{const d={};for(const p of h){const y=p.name,v=p.id;d[y]||(d[y]=0),d[y]++,a[v]=1}for(const[p,y]of Object.entries(d))y===1&&(s[p]=!0)});const c=[];n.map(h=>{for(const d of h){const p=d.name,y=d.start,v=d.next_pos,b=d.next_refid;this.index&&s[p]&&(o||b===e&&Math.abs(y-v)<i)&&c.push(this.index.blocksForRange(b,v,v+1,r))}});const l=new Map,u=await Promise.all(c);for(const h of u.flat())l.has(h.toString())||l.set(h.toString(),h);return(await Promise.all([...l.values()].map(async h=>{const{data:d,cpositions:p,dpositions:y,chunk:v}=await this._readChunk({chunk:h,opts:r}),b=[];for(const A of await this.readBamFeatures(d,p,y,v))s[A.name]&&!a[A.id]&&b.push(A);return b}))).flat()}async _readRegion(e,n,r={}){const{bytesRead:o,buffer:i}=await this.bam.read(Ke.Buffer.alloc(n),0,n,e,r);return i.subarray(0,Math.min(o,n))}async _readChunk({chunk:e,opts:n}){const r=await this._readRegion(e.minv.blockPosition,e.fetchedSize(),n),{buffer:o,cpositions:i,dpositions:s}=await K2(r,e);return{data:o,cpositions:i,dpositions:s,chunk:e}}async readBamFeatures(e,n,r,o){let i=0;const s=[];let a=0,c=+Date.now();for(;i+4<e.length;){const l=e.readInt32LE(i),u=i+4+l-1;if(r){for(;i+o.minv.dataPosition>=r[a++];);a--}if(u<e.length){const f=new wo({bytes:{byteArray:e,start:i,end:u},fileOffset:n.length>0?n[a]*256+(i-r[a])+o.minv.dataPosition+1:UF.signed(e.slice(i,u))});s.push(f),this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime&&(await BF(1),c=+Date.now())}i=u+1}return s}async hasRefSeq(e){var n,r;const o=(n=this.chrToIndex)===null||n===void 0?void 0:n[e];return o===void 0?!1:(r=this.index)===null||r===void 0?void 0:r.hasRefSeq(o)}async lineCount(e){var n;const r=(n=this.chrToIndex)===null||n===void 0?void 0:n[e];return r===void 0||!this.index?0:this.index.lineCount(r)}async indexCov(e,n,r){var o;if(!this.index)return[];await this.index.parse();const i=(o=this.chrToIndex)===null||o===void 0?void 0:o[e];return i===void 0?[]:this.index.indexCov(i,n,r)}async blocksForRange(e,n,r,o){var i;if(!this.index)return[];await this.index.parse();const s=(i=this.chrToIndex)===null||i===void 0?void 0:i[e];return s===void 0?[]:this.index.blocksForRange(s,n,r,o)}}async function Hw(t,e){const n=await Promise.all(t.map(async r=>{const{url:o,headers:i}=r;if(o.startsWith("data:"))return Ke.Buffer.from(o.split(",")[1],"base64");{const{referer:s,...a}=i,c=await fetch(o,{...e,headers:{...e==null?void 0:e.headers,...a}});if(!c.ok)throw new Error(`HTTP ${c.status} fetching ${o}: ${await c.text()}`);return Ke.Buffer.from(await c.arrayBuffer())}}));return Ke.Buffer.concat(await Promise.all(n.map(r=>Pr(r))))}class WF extends Gw{constructor(e){super({htsget:!0}),this.baseUrl=e.baseUrl,this.trackId=e.trackId}async*streamRecordsForRange(e,n,r,o){var i;const a=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${e}&start=${n}&end=${r}&format=BAM`,c=(i=this.chrToIndex)===null||i===void 0?void 0:i[e];if(c===void 0)yield[];else{const l=await fetch(a,{...o});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${a}: ${await l.text()}`);const u=await l.json(),f=await Hw(u.htsget.urls.slice(1),o);yield*this._fetchChunkFeatures([{buffer:f,_fetchedSize:void 0,bin:0,compareTo(){return 0},toUniqueString(){return`${e}_${n}_${r}`},fetchedSize(){return 0},minv:{dataPosition:0,blockPosition:0,compareTo:()=>0},maxv:{dataPosition:Number.MAX_SAFE_INTEGER,blockPosition:0,compareTo:()=>0},toString(){return`${e}_${n}_${r}`}}],c,n,r,o)}}async _readChunk({chunk:e}){if(!e.buffer)throw new Error("expected chunk.buffer in htsget");return{data:e.buffer,cpositions:[],dpositions:[],chunk:e}}async getHeader(e={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,r=await fetch(n,e);if(!r.ok)throw new Error(`HTTP ${r.status} fetching ${n}: ${await r.text()}`);const o=await r.json(),i=await Hw(o.htsget.urls,e);if(i.readInt32LE(0)!==zw)throw new Error("Not a BAM file");const s=i.readInt32LE(4),a=i.toString("utf8",8,8+s),c=Ow(a),l=[],u={},f=c.filter(h=>h.tag==="SQ");for(const[h,d]of f.entries()){let p="",y=0;for(const v of d.data)v.tag==="SN"?p=v.value:v.tag==="LN"&&(y=+v.value);u[p]=h,l[h]={refName:p,length:y}}return this.chrToIndex=u,this.indexToChr=l,c}}const QF=Object.freeze(Object.defineProperty({__proto__:null,BAI:yo,BamFile:Gw,BamRecord:wo,CSI:zl,HtsgetFile:WF},Symbol.toStringTag,{value:"Module"}));function Vw(t){if(t.greaterThan(Number.MAX_SAFE_INTEGER)||t.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return t.toNumber()}class YF extends Error{}function ya(t){if(t&&t.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const e=new YF("aborted");throw e.code="ERR_ABORTED",e}}}function ZF(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function qw(t,e){const n=[];let r=null;return t.length===0?t:(t.sort(function(o,i){const s=o.minv.blockPosition-i.minv.blockPosition;return s!==0?s:o.minv.dataPosition-i.minv.dataPosition}),t.forEach(o=>{(!e||o.maxv.compareTo(e)>0)&&(r===null?(n.push(o),r=o):ZF(r,o)?o.maxv.compareTo(r.maxv)>0&&(r.maxv=o.maxv):(n.push(o),r=o))}),n)}class Id{constructor(e,n){this.blockPosition=e,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}}function xo(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Id(t[e+7]*1099511627776+t[e+6]*4294967296+t[e+5]*16777216+t[e+4]*65536+t[e+3]*256+t[e+2],t[e+1]<<8|t[e])}class Gl{constructor(e,n,r,o=void 0){this.minv=e,this.maxv=n,this.bin=r,this._fetchedSize=o}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(e){return this.minv.compareTo(e.minv)||this.maxv.compareTo(e.maxv)||this.bin-e.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}class jw{constructor({filehandle:e,renameRefSeqs:n=r=>r}){this.filehandle=e,this.renameRefSeq=n}async getMetadata(e={}){const{indices:n,...r}=await this.parse(e);return r}_findFirstData(e,n){return e?e.compareTo(n)>0?n:e:n}async parse(e={}){return this.parseP||(this.parseP=this._parse(e).catch(n=>{throw this.parseP=void 0,n})),this.parseP}async hasRefSeq(e,n={}){var r;return!!(!((r=(await this.parse(n)).indices[e])===null||r===void 0)&&r.binIndex)}}const XF=21578324,Ww=14;function KF(t,e){return t+=1,e-=1,[[0,0],[1+(t>>26),1+(e>>26)],[9+(t>>23),9+(e>>23)],[73+(t>>20),73+(e>>20)],[585+(t>>17),585+(e>>17)],[4681+(t>>14),4681+(e>>14)]]}class vo extends jw{async lineCount(e,n={}){const r=await this.parse(n),o=r.refNameToId[e];if(o===void 0||!r.indices[o])return-1;const{stats:s}=r.indices[o];return s?s.lineCount:-1}async _parse(e={}){const n=await this.filehandle.readFile(e),r=await Pr(n);if(ya(e.signal),r.readUInt32LE(0)!==XF)throw new Error("Not a TBI file");const o=r.readInt32LE(4),i=r.readInt32LE(8),s=i&65536?"zero-based-half-open":"1-based-closed",c={0:"generic",1:"SAM",2:"VCF"}[i&15];if(!c)throw new Error(`invalid Tabix preset format flags ${i}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},u=r.readInt32LE(24),f=5,h=((1<<(f+1)*3)-1)/7,d=2**(14+f*3),p=u?String.fromCharCode(u):null,y=r.readInt32LE(28),v=r.readInt32LE(32),{refNameToId:b,refIdToName:A}=this._parseNameBytes(r.slice(36,36+v));let C=36+v,E;return{indices:new Array(o).fill(0).map(()=>{const R=r.readInt32LE(C);C+=4;const B={};let O;for(let S=0;S<R;S+=1){const Q=r.readUInt32LE(C);if(C+=4,Q>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(Q===h+1){const Z=r.readInt32LE(C);C+=4,Z===2&&(O=this.parsePseudoBin(r,C)),C+=16*Z}else{const Z=r.readInt32LE(C);C+=4;const ae=new Array(Z);for(let ce=0;ce<Z;ce+=1){const fe=xo(r,C),le=xo(r,C+8);C+=16,E=this._findFirstData(E,fe),ae[ce]=new Gl(fe,le,Q)}B[Q]=ae}}const F=r.readInt32LE(C);C+=4;const P=new Array(F);for(let S=0;S<F;S+=1)P[S]=xo(r,C),C+=8,E=this._findFirstData(E,P[S]);return{binIndex:B,linearIndex:P,stats:O}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:y,firstDataLine:E,columnNumbers:l,coordinateType:s,format:c,refIdToName:A,refNameToId:b,maxBlockSize:65536}}parsePseudoBin(e,n){return{lineCount:Vw(Cl.fromBytesLE(e.slice(n+16,n+24),!0))}}_parseNameBytes(e){let n=0,r=0;const o=[],i={};for(let s=0;s<e.length;s+=1)if(!e[s]){if(r<s){let a=e.toString("utf8",r,s);a=this.renameRefSeq(a),o[n]=a,i[a]=n}r=s+1,n+=1}return{refNameToId:i,refIdToName:o}}async blocksForRange(e,n,r,o={}){n<0&&(n=0);const i=await this.parse(o),s=i.refNameToId[e];if(s===void 0)return[];const a=i.indices[s];if(!a)return[];(a.linearIndex.length?a.linearIndex[n>>Ww>=a.linearIndex.length?a.linearIndex.length-1:n>>Ww]:new Id(0,0))||console.warn("querying outside of possible tabix range");const l=KF(n,r),u=[];for(const[y,v]of l)for(let b=y;b<=v;b++)if(a.binIndex[b])for(const A of a.binIndex[b])u.push(new Gl(A.minv,A.maxv,b));const f=a.linearIndex.length;let h=null;const d=Math.min(n>>14,f-1),p=Math.min(r>>14,f-1);for(let y=d;y<=p;++y){const v=a.linearIndex[y];v&&(!h||v.compareTo(h)<0)&&(h=v)}return qw(u,h)}}const JF=21582659,$F=38359875;function e9(t,e){return t*2**e}function Qw(t,e){return Math.floor(t/2**e)}class Hl extends jw{constructor(e){super(e),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(e,n={}){const r=await this.parse(n),o=r.refNameToId[e];if(o===void 0||!r.indices[o])return-1;const{stats:s}=r.indices[o];return s?s.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(e,n){const r=e.readInt32LE(n),o=r&65536?"zero-based-half-open":"1-based-closed",i={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!i)throw new Error(`invalid Tabix preset format flags ${r}`);const s={ref:e.readInt32LE(n+4),start:e.readInt32LE(n+8),end:e.readInt32LE(n+12)},a=e.readInt32LE(n+16),c=a?String.fromCharCode(a):null,l=e.readInt32LE(n+20),u=e.readInt32LE(n+24),{refIdToName:f,refNameToId:h}=this._parseNameBytes(e.slice(n+28,n+28+u));return{refIdToName:f,refNameToId:h,skipLines:l,metaChar:c,columnNumbers:s,format:i,coordinateType:o}}_parseNameBytes(e){let n=0,r=0;const o=[],i={};for(let s=0;s<e.length;s+=1)if(!e[s]){if(r<s){let a=e.toString("utf8",r,s);a=this.renameRefSeq(a),o[n]=a,i[a]=n}r=s+1,n+=1}return{refNameToId:i,refIdToName:o}}async _parse(e={}){const n=await Pr(await this.filehandle.readFile(e));let r;if(n.readUInt32LE(0)===JF)r=1;else if(n.readUInt32LE(0)===$F)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 o=2**(this.minShift+this.depth*3),i=n.readInt32LE(12),s=i&&i>=30?this.parseAuxData(n,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},a=n.readInt32LE(16+i);let c,l=16+i+4;const u=new Array(a).fill(0).map(()=>{const f=n.readInt32LE(l);l+=4;const h={};let d;for(let p=0;p<f;p+=1){const y=n.readUInt32LE(l);if(y>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=48;else{const v=xo(n,l+4);c=this._findFirstData(c,v);const b=n.readInt32LE(l+12);l+=16;const A=new Array(b);for(let C=0;C<b;C+=1){const E=xo(n,l),I=xo(n,l+8);l+=16,A[C]=new Gl(E,I,y)}h[y]=A}}return{binIndex:h,stats:d}});return{...s,csi:!0,refCount:a,maxBlockSize:65536,firstDataLine:c,csiVersion:r,indices:u,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:o}}parsePseudoBin(e,n){return{lineCount:Vw(Cl.fromBytesLE(e.slice(n+28,n+36),!0))}}async blocksForRange(e,n,r,o={}){n<0&&(n=0);const i=await this.parse(o),s=i.refNameToId[e];if(s===void 0)return[];const a=i.indices[s];if(!a)return[];const c=this.reg2bins(n,r),l=[];for(const[u,f]of c)for(let h=u;h<=f;h++)if(a.binIndex[h])for(const d of a.binIndex[h])l.push(new Gl(d.minv,d.maxv,h));return qw(l,new Id(0,0))}reg2bins(e,n){e-=1,e<1&&(e=1),n>2**50&&(n=2**34),n-=1;let r=0,o=0,i=this.minShift+this.depth*3;const s=[];for(;r<=this.depth;i-=3,o+=e9(1,r*3),r+=1){const a=o+Qw(e,i),c=o+Qw(n,i);if(c-a+s.length>this.maxBinNumber)throw new Error(`query ${e}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);s.push([a,c])}return s}}function t9(t){return/^[\u0000-\u007F]*$/.test(t)}const Ao=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;class n9{constructor({path:e,filehandle:n,url:r,tbiPath:o,tbiUrl:i,tbiFilehandle:s,csiPath:a,csiUrl:c,csiFilehandle:l,renameRefSeqs:u=h=>h,chunkCacheSize:f=5*2**20}){if(n)this.filehandle=n;else if(e)this.filehandle=new Ct(e);else if(r)this.filehandle=new En(r);else throw new TypeError("must provide either filehandle or path");if(s)this.index=new vo({filehandle:s,renameRefSeqs:u});else if(l)this.index=new Hl({filehandle:l,renameRefSeqs:u});else if(o)this.index=new vo({filehandle:new Ct(o),renameRefSeqs:u});else if(a)this.index=new Hl({filehandle:new Ct(a),renameRefSeqs:u});else if(e)this.index=new vo({filehandle:new Ct(`${e}.tbi`),renameRefSeqs:u});else if(c)this.index=new Hl({filehandle:new En(c)});else if(i)this.index=new vo({filehandle:new En(i)});else if(r)this.index=new vo({filehandle:new En(`${r}.tbi`)});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.renameRefSeq=u,this.chunkCache=new wi({cache:new Tl({maxSize:Math.floor(f/65536)}),fill:(h,d)=>this.readChunk(h,{signal:d})})}async getLines(e,n,r,o){var i,s;let a,c={},l;typeof o=="function"?l=o:(c=o,l=o.lineCallback,a=o.signal);const u=await this.index.getMetadata(c);ya(a);const f=n??0,h=r??u.maxRefLength;if(!(f<=h))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(f===h)return;const d=await this.index.blocksForRange(e,f,h,c);ya(a);for(const p of d){const{buffer:y,cpositions:v,dpositions:b}=await this.chunkCache.get(p.toString(),p,a);ya(a);let A=0,C=0;const E=(i=Ao==null?void 0:Ao.decode(y))!==null&&i!==void 0?i:y.toString(),I=y.length<5e8&&t9(E);for(;A<E.length;){let R,B;if(I){if(B=E.indexOf(`
|
|
790
|
+
`,A),B===-1)break;R=E.slice(A,B)}else{if(B=y.indexOf(`
|
|
791
|
+
`,A),B===-1)break;const P=y.slice(A,B);R=(s=Ao==null?void 0:Ao.decode(P))!==null&&s!==void 0?s:P.toString()}if(b){for(;A+p.minv.dataPosition>=b[C++];);C--}const{startCoordinate:O,overlaps:F}=this.checkLine(u,e,f,h,R);if(F)l(R,v[C]*256+(A-b[C])+p.minv.dataPosition+1);else if(O!==void 0&&O>=h)return;A=B+1}}}async getMetadata(e={}){return this.index.getMetadata(e)}async getHeaderBuffer(e={}){const{firstDataLine:n,metaChar:r,maxBlockSize:o}=await this.getMetadata(e);ya(e.signal);const i=((n==null?void 0:n.blockPosition)||0)+o,s=await this._readRegion(0,i,e),a=await Pr(s);if(r){let c=-1;const l=10,u=r.charCodeAt(0);for(let f=0;f<a.length&&!(f===c+1&&a[f]!==u);f+=1)a[f]===l&&(c=f);return a.subarray(0,c+1)}return a}async getHeader(e={}){return(await this.getHeaderBuffer(e)).toString("utf8")}async getReferenceSequenceNames(e={}){return(await this.getMetadata(e)).refIdToName}checkLine(e,n,r,o,i){const{columnNumbers:s,metaChar:a,coordinateType:c,format:l}=e;if(a&&i.startsWith(a))return{overlaps:!1};let{ref:u,start:f,end:h}=s;u||(u=0),f||(f=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(u,f,h);let p=1,y=0,v="",b=-1/0;const A=i.length;for(let C=0;C<A+1;C++)if(i[C]===" "||C===A){if(p===u){if(this.renameRefSeq(i.slice(y,C))!==n)return{overlaps:!1}}else if(p===f){if(b=parseInt(i.slice(y,C),10),c==="1-based-closed"&&(b-=1),b>=o)return{startCoordinate:b,overlaps:!1};if((h===0||h===f)&&b+1<=r)return{startCoordinate:b,overlaps:!1}}else if(l==="VCF"&&p===4)v=i.slice(y,C);else if(p===h&&(l==="VCF"?this._getVcfEnd(b,v,i.slice(y,C)):Number.parseInt(i.slice(y,C),10))<=r)return{overlaps:!1};if(y=C+1,p+=1,p>d)break}return{startCoordinate:b,overlaps:!0}}_getVcfEnd(e,n,r){let o=e+n.length;const i=r.includes("SVTYPE=TRA");if(r[0]!=="."&&!i){let s=";";for(let a=0;a<r.length;a+=1){if(s===";"&&r.slice(a,a+4)==="END="){let c=r.indexOf(";",a);c===-1&&(c=r.length),o=parseInt(r.slice(a+4,c),10);break}s=r[a]}}else if(i)return e+1;return o}async lineCount(e,n={}){return this.index.lineCount(e,n)}async _readRegion(e,n,r={}){const o=Ke.Buffer.alloc(n),{bytesRead:i,buffer:s}=await this.filehandle.read(o,0,n,e,r);return s.subarray(0,i)}async readChunk(e,n={}){const r=await this._readRegion(e.minv.blockPosition,e.fetchedSize(),n);return K2(r,e)}}const r9=Object.freeze(Object.defineProperty({__proto__:null,CSI:Hl,TBI:vo,TabixIndexedFile:n9},Symbol.toStringTag,{value:"Module"}));var Vl={exports:{}},Yw;function Td(){if(Yw)return Vl.exports;Yw=1;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(I,R,B){return Function.prototype.apply.call(I,R,B)},n;t&&typeof t.ownKeys=="function"?n=t.ownKeys:Object.getOwnPropertySymbols?n=function(I){return Object.getOwnPropertyNames(I).concat(Object.getOwnPropertySymbols(I))}:n=function(I){return Object.getOwnPropertyNames(I)};function r(E){console&&console.warn&&console.warn(E)}var o=Number.isNaN||function(I){return I!==I};function i(){i.init.call(this)}Vl.exports=i,Vl.exports.once=b,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(E){if(typeof E!="number"||E<0||o(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");s=E}}),i.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},i.prototype.setMaxListeners=function(I){if(typeof I!="number"||I<0||o(I))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+I+".");return this._maxListeners=I,this};function c(E){return E._maxListeners===void 0?i.defaultMaxListeners:E._maxListeners}i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(I){for(var R=[],B=1;B<arguments.length;B++)R.push(arguments[B]);var O=I==="error",F=this._events;if(F!==void 0)O=O&&F.error===void 0;else if(!O)return!1;if(O){var P;if(R.length>0&&(P=R[0]),P instanceof Error)throw P;var S=new Error("Unhandled error."+(P?" ("+P.message+")":""));throw S.context=P,S}var Q=F[I];if(Q===void 0)return!1;if(typeof Q=="function")e(Q,this,R);else for(var Z=Q.length,ae=p(Q,Z),B=0;B<Z;++B)e(ae[B],this,R);return!0};function l(E,I,R,B){var O,F,P;if(a(R),F=E._events,F===void 0?(F=E._events=Object.create(null),E._eventsCount=0):(F.newListener!==void 0&&(E.emit("newListener",I,R.listener?R.listener:R),F=E._events),P=F[I]),P===void 0)P=F[I]=R,++E._eventsCount;else if(typeof P=="function"?P=F[I]=B?[R,P]:[P,R]:B?P.unshift(R):P.push(R),O=c(E),O>0&&P.length>O&&!P.warned){P.warned=!0;var S=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(I)+" listeners added. Use emitter.setMaxListeners() to increase limit");S.name="MaxListenersExceededWarning",S.emitter=E,S.type=I,S.count=P.length,r(S)}return E}i.prototype.addListener=function(I,R){return l(this,I,R,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(I,R){return l(this,I,R,!0)};function u(){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 f(E,I,R){var B={fired:!1,wrapFn:void 0,target:E,type:I,listener:R},O=u.bind(B);return O.listener=R,B.wrapFn=O,O}i.prototype.once=function(I,R){return a(R),this.on(I,f(this,I,R)),this},i.prototype.prependOnceListener=function(I,R){return a(R),this.prependListener(I,f(this,I,R)),this},i.prototype.removeListener=function(I,R){var B,O,F,P,S;if(a(R),O=this._events,O===void 0)return this;if(B=O[I],B===void 0)return this;if(B===R||B.listener===R)--this._eventsCount===0?this._events=Object.create(null):(delete O[I],O.removeListener&&this.emit("removeListener",I,B.listener||R));else if(typeof B!="function"){for(F=-1,P=B.length-1;P>=0;P--)if(B[P]===R||B[P].listener===R){S=B[P].listener,F=P;break}if(F<0)return this;F===0?B.shift():y(B,F),B.length===1&&(O[I]=B[0]),O.removeListener!==void 0&&this.emit("removeListener",I,S||R)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(I){var R,B,O;if(B=this._events,B===void 0)return this;if(B.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):B[I]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete B[I]),this;if(arguments.length===0){var F=Object.keys(B),P;for(O=0;O<F.length;++O)P=F[O],P!=="removeListener"&&this.removeAllListeners(P);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(R=B[I],typeof R=="function")this.removeListener(I,R);else if(R!==void 0)for(O=R.length-1;O>=0;O--)this.removeListener(I,R[O]);return this};function h(E,I,R){var B=E._events;if(B===void 0)return[];var O=B[I];return O===void 0?[]:typeof O=="function"?R?[O.listener||O]:[O]:R?v(O):p(O,O.length)}i.prototype.listeners=function(I){return h(this,I,!0)},i.prototype.rawListeners=function(I){return h(this,I,!1)},i.listenerCount=function(E,I){return typeof E.listenerCount=="function"?E.listenerCount(I):d.call(E,I)},i.prototype.listenerCount=d;function d(E){var I=this._events;if(I!==void 0){var R=I[E];if(typeof R=="function")return 1;if(R!==void 0)return R.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function p(E,I){for(var R=new Array(I),B=0;B<I;++B)R[B]=E[B];return R}function y(E,I){for(;I+1<E.length;I++)E[I]=E[I+1];E.pop()}function v(E){for(var I=new Array(E.length),R=0;R<I.length;++R)I[R]=E[R].listener||E[R];return I}function b(E,I){return new Promise(function(R,B){function O(P){E.removeListener(I,F),B(P)}function F(){typeof E.removeListener=="function"&&E.removeListener("error",O),R([].slice.call(arguments))}C(E,I,F,{once:!0}),I!=="error"&&A(E,O,{once:!0})})}function A(E,I,R){typeof E.on=="function"&&C(E,"error",I,R)}function C(E,I,R,B){if(typeof E.on=="function")B.once?E.once(I,R):E.on(I,R);else if(typeof E.addEventListener=="function")E.addEventListener(I,function O(F){B.once&&E.removeEventListener(I,O),R(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E)}return Vl.exports}var ql={exports:{}},Zw;function Eo(){return Zw||(Zw=1,typeof Object.create=="function"?ql.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ql.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}}),ql.exports}var Dd,Xw;function Kw(){return Xw||(Xw=1,Dd=Td().EventEmitter),Dd}const Jw=j_(Z_);var Bd,$w;function i9(){if($w)return Bd;$w=1;function t(p,y){var v=Object.keys(p);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(p);y&&(b=b.filter(function(A){return Object.getOwnPropertyDescriptor(p,A).enumerable})),v.push.apply(v,b)}return v}function e(p){for(var y=1;y<arguments.length;y++){var v=arguments[y]!=null?arguments[y]:{};y%2?t(Object(v),!0).forEach(function(b){n(p,b,v[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(v)):t(Object(v)).forEach(function(b){Object.defineProperty(p,b,Object.getOwnPropertyDescriptor(v,b))})}return p}function n(p,y,v){return y=s(y),y in p?Object.defineProperty(p,y,{value:v,enumerable:!0,configurable:!0,writable:!0}):p[y]=v,p}function r(p,y){if(!(p instanceof y))throw new TypeError("Cannot call a class as a function")}function o(p,y){for(var v=0;v<y.length;v++){var b=y[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,s(b.key),b)}}function i(p,y,v){return y&&o(p.prototype,y),Object.defineProperty(p,"prototype",{writable:!1}),p}function s(p){var y=a(p,"string");return typeof y=="symbol"?y:String(y)}function a(p,y){if(typeof p!="object"||p===null)return p;var v=p[Symbol.toPrimitive];if(v!==void 0){var b=v.call(p,y);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}var c=ua(),l=c.Buffer,u=Jw,f=u.inspect,h=f&&f.custom||"inspect";function d(p,y,v){l.prototype.copy.call(p,y,v)}return Bd=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return i(p,[{key:"push",value:function(v){var b={data:v,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length}},{key:"unshift",value:function(v){var b={data:v,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var b=this.head,A=""+b.data;b=b.next;)A+=v+b.data;return A}},{key:"concat",value:function(v){if(this.length===0)return l.alloc(0);for(var b=l.allocUnsafe(v>>>0),A=this.head,C=0;A;)d(A.data,b,C),C+=A.data.length,A=A.next;return b}},{key:"consume",value:function(v,b){var A;return v<this.head.data.length?(A=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):v===this.head.data.length?A=this.shift():A=b?this._getString(v):this._getBuffer(v),A}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var b=this.head,A=1,C=b.data;for(v-=C.length;b=b.next;){var E=b.data,I=v>E.length?E.length:v;if(I===E.length?C+=E:C+=E.slice(0,v),v-=I,v===0){I===E.length?(++A,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=E.slice(I));break}++A}return this.length-=A,C}},{key:"_getBuffer",value:function(v){var b=l.allocUnsafe(v),A=this.head,C=1;for(A.data.copy(b),v-=A.data.length;A=A.next;){var E=A.data,I=v>E.length?E.length:v;if(E.copy(b,b.length-v,0,I),v-=I,v===0){I===E.length?(++C,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=E.slice(I));break}++C}return this.length-=C,b}},{key:h,value:function(v,b){return f(this,e(e({},b),{},{depth:0,customInspect:!1}))}}]),p}(),Bd}var _d,ex;function tx(){if(ex)return _d;ex=1;function t(s,a){var c=this,l=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return l||u?(a?a(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(o,this,s)):process.nextTick(o,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(f){!a&&f?c._writableState?c._writableState.errorEmitted?process.nextTick(n,c):(c._writableState.errorEmitted=!0,process.nextTick(e,c,f)):process.nextTick(e,c,f):a?(process.nextTick(n,c),a(f)):process.nextTick(n,c)}),this)}function e(s,a){o(s,a),n(s)}function n(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.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 o(s,a){s.emit("error",a)}function i(s,a){var c=s._readableState,l=s._writableState;c&&c.autoDestroy||l&&l.autoDestroy?s.destroy(a):s.emit("error",a)}return _d={destroy:t,undestroy:r,errorOrDestroy:i},_d}var kd={},nx;function So(){if(nx)return kd;nx=1;function t(a,c){a.prototype=Object.create(c.prototype),a.prototype.constructor=a,a.__proto__=c}var e={};function n(a,c,l){l||(l=Error);function u(h,d,p){return typeof c=="string"?c:c(h,d,p)}var f=function(h){t(d,h);function d(p,y,v){return h.call(this,u(p,y,v))||this}return d}(l);f.prototype.name=l.name,f.prototype.code=a,e[a]=f}function r(a,c){if(Array.isArray(a)){var l=a.length;return a=a.map(function(u){return String(u)}),l>2?"one of ".concat(c," ").concat(a.slice(0,l-1).join(", "),", or ")+a[l-1]:l===2?"one of ".concat(c," ").concat(a[0]," or ").concat(a[1]):"of ".concat(c," ").concat(a[0])}else return"of ".concat(c," ").concat(String(a))}function o(a,c,l){return a.substr(0,c.length)===c}function i(a,c,l){return(l===void 0||l>a.length)&&(l=a.length),a.substring(l-c.length,l)===c}function s(a,c,l){return typeof l!="number"&&(l=0),l+c.length>a.length?!1:a.indexOf(c,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(a,c){return'The value "'+c+'" is invalid for option "'+a+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(a,c,l){var u;typeof c=="string"&&o(c,"not ")?(u="must not be",c=c.replace(/^not /,"")):u="must be";var f;if(i(a," argument"))f="The ".concat(a," ").concat(u," ").concat(r(c,"type"));else{var h=s(a,".")?"property":"argument";f='The "'.concat(a,'" ').concat(h," ").concat(u," ").concat(r(c,"type"))}return f+=". Received type ".concat(typeof l),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" 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(a){return"Unknown encoding: "+a},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),kd.codes=e,kd}var Rd,rx;function ix(){if(rx)return Rd;rx=1;var t=So().codes.ERR_INVALID_OPT_VALUE;function e(r,o,i){return r.highWaterMark!=null?r.highWaterMark:o?r[i]:null}function n(r,o,i,s){var a=e(o,s,i);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var c=s?i:"highWaterMark";throw new t(c,a)}return Math.floor(a)}return r.objectMode?16:16*1024}return Rd={getHighWaterMark:n},Rd}var Fd,ox;function o9(){if(ox)return Fd;ox=1,Fd=t;function t(n,r){if(e("noDeprecation"))return n;var o=!1;function i(){if(!o){if(e("throwDeprecation"))throw new Error(r);e("traceDeprecation")?console.trace(r):console.warn(r),o=!0}return n.apply(this,arguments)}return i}function e(n){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return Fd}var Md,sx;function ax(){if(sx)return Md;sx=1,Md=O;function t(j){var q=this;this.next=null,this.entry=null,this.finish=function(){Le(q,j)}}var e;O.WritableState=R;var n={deprecate:o9()},r=Kw(),o=ua().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(j){return o.from(j)}function a(j){return o.isBuffer(j)||j instanceof i}var c=tx(),l=ix(),u=l.getHighWaterMark,f=So().codes,h=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,y=f.ERR_STREAM_CANNOT_PIPE,v=f.ERR_STREAM_DESTROYED,b=f.ERR_STREAM_NULL_VALUES,A=f.ERR_STREAM_WRITE_AFTER_END,C=f.ERR_UNKNOWN_ENCODING,E=c.errorOrDestroy;Eo()(O,r);function I(){}function R(j,q,re){e=e||Co(),j=j||{},typeof re!="boolean"&&(re=q instanceof e),this.objectMode=!!j.objectMode,re&&(this.objectMode=this.objectMode||!!j.writableObjectMode),this.highWaterMark=u(this,j,"writableHighWaterMark",re),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var $=j.decodeStrings===!1;this.decodeStrings=!$,this.defaultEncoding=j.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ue){fe(q,ue)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=j.emitClose!==!1,this.autoDestroy=!!j.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}R.prototype.getBuffer=function(){for(var q=this.bufferedRequest,re=[];q;)re.push(q),q=q.next;return re},function(){try{Object.defineProperty(R.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(O,Symbol.hasInstance,{value:function(q){return B.call(this,q)?!0:this!==O?!1:q&&q._writableState instanceof R}})):B=function(q){return q instanceof this};function O(j){e=e||Co();var q=this instanceof e;if(!q&&!B.call(O,this))return new O(j);this._writableState=new R(j,this,q),this.writable=!0,j&&(typeof j.write=="function"&&(this._write=j.write),typeof j.writev=="function"&&(this._writev=j.writev),typeof j.destroy=="function"&&(this._destroy=j.destroy),typeof j.final=="function"&&(this._final=j.final)),r.call(this)}O.prototype.pipe=function(){E(this,new y)};function F(j,q){var re=new A;E(j,re),process.nextTick(q,re)}function P(j,q,re,$){var ue;return re===null?ue=new b:typeof re!="string"&&!q.objectMode&&(ue=new h("chunk",["string","Buffer"],re)),ue?(E(j,ue),process.nextTick($,ue),!1):!0}O.prototype.write=function(j,q,re){var $=this._writableState,ue=!1,L=!$.objectMode&&a(j);return L&&!o.isBuffer(j)&&(j=s(j)),typeof q=="function"&&(re=q,q=null),L?q="buffer":q||(q=$.defaultEncoding),typeof re!="function"&&(re=I),$.ending?F(this,re):(L||P(this,$,j,re))&&($.pendingcb++,ue=Q(this,$,L,j,q,re)),ue},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var j=this._writableState;j.corked&&(j.corked--,!j.writing&&!j.corked&&!j.bufferProcessing&&j.bufferedRequest&&pe(this,j))},O.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=q.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((q+"").toLowerCase())>-1))throw new C(q);return this._writableState.defaultEncoding=q,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function S(j,q,re){return!j.objectMode&&j.decodeStrings!==!1&&typeof q=="string"&&(q=o.from(q,re)),q}Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Q(j,q,re,$,ue,L){if(!re){var D=S(q,$,ue);$!==D&&(re=!0,ue="buffer",$=D)}var ee=q.objectMode?1:$.length;q.length+=ee;var oe=q.length<q.highWaterMark;if(oe||(q.needDrain=!0),q.writing||q.corked){var De=q.lastBufferedRequest;q.lastBufferedRequest={chunk:$,encoding:ue,isBuf:re,callback:L,next:null},De?De.next=q.lastBufferedRequest:q.bufferedRequest=q.lastBufferedRequest,q.bufferedRequestCount+=1}else Z(j,q,!1,ee,$,ue,L);return oe}function Z(j,q,re,$,ue,L,D){q.writelen=$,q.writecb=D,q.writing=!0,q.sync=!0,q.destroyed?q.onwrite(new v("write")):re?j._writev(ue,q.onwrite):j._write(ue,L,q.onwrite),q.sync=!1}function ae(j,q,re,$,ue){--q.pendingcb,re?(process.nextTick(ue,$),process.nextTick(Te,j,q),j._writableState.errorEmitted=!0,E(j,$)):(ue($),j._writableState.errorEmitted=!0,E(j,$),Te(j,q))}function ce(j){j.writing=!1,j.writecb=null,j.length-=j.writelen,j.writelen=0}function fe(j,q){var re=j._writableState,$=re.sync,ue=re.writecb;if(typeof ue!="function")throw new p;if(ce(re),q)ae(j,re,$,q,ue);else{var L=Ce(re)||j.destroyed;!L&&!re.corked&&!re.bufferProcessing&&re.bufferedRequest&&pe(j,re),$?process.nextTick(le,j,re,L,ue):le(j,re,L,ue)}}function le(j,q,re,$){re||Ee(j,q),q.pendingcb--,$(),Te(j,q)}function Ee(j,q){q.length===0&&q.needDrain&&(q.needDrain=!1,j.emit("drain"))}function pe(j,q){q.bufferProcessing=!0;var re=q.bufferedRequest;if(j._writev&&re&&re.next){var $=q.bufferedRequestCount,ue=new Array($),L=q.corkedRequestsFree;L.entry=re;for(var D=0,ee=!0;re;)ue[D]=re,re.isBuf||(ee=!1),re=re.next,D+=1;ue.allBuffers=ee,Z(j,q,!0,q.length,ue,"",L.finish),q.pendingcb++,q.lastBufferedRequest=null,L.next?(q.corkedRequestsFree=L.next,L.next=null):q.corkedRequestsFree=new t(q),q.bufferedRequestCount=0}else{for(;re;){var oe=re.chunk,De=re.encoding,ye=re.callback,xe=q.objectMode?1:oe.length;if(Z(j,q,!1,xe,oe,De,ye),re=re.next,q.bufferedRequestCount--,q.writing)break}re===null&&(q.lastBufferedRequest=null)}q.bufferedRequest=re,q.bufferProcessing=!1}O.prototype._write=function(j,q,re){re(new d("_write()"))},O.prototype._writev=null,O.prototype.end=function(j,q,re){var $=this._writableState;return typeof j=="function"?(re=j,j=null,q=null):typeof q=="function"&&(re=q,q=null),j!=null&&this.write(j,q),$.corked&&($.corked=1,this.uncork()),$.ending||He(this,$,re),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ce(j){return j.ending&&j.length===0&&j.bufferedRequest===null&&!j.finished&&!j.writing}function Ie(j,q){j._final(function(re){q.pendingcb--,re&&E(j,re),q.prefinished=!0,j.emit("prefinish"),Te(j,q)})}function we(j,q){!q.prefinished&&!q.finalCalled&&(typeof j._final=="function"&&!q.destroyed?(q.pendingcb++,q.finalCalled=!0,process.nextTick(Ie,j,q)):(q.prefinished=!0,j.emit("prefinish")))}function Te(j,q){var re=Ce(q);if(re&&(we(j,q),q.pendingcb===0&&(q.finished=!0,j.emit("finish"),q.autoDestroy))){var $=j._readableState;(!$||$.autoDestroy&&$.endEmitted)&&j.destroy()}return re}function He(j,q,re){q.ending=!0,Te(j,q),re&&(q.finished?process.nextTick(re):j.once("finish",re)),q.ended=!0,j.writable=!1}function Le(j,q,re){var $=j.entry;for(j.entry=null;$;){var ue=$.callback;q.pendingcb--,ue(re),$=$.next}q.corkedRequestsFree.next=j}return Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(q){this._writableState&&(this._writableState.destroyed=q)}}),O.prototype.destroy=c.destroy,O.prototype._undestroy=c.undestroy,O.prototype._destroy=function(j,q){q(j)},Md}var Pd,cx;function Co(){if(cx)return Pd;cx=1;var t=Object.keys||function(l){var u=[];for(var f in l)u.push(f);return u};Pd=s;var e=gx(),n=ax();Eo()(s,e);for(var r=t(n.prototype),o=0;o<r.length;o++){var i=r[o];s.prototype[i]||(s.prototype[i]=n.prototype[i])}function s(l){if(!(this instanceof s))return new s(l);e.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",a)))}Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a(){this._writableState.ended||process.nextTick(c,this)}function c(l){l.end()}return Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),Pd}var Ld={},jl={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var lx;function s9(){return lx||(lx=1,function(t,e){var n=ua(),r=n.Buffer;function o(s,a){for(var c in s)a[c]=s[c]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=i);function i(s,a,c){return r(s,a,c)}i.prototype=Object.create(r.prototype),o(r,i),i.from=function(s,a,c){if(typeof s=="number")throw new TypeError("Argument must not be a number");return r(s,a,c)},i.alloc=function(s,a,c){if(typeof s!="number")throw new TypeError("Argument must be a number");var l=r(s);return a!==void 0?typeof c=="string"?l.fill(a,c):l.fill(a):l.fill(0),l},i.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return r(s)},i.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(s)}}(jl,jl.exports)),jl.exports}var ux;function Nd(){if(ux)return Ld;ux=1;var t=s9().Buffer,e=t.isEncoding||function(b){switch(b=""+b,b&&b.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 n(b){if(!b)return"utf8";for(var A;;)switch(b){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 b;default:if(A)return;b=(""+b).toLowerCase(),A=!0}}function r(b){var A=n(b);if(typeof A!="string"&&(t.isEncoding===e||!e(b)))throw new Error("Unknown encoding: "+b);return A||b}Ld.StringDecoder=o;function o(b){this.encoding=r(b);var A;switch(this.encoding){case"utf16le":this.text=f,this.end=h,A=4;break;case"utf8":this.fillLast=c,A=4;break;case"base64":this.text=d,this.end=p,A=3;break;default:this.write=y,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(A)}o.prototype.write=function(b){if(b.length===0)return"";var A,C;if(this.lastNeed){if(A=this.fillLast(b),A===void 0)return"";C=this.lastNeed,this.lastNeed=0}else C=0;return C<b.length?A?A+this.text(b,C):this.text(b,C):A||""},o.prototype.end=u,o.prototype.text=l,o.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length};function i(b){return b<=127?0:b>>5===6?2:b>>4===14?3:b>>3===30?4:b>>6===2?-1:-2}function s(b,A,C){var E=A.length-1;if(E<C)return 0;var I=i(A[E]);return I>=0?(I>0&&(b.lastNeed=I-1),I):--E<C||I===-2?0:(I=i(A[E]),I>=0?(I>0&&(b.lastNeed=I-2),I):--E<C||I===-2?0:(I=i(A[E]),I>=0?(I>0&&(I===2?I=0:b.lastNeed=I-3),I):0))}function a(b,A,C){if((A[0]&192)!==128)return b.lastNeed=0,"�";if(b.lastNeed>1&&A.length>1){if((A[1]&192)!==128)return b.lastNeed=1,"�";if(b.lastNeed>2&&A.length>2&&(A[2]&192)!==128)return b.lastNeed=2,"�"}}function c(b){var A=this.lastTotal-this.lastNeed,C=a(this,b);if(C!==void 0)return C;if(this.lastNeed<=b.length)return b.copy(this.lastChar,A,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,A,0,b.length),this.lastNeed-=b.length}function l(b,A){var C=s(this,b,A);if(!this.lastNeed)return b.toString("utf8",A);this.lastTotal=C;var E=b.length-(C-this.lastNeed);return b.copy(this.lastChar,0,E),b.toString("utf8",A,E)}function u(b){var A=b&&b.length?this.write(b):"";return this.lastNeed?A+"�":A}function f(b,A){if((b.length-A)%2===0){var C=b.toString("utf16le",A);if(C){var E=C.charCodeAt(C.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],C.slice(0,-1)}return C}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",A,b.length-1)}function h(b){var A=b&&b.length?this.write(b):"";if(this.lastNeed){var C=this.lastTotal-this.lastNeed;return A+this.lastChar.toString("utf16le",0,C)}return A}function d(b,A){var C=(b.length-A)%3;return C===0?b.toString("base64",A):(this.lastNeed=3-C,this.lastTotal=3,C===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",A,b.length-C))}function p(b){var A=b&&b.length?this.write(b):"";return this.lastNeed?A+this.lastChar.toString("base64",0,3-this.lastNeed):A}function y(b){return b.toString(this.encoding)}function v(b){return b&&b.length?this.write(b):""}return Ld}var Od,fx;function zd(){if(fx)return Od;fx=1;var t=So().codes.ERR_STREAM_PREMATURE_CLOSE;function e(i){var s=!1;return function(){if(!s){s=!0;for(var a=arguments.length,c=new Array(a),l=0;l<a;l++)c[l]=arguments[l];i.apply(this,c)}}}function n(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function o(i,s,a){if(typeof s=="function")return o(i,null,s);s||(s={}),a=e(a||n);var c=s.readable||s.readable!==!1&&i.readable,l=s.writable||s.writable!==!1&&i.writable,u=function(){i.writable||h()},f=i._writableState&&i._writableState.finished,h=function(){l=!1,f=!0,c||a.call(i)},d=i._readableState&&i._readableState.endEmitted,p=function(){c=!1,d=!0,l||a.call(i)},y=function(C){a.call(i,C)},v=function(){var C;if(c&&!d)return(!i._readableState||!i._readableState.ended)&&(C=new t),a.call(i,C);if(l&&!f)return(!i._writableState||!i._writableState.ended)&&(C=new t),a.call(i,C)},b=function(){i.req.on("finish",h)};return r(i)?(i.on("complete",h),i.on("abort",v),i.req?b():i.on("request",b)):l&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",p),i.on("finish",h),s.error!==!1&&i.on("error",y),i.on("close",v),function(){i.removeListener("complete",h),i.removeListener("abort",v),i.removeListener("request",b),i.req&&i.req.removeListener("finish",h),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",h),i.removeListener("end",p),i.removeListener("error",y),i.removeListener("close",v)}}return Od=o,Od}var Ud,hx;function a9(){if(hx)return Ud;hx=1;var t;function e(C,E,I){return E=n(E),E in C?Object.defineProperty(C,E,{value:I,enumerable:!0,configurable:!0,writable:!0}):C[E]=I,C}function n(C){var E=r(C,"string");return typeof E=="symbol"?E:String(E)}function r(C,E){if(typeof C!="object"||C===null)return C;var I=C[Symbol.toPrimitive];if(I!==void 0){var R=I.call(C,E);if(typeof R!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(E==="string"?String:Number)(C)}var o=zd(),i=Symbol("lastResolve"),s=Symbol("lastReject"),a=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function h(C,E){return{value:C,done:E}}function d(C){var E=C[i];if(E!==null){var I=C[f].read();I!==null&&(C[l]=null,C[i]=null,C[s]=null,E(h(I,!1)))}}function p(C){process.nextTick(d,C)}function y(C,E){return function(I,R){C.then(function(){if(E[c]){I(h(void 0,!0));return}E[u](I,R)},R)}}var v=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((t={get stream(){return this[f]},next:function(){var E=this,I=this[a];if(I!==null)return Promise.reject(I);if(this[c])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(F,P){process.nextTick(function(){E[a]?P(E[a]):F(h(void 0,!0))})});var R=this[l],B;if(R)B=new Promise(y(R,this));else{var O=this[f].read();if(O!==null)return Promise.resolve(h(O,!1));B=new Promise(this[u])}return this[l]=B,B}},e(t,Symbol.asyncIterator,function(){return this}),e(t,"return",function(){var E=this;return new Promise(function(I,R){E[f].destroy(null,function(B){if(B){R(B);return}I(h(void 0,!0))})})}),t),v),A=function(E){var I,R=Object.create(b,(I={},e(I,f,{value:E,writable:!0}),e(I,i,{value:null,writable:!0}),e(I,s,{value:null,writable:!0}),e(I,a,{value:null,writable:!0}),e(I,c,{value:E._readableState.endEmitted,writable:!0}),e(I,u,{value:function(O,F){var P=R[f].read();P?(R[l]=null,R[i]=null,R[s]=null,O(h(P,!1))):(R[i]=O,R[s]=F)},writable:!0}),I));return R[l]=null,o(E,function(B){if(B&&B.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=R[s];O!==null&&(R[l]=null,R[i]=null,R[s]=null,O(B)),R[a]=B;return}var F=R[i];F!==null&&(R[l]=null,R[i]=null,R[s]=null,F(h(void 0,!0))),R[c]=!0}),E.on("readable",p.bind(null,R)),R};return Ud=A,Ud}var Gd,dx;function c9(){return dx||(dx=1,Gd=function(){throw new Error("Readable.from is not available in the browser")}),Gd}var Hd,px;function gx(){if(px)return Hd;px=1,Hd=F;var t;F.ReadableState=O,Td().EventEmitter;var e=function(D,ee){return D.listeners(ee).length},n=Kw(),r=ua().Buffer,o=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(L){return r.from(L)}function s(L){return r.isBuffer(L)||L instanceof o}var a=Jw,c;a&&a.debuglog?c=a.debuglog("stream"):c=function(){};var l=i9(),u=tx(),f=ix(),h=f.getHighWaterMark,d=So().codes,p=d.ERR_INVALID_ARG_TYPE,y=d.ERR_STREAM_PUSH_AFTER_EOF,v=d.ERR_METHOD_NOT_IMPLEMENTED,b=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A,C,E;Eo()(F,n);var I=u.errorOrDestroy,R=["error","close","destroy","pause","resume"];function B(L,D,ee){if(typeof L.prependListener=="function")return L.prependListener(D,ee);!L._events||!L._events[D]?L.on(D,ee):Array.isArray(L._events[D])?L._events[D].unshift(ee):L._events[D]=[ee,L._events[D]]}function O(L,D,ee){t=t||Co(),L=L||{},typeof ee!="boolean"&&(ee=D instanceof t),this.objectMode=!!L.objectMode,ee&&(this.objectMode=this.objectMode||!!L.readableObjectMode),this.highWaterMark=h(this,L,"readableHighWaterMark",ee),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=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.destroyed=!1,this.defaultEncoding=L.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,L.encoding&&(A||(A=Nd().StringDecoder),this.decoder=new A(L.encoding),this.encoding=L.encoding)}function F(L){if(t=t||Co(),!(this instanceof F))return new F(L);var D=this instanceof t;this._readableState=new O(L,this,D),this.readable=!0,L&&(typeof L.read=="function"&&(this._read=L.read),typeof L.destroy=="function"&&(this._destroy=L.destroy)),n.call(this)}Object.defineProperty(F.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(D){this._readableState&&(this._readableState.destroyed=D)}}),F.prototype.destroy=u.destroy,F.prototype._undestroy=u.undestroy,F.prototype._destroy=function(L,D){D(L)},F.prototype.push=function(L,D){var ee=this._readableState,oe;return ee.objectMode?oe=!0:typeof L=="string"&&(D=D||ee.defaultEncoding,D!==ee.encoding&&(L=r.from(L,D),D=""),oe=!0),P(this,L,D,!1,oe)},F.prototype.unshift=function(L){return P(this,L,null,!0,!1)};function P(L,D,ee,oe,De){c("readableAddChunk",D);var ye=L._readableState;if(D===null)ye.reading=!1,fe(L,ye);else{var xe;if(De||(xe=Q(ye,D)),xe)I(L,xe);else if(ye.objectMode||D&&D.length>0)if(typeof D!="string"&&!ye.objectMode&&Object.getPrototypeOf(D)!==r.prototype&&(D=i(D)),oe)ye.endEmitted?I(L,new b):S(L,ye,D,!0);else if(ye.ended)I(L,new y);else{if(ye.destroyed)return!1;ye.reading=!1,ye.decoder&&!ee?(D=ye.decoder.write(D),ye.objectMode||D.length!==0?S(L,ye,D,!1):pe(L,ye)):S(L,ye,D,!1)}else oe||(ye.reading=!1,pe(L,ye))}return!ye.ended&&(ye.length<ye.highWaterMark||ye.length===0)}function S(L,D,ee,oe){D.flowing&&D.length===0&&!D.sync?(D.awaitDrain=0,L.emit("data",ee)):(D.length+=D.objectMode?1:ee.length,oe?D.buffer.unshift(ee):D.buffer.push(ee),D.needReadable&&le(L)),pe(L,D)}function Q(L,D){var ee;return!s(D)&&typeof D!="string"&&D!==void 0&&!L.objectMode&&(ee=new p("chunk",["string","Buffer","Uint8Array"],D)),ee}F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(L){A||(A=Nd().StringDecoder);var D=new A(L);this._readableState.decoder=D,this._readableState.encoding=this._readableState.decoder.encoding;for(var ee=this._readableState.buffer.head,oe="";ee!==null;)oe+=D.write(ee.data),ee=ee.next;return this._readableState.buffer.clear(),oe!==""&&this._readableState.buffer.push(oe),this._readableState.length=oe.length,this};var Z=1073741824;function ae(L){return L>=Z?L=Z:(L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++),L}function ce(L,D){return L<=0||D.length===0&&D.ended?0:D.objectMode?1:L!==L?D.flowing&&D.length?D.buffer.head.data.length:D.length:(L>D.highWaterMark&&(D.highWaterMark=ae(L)),L<=D.length?L:D.ended?D.length:(D.needReadable=!0,0))}F.prototype.read=function(L){c("read",L),L=parseInt(L,10);var D=this._readableState,ee=L;if(L!==0&&(D.emittedReadable=!1),L===0&&D.needReadable&&((D.highWaterMark!==0?D.length>=D.highWaterMark:D.length>0)||D.ended))return c("read: emitReadable",D.length,D.ended),D.length===0&&D.ended?re(this):le(this),null;if(L=ce(L,D),L===0&&D.ended)return D.length===0&&re(this),null;var oe=D.needReadable;c("need readable",oe),(D.length===0||D.length-L<D.highWaterMark)&&(oe=!0,c("length less than watermark",oe)),D.ended||D.reading?(oe=!1,c("reading or ended",oe)):oe&&(c("do read"),D.reading=!0,D.sync=!0,D.length===0&&(D.needReadable=!0),this._read(D.highWaterMark),D.sync=!1,D.reading||(L=ce(ee,D)));var De;return L>0?De=q(L,D):De=null,De===null?(D.needReadable=D.length<=D.highWaterMark,L=0):(D.length-=L,D.awaitDrain=0),D.length===0&&(D.ended||(D.needReadable=!0),ee!==L&&D.ended&&re(this)),De!==null&&this.emit("data",De),De};function fe(L,D){if(c("onEofChunk"),!D.ended){if(D.decoder){var ee=D.decoder.end();ee&&ee.length&&(D.buffer.push(ee),D.length+=D.objectMode?1:ee.length)}D.ended=!0,D.sync?le(L):(D.needReadable=!1,D.emittedReadable||(D.emittedReadable=!0,Ee(L)))}}function le(L){var D=L._readableState;c("emitReadable",D.needReadable,D.emittedReadable),D.needReadable=!1,D.emittedReadable||(c("emitReadable",D.flowing),D.emittedReadable=!0,process.nextTick(Ee,L))}function Ee(L){var D=L._readableState;c("emitReadable_",D.destroyed,D.length,D.ended),!D.destroyed&&(D.length||D.ended)&&(L.emit("readable"),D.emittedReadable=!1),D.needReadable=!D.flowing&&!D.ended&&D.length<=D.highWaterMark,j(L)}function pe(L,D){D.readingMore||(D.readingMore=!0,process.nextTick(Ce,L,D))}function Ce(L,D){for(;!D.reading&&!D.ended&&(D.length<D.highWaterMark||D.flowing&&D.length===0);){var ee=D.length;if(c("maybeReadMore read 0"),L.read(0),ee===D.length)break}D.readingMore=!1}F.prototype._read=function(L){I(this,new v("_read()"))},F.prototype.pipe=function(L,D){var ee=this,oe=this._readableState;switch(oe.pipesCount){case 0:oe.pipes=L;break;case 1:oe.pipes=[oe.pipes,L];break;default:oe.pipes.push(L);break}oe.pipesCount+=1,c("pipe count=%d opts=%j",oe.pipesCount,D);var De=(!D||D.end!==!1)&&L!==process.stdout&&L!==process.stderr,ye=De?ke:zt;oe.endEmitted?process.nextTick(ye):ee.once("end",ye),L.on("unpipe",xe);function xe(_,m){c("onunpipe"),_===ee&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,It())}function ke(){c("onend"),L.end()}var dt=Ie(ee);L.on("drain",dt);var Xt=!1;function It(){c("cleanup"),L.removeListener("close",Ot),L.removeListener("finish",et),L.removeListener("drain",dt),L.removeListener("error",kt),L.removeListener("unpipe",xe),ee.removeListener("end",ke),ee.removeListener("end",zt),ee.removeListener("data",$e),Xt=!0,oe.awaitDrain&&(!L._writableState||L._writableState.needDrain)&&dt()}ee.on("data",$e);function $e(_){c("ondata");var m=L.write(_);c("dest.write",m),m===!1&&((oe.pipesCount===1&&oe.pipes===L||oe.pipesCount>1&&ue(oe.pipes,L)!==-1)&&!Xt&&(c("false write response, pause",oe.awaitDrain),oe.awaitDrain++),ee.pause())}function kt(_){c("onerror",_),zt(),L.removeListener("error",kt),e(L,"error")===0&&I(L,_)}B(L,"error",kt);function Ot(){L.removeListener("finish",et),zt()}L.once("close",Ot);function et(){c("onfinish"),L.removeListener("close",Ot),zt()}L.once("finish",et);function zt(){c("unpipe"),ee.unpipe(L)}return L.emit("pipe",ee),oe.flowing||(c("pipe resume"),ee.resume()),L};function Ie(L){return function(){var ee=L._readableState;c("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&e(L,"data")&&(ee.flowing=!0,j(L))}}F.prototype.unpipe=function(L){var D=this._readableState,ee={hasUnpiped:!1};if(D.pipesCount===0)return this;if(D.pipesCount===1)return L&&L!==D.pipes?this:(L||(L=D.pipes),D.pipes=null,D.pipesCount=0,D.flowing=!1,L&&L.emit("unpipe",this,ee),this);if(!L){var oe=D.pipes,De=D.pipesCount;D.pipes=null,D.pipesCount=0,D.flowing=!1;for(var ye=0;ye<De;ye++)oe[ye].emit("unpipe",this,{hasUnpiped:!1});return this}var xe=ue(D.pipes,L);return xe===-1?this:(D.pipes.splice(xe,1),D.pipesCount-=1,D.pipesCount===1&&(D.pipes=D.pipes[0]),L.emit("unpipe",this,ee),this)},F.prototype.on=function(L,D){var ee=n.prototype.on.call(this,L,D),oe=this._readableState;return L==="data"?(oe.readableListening=this.listenerCount("readable")>0,oe.flowing!==!1&&this.resume()):L==="readable"&&!oe.endEmitted&&!oe.readableListening&&(oe.readableListening=oe.needReadable=!0,oe.flowing=!1,oe.emittedReadable=!1,c("on readable",oe.length,oe.reading),oe.length?le(this):oe.reading||process.nextTick(Te,this)),ee},F.prototype.addListener=F.prototype.on,F.prototype.removeListener=function(L,D){var ee=n.prototype.removeListener.call(this,L,D);return L==="readable"&&process.nextTick(we,this),ee},F.prototype.removeAllListeners=function(L){var D=n.prototype.removeAllListeners.apply(this,arguments);return(L==="readable"||L===void 0)&&process.nextTick(we,this),D};function we(L){var D=L._readableState;D.readableListening=L.listenerCount("readable")>0,D.resumeScheduled&&!D.paused?D.flowing=!0:L.listenerCount("data")>0&&L.resume()}function Te(L){c("readable nexttick read 0"),L.read(0)}F.prototype.resume=function(){var L=this._readableState;return L.flowing||(c("resume"),L.flowing=!L.readableListening,He(this,L)),L.paused=!1,this};function He(L,D){D.resumeScheduled||(D.resumeScheduled=!0,process.nextTick(Le,L,D))}function Le(L,D){c("resume",D.reading),D.reading||L.read(0),D.resumeScheduled=!1,L.emit("resume"),j(L),D.flowing&&!D.reading&&L.read(0)}F.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function j(L){var D=L._readableState;for(c("flow",D.flowing);D.flowing&&L.read()!==null;);}F.prototype.wrap=function(L){var D=this,ee=this._readableState,oe=!1;L.on("end",function(){if(c("wrapped end"),ee.decoder&&!ee.ended){var xe=ee.decoder.end();xe&&xe.length&&D.push(xe)}D.push(null)}),L.on("data",function(xe){if(c("wrapped data"),ee.decoder&&(xe=ee.decoder.write(xe)),!(ee.objectMode&&xe==null)&&!(!ee.objectMode&&(!xe||!xe.length))){var ke=D.push(xe);ke||(oe=!0,L.pause())}});for(var De in L)this[De]===void 0&&typeof L[De]=="function"&&(this[De]=function(ke){return function(){return L[ke].apply(L,arguments)}}(De));for(var ye=0;ye<R.length;ye++)L.on(R[ye],this.emit.bind(this,R[ye]));return this._read=function(xe){c("wrapped _read",xe),oe&&(oe=!1,L.resume())},this},typeof Symbol=="function"&&(F.prototype[Symbol.asyncIterator]=function(){return C===void 0&&(C=a9()),C(this)}),Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(F.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(F.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(D){this._readableState&&(this._readableState.flowing=D)}}),F._fromList=q,Object.defineProperty(F.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function q(L,D){if(D.length===0)return null;var ee;return D.objectMode?ee=D.buffer.shift():!L||L>=D.length?(D.decoder?ee=D.buffer.join(""):D.buffer.length===1?ee=D.buffer.first():ee=D.buffer.concat(D.length),D.buffer.clear()):ee=D.buffer.consume(L,D.decoder),ee}function re(L){var D=L._readableState;c("endReadable",D.endEmitted),D.endEmitted||(D.ended=!0,process.nextTick($,D,L))}function $(L,D){if(c("endReadableNT",L.endEmitted,L.length),!L.endEmitted&&L.length===0&&(L.endEmitted=!0,D.readable=!1,D.emit("end"),L.autoDestroy)){var ee=D._writableState;(!ee||ee.autoDestroy&&ee.finished)&&D.destroy()}}typeof Symbol=="function"&&(F.from=function(L,D){return E===void 0&&(E=c9()),E(F,L,D)});function ue(L,D){for(var ee=0,oe=L.length;ee<oe;ee++)if(L[ee]===D)return ee;return-1}return Hd}var Vd,mx;function bx(){if(mx)return Vd;mx=1,Vd=a;var t=So().codes,e=t.ERR_METHOD_NOT_IMPLEMENTED,n=t.ERR_MULTIPLE_CALLBACK,r=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=t.ERR_TRANSFORM_WITH_LENGTH_0,i=Co();Eo()(a,i);function s(u,f){var h=this._transformState;h.transforming=!1;var d=h.writecb;if(d===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),d(u);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function a(u){if(!(this instanceof a))return new a(u);i.call(this,u),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",c)}function c(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){l(u,f,h)}):l(this,null,null)}a.prototype.push=function(u,f){return this._transformState.needTransform=!1,i.prototype.push.call(this,u,f)},a.prototype._transform=function(u,f,h){h(new e("_transform()"))},a.prototype._write=function(u,f,h){var d=this._transformState;if(d.writecb=h,d.writechunk=u,d.writeencoding=f,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},a.prototype._read=function(u){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},a.prototype._destroy=function(u,f){i.prototype._destroy.call(this,u,function(h){f(h)})};function l(u,f,h){if(f)return u.emit("error",f);if(h!=null&&u.push(h),u._writableState.length)throw new o;if(u._transformState.transforming)throw new r;return u.push(null)}return Vd}var qd,yx;function l9(){if(yx)return qd;yx=1,qd=e;var t=bx();Eo()(e,t);function e(n){if(!(this instanceof e))return new e(n);t.call(this,n)}return e.prototype._transform=function(n,r,o){o(null,n)},qd}var jd,wx;function u9(){if(wx)return jd;wx=1;var t;function e(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=So().codes,r=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function i(h){if(h)throw h}function s(h){return h.setHeader&&typeof h.abort=="function"}function a(h,d,p,y){y=e(y);var v=!1;h.on("close",function(){v=!0}),t===void 0&&(t=zd()),t(h,{readable:d,writable:p},function(A){if(A)return y(A);v=!0,y()});var b=!1;return function(A){if(!v&&!b){if(b=!0,s(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();y(A||new o("pipe"))}}}function c(h){h()}function l(h,d){return h.pipe(d)}function u(h){return!h.length||typeof h[h.length-1]!="function"?i:h.pop()}function f(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var y=u(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var v,b=d.map(function(A,C){var E=C<d.length-1,I=C>0;return a(A,E,I,function(R){v||(v=R),R&&b.forEach(c),!E&&(b.forEach(c),y(v))})});return d.reduce(l)}return jd=f,jd}var Wd,xx;function f9(){if(xx)return Wd;xx=1,Wd=n;var t=Td().EventEmitter,e=Eo();e(n,t),n.Readable=gx(),n.Writable=ax(),n.Duplex=Co(),n.Transform=bx(),n.PassThrough=l9(),n.finished=zd(),n.pipeline=u9(),n.Stream=n;function n(){t.call(this)}return n.prototype.pipe=function(r,o){var i=this;function s(d){r.writable&&r.write(d)===!1&&i.pause&&i.pause()}i.on("data",s);function a(){i.readable&&i.resume&&i.resume()}r.on("drain",a),!r._isStdio&&(!o||o.end!==!1)&&(i.on("end",l),i.on("close",u));var c=!1;function l(){c||(c=!0,r.end())}function u(){c||(c=!0,typeof r.destroy=="function"&&r.destroy())}function f(d){if(h(),t.listenerCount(this,"error")===0)throw d}i.on("error",f),r.on("error",f);function h(){i.removeListener("data",s),r.removeListener("drain",a),i.removeListener("end",l),i.removeListener("close",u),i.removeListener("error",f),r.removeListener("error",f),i.removeListener("end",h),i.removeListener("close",h),r.removeListener("close",h)}return i.on("end",h),i.on("close",h),r.on("close",h),r.emit("pipe",i),r},Wd}var vx=f9(),h9=Nd();function wa(t){return t.replace(/%([0-9A-Fa-f]{2})/g,(e,n)=>String.fromCharCode(parseInt(n,16)))}function Ax(t,e){return String(e).replace(t,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function xa(t){return Ax(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,t)}function nr(t){return Ax(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,t)}function Ex(t){if(!(t&&t.length)||t===".")return{};const e={};return t.replace(/\r?\n$/,"").split(";").forEach(n=>{const r=n.split("=",2);if(!(r[1]&&r[1].length))return;r[0]=r[0].trim();let o=e[r[0].trim()];o||(o=[],e[r[0]]=o),o.push(...r[1].split(",").map(i=>i.trim()).map(wa))}),e}function Sx(t){const e=t.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:e[0]&&wa(e[0]),source:e[1]&&wa(e[1]),type:e[2]&&wa(e[2]),start:e[3]===null?null:parseInt(e[3],10),end:e[4]===null?null:parseInt(e[4],10),score:e[5]===null?null:parseFloat(e[5]),strand:e[6],phase:e[7],attributes:e[8]===null?null:Ex(e[8])}}function Cx(t){const e=/^\s*##\s*(\S+)\s*(.*)/.exec(t);if(!e)return null;const[,n]=e;let[,,r]=e;const o={directive:n};if(r.length&&(r=r.replace(/\r?\n$/,""),o.value=r),n==="sequence-region"){const i=r.split(/\s+/,3);return{...o,seq_id:i[0],start:i[1]&&i[1].replace(/\D/g,""),end:i[2]&&i[2].replace(/\D/g,"")}}else if(n==="genome-build"){const[i,s]=r.split(/\s+/,2);return{...o,source:i,buildName:s}}return o}function Ix(t){const e=[];return Object.entries(t).forEach(([n,r])=>{if(!r)return;let o;r.hasOwnProperty("toString")?o=xa(r.toString()):Array.isArray(r)?o=r.map(xa).join(","):o=xa(r),e.push(`${xa(n)}=${o}`)}),e.length?e.join(";"):"."}function d9(t,e){const n=t.attributes===null||t.attributes===void 0?".":Ix(t.attributes),o=`${[t.seq_id===null?".":nr(t.seq_id),t.source===null?".":nr(t.source),t.type===null?".":nr(t.type),t.start===null?".":nr(t.start),t.end===null?".":nr(t.end),t.score===null?".":nr(t.score),t.strand===null?".":nr(t.strand),t.phase===null?".":nr(t.phase),n].join(" ")}
|
|
792
|
+
`;return e[o]?"":(e[o]=!0,o)}function Wl(t,e){if(Array.isArray(t))return t.map(r=>Wl(r,e)).join("");const n=[d9(t,e)];return p9(t)&&n.push(...t.child_features.map(r=>Wl(r,e)),...t.derived_features.map(r=>Wl(r,e))),n.join("")}function Tx(t){return Wl(t,{})}function Dx(t){let e=`##${t.directive}`;return t.value&&(e+=` ${t.value}`),e+=`
|
|
793
|
+
`,e}function Bx(t){return`# ${t.comment}
|
|
794
|
+
`}function Qd(t){return`>${t.id}${t.description?` ${t.description}`:""}
|
|
795
|
+
${t.sequence}
|
|
796
|
+
`}function Ql(t){function e(n){return"attributes"in n?Tx(n):"directive"in n?Dx(n):"sequence"in n?Qd(n):"comment"in n?Bx(n):`# (invalid item found during format)
|
|
797
|
+
`}return Array.isArray(t)?t.map(e):e(t)}function p9(t){return t.child_features!==void 0&&t.derived_features!==void 0}const g9=Object.freeze(Object.defineProperty({__proto__:null,escape:xa,escapeColumn:nr,formatAttributes:Ix,formatComment:Bx,formatDirective:Dx,formatFeature:Tx,formatItem:Ql,formatSequence:Qd,parseAttributes:Ex,parseDirective:Cx,parseFeature:Sx,unescape:wa},Symbol.toStringTag,{value:"Module"})),_x={Parent:"child_features",Derives_from:"derived_features"};class kx{constructor(e){this.seqCallback=e,this.currentSequence=void 0}addLine(e){const n=/^>\s*(\S+)\s*(.*)/.exec(e);n?(this._flush(),this.currentSequence={id:n[1],sequence:""},n[2]&&(this.currentSequence.description=n[2].trim())):this.currentSequence&&/\S/.test(e)&&(this.currentSequence.sequence+=e.replace(/\s/g,""))}_flush(){this.currentSequence&&this.seqCallback(this.currentSequence)}finish(){this._flush()}}class Rx{constructor(e){this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};const n=()=>{};this.featureCallback=e.featureCallback||n,this.endCallback=e.endCallback||n,this.commentCallback=e.commentCallback||n,this.errorCallback=e.errorCallback||n,this.directiveCallback=e.directiveCallback||n,this.sequenceCallback=e.sequenceCallback||n,this.disableDerivesFromReferences=e.disableDerivesFromReferences||!1,this.bufferSize=e.bufferSize===void 0?1e3:e.bufferSize}addLine(e){if(this.fastaParser){this.fastaParser.addLine(e);return}if(this.eof)return;if(this.lineNumber+=1,/^\s*[^#\s>]/.test(e)){this._bufferLine(e);return}const n=/^\s*(#+)(.*)/.exec(e);if(n){const[,r]=n;let[,,o]=n;if(r.length===3)this._emitAllUnderConstructionFeatures();else if(r.length===2){const i=Cx(e);i&&(i.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new kx(this.sequenceCallback)):this._emitItem(i))}else o=o.replace(/\s*/,""),this._emitItem({comment:o})}else if(!/^\s*$/.test(e))if(/^\s*>/.test(e))this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new kx(this.sequenceCallback),this.fastaParser.addLine(e);else{const r=e.replace(/\r?\n?$/g,"");throw new Error(`GFF3 parse error. Cannot parse '${r}'.`)}}finish(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}_emitItem(e){Array.isArray(e)?this.featureCallback(e):"directive"in e?this.directiveCallback(e):"comment"in e&&this.commentCallback(e)}_enforceBufferSizeLimit(e=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(i=>{delete this._underConstructionById[i],delete this._completedReferences[i]}),r.forEach(i=>{i.child_features&&i.child_features.forEach(s=>n(s)),i.derived_features&&i.derived_features.forEach(s=>n(s))}))};for(;this._underConstructionTopLevel.length+e>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(e){var n,r,o;const s={...Sx(e),child_features:[],derived_features:[]},a=((n=s.attributes)===null||n===void 0?void 0:n.ID)||[],c=((r=s.attributes)===null||r===void 0?void 0:r.Parent)||[],l=this.disableDerivesFromReferences?[]:((o=s.attributes)===null||o===void 0?void 0:o.Derives_from)||[];if(!a.length&&!c.length&&!l.length){this._emitItem([s]);return}let u;a.forEach(f=>{const h=this._underConstructionById[f];h?(h[h.length-1].type!==s.type&&this._parseError(`multi-line feature "${f}" has inconsistent types: "${s.type}", "${h[h.length-1].type}"`),h.push(s),u=h):(u=[s],this._enforceBufferSizeLimit(1),!c.length&&!l.length&&this._underConstructionTopLevel.push(u),this._underConstructionById[f]=u,this._resolveReferencesTo(u,f))}),this._resolveReferencesFrom(u||[s],{Parent:c,Derives_from:l},a)}_resolveReferencesTo(e,n){const r=this._underConstructionOrphans[n];r&&(e.forEach(o=>{o.child_features.push(...r.Parent)}),e.forEach(o=>{o.derived_features.push(...r.Derives_from)}),delete this._underConstructionOrphans[n])}_parseError(e){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${e}`)}_resolveReferencesFrom(e,n,r){function o(i,s,a){let c=i[s];c||(c={},i[s]=c);const l=c[a]||!1;return c[a]=!0,l}n.Parent.forEach(i=>{const s=this._underConstructionById[i];if(s){const a=_x.Parent;r.filter(c=>o(this._completedReferences,c,`Parent,${i}`)).length||s.forEach(c=>{c[a].push(e)})}else{let a=this._underConstructionOrphans[i];a||(a={Parent:[],Derives_from:[]},this._underConstructionOrphans[i]=a),a.Parent.push(e)}}),n.Derives_from.forEach(i=>{const s=this._underConstructionById[i];if(s){const a=_x.Derives_from;r.filter(c=>o(this._completedReferences,c,`Derives_from,${i}`)).length||s.forEach(c=>{c[a].push(e)})}else{let a=this._underConstructionOrphans[i];a||(a={Parent:[],Derives_from:[]},this._underConstructionOrphans[i]=a),a.Derives_from.push(e)}})}}function Yd(t){process&&process.nextTick?process.nextTick(t):t()}function Fx(t){const e={encoding:"utf8",parseFeatures:!0,parseDirectives:!1,parseSequences:!0,parseComments:!1,bufferSize:1e3,disableDerivesFromReferences:!1,...t};return t.parseAll&&(e.parseFeatures=!0,e.parseDirectives=!0,e.parseComments=!0,e.parseSequences=!0),e}class m9 extends vx.Transform{constructor(e={}){super({objectMode:!0}),this.textBuffer="";const n=Fx(e);this.encoding=e.encoding||"utf8",this.decoder=new h9.StringDecoder;const r=this.push.bind(this);this.parser=new Rx({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:o=>this.emit("error",o),bufferSize:n.bufferSize,disableDerivesFromReferences:n.disableDerivesFromReferences})}_addLine(e){e&&this.parser.addLine(e)}_nextText(e){const n=(this.textBuffer+e).split(/\r?\n/);this.textBuffer=n.pop()||"",n.forEach(r=>this._addLine(r))}_transform(e,n,r){this._nextText(this.decoder.write(e)),Yd(r)}_flush(e){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),Yd(e)}}function b9(t={}){return new m9(t)}function y9(t,e={}){if(!t)return[];const n=Fx(e),r=[],o=r.push.bind(r),i=new Rx({featureCallback:n.parseFeatures?o:void 0,directiveCallback:n.parseDirectives?o:void 0,commentCallback:n.parseComments?o:void 0,sequenceCallback:n.parseSequences?o:void 0,disableDerivesFromReferences:n.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:s=>{throw s}});return t.split(/\r?\n/).forEach(i.addLine.bind(i)),i.finish(),r}function w9(t){const e=[],n=[];t.forEach(o=>{"sequence"in o?n.push(o):e.push(o)});let r=e.map(Ql).join("");return n.length&&(r+=`##FASTA
|
|
798
|
+
`,r+=n.map(Qd).join("")),r}class Mx extends vx.Transform{constructor(e={}){super(Object.assign(e,{objectMode:!0})),this.linesSinceLastSyncMark=0,this.haveWeEmittedData=!1,this.fastaMode=!1,this.minLinesBetweenSyncMarks=e.minSyncLines||100,this.insertVersionDirective=e.insertVersionDirective||!1}_transform(e,n,r){let o;if(!this.haveWeEmittedData&&this.insertVersionDirective){const i=Array.isArray(e)?e[0]:e;"directive"in i&&i.directive!=="gff-version"&&this.push(`##gff-version 3
|
|
799
|
+
`)}if("sequence"in e&&!this.fastaMode&&(this.push(`##FASTA
|
|
800
|
+
`),this.fastaMode=!0),Array.isArray(e)?o=e.map(Ql).join(""):o=Ql(e),this.push(o),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
|
|
801
|
+
`),this.linesSinceLastSyncMark=0;else{let i=0;for(let s=0;s<o.length;s+=1)o[s]===`
|
|
802
|
+
`&&(i+=1);this.linesSinceLastSyncMark+=i}this.haveWeEmittedData=!0,Yd(r)}}function x9(t={}){return new Mx(t)}function v9(t,e,n={}){const r={insertVersionDirective:!0,...n};return new Promise((o,i)=>{t.pipe(new Mx(r)).on("end",()=>o(null)).on("error",i).pipe(e)})}const A9=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:b9,parseStringSync:y9,formatSync:w9,formatStream:x9,formatFile:v9,util:g9}},Symbol.toStringTag,{value:"Module"})),Yl={InfoFields:{AA:{Number:1,Type:"String",Description:"Ancestral allele"},AC:{Number:"A",Type:"Integer",Description:"Allele count in genotypes, for each ALT allele, in the same order as listed"},AD:{Number:"R",Type:"Integer",Description:"Total read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},AF:{Number:"A",Type:"Float",Description:"Allele frequency for each ALT allele in the same order as listed (estimated from primary data, not called genotypes)"},AN:{Number:1,Type:"Integer",Description:"Total number of alleles in called genotypes"},BQ:{Number:1,Type:"Float",Description:"RMS base quality"},CIGAR:{Number:1,Type:"Float",Description:"Cigar string describing how to align an alternate allele to the reference allele"},DB:{Number:0,Type:"Flag",Description:"dbSNP membership"},DP:{Number:1,Type:"Integer",Description:"combined depth across samples"},END:{Number:1,Type:"Integer",Description:"End position (for use with symbolic alleles)"},H2:{Number:0,Type:"Flag",Description:"HapMap2 membership"},H3:{Number:0,Type:"Flag",Description:"HapMap3 membership"},MQ:{Number:1,Type:null,Description:"RMS mapping quality"},MQ0:{Number:1,Type:"Integer",Description:"Number of MAPQ == 0 reads"},NS:{Number:1,Type:"Integer",Description:"Number of samples with data"},SB:{Number:4,Type:"Integer",Description:"Strand bias"},SOMATIC:{Number:0,Type:"Flag",Description:"Somatic mutation (for cancer genomics)"},VALIDATED:{Number:0,Type:"Flag",Description:"Validated by follow-up experiment"},"1000G":{Number:0,Type:"Flag",Description:"1000 Genomes membership"},IMPRECISE:{Number:0,Type:"Flag",Description:"Imprecise structural variation"},NOVEL:{Number:0,Type:"Flag",Description:"Indicates a novel structural variation"},SVTYPE:{Number:1,Type:"String",Description:"Type of structural variant"},SVLEN:{Number:null,Type:"Integer",Description:"Difference in length between REF and ALT alleles"},CIPOS:{Number:2,Type:"Integer",Description:"Confidence interval around POS for imprecise variants"},CIEND:{Number:2,Type:"Integer",Description:"Confidence interval around END for imprecise variants"},HOMLEN:{Type:"Integer",Description:"Length of base pair identical micro-homology at event breakpoints"},HOMSEQ:{Type:"String",Description:"Sequence of base pair identical micro-homology at event breakpoints"},BKPTID:{Type:"String",Description:"ID of the assembled alternate allele in the assembly file"},MEINFO:{Number:4,Type:"String",Description:"Mobile element info of the form NAME,START,END,POLARITY"},METRANS:{Number:4,Type:"String",Description:"Mobile element transduction info of the form CHR,START,END,POLARITY"},DGVID:{Number:1,Type:"String",Description:"ID of this element in Database of Genomic Variation"},DBVARID:{Number:1,Type:"String",Description:"ID of this element in DBVAR"},DBRIPID:{Number:1,Type:"String",Description:"ID of this element in DBRIP"},MATEID:{Number:null,Type:"String",Description:"ID of mate breakends"},PARID:{Number:1,Type:"String",Description:"ID of partner breakend"},EVENT:{Number:1,Type:"String",Description:"ID of event associated to breakend"},CILEN:{Number:2,Type:"Integer",Description:"Confidence interval around the inserted material between breakend"},DPADJ:{Type:"Integer",Description:"Read Depth of adjacency"},CN:{Number:1,Type:"Integer",Description:"Copy number of segment containing breakend"},CNADJ:{Number:null,Type:"Integer",Description:"Copy number of adjacency"},CICN:{Number:2,Type:"Integer",Description:"Confidence interval around copy number for the segment"},CICNADJ:{Number:null,Type:"Integer",Description:"Confidence interval around copy number for the adjacency"}},GenotypeFields:{AD:{Number:"R",Type:"Integer",Description:"Read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},DP:{Number:1,Type:"Integer",Description:"Read depth"},EC:{Number:"A",Type:"Integer",Description:"Expected alternate allele counts"},FT:{Number:1,Type:"String",Description:'Filter indicating if this genotype was "called"'},GL:{Number:"G",Type:"Float",Description:"Genotype likelihoods"},GP:{Number:"G",Type:"Float",Description:"Genotype posterior probabilities"},GQ:{Number:1,Type:"Integer",Description:"Conditional genotype quality"},GT:{Number:1,Type:"String",Description:"Genotype"},HQ:{Number:2,Type:"Integer",Description:"Haplotype quality"},MQ:{Number:1,Type:"Integer",Description:"RMS mapping quality"},PL:{Number:"G",Type:"Integer",Description:"Phred-scaled genotype likelihoods rounded to the closest integer"},PQ:{Number:1,Type:"Integer",Description:"Phasing quality"},PS:{Number:1,Type:"Integer",Description:"Phase set"}},AltTypes:{DEL:{Description:"Deletion relative to the reference"},INS:{Description:"Insertion of novel sequence relative to the reference"},DUP:{Description:"Region of elevated copy number relative to the reference"},INV:{Description:"Inversion of reference sequence"},CNV:{Description:"Copy number variable region (may be both deletion and duplication)"},"DUP:TANDEM":{Description:"Tandem duplication"},"DEL:ME":{Description:"Deletion of mobile element relative to the reference"},"INS:ME":{Description:"Insertion of a mobile element relative to the reference"},NON_REF:{Description:"Represents any possible alternative allele at this location"},"*":{Description:"Represents any possible alternative allele at this location"}},FilterTypes:{PASS:{Description:"Passed all filters"}}};function E9(t){try{return decodeURIComponent(t)}catch{return t}}class S9{constructor({header:e="",strict:n=!0}){if(!e.length)throw new Error("empty header received");const r=e.split(/[\r\n]+/).filter(c=>c);if(!r.length)throw new Error("no non-empty header lines specified");this.strict=n,this.metadata=JSON.parse(JSON.stringify({INFO:Yl.InfoFields,FORMAT:Yl.GenotypeFields,ALT:Yl.AltTypes,FILTER:Yl.FilterTypes}));let o;if(r.forEach(c=>{if(c.startsWith("#"))c.startsWith("##")?this.parseMetadata(c):o=c;else throw new Error(`Bad line in header:
|
|
803
|
+
${c}`)}),!o)throw new Error("No format line found in header");const i=o.trim().split(" "),s=i.slice(0,8),a=["#CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO"];if(i.length<8)throw new Error(`VCF header missing columns:
|
|
804
|
+
${o}`);if(s.length!==a.length||!s.every((c,l)=>c===a[l]))throw new Error(`VCF column headers not correct:
|
|
805
|
+
${o}`);this.samples=i.slice(9)}parseSamples(e,n){const r={};if(e){const o=n.split(" "),i=e.split(":"),s=i.map(a=>{const c=this.getMetadata("FORMAT",a,"Type");return c==="Integer"||c==="Float"});for(let a=0;a<this.samples.length;a++){const c=this.samples[a];r[c]={};const l=o[a].split(":");for(let u=0;u<l.length;u++){const f=l[u];r[c][i[u]]=f===""||f==="."?void 0:f.split(",").map(h=>h==="."?void 0:s[u]?+h:h)}}}return r}parseGenotypesOnly(e,n){const r=n.split(" "),o={};let i=0;const s=e.split(":");if(s.length===1)for(const a of this.samples)o[a]=r[i++];else{const a=s.findIndex(c=>c==="GT");if(a===0)for(const c of this.samples){const l=r[i++],u=l.indexOf(":");u!==-1?o[c]=l.slice(0,u):console.warn("unknown")}else for(const c of this.samples){const l=r[i++].split(":");o[c]=l[a]}}return o}parseMetadata(e){const n=/^##(.+?)=(.*)/.exec(e.trim());if(!n)throw new Error(`Line is not a valid metadata line: ${e}`);const[r,o]=n.slice(1,3),i=r;if(o!=null&&o.startsWith("<")){i in this.metadata||(this.metadata[i]={});const[s,a]=this.parseStructuredMetaVal(o);this.metadata[i][s]=a}else this.metadata[i]=o}parseStructuredMetaVal(e){const n=this.parseKeyValue(e.replace(/^<|>$/g,""),","),r=n.ID;return delete n.ID,"Number"in n&&(Number.isNaN(Number(n.Number))||(n.Number=Number(n.Number))),[r,n]}getMetadata(...e){let n=this.metadata;for(const r of e)if(n=n[r],!n)return n;return n}parseKeyValue(e,n=";"){const r={};let o="",i="",s=1;for(const a of e)s===1?a==="="?s=2:a!==n?o+=a:i===""&&(r[o]=void 0,o=""):s===2?a===n?(r[o]=i,o="",i="",s=1):a==='"'?s=3:i+=a:s===3&&(a!=='"'?i+=a:s=2);return s===2||s===3?r[o]=i:s===1&&(r[o]=void 0),r}parseLine(e){var n,r;let o=0;for(let B=0;o<e.length&&(e[o]===" "&&(B+=1),B!==9);o+=1);const i=e.slice(0,o).split(" "),s=e.slice(o+1),[a,c,l,u,f,h,d]=i,p=a,y=+c,v=l==="."?void 0:l.split(";"),b=u,A=f==="."?void 0:f.split(","),C=h==="."?void 0:+h,E=d==="."?void 0:d.split(";");if(this.strict&&!i[7])throw new Error("no INFO field specified, must contain at least a '.' (turn off strict mode to allow)");const I=(n=i[7])===null||n===void 0?void 0:n.includes("%"),R=i[7]===void 0||i[7]==="."?{}:this.parseKeyValue(i[7]);for(const B of Object.keys(R)){const O=(r=R[B])===null||r===void 0?void 0:r.split(",").map(P=>P==="."?void 0:P).map(P=>P&&I?E9(P):P),F=this.getMetadata("INFO",B,"Type");F==="Integer"||F==="Float"?R[B]=O==null?void 0:O.map(P=>P===void 0?void 0:Number(P)):F==="Flag"?R[B]=!0:R[B]=O}return{CHROM:p,POS:y,ALT:A,INFO:R,REF:b,FILTER:E&&E.length===1&&E[0]==="PASS"?"PASS":E,ID:v,QUAL:C,SAMPLES:()=>{var B;return this.parseSamples((B=i[8])!==null&&B!==void 0?B:"",s)},GENOTYPES:()=>{var B;return this.parseGenotypesOnly((B=i[8])!==null&&B!==void 0?B:"",s)}}}}const C9=Object.freeze(Object.defineProperty({__proto__:null,default:S9},Symbol.toStringTag,{value:"Module"}));Ue.GenomeSpy=A2,Ue.embed=V_,Ue.favIcon=H_,Ue.html=ot,Ue.icon=G_,Ue.loadSpec=E2,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})});
|