(this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[77],{1729:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));var r=n(86),a=n(82),c=n(81),i=n(11),o=n(88),s=n(89),u=n(80),d=n.n(u),f=n(116),p=n(125),w=n(119),l=n(79),b=n(807),h=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(c.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).windowSize=1e3,e.windowDelta=1e3,e.gcMode="content",e}return Object(i.a)(n,[{key:"configure",value:function(){var e=Object(a.a)(d.a.mark((function e(){var t,n,r;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(l.readConfObject)(this.config,"sequenceAdapter"),e.next=3,null===(t=this.getSubAdapter)||void 0===t?void 0:t.call(this,n);case 3:if(r=e.sent){e.next=6;break}throw new Error("Error getting subadapter");case 6:return e.abrupt("return",r.dataAdapter);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getRefNames",value:function(){var e=Object(a.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return t=e.sent,e.abrupt("return",t.getRefNames());case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getFeatures",value:function(e,t){var n=this;return this.windowSize=1e3,this.windowDelta=1e3,this.gcMode="content",Object(p.ObservableCreate)(function(){var t=Object(a.a)(d.a.mark((function t(a){var c,i,o,s,u,f,p,l,h,v,g,j,O,k,x,m,y;return d.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.configure();case 2:if(i=t.sent,o=1===n.windowSize?1:n.windowSize/2,s=1===n.windowSize,u=e.start,f=e.end,u=Math.max(0,u-o),!((f+=o)<0||u>f)){t.next=11;break}return a.complete(),t.abrupt("return");case 11:return p=i.getFeatures(Object(r.a)(Object(r.a)({},e),{},{start:u,end:f})),t.next=14,p.pipe(Object(b.a)()).toPromise();case 14:for(l=t.sent,h=(null===(c=l[0])||void 0===c?void 0:c.get("seq"))||"",v=o;v<h.length-o;v+=n.windowDelta){for(g=s?h[v]:h.slice(v-o,v+o),j=0,O=0,k=0,x=0;x<g.length;x++)"c"===g[x]||"C"===g[x]?j++:"g"!==g[x]&&"G"!==g[x]||O++,"N"!==g[x]&&k++;m=u,y=void 0,"content"===n.gcMode?y=(O+j)/(k||1):"skew"===n.gcMode&&(y=(O-j)/(O+j||1)),a.next(new w.a({uniqueId:"".concat(n.id,"_").concat(m+v),start:m+v,end:m+v+n.windowDelta,score:y}))}a.complete();case 18:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}},{key:"freeResources",value:function(){}}]),n}(f.BaseFeatureDataAdapter);h.capabilities=["hasLocalStats"]}}]);
//# sourceMappingURL=77.f1dc50b9.chunk.js.map