"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[8837],{88837:(e,t,a)=>{a.r(t),a.d(t,{default:()=>l});var s=a(56798),r=a(16979),n=a(90872),i=a(54909),o=a(99249);function c(e){const t=e.slice(e.lastIndexOf("/")+1);return t.slice(0,t.lastIndexOf("."))}class l extends s.BaseFeatureDataAdapter{async getAdapters(){var e;const t=this.getSubAdapter;if(!t)throw new Error("no getSubAdapter available");let a=this.getConf("subadapters");if(null===(e=a)||void 0===e||!e.length){a=this.getConf("bigWigs").map((e=>({type:"BigWigAdapter",source:c(e),bigWigLocation:{uri:e}})))}return Promise.all(a.map((async e=>{const a=(await t(e)).dataAdapter;return{source:e.name||a.id,...e,dataAdapter:a}})))}async getRefNames(e){const t=await this.getAdapters(),a=await Promise.all(t.map((t=>t.dataAdapter.getRefNames(e))));return[...new Set(a.flat())]}async getGlobalStats(e){const t=await this.getAdapters(),a=(await Promise.all(t.map((t=>{var a,s;return null===(a=(s=t.dataAdapter).getGlobalStats)||void 0===a?void 0:a.call(s,e)})))).filter((e=>!!e));return{scoreMin:(0,n.min)(a.map((e=>e.scoreMin))),scoreMax:(0,n.max)(a.map((e=>e.scoreMax)))}}getFeatures(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.ObservableCreate)((async a=>{const s=await this.getAdapters();(0,i.T)(...s.map((a=>a.dataAdapter.getFeatures(e,t).pipe((0,o.U)((e=>e.get("source")?e:new n.SimpleFeature({...e.toJSON(),uniqueId:"".concat(a.source,"-").concat(e.id()),source:a.source}))))))).subscribe(a)}),t.signal)}async getMultiRegionFeatureDensityStats(e){return{featureDensity:0}}async getSources(){return(await this.getAdapters()).map((e=>{let{dataAdapter:t,source:a,name:s,...r}=e;return{name:a,__name:s,...r}}))}freeResources(){}}l.capabilities=["hasResolution","hasLocalStats","hasGlobalStats"]}}]);
//# sourceMappingURL=8837.9bdae85e.chunk.js.map