"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[5490],{5490:(e,t,a)=>{a.r(t),a.d(t,{default:()=>i});var n=a(56798),s=a(16979),r=a(90872),c=a(26138),o=a(24201);const i=class extends n.BaseFeatureDataAdapter{async configure(){var e;const t=await(null===(e=this.getSubAdapter)||void 0===e?void 0:e.call(this,this.getConf("sequenceAdapter")));if(!t)throw new Error("Error getting subadapter");return t.dataAdapter}async getRefNames(){return(await this.configure()).getRefNames()}getFeatures(e,t){return(0,s.ObservableCreate)((async a=>{var n;const s=await this.configure();let{start:i,end:d}=e;if(i=Math.max(0,i-1e3),d+=1e3,d<0||i>d)return void a.complete();const f=s.getFeatures({...e,start:i,end:d},t),h=(null===(n=(await(0,o.z)(f.pipe((0,c.q)())))[0])||void 0===n?void 0:n.get("seq"))||"",u=this.getConf("search"),l=this.getConf("searchForward"),g=this.getConf("searchReverse"),m=this.getConf("caseInsensitive"),p=new RegExp(u,"g"+(m?"i":""));if(u){if(l){const t=h.matchAll(p);for(const n of t){const t=i+(n.index||0);(0,r.doesIntersect2)(t,t+u.length,e.start,e.end)&&a.next(new r.SimpleFeature({uniqueId:"".concat(this.id,"-match-").concat(t,"-p"),refName:e.refName,start:t,end:t+n[0].length,name:n[0],strand:1}))}}if(g){const t=(0,r.revcom)(h).matchAll(p);for(const n of t){const t=d-(n.index||0);(0,r.doesIntersect2)(t,t+u.length,e.start,e.end)&&a.next(new r.SimpleFeature({uniqueId:"".concat(this.id,"-match-").concat(t,"-n"),refName:e.refName,start:t-n[0].length,name:n[0],end:t,strand:-1}))}}}a.complete()}))}freeResources(){}}}}]);
//# sourceMappingURL=5490.0087b754.chunk.js.map