"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[3757],{23757:(e,t,a)=>{a.r(t),a.d(t,{default:()=>c});var s=a(88385),r=a(56798),n=a(59062),i=a(90872),o=a(16979),u=a(81025);class c extends r.BaseFeatureDataAdapter{constructor(){super(...arguments),this.setupP=void 0}async setupPre(e){const{statusCallback:t=(()=>{})}=e||{},a=this.pluginManager,r=new s.B({filehandle:(0,n.openLocation)(this.getConf("bigWigLocation"),a)}),o=await(0,i.updateStatus)("Downloading bigwig header",t,(()=>r.getHeader(e)));return{bigwig:r,header:o}}async setup(e){return this.setupP||(this.setupP=this.setupPre(e).catch((e=>{throw this.setupP=void 0,e}))),this.setupP}async getRefNames(e){const{header:t}=await this.setup(e);return Object.keys(t.refsByName)}async refIdToName(e){var t;const{header:a}=await this.setup();return null===(t=a.refsByNumber[e])||void 0===t?void 0:t.name}async getGlobalStats(e){const{header:t}=await this.setup(e);return(0,u.I9)(t.totalSummary)}getFeatures(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{refName:a,start:s,end:r}=e,{bpPerPx:n=0,signal:i,resolution:u=1,statusCallback:c=(()=>{})}=t;return(0,o.ObservableCreate)((async i=>{c("Downloading bigwig data");const o=this.getConf("source"),{bigwig:l}=await this.setup(t),h=await l.getFeatures(a,s,r,{...t,basesPerSpan:n/u});for(const t of h){o&&(t.source=o);const s="".concat(o,":").concat(e.refName,":").concat(t.start,"-").concat(t.end);t.refName=a,t.uniqueId=s,i.next({get:e=>t[e],id:()=>s,toJSON:()=>t})}i.complete()}),i)}async getMultiRegionFeatureDensityStats(e){return{featureDensity:0}}freeResources(){}}c.capabilities=["hasResolution","hasLocalStats","hasGlobalStats"]}}]);
//# sourceMappingURL=3757.81391aa8.chunk.js.map