@genome-spy/core 0.57.0 → 0.58.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-BftNdA0O.js +27 -0
- package/dist/bundle/index-C08YCM2T.js +539 -0
- package/dist/bundle/{index-C159nEYc.js → index-CCJIjehY.js} +89 -83
- package/dist/bundle/index-CalimFw3.js +2131 -0
- package/dist/bundle/index-DS2hvLgl.js +3425 -0
- package/dist/bundle/index-DTcHjAHp.js +505 -0
- package/dist/bundle/{index-CfEH2hsw.js → index-Dec7VcMU.js} +25 -25
- package/dist/bundle/index-DnIkxb0L.js +1025 -0
- package/dist/bundle/{index-Bg62fPK7.js → index-DwLfOHEk.js} +435 -465
- package/dist/bundle/{index-DhPRJZz0.js → index-Ww3TAo6_.js} +7 -7
- package/dist/bundle/{index-DutovjI-.js → index-vgGDWUPz.js} +2 -2
- package/dist/bundle/index.es.js +3634 -4808
- package/dist/bundle/index.js +136 -134
- package/dist/bundle/long-BviWyoZx.js +2387 -0
- package/dist/bundle/{remoteFile-DwSeXAZ0.js → remoteFile-BuaqFGWk.js} +1 -1
- package/dist/schema.json +66 -0
- package/dist/src/data/sources/dataSourceFactory.d.ts +2 -1
- package/dist/src/data/sources/dataSourceFactory.d.ts.map +1 -1
- package/dist/src/data/sources/dataSourceFactory.js +11 -0
- package/dist/src/data/sources/lazy/bamSource.js +7 -7
- package/dist/src/data/sources/lazy/gff3Source.d.ts +3 -5
- package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/gff3Source.js +7 -13
- package/dist/src/data/sources/lazy/tabixSource.d.ts +5 -0
- package/dist/src/data/sources/lazy/tabixSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/tabixSource.js +20 -7
- package/dist/src/data/sources/lazy/vcfSource.d.ts +9 -0
- package/dist/src/data/sources/lazy/vcfSource.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/vcfSource.js +38 -0
- package/dist/src/data/sources/lazy/vcfTypes.d.ts +7 -0
- package/dist/src/encoder/accessor.js +2 -2
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +20 -0
- package/dist/src/marks/rule.js +1 -1
- package/dist/src/spec/data.d.ts +14 -1
- package/dist/src/styles/genome-spy.css.d.ts +1 -1
- package/dist/src/styles/genome-spy.css.js +1 -1
- package/dist/src/styles/genome-spy.scss +1 -1
- package/dist/src/tooltip/dataTooltipHandler.js +32 -12
- package/dist/src/types/viewContext.d.ts +8 -0
- package/dist/src/utils/expression.d.ts.map +1 -1
- package/dist/src/utils/expression.js +7 -0
- package/dist/src/view/scaleResolution.d.ts.map +1 -1
- package/dist/src/view/scaleResolution.js +13 -0
- package/package.json +9 -8
- package/dist/bundle/index-CubKalvr.js +0 -500
- package/dist/bundle/index-DNzxWHJt.js +0 -2136
- package/dist/bundle/index-DluFz_0j.js +0 -1042
- package/dist/bundle/index-Dpv0n-cZ.js +0 -3998
- package/dist/bundle/long-DM5IWGqg.js +0 -2375
package/dist/bundle/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Ue,Ye){typeof exports=="object"&&typeof module<"u"?Ye(exports):typeof define=="function"&&define.amd?define(["exports"],Ye):(Ue=typeof globalThis<"u"?globalThis:Ue||self,Ye(Ue.genomeSpyEmbed={}))})(this,function(Ue){"use strict";var NP=Object.defineProperty;var MA=Ue=>{throw TypeError(Ue)};var OP=(Ue,Ye,et)=>Ye in Ue?NP(Ue,Ye,{enumerable:!0,configurable:!0,writable:!0,value:et}):Ue[Ye]=et;var qt=(Ue,Ye,et)=>OP(Ue,typeof Ye!="symbol"?Ye+"":Ye,et),bp=(Ue,Ye,et)=>Ye.has(Ue)||MA("Cannot "+et);var X=(Ue,Ye,et)=>(bp(Ue,Ye,"read from private field"),et?et.call(Ue):Ye.get(Ue)),ve=(Ue,Ye,et)=>Ye.has(Ue)?MA("Cannot add the same private member more than once"):Ye instanceof WeakSet?Ye.add(Ue):Ye.set(Ue,et),Pe=(Ue,Ye,et,io)=>(bp(Ue,Ye,"write to private field"),io?io.call(Ue,et):Ye.set(Ue,et),et),he=(Ue,Ye,et)=>(bp(Ue,Ye,"access private method"),et);var PA=(Ue,Ye,et,io)=>({set _(Qu){Pe(Ue,Ye,Qu,et)},get _(){return X(Ue,Ye,io)}});var TA,Yi,Rc,hc,ti,Qi,ra,ia,dc,pc,oa,LA,NA,$n,ni,yp,wp,aa,Vu,OA,mr,sa,ln,gc,Fe,xp,vp,Er,Ap,zA,UA,Ep,Sp,Wu,_p,no,Cp,GA,mc,Tp,ca,bc,yc,wc,xc,er,Fc,Ip,vc,qu,HA,br,Ac,Xi,Ki,un,Dp,kp,Bp,VA,la,ua,fa,Ec,ha,da,Sc,Rp,_c,Fp,Ji,pa,Cc,Tc,ga,Ic,Dc,yr,$i,ri,ii,ma,ba,fn,eo,ya,qe,ro,qA,Mc,Mp,Pp,Lp,jA,Zu,WA,wa,kc,oi,to,xa,Sn,Yu,ZA,YA,QA;function Ye(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function et(e,t,n){return e.fields=t||[],e.fname=n,e}function io(e){return e==null?null:e.fname}function Qu(e){return e==null?null:e.fields}function XA(e){return e.length===1?KA(e[0]):JA(e)}const KA=e=>function(t){return t[e]},JA=e=>{const t=e.length;return function(n){for(let r=0;r<t;++r)n=n[e[r]];return n}};function yt(e){throw Error(e)}function $A(e){const t=[],n=e.length;let r=null,i=0,o="",a,s,c;e=e+"";function l(){t.push(o+e.substring(a,s)),o="",a=s+1}for(a=s=0;s<n;++s)if(c=e[s],c==="\\")o+=e.substring(a,s++),a=s;else if(c===r)l(),r=null,i=-1;else{if(r)continue;a===i&&c==='"'||a===i&&c==="'"?(a=s+1,r=c):c==="."&&!i?s>a?l():a=s+1:c==="["?(s>a&&l(),i=a=s+1):c==="]"&&(i||yt("Access path missing open bracket: "+e),i>0&&l(),i=0,a=s+1)}return i&&yt("Access path missing closing bracket: "+e),r&&yt("Access path missing closing quote: "+e),s>a&&(s++,l()),t}function Pc(e,t,n){const r=$A(e);return e=r.length===1?r[0]:e,et((n&&n.get||XA)(r),[e],t||e)}Pc("id");const Lc=et(e=>e,[],"identity");et(()=>0,[],"zero"),et(()=>1,[],"one"),et(()=>!0,[],"true"),et(()=>!1,[],"false");var Bt=Array.isArray;function Lt(e){return e===Object(e)}function Tn(e){return e[e.length-1]}function va(e){return e==null||e===""?null:+e}const Np=e=>t=>e*Math.exp(t),Op=e=>t=>Math.log(e*t),e3=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),t3=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,Nc=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function Xu(e,t,n,r){const i=n(e[0]),o=n(Tn(e)),a=(o-i)*t;return[r(i-a),r(o-a)]}function n3(e,t){return Xu(e,t,va,Lc)}function r3(e,t){var n=Math.sign(e[0]);return Xu(e,t,Op(n),Np(n))}function i3(e,t,n){return Xu(e,t,Nc(n),Nc(1/n))}function Oc(e,t,n,r,i){const o=r(e[0]),a=r(Tn(e)),s=t!=null?r(t):(o+a)/2;return[i(s+(o-s)*n),i(s+(a-s)*n)]}function zp(e,t,n){return Oc(e,t,n,va,Lc)}function Up(e,t,n){const r=Math.sign(e[0]);return Oc(e,t,n,Op(r),Np(r))}function Ku(e,t,n,r){return Oc(e,t,n,Nc(r),Nc(1/r))}function o3(e,t,n,r){return Oc(e,t,n,e3(r),t3(r))}function Ju(e){return e!=null?Bt(e)?e:[e]:[]}function a3(e,t,n){let r=e[0],i=e[1],o;return i<r&&(o=i,i=r,r=o),o=i-r,o>=n-t?[t,n]:[r=Math.min(Math.max(r,t),n-o),r+o]}function dn(e){return typeof e=="function"}const s3="descending";function Gp(e,t,n){n=n||{},t=Ju(t)||[];const r=[],i=[],o={},a=n.comparator||c3;return Ju(e).forEach((s,c)=>{s!=null&&(r.push(t[c]===s3?-1:1),i.push(s=dn(s)?s:Pc(s,null,n)),(Qu(s)||[]).forEach(l=>o[l]=1))}),i.length===0?null:et(a(i,r),Object.keys(o))}const Hp=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),c3=(e,t)=>e.length===1?l3(e[0],t[0]):u3(e,t,e.length),l3=(e,t)=>function(n,r){return Hp(e(n),e(r))*t},u3=(e,t,n)=>(t.push(0),function(r,i){let o,a=0,s=-1;for(;a===0&&++s<n;)o=e[s],a=Hp(o(r),o(i));return a*t[s]});function f3(e){for(let t,n,r=1,i=arguments.length;r<i;++r){t=arguments[r];for(n in t)e[n]=t[n]}return e}const h3=Object.prototype.hasOwnProperty;function oo(e,t){return h3.call(e,t)}function Aa(e){return typeof e=="boolean"}function d3(e){return Object.prototype.toString.call(e)==="[object Date]"}function p3(e){return e&&dn(e[Symbol.iterator])}function jt(e){return typeof e=="number"}function g3(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function it(e){return typeof e=="string"}function Vp(e,t){const n=e[0],r=Tn(e),i=+t;return i?i===1?r:n+i*(r-n):n}function zc(e){return e&&Tn(e)-e[0]||0}function $u(e){return Bt(e)?"["+e.map($u)+"]":Lt(e)||it(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function m3(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const b3=e=>jt(e)||d3(e)?e:Date.parse(e);function y3(e,t){return t=t||b3,e==null||e===""?null:t(e)}function w3(e){return e==null||e===""?null:e+""}function Uc(e){const t={},n=e.length;for(let r=0;r<n;++r)t[e[r]]=!0;return t}/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const Gc=globalThis,ef=Gc.ShadowRoot&&(Gc.ShadyCSS===void 0||Gc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,qp=Symbol(),jp=new WeakMap;let x3=class{constructor(t,n,r){if(this._$cssResult$=!0,r!==qp)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(ef&&t===void 0){const r=n!==void 0&&n.length===1;r&&(t=jp.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&jp.set(n,t))}return t}toString(){return this.cssText}};const v3=e=>new x3(typeof e=="string"?e:e+"",void 0,qp),A3=(e,t)=>{if(ef)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of t){const r=document.createElement("style"),i=Gc.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,e.appendChild(r)}},Wp=ef?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const r of t.cssRules)n+=r.cssText;return v3(n)})(e):e;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:E3,defineProperty:S3,getOwnPropertyDescriptor:_3,getOwnPropertyNames:C3,getOwnPropertySymbols:T3,getPrototypeOf:I3}=Object,Sr=globalThis,Zp=Sr.trustedTypes,D3=Zp?Zp.emptyScript:"",tf=Sr.reactiveElementPolyfillSupport,Ea=(e,t)=>e,nf={toAttribute(e,t){switch(t){case Boolean:e=e?D3:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},Yp=(e,t)=>!E3(e,t),Qp={attribute:!0,type:String,converter:nf,reflect:!1,hasChanged:Yp};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Sr.litPropertyMetadata??(Sr.litPropertyMetadata=new WeakMap);class ao extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=Qp){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(t,n),!n.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,n);i!==void 0&&S3(this.prototype,t,i)}}static getPropertyDescriptor(t,n,r){const{get:i,set:o}=_3(this.prototype,t)??{get(){return this[n]},set(a){this[n]=a}};return{get(){return i==null?void 0:i.call(this)},set(a){const s=i==null?void 0:i.call(this);o.call(this,a),this.requestUpdate(t,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Qp}static _$Ei(){if(this.hasOwnProperty(Ea("elementProperties")))return;const t=I3(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ea("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ea("properties"))){const n=this.properties,r=[...C3(n),...T3(n)];for(const i of r)this.createProperty(i,n[i])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)n.unshift(Wp(i))}else t!==void 0&&n.push(Wp(t));return n}static _$Eu(t,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(n=>n(this))}addController(t){var n;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)==null||n.call(t))}removeController(t){var n;(n=this._$EO)==null||n.delete(t)}_$E_(){const t=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return A3(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(n=>{var r;return(r=n.hostConnected)==null?void 0:r.call(n)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(n=>{var r;return(r=n.hostDisconnected)==null?void 0:r.call(n)})}attributeChangedCallback(t,n,r){this._$AK(t,r)}_$EC(t,n){var o;const r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){const a=(((o=r.converter)==null?void 0:o.toAttribute)!==void 0?r.converter:nf).toAttribute(n,r.type);this._$Em=t,a==null?this.removeAttribute(i):this.setAttribute(i,a),this._$Em=null}}_$AK(t,n){var o;const r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const a=r.getPropertyOptions(i),s=typeof a.converter=="function"?{fromAttribute:a.converter}:((o=a.converter)==null?void 0:o.fromAttribute)!==void 0?a.converter:nf;this._$Em=i,this[i]=s.fromAttribute(n,a.type),this._$Em=null}}requestUpdate(t,n,r){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??Yp)(this[t],n))return;this.P(t,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,n,r){this._$AL.has(t)||this._$AL.set(t,n),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,a]of this._$Ep)this[o]=a;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,a]of i)a.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],a)}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(n)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(n)}willUpdate(t){}_$AE(t){var n;(n=this._$EO)==null||n.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(t){}firstUpdated(t){}}ao.elementStyles=[],ao.shadowRootOptions={mode:"open"},ao[Ea("elementProperties")]=new Map,ao[Ea("finalized")]=new Map,tf==null||tf({ReactiveElement:ao}),(Sr.reactiveElementVersions??(Sr.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 Sa=globalThis,Hc=Sa.trustedTypes,Xp=Hc?Hc.createPolicy("lit-html",{createHTML:e=>e}):void 0,Kp="$lit$",_r=`lit$${Math.random().toFixed(9).slice(2)}$`,Jp="?"+_r,k3=`<${Jp}>`,li=document,_a=()=>li.createComment(""),Ca=e=>e===null||typeof e!="object"&&typeof e!="function",rf=Array.isArray,B3=e=>rf(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",of=`[
|
|
14
|
+
\f\r]`,Ta=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$p=/-->/g,eg=/>/g,ui=RegExp(`>|${of}(?:([^\\s"'>=/]+)(${of}*=${of}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),tg=/'/g,ng=/"/g,rg=/^(?:script|style|textarea|title)$/i,R3=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),ct=R3(1),fi=Symbol.for("lit-noChange"),mt=Symbol.for("lit-nothing"),ig=new WeakMap,hi=li.createTreeWalker(li,129);function og(e,t){if(!rf(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xp!==void 0?Xp.createHTML(t):t}const F3=(e,t)=>{const n=e.length-1,r=[];let i,o=t===2?"<svg>":t===3?"<math>":"",a=Ta;for(let s=0;s<n;s++){const c=e[s];let l,u,f=-1,h=0;for(;h<c.length&&(a.lastIndex=h,u=a.exec(c),u!==null);)h=a.lastIndex,a===Ta?u[1]==="!--"?a=$p:u[1]!==void 0?a=eg:u[2]!==void 0?(rg.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=ui):u[3]!==void 0&&(a=ui):a===ui?u[0]===">"?(a=i??Ta,f=-1):u[1]===void 0?f=-2:(f=a.lastIndex-u[2].length,l=u[1],a=u[3]===void 0?ui:u[3]==='"'?ng:tg):a===ng||a===tg?a=ui:a===$p||a===eg?a=Ta:(a=ui,i=void 0);const d=a===ui&&e[s+1].startsWith("/>")?" ":"";o+=a===Ta?c+k3:f>=0?(r.push(l),c.slice(0,f)+Kp+c.slice(f)+_r+d):c+_r+(f===-2?s:d)}return[og(e,o+(e[n]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]};class Ia{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let o=0,a=0;const s=t.length-1,c=this.parts,[l,u]=F3(t,n);if(this.el=Ia.createElement(l,r),hi.currentNode=this.el.content,n===2||n===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=hi.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(const f of i.getAttributeNames())if(f.endsWith(Kp)){const h=u[a++],d=i.getAttribute(f).split(_r),p=/([.?@])?(.*)/.exec(h);c.push({type:1,index:o,name:p[2],strings:d,ctor:p[1]==="."?P3:p[1]==="?"?L3:p[1]==="@"?N3:Vc}),i.removeAttribute(f)}else f.startsWith(_r)&&(c.push({type:6,index:o}),i.removeAttribute(f));if(rg.test(i.tagName)){const f=i.textContent.split(_r),h=f.length-1;if(h>0){i.textContent=Hc?Hc.emptyScript:"";for(let d=0;d<h;d++)i.append(f[d],_a()),hi.nextNode(),c.push({type:2,index:++o});i.append(f[h],_a())}}}else if(i.nodeType===8)if(i.data===Jp)c.push({type:2,index:o});else{let f=-1;for(;(f=i.data.indexOf(_r,f+1))!==-1;)c.push({type:7,index:o}),f+=_r.length-1}o++}}static createElement(t,n){const r=li.createElement("template");return r.innerHTML=t,r}}function so(e,t,n=e,r){var a,s;if(t===fi)return t;let i=r!==void 0?(a=n._$Co)==null?void 0:a[r]:n._$Cl;const o=Ca(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((s=i==null?void 0:i._$AO)==null||s.call(i,!1),o===void 0?i=void 0:(i=new o(e),i._$AT(e,n,r)),r!==void 0?(n._$Co??(n._$Co=[]))[r]=i:n._$Cl=i),i!==void 0&&(t=so(e,i._$AS(e,t.values),i,r)),t}class M3{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:n},parts:r}=this._$AD,i=((t==null?void 0:t.creationScope)??li).importNode(n,!0);hi.currentNode=i;let o=hi.nextNode(),a=0,s=0,c=r[0];for(;c!==void 0;){if(a===c.index){let l;c.type===2?l=new Da(o,o.nextSibling,this,t):c.type===1?l=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(l=new O3(o,this,t)),this._$AV.push(l),c=r[++s]}a!==(c==null?void 0:c.index)&&(o=hi.nextNode(),a++)}return hi.currentNode=li,i}p(t){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,n),n+=r.strings.length-2):r._$AI(t[n])),n++}}class Da{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,n,r,i){this.type=2,this._$AH=mt,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=r,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=so(this,t,n),Ca(t)?t===mt||t==null||t===""?(this._$AH!==mt&&this._$AR(),this._$AH=mt):t!==this._$AH&&t!==fi&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):B3(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==mt&&Ca(this._$AH)?this._$AA.nextSibling.data=t:this.T(li.createTextNode(t)),this._$AH=t}$(t){var o;const{values:n,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Ia.createElement(og(r.h,r.h[0]),this.options)),r);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(n);else{const a=new M3(i,this),s=a.u(this.options);a.p(n),this.T(s),this._$AH=a}}_$AC(t){let n=ig.get(t.strings);return n===void 0&&ig.set(t.strings,n=new Ia(t)),n}k(t){rf(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,i=0;for(const o of t)i===n.length?n.push(r=new Da(this.O(_a()),this.O(_a()),this,this.options)):r=n[i],r._$AI(o),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(t=this._$AA.nextSibling,n){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,n);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var n;this._$AM===void 0&&(this._$Cv=t,(n=this._$AP)==null||n.call(this,t))}}class Vc{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,r,i,o){this.type=1,this._$AH=mt,this._$AN=void 0,this.element=t,this.name=n,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=mt}_$AI(t,n=this,r,i){const o=this.strings;let a=!1;if(o===void 0)t=so(this,t,n,0),a=!Ca(t)||t!==this._$AH&&t!==fi,a&&(this._$AH=t);else{const s=t;let c,l;for(t=o[0],c=0;c<o.length-1;c++)l=so(this,s[r+c],n,c),l===fi&&(l=this._$AH[c]),a||(a=!Ca(l)||l!==this._$AH[c]),l===mt?t=mt:t!==mt&&(t+=(l??"")+o[c+1]),this._$AH[c]=l}a&&!i&&this.j(t)}j(t){t===mt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class P3 extends Vc{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===mt?void 0:t}}class L3 extends Vc{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==mt)}}class N3 extends Vc{constructor(t,n,r,i,o){super(t,n,r,i,o),this.type=5}_$AI(t,n=this){if((t=so(this,t,n,0)??mt)===fi)return;const r=this._$AH,i=t===mt&&r!==mt||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==mt&&(r===mt||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var n;typeof this._$AH=="function"?this._$AH.call(((n=this.options)==null?void 0:n.host)??this.element,t):this._$AH.handleEvent(t)}}let O3=class{constructor(t,n,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){so(this,t)}};const af=Sa.litHtmlPolyfillSupport;af==null||af(Ia,Da),(Sa.litHtmlVersions??(Sa.litHtmlVersions=[])).push("3.2.1");const ka=(e,t,n)=>{const r=(n==null?void 0:n.renderBefore)??t;let i=r._$litPart$;if(i===void 0){const o=(n==null?void 0:n.renderBefore)??null;r._$litPart$=i=new Da(t.insertBefore(_a(),o),o,void 0,n??{})}return i._$AI(e),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/class
|
|
20
|
-
\r]`),n=e.charCodeAt(0);function r(f,h){var d,p,
|
|
21
|
-
`)}function
|
|
22
|
-
`)}function
|
|
23
|
-
`)}function l(f){return f.map(c).join(e)}function c(f){return f==null?"":f instanceof Date?oC(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:s,formatBody:a,formatRows:u,formatRow:l,formatValue:c}}var sC=Xm(" "),aC=sC.parseRows;function lC(e){return e}function uC(e){if(e==null)return lC;var t,n,r=e.scale[0],i=e.scale[1],o=e.translate[0],s=e.translate[1];return function(a,u){u||(t=n=0);var l=2,c=a.length,f=new Array(c);for(f[0]=(t+=a[0])*r+o,f[1]=(n+=a[1])*i+s;l<c;)f[l]=a[l],++l;return f}}function cC(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function fC(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return Km(e,n)})}:Km(e,t)}function Km(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,o=Jm(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 Jm(e,t){var n=uC(e.transform),r=e.arcs;function i(c,f){f.length&&f.pop();for(var h=r[c<0?~c:c],d=0,p=h.length;d<p;++d)f.push(n(h[d],d));c<0&&cC(f,p)}function o(c){return n(c)}function s(c){for(var f=[],h=0,d=c.length;h<d;++h)i(c[h],f);return f.length<2&&f.push(f[0]),f}function a(c){for(var f=s(c);f.length<4;)f.push(f[0]);return f}function u(c){return c.map(a)}function l(c){var f=c.type,h;switch(f){case"GeometryCollection":return{type:f,geometries:c.geometries.map(l)};case"Point":h=o(c.coordinates);break;case"MultiPoint":h=c.coordinates.map(o);break;case"LineString":h=s(c.arcs);break;case"MultiLineString":h=c.arcs.map(s);break;case"Polygon":h=u(c.arcs);break;case"MultiPolygon":h=c.arcs.map(u);break;default:return null}return{type:f,coordinates:h}}return l(t)}function hC(e,t){var n={},r={},i={},o=[],s=-1;t.forEach(function(l,c){var f=e.arcs[l<0?~l:l],h;f.length<3&&!f[1][0]&&!f[1][1]&&(h=t[++s],t[s]=l,t[c]=h)}),t.forEach(function(l){var c=a(l),f=c[0],h=c[1],d,p;if(d=i[f])if(delete i[d.end],d.push(l),d.end=h,p=r[h]){delete r[p.start];var m=p===d?d:d.concat(p);r[m.start=d.start]=i[m.end=p.end]=m}else r[d.start]=i[d.end]=d;else if(d=r[h])if(delete r[d.start],d.unshift(l),d.start=f,p=i[f]){delete i[p.end];var y=p===d?d:p.concat(d);r[y.start=p.start]=i[y.end=d.end]=y}else r[d.start]=i[d.end]=d;else d=[l],r[d.start=f]=i[d.end=h]=d});function a(l){var c=e.arcs[l<0?~l:l],f=c[0],h;return e.transform?(h=[0,0],c.forEach(function(d){h[0]+=d[0],h[1]+=d[1]})):h=c[c.length-1],l<0?[h,f]:[f,h]}function u(l,c){for(var f in l){var h=l[f];delete c[h.start],delete h.start,delete h.end,h.forEach(function(d){n[d<0?~d:d]=1}),o.push(h)}}return u(i,r),u(r,i),t.forEach(function(l){n[l<0?~l:l]||o.push([l])}),o}function dC(e){return Jm(e,pC.apply(this,arguments))}function pC(e,t,n){var r,i,o;if(arguments.length>1)r=gC(e,t,n);else for(i=0,r=new Array(o=e.arcs.length);i<o;++i)r[i]=i;return{type:"MultiLineString",arcs:hC(e,r)}}function gC(e,t,n){var r=[],i=[],o;function s(f){var h=f<0?~f:f;(i[h]||(i[h]=[])).push({i:f,g:o})}function a(f){f.forEach(s)}function u(f){f.forEach(a)}function l(f){f.forEach(u)}function c(f){switch(o=f,f.type){case"GeometryCollection":f.geometries.forEach(c);break;case"LineString":a(f.arcs);break;case"MultiLineString":case"Polygon":u(f.arcs);break;case"MultiPolygon":l(f.arcs);break}}return c(t),i.forEach(n==null?function(f){r.push(f[0].i)}:function(f){n(f[0].g,f[f.length-1].g)&&r.push(f[0].i)}),r}function Li(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function mC(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Vo(e){let t,n,r;e.length!==2?(t=Li,n=(a,u)=>Li(e(a),u),r=(a,u)=>e(a)-u):(t=e===Li||e===mC?e:bC,n=e,r=e);function i(a,u,l=0,c=a.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(a[f],u)<0?l=f+1:c=f}while(l<c)}return l}function o(a,u,l=0,c=a.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(a[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function s(a,u,l=0,c=a.length){const f=i(a,u,l,c-1);return f>l&&r(a[f-1],u)>-r(a[f],u)?f-1:f}return{left:i,center:s,right:o}}function bC(){return 0}function e1(e){return e===null?NaN:+e}function*yC(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 t1=Vo(Li),Ur=t1.right;t1.left,Vo(e1).center;function wC(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 vC(e,t){let n=0,r,i=0,o=0;if(t===void 0)for(let s of e)s!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i));else{let s=-1;for(let a of e)(a=t(a,++s,e))!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i))}if(n>1)return o/(n-1)}function xC(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 hr extends Map{constructor(t,n=SC){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(n1(this,t))}has(t){return super.has(n1(this,t))}set(t,n){return super.set(AC(this,t),n)}delete(t){return super.delete(EC(this,t))}}function n1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function AC({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function EC({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function SC(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Mh(e){return e}function Yu(e,...t){return r1(e,Mh,Mh,t)}function _C(e,...t){return r1(e,Array.from,Mh,t)}function r1(e,t,n,r){return function i(o,s){if(s>=r.length)return n(o);const a=new hr,u=r[s++];let l=-1;for(const c of o){const f=u(c,++l,o),h=a.get(f);h?h.push(c):a.set(f,[c])}for(const[c,f]of a)a.set(c,i(f,s));return t(a)}(e,0)}function CC(e=Li){if(e===Li)return i1;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 i1(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const TC=Math.sqrt(50),kC=Math.sqrt(10),IC=Math.sqrt(2);function Qu(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=TC?10:o>=kC?5:o>=IC?2:1;let a,u,l;return i<0?(l=Math.pow(10,-i)/s,a=Math.round(e*l),u=Math.round(t*l),a/l<e&&++a,u/l>t&&--u,l=-l):(l=Math.pow(10,i)*s,a=Math.round(e/l),u=Math.round(t/l),a*l<e&&++a,u*l>t&&--u),u<a&&.5<=n&&n<2?Qu(e,t,n*2):[a,u,l]}function Xu(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,s]=r?Qu(t,e,n):Qu(e,t,n);if(!(o>=i))return[];const a=o-i+1,u=new Array(a);if(r)if(s<0)for(let l=0;l<a;++l)u[l]=(o-l)/-s;else for(let l=0;l<a;++l)u[l]=(o-l)*s;else if(s<0)for(let l=0;l<a;++l)u[l]=(i+l)/-s;else for(let l=0;l<a;++l)u[l]=(i+l)*s;return u}function Ph(e,t,n){return t=+t,e=+e,n=+n,Qu(e,t,n)[2]}function Oi(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Ph(t,e,n):Ph(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Nh(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 Lh(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 o1(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?i1:CC(i);r>n;){if(r-n>600){const u=r-n+1,l=t-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),d=Math.max(n,Math.floor(t-l*f/u+h)),p=Math.min(r,Math.floor(t+(u-l)*f/u+h));o1(e,t,d,p,i)}const o=e[t];let s=n,a=r;for(xa(e,n,t),i(e[r],o)>0&&xa(e,n,r);s<a;){for(xa(e,s,a),++s,--a;i(e[s],o)<0;)++s;for(;i(e[a],o)>0;)--a}i(e[n],o)===0?xa(e,n,a):(++a,xa(e,a,r)),a<=t&&(n=a+1),t<=a&&(r=a-1)}return e}function xa(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function BC(e,t,n){if(e=Float64Array.from(yC(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Lh(e);if(t>=1)return Nh(e);var r,i=(r-1)*t,o=Math.floor(i),s=Nh(o1(e,o).subarray(0,o+1)),a=Lh(e.subarray(o+1));return s+(a-s)*(i-o)}}function s1(e,t,n=e1){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),s=+n(e[o],o,e),a=+n(e[o+1],o+1,e);return s+(a-s)*(i-o)}}function DC(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 FC(e,t){return BC(e,.5,t)}function Aa(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 Ea(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 RC(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ku(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 $o(e){return e=Ku(Math.abs(e)),e?e[1]:NaN}function MC(e,t){return function(n,r){for(var i=n.length,o=[],s=0,a=e[0],u=0;i>0&&a>0&&(u+a+1>r&&(a=Math.max(1,r-u)),o.push(n.substring(i-=a,i+a)),!((u+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(t)}}function PC(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var NC=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function jo(e){if(!(t=NC.exec(e)))throw new Error("invalid format: "+e);var t;return new Oh({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]})}jo.prototype=Oh.prototype;function Oh(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+""}Oh.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 LC(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 a1;function OC(e,t){var n=Ku(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(a1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ku(e,Math.max(0,t+o-1))[0]}function l1(e,t){var n=Ku(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 u1={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:RC,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)=>l1(e*100,t),r:l1,s:OC,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function c1(e){return e}var f1=Array.prototype.map,h1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zC(e){var t=e.grouping===void 0||e.thousands===void 0?c1:MC(f1.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?c1:PC(f1.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=jo(f);var h=f.fill,d=f.align,p=f.sign,m=f.symbol,y=f.zero,w=f.width,A=f.comma,_=f.precision,S=f.trim,T=f.type;T==="n"?(A=!0,T="g"):u1[T]||(_===void 0&&(_=12),S=!0,T="g"),(y||h==="0"&&d==="=")&&(y=!0,h="0",d="=");var B=m==="$"?n:m==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",I=m==="$"?r:/[%p]/.test(T)?s:"",D=u1[T],M=/[defgprs%]/.test(T);_=_===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function U(N){var te=B,re=I,ce,ge,Se;if(T==="c")re=D(N)+re,N="";else{N=+N;var _e=N<0||1/N<0;if(N=isNaN(N)?u:D(Math.abs(N),_),S&&(N=LC(N)),_e&&+N==0&&p!=="+"&&(_e=!1),te=(_e?p==="("?p:a:p==="-"||p==="("?"":p)+te,re=(T==="s"?h1[8+a1/3]:"")+re+(_e&&p==="("?")":""),M){for(ce=-1,ge=N.length;++ce<ge;)if(Se=N.charCodeAt(ce),48>Se||Se>57){re=(Se===46?i+N.slice(ce+1):N.slice(ce))+re,N=N.slice(0,ce);break}}}A&&!y&&(N=t(N,1/0));var Le=te.length+N.length+re.length,ze=Le<w?new Array(w-Le+1).join(h):"";switch(A&&y&&(N=t(ze+N,ze.length?w-re.length:1/0),ze=""),d){case"<":N=te+N+re+ze;break;case"=":N=te+ze+N+re;break;case"^":N=ze.slice(0,Le=ze.length>>1)+te+N+re+ze.slice(Le);break;default:N=ze+te+N+re;break}return o(N)}return U.toString=function(){return f+""},U}function c(f,h){var d=l((f=jo(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor($o(h)/3)))*3,m=Math.pow(10,-p),y=h1[8+p/3];return function(w){return d(m*w)+y}}return{format:l,formatPrefix:c}}var Ju,St,d1;UC({thousands:",",grouping:[3],currency:["$",""]});function UC(e){return Ju=zC(e),St=Ju.format,d1=Ju.formatPrefix,Ju}function GC(e){return Math.max(0,-$o(Math.abs(e)))}function HC(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($o(t)/3)))*3-$o(Math.abs(e)))}function VC(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$o(t)-$o(e))+1}const zh=new Date,Uh=new Date;function st(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 s=i(o),a=i.ceil(o);return o-s<a-o?s:a},i.offset=(o,s)=>(t(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{const u=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return u;let l;do u.push(l=new Date(+o)),t(o,a),e(o);while(l<o&&o<s);return u},i.filter=o=>st(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););}),n&&(i.count=(o,s)=>(zh.setTime(+o),Uh.setTime(+s),e(zh),e(Uh),Math.floor(n(zh,Uh))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const qo=st(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);qo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?st(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):qo),qo.range;const dr=1e3,an=dr*60,pr=an*60,gr=pr*24,Gh=gr*7,p1=gr*30,Hh=gr*365,mr=st(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*dr)},(e,t)=>(t-e)/dr,e=>e.getUTCSeconds());mr.range;const ec=st(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*dr)},(e,t)=>{e.setTime(+e+t*an)},(e,t)=>(t-e)/an,e=>e.getMinutes());ec.range;const tc=st(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*an)},(e,t)=>(t-e)/an,e=>e.getUTCMinutes());tc.range;const nc=st(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*dr-e.getMinutes()*an)},(e,t)=>{e.setTime(+e+t*pr)},(e,t)=>(t-e)/pr,e=>e.getHours());nc.range;const rc=st(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*pr)},(e,t)=>(t-e)/pr,e=>e.getUTCHours());rc.range;const Gr=st(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*an)/gr,e=>e.getDate()-1);Gr.range;const zi=st(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/gr,e=>e.getUTCDate()-1);zi.range;const g1=st(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/gr,e=>Math.floor(e/gr));g1.range;function Ui(e){return st(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())*an)/Gh)}const Sa=Ui(0),ic=Ui(1),$C=Ui(2),jC=Ui(3),Wo=Ui(4),qC=Ui(5),WC=Ui(6);Sa.range,ic.range,$C.range,jC.range,Wo.range,qC.range,WC.range;function Gi(e){return st(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)/Gh)}const _a=Gi(0),oc=Gi(1),ZC=Gi(2),YC=Gi(3),Zo=Gi(4),QC=Gi(5),XC=Gi(6);_a.range,oc.range,ZC.range,YC.range,Zo.range,QC.range,XC.range;const Ca=st(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());Ca.range;const Ta=st(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());Ta.range;const Gn=st(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());Gn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:st(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)}),Gn.range;const Hn=st(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());Hn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:st(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)}),Hn.range;function m1(e,t,n,r,i,o){const s=[[mr,1,dr],[mr,5,5*dr],[mr,15,15*dr],[mr,30,30*dr],[o,1,an],[o,5,5*an],[o,15,15*an],[o,30,30*an],[i,1,pr],[i,3,3*pr],[i,6,6*pr],[i,12,12*pr],[r,1,gr],[r,2,2*gr],[n,1,Gh],[t,1,p1],[t,3,3*p1],[e,1,Hh]];function a(l,c,f){const h=c<l;h&&([l,c]=[c,l]);const d=f&&typeof f.range=="function"?f:u(l,c,f),p=d?d.range(l,+c+1):[];return h?p.reverse():p}function u(l,c,f){const h=Math.abs(c-l)/f,d=Vo(([,,y])=>y).right(s,h);if(d===s.length)return e.every(Oi(l/Hh,c/Hh,f));if(d===0)return qo.every(Math.max(Oi(l,c,f),1));const[p,m]=s[h/s[d-1][2]<s[d][2]/h?d-1:d];return p.every(m)}return[a,u]}const[KC,JC]=m1(Hn,Ta,_a,g1,rc,tc),[e4,t4]=m1(Gn,Ca,Sa,Gr,nc,ec),ka="year",Ia="quarter",Ba="month",Da="week",Fa="date",sc="day",Vh="dayofyear",Ra="hours",Ma="minutes",Pa="seconds",ac="milliseconds";[ka,Ia,Ba,Da,Fa,sc,Vh,Ra,Ma,Pa,ac].reduce((e,t,n)=>(e[t]=1+n,e),{});const n4={[ka]:Gn,[Ia]:Ca.every(3),[Ba]:Ca,[Da]:Sa,[Fa]:Gr,[sc]:Gr,[Vh]:Gr,[Ra]:nc,[Ma]:ec,[Pa]:mr,[ac]:qo},r4={[ka]:Hn,[Ia]:Ta.every(3),[Ba]:Ta,[Da]:_a,[Fa]:zi,[sc]:zi,[Vh]:zi,[Ra]:rc,[Ma]:tc,[Pa]:mr,[ac]:qo};function i4(e){return n4[e]}function o4(e){return r4[e]}function $h(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 jh(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 Na(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function b1(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,s=e.shortDays,a=e.months,u=e.shortMonths,l=La(i),c=Oa(i),f=La(o),h=Oa(o),d=La(s),p=Oa(s),m=La(a),y=Oa(a),w=La(u),A=Oa(u),_={a:_e,A:Le,b:ze,B:tt,c:null,d:E1,e:E1,f:k4,g:O4,G:U4,H:_4,I:C4,j:T4,L:S1,m:I4,M:B4,p:Ie,q:Be,Q:B1,s:D1,S:D4,u:F4,U:R4,V:M4,w:P4,W:N4,x:null,X:null,y:L4,Y:z4,Z:G4,"%":I1},S={a:bt,A:Wt,b:je,B:L,c:null,d:C1,e:C1,f:j4,g:t6,G:r6,H:H4,I:V4,j:$4,L:T1,m:q4,M:W4,p:P,q,Q:B1,s:D1,S:Z4,u:Y4,U:Q4,V:X4,w:K4,W:J4,x:null,X:null,y:e6,Y:n6,Z:i6,"%":I1},T={a:U,A:N,b:te,B:re,c:ce,d:x1,e:x1,f:x4,g:v1,G:w1,H:A1,I:A1,j:b4,L:v4,m:m4,M:y4,p:M,q:g4,Q:E4,s:S4,S:w4,u:c4,U:f4,V:h4,w:u4,W:d4,x:ge,X:Se,y:v1,Y:w1,Z:p4,"%":A4};_.x=B(n,_),_.X=B(r,_),_.c=B(t,_),S.x=B(n,S),S.X=B(r,S),S.c=B(t,S);function B($,Z){return function(C){var x=[],V=-1,W=0,fe=$.length,ne,he,Zt;for(C instanceof Date||(C=new Date(+C));++V<fe;)$.charCodeAt(V)===37&&(x.push($.slice(W,V)),(he=y1[ne=$.charAt(++V)])!=null?ne=$.charAt(++V):he=ne==="e"?" ":"0",(Zt=Z[ne])&&(ne=Zt(C,he)),x.push(ne),W=V+1);return x.push($.slice(W,V)),x.join("")}}function I($,Z){return function(C){var x=Na(1900,void 0,1),V=D(x,$,C+="",0),W,fe;if(V!=C.length)return null;if("Q"in x)return new Date(x.Q);if("s"in x)return new Date(x.s*1e3+("L"in x?x.L:0));if(Z&&!("Z"in x)&&(x.Z=0),"p"in x&&(x.H=x.H%12+x.p*12),x.m===void 0&&(x.m="q"in x?x.q:0),"V"in x){if(x.V<1||x.V>53)return null;"w"in x||(x.w=1),"Z"in x?(W=jh(Na(x.y,0,1)),fe=W.getUTCDay(),W=fe>4||fe===0?oc.ceil(W):oc(W),W=zi.offset(W,(x.V-1)*7),x.y=W.getUTCFullYear(),x.m=W.getUTCMonth(),x.d=W.getUTCDate()+(x.w+6)%7):(W=$h(Na(x.y,0,1)),fe=W.getDay(),W=fe>4||fe===0?ic.ceil(W):ic(W),W=Gr.offset(W,(x.V-1)*7),x.y=W.getFullYear(),x.m=W.getMonth(),x.d=W.getDate()+(x.w+6)%7)}else("W"in x||"U"in x)&&("w"in x||(x.w="u"in x?x.u%7:"W"in x?1:0),fe="Z"in x?jh(Na(x.y,0,1)).getUTCDay():$h(Na(x.y,0,1)).getDay(),x.m=0,x.d="W"in x?(x.w+6)%7+x.W*7-(fe+5)%7:x.w+x.U*7-(fe+6)%7);return"Z"in x?(x.H+=x.Z/100|0,x.M+=x.Z%100,jh(x)):$h(x)}}function D($,Z,C,x){for(var V=0,W=Z.length,fe=C.length,ne,he;V<W;){if(x>=fe)return-1;if(ne=Z.charCodeAt(V++),ne===37){if(ne=Z.charAt(V++),he=T[ne in y1?Z.charAt(V++):ne],!he||(x=he($,C,x))<0)return-1}else if(ne!=C.charCodeAt(x++))return-1}return x}function M($,Z,C){var x=l.exec(Z.slice(C));return x?($.p=c.get(x[0].toLowerCase()),C+x[0].length):-1}function U($,Z,C){var x=d.exec(Z.slice(C));return x?($.w=p.get(x[0].toLowerCase()),C+x[0].length):-1}function N($,Z,C){var x=f.exec(Z.slice(C));return x?($.w=h.get(x[0].toLowerCase()),C+x[0].length):-1}function te($,Z,C){var x=w.exec(Z.slice(C));return x?($.m=A.get(x[0].toLowerCase()),C+x[0].length):-1}function re($,Z,C){var x=m.exec(Z.slice(C));return x?($.m=y.get(x[0].toLowerCase()),C+x[0].length):-1}function ce($,Z,C){return D($,t,Z,C)}function ge($,Z,C){return D($,n,Z,C)}function Se($,Z,C){return D($,r,Z,C)}function _e($){return s[$.getDay()]}function Le($){return o[$.getDay()]}function ze($){return u[$.getMonth()]}function tt($){return a[$.getMonth()]}function Ie($){return i[+($.getHours()>=12)]}function Be($){return 1+~~($.getMonth()/3)}function bt($){return s[$.getUTCDay()]}function Wt($){return o[$.getUTCDay()]}function je($){return u[$.getUTCMonth()]}function L($){return a[$.getUTCMonth()]}function P($){return i[+($.getUTCHours()>=12)]}function q($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var Z=B($+="",_);return Z.toString=function(){return $},Z},parse:function($){var Z=I($+="",!1);return Z.toString=function(){return $},Z},utcFormat:function($){var Z=B($+="",S);return Z.toString=function(){return $},Z},utcParse:function($){var Z=I($+="",!0);return Z.toString=function(){return $},Z}}}var y1={"-":"",_:" ",0:"0"},ft=/^\s*\d+/,s4=/^%/,a4=/[\\^$*+?|[\]().{}]/g;function xe(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 l4(e){return e.replace(a4,"\\$&")}function La(e){return new RegExp("^(?:"+e.map(l4).join("|")+")","i")}function Oa(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function u4(e,t,n){var r=ft.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function c4(e,t,n){var r=ft.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function f4(e,t,n){var r=ft.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function h4(e,t,n){var r=ft.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function d4(e,t,n){var r=ft.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function w1(e,t,n){var r=ft.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function v1(e,t,n){var r=ft.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function p4(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 g4(e,t,n){var r=ft.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function m4(e,t,n){var r=ft.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function x1(e,t,n){var r=ft.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function b4(e,t,n){var r=ft.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function A1(e,t,n){var r=ft.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function y4(e,t,n){var r=ft.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function w4(e,t,n){var r=ft.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function v4(e,t,n){var r=ft.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function x4(e,t,n){var r=ft.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function A4(e,t,n){var r=s4.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function E4(e,t,n){var r=ft.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function S4(e,t,n){var r=ft.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function E1(e,t){return xe(e.getDate(),t,2)}function _4(e,t){return xe(e.getHours(),t,2)}function C4(e,t){return xe(e.getHours()%12||12,t,2)}function T4(e,t){return xe(1+Gr.count(Gn(e),e),t,3)}function S1(e,t){return xe(e.getMilliseconds(),t,3)}function k4(e,t){return S1(e,t)+"000"}function I4(e,t){return xe(e.getMonth()+1,t,2)}function B4(e,t){return xe(e.getMinutes(),t,2)}function D4(e,t){return xe(e.getSeconds(),t,2)}function F4(e){var t=e.getDay();return t===0?7:t}function R4(e,t){return xe(Sa.count(Gn(e)-1,e),t,2)}function _1(e){var t=e.getDay();return t>=4||t===0?Wo(e):Wo.ceil(e)}function M4(e,t){return e=_1(e),xe(Wo.count(Gn(e),e)+(Gn(e).getDay()===4),t,2)}function P4(e){return e.getDay()}function N4(e,t){return xe(ic.count(Gn(e)-1,e),t,2)}function L4(e,t){return xe(e.getFullYear()%100,t,2)}function O4(e,t){return e=_1(e),xe(e.getFullYear()%100,t,2)}function z4(e,t){return xe(e.getFullYear()%1e4,t,4)}function U4(e,t){var n=e.getDay();return e=n>=4||n===0?Wo(e):Wo.ceil(e),xe(e.getFullYear()%1e4,t,4)}function G4(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+xe(t/60|0,"0",2)+xe(t%60,"0",2)}function C1(e,t){return xe(e.getUTCDate(),t,2)}function H4(e,t){return xe(e.getUTCHours(),t,2)}function V4(e,t){return xe(e.getUTCHours()%12||12,t,2)}function $4(e,t){return xe(1+zi.count(Hn(e),e),t,3)}function T1(e,t){return xe(e.getUTCMilliseconds(),t,3)}function j4(e,t){return T1(e,t)+"000"}function q4(e,t){return xe(e.getUTCMonth()+1,t,2)}function W4(e,t){return xe(e.getUTCMinutes(),t,2)}function Z4(e,t){return xe(e.getUTCSeconds(),t,2)}function Y4(e){var t=e.getUTCDay();return t===0?7:t}function Q4(e,t){return xe(_a.count(Hn(e)-1,e),t,2)}function k1(e){var t=e.getUTCDay();return t>=4||t===0?Zo(e):Zo.ceil(e)}function X4(e,t){return e=k1(e),xe(Zo.count(Hn(e),e)+(Hn(e).getUTCDay()===4),t,2)}function K4(e){return e.getUTCDay()}function J4(e,t){return xe(oc.count(Hn(e)-1,e),t,2)}function e6(e,t){return xe(e.getUTCFullYear()%100,t,2)}function t6(e,t){return e=k1(e),xe(e.getUTCFullYear()%100,t,2)}function n6(e,t){return xe(e.getUTCFullYear()%1e4,t,4)}function r6(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Zo(e):Zo.ceil(e),xe(e.getUTCFullYear()%1e4,t,4)}function i6(){return"+0000"}function I1(){return"%"}function B1(e){return+e}function D1(e){return Math.floor(+e/1e3)}var Yo,qh,F1,Wh,R1;o6({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 o6(e){return Yo=b1(e),qh=Yo.format,F1=Yo.parse,Wh=Yo.utcFormat,R1=Yo.utcParse,Yo}function lc(e){const t={};return n=>t[n]||(t[n]=e(n))}function M1(e,t,n){n=n||{},Et(n)||ot(`Invalid time multi-format specifier: ${n}`);const r=t(Pa),i=t(Ma),o=t(Ra),s=t(Fa),a=t(Da),u=t(Ba),l=t(Ia),c=t(ka),f=e(n[ac]||".%L"),h=e(n[Pa]||":%S"),d=e(n[Ma]||"%I:%M"),p=e(n[Ra]||"%I %p"),m=e(n[Fa]||n[sc]||"%a %d"),y=e(n[Da]||"%b %d"),w=e(n[Ba]||"%B"),A=e(n[Ia]||"%B"),_=e(n[ka]||"%Y");return S=>(r(S)<S?f:i(S)<S?h:o(S)<S?d:s(S)<S?p:u(S)<S?a(S)<S?m:y:c(S)<S?l(S)<S?w:A:_)(S)}function P1(e){const t=lc(e.format),n=lc(e.utcFormat);return{timeFormat:r=>Ge(r)?t(r):M1(t,i4,r),utcFormat:r=>Ge(r)?n(r):M1(n,o4,r),timeParse:lc(e.parse),utcParse:lc(e.utcParse)}}let Zh;s6();function s6(){return Zh=P1({format:qh,parse:F1,utcFormat:Wh,utcParse:R1})}function a6(e){return P1(b1(e))}function l6(e){return arguments.length?Zh=a6(e):Zh}const u6=e=>e!=null&&e===e,c6=e=>e==="true"||e==="false"||e===!0||e===!1,f6=e=>!Number.isNaN(Date.parse(e)),N1=e=>!Number.isNaN(+e)&&!(e instanceof Date),h6=e=>N1(e)&&Number.isInteger(+e),L1={boolean:M_,integer:fa,number:fa,date:N_,string:L_,unknown:Uu},uc=[c6,h6,N1,f6],d6=["boolean","integer","number","date"];function p6(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=uc.length,i=uc.map((o,s)=>s+1);for(let o=0,s=0,a,u;o<n;++o)for(u=t?e[o][t]:e[o],a=0;a<r;++a)if(i[a]&&u6(u)&&!uc[a](u)&&(i[a]=0,++s,s===uc.length))return"string";return d6[i.reduce((o,s)=>o===0?s:o,0)-1]}function g6(e,t){return t.reduce((n,r)=>(n[r]=p6(e,r),n),{})}function O1(e){const t=function(n,r){const i={delimiter:e};return Yh(n,r?I_(r,i):i)};return t.responseType="text",t}function Yh(e,t){return t.header&&(e=t.header.map(Ah).join(t.delimiter)+`
|
|
24
|
-
`+e),
|
|
19
|
+
*/class qc extends ao{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;const t=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=t.firstChild),t}update(t){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ka(n,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return fi}}qc._$litElement$=!0,qc.finalized=!0,(TA=globalThis.litElementHydrateSupport)==null||TA.call(globalThis,{LitElement:qc});const sf=globalThis.litElementPolyfillSupport;sf==null||sf({LitElement:qc}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");var ag={},cf={},lf=34,Ba=10,uf=13;function sg(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function z3(e,t){var n=sg(e);return function(r,i){return t(n(r),i,e)}}function cg(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function Xt(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function U3(e){return e<0?"-"+Xt(-e,6):e>9999?"+"+Xt(e,6):Xt(e,4)}function G3(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":U3(e.getUTCFullYear())+"-"+Xt(e.getUTCMonth()+1,2)+"-"+Xt(e.getUTCDate(),2)+(i?"T"+Xt(t,2)+":"+Xt(n,2)+":"+Xt(r,2)+"."+Xt(i,3)+"Z":r?"T"+Xt(t,2)+":"+Xt(n,2)+":"+Xt(r,2)+"Z":n||t?"T"+Xt(t,2)+":"+Xt(n,2)+"Z":"")}function lg(e){var t=new RegExp('["'+e+`
|
|
20
|
+
\r]`),n=e.charCodeAt(0);function r(f,h){var d,p,b=i(f,function(v,y){if(d)return d(v,y-1);p=v,d=h?z3(v,h):sg(v)});return b.columns=p||[],b}function i(f,h){var d=[],p=f.length,b=0,v=0,y,A=p<=0,_=!1;f.charCodeAt(p-1)===Ba&&--p,f.charCodeAt(p-1)===uf&&--p;function E(){if(A)return cf;if(_)return _=!1,ag;var R,D=b,O;if(f.charCodeAt(D)===lf){for(;b++<p&&f.charCodeAt(b)!==lf||f.charCodeAt(++b)===lf;);return(R=b)>=p?A=!0:(O=f.charCodeAt(b++))===Ba?_=!0:O===uf&&(_=!0,f.charCodeAt(b)===Ba&&++b),f.slice(D+1,R-1).replace(/""/g,'"')}for(;b<p;){if((O=f.charCodeAt(R=b++))===Ba)_=!0;else if(O===uf)_=!0,f.charCodeAt(b)===Ba&&++b;else if(O!==n)continue;return f.slice(D,R)}return A=!0,f.slice(D,p)}for(;(y=E())!==cf;){for(var C=[];y!==ag&&y!==cf;)C.push(y),y=E();h&&(C=h(C,v++))==null||d.push(C)}return d}function o(f,h){return f.map(function(d){return h.map(function(p){return u(d[p])}).join(e)})}function a(f,h){return h==null&&(h=cg(f)),[h.map(u).join(e)].concat(o(f,h)).join(`
|
|
21
|
+
`)}function s(f,h){return h==null&&(h=cg(f)),o(f,h).join(`
|
|
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
|
+
`+e),lg(t.delimiter).parse(e+"")}Cf.responseType="text";function JS(e){return typeof Buffer=="function"&&dn(Buffer.isBuffer)?Buffer.isBuffer(e):!1}function Tf(e,t){const n=t&&t.property?Pc(t.property):Lc;return Lt(e)&&!JS(e)?$S(n(e),t):n(JSON.parse(e))}Tf.responseType="json";function $S(e,t){return!Bt(e)&&p3(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}const e_={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function Kg(e,t){let n,r,i,o;return e=Tf(e,t),t&&t.feature?(n=Z3,i=t.feature):t&&t.mesh?(n=Q3,i=t.mesh,o=e_[t.filter]):yt("Missing TopoJSON feature or mesh parameter."),r=(r=e.objects[i])?n(e,r,o):yt("Invalid TopoJSON object: "+i),r&&r.features||[r]}Kg.responseType="json";const If={dsv:Cf,csv:Xg(","),tsv:Xg(" "),json:Tf,topojson:Kg};function Df(e,t){return arguments.length>1?(If[e]=t,this):oo(If,e)?If[e]:null}function Jg(e,t,n,r){t=t||{};const i=Df(t.type||"json");return i||yt("Unknown data format type: "+t.type),e=i(e,t),t.parse&&t_(e,t.parse,n,r),oo(e,"columns")&&delete e.columns,e}function t_(e,t,n,r){if(!e.length)return;const i=qS();n=n||i.timeParse,r=r||i.utcParse;let o=e.columns||Object.keys(e[0]),a,s,c,l,u,f;t==="auto"&&(t=KS(e,o)),o=Object.keys(t);const h=o.map(d=>{const p=t[d];let b,v;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return b=p.split(/:(.+)?/,2),v=b[1],(v[0]==="'"&&v[v.length-1]==="'"||v[0]==='"'&&v[v.length-1]==='"')&&(v=v.slice(1,-1)),(b[0]==="utc"?r:n)(v);if(!Qg[p])throw Error("Illegal format pattern: "+d+":"+p);return Qg[p]});for(c=0,u=e.length,f=o.length;c<u;++c)for(a=e[c],l=0;l<f;++l)s=o[l],a[s]=h[l](a[s])}/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/const
|
|
28
|
+
*/const n_={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},r_=e=>(...t)=>({_$litDirective$:e,values:t});let i_=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,n,r){this._$Ct=t,this._$AM=n,this._$Ci=r}_$AS(t,n){return this.update(t,n)}update(t,n){return this.render(...n)}};/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2018 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
-
*/const
|
|
32
|
+
*/const $g="important",o_=" !"+$g,a_=r_(class extends i_{constructor(e){var t;if(super(e),e.type!==n_.ATTRIBUTE||e.name!=="style"||((t=e.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return r==null?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(e,[t]){const{style:n}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?n.removeProperty(r):n[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const o=typeof i=="string"&&i.endsWith(o_);r.includes("-")||o?n.setProperty(r,o?i.slice(0,-11):i,o?$g:""):n[r]=i}}return fi}}),s_="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",c_=`
|
|
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;
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
overflow: hidden;
|
|
117
117
|
background: #f6f6f6;
|
|
118
118
|
padding: 10px;
|
|
119
|
-
font-size:
|
|
119
|
+
font-size: 12px;
|
|
120
120
|
box-shadow: 0px 3px 15px 0px rgba(0, 0, 0, 0.21);
|
|
121
121
|
pointer-events: none;
|
|
122
122
|
z-index: 100;
|
|
@@ -222,9 +222,9 @@
|
|
|
222
222
|
font-size: 14px;
|
|
223
223
|
padding: 10px;
|
|
224
224
|
}
|
|
225
|
-
`;function
|
|
225
|
+
`;function l_(e,t){var n=e.getBoundingClientRect();return[t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop]}function al(e,t){return e.length==t.length&&e.every((n,r)=>e[r]===t[r])}function Kt(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function Xa(e){return e[e.length-1]}class u_{constructor(t){this.container=t,this.element=document.createElement("div"),this.element.className="tooltip",this._visible=!0,this.container.appendChild(this.element),this._previousTooltipDatum=void 0,this.enabledStack=[!0],this._penaltyUntil=0,this._lastCoords=void 0,this._previousMove=0,this.clear()}set visible(t){t!=this._visible&&(this.element.style.display=t?null:"none",this._visible=t)}get visible(){return this._visible}get enabled(){return Xa(this.enabledStack)??!0}pushEnabledState(t){this.enabledStack.push(t),t||(this.visible=!1)}popEnabledState(){this.enabledStack.pop()}handleMouseMove(t){this.mouseCoords=l_(this.container,t);const n=performance.now();!this.visible&&!this._isPenalty()&&n-this._previousMove>500&&(this._penaltyUntil=n+70),this._lastCoords&&f_(this.mouseCoords,this._lastCoords)>20&&(this._penaltyUntil=n+400),this._lastCoords=this.mouseCoords,this.visible&&this.updatePlacement(),this._previousMove=n}updatePlacement(){const[n,r]=this.mouseCoords;let i=n+20;i>this.container.clientWidth-this.element.offsetWidth&&(i=n-20-this.element.offsetWidth),this.element.style.left=i+"px",this.element.style.top=Math.min(r+20,this.container.clientHeight-this.element.offsetHeight)+"px"}setContent(t){if(!t||!this.enabled||this._isPenalty()){this.visible&&(ka("",this.element),this.visible=!1),this._previousTooltipDatum=void 0;return}ka(t,this.element),this.visible=!0,this.updatePlacement()}clear(){this._previousTooltipDatum=void 0,this.setContent(void 0)}updateWithDatum(t,n){t!==this._previousTooltipDatum&&(this._previousTooltipDatum=t,n||(n=r=>Promise.resolve(ct` ${JSON.stringify(r)} `)),n(t).then(r=>this.setContent(r)).catch(r=>{if(r!=="debounced")throw r}))}_isPenalty(){return this._penaltyUntil&&this._penaltyUntil>performance.now()}}function f_(e,t){let n=0;for(let r=0;r<e.length;r++)n+=(e[r]-t[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 Jh=5120,Ua=5121,ed=5122,td=5123,nd=5124,rd=5125,id=5126,B6=32819,D6=32820,F6=33635,R6=5131,M6=33640,P6=35899,N6=35902,L6=36269,O6=34042,H1={};{const e=H1;e[Jh]=Int8Array,e[Ua]=Uint8Array,e[ed]=Int16Array,e[td]=Uint16Array,e[nd]=Int32Array,e[rd]=Uint32Array,e[id]=Float32Array,e[B6]=Uint16Array,e[D6]=Uint16Array,e[F6]=Uint16Array,e[R6]=Uint16Array,e[M6]=Uint32Array,e[P6]=Uint32Array,e[N6]=Uint32Array,e[L6]=Uint32Array,e[O6]=Uint32Array}function od(e){if(e instanceof Int8Array)return Jh;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)return Ua;if(e instanceof Int16Array)return ed;if(e instanceof Uint16Array)return td;if(e instanceof Int32Array)return nd;if(e instanceof Uint32Array)return rd;if(e instanceof Float32Array)return id;throw new Error("unsupported typed array type")}function z6(e){if(e===Int8Array)return Jh;if(e===Uint8Array||e===Uint8ClampedArray)return Ua;if(e===Int16Array)return ed;if(e===Uint16Array)return td;if(e===Int32Array)return nd;if(e===Uint32Array)return rd;if(e===Float32Array)return id;throw new Error("unsupported typed array type")}function U6(e){const t=H1[e];if(!t)throw new Error("unknown gl type");return t}const fc=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 G6(...e){console.error(...e)}function V1(...e){console.warn(...e)}function H6(e,t){return typeof WebGLBuffer<"u"&&t instanceof WebGLBuffer}function $1(e,t){return typeof WebGLRenderbuffer<"u"&&t instanceof WebGLRenderbuffer}function hc(e,t){return typeof WebGLTexture<"u"&&t instanceof WebGLTexture}function V6(e,t){return typeof WebGLSampler<"u"&&t instanceof WebGLSampler}const j1=35044,Vn=34962,$6=34963,j6=34660,q6=5120,W6=5121,Z6=5122,Y6=5123,Q6=5124,X6=5125,K6=5126,q1={attribPrefix:""};function W1(e,t,n,r,i){e.bindBuffer(t,n),e.bufferData(t,r,i||j1)}function Z1(e,t,n,r){if(H6(e,t))return t;n=n||Vn;const i=e.createBuffer();return W1(e,n,i,t,r),i}function Y1(e){return e==="indices"}function J6(e){return e instanceof Int8Array||e instanceof Uint8Array}function e8(e){return e===Int8Array||e===Uint8Array}function t8(e){return e.length?e:e.data}const n8=/coord|texture/i,r8=/color|colour/i;function Q1(e,t){let n;if(n8.test(e)?n=2:r8.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 i8(e,t){return e.numComponents||e.size||Q1(t,t8(e).length)}function sd(e,t){if(fc(e))return e;if(fc(e.data))return e.data;Array.isArray(e)&&(e={data:e});let n=e.type;return n||(Y1(t)?n=Uint16Array:n=Float32Array),new n(e.data)}function o8(e,t){const n={};return Object.keys(t).forEach(function(r){if(!Y1(r)){const i=t[r],o=i.attrib||i.name||i.attribName||q1.attribPrefix+r;if(i.value){if(!Array.isArray(i.value)&&!fc(i.value))throw new Error("array.value is not array or typedarray");n[o]={value:i.value}}else{let s,a,u,l;if(i.buffer&&i.buffer instanceof WebGLBuffer)s=i.buffer,l=i.numComponents||i.size,a=i.type,u=i.normalize;else if(typeof i=="number"||typeof i.data=="number"){const c=i.data||i,f=i.type||Float32Array,h=c*f.BYTES_PER_ELEMENT;a=z6(f),u=i.normalize!==void 0?i.normalize:e8(f),l=i.numComponents||i.size||Q1(r,c),s=e.createBuffer(),e.bindBuffer(Vn,s),e.bufferData(Vn,h,i.drawType||j1)}else{const c=sd(i,r);s=Z1(e,c,void 0,i.drawType),a=od(c),u=i.normalize!==void 0?i.normalize:J6(c),l=i8(i,r)}n[o]={buffer:s,numComponents:l,type:a,normalize:u,stride:i.stride||0,offset:i.offset||0,divisor:i.divisor===void 0?void 0:i.divisor,drawType:i.drawType}}}}),e.bindBuffer(Vn,null),n}function s8(e,t,n,r){n=sd(n),r!==void 0?(e.bindBuffer(Vn,t.buffer),e.bufferSubData(Vn,r,n)):W1(e,Vn,t.buffer,n,t.drawType)}function a8(e,t){return t===q6||t===W6?1:t===Z6||t===Y6?2:t===Q6||t===X6||t===K6?4:0}const ad=["position","positions","a_position"];function l8(e,t){let n,r;for(r=0;r<ad.length&&(n=ad[r],!(n in t||(n=q1.attribPrefix+n,n in t)));++r);r===ad.length&&(n=Object.keys(t)[0]);const i=t[n];if(!i.buffer)return 1;e.bindBuffer(Vn,i.buffer);const o=e.getBufferParameter(Vn,j6);e.bindBuffer(Vn,null);const s=a8(e,i.type),a=o/s,u=i.numComponents||i.size,l=a/u;if(l%1!==0)throw new Error(`numComponents ${u} not correct for length ${length}`);return l}function u8(e,t,n){const r=o8(e,t),i=Object.assign({},n||{});i.attribs=Object.assign({},n?n.attribs:{},r);const o=t.indices;if(o){const s=sd(o,"indices");i.indices=Z1(e,s,$6),i.numElements=s.length,i.elementType=od(s)}else i.numElements||(i.numElements=l8(e,i.attribs));return i}function Qo(e){return!!e.texStorage2D}const ld=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 s=t[r[o]];t[r[o]]=s?`${s} | ${o}`:o}e[i]=!0}}return function(i,o){return n(i),t[o]||(typeof o=="number"?`0x${o.toString(16)}`:o)}}(),Hr={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},Xo=fc,X1=function(){let e;return function(){return e=e||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),e}}(),ud=6406,ln=6407,He=6408,cd=6409,fd=6410,Ko=6402,hd=34041,dc=33071,c8=9728,f8=9729,br=3553,yr=34067,Vr=32879,$r=35866,pc=34069,h8=34070,d8=34071,p8=34072,g8=34073,m8=34074,dd=10241,pd=10240,gc=10242,mc=10243,K1=32882,b8=33082,y8=33083,w8=33084,v8=33085,gd=3317,J1=3314,eb=32878,tb=3316,nb=3315,rb=32877,x8=37443,A8=37441,E8=37440,S8=33321,_8=36756,C8=33325,T8=33326,k8=33330,I8=33329,B8=33338,D8=33337,F8=33340,R8=33339,M8=33323,P8=36757,N8=33327,L8=33328,O8=33336,z8=33335,U8=33332,G8=33331,H8=33334,V8=33333,$8=32849,j8=35905,q8=36194,W8=36758,Z8=35898,Y8=35901,Q8=34843,X8=34837,K8=36221,J8=36239,e5=36215,t5=36233,n5=36209,r5=36227,i5=32856,o5=35907,s5=36759,a5=32855,l5=32854,u5=32857,c5=34842,f5=34836,h5=36220,d5=36238,p5=36975,g5=36214,m5=36232,b5=36226,y5=36208,w5=33189,v5=33190,x5=36012,A5=36013,E5=35056,jr=5120,Ye=5121,bc=5122,Jo=5123,yc=5124,Hi=5125,_t=5126,ib=32819,ob=32820,sb=33635,Tn=5131,Ga=36193,md=33640,S5=35899,_5=35902,C5=36269,T5=34042,Ha=33319,Vi=33320,Va=6403,$i=36244,ji=36248,qr=36249,k5={};{const e=k5;e[ud]={numColorComponents:1},e[cd]={numColorComponents:1},e[fd]={numColorComponents:2},e[ln]={numColorComponents:3},e[He]={numColorComponents:4},e[Va]={numColorComponents:1},e[$i]={numColorComponents:1},e[Ha]={numColorComponents:2},e[Vi]={numColorComponents:2},e[ln]={numColorComponents:3},e[ji]={numColorComponents:3},e[He]={numColorComponents:4},e[qr]={numColorComponents:4},e[Ko]={numColorComponents:1},e[hd]={numColorComponents:2}}let bd;function wc(e){if(!bd){const t={};t[ud]={textureFormat:ud,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[Ye,Tn,Ga,_t]},t[cd]={textureFormat:cd,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[Ye,Tn,Ga,_t]},t[fd]={textureFormat:fd,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[Ye,Tn,Ga,_t]},t[ln]={textureFormat:ln,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[Ye,Tn,Ga,_t,sb]},t[He]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[Ye,Tn,Ga,_t,ib,ob]},t[Ko]={textureFormat:Ko,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Hi,Jo]},t[S8]={textureFormat:Va,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[Ye]},t[_8]={textureFormat:Va,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[jr]},t[C8]={textureFormat:Va,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[_t,Tn]},t[T8]={textureFormat:Va,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[_t]},t[k8]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[Ye]},t[I8]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[jr]},t[U8]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Jo]},t[G8]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[bc]},t[H8]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Hi]},t[V8]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[yc]},t[M8]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[Ye]},t[P8]={textureFormat:Ha,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[jr]},t[N8]={textureFormat:Ha,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[_t,Tn]},t[L8]={textureFormat:Ha,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[_t]},t[O8]={textureFormat:Vi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Ye]},t[z8]={textureFormat:Vi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[jr]},t[B8]={textureFormat:Vi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Jo]},t[D8]={textureFormat:Vi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[bc]},t[F8]={textureFormat:Vi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Hi]},t[R8]={textureFormat:Vi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[yc]},t[$8]={textureFormat:ln,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[Ye]},t[j8]={textureFormat:ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[Ye]},t[q8]={textureFormat:ln,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[Ye,sb]},t[W8]={textureFormat:ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[jr]},t[Z8]={textureFormat:ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[_t,Tn,S5]},t[Y8]={textureFormat:ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[_t,Tn,_5]},t[Q8]={textureFormat:ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[_t,Tn]},t[X8]={textureFormat:ln,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[_t]},t[K8]={textureFormat:ji,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[Ye]},t[J8]={textureFormat:ji,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[jr]},t[e5]={textureFormat:ji,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Jo]},t[t5]={textureFormat:ji,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[bc]},t[n5]={textureFormat:ji,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Hi]},t[r5]={textureFormat:ji,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[yc]},t[i5]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Ye]},t[o5]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Ye]},t[s5]={textureFormat:He,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[jr]},t[a5]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[Ye,ob,md]},t[l5]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[Ye,ib]},t[u5]={textureFormat:He,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[md]},t[c5]={textureFormat:He,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[_t,Tn]},t[f5]={textureFormat:He,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[_t]},t[h5]={textureFormat:qr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ye]},t[d5]={textureFormat:qr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[jr]},t[p5]={textureFormat:qr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[md]},t[g5]={textureFormat:qr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Jo]},t[m5]={textureFormat:qr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[bc]},t[b5]={textureFormat:qr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[yc]},t[y5]={textureFormat:qr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Hi]},t[w5]={textureFormat:Ko,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Jo,Hi]},t[v5]={textureFormat:Ko,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Hi]},t[x5]={textureFormat:Ko,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[_t]},t[E5]={textureFormat:hd,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[T5]},t[A5]={textureFormat:hd,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[C5]},Object.keys(t).forEach(function(n){const r=t[n];r.bytesPerElementMap={},r.bytesPerElement.forEach(function(i,o){const s=r.type[o];r.bytesPerElementMap[s]=i})}),bd=t}return bd[e]}function I5(e,t){const n=wc(e);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[t];if(r===void 0)throw"unknown internal format";return r}function es(e){const t=wc(e);if(!t)throw"unknown internal format";return{format:t.textureFormat,type:t.type[0]}}function ab(e){return(e&e-1)===0}function B5(e,t,n,r){if(!Qo(e))return ab(t)&&ab(n);const i=wc(r);if(!i)throw"unknown internal format";return i.colorRenderable&&i.textureFilterable}function D5(e){const t=wc(e);if(!t)throw"unknown internal format";return t.textureFilterable}function lb(e,t,n){return Xo(t)?od(t):n||Ye}function vc(e,t,n,r,i){if(i%1!==0)throw"can't guess dimensions";if(!n&&!r){const o=Math.sqrt(i/(t===yr?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 ts(e,t){t.colorspaceConversion!==void 0&&e.pixelStorei(x8,t.colorspaceConversion),t.premultiplyAlpha!==void 0&&e.pixelStorei(A8,t.premultiplyAlpha),t.flipY!==void 0&&e.pixelStorei(E8,t.flipY)}function ub(e){e.pixelStorei(gd,4),Qo(e)&&(e.pixelStorei(J1,0),e.pixelStorei(eb,0),e.pixelStorei(tb,0),e.pixelStorei(nb,0),e.pixelStorei(rb,0))}function F5(e,t,n,r){r.minMag&&(n.call(e,t,dd,r.minMag),n.call(e,t,pd,r.minMag)),r.min&&n.call(e,t,dd,r.min),r.mag&&n.call(e,t,pd,r.mag),r.wrap&&(n.call(e,t,gc,r.wrap),n.call(e,t,mc,r.wrap),(t===Vr||V6(e,t))&&n.call(e,t,K1,r.wrap)),r.wrapR&&n.call(e,t,K1,r.wrapR),r.wrapS&&n.call(e,t,gc,r.wrapS),r.wrapT&&n.call(e,t,mc,r.wrapT),r.minLod&&n.call(e,t,b8,r.minLod),r.maxLod&&n.call(e,t,y8,r.maxLod),r.baseLevel&&n.call(e,t,w8,r.baseLevel),r.maxLevel&&n.call(e,t,v8,r.maxLevel)}function cb(e,t,n){const r=n.target||br;e.bindTexture(r,t),F5(e,r,e.texParameteri,n)}function R5(e){return e=e||Hr.textureColor,Xo(e)?e:new Uint8Array([e[0]*255,e[1]*255,e[2]*255,e[3]*255])}function yd(e,t,n,r,i,o){n=n||Hr.textureOptions,o=o||He;const s=n.target||br;if(r=r||n.width,i=i||n.height,e.bindTexture(s,t),B5(e,r,i,o))e.generateMipmap(s);else{const a=D5(o)?f8:c8;e.texParameteri(s,dd,a),e.texParameteri(s,pd,a),e.texParameteri(s,gc,dc),e.texParameteri(s,mc,dc)}}function $a(e){return e.auto===!0||e.auto===void 0&&e.level===void 0}function wd(e,t){return t=t||{},t.cubeFaceOrder||[pc,h8,d8,p8,g8,m8]}function vd(e,t){const r=wd(e,t).map(function(i,o){return{face:i,ndx:o}});return r.sort(function(i,o){return i.face-o.face}),r}function fb(e,t,n,r){r=r||Hr.textureOptions;const i=r.target||br,o=r.level||0;let s=n.width,a=n.height;const u=r.internalFormat||r.format||He,l=es(u),c=r.format||l.format,f=r.type||l.type;if(ts(e,r),e.bindTexture(i,t),i===yr){const h=n.width,d=n.height;let p,m;if(h/6===d)p=d,m=[0,0,1,0,2,0,3,0,4,0,5,0];else if(d/6===h)p=h,m=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===d/2)p=h/3,m=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===d/3)p=h/2,m=[0,0,1,0,0,1,1,1,0,2,1,2];else throw"can't figure out cube map from element: "+(n.src?n.src:n.nodeName);const y=X1();y?(y.canvas.width=p,y.canvas.height=p,s=p,a=p,vd(e,r).forEach(function(w){const A=m[w.ndx*2+0]*p,_=m[w.ndx*2+1]*p;y.drawImage(n,A,_,p,p,0,0,p,p),e.texImage2D(w.face,o,u,c,f,y.canvas)}),y.canvas.width=1,y.canvas.height=1):typeof createImageBitmap<"u"&&(s=p,a=p,vd(e,r).forEach(function(w){const A=m[w.ndx*2+0]*p,_=m[w.ndx*2+1]*p;e.texImage2D(w.face,o,u,p,p,0,c,f,null),createImageBitmap(n,A,_,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(S){ts(e,r),e.bindTexture(i,t),e.texImage2D(w.face,o,u,c,f,S),$a(r)&&yd(e,t,r,s,a,u)})}))}else if(i===Vr||i===$r){const h=Math.min(n.width,n.height),d=Math.max(n.width,n.height),p=d/h;if(p%1!==0)throw"can not compute 3D dimensions of element";const m=n.width===d?1:0,y=n.height===d?1:0;e.pixelStorei(gd,1),e.pixelStorei(J1,n.width),e.pixelStorei(eb,0),e.pixelStorei(rb,0),e.texImage3D(i,o,u,h,h,h,0,c,f,null);for(let w=0;w<p;++w){const A=w*h*m,_=w*h*y;e.pixelStorei(tb,A),e.pixelStorei(nb,_),e.texSubImage3D(i,o,0,0,w,h,h,1,c,f,n)}ub(e)}else e.texImage2D(i,o,u,c,f,n);$a(r)&&yd(e,t,r,s,a,u),cb(e,t,r)}function ja(){}function M5(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 P5(e,t){return t===void 0&&!M5(e)?"anonymous":t}function N5(e,t,n){n=n||ja;let r;if(t=t!==void 0?t:Hr.crossOrigin,t=P5(e,t),typeof Image<"u"){r=new Image,t!==void 0&&(r.crossOrigin=t);const i=function(){r.removeEventListener("error",o),r.removeEventListener("load",s),r=null},o=function(){const u="couldn't load image: "+e;G6(u),n(u,r),i()},s=function(){n(null,r),i()};return r.addEventListener("error",o),r.addEventListener("load",s),r.src=e,r}else if(typeof ImageBitmap<"u"){let i,o;const s=function(){n(i,o)},a={};t&&(a.mode="cors"),fetch(e,a).then(function(u){if(!u.ok)throw u;return u.blob()}).then(function(u){return createImageBitmap(u,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(u){o=u,setTimeout(s)}).catch(function(u){i=u,setTimeout(s)}),r=null}return r}function hb(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof ImageData<"u"&&e instanceof ImageData||typeof HTMLElement<"u"&&e instanceof HTMLElement}function xd(e,t,n){return hb(e)?(setTimeout(function(){n(null,e)}),e):N5(e,t,n)}function Ad(e,t,n){n=n||Hr.textureOptions;const r=n.target||br;if(e.bindTexture(r,t),n.color===!1)return;const i=R5(n.color);if(r===yr)for(let o=0;o<6;++o)e.texImage2D(pc+o,0,He,1,1,0,He,Ye,i);else r===Vr||r===$r?e.texImage3D(r,0,He,1,1,1,0,He,Ye,i):e.texImage2D(r,0,He,1,1,0,He,Ye,i)}function L5(e,t,n,r){return r=r||ja,n=n||Hr.textureOptions,Ad(e,t,n),n=Object.assign({},n),xd(n.src,n.crossOrigin,function(o,s){o?r(o,t,s):(fb(e,t,s,n),r(null,t,s))})}function O5(e,t,n,r){r=r||ja;const i=n.src;if(i.length!==6)throw"there must be 6 urls for a cubemap";const o=n.level||0,s=n.internalFormat||n.format||He,a=es(s),u=n.format||a.format,l=n.type||Ye,c=n.target||br;if(c!==yr)throw"target must be TEXTURE_CUBE_MAP";Ad(e,t,n),n=Object.assign({},n);let f=6;const h=[],d=wd(e,n);let p;function m(y){return function(w,A){--f,w?h.push(w):A.width!==A.height?h.push("cubemap face img is not a square: "+A.src):(ts(e,n),e.bindTexture(c,t),f===5?wd().forEach(function(_){e.texImage2D(_,o,s,u,l,A)}):e.texImage2D(y,o,s,u,l,A),$a(n)&&e.generateMipmap(c)),f===0&&r(h.length?h:void 0,t,p)}}p=i.map(function(y,w){return xd(y,n.crossOrigin,m(d[w]))})}function z5(e,t,n,r){r=r||ja;const i=n.src,o=n.internalFormat||n.format||He,s=es(o),a=n.format||s.format,u=n.type||Ye,l=n.target||$r;if(l!==Vr&&l!==$r)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";Ad(e,t,n),n=Object.assign({},n);let c=i.length;const f=[];let h;const d=n.level||0;let p=n.width,m=n.height;const y=i.length;let w=!0;function A(_){return function(S,T){if(--c,S)f.push(S);else{if(ts(e,n),e.bindTexture(l,t),w){w=!1,p=n.width||T.width,m=n.height||T.height,e.texImage3D(l,d,o,p,m,y,0,a,u,null);for(let B=0;B<y;++B)e.texSubImage3D(l,d,0,0,B,p,m,1,a,u,T)}else{let B=T,I;(T.width!==p||T.height!==m)&&(I=X1(),B=I.canvas,I.canvas.width=p,I.canvas.height=m,I.drawImage(T,0,0,p,m)),e.texSubImage3D(l,d,0,0,_,p,m,1,a,u,B),I&&B===I.canvas&&(I.canvas.width=0,I.canvas.height=0)}$a(n)&&e.generateMipmap(l)}c===0&&r(f.length?f:void 0,t,h)}}h=i.map(function(_,S){return xd(_,n.crossOrigin,A(S))})}function db(e,t,n,r){r=r||Hr.textureOptions;const i=r.target||br;e.bindTexture(i,t);let o=r.width,s=r.height,a=r.depth;const u=r.level||0,l=r.internalFormat||r.format||He,c=es(l),f=r.format||c.format,h=r.type||lb(e,n,c.type);if(Xo(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const y=U6(h);n=new y(n)}const d=I5(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+ld(e,f);let m;if(i===Vr||i===$r)if(!o&&!s&&!a){const y=Math.cbrt(p);if(y%1!==0)throw"can't guess cube size of array of numElements: "+p;o=y,s=y,a=y}else o&&(!s||!a)?(m=vc(e,i,s,a,p/o),s=m.width,a=m.height):s&&(!o||!a)?(m=vc(e,i,o,a,p/s),o=m.width,a=m.height):(m=vc(e,i,o,s,p/a),o=m.width,s=m.height);else m=vc(e,i,o,s,p),o=m.width,s=m.height;if(ub(e),e.pixelStorei(gd,r.unpackAlignment||1),ts(e,r),i===yr){const y=d/n.BYTES_PER_ELEMENT,w=p/6*y;vd(e,r).forEach(A=>{const _=w*A.ndx,S=n.subarray(_,_+w);e.texImage2D(A.face,u,l,o,s,0,f,h,S)})}else i===Vr||i===$r?e.texImage3D(i,u,l,o,s,a,0,f,h,n):e.texImage2D(i,u,l,o,s,0,f,h,n);return{width:o,height:s,depth:a,type:h}}function U5(e,t,n){const r=n.target||br;e.bindTexture(r,t);const i=n.level||0,o=n.internalFormat||n.format||He,s=es(o),a=n.format||s.format,u=n.type||s.type;if(ts(e,n),r===yr)for(let l=0;l<6;++l)e.texImage2D(pc+l,i,o,n.width,n.height,0,a,u,null);else r===Vr||r===$r?e.texImage3D(r,i,o,n.width,n.height,n.depth,0,a,u,null):e.texImage2D(r,i,o,n.width,n.height,0,a,u,null)}function qa(e,t,n){n=n||ja,t=t||Hr.textureOptions;const r=e.createTexture(),i=t.target||br;let o=t.width||1,s=t.height||1;const a=t.internalFormat||He;e.bindTexture(i,r),i===yr&&(e.texParameteri(i,gc,dc),e.texParameteri(i,mc,dc));let u=t.src;if(u)if(typeof u=="function"&&(u=u(e,t)),typeof u=="string")L5(e,r,t,n);else if(Xo(u)||Array.isArray(u)&&(typeof u[0]=="number"||Array.isArray(u[0])||Xo(u[0]))){const l=db(e,r,u,t);o=l.width,s=l.height}else Array.isArray(u)&&(typeof u[0]=="string"||hb(u[0]))?i===yr?O5(e,r,t,n):z5(e,r,t,n):(fb(e,r,u,t),o=u.width,s=u.height);else U5(e,r,t);return $a(t)&&yd(e,r,t,o,s,a),cb(e,r,t),r}function G5(e,t,n,r,i,o){r=r||n.width,i=i||n.height,o=o||n.depth;const s=n.target||br;e.bindTexture(s,t);const a=n.level||0,u=n.internalFormat||n.format||He,l=es(u),c=n.format||l.format;let f;const h=n.src;if(h&&(Xo(h)||Array.isArray(h)&&typeof h[0]=="number")?f=n.type||lb(e,h,l.type):f=n.type||l.type,s===yr)for(let d=0;d<6;++d)e.texImage2D(pc+d,a,u,r,i,0,c,f,null);else s===Vr||s===$r?e.texImage3D(s,a,u,r,i,o,0,c,f,null):e.texImage2D(s,a,u,r,i,0,c,f,null)}const H5=V1,xc=33984,V5=35048,Ac=34962,$5=34963,Ed=35345,pb=35718,j5=35721,q5=35971,W5=35382,Z5=35396,Y5=35398,Q5=35392,X5=35395,Ec=5126,gb=35664,mb=35665,bb=35666,Sd=5124,yb=35667,wb=35668,vb=35669,xb=35670,Ab=35671,Eb=35672,Sb=35673,_b=35674,Cb=35675,Tb=35676,K5=35678,J5=35680,eT=35679,tT=35682,nT=35685,rT=35686,iT=35687,oT=35688,sT=35689,aT=35690,lT=36289,uT=36292,cT=36293,_d=5125,kb=36294,Ib=36295,Bb=36296,fT=36298,hT=36299,dT=36300,pT=36303,gT=36306,mT=36307,bT=36308,yT=36311,Sc=3553,_c=34067,Cd=32879,Cc=35866,ue={};function Db(e,t){return ue[t].bindPoint}function wT(e,t){return function(n){e.uniform1f(t,n)}}function vT(e,t){return function(n){e.uniform1fv(t,n)}}function xT(e,t){return function(n){e.uniform2fv(t,n)}}function AT(e,t){return function(n){e.uniform3fv(t,n)}}function ET(e,t){return function(n){e.uniform4fv(t,n)}}function Fb(e,t){return function(n){e.uniform1i(t,n)}}function Rb(e,t){return function(n){e.uniform1iv(t,n)}}function Mb(e,t){return function(n){e.uniform2iv(t,n)}}function Pb(e,t){return function(n){e.uniform3iv(t,n)}}function Nb(e,t){return function(n){e.uniform4iv(t,n)}}function ST(e,t){return function(n){e.uniform1ui(t,n)}}function _T(e,t){return function(n){e.uniform1uiv(t,n)}}function CT(e,t){return function(n){e.uniform2uiv(t,n)}}function TT(e,t){return function(n){e.uniform3uiv(t,n)}}function kT(e,t){return function(n){e.uniform4uiv(t,n)}}function IT(e,t){return function(n){e.uniformMatrix2fv(t,!1,n)}}function BT(e,t){return function(n){e.uniformMatrix3fv(t,!1,n)}}function DT(e,t){return function(n){e.uniformMatrix4fv(t,!1,n)}}function FT(e,t){return function(n){e.uniformMatrix2x3fv(t,!1,n)}}function RT(e,t){return function(n){e.uniformMatrix3x2fv(t,!1,n)}}function MT(e,t){return function(n){e.uniformMatrix2x4fv(t,!1,n)}}function PT(e,t){return function(n){e.uniformMatrix4x2fv(t,!1,n)}}function NT(e,t){return function(n){e.uniformMatrix3x4fv(t,!1,n)}}function LT(e,t){return function(n){e.uniformMatrix4x3fv(t,!1,n)}}function Ft(e,t,n,r){const i=Db(e,t);return Qo(e)?function(o){let s,a;hc(e,o)?(s=o,a=null):(s=o.texture,a=o.sampler),e.uniform1i(r,n),e.activeTexture(xc+n),e.bindTexture(i,s),e.bindSampler(n,a)}:function(o){e.uniform1i(r,n),e.activeTexture(xc+n),e.bindTexture(i,o)}}function Rt(e,t,n,r,i){const o=Db(e,t),s=new Int32Array(i);for(let a=0;a<i;++a)s[a]=n+a;return Qo(e)?function(a){e.uniform1iv(r,s),a.forEach(function(u,l){e.activeTexture(xc+s[l]);let c,f;hc(e,u)?(c=u,f=null):(c=u.texture,f=u.sampler),e.bindSampler(n,f),e.bindTexture(o,c)})}:function(a){e.uniform1iv(r,s),a.forEach(function(u,l){e.activeTexture(xc+s[l]),e.bindTexture(o,u)})}}ue[Ec]={Type:Float32Array,size:4,setter:wT,arraySetter:vT},ue[gb]={Type:Float32Array,size:8,setter:xT,cols:2},ue[mb]={Type:Float32Array,size:12,setter:AT,cols:3},ue[bb]={Type:Float32Array,size:16,setter:ET,cols:4},ue[Sd]={Type:Int32Array,size:4,setter:Fb,arraySetter:Rb},ue[yb]={Type:Int32Array,size:8,setter:Mb,cols:2},ue[wb]={Type:Int32Array,size:12,setter:Pb,cols:3},ue[vb]={Type:Int32Array,size:16,setter:Nb,cols:4},ue[_d]={Type:Uint32Array,size:4,setter:ST,arraySetter:_T},ue[kb]={Type:Uint32Array,size:8,setter:CT,cols:2},ue[Ib]={Type:Uint32Array,size:12,setter:TT,cols:3},ue[Bb]={Type:Uint32Array,size:16,setter:kT,cols:4},ue[xb]={Type:Uint32Array,size:4,setter:Fb,arraySetter:Rb},ue[Ab]={Type:Uint32Array,size:8,setter:Mb,cols:2},ue[Eb]={Type:Uint32Array,size:12,setter:Pb,cols:3},ue[Sb]={Type:Uint32Array,size:16,setter:Nb,cols:4},ue[_b]={Type:Float32Array,size:32,setter:IT,rows:2,cols:2},ue[Cb]={Type:Float32Array,size:48,setter:BT,rows:3,cols:3},ue[Tb]={Type:Float32Array,size:64,setter:DT,rows:4,cols:4},ue[nT]={Type:Float32Array,size:32,setter:FT,rows:2,cols:3},ue[rT]={Type:Float32Array,size:32,setter:MT,rows:2,cols:4},ue[iT]={Type:Float32Array,size:48,setter:RT,rows:3,cols:2},ue[oT]={Type:Float32Array,size:48,setter:NT,rows:3,cols:4},ue[sT]={Type:Float32Array,size:64,setter:PT,rows:4,cols:2},ue[aT]={Type:Float32Array,size:64,setter:LT,rows:4,cols:3},ue[K5]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:Sc},ue[J5]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:_c},ue[eT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:Cd},ue[tT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:Sc},ue[lT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:Cc},ue[uT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:Cc},ue[cT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:_c},ue[fT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:Sc},ue[hT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:Cd},ue[dT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:_c},ue[pT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:Cc},ue[gT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:Sc},ue[mT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:Cd},ue[bT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:_c},ue[yT]={Type:null,size:0,setter:Ft,arraySetter:Rt,bindPoint:Cc};function Tc(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(Ac,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribPointer(t,n.numComponents||n.size,n.type||Ec,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Wr(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(Ac,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||Sd,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function kc(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(Ac,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||_d,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Td(e,t,n){const r=n.size,i=n.count;return function(o){e.bindBuffer(Ac,o.buffer);const s=o.size||o.numComponents||r,a=s/i,u=o.type||Ec,c=ue[u].size*s,f=o.normalize||!1,h=o.offset||0,d=c/i;for(let p=0;p<i;++p)e.enableVertexAttribArray(t+p),e.vertexAttribPointer(t+p,a,u,f,c,h+d*p),o.divisor!==void 0&&e.vertexAttribDivisor(t+p,o.divisor)}}const it={};it[Ec]={size:4,setter:Tc},it[gb]={size:8,setter:Tc},it[mb]={size:12,setter:Tc},it[bb]={size:16,setter:Tc},it[Sd]={size:4,setter:Wr},it[yb]={size:8,setter:Wr},it[wb]={size:12,setter:Wr},it[vb]={size:16,setter:Wr},it[_d]={size:4,setter:kc},it[kb]={size:8,setter:kc},it[Ib]={size:12,setter:kc},it[Bb]={size:16,setter:kc},it[xb]={size:4,setter:Wr},it[Ab]={size:8,setter:Wr},it[Eb]={size:12,setter:Wr},it[Sb]={size:16,setter:Wr},it[_b]={size:4,setter:Td,count:2},it[Cb]={size:9,setter:Td,count:3},it[Tb]={size:16,setter:Td,count:4};function Lb(e){const t=e.name;return t.startsWith("gl_")||t.startsWith("webgl_")}const OT=/(\.|\[|]|\w+)/g,zT=e=>e>="0"&&e<="9";function Ob(e,t,n,r){const i=e.split(OT).filter(a=>a!=="");let o=0,s="";for(;;){const a=i[o++];s+=a;const u=zT(a[0]),l=u?parseInt(a):a;if(u&&(s+=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[s]=r[s]||function(p){return function(m){Vb(p,m)}}(d),s+=f}}}function UT(e,t){let n=0;function r(a,u,l){const c=u.name.endsWith("[0]"),f=u.type,h=ue[f];if(!h)throw new Error(`unknown type: 0x${f.toString(16)}`);let d;if(h.bindPoint){const p=n;n+=u.size,c?d=h.arraySetter(e,f,p,l,u.size):d=h.setter(e,f,p,l,u.size)}else h.arraySetter&&c?d=h.arraySetter(e,l):d=h.setter(e,l);return d.location=l,d}const i={},o={},s=e.getProgramParameter(t,pb);for(let a=0;a<s;++a){const u=e.getActiveUniform(t,a);if(Lb(u))continue;let l=u.name;l.endsWith("[0]")&&(l=l.substr(0,l.length-3));const c=e.getUniformLocation(t,u.name);if(c){const f=r(t,u,c);i[l]=f,Ob(l,f,o,i)}}return i}function GT(e,t){const n={},r=e.getProgramParameter(t,q5);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 HT(e,t){const n=e.getProgramParameter(t,pb),r=[],i=[];for(let a=0;a<n;++a){i.push(a),r.push({});const u=e.getActiveUniform(t,a);r[a].name=u.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(a){const u=a[0],l=a[1];e.getActiveUniforms(t,i,e[u]).forEach(function(c,f){r[f][l]=c})});const o={},s=e.getProgramParameter(t,W5);for(let a=0;a<s;++a){const u=e.getActiveUniformBlockName(t,a),l={index:e.getUniformBlockIndex(t,u),usedByVertexShader:e.getActiveUniformBlockParameter(t,a,Z5),usedByFragmentShader:e.getActiveUniformBlockParameter(t,a,Y5),size:e.getActiveUniformBlockParameter(t,a,Q5),uniformIndices:e.getActiveUniformBlockParameter(t,a,X5)};l.used=l.usedByVertexShader||l.usedByFragmentShader,o[u]=l}return{blockSpecs:o,uniformData:r}}const zb=/\[\d+\]\.$/,VT=(e,t)=>((e+(t-1))/t|0)*t;function $T(e,t,n,r){if(t||n){r=r||1;const o=e.length/4;return function(s){let a=0,u=0;for(let l=0;l<o;++l){for(let c=0;c<r;++c)e[a++]=s[u++];a+=4-r}}}else return function(i){i.length?e.set(i):e[0]=i}}function jT(e,t,n,r){const i=n.blockSpecs,o=n.uniformData,s=i[r];if(!s)return H5("no uniform block object named:",r),{name:r,uniforms:{}};const a=new ArrayBuffer(s.size),u=e.createBuffer(),l=s.index;e.bindBuffer(Ed,u),e.uniformBlockBinding(t,s.index,l);let c=r+".";zb.test(c)&&(c=c.replace(zb,"."));const f={},h={},d={};return s.uniformIndices.forEach(function(p){const m=o[p];let y=m.name;y.startsWith(c)&&(y=y.substr(c.length));const w=y.endsWith("[0]");w&&(y=y.substr(0,y.length-3));const A=ue[m.type],_=A.Type,S=w?VT(A.size,16)*m.size:A.size*m.size,T=new _(a,m.offset,S/_.BYTES_PER_ELEMENT);f[y]=T;const B=$T(T,w,A.rows,A.cols);h[y]=B,Ob(y,B,d,h)}),{name:r,array:a,asFloat:new Float32Array(a),buffer:u,uniforms:f,setters:h}}function Ub(e,t,n){return jT(e,t.program,t.uniformBlockSpec,n)}function Gb(e,t,n){const i=(t.uniformBlockSpec||t).blockSpecs[n.name];if(i){const o=i.index;return e.bindBufferRange(Ed,o,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function Hb(e,t,n){Gb(e,t,n)&&e.bufferData(Ed,n.array,V5)}function Wa(e,t){const n=e.setters;for(const r in t){const i=n[r];if(i){const o=t[r];i(o)}}}function Vb(e,t){for(const n in t){const r=e[n];typeof r=="function"?r(t[n]):Vb(e[n],t[n])}}function qi(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 s=o.length;for(let a=0;a<s;++a)qi(n,o[a])}else for(const s in o){const a=n[s];a&&a(o[s])}}}function qT(e,t){const n={},r=e.getProgramParameter(t,j5);for(let i=0;i<r;++i){const o=e.getActiveAttrib(t,i);if(Lb(o))continue;const s=e.getAttribLocation(t,o.name),a=it[o.type],u=a.setter(e,s,a);u.location=s,n[o.name]=u}return n}function WT(e,t){for(const n in t){const r=e[n];r&&r(t[n])}}function Wi(e,t,n){n.vertexArrayObject?e.bindVertexArray(n.vertexArrayObject):(WT(t.attribSetters||t,n.attribs),n.indices&&e.bindBuffer($5,n.indices))}function ZT(e,t){const n=UT(e,t),r=qT(e,t),i={program:t,uniformSetters:n,attribSetters:r};return Qo(e)&&(i.uniformBlockSpec=HT(e,t),i.transformFeedbackInfo=GT(e,t)),i}const YT=4,$b=5123;function Ic(e,t,n,r,i,o){n=n===void 0?YT:n;const s=t.indices,a=t.elementType,u=r===void 0?t.numElements:r;i=i===void 0?0:i,a||s?o!==void 0?e.drawElementsInstanced(n,u,a===void 0?$b:t.elementType,i,o):e.drawElements(n,u,a===void 0?$b:t.elementType,i):o!==void 0?e.drawArraysInstanced(n,i,u,o):e.drawArrays(n,i,u)}const QT=36160,Zi=36161,XT=3553,KT=5121,JT=6402,ek=6408,tk=33190,nk=36012,rk=35056,ik=36013,ok=32854,sk=32855,ak=36194,jb=33189,qb=6401,Wb=36168,kd=34041,Id=36064,Bc=36096,Zb=36128,Bd=33306,Dd=33071,Fd=9729,Yb=[{format:ek,type:KT,min:Fd,wrap:Dd},{format:kd}],kn={};kn[kd]=Bd,kn[qb]=Zb,kn[Wb]=Zb,kn[JT]=Bc,kn[jb]=Bc,kn[tk]=Bc,kn[nk]=Bc,kn[rk]=Bd,kn[ik]=Bd;function lk(e,t){return kn[e]||kn[t]}const Zr={};Zr[ok]=!0,Zr[sk]=!0,Zr[ak]=!0,Zr[kd]=!0,Zr[jb]=!0,Zr[qb]=!0,Zr[Wb]=!0;function uk(e){return Zr[e]}const ck=32;function fk(e){return e>=Id&&e<Id+ck}function hk(e,t,n,r){const i=QT,o=e.createFramebuffer();e.bindFramebuffer(i,o),n=n||e.drawingBufferWidth,r=r||e.drawingBufferHeight,t=t||Yb;const s=[],a={framebuffer:o,attachments:[],width:n,height:r};return t.forEach(function(u,l){let c=u.attachment;const f=u.samples,h=u.format;let d=u.attachmentPoint||lk(h,u.internalFormat);if(d||(d=Id+l),fk(d)&&s.push(d),!c)if(f!==void 0||uk(h))c=e.createRenderbuffer(),e.bindRenderbuffer(Zi,c),f>1?e.renderbufferStorageMultisample(Zi,f,h,n,r):e.renderbufferStorage(Zi,h,n,r);else{const p=Object.assign({},u);p.width=n,p.height=r,p.auto===void 0&&(p.auto=!1,p.min=p.min||p.minMag||Fd,p.mag=p.mag||p.minMag||Fd,p.wrapS=p.wrapS||p.wrap||Dd,p.wrapT=p.wrapT||p.wrap||Dd),c=qa(e,p)}if($1(e,c))e.framebufferRenderbuffer(i,d,Zi,c);else if(hc(e,c))u.layer!==void 0?e.framebufferTextureLayer(i,d,c,u.level||0,u.layer):e.framebufferTexture2D(i,d,u.target||XT,c,u.level||0);else throw new Error("unknown attachment type");a.attachments.push(c)}),e.drawBuffers&&e.drawBuffers(s),a}function dk(e,t,n,r,i){r=r||e.drawingBufferWidth,i=i||e.drawingBufferHeight,t.width=r,t.height=i,n=n||Yb,n.forEach(function(o,s){const a=t.attachments[s],u=o.format,l=o.samples;if(l!==void 0||$1(e,a))e.bindRenderbuffer(Zi,a),l>1?e.renderbufferStorageMultisample(Zi,l,u,r,i):e.renderbufferStorage(Zi,u,r,i);else if(hc(e,a))G5(e,a,o,r,i);else throw new Error("unknown attachment type")})}function pk(e,t,n){const r=e.createVertexArray();return e.bindVertexArray(r),t.length||(t=[t]),t.forEach(function(i){Wi(e,i,n)}),e.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const gk=/^(.*?)_/;function mk(e,t){ld(e,0);const n=e.getExtension(t);if(n){const r={},i=gk.exec(t)[1],o="_"+i;for(const s in n){const a=n[s],u=typeof a=="function",l=u?i:o;let c=s;s.endsWith(l)&&(c=s.substring(0,s.length-l.length)),e[c]!==void 0?!u&&e[c]!==a&&V1(c,e[c],a,s):u?e[c]=function(f){return function(){return f.apply(n,arguments)}}(a):(e[c]=a,r[c]=a)}r.constructor={name:n.constructor.name},ld(r,0)}return n}const Qb=["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 Xb(e){for(let t=0;t<Qb.length;++t)mk(e,Qb[t])}function bk(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){Xb(r);break}return r}function yk(e,t){return bk(e,t)}const wk=`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 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;
|
|
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();}`,n8=`#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,9 +246,9 @@ 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;}}`,r8=`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 $n(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Yr(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 Rd=Symbol("implicit");function Md(){var e=new hr,t=[],n=[],r=Rd;function i(o){let s=e.get(o);if(s===void 0){if(r!==Rd)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new hr;for(const s of o)e.has(s)||e.set(s,t.push(s)-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 Md(t,n).unknown(r)},$n.apply(i,arguments),i}function ns(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Za(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Qr(){}var Yi=.7,rs=1/Yi,is="\\s*([+-]?\\d+)\\s*",Ya="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ak=/^#([0-9a-f]{3,8})$/,Ek=new RegExp(`^rgb\\(${is},${is},${is}\\)$`),Sk=new RegExp(`^rgb\\(${jn},${jn},${jn}\\)$`),_k=new RegExp(`^rgba\\(${is},${is},${is},${Ya}\\)$`),Ck=new RegExp(`^rgba\\(${jn},${jn},${jn},${Ya}\\)$`),Tk=new RegExp(`^hsl\\(${Ya},${jn},${jn}\\)$`),kk=new RegExp(`^hsla\\(${Ya},${jn},${jn},${Ya}\\)$`),Kb={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};ns(Qr,Xr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Jb,formatHex:Jb,formatHex8:Ik,formatHsl:Bk,formatRgb:e2,toString:e2});function Jb(){return this.rgb().formatHex()}function Ik(){return this.rgb().formatHex8()}function Bk(){return o2(this).formatHsl()}function e2(){return this.rgb().formatRgb()}function Xr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ak.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?t2(t):n===3?new ht(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Dc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Dc(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=Ek.exec(e))?new ht(t[1],t[2],t[3],1):(t=Sk.exec(e))?new ht(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=_k.exec(e))?Dc(t[1],t[2],t[3],t[4]):(t=Ck.exec(e))?Dc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Tk.exec(e))?i2(t[1],t[2]/100,t[3]/100,1):(t=kk.exec(e))?i2(t[1],t[2]/100,t[3]/100,t[4]):Kb.hasOwnProperty(e)?t2(Kb[e]):e==="transparent"?new ht(NaN,NaN,NaN,0):null}function t2(e){return new ht(e>>16&255,e>>8&255,e&255,1)}function Dc(e,t,n,r){return r<=0&&(e=t=n=NaN),new ht(e,t,n,r)}function Pd(e){return e instanceof Qr||(e=Xr(e)),e?(e=e.rgb(),new ht(e.r,e.g,e.b,e.opacity)):new ht}function Fc(e,t,n,r){return arguments.length===1?Pd(e):new ht(e,t,n,r??1)}function ht(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ns(ht,Fc,Za(Qr,{brighter(e){return e=e==null?rs:Math.pow(rs,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yi:Math.pow(Yi,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ht(Qi(this.r),Qi(this.g),Qi(this.b),Rc(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:n2,formatHex:n2,formatHex8:Dk,formatRgb:r2,toString:r2}));function n2(){return`#${Xi(this.r)}${Xi(this.g)}${Xi(this.b)}`}function Dk(){return`#${Xi(this.r)}${Xi(this.g)}${Xi(this.b)}${Xi((isNaN(this.opacity)?1:this.opacity)*255)}`}function r2(){const e=Rc(this.opacity);return`${e===1?"rgb(":"rgba("}${Qi(this.r)}, ${Qi(this.g)}, ${Qi(this.b)}${e===1?")":`, ${e})`}`}function Rc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Qi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Xi(e){return e=Qi(e),(e<16?"0":"")+e.toString(16)}function i2(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new In(e,t,n,r)}function o2(e){if(e instanceof In)return new In(e.h,e.s,e.l,e.opacity);if(e instanceof Qr||(e=Xr(e)),!e)return new In;if(e instanceof In)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),s=NaN,a=o-i,u=(o+i)/2;return a?(t===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-t)/a+2:s=(t-n)/a+4,a/=u<.5?o+i:2-o-i,s*=60):a=u>0&&u<1?0:s,new In(s,a,u,e.opacity)}function Nd(e,t,n,r){return arguments.length===1?o2(e):new In(e,t,n,r??1)}function In(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ns(In,Nd,Za(Qr,{brighter(e){return e=e==null?rs:Math.pow(rs,e),new In(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yi:Math.pow(Yi,e),new In(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 ht(Ld(e>=240?e-240:e+120,i,r),Ld(e,i,r),Ld(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new In(s2(this.h),Mc(this.s),Mc(this.l),Rc(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=Rc(this.opacity);return`${e===1?"hsl(":"hsla("}${s2(this.h)}, ${Mc(this.s)*100}%, ${Mc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function s2(e){return e=(e||0)%360,e<0?e+360:e}function Mc(e){return Math.max(0,Math.min(1,e||0))}function Ld(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 a2=Math.PI/180,l2=180/Math.PI,Pc=18,u2=.96422,c2=1,f2=.82521,h2=4/29,os=6/29,d2=3*os*os,Fk=os*os*os;function p2(e){if(e instanceof qn)return new qn(e.l,e.a,e.b,e.opacity);if(e instanceof wr)return g2(e);e instanceof ht||(e=Pd(e));var t=Hd(e.r),n=Hd(e.g),r=Hd(e.b),i=zd((.2225045*t+.7168786*n+.0606169*r)/c2),o,s;return t===n&&n===r?o=s=i:(o=zd((.4360747*t+.3850649*n+.1430804*r)/u2),s=zd((.0139322*t+.0971045*n+.7141733*r)/f2)),new qn(116*i-16,500*(o-i),200*(i-s),e.opacity)}function Od(e,t,n,r){return arguments.length===1?p2(e):new qn(e,t,n,r??1)}function qn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ns(qn,Od,Za(Qr,{brighter(e){return new qn(this.l+Pc*(e??1),this.a,this.b,this.opacity)},darker(e){return new qn(this.l-Pc*(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=u2*Ud(t),e=c2*Ud(e),n=f2*Ud(n),new ht(Gd(3.1338561*t-1.6168667*e-.4906146*n),Gd(-.9787684*t+1.9161415*e+.033454*n),Gd(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function zd(e){return e>Fk?Math.pow(e,1/3):e/d2+h2}function Ud(e){return e>os?e*e*e:d2*(e-h2)}function Gd(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Hd(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Rk(e){if(e instanceof wr)return new wr(e.h,e.c,e.l,e.opacity);if(e instanceof qn||(e=p2(e)),e.a===0&&e.b===0)return new wr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*l2;return new wr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Vd(e,t,n,r){return arguments.length===1?Rk(e):new wr(e,t,n,r??1)}function wr(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function g2(e){if(isNaN(e.h))return new qn(e.l,0,0,e.opacity);var t=e.h*a2;return new qn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ns(wr,Vd,Za(Qr,{brighter(e){return new wr(this.h,this.c,this.l+Pc*(e??1),this.opacity)},darker(e){return new wr(this.h,this.c,this.l-Pc*(e??1),this.opacity)},rgb(){return g2(this).rgb()}}));var m2=-.14861,$d=1.78277,jd=-.29227,Nc=-.90649,Qa=1.97294,b2=Qa*Nc,y2=Qa*$d,w2=$d*jd-Nc*m2;function Mk(e){if(e instanceof Ki)return new Ki(e.h,e.s,e.l,e.opacity);e instanceof ht||(e=Pd(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(w2*r+b2*t-y2*n)/(w2+b2-y2),o=r-i,s=(Qa*(n-i)-jd*o)/Nc,a=Math.sqrt(s*s+o*o)/(Qa*i*(1-i)),u=a?Math.atan2(s,o)*l2-120:NaN;return new Ki(u<0?u+360:u,a,i,e.opacity)}function qd(e,t,n,r){return arguments.length===1?Mk(e):new Ki(e,t,n,r??1)}function Ki(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ns(Ki,qd,Za(Qr,{brighter(e){return e=e==null?rs:Math.pow(rs,e),new Ki(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yi:Math.pow(Yi,e),new Ki(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*a2,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new ht(255*(t+n*(m2*r+$d*i)),255*(t+n*(jd*r+Nc*i)),255*(t+n*(Qa*r)),this.opacity)}}));function v2(e,t,n,r,i){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*r+s*i)/6}function x2(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],s=r>0?e[r-1]:2*i-o,a=r<t-1?e[r+2]:2*o-i;return v2((n-r/t)*t,s,i,o,a)}}function A2(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],s=e[(r+1)%t],a=e[(r+2)%t];return v2((n-r/t)*t,i,o,s,a)}}const Lc=e=>()=>e;function E2(e,t){return function(n){return e+n*t}}function Pk(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 Oc(e,t){var n=t-e;return n?E2(e,n>180||n<-180?n-360*Math.round(n/360):n):Lc(isNaN(e)?t:e)}function Nk(e){return(e=+e)==1?dt:function(t,n){return n-t?Pk(t,n,e):Lc(isNaN(t)?n:t)}}function dt(e,t){var n=t-e;return n?E2(e,n):Lc(isNaN(e)?t:e)}const Wd=function e(t){var n=Nk(t);function r(i,o){var s=n((i=Fc(i)).r,(o=Fc(o)).r),a=n(i.g,o.g),u=n(i.b,o.b),l=dt(i.opacity,o.opacity);return function(c){return i.r=s(c),i.g=a(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function S2(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),s,a;for(s=0;s<n;++s)a=Fc(t[s]),r[s]=a.r||0,i[s]=a.g||0,o[s]=a.b||0;return r=e(r),i=e(i),o=e(o),a.opacity=1,function(u){return a.r=r(u),a.g=i(u),a.b=o(u),a+""}}}var Lk=S2(x2),Ok=S2(A2);function Zd(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 _2(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function zk(e,t){return(_2(t)?Zd:C2)(e,t)}function C2(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Kr(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function T2(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 k2(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]=Kr(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Yd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qd=new RegExp(Yd.source,"g");function Uk(e){return function(){return e}}function Gk(e){return function(t){return e(t)+""}}function I2(e,t){var n=Yd.lastIndex=Qd.lastIndex=0,r,i,o,s=-1,a=[],u=[];for(e=e+"",t=t+"";(r=Yd.exec(e))&&(i=Qd.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:Bn(r,i)})),n=Qd.lastIndex;return n<t.length&&(o=t.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?u[0]?Gk(u[0].x):Uk(t):(t=u.length,function(l){for(var c=0,f;c<t;++c)a[(f=u[c]).i]=f.x(l);return a.join("")})}function Kr(e,t){var n=typeof t,r;return t==null||n==="boolean"?Lc(t):(n==="number"?Bn:n==="string"?(r=Xr(t))?(t=r,Wd):I2:t instanceof Xr?Wd:t instanceof Date?T2:_2(t)?Zd:Array.isArray(t)?C2:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?k2:Bn)(e,t)}function Hk(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function Vk(e,t){var n=Oc(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Xa(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var B2=180/Math.PI,Xd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function D2(e,t,n,r,i,o){var s,a,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),e*r<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*B2,skewX:Math.atan(u)*B2,scaleX:s,scaleY:a}}var zc;function $k(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Xd:D2(t.a,t.b,t.c,t.d,t.e,t.f)}function jk(e){return e==null||(zc||(zc=document.createElementNS("http://www.w3.org/2000/svg","g")),zc.setAttribute("transform",e),!(e=zc.transform.baseVal.consolidate()))?Xd:(e=e.matrix,D2(e.a,e.b,e.c,e.d,e.e,e.f))}function F2(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,h,d,p){if(l!==f||c!==h){var m=d.push("translate(",null,t,null,n);p.push({i:m-4,x:Bn(l,f)},{i:m-2,x:Bn(c,h)})}else(f||h)&&d.push("translate("+f+t+h+n)}function s(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Bn(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function a(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Bn(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,h,d,p){if(l!==f||c!==h){var m=d.push(i(d)+"scale(",null,",",null,")");p.push({i:m-4,x:Bn(l,f)},{i:m-2,x:Bn(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=e(l),c=e(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,h),s(l.rotate,c.rotate,f,h),a(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(d){for(var p=-1,m=h.length,y;++p<m;)f[(y=h[p]).i]=y.x(d);return f.join("")}}}var qk=F2($k,"px, ","px)","deg)"),Wk=F2(jk,", ",")",")"),Zk=1e-12;function R2(e){return((e=Math.exp(e))+1/e)/2}function Yk(e){return((e=Math.exp(e))-1/e)/2}function Qk(e){return((e=Math.exp(2*e))-1)/(e+1)}const Xk=function e(t,n,r){function i(o,s){var a=o[0],u=o[1],l=o[2],c=s[0],f=s[1],h=s[2],d=c-a,p=f-u,m=d*d+p*p,y,w;if(m<Zk)w=Math.log(h/l)/t,y=function(I){return[a+I*d,u+I*p,l*Math.exp(t*I*w)]};else{var A=Math.sqrt(m),_=(h*h-l*l+r*m)/(2*l*n*A),S=(h*h-l*l-r*m)/(2*h*n*A),T=Math.log(Math.sqrt(_*_+1)-_),B=Math.log(Math.sqrt(S*S+1)-S);w=(B-T)/t,y=function(I){var D=I*w,M=R2(T),U=l/(n*A)*(M*Qk(t*D+T)-Yk(T));return[a+U*d,u+U*p,l*M/R2(t*D+T)]}}return y.duration=w*1e3*t/Math.SQRT2,y}return i.rho=function(o){var s=Math.max(.001,+o),a=s*s,u=a*a;return e(s,a,u)},i}(Math.SQRT2,2,4);function M2(e){return function(t,n){var r=e((t=Nd(t)).h,(n=Nd(n)).h),i=dt(t.s,n.s),o=dt(t.l,n.l),s=dt(t.opacity,n.opacity);return function(a){return t.h=r(a),t.s=i(a),t.l=o(a),t.opacity=s(a),t+""}}}const Kk=M2(Oc);var Jk=M2(dt);function eI(e,t){var n=dt((e=Od(e)).l,(t=Od(t)).l),r=dt(e.a,t.a),i=dt(e.b,t.b),o=dt(e.opacity,t.opacity);return function(s){return e.l=n(s),e.a=r(s),e.b=i(s),e.opacity=o(s),e+""}}function P2(e){return function(t,n){var r=e((t=Vd(t)).h,(n=Vd(n)).h),i=dt(t.c,n.c),o=dt(t.l,n.l),s=dt(t.opacity,n.opacity);return function(a){return t.h=r(a),t.c=i(a),t.l=o(a),t.opacity=s(a),t+""}}}const tI=P2(Oc);var nI=P2(dt);function N2(e){return function t(n){n=+n;function r(i,o){var s=e((i=qd(i)).h,(o=qd(o)).h),a=dt(i.s,o.s),u=dt(i.l,o.l),l=dt(i.opacity,o.opacity);return function(c){return i.h=s(c),i.s=a(c),i.l=u(Math.pow(c,n)),i.opacity=l(c),i+""}}return r.gamma=t,r}(1)}const rI=N2(Oc);var iI=N2(dt);function Kd(e,t){t===void 0&&(t=e,e=Kr);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(s){var a=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return o[a](s-a)}}function oI(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}const sI=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Kr,interpolateArray:zk,interpolateBasis:x2,interpolateBasisClosed:A2,interpolateCubehelix:rI,interpolateCubehelixLong:iI,interpolateDate:T2,interpolateDiscrete:Hk,interpolateHcl:tI,interpolateHclLong:nI,interpolateHsl:Kk,interpolateHslLong:Jk,interpolateHue:Vk,interpolateLab:eI,interpolateNumber:Bn,interpolateNumberArray:Zd,interpolateObject:k2,interpolateRgb:Wd,interpolateRgbBasis:Lk,interpolateRgbBasisClosed:Ok,interpolateRound:Xa,interpolateString:I2,interpolateTransformCss:qk,interpolateTransformSvg:Wk,interpolateZoom:Xk,piecewise:Kd,quantize:oI},Symbol.toStringTag,{value:"Module"}));function aI(e){return function(){return e}}function Jd(e){return+e}var L2=[0,1];function Ut(e){return e}function e0(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:aI(isNaN(t)?NaN:.5)}function lI(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function uI(e,t,n){var r=e[0],i=e[1],o=t[0],s=t[1];return i<r?(r=e0(i,r),o=n(s,o)):(r=e0(r,i),o=n(o,s)),function(a){return o(r(a))}}function cI(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=e0(e[s],e[s+1]),o[s]=n(t[s],t[s+1]);return function(a){var u=Ur(e,a,1,r)-1;return o[u](i[u](a))}}function Ka(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Uc(){var e=L2,t=L2,n=Kr,r,i,o,s=Ut,a,u,l;function c(){var h=Math.min(e.length,t.length);return s!==Ut&&(s=lI(e[0],e[h-1])),a=h>2?cI:uI,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=a(e.map(r),t,n)))(r(s(h)))}return f.invert=function(h){return s(i((l||(l=a(t,e.map(r),Bn)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Jd),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=Xa,c()},f.clamp=function(h){return arguments.length?(s=h?!0:Ut,c()):s!==Ut},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,d){return r=h,i=d,c()}}function O2(){return Uc()(Ut,Ut)}function z2(e,t,n,r){var i=Oi(e,t,n),o;switch(r=jo(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=HC(i,s))&&(r.precision=o),d1(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=VC(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=GC(i))&&(r.precision=o-(r.type==="%")*2);break}}return St(r)}function Ji(e){var t=e.domain;return e.ticks=function(n){var r=t();return Xu(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return z2(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,s=r[i],a=r[o],u,l,c=10;for(a<s&&(l=s,s=a,a=l,l=i,i=o,o=l);c-- >0;){if(l=Ph(s,a,n),l===u)return r[i]=s,r[o]=a,t(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;u=l}return e},e}function U2(){var e=O2();return e.copy=function(){return Ka(e,U2())},$n.apply(e,arguments),Ji(e)}function G2(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,Jd),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return G2(e).unknown(t)},e=arguments.length?Array.from(e,Jd):[0,1],Ji(n)}function H2(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],s;return o<i&&(s=n,n=r,r=s,s=i,i=o,o=s),e[n]=t.floor(i),e[r]=t.ceil(o),e}function V2(e){return Math.log(e)}function $2(e){return Math.exp(e)}function fI(e){return-Math.log(-e)}function hI(e){return-Math.exp(-e)}function dI(e){return isFinite(e)?+("1e"+e):e<0?0:e}function pI(e){return e===10?dI:e===Math.E?Math.exp:t=>Math.pow(e,t)}function gI(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 j2(e){return(t,n)=>-e(-t,n)}function t0(e){const t=e(V2,$2),n=t.domain;let r=10,i,o;function s(){return i=gI(r),o=pI(r),n()[0]<0?(i=j2(i),o=j2(o),e(fI,hI)):e(V2,$2),t}return t.base=function(a){return arguments.length?(r=+a,s()):r},t.domain=function(a){return arguments.length?(n(a),s()):n()},t.ticks=a=>{const u=n();let l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let h=i(l),d=i(c),p,m;const y=a==null?10:+a;let w=[];if(!(r%1)&&d-h<y){if(h=Math.floor(h),d=Math.ceil(d),l>0){for(;h<=d;++h)for(p=1;p<r;++p)if(m=h<0?p/o(-h):p*o(h),!(m<l)){if(m>c)break;w.push(m)}}else for(;h<=d;++h)for(p=r-1;p>=1;--p)if(m=h>0?p/o(-h):p*o(h),!(m<l)){if(m>c)break;w.push(m)}w.length*2<y&&(w=Xu(l,c,y))}else w=Xu(h,d,Math.min(d-h,y)).map(o);return f?w.reverse():w},t.tickFormat=(a,u)=>{if(a==null&&(a=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=jo(u)).precision==null&&(u.trim=!0),u=St(u)),a===1/0)return u;const l=Math.max(1,r*a/t.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=l?u(c):""}},t.nice=()=>n(H2(n(),{floor:a=>o(Math.floor(i(a))),ceil:a=>o(Math.ceil(i(a)))})),t}function n0(){const e=t0(Uc()).domain([1,10]);return e.copy=()=>Ka(e,n0()).base(e.base()),$n.apply(e,arguments),e}function q2(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function W2(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function r0(e){var t=1,n=e(q2(t),W2(t));return n.constant=function(r){return arguments.length?e(q2(t=+r),W2(t)):t},Ji(n)}function Z2(){var e=r0(Uc());return e.copy=function(){return Ka(e,Z2()).constant(e.constant())},$n.apply(e,arguments)}function Y2(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function mI(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function bI(e){return e<0?-e*e:e*e}function i0(e){var t=e(Ut,Ut),n=1;function r(){return n===1?e(Ut,Ut):n===.5?e(mI,bI):e(Y2(n),Y2(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ji(t)}function o0(){var e=i0(Uc());return e.copy=function(){return Ka(e,o0()).exponent(e.exponent())},$n.apply(e,arguments),e}function yI(){return o0.apply(null,arguments).exponent(.5)}function Q2(){var e=[],t=[],n=[],r;function i(){var s=0,a=Math.max(1,t.length);for(n=new Array(a-1);++s<a;)n[s-1]=s1(e,s/a);return o}function o(s){return s==null||isNaN(s=+s)?r:t[Ur(n,s)]}return o.invertExtent=function(s){var a=t.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:e[0],a<n.length?n[a]:e[e.length-1]]},o.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let a of s)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Li),i()},o.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},o.unknown=function(s){return arguments.length?(r=s,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Q2().domain(e).range(t).unknown(r)},$n.apply(o,arguments)}function X2(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function s(u){return u!=null&&u<=u?i[Ur(r,u,0,n)]:o}function a(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return s}return s.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,a()):[e,t]},s.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,a()):i.slice()},s.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[e,r[0]]:l>=n?[r[n-1],t]:[r[l-1],r[l]]},s.unknown=function(u){return arguments.length&&(o=u),s},s.thresholds=function(){return r.slice()},s.copy=function(){return X2().domain([e,t]).range(i).unknown(o)},$n.apply(Ji(s),arguments)}function K2(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Ur(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 s=t.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return K2().domain(e).range(t).unknown(n)},$n.apply(i,arguments)}function wI(e){return new Date(e)}function vI(e){return e instanceof Date?+e:+new Date(+e)}function s0(e,t,n,r,i,o,s,a,u,l){var c=O2(),f=c.invert,h=c.domain,d=l(".%L"),p=l(":%S"),m=l("%I:%M"),y=l("%I %p"),w=l("%a %d"),A=l("%b %d"),_=l("%B"),S=l("%Y");function T(B){return(u(B)<B?d:a(B)<B?p:s(B)<B?m:o(B)<B?y:r(B)<B?i(B)<B?w:A:n(B)<B?_:S)(B)}return c.invert=function(B){return new Date(f(B))},c.domain=function(B){return arguments.length?h(Array.from(B,vI)):h().map(wI)},c.ticks=function(B){var I=h();return e(I[0],I[I.length-1],B??10)},c.tickFormat=function(B,I){return I==null?T:l(I)},c.nice=function(B){var I=h();return(!B||typeof B.range!="function")&&(B=t(I[0],I[I.length-1],B??10)),B?h(H2(I,B)):c},c.copy=function(){return Ka(c,s0(e,t,n,r,i,o,s,a,u,l))},c}function xI(){return $n.apply(s0(e4,t4,Gn,Ca,Sa,Gr,nc,ec,mr,qh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function AI(){return $n.apply(s0(KC,JC,Hn,Ta,_a,zi,rc,tc,mr,Wh).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Gc(){var e=0,t=1,n,r,i,o,s=Ut,a=!1,u;function l(f){return f==null||isNaN(f=+f)?u:s(i===0?.5:(f=(o(f)-n)*i,a?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?(a=!!f,l):a},l.interpolator=function(f){return arguments.length?(s=f,l):s};function c(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=c(Kr),l.rangeRound=c(Xa),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return o=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),l}}function Jr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function a0(){var e=Ji(Gc()(Ut));return e.copy=function(){return Jr(e,a0())},Yr.apply(e,arguments)}function J2(){var e=t0(Gc()).domain([1,10]);return e.copy=function(){return Jr(e,J2()).base(e.base())},Yr.apply(e,arguments)}function ey(){var e=r0(Gc());return e.copy=function(){return Jr(e,ey()).constant(e.constant())},Yr.apply(e,arguments)}function l0(){var e=i0(Gc());return e.copy=function(){return Jr(e,l0()).exponent(e.exponent())},Yr.apply(e,arguments)}function EI(){return l0.apply(null,arguments).exponent(.5)}function Hc(){var e=0,t=.5,n=1,r=1,i,o,s,a,u,l=Ut,c,f=!1,h;function d(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-o)*(r*m<r*o?a:u),l(f?Math.max(0,Math.min(1,m)):m))}d.domain=function(m){return arguments.length?([e,t,n]=m,i=c(e=+e),o=c(t=+t),s=c(n=+n),a=i===o?0:.5/(o-i),u=o===s?0:.5/(s-o),r=o<i?-1:1,d):[e,t,n]},d.clamp=function(m){return arguments.length?(f=!!m,d):f},d.interpolator=function(m){return arguments.length?(l=m,d):l};function p(m){return function(y){var w,A,_;return arguments.length?([w,A,_]=y,l=Kd(m,[w,A,_]),d):[l(0),l(.5),l(1)]}}return d.range=p(Kr),d.rangeRound=p(Xa),d.unknown=function(m){return arguments.length?(h=m,d):h},function(m){return c=m,i=m(e),o=m(t),s=m(n),a=i===o?0:.5/(o-i),u=o===s?0:.5/(s-o),r=o<i?-1:1,d}}function ty(){var e=Ji(Hc()(Ut));return e.copy=function(){return Jr(e,ty())},Yr.apply(e,arguments)}function ny(){var e=t0(Hc()).domain([.1,1,10]);return e.copy=function(){return Jr(e,ny()).base(e.base())},Yr.apply(e,arguments)}function ry(){var e=r0(Hc());return e.copy=function(){return Jr(e,ry()).constant(e.constant())},Yr.apply(e,arguments)}function u0(){var e=i0(Hc());return e.copy=function(){return Jr(e,u0()).exponent(e.exponent())},Yr.apply(e,arguments)}function SI(){return u0.apply(null,arguments).exponent(.5)}function Wn(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 _I=Wn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),CI=Wn("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),TI=Wn("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),kI=Wn("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),II=Wn("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),BI=Wn("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),DI=Wn("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),FI=Wn("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),RI=Wn("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),MI=Wn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function c0(e,t,n){const r=e-t+n*2;return e?r>0?r:1:0}const PI="identity",ss="linear",ei="log",Ja="pow",el="sqrt",Vc="symlog",iy="time",oy="utc",Zn="sequential",as="diverging",f0="quantile",sy="quantize",ay="threshold",h0="ordinal",d0="point",ly="band",p0="bin-ordinal",at="continuous",tl="discrete",nl="discretizing",un="interpolating",uy="temporal";function NI(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 LI(e){return function(t){const n=e.range();let r=t[0],i=t[1],o=-1,s,a,u,l;for(i<r&&(a=r,r=i,i=a),u=0,l=n.length;u<l;++u)n[u]>=r&&n[u]<=i&&(o<0&&(o=u),s=u);if(!(o<0))return r=e.invertExtent(n[o]),i=e.invertExtent(n[s]),[r[0]===void 0?r[1]:r[0],i[1]===void 0?i[0]:i[1]]}}function g0(){const e=Md().unknown(void 0),t=e.domain,n=e.range;let r=[0,1],i,o,s=!1,a=0,u=0,l=.5;delete e.unknown;function c(){const f=t().length,h=r[1]<r[0],d=r[1-h],p=c0(f,a,u);let m=r[h-0];i=(d-m)/(p||1),s&&(i=Math.floor(i)),m+=(d-m-i*(f-a))*l,o=i*(1-a),s&&(m=Math.round(m),o=Math.round(o));const y=Aa(f).map(w=>m+i*w);return n(h?y.reverse():y)}return e.domain=function(f){return arguments.length?(t(f),c()):t()},e.range=function(f){return arguments.length?(r=[+f[0],+f[1]],c()):r.slice()},e.rangeRound=function(f){return r=[+f[0],+f[1]],s=!0,c()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(f){return arguments.length?(s=!!f,c()):s},e.padding=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),a=u,c()):a},e.paddingInner=function(f){return arguments.length?(a=Math.max(0,Math.min(1,f)),c()):a},e.paddingOuter=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),c()):u},e.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),c()):l},e.invertRange=function(f){if(f[0]==null||f[1]==null)return;const h=r[1]<r[0],d=h?n().reverse():n(),p=d.length-1;let m=+f[0],y=+f[1],w,A,_;if(!(m!==m||y!==y)&&(y<m&&(_=m,m=y,y=_),!(y<d[0]||m>r[1-h])))return w=Math.max(0,Ur(d,m)-1),A=m===y?w:Ur(d,y)-1,m-d[w]>o+1e-10&&++w,h&&(_=w,w=p-A,A=p-_),w>A?void 0:t().slice(w,A+1)},e.invert=function(f){const h=e.invertRange([f,f]);return h&&h[0]},e.copy=function(){return g0().domain(t()).range(r).round(s).paddingInner(a).paddingOuter(u).align(l)},c()}function cy(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return cy(t())},e}function OI(){return cy(g0().paddingInner(1))}var zI=Array.prototype.map;function UI(e){return zI.call(e,fa)}const GI=Array.prototype.slice;function fy(){let e=[],t=[];function n(r){return r==null||r!==r?void 0:t[(Ur(e,r)-1)%t.length]}return n.domain=function(r){return arguments.length?(e=UI(r),n):e.slice()},n.range=function(r){return arguments.length?(t=GI.call(r),n):t.slice()},n.tickFormat=function(r,i){return z2(e[0],Cn(e),r??10,i)},n.copy=function(){return fy().domain(n.domain()).range(n.range())},n}const $c=new Map,HI=Symbol("vega_scale");function VI(e){return e[HI]=!0,e}function $I(e,t,n){const r=function(){const o=t();return o.invertRange||(o.invertRange=o.invert?NI(o):o.invertExtent?LI(o):void 0),o.type=e,VI(o)};return r.metadata=$u(xh(n)),r}function ke(e,t,n){return arguments.length>1?($c.set(e,$I(e,t,n)),this):jI(e)?$c.get(e):void 0}ke(PI,G2),ke(ss,U2,at),ke(ei,n0,[at,ei]),ke(Ja,o0,at),ke(el,yI,at),ke(Vc,Z2,at),ke(iy,xI,[at,uy]),ke(oy,AI,[at,uy]),ke(Zn,a0,[at,un]),ke(`${Zn}-${ss}`,a0,[at,un]),ke(`${Zn}-${ei}`,J2,[at,un,ei]),ke(`${Zn}-${Ja}`,l0,[at,un]),ke(`${Zn}-${el}`,EI,[at,un]),ke(`${Zn}-${Vc}`,ey,[at,un]),ke(`${as}-${ss}`,ty,[at,un]),ke(`${as}-${ei}`,ny,[at,un,ei]),ke(`${as}-${Ja}`,u0,[at,un]),ke(`${as}-${el}`,SI,[at,un]),ke(`${as}-${Vc}`,ry,[at,un]),ke(f0,Q2,[nl,f0]),ke(sy,X2,nl),ke(ay,K2,nl),ke(p0,fy,[tl,nl]),ke(h0,Md,tl),ke(ly,g0,tl),ke(d0,OI,tl);function jI(e){return $c.has(e)}function rl(e,t){const n=$c.get(e);return n&&n.metadata[t]}function wt(e){return rl(e,at)}function ti(e){return rl(e,tl)}function eo(e){return rl(e,nl)}function hy(e){return rl(e,ei)}function jc(e){return rl(e,un)}function qI(e,t){const n=t[0],r=Cn(t)-n;return function(i){return e(n+i*r)}}function qc(e,t,n){return Kd(dy(t||"rgb",n),e)}function WI(e,t){const n=new Array(t),r=t+1;for(let i=0;i<t;)n[i]=e(++i/r);return n}function dy(e,t){const n=sI[ZI(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function ZI(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const YI={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"},QI={accent:CI,category10:_I,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:TI,observable10:kI,paired:II,pastel1:BI,pastel2:DI,set1:FI,set2:RI,set3:MI,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function py(e){if(yt(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 gy(e,t){for(const n in e)m0(n,t(e[n]))}const my={};gy(QI,py),gy(YI,e=>qc(py(e)));function m0(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(my[e]=t,this):my[e]}function Fe(e,t=e){if(/^[A-Za-z0-9_]+$/.test(e)){const n=function(i){e in i||XI(i,e)},r=new Function("validator",`
|
|
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",`
|
|
252
252
|
let validated = !validator;
|
|
253
253
|
return function accessField(datum) {
|
|
254
254
|
if (!validated) {
|
|
@@ -256,64 +256,64 @@ if(uPickingEnabled){fragColor=vPickingColor;}}`,xk=`layout(std140)uniform Mark{u
|
|
|
256
256
|
validated = true;
|
|
257
257
|
}
|
|
258
258
|
return datum[${JSON.stringify(e)}];
|
|
259
|
-
}`)(n);return Pe(r,[e],t)}else return zu(e)}function XI(e,t){throw new Error(`Invalid field "${t}". Available fields or properties: ${Object.keys(e).join(", ")}`)}const KI="RawCode",JI="Literal",eB="Property",tB="Identifier",nB="ArrayExpression",rB="BinaryExpression",iB="CallExpression",oB="ConditionalExpression",sB="LogicalExpression",aB="MemberExpression",lB="ObjectExpression",uB="UnaryExpression";function Dn(e){this.type=e}Dn.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=cB(this),n=0,r=t.length;n<r;++n)if(t[n].visit(e))return 1};function cB(e){switch(e.type){case nB:return e.elements;case rB:case sB:return[e.left,e.right];case iB:return[e.callee].concat(e.arguments);case oB:return[e.test,e.consequent,e.alternate];case aB:return[e.object,e.property];case lB:return e.properties;case eB:return[e.key,e.value];case uB:return[e.argument];case tB:case JI:case KI:default:return[]}}var Yn,ee,H,Ct,Re,Wc=1,il=2,to=3,ni=4,Zc=5,no=6,Gt=7,ol=8,fB=9;Yn={},Yn[Wc]="Boolean",Yn[il]="<end>",Yn[to]="Identifier",Yn[ni]="Keyword",Yn[Zc]="Null",Yn[no]="Numeric",Yn[Gt]="Punctuator",Yn[ol]="String",Yn[fB]="RegularExpression";var hB="ArrayExpression",dB="BinaryExpression",pB="CallExpression",gB="ConditionalExpression",by="Identifier",mB="Literal",bB="LogicalExpression",yB="MemberExpression",wB="ObjectExpression",vB="Property",xB="UnaryExpression",pt="Unexpected token %0",AB="Unexpected number",EB="Unexpected string",SB="Unexpected identifier",_B="Unexpected reserved word",CB="Unexpected end of input",b0="Invalid regular expression",y0="Invalid regular expression: missing /",yy="Octal literals are not allowed in strict mode.",TB="Duplicate data property in object literal not allowed in strict mode",vt="ILLEGAL",sl="Disabled.",kB=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-\\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10C5\\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]"),IB=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\\u09B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B8-\\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 Yc(e,t){if(!e)throw new Error("ASSERT: "+t)}function vr(e){return e>=48&&e<=57}function w0(e){return"0123456789abcdefABCDEF".includes(e)}function al(e){return"01234567".includes(e)}function BB(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 ll(e){return e===10||e===13||e===8232||e===8233}function ul(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&kB.test(String.fromCharCode(e))}function Qc(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&IB.test(String.fromCharCode(e))}const DB={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 wy(){for(;H<Ct;){const e=ee.charCodeAt(H);if(BB(e)||ll(e))++H;else break}}function v0(e){var t,n,r,i=0;for(n=e==="u"?4:2,t=0;t<n;++t)H<Ct&&w0(ee[H])?(r=ee[H++],i=i*16+"0123456789abcdef".indexOf(r.toLowerCase())):Ae({},pt,vt);return String.fromCharCode(i)}function FB(){var e,t,n,r;for(e=ee[H],t=0,e==="}"&&Ae({},pt,vt);H<Ct&&(e=ee[H++],!!w0(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&Ae({},pt,vt),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function vy(){var e,t;for(e=ee.charCodeAt(H++),t=String.fromCharCode(e),e===92&&(ee.charCodeAt(H)!==117&&Ae({},pt,vt),++H,e=v0("u"),(!e||e==="\\"||!ul(e.charCodeAt(0)))&&Ae({},pt,vt),t=e);H<Ct&&(e=ee.charCodeAt(H),!!Qc(e));)++H,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),ee.charCodeAt(H)!==117&&Ae({},pt,vt),++H,e=v0("u"),(!e||e==="\\"||!Qc(e.charCodeAt(0)))&&Ae({},pt,vt),t+=e);return t}function RB(){var e,t;for(e=H++;H<Ct;){if(t=ee.charCodeAt(H),t===92)return H=e,vy();if(Qc(t))++H;else break}return ee.slice(e,H)}function MB(){var e,t,n;return e=H,t=ee.charCodeAt(H)===92?vy():RB(),t.length===1?n=to:DB.hasOwnProperty(t)?n=ni:t==="null"?n=Zc:t==="true"||t==="false"?n=Wc:n=to,{type:n,value:t,start:e,end:H}}function x0(){var e=H,t=ee.charCodeAt(H),n,r=ee[H],i,o,s;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++H,{type:Gt,value:String.fromCharCode(t),start:e,end:H};default:if(n=ee.charCodeAt(H+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 H+=2,{type:Gt,value:String.fromCharCode(t)+String.fromCharCode(n),start:e,end:H};case 33:case 61:return H+=2,ee.charCodeAt(H)===61&&++H,{type:Gt,value:ee.slice(e,H),start:e,end:H}}}if(s=ee.substr(H,4),s===">>>=")return H+=4,{type:Gt,value:s,start:e,end:H};if(o=s.substr(0,3),o===">>>"||o==="<<="||o===">>=")return H+=3,{type:Gt,value:o,start:e,end:H};if(i=o.substr(0,2),r===i[1]&&"+-<>&|".includes(r)||i==="=>")return H+=2,{type:Gt,value:i,start:e,end:H};if(i==="//"&&Ae({},pt,vt),"<>=!+-*%&|^/".includes(r))return++H,{type:Gt,value:r,start:e,end:H};Ae({},pt,vt)}function PB(e){let t="";for(;H<Ct&&w0(ee[H]);)t+=ee[H++];return t.length===0&&Ae({},pt,vt),ul(ee.charCodeAt(H))&&Ae({},pt,vt),{type:no,value:parseInt("0x"+t,16),start:e,end:H}}function NB(e){let t="0"+ee[H++];for(;H<Ct&&al(ee[H]);)t+=ee[H++];return(ul(ee.charCodeAt(H))||vr(ee.charCodeAt(H)))&&Ae({},pt,vt),{type:no,value:parseInt(t,8),octal:!0,start:e,end:H}}function xy(){var e,t,n;if(n=ee[H],Yc(vr(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=H,e="",n!=="."){if(e=ee[H++],n=ee[H],e==="0"){if(n==="x"||n==="X")return++H,PB(t);if(al(n))return NB(t);n&&vr(n.charCodeAt(0))&&Ae({},pt,vt)}for(;vr(ee.charCodeAt(H));)e+=ee[H++];n=ee[H]}if(n==="."){for(e+=ee[H++];vr(ee.charCodeAt(H));)e+=ee[H++];n=ee[H]}if(n==="e"||n==="E")if(e+=ee[H++],n=ee[H],(n==="+"||n==="-")&&(e+=ee[H++]),vr(ee.charCodeAt(H)))for(;vr(ee.charCodeAt(H));)e+=ee[H++];else Ae({},pt,vt);return ul(ee.charCodeAt(H))&&Ae({},pt,vt),{type:no,value:parseFloat(e),start:t,end:H}}function LB(){var e="",t,n,r,i,o=!1;for(t=ee[H],Yc(t==="'"||t==='"',"String literal must starts with a quote"),n=H,++H;H<Ct;)if(r=ee[H++],r===t){t="";break}else if(r==="\\")if(r=ee[H++],!r||!ll(r.charCodeAt(0)))switch(r){case"u":case"x":ee[H]==="{"?(++H,e+=FB()):e+=v0(r);break;case"n":e+=`
|
|
260
|
-
`;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:
|
|
261
|
-
`&&++H;else{if(ll(r.charCodeAt(0)))break;e+=r}return t!==""&&Ae({},pt,vt),{type:ol,value:e,octal:o,start:n,end:H}}function OB(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";Ae({},b0)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{Ae({},b0)}try{return new RegExp(e,t)}catch{return null}}function zB(){var e,t,n,r,i;for(e=ee[H],Yc(e==="/","Regular expression literal must start with a slash"),t=ee[H++],n=!1,r=!1;H<Ct;)if(e=ee[H++],t+=e,e==="\\")e=ee[H++],ll(e.charCodeAt(0))&&Ae({},y0),t+=e;else if(ll(e.charCodeAt(0)))Ae({},y0);else if(n)e==="]"&&(n=!1);else if(e==="/"){r=!0;break}else e==="["&&(n=!0);return r||Ae({},y0),i=t.substr(1,t.length-2),{value:i,literal:t}}function UB(){var e,t,n;for(t="",n="";H<Ct&&(e=ee[H],!!Qc(e.charCodeAt(0)));)++H,e==="\\"&&H<Ct?Ae({},pt,vt):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&Ae({},b0,n),{value:n,literal:t}}function GB(){var e,t,n,r;return Re=null,wy(),e=H,t=zB(),n=UB(),r=OB(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:H}}function HB(e){return e.type===to||e.type===ni||e.type===Wc||e.type===Zc}function Ay(){if(wy(),H>=Ct)return{type:il,start:H,end:H};const e=ee.charCodeAt(H);return ul(e)?MB():e===40||e===41||e===59?x0():e===39||e===34?LB():e===46?vr(ee.charCodeAt(H+1))?xy():x0():vr(e)?xy():x0()}function Ht(){const e=Re;return H=e.end,Re=Ay(),H=e.end,e}function Ey(){const e=H;Re=Ay(),H=e}function VB(e){const t=new Dn(hB);return t.elements=e,t}function Sy(e,t,n){const r=new Dn(e==="||"||e==="&&"?bB:dB);return r.operator=e,r.left=t,r.right=n,r}function $B(e,t){const n=new Dn(pB);return n.callee=e,n.arguments=t,n}function jB(e,t,n){const r=new Dn(gB);return r.test=e,r.consequent=t,r.alternate=n,r}function A0(e){const t=new Dn(by);return t.name=e,t}function cl(e){const t=new Dn(mB);return t.value=e.value,t.raw=ee.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function _y(e,t,n){const r=new Dn(yB);return r.computed=e==="[",r.object=t,r.property=n,r.computed||(n.member=!0),r}function qB(e){const t=new Dn(wB);return t.properties=e,t}function Cy(e,t,n){const r=new Dn(vB);return r.key=t,r.value=n,r.kind=e,r}function WB(e,t){const n=new Dn(xB);return n.operator=e,n.argument=t,n.prefix=!0,n}function Ae(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(o,s)=>(Yc(s<r.length,"Message reference must be in range"),r[s]));throw n=new Error(i),n.index=H,n.description=i,n}function Xc(e){e.type===il&&Ae(e,CB),e.type===no&&Ae(e,AB),e.type===ol&&Ae(e,EB),e.type===to&&Ae(e,SB),e.type===ni&&Ae(e,_B),Ae(e,pt,e.value)}function Tt(e){const t=Ht();(t.type!==Gt||t.value!==e)&&Xc(t)}function We(e){return Re.type===Gt&&Re.value===e}function E0(e){return Re.type===ni&&Re.value===e}function ZB(){const e=[];for(H=Re.start,Tt("[");!We("]");)We(",")?(Ht(),e.push(null)):(e.push(ro()),We("]")||Tt(","));return Ht(),VB(e)}function Ty(){H=Re.start;const e=Ht();return e.type===ol||e.type===no?(e.octal&&Ae(e,yy),cl(e)):A0(e.value)}function YB(){var e,t,n,r;if(H=Re.start,e=Re,e.type===to)return n=Ty(),Tt(":"),r=ro(),Cy("init",n,r);if(e.type===il||e.type===Gt)Xc(e);else return t=Ty(),Tt(":"),r=ro(),Cy("init",t,r)}function QB(){var e=[],t,n,r,i={},o=String;for(H=Re.start,Tt("{");!We("}");)t=YB(),t.key.type===by?n=t.key.name:n=o(t.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(i,r)?Ae({},TB):i[r]=!0,e.push(t),We("}")||Tt(",");return Tt("}"),qB(e)}function XB(){Tt("(");const e=S0();return Tt(")"),e}const KB={if:1};function JB(){var e,t,n;if(We("("))return XB();if(We("["))return ZB();if(We("{"))return QB();if(e=Re.type,H=Re.start,e===to||KB[Re.value])n=A0(Ht().value);else if(e===ol||e===no)Re.octal&&Ae(Re,yy),n=cl(Ht());else{if(e===ni)throw new Error(sl);e===Wc?(t=Ht(),t.value=t.value==="true",n=cl(t)):e===Zc?(t=Ht(),t.value=null,n=cl(t)):We("/")||We("/=")?(n=cl(GB()),Ey()):Xc(Ht())}return n}function eD(){const e=[];if(Tt("("),!We(")"))for(;H<Ct&&(e.push(ro()),!We(")"));)Tt(",");return Tt(")"),e}function tD(){H=Re.start;const e=Ht();return HB(e)||Xc(e),A0(e.value)}function nD(){return Tt("."),tD()}function rD(){Tt("[");const e=S0();return Tt("]"),e}function iD(){var e,t,n;for(e=JB();;)if(We("."))n=nD(),e=_y(".",e,n);else if(We("("))t=eD(),e=$B(e,t);else if(We("["))n=rD(),e=_y("[",e,n);else break;return e}function ky(){const e=iD();if(Re.type===Gt&&(We("++")||We("--")))throw new Error(sl);return e}function Kc(){var e,t;if(Re.type!==Gt&&Re.type!==ni)t=ky();else{if(We("++")||We("--"))throw new Error(sl);if(We("+")||We("-")||We("~")||We("!"))e=Ht(),t=Kc(),t=WB(e.value,t);else{if(E0("delete")||E0("void")||E0("typeof"))throw new Error(sl);t=ky()}}return t}function Iy(e){let t=0;if(e.type!==Gt&&e.type!==ni)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 oD(){var e,t,n,r,i,o,s,a,u,l;if(e=Re,u=Kc(),r=Re,i=Iy(r),i===0)return u;for(r.prec=i,Ht(),t=[e,Re],s=Kc(),o=[u,r,s];(i=Iy(Re))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)s=o.pop(),a=o.pop().value,u=o.pop(),t.pop(),n=Sy(a,u,s),o.push(n);r=Ht(),r.prec=i,o.push(r),t.push(Re),n=Kc(),o.push(n)}for(l=o.length-1,n=o[l],t.pop();l>1;)t.pop(),n=Sy(o[l-1].value,o[l-2],n),l-=2;return n}function ro(){var e,t,n;return e=oD(),We("?")&&(Ht(),t=ro(),Tt(":"),n=ro(),e=jB(e,t,n)),e}function S0(){const e=ro();if(We(","))throw new Error(sl);return e}function sD(e){ee=e,H=0,Ct=ee.length,Re=null,Ey();const t=S0();if(Re.type!==il)throw new Error("Unexpect token after expression.");return t}var aD={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 By(e){function t(s,a,u,l){let c=e(a[0]);return u&&(c=u+"("+c+")",u.lastIndexOf("new ",0)===0&&(c="("+c+")")),c+"."+s+(l<0?"":l===0?"()":"("+a.slice(1).map(e).join(",")+")")}function n(s,a,u){return l=>t(s,l,a,u)}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(s){s.length<3&&ot("Missing arguments to clamp function."),s.length>3&&ot("Too many arguments to clamp function.");const a=s.map(e);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",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(s){s.length<3&&ot("Missing arguments to if function."),s.length>3&&ot("Too many arguments to if function.");const a=s.map(e);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function lD(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function uD(e){e=e||{};const t=e.allowed?$u(e.allowed):{},n=e.forbidden?$u(e.forbidden):{},r=e.constants||aD,i=(e.functions||By)(f),o=e.globalvar,s=e.fieldvar,a=sn(o)?o:p=>`${o}["${p}"]`;let u={},l={},c=0;function f(p){if(Ge(p))return p;const m=h[p.type];return m==null&&ot("Unsupported type: "+p.type),m(p)}const h={Literal:p=>p.raw,Identifier:p=>{const m=p.name;return c>0?m:Uo(n,m)?ot("Illegal identifier: "+m):Uo(r,m)?r[m]:Uo(t,m)?m:(u[m]=1,a(m))},MemberExpression:p=>{const m=!p.computed,y=f(p.object);m&&(c+=1);const w=f(p.property);return y===s&&(l[lD(w)]=1),m&&(c-=1),y+(m?"."+w:"["+w+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&ot("Illegal callee type: "+p.callee.type);const m=p.callee.name,y=p.arguments,w=Uo(i,m)&&i[m];return w||ot("Unrecognized function: "+m),sn(w)?w(y):w+"("+y.map(f).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(f).join(",")+"]",BinaryExpression:p=>"("+f(p.left)+" "+p.operator+" "+f(p.right)+")",UnaryExpression:p=>"("+p.operator+f(p.argument)+")",ConditionalExpression:p=>"("+f(p.test)+"?"+f(p.consequent)+":"+f(p.alternate)+")",LogicalExpression:p=>"("+f(p.left)+p.operator+f(p.right)+")",ObjectExpression:p=>"{"+p.properties.map(f).join(",")+"}",Property:p=>{c+=1;const m=f(p.key);return c-=1,m+":"+f(p.value)}};function d(p){const m={code:f(p),globals:Object.keys(u),fields:Object.keys(l)};return u={},l={},m}return d.functions=i,d.constants=r,d}function Dy(e,t,n){return n=(n-e)/(t-e),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function ls(e,t=0,n=1){return Math.max(t,Math.min(n,e))}function cD(e,t,n){return ls((n-e)/(t-e),0,1)}const Qn=1,ri=2,_0=4;class C0{constructor(t){J(this,Io);Bt(this,"stats",{count:0,first:null});Bt(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),Q(this,Io,Nu).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,Q(n=this.parent,Io,Nu).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,Q(this,Io,Nu).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,Q(t=this.parent,Io,Nu).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(t){this._propagate(t)}complete(){this.completed=!0;for(const t of this.children)t.complete()}beginBatch(t){for(const n of this.children)n.beginBatch(t)}get paramMediator(){if(this.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(t){}}
|
|
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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0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function 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":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:ys(r)?(i="01234567".indexOf(r),i!==0&&(o=!0),ie<zt&&ys(Ae[ie])&&(o=!0,i=i*8+"01234567".indexOf(Ae[ie++]),"0123".includes(r)&&ie<zt&&ys(Ae[ie])&&(i=i*8+"01234567".indexOf(Ae[ie++]))),e+=String.fromCharCode(i)):e+=r;break}else r==="\r"&&Ae[ie]===`
|
|
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(t){this._propagate(t)}complete(){this.completed=!0;for(const t of this.children)t.complete()}beginBatch(t){for(const n of this.children)n.beginBatch(t)}get paramMediator(){if(this.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(t){}}Yi=new WeakSet,Rc=function(){this._propagate=Function("children","stats",Fa(this.children.length).map(t=>`const child${t} = children[${t}];`).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
|
+
${Fa(this.children.length).map(t=>`child${t}.handle(datum);`).join(`
|
|
269
269
|
`)}
|
|
270
|
-
};`)(this.children,this.stats)};function
|
|
270
|
+
};`)(this.children,this.stats)};function qb(e){return e.type=="file"}function ZT(e){return e.type=="facet"}class vt extends rd{constructor(n,r){super(r);ve(this,hc);Pe(this,hc,n.type)}get label(){return X(this,hc)}}hc=new WeakMap;const bn="_uniqueId",jb=1e4,Wb=[null];class id extends vt{get behavior(){return Vr}constructor(t){super(t),this.params=t,this.as=t.as??bn,this._blocks=[],this._usedBlocks=0,this._id=-1}initialize(){}reset(){super.reset(),this._usedBlocks=0,this._id=-1}handle(t){t[this.as]=this._nextId(),this._propagate(t)}_nextId(){return++this._id%jb==0&&(this._id=this._getBlock()*jb),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const t=Wb.length;return Wb[t]=this,this._blocks.push(t),this._usedBlocks++,t}}function Zb(e){return{type:"single",datum:e,uniqueId:e==null?void 0:e[bn]}}function Yb(e){return e??(e=[]),{type:"multi",data:new Map(e.map(t=>[t[bn],t]))}}function YT(e,{add:t,remove:n,toggle:r}){const i=e.data;for(const o of t??[])i.set(o[bn],o);for(const o of n??[])i.delete(o[bn]);for(const o of r??[]){const a=o[bn];i.has(a)?i.delete(a):i.set(a,o)}return{type:"multi",data:i}}function QT(e,t,n=!0){if(!e||!t)return!1;if(Xb(e))return e.uniqueId==null?n:e.uniqueId===t[bn];if(od(e))return e.data.size==0?n:e.data.has(t[bn]);throw new Error("Not a selection: "+JSON.stringify(e))}function Qb(e){return`selectionTest(${Xl(e.param)}, datum, ${!!(e.empty??!0)})`}function Xb(e){return e.type==="single"}function od(e){return e.type==="multi"}function Kb(e){const t=typeof e=="string"?{type:e}:e;return ad(t)&&(t.on??(t.on="click"),t.on==="click"&&(t.toggle=!0)),t}function ad(e){return e&&e.type=="point"}const Jb={clamp:Io,isArray:Bt,isBoolean:Aa,isDefined(e){return e!==void 0},isNumber:jt,isObject:Lt,isRegExp:g3,isString:it,isValid(e){return e!=null&&e===e},lerp:Vp,linearstep:WT,replace(e,t,n){return String(e).replace(t,n)},smoothstep:Vb,selectionTest:QT};function XT(e){const t=Hb(e);for(const n in Jb)t[n]=`this.${n}`;return t}const KT=jT({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:XT});function JT(e,t={}){try{const n=HT(e),r=KT(n),i=Function("datum","globalObject",`"use strict";
|
|
271
271
|
try {
|
|
272
272
|
return (${r.code});
|
|
273
273
|
} catch (e) {
|
|
274
274
|
throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
|
|
275
|
-
}`).bind(
|
|
275
|
+
}`).bind(Jb),o=a=>i(a,t);return o.fields=r.fields,o.globals=r.globals,o.code=r.code,o}catch(n){throw new Error(`Invalid expression: ${e}, ${n.message}`)}}class $T{constructor(t){ve(this,ti);qt(this,"paramListeners");ve(this,Qi,new Map);ve(this,ra,new Map);ve(this,ia,new Map);ve(this,dc);Pe(this,dc,t??(()=>{})),Pe(this,ti,new Map),this.paramListeners=new Map}registerParam(t){const n=t.name;if("value"in t&&"expr"in t)throw new Error(`The parameter "${n}" must not have both value and expr properties!`);let r;if(t.push=="outer"){const i=this.findMediatorForParam(n);if(!i)throw new Error(`Parameter "${n}" not found in outer scope!`);const o=i.paramConfigs.get(n);if("expr"in o||"select"in o)throw new Error(`The outer parameter "${n}" must not have expr or select properties!`);r=i.getSetter(n),X(this,Qi).set(n,r)}else if("value"in t)r=this.allocateSetter(n,t.value);else if("expr"in t){const i=this.createExpression(t.expr),o=this.allocateSetter(n,i(null));i.addListener(()=>o(i(null))),r=a=>{}}else r=this.allocateSetter(n,null);if("select"in t){const i=Kb(t.select);ad(i)&&r(i.toggle?Yb():Zb(null))}return X(this,ia).set(n,t),r}allocateSetter(t,n,r=!1){if(Xl(t),X(this,Qi).has(t))throw new Error("Setter already allocated for parameter: "+t);const i=o=>{const a=X(this,ti).get(t);if(o!==a){X(this,ti).set(t,o);const s=this.paramListeners.get(t);if(s&&!r)for(const c of s)c()}};return i(n),X(this,Qi).set(t,i),i}getSetter(t){const n=X(this,Qi).get(t);if(!n)throw new Error("Setter not found for parameter: "+t);return n}getValue(t){return X(this,ti).get(t)}findValue(t){const n=this.findMediatorForParam(t);return n==null?void 0:n.getValue(t)}get paramConfigs(){return X(this,ia)}findMediatorForParam(t){var n;return X(this,ti).has(t)?this:(n=X(this,dc).call(this))==null?void 0:n.findMediatorForParam(t)}createExpression(t){if(X(this,ra).has(t))return X(this,ra).get(t);const n={},r=JT(t,n),i=new Map;for(const a of r.globals){const s=this.findMediatorForParam(a);if(!s)throw new Error(`Unknown variable "${a}" in expression: ${t}`);i.set(a,s),Object.defineProperty(n,a,{enumerable:!0,get(){return s.getValue(a)}})}const o=new Set;return r.addListener=a=>{for(const[s,c]of i){const l=c.paramListeners.get(s)??new Set;c.paramListeners.set(s,l),l.add(a),o.add(a)}},r.invalidate=()=>{var a;for(const[s,c]of i)for(const l of o)(a=c.paramListeners.get(s))==null||a.delete(l)},r.identifier=()=>r.code,X(this,ra).set(t,r),r}evaluateAndGet(t){return this.createExpression(t)()}hasPointSelections(){for(const t of X(this,ia).values())if(tI(t)){const n=t.select;if(it(n)){if(n=="point")return!0}else if(n.type=="point")return!0}return!1}}ti=new WeakMap,Qi=new WeakMap,ra=new WeakMap,ia=new WeakMap,dc=new WeakMap;function Yt(e){return typeof e=="object"&&e!=null&&"expr"in e&&it(e.expr)}function rn(e){if(Yt(e))throw new Error(`ExprRef ${JSON.stringify(e)} not allowed here. Expected a scalar value.`);return e}function eI(e){return("expr"in e||"bind"in e)&&!("select"in e)}function tI(e){return!("expr"in e||"bind"in e)&&"select"in e}function Ql(e,t,n){const r={...t},i=[],o=a=>{i.push(a),i.length===1&&queueMicrotask(()=>{n(i.slice()),i.length=0})};for(const[a,s]of Object.entries(t))if(Yt(s)){const c=e.createExpression(s.expr);n&&c.addListener(()=>o(a)),Object.defineProperty(r,a,{enumerable:!0,get(){return c()}})}else r[a]=s;return r}function Xl(e){if(!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e))throw new Error(`Invalid parameter name: ${e}. Must be a valid JavaScript identifier.`);return e}function nI(e){return Object.assign(()=>e,{addListener:()=>{},invalidate:()=>{},identifier:()=>"constant",fields:[],globals:[],code:JSON.stringify(e)})}function $b(e,t,n){if(!e)return;function r(o){const a=o;return a.fields??(a.fields=[]),a.constant=a.fields.length===0,a.channelDef=t,a.channel=e,a.scaleChannel=((on(t)&&t.resolutionChannel)??(_s(e)&&e))||void 0,"param"in t?(a.predicate=n.createExpression(Qb(t)),a.predicate.param=t.param,a.predicate.empty=t.empty??!0):(a.predicate=nI(!0),a.predicate.empty=!1),a.asNumberAccessor=()=>a,a}function i(o){if(Yt(o)){const a=r(n.createExpression(o.expr));if(a.fields.length>0)throw new Error("Expression in DatumDef/ValueDef cannot access data fields: "+o.expr);return a}else{const a=o;return r(()=>a)}}if(qr(t))try{return r(Ke(t.field))}catch(o){throw new Error(`Invalid field definition: ${o.message}`)}else{if(Es(t))return r(n.createExpression(t.expr));if(As(t))return i(t.datum);if(yn(t))return i(t.value);throw new Error(`Invalid channel definition: "${e}": ${JSON.stringify(t)}! The channel definition must contain one of the following properties: "field", "datum", "value" or "expr".`)}}function rI(e,t,n){const r=[];if(sI(t)||cI(t)){const i=Array.isArray(t.condition)?t.condition:[t.condition];for(const o of i)r.push($b(e,o,n))}if(r.push($b(e,t,n)),r.filter(i=>!i.constant).length>1)throw new Error("Only one accessor can be non-constant. Channel: "+e);return r}function iI(e,t){const n={},r=i=>{var o;return(o=e.getScaleResolution(i))==null?void 0:o.scale};for(const[i,o]of Object.entries(t))o&&(n[i]=oI(rI(i,o,e.paramMediator),r));return n}function oI(e,t){if(e.length===1)return e2(e[0],t);const n=e.map(o=>o.predicate),r=e.map(o=>e2(o,t));return Object.assign(o=>{for(let a=0;a<r.length;a++)if(n[a](o))return r[a](o)},{constant:!1,accessors:r.map(o=>o.accessors[0]),dataAccessor:r.map(o=>o.dataAccessor).find(o=>o),scale:r.map(o=>o.scale).find(o=>o),channelDef:e.at(-1).channelDef})}function e2(e,t){const{channel:n,scaleChannel:r,channelDef:i}=e,o=e.scaleChannel?t(r):void 0;if(r&&!o)throw new Error(`Missing scale! "${n}": ${JSON.stringify(i)}`);return Object.assign(o?a=>o(e(a)):a=>e(a),{scale:o,constant:e.constant,accessors:[e],dataAccessor:e.constant?void 0:e,channelDef:i})}function yn(e){return e&&"value"in e}function qr(e){return e&&"field"in e}function As(e){return e&&"datum"in e}function on(e){return qr(e)||As(e)||Es(e)||t2(e)}function aI(e,t){const n=e.mark.encoding[t];if(on(n))return n;throw new Error("Not a channel def with scale!")}function t2(e){return e&&"chrom"in e}function Es(e){return e&&"expr"in e}function sI(e){return(qr(e)||As(e))&&"condition"in e}function cI(e){return yn(e)&&"condition"in e}const Do=["x","y"],lI=["x2","y2"],uI=[...Do,...lI];function n2(e){return Do.includes(e)}function Ss(e){return uI.includes(e)}const r2={x:"x2",y:"y2"},i2=Object.fromEntries(Object.entries(r2).map(e=>[e[1],e[0]]));function sd(e){return e in i2}function fI(e){const t=r2[e];if(t)return t;throw new Error(`${e} has no secondary channel!`)}function Mi(e){return i2[e]??e}function jr(e){return["color","fill","stroke"].includes(Mi(e))}function Kl(e){return["shape"].includes(e)}function _s(e){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(e)}function hI(e){switch(e){case"shape":return["circle","square","cross","diamond","triangle-up","triangle-right","triangle-down","triangle-left","tick-up","tick-right","tick-down","tick-left"]}}function o2(e){if(!Kl(e))throw new Error("Not a discrete channel: "+e);const t=new Map(hI(e).map((n,r)=>[n,r]));return n=>{const r=t.get(n);if(r!==void 0)return r;throw new Error(`Invalid value for "${e}" channel: ${n}`)}}function cd(){const e=t=>t;return e.invert=t=>t,e.copy=cd,e.invertRange=()=>{},e.type="null",e}const Jl="attr_",dI="uDomain_",pI="range_",gI="accessor_",a2="scale_",mI="getScaled_",ld="uRangeTexture_",ud="uParam_",$l="checkSelection_",s2=3402823466e29;function bI(e){const t=e.match(/^(?:(\w+)-)?(\w+)$/);if(!t)throw new Error("Not a scale type: "+e);return{family:t[1]||"continuous",transform:t[2]}}function Cs(e,t){return`${gI}${e}_${t}`}function yI(e,t,n){let r;if(Kl(e))r=Pi(o2(e)(n));else if(it(n))if(jr(e))r=EI(n);else throw new Error(`String values are not supported on the "${e}" channel: ${n}`);else if(Aa(n))r=Pi(n?1:0);else if(n===null)if(jr(e))r=Pi([0,0,0]);else throw new Error(`null value is not supported on the "${e}" chanel.`);else r=Pi(n);const i=Cs(e,t),o=`
|
|
276
276
|
${r.type} ${i}() {
|
|
277
277
|
// Constant value
|
|
278
278
|
return ${r};
|
|
279
|
-
}`;return{channel:e,accessorGlsl:o,accessorFunctionName:i}}function
|
|
280
|
-
uniform ${n} ${i};`,
|
|
281
|
-
${n} ${
|
|
279
|
+
}`;return{channel:e,accessorGlsl:o,accessorFunctionName:i}}function wI(e,t){let n="float",r=c=>c;jr(e)&&(n="vec3",r=c=>h2(c));const i=`u${II(e)}_${t}`,o=` // Dynamic value
|
|
280
|
+
uniform ${n} ${i};`,a=Cs(e,t);let s=`
|
|
281
|
+
${n} ${a}() {
|
|
282
282
|
// Dynamic value
|
|
283
283
|
return ${i};
|
|
284
|
-
}`;return{channel:e,uniformName:i,uniformGlsl:o,accessorGlsl:
|
|
285
|
-
${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
286
|
return ${o};
|
|
287
|
-
}`;return{channel:e,attributeName:o,attributeGlsl:
|
|
288
|
-
${r} ${
|
|
287
|
+
}`;return{channel:e,attributeName:o,attributeGlsl:a,accessorGlsl:c,accessorFunctionName:s}}function xI(e,t,n){const{attributeType:r}=Ts(t,e),i=Jl+hd(e),o=` uniform highp ${r} ${i};`,a=Cs(e,n),s=`
|
|
288
|
+
${r} ${a}() {
|
|
289
289
|
return ${i};
|
|
290
|
-
}`;return{channel:e,uniformName:i,uniformGlsl:o,accessorGlsl:
|
|
291
|
-
${
|
|
292
|
-
${A.map(
|
|
290
|
+
}`;return{channel:e,uniformName:i,uniformGlsl:o,accessorGlsl:s,accessorFunctionName:a}}function vI(e,t,n){t??(t=cd());const r=Mi(e),i=dI+r,o=pI+r,{hp:a,attributeType:s}=Ts(t,e),c=t.domain?t.domain().length:void 0;let l;const u=[];u.push(""),u.push("/".repeat(70)),u.push(`// Channel: ${e}`),u.push("");const{transform:f}=bI(t.type),h=(D,...O)=>SI.apply(null,[D,"value",...O]);let d;switch(f){case"linear":d=h("scaleLinear","domain",o);break;case"log":d=h("scaleLog","domain",o,t.base());break;case"symlog":d=h("scaleSymlog","domain",o,t.constant());break;case"pow":case"sqrt":d=h("scalePow","domain",o,t.exponent());break;case"index":case"locus":d=h("scaleBandHp","domain",o,t.paddingInner(),t.paddingOuter(),t.align(),n.band??.5);break;case"point":case"band":d=h("scaleBand","domain",o,t.paddingInner(),t.paddingOuter(),t.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: ${t.type}! ${e}: ${JSON.stringify(n)}`)}const p=b2(t,e);let b;if(p&&e==r){const D=t.props.range??[];if(Yt(D)||D.some(Yt)){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)}`);b=` uniform ${u2(p.length)} ${o};`}else if(p.length&&p.every(jt)){const O=d2(p);u.push(`const ${O.type} ${o} = ${O};`)}}const v=f2(e);let y;if(jr(e)){const D=ld+r;if(e==r&&u.push(`uniform sampler2D ${D};`),Rt(t.type))y=`getInterpolatedColor(${D}, transformed)`;else if(Gr(t.type)||ki(t.type))y=`getDiscreteColor(${D}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(t.type==="ordinal"||ki(t.type)){const D=ld+r;e==r&&u.push(`uniform sampler2D ${D};`),y=`getDiscreteColor(${D}, int(transformed)).r`}const A=[],_=Rt(t.type)&&c>2,E=ki(t.type)||_;if(A.push("int slot = 0;"),E){const D=i;A.push(_?`while (slot < ${D}.length() - 2 && value >= ${D}[slot + 1]) { slot++; }`:`while (slot < ${D}.length() && value >= ${D}[slot]) { slot++; }`)}const C=Rt(t.type)||ki(t.type)||["band","point"].includes(t.type);if(d){const D=i;C&&(a?A.push(`vec3 domain = ${D};`):A.push(`vec2 domain = vec2(${D}[slot], ${D}[slot + 1]);`)),A.push(`float transformed = ${d};`),_&&A.push(`transformed = (float(slot) + transformed) / (float(${D}.length() - 1));`)}else A.push("float transformed = float(slot);");"clamp"in t&&t.clamp()&&A.push(`transformed = clampToRange(transformed, ${d2(p)});`),A.push(`return ${y??"transformed"};`),u.push(`
|
|
291
|
+
${v} ${a2}${e}(${s} value) {
|
|
292
|
+
${A.map(D=>` ${D}
|
|
293
293
|
`).join("")}
|
|
294
|
-
}`);const
|
|
295
|
-
`);if(
|
|
296
|
-
${
|
|
294
|
+
}`);const R=u.join(`
|
|
295
|
+
`);if(C&&e==r){const D=Rt(t.type)||ki(t.type)?c:2;l=a?` highp vec3 ${i};`:` mediump float ${i}[${D}];`}return{glsl:R,domainUniformName:i,domainUniform:l,rangeUniformName:o,rangeUniform:b}}function AI(e,t){const n=f2(e),r=[],i=[];for(let o=0;o<t.length;o++){const a=t[o],s=Cs(e,o),{param:c,empty:l}=a.predicate;r.push(c?`${$l}${c}(${!!l})`:null),i.push(a.scaleChannel?`return ${a2}${e}(${s}());`:`return ${s}();`)}return`${n} ${mI}${e}() {
|
|
296
|
+
${DI(r,i)}
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
#define ${e}_DEFINED`}function
|
|
299
|
+
#define ${e}_DEFINED`}function l2(e){if(!jt(e))throw new Error(`Not a number: ${e}`);if(e==1/0)return""+s2;if(e==-1/0)return""+-s2;{let t=`${e}`;return/^(-)?\d+$/.test(t)&&(t+=".0"),t}}function Pi(e){typeof e=="number"&&(e=[e]);const t=e.length;if(t<1||t>4)throw new Error("Invalid number of components: "+t);const n=u2(t),r=`${n}(${e.map(l2).join(", ")})`;return Object.assign(r,{type:n,numComponents:t})}function u2(e){switch(e){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error("Invalid number of components: "+e)}}function f2(e){return jr(e)?"vec3":e=="uniqueId"?"uint":"float"}function h2(e){const t=Nr(e).rgb();return[t.r,t.g,t.b].map(n=>n/255)}function EI(e){return Pi(h2(e))}function d2(e){return Pi([e[0],Xa(e)])}function SI(e,...t){const n=[];for(const r of t)jt(r)?n.push(l2(r)):Bt(r)?n.push(Pi(r)):n.push(r);return`${e}(${n.join(", ")})`}function Ts(e,t){var a;const n=e&&Gr(e.type),r=e&&p2(e.type),i=r&&_I(e.domain()),o=i?{attributeType:"uvec2",arrayConstructor:Uint32Array}:r?{attributeType:"uint",arrayConstructor:Uint32Array}:n?{attributeType:"uint",arrayConstructor:Uint16Array}:t=="uniqueId"?{attributeType:"uint",arrayConstructor:Uint32Array}:{attributeType:"float",arrayConstructor:Float32Array};return Object.assign(o,{numComponents:+(((a=o.attributeType.match(/^vec([234])$/))==null?void 0:a[1])??1),discrete:n,hp:r,largeHp:i})}function p2(e){return e=="index"||e=="locus"}function _I(e){return e[1]>2**32}const fd=2**12;function g2(e,t=[]){const n=e%fd,r=(e-n)/fd;return t[0]=r,t[1]=n,t}function CI(e){const t=e%fd;return[e-t,t]}function TI(e){return[...CI(e[0]),e[1]-e[0]]}function m2(e){const t=new tr([],JSON.stringify);for(const[n,r]of Object.entries(e)){const i=r.channelDef;if(qr(i)){const a=[i.field,r.scale?(Rt(r.scale.type)||ki(r.scale.type))??!1:!1];t.set(a,[...t.get(a)??[],n])}}return t}function hd(e){return Kt(e).join("_")}function II(e){return e[0].toUpperCase()+e.slice(1)}const b2=(e,t)=>Gl(e.type)||Rt(e.type)&&jr(t)?[0,1]:e.range?e.range():void 0;function DI(e,t){if(e.length!=t.length)throw new Error("Unequal array lengths");const n=e.length;if(n==0)return"";if(n==1&&e[0]==null)return t[0];const r=[];for(let i=0;i<n;i++){const o=e[i],a=i==0?`if (${o})`:o==null&&i==n-1?"else":`else if (${o})`;r.push(` ${a} {
|
|
300
300
|
${t[i]}
|
|
301
301
|
}`)}return r.join(`
|
|
302
|
-
`)}const
|
|
302
|
+
`)}const y2=1e4;class kI{constructor(t){ve(this,oa);ve(this,pc,!1);this.size=t,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}configure(){if(X(this,pc))throw new Error("Already configured!");he(this,oa,LA).call(this),he(this,oa,NA).call(this),Pe(this,pc,!0)}addConverter(t,n){const r=this.createUpdater(Jl+t,n.numComponents||1,n.targetArrayType??Float32Array,n.arrayReference),i=n.f;this.dataUpdaters.push(n.arrayReference?o=>r(i(o)):o=>r(i(o)))}createUpdater(t,n,r=Float32Array,i=void 0){if(!jt(this.size))throw new Error("The number of vertices must be defined!");let o,a,s=0;const c=new r(this.size*n);if(this.arrays[t]={data:c,numComponents:n},n==1){let l=0;const u=f=>{l=+f};o=()=>{c[s++]=l},a=u}else{let l=i??[0];const u=i?f=>{}:f=>{l=f};switch(n){case 1:break;case 2:o=()=>{c[s++]=l[0],c[s++]=l[1]},a=u;break;case 3:o=()=>{c[s++]=l[0],c[s++]=l[1],c[s++]=l[2]},a=u;break;case 4:o=()=>{c[s++]=l[0],c[s++]=l[1],c[s++]=l[2],c[s++]=l[3]},a=u;break;default:throw new Error("Invalid numComponents: "+n)}}return this.pushers.push(o),a}pushAll(){throw new Error("Call configure() first!")}updateFromDatum(t){throw new Error("Call configure() first!")}pushFromDatum(t){this.updateFromDatum(t),this.pushAll()}}pc=new WeakMap,oa=new WeakSet,LA=function(){if(this.size>y2){const t=this.pushers.map((r,i)=>`const p${i} = that.pushers[${i}];`).join(`
|
|
303
303
|
`),n=this.pushers.map((r,i)=>` p${i}();`).join(`
|
|
304
304
|
`);this.pushAll=new Function("that",`${t}
|
|
305
305
|
return function unrolledPushAll() {
|
|
306
306
|
${n}
|
|
307
307
|
that.vertexCount++;
|
|
308
|
-
};`)(this)}else this.pushAll=()=>{for(let t=0;t<this.pushers.length;t++)this.pushers[t]();this.vertexCount++}},
|
|
308
|
+
};`)(this)}else this.pushAll=()=>{for(let t=0;t<this.pushers.length;t++)this.pushers[t]();this.vertexCount++}},NA=function(){if(this.size>y2){const t=this.dataUpdaters.map((r,i)=>`const u${i} = that.dataUpdaters[${i}];`).join(`
|
|
309
309
|
`),n=this.dataUpdaters.map((r,i)=>` u${i}(datum);`).join(`
|
|
310
310
|
`);this.updateFromDatum=new Function("that","datum",`${t}
|
|
311
311
|
return function unrolledUpdateFromDatum(datum) {
|
|
312
312
|
${n}
|
|
313
|
-
};`)(this)}else this.updateFromDatum=t=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](t)}};const
|
|
313
|
+
};`)(this)}else this.updateFromDatum=t=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](t)}};const ko=5,dd=127;function pd(e){const t=[];for(let p=0;p<=dd;p++)t.push(void 0);const n=new Map;for(const p of e.chars)p.id<=dd?t[p.id]=p:n.set(p.id,p);const r=8722;n.has(r)||n.set(r,t[45]);function i(p){return(p<=dd?t[p]:n.get(p))||t[63]}function o(p){return i(p.charCodeAt(0))}const a=e.common.base,s=o("x"),c=o("X"),l=o("q"),u=s.height-ko*2,f=c.height-ko*2,h=l.height-s.height+l.yoffset-s.yoffset;function d(p,b=1){let v=0;for(let y=0;y<p.length;y++)v+=i(p.charCodeAt(y)).xadvance;return v/a*b}return{measureWidth:d,getCharByCode:i,getChar:o,xHeight:u,capHeight:f,descent:h,common:e.common}}const w2=2**31-1,BI=-(2**31);function RI(e,t,n,r=n){const i=new Array(e);i.fill(w2);let o=BI,a=-1/0,s=!1;const c=new Array(e);c.fill(0);const l=t[0],f=(t[1]-t[0])/e,h=(y,A)=>{const _=(y-l)/f,E=Math.floor(_);return Io(A&&E==_?E-1:E,0,e-1)};function d(y,A,_){if(s)return;if(A>o)o=A;else{s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}const E=n(y);if(E<a){s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}a=E;const C=h(E,!1);i[C]>A&&(i[C]=A),c[C]<_&&(c[C]=_)}function p(y,A,_){if(s)return;if(A>o)o=A;else{s=!0,console.debug("Items (vertices) are not ordered properly. Disabling binned index.");return}const E=n(y),C=r(y);if(E<a){s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}else if(C<E){s=!0,console.debug("End index is less than start index. Disabling binned index. Datum: ",y);return}a=E;const R=h(E,!1),D=h(C,!0);for(let O=R;O<=D;O++)i[O]>A&&(i[O]=A),c[O]<_&&(c[O]=_)}const b=(y,A,_=[0,0])=>{const E=h(y,!1),C=h(A,!0),R=i[E],D=Math.max(c[C],R);return _[0]=R,_[1]=D,_},v=()=>{if(s)return;for(let A=1;A<c.length;A++)c[A]<c[A-1]&&(c[A]=c[A-1]);let y=!0;for(let A=i.length-1;A>0;A--)y&&i[A]==w2?(i[A]=c[A],y=!1):i[A-1]>i[A]&&(i[A-1]=i[A]);return b};return d.getIndex=v,p.getIndex=v,n==r?d:p}function FI(){let e=0,t,n=0;const r=new Map,i=o=>(o===t||(n=r.get(o),n===void 0&&(n=e++,r.set(o,n)),t=o),n);return i.addAll=o=>{for(const a of o)i(a)},i.invert=o=>{for(const a of r.entries())if(a[1]==o)return a[0]},i.domain=()=>[...r.keys()],i}class Is{constructor({encoders:t,numVertices:n=void 0,attributes:r=[]}){this.encoders=t,this.variableEncoders=Object.fromEntries(Object.entries(t).filter(([o,a])=>r.includes(o)&&a&&!a.constant));const i=[...m2(t).entries()].filter(([o,a])=>o[1]&&a.length>1).map(([o,a])=>a);this.allocatedVertices=n,this.variableBuilder=new kI(n);for(const[o,a]of Object.entries(this.variableEncoders)){const s=a.dataAccessor;if(!s)continue;const c=i.find(_=>_.find(E=>E==o));if(c&&o!=c[0])continue;const l=s.asNumberAccessor(),u=a.scale,{largeHp:f,arrayConstructor:h,discrete:d,numComponents:p}=Ts(u,o),b=[0,0];let v;u&&d&&"domain"in u&&(v=FI(),v.addAll(u.domain()));const y=v?_=>v(s(_)):f?_=>g2(l(_),b):l,A=c?hd(c):o;this.variableBuilder.addConverter(A,{f:y,numComponents:p,arrayReference:f?b:void 0,targetArrayType:h})}this.lastOffset=0,this.rangeMap=new tr([],JSON.stringify)}registerBatch(t){var o;const n=this.lastOffset,r=this.variableBuilder.vertexCount,i=r-n;i&&this.rangeMap.set(t,{offset:n,count:i,xIndex:(o=this.xIndexer)==null?void 0:o.getIndex()}),this.lastOffset=r}addBatches(t){for(const[n,r]of t)this.addBatch(n,r)}addBatch(t,n,r=0,i=n.length){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const a=n[o];this.variableBuilder.pushFromDatum(a),this.addToXIndex(a)}this.registerBatch(t)}prepareXIndexer(t,n=0,r=n+t.length){var l;const i=()=>{this.addToXIndex=u=>{},this.xIndexer=void 0},o=(l=this.encoders.x)==null?void 0:l.channelDef;if(!("buildIndex"in o)||!o.buildIndex||!t.length||r-n<0){i();return}const a=u=>{var f;return u&&Rt((f=u.scale)==null?void 0:f.type)&&u},s=a(this.variableEncoders.x),c=a(this.variableEncoders.x2);if(s&&!s.constant&&(!c||!c.constant)){const u=s.dataAccessor.asNumberAccessor(),f=c?c.dataAccessor.asNumberAccessor():u,h=[u(t[n]),f(t[r-1])];if(h[1]>h[0]){this.xIndexer=RI(50,h,u,f);let d=this.variableBuilder.vertexCount;this.addToXIndex=p=>{let b=this.variableBuilder.vertexCount;this.xIndexer(p,d,b),d=b}}else i()}else i()}addToXIndex(t){}toArrays(){return{arrays:this.variableBuilder.arrays,vertexCount:this.variableBuilder.vertexCount,allocatedVertices:this.allocatedVertices,rangeMap:this.rangeMap}}}class MI extends Is{constructor({encoders:t,attributes:n,numItems:r}){super({encoders:t,attributes:n,numVertices:r*6}),this.variableBuilder.configure();const i=this.variableBuilder.pushAll;this.pushAllSixTimes=r>500?new Function("pushAll",`return function unrolledPushAllSixTimes() {
|
|
314
314
|
pushAll(); pushAll(); pushAll(); pushAll(); pushAll(); pushAll();
|
|
315
|
-
};`)(i):function(){i(),i(),i(),i(),i(),i()}}addBatch(t,n,r=0,i=n.length){if(!(i<=r)){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const
|
|
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
|
+
};`)(i):function(){i(),i(),i(),i(),i(),i()}}addBatch(t,n,r=0,i=n.length){if(!(i<=r)){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const a=n[o];this.variableBuilder.updateFromDatum(a),this.pushAllSixTimes(),this.addToXIndex(a)}this.registerBatch(t)}}}class PI extends Is{constructor({encoders:t,attributes:n,tessellationThreshold:r=1/0,visibleRange:i=[-1/0,1/0],numItems:o}){super({encoders:t,attributes:n,numVertices:r==1/0?o*6:void 0}),this.visibleRange=i,this.tessellationThreshold=r||1/0,this.updateSide=this.variableBuilder.createUpdater("side",1),this.updatePos=this.variableBuilder.createUpdater("pos",1),this.variableBuilder.configure()}addBatch(t,n,r=0,i=n.length){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const a=n[o];this.variableBuilder.updateFromDatum(a),this.updateSide(-.5),this.updatePos(0),this.variableBuilder.pushAll();const s=1;for(let c=0;c<=s;c++)this.updatePos(c/s),this.updateSide(-.5),this.variableBuilder.pushAll(),this.updateSide(.5),this.variableBuilder.pushAll();this.variableBuilder.pushAll(),this.addToXIndex(a)}this.registerBatch(t)}}class LI extends Is{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r}),this.variableBuilder.configure()}}class NI extends Is{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r}),this.variableBuilder.configure()}toArrays(){const t=this.variableBuilder.arrays;for(let n of Object.values(t))n.divisor=1;return super.toArrays()}}class OI extends Is{constructor({encoders:t,attributes:n,fontMetrics:r,properties:i,numCharacters:o=void 0}){super({encoders:t,attributes:n,numVertices:o*6}),this.metadata=r,this.metrics=r,this.properties=i;const s=t.text.channelDef;this.numberFormat=!yn(s)&&"format"in s&&s.format?Nt(s.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(t,n,r=0,i=n.length){const o=this.properties.align||"left",a=this.properties.logoLetters??!1,s=this.metadata.common.base,c=this.metadata.common.scaleH;let l=-ko;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,i);for(let d=r;d<i;d++){const p=n[d],b=this.numberFormat(u(p)),v=it(b)?b:b===null?"":""+b;if(v.length==0)continue;this.variableBuilder.updateFromDatum(p);const y=a?v.length:this.metrics.measureWidth(v);this.updateWidth(y);let A=o=="right"?-y:o=="center"?-y/2:0;if(!a){const R=this.metrics.getCharByCode(v.charCodeAt(0));A-=(R.width-R.xadvance)/s/2}let _=-.5,E=1,C=1;for(let R=0;R<v.length;R++){const D=this.metrics.getCharByCode(v.charCodeAt(R)),O=a?1:D.xadvance/s;if(D.id==32){A+=O;continue}a?(C=(D.width+ko*2)/D.width,A=-C/2,E=(D.height+ko*2)/D.height,_=-.5-ko/D.height):(E=D.height/s,_=-(D.height+D.yoffset+l)/s,C=D.width/s);const F=D.x,P=D.y;f[0]=A,f[1]=_+E,h[0]=F/c,h[1]=P/c,this.variableBuilder.pushAll(),f[0]=A+C,f[1]=_+E,h[0]=(F+D.width)/c,h[1]=P/c,this.variableBuilder.pushAll(),f[0]=A,f[1]=_,h[0]=F/c,h[1]=(P+D.height)/c,this.variableBuilder.pushAll(),f[0]=A+C,f[1]=_+E,h[0]=(F+D.width)/c,h[1]=P/c,this.variableBuilder.pushAll(),f[0]=A,f[1]=_,h[0]=F/c,h[1]=(P+D.height)/c,this.variableBuilder.pushAll(),f[0]=A+C,f[1]=_,h[0]=(F+D.width)/c,h[1]=(P+D.height)/c,this.variableBuilder.pushAll(),A+=O}this.addToXIndex(p)}this.registerBatch(t)}}const x2=`#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);}}`,zI="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));}",UI=`/***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;}}`,GI=`/**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;}`,HI="in highp vec4 vPickingColor;",eu=Symbol("cacheMap");function tu(e,t,n){let r=Ds(e).get(t);return r===void 0&&(r=n(t),Ds(e).set(t,r)),r}function VI(e,t){Ds(e).delete(t)}function nu(e,t){const n=Ds(e);for(const r of n.keys())r.startsWith(t)&&n.delete(r);Ds(e).delete(t)}function v2(e){e[eu]=new Map}function Ds(e){return e[eu]||v2(e),e[eu]}function qI(e,t,n,r){const i=it(e)?e:e.name,o=!it(e)&&e.extent||[0,1];if(n===void 0&&!it(e)&&(n=e.count),i){const a=Zh(i);if(dn(a)){const s=A2(a,{extent:o,count:n});return ks(t,{minMag:t.LINEAR,format:t.RGB,height:1,wrap:t.CLAMP_TO_EDGE},s,r)}else{if(Bt(a))return gd(a,t);throw new Error("Unknown scheme: "+i)}}}function jI(e,t="rgb",n,r){const i=Hl(e,it(t)?t:t.type,it(t)?void 0:t.gamma),o=A2(i);return ks(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},o,r)}function WI(e,t,n,r){const i=Math.max(e.length,n||0),o=new Float32Array(i);for(let a=0;a<i;a++)o[a]=e[a%e.length];return ks(t,{minMag:t.NEAREST,format:t.RED,internalFormat:t.R32F,height:1},o,r)}function gd(e,t,n,r){const i=E2(e,n);return ks(t,{minMag:t.NEAREST,format:t.RGB,height:1},i,r)}function A2(e,{extent:t=[0,1],reverse:n=!1,count:r=256}={}){const i=t[0],o=Xa(t)-i,a=Fa(r).map(s=>s/(r-1)).map(s=>i+s/o).map(e);return n&&a.reverse(),E2(a)}function E2(e,t){const n=Math.max(e.length,t||0),r=new Uint8Array(n*3);for(let i=0;i<n;i++){const o=e[i%e.length],a=Nr(o);if(!a)throw new Error(`Invalid color "${o}" in the scheme ${JSON.stringify(e)}!`);const s=a.rgb();r[i*3+0]=s.r,r[i*3+1]=s.g,r[i*3+2]=s.b}return r}class ZI{constructor(t,n,r,i={}){this._container=t,this._sizeSource=n??(()=>({width:void 0,height:void 0})),this._shaderCache=new Map,this.rangeTextures=new WeakMap,this.selectionTextures=new WeakMap;const o=document.createElement("canvas");t.appendChild(o);const a=e8(o,{antialias:!0,depth:!1,premultipliedAlpha:!0,...i});if(!a)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!mo(a))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");if(l1(a),a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),this.canvas=o,this.gl=a,this._pickingAttachmentOptions=[{format:a.RGBA,type:a.UNSIGNED_BYTE,minMag:a.LINEAR,wrap:a.CLAMP_TO_EDGE}],this._pickingBufferInfo=Y6(a,this._pickingAttachmentOptions),a.bindFramebuffer(a.FRAMEBUFFER,null),this.adjustGl(),this._updateDpr(),this._clearColor=[0,0,0,0],r){const s=Nr(r).rgb();this._clearColor=[s.r/255,s.g/255,s.b/255,s.opacity]}}invalidateSize(){this._logicalCanvasSize=void 0,this._updateDpr(),this.adjustGl()}_updateDpr(){this.dpr=window.devicePixelRatio}compileShader(t,n){const r="#version 300 es",i="precision mediump float;";Bt(n)&&(n=n.join(`
|
|
331
331
|
|
|
332
|
-
`));const o=this.gl,
|
|
332
|
+
`));const o=this.gl,a=n.replaceAll(/ {2,}|^\s*\/\/.*$/gm,"");let s=this._shaderCache.get(a);if(!s){const c=[r,i,n].join(`
|
|
333
333
|
|
|
334
|
-
`);
|
|
335
|
-
`).map((s
|
|
334
|
+
`);s=o.createShader(t),o.shaderSource(s,c),o.compileShader(s),this._shaderCache.set(a,s)}return s}adjustGl(){const t=this.getLogicalCanvasSize();this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`;const n=this.getPhysicalCanvasSize(t);this.canvas.width=n.width,this.canvas.height=n.height,Q6(this.gl,this._pickingBufferInfo,this._pickingAttachmentOptions)}finalize(){this.canvas.remove()}getPhysicalCanvasSize(t){return t=t||this.getLogicalCanvasSize(),{width:t.width*this.dpr,height:t.height*this.dpr}}getLogicalCanvasSize(){if(this._logicalCanvasSize)return this._logicalCanvasSize;const t=this._sizeSource(),n=window.getComputedStyle(this._container,null),r=t.width??this._container.clientWidth-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight),i=t.height??this._container.clientHeight-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom);return this._logicalCanvasSize={width:r,height:i},this._logicalCanvasSize}readPickingPixel(t,n){const r=this.gl;t*=this.dpr,n*=this.dpr;const i=this.getPhysicalCanvasSize().height,o=new Uint8Array(4);return r.bindFramebuffer(r.FRAMEBUFFER,this._pickingBufferInfo.framebuffer),r.readPixels(t,i-n-1,1,1,r.RGBA,r.UNSIGNED_BYTE,o),r.bindFramebuffer(r.FRAMEBUFFER,null),o}clearAll(){const t=this.gl,{width:n,height:r}=this.getPhysicalCanvasSize();t.viewport(0,0,n,r),t.disable(t.SCISSOR_TEST),t.clearColor(...this._clearColor),t.clear(t.COLOR_BUFFER_BIT)}createRangeTexture(t,n=!1){const r=this.rangeTextures.get(t);if(!n&&r)return;function i(a,s){return Gr(s.type)?s.domain().length:s.type=="threshold"?s.domain().length+1:s.type=="quantize"||s.type=="quantile"?a??4:a}const o=t.channel;if(jr(o)){const a=t.scale,s=a.props,c=a.range();let l;if(s.scheme)if(a.type=="threshold"&&c)l=gd(c,this.gl,a.domain().length,r);else{let u=it(s.scheme)?void 0:s.scheme.count;u=i(u,a),l=qI(s.scheme,this.gl,u,r)}else Gl(a.type)||Rt(a.type)&&c.length>1?l=jI(c,s.interpolate,this.gl,r):l=gd(c,this.gl,a.domain().length,r);this.rangeTextures.set(t,l)}else{const a=t.scale;if(a.type==="ordinal"||ki(a.type)){const s=Kl(o)?o2(o):l=>l,c=a.range();this.rangeTextures.set(t,WI(c.map(s),this.gl,a.domain().length,r))}}}createSelectionTexture(t,n=!0){if(!od(t))throw new Error("Not a multi-point selection, cannot create texture");const r=Array.from(t.data.keys()),i=r.length>0?r.sort((c,l)=>c-l):[0],o=this.selectionTextures.get(t),a=this.gl,s=ks(this.gl,{level:0,minMag:a.NEAREST,format:a.RED_INTEGER,internalFormat:a.R32UI,height:1,width:i.length},new Uint32Array(i),n?o:!1);this.selectionTextures.set(t,s)}}function YI(e,t="",n=0){const r=/ERROR:\s*\d+:(\d+)/gi,i=[...t.matchAll(r)],o=new Map(i.map((a,s)=>{const c=parseInt(a[1]),l=i[s+1],u=l?l.index:t.length,f=t.substring(a.index,u);return[c-1,f]}));return e.split(`
|
|
335
|
+
`).map((a,s)=>{const c=o.get(s);return`${s+1+n}: ${a}${c?`
|
|
336
336
|
|
|
337
|
-
^^^ ${
|
|
338
|
-
`)}function
|
|
339
|
-
Error compiling: ${o}`,e.deleteShader(
|
|
340
|
-
return ${
|
|
341
|
-
}`)}}else if(
|
|
342
|
-
uniform highp usampler2D ${
|
|
343
|
-
return binarySearchTexture(${
|
|
344
|
-
}`),
|
|
345
|
-
`+(this.encoders.uniqueId&&
|
|
346
|
-
}`);const
|
|
347
|
-
precision highp int;`,
|
|
348
|
-
`));r=r.map(
|
|
349
|
-
`),...u,iF,oF,t],_=[y,a,...r,uw,sF,n],S=this.gl;this.programStatus=dF(S,this.glHelper.compileShader(S.VERTEX_SHADER,A),this.glHelper.compileShader(S.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=ZT(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=Ub(this.gl,this.programInfo,"View"),this.markUniformInfo=Ub(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),qi(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of z(this,lr))n();le(this,lr,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=s=>{if(s==null)throw new Error(`Trying to set null/undefined value for uniform: ${t}${Mt(n)?`Expr: ${n.expr}`:""}`);i(s)};if(Mt(n)){const s=this.unitView.paramMediator.createExpression(n.expr),a=()=>o(r(s(null)));s.addListener(a),a()}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&&s8(this.gl,this.bufferInfo.attribs[n],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=u8(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?(Hb(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):Gb(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(t){const n=this.glHelper,r=this.gl,i=[];i.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=pk(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[s,a]of Object.entries(this.encoding))if(Xt(a)){const u=Xt(a)&&a.resolutionChannel||s;if(pl(u)){const l=this.unitView.getScaleResolution(u),c=n.rangeTextures.get(l);c&&i.push(()=>qi(this.programInfo,{[D0+s]:c}))}}i.push(...this.selectionTextureOps),this.getSampleFacetMode()==pw&&i.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.");qi(this.programInfo,{uSampleFacetTexture:s})});const o=(t.picking??!1)&&this.isPickingParticipant();return i.push(()=>Wa(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 s=n.targetLocSize?n.targetLocSize.location:i,a=n.targetLocSize?n.targetLocSize.size:o;this.gl.uniform4f(r.location,i,o,s,a)}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,s=o&&wt(o.type),a=["index","locus"].includes(o==null?void 0:o.type)?-1:0,u=[0,0];i=h=>{if(s&&h.xIndex){const d=o.domain(),p=h.xIndex(d[0]+a,d[1],u),m=p[0],y=p[1]-m;y>0&&t(m,y)}else t(h.offset,h.count)};const l=this.rangeMap.get(void 0).count==0?n.facetId:void 0,c=this.rangeMap.get(l);return n.sampleFacetRenderingOptions?function(){c.count&&r.prepareSampleFacetRendering(n)&&i(c)}:function(){c.count&&i(c)}}setViewport(t,n){t=t.flatten();const r=this.unitView.context.devicePixelRatio,i=this.gl,o=this.properties,s=this.glHelper.getLogicalCanvasSize(),a=.5,u=(o.xOffset??0)+a,l=(o.yOffset??0)+a;let c,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 m=[f.x,s.height-f.y2,f.width,f.height].map(_=>_*r),y=m.map(_=>Math.floor(_)),w=m[0]-y[0],A=m[1]-y[1];i.viewport(...y),i.scissor(...y),i.enable(i.SCISSOR_TEST),c={uViewOffset:[(u+h+w/r)/f.width,-(l+d-A/r)/f.height],uViewScale:p}}else{if(!t.isDefined())return!1;i.viewport(0,0,s.width*r,s.height*r),i.disable(i.SCISSOR_TEST),c={uViewOffset:[(t.x+u)/s.width,(s.height-t.y-l-t.height)/s.height],uViewScale:[t.width/s.width,t.height/s.height]}}return Wa(this.viewUniformInfo,{...c,uViewportSize:[t.width,t.height],uDevicePixelRatio:r}),Hb(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(t,n){}}lr=new WeakMap;class mF extends hr{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 O0(e,t){const n=ID(t);let r=e[t]&&{...e[t]},i=e[n]&&{...e[n]};if(!(fn(r)||fn(i))){if(r){if(!Xt(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 mw(e,t){e.stroke||(t?e.stroke={value:null}:e.stroke={resolutionChannel:"color",...e.color}),fn(e.stroke)&&e.stroke.value===null&&(e.strokeWidth={value:0}),e.strokeOpacity||(e.strokeOpacity={resolutionChannel:"opacity",...e.opacity})}function bw(e,t){fn(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 bF extends vl{constructor(n){super(n);J(this,Ai);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 sf(this,"opaque",()=>!Q(this,Ai,sm).call(this)&&!Q(this,Ai,am).call(this)&&fn(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return O0(n,"x"),O0(n,"y"),mw(n,this.properties.filled),bw(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];Q(this,Ai,sm).call(this)&&n.push("ROUNDED_CORNERS"),Q(this,Ai,am).call(this)&&n.push("STROKED"),this.createAndLinkShaders(wk,vk,[xk,...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 KD({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(()=>Wi(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,o)=>{Ic(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,o,i)},n)}findDatumAt(n,r){n=zt(n);const i=this.unitView.getCollector().facetBatches.get(n);if(!i)return;const o=this.encoders,s=o.x.scale.type;if(ti(s)){const a=o.x.dataAccessor;return i.find(u=>r==a(u))}else{const a=o.x.dataAccessor,u=o.x2.dataAccessor;return i.find(l=>r>=a(l)&&r<u(l))}}}Ai=new WeakSet,sm=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},am=function(){const n=this.encoding.strokeWidth;return!(fn(n)&&!n.value)||"condition"in n};const yF=`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(){
|
|
337
|
+
^^^ ${c}`:""}`}).join(`
|
|
338
|
+
`)}function QI(e,t,n){const r=e.createProgram();e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r);function i(){let o,a;if(!e.getProgramParameter(r,e.LINK_STATUS)){o=e.getProgramInfoLog(r);for(const c of[t,n])e.getShaderParameter(c,e.COMPILE_STATUS)||(o=e.getShaderInfoLog(c),a=YI(e.getShaderSource(c),o,0)+`
|
|
339
|
+
Error compiling: ${o}`,e.deleteShader(c));e.deleteProgram(r)}if(o)return{message:o,detail:a}}return{program:r,getProgramErrors:i}}function ks(e,t,n,r){return r?_m(e,r,n,t):r=rs(e,{...t,src:n}),r}function S2(...e){const t={get(n,r,i){for(const o of e){const s=o()[r];if(s!==void 0)return s}},has(n,r,i){for(const o of e){const a=o();if(r in a)return!0}return!1}};return new Proxy({},t)}function XI(e){return it(e)||jt(e)||Aa(e)}class Li extends Error{constructor(t,n){super(t),this.name="ViewError",this.view=n}}const KI="SAMPLE_FACET_UNIFORM",_2="SAMPLE_FACET_TEXTURE",C2="uSelectionTexture_";class Bs{constructor(t){ve(this,$n,[]);this.unitView=t,this.encoders=void 0,this.bufferInfo=void 0,this.bytesPerElement=new Map,this.programInfo=void 0,this.vertexArrayInfo=void 0,this.viewUniformInfo=void 0,this.markUniformInfo=void 0,this.markUniformsAltered=!0,this.selectionTextureOps=[],this.rangeMap=new JI,this.defaultProperties={get clip(){return["x","y"].map(n=>t.getScaleResolution(n)).some(n=>(n==null?void 0:n.isZoomable())??!1)},xOffset:0,yOffset:0,minBufferSize:0},this.properties=S2(typeof this.unitView.spec.mark=="object"?()=>this.unitView.spec.mark:()=>({}),()=>this.defaultProperties)}augmentDefaultProperties(t){Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors(t))}get opaque(){return!1}getAttributes(){throw new Error("Not implemented!")}getSupportedChannels(){return["sample","facetIndex","x","y","color","opacity","search","uniqueId"]}getDefaultEncoding(){const t={sample:void 0,uniqueId:void 0};return this.isPickingParticipant()&&(t.uniqueId={field:bn}),t}fixEncoding(t){return t}setupExprRefsNeedingGraphicsUpdate(t){const n=this.getSupportedChannels(),r={};for(const o of t){const a=this.properties[o];if(a&&Yt(a)){const s=this.unitView.paramMediator.createExpression(a.expr);s.addListener(()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()}),n.includes(o)||Object.defineProperty(r,o,{get(){return s()}})}}const i=this.properties;this.properties=S2(()=>r,()=>i)}get encoding(){return tu(this,"encoding",()=>{var a;const t=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=s=>{const c=this.properties[s];return XI(c)||Yt(c)?{value:c}:void 0},i=Object.fromEntries(this.getSupportedChannels().map(s=>[s,r(s)]).filter(s=>yn(s[1]))),o=this.fixEncoding({...t,...i,...n});for(const s of Object.keys(o))this.getSupportedChannels().includes(s)||delete o[s];return o.x&&((a=o.x).buildIndex??(a.buildIndex=!0)),o})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=iI(this.unitView,this.encoding)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return _2;if(this.unitView.getLayoutAncestors().find(t=>"samples"in t.spec))return KI}createAndLinkShaders(t,n,r=[]){const i=this.getAttributes(),o=this.encoders,a=this.getSampleFacetMode();a&&r.push(`#define ${a}`);const s="// view: "+this.unitView.getPathString();let c=[];const l=new Set,u=m2(o),f=[],h=Object.values(o).flatMap(C=>C.accessors).map(C=>C.predicate).filter(C=>C.param),d=new Map;for(const C of h){const R=C.param,D=this.unitView.paramMediator,O=D.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=Jl+"uniqueId";if(Xb(O)){if(!d.has(R)){const P=ud+Xl(R);d.set(R,"single"),f.push(" // Selection parameter"),f.push(` uniform highp uint ${P};`),X(this,$n).push(()=>{this.registerMarkUniformValue(P,{expr:R},S=>S.uniqueId??0)}),c.push(`bool ${$l}${R}(bool empty) {
|
|
340
|
+
return ${ud}${R} == ${F} || (empty && ${ud}${R} == 0u);
|
|
341
|
+
}`)}}else if(od(O)&&!d.has(R)){d.set(R,"multi");const P=C2+Xl(R);c.push(`// Selection texture
|
|
342
|
+
uniform highp usampler2D ${P};`);const S=this.getContext().glHelper,Z=S.selectionTextures;this.selectionTextureOps.push(()=>{const ce=D.getValue(R),fe=Z.get(ce);if(!fe)throw new Error(`Bug: no selection texture found for "${R}"!`);Ai(this.programInfo,{[P]:fe})});const Q=C2+R;c.push(`bool ${$l}${R}(bool empty) {
|
|
343
|
+
return binarySearchTexture(${Q}, ${F}) || (empty && isEmptyBinarySearchTexture(${Q}));
|
|
344
|
+
}`),S.createSelectionTexture(O);const se=D.createExpression(R);se.addListener(()=>{const ce=se(null);S.createSelectionTexture(ce),this.getContext().animator.requestRender()})}}const p=(C,R,D,O)=>{const F=R.channelDef;if(yn(F))if(Yt(F.value)){const{uniformName:P,uniformGlsl:S,accessorGlsl:Z,adjuster:Q}=wI(C,D);c.push(Z),f.push(S),X(this,$n).push(()=>{this.registerMarkUniformValue(P,F.value,Q)})}else c.push(yI(C,D,F.value).accessorGlsl);else if(As(F)){const{uniformName:P,uniformGlsl:S,accessorGlsl:Z}=xI(C,O,D);f.push(S),c.push(Z);const{largeHp:Q,discrete:se}=Ts(O,C),ce=se&&"domain"in O?fe=>O.domain().indexOf(fe):Q?g2:fe=>+fe;X(this,$n).push(()=>{this.registerMarkUniformValue(P,F.datum,ce)})}else if(qr(F)){const P=u.get([F.field,!0]),{attributeGlsl:S,accessorGlsl:Z}=c2(C,O,D,P!=null&&P.includes(C)?P:void 0);l.add(S),c.push(Z)}else if(Es(F)){const{attributeGlsl:P,accessorGlsl:S}=c2(C,O,D);l.add(P),c.push(S)}else throw new Li(`Unsupported channel definition: ${JSON.stringify(F)}`,this.unitView)};for(const[C,R]of Object.entries(o)){if(!i.includes(C))continue;const{channelDef:D,accessors:O,scale:F}=R;for(let P=0;P<O.length;P++)p(C,O[P],P,F);if(F){const P=on(D)&&D.resolutionChannel||C,S=_s(P)?this.unitView.getScaleResolution(P):null,{glsl:Z,domainUniform:Q,domainUniformName:se,rangeUniform:ce,rangeUniformName:fe}=vI(C,F,D);c.push(Z),f.push(Q),f.push(ce),ce&&X(this,$n).push(()=>{const le=this.createMarkUniformSetter(fe),Ee=()=>le(b2(F,C));S.addEventListener("range",Ee),Ee()}),Q&&X(this,$n).push(()=>{const le=this.createMarkUniformSetter(se),Ee=()=>{const pe=Gr(F.type)?[0,F.domain().length]:F.domain();le(p2(F.type)?TI(pe):pe)};S.addEventListener("domain",Ee),Ee()})}c.push(AI(C,O))}const b=[...d.keys()].map(C=>`${$l}${C}(false)`);c.push(`bool isPointSelected() {
|
|
345
|
+
`+(this.encoders.uniqueId&&b.length>0?` return ${b.join(" || ")};`:" return false;")+`
|
|
346
|
+
}`);const v=`precision highp float;
|
|
347
|
+
precision highp int;`,y=C=>C.replace("#pragma markUniforms",f.join(`
|
|
348
|
+
`));r=r.map(y),t=y(t),n=y(n);const A=[v,s,...r,x2,zI,[...l].join(`
|
|
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(){
|
|
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();}`,tD="const lowp vec4 white=vec4(1.0);const lowp vec4 black=vec4(0.0,0.0,0.0,1.0);in float vRadius;in float vRadiusWithPadding;in lowp vec4 vFillColor;in lowp vec4 vStrokeColor;in lowp float vShape;in lowp float vHalfStrokeWidth;in mat2 vRotationMatrix;out lowp vec4 fragColor;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TICK_UP=8.0;float circle(vec2 p,float r){return length(p)-r;}float square(vec2 p,float r){p=abs(p);return max(p.x,p.y)-r;}float tickUp(vec2 p,float r){float halfR=r*0.5;p.y+=halfR;p=abs(p);return max(p.x-r*0.15,p.y-halfR);}float equilateralTriangle(vec2 p,float r){p.y=-p.y;float k=sqrt(3.0);float kr=k*r;p.y-=kr/2.0;return max((abs(p.x)*k+p.y)/2.0,-p.y-kr);}float crossShape(vec2 p,float r){p=abs(p);vec2 b=vec2(0.4,1.0)*r;vec2 v=abs(p)-b.xy;vec2 h=abs(p)-b.yx;return min(max(v.x,v.y),max(h.x,h.y));}float diamond(vec2 p,float r){p=abs(p);return(max(abs(p.x-p.y),abs(p.x+p.y))-r)/sqrt(2.0);}void main(){float d;vec2 p=vRotationMatrix*(2.0*gl_PointCoord-1.0)*vRadiusWithPadding;float r=vRadius;if(vShape==CIRCLE){d=circle(p,r);}else if(vShape==SQUARE){d=square(p,r);}else if(vShape==CROSS){d=crossShape(p,r);}else if(vShape==DIAMOND){d=diamond(p,r);}else if(vShape==TRIANGLE_UP){d=equilateralTriangle(p,r);}else if(vShape==TICK_UP){d=tickUp(p,r);}else{d=0.0;}if(!uPickingEnabled){lowp vec4 fillColor=mix(vFillColor,white,-d*uGradientStrength/vRadius);fragColor=distanceToColor(d+(uInwardStroke ? vHalfStrokeWidth : 0.0),fillColor,vStrokeColor,vHalfStrokeWidth);}else if(d-vHalfStrokeWidth<=0.0){fragColor=vPickingColor;}else{discard;}}",nD=`layout(std140)uniform Mark{/***The stroke should only grow inwards,e.g,the diameter/outline is not affected by the stroke width.*Thus,a point that has a zero size has no visible stroke. This allows strokes to be used with*geometric zoom,etc.*/uniform bool uInwardStroke;uniform 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 D2 extends vt{constructor(t){super(t),this.params=t,this.k=t.size||500,this.reset()}reset(){super.reset(),this.reservoir=[],this.W=void 0,this.ingester=this._initialIngester}_initialIngester(t){this.reservoir.push(t),this.reservoir.length==this.k&&(this.W=Math.exp(Math.log(Math.random())/this.k),this.i=this.k,this.next=this.i,this.ingester=this._finalIngester,this._setNextStop())}_finalIngester(t){++this.i==this.next&&(this.reservoir[Math.floor(Math.random()*this.k)]=t,this.W*=Math.exp(Math.log(Math.random())/this.k),this._setNextStop())}_setNextStop(){this.next+=Math.floor(Math.log(Math.random())/Math.log(1-this.W))+1}handle(t){this.ingester(t)}complete(){for(const t of this.reservoir)this._propagate(t);super.complete()}}function rD(e,t,n){const r=new D2({type:"sample",size:e});for(const i of t)r.handle(n(i));return r.complete(),r.reservoir}const iD={};class oD extends Bs{constructor(n){super(n);ve(this,Vu);ve(this,aa,()=>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(Yt(r)){const i=this.unitView.paramMediator.createExpression(r.expr);i.addListener(()=>this.getContext().animator.requestRender()),Pe(this,aa,i)}else Pe(this,aa,()=>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(),...iD}}fixEncoding(n){return T2(n,this.properties.filled),I2(n,this.properties.filled),delete n.color,delete n.opacity,n}initializeData(){var r,i;super.initializeData();const n=(i=(r=this.encoders.semanticScore)==null?void 0:r.dataAccessor)==null?void 0:i.asNumberAccessor();n&&(this.sampledSemanticScores=Float32Array.from(rD(1e4,this.unitView.getCollector().getData(),n)),this.sampledSemanticScores.sort((o,a)=>o-a))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(eD,tD,[nD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uInwardStroke",n.inwardStroke,r=>!!r),this.registerMarkUniformValue("uGradientStrength",n.fillGradientStrength),this.registerMarkUniformValue("uMinPickingSize",n.minPickingSize)}updateGraphicsData(){const n=this.unitView.getCollector();if(!n){console.debug("No collector");return}const r=n.getItemCount(),i=new LI({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(r,this.properties.minBufferSize||0)});i.addBatches(n.facetBatches);const o=i.toArrays();this.rangeMap.migrateEntries(o.rangeMap),this.updateBufferInfo(o)}getSemanticThreshold(){if(this.sampledSemanticScores){const n=Math.max(0,1-X(this,aa).call(this)*this.unitView.getZoomLevel());if(n<=0)return-1/0;if(n>=1)return 1/0;{const r=this.sampledSemanticScores;return yg(r,n)}}else return-1}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>{is(this.markUniformInfo,{uScaleFactor:he(this,Vu,OA).call(this),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),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)=>{o&&_l(r,this.vertexArrayInfo,r.POINTS,o,i)},n)}}aa=new WeakMap,Vu=new WeakSet,OA=function(){const n=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/n),1/3)};const aD="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();}",sD="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;}}",cD=`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 lD extends Bs{constructor(t){super(t),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(t){if(!(t.x&&t.y&&t.x2&&t.y2))if(t.x&&t.x2&&!t.y)t.y={value:.5},t.y2=t.y;else if(t.y&&t.y2&&!t.x)t.x={value:.5},t.x2=t.x;else if(t.x&&!t.y)t.y={value:0},t.y2={value:1},t.x2=t.x;else if(t.y&&!t.x)t.x={value:0},t.x2={value:1},t.y2=t.y;else if(t.x&&t.y&&t.y2)t.x2=t.x;else if(t.y&&t.x&&t.x2)t.y2=t.y;else if(t.y&&t.x)if(!t.x2&&on(t.y)&&t.y.type=="quantitative")t.x2=t.x,t.y2={datum:0};else if(!t.y2&&on(t.x)&&t.x.type=="quantitative")t.y2=t.y,t.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(t));return t}async initializeGraphics(){await super.initializeGraphics();const t=this.gl,n=uD(this.properties.strokeDash);this.dashTexture=rs(t,{level:0,mag:t.NEAREST,min:t.NEAREST,internalFormat:t.R8,format:t.RED,src:n,height:1}),this.dashTextureSize=n.length,this.createAndLinkShaders(aD,sD,[cD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uMinLength",t.minLength),this.registerMarkUniformValue("uStrokeCap",t.strokeCap??"butt",n=>["butt","square","round"].indexOf(n)),is(this.markUniformInfo,{uDashTextureSize:+this.dashTextureSize}),this.markUniformsAltered=!0}updateGraphicsData(){const t=this.unitView.getCollector();if(!t){console.debug("No collector");return}const n=t.getItemCount(),r=new PI({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(n,this.properties.minBufferSize||0)});r.addBatches(t.facetBatches);const i=r.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>Ai(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>Ei(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>_l(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,i,r),t)}}function uD(e){if(!e)return new Uint8Array(0);if(e.length==0||e.length%2||e.findIndex(o=>Math.round(o)!=o||o<1||o>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(e));const t=e.reduce((o,a)=>o+a),n=new Uint8Array(t);let r=!0,i=0;for(let o of e){for(;o;)n[i++]=r&&255||0,o--;r=!r}return n}const fD="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();}",hD="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;}}",dD=`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
|
+
};`,pD=["arc","dome","diagonal","line"],gD=["vertical","horizontal"];class mD extends Bs{constructor(t){super(t),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(t){return t.x2||(on(t.x)?t.x2={datum:0}:t.x2=t.x),t.y2||(on(t.y)?t.y2={datum:0}:t.y2=t.y),t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(fD,hD,[dD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uArcFadingDistance",t.arcFadingDistance,n=>n||[0,0]),this.registerMarkUniformValue("uArcHeightFactor",t.arcHeightFactor),this.registerMarkUniformValue("uMinArcHeight",t.minArcHeight),this.registerMarkUniformValue("uMinPickingSize",t.minPickingSize),this.registerMarkUniformValue("uShape",t.linkShape,n=>pD.indexOf(n)),this.registerMarkUniformValue("uOrient",t.orient,n=>gD.indexOf(n)),this.registerMarkUniformValue("uClampApex",t.clampApex,n=>!!n),this.registerMarkUniformValue("uMaxChordLength",t.maxChordLength),this.registerMarkUniformValue("uSegmentBreaks",t.segments,n=>n),this.registerMarkUniformValue("uNoFadingOnPointSelection",t.noFadingOnPointSelection,n=>!!n)}updateGraphicsData(){const t=this.unitView.getCollector();if(!t){console.debug("No collector");return}const n=t.getItemCount(),r=new NI({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});r.addBatches(t.facetBatches);const i=r.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.arrays=Object.fromEntries(Object.entries(i.arrays).map(([o,a])=>[o,{...a,data:void 0}])),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),this._baseInstanceExt?n.push(()=>Ei(this.gl,this.programInfo,this.vertexArrayInfo)):n.push(()=>this.gl.bindVertexArray(null)),n}render(t){const n=this.gl,r=()=>(this.markUniformInfo.uniforms.uSegmentBreaks[0]+1)*2;return this._baseInstanceExt?this.createRenderCallback((i,o)=>{this._baseInstanceExt.drawArraysInstancedBaseInstanceWEBGL(n.TRIANGLE_STRIP,0,r(),o,i)},t):this.createRenderCallback((i,o)=>{for(const a of Object.entries(this.bufferInfo.attribs)){const[s,c]=a;c.buffer&&c.numComponents&&c.divisor&&(c.offset=i*this.arrays[s].numComponents*this.bytesPerElement.get(s))}Ei(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,r(),o)},t)}}const bD=`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();}`,yD="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;}}",wD=`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
|
+
};`,xD={left:-1,center:0,right:1},vD={top:-1,middle:0,bottom:1,alphabetic:1};class AD extends Bs{constructor(t){super(t),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?t.context.fontManager.getFont(this.properties.font,this.properties.fontStyle,this.properties.fontWeight):t.context.fontManager.getDefaultFont(),this.setupExprRefsNeedingGraphicsUpdate(["text","fitToBand","logoLetters"])}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","color","size","opacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size","text","angle"]}fixEncoding(t){for(const n of Do)this.properties.fitToBand&&md(t,n);return t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(bD,yD,[wD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uSdfNumerator",{expr:"devicePixelRatio"},n=>{let r=.35;return this.properties.logoLetters&&(r/=2),this.font.metrics.common.base/(n/r)}),this.registerMarkUniformValue("uPaddingX",t.paddingX),this.registerMarkUniformValue("uPaddingY",t.paddingY),this.registerMarkUniformValue("uFlushX",t.flushX,n=>!!n),this.registerMarkUniformValue("uFlushY",t.flushY,n=>!!n),this.registerMarkUniformValue("uSqueeze",t.squeeze,n=>!!n),is(this.markUniformInfo,{uAlign:[xD[t.align],vD[t.baseline]],uD:[t.dx,-t.dy],uLogoLetter:!!t.logoLetters,uViewportEdgeFadeWidth:[t.viewportEdgeFadeWidthTop,t.viewportEdgeFadeWidthRight,t.viewportEdgeFadeWidthBottom,t.viewportEdgeFadeWidthLeft],uViewportEdgeFadeDistance:[t.viewportEdgeFadeDistanceTop,t.viewportEdgeFadeDistanceRight,t.viewportEdgeFadeDistanceBottom,t.viewportEdgeFadeDistanceLeft]})}updateGraphicsData(){const t=this.unitView.getCollector();if(!t){console.debug("No collector");return}const n=t.getData(),r=this.encoding,i=this.encoders.text;let o=0;const a="format"in r.text?Nt(r.text.format):l=>l;for(const l of n){const u=a(i(l)),f=it(u)?u:u===null?"":""+u;o+=f&&f.length||0}const s=new OI({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(o,this.properties.minBufferSize||1024)});s.addBatches(t.facetBatches);const c=s.toArrays();this.rangeMap.migrateEntries(c.rangeMap),this.updateBufferInfo(c)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>{Ai(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>Ei(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>_l(n,this.vertexArrayInfo,n.TRIANGLES,i,r),t)}}const k2=1;function bd(){let e=[0,1],t=[0,1],n=1,r=1,i=0,o=0,a=.5,s=0;const l=u=>(u+a-e[0])/n*r+t[0];return l.invert=u=>(u-t[0])/r*n+e[0]-a,l.domain=function(u){if(arguments.length){e=rE(u),n=e[1]-e[0];const f=e[0]===0&&e[0]===0;if(n<k2&&!f){n=k2;const h=(e[0]+e[1])/2;e[0]=h-n/2,e[1]=h+n/2}return l}else return e.slice()},l.range=function(u){return arguments.length?(t=[...u],r=t[1]-t[0],l):t},l.numberingOffset=function(u){return arguments.length?(s=u,l):s},l.padding=function(u){return arguments.length?(o=u,i=Math.min(1,u),l):i},l.paddingInner=function(u){return arguments.length?(i=Math.min(1,u),l):i},l.paddingOuter=function(u){return arguments.length?(o=u,l):o},l.align=function(u){return arguments.length?(a=Math.max(0,Math.min(1,u)),l):a},l.step=()=>r/n,l.bandwidth=()=>l.step(),l.ticks=u=>{const f=l.align(),h=l.numberingOffset();return Zc(e[0]-f+h,e[1]-f+h,Math.min(u,Math.ceil(n))).filter(Number.isInteger).map(d=>d-s)},l.tickFormat=(u,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const d=pi(e[0],e[1],Math.min(u,Math.ceil(n)))<1e5?Nt(","):Nt(".3s");return p=>d(p+s)},l.copy=()=>bd().domain(e).range(t).paddingInner(i).paddingOuter(o).numberingOffset(s),l}function ED(){const e=bd().numberingOffset(1);let t;e.genome=function(r){return arguments.length?(t=r,e):t},e.ticks=r=>{if(!t)return[];const i=e.domain(),o=e.numberingOffset(),[a,s]=[Math.max(i[0],0),Math.min(i[1],t.totalSize-1)].map(u=>t.toChromosome(u)),c=Math.max(1,pi(i[0],i[1],r)),l=[];for(let u=a.index;u<=s.index;u++){const f=t.chromosomes[u],h=Math.max(f.continuousStart+c,i[0]-(i[0]-f.continuousStart)%c),d=Math.min(f.continuousEnd-c/4,i[1]+1);for(let p=h;p<=d;p+=c){const b=p-o;b>=i[0]&&b<i[1]&&l.push(b)}}return l},e.tickFormat=(r,i)=>{if(!t)return;if(i)throw new Error("Locus scale's tickFormat does not support a specifier!");const o=e.domain(),a=o[1]-o[0],s=e.numberingOffset(),l=pi(o[0],o[1],Math.min(r,Math.ceil(a)))<1e6?Nt(","):Nt(".3s"),u=f=>f-t.toChromosome(f).continuousStart;return f=>l(u(f)+s)};const n=e.copy;return e.copy=()=>n().genome(t),e}function SD(e){return e.type=="locus"}function ru(e,t,n){if(n=n||[],e.some(a=>a===null)){if(e.every(a=>a===null))return null;throw console.warn(e),new Error("Cannot merge objects with nulls!")}const r={},i=(a,s)=>a===s||Bo(a)&&Bo(s)||Bo(a)&&s===!0||a===!0&&Lt(s),o=a=>{for(let s in a){const c=a[s];if(!n.includes(s)&&c!==void 0)if(r[s]!==void 0&&!i(r[s],c))console.warn(`Conflicting property ${s} of ${t}: (${JSON.stringify(r[s])} and ${JSON.stringify(a[s])}). Using ${JSON.stringify(r[s])}.`);else{const l=r[s];if(Bo(l))Bo(c)&&(r[s]=ru([l,c],s));else if(Bo(c)){if(!(l===!0||l===void 0))throw new Error("Bug in merge! Target is: "+l);r[s]=ru([{},c],s)}else r[s]=c}}};for(const a of e)o(a);return r}function Bo(e){return Lt(e)&&!Array.isArray(e)}/*!
|
|
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 B2(e,t,n){return jt(t)&&n!=null&&(t=Math.min(t,~~(zc(e.domain())/n)||1)),Lt(t)&&(t.step,t=t.interval),t}function R2(e,t,n){var r=e.range(),i=Math.floor(r[0]),o=Math.ceil(Tn(r));if(i>o&&(r=o,o=i,i=r),t=t.filter(function(s){return s=e(s),i<=s&&s<=o}),n>0&&t.length>1){for(var a=[t[0],Tn(t)];t.length>n&&t.length>=3;)t=t.filter(function(s,c){return!(c%2)});t.length<3&&(t=a)}return t}function _D(e,t){return e.bins?R2(e,CD(e.bins,t)):e.ticks?e.ticks(t):e.domain()}function CD(e,t){var n=e.length,r=~~(n/(t||n));return r<2?e.slice():e.filter(function(i,o){return!(o%r)})}function TD(e,t,n){var r=e.tickFormat?e.tickFormat(t,n):n?Nt(n):String;if(Sb(e.type)){var i=DD(n);r=e.bins?i:ID(r,i)}return r}function ID(e,t){return function(n){return e(n)?t(n):""}}function DD(e){var t=uo(e||",");if(t.precision==null){switch(t.precision=12,t.type){case"%":t.precision-=2;break;case"e":t.precision-=1;break}return kD(Nt(t),Nt(".1f")(1)[1])}else return Nt(t)}function kD(e,t){return function(n){var r=e(n),i=r.indexOf(t),o,a;if(i<0)return r;for(o=BD(r,i),a=o<r.length?r.slice(o):"";--o>i;)if(r[o]!=="0"){++o;break}return r.slice(0,o)+a}}function BD(e,t){var n=e.lastIndexOf("e"),r;if(n>0)return n;for(n=e.length;--n>t;)if(r=e.charCodeAt(n),r>=48&&r<=57)return n+1}/*!
|
|
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 RD="locus",FD="index";var MD=5;function PD(e){const t=e.type;return!e.bins&&(t===Co||t===us||t===fs)}function F2(e){return Rt(e)&&![jn,FD,RD].includes(e)}function M2(e){return e||{warn:(t,...n)=>console.warn(t,...n)}}var LD=Uc(["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 P2(e,t,n){n=M2(n);for(const r in e)if(!LD[r]){if(r==="padding"&&F2(t.type))continue;dn(t[r])?t[r](e[r]):n.warn("Unsupported scale property: "+r)}qD(t,e,VD(t,e,UD(t,e,n)))}function ND(e,t){const n=OD(e),r=Xe(n);if(!r)throw new Error("Unknown scale type: "+n);const i=r();return!e.domain&&Rt(i.type)&&(e.domain=[0,0]),P2(e,i,t),i}function OD(e){var t=e.type,n="",r;return t===jn?jn+"-"+Co:(zD(e)&&(r=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=r===2?jn+"-":r===3?To+"-":""),(n+t||Co).toLowerCase())}function zD(e){const t=e.type;return Rt(t)&&t!==mb&&t!==bb&&(e.scheme||e.range&&e.range.length&&e.range.every(it))}function UD(e,t,n){if(!e.domain)return 0;n=M2(n);var r=GD(e,t.domainRaw,n);if(r>-1)return r;var i=t.domain,o=e.type,a=t.zero||t.zero===void 0&&PD(e),s,c;return i?(F2(o)&&t.padding&&i[0]!==Tn(i)&&(i=HD(o,i,t.range,t.padding,t.exponent,t.constant)),(a||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(s=(i=i.slice()).length-1||1,a&&(i[0]>0&&(i[0]=0),i[s]<0&&(i[s]=0)),t.domainMin!=null&&(i[0]=t.domainMin),t.domainMax!=null&&(i[s]=t.domainMax),t.domainMid!=null&&(c=t.domainMid,(c<i[0]||c>i[s])&&n.warn("Scale domainMid exceeds domain min or max.",c),i.splice(s,0,c))),e.domain(L2(o,i,n)),o===Vh&&e.unknown(t.domainImplicit?uh:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&B2(e,t.nice)||null),i.length):0}function GD(e,t,n){return t?(e.domain(L2(e.type,t,n)),t.length):-1}function HD(e,t,n,r,i,o){n??(n=[0,1]);var a=Math.abs(Tn(n)-n[0]),s=a/(a-2*r),c=e===Ur?Up(t,null,s):e===fs?Ku(t,null,s,.5):e===us?Ku(t,null,s,i||1):e===zl?o3(t,null,s,o||1):zp(t,null,s);return t=t.slice(),t[0]=c[0],t[t.length-1]=c[1],t}function L2(e,t,n){if(Sb(e)){var r=Math.abs(t.reduce(function(i,o){return i+(o<0?-1:o>0?1:0)},0));r!==t.length&&n.warn("Log scale domain includes zero: "+$u(t))}return t}function VD(e,t,n){let r=t.bins;if(r&&!Bt(r)){const i=(r.start==null||r.stop==null)&&e.domain(),o=r.start==null?i[0]:r.start,a=r.stop==null?Tn(i):r.stop,s=r.step;s||yt("Scale bins parameter missing step property."),r=Fa(o,a+s,s)}return r?e.bins=r:e.bins&&delete e.bins,e.type===jh&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function qD(e,t,n){var r=e.type,i=t.round||!1,o=t.range;if(t.rangeStep!=null)o=jD(r,t,n);else if(t.scheme&&(o=WD(r,t,n),dn(o))){if(e.interpolator)return e.interpolator(o);yt(`Scale type ${r} does not support interpolating color schemes.`)}if(o&&Gl(r))return e.interpolator(Hl(yd(o,t.reverse),t.interpolate,t.interpolateGamma));o&&t.interpolate&&e.interpolate?e.interpolate(_b(t.interpolate,t.interpolateGamma)):dn(e.round)?e.round(i):dn(e.rangeRound)&&e.interpolate(i?cs:Or),o&&e.range(yd(o,t.reverse))}function jD(e,t,n){e!==xb&&e!==qh&&yt("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===qh?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*Gh(n,i,r)]}function WD(e,t,n){var r=t.schemeExtent,i,o;return Bt(t.scheme)?o=Hl(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),o=Zh(i),o||yt(`Unrecognized scheme name: ${t.scheme}`)),n=e===wb?n+1:e===jh?n-1:e===Hh||e===yb?+t.schemeCount||MD:n,Gl(e)?N2(o,r,t.reverse):dn(o)?D5(N2(o,r),n):e===Vh?o:o.slice(0,n)}function N2(e,t,n){return dn(e)&&(t||n)?I5(e,yd(t||[0,1],n)):e}function yd(e,t){return t?e.slice().reverse():e}const O2=Nt(",d");function ZD(e,t){return e.chrom+":"+O2(Math.floor(e.pos+1))+"-"+(e.chrom!=t.chrom?t.chrom+":":"")+O2(Math.ceil(t.pos))}const z2={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 dR=/^([A-Za-z]+:)?\/\//;function xl(e,t){if(t&&dR.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 Iw(n)+t}function Iw(e){const t=e.replace(/[^/]*$/,"");return t===""?void 0:t.endsWith("://")?e+"/":t}class pR{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(!G0(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,Dw(this.config))this.setChromSizes(this.config.contigs);else if(!H0(this.config)){const n=hR(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(H0(this.config))try{const n=xl(t,this.config.url),r=await fetch(n);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);this.setChromSizes(gR(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 s=o.name.replace(/^chr/i,"");for(const a of["chr"+s,"CHR"+s,"Chr"+s,o.number,""+o.number,s,o.name])this.cumulativeChromPositions.set(a,n),this.chromosomesByName.set(a,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=Ur(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 fR(...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(a=>a.name===n.chrom),s=this.chromosomes.findIndex(a=>a.name===r.chrom);i.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[o].size});for(let a=o+1;a<s;a++)i.push({chrom:this.chromosomes[a].name,startPos:0,endPos:this.chromosomes[a].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(a=>a===void 0)){const a=this.getChromosome(r);return a?[a.continuousStart,a.continuousEnd]:void 0}const i=n[3]||r,o=parseInt(n[2].replace(/,/g,"")),s=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):o;return[this.toContinuous(r,o-1),this.toContinuous(i,s)]}}}function gR(e){return aC(e).map(([t,n])=>({name:t,size:parseInt(n)}))}function Bw(e){return Et(e)&&"chrom"in e}function mR(e){return e.every(Bw)}function G0(e){return Et(e)&&("name"in e||H0(e)||Dw(e))}function H0(e){return G0(e)&&"url"in e}function Dw(e){return G0(e)&&"contigs"in e}class Al extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof Al&&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 V0 extends Al{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 Fw extends Al{constructor(){super(),this.type="ordinal",this.uniqueValues=new Set}extend(t){return t==null||Number.isNaN(t)?this:(this.uniqueValues.has(t)||(this.uniqueValues.add(t),this.push(t)),this)}}class Rw extends Fw{constructor(){super(),this.type="nominal"}}class bR extends Al{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 Mw={quantitative:V0,index:V0,locus:V0,nominal:Rw,ordinal:Fw};function Pw(e,t){if(e=="quantitative"&&yR(t)){const n=new bR(t);return n.type=e,n}else if(Mw[e]){const n=new Mw[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function yR(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function wR(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function vR(e,t,n){return e*Math.pow(t/e,n)}ke("index",z0,["continuous"]),ke("locus",GF,["continuous"]),ke("null",B0,[]);const Nw="quantitative",Lw="ordinal",Ow="nominal",zw="locus",xR="index";class AR{constructor(t){J(this,oe);J(this,Br);J(this,Ks,{domain:new Set,range:new Set});J(this,nn);J(this,wu,new Set);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){z(this,Ks)[t].add(n)}removeEventListener(t,n){z(this,Ks)[t].delete(n)}addMember(t){var s;const{channel:n,channelDef:r}=t,i=n=="sample"?"nominal":r.type,o=(s=r==null?void 0:r.scale)==null?void 0:s.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&&!Wy(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=z(this,nn);if(!t||t.type=="null")return;const n=Q(this,oe,r_).call(this),r=t.domain(),i=Q(this,oe,fm).call(this,!0);if(Sw({...i,range:void 0},t),t.props=i,Q(this,oe,hm).call(this),wt(t.type)&&le(this,Br,Q(this,oe,pm).call(this)),!n){Q(this,oe,Lr).call(this,"domain");return}const o=t.domain();cc(o,r)||(this.isZoomable()?t.domain(r):Q(this,oe,Lo).call(this)?(t.domain(r),this.zoomTo(o,500)):Q(this,oe,Lr).call(this,"domain"))}get scale(){if(z(this,nn))return z(this,nn);const t=Q(this,oe,fm).call(this),n=tR({...t,range:void 0});n.props=t,"unknown"in n&&n.unknown(null),le(this,nn,n),Q(this,oe,hm).call(this),HF(n)&&n.genome(this.getGenome()),wt(n.type)&&le(this,Br,Q(this,oe,pm).call(this));const r=n.range;if(r){const i=()=>Q(this,oe,Lr).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 Q(this,oe,Lo).call(this)&&cc(Q(this,oe,gh).call(this),this.getDomain())}isZoomable(){return Q(this,oe,Lo).call(this)&&!!this.scale.props.zoom}zoom(t,n,r){if(!Q(this,oe,Lo).call(this))return!1;const i=this.scale,o=i.domain();let s=[...o],a=i.invert(n);switch(i.props.reverse&&(r=-r),"align"in i&&(a+=i.align()),i.type){case"linear":case"index":case"locus":s=v_(s,r||0),s=Tm(s,a,t);break;case"log":s=x_(s,r||0),s=km(s,a,t);break;case"pow":case"sqrt":{const u=i;s=A_(s,r||0,u.exponent()),s=vh(s,a,t,u.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return z(this,Br)&&(s=S_(s,z(this,Br)[0],z(this,Br)[1])),[0,1].some(u=>s[u]!=o[u])?(i.domain(s),Q(this,oe,Lr).call(this,"domain"),!0):!1}async zoomTo(t,n=!1){if(ha(n)&&(n=n?700:0),!Q(this,oe,Lo).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(t),i=z(this,oe,um).animator,o=this.scale,s=o.domain();if(n>0&&s.length==2){const a=s[1]-s[0],u=r[1]-r[0],l=s[0]+a/2,c=r[0]+u/2,f=s[0]==r[0],h=s[1]==r[1];await i.transition({duration:n,easingFunction:wR,onUpdate:d=>{const p=vR(a,u,d),m=a==u?d:(a-p)/(a-u),y=m*c+(1-m)*l,w=[f?s[0]:y-p/2,h?s[1]:y+p/2];o.domain(w),Q(this,oe,Lr).call(this,"domain")}}),o.domain(r),Q(this,oe,Lr).call(this,"domain")}else o.domain(r),i==null||i.requestRender(),Q(this,oe,Lr).call(this,"domain")}resetZoom(){if(!Q(this,oe,Lo).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=Q(this,oe,gh).call(this);return[0,1].some(r=>n[r]!=t[r])?(z(this,nn).domain(n),Q(this,oe,Lr).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?Vu(z(this,Br))/Vu(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=z(this,oe,um).genomeStore)==null?void 0:n.getGenome();if(!t)throw new Error("No genome has been defined!");return t}invertToComplex(t){const n=this.scale;if("invert"in n){const r=n.invert(t);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(t){const n=this.getGenome();return n?n.toChromosomal(t):t}fromComplex(t){return Bw(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&mR(t)?this.getGenome().toContinuousInterval(t):t}}Br=new WeakMap,Ks=new WeakMap,nn=new WeakMap,wu=new WeakMap,oe=new WeakSet,lm=function(){return this.members[0].view},um=function(){return z(this,oe,lm).context},Lr=function(t){for(const n of z(this,Ks)[t].values())n({type:t,scaleResolution:this})},cm=function(){return!!Q(this,oe,dm).call(this)},r_=function(){const t=z(this,nn);if(!t)return!1;const n=t.domain();return wt(t.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},i_=function(){const t=this.members.map(n=>n.channelDef.scale).filter(n=>n!==void 0);return lf(t,"scale",["domain"])},fm=function(t=!1){const n=Q(this,oe,i_).call(this);if(n===null||n.type=="null")return{type:"null"};const r={...Q(this,oe,o_).call(this,this.type),...n};r.type||(r.type=ER(this.channel,this.type));const i=Q(this,oe,gh).call(this,t);return i&&i.length>0?r.domain=i:ti(r.type)&&(r.domain=new Rw),!r.domain&&r.domainMid!==void 0&&(r.domain=[r.domainMin??0,r.domainMax??1]),this.channel=="y"&&ti(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),SR(r,this.channel),r},hm=function(){const t=z(this,nn).props,n=t.range;if(z(this,wu).forEach(i=>i.invalidate()),!n||!yt(n))return;const r=(i,o)=>o?i.slice().reverse():i;if(n.some(Mt)){let i;const o=()=>{z(this,nn).range(r(i.map(s=>s()),t.reverse))};i=n.map(s=>{if(Mt(s)){const a=z(this,oe,lm).paramMediator.createExpression(s.expr);return a.addListener(o),z(this,wu).add(a),()=>a(null)}else return()=>s}),o()}else z(this,nn).range(r(n,t.reverse))},gh=function(t=!1){return Q(this,oe,dm).call(this)??(this.type==zw?this.getGenome().getExtent():t?this.getDataDomain():[])},dm=function(){const t=this.members.map(n=>n.channelDef).filter(n=>{var r;return(r=n.scale)==null?void 0:r.domain}).map(n=>Pw(n.type,this.fromComplexInterval(n.scale.domain)));if(t.length>0)return t.reduce((n,r)=>n.extendAll(r))},Lo=function(){const t=this.scale.type;return wt(t)},pm=function(){const t=this.scale.props,n=t.zoom;if(_R(n)&&yt(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():z(this,nn).domain()},o_=function(t){const n=this.channel,r={};return Q(this,oe,cm).call(this)&&(r.zero=!1),dl(n)?r.nice=!Q(this,oe,cm).call(this):oi(n)?r.scheme=t==Ow?"tableau10":t==Lw?"blues":"viridis":tf(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 ER(e,t){if(t==xR||t==zw){if($y(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][[Ow,Lw,Nw].indexOf(t)]:t==Nw?"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 SR(e,t){dl(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&wt(e.type)&&(e.clamp=!0)}function _R(e){return Et(e)}function $0(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of zt(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function j0(...e){for(const t of e)if(t!==void 0)return t}class CR{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=za(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 sf(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:lf(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=o=>{var a;const s=SD(o.view,o.channel);if(!fn(s))return{member:o,explicitTitle:j0("axis"in s?(a=s.axis)==null?void 0:a.title:void 0,s.title),implicitTitle:j0(ii(s)?s.field:void 0,hl(s)?s.expr:void 0)}},n=this.members.map(t),r=n.filter(o=>{var s;if(Wy(o.member.channel)&&!o.explicitTitle){const a=io(o.member.channel);return((s=n.find(u=>u.member.view==o.member.view&&u.member.channel==a))==null?void 0:s.explicitTitle)===void 0}return!0}),i=new Set(r.map(o=>j0(o.explicitTitle,o.implicitTitle)).filter(Ge));return i.size?[...i].join(", "):null}}function Uw(e,t,{spacing:n,devicePixelRatio:r,offset:i,reverse:o}={}){n=n||0,i=i||0;let s=0,a=0;for(const p of e)s+=uf(p.px)+(q0(p)?0:n),a+=uf(p.grow);s-=n;const u=Math.max(0,t-s),l=r!==void 0?p=>Math.round(p*r)/r:p=>p,c=[],f=[],h=p=>{const m=c.length;if(!m)return;const y=(p?n:0)*(o?-1:1);d-=y;for(let w=0;w<m;w++)f.push({location:d+(w+1)/(m+1)*y,size:0});d+=y,c.length=0};let d=o?Math.max(t,s):0+i;if(e.length==1&&q0(e[0]))return[{location:d,size:0}];for(let p=0;p<e.length;p++){const m=e[p];if(q0(m))c.push(m);else{h(f.length>0);const y=uf(m.px)+(a?uf(m.grow)/a*u:0);o&&(d-=y),f.push({location:l(d),size:l(y)}),o?d-=n:d+=y+n}}return d+=o?n:-n,h(!1),f}function TR(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 tm=class tm{constructor(t,n){J(this,vu);this.width=t,this.height=n}addPadding(t){return Q(this,vu,gm).call(this,t.width,t.height)}subtractPadding(t){return Q(this,vu,gm).call(this,-t.width,-t.height)}isGrowing(){return!!(this.width.grow||this.height.grow)}};vu=new WeakSet,gm=function(t,n){return new tm({px:(this.width.px??0)+t,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let si=tm;const El=Object.freeze({px:0,grow:0}),Gw=new si(El,El);function q0(e){return!e.px&&!e.grow}function uf(e){return e||0}function kR(e){return e&&(Dt(e.px)||Dt(e.grow))}function Hw(e){if(jw(e))throw new Error("parseSizeDef does not accept step-based sizes.");if(kR(e))return e;if(Dt(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 kt{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 kt(this.top+t,this.right+t,this.bottom+t,this.left+t)}add(t){return new kt(this.top+t.top,this.right+t.right,this.bottom+t.bottom,this.left+t.left)}subtract(t){return new kt(this.top-t.top,this.right-t.right,this.bottom-t.bottom,this.left-t.left)}union(t){return new kt(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 kt(0,this.right,0,this.left)}getVertical(){return new kt(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):W0}static createFromRecord(t){return new kt(t.top,t.right,t.bottom,t.left)}static zero(){return W0}static createUniformPadding(t){return new kt(t,t,t,t)}}const W0=kt.createUniformPadding(0);Object.freeze(W0);function Sl(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}function IR(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 BR="VISIT_SKIP",_l="VISIT_STOP",Vw=e=>e;class $w{constructor(t,n,r,i,o,s={}){J(this,ur);J(this,Js,{});J(this,xu,{});J(this,Au,{});J(this,Eu);J(this,Su);Bt(this,"opacityFunction",Vw);Bt(this,"facetCoords",new hr([],JSON.stringify));var a;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:{}},cw(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...s},this.needsAxes={x:!1,y:!1},this.paramMediator=new bD(()=>{var u;return(u=this.dataParent)==null?void 0:u.paramMediator}),t.params)for(const u of t.params)this.paramMediator.registerParam(u);if(!((a=this.layoutParent)!=null&&a.options.layeredChildren)){const u=l=>this.paramMediator.findMediatorForParam(l)?void 0:this.paramMediator.allocateSetter(l,0);le(this,Su,u("height")),le(this,Eu,u("width"))}}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>kt.createFromConfig(this.spec.padding))}getOverhang(){return kt.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new si(Q(this,ur,Lu).call(this,"width"),Q(this,ur,Lu).call(this,"height")):Gw)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return Gw;const t=this.getSize();return new si(Q(this,ur,Lu).call(this,"viewportWidth")??t.width,Q(this,ur,Lu).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 Q(this,ur,mm).call(this,"layoutParent")}getDataAncestors(){return Q(this,ur,mm).call(this,"dataParent")}handleBroadcast(t){for(const n of z(this,Js)[t.type]||[])n(t)}_addBroadcastHandler(t,n){let r=z(this,Js)[t];r||(r=[],z(this,Js)[t]=r),r.push(n)}handleInteractionEvent(t,n,r){const i=r?z(this,xu):z(this,Au);for(const o of i[n.type]||[])o(t,n)}addInteractionEventListener(t,n,r){const i=r?z(this,xu):z(this,Au);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!==_l)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===Vw)&&(this.opacityFunction=FR(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=z(this,Eu))==null||i.call(this,n.width),(o=z(this,Su))==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 ii(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(t){const n=io(t);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(t){const n=io(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 xl(()=>{var t;return(t=this.dataParent)==null?void 0:t.getBaseUrl()},IR(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const t=this.spec.title;if(t)return Ge(t)?t:Mt(t.text)?this.paramMediator.evaluateAndGet(t.text.expr):t.text}_cache(t,n){return sf(this,t,n)}_invalidateCacheByPrefix(t,n="self"){switch(n){case"self":af(this,t);break;case"ancestors":for(const r of this.getLayoutAncestors())af(r,t);break;case"progeny":this.visit(r=>af(r,t));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(t){}}Js=new WeakMap,xu=new WeakMap,Au=new WeakMap,Eu=new WeakMap,Su=new WeakMap,ur=new WeakSet,Lu=function(t){var i;let n=this.spec[t];const r=t=="viewportWidth"||t=="viewportHeight";if(jw(n)){if(r)throw new so(`Cannot use step-based size with "${t}"!`,this);const o=n.step,s=(i=this.getScaleResolution(t=="width"?"x":"y"))==null?void 0:i.scale;if(s){let a=0;if(ti(s.type))a=s.domain().length;else if(["locus","index"].includes(s.type)){const l=s.domain();a=za(l)-l[0]}else throw new so(`Cannot use step-based size with "${s.type}" scale!`,this);const u=s;return a=c0(a,u.paddingInner(),u.paddingOuter()),{px:a*o,grow:0}}else throw new so("Cannot use 'step' size with missing scale!",this)}else return(n&&Hw(n))??(r?void 0:{px:0,grow:1})},mm=function(t){const n=[];let r=this;do n.push(r),r=r[t];while(r);return n};function DR(e){return"unitsPerPixel"in e}function FR(e){const t="opacity"in e.spec?e.spec.opacity:void 0;if(t!==void 0){if(Dt(t))return n=>n*t;if(DR(t)){const n=o=>{var a;const s=(a=e.getScaleResolution(o))==null?void 0:a.scale;if(["linear","index","locus"].includes(s==null?void 0:s.type))return s},r=t.channel?n(t.channel):n("x")??n("y");if(!r)throw new so("Cannot find a resolved quantitative scale for dynamic opacity!",e);const i=n0().domain(t.unitsPerPixel).range(t.values).clamp(!0);return o=>{const a=Vu(r.domain())/1e3;return i(a)*o}}else if(Mt(t)){const n=e.paramMediator.createExpression(t.expr);return n.addListener(()=>e.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const jw=e=>!!(e!=null&&e.step),RR={point:EF,rect:bF,rule:TF,link:MF,text:UF};class Kt extends $w{constructor(n,r,i,o,s,a){super(n,r,i,o,s,a);J(this,fh);J(this,_u);this.spec=n;const u=RR[this.getMarkType()];if(u)this.mark=new u(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),le(this,_u,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(l=>{var c;return(c=this.getScaleResolution(l))==null?void 0:c.addEventListener("domain",()=>z(this,_u).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0},Q(this,fh,s_).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(!Xt(o))continue;const s=io(o.resolutionChannel??i);if(!pl(s)||n=="axis"&&!dl(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"&&dl(i)&&$y(s))a.resolutions[n][s]||(a.resolutions[n][s]=new CR(s)),a.resolutions[n][s].addMember({view:this,channel:i,channelDef:o});else if(n=="scale"&&pl(i)){if(!a.resolutions[n][s]){const l=new AR(s);a.resolutions[n][s]=l,l.addEventListener("range",c=>{var f;(f=this.context.glHelper)==null||f.createRangeTexture(c.scaleResolution,!0)})}const u=this.getLayoutAncestors().some(l=>!l.options.contributesToScaleDomain)||Xt(o)&&o.contributesToScaleDomain===!1?void 0:this.extractDataDomain.bind(this);a.resolutions[n][s].addMember({view:this,channel:i,channelDef:o,dataDomainSource:u})}}}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=Pw(r);return(((o=this.mark.encoders[n])==null?void 0:o.accessors)??[]).filter(s=>s.scaleChannel).forEach(s=>{if(s.constant)i.extend(s({}));else{const a=this.getCollector();a!=null&&a.completed&&a.visitData(u=>i.extend(s(u)))}}),i}getZoomLevel(){const n=r=>{var i;return((i=this.getScaleResolution(r))==null?void 0:i.getZoomLevel())??1};return us.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"}}_u=new WeakMap,fh=new WeakSet,s_=function(){for(const[n,r]of this.paramMediator.paramConfigs){if(!("select"in r))continue;const i=zy(r.select);if(I0(i)){let s=0;const a=this.paramMediator.getSetter(n),u=()=>{var f;const c=this.context.getCurrentHover();return((f=c==null?void 0:c.mark)==null?void 0:f.unitView)===this?c.datum:null},l=(c,f)=>{const h=f.uiEvent,d=u(),p=d?d[cn]:0;let m;if(i.toggle)if(h.shiftKey){if(d){const w=this.paramMediator.getValue(n);m=hD(w,{toggle:[d]})}}else m=Ny(d?[d]:null);else p!=s&&(s=p,m=Py(d));m!==void 0&&a(m)};this.addInteractionEventListener(["mouseover","pointerover"].includes(i.on)?"mousemove":"click",l)}}};function*Z0(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of Z0(r,[...t,n]))yield i;else yield[[...t,n],r]}const qw=2147483647,MR=Ww([qw]);function Ww(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 PR(e){const t=Ww(e);let n=Array.from({length:e.length},(o,s)=>s),r=new Array(e.length);const i=new Array(16);for(let o=0;o<t;o++){i.fill(0);const s=o*4,a=Math.pow(16,o),u=l=>{const c=e[n[l]];return o>=MR?c>qw?Math.floor(c/a)%16:0:c>>s&15};for(let l=0;l<e.length;l++)i[u(l)]++;for(let l=1;l<16;l++)i[l]+=i[l-1];for(let l=e.length-1;l>=0;l--)r[--i[u(l)]]=n[l];[n,r]=[r,n]}return n}class Zw extends C0{constructor(n){super();J(this,rn);J(this,Dr,[]);J(this,Cu,Fe(cn));J(this,Do,[]);J(this,Fo);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=new hr([],JSON.stringify),Q(this,rn,bm).call(this)}get behavior(){return _0}get label(){return"collect"}reset(){super.reset(),Q(this,rn,bm).call(this)}handle(n){z(this,Dr).push(n)}beginBatch(n){fD(n)&&(le(this,Dr,[]),this.facetBatches.set(zt(n.facetId),z(this,Dr)))}complete(){var o,s;le(this,Dr,[]);const n=(o=this.params)==null?void 0:o.sort,r=n?Im(n.field,n.order):void 0,i=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),u=this.params.groupby.map(c=>Fe(c)),l=u.length>1?Yu(a,...u):NR(a,u[0]);this.facetBatches.clear();for(const[c,f]of Z0(l))this.facetBatches.set(c,f)}for(const a of this.facetBatches.values())i(a);Q(this,rn,a_).call(this),Q(this,rn,ym).call(this),super.complete();for(const a of this.observers)a(this)}repropagate(){for(const n of this.children)n.reset();Q(this,rn,ym).call(this);for(const n of this.children)n.complete()}getData(){switch(Q(this,rn,wm).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){Q(this,rn,wm).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(!z(this,Do).length)return;const r=Vo(u=>u.start).right,i=z(this,Cu),o=Vo(u=>i(s(u))).left,s=u=>{const l=r(z(this,Fo),u),c=z(this,Fo)[l-1];return!c||u>=c.stop?void 0:this.facetBatches.get(c.facetId)[u-c.start]},a=o(z(this,Do),n);if(a>=0){const u=s(z(this,Do)[a]);if(u&&i(u)===n)return u}}}Dr=new WeakMap,Cu=new WeakMap,Do=new WeakMap,Fo=new WeakMap,rn=new WeakSet,bm=function(){le(this,Dr,[]),this.facetBatches.clear(),this.facetBatches.set(void 0,z(this,Dr))},ym=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])}},wm=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},a_=function(){var s;le(this,Fo,[]);const n=(s=this.facetBatches.values().next().value)==null?void 0:s[0];if(n==null||!(cn in n))return;let r=0;const i=[],o=z(this,Cu);for(const[a,u]of this.facetBatches){z(this,Fo).push({start:r,stop:r+u.length,facetId:a}),r+=u.length;for(let l=0,c=u.length;l<c;l++)i.push(o(u[l]))}le(this,Do,PR(i))};function NR(e,t){const n=new Map;for(let r=0,i=e.length;r<i;r++){const o=e[r],s=t(o);let a=n.get(s);a||(a=[],n.set(s,a)),a.push(o)}return n}class cf{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 s=(o<<1)+1;const a=s+1;let u=this.ids[s],l=this.values[s];const c=this.values[a];if(a<this.length&&c<l&&(s=a,u=this.ids[a],l=c),l>=r)break;this.ids[o]=u,this.values[o]=l,o=s}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 LR extends lt{get behavior(){return Qn}constructor(t){super(t),this.params=t,this.startAccessor=Fe(t.start),this.endAccessor=Fe(t.end),this.chromAccessor=t.chrom?Fe(t.chrom):n=>{},this.weightAccessor=t.weight?Fe(t.weight):n=>1,this.as={coverage:t.as??"coverage",start:t.asStart??t.start,end:t.asEnd??t.end,chrom:t.asChrom??t.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([n,r])=>r).map(([n,r])=>`${JSON.stringify(r)}: ${n}`).join(", ")+"};"),this.ends=new cf}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,s=this.chromAccessor,a=this.weightAccessor;let u,l,c,f=0,h=NaN;const d=this.ends;d.clear();const p=w=>{this._propagate(w),u=null},m=(w,A,_)=>{if(w==A)return;let S=!1;u&&(u[t]===_?(u[n]=A,S=!0):u[t]!=0&&p(u)),S||(u=this.createSegment(w,A,_,c))},y=()=>{let w=0;for(;(w=d.peekValue())!==void 0;)m(h,w,f),h=w,f-=d.pop();h=NaN,u&&p(u)};this.handle=w=>{const A=i(w);let _=0;for(;(_=d.peekValue())!==void 0&&_<A;)m(h,_,f),h=_,f-=d.pop();if(r){let T=s(w);T!==l&&(y(),c=T,l=c)}isNaN(h)||m(h,A,f),h=A;const S=a(w);f+=S,d.push(S,o(w))},this.complete=()=>{y(),super.complete()},this.beginBatch=w=>{y(),l=null,super.beginBatch(w)}}}function OR(e,t,n=0,r=e.length){const i=new cf,o=r-n;let s;for(s=0;s<t&&s<o;s++)i.push(s,e[n+s]);for(;s<o;s++){const l=e[n+s];l>=i.peekValue()&&(i.push(s,l),i.pop())}const a=[];let u;for(;(u=i.pop())!==void 0;)a.push(n+u);return a.reverse()}class zR{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 UR extends lt{get behavior(){return _0}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=Fe(this.params.pos),this.posBisector=Vo(this.posAccessor),this.scoreAccessor=Fe(this.params.score),this.widthAccessor=Fe(this.params.width),this.laneAccessor=this.params.lane?Fe(this.params.lane):i=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=n.getScaleResolution(this.channel);const r=()=>this._filterAndPropagate();this.schedule=()=>n.context.animator.requestTransition(r),this.resolution.addEventListener("domain",i=>this.schedule()),n._addBroadcastHandler("layoutComputed",()=>this.schedule())}complete(){const t=this.posAccessor;this._data.sort((n,r)=>t(n)-t(r)),this._scores=this._data.map(this.scoreAccessor);for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new zR(200));this.schedule(),super.complete()}_filterAndPropagate(){super.reset();const t=this.resolution.scale,n=this.resolution.getAxisLength();if(!n)return;for(const s of this.reservationMaps.values())s.reset();const r=t.domain(),o=OR(this._scores,70,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of o){const a=this._data[s],u=t(this.posAccessor(a))*n,l=this.widthAccessor(a)/2+this.padding;this.reservationMaps.get(this.laneAccessor(a)).reserve(u-l,u+l)&&this._propagate(a)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class GR extends lt{constructor(t,n){super(t,n),this.params=t,this.predicate=void 0}initialize(){let t="";if(HR(this.params))t=this.params.expr;else if(VR(this.params))t=Ly(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 HR(e){return"expr"in e}function VR(e){return"param"in e}class $R extends lt{get behavior(){return Qn}constructor(t){super(t),this.params=t;const n=t.index;if(t.fields){const r=zt(t.fields).map(o=>Fe(o)),i=zt(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 s=r.map((u,l)=>u(o)??[]),a=s[0].length;for(let u=0;u<a;u++){const l=Object.assign({},o);for(let c=0;c<r.length;c++)l[i[c]]=u<s[c].length?s[c][u]:null;n&&(l[n]=u),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 jR=48;function*qR(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-jR}yield r}class WR extends lt{get behavior(){return Qn}constructor(t){super(t);const n=Fe(t.exons??"exons"),r=Fe(t.start??"start"),[i,o]=t.as||["exonStart","exonEnd"];this.handle=s=>{let a=r(s),u=a,l=!0;const c=n(s);for(const f of qR(c)){if(l)u=a+f;else{a=u+f;const h=Object.assign({},s);h[i]=u,h[o]=a,this._propagate(h)}l=!l}}}}class ZR extends lt{get behavior(){return Qn}constructor(t){super(t);const n=zt(t.field).map(o=>Fe(o)),r=zt(t.separator),i=zt(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(u=>!u(o)))return;const s=n.map((u,l)=>u(o).split(r[l]));YR(s,o);const a=s[0].length;for(let u=0;u<a;u++){const l=Object.assign({},o);for(let c=0;c<n.length;c++)l[i[c]]=s[c][u];this._propagate(l)}}}}function YR(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 QR extends lt{get behavior(){return ri}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 Yw extends lt{get behavior(){return ri}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=Fe(t.chrom),s=zt(t.pos).map(p=>Fe(p)),a=zt(t.as);if(s.length!=a.length)throw new Error('The number of "pos" and "as" elements must be equal!');const u=zt(t.offset);let l;if(u.length==0)l=new Array(s.length).fill(0);else if(u.length==1)l=new Array(s.length).fill(u[0]);else if(u.length==s.length)l=u;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(t.offset)}!`);const c=new Function("datum","chromOffset","posAccessors",a.map((p,m)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${m}](datum) - ${l[m]};`).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 m=o(p),y=d(m);if(y===void 0)throw new Error(`Unknown chromosome/contig "${m}" in datum: ${JSON.stringify(p)}`);c(p,y,s),this._propagate(p)}}}const Qw={pages:["Lato-Regular.png"],chars:[{id:87,width:53,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:43.491,chnl:15,x:0,y:0,page:0},{id:124,width:17,height:50,xoffset:0,yoffset:-32.193000000000005,xadvance:10.521,chnl:15,x:0,y:42,page:0},{id:40,width:20,height:49,xoffset:0,yoffset:-32.571000000000005,xadvance:11.214,chnl:15,x:0,y:94,page:0},{id:41,width:19,height:49,xoffset:0,yoffset:-32.571000000000005,xadvance:11.214,chnl:15,x:0,y:145,page:0},{id:36,width:32,height:49,xoffset:0,yoffset:-34.419000000000004,xadvance:24.360000000000003,chnl:15,x:0,y:196,page:0},{id:125,width:21,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.642000000000001,chnl:15,x:0,y:247,page:0},{id:91,width:22,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.852,chnl:15,x:0,y:297,page:0},{id:93,width:19,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.852,chnl:15,x:0,y:347,page:0},{id:123,width:21,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.642000000000001,chnl:15,x:0,y:397,page:0},{id:106,width:19,height:48,xoffset:0,yoffset:-30.639000000000003,xadvance:10.08,chnl:15,x:0,y:447,page:0},{id:81,width:43,height:47,xoffset:0,yoffset:-30.429000000000002,xadvance:33.621,chnl:15,x:21,y:447,page:0},{id:77,width:45,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:38.997,chnl:15,x:66,y:447,page:0},{id:64,width:43,height:44,xoffset:0,yoffset:-28.539,xadvance:35.133,chnl:15,x:23,y:397,page:0},{id:92,width:28,height:43,xoffset:0,yoffset:-30.933000000000003,xadvance:18.984,chnl:15,x:68,y:397,page:0},{id:47,width:28,height:43,xoffset:0,yoffset:-30.933000000000003,xadvance:18.984,chnl:15,x:98,y:397,page:0},{id:109,width:42,height:32,xoffset:0,yoffset:-21.609,xadvance:34.545,chnl:15,x:113,y:447,page:0},{id:119,width:42,height:31,xoffset:0,yoffset:-21.315,xadvance:32.991,chnl:15,x:157,y:447,page:0},{id:42,width:25,height:42,xoffset:0,yoffset:-31.626,xadvance:17.85,chnl:15,x:128,y:397,page:0},{id:37,width:42,height:41,xoffset:0,yoffset:-30.387,xadvance:33.663000000000004,chnl:15,x:155,y:397,page:0},{id:79,width:42,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:33.621,chnl:15,x:199,y:397,page:0},{id:102,width:24,height:41,xoffset:0,yoffset:-30.534000000000002,xadvance:14.721,chnl:15,x:243,y:397,page:0},{id:100,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.520000000000003,chnl:15,x:269,y:397,page:0},{id:98,width:32,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.520000000000003,chnl:15,x:302,y:397,page:0},{id:56,width:32,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:336,y:397,page:0},{id:38,width:40,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:29.904000000000003,chnl:15,x:370,y:397,page:0},{id:108,width:17,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:9.912,chnl:15,x:412,y:397,page:0},{id:107,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:21.336000000000002,chnl:15,x:431,y:397,page:0},{id:48,width:33,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:464,y:397,page:0},{id:71,width:38,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:30.681,chnl:15,x:21,y:347,page:0},{id:83,width:31,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:22.785,chnl:15,x:61,y:347,page:0},{id:63,width:27,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:18.795,chnl:15,x:94,y:347,page:0},{id:105,width:18,height:41,xoffset:0,yoffset:-30.639000000000003,xadvance:10.08,chnl:15,x:123,y:347,page:0},{id:51,width:32,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:143,y:347,page:0},{id:104,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.436,chnl:15,x:177,y:347,page:0},{id:67,width:37,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:28.056,chnl:15,x:210,y:347,page:0},{id:88,width:37,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.258000000000003,chnl:15,x:249,y:347,page:0},{id:68,width:40,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:31.941000000000003,chnl:15,x:288,y:347,page:0},{id:70,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:23.751,chnl:15,x:330,y:347,page:0},{id:34,width:23,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:15.561000000000002,chnl:15,x:364,y:347,page:0},{id:72,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:32.067,chnl:15,x:389,y:347,page:0},{id:73,width:18,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:11.760000000000002,chnl:15,x:429,y:347,page:0},{id:74,width:24,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:17.745,chnl:15,x:449,y:347,page:0},{id:75,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.825000000000003,chnl:15,x:24,y:297,page:0},{id:76,width:31,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:21.567,chnl:15,x:475,y:347,page:0},{id:66,width:35,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.153000000000002,chnl:15,x:64,y:297,page:0},{id:78,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:32.067,chnl:15,x:101,y:297,page:0},{id:33,width:18,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:11.298,chnl:15,x:141,y:297,page:0},{id:80,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:25.221,chnl:15,x:161,y:297,page:0},{id:65,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:28.434,chnl:15,x:197,y:297,page:0},{id:82,width:36,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:26.313000000000002,chnl:15,x:237,y:297,page:0},{id:35,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:275,y:297,page:0},{id:84,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.801000000000002,chnl:15,x:310,y:297,page:0},{id:85,width:37,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:30.891000000000002,chnl:15,x:346,y:297,page:0},{id:86,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:28.434,chnl:15,x:385,y:297,page:0},{id:39,width:16,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:8.568000000000001,chnl:15,x:425,y:297,page:0},{id:69,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.255000000000003,chnl:15,x:443,y:297,page:0},{id:89,width:36,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:26.208000000000002,chnl:15,x:23,y:247,page:0},{id:90,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:25.284000000000002,chnl:15,x:477,y:297,page:0},{id:49,width:31,height:40,xoffset:0,yoffset:-30.156000000000002,xadvance:24.360000000000003,chnl:15,x:61,y:247,page:0},{id:50,width:32,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:94,y:247,page:0},{id:57,width:32,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:128,y:247,page:0},{id:94,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:162,y:247,page:0},{id:96,width:21,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:16.8,chnl:15,x:196,y:247,page:0},{id:55,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:219,y:247,page:0},{id:54,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:254,y:247,page:0},{id:53,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:289,y:247,page:0},{id:52,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:323,y:247,page:0},{id:103,width:31,height:39,xoffset:0,yoffset:-21.630000000000003,xadvance:21.84,chnl:15,x:358,y:247,page:0},{id:112,width:32,height:39,xoffset:0,yoffset:-21.651,xadvance:23.541,chnl:15,x:391,y:247,page:0},{id:113,width:31,height:39,xoffset:0,yoffset:-21.651,xadvance:23.520000000000003,chnl:15,x:425,y:247,page:0},{id:116,width:25,height:39,xoffset:0,yoffset:-28.182000000000002,xadvance:15.057,chnl:15,x:458,y:247,page:0},{id:121,width:31,height:38,xoffset:0,yoffset:-21.273,xadvance:21.651,chnl:15,x:34,y:196,page:0},{id:59,width:18,height:36,xoffset:0,yoffset:-20.706,xadvance:10.983,chnl:15,x:485,y:247,page:0},{id:43,width:32,height:34,xoffset:0,yoffset:-24.486,xadvance:24.360000000000003,chnl:15,x:67,y:196,page:0},{id:60,width:30,height:33,xoffset:0,yoffset:-23.331000000000003,xadvance:24.360000000000003,chnl:15,x:101,y:196,page:0},{id:62,width:31,height:33,xoffset:0,yoffset:-23.331000000000003,xadvance:24.360000000000003,chnl:15,x:133,y:196,page:0},{id:117,width:30,height:32,xoffset:0,yoffset:-21.273,xadvance:23.415000000000003,chnl:15,x:166,y:196,page:0},{id:99,width:29,height:32,xoffset:0,yoffset:-21.609,xadvance:20.055,chnl:15,x:198,y:196,page:0},{id:110,width:31,height:32,xoffset:0,yoffset:-21.609,xadvance:23.436,chnl:15,x:229,y:196,page:0},{id:111,width:32,height:32,xoffset:0,yoffset:-21.609,xadvance:23.814,chnl:15,x:262,y:196,page:0},{id:126,width:32,height:26,xoffset:0,yoffset:-16.128,xadvance:24.360000000000003,chnl:15,x:201,y:447,page:0},{id:101,width:31,height:32,xoffset:0,yoffset:-21.609,xadvance:22.176000000000002,chnl:15,x:296,y:196,page:0},{id:114,width:25,height:32,xoffset:0,yoffset:-21.651,xadvance:15.288,chnl:15,x:329,y:196,page:0},{id:115,width:27,height:32,xoffset:0,yoffset:-21.609,xadvance:18.186,chnl:15,x:356,y:196,page:0},{id:97,width:28,height:32,xoffset:0,yoffset:-21.651,xadvance:20.874000000000002,chnl:15,x:385,y:196,page:0},{id:118,width:31,height:31,xoffset:0,yoffset:-21.273,xadvance:21.672,chnl:15,x:415,y:196,page:0},{id:61,width:31,height:29,xoffset:0,yoffset:-19.089000000000002,xadvance:24.360000000000003,chnl:15,x:448,y:196,page:0},{id:120,width:30,height:31,xoffset:0,yoffset:-21.273,xadvance:20.916,chnl:15,x:21,y:145,page:0},{id:58,width:18,height:31,xoffset:0,yoffset:-20.706,xadvance:10.5,chnl:15,x:53,y:145,page:0},{id:122,width:28,height:31,xoffset:0,yoffset:-21.273,xadvance:18.984,chnl:15,x:73,y:145,page:0},{id:95,width:28,height:16,xoffset:0,yoffset:0,xadvance:19.278000000000002,chnl:15,x:235,y:447,page:0},{id:45,width:23,height:24,xoffset:0,yoffset:-14.175,xadvance:15.603000000000002,chnl:15,x:481,y:196,page:0},{id:44,width:17,height:21,xoffset:0,yoffset:-4.956,xadvance:9.534,chnl:15,x:103,y:145,page:0},{id:46,width:18,height:15,xoffset:0,yoffset:-4.956,xadvance:9.912,chnl:15,x:0,y:497,page:0},{id:32,width:0,height:0,xoffset:0,yoffset:0,xadvance:10.752,chnl:15,x:20,y:497,page:0}],info:{face:"Lato Regular",size:42,bold:0,italic:0,charset:[" ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~"],unicode:1,stretchH:100,smooth:1,aa:1,padding:[0,0,0,0],spacing:[2,2]},common:{lineHeight:50.400000000000006,base:41.454,scaleW:512,scaleH:512,pages:1,packed:0,alphaChnl:0,redChnl:0,greenChnl:0,blueChnl:0},kernings:[]};class XR extends lt{get behavior(){return ri}constructor(t){super(t),this.params=t;const n=N0(Qw),r=Fe(t.field),i=t.as,o=t.fontSize;this.handle=s=>{const a=r(s);a!==void 0?s[i]=n.measureWidth(a,o):s[i]=0,this._propagate(s)}}}const KR=65536;class JR extends lt{get behavior(){return ri}constructor(t){super(t),this.params=t}reset(){super.reset(),this.initialize()}initialize(){const t=this.params,n=t.as||"lane",r=Dt(t.spacing)?t.spacing:1,i=Fe(t.start),o=Fe(t.end);if(!t.preference!=!t.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(t.preference){const s=new Float64Array(KR),a=Fe(t.preference),u=t.preferredOrder;let l=1/0;this.handle=c=>{const f=i(c);f<l&&s.fill(-1/0),l=f;const h=u.indexOf(a(c));let d=-1;if(h>=0&&s[h]<f)d=h;else{const p=i(c);for(d=0;d<s.length&&!(s[d]<p);d++);if(d>=s.length)throw new Error("Out of lanes!")}s[d]=o(c)+r,c[n]=d,this._propagate(c)}}else{const s=new cf,a=new cf;let u=-1/0,l=0;this.handle=c=>{const f=i(c);for(;s.length&&(s.peekValue()<=f||f<u);){const d=s.pop();a.push(d,d)}u=f;let h=a.pop();h===void 0&&(h=l++),c[n]=h,this._propagate(c),s.push(h,o(c)+r)}}}}class e9 extends lt{get behavior(){return Qn}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=>Fe(i)),r=t.as?t.as:n.map(zo);this.handle=i=>{const o={};for(let s=0;s<n.length;s++)o[r[s]]=n[s](i);this._propagate(o)}}}class t9 extends lt{get behavior(){return ri}constructor(t){super(t),this.params=t;const n=new RegExp(t.regex),r=typeof t.as=="string"?[t.as]:t.as,i=Fe(t.field);this.handle=o=>{const s=i(o);if(Ge(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 u=0;u<r.length;u++)o[r[u]]=a[u+1]}else if(t.skipInvalidInput)for(let u=0;u<r.length;u++)o[r[u]]=void 0;else throw new Error(`"${s}" 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 s}, field content: "${s}".`);this._propagate(o)}}}class n9 extends lt{get behavior(){return Qn}constructor(t){super(t),this.params=t;const n=zt(t.columnRegex).map(h=>new RegExp(h)),r=zt(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 s,a,u;const l=h=>{var y;const d=Object.keys(h);for(const w of n)if(!d.some(A=>w.test(A)))throw new Error(`No columns matching the regex ${w.toString()} found in the data!`);const p=new Map;for(const[w,A]of n.entries())for(const _ of d){const S=(y=A.exec(_))==null?void 0:y[1];if(S!==void 0){let T=p.get(S);T||(T=[],p.set(S,T)),T[w]=_}}s=[...p.entries()],a=d.filter(w=>!n.some(A=>A.test(w))&&!(i&&i.test(w)));const m=[...a.map(w=>JSON.stringify(w)+": datum["+JSON.stringify(w)+"]"),JSON.stringify(o)+": sampleId",...r.map((w,A)=>JSON.stringify(w)+`: datum[attrs[${A}]]`)];u=new Function("datum","sampleId","attrs",`return {
|
|
516
|
-
`+
|
|
513
|
+
chrM 16299`};function YD(e){if(!(e in z2))throw new Error(`Unknown assembly: ${e}`);return z2[e].split(`
|
|
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
|
+
`+b.join(`,
|
|
517
517
|
`)+`
|
|
518
|
-
};`)},c=h=>{s||l(h);for(let d=0;d<s.length;d++){const[p,m]=s[d],y=u(h,p,m);this._propagate(y)}},f=h=>{l(h),c(h),this.handle=c};this.handle=f,this.beginBatch=h=>{Fy(h)&&(this.handle=f),super.beginBatch(h)}}}class r9 extends lt{get behavior(){return ri}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?Im(t.sort.field,t.sort.order):void 0,i=t.field?Fe(t.field):()=>1,o=t.groupby.map(c=>Fe(c)),s=_C(this.buffer,c=>o.map(f=>f(c)).join()).map(c=>c[1]);let a=c=>!0;if(t.baseField){const c=Fe(t.baseField);a=f=>c(f)!==null}let u,l;switch(t.offset){case"normalize":u=(c,f)=>c/f,l=(c,f)=>Ea(c,f);break;case"center":u=(c,f)=>c-f/2,l=(c,f)=>Ea(c,f);break;case"information":{const c=Math.log2(t.cardinality??4);u=(f,h)=>f/h,l=(f,h)=>{const p=Ea(f,A=>+!a(A)),m=Ea(f,h),y=m-p;let w=0;for(let A=0;A<f.length;A++){const _=f[A];if(a(_)){const S=h(_)/y;w-=S*Math.log2(S)}}return y/(c-(w+0))*(y/m)}}break;default:u=(c,f)=>c,l=(c,f)=>1}for(const c of s){r&&c.sort(r);const f=l(c,i);let h=0;for(const d of c){const p=h+i(d);a(d)&&(d[n[0]]=u(h,f),d[n[1]]=u(p,f),this._propagate(d),h=p)}}super.complete()}}class i9 extends lt{get behavior(){return Qn}constructor(t){super(t),this.params=t;const n=Fe(t.field??"sequence"),[r,i]=t.as??["pos","sequence"];this.handle=o=>{const s=Object.assign({},o,{[i]:"",[r]:0}),a=n(o);for(let u=0;u<a.length;u++){const l=Object.assign({},s);l[r]=u,l[i]=a.charAt(u),this._propagate(l)}}}}const Xw={count:e=>e.length,valid:wC,sum:Ea,min:Lh,max:Nh,mean:DC,median:FC,variance:vC};class o9 extends lt{get behavior(){return Qn}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=Fe(n),o=Xw[t.ops[r]];this.ops.push(s=>o(s,i)),this.as.push(t.as?t.as[r]:`${t.ops[r]}_${t.fields[r]}`)})}else this.ops.push(n=>Xw.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=>Fe(o)),i=Yu(this.buffer,...r);for(const[o,s]of Z0(i)){const a={};for(let u=0;u<n.length;u++)a[n[u]]=o[u];this.ops.forEach((u,l)=>{a[this.as[l]]=u(s)}),this._propagate(a)}}else{const r={};this.ops.forEach((i,o)=>{r[this.as[o]]=i(this.buffer)}),this._propagate(r)}super.complete()}}const s9={aggregate:o9,collect:Zw,coverage:LR,filterScoredLabels:UR,filter:GR,flatten:$R,flattenCompressedExons:WR,flattenDelimited:ZR,flattenSequence:i9,formula:QR,identifier:T0,linearizeGenomicCoordinate:Yw,measureText:XR,pileup:JR,project:e9,regexExtract:t9,regexFold:n9,sample:yw,stack:r9};function a9(e,t){const n=s9[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function Kw(e){if(!tv(e)&&!ev(e))return;const t={...e.format};if(t.type??(t.type=ev(e)&&u9(Qt(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 l9(e){var t;return((t=Kh(e))==null?void 0:t.responseType)??"text"}function u9(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const Jw=e=>typeof e!="object"?c9:f9,c9=e=>({data:e}),f9=e=>e;function ev(e){return"url"in e}class hs extends C0{constructor(n){super();Bt(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 tv(e){return"values"in e}class h9 extends hs{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=Jw(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=U1(t,Kw(this.params));else throw new Error('"values" in data configuration is not an array, object, or a string!');this.reset(),this.beginBatch({type:"file"});for(const i of n)this._propagate(r(i));this.complete()}async load(){this.loadSynchronously()}}function d9(e){return"url"in e}class p9 extends hs{constructor(t,n){super(n),this.params=Jc(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=Qt(this.params.url),n=Array.isArray(t)?t:[t],r=Kw(this.params),i=l9(r.type);if(n.length===0||!n[0]){this.reset(),this.complete();return}const o=async a=>{try{const u=xl(this.baseUrl,a),l=await fetch(u);if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return typeof l[i]=="function"?l[i]():l.text()}catch(u){throw new Error(`Could not load data: ${a}. Reason: ${u.message}`)}},s=(a,u)=>{try{const l=U1(a,r);this.beginBatch({type:"file",url:u});for(const c of l)this._propagate(c)}catch(l){throw new Error(`Cannot parse: ${u}: ${l.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(n.map(a=>o(a).then(s))),this.setLoadingStatus("complete")}catch(a){this.setLoadingStatus("error",a.message)}this.complete()}}function g9(e){return"sequence"in e}class m9 extends hs{constructor(t,n){if(super(n),this.sequence=Jc(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=Qt(this.sequence.as)??"data",n=Qt(this.sequence.start)??0,r=Qt(this.sequence.step)??1,i=Qt(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 Y0 extends hs{constructor(n,r){super(n);Bt(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 Kt||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(),$0(this.view)}}class b9 extends Y0{constructor(n,r){const i={axis:{},...n};super(r,i.channel);Bt(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*Dy(100,700,l),s=Dt(i.tickCount)?i.tickCount:Math.round(r/o(r)),a=vw(n,s,i.tickMinStep),u=i.values?xw(n,i.values,a):VF(n,a);if(this.ticks==null||!cc(u,this.ticks)){this.ticks=u;const l=jF(n,s,i.format);this.publishData([u.map(c=>({value:c,label:l(c)}))])}}}class y9 extends Y0{constructor(t,n){super(n,t.channel)}get label(){return"axisGenomeSource"}async load(){this.publishData([this.genome.chromosomes])}}function ff(e,t,n=!0){let r,i=s=>{};return function(...a){return new Promise((u,l)=>{const c=()=>{clearTimeout(r),i=f=>{},u(e(...a))};n&&i("debounced"),clearTimeout(r),i=l,r=window.setTimeout(c,typeof t=="function"?t():t)})}}class Cl extends Y0{constructor(){super(...arguments);J(this,ea,new AbortController);J(this,ta,[0,0]);J(this,na,[0,0]);J(this,Tu,0);Bt(this,"params")}setupDebouncing(n){const r=()=>Qt(n.debounce),i=n.debounceMode;if(i=="domain")this.onDomainChanged=ff(this.onDomainChanged.bind(this),r,!1);else if(i=="window")this.loadInterval=ff(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+i)}onDomainChanged(n){var i;le(this,na,n);const r=Qt((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=z(this,na);le(this,na,[0,0]),le(this,ta,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){z(this,ea).abort(),this.setLoadingStatus("loading"),le(this,ea,new AbortController);const i=z(this,ea).signal,o=this.genome.continuousToDiscreteChromosomeIntervals(n);try{const s=await Promise.all(o.map(async a=>r(a,i)));if(!i.aborted)return this.setLoadingStatus("complete"),s}catch(s){if(!i.aborted)throw this.setLoadingStatus("error",s.message),s}}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)],s=z(this,ta);(r!==z(this,Tu)||o[0]<s[0]||o[1]>s[1])&&(le(this,ta,o),le(this,Tu,r),i(o))}}ea=new WeakMap,ta=new WeakMap,na=new WeakMap,Tu=new WeakMap;class w9 extends Cl{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(()=>Iv),Promise.resolve().then(()=>cN),Promise.resolve().then(()=>Il)]).then(([{Buffer:o},{IndexedFasta:s},{RemoteFile:a}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const u=l=>new a(Sl(l,this.view.getBaseUrl()));this.fasta=new s({fasta:u(this.params.url),fai:u(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 v9 extends Cl{constructor(n,r){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},o=Jc(r.paramMediator,i,s=>{s.includes("url")?Q(this,ku,vm).call(this).then(()=>this.reloadLastDomain()):s.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,o.channel);J(this,ku);J(this,ra,[]);J(this,ia);if(this.params=o,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),Q(this,ku,vm).call(this)}get label(){return"bigWigSource"}async onDomainChanged(n){await this.initializedPromise;const r=this.scaleResolution.getAxisLength()||700,i=x9(n,r,z(this,ra)),o=Math.max(i*r,5e3);this.callIfWindowsChanged(n,o,s=>this.loadInterval(s,i))}async loadInterval(n,r){const i=.5/r/Qt(this.params.pixelsPerBin),o=await this.discretizeAndLoad(n,(s,a)=>z(this,ia).getFeatures(s.chrom,s.startPos,s.endPos,{scale:i,signal:a}).then(u=>u.map(l=>({chrom:s.chrom,start:l.start,end:l.end,score:l.score}))));o&&this.publishData(o)}}ra=new WeakMap,ia=new WeakMap,ku=new WeakSet,vm=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>AE),Promise.resolve().then(()=>Il)]).then(([{BigWig:i},{RemoteFile:o}])=>{le(this,ia,new i({filehandle:new o(Sl(Qt(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),z(this,ia).getHeader().then(s=>{le(this,ra,s.zoomLevels.map(a=>a.reductionLevel).reverse()),z(this,ra).push(1),this.setLoadingStatus("complete"),n()}).catch(s=>{this.load(),this.setLoadingStatus("error",`${Qt(this.params.url)}: ${s.message}`),r(s)})})}),this.initializedPromise};function x9(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class A9 extends Cl{constructor(n,r){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},o=Jc(r.paramMediator,i,s=>{s.includes("url")?Q(this,Iu,xm).call(this).then(()=>this.reloadLastDomain()):s.includes("windowSize")&&this.reloadLastDomain()});super(r,o.channel);J(this,Iu);Bt(this,"parser");Bt(this,"bbi");Bt(this,"parseLine");if(this.params=o,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),Q(this,Iu,xm).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(s=>s.map(a=>this.parseLine(i.chrom,a))));r&&this.publishData(r)}}Iu=new WeakSet,xm=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>Vz),Promise.resolve().then(()=>AE),Promise.resolve().then(()=>Il)]).then(([i,{BigBed:o},{RemoteFile:s}])=>{const a=i.default;this.bbi=new o({filehandle:new s(Sl(Qt(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async u=>{this.parser=new a({autoSql:u.autoSql});try{const l=E9(this.parser);this.parseLine=(c,f)=>l(c,f.start,f.end,f.rest)}catch{this.parseLine=(c,f)=>this.parser.parseLine(`${c} ${f.start} ${f.end} ${f.rest}`)}this.setLoadingStatus("complete"),n()}).catch(u=>{this.load(),this.setLoadingStatus("error",`${Qt(this.params.url)}: ${u.message}`),r(u)})})}),this.initializedPromise};function E9(e){const t=e.autoSql.fields.filter(A=>A.type).slice(3);let n=0,r="",i=0,o={};const s=" ",a=s.charCodeAt(0),u=48,l=45;function c(){let A=r.indexOf(s,n);A<0&&(A=i);const _=r.substring(n,A);return n=A+1,_}function f(){let A=0,_=r.charCodeAt(n),S=1;_===l&&(S=-1,n++,_=r.charCodeAt(n));do{if(_===a){n++;break}A=A*10+_-u,_=r.charCodeAt(++n)}while(n<i);return A*S}const h=t.map(A=>`${JSON.stringify(A.name)}: ${A.isNumeric?"0":"emptyString"}`),d=new Function(`
|
|
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(`
|
|
519
519
|
const emptyString = "";
|
|
520
520
|
return function makeTemplate(chrom, chromStart, chromEnd) {
|
|
521
521
|
return {
|
|
@@ -525,110 +525,109 @@ chrM 16299`};function hR(e){if(!(e in kw))throw new Error(`Unknown assembly: ${e
|
|
|
525
525
|
${h.join(`,
|
|
526
526
|
`)}
|
|
527
527
|
}
|
|
528
|
-
};`)(),p=t.map(A=>{const _=A.type,
|
|
528
|
+
};`)(),p=t.map(A=>{const _=A.type,E=JSON.stringify(A.name);if(["ubyte","int","uint"].includes(_))return`d[${E}] = parseInt();`;if(A.isNumeric)return`d[${E}] = Number(parseString());`;if(["char","string","lstring"].includes(_))return`d[${E}] = parseString();`;throw new Error("Unsupported type: "+_)}),b=cB(p,50).map((A,_)=>Function("parseInt","parseString",`return function parseFieldChunk${_}(d) {
|
|
529
529
|
${A.join(`
|
|
530
530
|
`)}
|
|
531
|
-
}`)(f,
|
|
532
|
-
`),{parseSequences:!1})}}
|
|
533
|
-
`)+" };");return n.properties=t,n}function nv(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 hf extends lt{constructor(){super({type:"clone"});J(this,oa);J(this,Fu,n=>n);const n=r=>{const i=nv(r);(!z(this,oa)||!cc(i,z(this,oa)))&&(le(this,oa,i),le(this,Fu,O9(r)));const o=z(this,Fu);this.handle=s=>this._propagate(o(s)),this.handle(r)};this.handle=n,this.beginBatch=r=>{Fy(r)&&(this.handle=n),super.beginBatch(r)}}get behavior(){return Qn}}oa=new WeakMap,Fu=new WeakMap;function z9(e){return"name"in e}class rv extends hs{constructor(n,r,i){super(r);J(this,Ru);this.provider=i,this.params=n}get identifier(){return this.params.name}get label(){return"namedSource"}updateDynamicData(n){le(this,Ru,n),this.loadSynchronously()}loadSynchronously(){const n=z(this,Ru)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(n))n.length>0&&(r=Jw(n[0]));else throw new Error(`Named data "${this.params.name}" is not an array!`);this.reset(),this.beginBatch({type:"file"});for(const i of n)this._propagate(r(i));this.complete()}async load(){this.loadSynchronously()}}Ru=new WeakMap;class iv{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 rv&&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 U9(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 ov(e,t,n){var i,o;const r=(i=t.preOrder)==null?void 0:i.call(t,e);if(r)return r;for(const s of n(e)){const a=ov(s,t,n);if(a==="stop")return a}return(o=t.postOrder)==null?void 0:o.call(t,e)}function G9(e,t){return ov(e,t,n=>n.children)}function H9(e,t){const n=[],r=[];let i;const o=t??new iv,s=[];function a(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 u(d,p){return a(d,()=>new Error("Cannot append a transform because no (inherited) data are available! "))}function l(d,p){for(const m of d){let y;try{y=a9(m,p)}catch(w){throw console.warn(w),new Error(`Cannot initialize "${m.type}" transform: ${w}`)}y.behavior&ri&&u(new hf),u(y)}}function c(){return n.findLastIndex(d=>d instanceof T0)>n.findLastIndex(d=>d instanceof hs)}const f=d=>{if(d.spec.data){const p=z9(d.spec.data)?new rv(d.spec.data,d,d.context.getNamedDataFromProvider):k9(d.spec.data,d);i=p,n.push(p),o.addDataSource(p,d)}if(d.spec.transform&&l(d.spec.transform,d),d instanceof Kt){if(!i)throw new Error(`A unit view (${d.getPathString()}) has no (inherited) data source`);const p=V9(d);if(p){s.push(p.rewrite);for(const y of p.transforms)u(y)}d.mark.isPickingParticipant()&&!c()&&(u(new hf),u(new T0({type:"identifier"})));const m=new Zw({type:"collect",groupby:d.getFacetFields(),sort:$9(d,p==null?void 0:p.rewrittenEncoding)});a(m),o.addCollector(m,d)}},h=U9(e.getDescendants(),d=>d.dataParent);for(const d of h)G9(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 s.forEach(d=>d()),o}function V9(e){var o;const t=[],n={},r=[];for(const[s,a]of Object.entries(e.getEncoding())){const u=s;dl(u)&&Vy(a)&&r.push({channel:u,chromPosDef:a})}const i=Yu(r,s=>io(s.channel),s=>s.chromPosDef.chrom);for(const[s,a]of i.entries())for(const[u,l]of a.entries()){const c=[],f=[],h=[];for(const{channel:d,chromPosDef:p}of l){const m=A=>A.replace(/[^A-Za-z0-9_]/g,""),y=["_linearized_",m(p.chrom),"_",m(p.pos)].join(""),w={...((o=e.spec.encoding)==null?void 0:o[d])??e.getEncoding()[d]??{},field:y};delete w.chrom,delete w.pos,!w.type&&p.type&&(w.type=p.type),n[d]=w,c.push(p.pos),h.push(p.offset??0),f.push(y)}t.push(new hf),t.push(new Yw({type:"linearizeGenomicCoordinate",channel:s,chrom:u,pos:c,offset:h,as:f},e))}return t.length?{transforms:t,rewrittenEncoding:n,rewrite:()=>{e.spec.encoding={...e.spec.encoding,...n},aF(e.mark,"encoding")}}:void 0}function $9(e,t){var r;const n={...e.getEncoding(),...t}.x;if(Xt(n)&&(r=e.getScaleResolution("x"))!=null&&r.isZoomable()){if(ii(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!fl(n)){if(hl(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function sv(e,t=void 0){if(e.parent!==t)return!1;for(const n of e.children)if(!sv(n,e))return!1;return!0}function Q0(e,t=!1){if(e.behavior&_0&&(t=!0),e instanceof hf)if(t)t=!1;else{const n=e.children[0];e.excise(),n&&Q0(n,t);return}e.behavior&Qn&&(t=!1);for(let n=0,r=e.children.length;n<r;n++)Q0(e.children[n],t||r>1)}function j9(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 q9(e){if(Q0(e),!sv(e))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function W9(e){j9(e);for(const t of e.dataSources)q9(t)}function Z9(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 Y9(e){for(const t of us){const n=e.getScaleResolution(t);n&&!n.name&&n.isZoomable()&&(n.name=`${t}_at_root`)}}async function Q9(e,t,n){const r=e.import;if(!("url"in r))throw new Error("Not an url import: "+JSON.stringify(r));const i=xl(t,r.url);let o;try{const s=await fetch(i);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);o=await s.json()}catch(s){throw new Error(`Could not load imported view spec: ${i}. Reason: ${s.message}`)}if(n.isViewSpec(o))return o.baseUrl=xl(Iw(r.url),o.baseUrl),o;throw new Error(`The imported spec "${i}" is not a view spec: ${JSON.stringify(e)}`)}function X9(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 xr(e){return()=>e}const On=class On{static create(t,n,r,i){return new On(xr(t),xr(n),xr(r),xr(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"?xr(i):typeof i=="function"?i:this._passThrough(r)};return new On(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new On(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 On(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 On(()=>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 On(()=>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 On(xr(this.x),xr(this.y),xr(this.width),xr(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)}`}};Bt(On,"ZERO",On.create(0,0,0,0));let Ar=On;class av{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class lv extends av{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=s=>()=>{t&&s()},i=s=>()=>{t&&n&&s()},o=Yu(this.buffer.reverse(),s=>s.mark);for(const[s,a]of[...o.entries()].reverse()){if(!s.isReady())continue;this.batch.push(()=>{t=s.unitView.getEffectiveOpacity()>0}),this.batch.push(...s.prepareRender(this.globalOptions).map(l=>r(l)));let u;for(const l of a){const c=l.coords;c.equals(u)||this.batch.push(r(()=>{n=s.setViewport(c,l.clipRect)})),this.batch.push(i(l.callback)),u=l.coords}}}}class K9 extends av{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 J9{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 Xn{static fromMouseEvent(t){return new Xn(t.clientX,t.clientY)}constructor(t,n){this.x=t,this.y=n}subtract(t){return new Xn(this.x-t.x,this.y-t.y)}add(t){return new Xn(this.x-t.x,this.y-t.y)}multiply(t){return new Xn(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 eM=e=>new Promise(t=>setTimeout(t,e));function tM(e){const t=e.requestAnimationFrame||window.requestAnimationFrame,n=e.signal,r=()=>new Promise((i,o)=>{if(n!=null&&n.aborted)return o("aborted");const s=performance.now(),a=s+(e.duration||1e3),u=typeof e.from=="number"?e.from:0,l=typeof e.to=="number"?e.to:1,c=e.easingFunction||(m=>m),f=m=>(m-s)/(a-s),h=m=>m*(l-u)+u,d=m=>Math.max(0,Math.min(1,m)),p=m=>{n!=null&&n.aborted?o("aborted"):(e.onUpdate(h(c(d(f(m))))),m<a?t(p):(e.onUpdate(h(c(1))),i()))};t(p)});return e.delay?n!=null&&n.aborted?Promise.reject("aborted"):eM(e.delay).then(r):r()}class nM{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 tM({requestAnimationFrame:n=>this.requestTransition(n),...t})}}function X0(e,t,n,r,i){let o=0,s=!0,a=structuredClone(i),u=a;function l(h,d,p,m){return d+(h-d)*Math.pow(2,-p/m)}function c(h){if(s)return;const d=h-o;o=h;for(const m of Object.keys(u))a[m]=l(a[m],u[m],d,n);t(a);let p=-1/0;for(const m of Object.keys(u))p=Math.max(p,Math.abs(u[m]-a[m]));p<r?(a=u,t(a),s=!0,p!=0&&e.requestRender()):e.requestTransition(m=>c(m))}function f(h){u=h,s&&(s=!1,o=+document.timeline.currentTime,c(o))}return f.stop=()=>{s=!0},f}class rM{constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new pR(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 iM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMhERycB36XD+hX0/DuzSlsnw3OfyilcwAA/vn/yzQQMoUHg9r59hhn7Oz/njH9ncJAiAXNj9P2qTxdhARETufgDYNs4fsH/Cv2jL53nzm1lcZH2dngKCP/Gnn/LTEiXg+Tw/Q+btvJ1+/vlPfvYz/v1vEwA26w4fs8l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oOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",oM={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class sM{constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new hr([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:N0(Qw),texture:t?this._createTextureNow(iM):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(Ge(r)&&(r=oM[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=lM(r,n),o=this.fontRepository+uv(n.family)+"/"+i.replace(/\.\w+/,""),s=this._createTexture(o+".png"),a=this._loadFont(o+".json");t.texture=await s,t.metrics=await a}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=>N0(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=uv(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=>aM(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)=>{qa(n,{src:t,min:n.LINEAR},(o,s,a)=>{o?i(o):r(s)})})}_createTextureNow(t){const n=this._webGLHelper.gl;let r;const i=new Promise((o,s)=>{r=qa(n,{src:t,min:n.LINEAR},(a,u,l)=>{a?s(a):o(u)})});return this._promises.push(i),r}}function uv(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function aM(e){const t=e.split(`
|
|
534
|
-
`),n=[];let r;for(const i of t)if(i.startsWith("fonts {")&&(r={name:void 0,style:void 0,weight:void 0,filename:void 0,post_script_name:void 0,full_name:void 0,copyright:void 0}),i.startsWith("}")&&(n.push(r),r=void 0),r){let o=i.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(o){const
|
|
535
|
-
`))if(i.startsWith(">"))r={identifier:i.match(/>(\S+)/)[1],sequence:""},n.push(r);else if(r)r.sequence+=i.trim();else throw new Error("Invalid fasta file!");return n}class
|
|
531
|
+
}`)(f,u));function v(A){r=A,i=A.length,n=0}function y(A,_,E,C){v(C),o=d(A,_,E);for(const R of b)R(o);return o}return y}function cB(e,t){return Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t))}class lB extends Ns{constructor(n,r){const i={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,i.channel);ve(this,Ji);qt(this,"chrPrefixFixer",n=>n);if(this.params=i,!this.params.url)throw new Error("No URL provided for BamSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>K7),Promise.resolve().then(()=>Hs)]).then(([{BamFile:a},{RemoteFile:s}])=>{const c=l=>new s(Ps(l,this.view.getBaseUrl()));Pe(this,Ji,new a({bamFilehandle:c(this.params.url),baiFilehandle:c(this.params.indexUrl??this.params.url+".bai")})),X(this,Ji).getHeader().then(l=>{var h,d;const u=this.genome.hasChrPrefix(),f=(d=(h=X(this,Ji).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),o()})})})}get label(){return"bamSource"}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,o)=>X(this,Ji).getRecordsForRange(this.chrPrefixFixer(i.chrom),i.startPos,i.endPos,{signal:o}).then(a=>a.map(s=>({chrom:i.chrom,start:s.start,end:s.end,name:s.name,cigar:s.CIGAR,mapq:s.mq,strand:s.strand===1?"+":"-"}))));r&&this.publishData(r)}}Ji=new WeakMap;class dy extends Ns{constructor(n,r){const i={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",addChrPrefix:!1,...n};super(r,i.channel);ve(this,pa);if(this.params=i,!this.params.url)throw new Error("No URL provided for TabixSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>sP),Promise.resolve().then(()=>Hs)]).then(async([{TabixIndexedFile:a},{RemoteFile:s}])=>{const c=u=>new s(Ps(u,this.view.getBaseUrl()));Pe(this,pa,new a({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,pa).getHeader();await this._handleHeader(l),o()})})}async loadInterval(n){await this.initializedPromise;const r=await this.discretizeAndLoad(n,async(i,o)=>{const a=[];return await X(this,pa).getLines(i.chrom,i.startPos,i.endPos,{lineCallback:s=>{a.push(s)},signal:o}),this._parseFeatures(a)});r&&this.publishData(r)}async _handleHeader(n){}_parseFeatures(n){return[]}}pa=new WeakMap;class uB extends dy{constructor(){super(...arguments);ve(this,Cc)}get label(){return"gff3Source"}async _handleHeader(n){Pe(this,Cc,(await Promise.resolve().then(()=>CP)).default)}_parseFeatures(n){var i;return(i=X(this,Cc))==null?void 0:i.parseStringSync(n.join(`
|
|
532
|
+
`),{parseSequences:!1})}}Cc=new WeakMap;class fB extends dy{constructor(){super(...arguments);ve(this,Tc)}get label(){return"vcfSource"}async _handleHeader(n){const r=(await Promise.resolve().then(()=>DP)).default;Pe(this,Tc,new r({header:n}))}_parseFeatures(n){return n.map(r=>{const i=X(this,Tc).parseLine(r);return delete i.GENOTYPES,i.SAMPLES=i.SAMPLES(),i})}}Tc=new WeakMap;function hB(e,t){if(hy(e))return new Xk(e,t);if(Kk(e))return new Jk(e,t);if($k(e))return new eB(e,t);if(dB(e))return AB(e.lazy,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function dB(e){return"lazy"in e}function pB(e){return(e==null?void 0:e.type)=="axisTicks"}function gB(e){return(e==null?void 0:e.type)=="axisGenome"}function mB(e){return(e==null?void 0:e.type)=="indexedFasta"}function bB(e){return(e==null?void 0:e.type)=="bigwig"}function yB(e){return(e==null?void 0:e.type)=="bigbed"}function wB(e){return(e==null?void 0:e.type)=="bam"}function xB(e){return(e==null?void 0:e.type)=="gff3"}function vB(e){return(e==null?void 0:e.type)=="vcf"}function AB(e,t){if(pB(e))return new tB(e,t);if(gB(e))return new nB(e,t);if(mB(e))return new rB(e,t);if(bB(e))return new iB(e,t);if(yB(e))return new aB(e,t);if(wB(e))return new lB(e,t);if(xB(e))return new uB(e,t);if(vB(e))return new fB(e,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function EB(e){const t=py(e).filter(r=>typeof r=="string"),n=new Function("source","return { "+t.map(r=>JSON.stringify(r)).map(r=>`${r}: source[${r}]`).join(`,
|
|
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+gJOiA5d1Nm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PBCMDwcOLllxOBQAKYnOTmTS5cgPx8mpupq8Pn4xHj9bq5IHn9QDicmguqryczSuAfIdtAGuG/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 i of t)if(i.startsWith("fonts {")&&(r={name:void 0,style:void 0,weight:void 0,filename:void 0,post_script_name:void 0,full_name:void 0,copyright:void 0}),i.startsWith("}")&&(n.push(r),r=void 0),r){let o=i.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(o){const a=o[1];r[a]=o[2]}if(o=i.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),o){const a=o[1];r[a]=+o[2]}}return n}function ZB(e,t){let n,r=Number.POSITIVE_INFINITY;for(const i of e)if(t.family.localeCompare(i.name,void 0,{sensitivity:"accent"})==0&&t.style==i.style){const o=Math.abs(t.weight-i.weight);o<r&&(r=o,n=i)}return n==null?void 0:n.filename}function YB(e,t){const n=[];let r;for(const i of e.split(`
|
|
535
|
+
`))if(i.startsWith(">"))r={identifier:i.match(/>(\S+)/)[1],sequence:""},n.push(r);else if(r)r.sequence+=i.trim();else throw new Error("Invalid fasta file!");return n}class QB{constructor(t,n){this.animator=t,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=Dd(t,r=>{var o;const i=r.x-this.lastValue;this.lastValue=r.x,(o=this.callback)==null||o.call(this,i)},40,.1,{x:0})}cancel(){this.lastValue!==this.targetValue&&(this.targetValue=Vp([this.lastValue,this.targetValue],.3),this.smoother({x:this.targetValue}))}setMomentum(t,n){if(this.disabled){n(t);return}this.callback=n;const r=Io(this.targetValue+t-this.lastValue,-this.maxDistance,this.maxDistance);this.targetValue=this.lastValue+r,this.smoother({x:this.targetValue})}}function XB(e){const t={},n=["string","number","boolean"],r=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const i in e){const o=i;!r.includes(i)&&n.includes(typeof e[o])&&(t[o]=e[o])}return t}const Ay=new Map;async function KB(e,t,n){const r=e.symbol;let i=Ay.get(r)??await eR(e.symbol);return i?(Ay.set(r,i),ct`
|
|
536
536
|
<div class="title">
|
|
537
537
|
<strong>${i.name}</strong>
|
|
538
538
|
${i.description}
|
|
539
539
|
</div>
|
|
540
540
|
<p class="summary">${i.summary}</p>
|
|
541
541
|
<p class="source">Source: NCBI RefSeq Gene</p>
|
|
542
|
-
`):null}async function
|
|
542
|
+
`):null}async function JB(e){console.log("Searching: "+e);const t={mode:"cors"},r=(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&term=${e}[GENE]&sort=relevance&retmode=json`,t).then(i=>i.json())).esearchresult.idlist[0];return r?(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id=${r}&retmode=json`,t).then(a=>a.json())).result[r]:null}const $B=au(JB,500);function eR(e){return $B(e)}const tR=Nt(".4~r"),nR=Nt(".4~e");function Ey(e){return e==null?ct` <span class="na">NA</span> `:it(e)?e.substring(0,30):Number.isInteger(e)?""+e:jt(e)?Math.abs(e)>Math.pow(10,8)||Math.abs(e)<Math.pow(10,-8)?nR(e):tR(e):Aa(e)?e?"True":"False":Bt(e)?ct`${e.map((t,n)=>[Ey(t),n<e.length-1?", ":mt])}`:"?"+typeof e+" "+e}async function rR(e,t,n){const r=(l,u)=>{var f;for(const[h,d]of Object.entries(t.encoders))if((f=d==null?void 0:d.dataAccessor)!=null&&f.fields.includes(l))switch(h){case"color":case"fill":case"stroke":return ct`
|
|
543
543
|
<span
|
|
544
544
|
class="color-legend"
|
|
545
|
-
style=${`background-color: ${
|
|
545
|
+
style=${`background-color: ${d(u)}`}
|
|
546
546
|
></span>
|
|
547
|
-
`}return""},i=
|
|
547
|
+
`}return""},i=(l,u)=>{const f=l.filter(([h,d])=>!h.startsWith("_"));if(f.length!==0)return f.map(([h,d])=>typeof d=="object"&&!Array.isArray(d)?ct`${i(Object.entries(d),(u||"")+h+".")}`:ct`
|
|
548
|
+
<tr>
|
|
549
|
+
<th>${u}${h}</th>
|
|
550
|
+
<td>${Ey(d)} ${r(h,e)}</td>
|
|
551
|
+
</tr>
|
|
552
|
+
`)},o=i(Object.entries(e));if(!o)return;const a=ct`
|
|
548
553
|
<table class="attributes">
|
|
549
|
-
${
|
|
550
|
-
<tr>
|
|
551
|
-
<th>${u}</th>
|
|
552
|
-
<td>${fv(l)} ${r(u,e)}</td>
|
|
553
|
-
</tr>
|
|
554
|
-
`)}
|
|
554
|
+
${o}
|
|
555
555
|
</table>
|
|
556
|
-
`,s=t.unitView.getTitleText(),
|
|
556
|
+
`,s=t.unitView.getTitleText(),c=s?ct`
|
|
557
557
|
<div class="title">
|
|
558
558
|
<strong>${s}</strong>
|
|
559
559
|
</div>
|
|
560
|
-
`:"";return et`${a}${o}`}class Tl extends $w{constructor(t,n,r,i,o,s){super(t,n,r,i,o,s),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===_l)return n;if(n!==BR){t.beforeChildren&&t.beforeChildren(this);for(const r of this){const i=r.visit(t);if(i===_l)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 Tl)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,_l}),n}getDefaultResolution(t,n){return"shared"}}class kl extends Tl{constructor(n,r,i,o,s,a){super(n,r,i,o,s,{layersChildren:!0,...a});J(this,Fr,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){le(this,Fr,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!rp(i)&&!np(i))throw new so("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return z(this,Fr).slice()}*[Symbol.iterator](){for(const n of z(this,Fr))yield n}render(n,r,i={}){if(super.render(n,r,i),!!this.isConfiguredVisible()){n.pushView(this,r);for(const o of z(this,Fr))o.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=z(this,Fr).length-1;r>=0;r--)if(z(this,Fr)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}Fr=new WeakMap;class hv{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 s=0;s<n;s++){const a=i*n+s;a<this.n&&o.push(a)}}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 s=0;s<r;s++){const a=s*n+i;a<this.n&&o.push(a)}}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 wM="chromosome_ticks_and_labels",vM={x:"width",y:"height"};function K0(e){return e=="x"?"y":"x"}const df={x:["bottom","top"],y:["left","right"]},J0=Object.fromEntries(Object.entries(df).map(([e,t])=>t.map(n=>[n,e])).flat(1));function ai(e){return J0[e]}class dv extends kl{constructor(t,n,r,i,o,s){const a=n=="locus",u={...a?AM:pv,...xM(n,t),...t};super(a?EM(u,n):gv(u,n),r,i,o,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...s}),this.axisProps=u}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return J0[this.axisProps.orient]=="x"?new si(n,t):new si(t,n)}getPerpendicularSize(){return ep(this.axisProps)}isPickingSupported(){return!1}}function ep(e){const t=ai(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 pv={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 xM(e,t){const n=t.orient,r=e=="nominal"||e=="ordinal";let i="center",o="middle",s=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(s)>30?(i=s>0==(n=="bottom")?"left":"right",o="middle"):o=n=="top"?"alphabetic":"top";break}return{labelAlign:i,labelAngle:s,labelBaseline:o}}function gv(e,t){const n={...e,extent:ep(e)},r=ai(n.orient),i=K0(r),o=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,[i]:s,size:n.domainWidth}}),u=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[i+"Offset"]:(n.tickSize+n.labelPadding)*o,[i]:s,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:s},[i+"2"]:{value:s-n.tickSize/n.extent*(s?1:-1)}}}),c=()=>({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-s}}),f=()=>{const d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:t}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(u()),d},h={resolve:{scale:{[r]:"forced"}},[vM[K0(r)]]:n.extent,data:{lazy:{type:"axisTicks",channel:r,axis:e}},layer:[]};return n.domain&&h.layer.push(a()),(n.ticks||n.labels)&&h.layer.push(f()),n.title&&h.layer.push(c()),h}const AM={...pv,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 EM(e,t){const n={...e,extent:ep(e)},r=ai(n.orient),i=K0(r),o=n.orient=="bottom"||n.orient=="left"?1:0,s=()=>({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}}),a=()=>{let c;switch(n.orient){case"top":c={y:0,angle:0,paddingX:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":c={y:1,angle:0,paddingX:4,dy:n.chromLabelPadding+n.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":c={x:1,angle:-90,paddingY:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":c={x:0,angle:90,align:"right",paddingY:4,dy:-n.chromLabelPadding};break;default:c={}}return{name:"chromosome_labels",mark:{type:"text",size:n.chromLabelFontSize,font:n.chromLabelFont,fontWeight:n.chromLabelFontWeight,fontStyle:n.chromLabelFontStyle,color:n.chromLabelColor,align:e.chromLabelAlign,baseline:"alphabetic",clip:!1,...c},encoding:{[r+"2"]:{field:"continuousEnd",type:t},text:{field:"name"}}}};let u;switch(n.orient){case"bottom":case"top":u={};break;case"left":u={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":u={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:u={}}const l=gv({...e,...u},t);if(e.chromTicks||e.chromLabels){const c={name:wM,data:{lazy:{type:"axisGenome",channel:ai(n.orient)}},encoding:{[r]:{field:"continuousStart",type:t,band:0}},layer:[]};if(e.chromTicks&&c.layer.push(s()),e.chromLabels){c.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(c)}return l}class SM extends kl{constructor(t,n,r,i,o,s){const u={...n=="locus"?_M:mv,...t};super(IM(u,n),r,i,o,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...s}),this.axisProps=u}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const mv={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},_M={...mv,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function CM(e,t){const n=e,r=ai(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 TM(e,t){const n=e,r=ai(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 kM(e,t){const n=e,r=ai(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 IM(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(kM(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(TM(n,t)),n.grid&&n.gridOpacity>0&&r.push(CM(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[ai(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const bv={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"},BM={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},DM={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},FM={start:0,middle:.5,end:1},RM={start:"left",middle:"center",end:"right"};function MM(e){if(!e)return;const t=Ge(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":BM,overlay:DM}[t.style]??{},r={...bv,...n,...t};let i={},o={x:0,y:0};const s=FM[r.anchor??"middle"];switch(r.orient){case"top":o={x:s,y:1},i={baseline:"alphabetic",angle:0};break;case"right":o={x:1,y:1-s},i={baseline:"alphabetic",angle:90};break;case"bottom":o={x:s,y:0},i={baseline:"top",angle:0};break;case"left":o={x:0,y:s},i={baseline:"alphabetic",angle:-90};break}const a={...bv,...i,...n,...t},u={xOffset:0,yOffset:0};switch(r.orient){case"top":u.yOffset=-a.offset;break;case"right":u.xOffset=a.offset;break;case"bottom":u.yOffset=a.offset;break;case"left":u.xOffset=-a.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...o,...u,text:a.text,align:a.align??RM[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 PM{constructor(t){J(this,Mo);J(this,Ei,0);J(this,Si,0);le(this,Mo,new Array(t))}push(t){z(this,Mo)[z(this,Ei)]=t,le(this,Ei,(z(this,Ei)+1)%this.size),le(this,Si,Math.min(z(this,Si)+1,this.size))}get(){const t=z(this,Mo);return z(this,Si)<this.size?t.slice(0,z(this,Si)):t.slice(z(this,Ei),this.size).concat(t.slice(0,z(this,Ei)))}get size(){return z(this,Mo).length}get length(){return z(this,Si)}}Mo=new WeakMap,Ei=new WeakMap,Si=new WeakMap;let ao,yv=0;function wv(){return performance.now()-yv<50}function NM(e){return function(...t){yv=performance.now(),e(...t)}}function LM(e,t,n,r,i){if(n=NM(n),e.type=="wheel"){e.uiEvent.preventDefault();const o=e.uiEvent,s=o.deltaMode?120:1;if(!o.deltaX&&!o.deltaY)return;ao==null||ao.stop();let{x:a,y:u}=e.point;if(r){const l=r.mark.encoders;l.x&&!l.x2&&!l.x.constant&&(a=+l.x(r.datum)*t.width+t.x),l.y&&!l.y2&&!l.y.constant&&(u=(1-+l.y(r.datum))*t.height+t.y)}Math.abs(o.deltaX)<Math.abs(o.deltaY)?n({x:a,y:u,xDelta:0,yDelta:0,zDelta:o.deltaY*s/300}):n({x:a,y:u,xDelta:-o.deltaX*s,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){ao&&ao.stop();const o=new PM(30),s=e.uiEvent;s.preventDefault();let a=Xn.fromMouseEvent(s);const u=f=>{const h=Xn.fromMouseEvent(f);o.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=o.get().filter(_=>h-_.timestamp<160);if(d.length<5||!i||OM(d))return;const p=d.at(-1),m=d[0],y=p.point.subtract(m.point).multiply(1/(p.timestamp-m.timestamp));let w=a.x,A=a.y;ao=X0(i,_=>{n({x:_.x,y:_.y,xDelta:w-_.x,yDelta:A-_.y,zDelta:0}),w=_.x,A=_.y},150,.5,{x:w,y:A}),ao({x:a.x-y.x*250,y:a.y-y.y*250})},c=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",c),l()};document.addEventListener("mouseup",c,!1),document.addEventListener("mousemove",u,!1)}}function OM(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 zM extends Tl{constructor(n,r,i,o,s,a,u){super(n,r,i,o,s,u);J(this,we);J(this,sa,1/0);J(this,aa,10);J(this,on,[]);J(this,Po,{});J(this,la,0);this.spec=n,le(this,aa,n.spacing??10),le(this,sa,a),le(this,on,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),z(this,on).push(new xv(n,this,z(this,la))),KS(this,la)._++}setChildren(n){le(this,on,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=z(this,on).findIndex(o=>o.view==n);if(i>=0)z(this,on)[i]=new xv(r,this,z(this,la));else throw new Error("Not my child view!")}get children(){return z(this,on).map(n=>n.view)}get childCount(){return z(this,on).length}async createAxes(){const n=[];for(const r of us){const i=this.resolutions.axis[r];if(i){const o=i.getAxisProps();if(o){const s={title:i.getTitle(),orient:df[r][0],...o},a=new dv(s,i.scaleResolution.type,this.context,this,this);n.push(a.initializeChildren()),z(this,Po)[r]=a}}}return Promise.all([...n,...z(this,on).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of z(this,on))yield*n.getChildren();for(const n of Object.values(z(this,Po)))yield n}getOverhang(){return Q(this,we,u_).call(this).union(Q(this,we,mh).call(this))}getSize(){return this._cache("size",()=>new si(Q(this,we,Em).call(this,"column"),Q(this,we,Em).call(this,"row")).addPadding(Q(this,we,mh).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(Q(this,we,mh).call(this)),n.pushView(this,r);const o={devicePixelRatio:this.context.devicePixelRatio},s=Uw(Q(this,we,Am).call(this,"column"),r.width,o),a=Uw(Q(this,we,Am).call(this,"row"),r.height,o),u=new hv(z(this,we,Oo).length,z(this,sa)??1/0),l=c=>Math.round(c*devicePixelRatio)/devicePixelRatio;for(const[c,f]of z(this,we,Oo).entries()){const{view:h,axes:d,gridLines:p,background:m,backgroundStroke:y,title:w}=f,[A,_]=u.getCellCoords(c),S=s[Q(this,we,Sm).call(this,"column",A)],T=a[Q(this,we,Sm).call(this,"row",_)],B=h.getViewportSize(),I=h.getSize(),D=h.getOverhang(),M=S.location-D.left,U=T.location-D.top,N=(je,L)=>(je[L].grow?(L=="width"?S:T).size:je[L].px)+D[L],te=N(B,"width"),re=N(B,"height"),ce=N(I,"width"),ge=N(I,"height"),Se=f.scrollbars.horizontal,_e=f.scrollbars.vertical,Le=Se?()=>l(Se.viewportOffset):()=>0,ze=_e?()=>l(_e.viewportOffset):()=>0,tt=new Ar(()=>r.x+M,()=>r.y+U,()=>te,()=>re),Ie=h.isScrollable(),Be=Ie?new Ar(()=>r.x+M-Le(),()=>r.y+U-ze(),()=>ce,()=>ge):tt;f.coords=tt;const bt=i.clipRect?tt.intersect(i.clipRect):tt;m==null||m.render(n,bt,{...i,clipRect:void 0});for(const je of Object.values(p))je.render(n,tt,i);const Wt=VM(h)||Ie;Wt&&h.render(n,Be,{...i,clipRect:bt}),y==null||y.render(n,bt,{...i,clipRect:void 0});for(const[je,L]of Object.entries(d)){const P=je=="left"||je=="right"?"vertical":"horizontal",q=f.scrollbars[P],$=q?tt.modify(P=="vertical"?{y:()=>Be.y,height:ge}:{x:()=>Be.x,width:ce}):tt,Z=vv($,je,L);let C=i.clipRect;q&&(C=Z.intersect(C).intersect(q?tt.modify(P=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),L.render(n,Z,{...i,clipRect:C})}for(const je of Object.values(z(this,Po))){const P=je.axisProps.orient;(P=="left"&&A==0||P=="right"&&A==u.nCols-1||P=="top"&&_==0||P=="bottom"&&_==u.nRows-1)&&je.render(n,vv(tt.shrink(f.view.getOverhang()),P,je),i)}Wt||h.render(n,Be,i);for(const je of Object.values(f.scrollbars))je.updateScrollbar(tt,Be),je.render(n,r,i);w==null||w.render(n,tt,i)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=z(this,we,Oo).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 Kt||i instanceof kl)&&LM(n,r.coords,o=>Q(this,we,c_).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"}}sa=new WeakMap,aa=new WeakMap,on=new WeakMap,Po=new WeakMap,la=new WeakMap,we=new WeakSet,Oo=function(){return z(this,on).filter(n=>n.view.isConfiguredVisible())},l_=function(){return new hv(z(this,we,Oo).length,z(this,sa)??1/0)},Ou=function(n){const r=n=="column"?"width":"height",i=(o,s)=>o.map(a=>{const l=z(this,we,Oo)[a].getOverhangAndPadding();return n=="column"?s?l.right:l.left:s?l.bottom:l.top}).reduce((a,u)=>Math.max(a,u),0);return this._cache(`size/directionSizes/${n}`,()=>z(this,we,l_)[n=="column"?"colIndices":"rowIndices"].map(o=>({axisBefore:i(o,0),axisAfter:i(o,1),view:TR(o.map(s=>z(this,we,Oo)[s].view.getViewportSize()[r]))})))},Am=function(n){const r=Q(this,we,Ou).call(this,n),i=[];i.push(El);for(const[o,s]of r.entries())o>0&&i.push({px:z(this,aa),grow:0}),(o==0||this.wrappingFacet)&&i.push(El),i.push({px:s.axisBefore,grow:0}),i.push(s.view),i.push({px:s.axisAfter,grow:0}),(o==r.length-1||this.wrappingFacet)&&i.push(El);return i},Em=function(n){let r=0,i=0;const o=n=="row"?this.spec.height:this.spec.width;if(o||o===0)return Hw(o);const s=Q(this,we,Ou).call(this,n);for(const[a,u]of s.entries())a>0&&(i+=z(this,aa)),(a==0||this.wrappingFacet)&&(i+=0),i+=u.axisBefore,i+=u.view.px??0,r+=u.view.grow??0,i+=u.axisAfter,(a==s.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},Sm=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},u_=function(){const n=Q(this,we,Ou).call(this,"column"),r=Q(this,we,Ou).call(this,"row");return!n.length||!r.length?kt.zero():new kt(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},mh=function(){const n=r=>{const i=J0[r],o=z(this,Po)[i];return(o==null?void 0:o.axisProps.orient)!==r?0:Math.max(o.getPerpendicularSize()+(o.axisProps.offset??0),0)};return new kt(n("top"),n("right"),n("bottom"),n("left"))},c_=function(n,r,i){for(const[o,s]of Object.entries(HM(r))){if(s.size<=0)continue;const a=n.normalizePoint(i.x,i.y),u=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:u.x-a.x,y:u.y-a.y};for(const c of s)c.zoom(2**i.zDelta,o=="y"?1-a[o]:a[o],o=="x"?l.x:-l.y)}this.context.animator.requestRender()};function UM(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 GM(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 HM(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 VM(e){let t=!0;return e.visit(n=>{n instanceof Kt&&t&&(t=n.mark.properties.clip===!0)}),t}function vv(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 xv{constructor(t,n,r){if(this.layoutParent=n,this.view=t,this.serial=r,this.background=void 0,this.backgroundStroke=void 0,this.axes={},this.gridLines={},this.scrollbars={},this.title=void 0,this.coords=Ar.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,o="view"in i?i==null?void 0:i.view:void 0,s=UM(o);s&&(this.background=new Kt(s,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const a=GM(o);a&&(this.backgroundStroke=new Kt(a,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const u=MM(t.spec.title);if(u){const l=new Kt(u,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=l}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new Av(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new Av(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=(a,u)=>{const l=a.getAxisProps();if(l===null)return;const c=l?{...l}:{};if(!c.orient){for(const f of df[u])if(!n[f]){c.orient=f;break}if(!c.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(c.title??(c.title=a.getTitle()),!df[u].includes(c.orient))throw new Error(`Invalid axis orientation "${c.orient}" on channel "${u}"!`);return c},o=async(a,u,l)=>{const c=i(a,u);if(c){if(n[c.orient])throw new Error(`An axis with the orient "${c.orient}" already exists!`);const f=new dv(c,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[c.orient]=f,await f.initializeChildren()}},s=async(a,u,l)=>{const c=i(a,u);if(c&&(c.grid||c.chromGrid)){const f=new SM(c,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[c.orient]=f,await f.initializeChildren()}};for(const a of["x","y"])if(t.needsAxes[a]){const u=t.resolutions.axis[a];if(!u)continue;await o(u,a,t)}for(const a of["x","y"])if(t.needsAxes[a]&&t.getConfiguredOrDefaultResolution(a,"axis")!="excluded"){const u=t.getAxisResolution(a);if(!u)continue;await s(u,a,t)}if(t instanceof kl){for(const a of t)for(const[u,l]of Object.entries(a.resolutions.axis)){const c=l.getAxisProps();c&&c.orient&&await o(l,u,a)}for(const a of t)for(const[u,l]of Object.entries(a.resolutions.axis)){const c=l.getAxisProps();c&&!c.orient&&await o(l,u,a)}}[...Object.values(n),...Object.values(r)].forEach(a=>a.visit(u=>{u instanceof Kt&&u.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 kt(t("top"),t("right"),t("bottom"),t("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}class Av extends Kt{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});J(this,ua);J(this,Mu,Ar.ZERO);J(this,_i,0);J(this,No,0);Bt(this,"viewportOffset",0);this.config=i,le(this,ua,r),this.interpolateViewportOffset=X0(this.context.animator,o=>{this.viewportOffset=o.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(o,s)=>{if(s.stopPropagation(),z(this,_i)<=0)return;const a=d=>r=="vertical"?d.clientY:d.clientX,u=s.uiEvent;u.preventDefault();const l=this.scrollOffset,c=a(u),f=d=>{const p=ls(a(d)-c+l,0,z(this,_i));this.interpolateViewportOffset({x:p/z(this,_i)*z(this,No)})},h=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h)};document.addEventListener("mouseup",h,!1),document.addEventListener("mousemove",f,!1)})}get scrollOffset(){return this.viewportOffset/z(this,No)*z(this,_i)}render(n,r,i){super.render(n,z(this,Mu),i)}updateScrollbar(n,r){const i=this.config.scrollbarPadding,o=this.config.scrollbarSize,s=z(this,ua)=="horizontal"?"width":"height",a=Math.min(1,n[s]/r[s]),u=n[s]-2*i,l=a*u;le(this,_i,u-l),le(this,No,r[s]-n[s]),this.viewportOffset=ls(this.viewportOffset,0,z(this,No)),le(this,Mu,z(this,ua)=="vertical"?new Ar(()=>n.x+n.width-o-i,()=>n.y+i+this.scrollOffset,()=>o,()=>l):new Ar(()=>n.x+i+this.scrollOffset,()=>n.y+n.height-o-i,()=>l,()=>o))}}ua=new WeakMap,Mu=new WeakMap,_i=new WeakMap,No=new WeakMap;class tp extends zM{constructor(t,n,r,i,o){super(t,n,r,i,o,ip(t)?t.columns:pf(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=ip(t)?t.concat:pf(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":pf(this.spec)&&t==="x"||_v(this.spec)&&t==="y"?"shared":"independent"}}const Ev="viewRoot";class $M{constructor(t={}){J(this,ca,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,o,s,a,u)=>new r(i,o,s,a,i.name??u);this.addViewType(rp,n(kl)),this.addViewType(np,n(Kt)),this.addViewType(pf,n(tp)),this.addViewType(_v,n(tp)),this.addViewType(ip,n(tp)),this.addViewType(WM,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){z(this,ca).set(t,n)}createView(t,n,r,i,o){for(const[s,a]of z(this,ca))if(s(t))return a(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=[...z(this,ca).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,s){let a;if(qM(t)){let l;if("url"in t.import)if(this.options.allowImport)l=await Q9(t,i.getBaseUrl(),n);else throw new so("Importing views is not allowed!",r);else if("template"in t.import)l=Sv(t.import.template,i);else throw new Error("Invalid import: "+JSON.stringify(t));s==null||s(l),jM(l,t),a=l}else a=t;!i&&this.options.wrapRoot&&(np(a)||rp(a))&&o===Ev&&(a={name:"implicitRoot",vconcat:[a]});const u=this.createView(a,n,r,i,o);return u instanceof Tl&&await u.initializeChildren(),u}}ca=new WeakMap;function Sv(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 Sv(e,t.dataParent);throw new Error(`Cannot find template "${e}" in current view or its ancestors!`)}function jM(e,t){t.name!=null&&(e.name=t.name);const n=yt(t.params)?t.params:Et(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 np(e){return"mark"in e&&(Ge(e.mark)||Et(e.mark))}function rp(e){return"layer"in e&&Et(e.layer)}function qM(e){return"import"in e}function pf(e){return"vconcat"in e&&yt(e.vconcat)}function _v(e){return"hconcat"in e&&yt(e.hconcat)}function ip(e){return"concat"in e&&yt(e.concat)}function WM(e){return"samples"in e&&Et(e.samples)&&"spec"in e&&Et(e.spec)}function ZM(e){const t=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of e.paramConfigs.values()){if(!yD(r))continue;const i=r.bind;if(!i||!("input"in i))continue;const o=r.name,s=e.getSetter(o),a=e.getValue(o),u=i.name??o,l=i.debounce?ff(s,i.debounce,!1):s,c=`${t}-param-${o}`;if(i.input=="range")n.push(et`<label for=${c}>${u}</label>
|
|
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>
|
|
561
561
|
<div>
|
|
562
562
|
<input
|
|
563
|
-
id=${
|
|
563
|
+
id=${u}
|
|
564
564
|
type="range"
|
|
565
565
|
min=${i.min??0}
|
|
566
566
|
max=${i.max??100}
|
|
567
|
-
step=${i.step??
|
|
568
|
-
.value=${
|
|
567
|
+
step=${i.step??pi(i.min,i.max,100)}
|
|
568
|
+
.value=${s}
|
|
569
569
|
@input=${f=>{l(f.target.valueAsNumber),f.target.nextElementSibling.textContent=f.target.valueAsNumber}}
|
|
570
|
-
/><span>${
|
|
571
|
-
</div>`);else if(i.input=="checkbox")n.push(
|
|
570
|
+
/><span>${s}</span>
|
|
571
|
+
</div>`);else if(i.input=="checkbox")n.push(ct`<label for=${u}>${c}</label>
|
|
572
572
|
<input
|
|
573
|
-
id=${
|
|
573
|
+
id=${u}
|
|
574
574
|
type="checkbox"
|
|
575
|
-
?checked=${
|
|
575
|
+
?checked=${s}
|
|
576
576
|
@input=${f=>l(f.target.checked)}
|
|
577
|
-
/>`);else if(i.input=="radio")n.push(
|
|
577
|
+
/>`);else if(i.input=="radio")n.push(ct`<span class="label">${c}</span>
|
|
578
578
|
<div class="radio-group">
|
|
579
|
-
${i.options.map((f,h)=>{var d;return
|
|
579
|
+
${i.options.map((f,h)=>{var d;return ct`<label>
|
|
580
580
|
<input
|
|
581
581
|
type="radio"
|
|
582
582
|
name=${o}
|
|
583
583
|
value=${f}
|
|
584
|
-
.checked=${
|
|
584
|
+
.checked=${s==f}
|
|
585
585
|
@input=${p=>l(p.target.value)}
|
|
586
586
|
/>${((d=i.labels)==null?void 0:d[h])??f}</label
|
|
587
587
|
>`})}
|
|
588
|
-
</div>`);else if(i.input=="select")n.push(
|
|
588
|
+
</div>`);else if(i.input=="select")n.push(ct`<label for=${u}>${c}</label>
|
|
589
589
|
<select
|
|
590
|
-
id=${
|
|
590
|
+
id=${u}
|
|
591
591
|
@input=${f=>l(f.target.value)}
|
|
592
592
|
>
|
|
593
|
-
${i.options.map((f,h)=>{var d;return
|
|
593
|
+
${i.options.map((f,h)=>{var d;return ct`<option
|
|
594
594
|
value=${f}
|
|
595
|
-
?selected=${
|
|
595
|
+
?selected=${s==f}
|
|
596
596
|
>
|
|
597
597
|
${((d=i.labels)==null?void 0:d[h])??f}
|
|
598
598
|
</option>`})}
|
|
599
|
-
</select> `);else if(i.input=="text"||i.input=="number"||i.input=="color")n.push(
|
|
599
|
+
</select> `);else if(i.input=="text"||i.input=="number"||i.input=="color")n.push(ct`<label for=${u}>${c}</label>
|
|
600
600
|
<div>
|
|
601
601
|
<input
|
|
602
|
-
id=${
|
|
602
|
+
id=${u}
|
|
603
603
|
type=${i.input}
|
|
604
604
|
placeholder=${i.placeholder??""}
|
|
605
605
|
autocomplete=${i.autocomplete??"off"}
|
|
606
|
-
.value=${
|
|
606
|
+
.value=${s}
|
|
607
607
|
@focus=${f=>f.target.select()}
|
|
608
608
|
@input=${f=>{l(i.input=="number"?f.target.valueAsNumber:f.target.value)}}
|
|
609
609
|
/>
|
|
610
|
-
</div>`);else throw new Error("Unsupported input type: "+i.input);i.description&&n.push(
|
|
610
|
+
</div>`);else throw new Error("Unsupported input type: "+i.input);i.description&&n.push(ct`<div class="description">${i.description}</div>`)}return n}Df("fasta",YB);class Oy{constructor(t,n,r={}){ve(this,Sn);this.container=t,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=n,this.viewFactory=new DR,this.namedDataProviders=[],this.animator=new GB(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=i=>i.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new QB(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:rR,refseqgene:KB,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._loadingViews=new Map,this._inputBindingContainer=void 0,this._mouseDownCoords=void 0}registerNamedDataProvider(t){this.namedDataProviders.unshift(t)}getNamedDataFromProvider(t){for(const n of this.namedDataProviders){const r=n(t);if(r)return r}}updateNamedData(t,n){const r=this.viewRoot.context.dataFlow.findNamedDataSource(t);if(!r)throw new Error("No such named data source: "+t);r.dataSource.updateDynamicData(n),Ad(r.hosts),this.animator.requestRender()}broadcast(t,n){var i;const r={type:t,payload:n};this.viewRoot.visit(o=>o.handleBroadcast(r)),(i=this._extraBroadcastListeners.get(t))==null||i.forEach(o=>o(r))}_updateLoadingIndicators(){const t=[],n=()=>[...this._loadingViews.values()].some(r=>r.status=="loading"||r.status=="error");for(const[r,i]of this._loadingViews){const o=r.coords;if(o){const a={left:`${o.x}px`,top:`${o.y}px`,width:`${o.width}px`,height:`${o.height}px`};t.push(ct`<div style=${a_(a)}>
|
|
611
611
|
<div class=${i.status}>
|
|
612
|
-
${i.status=="error"?
|
|
612
|
+
${i.status=="error"?ct`<span
|
|
613
613
|
>Loading
|
|
614
|
-
failed${i.detail?
|
|
615
|
-
>`:
|
|
616
|
-
<img src="${
|
|
614
|
+
failed${i.detail?ct`: ${i.detail}`:mt}</span
|
|
615
|
+
>`:ct`
|
|
616
|
+
<img src="${s_}" 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),wa(t,this.loadingIndicatorsElement)}destroy(){var n;const t=z(this,Sn,bh);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 rM(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new iv,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new sM(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(u,l,c)=>{this._loadingViews.set(u,{status:l,detail:c}),this._updateLoadingIndicators()},addKeyboardListener:(u,l)=>{document.addEventListener(u,l);let c=this._keyboardListeners.get(u);c||(c=[],this._keyboardListeners.set(u,c)),c.push(l)},addBroadcastListener(u,l){const c=t._extraBroadcastListeners;let f=c.get(u);f||(f=new Set,c.set(u,f)),f.add(l)},removeBroadcastListener(u,l){var f;(f=t._extraBroadcastListeners.get(u))==null||f.delete(l)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:u=>t.viewFactory.isViewSpec(u),createView:function(u,l,c,f){return t.viewFactory.createView(u,n,l,c,f)},createOrImportView:async function(u,l,c,f,h){return t.viewFactory.createOrImportView(u,n,l,c,f,h)}},r=this.spec;r.datasets&&this.registerNamedDataProvider(u=>r.datasets[u]),this.viewRoot=await n.createOrImportView(r,null,null,Ev),z(this,Sn,bh).style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",Q(this,Sn,f_).call(this),Z9(this.viewRoot),Y9(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(u=>u.configureViewOpacity()),this._glHelper.invalidateSize(),Q(this,Sn,h_).call(this);const o=i.filter(u=>u instanceof Kt),s=H9(this.viewRoot,n.dataFlow);W9(s),this.broadcast("dataFlowBuilt",s),o.forEach(u=>u.mark.initializeEncoders());const a=Promise.all(o.map(u=>u.mark.initializeGraphics()));for(const u of o)s.addObserver(l=>{u.mark.initializeData();try{u.mark.updateGraphicsData()}catch(c){throw c.view=u,c}n.animator.requestRender()},u);await n.fontManager.waitUntilReady(),s.initialize(),await Promise.all(s.dataSources.map(u=>u.load())),$0(this.viewRoot),this.broadcast("dataLoaded"),await a;for(const u of o)u.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(u=>af(u,"size")),this._glHelper.invalidateSize()}async launch(){try{return Q(this,Sn,d_).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),YM(this.container,n),!1}finally{z(this,Sn,bh).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 a,u;const o=performance.now(),s=o-n<200;if(i instanceof MouseEvent){const l=t.getBoundingClientRect(),c=new Xn(i.clientX-l.left-t.clientLeft,i.clientY-l.top-t.clientTop);i.type=="mousemove"&&!s&&(this.tooltip.handleMouseMove(i),this._tooltipUpdateRequested=!1,i.buttons==0&&!wv()&&(this.renderPickingFramebuffer(),this._handlePicking(c.x,c.y)));const f=h=>{this.viewRoot.propagateInteractionEvent(new J9(c,h)),this._tooltipUpdateRequested||this.tooltip.clear()};if(i.type!="wheel"&&this._wheelInertia.cancel(),(i.type=="mousedown"||i.type=="mouseup")&&!wv())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=fM(h);this._wheelInertia.setMomentum(h.deltaY*(h.deltaMode?80:1),p=>{const m=new WheelEvent("wheel",{...d,deltaMode:0,deltaX:0,deltaY:p});f(m)}),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};(a=this._eventListeners.get("click"))==null||a.forEach(d=>d(h))}(i.type!="click"||((u=this._mouseDownCoords)==null?void 0:u.subtract(Xn.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=Xn.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(s=>{if(s instanceof Kt){if(s.mark.isPickingParticipant()&&[...s.facetCoords.values()].some(a=>a.containsPoint(t,n))){const a=s.getCollector().findDatumByUniqueId(i);a&&(this._currentHover={mark:s.mark,datum:a,uniqueId:i})}if(this._currentHover)return _l}}),this._currentHover){const s=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async a=>{if(!s.isPickingParticipant())return;const u=s.properties.tooltip;if(u!==null){const l=(u==null?void 0:u.handler)??"default",c=this.tooltipHandlers[l];if(!c)throw new Error("No such tooltip handler: "+l);return c(a,s,u==null?void 0:u.params)}})}}updateTooltip(t,n){if(!this._tooltipUpdateRequested||!t)this.tooltip.updateWithDatum(t,n),this._tooltipUpdateRequested=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}computeLayout(){const t=this.viewRoot;if(!t)return;this.broadcast("layout");const n=this._glHelper.getLogicalCanvasSize();if(isNaN(n.width)||isNaN(n.height)){console.log(`NaN in canvas size: ${n.width}x${n.height}. Skipping computeLayout().`);return}this._renderingContext=new lv({picking:!1},this._glHelper),this._pickingContext=new lv({picking:!0},this._glHelper),t.render(new K9(this._renderingContext,this._pickingContext),Ar.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 Kt&&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,bh=function(){return this.container.querySelector(".canvas-wrapper")},f_=function(){const t=[];this.viewRoot.visit(r=>{const i=r.paramMediator;t.push(...ZM(i))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!t.length)){if(this._inputBindingContainer=gf("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&&wa(et`<div class="gs-input-binding">${t}</div>`,this._inputBindingContainer)}},h_=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)},d_=function(){this.container.classList.add("genome-spy");const t=document.createElement("style");t.innerHTML=C6,this.container.appendChild(t);const n=gf("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new fF(n,()=>this.viewRoot?X9(this.viewRoot):{width:void 0,height:void 0},this.spec.background,{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=gf("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=gf("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new k6(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function YM(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 gf(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 QM="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",XM="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 KM(e,t,n={}){let r;if(Ge(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=Et(t)?t:await Tv(t);if(o.baseUrl??(o.baseUrl=""),o.width??(o.width="container"),o.padding??(o.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}i=new Cv(r,o,n),JM(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,s){const a=i._eventListeners;let u=a.get(o);u||(u=new Set,a.set(o,u)),u.add(s)},removeEventListener(o,s){var u;(u=i._eventListeners.get(o))==null||u.delete(s)},getScaleResolutionByName(o){return i.getNamedScaleResolutions().get(o)},updateNamedData:i.updateNamedData.bind(i)}}function JM(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function Tv(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 mf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function e7(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var ye={},bf={};bf.byteLength=r7,bf.toByteArray=o7,bf.fromByteArray=l7;for(var Kn=[],hn=[],t7=typeof Uint8Array<"u"?Uint8Array:Array,op="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ds=0,n7=op.length;ds<n7;++ds)Kn[ds]=op[ds],hn[op.charCodeAt(ds)]=ds;hn[45]=62,hn[95]=63;function kv(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function r7(e){var t=kv(e),n=t[0],r=t[1];return(n+r)*3/4-r}function i7(e,t,n){return(t+n)*3/4-n}function o7(e){var t,n=kv(e),r=n[0],i=n[1],o=new t7(i7(e,r,i)),s=0,a=i>0?r-4:r,u;for(u=0;u<a;u+=4)t=hn[e.charCodeAt(u)]<<18|hn[e.charCodeAt(u+1)]<<12|hn[e.charCodeAt(u+2)]<<6|hn[e.charCodeAt(u+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return i===2&&(t=hn[e.charCodeAt(u)]<<2|hn[e.charCodeAt(u+1)]>>4,o[s++]=t&255),i===1&&(t=hn[e.charCodeAt(u)]<<10|hn[e.charCodeAt(u+1)]<<4|hn[e.charCodeAt(u+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function s7(e){return Kn[e>>18&63]+Kn[e>>12&63]+Kn[e>>6&63]+Kn[e&63]}function a7(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(s7(r));return i.join("")}function l7(e){for(var t,n=e.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(a7(e,s,s+o>a?a:s+o));return r===1?(t=e[n-1],i.push(Kn[t>>2]+Kn[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(Kn[t>>10]+Kn[t>>4&63]+Kn[t<<2&63]+"=")),i.join("")}var sp={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */sp.read=function(e,t,n,r,i){var o,s,a=i*8-r-1,u=(1<<a)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=o*256+e[t+f],f+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=s*256+e[t+f],f+=h,c-=8);if(o===0)o=1-l;else{if(o===u)return s?NaN:(d?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-l}return(d?-1:1)*s*Math.pow(2,o-r)},sp.write=function(e,t,n,r,i,o){var s,a,u,l=o*8-i-1,c=(1<<l)-1,f=c>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+f>=1?t+=h/u:t+=h*Math.pow(2,1-f),t*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s=s+f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+d]=a&255,d+=p,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[n+d]=s&255,d+=p,s/=256,l-=8);e[n+d-p]|=m*128};/*!
|
|
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}/*!
|
|
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
|
-
*/(function(e){const t=bf,n=sp,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!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 o(){try{const v=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(v,g),v.foo()===42}catch{return!1}}Object.defineProperty(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(v){if(v>i)throw new RangeError('The value "'+v+'" is invalid for option "size"');const g=new Uint8Array(v);return Object.setPrototypeOf(g,a.prototype),g}function a(v,g,b){if(typeof v=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(v)}return u(v,g,b)}a.poolSize=8192;function u(v,g,b){if(typeof v=="string")return h(v,g);if(ArrayBuffer.isView(v))return p(v);if(v==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v);if(It(v,ArrayBuffer)||v&&It(v.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(It(v,SharedArrayBuffer)||v&&It(v.buffer,SharedArrayBuffer)))return m(v,g,b);if(typeof v=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const k=v.valueOf&&v.valueOf();if(k!=null&&k!==v)return a.from(k,g,b);const R=y(v);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof v[Symbol.toPrimitive]=="function")return a.from(v[Symbol.toPrimitive]("string"),g,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v)}a.from=function(v,g,b){return u(v,g,b)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(v){if(typeof v!="number")throw new TypeError('"size" argument must be of type number');if(v<0)throw new RangeError('The value "'+v+'" is invalid for option "size"')}function c(v,g,b){return l(v),v<=0?s(v):g!==void 0?typeof b=="string"?s(v).fill(g,b):s(v).fill(g):s(v)}a.alloc=function(v,g,b){return c(v,g,b)};function f(v){return l(v),s(v<0?0:w(v)|0)}a.allocUnsafe=function(v){return f(v)},a.allocUnsafeSlow=function(v){return f(v)};function h(v,g){if((typeof g!="string"||g==="")&&(g="utf8"),!a.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const b=_(v,g)|0;let k=s(b);const R=k.write(v,g);return R!==b&&(k=k.slice(0,R)),k}function d(v){const g=v.length<0?0:w(v.length)|0,b=s(g);for(let k=0;k<g;k+=1)b[k]=v[k]&255;return b}function p(v){if(It(v,Uint8Array)){const g=new Uint8Array(v);return m(g.buffer,g.byteOffset,g.byteLength)}return d(v)}function m(v,g,b){if(g<0||v.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(v.byteLength<g+(b||0))throw new RangeError('"length" is outside of buffer bounds');let k;return g===void 0&&b===void 0?k=new Uint8Array(v):b===void 0?k=new Uint8Array(v,g):k=new Uint8Array(v,g,b),Object.setPrototypeOf(k,a.prototype),k}function y(v){if(a.isBuffer(v)){const g=w(v.length)|0,b=s(g);return b.length===0||v.copy(b,0,0,g),b}if(v.length!==void 0)return typeof v.length!="number"||Rr(v.length)?s(0):d(v);if(v.type==="Buffer"&&Array.isArray(v.data))return d(v.data)}function w(v){if(v>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return v|0}function A(v){return+v!=v&&(v=0),a.alloc(+v)}a.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==a.prototype},a.compare=function(g,b){if(It(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),It(b,Uint8Array)&&(b=a.from(b,b.offset,b.byteLength)),!a.isBuffer(g)||!a.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===b)return 0;let k=g.length,R=b.length;for(let O=0,j=Math.min(k,R);O<j;++O)if(g[O]!==b[O]){k=g[O],R=b[O];break}return k<R?-1:R<k?1:0},a.isEncoding=function(g){switch(String(g).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(g,b){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return a.alloc(0);let k;if(b===void 0)for(b=0,k=0;k<g.length;++k)b+=g[k].length;const R=a.allocUnsafe(b);let O=0;for(k=0;k<g.length;++k){let j=g[k];if(It(j,Uint8Array))O+j.length>R.length?(a.isBuffer(j)||(j=a.from(j)),j.copy(R,O)):Uint8Array.prototype.set.call(R,j,O);else if(a.isBuffer(j))j.copy(R,O);else throw new TypeError('"list" argument must be an Array of Buffers');O+=j.length}return R};function _(v,g){if(a.isBuffer(v))return v.length;if(ArrayBuffer.isView(v)||It(v,ArrayBuffer))return v.byteLength;if(typeof v!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof v);const b=v.length,k=arguments.length>2&&arguments[2]===!0;if(!k&&b===0)return 0;let R=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return he(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return Ti(v).length;default:if(R)return k?-1:he(v).length;g=(""+g).toLowerCase(),R=!0}}a.byteLength=_;function S(v,g,b){let k=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,g>>>=0,b<=g))return"";for(v||(v="utf8");;)switch(v){case"hex":return ze(this,g,b);case"utf8":case"utf-8":return ce(this,g,b);case"ascii":return _e(this,g,b);case"latin1":case"binary":return Le(this,g,b);case"base64":return re(this,g,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt(this,g,b);default:if(k)throw new TypeError("Unknown encoding: "+v);v=(v+"").toLowerCase(),k=!0}}a.prototype._isBuffer=!0;function T(v,g,b){const k=v[g];v[g]=v[b],v[b]=k}a.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let b=0;b<g;b+=2)T(this,b,b+1);return this},a.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let b=0;b<g;b+=4)T(this,b,b+3),T(this,b+1,b+2);return this},a.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let b=0;b<g;b+=8)T(this,b,b+7),T(this,b+1,b+6),T(this,b+2,b+5),T(this,b+3,b+4);return this},a.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?ce(this,0,g):S.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(g){if(!a.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:a.compare(this,g)===0},a.prototype.inspect=function(){let g="";const b=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,b).replace(/(.{2})/g,"$1 ").trim(),this.length>b&&(g+=" ... "),"<Buffer "+g+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(g,b,k,R,O){if(It(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),!a.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(b===void 0&&(b=0),k===void 0&&(k=g?g.length:0),R===void 0&&(R=0),O===void 0&&(O=this.length),b<0||k>g.length||R<0||O>this.length)throw new RangeError("out of range index");if(R>=O&&b>=k)return 0;if(R>=O)return-1;if(b>=k)return 1;if(b>>>=0,k>>>=0,R>>>=0,O>>>=0,this===g)return 0;let j=O-R,de=k-b;const Ze=Math.min(j,de),Ue=this.slice(R,O),Ke=g.slice(b,k);for(let De=0;De<Ze;++De)if(Ue[De]!==Ke[De]){j=Ue[De],de=Ke[De];break}return j<de?-1:de<j?1:0};function B(v,g,b,k,R){if(v.length===0)return-1;if(typeof b=="string"?(k=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,Rr(b)&&(b=R?0:v.length-1),b<0&&(b=v.length+b),b>=v.length){if(R)return-1;b=v.length-1}else if(b<0)if(R)b=0;else return-1;if(typeof g=="string"&&(g=a.from(g,k)),a.isBuffer(g))return g.length===0?-1:I(v,g,b,k,R);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(v,g,b):Uint8Array.prototype.lastIndexOf.call(v,g,b):I(v,[g],b,k,R);throw new TypeError("val must be string, number or Buffer")}function I(v,g,b,k,R){let O=1,j=v.length,de=g.length;if(k!==void 0&&(k=String(k).toLowerCase(),k==="ucs2"||k==="ucs-2"||k==="utf16le"||k==="utf-16le")){if(v.length<2||g.length<2)return-1;O=2,j/=2,de/=2,b/=2}function Ze(Ke,De){return O===1?Ke[De]:Ke.readUInt16BE(De*O)}let Ue;if(R){let Ke=-1;for(Ue=b;Ue<j;Ue++)if(Ze(v,Ue)===Ze(g,Ke===-1?0:Ue-Ke)){if(Ke===-1&&(Ke=Ue),Ue-Ke+1===de)return Ke*O}else Ke!==-1&&(Ue-=Ue-Ke),Ke=-1}else for(b+de>j&&(b=j-de),Ue=b;Ue>=0;Ue--){let Ke=!0;for(let De=0;De<de;De++)if(Ze(v,Ue+De)!==Ze(g,De)){Ke=!1;break}if(Ke)return Ue}return-1}a.prototype.includes=function(g,b,k){return this.indexOf(g,b,k)!==-1},a.prototype.indexOf=function(g,b,k){return B(this,g,b,k,!0)},a.prototype.lastIndexOf=function(g,b,k){return B(this,g,b,k,!1)};function D(v,g,b,k){b=Number(b)||0;const R=v.length-b;k?(k=Number(k),k>R&&(k=R)):k=R;const O=g.length;k>O/2&&(k=O/2);let j;for(j=0;j<k;++j){const de=parseInt(g.substr(j*2,2),16);if(Rr(de))return j;v[b+j]=de}return j}function M(v,g,b,k){return ki(he(g,v.length-b),v,b,k)}function U(v,g,b,k){return ki(Zt(g),v,b,k)}function N(v,g,b,k){return ki(Ti(g),v,b,k)}function te(v,g,b,k){return ki(Ci(g,v.length-b),v,b,k)}a.prototype.write=function(g,b,k,R){if(b===void 0)R="utf8",k=this.length,b=0;else if(k===void 0&&typeof b=="string")R=b,k=this.length,b=0;else if(isFinite(b))b=b>>>0,isFinite(k)?(k=k>>>0,R===void 0&&(R="utf8")):(R=k,k=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const O=this.length-b;if((k===void 0||k>O)&&(k=O),g.length>0&&(k<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");R||(R="utf8");let j=!1;for(;;)switch(R){case"hex":return D(this,g,b,k);case"utf8":case"utf-8":return M(this,g,b,k);case"ascii":case"latin1":case"binary":return U(this,g,b,k);case"base64":return N(this,g,b,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,g,b,k);default:if(j)throw new TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),j=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(v,g,b){return g===0&&b===v.length?t.fromByteArray(v):t.fromByteArray(v.slice(g,b))}function ce(v,g,b){b=Math.min(v.length,b);const k=[];let R=g;for(;R<b;){const O=v[R];let j=null,de=O>239?4:O>223?3:O>191?2:1;if(R+de<=b){let Ze,Ue,Ke,De;switch(de){case 1:O<128&&(j=O);break;case 2:Ze=v[R+1],(Ze&192)===128&&(De=(O&31)<<6|Ze&63,De>127&&(j=De));break;case 3:Ze=v[R+1],Ue=v[R+2],(Ze&192)===128&&(Ue&192)===128&&(De=(O&15)<<12|(Ze&63)<<6|Ue&63,De>2047&&(De<55296||De>57343)&&(j=De));break;case 4:Ze=v[R+1],Ue=v[R+2],Ke=v[R+3],(Ze&192)===128&&(Ue&192)===128&&(Ke&192)===128&&(De=(O&15)<<18|(Ze&63)<<12|(Ue&63)<<6|Ke&63,De>65535&&De<1114112&&(j=De))}}j===null?(j=65533,de=1):j>65535&&(j-=65536,k.push(j>>>10&1023|55296),j=56320|j&1023),k.push(j),R+=de}return Se(k)}const ge=4096;function Se(v){const g=v.length;if(g<=ge)return String.fromCharCode.apply(String,v);let b="",k=0;for(;k<g;)b+=String.fromCharCode.apply(String,v.slice(k,k+=ge));return b}function _e(v,g,b){let k="";b=Math.min(v.length,b);for(let R=g;R<b;++R)k+=String.fromCharCode(v[R]&127);return k}function Le(v,g,b){let k="";b=Math.min(v.length,b);for(let R=g;R<b;++R)k+=String.fromCharCode(v[R]);return k}function ze(v,g,b){const k=v.length;(!g||g<0)&&(g=0),(!b||b<0||b>k)&&(b=k);let R="";for(let O=g;O<b;++O)R+=Ii[v[O]];return R}function tt(v,g,b){const k=v.slice(g,b);let R="";for(let O=0;O<k.length-1;O+=2)R+=String.fromCharCode(k[O]+k[O+1]*256);return R}a.prototype.slice=function(g,b){const k=this.length;g=~~g,b=b===void 0?k:~~b,g<0?(g+=k,g<0&&(g=0)):g>k&&(g=k),b<0?(b+=k,b<0&&(b=0)):b>k&&(b=k),b<g&&(b=g);const R=this.subarray(g,b);return Object.setPrototypeOf(R,a.prototype),R};function Ie(v,g,b){if(v%1!==0||v<0)throw new RangeError("offset is not uint");if(v+g>b)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(g,b,k){g=g>>>0,b=b>>>0,k||Ie(g,b,this.length);let R=this[g],O=1,j=0;for(;++j<b&&(O*=256);)R+=this[g+j]*O;return R},a.prototype.readUintBE=a.prototype.readUIntBE=function(g,b,k){g=g>>>0,b=b>>>0,k||Ie(g,b,this.length);let R=this[g+--b],O=1;for(;b>0&&(O*=256);)R+=this[g+--b]*O;return R},a.prototype.readUint8=a.prototype.readUInt8=function(g,b){return g=g>>>0,b||Ie(g,1,this.length),this[g]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(g,b){return g=g>>>0,b||Ie(g,2,this.length),this[g]|this[g+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(g,b){return g=g>>>0,b||Ie(g,2,this.length),this[g]<<8|this[g+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(g,b){return g=g>>>0,b||Ie(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(g,b){return g=g>>>0,b||Ie(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},a.prototype.readBigUInt64LE=Yt(function(g){g=g>>>0,V(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&W(g,this.length-8);const R=b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,O=this[++g]+this[++g]*2**8+this[++g]*2**16+k*2**24;return BigInt(R)+(BigInt(O)<<BigInt(32))}),a.prototype.readBigUInt64BE=Yt(function(g){g=g>>>0,V(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&W(g,this.length-8);const R=b*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],O=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+k;return(BigInt(R)<<BigInt(32))+BigInt(O)}),a.prototype.readIntLE=function(g,b,k){g=g>>>0,b=b>>>0,k||Ie(g,b,this.length);let R=this[g],O=1,j=0;for(;++j<b&&(O*=256);)R+=this[g+j]*O;return O*=128,R>=O&&(R-=Math.pow(2,8*b)),R},a.prototype.readIntBE=function(g,b,k){g=g>>>0,b=b>>>0,k||Ie(g,b,this.length);let R=b,O=1,j=this[g+--R];for(;R>0&&(O*=256);)j+=this[g+--R]*O;return O*=128,j>=O&&(j-=Math.pow(2,8*b)),j},a.prototype.readInt8=function(g,b){return g=g>>>0,b||Ie(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},a.prototype.readInt16LE=function(g,b){g=g>>>0,b||Ie(g,2,this.length);const k=this[g]|this[g+1]<<8;return k&32768?k|4294901760:k},a.prototype.readInt16BE=function(g,b){g=g>>>0,b||Ie(g,2,this.length);const k=this[g+1]|this[g]<<8;return k&32768?k|4294901760:k},a.prototype.readInt32LE=function(g,b){return g=g>>>0,b||Ie(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},a.prototype.readInt32BE=function(g,b){return g=g>>>0,b||Ie(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},a.prototype.readBigInt64LE=Yt(function(g){g=g>>>0,V(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&W(g,this.length-8);const R=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(k<<24);return(BigInt(R)<<BigInt(32))+BigInt(b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),a.prototype.readBigInt64BE=Yt(function(g){g=g>>>0,V(g,"offset");const b=this[g],k=this[g+7];(b===void 0||k===void 0)&&W(g,this.length-8);const R=(b<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(R)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+k)}),a.prototype.readFloatLE=function(g,b){return g=g>>>0,b||Ie(g,4,this.length),n.read(this,g,!0,23,4)},a.prototype.readFloatBE=function(g,b){return g=g>>>0,b||Ie(g,4,this.length),n.read(this,g,!1,23,4)},a.prototype.readDoubleLE=function(g,b){return g=g>>>0,b||Ie(g,8,this.length),n.read(this,g,!0,52,8)},a.prototype.readDoubleBE=function(g,b){return g=g>>>0,b||Ie(g,8,this.length),n.read(this,g,!1,52,8)};function Be(v,g,b,k,R,O){if(!a.isBuffer(v))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>R||g<O)throw new RangeError('"value" argument is out of bounds');if(b+k>v.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(g,b,k,R){if(g=+g,b=b>>>0,k=k>>>0,!R){const de=Math.pow(2,8*k)-1;Be(this,g,b,k,de,0)}let O=1,j=0;for(this[b]=g&255;++j<k&&(O*=256);)this[b+j]=g/O&255;return b+k},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(g,b,k,R){if(g=+g,b=b>>>0,k=k>>>0,!R){const de=Math.pow(2,8*k)-1;Be(this,g,b,k,de,0)}let O=k-1,j=1;for(this[b+O]=g&255;--O>=0&&(j*=256);)this[b+O]=g/j&255;return b+k},a.prototype.writeUint8=a.prototype.writeUInt8=function(g,b,k){return g=+g,b=b>>>0,k||Be(this,g,b,1,255,0),this[b]=g&255,b+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(g,b,k){return g=+g,b=b>>>0,k||Be(this,g,b,2,65535,0),this[b]=g&255,this[b+1]=g>>>8,b+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(g,b,k){return g=+g,b=b>>>0,k||Be(this,g,b,2,65535,0),this[b]=g>>>8,this[b+1]=g&255,b+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(g,b,k){return g=+g,b=b>>>0,k||Be(this,g,b,4,4294967295,0),this[b+3]=g>>>24,this[b+2]=g>>>16,this[b+1]=g>>>8,this[b]=g&255,b+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(g,b,k){return g=+g,b=b>>>0,k||Be(this,g,b,4,4294967295,0),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4};function bt(v,g,b,k,R){x(g,k,R,v,b,7);let O=Number(g&BigInt(4294967295));v[b++]=O,O=O>>8,v[b++]=O,O=O>>8,v[b++]=O,O=O>>8,v[b++]=O;let j=Number(g>>BigInt(32)&BigInt(4294967295));return v[b++]=j,j=j>>8,v[b++]=j,j=j>>8,v[b++]=j,j=j>>8,v[b++]=j,b}function Wt(v,g,b,k,R){x(g,k,R,v,b,7);let O=Number(g&BigInt(4294967295));v[b+7]=O,O=O>>8,v[b+6]=O,O=O>>8,v[b+5]=O,O=O>>8,v[b+4]=O;let j=Number(g>>BigInt(32)&BigInt(4294967295));return v[b+3]=j,j=j>>8,v[b+2]=j,j=j>>8,v[b+1]=j,j=j>>8,v[b]=j,b+8}a.prototype.writeBigUInt64LE=Yt(function(g,b=0){return bt(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Yt(function(g,b=0){return Wt(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(g,b,k,R){if(g=+g,b=b>>>0,!R){const Ze=Math.pow(2,8*k-1);Be(this,g,b,k,Ze-1,-Ze)}let O=0,j=1,de=0;for(this[b]=g&255;++O<k&&(j*=256);)g<0&&de===0&&this[b+O-1]!==0&&(de=1),this[b+O]=(g/j>>0)-de&255;return b+k},a.prototype.writeIntBE=function(g,b,k,R){if(g=+g,b=b>>>0,!R){const Ze=Math.pow(2,8*k-1);Be(this,g,b,k,Ze-1,-Ze)}let O=k-1,j=1,de=0;for(this[b+O]=g&255;--O>=0&&(j*=256);)g<0&&de===0&&this[b+O+1]!==0&&(de=1),this[b+O]=(g/j>>0)-de&255;return b+k},a.prototype.writeInt8=function(g,b,k){return g=+g,b=b>>>0,k||Be(this,g,b,1,127,-128),g<0&&(g=255+g+1),this[b]=g&255,b+1},a.prototype.writeInt16LE=function(g,b,k){return g=+g,b=b>>>0,k||Be(this,g,b,2,32767,-32768),this[b]=g&255,this[b+1]=g>>>8,b+2},a.prototype.writeInt16BE=function(g,b,k){return g=+g,b=b>>>0,k||Be(this,g,b,2,32767,-32768),this[b]=g>>>8,this[b+1]=g&255,b+2},a.prototype.writeInt32LE=function(g,b,k){return g=+g,b=b>>>0,k||Be(this,g,b,4,2147483647,-2147483648),this[b]=g&255,this[b+1]=g>>>8,this[b+2]=g>>>16,this[b+3]=g>>>24,b+4},a.prototype.writeInt32BE=function(g,b,k){return g=+g,b=b>>>0,k||Be(this,g,b,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4},a.prototype.writeBigInt64LE=Yt(function(g,b=0){return bt(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Yt(function(g,b=0){return Wt(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function je(v,g,b,k,R,O){if(b+k>v.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function L(v,g,b,k,R){return g=+g,b=b>>>0,R||je(v,g,b,4),n.write(v,g,b,k,23,4),b+4}a.prototype.writeFloatLE=function(g,b,k){return L(this,g,b,!0,k)},a.prototype.writeFloatBE=function(g,b,k){return L(this,g,b,!1,k)};function P(v,g,b,k,R){return g=+g,b=b>>>0,R||je(v,g,b,8),n.write(v,g,b,k,52,8),b+8}a.prototype.writeDoubleLE=function(g,b,k){return P(this,g,b,!0,k)},a.prototype.writeDoubleBE=function(g,b,k){return P(this,g,b,!1,k)},a.prototype.copy=function(g,b,k,R){if(!a.isBuffer(g))throw new TypeError("argument should be a Buffer");if(k||(k=0),!R&&R!==0&&(R=this.length),b>=g.length&&(b=g.length),b||(b=0),R>0&&R<k&&(R=k),R===k||g.length===0||this.length===0)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(k<0||k>=this.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),g.length-b<R-k&&(R=g.length-b+k);const O=R-k;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(b,k,R):Uint8Array.prototype.set.call(g,this.subarray(k,R),b),O},a.prototype.fill=function(g,b,k,R){if(typeof g=="string"){if(typeof b=="string"?(R=b,b=0,k=this.length):typeof k=="string"&&(R=k,k=this.length),R!==void 0&&typeof R!="string")throw new TypeError("encoding must be a string");if(typeof R=="string"&&!a.isEncoding(R))throw new TypeError("Unknown encoding: "+R);if(g.length===1){const j=g.charCodeAt(0);(R==="utf8"&&j<128||R==="latin1")&&(g=j)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(b<0||this.length<b||this.length<k)throw new RangeError("Out of range index");if(k<=b)return this;b=b>>>0,k=k===void 0?this.length:k>>>0,g||(g=0);let O;if(typeof g=="number")for(O=b;O<k;++O)this[O]=g;else{const j=a.isBuffer(g)?g:a.from(g,R),de=j.length;if(de===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(O=0;O<k-b;++O)this[O+b]=j[O%de]}return this};const q={};function $(v,g,b){q[v]=class extends b{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${v}]`,this.stack,delete this.name}get code(){return v}set code(R){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:R,writable:!0})}toString(){return`${this.name} [${v}]: ${this.message}`}}}$("ERR_BUFFER_OUT_OF_BOUNDS",function(v){return v?`${v} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$("ERR_INVALID_ARG_TYPE",function(v,g){return`The "${v}" argument must be of type number. Received type ${typeof g}`},TypeError),$("ERR_OUT_OF_RANGE",function(v,g,b){let k=`The value of "${v}" is out of range.`,R=b;return Number.isInteger(b)&&Math.abs(b)>2**32?R=Z(String(b)):typeof b=="bigint"&&(R=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(R=Z(R)),R+="n"),k+=` It must be ${g}. Received ${R}`,k},RangeError);function Z(v){let g="",b=v.length;const k=v[0]==="-"?1:0;for(;b>=k+4;b-=3)g=`_${v.slice(b-3,b)}${g}`;return`${v.slice(0,b)}${g}`}function C(v,g,b){V(g,"offset"),(v[g]===void 0||v[g+b]===void 0)&&W(g,v.length-(b+1))}function x(v,g,b,k,R,O){if(v>b||v<g){const j=typeof g=="bigint"?"n":"";let de;throw g===0||g===BigInt(0)?de=`>= 0${j} and < 2${j} ** ${(O+1)*8}${j}`:de=`>= -(2${j} ** ${(O+1)*8-1}${j}) and < 2 ** ${(O+1)*8-1}${j}`,new q.ERR_OUT_OF_RANGE("value",de,v)}C(k,R,O)}function V(v,g){if(typeof v!="number")throw new q.ERR_INVALID_ARG_TYPE(g,"number",v)}function W(v,g,b){throw Math.floor(v)!==v?(V(v,b),new q.ERR_OUT_OF_RANGE("offset","an integer",v)):g<0?new q.ERR_BUFFER_OUT_OF_BOUNDS:new q.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${g}`,v)}const fe=/[^+/0-9A-Za-z-_]/g;function ne(v){if(v=v.split("=")[0],v=v.trim().replace(fe,""),v.length<2)return"";for(;v.length%4!==0;)v=v+"=";return v}function he(v,g){g=g||1/0;let b;const k=v.length;let R=null;const O=[];for(let j=0;j<k;++j){if(b=v.charCodeAt(j),b>55295&&b<57344){if(!R){if(b>56319){(g-=3)>-1&&O.push(239,191,189);continue}else if(j+1===k){(g-=3)>-1&&O.push(239,191,189);continue}R=b;continue}if(b<56320){(g-=3)>-1&&O.push(239,191,189),R=b;continue}b=(R-55296<<10|b-56320)+65536}else R&&(g-=3)>-1&&O.push(239,191,189);if(R=null,b<128){if((g-=1)<0)break;O.push(b)}else if(b<2048){if((g-=2)<0)break;O.push(b>>6|192,b&63|128)}else if(b<65536){if((g-=3)<0)break;O.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((g-=4)<0)break;O.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return O}function Zt(v){const g=[];for(let b=0;b<v.length;++b)g.push(v.charCodeAt(b)&255);return g}function Ci(v,g){let b,k,R;const O=[];for(let j=0;j<v.length&&!((g-=2)<0);++j)b=v.charCodeAt(j),k=b>>8,R=b%256,O.push(R),O.push(k);return O}function Ti(v){return t.toByteArray(ne(v))}function ki(v,g,b,k){let R;for(R=0;R<k&&!(R+b>=g.length||R>=v.length);++R)g[R+b]=v[R];return R}function It(v,g){return v instanceof g||v!=null&&v.constructor!=null&&v.constructor.name!=null&&v.constructor.name===g.name}function Rr(v){return v!==v}const Ii=function(){const v="0123456789abcdef",g=new Array(256);for(let b=0;b<16;++b){const k=b*16;for(let R=0;R<16;++R)g[k+R]=v[b]+v[R]}return g}();function Yt(v){return typeof BigInt>"u"?cr:v}function cr(){throw new Error("BigInt not supported")}})(ye);const Iv=Ce({__proto__:null,default:mf(ye)},[ye]),gt={},u7=Object.freeze(Object.defineProperty({__proto__:null,default:gt},Symbol.toStringTag,{value:"Module"}));function Bv(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 ye.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(`${Bv(o)} fetching ${t}`,{cause:o})}}else throw new Error(`${Bv(i)} fetching ${t}`,{cause:i})}return r}async read(t,n=0,r,i=0,o={}){const{headers:s={},signal:a,overrides:u={}}=o;r<1/0?s.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(s.range=`bytes=${i}-`);const l=await this.fetch(this.url,{...this.baseOverrides,...u,headers:{...s,...u.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&&i===0||l.status===206){const c=await this.getBufferFromResponse(l),f=c.copy(t,n,0,Math.min(r,c.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:s={}}=r,a=await this.fetch(this.url,{headers:i,method:"GET",redirect:"follow",mode:"cors",signal:o,...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 t=ye.Buffer.allocUnsafe(10);if(await this.read(t,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function Dv(e){const t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new Error("problem reading blob"))},t.onabort=()=>{r(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&typeof t.result!="string"?n(t.result):r(new Error("unknown error reading blob"))},t.readAsArrayBuffer(e)})}function c7(e){const t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new Error("problem reading blob"))},t.onabort=()=>{r(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&typeof t.result=="string"?n(t.result):r(new Error("unknown error reading blob"))},t.readAsText(e)})}class f7{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,s=o+r,a=await Dv(this.blob.slice(o,s)),u=ye.Buffer.from(a);return{bytesRead:u.copy(t,n),buffer:u}}async readFile(t){const n=typeof t=="string"?t:t==null?void 0:t.encoding;if(n==="utf8")return c7(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await Dv(this.blob);return ye.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function Fv(e,t={}){return new Fn(e,t)}function h7(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return Fv(e,r);if(t!==void 0)return new gt(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const Il=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:f7,LocalFile:gt,RemoteFile:Fn,fromUrl:Fv,open:h7},Symbol.toStringTag,{value:"Module"}));var Er={};(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(o,s){return Object.prototype.hasOwnProperty.call(o,s)}e.assign=function(o){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 u in a)n(a,u)&&(o[u]=a[u])}}return o},e.shrinkBuf=function(o,s){return o.length===s?o:o.subarray?o.subarray(0,s):(o.length=s,o)};var r={arraySet:function(o,s,a,u,l){if(s.subarray&&o.subarray){o.set(s.subarray(a,a+u),l);return}for(var c=0;c<u;c++)o[l+c]=s[a+c]},flattenChunks:function(o){var s,a,u,l,c,f;for(u=0,s=0,a=o.length;s<a;s++)u+=o[s].length;for(f=new Uint8Array(u),l=0,s=0,a=o.length;s<a;s++)c=o[s],f.set(c,l),l+=c.length;return f}},i={arraySet:function(o,s,a,u,l){for(var c=0;c<u;c++)o[l+c]=s[a+c]},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)})(Er);var Bl={},Jn={},ps={},d7=Er,p7=4,Rv=0,Mv=1,g7=2;function gs(e){for(var t=e.length;--t>=0;)e[t]=0}var m7=0,Pv=1,b7=2,y7=3,w7=258,ap=29,Dl=256,Fl=Dl+1+ap,ms=30,lp=19,Nv=2*Fl+1,lo=15,up=16,v7=7,cp=256,Lv=16,Ov=17,zv=18,fp=[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],yf=[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],x7=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Uv=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],A7=512,Sr=new Array((Fl+2)*2);gs(Sr);var Rl=new Array(ms*2);gs(Rl);var Ml=new Array(A7);gs(Ml);var Pl=new Array(w7-y7+1);gs(Pl);var hp=new Array(ap);gs(hp);var wf=new Array(ms);gs(wf);function dp(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var Gv,Hv,Vv;function pp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function $v(e){return e<256?Ml[e]:Ml[256+(e>>>7)]}function Nl(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Vt(e,t,n){e.bi_valid>up-n?(e.bi_buf|=t<<e.bi_valid&65535,Nl(e,e.bi_buf),e.bi_buf=t>>up-e.bi_valid,e.bi_valid+=n-up):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function er(e,t,n){Vt(e,n[t*2],n[t*2+1])}function jv(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function E7(e){e.bi_valid===16?(Nl(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function S7(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,u=t.stat_desc.max_length,l,c,f,h,d,p,m=0;for(h=0;h<=lo;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<Nv;l++)c=e.heap[l],h=n[n[c*2+1]*2+1]+1,h>u&&(h=u,m++),n[c*2+1]=h,!(c>r)&&(e.bl_count[h]++,d=0,c>=a&&(d=s[c-a]),p=n[c*2],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[c*2+1]+d)));if(m!==0){do{for(h=u-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(h=u;h!==0;h--)for(c=e.bl_count[h];c!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),c--)}}function qv(e,t,n){var r=new Array(lo+1),i=0,o,s;for(o=1;o<=lo;o++)r[o]=i=i+n[o-1]<<1;for(s=0;s<=t;s++){var a=e[s*2+1];a!==0&&(e[s*2]=jv(r[a]++,a))}}function _7(){var e,t,n,r,i,o=new Array(lo+1);for(n=0,r=0;r<ap-1;r++)for(hp[r]=n,e=0;e<1<<fp[r];e++)Pl[n++]=r;for(Pl[n-1]=r,i=0,r=0;r<16;r++)for(wf[r]=i,e=0;e<1<<yf[r];e++)Ml[i++]=r;for(i>>=7;r<ms;r++)for(wf[r]=i<<7,e=0;e<1<<yf[r]-7;e++)Ml[256+i++]=r;for(t=0;t<=lo;t++)o[t]=0;for(e=0;e<=143;)Sr[e*2+1]=8,e++,o[8]++;for(;e<=255;)Sr[e*2+1]=9,e++,o[9]++;for(;e<=279;)Sr[e*2+1]=7,e++,o[7]++;for(;e<=287;)Sr[e*2+1]=8,e++,o[8]++;for(qv(Sr,Fl+1,o),e=0;e<ms;e++)Rl[e*2+1]=5,Rl[e*2]=jv(e,5);Gv=new dp(Sr,fp,Dl+1,Fl,lo),Hv=new dp(Rl,yf,0,ms,lo),Vv=new dp(new Array(0),x7,0,lp,v7)}function Wv(e){var t;for(t=0;t<Fl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<ms;t++)e.dyn_dtree[t*2]=0;for(t=0;t<lp;t++)e.bl_tree[t*2]=0;e.dyn_ltree[cp*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Zv(e){e.bi_valid>8?Nl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function C7(e,t,n,r){Zv(e),Nl(e,n),Nl(e,~n),d7.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function Yv(e,t,n,r){var i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function gp(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&Yv(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Yv(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function Qv(e,t,n){var r,i,o=0,s,a;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,r===0?er(e,i,t):(s=Pl[i],er(e,s+Dl+1,t),a=fp[s],a!==0&&(i-=hp[s],Vt(e,i,a)),r--,s=$v(r),er(e,s,n),a=yf[s],a!==0&&(r-=wf[s],Vt(e,r,a)));while(o<e.last_lit);er(e,cp,t)}function mp(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,s,a,u=-1,l;for(e.heap_len=0,e.heap_max=Nv,s=0;s<o;s++)n[s*2]!==0?(e.heap[++e.heap_len]=u=s,e.depth[s]=0):n[s*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=u,s=e.heap_len>>1;s>=1;s--)gp(e,n,s);l=o;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],gp(e,n,1),a=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=a,n[l*2]=n[s*2]+n[a*2],e.depth[l]=(e.depth[s]>=e.depth[a]?e.depth[s]:e.depth[a])+1,n[s*2+1]=n[a*2+1]=l,e.heap[1]=l++,gp(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],S7(e,t),qv(n,u,e.bl_count)}function Xv(e,t,n){var r,i=-1,o,s=t[0*2+1],a=0,u=7,l=4;for(s===0&&(u=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=s,s=t[(r+1)*2+1],!(++a<u&&o===s)&&(a<l?e.bl_tree[o*2]+=a:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[Lv*2]++):a<=10?e.bl_tree[Ov*2]++:e.bl_tree[zv*2]++,a=0,i=o,s===0?(u=138,l=3):o===s?(u=6,l=3):(u=7,l=4))}function Kv(e,t,n){var r,i=-1,o,s=t[0*2+1],a=0,u=7,l=4;for(s===0&&(u=138,l=3),r=0;r<=n;r++)if(o=s,s=t[(r+1)*2+1],!(++a<u&&o===s)){if(a<l)do er(e,o,e.bl_tree);while(--a!==0);else o!==0?(o!==i&&(er(e,o,e.bl_tree),a--),er(e,Lv,e.bl_tree),Vt(e,a-3,2)):a<=10?(er(e,Ov,e.bl_tree),Vt(e,a-3,3)):(er(e,zv,e.bl_tree),Vt(e,a-11,7));a=0,i=o,s===0?(u=138,l=3):o===s?(u=6,l=3):(u=7,l=4)}}function T7(e){var t;for(Xv(e,e.dyn_ltree,e.l_desc.max_code),Xv(e,e.dyn_dtree,e.d_desc.max_code),mp(e,e.bl_desc),t=lp-1;t>=3&&e.bl_tree[Uv[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function k7(e,t,n,r){var i;for(Vt(e,t-257,5),Vt(e,n-1,5),Vt(e,r-4,4),i=0;i<r;i++)Vt(e,e.bl_tree[Uv[i]*2+1],3);Kv(e,e.dyn_ltree,t-1),Kv(e,e.dyn_dtree,n-1)}function I7(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return Rv;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Mv;for(n=32;n<Dl;n++)if(e.dyn_ltree[n*2]!==0)return Mv;return Rv}var Jv=!1;function B7(e){Jv||(_7(),Jv=!0),e.l_desc=new pp(e.dyn_ltree,Gv),e.d_desc=new pp(e.dyn_dtree,Hv),e.bl_desc=new pp(e.bl_tree,Vv),e.bi_buf=0,e.bi_valid=0,Wv(e)}function ex(e,t,n,r){Vt(e,(m7<<1)+(r?1:0),3),C7(e,t,n)}function D7(e){Vt(e,Pv<<1,3),er(e,cp,Sr),E7(e)}function F7(e,t,n,r){var i,o,s=0;e.level>0?(e.strm.data_type===g7&&(e.strm.data_type=I7(e)),mp(e,e.l_desc),mp(e,e.d_desc),s=T7(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?ex(e,t,n,r):e.strategy===p7||o===i?(Vt(e,(Pv<<1)+(r?1:0),3),Qv(e,Sr,Rl)):(Vt(e,(b7<<1)+(r?1:0),3),k7(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),Qv(e,e.dyn_ltree,e.dyn_dtree)),Wv(e),r&&Zv(e)}function R7(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Pl[n]+Dl+1)*2]++,e.dyn_dtree[$v(t)*2]++),e.last_lit===e.lit_bufsize-1}ps._tr_init=B7,ps._tr_stored_block=ex,ps._tr_flush_block=F7,ps._tr_tally=R7,ps._tr_align=D7;function M7(e,t,n,r){for(var i=e&65535|0,o=e>>>16&65535|0,s=0;n!==0;){s=n>2e3?2e3:n,n-=s;do i=i+t[r++]|0,o=o+i|0;while(--s);i%=65521,o%=65521}return i|o<<16|0}var tx=M7;function P7(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}var N7=P7();function L7(e,t,n,r){var i=N7,o=r+n;e^=-1;for(var s=r;s<o;s++)e=e>>>8^i[(e^t[s])&255];return e^-1}var nx=L7,bp={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"},Pt=Er,dn=ps,rx=tx,li=nx,O7=bp,uo=0,z7=1,U7=3,ui=4,ix=5,tr=0,ox=1,pn=-2,G7=-3,yp=-5,H7=-1,V7=1,vf=2,$7=3,j7=4,q7=0,W7=2,xf=8,Z7=9,Y7=15,Q7=8,X7=29,K7=256,wp=K7+1+X7,J7=30,eP=19,tP=2*wp+1,nP=15,me=3,ci=258,Rn=ci+me+1,rP=32,Af=42,vp=69,Ef=73,Sf=91,_f=103,co=113,Ll=666,ut=1,Ol=2,fo=3,bs=4,iP=3;function fi(e,t){return e.msg=O7[t],t}function sx(e){return(e<<1)-(e>4?9:0)}function hi(e){for(var t=e.length;--t>=0;)e[t]=0}function di(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Pt.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function xt(e,t){dn._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,di(e.strm)}function Ee(e,t){e.pending_buf[e.pending++]=t}function zl(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function oP(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Pt.arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=rx(e.adler,t,i,n):e.state.wrap===2&&(e.adler=li(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function ax(e,t){var n=e.max_chain_length,r=e.strstart,i,o,s=e.prev_length,a=e.nice_match,u=e.strstart>e.w_size-Rn?e.strstart-(e.w_size-Rn):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+ci,d=l[r+s-1],p=l[r+s];e.prev_length>=e.good_match&&(n>>=2),a>e.lookahead&&(a=e.lookahead);do if(i=t,!(l[i+s]!==p||l[i+s-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=ci-(h-r),r=h-ci,o>s){if(e.match_start=t,s=o,o>=a)break;d=l[r+s-1],p=l[r+s]}}while((t=f[t&c])>u&&--n!==0);return s<=e.lookahead?s:e.lookahead}function ho(e){var t=e.w_size,n,r,i,o,s;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Rn)){Pt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);o+=t}if(e.strm.avail_in===0)break;if(r=oP(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=me)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+me-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<me)););}while(e.lookahead<Rn&&e.strm.avail_in!==0)}function sP(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ho(e),e.lookahead===0&&t===uo)return ut;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,xt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Rn&&(xt(e,!1),e.strm.avail_out===0))return ut}return e.insert=0,t===ui?(xt(e,!0),e.strm.avail_out===0?fo:bs):(e.strstart>e.block_start&&(xt(e,!1),e.strm.avail_out===0),ut)}function xp(e,t){for(var n,r;;){if(e.lookahead<Rn){if(ho(e),e.lookahead<Rn&&t===uo)return ut;if(e.lookahead===0)break}if(n=0,e.lookahead>=me&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+me-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Rn&&(e.match_length=ax(e,n)),e.match_length>=me)if(r=dn._tr_tally(e,e.strstart-e.match_start,e.match_length-me),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=me){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+me-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=dn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(xt(e,!1),e.strm.avail_out===0))return ut}return e.insert=e.strstart<me-1?e.strstart:me-1,t===ui?(xt(e,!0),e.strm.avail_out===0?fo:bs):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?ut:Ol}function ys(e,t){for(var n,r,i;;){if(e.lookahead<Rn){if(ho(e),e.lookahead<Rn&&t===uo)return ut;if(e.lookahead===0)break}if(n=0,e.lookahead>=me&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+me-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=me-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Rn&&(e.match_length=ax(e,n),e.match_length<=5&&(e.strategy===V7||e.match_length===me&&e.strstart-e.match_start>4096)&&(e.match_length=me-1)),e.prev_length>=me&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-me,r=dn._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-me),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+me-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=me-1,e.strstart++,r&&(xt(e,!1),e.strm.avail_out===0))return ut}else if(e.match_available){if(r=dn._tr_tally(e,0,e.window[e.strstart-1]),r&&xt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return ut}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=dn._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<me-1?e.strstart:me-1,t===ui?(xt(e,!0),e.strm.avail_out===0?fo:bs):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?ut:Ol}function aP(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=ci){if(ho(e),e.lookahead<=ci&&t===uo)return ut;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=me&&e.strstart>0&&(i=e.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=e.strstart+ci;do;while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);e.match_length=ci-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=me?(n=dn._tr_tally(e,1,e.match_length-me),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=dn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(xt(e,!1),e.strm.avail_out===0))return ut}return e.insert=0,t===ui?(xt(e,!0),e.strm.avail_out===0?fo:bs):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?ut:Ol}function lP(e,t){for(var n;;){if(e.lookahead===0&&(ho(e),e.lookahead===0)){if(t===uo)return ut;break}if(e.match_length=0,n=dn._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(xt(e,!1),e.strm.avail_out===0))return ut}return e.insert=0,t===ui?(xt(e,!0),e.strm.avail_out===0?fo:bs):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?ut:Ol}function nr(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var ws;ws=[new nr(0,0,0,0,sP),new nr(4,4,8,4,xp),new nr(4,5,16,8,xp),new nr(4,6,32,32,xp),new nr(4,4,16,16,ys),new nr(8,16,32,32,ys),new nr(8,16,128,128,ys),new nr(8,32,128,256,ys),new nr(32,128,258,1024,ys),new nr(32,258,258,4096,ys)];function uP(e){e.window_size=2*e.w_size,hi(e.head),e.max_lazy_match=ws[e.level].max_lazy,e.good_match=ws[e.level].good_length,e.nice_match=ws[e.level].nice_length,e.max_chain_length=ws[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=me-1,e.match_available=0,e.ins_h=0}function cP(){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=xf,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 Pt.Buf16(tP*2),this.dyn_dtree=new Pt.Buf16((2*J7+1)*2),this.bl_tree=new Pt.Buf16((2*eP+1)*2),hi(this.dyn_ltree),hi(this.dyn_dtree),hi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Pt.Buf16(nP+1),this.heap=new Pt.Buf16(2*wp+1),hi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Pt.Buf16(2*wp+1),hi(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 lx(e){var t;return!e||!e.state?fi(e,pn):(e.total_in=e.total_out=0,e.data_type=W7,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Af:co,e.adler=t.wrap===2?0:1,t.last_flush=uo,dn._tr_init(t),tr)}function ux(e){var t=lx(e);return t===tr&&uP(e.state),t}function fP(e,t){return!e||!e.state||e.state.wrap!==2?pn:(e.state.gzhead=t,tr)}function cx(e,t,n,r,i,o){if(!e)return pn;var s=1;if(t===H7&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>Z7||n!==xf||r<8||r>15||t<0||t>9||o<0||o>j7)return fi(e,pn);r===8&&(r=9);var a=new cP;return e.state=a,a.strm=e,a.wrap=s,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+me-1)/me),a.window=new Pt.Buf8(a.w_size*2),a.head=new Pt.Buf16(a.hash_size),a.prev=new Pt.Buf16(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=a.lit_bufsize*4,a.pending_buf=new Pt.Buf8(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=3*a.lit_bufsize,a.level=t,a.strategy=o,a.method=n,ux(e)}function hP(e,t){return cx(e,t,xf,Y7,Q7,q7)}function dP(e,t){var n,r,i,o;if(!e||!e.state||t>ix||t<0)return e?fi(e,pn):pn;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===Ll&&t!==ui)return fi(e,e.avail_out===0?yp:pn);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===Af)if(r.wrap===2)e.adler=0,Ee(r,31),Ee(r,139),Ee(r,8),r.gzhead?(Ee(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Ee(r,r.gzhead.time&255),Ee(r,r.gzhead.time>>8&255),Ee(r,r.gzhead.time>>16&255),Ee(r,r.gzhead.time>>24&255),Ee(r,r.level===9?2:r.strategy>=vf||r.level<2?4:0),Ee(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(Ee(r,r.gzhead.extra.length&255),Ee(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=li(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=vp):(Ee(r,0),Ee(r,0),Ee(r,0),Ee(r,0),Ee(r,0),Ee(r,r.level===9?2:r.strategy>=vf||r.level<2?4:0),Ee(r,iP),r.status=co);else{var s=xf+(r.w_bits-8<<4)<<8,a=-1;r.strategy>=vf||r.level<2?a=0:r.level<6?a=1:r.level===6?a=2:a=3,s|=a<<6,r.strstart!==0&&(s|=rP),s+=31-s%31,r.status=co,zl(r,s),r.strstart!==0&&(zl(r,e.adler>>>16),zl(r,e.adler&65535)),e.adler=1}if(r.status===vp)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(r.gzhead.extra.length&65535)&&!(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=li(e.adler,r.pending_buf,r.pending-i,i)),di(e),i=r.pending,r.pending===r.pending_buf_size));)Ee(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=li(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=Ef)}else r.status=Ef;if(r.status===Ef)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=li(e.adler,r.pending_buf,r.pending-i,i)),di(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}r.gzindex<r.gzhead.name.length?o=r.gzhead.name.charCodeAt(r.gzindex++)&255:o=0,Ee(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=li(e.adler,r.pending_buf,r.pending-i,i)),o===0&&(r.gzindex=0,r.status=Sf)}else r.status=Sf;if(r.status===Sf)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=li(e.adler,r.pending_buf,r.pending-i,i)),di(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}r.gzindex<r.gzhead.comment.length?o=r.gzhead.comment.charCodeAt(r.gzindex++)&255:o=0,Ee(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=li(e.adler,r.pending_buf,r.pending-i,i)),o===0&&(r.status=_f)}else r.status=_f;if(r.status===_f&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&di(e),r.pending+2<=r.pending_buf_size&&(Ee(r,e.adler&255),Ee(r,e.adler>>8&255),e.adler=0,r.status=co)):r.status=co),r.pending!==0){if(di(e),e.avail_out===0)return r.last_flush=-1,tr}else if(e.avail_in===0&&sx(t)<=sx(n)&&t!==ui)return fi(e,yp);if(r.status===Ll&&e.avail_in!==0)return fi(e,yp);if(e.avail_in!==0||r.lookahead!==0||t!==uo&&r.status!==Ll){var u=r.strategy===vf?lP(r,t):r.strategy===$7?aP(r,t):ws[r.level].func(r,t);if((u===fo||u===bs)&&(r.status=Ll),u===ut||u===fo)return e.avail_out===0&&(r.last_flush=-1),tr;if(u===Ol&&(t===z7?dn._tr_align(r):t!==ix&&(dn._tr_stored_block(r,0,0,!1),t===U7&&(hi(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),di(e),e.avail_out===0))return r.last_flush=-1,tr}return t!==ui?tr:r.wrap<=0?ox:(r.wrap===2?(Ee(r,e.adler&255),Ee(r,e.adler>>8&255),Ee(r,e.adler>>16&255),Ee(r,e.adler>>24&255),Ee(r,e.total_in&255),Ee(r,e.total_in>>8&255),Ee(r,e.total_in>>16&255),Ee(r,e.total_in>>24&255)):(zl(r,e.adler>>>16),zl(r,e.adler&65535)),di(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?tr:ox)}function pP(e){var t;return!e||!e.state?pn:(t=e.state.status,t!==Af&&t!==vp&&t!==Ef&&t!==Sf&&t!==_f&&t!==co&&t!==Ll?fi(e,pn):(e.state=null,t===co?fi(e,G7):tr))}function gP(e,t){var n=t.length,r,i,o,s,a,u,l,c;if(!e||!e.state||(r=e.state,s=r.wrap,s===2||s===1&&r.status!==Af||r.lookahead))return pn;for(s===1&&(e.adler=rx(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(s===0&&(hi(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new Pt.Buf8(r.w_size),Pt.arraySet(c,t,n-r.w_size,r.w_size,0),t=c,n=r.w_size),a=e.avail_in,u=e.next_in,l=e.input,e.avail_in=n,e.next_in=0,e.input=t,ho(r);r.lookahead>=me;){i=r.strstart,o=r.lookahead-(me-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+me-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--o);r.strstart=i,r.lookahead=me-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=me-1,r.match_available=0,e.next_in=u,e.input=l,e.avail_in=a,r.wrap=s,tr}Jn.deflateInit=hP,Jn.deflateInit2=cx,Jn.deflateReset=ux,Jn.deflateResetKeep=lx,Jn.deflateSetHeader=fP,Jn.deflate=dP,Jn.deflateEnd=pP,Jn.deflateSetDictionary=gP,Jn.deflateInfo="pako deflate (from Nodeca project)";var po={},Cf=Er,fx=!0,hx=!0;try{String.fromCharCode.apply(null,[0])}catch{fx=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{hx=!1}for(var Ul=new Cf.Buf8(256),pi=0;pi<256;pi++)Ul[pi]=pi>=252?6:pi>=248?5:pi>=240?4:pi>=224?3:pi>=192?2:1;Ul[254]=Ul[254]=1,po.string2buf=function(e){var t,n,r,i,o,s=e.length,a=0;for(i=0;i<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<s&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Cf.Buf8(a),o=0,i=0;o<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<s&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};function dx(e,t){if(t<65534&&(e.subarray&&hx||!e.subarray&&fx))return String.fromCharCode.apply(null,Cf.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}po.buf2binstring=function(e){return dx(e,e.length)},po.binstring2buf=function(e){for(var t=new Cf.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},po.buf2string=function(e,t){var n,r,i,o,s=t||e.length,a=new Array(s*2);for(r=0,n=0;n<s;){if(i=e[n++],i<128){a[r++]=i;continue}if(o=Ul[i],o>4){a[r++]=65533,n+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&n<s;)i=i<<6|e[n++]&63,o--;if(o>1){a[r++]=65533;continue}i<65536?a[r++]=i:(i-=65536,a[r++]=55296|i>>10&1023,a[r++]=56320|i&1023)}return dx(a,r)},po.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Ul[e[n]]>t?n:t};function mP(){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 px=mP,Gl=Jn,Hl=Er,Ap=po,Ep=bp,bP=px,gx=Object.prototype.toString,yP=0,Sp=4,vs=0,mx=1,bx=2,wP=-1,vP=0,xP=8;function go(e){if(!(this instanceof go))return new go(e);this.options=Hl.assign({level:wP,method:xP,chunkSize:16384,windowBits:15,memLevel:8,strategy:vP,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bP,this.strm.avail_out=0;var n=Gl.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==vs)throw new Error(Ep[n]);if(t.header&&Gl.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=Ap.string2buf(t.dictionary):gx.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Gl.deflateSetDictionary(this.strm,r),n!==vs)throw new Error(Ep[n]);this._dict_set=!0}}go.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?Sp:yP,typeof e=="string"?n.input=Ap.string2buf(e):gx.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new Hl.Buf8(r),n.next_out=0,n.avail_out=r),i=Gl.deflate(n,o),i!==mx&&i!==vs)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(o===Sp||o===bx))&&(this.options.to==="string"?this.onData(Ap.buf2binstring(Hl.shrinkBuf(n.output,n.next_out))):this.onData(Hl.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==mx);return o===Sp?(i=Gl.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===vs):(o===bx&&(this.onEnd(vs),n.avail_out=0),!0)},go.prototype.onData=function(e){this.chunks.push(e)},go.prototype.onEnd=function(e){e===vs&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Hl.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function _p(e,t){var n=new go(t);if(n.push(e,!0),n.err)throw n.msg||Ep[n.err];return n.result}function AP(e,t){return t=t||{},t.raw=!0,_p(e,t)}function EP(e,t){return t=t||{},t.gzip=!0,_p(e,t)}Bl.Deflate=go,Bl.deflate=_p,Bl.deflateRaw=AP,Bl.gzip=EP;var Vl={},Mn={},Tf=30,SP=12,_P=function(t,n){var r,i,o,s,a,u,l,c,f,h,d,p,m,y,w,A,_,S,T,B,I,D,M,U,N;r=t.state,i=t.next_in,U=t.input,o=i+(t.avail_in-5),s=t.next_out,N=t.output,a=s-(n-t.avail_out),u=s+(t.avail_out-257),l=r.dmax,c=r.wsize,f=r.whave,h=r.wnext,d=r.window,p=r.hold,m=r.bits,y=r.lencode,w=r.distcode,A=(1<<r.lenbits)-1,_=(1<<r.distbits)-1;e:do{m<15&&(p+=U[i++]<<m,m+=8,p+=U[i++]<<m,m+=8),S=y[p&A];t:for(;;){if(T=S>>>24,p>>>=T,m-=T,T=S>>>16&255,T===0)N[s++]=S&65535;else if(T&16){B=S&65535,T&=15,T&&(m<T&&(p+=U[i++]<<m,m+=8),B+=p&(1<<T)-1,p>>>=T,m-=T),m<15&&(p+=U[i++]<<m,m+=8,p+=U[i++]<<m,m+=8),S=w[p&_];n:for(;;){if(T=S>>>24,p>>>=T,m-=T,T=S>>>16&255,T&16){if(I=S&65535,T&=15,m<T&&(p+=U[i++]<<m,m+=8,m<T&&(p+=U[i++]<<m,m+=8)),I+=p&(1<<T)-1,I>l){t.msg="invalid distance too far back",r.mode=Tf;break e}if(p>>>=T,m-=T,T=s-a,I>T){if(T=I-T,T>f&&r.sane){t.msg="invalid distance too far back",r.mode=Tf;break e}if(D=0,M=d,h===0){if(D+=c-T,T<B){B-=T;do N[s++]=d[D++];while(--T);D=s-I,M=N}}else if(h<T){if(D+=c+h-T,T-=h,T<B){B-=T;do N[s++]=d[D++];while(--T);if(D=0,h<B){T=h,B-=T;do N[s++]=d[D++];while(--T);D=s-I,M=N}}}else if(D+=h-T,T<B){B-=T;do N[s++]=d[D++];while(--T);D=s-I,M=N}for(;B>2;)N[s++]=M[D++],N[s++]=M[D++],N[s++]=M[D++],B-=3;B&&(N[s++]=M[D++],B>1&&(N[s++]=M[D++]))}else{D=s-I;do N[s++]=N[D++],N[s++]=N[D++],N[s++]=N[D++],B-=3;while(B>2);B&&(N[s++]=N[D++],B>1&&(N[s++]=N[D++]))}}else if(T&64){t.msg="invalid distance code",r.mode=Tf;break e}else{S=w[(S&65535)+(p&(1<<T)-1)];continue n}break}}else if(T&64)if(T&32){r.mode=SP;break e}else{t.msg="invalid literal/length code",r.mode=Tf;break e}else{S=y[(S&65535)+(p&(1<<T)-1)];continue t}break}}while(i<o&&s<u);B=m>>3,i-=B,m-=B<<3,p&=(1<<m)-1,t.next_in=i,t.next_out=s,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=s<u?257+(u-s):257-(s-u),r.hold=p,r.bits=m},yx=Er,xs=15,wx=852,vx=592,xx=0,Cp=1,Ax=2,CP=[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],TP=[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],kP=[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],IP=[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],BP=function(t,n,r,i,o,s,a,u){var l=u.bits,c=0,f=0,h=0,d=0,p=0,m=0,y=0,w=0,A=0,_=0,S,T,B,I,D,M=null,U=0,N,te=new yx.Buf16(xs+1),re=new yx.Buf16(xs+1),ce=null,ge=0,Se,_e,Le;for(c=0;c<=xs;c++)te[c]=0;for(f=0;f<i;f++)te[n[r+f]]++;for(p=l,d=xs;d>=1&&te[d]===0;d--);if(p>d&&(p=d),d===0)return o[s++]=1<<24|64<<16|0,o[s++]=1<<24|64<<16|0,u.bits=1,0;for(h=1;h<d&&te[h]===0;h++);for(p<h&&(p=h),w=1,c=1;c<=xs;c++)if(w<<=1,w-=te[c],w<0)return-1;if(w>0&&(t===xx||d!==1))return-1;for(re[1]=0,c=1;c<xs;c++)re[c+1]=re[c]+te[c];for(f=0;f<i;f++)n[r+f]!==0&&(a[re[n[r+f]]++]=f);if(t===xx?(M=ce=a,N=19):t===Cp?(M=CP,U-=257,ce=TP,ge-=257,N=256):(M=kP,ce=IP,N=-1),_=0,f=0,c=h,D=s,m=p,y=0,B=-1,A=1<<p,I=A-1,t===Cp&&A>wx||t===Ax&&A>vx)return 1;for(;;){Se=c-y,a[f]<N?(_e=0,Le=a[f]):a[f]>N?(_e=ce[ge+a[f]],Le=M[U+a[f]]):(_e=96,Le=0),S=1<<c-y,T=1<<m,h=T;do T-=S,o[D+(_>>y)+T]=Se<<24|_e<<16|Le|0;while(T!==0);for(S=1<<c-1;_&S;)S>>=1;if(S!==0?(_&=S-1,_+=S):_=0,f++,--te[c]===0){if(c===d)break;c=n[r+a[f]]}if(c>p&&(_&I)!==B){for(y===0&&(y=p),D+=h,m=c-y,w=1<<m;m+y<d&&(w-=te[m+y],!(w<=0));)m++,w<<=1;if(A+=1<<m,t===Cp&&A>wx||t===Ax&&A>vx)return 1;B=_&I,o[B]=p<<24|m<<16|D-s|0}}return _!==0&&(o[D+_]=c-y<<24|64<<16|0),u.bits=p,0},Jt=Er,Tp=tx,rr=nx,DP=_P,$l=BP,FP=0,Ex=1,Sx=2,_x=4,RP=5,kf=6,mo=0,MP=1,PP=2,gn=-2,Cx=-3,Tx=-4,NP=-5,kx=8,Ix=1,Bx=2,Dx=3,Fx=4,Rx=5,Mx=6,Px=7,Nx=8,Lx=9,Ox=10,If=11,_r=12,kp=13,zx=14,Ip=15,Ux=16,Gx=17,Hx=18,Vx=19,Bf=20,Df=21,$x=22,jx=23,qx=24,Wx=25,Zx=26,Bp=27,Yx=28,Qx=29,Qe=30,Xx=31,LP=32,OP=852,zP=592,UP=15,GP=UP;function Kx(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function HP(){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 Jt.Buf16(320),this.work=new Jt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Jx(e){var t;return!e||!e.state?gn:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Ix,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Jt.Buf32(OP),t.distcode=t.distdyn=new Jt.Buf32(zP),t.sane=1,t.back=-1,mo)}function eA(e){var t;return!e||!e.state?gn:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Jx(e))}function tA(e,t){var n,r;return!e||!e.state||(r=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?gn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,eA(e))}function nA(e,t){var n,r;return e?(r=new HP,e.state=r,r.window=null,n=tA(e,t),n!==mo&&(e.state=null),n):gn}function VP(e){return nA(e,GP)}var rA=!0,Dp,Fp;function $P(e){if(rA){var t;for(Dp=new Jt.Buf32(512),Fp=new Jt.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for($l(Ex,e.lens,0,288,Dp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;$l(Sx,e.lens,0,32,Fp,0,e.work,{bits:5}),rA=!1}e.lencode=Dp,e.lenbits=9,e.distcode=Fp,e.distbits=5}function iA(e,t,n,r){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Jt.Buf8(o.wsize)),r>=o.wsize?(Jt.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),Jt.arraySet(o.window,t,n-r,i,o.wnext),r-=i,r?(Jt.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function jP(e,t){var n,r,i,o,s,a,u,l,c,f,h,d,p,m,y=0,w,A,_,S,T,B,I,D,M=new Jt.Buf8(4),U,N,te=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return gn;n=e.state,n.mode===_r&&(n.mode=kp),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,l=n.hold,c=n.bits,f=a,h=u,D=mo;e:for(;;)switch(n.mode){case Ix:if(n.wrap===0){n.mode=kp;break}for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.wrap&2&&l===35615){n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=rr(n.check,M,2,0),l=0,c=0,n.mode=Bx;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Qe;break}if((l&15)!==kx){e.msg="unknown compression method",n.mode=Qe;break}if(l>>>=4,c-=4,I=(l&15)+8,n.wbits===0)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=Qe;break}n.dmax=1<<I,e.adler=n.check=1,n.mode=l&512?Ox:_r,l=0,c=0;break;case Bx:for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.flags=l,(n.flags&255)!==kx){e.msg="unknown compression method",n.mode=Qe;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Qe;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=rr(n.check,M,2,0)),l=0,c=0,n.mode=Dx;case Dx:for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.head&&(n.head.time=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=rr(n.check,M,4,0)),l=0,c=0,n.mode=Fx;case Fx:for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=rr(n.check,M,2,0)),l=0,c=0,n.mode=Rx;case Rx:if(n.flags&1024){for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=rr(n.check,M,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=Mx;case Mx:if(n.flags&1024&&(d=n.length,d>a&&(d=a),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Jt.arraySet(n.head.extra,r,o,d,I)),n.flags&512&&(n.check=rr(n.check,r,d,o)),a-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Px;case Px:if(n.flags&2048){if(a===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<a);if(n.flags&512&&(n.check=rr(n.check,r,d,o)),a-=d,o+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Nx;case Nx:if(n.flags&4096){if(a===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<a);if(n.flags&512&&(n.check=rr(n.check,r,d,o)),a-=d,o+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=Lx;case Lx:if(n.flags&512){for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Qe;break}l=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=_r;break;case Ox:for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}e.adler=n.check=Kx(l),l=0,c=0,n.mode=If;case If:if(n.havedict===0)return e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,PP;e.adler=n.check=1,n.mode=_r;case _r:if(t===RP||t===kf)break e;case kp:if(n.last){l>>>=c&7,c-=c&7,n.mode=Bp;break}for(;c<3;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}switch(n.last=l&1,l>>>=1,c-=1,l&3){case 0:n.mode=zx;break;case 1:if($P(n),n.mode=Bf,t===kf){l>>>=2,c-=2;break e}break;case 2:n.mode=Gx;break;case 3:e.msg="invalid block type",n.mode=Qe}l>>>=2,c-=2;break;case zx:for(l>>>=c&7,c-=c&7;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Qe;break}if(n.length=l&65535,l=0,c=0,n.mode=Ip,t===kf)break e;case Ip:n.mode=Ux;case Ux:if(d=n.length,d){if(d>a&&(d=a),d>u&&(d=u),d===0)break e;Jt.arraySet(i,r,o,d,s),a-=d,o+=d,u-=d,s+=d,n.length-=d;break}n.mode=_r;break;case Gx:for(;c<14;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.nlen=(l&31)+257,l>>>=5,c-=5,n.ndist=(l&31)+1,l>>>=5,c-=5,n.ncode=(l&15)+4,l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Qe;break}n.have=0,n.mode=Hx;case Hx:for(;n.have<n.ncode;){for(;c<3;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.lens[te[n.have++]]=l&7,l>>>=3,c-=3}for(;n.have<19;)n.lens[te[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,U={bits:n.lenbits},D=$l(FP,n.lens,0,19,n.lencode,0,n.work,U),n.lenbits=U.bits,D){e.msg="invalid code lengths set",n.mode=Qe;break}n.have=0,n.mode=Vx;case Vx:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,_=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(_<16)l>>>=w,c-=w,n.lens[n.have++]=_;else{if(_===16){for(N=w+2;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(l>>>=w,c-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=Qe;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,c-=2}else if(_===17){for(N=w+3;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=3+(l&7),l>>>=3,c-=3}else{for(N=w+7;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=11+(l&127),l>>>=7,c-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Qe;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===Qe)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Qe;break}if(n.lenbits=9,U={bits:n.lenbits},D=$l(Ex,n.lens,0,n.nlen,n.lencode,0,n.work,U),n.lenbits=U.bits,D){e.msg="invalid literal/lengths set",n.mode=Qe;break}if(n.distbits=6,n.distcode=n.distdyn,U={bits:n.distbits},D=$l(Sx,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,U),n.distbits=U.bits,D){e.msg="invalid distances set",n.mode=Qe;break}if(n.mode=Bf,t===kf)break e;case Bf:n.mode=Df;case Df:if(a>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,DP(e,h),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,l=n.hold,c=n.bits,n.mode===_r&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,_=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(A&&!(A&240)){for(S=w,T=A,B=_;y=n.lencode[B+((l&(1<<S+T)-1)>>S)],w=y>>>24,A=y>>>16&255,_=y&65535,!(S+w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=S,c-=S,n.back+=S}if(l>>>=w,c-=w,n.back+=w,n.length=_,A===0){n.mode=Zx;break}if(A&32){n.back=-1,n.mode=_r;break}if(A&64){e.msg="invalid literal/length code",n.mode=Qe;break}n.extra=A&15,n.mode=$x;case $x:if(n.extra){for(N=n.extra;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=jx;case jx:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,A=y>>>16&255,_=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(!(A&240)){for(S=w,T=A,B=_;y=n.distcode[B+((l&(1<<S+T)-1)>>S)],w=y>>>24,A=y>>>16&255,_=y&65535,!(S+w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=S,c-=S,n.back+=S}if(l>>>=w,c-=w,n.back+=w,A&64){e.msg="invalid distance code",n.mode=Qe;break}n.offset=_,n.extra=A&15,n.mode=qx;case qx:if(n.extra){for(N=n.extra;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Qe;break}n.mode=Wx;case Wx:if(u===0)break e;if(d=h-u,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Qe;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),m=n.window}else m=i,p=s-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[s++]=m[p++];while(--d);n.length===0&&(n.mode=Df);break;case Zx:if(u===0)break e;i[s++]=n.length,u--,n.mode=Df;break;case Bp:if(n.wrap){for(;c<32;){if(a===0)break e;a--,l|=r[o++]<<c,c+=8}if(h-=u,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?rr(n.check,i,h,s-h):Tp(n.check,i,h,s-h)),h=u,(n.flags?l:Kx(l))!==n.check){e.msg="incorrect data check",n.mode=Qe;break}l=0,c=0}n.mode=Yx;case Yx:if(n.wrap&&n.flags){for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Qe;break}l=0,c=0}n.mode=Qx;case Qx:D=MP;break e;case Qe:D=Cx;break e;case Xx:return Tx;case LP:default:return gn}return e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<Qe&&(n.mode<Bp||t!==_x))&&iA(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?rr(n.check,i,h,e.next_out-h):Tp(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===_r?128:0)+(n.mode===Bf||n.mode===Ip?256:0),(f===0&&h===0||t===_x)&&D===mo&&(D=NP),D}function qP(e){if(!e||!e.state)return gn;var t=e.state;return t.window&&(t.window=null),e.state=null,mo}function WP(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?gn:(n.head=t,t.done=!1,mo)}function ZP(e,t){var n=t.length,r,i,o;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==If)?gn:r.mode===If&&(i=1,i=Tp(i,t,n,0),i!==r.check)?Cx:(o=iA(e,t,n,n),o?(r.mode=Xx,Tx):(r.havedict=1,mo))}Mn.inflateReset=eA,Mn.inflateReset2=tA,Mn.inflateResetKeep=Jx,Mn.inflateInit=VP,Mn.inflateInit2=nA,Mn.inflate=jP,Mn.inflateEnd=qP,Mn.inflateGetHeader=WP,Mn.inflateSetDictionary=ZP,Mn.inflateInfo="pako inflate (from Nodeca project)";var oA={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};function YP(){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 QP=YP,As=Mn,jl=Er,Ff=po,nt=oA,Rp=bp,XP=px,KP=QP,sA=Object.prototype.toString;function bo(e){if(!(this instanceof bo))return new bo(e);this.options=jl.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new XP,this.strm.avail_out=0;var n=As.inflateInit2(this.strm,t.windowBits);if(n!==nt.Z_OK)throw new Error(Rp[n]);if(this.header=new KP,As.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Ff.string2buf(t.dictionary):sA.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=As.inflateSetDictionary(this.strm,t.dictionary),n!==nt.Z_OK)))throw new Error(Rp[n])}bo.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,s,a,u,l,c=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?nt.Z_FINISH:nt.Z_NO_FLUSH,typeof e=="string"?n.input=Ff.binstring2buf(e):sA.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new jl.Buf8(r),n.next_out=0,n.avail_out=r),o=As.inflate(n,nt.Z_NO_FLUSH),o===nt.Z_NEED_DICT&&i&&(o=As.inflateSetDictionary(this.strm,i)),o===nt.Z_BUF_ERROR&&c===!0&&(o=nt.Z_OK,c=!1),o!==nt.Z_STREAM_END&&o!==nt.Z_OK)return this.onEnd(o),this.ended=!0,!1;n.next_out&&(n.avail_out===0||o===nt.Z_STREAM_END||n.avail_in===0&&(s===nt.Z_FINISH||s===nt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(a=Ff.utf8border(n.output,n.next_out),u=n.next_out-a,l=Ff.buf2string(n.output,a),n.next_out=u,n.avail_out=r-u,u&&jl.arraySet(n.output,n.output,a,u,0),this.onData(l)):this.onData(jl.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(c=!0)}while((n.avail_in>0||n.avail_out===0)&&o!==nt.Z_STREAM_END);return o===nt.Z_STREAM_END&&(s=nt.Z_FINISH),s===nt.Z_FINISH?(o=As.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===nt.Z_OK):(s===nt.Z_SYNC_FLUSH&&(this.onEnd(nt.Z_OK),n.avail_out=0),!0)},bo.prototype.onData=function(e){this.chunks.push(e)},bo.prototype.onEnd=function(e){e===nt.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=jl.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Mp(e,t){var n=new bo(t);if(n.push(e,!0),n.err)throw n.msg||Rp[n.err];return n.result}function JP(e,t){return t=t||{},t.raw=!0,Mp(e,t)}Vl.Inflate=bo,Vl.inflate=Mp,Vl.inflateRaw=JP,Vl.ungzip=Mp;var eN=Er.assign,tN=Bl,nN=Vl,rN=oA,aA={};eN(aA,tN,nN,rN);var Rf=aA;async function gi(e){try{let t,n=0,r=0;const i=[];let o=0,s;do{const u=e.subarray(n);if(s=new Rf.Inflate,{strm:t}=s,s.push(u,Rf.Z_SYNC_FLUSH),s.err)throw new Error(s.msg);n+=t.next_in,i[r]=s.result,o+=i[r].length,r+=1}while(t.avail_in);const a=new Uint8Array(o);for(let u=0,l=0;u<i.length;u++)a.set(i[u],l),l+=i[u].length;return ye.Buffer.from(a)}catch(t){throw`${t}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function lA(e,t){try{let n;const{minv:r,maxv:i}=t;let o=r.blockPosition,s=r.dataPosition;const a=[],u=[],l=[];let c=0,f=0;do{const p=e.subarray(o-r.blockPosition),m=new Rf.Inflate;if({strm:n}=m,m.push(p,Rf.Z_SYNC_FLUSH),m.err)throw new Error(m.msg);const y=m.result;a.push(y);let w=y.length;u.push(o),l.push(s),a.length===1&&r.dataPosition&&(a[0]=a[0].subarray(r.dataPosition),w=a[0].length);const A=o;if(o+=n.next_in,s+=w,A>=i.blockPosition){a[f]=a[f].subarray(0,i.blockPosition===r.blockPosition?i.dataPosition-r.dataPosition+1:i.dataPosition+1),u.push(o),l.push(s),c+=a[f].length;break}c+=a[f].length,f++}while(n.avail_in);const h=new Uint8Array(c);for(let p=0,m=0;p<a.length;p++)h.set(a[p],m),m+=a[p].length;return{buffer:ye.Buffer.from(h),cpositions:u,dpositions:l}}catch(n){throw`${n}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):n}}var iN=Ve,mn=null;try{mn=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 Ve(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}Ve.prototype.__isLong__,Object.defineProperty(Ve.prototype,"__isLong__",{value:!0});function $t(e){return(e&&e.__isLong__)===!0}Ve.isLong=$t;var uA={},cA={};function yo(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=cA[e],r)?r:(n=$e(e,(e|0)<0?-1:0,!0),i&&(cA[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=uA[e],r)?r:(n=$e(e,e<0?-1:0,!1),i&&(uA[e]=n),n))}Ve.fromInt=yo;function bn(e,t){if(isNaN(e))return t?wo:yn;if(t){if(e<0)return wo;if(e>=hA)return bA}else{if(e<=-dA)return jt;if(e+1>=dA)return mA}return e<0?bn(-e,t).neg():$e(e%Es|0,e/Es|0,t)}Ve.fromNumber=bn;function $e(e,t,n){return new Ve(e,t,n)}Ve.fromBits=$e;var Mf=Math.pow;function Pp(e,t,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return yn;if(typeof t=="number"?(n=t,t=!1):t=!!t,n=n||10,n<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(r===0)return Pp(e.substring(1),t,n).neg();for(var i=bn(Mf(n,8)),o=yn,s=0;s<e.length;s+=8){var a=Math.min(8,e.length-s),u=parseInt(e.substring(s,s+a),n);if(a<8){var l=bn(Mf(n,a));o=o.mul(l).add(bn(u))}else o=o.mul(i),o=o.add(bn(u))}return o.unsigned=t,o}Ve.fromString=Pp;function Pn(e,t){return typeof e=="number"?bn(e,t):typeof e=="string"?Pp(e,t):$e(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Ve.fromValue=Pn;var fA=65536,oN=1<<24,Es=fA*fA,hA=Es*Es,dA=hA/2,pA=yo(oN),yn=yo(0);Ve.ZERO=yn;var wo=yo(0,!0);Ve.UZERO=wo;var Ss=yo(1);Ve.ONE=Ss;var gA=yo(1,!0);Ve.UONE=gA;var Np=yo(-1);Ve.NEG_ONE=Np;var mA=$e(-1,2147483647,!1);Ve.MAX_VALUE=mA;var bA=$e(-1,-1,!0);Ve.MAX_UNSIGNED_VALUE=bA;var jt=$e(0,-2147483648,!1);Ve.MIN_VALUE=jt;var Y=Ve.prototype;Y.toInt=function(){return this.unsigned?this.low>>>0:this.low},Y.toNumber=function(){return this.unsigned?(this.high>>>0)*Es+(this.low>>>0):this.high*Es+(this.low>>>0)},Y.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(jt)){var n=bn(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var o=bn(Mf(t,6),this.unsigned),s=this,a="";;){var u=s.div(o),l=s.sub(u.mul(o)).toInt()>>>0,c=l.toString(t);if(s=u,s.isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},Y.getHighBits=function(){return this.high},Y.getHighBitsUnsigned=function(){return this.high>>>0},Y.getLowBits=function(){return this.low},Y.getLowBitsUnsigned=function(){return this.low>>>0},Y.getNumBitsAbs=function(){if(this.isNegative())return this.eq(jt)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,n=31;n>0&&!(t&1<<n);n--);return this.high!=0?n+33:n+1},Y.isZero=function(){return this.high===0&&this.low===0},Y.eqz=Y.isZero,Y.isNegative=function(){return!this.unsigned&&this.high<0},Y.isPositive=function(){return this.unsigned||this.high>=0},Y.isOdd=function(){return(this.low&1)===1},Y.isEven=function(){return(this.low&1)===0},Y.equals=function(t){return $t(t)||(t=Pn(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},Y.eq=Y.equals,Y.notEquals=function(t){return!this.eq(t)},Y.neq=Y.notEquals,Y.ne=Y.notEquals,Y.lessThan=function(t){return this.comp(t)<0},Y.lt=Y.lessThan,Y.lessThanOrEqual=function(t){return this.comp(t)<=0},Y.lte=Y.lessThanOrEqual,Y.le=Y.lessThanOrEqual,Y.greaterThan=function(t){return this.comp(t)>0},Y.gt=Y.greaterThan,Y.greaterThanOrEqual=function(t){return this.comp(t)>=0},Y.gte=Y.greaterThanOrEqual,Y.ge=Y.greaterThanOrEqual,Y.compare=function(t){if($t(t)||(t=Pn(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},Y.comp=Y.compare,Y.negate=function(){return!this.unsigned&&this.eq(jt)?jt:this.not().add(Ss)},Y.neg=Y.negate,Y.add=function(t){$t(t)||(t=Pn(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,s=t.high>>>16,a=t.high&65535,u=t.low>>>16,l=t.low&65535,c=0,f=0,h=0,d=0;return d+=o+l,h+=d>>>16,d&=65535,h+=i+u,f+=h>>>16,h&=65535,f+=r+a,c+=f>>>16,f&=65535,c+=n+s,c&=65535,$e(h<<16|d,c<<16|f,this.unsigned)},Y.subtract=function(t){return $t(t)||(t=Pn(t)),this.add(t.neg())},Y.sub=Y.subtract,Y.multiply=function(t){if(this.isZero())return yn;if($t(t)||(t=Pn(t)),mn){var n=mn.mul(this.low,this.high,t.low,t.high);return $e(n,mn.get_high(),this.unsigned)}if(t.isZero())return yn;if(this.eq(jt))return t.isOdd()?jt:yn;if(t.eq(jt))return this.isOdd()?jt:yn;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(pA)&&t.lt(pA))return bn(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,s=this.low&65535,a=t.high>>>16,u=t.high&65535,l=t.low>>>16,c=t.low&65535,f=0,h=0,d=0,p=0;return p+=s*c,d+=p>>>16,p&=65535,d+=o*c,h+=d>>>16,d&=65535,d+=s*l,h+=d>>>16,d&=65535,h+=i*c,f+=h>>>16,h&=65535,h+=o*l,f+=h>>>16,h&=65535,h+=s*u,f+=h>>>16,h&=65535,f+=r*c+i*l+o*u+s*a,f&=65535,$e(d<<16|p,f<<16|h,this.unsigned)},Y.mul=Y.multiply,Y.divide=function(t){if($t(t)||(t=Pn(t)),t.isZero())throw Error("division by zero");if(mn){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?mn.div_u:mn.div_s)(this.low,this.high,t.low,t.high);return $e(n,mn.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?wo:yn;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return wo;if(t.gt(this.shru(1)))return gA;o=wo}else{if(this.eq(jt)){if(t.eq(Ss)||t.eq(Np))return jt;if(t.eq(jt))return Ss;var s=this.shr(1);return r=s.div(t).shl(1),r.eq(yn)?t.isNegative()?Ss:Np:(i=this.sub(t.mul(r)),o=r.add(i.div(t)),o)}else if(t.eq(jt))return this.unsigned?wo:yn;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=yn}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),u=a<=48?1:Mf(2,a-48),l=bn(r),c=l.mul(t);c.isNegative()||c.gt(i);)r-=u,l=bn(r,this.unsigned),c=l.mul(t);l.isZero()&&(l=Ss),o=o.add(l),i=i.sub(c)}return o},Y.div=Y.divide,Y.modulo=function(t){if($t(t)||(t=Pn(t)),mn){var n=(this.unsigned?mn.rem_u:mn.rem_s)(this.low,this.high,t.low,t.high);return $e(n,mn.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},Y.mod=Y.modulo,Y.rem=Y.modulo,Y.not=function(){return $e(~this.low,~this.high,this.unsigned)},Y.and=function(t){return $t(t)||(t=Pn(t)),$e(this.low&t.low,this.high&t.high,this.unsigned)},Y.or=function(t){return $t(t)||(t=Pn(t)),$e(this.low|t.low,this.high|t.high,this.unsigned)},Y.xor=function(t){return $t(t)||(t=Pn(t)),$e(this.low^t.low,this.high^t.high,this.unsigned)},Y.shiftLeft=function(t){return $t(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?$e(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):$e(0,this.low<<t-32,this.unsigned)},Y.shl=Y.shiftLeft,Y.shiftRight=function(t){return $t(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?$e(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):$e(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Y.shr=Y.shiftRight,Y.shiftRightUnsigned=function(t){if($t(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return $e(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?$e(n,0,this.unsigned):$e(n>>>t-32,0,this.unsigned)},Y.shru=Y.shiftRightUnsigned,Y.shr_u=Y.shiftRightUnsigned,Y.toSigned=function(){return this.unsigned?$e(this.low,this.high,!1):this},Y.toUnsigned=function(){return this.unsigned?this:$e(this.low,this.high,!0)},Y.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Y.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},Y.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},Ve.fromBytes=function(t,n,r){return r?Ve.fromBytesLE(t,n):Ve.fromBytesBE(t,n)},Ve.fromBytesLE=function(t,n){return new Ve(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Ve.fromBytesBE=function(t,n){return new Ve(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};const Pf=mf(iN),Nf=1;class sN{constructor({filehandle:t,path:n}){if(t)this.filehandle=t;else if(n)this.filehandle=new gt(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(t,n=0,r=!0){const i=Pf.fromBytesLE(t.slice(n,n+8),r);if(i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return i.toNumber()}_getIndex(){return this.index||(this.index=this._readIndex()),this.index}async _readIndex(){let t=ye.Buffer.allocUnsafe(8);await this.filehandle.read(t,0,8,0);const n=this._readLongWithOverflow(t,0,!0);if(!n)return[[0,0]];const r=new Array(n+1);r[0]=[0,0];const i=8*2*n;if(i>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");t=ye.Buffer.allocUnsafe(i),await this.filehandle.read(t,0,i,8);for(let o=0;o<n;o+=1){const s=this._readLongWithOverflow(t,o*16),a=this._readLongWithOverflow(t,o*16+8);r[o+1]=[s,a]}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=[],s=(h,d)=>{const p=h[Nf],m=d?d[Nf]:1/0;return p<=n&&m>n?0:p<n?-1:1};let a=0,u=i.length-1,l=Math.floor(i.length/2),c=s(i[l],i[l+1]);for(;c!==0;)c>0?u=l-1:c<0&&(a=l+1),l=Math.ceil((u-a)/2)+a,c=s(i[l],i[l+1]);o.push(i[l]);let f=l+1;for(;f<i.length&&(o.push(i[f]),!(i[f][Nf]>=r));f+=1);return o[o.length-1][Nf]<r&&o.push([]),o}}class yA{constructor({filehandle:t,path:n,gziFilehandle:r,gziPath:i}){if(t)this.filehandle=t;else if(n)this.filehandle=new gt(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 sN({filehandle:r,path:!r&&!i&&n?i:`${n}.gzi`})}async stat(){const t=await this.filehandle.stat();return Object.assign(t,{size:await this.getUncompressedFileSize(),blocks:void 0,blksize:void 0})}async getUncompressedFileSize(){const[,t]=await this.gzi.getLastBlock(),{size:n}=await this.filehandle.stat(),r=ye.Buffer.allocUnsafe(4),{bytesRead:i}=await this.filehandle.read(r,0,4,n-28-4);if(i!==4)throw new Error("read error");const o=r.readUInt32LE(0);return t+o}async _readAndUncompressBlock(t,[n],[r]){let i=r;i||(i=(await this.filehandle.stat()).size);const o=i-n;return await this.filehandle.read(t,0,o,n),await gi(t.slice(0,o))}async read(t,n,r,i){const o=await this.gzi.getRelevantBlocksForRead(r,i),s=ye.Buffer.allocUnsafe(32768*2);let a=n,u=0;for(let l=0;l<o.length-1;l+=1){const c=await this._readAndUncompressBlock(s,o[l],o[l+1]),[,f]=o[l],h=f>=i?0:i-f,d=Math.min(i+r,f+c.length)-f;h>=0&&h<c.length&&(c.copy(t,a,h,d),a+=d-h,u+=d-h)}return{bytesRead:u,buffer:t}}}function wA(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function aN(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(s=>/\S/.test(s)).map(s=>s.split(" ")).filter(s=>s[0]!=="").map(s=>((!i||i.name!==s[0])&&(i={name:s[0],id:r},r+=1),{id:i.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(o.map(s=>[s.name,s])),id:Object.fromEntries(o.map(s=>[s.id,s]))}}class vA{constructor({fasta:t,fai:n,path:r,faiPath:i}){if(t)this.fasta=t;else if(r)this.fasta=new gt(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 gt(i);else if(r)this.fai=new gt(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile")}async _getIndexes(t){return this.indexes||(this.indexes=aN(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 s=wA(t,n),a=wA(t,o)-s,u=ye.Buffer.allocUnsafe(a);return await this.fasta.read(u,0,a,s,i),u.toString("utf8").replace(/\s+/g,"")}}class lN extends vA{constructor({fasta:t,path:n,fai:r,faiPath:i,gzi:o,gziPath:s}){super({fasta:t,path:n,fai:r,faiPath:i}),t&&o?this.fasta=new yA({filehandle:t,gziFilehandle:o}):n&&s&&(this.fasta=new yA({path:n,gziPath:s}))}}function xA(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
|
|
626
|
-
`),[i,...o]=n.split(" "),s=r.join("").replace(/\s/g,"");return{id:i,description:o.join(" "),sequence:s}})}class uN{constructor({fasta:t,path:n}){if(t)this.fasta=t;else if(n)this.fasta=new gt(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const i=r.toString("utf8");return xA(i)})}async fetch(t,n,r){const o=(await this.data).find(a=>a.id===t),s=r-n;if(!o)throw new Error(`no sequence with id ${t} exists`);return o.sequence.slice(n,s)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const cN=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:lN,FetchableSmallFasta:uN,IndexedFasta:vA,parseSmallFasta:xA},Symbol.toStringTag,{value:"Module"})),Lf=BigInt(32);function fN(e,t,n){const r=+!!n,i=+!n;return BigInt(e.getInt32(t,n)*i+e.getInt32(t+4,n)*r)<<Lf|BigInt(e.getUint32(t,n)*r+e.getUint32(t+4,n)*i)}function hN(e,t,n){const r=e.getUint32(t,n),i=e.getUint32(t+4,n),o=+!!n,s=+!n;return BigInt(r*s+i*o)<<Lf|BigInt(r*o+i*s)}function dN(e,t,n,r){const i=Number(n>>Lf),o=Number(n&BigInt(4294967295));r?(e.setInt32(t+4,i,r),e.setUint32(t,o,r)):(e.setInt32(t,i,r),e.setUint32(t+4,o,r))}function pN(e,t,n,r){const i=Number(n>>Lf),o=Number(n&BigInt(4294967295));r?(e.setUint32(t+4,i,r),e.setUint32(t,o,r)):(e.setUint32(t,i,r),e.setUint32(t+4,o,r))}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return fN(this,e,t)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(e,t){return hN(this,e,t)}),"setBigInt64"in DataView||(DataView.prototype.setBigInt64=function(e,t,n){dN(this,e,t,n)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,n){pN(this,e,t,n)});class gN{constructor(t,n){this.code="",this.scopes=[["vars"]],this.bitFields=[],this.tmpVariableCount=0,this.references=new Map,this.imports=[],this.reverseImports=new Map,this.useContextVariables=!1,this.importPath=t,this.useContextVariables=n}generateVariable(t){const n=[...this.scopes[this.scopes.length-1]];return t&&n.push(t),n.join(".")}generateOption(t){switch(typeof t){case"number":return t.toString();case"string":return this.generateVariable(t);case"function":return`${this.addImport(t)}.call(${this.generateVariable()}, vars)`}}generateError(t){this.pushCode(`throw new Error(${t});`)}generateTmpVariable(){return"$tmp"+this.tmpVariableCount++}pushCode(t){this.code+=t+`
|
|
627
|
-
`}pushPath(t){t&&this.scopes[this.scopes.length-1].push(t)}popPath(t){t&&this.scopes[this.scopes.length-1].pop()}pushScope(t){this.scopes.push([t])}popScope(){this.scopes.pop()}addImport(t){if(!this.importPath)return`(${t})`;let n=this.reverseImports.get(t);return n||(n=this.imports.push(t)-1,this.reverseImports.set(t,n)),`${this.importPath}[${n}]`}addReference(t){this.references.has(t)||this.references.set(t,{resolved:!1,requested:!1})}markResolved(t){const n=this.references.get(t);n&&(n.resolved=!0)}markRequested(t){t.forEach(n=>{const r=this.references.get(n);r&&(r.requested=!0)})}getUnresolvedReferences(){return Array.from(this.references).filter(([t,n])=>!n.resolved&&!n.requested).map(([t,n])=>t)}}const Nn=new Map,vo="___parser_",Ln={uint8:1,uint16le:2,uint16be:2,uint32le:4,uint32be:4,int8:1,int16le:2,int16be:2,int32le:4,int32be:4,int64be:8,int64le:8,uint64be:8,uint64le:8,floatle:4,floatbe:4,doublele:8,doublebe:8},Of={uint8:"Uint8",uint16le:"Uint16",uint16be:"Uint16",uint32le:"Uint32",uint32be:"Uint32",int8:"Int8",int16le:"Int16",int16be:"Int16",int32le:"Int32",int32be:"Int32",int64be:"BigInt64",int64le:"BigInt64",uint64be:"BigUint64",uint64le:"BigUint64",floatle:"Float32",floatbe:"Float32",doublele:"Float64",doublebe:"Float64"},zf={uint8:!1,uint16le:!0,uint16be:!1,uint32le:!0,uint32be:!1,int8:!1,int16le:!0,int16be:!1,int32le:!0,int32be:!1,int64be:!1,int64le:!0,uint64be:!1,uint64le:!0,floatle:!0,floatbe:!1,doublele:!0,doublebe:!1};let Me=class Un{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new Un}primitiveGenerateN(t,n){const r=Of[t],i=zf[t];n.pushCode(`${n.generateVariable(this.varName)} = dataView.get${r}(offset, ${i});`),n.pushCode(`offset += ${Ln[t]};`)}primitiveN(t,n,r){return this.setNextParser(t,n,r)}useThisEndian(t){return t+this.endian.toLowerCase()}uint8(t,n={}){return this.primitiveN("uint8",t,n)}uint16(t,n={}){return this.primitiveN(this.useThisEndian("uint16"),t,n)}uint16le(t,n={}){return this.primitiveN("uint16le",t,n)}uint16be(t,n={}){return this.primitiveN("uint16be",t,n)}uint32(t,n={}){return this.primitiveN(this.useThisEndian("uint32"),t,n)}uint32le(t,n={}){return this.primitiveN("uint32le",t,n)}uint32be(t,n={}){return this.primitiveN("uint32be",t,n)}int8(t,n={}){return this.primitiveN("int8",t,n)}int16(t,n={}){return this.primitiveN(this.useThisEndian("int16"),t,n)}int16le(t,n={}){return this.primitiveN("int16le",t,n)}int16be(t,n={}){return this.primitiveN("int16be",t,n)}int32(t,n={}){return this.primitiveN(this.useThisEndian("int32"),t,n)}int32le(t,n={}){return this.primitiveN("int32le",t,n)}int32be(t,n={}){return this.primitiveN("int32be",t,n)}bigIntVersionCheck(){if(!DataView.prototype.getBigInt64)throw new Error("BigInt64 is unsupported on this runtime")}int64(t,n={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("int64"),t,n)}int64be(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("int64be",t,n)}int64le(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("int64le",t,n)}uint64(t,n={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("uint64"),t,n)}uint64be(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("uint64be",t,n)}uint64le(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("uint64le",t,n)}floatle(t,n={}){return this.primitiveN("floatle",t,n)}floatbe(t,n={}){return this.primitiveN("floatbe",t,n)}doublele(t,n={}){return this.primitiveN("doublele",t,n)}doublebe(t,n={}){return this.primitiveN("doublebe",t,n)}bitN(t,n,r){return r.length=t,this.setNextParser("bit",n,r)}bit1(t,n={}){return this.bitN(1,t,n)}bit2(t,n={}){return this.bitN(2,t,n)}bit3(t,n={}){return this.bitN(3,t,n)}bit4(t,n={}){return this.bitN(4,t,n)}bit5(t,n={}){return this.bitN(5,t,n)}bit6(t,n={}){return this.bitN(6,t,n)}bit7(t,n={}){return this.bitN(7,t,n)}bit8(t,n={}){return this.bitN(8,t,n)}bit9(t,n={}){return this.bitN(9,t,n)}bit10(t,n={}){return this.bitN(10,t,n)}bit11(t,n={}){return this.bitN(11,t,n)}bit12(t,n={}){return this.bitN(12,t,n)}bit13(t,n={}){return this.bitN(13,t,n)}bit14(t,n={}){return this.bitN(14,t,n)}bit15(t,n={}){return this.bitN(15,t,n)}bit16(t,n={}){return this.bitN(16,t,n)}bit17(t,n={}){return this.bitN(17,t,n)}bit18(t,n={}){return this.bitN(18,t,n)}bit19(t,n={}){return this.bitN(19,t,n)}bit20(t,n={}){return this.bitN(20,t,n)}bit21(t,n={}){return this.bitN(21,t,n)}bit22(t,n={}){return this.bitN(22,t,n)}bit23(t,n={}){return this.bitN(23,t,n)}bit24(t,n={}){return this.bitN(24,t,n)}bit25(t,n={}){return this.bitN(25,t,n)}bit26(t,n={}){return this.bitN(26,t,n)}bit27(t,n={}){return this.bitN(27,t,n)}bit28(t,n={}){return this.bitN(28,t,n)}bit29(t,n={}){return this.bitN(29,t,n)}bit30(t,n={}){return this.bitN(30,t,n)}bit31(t,n={}){return this.bitN(31,t,n)}bit32(t,n={}){return this.bitN(32,t,n)}namely(t){return Nn.set(t,this),this.alias=t,this}skip(t,n={}){return this.seek(t,n)}seek(t,n={}){if(n.assert)throw new Error("assert option on seek is not allowed.");return this.setNextParser("seek","",{length:t})}string(t,n){if(!n.zeroTerminated&&!n.length&&!n.greedy)throw new Error("One of length, zeroTerminated, or greedy must be defined for string.");if((n.zeroTerminated||n.length)&&n.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(n.stripNull&&!(n.length||n.greedy))throw new Error("length or greedy must be defined if stripNull is enabled.");return n.encoding=n.encoding||"utf8",this.setNextParser("string",t,n)}buffer(t,n){if(!n.length&&!n.readUntil)throw new Error("length or readUntil must be defined for buffer.");return this.setNextParser("buffer",t,n)}wrapped(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.wrapper||!n.type)throw new Error("Both wrapper and type must be defined for wrapped.");if(!n.length&&!n.readUntil)throw new Error("length or readUntil must be defined for wrapped.");return this.setNextParser("wrapper",t,n)}array(t,n){if(!n.readUntil&&!n.length&&!n.lengthInBytes)throw new Error("One of readUntil, length and lengthInBytes must be defined for array.");if(!n.type)throw new Error("type is required for array.");if(typeof n.type=="string"&&!Nn.has(n.type)&&!(n.type in Ln))throw new Error(`Array element type "${n.type}" is unkown.`);return this.setNextParser("array",t,n)}choice(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n)throw new Error("tag and choices are are required for choice.");if(!n.tag)throw new Error("tag is requird for choice.");if(!n.choices)throw new Error("choices is required for choice.");for(const r in n.choices){const i=parseInt(r,10),o=n.choices[i];if(isNaN(i))throw new Error(`Choice key "${r}" is not a number.`);if(typeof o=="string"&&!Nn.has(o)&&!(o in Ln))throw new Error(`Choice type "${o}" is unkown.`)}return this.setNextParser("choice",t,n)}nest(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.type)throw new Error("type is required for nest.");if(!(n.type instanceof Un)&&!Nn.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof Un)&&!t)throw new Error("type must be a Parser object if the variable name is omitted.");return this.setNextParser("nest",t,n)}pointer(t,n){if(!n.offset)throw new Error("offset is required for pointer.");if(!n.type)throw new Error("type is required for pointer.");if(typeof n.type=="string"&&!(n.type in Ln)&&!Nn.has(n.type))throw new Error(`Pointer type "${n.type}" is unkown.`);return this.setNextParser("pointer",t,n)}saveOffset(t,n={}){return this.setNextParser("saveOffset",t,n)}endianness(t){switch(t.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error('endianness must be one of "little" or "big"')}return this}endianess(t){return this.endianness(t)}useContextVars(t=!0){return this.useContextVariables=t,this}create(t){if(!(t instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=t,this}getContext(t){const n=new gN(t,this.useContextVariables);return n.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(n),n.pushCode(`return ${vo+this.alias}(0).result;`)):this.addRawCode(n),n}getCode(){return this.getContext("imports").code}addRawCode(t){t.pushCode("var offset = 0;"),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("vars.$parent = null;"),t.pushCode("vars.$root = vars;"),this.generate(t),this.resolveReferences(t),t.pushCode("delete vars.$parent;"),t.pushCode("delete vars.$root;"),t.pushCode("return vars;")}addAliasedCode(t){return t.pushCode(`function ${vo+this.alias}(offset, context) {`),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"),t.pushCode("vars = Object.assign(vars, ctx);"),this.generate(t),t.markResolved(this.alias),this.resolveReferences(t),t.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"),t.pushCode("return { offset: offset, result: vars };"),t.pushCode("}"),t}resolveReferences(t){const n=t.getUnresolvedReferences();t.markRequested(n),n.forEach(r=>{var i;(i=Nn.get(r))===null||i===void 0||i.addAliasedCode(t)})}compile(){const t="imports",n=this.getContext(t);this.compiled=new Function(t,"TextDecoder",`return function (buffer, constructorFn) { ${n.code} };`)(n.imports,TextDecoder)}sizeOf(){let t=NaN;if(Object.keys(Ln).indexOf(this.type)>=0)t=Ln[this.type];else if(this.type==="string"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="buffer"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="array"&&typeof this.options.length=="number"){let n=NaN;typeof this.options.type=="string"?n=Ln[this.options.type]:this.options.type instanceof Un&&(n=this.options.type.sizeOf()),t=this.options.length*n}else this.type==="seek"?t=this.options.length:this.type==="nest"?t=this.options.type.sizeOf():this.type||(t=0);return this.next&&(t+=this.next.sizeOf()),t}parse(t){return this.compiled||this.compile(),this.compiled(t,this.constructorFn)}setNextParser(t,n,r){const i=new Un;return i.type=t,i.varName=n,i.options=r,i.endian=this.endian,this.head?this.head.next=i:this.next=i,this.head=i,this}generate(t){if(this.type){switch(this.type){case"uint8":case"uint16le":case"uint16be":case"uint32le":case"uint32be":case"int8":case"int16le":case"int16be":case"int32le":case"int32be":case"int64be":case"int64le":case"uint64be":case"uint64le":case"floatle":case"floatbe":case"doublele":case"doublebe":this.primitiveGenerateN(this.type,t);break;case"bit":this.generateBit(t);break;case"string":this.generateString(t);break;case"buffer":this.generateBuffer(t);break;case"seek":this.generateSeek(t);break;case"nest":this.generateNest(t);break;case"array":this.generateArray(t);break;case"choice":this.generateChoice(t);break;case"pointer":this.generatePointer(t);break;case"saveOffset":this.generateSaveOffset(t);break;case"wrapper":this.generateWrapper(t);break}this.type!=="bit"&&this.generateAssert(t)}const n=t.generateVariable(this.varName);return this.options.formatter&&this.type!=="bit"&&this.generateFormatter(t,n,this.options.formatter),this.generateNext(t)}generateAssert(t){if(!this.options.assert)return;const n=t.generateVariable(this.varName);switch(typeof this.options.assert){case"function":{const r=t.addImport(this.options.assert);t.pushCode(`if (!${r}.call(vars, ${n})) {`)}break;case"number":t.pushCode(`if (${this.options.assert} !== ${n}) {`);break;case"string":t.pushCode(`if (${JSON.stringify(this.options.assert)} !== ${n}) {`);break;default:throw new Error("assert option must be a string, number or a function.")}t.generateError(`"Assertion error: ${n} is " + ${JSON.stringify(this.options.assert.toString())}`),t.pushCode("}")}generateNext(t){return this.next&&(t=this.next.generate(t)),t}generateBit(t){const n=JSON.parse(JSON.stringify(this));if(n.options=this.options,n.generateAssert=this.generateAssert.bind(this),n.generateFormatter=this.generateFormatter.bind(this),n.varName=t.generateVariable(n.varName),t.bitFields.push(n),!this.next||this.next&&["bit","nest"].indexOf(this.next.type)<0){const r=t.generateTmpVariable();t.pushCode(`var ${r} = 0;`);const i=(c=0)=>{let f=0;for(let h=c;h<t.bitFields.length;h++){const d=t.bitFields[h].options.length;if(f+d>32)break;f+=d}return f},o=c=>(c<=8?(t.pushCode(`${r} = dataView.getUint8(offset);`),c=8):c<=16?(t.pushCode(`${r} = dataView.getUint16(offset);`),c=16):c<=24?(t.pushCode(`${r} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`),c=24):(t.pushCode(`${r} = dataView.getUint32(offset);`),c=32),t.pushCode(`offset += ${c/8};`),c);let s=0;const a=this.endian==="be";let u=0,l=0;t.bitFields.forEach((c,f)=>{let h=c.options.length;if(h>l){if(l){const m=-1>>>32-l;t.pushCode(`${c.varName} = (${r} & 0x${m.toString(16)}) << ${h-l};`),h-=l}s=0,l=u=o(i(f)-l)}const d=a?u-s-h:s,p=-1>>>32-h;t.pushCode(`${c.varName} ${h<c.options.length?"|=":"="} ${r} >> ${d} & 0x${p.toString(16)};`),c.options.length===32&&t.pushCode(`${c.varName} >>>= 0`),c.options.assert&&c.generateAssert(t),c.options.formatter&&c.generateFormatter(t,c.varName,c.options.formatter),s+=h,l-=h}),t.bitFields=[]}}generateSeek(t){const n=t.generateOption(this.options.length);t.pushCode(`offset += ${n};`)}generateString(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable(),i=this.options.encoding,o=i.toLowerCase()==="hex",s='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){const a=this.options.length;t.pushCode(`var ${r} = offset;`),t.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${r} < ${a});`);const u=`offset - ${r} < ${a} ? offset - 1 : offset`;t.pushCode(o?`${n} = Array.from(buffer.subarray(${r}, ${u}), ${s}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, ${u}));`)}else if(this.options.length){const a=t.generateOption(this.options.length);t.pushCode(o?`${n} = Array.from(buffer.subarray(offset, offset + ${a}), ${s}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(offset, offset + ${a}));`),t.pushCode(`offset += ${a};`)}else this.options.zeroTerminated?(t.pushCode(`var ${r} = offset;`),t.pushCode("while(dataView.getUint8(offset++) !== 0);"),t.pushCode(o?`${n} = Array.from(buffer.subarray(${r}, offset - 1), ${s}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset - 1));`)):this.options.greedy&&(t.pushCode(`var ${r} = offset;`),t.pushCode("while(buffer.length > offset++);"),t.pushCode(o?`${n} = Array.from(buffer.subarray(${r}, offset), ${s}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset));`));this.options.stripNull&&t.pushCode(`${n} = ${n}.replace(/\\x00+$/g, '')`)}generateBuffer(t){const n=t.generateVariable(this.varName);if(typeof this.options.readUntil=="function"){const r=this.options.readUntil,i=t.generateTmpVariable(),o=t.generateTmpVariable();t.pushCode(`var ${i} = offset;`),t.pushCode(`var ${o} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${o} = dataView.getUint8(offset);`);const s=t.addImport(r);t.pushCode(`if (${s}.call(${t.generateVariable()}, ${o}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${n} = buffer.subarray(${i}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${n} = buffer.subarray(offset);`);else{const r=t.generateOption(this.options.length);t.pushCode(`${n} = buffer.subarray(offset, offset + ${r});`),t.pushCode(`offset += ${r};`)}this.options.clone&&t.pushCode(`${n} = buffer.constructor.from(${n});`)}generateArray(t){const n=t.generateOption(this.options.length),r=t.generateOption(this.options.lengthInBytes),i=this.options.type,o=t.generateTmpVariable(),s=t.generateVariable(this.varName),a=t.generateTmpVariable(),u=this.options.key,l=typeof u=="string";if(l?t.pushCode(`${s} = {};`):t.pushCode(`${s} = [];`),typeof this.options.readUntil=="function"?t.pushCode("do {"):this.options.readUntil==="eof"?t.pushCode(`for (var ${o} = 0; offset < buffer.length; ${o}++) {`):r!==void 0?t.pushCode(`for (var ${o} = offset + ${r}; offset < ${o}; ) {`):t.pushCode(`for (var ${o} = ${n}; ${o} > 0; ${o}--) {`),typeof i=="string")if(Nn.get(i)){const c=t.generateTmpVariable();if(t.pushCode(`var ${c} = ${vo+i}(offset, {`),t.useContextVariables){const f=t.generateVariable();t.pushCode(`$parent: ${f},`),t.pushCode(`$root: ${f}.$root,`),!this.options.readUntil&&r===void 0&&t.pushCode(`$index: ${n} - ${o},`)}t.pushCode("});"),t.pushCode(`var ${a} = ${c}.result; offset = ${c}.offset;`),i!==this.alias&&t.addReference(i)}else{const c=Of[i],f=zf[i];t.pushCode(`var ${a} = dataView.get${c}(offset, ${f});`),t.pushCode(`offset += ${Ln[i]};`)}else if(i instanceof Un){t.pushCode(`var ${a} = {};`);const c=t.generateVariable();t.pushScope(a),t.useContextVariables&&(t.pushCode(`${a}.$parent = ${c};`),t.pushCode(`${a}.$root = ${c}.$root;`),!this.options.readUntil&&r===void 0&&t.pushCode(`${a}.$index = ${n} - ${o};`)),i.generate(t),t.useContextVariables&&(t.pushCode(`delete ${a}.$parent;`),t.pushCode(`delete ${a}.$root;`),t.pushCode(`delete ${a}.$index;`)),t.popScope()}if(l?t.pushCode(`${s}[${a}.${u}] = ${a};`):t.pushCode(`${s}.push(${a});`),t.pushCode("}"),typeof this.options.readUntil=="function"){const c=this.options.readUntil,f=t.addImport(c);t.pushCode(`while (!${f}.call(${t.generateVariable()}, ${a}, buffer.subarray(offset)));`)}}generateChoiceCase(t,n,r){if(typeof r=="string"){const i=t.generateVariable(this.varName);if(Nn.has(r)){const o=t.generateTmpVariable();t.pushCode(`var ${o} = ${vo+r}(offset, {`),t.useContextVariables&&(t.pushCode(`$parent: ${i}.$parent,`),t.pushCode(`$root: ${i}.$root,`)),t.pushCode("});"),t.pushCode(`${i} = ${o}.result; offset = ${o}.offset;`),r!==this.alias&&t.addReference(r)}else{const o=Of[r],s=zf[r];t.pushCode(`${i} = dataView.get${o}(offset, ${s});`),t.pushCode(`offset += ${Ln[r]}`)}}else r instanceof Un&&(t.pushPath(n),r.generate(t),t.popPath(n))}generateChoice(t){const n=t.generateOption(this.options.tag),r=t.generateVariable(this.varName);if(this.varName&&(t.pushCode(`${r} = {};`),t.useContextVariables)){const i=t.generateVariable();t.pushCode(`${r}.$parent = ${i};`),t.pushCode(`${r}.$root = ${i}.$root;`)}t.pushCode(`switch(${n}) {`);for(const i in this.options.choices){const o=parseInt(i,10),s=this.options.choices[o];t.pushCode(`case ${o}:`),this.generateChoiceCase(t,this.varName,s),t.pushCode("break;")}t.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(t,this.varName,this.options.defaultChoice):t.generateError(`"Met undefined tag value " + ${n} + " at choice"`),t.pushCode("}"),this.varName&&t.useContextVariables&&(t.pushCode(`delete ${r}.$parent;`),t.pushCode(`delete ${r}.$root;`))}generateNest(t){const n=t.generateVariable(this.varName);if(this.options.type instanceof Un){if(this.varName&&(t.pushCode(`${n} = {};`),t.useContextVariables)){const r=t.generateVariable();t.pushCode(`${n}.$parent = ${r};`),t.pushCode(`${n}.$root = ${r}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),this.varName&&t.useContextVariables&&t.useContextVariables&&(t.pushCode(`delete ${n}.$parent;`),t.pushCode(`delete ${n}.$root;`))}else if(Nn.has(this.options.type)){const r=t.generateTmpVariable();if(t.pushCode(`var ${r} = ${vo+this.options.type}(offset, {`),t.useContextVariables){const i=t.generateVariable();t.pushCode(`$parent: ${i},`),t.pushCode(`$root: ${i}.$root,`)}t.pushCode("});"),t.pushCode(`${n} = ${r}.result; offset = ${r}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}}generateWrapper(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable();if(typeof this.options.readUntil=="function"){const u=this.options.readUntil,l=t.generateTmpVariable(),c=t.generateTmpVariable();t.pushCode(`var ${l} = offset;`),t.pushCode(`var ${c} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${c} = dataView.getUint8(offset);`);const f=t.addImport(u);t.pushCode(`if (${f}.call(${t.generateVariable()}, ${c}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${r} = buffer.subarray(${l}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${r} = buffer.subarray(offset);`);else{const u=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${u});`),t.pushCode(`offset += ${u};`)}this.options.clone&&t.pushCode(`${r} = buffer.constructor.from(${r});`);const i=t.generateTmpVariable(),o=t.generateTmpVariable(),s=t.generateTmpVariable(),a=t.addImport(this.options.wrapper);if(t.pushCode(`${r} = ${a}.call(this, ${r}).subarray(0);`),t.pushCode(`var ${i} = buffer;`),t.pushCode(`var ${o} = offset;`),t.pushCode(`var ${s} = dataView;`),t.pushCode(`buffer = ${r};`),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof Un)this.varName&&t.pushCode(`${n} = {};`),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(Nn.has(this.options.type)){const u=t.generateTmpVariable();t.pushCode(`var ${u} = ${vo+this.options.type}(0);`),t.pushCode(`${n} = ${u}.result;`),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode(`buffer = ${i};`),t.pushCode(`dataView = ${s};`),t.pushCode(`offset = ${o};`)}generateFormatter(t,n,r){if(typeof r=="function"){const i=t.addImport(r);t.pushCode(`${n} = ${i}.call(${t.generateVariable()}, ${n});`)}}generatePointer(t){const n=this.options.type,r=t.generateOption(this.options.offset),i=t.generateTmpVariable(),o=t.generateVariable(this.varName);if(t.pushCode(`var ${i} = offset;`),t.pushCode(`offset = ${r};`),this.options.type instanceof Un){if(t.pushCode(`${o} = {};`),t.useContextVariables){const s=t.generateVariable();t.pushCode(`${o}.$parent = ${s};`),t.pushCode(`${o}.$root = ${s}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode(`delete ${o}.$parent;`),t.pushCode(`delete ${o}.$root;`))}else if(Nn.has(this.options.type)){const s=t.generateTmpVariable();if(t.pushCode(`var ${s} = ${vo+this.options.type}(offset, {`),t.useContextVariables){const a=t.generateVariable();t.pushCode(`$parent: ${a},`),t.pushCode(`$root: ${a}.$root,`)}t.pushCode("});"),t.pushCode(`${o} = ${s}.result; offset = ${s}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(Ln).indexOf(this.options.type)>=0){const s=Of[n],a=zf[n];t.pushCode(`${o} = dataView.get${s}(offset, ${a});`),t.pushCode(`offset += ${Ln[n]};`)}t.pushCode(`offset = ${i};`)}generateSaveOffset(t){const n=t.generateVariable(this.varName);t.pushCode(`${n} = offset`)}};class mN{}class bN{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(t=new mN){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 yN{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 xo{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 bN,s=new yN;s.addCallback(i);const a={aborter:o,promise:this.fillCallback(n,o.signal,u=>{s.callback(u)}),settled:!1,statusReporter:s,get aborted(){return this.aborter.signal.aborted}};a.aborter.addSignal(r),a.aborter.signal.addEventListener("abort",()=>{a.settled||this.evict(t,a)}),a.promise.then(()=>{a.settled=!0},()=>{a.settled=!0,this.evict(t,a)}).catch(u=>{throw console.error(u),u}),this.cache.set(t,a)}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),xo.checkSinglePromise(o.promise,r)):(this.fill(t,n,r,i),xo.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}}class wN{constructor(t={}){if(!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=t.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(t,n){this.cache.set(t,n),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t)){const n=this.oldCache.get(t);return this.oldCache.delete(t),this._set(t,n),n}}set(t,n){return this.cache.has(t)?this.cache.set(t,n):this._set(t,n),this}has(t){return this.cache.has(t)||this.oldCache.has(t)}peek(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t))return this.oldCache.get(t)}delete(t){const n=this.cache.delete(t);return n&&this._size--,this.oldCache.delete(t)||n}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache)yield t;for(const t of this.oldCache){const[n]=t;this.cache.has(n)||(yield t)}}get size(){let t=0;for(const n of this.oldCache.keys())this.cache.has(n)||t++;return this._size+t}}var vN=wN;const Uf=mf(vN);class _s{constructor(t){this.ranges=t}get min(){return this.ranges[0].min}get max(){return this.ranges[this.ranges.length-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 _s([{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,s)=>o.min<s.min?-1:o.min>s.min?1:o.max<s.max?-1:s.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 _s([{min:i.min,max:o.max}]));return r.push(i),r.length===1?r[0]:new _s(r)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const xN=4,AA=0,EA=1,AN=2;function Cs(e){let t=e.length;for(;--t>=0;)e[t]=0}const EN=0,SA=1,SN=2,_N=3,CN=258,Lp=29,ql=256,Wl=ql+1+Lp,Ts=30,Op=19,_A=2*Wl+1,Ao=15,zp=16,TN=7,Up=256,CA=16,TA=17,kA=18,Gp=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Gf=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]),kN=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),IA=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),IN=512,Cr=new Array((Wl+2)*2);Cs(Cr);const Zl=new Array(Ts*2);Cs(Zl);const Yl=new Array(IN);Cs(Yl);const Ql=new Array(CN-_N+1);Cs(Ql);const Hp=new Array(Lp);Cs(Hp);const Hf=new Array(Ts);Cs(Hf);function Vp(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let BA,DA,FA;function $p(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const RA=e=>e<256?Yl[e]:Yl[256+(e>>>7)],Xl=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},qt=(e,t,n)=>{e.bi_valid>zp-n?(e.bi_buf|=t<<e.bi_valid&65535,Xl(e,e.bi_buf),e.bi_buf=t>>zp-e.bi_valid,e.bi_valid+=n-zp):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},ir=(e,t,n)=>{qt(e,n[t*2],n[t*2+1])},MA=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},BN=e=>{e.bi_valid===16?(Xl(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)},DN=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,u=t.stat_desc.max_length;let l,c,f,h,d,p,m=0;for(h=0;h<=Ao;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<_A;l++)c=e.heap[l],h=n[n[c*2+1]*2+1]+1,h>u&&(h=u,m++),n[c*2+1]=h,!(c>r)&&(e.bl_count[h]++,d=0,c>=a&&(d=s[c-a]),p=n[c*2],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[c*2+1]+d)));if(m!==0){do{for(h=u-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(h=u;h!==0;h--)for(c=e.bl_count[h];c!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),c--)}},PA=(e,t,n)=>{const r=new Array(Ao+1);let i=0,o,s;for(o=1;o<=Ao;o++)i=i+n[o-1]<<1,r[o]=i;for(s=0;s<=t;s++){let a=e[s*2+1];a!==0&&(e[s*2]=MA(r[a]++,a))}},FN=()=>{let e,t,n,r,i;const o=new Array(Ao+1);for(n=0,r=0;r<Lp-1;r++)for(Hp[r]=n,e=0;e<1<<Gp[r];e++)Ql[n++]=r;for(Ql[n-1]=r,i=0,r=0;r<16;r++)for(Hf[r]=i,e=0;e<1<<Gf[r];e++)Yl[i++]=r;for(i>>=7;r<Ts;r++)for(Hf[r]=i<<7,e=0;e<1<<Gf[r]-7;e++)Yl[256+i++]=r;for(t=0;t<=Ao;t++)o[t]=0;for(e=0;e<=143;)Cr[e*2+1]=8,e++,o[8]++;for(;e<=255;)Cr[e*2+1]=9,e++,o[9]++;for(;e<=279;)Cr[e*2+1]=7,e++,o[7]++;for(;e<=287;)Cr[e*2+1]=8,e++,o[8]++;for(PA(Cr,Wl+1,o),e=0;e<Ts;e++)Zl[e*2+1]=5,Zl[e*2]=MA(e,5);BA=new Vp(Cr,Gp,ql+1,Wl,Ao),DA=new Vp(Zl,Gf,0,Ts,Ao),FA=new Vp(new Array(0),kN,0,Op,TN)},NA=e=>{let t;for(t=0;t<Wl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ts;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Op;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Up*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},LA=e=>{e.bi_valid>8?Xl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},OA=(e,t,n,r)=>{const i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},jp=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&OA(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!OA(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},zA=(e,t,n)=>{let r,i,o=0,s,a;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?ir(e,i,t):(s=Ql[i],ir(e,s+ql+1,t),a=Gp[s],a!==0&&(i-=Hp[s],qt(e,i,a)),r--,s=RA(r),ir(e,s,n),a=Gf[s],a!==0&&(r-=Hf[s],qt(e,r,a)));while(o<e.sym_next);ir(e,Up,t)},qp=(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 s,a,u=-1,l;for(e.heap_len=0,e.heap_max=_A,s=0;s<o;s++)n[s*2]!==0?(e.heap[++e.heap_len]=u=s,e.depth[s]=0):n[s*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=u,s=e.heap_len>>1;s>=1;s--)jp(e,n,s);l=o;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],jp(e,n,1),a=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=a,n[l*2]=n[s*2]+n[a*2],e.depth[l]=(e.depth[s]>=e.depth[a]?e.depth[s]:e.depth[a])+1,n[s*2+1]=n[a*2+1]=l,e.heap[1]=l++,jp(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],DN(e,t),PA(n,u,e.bl_count)},UA=(e,t,n)=>{let r,i=-1,o,s=t[0*2+1],a=0,u=7,l=4;for(s===0&&(u=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=s,s=t[(r+1)*2+1],!(++a<u&&o===s)&&(a<l?e.bl_tree[o*2]+=a:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[CA*2]++):a<=10?e.bl_tree[TA*2]++:e.bl_tree[kA*2]++,a=0,i=o,s===0?(u=138,l=3):o===s?(u=6,l=3):(u=7,l=4))},GA=(e,t,n)=>{let r,i=-1,o,s=t[0*2+1],a=0,u=7,l=4;for(s===0&&(u=138,l=3),r=0;r<=n;r++)if(o=s,s=t[(r+1)*2+1],!(++a<u&&o===s)){if(a<l)do ir(e,o,e.bl_tree);while(--a!==0);else o!==0?(o!==i&&(ir(e,o,e.bl_tree),a--),ir(e,CA,e.bl_tree),qt(e,a-3,2)):a<=10?(ir(e,TA,e.bl_tree),qt(e,a-3,3)):(ir(e,kA,e.bl_tree),qt(e,a-11,7));a=0,i=o,s===0?(u=138,l=3):o===s?(u=6,l=3):(u=7,l=4)}},RN=e=>{let t;for(UA(e,e.dyn_ltree,e.l_desc.max_code),UA(e,e.dyn_dtree,e.d_desc.max_code),qp(e,e.bl_desc),t=Op-1;t>=3&&e.bl_tree[IA[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},MN=(e,t,n,r)=>{let i;for(qt(e,t-257,5),qt(e,n-1,5),qt(e,r-4,4),i=0;i<r;i++)qt(e,e.bl_tree[IA[i]*2+1],3);GA(e,e.dyn_ltree,t-1),GA(e,e.dyn_dtree,n-1)},PN=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return AA;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return EA;for(n=32;n<ql;n++)if(e.dyn_ltree[n*2]!==0)return EA;return AA};let HA=!1;const NN=e=>{HA||(FN(),HA=!0),e.l_desc=new $p(e.dyn_ltree,BA),e.d_desc=new $p(e.dyn_dtree,DA),e.bl_desc=new $p(e.bl_tree,FA),e.bi_buf=0,e.bi_valid=0,NA(e)},VA=(e,t,n,r)=>{qt(e,(EN<<1)+(r?1:0),3),LA(e),Xl(e,n),Xl(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},LN=e=>{qt(e,SA<<1,3),ir(e,Up,Cr),BN(e)},ON=(e,t,n,r)=>{let i,o,s=0;e.level>0?(e.strm.data_type===AN&&(e.strm.data_type=PN(e)),qp(e,e.l_desc),qp(e,e.d_desc),s=RN(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?VA(e,t,n,r):e.strategy===xN||o===i?(qt(e,(SA<<1)+(r?1:0),3),zA(e,Cr,Zl)):(qt(e,(SN<<1)+(r?1:0),3),MN(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),zA(e,e.dyn_ltree,e.dyn_dtree)),NA(e),r&&LA(e)},zN=(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[(Ql[n]+ql+1)*2]++,e.dyn_dtree[RA(t)*2]++),e.sym_next===e.sym_end);var UN=NN,GN=VA,HN=ON,VN=zN,$N=LN,jN={_tr_init:UN,_tr_stored_block:GN,_tr_flush_block:HN,_tr_tally:VN,_tr_align:$N},Kl=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,s=0;for(;n!==0;){s=n>2e3?2e3:n,n-=s;do i=i+t[r++]|0,o=o+i|0;while(--s);i%=65521,o%=65521}return i|o<<16|0};const qN=()=>{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},WN=new Uint32Array(qN());var mt=(e,t,n,r)=>{const i=WN,o=r+n;e^=-1;for(let s=r;s<o;s++)e=e>>>8^i[(e^t[s])&255];return e^-1},ks={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"},Jl={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:ZN,_tr_stored_block:Wp,_tr_flush_block:YN,_tr_tally:mi,_tr_align:QN}=jN,{Z_NO_FLUSH:bi,Z_PARTIAL_FLUSH:XN,Z_FULL_FLUSH:KN,Z_FINISH:wn,Z_BLOCK:$A,Z_OK:At,Z_STREAM_END:jA,Z_STREAM_ERROR:or,Z_DATA_ERROR:JN,Z_BUF_ERROR:Zp,Z_DEFAULT_COMPRESSION:eL,Z_FILTERED:tL,Z_HUFFMAN_ONLY:Vf,Z_RLE:nL,Z_FIXED:rL,Z_DEFAULT_STRATEGY:iL,Z_UNKNOWN:oL,Z_DEFLATED:$f}=Jl,sL=9,aL=15,lL=8,Yp=256+1+29,uL=30,cL=19,fL=2*Yp+1,hL=15,be=3,yi=258,sr=yi+be+1,dL=32,Is=42,Qp=57,Xp=69,Kp=73,Jp=91,eg=103,Eo=113,eu=666,Nt=1,Bs=2,So=3,Ds=4,pL=3,_o=(e,t)=>(e.msg=ks[t],t),qA=e=>e*2-(e>4?9:0),wi=e=>{let t=e.length;for(;--t>=0;)e[t]=0},gL=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 vi=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const en=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))},tn=(e,t)=>{YN(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,en(e.strm)},Te=(e,t)=>{e.pending_buf[e.pending++]=t},tu=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},tg=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Kl(e.adler,t,i,n):e.state.wrap===2&&(e.adler=mt(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},WA=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,s=e.prev_length,a=e.nice_match;const u=e.strstart>e.w_size-sr?e.strstart-(e.w_size-sr):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+yi;let d=l[r+s-1],p=l[r+s];e.prev_length>=e.good_match&&(n>>=2),a>e.lookahead&&(a=e.lookahead);do if(i=t,!(l[i+s]!==p||l[i+s-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=yi-(h-r),r=h-yi,o>s){if(e.match_start=t,s=o,o>=a)break;d=l[r+s-1],p=l[r+s]}}while((t=f[t&c])>u&&--n!==0);return s<=e.lookahead?s:e.lookahead},Fs=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-sr)&&(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),gL(e),r+=t),e.strm.avail_in===0)break;if(n=tg(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=be)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=vi(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=vi(e,e.ins_h,e.window[i+be-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<be)););}while(e.lookahead<sr&&e.strm.avail_in!==0)},ZA=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,s=0,a=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!==wn||t===bi||r!==i+e.strm.avail_in)))break;s=t===wn&&r===i+e.strm.avail_in?1:0,Wp(e,0,0,s),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,en(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(tg(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(s===0);return a-=e.strm.avail_in,a&&(a>=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<=a&&(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-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),s?Ds:t!==bi&&t!==wn&&e.strm.avail_in===0&&e.strstart===e.block_start?Bs:(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&&(tg(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===wn)&&t!==bi&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,s=t===wn&&e.strm.avail_in===0&&r===i?1:0,Wp(e,e.block_start,r,s),e.block_start+=r,en(e.strm)),s?So:Nt)},ng=(e,t)=>{let n,r;for(;;){if(e.lookahead<sr){if(Fs(e),e.lookahead<sr&&t===bi)return Nt;if(e.lookahead===0)break}if(n=0,e.lookahead>=be&&(e.ins_h=vi(e,e.ins_h,e.window[e.strstart+be-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-sr&&(e.match_length=WA(e,n)),e.match_length>=be)if(r=mi(e,e.strstart-e.match_start,e.match_length-be),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=be){e.match_length--;do e.strstart++,e.ins_h=vi(e,e.ins_h,e.window[e.strstart+be-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=vi(e,e.ins_h,e.window[e.strstart+1]);else r=mi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(tn(e,!1),e.strm.avail_out===0))return Nt}return e.insert=e.strstart<be-1?e.strstart:be-1,t===wn?(tn(e,!0),e.strm.avail_out===0?So:Ds):e.sym_next&&(tn(e,!1),e.strm.avail_out===0)?Nt:Bs},Rs=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<sr){if(Fs(e),e.lookahead<sr&&t===bi)return Nt;if(e.lookahead===0)break}if(n=0,e.lookahead>=be&&(e.ins_h=vi(e,e.ins_h,e.window[e.strstart+be-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=be-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-sr&&(e.match_length=WA(e,n),e.match_length<=5&&(e.strategy===tL||e.match_length===be&&e.strstart-e.match_start>4096)&&(e.match_length=be-1)),e.prev_length>=be&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-be,r=mi(e,e.strstart-1-e.prev_match,e.prev_length-be),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=vi(e,e.ins_h,e.window[e.strstart+be-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=be-1,e.strstart++,r&&(tn(e,!1),e.strm.avail_out===0))return Nt}else if(e.match_available){if(r=mi(e,0,e.window[e.strstart-1]),r&&tn(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Nt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=mi(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<be-1?e.strstart:be-1,t===wn?(tn(e,!0),e.strm.avail_out===0?So:Ds):e.sym_next&&(tn(e,!1),e.strm.avail_out===0)?Nt:Bs},mL=(e,t)=>{let n,r,i,o;const s=e.window;for(;;){if(e.lookahead<=yi){if(Fs(e),e.lookahead<=yi&&t===bi)return Nt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=be&&e.strstart>0&&(i=e.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=e.strstart+yi;do;while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);e.match_length=yi-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=be?(n=mi(e,1,e.match_length-be),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=mi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(tn(e,!1),e.strm.avail_out===0))return Nt}return e.insert=0,t===wn?(tn(e,!0),e.strm.avail_out===0?So:Ds):e.sym_next&&(tn(e,!1),e.strm.avail_out===0)?Nt:Bs},bL=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Fs(e),e.lookahead===0)){if(t===bi)return Nt;break}if(e.match_length=0,n=mi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(tn(e,!1),e.strm.avail_out===0))return Nt}return e.insert=0,t===wn?(tn(e,!0),e.strm.avail_out===0?So:Ds):e.sym_next&&(tn(e,!1),e.strm.avail_out===0)?Nt:Bs};function ar(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 nu=[new ar(0,0,0,0,ZA),new ar(4,4,8,4,ng),new ar(4,5,16,8,ng),new ar(4,6,32,32,ng),new ar(4,4,16,16,Rs),new ar(8,16,32,32,Rs),new ar(8,16,128,128,Rs),new ar(8,32,128,256,Rs),new ar(32,128,258,1024,Rs),new ar(32,258,258,4096,Rs)],yL=e=>{e.window_size=2*e.w_size,wi(e.head),e.max_lazy_match=nu[e.level].max_lazy,e.good_match=nu[e.level].good_length,e.nice_match=nu[e.level].nice_length,e.max_chain_length=nu[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=be-1,e.match_available=0,e.ins_h=0};function wL(){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=$f,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(fL*2),this.dyn_dtree=new Uint16Array((2*uL+1)*2),this.bl_tree=new Uint16Array((2*cL+1)*2),wi(this.dyn_ltree),wi(this.dyn_dtree),wi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(hL+1),this.heap=new Uint16Array(2*Yp+1),wi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Yp+1),wi(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 ru=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Is&&t.status!==Qp&&t.status!==Xp&&t.status!==Kp&&t.status!==Jp&&t.status!==eg&&t.status!==Eo&&t.status!==eu?1:0},YA=e=>{if(ru(e))return _o(e,or);e.total_in=e.total_out=0,e.data_type=oL;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Qp:t.wrap?Is:Eo,e.adler=t.wrap===2?0:1,t.last_flush=-2,ZN(t),At},QA=e=>{const t=YA(e);return t===At&&yL(e.state),t},vL=(e,t)=>ru(e)||e.state.wrap!==2?or:(e.state.gzhead=t,At),XA=(e,t,n,r,i,o)=>{if(!e)return or;let s=1;if(t===eL&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>sL||n!==$f||r<8||r>15||t<0||t>9||o<0||o>rL||r===8&&s!==1)return _o(e,or);r===8&&(r=9);const a=new wL;return e.state=a,a.strm=e,a.status=Is,a.wrap=s,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+be-1)/be),a.window=new Uint8Array(a.w_size*2),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=a.lit_bufsize*4,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=(a.lit_bufsize-1)*3,a.level=t,a.strategy=o,a.method=n,QA(e)},xL=(e,t)=>XA(e,t,$f,aL,lL,iL),AL=(e,t)=>{if(ru(e)||t>$A||t<0)return e?_o(e,or):or;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===eu&&t!==wn)return _o(e,e.avail_out===0?Zp:or);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(en(e),e.avail_out===0)return n.last_flush=-1,At}else if(e.avail_in===0&&qA(t)<=qA(r)&&t!==wn)return _o(e,Zp);if(n.status===eu&&e.avail_in!==0)return _o(e,Zp);if(n.status===Is&&n.wrap===0&&(n.status=Eo),n.status===Is){let i=$f+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=Vf||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=dL),i+=31-i%31,tu(n,i),n.strstart!==0&&(tu(n,e.adler>>>16),tu(n,e.adler&65535)),e.adler=1,n.status=Eo,en(e),n.pending!==0)return n.last_flush=-1,At}if(n.status===Qp){if(e.adler=0,Te(n,31),Te(n,139),Te(n,8),n.gzhead)Te(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Te(n,n.gzhead.time&255),Te(n,n.gzhead.time>>8&255),Te(n,n.gzhead.time>>16&255),Te(n,n.gzhead.time>>24&255),Te(n,n.level===9?2:n.strategy>=Vf||n.level<2?4:0),Te(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Te(n,n.gzhead.extra.length&255),Te(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=mt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Xp;else if(Te(n,0),Te(n,0),Te(n,0),Te(n,0),Te(n,0),Te(n,n.level===9?2:n.strategy>=Vf||n.level<2?4:0),Te(n,pL),n.status=Eo,en(e),n.pending!==0)return n.last_flush=-1,At}if(n.status===Xp){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 a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=mt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=a,en(e),n.pending!==0)return n.last_flush=-1,At;i=0,o-=a}let s=new Uint8Array(n.gzhead.extra);n.pending_buf.set(s.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=mt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Kp}if(n.status===Kp){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=mt(e.adler,n.pending_buf,n.pending-i,i)),en(e),n.pending!==0)return n.last_flush=-1,At;i=0}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,Te(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=mt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Jp}if(n.status===Jp){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=mt(e.adler,n.pending_buf,n.pending-i,i)),en(e),n.pending!==0)return n.last_flush=-1,At;i=0}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,Te(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=mt(e.adler,n.pending_buf,n.pending-i,i))}n.status=eg}if(n.status===eg){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(en(e),n.pending!==0))return n.last_flush=-1,At;Te(n,e.adler&255),Te(n,e.adler>>8&255),e.adler=0}if(n.status=Eo,en(e),n.pending!==0)return n.last_flush=-1,At}if(e.avail_in!==0||n.lookahead!==0||t!==bi&&n.status!==eu){let i=n.level===0?ZA(n,t):n.strategy===Vf?bL(n,t):n.strategy===nL?mL(n,t):nu[n.level].func(n,t);if((i===So||i===Ds)&&(n.status=eu),i===Nt||i===So)return e.avail_out===0&&(n.last_flush=-1),At;if(i===Bs&&(t===XN?QN(n):t!==$A&&(Wp(n,0,0,!1),t===KN&&(wi(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),en(e),e.avail_out===0))return n.last_flush=-1,At}return t!==wn?At:n.wrap<=0?jA:(n.wrap===2?(Te(n,e.adler&255),Te(n,e.adler>>8&255),Te(n,e.adler>>16&255),Te(n,e.adler>>24&255),Te(n,e.total_in&255),Te(n,e.total_in>>8&255),Te(n,e.total_in>>16&255),Te(n,e.total_in>>24&255)):(tu(n,e.adler>>>16),tu(n,e.adler&65535)),en(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?At:jA)},EL=e=>{if(ru(e))return or;const t=e.state.status;return e.state=null,t===Eo?_o(e,JN):At},SL=(e,t)=>{let n=t.length;if(ru(e))return or;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==Is||r.lookahead)return or;if(i===1&&(e.adler=Kl(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(wi(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(t.subarray(n-r.w_size,n),0),t=u,n=r.w_size}const o=e.avail_in,s=e.next_in,a=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Fs(r);r.lookahead>=be;){let u=r.strstart,l=r.lookahead-(be-1);do r.ins_h=vi(r,r.ins_h,r.window[u+be-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--l);r.strstart=u,r.lookahead=be-1,Fs(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=be-1,r.match_available=0,e.next_in=s,e.input=a,e.avail_in=o,r.wrap=i,At};var _L=xL,CL=XA,TL=QA,kL=YA,IL=vL,BL=AL,DL=EL,FL=SL,RL="pako deflate (from Nodeca project)",iu={deflateInit:_L,deflateInit2:CL,deflateReset:TL,deflateResetKeep:kL,deflateSetHeader:IL,deflate:BL,deflateEnd:DL,deflateSetDictionary:FL,deflateInfo:RL};const ML=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var PL=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)ML(n,r)&&(e[r]=n[r])}}return e},NL=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 s=e[r];n.set(s,i),i+=s.length}return n},jf={assign:PL,flattenChunks:NL};let KA=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{KA=!1}const ou=new Uint8Array(256);for(let e=0;e<256;e++)ou[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;ou[254]=ou[254]=1;var LL=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,s=e.length,a=0;for(i=0;i<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<s&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),o=0,i=0;o<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<s&&(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 OL=(e,t)=>{if(t<65534&&e.subarray&&KA)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 zL=(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 s=e[r++];if(s<128){o[i++]=s;continue}let a=ou[s];if(a>4){o[i++]=65533,r+=a-1;continue}for(s&=a===2?31:a===3?15:7;a>1&&r<n;)s=s<<6|e[r++]&63,a--;if(a>1){o[i++]=65533;continue}s<65536?o[i++]=s:(s-=65536,o[i++]=55296|s>>10&1023,o[i++]=56320|s&1023)}return OL(o,i)},UL=(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+ou[e[n]]>t?n:t},su={string2buf:LL,buf2string:zL,utf8border:UL};function GL(){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 JA=GL;const e3=Object.prototype.toString,{Z_NO_FLUSH:HL,Z_SYNC_FLUSH:VL,Z_FULL_FLUSH:$L,Z_FINISH:jL,Z_OK:qf,Z_STREAM_END:qL,Z_DEFAULT_COMPRESSION:WL,Z_DEFAULT_STRATEGY:ZL,Z_DEFLATED:YL}=Jl;function rg(e){this.options=jf.assign({level:WL,method:YL,chunkSize:16384,windowBits:15,memLevel:8,strategy:ZL},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 JA,this.strm.avail_out=0;let n=iu.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==qf)throw new Error(ks[n]);if(t.header&&iu.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=su.string2buf(t.dictionary):e3.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=iu.deflateSetDictionary(this.strm,r),n!==qf)throw new Error(ks[n]);this._dict_set=!0}}rg.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?jL:HL,typeof e=="string"?n.input=su.string2buf(e):e3.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===VL||o===$L)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=iu.deflate(n,o),i===qL)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=iu.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===qf;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},rg.prototype.onData=function(e){this.chunks.push(e)},rg.prototype.onEnd=function(e){e===qf&&(this.result=jf.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const Wf=16209,QL=16191;var XL=function(t,n){let r,i,o,s,a,u,l,c,f,h,d,p,m,y,w,A,_,S,T,B,I,D,M,U;const N=t.state;r=t.next_in,M=t.input,i=r+(t.avail_in-5),o=t.next_out,U=t.output,s=o-(n-t.avail_out),a=o+(t.avail_out-257),u=N.dmax,l=N.wsize,c=N.whave,f=N.wnext,h=N.window,d=N.hold,p=N.bits,m=N.lencode,y=N.distcode,w=(1<<N.lenbits)-1,A=(1<<N.distbits)-1;e:do{p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),_=m[d&w];t:for(;;){if(S=_>>>24,d>>>=S,p-=S,S=_>>>16&255,S===0)U[o++]=_&65535;else if(S&16){T=_&65535,S&=15,S&&(p<S&&(d+=M[r++]<<p,p+=8),T+=d&(1<<S)-1,d>>>=S,p-=S),p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),_=y[d&A];n:for(;;){if(S=_>>>24,d>>>=S,p-=S,S=_>>>16&255,S&16){if(B=_&65535,S&=15,p<S&&(d+=M[r++]<<p,p+=8,p<S&&(d+=M[r++]<<p,p+=8)),B+=d&(1<<S)-1,B>u){t.msg="invalid distance too far back",N.mode=Wf;break e}if(d>>>=S,p-=S,S=o-s,B>S){if(S=B-S,S>c&&N.sane){t.msg="invalid distance too far back",N.mode=Wf;break e}if(I=0,D=h,f===0){if(I+=l-S,S<T){T-=S;do U[o++]=h[I++];while(--S);I=o-B,D=U}}else if(f<S){if(I+=l+f-S,S-=f,S<T){T-=S;do U[o++]=h[I++];while(--S);if(I=0,f<T){S=f,T-=S;do U[o++]=h[I++];while(--S);I=o-B,D=U}}}else if(I+=f-S,S<T){T-=S;do U[o++]=h[I++];while(--S);I=o-B,D=U}for(;T>2;)U[o++]=D[I++],U[o++]=D[I++],U[o++]=D[I++],T-=3;T&&(U[o++]=D[I++],T>1&&(U[o++]=D[I++]))}else{I=o-B;do U[o++]=U[I++],U[o++]=U[I++],U[o++]=U[I++],T-=3;while(T>2);T&&(U[o++]=U[I++],T>1&&(U[o++]=U[I++]))}}else if(S&64){t.msg="invalid distance code",N.mode=Wf;break e}else{_=y[(_&65535)+(d&(1<<S)-1)];continue n}break}}else if(S&64)if(S&32){N.mode=QL;break e}else{t.msg="invalid literal/length code",N.mode=Wf;break e}else{_=m[(_&65535)+(d&(1<<S)-1)];continue t}break}}while(r<i&&o<a);T=p>>3,r-=T,p-=T<<3,d&=(1<<p)-1,t.next_in=r,t.next_out=o,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=o<a?257+(a-o):257-(o-a),N.hold=d,N.bits=p};const Ms=15,t3=852,n3=592,r3=0,ig=1,i3=2,KL=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]),JL=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]),eO=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]),tO=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 au=(e,t,n,r,i,o,s,a)=>{const u=a.bits;let l=0,c=0,f=0,h=0,d=0,p=0,m=0,y=0,w=0,A=0,_,S,T,B,I,D=null,M;const U=new Uint16Array(Ms+1),N=new Uint16Array(Ms+1);let te=null,re,ce,ge;for(l=0;l<=Ms;l++)U[l]=0;for(c=0;c<r;c++)U[t[n+c]]++;for(d=u,h=Ms;h>=1&&U[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,a.bits=1,0;for(f=1;f<h&&U[f]===0;f++);for(d<f&&(d=f),y=1,l=1;l<=Ms;l++)if(y<<=1,y-=U[l],y<0)return-1;if(y>0&&(e===r3||h!==1))return-1;for(N[1]=0,l=1;l<Ms;l++)N[l+1]=N[l]+U[l];for(c=0;c<r;c++)t[n+c]!==0&&(s[N[t[n+c]]++]=c);if(e===r3?(D=te=s,M=20):e===ig?(D=KL,te=JL,M=257):(D=eO,te=tO,M=0),A=0,c=0,l=f,I=o,p=d,m=0,T=-1,w=1<<d,B=w-1,e===ig&&w>t3||e===i3&&w>n3)return 1;for(;;){re=l-m,s[c]+1<M?(ce=0,ge=s[c]):s[c]>=M?(ce=te[s[c]-M],ge=D[s[c]-M]):(ce=96,ge=0),_=1<<l-m,S=1<<p,f=S;do S-=_,i[I+(A>>m)+S]=re<<24|ce<<16|ge|0;while(S!==0);for(_=1<<l-1;A&_;)_>>=1;if(_!==0?(A&=_-1,A+=_):A=0,c++,--U[l]===0){if(l===h)break;l=t[n+s[c]]}if(l>d&&(A&B)!==T){for(m===0&&(m=d),I+=f,p=l-m,y=1<<p;p+m<h&&(y-=U[p+m],!(y<=0));)p++,y<<=1;if(w+=1<<p,e===ig&&w>t3||e===i3&&w>n3)return 1;T=A&B,i[T]=d<<24|p<<16|I-o|0}}return A!==0&&(i[I+A]=l-m<<24|64<<16|0),a.bits=d,0};const nO=0,o3=1,s3=2,{Z_FINISH:a3,Z_BLOCK:rO,Z_TREES:Zf,Z_OK:Co,Z_STREAM_END:iO,Z_NEED_DICT:oO,Z_STREAM_ERROR:vn,Z_DATA_ERROR:l3,Z_MEM_ERROR:u3,Z_BUF_ERROR:sO,Z_DEFLATED:c3}=Jl,Yf=16180,f3=16181,h3=16182,d3=16183,p3=16184,g3=16185,m3=16186,b3=16187,y3=16188,w3=16189,Qf=16190,Tr=16191,og=16192,v3=16193,sg=16194,x3=16195,A3=16196,E3=16197,S3=16198,Xf=16199,Kf=16200,_3=16201,C3=16202,T3=16203,k3=16204,I3=16205,ag=16206,B3=16207,D3=16208,Xe=16209,F3=16210,R3=16211,aO=852,lO=592,uO=15,M3=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function cO(){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 To=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<Yf||t.mode>R3?1:0},P3=e=>{if(To(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=Yf,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(aO),t.distcode=t.distdyn=new Int32Array(lO),t.sane=1,t.back=-1,Co},N3=e=>{if(To(e))return vn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,P3(e)},L3=(e,t)=>{let n;if(To(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,N3(e))},O3=(e,t)=>{if(!e)return vn;const n=new cO;e.state=n,n.strm=e,n.window=null,n.mode=Yf;const r=L3(e,t);return r!==Co&&(e.state=null),r},fO=e=>O3(e,uO);let z3=!0,lg,ug;const hO=e=>{if(z3){lg=new Int32Array(512),ug=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(au(o3,e.lens,0,288,lg,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;au(s3,e.lens,0,32,ug,0,e.work,{bits:5}),z3=!1}e.lencode=lg,e.lenbits=9,e.distcode=ug,e.distbits=5},U3=(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},dO=(e,t)=>{let n,r,i,o,s,a,u,l,c,f,h,d,p,m,y=0,w,A,_,S,T,B,I,D;const M=new Uint8Array(4);let U,N;const te=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(To(e)||!e.output||!e.input&&e.avail_in!==0)return vn;n=e.state,n.mode===Tr&&(n.mode=og),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,l=n.hold,c=n.bits,f=a,h=u,D=Co;e:for(;;)switch(n.mode){case Yf:if(n.wrap===0){n.mode=og;break}for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=mt(n.check,M,2,0),l=0,c=0,n.mode=f3;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Xe;break}if((l&15)!==c3){e.msg="unknown compression method",n.mode=Xe;break}if(l>>>=4,c-=4,I=(l&15)+8,n.wbits===0&&(n.wbits=I),I>15||I>n.wbits){e.msg="invalid window size",n.mode=Xe;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?w3:Tr,l=0,c=0;break;case f3:for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.flags=l,(n.flags&255)!==c3){e.msg="unknown compression method",n.mode=Xe;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Xe;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=mt(n.check,M,2,0)),l=0,c=0,n.mode=h3;case h3:for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=mt(n.check,M,4,0)),l=0,c=0,n.mode=d3;case d3:for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=mt(n.check,M,2,0)),l=0,c=0,n.mode=p3;case p3:if(n.flags&1024){for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=mt(n.check,M,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=g3;case g3:if(n.flags&1024&&(d=n.length,d>a&&(d=a),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+d),I)),n.flags&512&&n.wrap&4&&(n.check=mt(n.check,r,d,o)),a-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=m3;case m3:if(n.flags&2048){if(a===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<a);if(n.flags&512&&n.wrap&4&&(n.check=mt(n.check,r,d,o)),a-=d,o+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=b3;case b3:if(n.flags&4096){if(a===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<a);if(n.flags&512&&n.wrap&4&&(n.check=mt(n.check,r,d,o)),a-=d,o+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=y3;case y3:if(n.flags&512){for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Xe;break}l=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Tr;break;case w3:for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}e.adler=n.check=M3(l),l=0,c=0,n.mode=Qf;case Qf:if(n.havedict===0)return e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,oO;e.adler=n.check=1,n.mode=Tr;case Tr:if(t===rO||t===Zf)break e;case og:if(n.last){l>>>=c&7,c-=c&7,n.mode=ag;break}for(;c<3;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}switch(n.last=l&1,l>>>=1,c-=1,l&3){case 0:n.mode=v3;break;case 1:if(hO(n),n.mode=Xf,t===Zf){l>>>=2,c-=2;break e}break;case 2:n.mode=A3;break;case 3:e.msg="invalid block type",n.mode=Xe}l>>>=2,c-=2;break;case v3:for(l>>>=c&7,c-=c&7;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Xe;break}if(n.length=l&65535,l=0,c=0,n.mode=sg,t===Zf)break e;case sg:n.mode=x3;case x3:if(d=n.length,d){if(d>a&&(d=a),d>u&&(d=u),d===0)break e;i.set(r.subarray(o,o+d),s),a-=d,o+=d,u-=d,s+=d,n.length-=d;break}n.mode=Tr;break;case A3:for(;c<14;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.nlen=(l&31)+257,l>>>=5,c-=5,n.ndist=(l&31)+1,l>>>=5,c-=5,n.ncode=(l&15)+4,l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Xe;break}n.have=0,n.mode=E3;case E3:for(;n.have<n.ncode;){for(;c<3;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.lens[te[n.have++]]=l&7,l>>>=3,c-=3}for(;n.have<19;)n.lens[te[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,U={bits:n.lenbits},D=au(nO,n.lens,0,19,n.lencode,0,n.work,U),n.lenbits=U.bits,D){e.msg="invalid code lengths set",n.mode=Xe;break}n.have=0,n.mode=S3;case S3:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,_=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(_<16)l>>>=w,c-=w,n.lens[n.have++]=_;else{if(_===16){for(N=w+2;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(l>>>=w,c-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=Xe;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,c-=2}else if(_===17){for(N=w+3;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=3+(l&7),l>>>=3,c-=3}else{for(N=w+7;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=11+(l&127),l>>>=7,c-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Xe;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===Xe)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Xe;break}if(n.lenbits=9,U={bits:n.lenbits},D=au(o3,n.lens,0,n.nlen,n.lencode,0,n.work,U),n.lenbits=U.bits,D){e.msg="invalid literal/lengths set",n.mode=Xe;break}if(n.distbits=6,n.distcode=n.distdyn,U={bits:n.distbits},D=au(s3,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,U),n.distbits=U.bits,D){e.msg="invalid distances set",n.mode=Xe;break}if(n.mode=Xf,t===Zf)break e;case Xf:n.mode=Kf;case Kf:if(a>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,XL(e,h),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,l=n.hold,c=n.bits,n.mode===Tr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,_=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(A&&!(A&240)){for(S=w,T=A,B=_;y=n.lencode[B+((l&(1<<S+T)-1)>>S)],w=y>>>24,A=y>>>16&255,_=y&65535,!(S+w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=S,c-=S,n.back+=S}if(l>>>=w,c-=w,n.back+=w,n.length=_,A===0){n.mode=I3;break}if(A&32){n.back=-1,n.mode=Tr;break}if(A&64){e.msg="invalid literal/length code",n.mode=Xe;break}n.extra=A&15,n.mode=_3;case _3:if(n.extra){for(N=n.extra;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=C3;case C3:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,A=y>>>16&255,_=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(!(A&240)){for(S=w,T=A,B=_;y=n.distcode[B+((l&(1<<S+T)-1)>>S)],w=y>>>24,A=y>>>16&255,_=y&65535,!(S+w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=S,c-=S,n.back+=S}if(l>>>=w,c-=w,n.back+=w,A&64){e.msg="invalid distance code",n.mode=Xe;break}n.offset=_,n.extra=A&15,n.mode=T3;case T3:if(n.extra){for(N=n.extra;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Xe;break}n.mode=k3;case k3:if(u===0)break e;if(d=h-u,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Xe;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),m=n.window}else m=i,p=s-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[s++]=m[p++];while(--d);n.length===0&&(n.mode=Kf);break;case I3:if(u===0)break e;i[s++]=n.length,u--,n.mode=Kf;break;case ag:if(n.wrap){for(;c<32;){if(a===0)break e;a--,l|=r[o++]<<c,c+=8}if(h-=u,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?mt(n.check,i,h,s-h):Kl(n.check,i,h,s-h)),h=u,n.wrap&4&&(n.flags?l:M3(l))!==n.check){e.msg="incorrect data check",n.mode=Xe;break}l=0,c=0}n.mode=B3;case B3:if(n.wrap&&n.flags){for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Xe;break}l=0,c=0}n.mode=D3;case D3:D=iO;break e;case Xe:D=l3;break e;case F3:return u3;case R3:default:return vn}return e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<Xe&&(n.mode<ag||t!==a3))&&U3(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?mt(n.check,i,h,e.next_out-h):Kl(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Tr?128:0)+(n.mode===Xf||n.mode===sg?256:0),(f===0&&h===0||t===a3)&&D===Co&&(D=sO),D},pO=e=>{if(To(e))return vn;let t=e.state;return t.window&&(t.window=null),e.state=null,Co},gO=(e,t)=>{if(To(e))return vn;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,Co):vn},mO=(e,t)=>{const n=t.length;let r,i,o;return To(e)||(r=e.state,r.wrap!==0&&r.mode!==Qf)?vn:r.mode===Qf&&(i=1,i=Kl(i,t,n,0),i!==r.check)?l3:(o=U3(e,t,n,n),o?(r.mode=F3,u3):(r.havedict=1,Co))};var bO=N3,yO=L3,wO=P3,vO=fO,xO=O3,AO=dO,EO=pO,SO=gO,_O=mO,CO="pako inflate (from Nodeca project)",kr={inflateReset:bO,inflateReset2:yO,inflateResetKeep:wO,inflateInit:vO,inflateInit2:xO,inflate:AO,inflateEnd:EO,inflateGetHeader:SO,inflateSetDictionary:_O,inflateInfo:CO};function TO(){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 kO=TO;const G3=Object.prototype.toString,{Z_NO_FLUSH:IO,Z_FINISH:BO,Z_OK:lu,Z_STREAM_END:cg,Z_NEED_DICT:fg,Z_STREAM_ERROR:DO,Z_DATA_ERROR:H3,Z_MEM_ERROR:FO}=Jl;function uu(e){this.options=jf.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 JA,this.strm.avail_out=0;let n=kr.inflateInit2(this.strm,t.windowBits);if(n!==lu)throw new Error(ks[n]);if(this.header=new kO,kr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=su.string2buf(t.dictionary):G3.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=kr.inflateSetDictionary(this.strm,t.dictionary),n!==lu)))throw new Error(ks[n])}uu.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,s,a;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?BO:IO,G3.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=kr.inflate(n,s),o===fg&&i&&(o=kr.inflateSetDictionary(n,i),o===lu?o=kr.inflate(n,s):o===H3&&(o=fg));n.avail_in>0&&o===cg&&n.state.wrap>0&&e[n.next_in]!==0;)kr.inflateReset(n),o=kr.inflate(n,s);switch(o){case DO:case H3:case fg:case FO:return this.onEnd(o),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||o===cg))if(this.options.to==="string"){let u=su.utf8border(n.output,n.next_out),l=n.next_out-u,c=su.buf2string(n.output,u);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(u,u+l),0),this.onData(c)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===lu&&a===0)){if(o===cg)return o=kr.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},uu.prototype.onData=function(e){this.chunks.push(e)},uu.prototype.onEnd=function(e){e===lu&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=jf.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function hg(e,t){const n=new uu(t);if(n.push(e),n.err)throw n.msg||ks[n.err];return n.result}function RO(e,t){return t=t||{},t.raw=!0,hg(e,t)}var MO=uu,PO=hg,NO=RO,LO=hg,OO=Jl,zO={Inflate:MO,inflate:PO,inflateRaw:NO,ungzip:LO,constants:OO};const{Inflate:zG,inflate:UG,inflateRaw:UO,ungzip:GG}=zO;var GO=UO;function HO(e){return GO(e.subarray(2))}let VO=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function $O(e){e.sort((i,o)=>Number(i.offset)-Number(o.offset));const t=[];let n,r;for(const i of e)n&&r&&Number(i.offset)-r<=2e3?(n.length=BigInt(Number(n.length)+Number(i.length)-r+Number(i.offset)),n.blocks.push(i)):t.push(n={blocks:[i],length:i.length,offset:i.offset}),r=Number(n.offset)+Number(n.length);return t}function Jf(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new VO("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const jO=1,qO=2,WO=3;function dg(e,t,n,r){return e<r&&t>=n}function ZO(e){const t=e?"big":"little",n=new Me().endianess(t).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),r=new Me().endianess(t).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:new Me().endianess(t).array("blocksToFetch",{length:"cnt",type:new Me().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:new Me().array("recurOffsets",{length:"cnt",type:new Me().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),i=new Me().endianess(t).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:new Me().endianess(t).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:{[WO]:new Me().array("items",{length:"itemCount",type:new Me().floatle("score")}),[qO]:new Me().array("items",{length:"itemCount",type:new Me().endianess(t).int32("start").floatle("score")}),[jO]:new Me().array("items",{length:"itemCount",type:new Me().endianess(t).int32("start").int32("end").floatle("score")})}}),bigBedParser:i,summaryParser:n,leafParser:r}}class V3{constructor(t,n,r,i,o,s){if(this.bbi=t,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=i,this.isCompressed=o,this.blockType=s,this.featureCache=new xo({cache:new Uf({maxSize:1e3}),fill:async(u,l)=>{const c=Number(u.length),f=Number(u.offset),{buffer:h}=await this.bbi.read(ye.Buffer.alloc(c),0,c,f,{signal:l});return h}}),!(r>=0))throw new Error("invalid cirTreeOffset!");const a=ZO(i);this.leafParser=a.leafParser,this.bigBedParser=a.bigBedParser}async readWigData(t,n,r,i,o){try{const{refsByName:s,bbi:a,cirTreeOffset:u,isBigEndian:l}=this,c=s[t];c===void 0&&i.complete();const f={chrId:c,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=a.read(ye.Buffer.alloc(48),0,48,Number(u),o));const{buffer:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],m=0;const y=(S,T,B)=>{try{const I=S.subarray(T),D=this.leafParser.parse(I);if(D.blocksToFetch&&(p=p.concat(D.blocksToFetch.filter(M=>w(M)).map(M=>({offset:M.blockOffset,length:M.blockSize})))),D.recurOffsets){const M=D.recurOffsets.filter(U=>w(U)).map(U=>Number(U.blockOffset));M.length>0&&_(M,B+1)}}catch(I){i.error(I)}},w=S=>{const{startChrom:T,startBase:B,endChrom:I,endBase:D}=S;return(T<c||T===c&&B<=r)&&(I>c||I===c&&D>=n)},A=async(S,T,B)=>{try{const I=T.max-T.min,D=T.min,M=await this.featureCache.get(`${I}_${D}`,{length:I,offset:D},o==null?void 0:o.signal);for(const U of S)T.contains(U)&&(y(M,U-D,B),m-=1,m===0&&this.readFeatures(i,p,{...o,request:f}).catch(N=>i.error(N)))}catch(I){i.error(I)}},_=(S,T)=>{try{m+=S.length;const B=4+Number(d)*32;let I=new _s([{min:S[0],max:S[0]+B}]);for(let D=1;D<S.length;D+=1){const M=new _s([{min:S[D],max:S[D]+B}]);I=I.union(M)}I.getRanges().map(D=>A(S,D,T))}catch(B){i.error(B)}};return _([Number(u)+48],1)}catch(s){i.error(s)}}parseSummaryBlock(t,n,r){const i=[];let o=n;const s=new DataView(t.buffer,t.byteOffset,t.length);for(;o<t.byteLength;){const a=s.getUint32(o,!0);o+=4;const u=s.getUint32(o,!0);o+=4;const l=s.getUint32(o,!0);o+=4;const c=s.getUint32(o,!0);o+=4;const f=s.getFloat32(o,!0);o+=4;const h=s.getFloat32(o,!0);o+=4;const d=s.getFloat32(o,!0);o+=4,o+=4,(!r||a===r.chrId&&dg(u,l,r.start,r.end))&&i.push({start:u,end:l,maxScore:h,minScore:f,summary:!0,score:d/(c||1)})}return i}parseBigBedBlock(t,n,r,i){const o=[];let s=n;for(;s<t.byteLength;){const a=this.bigBedParser.parse(t.subarray(s));a.uniqueId=`bb-${r+s}`,o.push(a),s+=a.offset}return i?o.filter(a=>dg(a.start,a.end,i.start,i.end)):o}parseBigWigBlock(t,n,r){const i=t.subarray(n),o=new DataView(i.buffer,i.byteOffset,i.length);let s=0;s+=4;const a=o.getInt32(s,!0);s+=8;const u=o.getUint32(s,!0);s+=4;const l=o.getUint32(s,!0);s+=4;const c=o.getUint8(s);s+=2;const f=o.getUint16(s,!0);s+=2;const h=new Array(f);switch(c){case 1:{for(let d=0;d<f;d++){const p=o.getInt32(s,!0);s+=4;const m=o.getInt32(s,!0);s+=4;const y=o.getFloat32(s,!0);s+=4,h[d]={start:p,end:m,score:y}}break}case 2:{for(let d=0;d<f;d++){const p=o.getInt32(s,!0);s+=4;const m=o.getFloat32(s,!0);s+=4,h[d]={score:m,start:p,end:p+l}}break}case 3:{for(let d=0;d<f;d++){const p=o.getFloat32(s,!0);s+=4;const m=a+d*u;h[d]={score:p,start:m,end:m+l}}break}}return r?h.filter(d=>dg(d.start,d.end,r.start,r.end)):h}async readFeatures(t,n,r={}){try{const{blockType:i,isCompressed:o}=this,{signal:s,request:a}=r,u=$O(n);Jf(s),await Promise.all(u.map(async l=>{Jf(s);const{length:c,offset:f}=l,h=await this.featureCache.get(`${c}_${f}`,l,s);for(const d of l.blocks){Jf(s);let p=Number(d.offset)-Number(l.offset),m=h;switch(o&&(m=HO(h.subarray(p)),p=0),Jf(s),i){case"summary":{t.next(this.parseSummaryBlock(m,p,a));break}case"bigwig":{t.next(this.parseBigWigBlock(m,p,a));break}case"bigbed":{t.next(this.parseBigBedBlock(m,p,Number(d.offset)*256,a));break}default:console.warn(`Don't know what to do with ${i}`)}}})),t.complete()}catch(i){t.error(i)}}}var pg=function(e,t){return pg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},pg(e,t)};function gg(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");pg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function YO(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(c){try{l(r.next(c))}catch(f){s(f)}}function u(c){try{l(r.throw(c))}catch(f){s(f)}}function l(c){c.done?o(c.value):i(c.value).then(a,u)}l((r=r.apply(e,t||[])).next())})}function $3(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,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(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=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(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function cu(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function mg(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function bg(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 Ps(e){return this instanceof Ps?(this.v=e,this):new Ps(e)}function QO(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),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(d){return function(p){return Promise.resolve(p).then(d,f)}}function a(d,p){r[d]&&(i[d]=function(m){return new Promise(function(y,w){o.push([d,m,y,w])>1||u(d,m)})},p&&(i[d]=p(i[d])))}function u(d,p){try{l(r[d](p))}catch(m){h(o[0][3],m)}}function l(d){d.value instanceof Ps?Promise.resolve(d.value.v).then(c,f):h(o[0][2],d)}function c(d){u("next",d)}function f(d){u("throw",d)}function h(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function XO(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 cu=="function"?cu(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(s){return new Promise(function(a,u){s=e[o](s),i(a,u,s.done,s.value)})}}function i(o,s,a,u){Promise.resolve(u).then(function(l){o({value:l,done:a})},s)}}typeof SuppressedError=="function"&&SuppressedError;function ct(e){return typeof e=="function"}function j3(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var yg=j3(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
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:
|
|
628
627
|
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
|
629
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function q3(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var wg=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=cu(s),u=a.next();!u.done;u=a.next()){var l=u.value;l.remove(this)}}catch(m){t={error:m}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var c=this.initialTeardown;if(ct(c))try{c()}catch(m){o=m instanceof yg?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=cu(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{Z3(p)}catch(m){o=o??[],m instanceof yg?o=bg(bg([],mg(o)),mg(m.errors)):o.push(m)}}}catch(m){r={error:m}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new yg(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Z3(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)&&q3(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&q3(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();wg.EMPTY;function W3(e){return e instanceof wg||e&&"closed"in e&&ct(e.remove)&&ct(e.add)&&ct(e.unsubscribe)}function Z3(e){ct(e)?e():e.unsubscribe()}var Y3={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Q3={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,bg([e,t],mg(n)))},clearTimeout:function(e){var t=Q3.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function X3(e){Q3.setTimeout(function(){throw e})}function K3(){}function KO(e){e()}var vg=function(e){gg(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,W3(n)&&n.add(r)):r.destination=nz,r}return t.create=function(n,r,i){return new eh(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(wg),JO=Function.prototype.bind;function xg(e,t){return JO.call(e,t)}var ez=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){th(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){th(r)}else th(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){th(n)}},e}(),eh=function(e){gg(t,e);function t(n,r,i){var o=e.call(this)||this,s;if(ct(n)||!n)s={next:n??void 0,error:r??void 0,complete:i??void 0};else{var a;o&&Y3.useDeprecatedNextContext?(a=Object.create(n),a.unsubscribe=function(){return o.unsubscribe()},s={next:n.next&&xg(n.next,a),error:n.error&&xg(n.error,a),complete:n.complete&&xg(n.complete,a)}):s=n}return o.destination=new ez(s),o}return t}(vg);function th(e){X3(e)}function tz(e){throw e}var nz={closed:!0,next:K3,error:tz,complete:K3},Ag=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function J3(e){return e}function rz(e){return e.length===0?J3:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var xn=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=oz(t)?t:new eh(t,n,r);return KO(function(){var s=i,a=s.operator,u=s.source;o.add(a?a.call(o,u):u?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=eE(n),new n(function(i,o){var s=new eh({next:function(a){try{t(a)}catch(u){o(u),s.unsubscribe()}},error:o,complete:i});r.subscribe(s)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Ag]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return rz(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=eE(t),new t(function(r,i){var o;n.subscribe(function(s){return o=s},function(s){return i(s)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function eE(e){var t;return(t=e??Y3.Promise)!==null&&t!==void 0?t:Promise}function iz(e){return e&&ct(e.next)&&ct(e.error)&&ct(e.complete)}function oz(e){return e&&e instanceof vg||iz(e)&&W3(e)}function sz(e){return ct(e==null?void 0:e.lift)}function Ns(e){return function(t){if(sz(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 fu(e,t,n,r,i){return new az(e,t,n,r,i)}var az=function(e){gg(t,e);function t(n,r,i,o,s,a){var u=e.call(this,n)||this;return u.onFinalize=s,u.shouldUnsubscribe=a,u._next=r?function(l){try{r(l)}catch(c){n.error(c)}}:e.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,u}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(vg),lz=new xn(function(e){return e.complete()});function uz(e){return e&&ct(e.schedule)}function tE(e){return e[e.length-1]}function cz(e){return uz(tE(e))?e.pop():void 0}function fz(e,t){return typeof tE(e)=="number"?e.pop():t}var nE=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function rE(e){return ct(e==null?void 0:e.then)}function iE(e){return ct(e[Ag])}function oE(e){return Symbol.asyncIterator&&ct(e==null?void 0:e[Symbol.asyncIterator])}function sE(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 hz(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var aE=hz();function lE(e){return ct(e==null?void 0:e[aE])}function uE(e){return QO(this,arguments,function(){var n,r,i,o;return $3(this,function(s){switch(s.label){case 0:n=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,Ps(n.read())];case 3:return r=s.sent(),i=r.value,o=r.done,o?[4,Ps(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Ps(i)];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 cE(e){return ct(e==null?void 0:e.getReader)}function Ls(e){if(e instanceof xn)return e;if(e!=null){if(iE(e))return dz(e);if(nE(e))return pz(e);if(rE(e))return gz(e);if(oE(e))return fE(e);if(lE(e))return mz(e);if(cE(e))return bz(e)}throw sE(e)}function dz(e){return new xn(function(t){var n=e[Ag]();if(ct(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function pz(e){return new xn(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function gz(e){return new xn(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,X3)})}function mz(e){return new xn(function(t){var n,r;try{for(var i=cu(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(t.next(s),t.closed)return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function fE(e){return new xn(function(t){yz(e,t).catch(function(n){return t.error(n)})})}function bz(e){return fE(uE(e))}function yz(e,t){var n,r,i,o;return YO(this,void 0,void 0,function(){var s,a;return $3(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=XO(e),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=u.sent(),i={error:a},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function ko(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 hE(e,t){return t===void 0&&(t=0),Ns(function(n,r){n.subscribe(fu(r,function(i){return ko(r,e,function(){return r.next(i)},t)},function(){return ko(r,e,function(){return r.complete()},t)},function(i){return ko(r,e,function(){return r.error(i)},t)}))})}function dE(e,t){return t===void 0&&(t=0),Ns(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function wz(e,t){return Ls(e).pipe(dE(t),hE(t))}function vz(e,t){return Ls(e).pipe(dE(t),hE(t))}function xz(e,t){return new xn(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Az(e,t){return new xn(function(n){var r;return ko(n,t,function(){r=e[aE](),ko(n,t,function(){var i,o,s;try{i=r.next(),o=i.value,s=i.done}catch(a){n.error(a);return}s?n.complete():n.next(o)},0,!0)}),function(){return ct(r==null?void 0:r.return)&&r.return()}})}function pE(e,t){if(!e)throw new Error("Iterable cannot be null");return new xn(function(n){ko(n,t,function(){var r=e[Symbol.asyncIterator]();ko(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Ez(e,t){return pE(uE(e),t)}function Sz(e,t){if(e!=null){if(iE(e))return wz(e,t);if(nE(e))return xz(e,t);if(rE(e))return vz(e,t);if(oE(e))return pE(e,t);if(lE(e))return Az(e,t);if(cE(e))return Ez(e,t)}throw sE(e)}function _z(e,t){return t?Sz(e,t):Ls(e)}var Cz=j3(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function gE(e,t){return new Promise(function(n,r){var i=new eh({next:function(o){n(o),i.unsubscribe()},error:r,complete:function(){r(new Cz)}});e.subscribe(i)})}function mE(e,t){return Ns(function(n,r){var i=0;n.subscribe(fu(r,function(o){r.next(e.call(t,o,i++))}))})}function Tz(e,t,n,r,i,o,s,a){var u=[],l=0,c=0,f=!1,h=function(){f&&!u.length&&!l&&t.complete()},d=function(m){return l<r?p(m):u.push(m)},p=function(m){l++;var y=!1;Ls(n(m,c++)).subscribe(fu(t,function(w){t.next(w)},function(){y=!0},void 0,function(){if(y)try{l--;for(var w=function(){var A=u.shift();s||p(A)};u.length&&l<r;)w();h()}catch(A){t.error(A)}}))};return e.subscribe(fu(t,d,function(){f=!0,h()})),function(){}}function bE(e,t,n){return n===void 0&&(n=1/0),ct(t)?bE(function(r,i){return mE(function(o,s){return t(r,o,i,s)})(Ls(e(r,i)))},n):(typeof t=="number"&&(n=t),Ns(function(r,i){return Tz(r,i,e,n)}))}function kz(e){return e===void 0&&(e=1/0),bE(J3,e)}function Iz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=cz(e),r=fz(e,1/0),i=e;return i.length?i.length===1?Ls(i[0]):kz(r)(_z(i,n)):lz}function Bz(e,t,n,r,i){return function(o,s){var a=n,u=t,l=0;o.subscribe(fu(s,function(c){var f=l++;u=a?e(u,c,f):(a=!0,c)},function(){a&&s.next(u),s.complete()}))}}function yE(e,t){return Ns(Bz(e,t,arguments.length>=2,!1,!0))}var Dz=function(e,t){return e.push(t),e};function Fz(){return Ns(function(e,t){yE(Dz,[])(e).subscribe(t)})}const wE=-2003829722,Eg=-2021002517;function Rz(e){return new TextDecoder().decode(e)}function vE(e){const t=e?"big":"little",n=new Me().endianess(t).int32("magic").uint16("version").uint16("numZoomLevels").uint64("chromTreeOffset").uint64("unzoomedDataOffset").uint64("unzoomedIndexOffset").uint16("fieldCount").uint16("definedFieldCount").uint64("asOffset").uint64("totalSummaryOffset").uint32("uncompressBufSize").uint64("extHeaderOffset").array("zoomLevels",{length:"numZoomLevels",type:new Me().endianess(t).uint32("reductionLevel").uint32("reserved").uint64("dataOffset").uint64("indexOffset")}),r=new Me().endianess(t).uint64("basesCovered").doublele("scoreMin").doublele("scoreMax").doublele("scoreSum").doublele("scoreSumSquares"),i=new Me().endianess(t).uint32("magic").uint32("blockSize").uint32("keySize").uint32("valSize").uint64("itemCount"),o=new Me().endianess(t).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");return{chromTreeParser:i,totalSummaryParser:r,headerParser:n,isLeafNode:o}}class xE{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=s=>s,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 gt(i);else throw new Error("no file given")}async _getHeader(t){const n=await this._getMainHeader(t),r=await this._readChromTree(n,t);return{...n,...r}}async _getMainHeader(t,n=2e3){const{buffer:r}=await this.bbi.read(ye.Buffer.alloc(n),0,n,0,t),i=this._isBigEndian(r),o=vE(i),s=o.headerParser.parse(r),{magic:a,asOffset:u,totalSummaryOffset:l}=s;if(s.fileType=a===Eg?"bigbed":"bigwig",u>n||l>n)return this._getMainHeader(t,n*2);if(u){const c=Number(s.asOffset);s.autoSql=Rz(r.subarray(c,r.indexOf(0,c)))}if(s.totalSummaryOffset>n-8*5)return this._getMainHeader(t,n*2);if(s.totalSummaryOffset){const c=r.subarray(Number(s.totalSummaryOffset)),f=o.totalSummaryParser.parse(c);s.totalSummary={...f,basesCovered:Number(f.basesCovered)}}return{...s,isBigEndian:i}}_isBigEndian(t){let n=t.readInt32LE(0);if(n===wE||n===Eg)return!1;if(n=t.readInt32BE(0),n===wE||n===Eg)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(t,n){const r=t.isBigEndian,i=r?"big":"little",o=[],s={};let a=Number(t.unzoomedDataOffset);const u=Number(t.chromTreeOffset);for(;a%4!==0;)a+=1;const l=a-u,{buffer:c}=await this.bbi.read(ye.Buffer.alloc(l),0,l,Number(u),n),f=vE(r),{keySize:h}=f.chromTreeParser.parse(c),d=new Me().endianess(i).string("key",{stripNull:!0,length:h}).uint32("refId").uint32("refSize").saveOffset("offset"),p=new Me().endianess(i).skip(h).uint64("childOffset").saveOffset("offset"),m=32,y=async w=>{let A=w;if(A>=c.length)throw new Error("reading beyond end of buffer");const _=f.isLeafNode.parse(c.subarray(A)),{isLeafNode:S,cnt:T}=_;if(A+=_.offset,S)for(let B=0;B<T;B+=1){const I=d.parse(c.subarray(A));A+=I.offset;const{key:D,refId:M,refSize:U}=I,N={name:D,id:M,length:U};s[this.renameRefSeqs(D)]=M,o[M]=N}else{const B=[];for(let I=0;I<T;I+=1){const D=p.parse(c.subarray(A)),{childOffset:M}=D;A+=D.offset,B.push(y(Number(M)-Number(u)))}await Promise.all(B)}};return await y(m),{refsByName:s,refsByNumber:o}}async getUnzoomedView(t){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:i,isBigEndian:o,fileType:s}=await this.getHeader(t);return new V3(this.bbi,r,n,o,i>0,s)}async getFeatureStream(t,n,r,i){await this.getHeader(i);const o=this.renameRefSeqs(t);let s;const{basesPerSpan:a,scale:u}=i||{};return a?s=await this.getView(1/a,i):u?s=await this.getView(u,i):s=await this.getView(1,i),new xn(l=>{s.readWigData(o,n,r,l,i).catch(c=>l.error(c))})}async getFeatures(t,n,r,i){const o=await this.getFeatureStream(t,n,r,i);return(await gE(o.pipe(Fz()))).flat()}}class Mz extends xE{async getView(t,n){const{zoomLevels:r,refsByName:i,fileSize:o,isBigEndian:s,uncompressBufSize:a}=await this.getHeader(n),u=1/t;let l=r.length;o||(l-=1);for(let c=l;c>=0;c-=1){const f=r[c];if(f&&f.reductionLevel<=2*u){const h=Number(f.indexOffset);return new V3(this.bbi,i,h,s,a>0,"summary")}}return this.getUnzoomedView(n)}}function Pz(e){return e.filter(t=>!!t)}class Nz extends xE{constructor(){super(...arguments),this.readIndicesCache=new xo({cache:new Uf({maxSize:1}),fill:(t,n)=>this._readIndices({...t,signal:n})})}readIndices(t={}){const{signal:n,...r}=t;return this.readIndicesCache.get(JSON.stringify(r),t,n)}async getView(t,n){return this.getUnzoomedView(n)}async _readIndices(t){const{extHeaderOffset:n,isBigEndian:r}=await this.getHeader(t),{buffer:i}=await this.bbi.read(ye.Buffer.alloc(64),0,64,Number(n)),o=r?"big":"little",s=new Me().endianess(o).uint16("size").uint16("count").uint64("offset").parse(i),{count:a,offset:u}=s;if(a===0)return[];const l=20,c=l*a,{buffer:f}=await this.bbi.read(ye.Buffer.alloc(c),0,c,Number(u)),h=new Me().endianess(o).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),d=[];for(let p=0;p<a;p+=1)d.push(h.parse(f.subarray(p*l)));return d}async searchExtraIndexBlocks(t,n={}){const{isBigEndian:r}=await this.getHeader(n),i=await this.readIndices(n);if(i.length===0)return[];const o=i.map(async s=>{const{offset:a,field:u}=s,{buffer:l}=await this.bbi.read(ye.Buffer.alloc(32),0,32,Number(a),n),c=r?"big":"little",f=new Me().endianess(c).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),{blockSize:h,keySize:d,valSize:p}=f.parse(l),m=new Me().endianess(c).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:new Me().array("leafkeys",{length:"cnt",type:new Me().endianess(c).string("key",{length:d,stripNull:!0}).uint64("offset")}),1:new Me().array("keys",{length:"cnt",type:new Me().endianess(c).string("key",{length:d,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),y=async A=>{const _=Number(A),S=4+h*(d+p),{buffer:T}=await this.bbi.read(ye.Buffer.alloc(S),0,S,_,n),B=m.parse(T);if(B.leafkeys){let I;for(const{key:D,offset:M}of B.leafkeys){if(t.localeCompare(D)<0&&I)return y(I);I=M}return y(I)}for(const I of B.keys)if(I.key===t)return{...I,field:u}};return y(Number(a)+32)});return Pz(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(a=>new xn(u=>{i.readFeatures(u,[a],n).catch(l=>u.error(l))}).pipe(yE((u,l)=>u.concat(l)),mE(u=>{for(const l of u)l.field=a.field;return u})));return(await gE(Iz(...o))).filter(a=>{var u;return((u=a.rest)===null||u===void 0?void 0:u.split(" ")[(a.field||0)-3])===t})}}const AE=Object.freeze(Object.defineProperty({__proto__:null,BigBed:Nz,BigWig:Mz},Symbol.toStringTag,{value:"Module"}));function Lz(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function Os(e,t,n,r){this.message=e,this.expected=t,this.found=n,this.location=r,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Os)}Lz(Os,Error),Os.buildMessage=function(e,t){var n={literal:function(l){return'"'+i(l.text)+'"'},class:function(l){var c="",f;for(f=0;f<l.parts.length;f++)c+=l.parts[f]instanceof Array?o(l.parts[f][0])+"-"+o(l.parts[f][1]):o(l.parts[f]);return"["+(l.inverted?"^":"")+c+"]"},any:function(l){return"any character"},end:function(l){return"end of input"},other:function(l){return l.description}};function r(l){return l.charCodeAt(0).toString(16).toUpperCase()}function i(l){return l.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+r(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+r(c)})}function o(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+r(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+r(c)})}function s(l){return n[l.type](l)}function a(l){var c=new Array(l.length),f,h;for(f=0;f<l.length;f++)c[f]=s(l[f]);if(c.sort(),c.length>0){for(f=1,h=1;f<c.length;f++)c[f-1]!==c[f]&&(c[h]=c[f],h++);c.length=h}switch(c.length){case 1:return c[0];case 2:return c[0]+" or "+c[1];default:return c.slice(0,-1).join(", ")+", or "+c[c.length-1]}}function u(l){return l?'"'+i(l)+'"':"end of input"}return"Expected "+a(e)+" but "+u(t)+" found."};function Oz(e,t){t=t!==void 0?t:{};var n={},r={declaration:qS},i=qS,o="(",s=Oe("(",!1),a=")",u=Oe(")",!1),l=function(E,G,X,K){return{type:E,name:G,comment:X,fields:K}},c="simple",f=Oe("simple",!1),h="object",d=Oe("object",!1),p="table",m=Oe("table",!1),y="auto",w=Oe("auto",!1),A="primary",_=Oe("primary",!1),S="index",T=Oe("index",!1),B="unique",I=Oe("unique",!1),D=function(E,G){return G},M=function(E,G){return E.name&&G.unshift(E),G},U="#",N=Oe("#",!1),te=";",re=Oe(";",!1),ce=function(E,G,X){return{type:E,name:G,comment:X}},ge="[",Se=Oe("[",!1),_e="]",Le=Oe("]",!1),ze=function(E,G,X,K){return{type:E,size:G,name:X,comment:K}},tt=function(E,G,X,K){return{type:E,vals:G,name:X,comment:K}},Ie=",",Be=Oe(",",!1),bt=function(E,G){return G.unshift(E),G},Wt="int",je=Oe("int",!1),L="uint",P=Oe("uint",!1),q="short",$=Oe("short",!1),Z="ushort",C=Oe("ushort",!1),x="byte",V=Oe("byte",!1),W="ubyte",fe=Oe("ubyte",!1),ne="float",he=Oe("float",!1),Zt="char",Ci=Oe("char",!1),Ti="string",ki=Oe("string",!1),It="lstring",Rr=Oe("lstring",!1),Ii="enum",Yt=Oe("enum",!1),cr="double",v=Oe("double",!1),g="bigint",b=Oe("bigint",!1),k="set",R=Oe("set",!1),O=function(E,G){return E+" "+G},j=/^[a-zA-Z_]/,de=Pu([["a","z"],["A","Z"],"_"],!1,!1),Ze=/^[a-zA-Z0-9_]/,Ue=Pu([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Ke=function(E){return HS()},De=/^[^\n\r]/,LS=Pu([`
|
|
630
|
-
`,"\r"],!0,!1),
|
|
631
|
-
`,"\r"],!1,!1),
|
|
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),B=function(M){return M.join("").replace(/^"/,"").replace(/"$/,"")},H=hn("integer"),W=/^[0-9]/,Se=pt([["0","9"]],!1,!1),ge=function(){return parseInt(dt(),10)},be=hn("whitespace"),Ge=/^[ \t\n\r]/,_n=pt([" "," ",`
|
|
630
|
+
`,"\r"],!1,!1),U=0,Me=0,ft=[{line:1,column:1}],rt=0,kt=[],De=0,wr;if("startRule"in i){if(!(i.startRule in a))throw new Error(`Can't start parsing from rule "`+i.startRule+'".');s=a[i.startRule]}function dt(){return r.substring(Me,U)}function ze(M,te){return{type:"literal",text:M,ignoreCase:te}}function pt(M,te,de){return{type:"class",parts:M,inverted:te,ignoreCase:de}}function Ln(){return{type:"end"}}function hn(M){return{type:"other",description:M}}function Bc(M){var te=ft[M],de;if(te)return te;for(de=M-1;!ft[de];)de--;for(te=ft[de],te={line:te.line,column:te.column};de<M;)r.charCodeAt(de)===10?(te.line++,te.column=1):te.column++,de++;return ft[M]=te,te}function IA(M,te){var de=Bc(M),me=Bc(te);return{start:{offset:M,line:de.line,column:de.column},end:{offset:te,line:me.line,column:me.column}}}function Ne(M){U<rt||(U>rt&&(rt=U,kt=[]),kt.push(M))}function kP(M,te,de){return new t(t.buildMessage(M,te),M,te,de)}function DA(){var M,te,de,me,Re,at,ht,Cn,ai,xr,si,vr,ci,Ar;return M=U,te=je(),te!==o?(de=kA(),de!==o?(me=je(),me!==o?(Re=BA(),Re!==o?(at=je(),at!==o?(ht=ju(),ht!==o?(Cn=je(),Cn!==o?(r.charCodeAt(U)===40?(ai=c,U++):(ai=o,De===0&&Ne(l)),ai!==o?(xr=je(),xr!==o?(si=BP(),si!==o?(vr=je(),vr!==o?(r.charCodeAt(U)===41?(ci=u,U++):(ci=o,De===0&&Ne(f)),ci!==o?(Ar=je(),Ar!==o?(Me=M,te=h(de,Re,ht,si),M=te):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o),M}function kA(){var M;return r.substr(U,6)===d?(M=d,U+=6):(M=o,De===0&&Ne(p)),M===o&&(r.substr(U,6)===b?(M=b,U+=6):(M=o,De===0&&Ne(v)),M===o&&(r.substr(U,5)===y?(M=y,U+=5):(M=o,De===0&&Ne(A)))),M}function BA(){var M,te,de,me;return M=Nn(),M===o&&(M=U,te=Nn(),te!==o?(de=RA(),de!==o?(te=[te,de],M=te):(U=M,M=o)):(U=M,M=o),M===o&&(M=U,te=Nn(),te!==o?(r.substr(U,4)===_?(de=_,U+=4):(de=o,De===0&&Ne(E)),de!==o?(te=[te,de],M=te):(U=M,M=o)):(U=M,M=o),M===o&&(M=U,te=Nn(),te!==o?(de=RA(),de!==o?(r.substr(U,4)===_?(me=_,U+=4):(me=o,De===0&&Ne(E)),me!==o?(te=[te,de,me],M=te):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)))),M}function RA(){var M;return r.substr(U,7)===C?(M=C,U+=7):(M=o,De===0&&Ne(R)),M===o&&(r.substr(U,5)===D?(M=D,U+=5):(M=o,De===0&&Ne(O)),M===o&&(r.substr(U,6)===F?(M=F,U+=6):(M=o,De===0&&Ne(P)))),M}function ju(){var M;return M=FA(),M===o&&(M=je()),M}function BP(){var M,te,de,me,Re,at,ht;if(M=U,te=gp(),te!==o)if(de=je(),de!==o){for(me=[],Re=U,at=je(),at!==o?(ht=gp(),ht!==o?(Me=Re,at=S(te,ht),Re=at):(U=Re,Re=o)):(U=Re,Re=o);Re!==o;)me.push(Re),Re=U,at=je(),at!==o?(ht=gp(),ht!==o?(Me=Re,at=S(te,ht),Re=at):(U=Re,Re=o)):(U=Re,Re=o);me!==o?(Re=je(),Re!==o?(Me=M,te=Z(te,me),M=te):(U=M,M=o)):(U=M,M=o)}else U=M,M=o;else U=M,M=o;return M}function RP(){var M;return r.charCodeAt(U)===35?(M=Q,U++):(M=o,De===0&&Ne(se)),M}function FP(){var M,te,de,me,Re;return M=U,te=je(),te!==o?(de=RP(),de!==o?(me=FA(),me!==o?(Re=je(),Re!==o?(te=[te,de,me,Re],M=te):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o),M}function gp(){var M,te,de,me,Re,at,ht,Cn,ai,xr,si,vr,ci,Ar;return M=U,te=mp(),te!==o?(de=je(),de!==o?(me=Nn(),me!==o?(Re=je(),Re!==o?(r.charCodeAt(U)===59?(at=ce,U++):(at=o,De===0&&Ne(fe)),at!==o?(ht=je(),ht!==o?(Cn=ju(),Cn!==o?(Me=M,te=le(te,me,Cn),M=te):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o),M===o&&(M=U,te=mp(),te!==o?(de=je(),de!==o?(r.charCodeAt(U)===91?(me=Ee,U++):(me=o,De===0&&Ne(pe)),me!==o?(Re=je(),Re!==o?(at=PP(),at!==o?(ht=je(),ht!==o?(r.charCodeAt(U)===93?(Cn=_e,U++):(Cn=o,De===0&&Ne(Ce)),Cn!==o?(ai=je(),ai!==o?(xr=Nn(),xr!==o?(si=je(),si!==o?(r.charCodeAt(U)===59?(vr=ce,U++):(vr=o,De===0&&Ne(fe)),vr!==o?(ci=je(),ci!==o?(Ar=ju(),Ar!==o?(Me=M,te=we(te,at,xr,Ar),M=te):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o),M===o&&(M=U,te=mp(),te!==o?(de=je(),de!==o?(r.charCodeAt(U)===40?(me=c,U++):(me=o,De===0&&Ne(l)),me!==o?(Re=je(),Re!==o?(at=MP(),at!==o?(ht=je(),ht!==o?(r.charCodeAt(U)===41?(Cn=u,U++):(Cn=o,De===0&&Ne(f)),Cn!==o?(ai=je(),ai!==o?(xr=Nn(),xr!==o?(si=je(),si!==o?(r.charCodeAt(U)===59?(vr=ce,U++):(vr=o,De===0&&Ne(fe)),vr!==o?(ci=je(),ci!==o?(Ar=ju(),Ar!==o?(Me=M,te=Te(te,at,xr,Ar),M=te):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o)):(U=M,M=o),M===o&&(M=FP()))),M}function MP(){var M,te,de,me,Re,at,ht;if(M=U,te=Nn(),te!==o){for(de=[],me=U,r.charCodeAt(U)===44?(Re=Ve,U++):(Re=o,De===0&&Ne(Le)),Re!==o?(at=je(),at!==o?(ht=Nn(),ht!==o?(Me=me,Re=S(te,ht),me=Re):(U=me,me=o)):(U=me,me=o)):(U=me,me=o);me!==o;)de.push(me),me=U,r.charCodeAt(U)===44?(Re=Ve,U++):(Re=o,De===0&&Ne(Le)),Re!==o?(at=je(),at!==o?(ht=Nn(),ht!==o?(Me=me,Re=S(te,ht),me=Re):(U=me,me=o)):(U=me,me=o)):(U=me,me=o);de!==o?(Me=M,te=j(te,de),M=te):(U=M,M=o)}else U=M,M=o;return M}function mp(){var M,te,de,me;return r.substr(U,3)===q?(M=q,U+=3):(M=o,De===0&&Ne(re)),M===o&&(r.substr(U,4)===$?(M=$,U+=4):(M=o,De===0&&Ne(ue)),M===o&&(r.substr(U,5)===L?(M=L,U+=5):(M=o,De===0&&Ne(I)),M===o&&(r.substr(U,6)===ee?(M=ee,U+=6):(M=o,De===0&&Ne(oe)),M===o&&(r.substr(U,4)===Ie?(M=Ie,U+=4):(M=o,De===0&&Ne(ye)),M===o&&(r.substr(U,5)===xe?(M=xe,U+=5):(M=o,De===0&&Ne(Be)),M===o&&(r.substr(U,5)===gt?(M=gt,U+=5):(M=o,De===0&&Ne(nn)),M===o&&(r.substr(U,4)===Dt?(M=Dt,U+=4):(M=o,De===0&&Ne(tt)),M===o&&(r.substr(U,6)===Pt?(M=Pt,U+=6):(M=o,De===0&&Ne(Ht)),M===o&&(r.substr(U,7)===nt?(M=nt,U+=7):(M=o,De===0&&Ne(Vt)),M===o&&(r.substr(U,4)===k?(M=k,U+=4):(M=o,De===0&&Ne(m)),M===o&&(r.substr(U,6)===w?(M=w,U+=6):(M=o,De===0&&Ne(N)),M===o&&(r.substr(U,6)===x?(M=x,U+=6):(M=o,De===0&&Ne(z)),M===o&&(r.substr(U,3)===V?(M=V,U+=3):(M=o,De===0&&Ne(ae)),M===o&&(M=U,te=kA(),te!==o?(de=je(),de!==o?(me=BA(),me!==o?(Me=M,te=G(te,me),M=te):(U=M,M=o)):(U=M,M=o)):(U=M,M=o))))))))))))))),M}function PP(){var M;return M=LP(),M===o&&(M=Nn()),M}function Nn(){var M,te,de,me,Re;if(M=U,te=U,Y.test(r.charAt(U))?(de=r.charAt(U),U++):(de=o,De===0&&Ne(T)),de!==o){for(me=[],ne.test(r.charAt(U))?(Re=r.charAt(U),U++):(Re=o,De===0&&Ne(ke));Re!==o;)me.push(Re),ne.test(r.charAt(U))?(Re=r.charAt(U),U++):(Re=o,De===0&&Ne(ke));me!==o?(de=[de,me],te=de):(U=te,te=o)}else U=te,te=o;return te!==o&&(Me=M,te=g()),M=te,M}function FA(){var M,te,de;for(M=U,te=[],K.test(r.charAt(U))?(de=r.charAt(U),U++):(de=o,De===0&&Ne(J));de!==o;)te.push(de),K.test(r.charAt(U))?(de=r.charAt(U),U++):(de=o,De===0&&Ne(J));return te!==o&&(Me=M,te=B(te)),M=te,M}function LP(){var M,te,de,me;if(De++,M=U,te=je(),te!==o){if(de=[],W.test(r.charAt(U))?(me=r.charAt(U),U++):(me=o,De===0&&Ne(Se)),me!==o)for(;me!==o;)de.push(me),W.test(r.charAt(U))?(me=r.charAt(U),U++):(me=o,De===0&&Ne(Se));else de=o;de!==o?(Me=M,te=ge(),M=te):(U=M,M=o)}else U=M,M=o;return De--,M===o&&(te=o,De===0&&Ne(H)),M}function je(){var M,te;for(De++,M=[],Ge.test(r.charAt(U))?(te=r.charAt(U),U++):(te=o,De===0&&Ne(_n));te!==o;)M.push(te),Ge.test(r.charAt(U))?(te=r.charAt(U),U++):(te=o,De===0&&Ne(_n));return De--,M===o&&(te=o,De===0&&Ne(be)),M}if(wr=s(),wr!==o&&U===r.length)return wr;throw wr!==o&&U<r.length&&Ne(Ln()),kP(kt,rt<r.length?r.charAt(rt):null,rt<r.length?IA(rt,rt+1):IA(rt,rt))}return z0={SyntaxError:t,parse:n},z0}var Av=T7();const I7=fu(Av),U0=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
|
|
632
631
|
"bigChain pairwise alignment"
|
|
633
632
|
(
|
|
634
633
|
string chrom; "Reference sequence chromosome or scaffold"
|
|
@@ -787,16 +786,19 @@ chrM 16299`};function hR(e){if(!(e in kw))throw new Error(`Unknown assembly: ${e
|
|
|
787
786
|
float score; "Floating point score."
|
|
788
787
|
char[1] leftStatus; "Gap/break annotation for preceding block"
|
|
789
788
|
char[1] rightStatus; "Gap/break annotation for following block"
|
|
790
|
-
)`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,EE.parse(t.trim())]));function _g(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 Uz={".":0,"-":-1,"+":1};function Gz(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 Hz{constructor(t={}){if(t.autoSql)this.autoSql=_g(zz.parse(t.autoSql));else if(t.type){if(!Sg[t.type])throw new Error("Type not found");this.autoSql=_g(Sg[t.type])}else this.autoSql=_g(Sg.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(t,n={}){const{autoSql:r}=this,{uniqueId:i}=n,o=Array.isArray(t)?t:t.split(" ");let s={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&Gz(o))for(let a=0;a<r.fields.length;a++){const u=r.fields[a];let l=o[a];const{isNumeric:c,isArray:f,arrayIsNumeric:h,name:d}=u;if(l==null)break;if(l!=="."){if(c){const p=Number(l);l=Number.isNaN(p)?l:p}else f&&(l=l.split(","),l[l.length-1]===""&&l.pop(),h&&(l=l.map(Number)));s[d]=l}}else{const a=["chrom","chromStart","chromEnd","name"];s=Object.fromEntries(o.map((u,l)=>[a[l]||"field"+l,u])),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 i&&(s.uniqueId=i),s.strand=Uz[s.strand]||0,s.chrom=decodeURIComponent(s.chrom),s}}const Vz=Object.freeze(Object.defineProperty({__proto__:null,default:Hz},Symbol.toStringTag,{value:"Module"}));let SE=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 zs(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new SE(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 _E=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 $z(e){return new Promise(t=>setTimeout(t,e))}function jz(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}function qz(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 Wz(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function Zz(e={}){return"aborted"in e?{signal:e}:e}function CE(e,t){const n=[];let r;if(e.length===0)return e;e.sort((i,o)=>{const s=i.minv.blockPosition-o.minv.blockPosition;return s===0?i.minv.dataPosition-o.minv.dataPosition:s});for(const i of e)(!t||i.maxv.compareTo(t)>0)&&(r===void 0?(n.push(i),r=i):Wz(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function TE(e,t){return{lineCount:jz(Pf.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function nh(e,t){return e?e.compareTo(t)>0?t:e:t}function Yz(e,t=n=>n){let n=0,r=0;const i=[],o={};for(let s=0;s<e.length;s+=1)if(!e[s]){if(r<s){let a=e.toString("utf8",r,s);a=t(a),i[n]=a,o[a]=n}r=s+1,n+=1}return{refNameToId:o,refIdToName:i}}let kE=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const Qz=21578050;function Xz(e,t){return e-e%t}function Kz(e,t){return e-e%t+t}function Jz(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 Us extends kE{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)!==Qz)throw new Error("Not a BAI file");const r=n.readInt32LE(4),o=((1<<(5+1)*3)-1)/7;let s=8,a;const u=new Array(r);for(let l=0;l<r;l++){const c=n.readInt32LE(s);let f;s+=4;const h={};for(let m=0;m<c;m+=1){const y=n.readUInt32LE(s);if(s+=4,y===o+1)s+=4,f=TE(n,s+16),s+=32;else{if(y>o+1)throw new Error("bai index contains too many bins, please use CSI");{const w=n.readInt32LE(s);s+=4;const A=new Array(w);for(let _=0;_<w;_++){const S=zs(n,s);s+=8;const T=zs(n,s);s+=8,a=nh(a,S),A[_]=new _E(S,T,y)}h[y]=A}}}const d=n.readInt32LE(s);s+=4;const p=new Array(d);for(let m=0;m<d;m++){const y=zs(n,s);s+=8,a=nh(a,y),p[m]=y}u[l]={binIndex:h,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:a,maxBlockSize:65536,indices:u,refCount:r}}async indexCov(t,n,r,i={}){const s=n!==void 0,u=(await this.parse(i)).indices[t];if(!u)return[];const{linearIndex:l=[],stats:c}=u;if(l.length===0)return[];const f=r===void 0?(l.length-1)*16384:Kz(r,16384),h=n===void 0?0:Xz(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 m=l[h/16384].blockPosition;for(let y=h/16384,w=0;y<f/16384;y++,w++)d[w]={score:l[y+1].blockPosition-m,start:y*16384,end:y*16384+16384},m=l[y+1].blockPosition;return d.map(y=>({...y,score:y.score*((c==null?void 0:c.lineCount)||0)/p}))}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const s=o.indices[t];if(!s)return[];const a=Jz(n,r),u=[];for(const[d,p]of a)for(let m=d;m<=p;m++)if(s.binIndex[m]){const y=s.binIndex[m];for(const w of y)u.push(w)}const l=s.linearIndex.length;let c;const f=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=f;d<=h;++d){const p=s.linearIndex[d];p&&(!c||p.compareTo(c)<0)&&(c=p)}return CE(u,c)}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}let Cg=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(Cg=new Int32Array(Cg));const eU=(e,t)=>{let n=t===0?0:~~t^-1;for(let r=0;r<e.length;r++)n=Cg[(n^e[r])&255]^n>>>8;return n^-1},IE=(e,t)=>ye.Buffer.from(e,t);function tU(e,t){const n=(r,i)=>t(IE(r),i)>>>0;return n.signed=(r,i)=>t(IE(r),i),n.unsigned=n,n.model=e,n}const nU=tU("crc-32",eU),rU=21582659,iU=38359875;function oU(e,t){return e*2**t}function BE(e,t){return Math.floor(e/2**t)}let rh=class extends kE{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 s={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},a=t.readInt32LE(n+16),u=a?String.fromCharCode(a):"",l=t.readInt32LE(n+20),c=t.readInt32LE(n+24);return{columnNumbers:s,coordinateType:i,metaValue:a,metaChar:u,skipLines:l,format:o,formatFlags:r,...Yz(t.subarray(n+28,n+28+c),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await gi(n);let i;if(r.readUInt32LE(0)===rU)i=1;else if(r.readUInt32LE(0)===iU)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),s=o>=30?this.parseAuxData(r,16):void 0,a=r.readInt32LE(16+o);let u=16+o+4,l;const c=new Array(a);for(let f=0;f<a;f++){const h=r.readInt32LE(u);u+=4;const d={};let p;for(let m=0;m<h;m++){const y=r.readUInt32LE(u);if(u+=4,y>this.maxBinNumber)p=TE(r,u+28),u+=44;else{l=nh(l,zs(r,u)),u+=8;const w=r.readInt32LE(u);u+=4;const A=new Array(w);for(let _=0;_<w;_+=1){const S=zs(r,u);u+=8;const T=zs(r,u);u+=8,l=nh(l,S),A[_]=new _E(S,T,y)}d[y]=A}}c[f]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:l,indices:c,refCount:a,csi:!0,maxBlockSize:65536,...s}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i),s=o==null?void 0:o.indices[t];if(!s)return[];const a=this.reg2bins(n,r);if(a.length===0)return[];const u=[];for(const[l,c]of a)for(let f=l;f<=c;f++)if(s.binIndex[f]){const h=s.binIndex[f];for(const d of h)u.push(d)}return CE(u,new SE(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 s=[];for(;r<=this.depth;o-=3,i+=oU(1,r*3),r+=1){const a=i+BE(t,o),u=i+BE(n,o);if(u-a+s.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`);s.push([a,u])}return s}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 An={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},DE="=ACMGRSVTWYHKDBN".split(""),hu="MIDNSHP=X???????".split("");class FE{constructor(t){this.data={},this._tagList=[],this._allTagsParsed=!1;const{bytes:n,fileOffset:r}=t,{byteArray:i,start:o}=n;this.data={start:i.readInt32LE(o+8)},this.bytes=n,this._id=r,this._refID=i.readInt32LE(o+4),this.flags=(i.readInt32LE(o+16)&4294901760)>>16}get(t){return this[t]?this.data[t]?this.data[t]:(this.data[t]=this[t](),this.data[t]):this._get(t.toLowerCase())}end(){return this.get("start")+this.get("length_on_ref")}seq_id(){return this._refID}_get(t){return t in this.data?this.data[t]:(this.data[t]=this._parseTag(t),this.data[t])}_tags(){this._parseAllTags();let t=["seq"];this.isSegmentUnmapped()||t.push("start","end","strand","score","qual","MQ","CIGAR","length_on_ref","template_length"),this.isPaired()&&t.push("next_segment_position","pair_orientation"),t=t.concat(this._tagList||[]);for(const r of Object.keys(this.data))!r.startsWith("_")&&r!=="next_seq_id"&&t.push(r);const n={};return t.filter(r=>{if(r in this.data&&this.data[r]===void 0||r==="CG"||r==="cg")return!1;const i=r.toLowerCase(),o=n[i];return n[i]=!0,!o})}parent(){}children(){return this.get("subfeatures")}id(){return this._id}mq(){const t=(this.get("_bin_mq_nl")&65280)>>8;return t===255?void 0:t}score(){return this.get("mq")}qual(){var t;return(t=this.qualRaw())===null||t===void 0?void 0:t.join(" ")}qualRaw(){if(this.isSegmentUnmapped())return;const{start:t,byteArray:n}=this.bytes,r=t+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes"),i=this.get("seq_length");return n.subarray(r,r+i)}strand(){return this.isReverseComplemented()?-1:1}multi_segment_next_segment_strand(){if(!this.isMateUnmapped())return this.isMateReverseComplemented()?-1:1}name(){return this.get("_read_name")}_read_name(){const t=this.get("_l_read_name"),{byteArray:n,start:r}=this.bytes;return n.toString("ascii",r+36,r+36+t-1)}_parseTag(t){if(this._allTagsParsed)return;const{byteArray:n,start:r}=this.bytes;let i=this._tagOffset||r+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes")+this.get("seq_length");const o=this.bytes.end;let s;for(;i<o&&s!==t;){const a=String.fromCharCode(n[i],n[i+1]);s=a.toLowerCase();const u=String.fromCharCode(n[i+2]);i+=3;let l;switch(u){case"A":{l=String.fromCharCode(n[i]),i+=1;break}case"i":{l=n.readInt32LE(i),i+=4;break}case"I":{l=n.readUInt32LE(i),i+=4;break}case"c":{l=n.readInt8(i),i+=1;break}case"C":{l=n.readUInt8(i),i+=1;break}case"s":{l=n.readInt16LE(i),i+=2;break}case"S":{l=n.readUInt16LE(i),i+=2;break}case"f":{l=n.readFloatLE(i),i+=4;break}case"Z":case"H":{for(l="";i<=o;){const c=n[i++];if(c===0)break;l+=String.fromCharCode(c)}break}case"B":{l="";const c=n[i++],f=String.fromCharCode(c),h=n.readInt32LE(i);if(i+=4,f==="i")if(a==="CG")for(let d=0;d<h;d++){const p=n.readInt32LE(i),m=p>>4,y=hu[p&15];l+=m+y,i+=4}else for(let d=0;d<h;d++)l+=n.readInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="I")if(a==="CG")for(let d=0;d<h;d++){const p=n.readUInt32LE(i),m=p>>4,y=hu[p&15];l+=m+y,i+=4}else for(let d=0;d<h;d++)l+=n.readUInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="s")for(let d=0;d<h;d++)l+=n.readInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="S")for(let d=0;d<h;d++)l+=n.readUInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="c")for(let d=0;d<h;d++)l+=n.readInt8(i),d+1<h&&(l+=","),i+=1;if(f==="C")for(let d=0;d<h;d++)l+=n.readUInt8(i),d+1<h&&(l+=","),i+=1;if(f==="f")for(let d=0;d<h;d++)l+=n.readFloatLE(i),d+1<h&&(l+=","),i+=4;break}default:console.warn(`Unknown BAM tag type '${u}', tags may be incomplete`),l=void 0,i=o}if(this._tagOffset=i,this._tagList.push(a),s===t)return l;this.data[s]=l}this._allTagsParsed=!0}_parseAllTags(){this._parseTag("")}_parseCigar(t){return t.match(/\d+\D/g).map(n=>[/\D/.exec(n)[0].toUpperCase(),Number.parseInt(n,10)])}isPaired(){return!!(this.flags&An.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&An.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&An.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&An.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&An.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&An.BAM_FMREVERSE)}isRead1(){return!!(this.flags&An.BAM_FREAD1)}isRead2(){return!!(this.flags&An.BAM_FREAD2)}isSecondary(){return!!(this.flags&An.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&An.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&An.BAM_FDUP)}isSupplementary(){return!!(this.flags&An.BAM_FSUPPLEMENTARY)}cigar(){if(this.isSegmentUnmapped())return;const{byteArray:t,start:n}=this.bytes,r=this.get("_n_cigar_op");let i=n+36+this.get("_l_read_name");const o=this.get("seq_length");let s="",a=0,u=t.readInt32LE(i),l=u>>4,c=hu[u&15];if(c==="S"&&l===o)return i+=4,u=t.readInt32LE(i),l=u>>4,c=hu[u&15],c!=="N"&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(let f=0;f<r;++f)u=t.readInt32LE(i),l=u>>4,c=hu[u&15],s+=l+c,c!=="H"&&c!=="S"&&c!=="I"&&(a+=l),i+=4;return this.data.length_on_ref=a,s}length_on_ref(){return this.data.length_on_ref?this.data.length_on_ref:(this.get("cigar"),this.data.length_on_ref)}_n_cigar_op(){return this.get("_flag_nc")&65535}_l_read_name(){return this.get("_bin_mq_nl")&255}_seq_bytes(){return this.get("seq_length")+1>>1}getReadBases(){return this.seq()}seq(){const{byteArray:t,start:n}=this.bytes,r=n+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4,i=this.get("_seq_bytes"),o=this.get("seq_length");let s="",a=0;for(let u=0;u<i;++u){const l=t[r+u];s+=DE[(l&240)>>4],a++,a<o&&(s+=DE[l&15],a++)}return s}getPairOrientation(){if(!this.isSegmentUnmapped()&&!this.isMateUnmapped()&&this._refID===this._next_refid()){const t=this.isReverseComplemented()?"R":"F",n=this.isMateReverseComplemented()?"R":"F";let r=" ",i=" ";this.isRead1()?(r="1",i="2"):this.isRead2()&&(r="2",i="1");const o=[];return this.template_length()>0?(o[0]=t,o[1]=r,o[2]=n,o[3]=i):(o[2]=t,o[3]=r,o[0]=n,o[1]=i),o.join("")}return""}_bin_mq_nl(){return this.bytes.byteArray.readInt32LE(this.bytes.start+12)}_flag_nc(){return this.bytes.byteArray.readInt32LE(this.bytes.start+16)}seq_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+20)}_next_refid(){return this.bytes.byteArray.readInt32LE(this.bytes.start+24)}_next_pos(){return this.bytes.byteArray.readInt32LE(this.bytes.start+28)}template_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+32)}toJSON(){const t={};for(const n of Object.keys(this))n.startsWith("_")||n==="bytes"||(t[n]=this[n]);return t}}function RE(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(s=>{const a=s.indexOf(":"),u=s.slice(0,a),l=s.slice(a+1);return{tag:u,value:l}})})}return n}const ME=21840194,PE=65536;async function sU(e){let t=[];for await(const n of e)t=t.concat(n);return t}class aU{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 NE{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:o,baiUrl:s,csiPath:a,csiFilehandle:u,csiUrl:l,htsget:c,yieldThreadTime:f=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new xo({cache:new Uf({maxSize:50}),fill:async(d,p)=>{const{chunk:m,opts:y}=d,{data:w,cpositions:A,dpositions:_}=await this._readChunk({chunk:m,opts:{...y,signal:p}});return this.readBamFeatures(w,A,_,m)}}),this.renameRefSeq=h,t)this.bam=t;else if(n)this.bam=new gt(n);else if(r)this.bam=new Fn(r);else if(c)this.htsget=!0,this.bam=new aU;else throw new Error("unable to initialize bam");if(u)this.index=new rh({filehandle:u});else if(a)this.index=new rh({filehandle:new gt(a)});else if(l)this.index=new rh({filehandle:new Fn(l)});else if(o)this.index=new Us({filehandle:o});else if(i)this.index=new Us({filehandle:new gt(i)});else if(s)this.index=new Us({filehandle:new Fn(s)});else if(n)this.index=new Us({filehandle:new gt(`${n}.bai`)});else if(r)this.index=new Us({filehandle:new Fn(`${r}.bai`)});else if(c)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=f}async getHeaderPre(t){const n=Zz(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 c=i+PE,f=await this.bam.read(ye.Buffer.alloc(c),0,c,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 s=await gi(o);if(s.readInt32LE(0)!==ME)throw new Error("Not a BAM file");const a=s.readInt32LE(4);this.header=s.toString("utf8",8,8+a);const{chrToIndex:u,indexToChr:l}=await this._readRefSeqs(a+8,65535,n);return this.chrToIndex=u,this.indexToChr=l,RE(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+PE,{bytesRead:o,buffer:s}=await this.bam.read(ye.Buffer.alloc(i),0,n,0,r);if(!o)throw new Error("Error reading refseqs from header");const a=await gi(s.subarray(0,Math.min(o,n))),u=a.readInt32LE(t);let l=t+4;const c={},f=[];for(let h=0;h<u;h+=1){const d=a.readInt32LE(l),p=this.renameRefSeq(a.toString("utf8",l+4,l+4+d-1)),m=a.readInt32LE(l+d+4);if(c[p]=h,f.push({refName:p,length:m}),l=l+8+d,l>a.length)return console.warn(`BAM header is very big. Re-fetching ${n} bytes.`),this._readRefSeqs(t,n*2,r)}return{chrToIndex:c,indexToChr:f}}async getRecordsForRange(t,n,r,i){return sU(this.streamRecordsForRange(t,n,r,i))}async*streamRecordsForRange(t,n,r,i){var o;await this.getHeader(i);const s=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(s===void 0||!this.index)yield[];else{const a=await this.index.blocksForRange(s,n-1,r,i);yield*this._fetchChunkFeatures(a,s,n,r,i)}}async*_fetchChunkFeatures(t,n,r,i,o={}){const{viewAsPairs:s}=o,a=[];let u=!1;for(const l of t){const c=await this.featureCache.get(l.toString(),{chunk:l,opts:o},o.signal),f=[];for(const h of c)if(h.seq_id()===n)if(h.get("start")>=i){u=!0;break}else h.get("end")>=r&&f.push(h);if(a.push(f),yield f,u)break}qz(o.signal),s&&(yield this.fetchPairs(n,a,o))}async fetchPairs(t,n,r){const{pairAcrossChr:i,maxInsertSize:o=2e5}=r,s={},a={};n.map(h=>{const d={};for(const p of h){const m=p.name(),y=p.id();d[m]||(d[m]=0),d[m]++,a[y]=1}for(const[p,m]of Object.entries(d))m===1&&(s[p]=!0)});const u=[];n.map(h=>{for(const d of h){const p=d.name(),m=d.get("start"),y=d._next_pos(),w=d._next_refid();this.index&&s[p]&&(i||w===t&&Math.abs(m-y)<o)&&u.push(this.index.blocksForRange(w,y,y+1,r))}});const l=new Map,c=await Promise.all(u);for(const h of c.flat())l.has(h.toString())||l.set(h.toString(),h);return(await Promise.all([...l.values()].map(async h=>{const{data:d,cpositions:p,dpositions:m,chunk:y}=await this._readChunk({chunk:h,opts:r}),w=[];for(const A of await this.readBamFeatures(d,p,m,y))s[A.get("name")]&&!a[A.id()]&&w.push(A);return w}))).flat()}async _readRegion(t,n,r={}){const{bytesRead:i,buffer:o}=await this.bam.read(ye.Buffer.alloc(n),0,n,t,r);return o.subarray(0,Math.min(i,n))}async _readChunk({chunk:t,opts:n}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n),{buffer:i,cpositions:o,dpositions:s}=await lA(r,t);return{data:i,cpositions:o,dpositions:s,chunk:t}}async readBamFeatures(t,n,r,i){let o=0;const s=[];let a=0,u=+Date.now();for(;o+4<t.length;){const l=t.readInt32LE(o),c=o+4+l-1;if(r){for(;o+i.minv.dataPosition>=r[a++];);a--}if(c<t.length){const f=new FE({bytes:{byteArray:t,start:o,end:c},fileOffset:n.length>0?n[a]*256+(o-r[a])+i.minv.dataPosition+1:nU.signed(t.slice(o,c))});s.push(f),this.yieldThreadTime&&+Date.now()-u>this.yieldThreadTime&&(await $z(1),u=+Date.now())}o=c+1}return s}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 s=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];return s===void 0?[]:this.index.blocksForRange(s,n,r,i)}}async function LE(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:o}=r;if(i.startsWith("data:"))return ye.Buffer.from(i.split(",")[1],"base64");{const{referer:s,...a}=o,u=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...a}});if(!u.ok)throw new Error(`HTTP ${u.status} fetching ${i}: ${await u.text()}`);return ye.Buffer.from(await u.arrayBuffer())}}));return ye.Buffer.concat(await Promise.all(n.map(r=>gi(r))))}class lU extends NE{constructor(t){super({htsget:!0}),this.baseUrl=t.baseUrl,this.trackId=t.trackId}async*streamRecordsForRange(t,n,r,i){var o;const a=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${t}&start=${n}&end=${r}&format=BAM`,u=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(u===void 0)yield[];else{const l=await fetch(a,{...i});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${a}: ${await l.text()}`);const c=await l.json(),f=await LE(c.htsget.urls.slice(1),i);yield*this._fetchChunkFeatures([{buffer:f,_fetchedSize:void 0,bin:0,compareTo(){return 0},toUniqueString(){return`${t}_${n}_${r}`},fetchedSize(){return 0},minv:{dataPosition:0,blockPosition:0,compareTo:()=>0},maxv:{dataPosition:Number.MAX_SAFE_INTEGER,blockPosition:0,compareTo:()=>0},toString(){return`${t}_${n}_${r}`}}],u,n,r,i)}}async _readChunk({chunk:t}){if(!t.buffer)throw new Error("expected chunk.buffer in htsget");return{data:t.buffer,cpositions:[],dpositions:[],chunk:t}}async getHeader(t={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,r=await fetch(n,t);if(!r.ok)throw new Error(`HTTP ${r.status} fetching ${n}: ${await r.text()}`);const i=await r.json(),o=await LE(i.htsget.urls,t);if(o.readInt32LE(0)!==ME)throw new Error("Not a BAM file");const s=o.readInt32LE(4),a=o.toString("utf8",8,8+s),u=RE(a),l=[],c={},f=u.filter(h=>h.tag==="SQ");for(const[h,d]of f.entries()){let p="",m=0;for(const y of d.data)y.tag==="SN"?p=y.value:y.tag==="LN"&&(m=+y.value);c[p]=h,l[h]={refName:p,length:m}}return this.chrToIndex=c,this.indexToChr=l,u}}const uU=Object.freeze(Object.defineProperty({__proto__:null,BAI:Us,BamFile:NE,BamRecord:FE,CSI:rh,HtsgetFile:lU},Symbol.toStringTag,{value:"Module"}));function OE(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class cU extends Error{}function Gs(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new cU("aborted");throw t.code="ERR_ABORTED",t}}}function fU(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function zE(e,t){const n=[];let r=null;return e.length===0?e:(e.sort(function(i,o){const s=i.minv.blockPosition-o.minv.blockPosition;return s!==0?s:i.minv.dataPosition-o.minv.dataPosition}),e.forEach(i=>{(!t||i.maxv.compareTo(t)>0)&&(r===null?(n.push(i),r=i):fU(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class Tg{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 Hs(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Tg(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 ih{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 UE{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 hU=21578324,GE=14;function dU(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 Vs extends UE{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:s}=r.indices[i];return s?s.lineCount:-1}async _parse(t={}){const n=await this.filehandle.readFile(t),r=await gi(n);if(Gs(t.signal),r.readUInt32LE(0)!==hU)throw new Error("Not a TBI file");const i=r.readInt32LE(4),o=r.readInt32LE(8),s=o&65536?"zero-based-half-open":"1-based-closed",u={0:"generic",1:"SAM",2:"VCF"}[o&15];if(!u)throw new Error(`invalid Tabix preset format flags ${o}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},c=r.readInt32LE(24),f=5,h=((1<<(f+1)*3)-1)/7,d=2**(14+f*3),p=c?String.fromCharCode(c):null,m=r.readInt32LE(28),y=r.readInt32LE(32),{refNameToId:w,refIdToName:A}=this._parseNameBytes(r.slice(36,36+y));let _=36+y,S;return{indices:new Array(i).fill(0).map(()=>{const B=r.readInt32LE(_);_+=4;const I={};let D;for(let N=0;N<B;N+=1){const te=r.readUInt32LE(_);if(_+=4,te>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(te===h+1){const re=r.readInt32LE(_);_+=4,re===2&&(D=this.parsePseudoBin(r,_)),_+=16*re}else{const re=r.readInt32LE(_);_+=4;const ce=new Array(re);for(let ge=0;ge<re;ge+=1){const Se=Hs(r,_),_e=Hs(r,_+8);_+=16,S=this._findFirstData(S,Se),ce[ge]=new ih(Se,_e,te)}I[te]=ce}}const M=r.readInt32LE(_);_+=4;const U=new Array(M);for(let N=0;N<M;N+=1)U[N]=Hs(r,_),_+=8,S=this._findFirstData(S,U[N]);return{binIndex:I,linearIndex:U,stats:D}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:m,firstDataLine:S,columnNumbers:l,coordinateType:s,format:u,refIdToName:A,refNameToId:w,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:OE(Pf.fromBytesLE(t.slice(n+16,n+24),!0))}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let s=0;s<t.length;s+=1)if(!t[s]){if(r<s){let a=t.toString("utf8",r,s);a=this.renameRefSeq(a),i[n]=a,o[a]=n}r=s+1,n+=1}return{refNameToId:o,refIdToName:i}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i),s=o.refNameToId[t];if(s===void 0)return[];const a=o.indices[s];if(!a)return[];(a.linearIndex.length?a.linearIndex[n>>GE>=a.linearIndex.length?a.linearIndex.length-1:n>>GE]:new Tg(0,0))||console.warn("querying outside of possible tabix range");const l=dU(n,r),c=[];for(const[m,y]of l)for(let w=m;w<=y;w++)if(a.binIndex[w])for(const A of a.binIndex[w])c.push(new ih(A.minv,A.maxv,w));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 m=d;m<=p;++m){const y=a.linearIndex[m];y&&(!h||y.compareTo(h)<0)&&(h=y)}return zE(c,h)}}const pU=21582659,gU=38359875;function mU(e,t){return e*2**t}function HE(e,t){return Math.floor(e/2**t)}class oh extends UE{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:s}=r.indices[i];return s?s.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 s={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},a=t.readInt32LE(n+16),u=a?String.fromCharCode(a):null,l=t.readInt32LE(n+20),c=t.readInt32LE(n+24),{refIdToName:f,refNameToId:h}=this._parseNameBytes(t.slice(n+28,n+28+c));return{refIdToName:f,refNameToId:h,skipLines:l,metaChar:u,columnNumbers:s,format:o,coordinateType:i}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let s=0;s<t.length;s+=1)if(!t[s]){if(r<s){let a=t.toString("utf8",r,s);a=this.renameRefSeq(a),i[n]=a,o[a]=n}r=s+1,n+=1}return{refNameToId:o,refIdToName:i}}async _parse(t={}){const n=await gi(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===pU)r=1;else if(n.readUInt32LE(0)===gU)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),s=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"},a=n.readInt32LE(16+o);let u,l=16+o+4;const c=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 m=n.readUInt32LE(l);if(m>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=48;else{const y=Hs(n,l+4);u=this._findFirstData(u,y);const w=n.readInt32LE(l+12);l+=16;const A=new Array(w);for(let _=0;_<w;_+=1){const S=Hs(n,l),T=Hs(n,l+8);l+=16,A[_]=new ih(S,T,m)}h[m]=A}}return{binIndex:h,stats:d}});return{...s,csi:!0,refCount:a,maxBlockSize:65536,firstDataLine:u,csiVersion:r,indices:c,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:OE(Pf.fromBytesLE(t.slice(n+28,n+36),!0))}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i),s=o.refNameToId[t];if(s===void 0)return[];const a=o.indices[s];if(!a)return[];const u=this.reg2bins(n,r),l=[];for(const[c,f]of u)for(let h=c;h<=f;h++)if(a.binIndex[h])for(const d of a.binIndex[h])l.push(new ih(d.minv,d.maxv,h));return zE(l,new Tg(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 s=[];for(;r<=this.depth;o-=3,i+=mU(1,r*3),r+=1){const a=i+HE(t,o),u=i+HE(n,o);if(u-a+s.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`);s.push([a,u])}return s}}const kg=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function bU(e){return new Promise(t=>setTimeout(t,e))}class yU{constructor({path:t,filehandle:n,url:r,tbiPath:i,tbiUrl:o,tbiFilehandle:s,csiPath:a,csiUrl:u,csiFilehandle:l,yieldTime:c=500,renameRefSeqs:f=d=>d,chunkCacheSize:h=5*2**20}){if(n)this.filehandle=n;else if(t)this.filehandle=new gt(t);else if(r)this.filehandle=new Fn(r);else throw new TypeError("must provide either filehandle or path");if(s)this.index=new Vs({filehandle:s,renameRefSeqs:f});else if(l)this.index=new oh({filehandle:l,renameRefSeqs:f});else if(i)this.index=new Vs({filehandle:new gt(i),renameRefSeqs:f});else if(a)this.index=new oh({filehandle:new gt(a),renameRefSeqs:f});else if(t)this.index=new Vs({filehandle:new gt(`${t}.tbi`),renameRefSeqs:f});else if(u)this.index=new oh({filehandle:new Fn(u)});else if(o)this.index=new Vs({filehandle:new Fn(o)});else if(r)this.index=new Vs({filehandle:new Fn(`${r}.tbi`)});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.renameRefSeq=f,this.yieldTime=c,this.chunkCache=new xo({cache:new Uf({maxSize:Math.floor(h/65536)}),fill:(d,p)=>this.readChunk(d,{signal:p})})}async getLines(t,n,r,i){var o;let s,a={},u;typeof i=="function"?u=i:(a=i,u=i.lineCallback,s=i.signal);const l=await this.index.getMetadata(a);Gs(s);const c=n??0,f=r??l.maxRefLength;if(!(c<=f))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(c===f)return;const h=await this.index.blocksForRange(t,c,f,a);Gs(s);let d=Date.now();for(const p of h){let m;const{buffer:y,cpositions:w,dpositions:A}=await this.chunkCache.get(p.toString(),p,s);Gs(s);let _=0,S=0;for(;_<y.length;){const T=y.indexOf(`
|
|
791
|
-
`,_);if(T===-1)break;const B=y.slice(_,T),I=(o=kg==null?void 0:kg.decode(B))!==null&&o!==void 0?o:B.toString();if(A){for(;_+p.minv.dataPosition>=A[S++];);S--}const{startCoordinate:D,overlaps:M}=this.checkLine(l,t,c,f,I);if(m!==void 0&&D!==void 0&&m>D)throw new Error(`Lines not sorted by start coordinate (${m} > ${D}), this file is not usable with Tabix.`);if(m=D,M)u(I.trim(),w[S]*256+(_-A[S])+p.minv.dataPosition+1);else if(D!==void 0&&D>=f)return;this.yieldTime&&d-Date.now()>this.yieldTime&&(d=Date.now(),Gs(s),await bU(1)),_=T+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:n,metaChar:r,maxBlockSize:i}=await this.getMetadata(t);Gs(t.signal);const o=((n==null?void 0:n.blockPosition)||0)+i,s=await this._readRegion(0,o,t),a=await gi(s);if(r){let u=-1;const l=10,c=r.charCodeAt(0);for(let f=0;f<a.length&&!(f===u+1&&a[f]!==c);f+=1)a[f]===l&&(u=f);return a.slice(0,u+1)}return a}async getHeader(t={}){return(await this.getHeaderBuffer(t)).toString("utf8")}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,n,r,i,o){const{columnNumbers:s,metaChar:a,coordinateType:u,format:l}=t;if(a&&o.startsWith(a))return{overlaps:!1};let{ref:c,start:f,end:h}=s;c||(c=0),f||(f=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(c,f,h);let p=1,m=0,y="",w=-1/0;for(let A=0;A<o.length+1;A+=1)if(o[A]===" "||A===o.length){if(p===c){if(this.renameRefSeq(o.slice(m,A))!==n)return{overlaps:!1}}else if(p===f){if(w=parseInt(o.slice(m,A),10),u==="1-based-closed"&&(w-=1),w>=i)return{startCoordinate:w,overlaps:!1};if((h===0||h===f)&&w+1<=r)return{startCoordinate:w,overlaps:!1}}else if(l==="VCF"&&p===4)y=o.slice(m,A);else if(p===h&&(l==="VCF"?this._getVcfEnd(w,y,o.slice(m,A)):parseInt(o.slice(m,A),10))<=r)return{overlaps:!1};if(m=A+1,p+=1,p>d)break}return{startCoordinate:w,overlaps:!0}}_getVcfEnd(t,n,r){let i=t+n.length;const o=r.includes("SVTYPE=TRA");if(r[0]!=="."&&!o){let s=";";for(let a=0;a<r.length;a+=1){if(s===";"&&r.slice(a,a+4)==="END="){let u=r.indexOf(";",a);u===-1&&(u=r.length),i=parseInt(r.slice(a+4,u),10);break}s=r[a]}}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=ye.Buffer.alloc(n),{bytesRead:o,buffer:s}=await this.filehandle.read(i,0,n,t,r);return s.slice(0,o)}async readChunk(t,n={}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n);return lA(r,t)}}const wU=Object.freeze(Object.defineProperty({__proto__:null,CSI:oh,TBI:Vs,TabixIndexedFile:yU},Symbol.toStringTag,{value:"Module"}));var Ig={exports:{}},$s=typeof Reflect=="object"?Reflect:null,VE=$s&&typeof $s.apply=="function"?$s.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},sh;$s&&typeof $s.ownKeys=="function"?sh=$s.ownKeys:Object.getOwnPropertySymbols?sh=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:sh=function(t){return Object.getOwnPropertyNames(t)};function vU(e){console&&console.warn&&console.warn(e)}var $E=Number.isNaN||function(t){return t!==t};function Ne(){Ne.init.call(this)}Ig.exports=Ne,Ig.exports.once=SU,Ne.EventEmitter=Ne,Ne.prototype._events=void 0,Ne.prototype._eventsCount=0,Ne.prototype._maxListeners=void 0;var jE=10;function ah(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Ne,"defaultMaxListeners",{enumerable:!0,get:function(){return jE},set:function(e){if(typeof e!="number"||e<0||$E(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");jE=e}}),Ne.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ne.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||$E(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function qE(e){return e._maxListeners===void 0?Ne.defaultMaxListeners:e._maxListeners}Ne.prototype.getMaxListeners=function(){return qE(this)},Ne.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=t==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var s;if(n.length>0&&(s=n[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(u===void 0)return!1;if(typeof u=="function")VE(u,this,n);else for(var l=u.length,c=XE(u,l),r=0;r<l;++r)VE(c[r],this,n);return!0};function WE(e,t,n,r){var i,o,s;if(ah(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s=="function"?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=qE(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,vU(a)}return e}Ne.prototype.addListener=function(t,n){return WE(this,t,n,!1)},Ne.prototype.on=Ne.prototype.addListener,Ne.prototype.prependListener=function(t,n){return WE(this,t,n,!0)};function xU(){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 ZE(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=xU.bind(r);return i.listener=n,r.wrapFn=i,i}Ne.prototype.once=function(t,n){return ah(n),this.on(t,ZE(this,t,n)),this},Ne.prototype.prependOnceListener=function(t,n){return ah(n),this.prependListener(t,ZE(this,t,n)),this},Ne.prototype.removeListener=function(t,n){var r,i,o,s,a;if(ah(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(o=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){a=r[s].listener,o=s;break}if(o<0)return this;o===0?r.shift():AU(r,o),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,a||n)}return this},Ne.prototype.off=Ne.prototype.removeListener,Ne.prototype.removeAllListeners=function(t){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var o=Object.keys(r),s;for(i=0;i<o.length;++i)s=o[i],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(t,n[i]);return this};function YE(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?EU(i):XE(i,i.length)}Ne.prototype.listeners=function(t){return YE(this,t,!0)},Ne.prototype.rawListeners=function(t){return YE(this,t,!1)},Ne.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):QE.call(e,t)},Ne.prototype.listenerCount=QE;function QE(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}Ne.prototype.eventNames=function(){return this._eventsCount>0?sh(this._events):[]};function XE(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function AU(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function EU(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function SU(e,t){return new Promise(function(n,r){function i(s){e.removeListener(t,o),r(s)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",i),n([].slice.call(arguments))}KE(e,t,o,{once:!0}),t!=="error"&&_U(e,i,{once:!0})})}function _U(e,t,n){typeof e.on=="function"&&KE(e,"error",t,n)}function KE(e,t,n,r){if(typeof e.on=="function")r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(o){r.once&&e.removeEventListener(t,i),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var Bg=Ig.exports,Dg={exports:{}};typeof Object.create=="function"?Dg.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Dg.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}};var js=Dg.exports,Fg,JE;function eS(){return JE||(JE=1,Fg=Bg.EventEmitter),Fg}const tS=e7(u7);var Rg,nS;function CU(){if(nS)return Rg;nS=1;function e(p,m){var y=Object.keys(p);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(p);m&&(w=w.filter(function(A){return Object.getOwnPropertyDescriptor(p,A).enumerable})),y.push.apply(y,w)}return y}function t(p){for(var m=1;m<arguments.length;m++){var y=arguments[m]!=null?arguments[m]:{};m%2?e(Object(y),!0).forEach(function(w){n(p,w,y[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(w){Object.defineProperty(p,w,Object.getOwnPropertyDescriptor(y,w))})}return p}function n(p,m,y){return m=s(m),m in p?Object.defineProperty(p,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):p[m]=y,p}function r(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function i(p,m){for(var y=0;y<m.length;y++){var w=m[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(p,s(w.key),w)}}function o(p,m,y){return m&&i(p.prototype,m),Object.defineProperty(p,"prototype",{writable:!1}),p}function s(p){var m=a(p,"string");return typeof m=="symbol"?m:String(m)}function a(p,m){if(typeof p!="object"||p===null)return p;var y=p[Symbol.toPrimitive];if(y!==void 0){var w=y.call(p,m||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)}var u=ye,l=u.Buffer,c=tS,f=c.inspect,h=f&&f.custom||"inspect";function d(p,m,y){l.prototype.copy.call(p,m,y)}return Rg=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return o(p,[{key:"push",value:function(y){var w={data:y,next:null};this.length>0?this.tail.next=w:this.head=w,this.tail=w,++this.length}},{key:"unshift",value:function(y){var w={data:y,next:this.head};this.length===0&&(this.tail=w),this.head=w,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var w=this.head,A=""+w.data;w=w.next;)A+=y+w.data;return A}},{key:"concat",value:function(y){if(this.length===0)return l.alloc(0);for(var w=l.allocUnsafe(y>>>0),A=this.head,_=0;A;)d(A.data,w,_),_+=A.data.length,A=A.next;return w}},{key:"consume",value:function(y,w){var A;return y<this.head.data.length?(A=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?A=this.shift():A=w?this._getString(y):this._getBuffer(y),A}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var w=this.head,A=1,_=w.data;for(y-=_.length;w=w.next;){var S=w.data,T=y>S.length?S.length:y;if(T===S.length?_+=S:_+=S.slice(0,y),y-=T,y===0){T===S.length?(++A,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=S.slice(T));break}++A}return this.length-=A,_}},{key:"_getBuffer",value:function(y){var w=l.allocUnsafe(y),A=this.head,_=1;for(A.data.copy(w),y-=A.data.length;A=A.next;){var S=A.data,T=y>S.length?S.length:y;if(S.copy(w,w.length-y,0,T),y-=T,y===0){T===S.length?(++_,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=S.slice(T));break}++_}return this.length-=_,w}},{key:h,value:function(y,w){return f(this,t(t({},w),{},{depth:0,customInspect:!1}))}}]),p}(),Rg}var Mg,rS;function iS(){if(rS)return Mg;rS=1;function e(s,a){var u=this,l=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return l||c?(a?a(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,s)):process.nextTick(i,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(f){!a&&f?u._writableState?u._writableState.errorEmitted?process.nextTick(n,u):(u._writableState.errorEmitted=!0,process.nextTick(t,u,f)):process.nextTick(t,u,f):a?(process.nextTick(n,u),a(f)):process.nextTick(n,u)}),this)}function t(s,a){i(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 i(s,a){s.emit("error",a)}function o(s,a){var u=s._readableState,l=s._writableState;u&&u.autoDestroy||l&&l.autoDestroy?s.destroy(a):s.emit("error",a)}return Mg={destroy:e,undestroy:r,errorOrDestroy:o},Mg}var Pg={},oS;function qs(){if(oS)return Pg;oS=1;function e(a,u){a.prototype=Object.create(u.prototype),a.prototype.constructor=a,a.__proto__=u}var t={};function n(a,u,l){l||(l=Error);function c(h,d,p){return typeof u=="string"?u:u(h,d,p)}var f=function(h){e(d,h);function d(p,m,y){return h.call(this,c(p,m,y))||this}return d}(l);f.prototype.name=l.name,f.prototype.code=a,t[a]=f}function r(a,u){if(Array.isArray(a)){var l=a.length;return a=a.map(function(c){return String(c)}),l>2?"one of ".concat(u," ").concat(a.slice(0,l-1).join(", "),", or ")+a[l-1]:l===2?"one of ".concat(u," ").concat(a[0]," or ").concat(a[1]):"of ".concat(u," ").concat(a[0])}else return"of ".concat(u," ").concat(String(a))}function i(a,u,l){return a.substr(0,u.length)===u}function o(a,u,l){return(l===void 0||l>a.length)&&(l=a.length),a.substring(l-u.length,l)===u}function s(a,u,l){return typeof l!="number"&&(l=0),l+u.length>a.length?!1:a.indexOf(u,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(a,u){return'The value "'+u+'" is invalid for option "'+a+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(a,u,l){var c;typeof u=="string"&&i(u,"not ")?(c="must not be",u=u.replace(/^not /,"")):c="must be";var f;if(o(a," argument"))f="The ".concat(a," ").concat(c," ").concat(r(u,"type"));else{var h=s(a,".")?"property":"argument";f='The "'.concat(a,'" ').concat(h," ").concat(c," ").concat(r(u,"type"))}return f+=". Received type ".concat(typeof l),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(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"),Pg.codes=t,Pg}var Ng,sS;function aS(){if(sS)return Ng;sS=1;var e=qs().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,s){var a=t(i,s,o);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var u=s?o:"highWaterMark";throw new e(u,a)}return Math.floor(a)}return r.objectMode?16:16*1024}return Ng={getHighWaterMark:n},Ng}var Lg,lS;function TU(){if(lS)return Lg;lS=1,Lg=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 Lg}var Og,uS;function cS(){if(uS)return Og;uS=1,Og=D;function e(L){var P=this;this.next=null,this.entry=null,this.finish=function(){je(P,L)}}var t;D.WritableState=B;var n={deprecate:TU()},r=eS(),i=ye.Buffer,o=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(L){return i.from(L)}function a(L){return i.isBuffer(L)||L instanceof o}var u=iS(),l=aS(),c=l.getHighWaterMark,f=qs().codes,h=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,w=f.ERR_STREAM_NULL_VALUES,A=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,S=u.errorOrDestroy;js(D,r);function T(){}function B(L,P,q){t=t||Ws(),L=L||{},typeof q!="boolean"&&(q=P instanceof t),this.objectMode=!!L.objectMode,q&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=c(this,L,"writableHighWaterMark",q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var $=L.decodeStrings===!1;this.decodeStrings=!$,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Z){Se(P,Z)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}B.prototype.getBuffer=function(){for(var P=this.bufferedRequest,q=[];P;)q.push(P),P=P.next;return q},function(){try{Object.defineProperty(B.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(P){return I.call(this,P)?!0:this!==D?!1:P&&P._writableState instanceof B}})):I=function(P){return P instanceof this};function D(L){t=t||Ws();var P=this instanceof t;if(!P&&!I.call(D,this))return new D(L);this._writableState=new B(L,this,P),this.writable=!0,L&&(typeof L.write=="function"&&(this._write=L.write),typeof L.writev=="function"&&(this._writev=L.writev),typeof L.destroy=="function"&&(this._destroy=L.destroy),typeof L.final=="function"&&(this._final=L.final)),r.call(this)}D.prototype.pipe=function(){S(this,new m)};function M(L,P){var q=new A;S(L,q),process.nextTick(P,q)}function U(L,P,q,$){var Z;return q===null?Z=new w:typeof q!="string"&&!P.objectMode&&(Z=new h("chunk",["string","Buffer"],q)),Z?(S(L,Z),process.nextTick($,Z),!1):!0}D.prototype.write=function(L,P,q){var $=this._writableState,Z=!1,C=!$.objectMode&&a(L);return C&&!i.isBuffer(L)&&(L=s(L)),typeof P=="function"&&(q=P,P=null),C?P="buffer":P||(P=$.defaultEncoding),typeof q!="function"&&(q=T),$.ending?M(this,q):(C||U(this,$,L,q))&&($.pendingcb++,Z=te(this,$,C,L,P,q)),Z},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var L=this._writableState;L.corked&&(L.corked--,!L.writing&&!L.corked&&!L.bufferProcessing&&L.bufferedRequest&&ze(this,L))},D.prototype.setDefaultEncoding=function(P){if(typeof P=="string"&&(P=P.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((P+"").toLowerCase())>-1))throw new _(P);return this._writableState.defaultEncoding=P,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function N(L,P,q){return!L.objectMode&&L.decodeStrings!==!1&&typeof P=="string"&&(P=i.from(P,q)),P}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function te(L,P,q,$,Z,C){if(!q){var x=N(P,$,Z);$!==x&&(q=!0,Z="buffer",$=x)}var V=P.objectMode?1:$.length;P.length+=V;var W=P.length<P.highWaterMark;if(W||(P.needDrain=!0),P.writing||P.corked){var fe=P.lastBufferedRequest;P.lastBufferedRequest={chunk:$,encoding:Z,isBuf:q,callback:C,next:null},fe?fe.next=P.lastBufferedRequest:P.bufferedRequest=P.lastBufferedRequest,P.bufferedRequestCount+=1}else re(L,P,!1,V,$,Z,C);return W}function re(L,P,q,$,Z,C,x){P.writelen=$,P.writecb=x,P.writing=!0,P.sync=!0,P.destroyed?P.onwrite(new y("write")):q?L._writev(Z,P.onwrite):L._write(Z,C,P.onwrite),P.sync=!1}function ce(L,P,q,$,Z){--P.pendingcb,q?(process.nextTick(Z,$),process.nextTick(bt,L,P),L._writableState.errorEmitted=!0,S(L,$)):(Z($),L._writableState.errorEmitted=!0,S(L,$),bt(L,P))}function ge(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}function Se(L,P){var q=L._writableState,$=q.sync,Z=q.writecb;if(typeof Z!="function")throw new p;if(ge(q),P)ce(L,q,$,P,Z);else{var C=tt(q)||L.destroyed;!C&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&ze(L,q),$?process.nextTick(_e,L,q,C,Z):_e(L,q,C,Z)}}function _e(L,P,q,$){q||Le(L,P),P.pendingcb--,$(),bt(L,P)}function Le(L,P){P.length===0&&P.needDrain&&(P.needDrain=!1,L.emit("drain"))}function ze(L,P){P.bufferProcessing=!0;var q=P.bufferedRequest;if(L._writev&&q&&q.next){var $=P.bufferedRequestCount,Z=new Array($),C=P.corkedRequestsFree;C.entry=q;for(var x=0,V=!0;q;)Z[x]=q,q.isBuf||(V=!1),q=q.next,x+=1;Z.allBuffers=V,re(L,P,!0,P.length,Z,"",C.finish),P.pendingcb++,P.lastBufferedRequest=null,C.next?(P.corkedRequestsFree=C.next,C.next=null):P.corkedRequestsFree=new e(P),P.bufferedRequestCount=0}else{for(;q;){var W=q.chunk,fe=q.encoding,ne=q.callback,he=P.objectMode?1:W.length;if(re(L,P,!1,he,W,fe,ne),q=q.next,P.bufferedRequestCount--,P.writing)break}q===null&&(P.lastBufferedRequest=null)}P.bufferedRequest=q,P.bufferProcessing=!1}D.prototype._write=function(L,P,q){q(new d("_write()"))},D.prototype._writev=null,D.prototype.end=function(L,P,q){var $=this._writableState;return typeof L=="function"?(q=L,L=null,P=null):typeof P=="function"&&(q=P,P=null),L!=null&&this.write(L,P),$.corked&&($.corked=1,this.uncork()),$.ending||Wt(this,$,q),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function tt(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function Ie(L,P){L._final(function(q){P.pendingcb--,q&&S(L,q),P.prefinished=!0,L.emit("prefinish"),bt(L,P)})}function Be(L,P){!P.prefinished&&!P.finalCalled&&(typeof L._final=="function"&&!P.destroyed?(P.pendingcb++,P.finalCalled=!0,process.nextTick(Ie,L,P)):(P.prefinished=!0,L.emit("prefinish")))}function bt(L,P){var q=tt(P);if(q&&(Be(L,P),P.pendingcb===0&&(P.finished=!0,L.emit("finish"),P.autoDestroy))){var $=L._readableState;(!$||$.autoDestroy&&$.endEmitted)&&L.destroy()}return q}function Wt(L,P,q){P.ending=!0,bt(L,P),q&&(P.finished?process.nextTick(q):L.once("finish",q)),P.ended=!0,L.writable=!1}function je(L,P,q){var $=L.entry;for(L.entry=null;$;){var Z=$.callback;P.pendingcb--,Z(q),$=$.next}P.corkedRequestsFree.next=L}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(P){this._writableState&&(this._writableState.destroyed=P)}}),D.prototype.destroy=u.destroy,D.prototype._undestroy=u.undestroy,D.prototype._destroy=function(L,P){P(L)},Og}var zg,fS;function Ws(){if(fS)return zg;fS=1;var e=Object.keys||function(l){var c=[];for(var f in l)c.push(f);return c};zg=s;var t=bS(),n=cS();js(s,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var o=r[i];s.prototype[o]||(s.prototype[o]=n.prototype[o])}function s(l){if(!(this instanceof s))return new s(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",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(u,this)}function u(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(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),zg}var Ug={},Gg={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var n=ye,r=n.Buffer;function i(s,a){for(var u in s)a[u]=s[u]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o);function o(s,a,u){return r(s,a,u)}o.prototype=Object.create(r.prototype),i(r,o),o.from=function(s,a,u){if(typeof s=="number")throw new TypeError("Argument must not be a number");return r(s,a,u)},o.alloc=function(s,a,u){if(typeof s!="number")throw new TypeError("Argument must be a number");var l=r(s);return a!==void 0?typeof u=="string"?l.fill(a,u):l.fill(a):l.fill(0),l},o.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return r(s)},o.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(s)}})(Gg,Gg.exports);var kU=Gg.exports,Hg=kU.Buffer,hS=Hg.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function IU(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function BU(e){var t=IU(e);if(typeof t!="string"&&(Hg.isEncoding===hS||!hS(e)))throw new Error("Unknown encoding: "+e);return t||e}var DU=Ug.StringDecoder=du;function du(e){this.encoding=BU(e);var t;switch(this.encoding){case"utf16le":this.text=LU,this.end=OU,t=4;break;case"utf8":this.fillLast=MU,t=4;break;case"base64":this.text=zU,this.end=UU,t=3;break;default:this.write=GU,this.end=HU;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Hg.allocUnsafe(t)}du.prototype.write=function(e){if(e.length===0)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},du.prototype.end=NU,du.prototype.text=PU,du.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Vg(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function FU(e,t,n){var r=t.length-1;if(r<n)return 0;var i=Vg(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=Vg(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=Vg(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function RU(e,t,n){if((t[0]&192)!==128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"�"}}function MU(e){var t=this.lastTotal-this.lastNeed,n=RU(this,e);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function PU(e,t){var n=FU(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function NU(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function LU(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function OU(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function zU(e,t){var n=(e.length-t)%3;return n===0?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function UU(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function GU(e){return e.toString(this.encoding)}function HU(e){return e&&e.length?this.write(e):""}var $g,dS;function jg(){if(dS)return $g;dS=1;var e=qs().codes.ERR_STREAM_PREMATURE_CLOSE;function t(o){var s=!1;return function(){if(!s){s=!0;for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];o.apply(this,u)}}}function n(){}function r(o){return o.setHeader&&typeof o.abort=="function"}function i(o,s,a){if(typeof s=="function")return i(o,null,s);s||(s={}),a=t(a||n);var u=s.readable||s.readable!==!1&&o.readable,l=s.writable||s.writable!==!1&&o.writable,c=function(){o.writable||h()},f=o._writableState&&o._writableState.finished,h=function(){l=!1,f=!0,u||a.call(o)},d=o._readableState&&o._readableState.endEmitted,p=function(){u=!1,d=!0,l||a.call(o)},m=function(_){a.call(o,_)},y=function(){var _;if(u&&!d)return(!o._readableState||!o._readableState.ended)&&(_=new e),a.call(o,_);if(l&&!f)return(!o._writableState||!o._writableState.ended)&&(_=new e),a.call(o,_)},w=function(){o.req.on("finish",h)};return r(o)?(o.on("complete",h),o.on("abort",y),o.req?w():o.on("request",w)):l&&!o._writableState&&(o.on("end",c),o.on("close",c)),o.on("end",p),o.on("finish",h),s.error!==!1&&o.on("error",m),o.on("close",y),function(){o.removeListener("complete",h),o.removeListener("abort",y),o.removeListener("request",w),o.req&&o.req.removeListener("finish",h),o.removeListener("end",c),o.removeListener("close",c),o.removeListener("finish",h),o.removeListener("end",p),o.removeListener("error",m),o.removeListener("close",y)}}return $g=i,$g}var qg,pS;function VU(){if(pS)return qg;pS=1;var e;function t(_,S,T){return S=n(S),S in _?Object.defineProperty(_,S,{value:T,enumerable:!0,configurable:!0,writable:!0}):_[S]=T,_}function n(_){var S=r(_,"string");return typeof S=="symbol"?S:String(S)}function r(_,S){if(typeof _!="object"||_===null)return _;var T=_[Symbol.toPrimitive];if(T!==void 0){var B=T.call(_,S||"default");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(_)}var i=jg(),o=Symbol("lastResolve"),s=Symbol("lastReject"),a=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),f=Symbol("stream");function h(_,S){return{value:_,done:S}}function d(_){var S=_[o];if(S!==null){var T=_[f].read();T!==null&&(_[l]=null,_[o]=null,_[s]=null,S(h(T,!1)))}}function p(_){process.nextTick(d,_)}function m(_,S){return function(T,B){_.then(function(){if(S[u]){T(h(void 0,!0));return}S[c](T,B)},B)}}var y=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var S=this,T=this[a];if(T!==null)return Promise.reject(T);if(this[u])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(M,U){process.nextTick(function(){S[a]?U(S[a]):M(h(void 0,!0))})});var B=this[l],I;if(B)I=new Promise(m(B,this));else{var D=this[f].read();if(D!==null)return Promise.resolve(h(D,!1));I=new Promise(this[c])}return this[l]=I,I}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var S=this;return new Promise(function(T,B){S[f].destroy(null,function(I){if(I){B(I);return}T(h(void 0,!0))})})}),e),y),A=function(S){var T,B=Object.create(w,(T={},t(T,f,{value:S,writable:!0}),t(T,o,{value:null,writable:!0}),t(T,s,{value:null,writable:!0}),t(T,a,{value:null,writable:!0}),t(T,u,{value:S._readableState.endEmitted,writable:!0}),t(T,c,{value:function(D,M){var U=B[f].read();U?(B[l]=null,B[o]=null,B[s]=null,D(h(U,!1))):(B[o]=D,B[s]=M)},writable:!0}),T));return B[l]=null,i(S,function(I){if(I&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=B[s];D!==null&&(B[l]=null,B[o]=null,B[s]=null,D(I)),B[a]=I;return}var M=B[o];M!==null&&(B[l]=null,B[o]=null,B[s]=null,M(h(void 0,!0))),B[u]=!0}),S.on("readable",p.bind(null,B)),B};return qg=A,qg}var Wg,gS;function $U(){return gS||(gS=1,Wg=function(){throw new Error("Readable.from is not available in the browser")}),Wg}var Zg,mS;function bS(){if(mS)return Zg;mS=1,Zg=M;var e;M.ReadableState=D,Bg.EventEmitter;var t=function(x,V){return x.listeners(V).length},n=eS(),r=ye.Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(C){return r.from(C)}function s(C){return r.isBuffer(C)||C instanceof i}var a=tS,u;a&&a.debuglog?u=a.debuglog("stream"):u=function(){};var l=CU(),c=iS(),f=aS(),h=f.getHighWaterMark,d=qs().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_STREAM_PUSH_AFTER_EOF,y=d.ERR_METHOD_NOT_IMPLEMENTED,w=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A,_,S;js(M,n);var T=c.errorOrDestroy,B=["error","close","destroy","pause","resume"];function I(C,x,V){if(typeof C.prependListener=="function")return C.prependListener(x,V);!C._events||!C._events[x]?C.on(x,V):Array.isArray(C._events[x])?C._events[x].unshift(V):C._events[x]=[V,C._events[x]]}function D(C,x,V){e=e||Ws(),C=C||{},typeof V!="boolean"&&(V=x instanceof e),this.objectMode=!!C.objectMode,V&&(this.objectMode=this.objectMode||!!C.readableObjectMode),this.highWaterMark=h(this,C,"readableHighWaterMark",V),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=C.emitClose!==!1,this.autoDestroy=!!C.autoDestroy,this.destroyed=!1,this.defaultEncoding=C.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,C.encoding&&(A||(A=Ug.StringDecoder),this.decoder=new A(C.encoding),this.encoding=C.encoding)}function M(C){if(e=e||Ws(),!(this instanceof M))return new M(C);var x=this instanceof e;this._readableState=new D(C,this,x),this.readable=!0,C&&(typeof C.read=="function"&&(this._read=C.read),typeof C.destroy=="function"&&(this._destroy=C.destroy)),n.call(this)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(x){this._readableState&&(this._readableState.destroyed=x)}}),M.prototype.destroy=c.destroy,M.prototype._undestroy=c.undestroy,M.prototype._destroy=function(C,x){x(C)},M.prototype.push=function(C,x){var V=this._readableState,W;return V.objectMode?W=!0:typeof C=="string"&&(x=x||V.defaultEncoding,x!==V.encoding&&(C=r.from(C,x),x=""),W=!0),U(this,C,x,!1,W)},M.prototype.unshift=function(C){return U(this,C,null,!0,!1)};function U(C,x,V,W,fe){u("readableAddChunk",x);var ne=C._readableState;if(x===null)ne.reading=!1,Se(C,ne);else{var he;if(fe||(he=te(ne,x)),he)T(C,he);else if(ne.objectMode||x&&x.length>0)if(typeof x!="string"&&!ne.objectMode&&Object.getPrototypeOf(x)!==r.prototype&&(x=o(x)),W)ne.endEmitted?T(C,new w):N(C,ne,x,!0);else if(ne.ended)T(C,new m);else{if(ne.destroyed)return!1;ne.reading=!1,ne.decoder&&!V?(x=ne.decoder.write(x),ne.objectMode||x.length!==0?N(C,ne,x,!1):ze(C,ne)):N(C,ne,x,!1)}else W||(ne.reading=!1,ze(C,ne))}return!ne.ended&&(ne.length<ne.highWaterMark||ne.length===0)}function N(C,x,V,W){x.flowing&&x.length===0&&!x.sync?(x.awaitDrain=0,C.emit("data",V)):(x.length+=x.objectMode?1:V.length,W?x.buffer.unshift(V):x.buffer.push(V),x.needReadable&&_e(C)),ze(C,x)}function te(C,x){var V;return!s(x)&&typeof x!="string"&&x!==void 0&&!C.objectMode&&(V=new p("chunk",["string","Buffer","Uint8Array"],x)),V}M.prototype.isPaused=function(){return this._readableState.flowing===!1},M.prototype.setEncoding=function(C){A||(A=Ug.StringDecoder);var x=new A(C);this._readableState.decoder=x,this._readableState.encoding=this._readableState.decoder.encoding;for(var V=this._readableState.buffer.head,W="";V!==null;)W+=x.write(V.data),V=V.next;return this._readableState.buffer.clear(),W!==""&&this._readableState.buffer.push(W),this._readableState.length=W.length,this};var re=1073741824;function ce(C){return C>=re?C=re:(C--,C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C++),C}function ge(C,x){return C<=0||x.length===0&&x.ended?0:x.objectMode?1:C!==C?x.flowing&&x.length?x.buffer.head.data.length:x.length:(C>x.highWaterMark&&(x.highWaterMark=ce(C)),C<=x.length?C:x.ended?x.length:(x.needReadable=!0,0))}M.prototype.read=function(C){u("read",C),C=parseInt(C,10);var x=this._readableState,V=C;if(C!==0&&(x.emittedReadable=!1),C===0&&x.needReadable&&((x.highWaterMark!==0?x.length>=x.highWaterMark:x.length>0)||x.ended))return u("read: emitReadable",x.length,x.ended),x.length===0&&x.ended?q(this):_e(this),null;if(C=ge(C,x),C===0&&x.ended)return x.length===0&&q(this),null;var W=x.needReadable;u("need readable",W),(x.length===0||x.length-C<x.highWaterMark)&&(W=!0,u("length less than watermark",W)),x.ended||x.reading?(W=!1,u("reading or ended",W)):W&&(u("do read"),x.reading=!0,x.sync=!0,x.length===0&&(x.needReadable=!0),this._read(x.highWaterMark),x.sync=!1,x.reading||(C=ge(V,x)));var fe;return C>0?fe=P(C,x):fe=null,fe===null?(x.needReadable=x.length<=x.highWaterMark,C=0):(x.length-=C,x.awaitDrain=0),x.length===0&&(x.ended||(x.needReadable=!0),V!==C&&x.ended&&q(this)),fe!==null&&this.emit("data",fe),fe};function Se(C,x){if(u("onEofChunk"),!x.ended){if(x.decoder){var V=x.decoder.end();V&&V.length&&(x.buffer.push(V),x.length+=x.objectMode?1:V.length)}x.ended=!0,x.sync?_e(C):(x.needReadable=!1,x.emittedReadable||(x.emittedReadable=!0,Le(C)))}}function _e(C){var x=C._readableState;u("emitReadable",x.needReadable,x.emittedReadable),x.needReadable=!1,x.emittedReadable||(u("emitReadable",x.flowing),x.emittedReadable=!0,process.nextTick(Le,C))}function Le(C){var x=C._readableState;u("emitReadable_",x.destroyed,x.length,x.ended),!x.destroyed&&(x.length||x.ended)&&(C.emit("readable"),x.emittedReadable=!1),x.needReadable=!x.flowing&&!x.ended&&x.length<=x.highWaterMark,L(C)}function ze(C,x){x.readingMore||(x.readingMore=!0,process.nextTick(tt,C,x))}function tt(C,x){for(;!x.reading&&!x.ended&&(x.length<x.highWaterMark||x.flowing&&x.length===0);){var V=x.length;if(u("maybeReadMore read 0"),C.read(0),V===x.length)break}x.readingMore=!1}M.prototype._read=function(C){T(this,new y("_read()"))},M.prototype.pipe=function(C,x){var V=this,W=this._readableState;switch(W.pipesCount){case 0:W.pipes=C;break;case 1:W.pipes=[W.pipes,C];break;default:W.pipes.push(C);break}W.pipesCount+=1,u("pipe count=%d opts=%j",W.pipesCount,x);var fe=(!x||x.end!==!1)&&C!==process.stdout&&C!==process.stderr,ne=fe?Zt:cr;W.endEmitted?process.nextTick(ne):V.once("end",ne),C.on("unpipe",he);function he(v,g){u("onunpipe"),v===V&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,ki())}function Zt(){u("onend"),C.end()}var Ci=Ie(V);C.on("drain",Ci);var Ti=!1;function ki(){u("cleanup"),C.removeListener("close",Ii),C.removeListener("finish",Yt),C.removeListener("drain",Ci),C.removeListener("error",Rr),C.removeListener("unpipe",he),V.removeListener("end",Zt),V.removeListener("end",cr),V.removeListener("data",It),Ti=!0,W.awaitDrain&&(!C._writableState||C._writableState.needDrain)&&Ci()}V.on("data",It);function It(v){u("ondata");var g=C.write(v);u("dest.write",g),g===!1&&((W.pipesCount===1&&W.pipes===C||W.pipesCount>1&&Z(W.pipes,C)!==-1)&&!Ti&&(u("false write response, pause",W.awaitDrain),W.awaitDrain++),V.pause())}function Rr(v){u("onerror",v),cr(),C.removeListener("error",Rr),t(C,"error")===0&&T(C,v)}I(C,"error",Rr);function Ii(){C.removeListener("finish",Yt),cr()}C.once("close",Ii);function Yt(){u("onfinish"),C.removeListener("close",Ii),cr()}C.once("finish",Yt);function cr(){u("unpipe"),V.unpipe(C)}return C.emit("pipe",V),W.flowing||(u("pipe resume"),V.resume()),C};function Ie(C){return function(){var V=C._readableState;u("pipeOnDrain",V.awaitDrain),V.awaitDrain&&V.awaitDrain--,V.awaitDrain===0&&t(C,"data")&&(V.flowing=!0,L(C))}}M.prototype.unpipe=function(C){var x=this._readableState,V={hasUnpiped:!1};if(x.pipesCount===0)return this;if(x.pipesCount===1)return C&&C!==x.pipes?this:(C||(C=x.pipes),x.pipes=null,x.pipesCount=0,x.flowing=!1,C&&C.emit("unpipe",this,V),this);if(!C){var W=x.pipes,fe=x.pipesCount;x.pipes=null,x.pipesCount=0,x.flowing=!1;for(var ne=0;ne<fe;ne++)W[ne].emit("unpipe",this,{hasUnpiped:!1});return this}var he=Z(x.pipes,C);return he===-1?this:(x.pipes.splice(he,1),x.pipesCount-=1,x.pipesCount===1&&(x.pipes=x.pipes[0]),C.emit("unpipe",this,V),this)},M.prototype.on=function(C,x){var V=n.prototype.on.call(this,C,x),W=this._readableState;return C==="data"?(W.readableListening=this.listenerCount("readable")>0,W.flowing!==!1&&this.resume()):C==="readable"&&!W.endEmitted&&!W.readableListening&&(W.readableListening=W.needReadable=!0,W.flowing=!1,W.emittedReadable=!1,u("on readable",W.length,W.reading),W.length?_e(this):W.reading||process.nextTick(bt,this)),V},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(C,x){var V=n.prototype.removeListener.call(this,C,x);return C==="readable"&&process.nextTick(Be,this),V},M.prototype.removeAllListeners=function(C){var x=n.prototype.removeAllListeners.apply(this,arguments);return(C==="readable"||C===void 0)&&process.nextTick(Be,this),x};function Be(C){var x=C._readableState;x.readableListening=C.listenerCount("readable")>0,x.resumeScheduled&&!x.paused?x.flowing=!0:C.listenerCount("data")>0&&C.resume()}function bt(C){u("readable nexttick read 0"),C.read(0)}M.prototype.resume=function(){var C=this._readableState;return C.flowing||(u("resume"),C.flowing=!C.readableListening,Wt(this,C)),C.paused=!1,this};function Wt(C,x){x.resumeScheduled||(x.resumeScheduled=!0,process.nextTick(je,C,x))}function je(C,x){u("resume",x.reading),x.reading||C.read(0),x.resumeScheduled=!1,C.emit("resume"),L(C),x.flowing&&!x.reading&&C.read(0)}M.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function L(C){var x=C._readableState;for(u("flow",x.flowing);x.flowing&&C.read()!==null;);}M.prototype.wrap=function(C){var x=this,V=this._readableState,W=!1;C.on("end",function(){if(u("wrapped end"),V.decoder&&!V.ended){var he=V.decoder.end();he&&he.length&&x.push(he)}x.push(null)}),C.on("data",function(he){if(u("wrapped data"),V.decoder&&(he=V.decoder.write(he)),!(V.objectMode&&he==null)&&!(!V.objectMode&&(!he||!he.length))){var Zt=x.push(he);Zt||(W=!0,C.pause())}});for(var fe in C)this[fe]===void 0&&typeof C[fe]=="function"&&(this[fe]=function(Zt){return function(){return C[Zt].apply(C,arguments)}}(fe));for(var ne=0;ne<B.length;ne++)C.on(B[ne],this.emit.bind(this,B[ne]));return this._read=function(he){u("wrapped _read",he),W&&(W=!1,C.resume())},this},typeof Symbol=="function"&&(M.prototype[Symbol.asyncIterator]=function(){return _===void 0&&(_=VU()),_(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(x){this._readableState&&(this._readableState.flowing=x)}}),M._fromList=P,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function P(C,x){if(x.length===0)return null;var V;return x.objectMode?V=x.buffer.shift():!C||C>=x.length?(x.decoder?V=x.buffer.join(""):x.buffer.length===1?V=x.buffer.first():V=x.buffer.concat(x.length),x.buffer.clear()):V=x.buffer.consume(C,x.decoder),V}function q(C){var x=C._readableState;u("endReadable",x.endEmitted),x.endEmitted||(x.ended=!0,process.nextTick($,x,C))}function $(C,x){if(u("endReadableNT",C.endEmitted,C.length),!C.endEmitted&&C.length===0&&(C.endEmitted=!0,x.readable=!1,x.emit("end"),C.autoDestroy)){var V=x._writableState;(!V||V.autoDestroy&&V.finished)&&x.destroy()}}typeof Symbol=="function"&&(M.from=function(C,x){return S===void 0&&(S=$U()),S(M,C,x)});function Z(C,x){for(var V=0,W=C.length;V<W;V++)if(C[V]===x)return V;return-1}return Zg}var Yg,yS;function wS(){if(yS)return Yg;yS=1,Yg=a;var e=qs().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=Ws();js(a,o);function s(c,f){var h=this._transformState;h.transforming=!1;var d=h.writecb;if(d===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),d(c);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function a(c){if(!(this instanceof a))return new a(c);o.call(this,c),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",u)}function u(){var c=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){l(c,f,h)}):l(this,null,null)}a.prototype.push=function(c,f){return this._transformState.needTransform=!1,o.prototype.push.call(this,c,f)},a.prototype._transform=function(c,f,h){h(new t("_transform()"))},a.prototype._write=function(c,f,h){var d=this._transformState;if(d.writecb=h,d.writechunk=c,d.writeencoding=f,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},a.prototype._read=function(c){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},a.prototype._destroy=function(c,f){o.prototype._destroy.call(this,c,function(h){f(h)})};function l(c,f,h){if(f)return c.emit("error",f);if(h!=null&&c.push(h),c._writableState.length)throw new i;if(c._transformState.transforming)throw new r;return c.push(null)}return Yg}var Qg,vS;function jU(){if(vS)return Qg;vS=1,Qg=t;var e=wS();js(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)},Qg}var Xg,xS;function qU(){if(xS)return Xg;xS=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=qs().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function o(h){if(h)throw h}function s(h){return h.setHeader&&typeof h.abort=="function"}function a(h,d,p,m){m=t(m);var y=!1;h.on("close",function(){y=!0}),e===void 0&&(e=jg()),e(h,{readable:d,writable:p},function(A){if(A)return m(A);y=!0,m()});var w=!1;return function(A){if(!y&&!w){if(w=!0,s(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();m(A||new i("pipe"))}}}function u(h){h()}function l(h,d){return h.pipe(d)}function c(h){return!h.length||typeof h[h.length-1]!="function"?o:h.pop()}function f(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var m=c(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var y,w=d.map(function(A,_){var S=_<d.length-1,T=_>0;return a(A,S,T,function(B){y||(y=B),B&&w.forEach(u),!S&&(w.forEach(u),m(y))})});return d.reduce(l)}return Xg=f,Xg}var AS=En,Kg=Bg.EventEmitter,WU=js;WU(En,Kg),En.Readable=bS(),En.Writable=cS(),En.Duplex=Ws(),En.Transform=wS(),En.PassThrough=jU(),En.finished=jg(),En.pipeline=qU(),En.Stream=En;function En(){Kg.call(this)}En.prototype.pipe=function(e,t){var n=this;function r(c){e.writable&&e.write(c)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",s),n.on("close",a));var o=!1;function s(){o||(o=!0,e.end())}function a(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function u(c){if(l(),Kg.listenerCount(this,"error")===0)throw c}n.on("error",u),e.on("error",u);function l(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",a),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e};function pu(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function ES(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function gu(e){return ES(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function Ir(e){return ES(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function SS(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(pu))}),t}function _S(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&pu(t[0]),source:t[1]&&pu(t[1]),type:t[2]&&pu(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:SS(t[8])}}function CS(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,s]=r.split(/\s+/,2);return{...i,source:o,buildName:s}}return i}function TS(e){const t=[];return Object.entries(e).forEach(([n,r])=>{if(!r)return;let i;r.hasOwnProperty("toString")?i=gu(r.toString()):Array.isArray(r)?i=r.map(gu).join(","):i=gu(r),t.push(`${gu(n)}=${i}`)}),t.length?t.join(";"):"."}function ZU(e,t){const n=e.attributes===null||e.attributes===void 0?".":TS(e.attributes),i=`${[e.seq_id===null?".":Ir(e.seq_id),e.source===null?".":Ir(e.source),e.type===null?".":Ir(e.type),e.start===null?".":Ir(e.start),e.end===null?".":Ir(e.end),e.score===null?".":Ir(e.score),e.strand===null?".":Ir(e.strand),e.phase===null?".":Ir(e.phase),n].join(" ")}
|
|
792
|
-
`;return t[i]?"":(t[i]=!0,i)}function
|
|
793
|
-
`,t}function
|
|
794
|
-
`}function
|
|
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
|
+
`,t}function vA(e){return`# ${e.comment}
|
|
793
|
+
`}function hp(e){return`>${e.id}${e.description?` ${e.description}`:""}
|
|
795
794
|
${e.sequence}
|
|
796
|
-
`}function
|
|
797
|
-
`}return Array.isArray(e)?e.map(t):t(e)}function
|
|
798
|
-
`,r+=n.map(
|
|
795
|
+
`}function Gu(e){function t(n){return"attributes"in n?wA(n):"directive"in n?xA(n):"sequence"in n?hp(n):"comment"in n?vA(n):`# (invalid item found during format)
|
|
796
|
+
`}return Array.isArray(e)?e.map(t):t(e)}function yP(e){return e.child_features!==void 0&&e.derived_features!==void 0}const wP=Object.freeze(Object.defineProperty({__proto__:null,escape:fc,escapeColumn:gr,formatAttributes:yA,formatComment:vA,formatDirective:xA,formatFeature:wA,formatItem:Gu,formatSequence:hp,parseAttributes:gA,parseDirective:bA,parseFeature:mA,unescape:uc},Symbol.toStringTag,{value:"Module"})),AA={Parent:"child_features",Derives_from:"derived_features"};class EA{constructor(t){this.seqCallback=t,this.currentSequence=void 0}addLine(t){const n=/^>\s*(\S+)\s*(.*)/.exec(t);n?(this._flush(),this.currentSequence={id:n[1],sequence:""},n[2]&&(this.currentSequence.description=n[2].trim())):this.currentSequence&&/\S/.test(t)&&(this.currentSequence.sequence+=t.replace(/\s/g,""))}_flush(){this.currentSequence&&this.seqCallback(this.currentSequence)}finish(){this._flush()}}class SA{constructor(t){this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};const n=()=>{};this.featureCallback=t.featureCallback||n,this.endCallback=t.endCallback||n,this.commentCallback=t.commentCallback||n,this.errorCallback=t.errorCallback||n,this.directiveCallback=t.directiveCallback||n,this.sequenceCallback=t.sequenceCallback||n,this.disableDerivesFromReferences=t.disableDerivesFromReferences||!1,this.bufferSize=t.bufferSize===void 0?1e3:t.bufferSize}addLine(t){if(this.fastaParser){this.fastaParser.addLine(t);return}if(this.eof)return;if(this.lineNumber+=1,/^\s*[^#\s>]/.test(t)){this._bufferLine(t);return}const n=/^\s*(#+)(.*)/.exec(t);if(n){const[,r]=n;let[,,i]=n;if(r.length===3)this._emitAllUnderConstructionFeatures();else if(r.length===2){const o=bA(t);o&&(o.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new EA(this.sequenceCallback)):this._emitItem(o))}else i=i.replace(/\s*/,""),this._emitItem({comment:i})}else if(!/^\s*$/.test(t))if(/^\s*>/.test(t))this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new EA(this.sequenceCallback),this.fastaParser.addLine(t);else{const r=t.replace(/\r?\n?$/g,"");throw new Error(`GFF3 parse error. Cannot parse '${r}'.`)}}finish(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}_emitItem(t){Array.isArray(t)?this.featureCallback(t):"directive"in t?this.directiveCallback(t):"comment"in t&&this.commentCallback(t)}_enforceBufferSizeLimit(t=0){const n=r=>{r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach(o=>{delete this._underConstructionById[o],delete this._completedReferences[o]}),r.forEach(o=>{o.child_features&&o.child_features.forEach(a=>n(a)),o.derived_features&&o.derived_features.forEach(a=>n(a))}))};for(;this._underConstructionTopLevel.length+t>this.bufferSize;){const r=this._underConstructionTopLevel.shift();r&&(this._emitItem(r),n(r))}}_emitAllUnderConstructionFeatures(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${Object.keys(this._underConstructionOrphans)}`)}_bufferLine(t){var n,r,i;const a={...mA(t),child_features:[],derived_features:[]},s=((n=a.attributes)===null||n===void 0?void 0:n.ID)||[],c=((r=a.attributes)===null||r===void 0?void 0:r.Parent)||[],l=this.disableDerivesFromReferences?[]:((i=a.attributes)===null||i===void 0?void 0:i.Derives_from)||[];if(!s.length&&!c.length&&!l.length){this._emitItem([a]);return}let u;s.forEach(f=>{const h=this._underConstructionById[f];h?(h[h.length-1].type!==a.type&&this._parseError(`multi-line feature "${f}" has inconsistent types: "${a.type}", "${h[h.length-1].type}"`),h.push(a),u=h):(u=[a],this._enforceBufferSizeLimit(1),!c.length&&!l.length&&this._underConstructionTopLevel.push(u),this._underConstructionById[f]=u,this._resolveReferencesTo(u,f))}),this._resolveReferencesFrom(u||[a],{Parent:c,Derives_from:l},s)}_resolveReferencesTo(t,n){const r=this._underConstructionOrphans[n];r&&(t.forEach(i=>{i.child_features.push(...r.Parent)}),t.forEach(i=>{i.derived_features.push(...r.Derives_from)}),delete this._underConstructionOrphans[n])}_parseError(t){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${t}`)}_resolveReferencesFrom(t,n,r){function i(o,a,s){let c=o[a];c||(c={},o[a]=c);const l=c[s]||!1;return c[s]=!0,l}n.Parent.forEach(o=>{const a=this._underConstructionById[o];if(a){const s=AA.Parent;r.filter(c=>i(this._completedReferences,c,`Parent,${o}`)).length||a.forEach(c=>{c[s].push(t)})}else{let s=this._underConstructionOrphans[o];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[o]=s),s.Parent.push(t)}}),n.Derives_from.forEach(o=>{const a=this._underConstructionById[o];if(a){const s=AA.Derives_from;r.filter(c=>i(this._completedReferences,c,`Derives_from,${o}`)).length||a.forEach(c=>{c[s].push(t)})}else{let s=this._underConstructionOrphans[o];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[o]=s),s.Derives_from.push(t)}})}}function dp(e){process&&process.nextTick?process.nextTick(e):e()}function _A(e){const t={encoding:"utf8",parseFeatures:!0,parseDirectives:!1,parseSequences:!0,parseComments:!1,bufferSize:1e3,disableDerivesFromReferences:!1,...e};return e.parseAll&&(t.parseFeatures=!0,t.parseDirectives=!0,t.parseComments=!0,t.parseSequences=!0),t}class xP extends dA.Transform{constructor(t={}){super({objectMode:!0}),this.textBuffer="";const n=_A(t);this.encoding=t.encoding||"utf8",this.decoder=new mP.StringDecoder;const r=this.push.bind(this);this.parser=new SA({featureCallback:n.parseFeatures?r:void 0,directiveCallback:n.parseDirectives?r:void 0,commentCallback:n.parseComments?r:void 0,sequenceCallback:n.parseSequences?r:void 0,errorCallback:i=>this.emit("error",i),bufferSize:n.bufferSize,disableDerivesFromReferences:n.disableDerivesFromReferences})}_addLine(t){t&&this.parser.addLine(t)}_nextText(t){const n=(this.textBuffer+t).split(/\r?\n/);this.textBuffer=n.pop()||"",n.forEach(r=>this._addLine(r))}_transform(t,n,r){this._nextText(this.decoder.write(t)),dp(r)}_flush(t){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),dp(t)}}function vP(e={}){return new xP(e)}function AP(e,t={}){if(!e)return[];const n=_A(t),r=[],i=r.push.bind(r),o=new SA({featureCallback:n.parseFeatures?i:void 0,directiveCallback:n.parseDirectives?i:void 0,commentCallback:n.parseComments?i:void 0,sequenceCallback:n.parseSequences?i:void 0,disableDerivesFromReferences:n.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:a=>{throw a}});return e.split(/\r?\n/).forEach(o.addLine.bind(o)),o.finish(),r}function EP(e){const t=[],n=[];e.forEach(i=>{"sequence"in i?n.push(i):t.push(i)});let r=t.map(Gu).join("");return n.length&&(r+=`##FASTA
|
|
797
|
+
`,r+=n.map(hp).join("")),r}class CA extends dA.Transform{constructor(t={}){super(Object.assign(t,{objectMode:!0})),this.linesSinceLastSyncMark=0,this.haveWeEmittedData=!1,this.fastaMode=!1,this.minLinesBetweenSyncMarks=t.minSyncLines||100,this.insertVersionDirective=t.insertVersionDirective||!1}_transform(t,n,r){let i;if(!this.haveWeEmittedData&&this.insertVersionDirective){const o=Array.isArray(t)?t[0]:t;"directive"in o&&o.directive!=="gff-version"&&this.push(`##gff-version 3
|
|
799
798
|
`)}if("sequence"in t&&!this.fastaMode&&(this.push(`##FASTA
|
|
800
|
-
`),this.fastaMode=!0),Array.isArray(t)?i=t.map(
|
|
801
|
-
`),this.linesSinceLastSyncMark=0;else{let o=0;for(let
|
|
802
|
-
`&&(o+=1);this.linesSinceLastSyncMark+=o}this.haveWeEmittedData=!0,
|
|
799
|
+
`),this.fastaMode=!0),Array.isArray(t)?i=t.map(Gu).join(""):i=Gu(t),this.push(i),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
|
|
800
|
+
`),this.linesSinceLastSyncMark=0;else{let o=0;for(let a=0;a<i.length;a+=1)i[a]===`
|
|
801
|
+
`&&(o+=1);this.linesSinceLastSyncMark+=o}this.haveWeEmittedData=!0,dp(r)}}function SP(e={}){return new CA(e)}function _P(e,t,n={}){const r={insertVersionDirective:!0,...n};return new Promise((i,o)=>{e.pipe(new CA(r)).on("end",()=>i(null)).on("error",o).pipe(t)})}const CP=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:vP,parseStringSync:AP,formatSync:EP,formatStream:SP,formatFile:_P,util:wP}},Symbol.toStringTag,{value:"Module"})),Hu={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 TP(e){try{return decodeURIComponent(e)}catch{return e}}class IP{constructor({header:t="",strict:n=!0}){if(!t.length)throw new Error("empty header received");const r=t.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:Hu.InfoFields,FORMAT:Hu.GenotypeFields,ALT:Hu.AltTypes,FILTER:Hu.FilterTypes}));let i;if(r.forEach(c=>{if(c.startsWith("#"))c.startsWith("##")?this.parseMetadata(c):i=c;else throw new Error(`Bad line in header:
|
|
802
|
+
${c}`)}),!i)throw new Error("No format line found in header");const o=i.trim().split(" "),a=o.slice(0,8),s=["#CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO"];if(o.length<8)throw new Error(`VCF header missing columns:
|
|
803
|
+
${i}`);if(a.length!==s.length||!a.every((c,l)=>c===s[l]))throw new Error(`VCF column headers not correct:
|
|
804
|
+
${i}`);this.samples=o.slice(9)}parseSamples(t,n){const r={};if(t){const i=n.split(" "),o=t.split(":"),a=o.map(s=>{const c=this.getMetadata("FORMAT",s,"Type");return c==="Integer"||c==="Float"});for(let s=0;s<this.samples.length;s++){const c=this.samples[s];r[c]={};const l=i[s].split(":");for(let u=0;u<l.length;u++){const f=l[u];r[c][o[u]]=f===""||f==="."?void 0:f.split(",").map(h=>h==="."?void 0:a[u]?+h:h)}}}return r}parseGenotypesOnly(t,n){const r=n.split(" "),i={};let o=0;const a=t.split(":");if(a.length===1)for(const s of this.samples)i[s]=r[o++];else{const s=a.findIndex(c=>c==="GT");if(s===0)for(const c of this.samples){const l=r[o++],u=l.indexOf(":");u!==-1?i[c]=l.slice(0,u):console.warn("unknown")}else for(const c of this.samples){const l=r[o++].split(":");i[c]=l[s]}}return i}parseMetadata(t){const n=/^##(.+?)=(.*)/.exec(t.trim());if(!n)throw new Error(`Line is not a valid metadata line: ${t}`);const[r,i]=n.slice(1,3),o=r;if(i!=null&&i.startsWith("<")){o in this.metadata||(this.metadata[o]={});const[a,s]=this.parseStructuredMetaVal(i);this.metadata[o][a]=s}else this.metadata[o]=i}parseStructuredMetaVal(t){const n=this.parseKeyValue(t.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(...t){let n=this.metadata;for(const r of t)if(n=n[r],!n)return n;return n}parseKeyValue(t,n=";"){const r={};let i="",o="",a=1;for(const s of t)a===1?s==="="?a=2:s!==n?i+=s:o===""&&(r[i]=void 0,i=""):a===2?s===n?(r[i]=o,i="",o="",a=1):s==='"'?a=3:o+=s:a===3&&(s!=='"'?o+=s:a=2);return a===2||a===3?r[i]=o:a===1&&(r[i]=void 0),r}parseLine(t){var n,r;let i=0;for(let D=0;i<t.length&&(t[i]===" "&&(D+=1),D!==9);i+=1);const o=t.slice(0,i).split(" "),a=t.slice(i+1),[s,c,l,u,f,h,d]=o,p=s,b=+c,v=l==="."?void 0:l.split(";"),y=u,A=f==="."?void 0:f.split(","),_=h==="."?void 0:+h,E=d==="."?void 0:d.split(";");if(this.strict&&!o[7])throw new Error("no INFO field specified, must contain at least a '.' (turn off strict mode to allow)");const C=(n=o[7])===null||n===void 0?void 0:n.includes("%"),R=o[7]===void 0||o[7]==="."?{}:this.parseKeyValue(o[7]);for(const D of Object.keys(R)){const O=(r=R[D])===null||r===void 0?void 0:r.split(",").map(P=>P==="."?void 0:P).map(P=>P&&C?TP(P):P),F=this.getMetadata("INFO",D,"Type");F==="Integer"||F==="Float"?R[D]=O==null?void 0:O.map(P=>P===void 0?void 0:Number(P)):F==="Flag"?R[D]=!0:R[D]=O}return{CHROM:p,POS:b,ALT:A,INFO:R,REF:y,FILTER:E&&E.length===1&&E[0]==="PASS"?"PASS":E,ID:v,QUAL:_,SAMPLES:()=>{var D;return this.parseSamples((D=o[8])!==null&&D!==void 0?D:"",a)},GENOTYPES:()=>{var D;return this.parseGenotypesOnly((D=o[8])!==null&&D!==void 0?D:"",a)}}}}const DP=Object.freeze(Object.defineProperty({__proto__:null,default:IP},Symbol.toStringTag,{value:"Module"}));Ue.GenomeSpy=Oy,Ue.embed=NR,Ue.favIcon=LR,Ue.html=ct,Ue.icon=PR,Ue.loadSpec=zy,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})});
|