"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 w}});var n=r(41361),a=r(33028),u=r(32723),s=r(34795),i=r(9249),c=r(87371),o=r(45754),p=r(13820),f=r(76237),l=r(20783),h=r(33528),v=r(81073),d=r(26131),b=r(66518),w=function(e){(0,o.Z)(r,e);var t=(0,p.Z)(r);function r(){var e;(0,i.Z)(this,r);for(var n=arguments.length,a=new Array(n),u=0;u<n;u++)a[u]=arguments[u];return(e=t.call.apply(t,[this].concat(a))).setupP=void 0,e}return(0,c.Z)(r,[{key:"setupPre",value:function(){var e=(0,s.Z)((0,u.Z)().mark((function e(t){var r,n,a,s,i;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t||{}).statusCallback,n=void 0===r?function(){}:r,a=this.pluginManager,s=new f.B({filehandle:(0,h.openLocation)(this.getConf("bigWigLocation"),a)}),e.next=5,(0,v.updateStatus)("Downloading bigwig header",n,(function(){return s.getHeader(t)}));case 5:return i=e.sent,e.abrupt("return",{bigwig:s,header:i});case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setup",value:function(){var e=(0,s.Z)((0,u.Z)().mark((function e(t){var r=this;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setupP||(this.setupP=this.setupPre(t).catch((function(e){throw r.setupP=void 0,e}))),e.abrupt("return",this.setupP);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRefNames",value:function(){var e=(0,s.Z)((0,u.Z)().mark((function e(t){var r,n;return(0,u.Z)().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.header,e.abrupt("return",Object.keys(n.refsByName));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"refIdToName",value:function(){var e=(0,s.Z)((0,u.Z)().mark((function e(t){var r,n,a;return(0,u.Z)().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.header,e.abrupt("return",null===(r=a.refsByNumber[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,s.Z)((0,u.Z)().mark((function e(t){var r,n;return(0,u.Z)().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.header,e.abrupt("return",(0,b.I9)(n.totalSummary));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]:{},i=e.refName,c=e.start,o=e.end,p=r.bpPerPx,f=void 0===p?0:p,l=r.signal,h=r.resolution,v=void 0===h?1:h,b=r.statusCallback,w=void 0===b?function(){}:b;return(0,d.ObservableCreate)(function(){var p=(0,s.Z)((0,u.Z)().mark((function s(p){var l,h,d,b,Z,g,k;return(0,u.Z)().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return w("Downloading bigwig data"),l=t.getConf("source"),s.next=4,t.setup(r);case 4:return h=s.sent,d=h.bigwig,s.next=8,d.getFeatures(i,c,o,(0,a.Z)((0,a.Z)({},r),{},{basesPerSpan:f/v}));case 8:b=s.sent,Z=(0,n.Z)(b),s.prev=10,k=(0,u.Z)().mark((function t(){var r,n;return(0,u.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=g.value,l&&(r.source=l),n="".concat(l,":").concat(e.refName,":").concat(r.start,"-").concat(r.end),r.refName=i,r.uniqueId=n,p.next({get:function(e){return r[e]},id:function(){return n},toJSON:function(){return r}});case 6:case"end":return t.stop()}}),t)})),Z.s();case 13:if((g=Z.n()).done){s.next=17;break}return s.delegateYield(k(),"t0",15);case 15:s.next=13;break;case 17:s.next=22;break;case 19:s.prev=19,s.t1=s.catch(10),Z.e(s.t1);case 22:return s.prev=22,Z.f(),s.finish(22);case 25:p.complete();case 26:case"end":return s.stop()}}),s,null,[[10,19,22,25]])})));return function(e){return p.apply(this,arguments)}}(),l)}},{key:"getMultiRegionFeatureDensityStats",value:function(){var e=(0,s.Z)((0,u.Z)().mark((function e(t){return(0,u.Z)().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);w.capabilities=["hasResolution","hasLocalStats","hasGlobalStats"]}}]);
//# sourceMappingURL=2094.6be7de39.chunk.js.map