(this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[81],{1730:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return x}));var r=n(86),a=n(82),c=n(81),i=n(11),u=n(142),s=n(132),o=n(88),f=n(89),p=n(80),h=n.n(p),l=n(116),v=n(104),b=n(83),d=n(125),g=n(636),j=n(213),w=n(79),O=n(462),x=function(e){Object(o.a)(n,e);var t=Object(f.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))).configured=void 0,e}return Object(i.a)(n,[{key:"configurePre",value:function(){var e=Object(a.a)(h.a.mark((function e(){var t,n,r,a,c,i,u;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object(w.readConfObject)(this.config,"vcfGzLocation"),n=Object(w.readConfObject)(this.config,["index","location"]),r=Object(w.readConfObject)(this.config,["index","indexType"]),a=Object(v.openLocation)(t,this.pluginManager),c="CSI"===r,i=new g.TabixIndexedFile({filehandle:a,csiFilehandle:c?Object(v.openLocation)(n,this.pluginManager):void 0,tbiFilehandle:c?void 0:Object(v.openLocation)(n,this.pluginManager),chunkCacheSize:50*Math.pow(2,20),chunkSizeLimit:1e9}),e.next=8,i.getHeader();case 8:return u=e.sent,e.abrupt("return",{filehandle:a,vcf:i,parser:new j.a({header:u})});case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"configure",value:function(){var e=Object(a.a)(h.a.mark((function e(){var t=this;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.configured||(this.configured=this.configurePre().catch((function(e){throw t.configured=void 0,e}))),e.abrupt("return",this.configured);case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getRefNames",value:function(){var e=Object(a.a)(h.a.mark((function e(){var t,n,r,a=arguments;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.configure();case 3:return n=e.sent,r=n.vcf,e.abrupt("return",r.getReferenceSequenceNames(t));case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getHeader",value:function(){var e=Object(a.a)(h.a.mark((function e(){var t,n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return t=e.sent,n=t.vcf,e.abrupt("return",n.getHeader());case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getMetadata",value:function(){var e=Object(a.a)(h.a.mark((function e(){var t,n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return t=e.sent,n=t.parser,e.abrupt("return",n.getMetadata());case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getFeatures",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(d.ObservableCreate)(function(){var c=Object(a.a)(h.a.mark((function a(c){var i,u,s,o,f,p;return h.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=e.refName,u=e.start,s=e.end,a.next=3,t.configure();case 3:return o=a.sent,f=o.vcf,p=o.parser,a.next=8,f.getLines(i,u,s,Object(r.a)({lineCallback:function(e,n){c.next(new O.a({variant:p.parseLine(e),parser:p,id:"".concat(t.id,"-vcf-").concat(n)}))}},n));case 8:c.complete();case 9:case"end":return a.stop()}}),a)})));return function(e){return c.apply(this,arguments)}}(),n.signal)}},{key:"getFeaturesInMultipleRegions",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=Object(u.a)(Object(s.a)(n.prototype),"getFeaturesInMultipleRegions",this);return Object(d.ObservableCreate)(function(){var n=Object(a.a)(h.a.mark((function n(a){var i,u,s,o,f,p,l;return h.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.configure();case 2:return i=n.sent,u=i.vcf,n.next=6,Object(b.bytesForRegions)(e,u.index);case 6:return s=n.sent,n.next=9,t.configure();case 9:return o=n.sent,f=o.filehandle,n.next=13,f.stat();case 13:p=n.sent,(l=Math.round(s/p.size*100))>100&&(l=100),l>60&&console.warn("getFeaturesInMultipleRegions fetching ".concat(l,"% of VCF file, but whole-file streaming not yet implemented")),c.call(t,e,r).subscribe(a);case 18:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())}},{key:"freeResources",value:function(){}}]),n}(l.BaseFeatureDataAdapter)}}]);
//# sourceMappingURL=81.fb12bda2.chunk.js.map