(this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[71],{2332:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return m}));var r=n(86),a=n(84),u=n(12),i=n(91),s=n(92),c=n(574),o=n(83),f=n.n(o),b=n(2105),l=n.n(b),v=n(121),h=n(134),p=n(85),d=n(163),g=n(82),k={refName:"seq_id"},w={seq_id:"refName"},j=function(){function e(t,n,r){Object(a.a)(this,e),this.ncFeature=t,this.parentHandle=void 0,this.uniqueId=void 0,this.uniqueId=r||t.id(),this.parentHandle=n}return Object(u.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 w[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(i.a)(n,e);var t=Object(s.a)(n);function n(e,r,u){var i;Object(a.a)(this,n),(i=t.call(this,e,r,u)).nclist=void 0,i.configRefNames=void 0;var s=Object(g.readConfObject)(e,"refNames"),c=Object(g.readConfObject)(e,"rootUrlTemplate");return i.configRefNames=s,i.nclist=new l.a({baseUrl:"",urlTemplate:c.uri,readFile:function(e){return new d.RemoteFile(String(c.baseUri?new URL(e,c.baseUri).toString():e)).readFile()}}),i}return Object(u.a)(n,[{key:"getFeatures",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(h.ObservableCreate)(function(){var a=Object(r.a)(f.a.mark((function r(a){var u,i,s,o,b,l,v;return f.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:u=n.signal,i=!1,s=!1,r.prev=3,b=Object(c.a)(t.nclist.getFeatures(e,n));case 5:return r.next=7,b.next();case 7:if(!(i=!(l=r.sent).done)){r.next=14;break}v=l.value,Object(p.checkAbortSignal)(u),a.next(t.wrapFeature(v));case 11:i=!1,r.next=5;break;case 14:r.next=20;break;case 16:r.prev=16,r.t0=r.catch(3),s=!0,o=r.t0;case 20:if(r.prev=20,r.prev=21,!i||null==b.return){r.next=25;break}return r.next=25,b.return();case 25:if(r.prev=25,!s){r.next=28;break}throw o;case 28:return r.finish(25);case 29:return r.finish(20);case 30:a.complete();case 31:case"end":return r.stop()}}),r,null,[[3,16,20,30],[21,,25,29]])})));return function(e){return a.apply(this,arguments)}}())}},{key:"wrapFeature",value:function(e){return new j(e,void 0,"".concat(this.id,"-").concat(e.id()))}},{key:"hasDataForRefName",value:function(){var e=Object(r.a)(f.a.mark((function e(t){var n;return f.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}(v.BaseFeatureDataAdapter)}}]);
//# sourceMappingURL=71.2a9ede58.chunk.js.map