(this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[64],{2482:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return m}));var r=n(89),a=n.n(r),u=n(91),i=n(90),s=n(93),c=n(94),o=n(96),f=n(2303),b=n(2304),l=n.n(b),v=n(136),h=n(130),p=n(145),d=n(84),g=n(82),k={refName:"seq_id"},j={seq_id:"refName"},w=function(){function e(t,n,r){Object(i.a)(this,e),this.ncFeature=void 0,this.parentHandle=void 0,this.uniqueId=void 0,this.ncFeature=t,this.uniqueId=r||t.id(),this.parentHandle=n}return Object(s.a)(e,[{key:"set",value:function(){throw new Error("not implemented")}},{key:"jb2TagToJb1Tag",value:function(e){return(k[e]||e).toLowerCase()}},{key:"jb1TagToJb2Tag",value:function(e){var t=e.toLowerCase();return j[t]||t}},{key:"get",value:function(t){var n=this,r=this.ncFeature.get(this.jb2TagToJb1Tag(t));return r&&"subfeatures"===t?r.map((function(t){return new e(t,n)})):r}},{key:"tags",value:function(){var e=this;return this.ncFeature.tags().map((function(t){return e.jb1TagToJb2Tag(t)}))}},{key:"id",value:function(){return this.uniqueId}},{key:"parent",value:function(){return this.parentHandle}},{key:"children",value:function(){return this.get("subfeatures")}},{key:"toJSON",value:function(){var t=this,n={uniqueId:this.id()};return this.ncFeature.tags().forEach((function(r){var a=t.jb1TagToJb2Tag(r),u=t.ncFeature.get(r);"subfeatures"===a?n.subfeatures=(u||[]).map((function(n){return new e(n,t).toJSON()})):n[a]=u})),n}}]),e}(),m=function(e){Object(c.a)(n,e);var t=Object(o.a)(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).nclist=void 0,r.configRefNames=void 0;var a=Object(g.readConfObject)(e,"refNames"),u=Object(g.readConfObject)(e,"rootUrlTemplate");return r.configRefNames=a,r.nclist=new l.a({baseUrl:"",urlTemplate:u.uri,readFile:function(e){return Object(v.openUrl)(u.baseUri?new URL(e,u.baseUri).toString():e).readFile()}}),r}return Object(s.a)(n,[{key:"getFeatures",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(p.ObservableCreate)(function(){var r=Object(u.a)(a.a.mark((function r(u){var i,s,c,o,b,l,v,h;return a.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=n.signal,s=!0,c=!1,r.prev=3,b=Object(f.a)(t.nclist.getFeatures(e,n));case 5:return r.next=7,b.next();case 7:return l=r.sent,s=l.done,r.next=11,l.value;case 11:if(v=r.sent,s){r.next=19;break}h=v,Object(d.checkAbortSignal)(i),u.next(t.wrapFeature(h));case 16:s=!0,r.next=5;break;case 19:r.next=25;break;case 21:r.prev=21,r.t0=r.catch(3),c=!0,o=r.t0;case 25:if(r.prev=25,r.prev=26,s||null==b.return){r.next=30;break}return r.next=30,b.return();case 30:if(r.prev=30,!c){r.next=33;break}throw o;case 33:return r.finish(30);case 34:return r.finish(25);case 35:u.complete();case 36:case"end":return r.stop()}}),r,null,[[3,21,25,35],[26,,30,34]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"wrapFeature",value:function(e){return new w(e,void 0,"".concat(this.id,"-").concat(e.id()))}},{key:"hasDataForRefName",value:function(){var e=Object(u.a)(a.a.mark((function e(t){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.nclist.getDataRoot(t);case 2:return n=e.sent,e.abrupt("return",!!(n&&n.stats&&n.stats.featureCount));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRefNames",value:function(){return Promise.resolve(this.configRefNames||[])}},{key:"freeResources",value:function(){}}]),n}(h.BaseFeatureDataAdapter)}}]);
//# sourceMappingURL=64.eae73c0c.chunk.js.map