"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[2094],{22094:function(e,t,r){r.r(t),r.d(t,{default:function(){return m}});var n=r(33028),a=r(34795),u=r(9249),s=r(87371),i=r(45754),c=r(86906),o=r(77162),f=r.n(o),p=r(97214),l=r(29598),v=r(33528),b=r(81073),h=r(26131),d=r(14956),w=r(23422),g=r(84040),k=r(9077),y=r(66518),m=function(e){(0,i.Z)(r,e);var t=(0,c.Z)(r);function r(e,n,a){var s;return(0,u.Z)(this,r),(s=t.call(this,e,n,a)).bigwig=void 0,s.bigwig=new p.Br({filehandle:(0,v.openLocation)((0,k.readConfObject)(e,"bigWigLocation"),s.pluginManager)}),s}return(0,s.Z)(r,[{key:"setup",value:function(){var e=(0,a.Z)(f().mark((function e(t){var r,n,a=this;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t||{}).statusCallback,n=void 0===r?function(){}:r,e.abrupt("return",(0,b.updateStatus)("Downloading bigwig header",n,(function(){return a.bigwig.getHeader(t)})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRefNames",value:function(){var e=(0,a.Z)(f().mark((function e(t){var r,n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setup(t);case 2:return r=e.sent,n=r.refsByName,e.abrupt("return",Object.keys(n));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"refIdToName",value:function(){var e=(0,a.Z)(f().mark((function e(t){var r,n,a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setup();case 2:return n=e.sent,a=n.refsByNumber,e.abrupt("return",null===(r=a[t])||void 0===r?void 0:r.name);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getGlobalStats",value:function(){var e=(0,a.Z)(f().mark((function e(t){var r,n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setup(t);case 2:return r=e.sent,n=r.totalSummary,e.abrupt("return",(0,y.I9)(n));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=e.refName,s=e.start,i=e.end,c=r.bpPerPx,o=void 0===c?0:c,p=r.signal,l=r.resolution,v=void 0===l?1:l,b=r.statusCallback,k=void 0===b?function(){}:b;return(0,h.ObservableCreate)(function(){var e=(0,a.Z)(f().mark((function e(a){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k("Downloading bigwig data"),e.next=3,t.bigwig.getFeatureStream(u,s,i,(0,n.Z)((0,n.Z)({},r),{},{basesPerSpan:o/v}));case 3:e.sent.pipe((0,w.J)(),(0,g.U)((function(e){return new d.Z({id:"".concat(u,":").concat(e.start,"-").concat(e.end),data:(0,n.Z)((0,n.Z)({},e),{},{refName:u})})}))).subscribe(a);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),p)}},{key:"estimateRegionsStats",value:function(){var e=(0,a.Z)(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{featureDensity:0});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"freeResources",value:function(){}}]),r}(l.BaseFeatureDataAdapter);m.capabilities=["hasResolution","hasLocalStats","hasGlobalStats"]}}]);
//# sourceMappingURL=2094.c483c83f.chunk.js.map