(this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[38,70],{1284:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return m}));var n=a(89),r=a.n(n),c=a(92),o=a(91),i=a(90),s=a(93),u=a(94),f=a(95),b=a(858),p=a(126),d=a(122),j=a(142),v=a(140),O=a(82),l=a(170),h=a.n(l),w=a(363),m=function(e){Object(u.a)(a,e);var t=Object(f.a)(a);function a(e){var n;Object(i.a)(this,a),(n=t.call(this,e)).fasta=void 0,n.seqCache=new h.a({cache:new w.a({maxSize:200}),fill:function(){var e=Object(o.a)(r.a.mark((function e(t,a){var o,i,s;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.refName,i=t.start,s=t.end,e.abrupt("return",n.fasta.getSequence(o,i,s,Object(c.a)(Object(c.a)({},t),{},{signal:a})));case 2:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()});var s=Object(O.readConfObject)(e,"fastaLocation"),u=Object(O.readConfObject)(e,"faiLocation"),f={fasta:Object(d.openLocation)(s),fai:Object(d.openLocation)(u)};return n.fasta=new b.IndexedFasta(f),n}return Object(s.a)(a,[{key:"getRefNames",value:function(e){return this.fasta.getSequenceNames(e)}},{key:"getRegions",value:function(){var e=Object(o.a)(r.a.mark((function e(t){var a;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fasta.getSequenceSizes(t);case 2:return a=e.sent,e.abrupt("return",Object.keys(a).map((function(e){return{refName:e,start:0,end:a[e]}})));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getFeatures",value:function(e,t){var a=this,n=e.refName,c=e.start,i=e.end;return Object(j.ObservableCreate)(function(){var e=Object(o.a)(r.a.mark((function e(o){var s,u,f,b,p,d,j,O,l;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.fasta.getSequenceSize(n,t);case 2:for(s=e.sent,u=void 0!==s?Math.min(s,i):i,f=[],d=i+((b=128e3)-i%b),j=p=c-c%b;j<d;j+=b)O={refName:n,start:j,end:j+b},f.push(a.seqCache.get(JSON.stringify(O),O,null===t||void 0===t?void 0:t.signal));return e.next=11,Promise.all(f);case 11:(l=e.sent.join("").slice(c-p).slice(0,i-c))&&o.next(new v.a({id:"".concat(n," ").concat(c,"-").concat(u),data:{refName:n,start:c,end:u,seq:l}})),o.complete();case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:"freeResources",value:function(){}}]),a}(p.BaseFeatureDataAdapter)},2482:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return u}));var n=a(90),r=a(94),c=a(95),o=a(858),i=a(122),s=a(82),u=function(e){Object(r.a)(a,e);var t=Object(c.a)(a);function a(e){var r;Object(n.a)(this,a),r=t.call(this,e);var c=Object(s.readConfObject)(e,"fastaLocation"),u=Object(s.readConfObject)(e,"faiLocation"),f=Object(s.readConfObject)(e,"gziLocation");if(!c)throw new Error("must provide fastaLocation");if(!u)throw new Error("must provide faiLocation");if(!f)throw new Error("must provide gziLocation");var b={fasta:Object(i.openLocation)(c),fai:Object(i.openLocation)(u),gzi:Object(i.openLocation)(f)};return r.fasta=new o.BgzipIndexedFasta(b),r}return a}(a(1284).default)}}]);
//# sourceMappingURL=38.fe21f9dc.chunk.js.map