From e3cdd855a698033fc054717c289293c1c1e210dc Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 30 Oct 2023 22:28:11 -0400 Subject: [PATCH] LZMA support in CRAM branch for testing purposes --- inst/htmlwidgets/JBrowseR.js | 2 +- inst/htmlwidgets/JBrowseR.js.LICENSE.txt | 8 +- yarn.lock | 366 ++++++++++++----------- 3 files changed, 198 insertions(+), 178 deletions(-) diff --git a/inst/htmlwidgets/JBrowseR.js b/inst/htmlwidgets/JBrowseR.js index 389d427..86bf26f 100644 --- a/inst/htmlwidgets/JBrowseR.js +++ b/inst/htmlwidgets/JBrowseR.js @@ -1,2 +1,2 @@ /*! For license information please see JBrowseR.js.LICENSE.txt */ -(()=>{var e,t,r={28882:(e,t,r)=>{"use strict";r.d(t,{Z:()=>ne});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?s(w,--b):0,v--,10===g&&(v=1,y--),g}function E(){return g=b2||_(g)>3?"":" "}function I(e,t){for(;--t&&E()&&!(g<48||g>102||g>57&&g<65||g>70&&g<97););return k(e,P()+(t<6&&32==j()&&32==E()))}function R(e){for(;E();)switch(g){case e:return b;case 34:case 39:34!==e&&39!==e&&R(g);break;case 40:41===e&&R(e);break;case 92:E()}return b}function M(e,t){for(;E()&&e+g!==57&&(e+g!==84||47!==j()););return"/*"+k(t,b-1)+"*"+i(47===e?e:E())}function N(e){for(;!_(j());)E();return k(e,b)}var F="-ms-",Z="-moz-",D="-webkit-",B="comm",z="rule",G="decl",U="@keyframes";function H(e,t){for(var r="",n=d(e),o=0;o0&&p(Z)-m&&h(g>32?K(Z+";",n,r,m-1):K(c(Z," ","")+";",n,r,m-2),d);break;case 59:Z+=";";default:if(h(F=$(Z,t,r,y,v,o,f,C,L=[],R=[],m),a),123===_)if(0===v)q(Z,t,F,F,L,a,m,f,R);else switch(99===b&&110===s(Z,3)?100:b){case 100:case 108:case 109:case 115:q(e,F,F,n&&h($(e,F,F,0,0,o,f,C,o,L=[],m),R),o,R,m,f,n?L:R);break;default:q(Z,F,F,F,[""],R,0,f,R)}}y=v=g=0,S=k=1,C=Z="",m=u;break;case 58:m=1+p(Z),g=w;default:if(S<1)if(123==_)--S;else if(125==_&&0==S++&&125==O())continue;switch(Z+=i(_),_*S){case 38:k=v>0?1:(Z+="\f",-1);break;case 44:f[y++]=(p(Z)-1)*k,k=1;break;case 64:45===j()&&(Z+=T(E())),b=j(),v=m=p(C=Z+=N(P())),_++;break;case 45:45===w&&2==p(Z)&&(S=0)}}return a}function $(e,t,r,n,i,a,l,s,p,h,y){for(var v=i-1,m=0===i?a:[""],b=d(m),g=0,w=0,x=0;g0?m[O]+" "+E:c(E,/&\f/g,m[O])))&&(p[x++]=j);return S(e,t,r,0===i?z:s,p,h,y)}function Y(e,t,r){return S(e,t,r,B,i(g),f(e,2,-2),0)}function K(e,t,r,n){return S(e,t,r,G,f(e,0,n),f(e,n+1,-1),n)}var J=function(e,t,r){for(var n=0,o=0;n=o,o=j(),38===n&&12===o&&(t[r]=1),!_(o);)E();return k(e,b)},X=new WeakMap,Q=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||X.get(r))&&!n){X.set(e,!0);for(var o=[],a=function(e,t){return L(function(e,t){var r=-1,n=44;do{switch(_(n)){case 0:38===n&&12===j()&&(t[r]=1),e[r]+=J(b-1,t,r);break;case 2:e[r]+=T(n);break;case 4:if(44===n){e[++r]=58===j()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=i(n)}}while(n=E());return e}(C(e),t))}(t,o),u=r.props,c=0,l=0;c6)switch(s(e,t+1)){case 109:if(45!==s(e,t+4))break;case 102:return c(e,/(.+:)(.+)-([^]+)/,"$1"+D+"$2-$3$1"+Z+(108==s(e,t+3)?"$3":"$2-$3"))+e;case 115:return~l(e,"stretch")?te(c(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==s(e,t+1))break;case 6444:switch(s(e,p(e)-3-(~l(e,"!important")&&10))){case 107:return c(e,":",":"+D)+e;case 101:return c(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+D+(45===s(e,14)?"inline-":"")+"box$3$1"+D+"$2$3$1"+F+"$2box$3")+e}break;case 5936:switch(s(e,t+11)){case 114:return D+e+F+c(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return D+e+F+c(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return D+e+F+c(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return D+e+F+e+e}return e}var re=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case G:e.return=te(e.value,e.length);break;case U:return H([x(e,{value:c(e.value,"@","@"+D)})],n);case z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return H([x(e,{props:[c(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return H([x(e,{props:[c(t,/:(plac\w+)/,":"+D+"input-$1")]}),x(e,{props:[c(t,/:(plac\w+)/,":-moz-$1")]}),x(e,{props:[c(t,/:(plac\w+)/,F+"input-$1")]})],n)}return""}))}}],ne=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,a=e.stylisPlugins||re,u={},c=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r{"use strict";function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}r.d(t,{Z:()=>n})},43928:(e,t,r)=>{"use strict";r.d(t,{C:()=>u,T:()=>s,_:()=>c,i:()=>i,w:()=>l});var n=r(63313),o=r(28882);r(57601),r(87711);var i=!0,a=n.createContext("undefined"!=typeof HTMLElement?(0,o.Z)({key:"css"}):null),u=a.Provider,c=function(){return(0,n.useContext)(a)},l=function(e){return(0,n.forwardRef)((function(t,r){var o=(0,n.useContext)(a);return e(t,o,r)}))};i||(l=function(e){return function(t){var r=(0,n.useContext)(a);return null===r?(r=(0,o.Z)({key:"css"}),n.createElement(a.Provider,{value:r},e(t,r))):e(t,r)}});var s=n.createContext({})},73359:(e,t,r)=>{"use strict";r.d(t,{F4:()=>s,iv:()=>l,xB:()=>c});var n=r(43928),o=r(63313),i=r(67333),a=r(87711),u=r(57601);r(28882),r(89483);var c=(0,n.w)((function(e,t){var r=e.styles,c=(0,u.O)([r],void 0,o.useContext(n.T));if(!n.i){for(var l,s=c.name,f=c.styles,p=c.next;void 0!==p;)s+=" "+p.name,f+=p.styles,p=p.next;var d=!0===t.compat,h=t.insert("",{name:s,styles:f},t.sheet,d);return d?null:o.createElement("style",((l={})["data-emotion"]=t.key+"-global "+s,l.dangerouslySetInnerHTML={__html:h},l.nonce=t.sheet.nonce,l))}var y=o.useRef();return(0,a.j)((function(){var e=t.key+"-global",r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),n=!1,o=document.querySelector('style[data-emotion="'+e+" "+c.name+'"]');return t.sheet.tags.length&&(r.before=t.sheet.tags[0]),null!==o&&(n=!0,o.setAttribute("data-emotion",e),r.hydrate([o])),y.current=[r,n],function(){r.flush()}}),[t]),(0,a.j)((function(){var e=y.current,r=e[0];if(e[1])e[1]=!1;else{if(void 0!==c.next&&(0,i.My)(t,c.next,!0),r.tags.length){var n=r.tags[r.tags.length-1].nextElementSibling;r.before=n,r.flush()}t.insert("",c,r,!1)}}),[t,c.name]),null}));function l(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";r.d(t,{O:()=>y});var n={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=r(96531);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a=/[A-Z]|^ms/g,u=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},s=(0,o.Z)((function(e){return c(e)?e:e.replace(a,"-$&").toLowerCase()})),f=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(u,(function(e,t,r){return d={name:t,styles:r,next:d},t}))}return 1===n[e]||c(e)||"number"!=typeof t||0===t?t:t+"px"};function p(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(i(r)){case"boolean":return"";case"object":if(1===r.anim)return d={name:r.name,styles:r.styles,next:d},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)d={name:n.name,styles:n.styles,next:d},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+l;return{name:s,styles:o,next:d}}},87711:(e,t,r)=>{"use strict";r.d(t,{L:()=>i,j:()=>a});var n=r(63313),o=!!n.useInsertionEffect&&n.useInsertionEffect,i=o||function(e){return e()},a=o||n.useLayoutEffect},67333:(e,t,r)=>{"use strict";function n(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n}r.d(t,{My:()=>i,fp:()=>n,hC:()=>o});var o=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},i=function(e,t,r){o(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},19830:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;rs});var c=function(){function e(t,r){i(this,e),this.low=t,this.high=r}return u(e,[{key:"clone",value:function(){return new e(this.low,this.high)}},{key:"max",get:function(){return this.clone()}},{key:"less_than",value:function(e){return this.low0&&void 0!==arguments[0]?arguments[0]:void 0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;i(this,e),this.left=n,this.right=o,this.parent=a,this.color=u,this.item={key:t,value:r},t&&t instanceof Array&&2==t.length&&(Number.isNaN(t[0])||Number.isNaN(t[1])||(this.item.key=new c(Math.min(t[0],t[1]),Math.max(t[0],t[1])))),this.max=this.item.key?this.item.key.max:void 0}return u(e,[{key:"isNil",value:function(){return void 0===this.item.key&&void 0===this.item.value&&null===this.left&&null===this.right&&1===this.color}},{key:"_value_less_than",value:function(e){return this.item.value&&e.item.value&&this.item.value.less_than?this.item.value.less_than(e.item.value):this.item.value1&&void 0!==arguments[1]?arguments[1]:e,this.nil_node,this.nil_node,null,0);return this.tree_insert(t),this.recalc_max(t),t}}},{key:"exist",value:function(e){var t=new l(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:e);return!!this.tree_search(this.root,t)}},{key:"remove",value:function(e){var t=new l(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:e),r=this.tree_search(this.root,t);return r&&this.tree_delete(r),r}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return e===t?t.output():e},r=new l(e),n=[];return this.tree_search_interval(this.root,r,n),n.map((function(e){return t(e.item.value,e.item.key)}))}},{key:"intersect_any",value:function(e){var t=new l(e);return this.tree_find_any_interval(this.root,t)}},{key:"forEach",value:function(e){this.tree_walk(this.root,(function(t){return e(t.item.key,t.item.value)}))}},{key:"map",value:function(t){var r=new e;return this.tree_walk(this.root,(function(e){return r.insert(e.item.key,t(e.item.value,e.item.key))})),r}},{key:"iterate",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return e===t?t.output():e};return o().mark((function n(){var i;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:e?i=t.tree_search_nearest_forward(t.root,new l(e)):t.root&&(i=t.local_minimum(t.root));case 1:if(!i){n.next=7;break}return n.next=4,r(i.item.value,i.item.key);case 4:i=t.tree_successor(i),n.next=1;break;case 7:case"end":return n.stop()}}),n)}))()}},{key:"recalc_max",value:function(e){for(var t=e;null!=t.parent;)t.parent.update_max(),t=t.parent}},{key:"tree_insert",value:function(e){var t=this.root,r=null;if(null==this.root||this.root==this.nil_node)this.root=e;else{for(;t!=this.nil_node;)r=t,t=e.less_than(t)?t.left:t.right;e.parent=r,e.less_than(r)?r.left=e:r.right=e}this.insert_fixup(e)}},{key:"insert_fixup",value:function(e){var t,r;for(t=e;t!=this.root&&0==t.parent.color;)t.parent==t.parent.parent.left?0==(r=t.parent.parent.right).color?(t.parent.color=1,r.color=1,t.parent.parent.color=0,t=t.parent.parent):(t==t.parent.right&&(t=t.parent,this.rotate_left(t)),t.parent.color=1,t.parent.parent.color=0,this.rotate_right(t.parent.parent)):0==(r=t.parent.parent.left).color?(t.parent.color=1,r.color=1,t.parent.parent.color=0,t=t.parent.parent):(t==t.parent.left&&(t=t.parent,this.rotate_right(t)),t.parent.color=1,t.parent.parent.color=0,this.rotate_left(t.parent.parent));this.root.color=1}},{key:"tree_delete",value:function(e){var t,r;(r=(t=e.left==this.nil_node||e.right==this.nil_node?e:this.tree_successor(e)).left!=this.nil_node?t.left:t.right).parent=t.parent,t==this.root?this.root=r:(t==t.parent.left?t.parent.left=r:t.parent.right=r,t.parent.update_max()),this.recalc_max(r),t!=e&&(e.copy_data(t),e.update_max(),this.recalc_max(e)),1==t.color&&this.delete_fixup(r)}},{key:"delete_fixup",value:function(e){for(var t,r=e;r!=this.root&&null!=r.parent&&1==r.color;)r==r.parent.left?(0==(t=r.parent.right).color&&(t.color=1,r.parent.color=0,this.rotate_left(r.parent),t=r.parent.right),1==t.left.color&&1==t.right.color?(t.color=0,r=r.parent):(1==t.right.color&&(t.color=0,t.left.color=1,this.rotate_right(t),t=r.parent.right),t.color=r.parent.color,r.parent.color=1,t.right.color=1,this.rotate_left(r.parent),r=this.root)):(0==(t=r.parent.left).color&&(t.color=1,r.parent.color=0,this.rotate_right(r.parent),t=r.parent.left),1==t.left.color&&1==t.right.color?(t.color=0,r=r.parent):(1==t.left.color&&(t.color=0,t.right.color=1,this.rotate_left(t),t=r.parent.left),t.color=r.parent.color,r.parent.color=1,t.left.color=1,this.rotate_right(r.parent),r=this.root));r.color=1}},{key:"tree_search",value:function(e,t){if(null!=e&&e!=this.nil_node)return t.equal_to(e)?e:t.less_than(e)?this.tree_search(e.left,t):this.tree_search(e.right,t)}},{key:"tree_search_nearest_forward",value:function(e,t){for(var r,n=e;n&&n!=this.nil_node;)n.less_than(t)?n.intersect(t)?(r=n,n=n.left):n=n.right:(r&&!n.less_than(r)||(r=n),n=n.left);return r||null}},{key:"tree_search_interval",value:function(e,t,r){null!=e&&e!=this.nil_node&&(e.left==this.nil_node||e.not_intersect_left_subtree(t)||this.tree_search_interval(e.left,t,r),e.intersect(t)&&r.push(e),e.right==this.nil_node||e.not_intersect_right_subtree(t)||this.tree_search_interval(e.right,t,r))}},{key:"tree_find_any_interval",value:function(e,t){var r=!1;return null!=e&&e!=this.nil_node&&(e.left==this.nil_node||e.not_intersect_left_subtree(t)||(r=this.tree_find_any_interval(e.left,t)),r||(r=e.intersect(t)),r||e.right==this.nil_node||e.not_intersect_right_subtree(t)||(r=this.tree_find_any_interval(e.right,t))),r}},{key:"local_minimum",value:function(e){for(var t=e;null!=t.left&&t.left!=this.nil_node;)t=t.left;return t}},{key:"local_maximum",value:function(e){for(var t=e;null!=t.right&&t.right!=this.nil_node;)t=t.right;return t}},{key:"tree_successor",value:function(e){var t,r,n;if(e.right!=this.nil_node)t=this.local_minimum(e.right);else{for(r=e,n=e.parent;null!=n&&n.right==r;)r=n,n=n.parent;t=n}return t}},{key:"rotate_left",value:function(e){var t=e.right;e.right=t.left,t.left!=this.nil_node&&(t.left.parent=e),t.parent=e.parent,e==this.root?this.root=t:e==e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,null!=e&&e!=this.nil_node&&e.update_max(),null!=(t=e.parent)&&t!=this.nil_node&&t.update_max()}},{key:"rotate_right",value:function(e){var t=e.left;e.left=t.right,t.right!=this.nil_node&&(t.right.parent=e),t.parent=e.parent,e==this.root?this.root=t:e==e.parent.left?e.parent.left=t:e.parent.right=t,t.right=e,e.parent=t,null!=e&&e!=this.nil_node&&e.update_max(),null!=(t=e.parent)&&t!=this.nil_node&&t.update_max()}},{key:"tree_walk",value:function(e,t){null!=e&&e!=this.nil_node&&(this.tree_walk(e.left,t),t(e),this.tree_walk(e.right,t))}},{key:"testRedBlackProperty",value:function(){var e=!0;return this.tree_walk(this.root,(function(t){0==t.color&&(1==t.left.color&&1==t.right.color||(e=!1))})),e}},{key:"testBlackHeightProperty",value:function(e){var t,r=0;if(1==e.color&&r++,(t=e.left!=this.nil_node?this.testBlackHeightProperty(e.left):1)!=(e.right!=this.nil_node?this.testBlackHeightProperty(e.right):1))throw new Error("Red-black height property violated");return r+t}}]),e}()},23411:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;rVe,S5:()=>yt});var i=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.blockPosition=t,this.dataPosition=r}var t,r,n;return t=e,n=[{key:"min",value:function(){for(var e,t=0,r=arguments.length,n=new Array(r),o=0;o0&&(e=n[t]);return e}}],(r=[{key:"toString",value:function(){return"".concat(this.blockPosition,":").concat(this.dataPosition)}},{key:"compareTo",value:function(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])throw new Error("big-endian virtual file offsets not implemented");return new i(1099511627776*e[t+7]+4294967296*e[t+6]+16777216*e[t+5]+65536*e[t+4]+256*e[t+3]+e[t+2],e[t+1]<<8|e[t])}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};return"aborted"in e?{signal:e}:e}function v(e,t){var r,n=[];if(0===e.length)return e;e.sort((function(e,t){var r=e.minv.blockPosition-t.minv.blockPosition;return 0===r?e.minv.dataPosition-t.minv.dataPosition:r}));var o,i,a,u=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(u.s();!(o=u.n()).done;){var c=o.value;(!t||c.maxv.compareTo(t)>0)&&(void 0===r?(n.push(c),r=c):(i=r,(a=c).minv.blockPosition-i.maxv.blockPosition<65e3&&a.maxv.blockPosition-i.minv.blockPosition<5e6?c.maxv.compareTo(r.maxv)>0&&(r.maxv=c.maxv):(n.push(c),r=c)))}}catch(e){u.e(e)}finally{u.f()}return n}function m(e,t){return{lineCount:function(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}(f().fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function b(e,t){return e?e.compareTo(t)>0?t:e:t}function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function w(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function P(e,t){if(e){if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function T(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function A(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){T(i,n,o,a,u,"next",e)}function u(e){T(i,n,o,a,u,"throw",e)}a(void 0)}))}}function I(e,t){for(var r=0;r>26),1+((t-=1)>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}var D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M(e,t)}(h,e);var t,r,n,o,i,u,c,s,f,p,d=(f=h,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=N(f);if(p){var r=N(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function h(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),d.apply(this,arguments)}return t=h,r=[{key:"lineCount",value:(s=A(L().mark((function e(t,r){var n,o,i;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.parse(r);case 2:return i=e.sent,e.abrupt("return",(null===(o=null===(n=i.indices[t])||void 0===n?void 0:n.stats)||void 0===o?void 0:o.lineCount)||0);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"_parse",value:(c=A(L().mark((function e(t){var r,n,o,i,u,c,s,f,p,d,h,y,v,g,w,S,x,O,E,j,P;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.filehandle.readFile(t);case 2:if(21578050===(r=e.sent).readUInt32LE(0)){e.next=5;break}throw new Error("Not a BAI file");case 5:n=r.readInt32LE(4),o=37449,i=8,c=new Array(n),s=0;case 11:if(!(so+1)){e.next=30;break}throw new Error("bai index contains too many bins, please use CSI");case 30:for(v=r.readInt32LE(i),i+=4,g=new Array(v),w=0;w3&&void 0!==g[3]?g[3]:{},i=16384,a=void 0!==r,e.next=5,this.parse(o);case 5:if(u=e.sent,c=u.indices[t]){e.next=9;break}return e.abrupt("return",[]);case 9:if(l=c.linearIndex,s=void 0===l?[]:l,f=c.stats,0!==s.length){e.next=12;break}return e.abrupt("return",[]);case 12:if(p=void 0===n?(s.length-1)*i:(w=n)-w%(S=i)+S,d=void 0===r?0:F(r,i),h=new Array(a?(p-d)/i:s.length-1),y=s[s.length-1].blockPosition,!(p>(s.length-1)*i)){e.next=18;break}throw new Error("query outside of range of linear index");case 18:for(v=s[d/i].blockPosition,m=d/i,b=0;m

3&&void 0!==_[3]?_[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return",[]);case 7:if(a=i.indices[t]){e.next=10;break}return e.abrupt("return",[]);case 10:u=Z(r,n),c=[],l=j(u);try{for(l.s();!(s=l.n()).done;)for(f=E(s.value,2),p=f[0],d=f[1],h=p;h<=d;h++)if(a.binIndex[h]){y=a.binIndex[h],m=j(y);try{for(m.s();!(b=m.n()).done;)g=b.value,c.push(g)}catch(e){m.e(e)}finally{m.f()}}}catch(e){l.e(e)}finally{l.f()}for(w=a.linearIndex.length,x=Math.min(r>>14,w-1),O=Math.min(n>>14,w-1),P=x;P<=O;++P)(k=a.linearIndex[P])&&(!S||k.compareTo(S)<0)&&(S=k);return e.abrupt("return",v(c,S));case 19:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return i.apply(this,arguments)})},{key:"parse",value:(o=A(L().mark((function e(){var t,r=this,n=arguments;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},this.setupP||(this.setupP=this._parse(t).catch((function(e){throw r.setupP=void 0,e}))),e.abrupt("return",this.setupP);case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"hasRefSeq",value:(n=A(L().mark((function e(t){var r,n,o,i=arguments;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},e.next=3,this.parse(r);case 3:return o=e.sent,e.abrupt("return",!!(null===(n=o.indices[t])||void 0===n?void 0:n.binIndex));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&I(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),h}(x),B=r(80365),z=r(40661),G=r.n(z),U=r(41589),H=r(93403),V=r(33860),W=r.n(V),q=r(94877),$=r.n(q);function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function K(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=J(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function J(e,t){if(e){if("string"==typeof e)return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(e,t):void 0}}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function re(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function ne(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){re(i,n,o,a,u,"next",e)}function u(e){re(i,n,o,a,u,"throw",e)}a(void 0)}))}}function oe(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:function(e){return e},r=0,n=0,o=[],i={},a=0;a=30?this.parseAuxData(n,16):void 0,c=n.readInt32LE(16+i),s=16+i+4,p=new Array(c),d=0;dthis.maxBinNumber)v=m(n,s+28),s+=44;else{for(f=b(f,a(n,s)),s+=8,S=n.readInt32LE(s),s+=4,x=new Array(S),O=0;O3&&void 0!==S[3]?S[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(a=e.sent,u=null==a?void 0:a.indices[t]){e.next=8;break}return e.abrupt("return",[]);case 8:if(0!==(c=this.reg2bins(r,n)).length){e.next=11;break}return e.abrupt("return",[]);case 11:l=[],s=K(c);try{for(s.s();!(f=s.n()).done;)for(x=f.value,O=2,p=function(e){if(Array.isArray(e))return e}(x)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(x,O)||J(x,O)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=p[0],h=p[1],y=d;y<=h;y++)if(u.binIndex[y]){m=u.binIndex[y],b=K(m);try{for(b.s();!(g=b.n()).done;)w=g.value,l.push(w)}catch(e){b.e(e)}finally{b.f()}}}catch(e){s.e(e)}finally{s.f()}return e.abrupt("return",v(l,new i(0,0)));case 15:case"end":return e.stop()}var x,O}),e,this)}))),function(e,t,r){return u.apply(this,arguments)})},{key:"reg2bins",value:function(e,t){(e-=1)<1&&(e=1),t>Math.pow(2,50)&&(t=Math.pow(2,34)),t-=1;for(var r,n=0,o=0,i=this.minShift+3*this.depth,a=[];n<=this.depth;i-=3,o+=(r=3*n,1*Math.pow(2,r)),n+=1){var u=o+ce(e,i),c=o+ce(t,i);if(c-u+a.length>this.maxBinNumber)throw new Error("query ".concat(e,"-").concat(t," is too large for current binning scheme (shift ").concat(this.minShift,", depth ").concat(this.depth,"), try a smaller query or a coarser index binning scheme"));a.push([u,c])}return a}},{key:"parse",value:(o=ne(te().mark((function e(){var t,r=this,n=arguments;return te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},this.setupP||(this.setupP=this._parse(t).catch((function(e){throw r.setupP=void 0,e}))),e.abrupt("return",this.setupP);case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"hasRefSeq",value:(n=ne(te().mark((function e(t){var r,n,o,i=arguments;return te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},e.next=3,this.parse(r);case 3:return o=e.sent,e.abrupt("return",!!(null===(n=o.indices[t])||void 0===n?void 0:n.binIndex));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&oe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),y}(x);function se(e){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(e)}function fe(e,t){for(var r=0;r>16}var t,r;return t=e,(r=[{key:"get",value:function(e){return this[e]?(this.data[e]||(this.data[e]=this[e]()),this.data[e]):this._get(e.toLowerCase())}},{key:"end",value:function(){return this.get("start")+this.get("length_on_ref")}},{key:"seq_id",value:function(){return this._refID}},{key:"_get",value:function(e){return e in this.data||(this.data[e]=this._parseTag(e)),this.data[e]}},{key:"_tags",value:function(){var e=this;this._parseAllTags();var t=["seq"];this.isSegmentUnmapped()||t.push("start","end","strand","score","qual","MQ","CIGAR","length_on_ref","template_length"),this.isPaired()&&t.push("next_segment_position","pair_orientation"),t=t.concat(this._tagList||[]);for(var r=0,n=Object.keys(this.data);r>8;return 255===e?void 0:e}},{key:"score",value:function(){return this.get("mq")}},{key:"qual",value:function(){var e;return null===(e=this.qualRaw())||void 0===e?void 0:e.join(" ")}},{key:"qualRaw",value:function(){if(!this.isSegmentUnmapped()){var e=this.bytes,t=e.start,r=e.byteArray,n=t+36+this.get("_l_read_name")+4*this.get("_n_cigar_op")+this.get("_seq_bytes"),o=this.get("seq_length");return r.subarray(n,n+o)}}},{key:"strand",value:function(){return this.isReverseComplemented()?-1:1}},{key:"multi_segment_next_segment_strand",value:function(){if(!this.isMateUnmapped())return this.isMateReverseComplemented()?-1:1}},{key:"name",value:function(){return this.get("_read_name")}},{key:"_read_name",value:function(){var e=this.get("_l_read_name"),t=this.bytes,r=t.byteArray,n=t.start;return r.toString("ascii",n+36,n+36+e-1)}},{key:"_parseTag",value:function(e){if(!this._allTagsParsed){for(var t,r=this.bytes,n=r.byteArray,o=r.start,i=this._tagOffset||o+36+this.get("_l_read_name")+4*this.get("_n_cigar_op")+this.get("_seq_bytes")+this.get("seq_length"),a=this.bytes.end;i>4)+de[15&y],i+=4}else for(var v=0;v>4)+de[15&b],i+=4}else for(var g=0;g>4,s=de[15&c];if("S"===s&&l===i)return o+=4,l=(c=t.readInt32LE(o))>>4,"N"!==(s=de[15&c])&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(var f=0;f>4)+(s=de[15&c]),"H"!==s&&"S"!==s&&"I"!==s&&(u+=l),o+=4;return this.data.length_on_ref=u,a}}},{key:"_flags",value:function(){}},{key:"length_on_ref",value:function(){return this.data.length_on_ref||this.get("cigar"),this.data.length_on_ref}},{key:"_n_cigar_op",value:function(){return 65535&this.get("_flag_nc")}},{key:"_l_read_name",value:function(){return 255&this.get("_bin_mq_nl")}},{key:"_seq_bytes",value:function(){return this.get("seq_length")+1>>1}},{key:"getReadBases",value:function(){return this.seq()}},{key:"seq",value:function(){for(var e=this.bytes,t=e.byteArray,r=e.start+36+this.get("_l_read_name")+4*this.get("_n_cigar_op"),n=this.get("_seq_bytes"),o=this.get("seq_length"),i="",a=0,u=0;u>4],++a0?(o[0]=e,o[1]=r,o[2]=t,o[3]=n):(o[2]=e,o[3]=r,o[0]=t,o[1]=n),o.join("")}return""}},{key:"_bin_mq_nl",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+12)}},{key:"_flag_nc",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+16)}},{key:"seq_length",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+20)}},{key:"_next_refid",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+24)}},{key:"_next_pos",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+28)}},{key:"template_length",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+32)}},{key:"toJSON",value:function(){for(var e={},t=0,r=Object.keys(this);te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.split(/\r?\n/));try{for(o.s();!(t=o.n()).done;){var i=me(r=t.value.split(/\t/))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||be(r)||ve(),a=i[0],u=i.slice(1);a&&n.push({tag:a.slice(1),data:u.map((function(e){var t=ye(e.split(":",2),2);return{tag:t[0],value:t[1]}}))})}}catch(e){o.e(e)}finally{o.f()}return n}function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function xe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Oe(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Oe(e,t){if(e){if("string"==typeof e)return Ee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ee(e,t):void 0}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ke(e){for(var t=1;t0&&void 0!==r[0]?r[0]:{},e.next=3,this.getHeader(t);case 3:return e.abrupt("return",this.header);case 4:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"_readRefSeqs",value:(s=Ie(je().mark((function e(t,r,n){var o,i,a,u,c,l,s,f,p,d,h,y,v;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t>r)){e.next=2;break}return e.abrupt("return",this._readRefSeqs(t,2*r,n));case 2:return o=r+65536,e.next=5,this.bam.read(B.Buffer.alloc(o),0,r,0,n);case 5:if(i=e.sent,a=i.bytesRead,u=i.buffer,a){e.next=10;break}throw new Error("Error reading refseqs from header");case 10:return e.next=12,(0,U.unzip)(u.subarray(0,Math.min(a,r)));case 12:c=e.sent,l=c.readInt32LE(t),s=t+4,f={},p=[],d=0;case 18:if(!(dc.length)){e.next=28;break}return console.warn("BAM header is very big. Re-fetching ".concat(r," bytes.")),e.abrupt("return",this._readRefSeqs(t,2*r,n));case 28:d+=1,e.next=18;break;case 31:return e.abrupt("return",{chrToIndex:f,indexToChr:p});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return s.apply(this,arguments)})},{key:"getRecordsForRange",value:(l=Ie(je().mark((function e(t,r,n,o){return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ge(this.streamRecordsForRange(t,r,n,o)));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return l.apply(this,arguments)})},{key:"streamRecordsForRange",value:function(e,t,r,n){var o=this;return Re(je().mark((function i(){var a,u,c;return je().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Ne(o.getHeader(n));case 2:if(void 0!==(u=null===(a=o.chrToIndex)||void 0===a?void 0:a[e])&&o.index){i.next=8;break}return i.next=6,[];case 6:i.next=12;break;case 8:return i.next=10,Ne(o.index.blocksForRange(u,t-1,r,n));case 10:return c=i.sent,i.delegateYield(Fe(De(o._fetchChunkFeatures(c,u,t,r,n))),"t0",12);case 12:case"end":return i.stop()}}),i)})))()}},{key:"_fetchChunkFeatures",value:function(e,t,r,n){var o=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return Re(je().mark((function a(){var u,c,l,s,f,p,d,y,v,m,b;return je().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:u=i.viewAsPairs,c=[],l=!1,s=xe(e),a.prev=4,s.s();case 6:if((f=s.n()).done){a.next=41;break}return p=f.value,a.next=10,Ne(o.featureCache.get(p.toString(),{chunk:p,opts:i},i.signal));case 10:d=a.sent,y=[],v=xe(d),a.prev=13,v.s();case 15:if((m=v.n()).done){a.next=26;break}if((b=m.value).seq_id()!==t){a.next=24;break}if(!(b.get("start")>=n)){a.next=23;break}return l=!0,a.abrupt("break",26);case 23:b.get("end")>=r&&y.push(b);case 24:a.next=15;break;case 26:a.next=31;break;case 28:a.prev=28,a.t0=a.catch(13),v.e(a.t0);case 31:return a.prev=31,v.f(),a.finish(31);case 34:return c.push(y),a.next=37,y;case 37:if(!l){a.next=39;break}return a.abrupt("break",41);case 39:a.next=6;break;case 41:a.next=46;break;case 43:a.prev=43,a.t1=a.catch(4),s.e(a.t1);case 46:return a.prev=46,s.f(),a.finish(46);case 49:if(h(i.signal),!u){a.next=53;break}return a.next=53,o.fetchPairs(t,c,i);case 53:case"end":return a.stop()}}),a,null,[[4,43,46,49],[13,28,31,34]])})))()}},{key:"fetchPairs",value:(c=Ie(je().mark((function e(t,r,n){var o,i,a,u,c,l,s,f,p,d,h,y,v=this;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.pairAcrossChr,i=n.maxInsertSize,a=void 0===i?2e5:i,u={},c={},r.map((function(e){var t,r,n,o={},i=xe(e);try{for(i.s();!(t=i.n()).done;){var a=t.value,l=a.name(),s=a.id();o[l]||(o[l]=0),o[l]++,c[s]=1}}catch(e){i.e(e)}finally{i.f()}for(var f=0,p=Object.entries(o);f2&&void 0!==u[2]?u[2]:{},e.next=3,this.bam.read(B.Buffer.alloc(r),0,r,t,n);case 3:return o=e.sent,i=o.bytesRead,a=o.buffer,e.abrupt("return",a.subarray(0,Math.min(i,r)));case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"_readChunk",value:(a=Ie(je().mark((function e(t){var r,n,o,i,a,u,c;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.chunk,n=t.opts,e.next=3,this._readRegion(r.minv.blockPosition,r.fetchedSize(),n);case 3:return o=e.sent,e.next=6,(0,U.unzipChunkSlice)(o,r);case 6:return i=e.sent,a=i.buffer,u=i.cpositions,c=i.dpositions,e.abrupt("return",{data:a,cpositions:u,dpositions:c,chunk:r});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"readBamFeatures",value:(i=Ie(je().mark((function e(t,r,n,o){var i,a,u,c,l,s,f;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=0,a=[],u=0,c=+Date.now();case 4:if(!(i+4=n[u++];);u--}if(!(s0?256*r[u]+(i-n[u])+o.minv.dataPosition+1:G().signed(t.slice(i,s))}),a.push(f),!(this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime)){e.next=15;break}return e.next=14,d(1);case 14:c=+Date.now();case 15:i=s+1,e.next=4;break;case 18:return e.abrupt("return",a);case 19:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return i.apply(this,arguments)})},{key:"hasRefSeq",value:(o=Ie(je().mark((function e(t){var r,n,o;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=null===(r=this.chrToIndex)||void 0===r?void 0:r[t],e.abrupt("return",void 0!==o&&(null===(n=this.index)||void 0===n?void 0:n.hasRefSeq(o)));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"lineCount",value:(n=Ie(je().mark((function e(t){var r,n;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null===(r=this.chrToIndex)||void 0===r?void 0:r[t],e.abrupt("return",void 0!==n&&this.index?this.index.lineCount(n):0);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"indexCov",value:(r=Ie(je().mark((function e(t,r,n){var o,i;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.index){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.index.parse();case 4:return i=null===(o=this.chrToIndex)||void 0===o?void 0:o[t],e.abrupt("return",void 0===i?[]:this.index.indexCov(i,r,n));case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"blocksForRange",value:(t=Ie(je().mark((function e(t,r,n,o){var i,a;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.index){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.index.parse();case 4:return a=null===(i=this.chrToIndex)||void 0===i?void 0:i[t],e.abrupt("return",void 0===a?[]:this.index.blocksForRange(a,r,n,o));case 6:case"end":return e.stop()}}),e,this)}))),function(e,r,n,o){return t.apply(this,arguments)})}]),e}();function We(e){return We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},We(e)}var qe=["referer"];function $e(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ye(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ke(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ke(e,t){if(e){if("string"==typeof e)return Je(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Je(e,t):void 0}}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function et(e){for(var t=1;t0&&void 0!==x[0]?x[0]:{},r="".concat(this.baseUrl,"/").concat(this.trackId,"?referenceName=na&class=header"),e.next=4,fetch(r,t);case 4:if((n=e.sent).ok){e.next=13;break}return e.t0=Error,e.t1="HTTP ".concat(n.status," fetching ").concat(r,": "),e.next=10,n.text();case 10:throw e.t2=e.sent,e.t3=e.t1.concat.call(e.t1,e.t2),new e.t0(e.t3);case 13:return e.next=15,n.json();case 15:return o=e.sent,e.next=18,dt(o.htsget.urls,t);case 18:if((i=e.sent).readInt32LE(0)===ze){e.next=21;break}throw new Error("Not a BAM file");case 21:a=i.readInt32LE(4),u=i.toString("utf8",8,8+a),c=we(u),l=[],s={},f=c.filter((function(e){return"SQ"===e.tag})),p=Ye(f.entries());try{for(p.s();!(d=p.n()).done;){O=d.value,E=2,h=function(e){if(Array.isArray(e))return e}(O)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(O,E)||Ke(O,E)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=h[0],v=h[1],m="",b=0,g=Ye(v.data);try{for(g.s();!(w=g.n()).done;)"SN"===(S=w.value).tag?m=S.value:"LN"===S.tag&&(b=+S.value)}catch(e){g.e(e)}finally{g.f()}s[m]=y,l[y]={refName:m,length:b}}}catch(e){p.e(e)}finally{p.f()}return this.chrToIndex=s,this.indexToChr=l,e.abrupt("return",c);case 32:case"end":return e.stop()}var O,E}),e,this)}))),function(){return n.apply(this,arguments)})}],r&&tt(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(Ve)},2744:(e,t,r)=>{"use strict";r.d(t,{Q:()=>Dn,B:()=>wn});var n=BigInt(32);"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return function(e,t,r){var o=Number(!!r),i=Number(!r);return BigInt(e.getInt32(t,r)*i+e.getInt32(t+4,r)*o)<>n),a=Number(r&BigInt(4294967295));o?(e.setInt32(t+4,i,o),e.setUint32(t,a,o)):(e.setInt32(t,i,o),e.setUint32(t+4,a,o))}(this,e,t,r)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,r){!function(e,t,r,o){var i=Number(r>>n),a=Number(r&BigInt(4294967295));o?(e.setUint32(t+4,i,o),e.setUint32(t,a,o)):(e.setUint32(t,i,o),e.setUint32(t+4,a,o))}(this,e,t,r)});var o=r(80365);class i{constructor(e,t){this.code="",this.scopes=[["vars"]],this.bitFields=[],this.tmpVariableCount=0,this.references=new Map,this.imports=[],this.reverseImports=new Map,this.useContextVariables=!1,this.importPath=e,this.useContextVariables=t}generateVariable(e){const t=[...this.scopes[this.scopes.length-1]];return e&&t.push(e),t.join(".")}generateOption(e){switch(typeof e){case"number":return e.toString();case"string":return this.generateVariable(e);case"function":return`${this.addImport(e)}.call(${this.generateVariable()}, vars)`}}generateError(e){this.pushCode(`throw new Error(${e});`)}generateTmpVariable(){return"$tmp"+this.tmpVariableCount++}pushCode(e){this.code+=e+"\n"}pushPath(e){e&&this.scopes[this.scopes.length-1].push(e)}popPath(e){e&&this.scopes[this.scopes.length-1].pop()}pushScope(e){this.scopes.push([e])}popScope(){this.scopes.pop()}addImport(e){if(!this.importPath)return`(${e})`;let t=this.reverseImports.get(e);return t||(t=this.imports.push(e)-1,this.reverseImports.set(e,t)),`${this.importPath}[${t}]`}addReference(e){this.references.has(e)||this.references.set(e,{resolved:!1,requested:!1})}markResolved(e){const t=this.references.get(e);t&&(t.resolved=!0)}markRequested(e){e.forEach((e=>{const t=this.references.get(e);t&&(t.requested=!0)}))}getUnresolvedReferences(){return Array.from(this.references).filter((([e,t])=>!t.resolved&&!t.requested)).map((([e,t])=>e))}}const a=new Map,u="___parser_",c={uint8:1,uint16le:2,uint16be:2,uint32le:4,uint32be:4,int8:1,int16le:2,int16be:2,int32le:4,int32be:4,int64be:8,int64le:8,uint64be:8,uint64le:8,floatle:4,floatbe:4,doublele:8,doublebe:8},l={uint8:"Uint8",uint16le:"Uint16",uint16be:"Uint16",uint32le:"Uint32",uint32be:"Uint32",int8:"Int8",int16le:"Int16",int16be:"Int16",int32le:"Int32",int32be:"Int32",int64be:"BigInt64",int64le:"BigInt64",uint64be:"BigUint64",uint64le:"BigUint64",floatle:"Float32",floatbe:"Float32",doublele:"Float64",doublebe:"Float64"},s={uint8:!1,uint16le:!0,uint16be:!1,uint32le:!0,uint32be:!1,int8:!1,int16le:!0,int16be:!1,int32le:!0,int32be:!1,int64be:!1,int64le:!0,uint64be:!1,uint64le:!0,floatle:!0,floatbe:!1,doublele:!0,doublebe:!1};class f{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new f}primitiveGenerateN(e,t){const r=l[e],n=s[e];t.pushCode(`${t.generateVariable(this.varName)} = dataView.get${r}(offset, ${n});`),t.pushCode(`offset += ${c[e]};`)}primitiveN(e,t,r){return this.setNextParser(e,t,r)}useThisEndian(e){return e+this.endian.toLowerCase()}uint8(e,t={}){return this.primitiveN("uint8",e,t)}uint16(e,t={}){return this.primitiveN(this.useThisEndian("uint16"),e,t)}uint16le(e,t={}){return this.primitiveN("uint16le",e,t)}uint16be(e,t={}){return this.primitiveN("uint16be",e,t)}uint32(e,t={}){return this.primitiveN(this.useThisEndian("uint32"),e,t)}uint32le(e,t={}){return this.primitiveN("uint32le",e,t)}uint32be(e,t={}){return this.primitiveN("uint32be",e,t)}int8(e,t={}){return this.primitiveN("int8",e,t)}int16(e,t={}){return this.primitiveN(this.useThisEndian("int16"),e,t)}int16le(e,t={}){return this.primitiveN("int16le",e,t)}int16be(e,t={}){return this.primitiveN("int16be",e,t)}int32(e,t={}){return this.primitiveN(this.useThisEndian("int32"),e,t)}int32le(e,t={}){return this.primitiveN("int32le",e,t)}int32be(e,t={}){return this.primitiveN("int32be",e,t)}bigIntVersionCheck(){if(!DataView.prototype.getBigInt64)throw new Error("BigInt64 is unsupported on this runtime")}int64(e,t={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("int64"),e,t)}int64be(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("int64be",e,t)}int64le(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("int64le",e,t)}uint64(e,t={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("uint64"),e,t)}uint64be(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("uint64be",e,t)}uint64le(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("uint64le",e,t)}floatle(e,t={}){return this.primitiveN("floatle",e,t)}floatbe(e,t={}){return this.primitiveN("floatbe",e,t)}doublele(e,t={}){return this.primitiveN("doublele",e,t)}doublebe(e,t={}){return this.primitiveN("doublebe",e,t)}bitN(e,t,r){return r.length=e,this.setNextParser("bit",t,r)}bit1(e,t={}){return this.bitN(1,e,t)}bit2(e,t={}){return this.bitN(2,e,t)}bit3(e,t={}){return this.bitN(3,e,t)}bit4(e,t={}){return this.bitN(4,e,t)}bit5(e,t={}){return this.bitN(5,e,t)}bit6(e,t={}){return this.bitN(6,e,t)}bit7(e,t={}){return this.bitN(7,e,t)}bit8(e,t={}){return this.bitN(8,e,t)}bit9(e,t={}){return this.bitN(9,e,t)}bit10(e,t={}){return this.bitN(10,e,t)}bit11(e,t={}){return this.bitN(11,e,t)}bit12(e,t={}){return this.bitN(12,e,t)}bit13(e,t={}){return this.bitN(13,e,t)}bit14(e,t={}){return this.bitN(14,e,t)}bit15(e,t={}){return this.bitN(15,e,t)}bit16(e,t={}){return this.bitN(16,e,t)}bit17(e,t={}){return this.bitN(17,e,t)}bit18(e,t={}){return this.bitN(18,e,t)}bit19(e,t={}){return this.bitN(19,e,t)}bit20(e,t={}){return this.bitN(20,e,t)}bit21(e,t={}){return this.bitN(21,e,t)}bit22(e,t={}){return this.bitN(22,e,t)}bit23(e,t={}){return this.bitN(23,e,t)}bit24(e,t={}){return this.bitN(24,e,t)}bit25(e,t={}){return this.bitN(25,e,t)}bit26(e,t={}){return this.bitN(26,e,t)}bit27(e,t={}){return this.bitN(27,e,t)}bit28(e,t={}){return this.bitN(28,e,t)}bit29(e,t={}){return this.bitN(29,e,t)}bit30(e,t={}){return this.bitN(30,e,t)}bit31(e,t={}){return this.bitN(31,e,t)}bit32(e,t={}){return this.bitN(32,e,t)}namely(e){return a.set(e,this),this.alias=e,this}skip(e,t={}){return this.seek(e,t)}seek(e,t={}){if(t.assert)throw new Error("assert option on seek is not allowed.");return this.setNextParser("seek","",{length:e})}string(e,t){if(!t.zeroTerminated&&!t.length&&!t.greedy)throw new Error("One of length, zeroTerminated, or greedy must be defined for string.");if((t.zeroTerminated||t.length)&&t.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(t.stripNull&&!t.length&&!t.greedy)throw new Error("length or greedy must be defined if stripNull is enabled.");return t.encoding=t.encoding||"utf8",this.setNextParser("string",e,t)}buffer(e,t){if(!t.length&&!t.readUntil)throw new Error("length or readUntil must be defined for buffer.");return this.setNextParser("buffer",e,t)}wrapped(e,t){if("object"!=typeof t&&"object"==typeof e&&(t=e,e=""),!t||!t.wrapper||!t.type)throw new Error("Both wrapper and type must be defined for wrapped.");if(!t.length&&!t.readUntil)throw new Error("length or readUntil must be defined for wrapped.");return this.setNextParser("wrapper",e,t)}array(e,t){if(!t.readUntil&&!t.length&&!t.lengthInBytes)throw new Error("One of readUntil, length and lengthInBytes must be defined for array.");if(!t.type)throw new Error("type is required for array.");if("string"==typeof t.type&&!a.has(t.type)&&!(t.type in c))throw new Error(`Array element type "${t.type}" is unkown.`);return this.setNextParser("array",e,t)}choice(e,t){if("object"!=typeof t&&"object"==typeof e&&(t=e,e=""),!t)throw new Error("tag and choices are are required for choice.");if(!t.tag)throw new Error("tag is requird for choice.");if(!t.choices)throw new Error("choices is required for choice.");for(const e in t.choices){const r=parseInt(e,10),n=t.choices[r];if(isNaN(r))throw new Error(`Choice key "${e}" is not a number.`);if("string"==typeof n&&!a.has(n)&&!(n in c))throw new Error(`Choice type "${n}" is unkown.`)}return this.setNextParser("choice",e,t)}nest(e,t){if("object"!=typeof t&&"object"==typeof e&&(t=e,e=""),!t||!t.type)throw new Error("type is required for nest.");if(!(t.type instanceof f||a.has(t.type)))throw new Error("type must be a known parser name or a Parser object.");if(!(t.type instanceof f||e))throw new Error("type must be a Parser object if the variable name is omitted.");return this.setNextParser("nest",e,t)}pointer(e,t){if(!t.offset)throw new Error("offset is required for pointer.");if(!t.type)throw new Error("type is required for pointer.");if("string"==typeof t.type&&!(t.type in c)&&!a.has(t.type))throw new Error(`Pointer type "${t.type}" is unkown.`);return this.setNextParser("pointer",e,t)}saveOffset(e,t={}){return this.setNextParser("saveOffset",e,t)}endianness(e){switch(e.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error('endianness must be one of "little" or "big"')}return this}endianess(e){return this.endianness(e)}useContextVars(e=!0){return this.useContextVariables=e,this}create(e){if(!(e instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=e,this}getContext(e){const t=new i(e,this.useContextVariables);return t.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(t),t.pushCode(`return ${u+this.alias}(0).result;`)):this.addRawCode(t),t}getCode(){return this.getContext("imports").code}addRawCode(e){e.pushCode("var offset = 0;"),e.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),e.pushCode("vars.$parent = null;"),e.pushCode("vars.$root = vars;"),this.generate(e),this.resolveReferences(e),e.pushCode("delete vars.$parent;"),e.pushCode("delete vars.$root;"),e.pushCode("return vars;")}addAliasedCode(e){return e.pushCode(`function ${u+this.alias}(offset, context) {`),e.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),e.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"),e.pushCode("vars = Object.assign(vars, ctx);"),this.generate(e),e.markResolved(this.alias),this.resolveReferences(e),e.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"),e.pushCode("return { offset: offset, result: vars };"),e.pushCode("}"),e}resolveReferences(e){const t=e.getUnresolvedReferences();e.markRequested(t),t.forEach((t=>{var r;null===(r=a.get(t))||void 0===r||r.addAliasedCode(e)}))}compile(){const e="imports",t=this.getContext(e);this.compiled=new Function(e,"TextDecoder",`return function (buffer, constructorFn) { ${t.code} };`)(t.imports,TextDecoder)}sizeOf(){let e=NaN;if(Object.keys(c).indexOf(this.type)>=0)e=c[this.type];else if("string"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("buffer"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("array"===this.type&&"number"==typeof this.options.length){let t=NaN;"string"==typeof this.options.type?t=c[this.options.type]:this.options.type instanceof f&&(t=this.options.type.sizeOf()),e=this.options.length*t}else"seek"===this.type?e=this.options.length:"nest"===this.type?e=this.options.type.sizeOf():this.type||(e=0);return this.next&&(e+=this.next.sizeOf()),e}parse(e){return this.compiled||this.compile(),this.compiled(e,this.constructorFn)}setNextParser(e,t,r){const n=new f;return n.type=e,n.varName=t,n.options=r,n.endian=this.endian,this.head?this.head.next=n:this.next=n,this.head=n,this}generate(e){if(this.type){switch(this.type){case"uint8":case"uint16le":case"uint16be":case"uint32le":case"uint32be":case"int8":case"int16le":case"int16be":case"int32le":case"int32be":case"int64be":case"int64le":case"uint64be":case"uint64le":case"floatle":case"floatbe":case"doublele":case"doublebe":this.primitiveGenerateN(this.type,e);break;case"bit":this.generateBit(e);break;case"string":this.generateString(e);break;case"buffer":this.generateBuffer(e);break;case"seek":this.generateSeek(e);break;case"nest":this.generateNest(e);break;case"array":this.generateArray(e);break;case"choice":this.generateChoice(e);break;case"pointer":this.generatePointer(e);break;case"saveOffset":this.generateSaveOffset(e);break;case"wrapper":this.generateWrapper(e)}"bit"!==this.type&&this.generateAssert(e)}const t=e.generateVariable(this.varName);return this.options.formatter&&"bit"!==this.type&&this.generateFormatter(e,t,this.options.formatter),this.generateNext(e)}generateAssert(e){if(!this.options.assert)return;const t=e.generateVariable(this.varName);switch(typeof this.options.assert){case"function":{const r=e.addImport(this.options.assert);e.pushCode(`if (!${r}.call(vars, ${t})) {`)}break;case"number":e.pushCode(`if (${this.options.assert} !== ${t}) {`);break;case"string":e.pushCode(`if (${JSON.stringify(this.options.assert)} !== ${t}) {`);break;default:throw new Error("assert option must be a string, number or a function.")}e.generateError(`"Assertion error: ${t} is " + ${JSON.stringify(this.options.assert.toString())}`),e.pushCode("}")}generateNext(e){return this.next&&(e=this.next.generate(e)),e}generateBit(e){const t=JSON.parse(JSON.stringify(this));if(t.options=this.options,t.generateAssert=this.generateAssert.bind(this),t.generateFormatter=this.generateFormatter.bind(this),t.varName=e.generateVariable(t.varName),e.bitFields.push(t),!this.next||this.next&&["bit","nest"].indexOf(this.next.type)<0){const t=e.generateTmpVariable();e.pushCode(`var ${t} = 0;`);const r=(t=0)=>{let r=0;for(let n=t;n32)break;r+=t}return r},n=r=>(r<=8?(e.pushCode(`${t} = dataView.getUint8(offset);`),r=8):r<=16?(e.pushCode(`${t} = dataView.getUint16(offset);`),r=16):r<=24?(e.pushCode(`${t} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`),r=24):(e.pushCode(`${t} = dataView.getUint32(offset);`),r=32),e.pushCode(`offset += ${r/8};`),r);let o=0;const i="be"===this.endian;let a=0,u=0;e.bitFields.forEach(((c,l)=>{let s=c.options.length;if(s>u){if(u){const r=-1>>>32-u;e.pushCode(`${c.varName} = (${t} & 0x${r.toString(16)}) << ${s-u};`),s-=u}o=0,u=a=n(r(l)-u)}const f=i?a-o-s:o,p=-1>>>32-s;e.pushCode(`${c.varName} ${s> ${f} & 0x${p.toString(16)};`),32===c.options.length&&e.pushCode(`${c.varName} >>>= 0`),c.options.assert&&c.generateAssert(e),c.options.formatter&&c.generateFormatter(e,c.varName,c.options.formatter),o+=s,u-=s})),e.bitFields=[]}}generateSeek(e){const t=e.generateOption(this.options.length);e.pushCode(`offset += ${t};`)}generateString(e){const t=e.generateVariable(this.varName),r=e.generateTmpVariable(),n=this.options.encoding,o="hex"===n.toLowerCase(),i='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){const a=this.options.length;e.pushCode(`var ${r} = offset;`),e.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${r} < ${a});`);const u=`offset - ${r} < ${a} ? offset - 1 : offset`;e.pushCode(o?`${t} = Array.from(buffer.subarray(${r}, ${u}), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(${r}, ${u}));`)}else if(this.options.length){const r=e.generateOption(this.options.length);e.pushCode(o?`${t} = Array.from(buffer.subarray(offset, offset + ${r}), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(offset, offset + ${r}));`),e.pushCode(`offset += ${r};`)}else this.options.zeroTerminated?(e.pushCode(`var ${r} = offset;`),e.pushCode("while(dataView.getUint8(offset++) !== 0);"),e.pushCode(o?`${t} = Array.from(buffer.subarray(${r}, offset - 1), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(${r}, offset - 1));`)):this.options.greedy&&(e.pushCode(`var ${r} = offset;`),e.pushCode("while(buffer.length > offset++);"),e.pushCode(o?`${t} = Array.from(buffer.subarray(${r}, offset), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(${r}, offset));`));this.options.stripNull&&e.pushCode(`${t} = ${t}.replace(/\\x00+$/g, '')`)}generateBuffer(e){const t=e.generateVariable(this.varName);if("function"==typeof this.options.readUntil){const r=this.options.readUntil,n=e.generateTmpVariable(),o=e.generateTmpVariable();e.pushCode(`var ${n} = offset;`),e.pushCode(`var ${o} = 0;`),e.pushCode("while (offset < buffer.length) {"),e.pushCode(`${o} = dataView.getUint8(offset);`);const i=e.addImport(r);e.pushCode(`if (${i}.call(${e.generateVariable()}, ${o}, buffer.subarray(offset))) break;`),e.pushCode("offset += 1;"),e.pushCode("}"),e.pushCode(`${t} = buffer.subarray(${n}, offset);`)}else if("eof"===this.options.readUntil)e.pushCode(`${t} = buffer.subarray(offset);`);else{const r=e.generateOption(this.options.length);e.pushCode(`${t} = buffer.subarray(offset, offset + ${r});`),e.pushCode(`offset += ${r};`)}this.options.clone&&e.pushCode(`${t} = buffer.constructor.from(${t});`)}generateArray(e){const t=e.generateOption(this.options.length),r=e.generateOption(this.options.lengthInBytes),n=this.options.type,o=e.generateTmpVariable(),i=e.generateVariable(this.varName),p=e.generateTmpVariable(),d=this.options.key,h="string"==typeof d;if(h?e.pushCode(`${i} = {};`):e.pushCode(`${i} = [];`),"function"==typeof this.options.readUntil?e.pushCode("do {"):"eof"===this.options.readUntil?e.pushCode(`for (var ${o} = 0; offset < buffer.length; ${o}++) {`):void 0!==r?e.pushCode(`for (var ${o} = offset + ${r}; offset < ${o}; ) {`):e.pushCode(`for (var ${o} = ${t}; ${o} > 0; ${o}--) {`),"string"==typeof n)if(a.get(n)){const i=e.generateTmpVariable();if(e.pushCode(`var ${i} = ${u+n}(offset, {`),e.useContextVariables){const n=e.generateVariable();e.pushCode(`$parent: ${n},`),e.pushCode(`$root: ${n}.$root,`),this.options.readUntil||void 0!==r||e.pushCode(`$index: ${t} - ${o},`)}e.pushCode("});"),e.pushCode(`var ${p} = ${i}.result; offset = ${i}.offset;`),n!==this.alias&&e.addReference(n)}else{const t=l[n],r=s[n];e.pushCode(`var ${p} = dataView.get${t}(offset, ${r});`),e.pushCode(`offset += ${c[n]};`)}else if(n instanceof f){e.pushCode(`var ${p} = {};`);const i=e.generateVariable();e.pushScope(p),e.useContextVariables&&(e.pushCode(`${p}.$parent = ${i};`),e.pushCode(`${p}.$root = ${i}.$root;`),this.options.readUntil||void 0!==r||e.pushCode(`${p}.$index = ${t} - ${o};`)),n.generate(e),e.useContextVariables&&(e.pushCode(`delete ${p}.$parent;`),e.pushCode(`delete ${p}.$root;`),e.pushCode(`delete ${p}.$index;`)),e.popScope()}if(h?e.pushCode(`${i}[${p}.${d}] = ${p};`):e.pushCode(`${i}.push(${p});`),e.pushCode("}"),"function"==typeof this.options.readUntil){const t=this.options.readUntil,r=e.addImport(t);e.pushCode(`while (!${r}.call(${e.generateVariable()}, ${p}, buffer.subarray(offset)));`)}}generateChoiceCase(e,t,r){if("string"==typeof r){const t=e.generateVariable(this.varName);if(a.has(r)){const n=e.generateTmpVariable();e.pushCode(`var ${n} = ${u+r}(offset, {`),e.useContextVariables&&(e.pushCode(`$parent: ${t}.$parent,`),e.pushCode(`$root: ${t}.$root,`)),e.pushCode("});"),e.pushCode(`${t} = ${n}.result; offset = ${n}.offset;`),r!==this.alias&&e.addReference(r)}else{const n=l[r],o=s[r];e.pushCode(`${t} = dataView.get${n}(offset, ${o});`),e.pushCode(`offset += ${c[r]}`)}}else r instanceof f&&(e.pushPath(t),r.generate(e),e.popPath(t))}generateChoice(e){const t=e.generateOption(this.options.tag),r=e.generateVariable(this.varName);if(this.varName&&(e.pushCode(`${r} = {};`),e.useContextVariables)){const t=e.generateVariable();e.pushCode(`${r}.$parent = ${t};`),e.pushCode(`${r}.$root = ${t}.$root;`)}e.pushCode(`switch(${t}) {`);for(const t in this.options.choices){const r=parseInt(t,10),n=this.options.choices[r];e.pushCode(`case ${r}:`),this.generateChoiceCase(e,this.varName,n),e.pushCode("break;")}e.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(e,this.varName,this.options.defaultChoice):e.generateError(`"Met undefined tag value " + ${t} + " at choice"`),e.pushCode("}"),this.varName&&e.useContextVariables&&(e.pushCode(`delete ${r}.$parent;`),e.pushCode(`delete ${r}.$root;`))}generateNest(e){const t=e.generateVariable(this.varName);if(this.options.type instanceof f){if(this.varName&&(e.pushCode(`${t} = {};`),e.useContextVariables)){const r=e.generateVariable();e.pushCode(`${t}.$parent = ${r};`),e.pushCode(`${t}.$root = ${r}.$root;`)}e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName),this.varName&&e.useContextVariables&&e.useContextVariables&&(e.pushCode(`delete ${t}.$parent;`),e.pushCode(`delete ${t}.$root;`))}else if(a.has(this.options.type)){const r=e.generateTmpVariable();if(e.pushCode(`var ${r} = ${u+this.options.type}(offset, {`),e.useContextVariables){const t=e.generateVariable();e.pushCode(`$parent: ${t},`),e.pushCode(`$root: ${t}.$root,`)}e.pushCode("});"),e.pushCode(`${t} = ${r}.result; offset = ${r}.offset;`),this.options.type!==this.alias&&e.addReference(this.options.type)}}generateWrapper(e){const t=e.generateVariable(this.varName),r=e.generateTmpVariable();if("function"==typeof this.options.readUntil){const t=this.options.readUntil,n=e.generateTmpVariable(),o=e.generateTmpVariable();e.pushCode(`var ${n} = offset;`),e.pushCode(`var ${o} = 0;`),e.pushCode("while (offset < buffer.length) {"),e.pushCode(`${o} = dataView.getUint8(offset);`);const i=e.addImport(t);e.pushCode(`if (${i}.call(${e.generateVariable()}, ${o}, buffer.subarray(offset))) break;`),e.pushCode("offset += 1;"),e.pushCode("}"),e.pushCode(`${r} = buffer.subarray(${n}, offset);`)}else if("eof"===this.options.readUntil)e.pushCode(`${r} = buffer.subarray(offset);`);else{const t=e.generateOption(this.options.length);e.pushCode(`${r} = buffer.subarray(offset, offset + ${t});`),e.pushCode(`offset += ${t};`)}this.options.clone&&e.pushCode(`${r} = buffer.constructor.from(${r});`);const n=e.generateTmpVariable(),o=e.generateTmpVariable(),i=e.generateTmpVariable(),c=e.addImport(this.options.wrapper);if(e.pushCode(`${r} = ${c}.call(this, ${r}).subarray(0);`),e.pushCode(`var ${n} = buffer;`),e.pushCode(`var ${o} = offset;`),e.pushCode(`var ${i} = dataView;`),e.pushCode(`buffer = ${r};`),e.pushCode("offset = 0;"),e.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof f)this.varName&&e.pushCode(`${t} = {};`),e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName);else if(a.has(this.options.type)){const r=e.generateTmpVariable();e.pushCode(`var ${r} = ${u+this.options.type}(0);`),e.pushCode(`${t} = ${r}.result;`),this.options.type!==this.alias&&e.addReference(this.options.type)}e.pushCode(`buffer = ${n};`),e.pushCode(`dataView = ${i};`),e.pushCode(`offset = ${o};`)}generateFormatter(e,t,r){if("function"==typeof r){const n=e.addImport(r);e.pushCode(`${t} = ${n}.call(${e.generateVariable()}, ${t});`)}}generatePointer(e){const t=this.options.type,r=e.generateOption(this.options.offset),n=e.generateTmpVariable(),o=e.generateVariable(this.varName);if(e.pushCode(`var ${n} = offset;`),e.pushCode(`offset = ${r};`),this.options.type instanceof f){if(e.pushCode(`${o} = {};`),e.useContextVariables){const t=e.generateVariable();e.pushCode(`${o}.$parent = ${t};`),e.pushCode(`${o}.$root = ${t}.$root;`)}e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName),e.useContextVariables&&(e.pushCode(`delete ${o}.$parent;`),e.pushCode(`delete ${o}.$root;`))}else if(a.has(this.options.type)){const t=e.generateTmpVariable();if(e.pushCode(`var ${t} = ${u+this.options.type}(offset, {`),e.useContextVariables){const t=e.generateVariable();e.pushCode(`$parent: ${t},`),e.pushCode(`$root: ${t}.$root,`)}e.pushCode("});"),e.pushCode(`${o} = ${t}.result; offset = ${t}.offset;`),this.options.type!==this.alias&&e.addReference(this.options.type)}else if(Object.keys(c).indexOf(this.options.type)>=0){const r=l[t],n=s[t];e.pushCode(`${o} = dataView.get${r}(offset, ${n});`),e.pushCode(`offset += ${c[t]};`)}e.pushCode(`offset = ${n};`)}generateSaveOffset(e){const t=e.generateVariable(this.varName);e.pushCode(`${t} = offset`)}}var p=r(33860),d=r.n(p),h=r(94877),y=r.n(h);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e)return!0}return!1}},{key:"isContiguous",value:function(){return this.ranges.length>1}},{key:"getRanges",value:function(){return this.ranges.map((function(t){return new e(t.min,t.max)}))}},{key:"toString",value:function(){return this.ranges.map((function(e){return"[".concat(e.min,"-").concat(e.max,"]")})).join(",")}},{key:"union",value:function(t){for(var r=this.getRanges().concat(t.getRanges()).sort(this.rangeOrder),n=[],o=r[0],i=1;io.max()+1?(n.push(o),o=a):a.max()>o.max()&&(o=new e(o.min(),a.max()))}return n.push(o),1===n.length?n[0]:new e(n)}},{key:"intersection",value:function(t){for(var r=this,n=t,o=this.ranges(),i=n.ranges(),a=o.length,u=i.length,c=0,l=0,s=[];c=f&&s.push(new e(f,p)),r.max()>n.max()?l+=1:c+=1}if(0===s.length)throw new Error("found range of length 0");return 1===s.length?s[0]:new e(s)}},{key:"coverage",value:function(){var e,t=0,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this.ranges());try{for(r.s();!(e=r.n()).done;){var n=e.value;t+=n.max()-n.min()+1}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"rangeOrder",value:function(e,t){var r=e,n=t;return arguments.length<2&&(n=r,r=this),r.min()n.min()?1:r.max()r.max()?1:0}}],r&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function w(e){let t=e.length;for(;--t>=0;)e[t]=0}const S=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),x=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),O=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),j=new Array(576);w(j);const P=new Array(60);w(P);const k=new Array(512);w(k);const _=new Array(256);w(_);const C=new Array(29);w(C);const L=new Array(30);function T(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}let A,I,R;function M(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}w(L);const N=e=>e<256?k[e]:k[256+(e>>>7)],F=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Z=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{Z(e,r[2*t],r[2*t+1])},B=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},z=(e,t,r)=>{const n=new Array(16);let o,i,a=0;for(o=1;o<=15;o++)a=a+r[o-1]<<1,n[o]=a;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=B(n[t]++,t))}},G=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},U=e=>{e.bi_valid>8?F(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},H=(e,t,r,n)=>{const o=2*t,i=2*r;return e[o]{const n=e.heap[r];let o=r<<1;for(;o<=e.heap_len&&(o{let n,o,i,a,u=0;if(0!==e.sym_next)do{n=255&e.pending_buf[e.sym_buf+u++],n+=(255&e.pending_buf[e.sym_buf+u++])<<8,o=e.pending_buf[e.sym_buf+u++],0===n?D(e,o,t):(i=_[o],D(e,i+256+1,t),a=S[i],0!==a&&(o-=C[i],Z(e,o,a)),n--,i=N(n),D(e,i,r),a=x[i],0!==a&&(n-=L[i],Z(e,n,a)))}while(u{const r=t.dyn_tree,n=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.elems;let a,u,c,l=-1;for(e.heap_len=0,e.heap_max=573,a=0;a>1;a>=1;a--)V(e,r,a);c=i;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],V(e,r,1),u=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=u,r[2*c]=r[2*a]+r[2*u],e.depth[c]=(e.depth[a]>=e.depth[u]?e.depth[a]:e.depth[u])+1,r[2*a+1]=r[2*u+1]=c,e.heap[1]=c++,V(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,n=t.max_code,o=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,s,f,p,d,h,y=0;for(p=0;p<=15;p++)e.bl_count[p]=0;for(r[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)s=e.heap[l],p=r[2*r[2*s+1]+1]+1,p>c&&(p=c,y++),r[2*s+1]=p,s>n||(e.bl_count[p]++,d=0,s>=u&&(d=a[s-u]),h=r[2*s],e.opt_len+=h*(p+d),i&&(e.static_len+=h*(o[2*s+1]+d)));if(0!==y){do{for(p=c-1;0===e.bl_count[p];)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[c]--,y-=2}while(y>0);for(p=c;0!==p;p--)for(s=e.bl_count[p];0!==s;)f=e.heap[--l],f>n||(r[2*f+1]!==p&&(e.opt_len+=(p-r[2*f+1])*r[2*f],r[2*f+1]=p),s--)}})(e,t),z(r,l,e.bl_count)},$=(e,t,r)=>{let n,o,i=-1,a=t[1],u=0,c=7,l=4;for(0===a&&(c=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=t[2*(n+1)+1],++u{let n,o,i=-1,a=t[1],u=0,c=7,l=4;for(0===a&&(c=138,l=3),n=0;n<=r;n++)if(o=a,a=t[2*(n+1)+1],!(++u{Z(e,0+(n?1:0),3),U(e),F(e,r),F(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};var X={_tr_init:e=>{K||((()=>{let e,t,r,n,o;const i=new Array(16);for(r=0,n=0;n<28;n++)for(C[n]=r,e=0;e<1<>=7;n<30;n++)for(L[n]=o<<7,e=0;e<1<{let o,i,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),q(e,e.l_desc),q(e,e.d_desc),a=(e=>{let t;for($(e,e.dyn_ltree,e.l_desc.max_code),$(e,e.dyn_dtree,e.d_desc.max_code),q(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*E[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==t?J(e,t,r,n):4===e.strategy||i===o?(Z(e,2+(n?1:0),3),W(e,j,P)):(Z(e,4+(n?1:0),3),((e,t,r,n)=>{let o;for(Z(e,t-257,5),Z(e,r-1,5),Z(e,n-4,4),o=0;o(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(_[r]+256+1)]++,e.dyn_dtree[2*N(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{Z(e,2,3),D(e,256,j),(e=>{16===e.bi_valid?(F(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},Q=(e,t,r,n)=>{let o=65535&e|0,i=e>>>16&65535|0,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{o=o+t[n++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16|0};const ee=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());var te=(e,t,r,n)=>{const o=ee,i=n+r;e^=-1;for(let r=n;r>>8^o[255&(e^t[r])];return-1^e},re={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ne={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:oe,_tr_stored_block:ie,_tr_flush_block:ae,_tr_tally:ue,_tr_align:ce}=X,{Z_NO_FLUSH:le,Z_PARTIAL_FLUSH:se,Z_FULL_FLUSH:fe,Z_FINISH:pe,Z_BLOCK:de,Z_OK:he,Z_STREAM_END:ye,Z_STREAM_ERROR:ve,Z_DATA_ERROR:me,Z_BUF_ERROR:be,Z_DEFAULT_COMPRESSION:ge,Z_FILTERED:we,Z_HUFFMAN_ONLY:Se,Z_RLE:xe,Z_FIXED:Oe,Z_DEFAULT_STRATEGY:Ee,Z_UNKNOWN:je,Z_DEFLATED:Pe}=ne,ke=258,_e=262,Ce=42,Le=113,Te=666,Ae=(e,t)=>(e.msg=re[t],t),Ie=e=>2*e-(e>4?9:0),Re=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Me=e=>{let t,r,n,o=e.w_size;t=e.hash_size,n=t;do{r=e.head[--n],e.head[n]=r>=o?r-o:0}while(--t);t=o,n=t;do{r=e.prev[--n],e.prev[n]=r>=o?r-o:0}while(--t)};let Ne=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},Ze=(e,t)=>{ae(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Fe(e.strm)},De=(e,t)=>{e.pending_buf[e.pending++]=t},Be=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},ze=(e,t,r,n)=>{let o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,t.set(e.input.subarray(e.next_in,e.next_in+o),r),1===e.state.wrap?e.adler=Q(e.adler,t,o,r):2===e.state.wrap&&(e.adler=te(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)},Ge=(e,t)=>{let r,n,o=e.max_chain_length,i=e.strstart,a=e.prev_length,u=e.nice_match;const c=e.strstart>e.w_size-_e?e.strstart-(e.w_size-_e):0,l=e.window,s=e.w_mask,f=e.prev,p=e.strstart+ke;let d=l[i+a-1],h=l[i+a];e.prev_length>=e.good_match&&(o>>=2),u>e.lookahead&&(u=e.lookahead);do{if(r=t,l[r+a]===h&&l[r+a-1]===d&&l[r]===l[i]&&l[++r]===l[i+1]){i+=2,r++;do{}while(l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&ia){if(e.match_start=t,a=n,n>=u)break;d=l[i+a-1],h=l[i+a]}}}while((t=f[t&s])>c&&0!=--o);return a<=e.lookahead?a:e.lookahead},Ue=e=>{const t=e.w_size;let r,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-_e)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Me(e),n+=t),0===e.strm.avail_in)break;if(r=ze(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=Ne(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=Ne(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<_e&&0!==e.strm.avail_in)},He=(e,t)=>{let r,n,o,i=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,u=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outn+e.strm.avail_in&&(r=n+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Fe(e.strm),n&&(n>r&&(n=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,r-=n),r&&(ze(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===a);return u-=e.strm.avail_in,u&&(u>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=u&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-u,e.strm.next_in),e.strstart),e.strstart+=u,e.insert+=u>e.w_size-e.insert?e.w_size-e.insert:u),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(ze(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,i=o>e.w_size?e.w_size:o,n=e.strstart-e.block_start,(n>=i||(n||t===pe)&&t!==le&&0===e.strm.avail_in&&n<=o)&&(r=n>o?o:n,a=t===pe&&0===e.strm.avail_in&&r===n?1:0,ie(e,e.block_start,r,a),e.block_start+=r,Fe(e.strm)),a?3:1)},Ve=(e,t)=>{let r,n;for(;;){if(e.lookahead<_e){if(Ue(e),e.lookahead<_e&&t===le)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=Ne(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-_e&&(e.match_length=Ge(e,r)),e.match_length>=3)if(n=ue(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Ne(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Ne(e,e.ins_h,e.window[e.strstart+1]);else n=ue(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Ze(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===pe?(Ze(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ze(e,!1),0===e.strm.avail_out)?1:2},We=(e,t)=>{let r,n,o;for(;;){if(e.lookahead<_e){if(Ue(e),e.lookahead<_e&&t===le)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=Ne(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,n=ue(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=Ne(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(Ze(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=ue(e,0,e.window[e.strstart-1]),n&&Ze(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=ue(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===pe?(Ze(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ze(e,!1),0===e.strm.avail_out)?1:2};function qe(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}const $e=[new qe(0,0,0,0,He),new qe(4,4,8,4,Ve),new qe(4,5,16,8,Ve),new qe(4,6,32,32,Ve),new qe(4,4,16,16,We),new qe(8,16,32,32,We),new qe(8,16,128,128,We),new qe(8,32,128,256,We),new qe(32,128,258,1024,We),new qe(32,258,258,4096,We)];function Ye(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Pe,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Re(this.dyn_ltree),Re(this.dyn_dtree),Re(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Re(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Re(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ke=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Ce&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Le&&t.status!==Te?1:0},Je=e=>{if(Ke(e))return Ae(e,ve);e.total_in=e.total_out=0,e.data_type=je;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?Ce:Le,e.adler=2===t.wrap?0:1,t.last_flush=-2,oe(t),he},Xe=e=>{const t=Je(e);var r;return t===he&&((r=e.state).window_size=2*r.w_size,Re(r.head),r.max_lazy_match=$e[r.level].max_lazy,r.good_match=$e[r.level].good_length,r.nice_match=$e[r.level].nice_length,r.max_chain_length=$e[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},Qe=(e,t,r,n,o,i)=>{if(!e)return ve;let a=1;if(t===ge&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||r!==Pe||n<8||n>15||t<0||t>9||i<0||i>Oe||8===n&&1!==a)return Ae(e,ve);8===n&&(n=9);const u=new Ye;return e.state=u,u.strm=e,u.status=Ce,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<Qe(e,t,Pe,15,8,Ee),deflateInit2:Qe,deflateReset:Xe,deflateResetKeep:Je,deflateSetHeader:(e,t)=>Ke(e)||2!==e.state.wrap?ve:(e.state.gzhead=t,he),deflate:(e,t)=>{if(Ke(e)||t>de||t<0)return e?Ae(e,ve):ve;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===Te&&t!==pe)return Ae(e,0===e.avail_out?be:ve);const n=r.last_flush;if(r.last_flush=t,0!==r.pending){if(Fe(e),0===e.avail_out)return r.last_flush=-1,he}else if(0===e.avail_in&&Ie(t)<=Ie(n)&&t!==pe)return Ae(e,be);if(r.status===Te&&0!==e.avail_in)return Ae(e,be);if(r.status===Ce&&0===r.wrap&&(r.status=Le),r.status===Ce){let t=Pe+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=Se||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=n<<6,0!==r.strstart&&(t|=32),t+=31-t%31,Be(r,t),0!==r.strstart&&(Be(r,e.adler>>>16),Be(r,65535&e.adler)),e.adler=1,r.status=Le,Fe(e),0!==r.pending)return r.last_flush=-1,he}if(57===r.status)if(e.adler=0,De(r,31),De(r,139),De(r,8),r.gzhead)De(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),De(r,255&r.gzhead.time),De(r,r.gzhead.time>>8&255),De(r,r.gzhead.time>>16&255),De(r,r.gzhead.time>>24&255),De(r,9===r.level?2:r.strategy>=Se||r.level<2?4:0),De(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(De(r,255&r.gzhead.extra.length),De(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=te(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(De(r,0),De(r,0),De(r,0),De(r,0),De(r,0),De(r,9===r.level?2:r.strategy>=Se||r.level<2?4:0),De(r,3),r.status=Le,Fe(e),0!==r.pending)return r.last_flush=-1,he;if(69===r.status){if(r.gzhead.extra){let t=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let o=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+o),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=te(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=o,Fe(e),0!==r.pending)return r.last_flush=-1,he;t=0,n-=o}let o=new Uint8Array(r.gzhead.extra);r.pending_buf.set(o.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>t&&(e.adler=te(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=te(e.adler,r.pending_buf,r.pending-n,n)),Fe(e),0!==r.pending)return r.last_flush=-1,he;n=0}t=r.gzindexn&&(e.adler=te(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=te(e.adler,r.pending_buf,r.pending-n,n)),Fe(e),0!==r.pending)return r.last_flush=-1,he;n=0}t=r.gzindexn&&(e.adler=te(e.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(Fe(e),0!==r.pending))return r.last_flush=-1,he;De(r,255&e.adler),De(r,e.adler>>8&255),e.adler=0}if(r.status=Le,Fe(e),0!==r.pending)return r.last_flush=-1,he}if(0!==e.avail_in||0!==r.lookahead||t!==le&&r.status!==Te){let n=0===r.level?He(r,t):r.strategy===Se?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(Ue(e),0===e.lookahead)){if(t===le)return 1;break}if(e.match_length=0,r=ue(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Ze(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===pe?(Ze(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ze(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===xe?((e,t)=>{let r,n,o,i;const a=e.window;for(;;){if(e.lookahead<=ke){if(Ue(e),e.lookahead<=ke&&t===le)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(o=e.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){i=e.strstart+ke;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&oe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=ue(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=ue(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Ze(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===pe?(Ze(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ze(e,!1),0===e.strm.avail_out)?1:2})(r,t):$e[r.level].func(r,t);if(3!==n&&4!==n||(r.status=Te),1===n||3===n)return 0===e.avail_out&&(r.last_flush=-1),he;if(2===n&&(t===se?ce(r):t!==de&&(ie(r,0,0,!1),t===fe&&(Re(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Fe(e),0===e.avail_out))return r.last_flush=-1,he}return t!==pe?he:r.wrap<=0?ye:(2===r.wrap?(De(r,255&e.adler),De(r,e.adler>>8&255),De(r,e.adler>>16&255),De(r,e.adler>>24&255),De(r,255&e.total_in),De(r,e.total_in>>8&255),De(r,e.total_in>>16&255),De(r,e.total_in>>24&255)):(Be(r,e.adler>>>16),Be(r,65535&e.adler)),Fe(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?he:ye)},deflateEnd:e=>{if(Ke(e))return ve;const t=e.state.status;return e.state=null,t===Le?Ae(e,me):he},deflateSetDictionary:(e,t)=>{let r=t.length;if(Ke(e))return ve;const n=e.state,o=n.wrap;if(2===o||1===o&&n.status!==Ce||n.lookahead)return ve;if(1===o&&(e.adler=Q(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===o&&(Re(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}const i=e.avail_in,a=e.next_in,u=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Ue(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=Ne(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,Ue(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=a,e.input=u,e.avail_in=i,n.wrap=o,he},deflateInfo:"pako deflate (from Nodeca project)"};const tt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var rt={assign:function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const t in r)tt(r,t)&&(e[t]=r[t])}}return e},flattenChunks:e=>{let t=0;for(let r=0,n=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;ot[254]=ot[254]=1;var it={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,o,i,a=e.length,u=0;for(o=0;o>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},buf2string:(e,t)=>{const r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,o;const i=new Array(2*r);for(o=0,n=0;n4)i[o++]=65533,n+=a-1;else{for(t&=2===a?31:3===a?15:7;a>1&&n1?i[o++]=65533:t<65536?i[o++]=t:(t-=65536,i[o++]=55296|t>>10&1023,i[o++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&nt)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n{(t=t||e.length)>e.length&&(t=e.length);let r=t-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+ot[e[r]]>t?r:t}},at=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const ut=Object.prototype.toString,{Z_NO_FLUSH:ct,Z_SYNC_FLUSH:lt,Z_FULL_FLUSH:st,Z_FINISH:ft,Z_OK:pt,Z_STREAM_END:dt,Z_DEFAULT_COMPRESSION:ht,Z_DEFAULT_STRATEGY:yt,Z_DEFLATED:vt}=ne;function mt(e){this.options=rt.assign({level:ht,method:vt,chunkSize:16384,windowBits:15,memLevel:8,strategy:yt},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new at,this.strm.avail_out=0;let r=et.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==pt)throw new Error(re[r]);if(t.header&&et.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?it.string2buf(t.dictionary):"[object ArrayBuffer]"===ut.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=et.deflateSetDictionary(this.strm,e),r!==pt)throw new Error(re[r]);this._dict_set=!0}}function bt(e,t){const r=new mt(t);if(r.push(e,!0),r.err)throw r.msg||re[r.err];return r.result}mt.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=t===~~t?t:!0===t?ft:ct,"string"==typeof e?r.input=it.string2buf(e):"[object ArrayBuffer]"===ut.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===lt||i===st)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(o=et.deflate(r,i),o===dt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),o=et.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===pt;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},mt.prototype.onData=function(e){this.chunks.push(e)},mt.prototype.onEnd=function(e){e===pt&&(this.result=rt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var gt={Deflate:mt,deflate:bt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,bt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,bt(e,t)},constants:ne};const wt=16209;var St=function(e,t){let r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b,g,w,S,x,O,E,j;const P=e.state;r=e.next_in,E=e.input,n=r+(e.avail_in-5),o=e.next_out,j=e.output,i=o-(t-e.avail_out),a=o+(e.avail_out-257),u=P.dmax,c=P.wsize,l=P.whave,s=P.wnext,f=P.window,p=P.hold,d=P.bits,h=P.lencode,y=P.distcode,v=(1<>>24,p>>>=g,d-=g,g=b>>>16&255,0===g)j[o++]=65535&b;else{if(!(16&g)){if(0==(64&g)){b=h[(65535&b)+(p&(1<>>=g,d-=g),d<15&&(p+=E[r++]<>>24,p>>>=g,d-=g,g=b>>>16&255,!(16&g)){if(0==(64&g)){b=y[(65535&b)+(p&(1<u){e.msg="invalid distance too far back",P.mode=wt;break e}if(p>>>=g,d-=g,g=o-i,S>g){if(g=S-g,g>l&&P.sane){e.msg="invalid distance too far back",P.mode=wt;break e}if(x=0,O=f,0===s){if(x+=c-g,g2;)j[o++]=O[x++],j[o++]=O[x++],j[o++]=O[x++],w-=3;w&&(j[o++]=O[x++],w>1&&(j[o++]=O[x++]))}else{x=o-S;do{j[o++]=j[x++],j[o++]=j[x++],j[o++]=j[x++],w-=3}while(w>2);w&&(j[o++]=j[x++],w>1&&(j[o++]=j[x++]))}break}}break}}while(r>3,r-=w,d-=w<<3,p&=(1<{const c=u.bits;let l,s,f,p,d,h,y=0,v=0,m=0,b=0,g=0,w=0,S=0,x=0,O=0,E=0,j=null;const P=new Uint16Array(16),k=new Uint16Array(16);let _,C,L,T=null;for(y=0;y<=15;y++)P[y]=0;for(v=0;v=1&&0===P[b];b--);if(g>b&&(g=b),0===b)return o[i++]=20971520,o[i++]=20971520,u.bits=1,0;for(m=1;m0&&(0===e||1!==b))return-1;for(k[1]=0,y=1;y<15;y++)k[y+1]=k[y]+P[y];for(v=0;v852||2===e&&O>592)return 1;for(;;){_=y-S,a[v]+1=h?(C=T[a[v]-h],L=j[a[v]-h]):(C=96,L=0),l=1<>S)+s]=_<<24|C<<16|L|0}while(0!==s);for(l=1<>=1;if(0!==l?(E&=l-1,E+=l):E=0,v++,0==--P[y]){if(y===b)break;y=t[r+a[v]]}if(y>g&&(E&p)!==f){for(0===S&&(S=g),d+=m,w=y-S,x=1<852||2===e&&O>592)return 1;f=E&p,o[f]=g<<24|w<<16|d-i|0}}return 0!==E&&(o[d+E]=y-S<<24|64<<16|0),u.bits=g,0};const{Z_FINISH:kt,Z_BLOCK:_t,Z_TREES:Ct,Z_OK:Lt,Z_STREAM_END:Tt,Z_NEED_DICT:At,Z_STREAM_ERROR:It,Z_DATA_ERROR:Rt,Z_MEM_ERROR:Mt,Z_BUF_ERROR:Nt,Z_DEFLATED:Ft}=ne,Zt=16180,Dt=16190,Bt=16191,zt=16192,Gt=16194,Ut=16199,Ht=16200,Vt=16206,Wt=16209,qt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function $t(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Yt=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},Kt=e=>{if(Yt(e))return It;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Zt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Lt},Jt=e=>{if(Yt(e))return It;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Kt(e)},Xt=(e,t)=>{let r;if(Yt(e))return It;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?It:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Jt(e))},Qt=(e,t)=>{if(!e)return It;const r=new $t;e.state=r,r.strm=e,r.window=null,r.mode=Zt;const n=Xt(e,t);return n!==Lt&&(e.state=null),n};let er,tr,rr=!0;const nr=e=>{if(rr){er=new Int32Array(512),tr=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Pt(1,e.lens,0,288,er,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Pt(2,e.lens,0,32,tr,0,e.work,{bits:5}),rr=!1}e.lencode=er,e.lenbits=9,e.distcode=tr,e.distbits=5},or=(e,t,r,n)=>{let o;const i=e.state;return null===i.window&&(i.wsize=1<=i.wsize?(i.window.set(t.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>n&&(o=n),i.window.set(t.subarray(r-n,r-n+o),i.wnext),(n-=o)?(i.window.set(t.subarray(r-n,r),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whaveQt(e,15),inflateInit2:Qt,inflate:(e,t)=>{let r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b,g,w,S,x,O,E=0;const j=new Uint8Array(4);let P,k;const _=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Yt(e)||!e.output||!e.input&&0!==e.avail_in)return It;r=e.state,r.mode===Bt&&(r.mode=zt),a=e.next_out,o=e.output,c=e.avail_out,i=e.next_in,n=e.input,u=e.avail_in,l=r.hold,s=r.bits,f=u,p=c,O=Lt;e:for(;;)switch(r.mode){case Zt:if(0===r.wrap){r.mode=zt;break}for(;s<16;){if(0===u)break e;u--,l+=n[i++]<>>8&255,r.check=te(r.check,j,2,0),l=0,s=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=Wt;break}if((15&l)!==Ft){e.msg="unknown compression method",r.mode=Wt;break}if(l>>>=4,s-=4,x=8+(15&l),0===r.wbits&&(r.wbits=x),x>15||x>r.wbits){e.msg="invalid window size",r.mode=Wt;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(j[0]=255&l,j[1]=l>>>8&255,r.check=te(r.check,j,2,0)),l=0,s=0,r.mode=16182;case 16182:for(;s<32;){if(0===u)break e;u--,l+=n[i++]<>>8&255,j[2]=l>>>16&255,j[3]=l>>>24&255,r.check=te(r.check,j,4,0)),l=0,s=0,r.mode=16183;case 16183:for(;s<16;){if(0===u)break e;u--,l+=n[i++]<>8),512&r.flags&&4&r.wrap&&(j[0]=255&l,j[1]=l>>>8&255,r.check=te(r.check,j,2,0)),l=0,s=0,r.mode=16184;case 16184:if(1024&r.flags){for(;s<16;){if(0===u)break e;u--,l+=n[i++]<>>8&255,r.check=te(r.check,j,2,0)),l=0,s=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(d=r.length,d>u&&(d=u),d&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(i,i+d),x)),512&r.flags&&4&r.wrap&&(r.check=te(r.check,n,d,i)),u-=d,i+=d,r.length-=d),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===u)break e;d=0;do{x=n[i+d++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Bt;break;case 16189:for(;s<32;){if(0===u)break e;u--,l+=n[i++]<>>=7&s,s-=7&s,r.mode=Vt;break}for(;s<3;){if(0===u)break e;u--,l+=n[i++]<>>=1,s-=1,3&l){case 0:r.mode=16193;break;case 1:if(nr(r),r.mode=Ut,t===Ct){l>>>=2,s-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=Wt}l>>>=2,s-=2;break;case 16193:for(l>>>=7&s,s-=7&s;s<32;){if(0===u)break e;u--,l+=n[i++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=Wt;break}if(r.length=65535&l,l=0,s=0,r.mode=Gt,t===Ct)break e;case Gt:r.mode=16195;case 16195:if(d=r.length,d){if(d>u&&(d=u),d>c&&(d=c),0===d)break e;o.set(n.subarray(i,i+d),a),u-=d,i+=d,c-=d,a+=d,r.length-=d;break}r.mode=Bt;break;case 16196:for(;s<14;){if(0===u)break e;u--,l+=n[i++]<>>=5,s-=5,r.ndist=1+(31&l),l>>>=5,s-=5,r.ncode=4+(15&l),l>>>=4,s-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Wt;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,s-=3}for(;r.have<19;)r.lens[_[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},O=Pt(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,O){e.msg="invalid code lengths set",r.mode=Wt;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,m=E>>>16&255,b=65535&E,!(v<=s);){if(0===u)break e;u--,l+=n[i++]<>>=v,s-=v,r.lens[r.have++]=b;else{if(16===b){for(k=v+2;s>>=v,s-=v,0===r.have){e.msg="invalid bit length repeat",r.mode=Wt;break}x=r.lens[r.have-1],d=3+(3&l),l>>>=2,s-=2}else if(17===b){for(k=v+3;s>>=v,s-=v,x=0,d=3+(7&l),l>>>=3,s-=3}else{for(k=v+7;s>>=v,s-=v,x=0,d=11+(127&l),l>>>=7,s-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Wt;break}for(;d--;)r.lens[r.have++]=x}}if(r.mode===Wt)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=Wt;break}if(r.lenbits=9,P={bits:r.lenbits},O=Pt(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,O){e.msg="invalid literal/lengths set",r.mode=Wt;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},O=Pt(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,O){e.msg="invalid distances set",r.mode=Wt;break}if(r.mode=Ut,t===Ct)break e;case Ut:r.mode=Ht;case Ht:if(u>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=i,e.avail_in=u,r.hold=l,r.bits=s,St(e,p),a=e.next_out,o=e.output,c=e.avail_out,i=e.next_in,n=e.input,u=e.avail_in,l=r.hold,s=r.bits,r.mode===Bt&&(r.back=-1);break}for(r.back=0;E=r.lencode[l&(1<>>24,m=E>>>16&255,b=65535&E,!(v<=s);){if(0===u)break e;u--,l+=n[i++]<>g)],v=E>>>24,m=E>>>16&255,b=65535&E,!(g+v<=s);){if(0===u)break e;u--,l+=n[i++]<>>=g,s-=g,r.back+=g}if(l>>>=v,s-=v,r.back+=v,r.length=b,0===m){r.mode=16205;break}if(32&m){r.back=-1,r.mode=Bt;break}if(64&m){e.msg="invalid literal/length code",r.mode=Wt;break}r.extra=15&m,r.mode=16201;case 16201:if(r.extra){for(k=r.extra;s>>=r.extra,s-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;E=r.distcode[l&(1<>>24,m=E>>>16&255,b=65535&E,!(v<=s);){if(0===u)break e;u--,l+=n[i++]<>g)],v=E>>>24,m=E>>>16&255,b=65535&E,!(g+v<=s);){if(0===u)break e;u--,l+=n[i++]<>>=g,s-=g,r.back+=g}if(l>>>=v,s-=v,r.back+=v,64&m){e.msg="invalid distance code",r.mode=Wt;break}r.offset=b,r.extra=15&m,r.mode=16203;case 16203:if(r.extra){for(k=r.extra;s>>=r.extra,s-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Wt;break}r.mode=16204;case 16204:if(0===c)break e;if(d=p-c,r.offset>d){if(d=r.offset-d,d>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Wt;break}d>r.wnext?(d-=r.wnext,h=r.wsize-d):h=r.wnext-d,d>r.length&&(d=r.length),y=r.window}else y=o,h=a-r.offset,d=r.length;d>c&&(d=c),c-=d,r.length-=d;do{o[a++]=y[h++]}while(--d);0===r.length&&(r.mode=Ht);break;case 16205:if(0===c)break e;o[a++]=r.length,c--,r.mode=Ht;break;case Vt:if(r.wrap){for(;s<32;){if(0===u)break e;u--,l|=n[i++]<{if(Yt(e))return It;let t=e.state;return t.window&&(t.window=null),e.state=null,Lt},inflateGetHeader:(e,t)=>{if(Yt(e))return It;const r=e.state;return 0==(2&r.wrap)?It:(r.head=t,t.done=!1,Lt)},inflateSetDictionary:(e,t)=>{const r=t.length;let n,o,i;return Yt(e)?It:(n=e.state,0!==n.wrap&&n.mode!==Dt?It:n.mode===Dt&&(o=1,o=Q(o,t,r,0),o!==n.check)?Rt:(i=or(e,t,r,r),i?(n.mode=16210,Mt):(n.havedict=1,Lt)))},inflateInfo:"pako inflate (from Nodeca project)"},ar=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const ur=Object.prototype.toString,{Z_NO_FLUSH:cr,Z_FINISH:lr,Z_OK:sr,Z_STREAM_END:fr,Z_NEED_DICT:pr,Z_STREAM_ERROR:dr,Z_DATA_ERROR:hr,Z_MEM_ERROR:yr}=ne;function vr(e){this.options=rt.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new at,this.strm.avail_out=0;let r=ir.inflateInit2(this.strm,t.windowBits);if(r!==sr)throw new Error(re[r]);if(this.header=new ar,ir.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=it.string2buf(t.dictionary):"[object ArrayBuffer]"===ur.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=ir.inflateSetDictionary(this.strm,t.dictionary),r!==sr)))throw new Error(re[r])}function mr(e,t){const r=new vr(t);if(r.push(e),r.err)throw r.msg||re[r.err];return r.result}vr.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize,o=this.options.dictionary;let i,a,u;if(this.ended)return!1;for(a=t===~~t?t:!0===t?lr:cr,"[object ArrayBuffer]"===ur.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),i=ir.inflate(r,a),i===pr&&o&&(i=ir.inflateSetDictionary(r,o),i===sr?i=ir.inflate(r,a):i===hr&&(i=pr));r.avail_in>0&&i===fr&&r.state.wrap>0&&0!==e[r.next_in];)ir.inflateReset(r),i=ir.inflate(r,a);switch(i){case dr:case hr:case pr:case yr:return this.onEnd(i),this.ended=!0,!1}if(u=r.avail_out,r.next_out&&(0===r.avail_out||i===fr))if("string"===this.options.to){let e=it.utf8border(r.output,r.next_out),t=r.next_out-e,o=it.buf2string(r.output,e);r.next_out=t,r.avail_out=n-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(o)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(i!==sr||0!==u){if(i===fr)return i=ir.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},vr.prototype.onData=function(e){this.chunks.push(e)},vr.prototype.onEnd=function(e){e===sr&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=rt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var br={Inflate:vr,inflate:mr,inflateRaw:function(e,t){return(t=t||{}).raw=!0,mr(e,t)},ungzip:mr,constants:ne};const{Deflate:gr,deflate:wr,deflateRaw:Sr,gzip:xr}=gt,{Inflate:Or,inflate:Er,inflateRaw:jr,ungzip:Pr}=br;var kr=jr;function _r(e){return _r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_r(e)}function Cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;t&&r&&Number(a.offset)-r<=2e3?(t.length=BigInt(Number(t.length)+Number(a.length)-r+Number(a.offset)),t.blocks.push(a)):o.push(t={blocks:[a],length:a.length,offset:a.offset}),r=Number(t.offset)+Number(t.length)}}catch(e){i.e(e)}finally{i.f()}return o}function Fr(e){if(e&&e.aborted){if("undefined"==typeof DOMException){var t=new Mr("aborted");throw t.code="ERR_ABORTED",t}throw new DOMException("aborted","AbortError")}}function Zr(e){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(e)}function Dr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Br(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Hr(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Vr(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Hr(i,n,o,a,u,"next",e)}function u(e){Hr(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Wr(e,t){for(var r=0;r=r}var Kr=function(){function e(t,r,n,i,a,u){var c,l=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bbi=t,this.refsByName=r,this.cirTreeOffset=n,this.isBigEndian=i,this.isCompressed=a,this.blockType=u,this.featureCache=new(d())({cache:new(y())({maxSize:1e3}),fill:(c=Vr(Ur().mark((function e(t,r){var n,i,a,u;return Ur().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Number(t.length),i=Number(t.offset),e.next=4,l.bbi.read(o.Buffer.alloc(n),0,n,i,{signal:r});case 4:return a=e.sent,u=a.buffer,e.abrupt("return",u);case 7:case"end":return e.stop()}}),e)}))),function(e,t){return c.apply(this,arguments)})}),!(n>=0))throw new Error("invalid cirTreeOffset!");var s=function(e){var t,r=e?"big":"little",n=(new f).endianess(r).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),o=(new f).endianess(r).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:(new f).endianess(r).array("blocksToFetch",{length:"cnt",type:(new f).endianess(r).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:(new f).array("recurOffsets",{length:"cnt",type:(new f).endianess(r).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),i=(new f).endianess(r).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:(new f).endianess(r).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:(t={},qr(t,3,(new f).array("items",{length:"itemCount",type:(new f).floatle("score")})),qr(t,2,(new f).array("items",{length:"itemCount",type:(new f).endianess(r).int32("start").floatle("score")})),qr(t,1,(new f).array("items",{length:"itemCount",type:(new f).endianess(r).int32("start").int32("end").floatle("score")})),t)}),bigBedParser:i,summaryParser:n,leafParser:o}}(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}var t,r,n,i;return t=e,r=[{key:"readWigData",value:(i=Vr(Ur().mark((function e(t,r,n,i,a){var u,c,l,s,f,p,d,h,y,v,m,b,w,S,x,O=this;return Ur().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,u=this.refsByName,c=this.bbi,l=this.cirTreeOffset,s=this.isBigEndian,void 0===(f=u[t])&&i.complete(),p={chrId:f,start:r,end:n},this.cirTreePromise||(this.cirTreePromise=c.read(o.Buffer.alloc(48),0,48,Number(l),a)),e.next=8,this.cirTreePromise;case 8:return d=e.sent,h=d.buffer,y=s?h.readUInt32BE(4):h.readUInt32LE(4),v=[],m=0,b=function(e,t,r){try{var n=e.subarray(t),o=O.leafParser.parse(n);if(o.blocksToFetch&&(v=v.concat(o.blocksToFetch.filter((function(e){return w(e)})).map((function(e){return{offset:e.blockOffset,length:e.blockSize}})))),o.recurOffsets){var a=o.recurOffsets.filter((function(e){return w(e)})).map((function(e){return Number(e.blockOffset)}));a.length>0&&x(a,r+1)}}catch(e){i.error(e)}},w=function(e){var t=e.startChrom,o=e.startBase,i=e.endChrom,a=e.endBase;return(tf||i===f&&a>=r)},S=function(){var e=Vr(Ur().mark((function e(t,r,n){var o,u,c,l,s,f;return Ur().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=r.max()-r.min(),u=r.min(),e.next=5,O.featureCache.get("".concat(o,"_").concat(u),{length:o,offset:u},null==a?void 0:a.signal);case 5:c=e.sent,l=zr(t);try{for(l.s();!(s=l.n()).done;)f=s.value,r.contains(f)&&(b(c,f-u,n),0==(m-=1)&&O.readFeatures(i,v,Br(Br({},a),{},{request:p})))}catch(e){l.e(e)}finally{l.f()}e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),i.error(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,r,n){return e.apply(this,arguments)}}(),x=function(e,t){try{m+=e.length;for(var r=4+32*Number(y),n=new g(e[0],e[0]+r),o=1;o2&&void 0!==s[2]?s[2]:{},e.prev=1,o=this.blockType,i=this.isCompressed,a=n.signal,u=n.request,c=Nr(r),Fr(a),e.next=8,Promise.all(c.map(function(){var e=Vr(Ur().mark((function e(r){var n,c,s,f,p,d,h,y;return Ur().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Fr(a),n=r.length,c=r.offset,e.next=4,l.featureCache.get("".concat(n,"_").concat(c),r,a);case 4:s=e.sent,f=zr(r.blocks),e.prev=6,f.s();case 8:if((p=f.n()).done){e.next=27;break}d=p.value,Fr(a),h=Number(d.offset)-Number(r.offset),y=s,i&&(v=s.subarray(h),y=kr(v.subarray(2)),h=0),Fr(a),e.t0=o,e.next="summary"===e.t0?18:"bigwig"===e.t0?20:"bigbed"===e.t0?22:24;break;case 18:return t.next(l.parseSummaryBlock(y,h,u)),e.abrupt("break",25);case 20:return t.next(l.parseBigWigBlock(y,h,u)),e.abrupt("break",25);case 22:return t.next(l.parseBigBedBlock(y,h,256*Number(d.offset),u)),e.abrupt("break",25);case 24:console.warn("Don't know what to do with ".concat(o));case 25:e.next=8;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(6),f.e(e.t1);case 32:return e.prev=32,f.f(),e.finish(32);case 35:case"end":return e.stop()}var v}),e,null,[[6,29,32,35]])})));return function(t){return e.apply(this,arguments)}}()));case 8:t.complete(),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.error(e.t0);case 14:case"end":return e.stop()}}),e,this,[[1,11]])}))),function(e,t){return n.apply(this,arguments)})}],r&&Wr(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Jr=r(93403),Xr=r(7388),Qr=r(71381),en=r(90254);function tn(e){return tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn(e)}function rn(){rn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==tn(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function nn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function on(e){for(var t=1;t1&&void 0!==y[1]?y[1]:2e3,e.next=3,this.bbi.read(o.Buffer.alloc(r),0,r,0,t);case 3:if(n=e.sent,i=n.buffer,a=this._isBigEndian(i),u=pn(a),c=u.headerParser.parse(i),l=c.magic,s=c.asOffset,f=c.totalSummaryOffset,c.fileType=l===fn?"bigbed":"bigwig",!(s>r||f>r)){e.next=12;break}return e.abrupt("return",this._getMainHeader(t,2*r));case 12:if(s&&(p=Number(c.asOffset),c.autoSql=(v=i.subarray(p,i.indexOf(0,p)),(new TextDecoder).decode(v))),!(c.totalSummaryOffset>r-40)){e.next=15;break}return e.abrupt("return",this._getMainHeader(t,2*r));case 15:return c.totalSummaryOffset&&(d=i.subarray(Number(c.totalSummaryOffset)),h=u.totalSummaryParser.parse(d),c.totalSummary=on(on({},h),{},{basesCovered:Number(h.basesCovered)})),e.abrupt("return",on(on({},c),{},{isBigEndian:a}));case 17:case"end":return e.stop()}var v}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"_isBigEndian",value:function(e){var t=e.readInt32LE(0);if(t===sn||t===fn)return!1;if((t=e.readInt32BE(0))===sn||t===fn)return!0;throw new Error("not a BigWig/BigBed file")}},{key:"_readChromTree",value:(u=un(rn().mark((function e(t,r){var n,i,a,u,c,l,s,p,d,h,y,v,m,b,g,w=this;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=t.isBigEndian,i=n?"big":"little",a=[],u={},c=Number(t.unzoomedDataOffset),l=Number(t.chromTreeOffset);c%4!=0;)c+=1;return s=c-l,e.next=10,this.bbi.read(o.Buffer.alloc(s),0,s,Number(l),r);case 10:return p=e.sent,d=p.buffer,h=pn(n),y=h.chromTreeParser.parse(d),v=y.keySize,m=(new f).endianess(i).string("key",{stripNull:!0,length:v}).uint32("refId").uint32("refSize").saveOffset("offset"),b=(new f).endianess(i).skip(v).uint64("childOffset").saveOffset("offset"),g=function(){var e=un(rn().mark((function e(t){var r,n,o,i,c,s,f,p,y,v,S,x,O,E;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((r=t)>=d.length)){e.next=3;break}throw new Error("reading beyond end of buffer");case 3:if(n=h.isLeafNode.parse(d.subarray(r)),o=n.isLeafNode,i=n.cnt,r+=n.offset,!o){e.next=10;break}for(c=0;c0,u));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getFeatureStream",value:(i=un(rn().mark((function e(t,r,n,o){var i,a,u,c,l;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader(o);case 2:if(i=this.renameRefSeqs(t),c=(u=o||{}).basesPerSpan,l=u.scale,!c){e.next=10;break}return e.next=7,this.getView(1/c,o);case 7:a=e.sent,e.next=19;break;case 10:if(!l){e.next=16;break}return e.next=13,this.getView(l,o);case 13:a=e.sent,e.next=19;break;case 16:return e.next=18,this.getView(1,o);case 18:a=e.sent;case 19:return e.abrupt("return",new Xr.y((function(e){a.readWigData(i,r,n,e,o)})));case 20:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return i.apply(this,arguments)})},{key:"getFeatures",value:(n=un(rn().mark((function e(t,r,n,o){var i,a;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getFeatureStream(t,r,n,o);case 2:return i=e.sent,e.next=5,(0,Qr.z)(i.pipe((0,en.q)()));case 5:return a=e.sent,e.abrupt("return",a.flat());case 7:case"end":return e.stop()}}),e,this)}))),function(e,t,r,o){return n.apply(this,arguments)})}],r&&cn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function hn(e){return hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hn(e)}function yn(){yn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==hn(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function vn(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function mn(e,t){for(var r=0;r=0)){e.next=20;break}if(!((p=o[f])&&p.reductionLevel<=2*l)){e.next=17;break}return d=Number(p.indexOffset),e.abrupt("return",new Kr(this.bbi,i,d,u,c>0,"summary"));case 17:f-=1,e.next=12;break;case 20:return e.abrupt("return",this.getUnzoomedView(r));case 21:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){vn(i,r,o,a,u,"next",e)}function u(e){vn(i,r,o,a,u,"throw",e)}a(void 0)}))},function(e,t){return o.apply(this,arguments)})}],r&&mn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(dn),Sn=r(92803),xn=r(78283),On=r(6994);function En(e){return En="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},En(e)}var jn=["signal"];function Pn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=kn(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function kn(e,t){if(e){if("string"==typeof e)return _n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_n(e,t):void 0}}function _n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Ln(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Tn(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Ln(i,n,o,a,u,"next",e)}function u(e){Ln(i,n,o,a,u,"throw",e)}a(void 0)}))}}function An(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function In(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.signal,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,jn);return this.readIndicesCache.get(JSON.stringify(r),e,t)}},{key:"getView",value:(u=Tn(Cn().mark((function e(t,r){return Cn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getUnzoomedView(r));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"_readIndices",value:(a=Tn(Cn().mark((function e(t){var r,n,i,a,u,c,l,s,p,d,h,y,v,m,b,g;return Cn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader(t);case 2:return r=e.sent,n=r.extHeaderOffset,i=r.isBigEndian,e.next=7,this.bbi.read(o.Buffer.alloc(64),0,64,Number(n));case 7:if(a=e.sent,u=a.buffer,c=i?"big":"little",l=(new f).endianess(c).uint16("size").uint16("count").uint64("offset").parse(u),s=l.count,p=l.offset,0!==s){e.next=14;break}return e.abrupt("return",[]);case 14:return h=(d=20)*s,e.next=18,this.bbi.read(o.Buffer.alloc(h),0,h,Number(p));case 18:for(y=e.sent,v=y.buffer,m=(new f).endianess(c).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),b=[],g=0;g1&&void 0!==l[1]?l[1]:{},e.next=3,this.getHeader(r);case 3:return n=e.sent,i=n.isBigEndian,e.next=7,this.readIndices(r);case 7:if(0!==(a=e.sent).length){e.next=10;break}return e.abrupt("return",[]);case 10:return u=a.map(function(){var e=Tn(Cn().mark((function e(n){var a,u,l,s,p,d,h,y,v,m,b,g;return Cn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.offset,u=n.field,e.next=3,c.bbi.read(o.Buffer.alloc(32),0,32,Number(a),r);case 3:return l=e.sent,s=l.buffer,p=i?"big":"little",d=(new f).endianess(p).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),h=d.parse(s),y=h.blockSize,v=h.keySize,m=h.valSize,b=(new f).endianess(p).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:(new f).array("leafkeys",{length:"cnt",type:(new f).endianess(p).string("key",{length:v,stripNull:!0}).uint64("offset")}),1:(new f).array("keys",{length:"cnt",type:(new f).endianess(p).string("key",{length:v,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),g=function(){var e=Tn(Cn().mark((function e(n){var i,a,l,s,f,p,d,h,w;return Cn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Number(n),a=4+y*(v+m),e.next=4,c.bbi.read(o.Buffer.alloc(a),0,a,i,r);case 4:if(l=e.sent,s=l.buffer,!(f=b.parse(s)).leafkeys){e.next=18;break}d=0;case 9:if(!(d1&&void 0!==u[1]?u[1]:{},e.next=3,this.searchExtraIndexBlocks(t,r);case 3:if(0!==(n=e.sent).length){e.next=6;break}return e.abrupt("return",[]);case 6:return e.next=8,this.getUnzoomedView(r);case 8:return o=e.sent,i=n.map((function(e){return new Xr.y((function(t){o.readFeatures(t,[e],r)})).pipe((0,xn.u)((function(e,t){return e.concat(t)})),(0,On.U)((function(t){var r,n=Pn(t);try{for(n.s();!(r=n.n()).done;)r.value.field=e.field}catch(e){n.e(e)}finally{n.f()}return t})))})),e.next=12,(0,Qr.z)(Sn.T.apply(void 0,function(e){if(Array.isArray(e))return _n(e)}(c=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||kn(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));case 12:return a=e.sent,e.abrupt("return",a.filter((function(e){var r;return(null===(r=e.rest)||void 0===r?void 0:r.split("\t")[(e.field||0)-3])===t})));case 14:case"end":return e.stop()}var c}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&Rn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(dn)},316:e=>{"use strict";function t(e,r,n,o){this.message=e,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(t,Error),t.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;tMe&&(Me=Ae,Ne=[]),Ne.push(e))}function Ve(){var t,r,n,i,a,p,d;return t=Ae,et()!==o&&(r=We())!==o&&et()!==o&&(n=qe())!==o&&et()!==o&&(i=Ye())!==o&&et()!==o?(40===e.charCodeAt(Ae)?(a=u,Ae++):(a=o,0===Fe&&He(c)),a!==o&&et()!==o?(p=function(){var e,t,r,n,i;if(e=Ae,(t=Ke())!==o)if(et()!==o){for(r=[],n=Ae,et()!==o&&(i=Ke())!==o?(Ie=n,n=P(t,i)):(Ae=n,n=o);n!==o;)r.push(n),n=Ae,et()!==o&&(i=Ke())!==o?(Ie=n,n=P(t,i)):(Ae=n,n=o);r!==o&&(n=et())!==o?(Ie=e,e=t=k(t,r)):(Ae=e,e=o)}else Ae=e,e=o;else Ae=e,e=o;return e}(),p!==o&&et()!==o?(41===e.charCodeAt(Ae)?(d=l,Ae++):(d=o,0===Fe&&He(s)),d!==o&&et()!==o?(Ie=t,t=f(r,n,i,p)):(Ae=t,t=o)):(Ae=t,t=o)):(Ae=t,t=o)):(Ae=t,t=o),t}function We(){var t;return e.substr(Ae,6)===p?(t=p,Ae+=6):(t=o,0===Fe&&He(d)),t===o&&(e.substr(Ae,6)===h?(t=h,Ae+=6):(t=o,0===Fe&&He(y)),t===o&&(e.substr(Ae,5)===v?(t=v,Ae+=5):(t=o,0===Fe&&He(m)))),t}function qe(){var t,r,n,i;return(t=Xe())===o&&(t=Ae,(r=Xe())!==o&&(n=$e())!==o?t=r=[r,n]:(Ae=t,t=o),t===o&&(t=Ae,(r=Xe())!==o?(e.substr(Ae,4)===b?(n=b,Ae+=4):(n=o,0===Fe&&He(g)),n!==o?t=r=[r,n]:(Ae=t,t=o)):(Ae=t,t=o),t===o&&(t=Ae,(r=Xe())!==o&&(n=$e())!==o?(e.substr(Ae,4)===b?(i=b,Ae+=4):(i=o,0===Fe&&He(g)),i!==o?t=r=[r,n,i]:(Ae=t,t=o)):(Ae=t,t=o)))),t}function $e(){var t;return e.substr(Ae,7)===w?(t=w,Ae+=7):(t=o,0===Fe&&He(S)),t===o&&(e.substr(Ae,5)===x?(t=x,Ae+=5):(t=o,0===Fe&&He(O)),t===o&&(e.substr(Ae,6)===E?(t=E,Ae+=6):(t=o,0===Fe&&He(j)))),t}function Ye(){var e;return(e=Qe())===o&&(e=et()),e}function Ke(){var t,r,n,i,a,f,p,d;return t=Ae,(r=Je())!==o&&et()!==o&&(n=Xe())!==o&&et()!==o?(59===e.charCodeAt(Ae)?(i=L,Ae++):(i=o,0===Fe&&He(T)),i!==o&&et()!==o&&(a=Ye())!==o?(Ie=t,t=r=A(r,n,a)):(Ae=t,t=o)):(Ae=t,t=o),t===o&&(t=Ae,(r=Je())!==o&&et()!==o?(91===e.charCodeAt(Ae)?(n=I,Ae++):(n=o,0===Fe&&He(R)),n!==o&&et()!==o?(i=function(){var t;return t=function(){var t,r,n;if(Fe++,t=Ae,et()!==o){if(r=[],Pe.test(e.charAt(Ae))?(n=e.charAt(Ae),Ae++):(n=o,0===Fe&&He(ke)),n!==o)for(;n!==o;)r.push(n),Pe.test(e.charAt(Ae))?(n=e.charAt(Ae),Ae++):(n=o,0===Fe&&He(ke));else r=o;r!==o?(Ie=t,t=_e()):(Ae=t,t=o)}else Ae=t,t=o;return Fe--,t===o&&(o,0===Fe&&He(je)),t}(),t===o&&(t=Xe()),t}(),i!==o&&et()!==o?(93===e.charCodeAt(Ae)?(a=M,Ae++):(a=o,0===Fe&&He(N)),a!==o&&et()!==o&&(f=Xe())!==o&&et()!==o?(59===e.charCodeAt(Ae)?(p=L,Ae++):(p=o,0===Fe&&He(T)),p!==o&&et()!==o&&(d=Ye())!==o?(Ie=t,t=r=F(r,i,f,d)):(Ae=t,t=o)):(Ae=t,t=o)):(Ae=t,t=o)):(Ae=t,t=o)):(Ae=t,t=o),t===o&&(t=Ae,(r=Je())!==o&&et()!==o?(40===e.charCodeAt(Ae)?(n=u,Ae++):(n=o,0===Fe&&He(c)),n!==o&&et()!==o?(i=function(){var t,r,n,i,a,u;if(t=Ae,(r=Xe())!==o){for(n=[],i=Ae,44===e.charCodeAt(Ae)?(a=D,Ae++):(a=o,0===Fe&&He(B)),a!==o&&et()!==o&&(u=Xe())!==o?(Ie=i,i=a=P(r,u)):(Ae=i,i=o);i!==o;)n.push(i),i=Ae,44===e.charCodeAt(Ae)?(a=D,Ae++):(a=o,0===Fe&&He(B)),a!==o&&et()!==o&&(u=Xe())!==o?(Ie=i,i=a=P(r,u)):(Ae=i,i=o);n!==o?(Ie=t,t=r=z(r,n)):(Ae=t,t=o)}else Ae=t,t=o;return t}(),i!==o&&et()!==o?(41===e.charCodeAt(Ae)?(a=l,Ae++):(a=o,0===Fe&&He(s)),a!==o&&et()!==o&&(f=Xe())!==o&&et()!==o?(59===e.charCodeAt(Ae)?(p=L,Ae++):(p=o,0===Fe&&He(T)),p!==o&&et()!==o&&(d=Ye())!==o?(Ie=t,t=r=Z(r,i,f,d)):(Ae=t,t=o)):(Ae=t,t=o)):(Ae=t,t=o)):(Ae=t,t=o)):(Ae=t,t=o),t===o&&(t=function(){var t,r,n,i,a;return t=Ae,(r=et())!==o?(n=function(){var t;return 35===e.charCodeAt(Ae)?(t=_,Ae++):(t=o,0===Fe&&He(C)),t}(),n!==o&&(i=Qe())!==o&&(a=et())!==o?t=r=[r,n,i,a]:(Ae=t,t=o)):(Ae=t,t=o),t}()))),t}function Je(){var t,r,n;return e.substr(Ae,3)===G?(t=G,Ae+=3):(t=o,0===Fe&&He(U)),t===o&&(e.substr(Ae,4)===H?(t=H,Ae+=4):(t=o,0===Fe&&He(V)),t===o&&(e.substr(Ae,5)===W?(t=W,Ae+=5):(t=o,0===Fe&&He(q)),t===o&&(e.substr(Ae,6)===$?(t=$,Ae+=6):(t=o,0===Fe&&He(Y)),t===o&&(e.substr(Ae,4)===K?(t=K,Ae+=4):(t=o,0===Fe&&He(J)),t===o&&(e.substr(Ae,5)===X?(t=X,Ae+=5):(t=o,0===Fe&&He(Q)),t===o&&(e.substr(Ae,5)===ee?(t=ee,Ae+=5):(t=o,0===Fe&&He(te)),t===o&&(e.substr(Ae,4)===re?(t=re,Ae+=4):(t=o,0===Fe&&He(ne)),t===o&&(e.substr(Ae,6)===oe?(t=oe,Ae+=6):(t=o,0===Fe&&He(ie)),t===o&&(e.substr(Ae,7)===ae?(t=ae,Ae+=7):(t=o,0===Fe&&He(ue)),t===o&&(e.substr(Ae,4)===ce?(t=ce,Ae+=4):(t=o,0===Fe&&He(le)),t===o&&(e.substr(Ae,6)===se?(t=se,Ae+=6):(t=o,0===Fe&&He(fe)),t===o&&(e.substr(Ae,6)===pe?(t=pe,Ae+=6):(t=o,0===Fe&&He(de)),t===o&&(e.substr(Ae,3)===he?(t=he,Ae+=3):(t=o,0===Fe&&He(ye)),t===o&&(t=Ae,(r=We())!==o&&et()!==o&&(n=qe())!==o?(Ie=t,t=r=ve(r,n)):(Ae=t,t=o))))))))))))))),t}function Xe(){var t,r,n,i,a;if(t=Ae,r=Ae,me.test(e.charAt(Ae))?(n=e.charAt(Ae),Ae++):(n=o,0===Fe&&He(be)),n!==o){for(i=[],ge.test(e.charAt(Ae))?(a=e.charAt(Ae),Ae++):(a=o,0===Fe&&He(we));a!==o;)i.push(a),ge.test(e.charAt(Ae))?(a=e.charAt(Ae),Ae++):(a=o,0===Fe&&He(we));i!==o?r=n=[n,i]:(Ae=r,r=o)}else Ae=r,r=o;return r!==o&&(Ie=t,r=Se(r)),r}function Qe(){var t,r,n;for(t=Ae,r=[],xe.test(e.charAt(Ae))?(n=e.charAt(Ae),Ae++):(n=o,0===Fe&&He(Oe));n!==o;)r.push(n),xe.test(e.charAt(Ae))?(n=e.charAt(Ae),Ae++):(n=o,0===Fe&&He(Oe));return r!==o&&(Ie=t,r=Ee(r)),r}function et(){var t,r;for(Fe++,t=[],Le.test(e.charAt(Ae))?(r=e.charAt(Ae),Ae++):(r=o,0===Fe&&He(Te));r!==o;)t.push(r),Le.test(e.charAt(Ae))?(r=e.charAt(Ae),Ae++):(r=o,0===Fe&&He(Te));return Fe--,t===o&&(r=o,0===Fe&&He(Ce)),t}if((n=a())!==o&&Ae===e.length)return n;throw n!==o&&Ae{"use strict";r.d(t,{Z:()=>P});var n={};r.r(n),r.d(n,{bigChain:()=>a,bigGenePred:()=>u,bigInteract:()=>c,bigLink:()=>l,bigMaf:()=>s,bigNarrowPeak:()=>f,bigPsl:()=>p,defaultBedSchema:()=>d,mafFrames:()=>h,mafSummary:()=>y});var o=r(316),i=r.n(o),a='table bigChain\n"bigChain pairwise alignment"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint score; "Score (0-1000)"\n char[1] strand; "+ or - for strand"\n uint tSize; "size of target sequence"\n string qName; "name of query sequence"\n uint qSize; "size of query sequence"\n uint qStart; "start of alignment on query sequence"\n uint qEnd; "end of alignment on query sequence"\n uint chainScore; "score from chain"\n )',u='table bigGenePred\n"bigGenePred gene models"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint score; "Score (0-1000)"\n char[1] strand; "+ or - for strand"\n uint thickStart; "Start of where display should be thick (start codon)"\n uint thickEnd; "End of where display should be thick (stop codon)"\n uint reserved; "RGB value (use R,G,B string in input file)"\n int blockCount; "Number of blocks"\n int[blockCount] blockSizes; "Comma separated list of block sizes"\n int[blockCount] chromStarts; "Start positions relative to chromStart"\n string name2; "Alternative/human readable name"\n string cdsStartStat; "Status of CDS start annotation (none, unknown, incomplete, or complete)"\n string cdsEndStat; "Status of CDS end annotation (none, unknown, incomplete, or complete)"\n int[blockCount] exonFrames; "Exon frame {0,1,2}, or -1 if no frame for exon"\n string type; "Transcript type"\n string geneName; "Primary identifier for gene"\n string geneName2; "Alternative/human readable gene name"\n string geneType; "Gene type"\n )',c='table interact\n"interaction between two regions"\n (\n string chrom; "Chromosome (or contig, scaffold, etc.). For interchromosomal, use 2 records"\n uint chromStart; "Start position of lower region. For interchromosomal, set to chromStart of this region"\n uint chromEnd; "End position of upper region. For interchromosomal, set to chromEnd of this region"\n string name; "Name of item, for display. Usually \'sourceName/targetName/exp\' or empty"\n uint score; "Score (0-1000)"\n double value; "Strength of interaction or other data value. Typically basis for score"\n string exp; "Experiment name (metadata for filtering). Use . if not applicable"\n string color; "Item color. Specified as r,g,b or hexadecimal #RRGGBB or html color name, as in //www.w3.org/TR/css3-color/#html4. Use 0 and spectrum setting to shade by score"\n string sourceChrom; "Chromosome of source region (directional) or lower region. For non-directional interchromosomal, chrom of this region."\n uint sourceStart; "Start position in chromosome of source/lower/this region"\n uint sourceEnd; "End position in chromosome of source/lower/this region"\n string sourceName; "Identifier of source/lower/this region"\n string sourceStrand; "Orientation of source/lower/this region: + or -. Use . if not applicable"\n string targetChrom; "Chromosome of target region (directional) or upper region. For non-directional interchromosomal, chrom of other region"\n uint targetStart; "Start position in chromosome of target/upper/this region"\n uint targetEnd; "End position in chromosome of target/upper/this region"\n string targetName; "Identifier of target/upper/this region"\n string targetStrand; "Orientation of target/upper/this region: + or -. Use . if not applicable"\n\n )',l='table bigLink\n"bigLink pairwise alignment"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint qStart; "start of alignment on query sequence"\n )',s='table bedMaf\n"Bed3 with MAF block"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n lstring mafBlock; "MAF block"\n )',f='table bigNarrowPeak\n"BED6+4 Peaks of signal enrichment based on pooled, normalized (interpreted) data."\n(\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name;\t "Name given to a region (preferably unique). Use . if no name is assigned"\n uint score; "Indicates how dark the peak will be displayed in the browser (0-1000) "\n char[1] strand; "+ or - or . for unknown"\n float signalValue; "Measurement of average enrichment for the region"\n float pValue; "Statistical significance of signal value (-log10). Set to -1 if not used."\n float qValue; "Statistical significance with multiple-test correction applied (FDR -log10). Set to -1 if not used."\n int peak; "Point-source called for this peak; 0-based offset from chromStart. Set to -1 if no point-source called."\n)',p='table bigPsl\n"bigPsl pairwise alignment"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint score; "Score (0-1000)"\n char[1] strand; "+ or - indicates whether the query aligns to the + or - strand on the reference"\n uint thickStart; "Start of where display should be thick (start codon)"\n uint thickEnd; "End of where display should be thick (stop codon)"\n uint reserved; "RGB value (use R,G,B string in input file)"\n int blockCount; "Number of blocks"\n int[blockCount] blockSizes; "Comma separated list of block sizes"\n int[blockCount] chromStarts; "Start positions relative to chromStart"\n\n uint oChromStart;"Start position in other chromosome"\n uint oChromEnd; "End position in other chromosome"\n char[1] oStrand; "+ or -, - means that psl was reversed into BED-compatible coordinates"\n uint oChromSize; "Size of other chromosome."\n int[blockCount] oChromStarts; "Start positions relative to oChromStart or from oChromStart+oChromSize depending on strand"\n\n lstring oSequence; "Sequence on other chrom (or empty)"\n string oCDS; "CDS in NCBI format"\n\n uint chromSize;"Size of target chromosome"\n\n uint match; "Number of bases matched."\n uint misMatch; " Number of bases that don\'t match "\n uint repMatch; " Number of bases that match but are part of repeats "\n uint nCount; " Number of \'N\' bases "\n uint seqType; "0=empty, 1=nucleotide, 2=amino_acid"\n )',d='table defaultBedSchema\n"BED12"\n (\n string chrom; "The name of the chromosome (e.g. chr3, chrY, chr2_random) or scaffold (e.g. scaffold10671)."\n uint chromStart; "The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0."\n uint chromEnd; "The ending position of the feature in the chromosome or scaffold. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99."\n string name; "Defines the name of the BED line."\n float score; "Feature score, doesn\'t care about the 0-1000 limit as in bed"\n char strand; "Defines the strand. Either \'.\' (=no strand) or \'+\' or \'-\'"\n uint thickStart; "The starting position at which the feature is drawn thickly (for example, the start codon in gene displays). When there is no thick part, thickStart and thickEnd are usually set to the chromStart position."\n uint thickEnd; "The ending position at which the feature is drawn thickly (for example the stop codon in gene displays)."\n string itemRgb; "An RGB value of the form R,G,B (e.g. 255,0,0). "\n uint blockCount; " The number of blocks (exons) in the BED line."\n uint[blockCount] blockSizes; " A comma-separated list of the block sizes. The number of items in this list should correspond to blockCount."\n uint[blockCount] blockStarts; "A comma-separated list of block starts. All of the blockStart positions should be calculated relative to chromStart. The number of items in this list should correspond to blockCount."\n )',h='table mafFrames\n"codon frame assignment for MAF components"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start range in chromosome"\n uint chromEnd; "End range in chromosome"\n string src; "Name of sequence source in MAF"\n ubyte frame; "frame (0,1,2) for first base(+) or last bast(-)"\n char[1] strand; "+ or -"\n string name; "Name of gene used to define frame"\n int prevFramePos; "target position of the previous base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous"\n int nextFramePos; "target position of the next base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous"\n ubyte isExonStart; "does this start the CDS portion of an exon?"\n ubyte isExonEnd; "does this end the CDS portion of an exon?"\n )',y='table mafSummary\n"Positions and scores for alignment blocks"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string src; "Sequence name or database of alignment"\n float score; "Floating point score."\n char[1] leftStatus; "Gap/break annotation for preceding block"\n char[1] rightStatus; "Gap/break annotation for following block"\n )';function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.autoSql)this.autoSql=S(i().parse(t.autoSql));else if(t.type){if(!m[t.type])throw new Error("Type not found");this.autoSql=S(m[t.type])}else this.autoSql=S(m.defaultBedSchema),this.attemptDefaultBed=!0}var t,r;return t=e,r=[{key:"parseLine",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.autoSql,n=t.uniqueId,o=Array.isArray(e)?e:e.split("\t"),i={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&function(e){var t;return e.length>=12&&!Number.isNaN(parseInt(e[9],10))&&(null===(t=e[10])||void 0===t?void 0:t.split(",").filter((function(e){return!!e})).length)===parseInt(e[9],10)}(o))for(var a=0;a{"use strict";r.r(t),r.d(t,{BgzfFilehandle:()=>te,unzip:()=>s,unzipChunk:()=>p,unzipChunkSlice:()=>h});var n=r(80365),o=r(93403),i=r(33998);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))}}function s(e){return f.apply(this,arguments)}function f(){return(f=l(u().mark((function e(t){var r,o,a,c,l,s,f,p,d,h;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,o=0,a=0,c=[],l=0;case 5:if(f=t.subarray(o),s=new i.Inflate,r=s.strm,s.push(f,i.Z_SYNC_FLUSH),!s.err){e.next=12;break}throw new Error(s.msg);case 12:o+=r.next_in,c[a]=s.result,l+=c[a].length,a+=1;case 16:if(r.avail_in){e.next=5;break}case 17:for(p=new Uint8Array(l),d=0,h=0;d=c.blockPosition)){e.next=30;break}return f[y]=f[y].subarray(0,c.blockPosition===a.blockPosition?c.dataPosition-a.dataPosition+1:c.dataPosition+1),p.push(l),d.push(s),h+=f[y].length,e.abrupt("break",33);case 30:h+=f[y].length,y++;case 32:if(o.avail_in){e.next=9;break}case 33:for(S=new Uint8Array(h),x=0,O=0;x>>=0)&&e<256)&&(n=S[e])?n:(r=E(e,0,!0),o&&(S[e]=r),r):(o=-128<=(e|=0)&&e<128)&&(n=w[e])?n:(r=E(e,e<0?-1:0,!1),o&&(w[e]=r),r)}function O(e,t){if(isNaN(e))return t?I:A;if(t){if(e<0)return I;if(e>=C)return Z}else{if(e<=-L)return D;if(e+1>=L)return F}return e<0?O(-e,t).neg():E(e%_|0,e/_|0,t)}function E(e,t,r){return new m(e,t,r)}m.fromInt=x,m.fromNumber=O,m.fromBits=E;var j=Math.pow;function P(e,t,r){if(0===e.length)throw Error("empty string");if("number"==typeof t?(r=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?I:A;if((r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return P(e.substring(1),t,r).neg();for(var o=O(j(r,8)),i=A,a=0;a>>0:this.low},B.toNumber=function(){return this.unsigned?(this.high>>>0)*_+(this.low>>>0):this.high*_+(this.low>>>0)},B.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((i=u).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},B.getHighBits=function(){return this.high},B.getHighBitsUnsigned=function(){return this.high>>>0},B.getLowBits=function(){return this.low},B.getLowBitsUnsigned=function(){return this.low>>>0},B.getNumBitsAbs=function(){if(this.isNegative())return this.eq(D)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},B.isOdd=function(){return 1==(1&this.low)},B.isEven=function(){return 0==(1&this.low)},B.equals=function(e){return b(e)||(e=k(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},B.eq=B.equals,B.notEquals=function(e){return!this.eq(e)},B.neq=B.notEquals,B.ne=B.notEquals,B.lessThan=function(e){return this.comp(e)<0},B.lt=B.lessThan,B.lessThanOrEqual=function(e){return this.comp(e)<=0},B.lte=B.lessThanOrEqual,B.le=B.lessThanOrEqual,B.greaterThan=function(e){return this.comp(e)>0},B.gt=B.greaterThan,B.greaterThanOrEqual=function(e){return this.comp(e)>=0},B.gte=B.greaterThanOrEqual,B.ge=B.greaterThanOrEqual,B.compare=function(e){if(b(e)||(e=k(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},B.comp=B.compare,B.negate=function(){return!this.unsigned&&this.eq(D)?D:this.not().add(R)},B.neg=B.negate,B.add=function(e){b(e)||(e=k(e));var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,a=65535&e.high,u=e.low>>>16,c=0,l=0,s=0,f=0;return s+=(f+=o+(65535&e.low))>>>16,l+=(s+=n+u)>>>16,c+=(l+=r+a)>>>16,c+=t+i,E((s&=65535)<<16|(f&=65535),(c&=65535)<<16|(l&=65535),this.unsigned)},B.subtract=function(e){return b(e)||(e=k(e)),this.add(e.neg())},B.sub=B.subtract,B.multiply=function(e){if(this.isZero())return this;if(b(e)||(e=k(e)),v)return E(v.mul(this.low,this.high,e.low,e.high),v.get_high(),this.unsigned);if(e.isZero())return this.unsigned?I:A;if(this.eq(D))return e.isOdd()?D:A;if(e.eq(D))return this.isOdd()?D:A;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(T)&&e.lt(T))return O(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,a=65535&e.high,u=e.low>>>16,c=65535&e.low,l=0,s=0,f=0,p=0;return f+=(p+=o*c)>>>16,s+=(f+=n*c)>>>16,f&=65535,s+=(f+=o*u)>>>16,l+=(s+=r*c)>>>16,s&=65535,l+=(s+=n*u)>>>16,s&=65535,l+=(s+=o*a)>>>16,l+=t*c+r*u+n*a+o*i,E((f&=65535)<<16|(p&=65535),(l&=65535)<<16|(s&=65535),this.unsigned)},B.mul=B.multiply,B.divide=function(e){if(b(e)||(e=k(e)),e.isZero())throw Error("division by zero");var t,r,n;if(v)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?E((this.unsigned?v.div_u:v.div_s)(this.low,this.high,e.low,e.high),v.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?I:A;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return I;if(e.gt(this.shru(1)))return M;n=I}else{if(this.eq(D))return e.eq(R)||e.eq(N)?D:e.eq(D)?R:(t=this.shr(1).div(e).shl(1)).eq(A)?e.isNegative()?R:N:(r=this.sub(e.mul(t)),n=t.add(r.div(e)));if(e.eq(D))return this.unsigned?I:A;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=A}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(t)/Math.LN2),i=o<=48?1:j(2,o-48),a=O(t),u=a.mul(e);u.isNegative()||u.gt(r);)u=(a=O(t-=i,this.unsigned)).mul(e);a.isZero()&&(a=R),n=n.add(a),r=r.sub(u)}return n},B.div=B.divide,B.modulo=function(e){return b(e)||(e=k(e)),v?E((this.unsigned?v.rem_u:v.rem_s)(this.low,this.high,e.low,e.high),v.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},B.mod=B.modulo,B.rem=B.modulo,B.not=function(){return E(~this.low,~this.high,this.unsigned)},B.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},B.clz=B.countLeadingZeros,B.countTrailingZeros=function(){return this.low?g(this.low):g(this.high)+32},B.ctz=B.countTrailingZeros,B.and=function(e){return b(e)||(e=k(e)),E(this.low&e.low,this.high&e.high,this.unsigned)},B.or=function(e){return b(e)||(e=k(e)),E(this.low|e.low,this.high|e.high,this.unsigned)},B.xor=function(e){return b(e)||(e=k(e)),E(this.low^e.low,this.high^e.high,this.unsigned)},B.shiftLeft=function(e){return b(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?E(this.low<>>32-e,this.unsigned):E(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):E(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},B.shr=B.shiftRight,B.shiftRightUnsigned=function(e){return b(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?E(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):E(32===e?this.high:this.high>>>e-32,0,this.unsigned)},B.shru=B.shiftRightUnsigned,B.shr_u=B.shiftRightUnsigned,B.rotateLeft=function(e){var t;return b(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?E(this.high,this.low,this.unsigned):e<32?(t=32-e,E(this.low<>>t,this.high<>>t,this.unsigned)):(t=32-(e-=32),E(this.high<>>t,this.low<>>t,this.unsigned))},B.rotl=B.rotateLeft,B.rotateRight=function(e){var t;return b(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?E(this.high,this.low,this.unsigned):e<32?(t=32-e,E(this.high<>>e,this.low<>>e,this.unsigned)):(t=32-(e-=32),E(this.low<>>e,this.high<>>e,this.unsigned))},B.rotr=B.rotateRight,B.toSigned=function(){return this.unsigned?E(this.low,this.high,!1):this},B.toUnsigned=function(){return this.unsigned?this:E(this.low,this.high,!0)},B.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},B.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},B.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},m.fromBytes=function(e,t,r){return r?m.fromBytesLE(e,t):m.fromBytesBE(e,t)},m.fromBytesLE=function(e,t){return new m(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},m.fromBytesBE=function(e,t){return new m(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};const z=m;function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function U(){U=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==G(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function H(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function V(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){H(i,n,o,a,u,"next",e)}function u(e){H(i,n,o,a,u,"throw",e)}a(void 0)}))}}function W(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=z.fromBytesLE(e.slice(t,t+8),r);if(n.greaterThan(Number.MAX_SAFE_INTEGER)||n.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return n.toNumber()}},{key:"_getIndex",value:function(){return this.index||(this.index=this._readIndex()),this.index}},{key:"_readIndex",value:(u=V(U().mark((function e(){var t,r,o,i,a,u,c;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.Buffer.allocUnsafe(8),e.next=3,this.filehandle.read(t,0,8,0);case 3:if(r=this._readLongWithOverflow(t,0,!0)){e.next=6;break}return e.abrupt("return",[[0,0]]);case 6:if((o=new Array(r+1))[0]=[0,0],!((i=16*r)>Number.MAX_SAFE_INTEGER)){e.next=11;break}throw new TypeError("integer overflow");case 11:return t=n.Buffer.allocUnsafe(i),e.next=14,this.filehandle.read(t,0,i,8);case 14:for(a=0;ar?0:n0?c=l-1:s<0&&(u=l+1),l=Math.ceil((c-u)/2)+u,s=a(o[l],o[l+1]);i.push(o[l]),f=l+1;case 15:if(!(f=n)){e.next=19;break}return e.abrupt("break",22);case 19:f+=1,e.next=15;break;case 22:return i[i.length-1][1]e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function X(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Q(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){X(i,n,o,a,u,"next",e)}function u(e){X(i,n,o,a,u,"throw",e)}a(void 0)}))}}function ee(e,t){for(var r=0;r=i?0:i-d,y=Math.min(i+o,d+f.length)-d,h>=0&&h{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){return o="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o(e)}var i=r(80365).Buffer,a=r(64169),u=r(37108)._,c=r(16126);"undefined"!=typeof window&&(window.Buffer=i),"undefined"!=typeof self&&(self.Buffer=i);var l={UInt8:1,UInt16LE:2,UInt16BE:2,UInt32LE:4,UInt32BE:4,Int8:1,Int16LE:2,Int16BE:2,Int32LE:4,Int32BE:4,FloatLE:4,FloatBE:4,DoubleLE:8,DoubleBE:8,UInt64:8,Int64:8},s={},f="___parser_",p=[];!function(){var e;for(e=1;e<=32;e++)p.push(e)}();var d={};Object.keys(l).concat(Object.keys({String:null,Buffer:null,Array:null,Skip:null,Choice:null,Nest:null,Bit:null,Itf8:null,Ltf8:null})).forEach((function(e){d[e.toLowerCase()]=e}));var h=function(){this.varName="",this.type="",this.options={},this.next=null,this.head=null,this.compiled=null,this.endian="le",this.constructorFn=null,this.alias=null};h.start=function(){return new h},Object.keys(l).forEach((function(e){h.prototype[e.toLowerCase()]=function(t,r){return this.setNextParser(e.toLowerCase(),t,r)};var t=e.replace(/BE|LE/,"").toLowerCase();t in h.prototype||(h.prototype[t]=function(e,r){return this[t+this.endian](e,r)})})),p.forEach((function(e){h.prototype["bit".concat(e.toString())]=function(t,r){return r||(r={}),r.length=e,this.setNextParser("bit",t,r)}})),h.prototype.namely=function(e){return s[e]=this,this.alias=e,this},h.prototype.skip=function(e,t){if(t&&t.assert)throw new Error("assert option on skip is not allowed.");return this.setNextParser("skip","",{length:e})},h.prototype.string=function(e,t){if(!t.zeroTerminated&&!t.length&&!t.greedy)throw new Error("Neither length, zeroTerminated, nor greedy is defined for string.");if((t.zeroTerminated||t.length)&&t.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(t.stripNull&&!t.length&&!t.greedy)throw new Error("Length or greedy must be defined if stripNull is defined.");return t.encoding=t.encoding||"utf8",this.setNextParser("string",e,t)},h.prototype.buffer=function(e,t){if(!t.length&&!t.readUntil)throw new Error("Length nor readUntil is defined in buffer parser");return this.setNextParser("buffer",e,t)},h.prototype.array=function(e,t){if(!t.readUntil&&!t.length&&!t.lengthInBytes)throw new Error("Length option of array is not defined.");if(!t.type)throw new Error("Type option of array is not defined.");if("string"==typeof t.type&&!s[t.type]&&Object.keys(l).indexOf(d[t.type])<0)throw new Error('Specified primitive type "'.concat(t.type,'" is not supported.'));return this.setNextParser("array",e,t)},h.prototype.choice=function(e,t){if(1===arguments.length&&"object"===o(e)&&(t=e,e=null),!t.tag)throw new Error("Tag option of array is not defined.");if(!t.choices)throw new Error("Choices option of array is not defined.");return Object.keys(t.choices).forEach((function(r){if(!t.choices[r])throw new Error("Choice Case ".concat(r," of ").concat(e," is not valid."));if("string"==typeof t.choices[r]&&!s[t.choices[r]]&&Object.keys(l).indexOf(d[t.choices[r]])<0)throw new Error('Specified primitive type "'.concat(t.choices[r],'" is not supported.'))}),this),this.setNextParser("choice",e,t)},h.prototype.nest=function(e,t){if(1===arguments.length&&"object"===o(e)&&(t=e,e=null),!t.type)throw new Error("Type option of nest is not defined.");if(!(t.type instanceof h||s[t.type]))throw new Error("Type option of nest must be a Parser object.");if(!(t.type instanceof h||e))throw new Error("options.type must be a object if variable name is omitted.");return this.setNextParser("nest",e,t)},h.prototype.endianess=function(e){switch(e.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error("Invalid endianess: ".concat(e))}return this},h.prototype.create=function(e){if(!(e instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=e,this},h.prototype.getCode=function(){var e=new u;return e.pushCode("if (!Buffer.isBuffer(buffer)) {"),e.generateError('"argument buffer is not a Buffer object"'),e.pushCode("}"),this.alias?this.addAliasedCode(e):this.addRawCode(e),this.alias?e.pushCode("return {0}(0)",f+this.alias):e.pushCode("return { offset: offset, result: vars };"),e.code},h.prototype.addRawCode=function(e){e.pushCode("var offset = 0;"),this.constructorFn?e.pushCode("var vars = new constructorFn();"):e.pushCode("var vars = {};"),this.generate(e),this.resolveReferences(e),e.pushCode("return { offset: offset, result: vars };")},h.prototype.addAliasedCode=function(e){return e.pushCode("function {0}(offset) {",f+this.alias),this.constructorFn?e.pushCode("var vars = new constructorFn();"):e.pushCode("var vars = {};"),this.generate(e),e.markResolved(this.alias),this.resolveReferences(e),e.pushCode("return { offset: offset, result: vars };"),e.pushCode("}"),e},h.prototype.resolveReferences=function(e){var t=e.getUnresolvedReferences();e.markRequested(t),t.forEach((function(t){s[t].addAliasedCode(e)}))},h.prototype.compile=function(){var e="(function(buffer, constructorFn, Long) { ".concat(this.getCode()," })");this.compiled=a.runInThisContext(e)},h.prototype.sizeOf=function(){var e=NaN;if(Object.keys(l).indexOf(this.type)>=0)e=l[this.type];else if("String"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("Buffer"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("Array"===this.type&&"number"==typeof this.options.length){var t=NaN;"string"==typeof this.options.type?t=l[d[this.options.type]]:this.options.type instanceof h&&(t=this.options.type.sizeOf()),e=this.options.length*t}else"Skip"===this.type?e=this.options.length:"Nest"===this.type?e=this.options.type.sizeOf():this.type||(e=0);return this.next&&(e+=this.next.sizeOf()),e},h.prototype.parse=function(e){return this.compiled||this.compile(),this.compiled(e,this.constructorFn,c)},h.prototype.setNextParser=function(e,t,r){var n=new h;return n.type=d[e],n.varName=t,n.options=r||n.options,n.endian=this.endian,this.head?this.head.next=n:this.next=n,this.head=n,this},h.prototype.generate=function(e){this.type&&(this["generate".concat(this.type)](e),this.generateAssert(e));var t=e.generateVariable(this.varName);return this.options.formatter&&this.generateFormatter(e,t,this.options.formatter),this.generateNext(e)},h.prototype.generateAssert=function(e){if(this.options.assert){var t=e.generateVariable(this.varName);switch(o(this.options.assert)){case"function":e.pushCode("if (!({0}).call(vars, {1})) {",this.options.assert,t);break;case"number":e.pushCode("if ({0} !== {1}) {",this.options.assert,t);break;case"string":e.pushCode('if ("{0}" !== {1}) {',this.options.assert,t);break;default:throw new Error("Assert option supports only strings, numbers and assert functions.")}e.generateError('"Assert error: {0} is " + {0}',t),e.pushCode("}")}},h.prototype.generateNext=function(e){return this.next&&(e=this.next.generate(e)),e},Object.keys(l).forEach((function(e){h.prototype["generate".concat(e)]=function(t){"UInt64"===e?t.pushCode("{0} = Long.fromBytes(buffer.slice(offset,offset+8), true, this.endian === 'le').toNumber();",t.generateVariable(this.varName),e):"Int64"===e?t.pushCode("{0} = Long.fromBytes(buffer.slice(offset,offset+8), false, this.endian === 'le').toNumber();",t.generateVariable(this.varName),e):t.pushCode("{0} = buffer.read{1}(offset);",t.generateVariable(this.varName),e),t.pushCode("offset += {0};",l[e])}})),h.prototype.generateBit=function(e){var t=JSON.parse(JSON.stringify(this));if(t.varName=e.generateVariable(t.varName),e.bitFields.push(t),!this.next||this.next&&["Bit","Nest"].indexOf(this.next.type)<0){var r=0;e.bitFields.forEach((function(e){r+=e.options.length}));var n=e.generateTmpVariable();if(r<=8)e.pushCode("var {0} = buffer.readUInt8(offset);",n),r=8;else if(r<=16)e.pushCode("var {0} = buffer.readUInt16BE(offset);",n),r=16;else if(r<=24){var o=e.generateTmpVariable(),i=e.generateTmpVariable();e.pushCode("var {0} = buffer.readUInt16BE(offset);",o),e.pushCode("var {0} = buffer.readUInt8(offset + 2);",i),e.pushCode("var {2} = ({0} << 8) | {1};",o,i,n),r=24}else{if(!(r<=32))throw new Error("Currently, bit field sequence longer than 4-bytes is not supported.");e.pushCode("var {0} = buffer.readUInt32BE(offset);",n),r=32}e.pushCode("offset += {0};",r/8);var a=0,u="be"===this.endian;e.bitFields.forEach((function(t){e.pushCode("{0} = {1} >> {2} & {3};",t.varName,n,u?r-a-t.options.length:a,(1< offset++);"),e.pushCode("{0} = buffer.toString('{1}', {2}, offset);",t,this.options.encoding,r)),this.options.stripNull&&e.pushCode("{0} = {0}.replace(/\\x00+$/g, '')",t)},h.prototype.generateBuffer=function(e){"eof"===this.options.readUntil?e.pushCode("{0} = buffer.slice(offset);",e.generateVariable(this.varName)):(e.pushCode("{0} = buffer.slice(offset, offset + {1});",e.generateVariable(this.varName),e.generateOption(this.options.length)),e.pushCode("offset += {0};",e.generateOption(this.options.length))),this.options.clone&&e.pushCode("{0} = Buffer.from({0});",e.generateVariable(this.varName))},h.prototype.generateArray=function(e){var t=e.generateOption(this.options.length),r=e.generateOption(this.options.lengthInBytes),n=this.options.type,o=e.generateTmpVariable(),i=e.generateVariable(this.varName),a=e.generateTmpVariable(),u=this.options.key,c="string"==typeof u;if(c?e.pushCode("{0} = {};",i):e.pushCode("{0} = [];",i),"function"==typeof this.options.readUntil?e.pushCode("do {"):"eof"===this.options.readUntil?e.pushCode("for (var {0} = 0; offset < buffer.length; {0}++) {",o):void 0!==r?e.pushCode("for (var {0} = offset; offset - {0} < {1}; ) {",o,r):e.pushCode("for (var {0} = 0; {0} < {1}; {0}++) {",o,t),"string"==typeof n)if(s[n]){var p=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",p,f+n),e.pushCode("var {0} = {1}.result; offset = {1}.offset;",a,p),n!==this.alias&&e.addReference(n)}else e.pushCode("var {0} = buffer.read{1}(offset);",a,d[n]),e.pushCode("offset += {0};",l[d[n]]);else n instanceof h&&(e.pushCode("var {0} = {};",a),e.pushScope(a),n.generate(e),e.popScope());c?e.pushCode("{0}[{2}.{1}] = {2};",i,u,a):e.pushCode("{0}.push({1});",i,a),e.pushCode("}"),"function"==typeof this.options.readUntil&&e.pushCode(" while (!({0}).call(this, {1}, buffer.slice(offset)));",this.options.readUntil,a)},h.prototype.generateChoiceCase=function(e,t,r){if("string"==typeof r)if(s[r]){var n=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",n,f+r),e.pushCode("{0} = {1}.result; offset = {1}.offset;",e.generateVariable(this.varName),n),r!==this.alias&&e.addReference(r)}else e.pushCode("{0} = buffer.read{1}(offset);",e.generateVariable(this.varName),d[r]),e.pushCode("offset += {0};",l[d[r]]);else r instanceof h&&(e.pushPath(t),r.generate(e),e.popPath(t))},h.prototype.generateChoice=function(e){var t=e.generateOption(this.options.tag);this.varName&&e.pushCode("{0} = {};",e.generateVariable(this.varName)),e.pushCode("switch({0}) {",t),Object.keys(this.options.choices).forEach((function(t){var r=this.options.choices[t];Number.isNaN(parseInt(t,10))?e.pushCode("case '{0}':",t):e.pushCode("case {0}:",t),this.generateChoiceCase(e,this.varName,r),e.pushCode("break;")}),this),e.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(e,this.varName,this.options.defaultChoice):e.generateError('"Met undefined tag value " + {0} + " at choice"',t),e.pushCode("}")},h.prototype.generateNest=function(e){var t=e.generateVariable(this.varName);if(this.options.type instanceof h)this.varName&&e.pushCode("{0} = {};",t),e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName);else if(s[this.options.type]){var r=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",r,f+this.options.type),e.pushCode("{0} = {1}.result; offset = {1}.offset;",t,r),this.options.type!==this.alias&&e.addReference(this.options.type)}},h.prototype.generateFormatter=function(e,t,r){"function"==typeof r&&e.pushCode("{0} = ({1}).call(this, {0});",t,r)},h.prototype.isInteger=function(){return!!this.type.match(/U?Int[8|16|32][BE|LE]?|Bit\d+/)},h.prototype.itf8=function(e,t){return this.setNextParser("itf8",e,t)},h.prototype.itf8=function(e,t){return this.setNextParser("itf8",e,t)},h.prototype.generateItf8=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();e.pushCode("\n var ".concat(r," = buffer[offset];\n if (").concat(r," < 0x80) {\n ").concat(t," = ").concat(r,";\n offset += 1;\n } else if (").concat(r," < 0xc0) {\n ").concat(t," = ((").concat(r,"<<8) | buffer[offset+1]) & 0x3fff;\n offset += 2;\n } else if (").concat(r," < 0xe0) {\n ").concat(t," = ((").concat(r,"<<16) | (buffer[offset+1]<< 8) | buffer[offset+2]) & 0x1fffff;\n offset += 3;\n } else if (").concat(r," < 0xf0) {\n ").concat(t," = ((").concat(r,"<<24) | (buffer[offset+1]<<16) | (buffer[offset+2]<<8) | buffer[offset+3]) & 0x0fffffff;\n offset += 4\n } else {\n ").concat(t," = ((").concat(r," & 0x0f)<<28) | (buffer[offset+1]<<20) | (buffer[offset+2]<<12) | (buffer[offset+3]<<4) | (buffer[offset+4] & 0x0f);\n // x=((0xff & 0x0f)<<28) | (0xff<<20) | (0xff<<12) | (0xff<<4) | (0x0f & 0x0f);\n // TODO *val_p = uv < 0x80000000UL ? uv : -((int32_t) (0xffffffffUL - uv)) - 1;\n offset += 5\n }\n "))},h.prototype.ltf8=function(e,t){return this.setNextParser("ltf8",e,t)},h.prototype.generateLtf8=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();e.pushCode("\n var ".concat(r," = buffer[offset];\n if (").concat(r," < 0x80) {\n ").concat(t," = ").concat(r,";\n offset += 1;\n } else if (").concat(r," < 0xc0) {\n ").concat(t," = ((buffer[offset]<<8) | buffer[offset+1]) & 0x3fff;\n offset += 2;\n } else if (").concat(r," < 0xe0) {\n ").concat(t," = ((buffer[offset]<<16) | (buffer[offset+1]<<8) | buffer[offset+2]) & 0x1fffff;\n ").concat(t," = (((").concat(r," & 63) << 16) | buffer.readUInt16LE(offset + 1));\n offset += 3;\n } else if (").concat(r," < 0xf0) {\n ").concat(t," = ((buffer[offset]<<24) | (buffer[offset+1]<<16) | (buffer[offset+2]<<8) | buffer[offset+3]) & 0x0fffffff;\n offset += 4;\n } else if (").concat(r," < 0xf8) {\n ").concat(t," = (((buffer[offset] & 15) * Math.pow(2,32))) +\n (buffer[offset+1]<<24) | (buffer[offset+2]<<16 | buffer[offset+3]<<8 | buffer[offset+4])\n // TODO *val_p = uv < 0x80000000UL ? uv : -((int32_t) (0xffffffffUL - uv)) - 1;\n offset += 5;\n } else if (").concat(r," < 0xfc) {\n ").concat(t," = ((((buffer[offset] & 7) << 8) | buffer[offset+1] )) * Math.pow(2,32) +\n (buffer[offset+2]<<24) | (buffer[offset+3]<<16 | buffer[offset+4]<<8 | buffer[offset+5])\n offset += 6;\n } else if (").concat(r," < 0xfe) {\n ").concat(t," = ((((buffer[offset] & 3) << 16) | buffer[offset+1]<<8 | buffer[offset+2])) * Math.pow(2,32) +\n (buffer[offset+3]<<24) | (buffer[offset+4]<<16 | buffer[offset+5]<<8 | buffer[offset+6])\n offset += 7;\n } else if (").concat(r," < 0xff) {\n ").concat(t," = Long.fromBytesBE(buffer.slice(offset+1,offset+8));\n if (").concat(t,".greaterThan(Number.MAX_SAFE_INTEGER) || ").concat(t,".lessThan(Number.MIN_SAFE_INTEGER))\n throw new Error('integer overflow')\n ").concat(t," = ").concat(t,".toNumber()\n offset += 8;\n } else {\n ").concat(t," = Long.fromBytesBE(buffer.slice(offset+1,offset+9));\n if (").concat(t,".greaterThan(Number.MAX_SAFE_INTEGER) || ").concat(t,".lessThan(Number.MIN_SAFE_INTEGER))\n throw new Error('integer overflow')\n ").concat(t," = ").concat(t,".toNumber()\n offset += 9;\n }\n "))},t._=h},37108:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return n="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(e)}var o=function(){this.code="",this.scopes=[["vars"]],this.isAsync=!1,this.bitFields=[],this.tmpVariableCount=0,this.references={}};o.prototype.generateVariable=function(e){var t=[];for(Array.prototype.push.apply(t,this.scopes[this.scopes.length-1]);/^\$parent\./.test(e);)t.pop(),e=e.replace(/^\$parent\./,"");return e&&t.push(e),t.join(".")},o.prototype.generateOption=function(e){switch(n(e)){case"number":return e.toString();case"string":return this.generateVariable(e);case"function":return"(".concat(e,").call(").concat(this.generateVariable(),", vars)");default:return}},o.prototype.generateError=function(){var e=Array.prototype.slice.call(arguments),t=o.interpolate.apply(this,e);this.isAsync?this.pushCode("return process.nextTick(function() { callback(new Error(".concat(t,"), vars); });")):this.pushCode("throw new Error(".concat(t,");"))},o.prototype.generateTmpVariable=function(){return"$tmp".concat(this.tmpVariableCount++)},o.prototype.pushCode=function(){var e=Array.prototype.slice.call(arguments);this.code+="".concat(o.interpolate.apply(this,e),"\n")},o.prototype.pushPath=function(e){e&&this.scopes[this.scopes.length-1].push(e)},o.prototype.popPath=function(e){e&&this.scopes[this.scopes.length-1].pop()},o.prototype.pushScope=function(e){this.scopes.push([e])},o.prototype.popScope=function(){this.scopes.pop()},o.prototype.addReference=function(e){this.references[e]||(this.references[e]={resolved:!1,requested:!1})},o.prototype.markResolved=function(e){this.references[e].resolved=!0},o.prototype.markRequested=function(e){e.forEach(function(e){this.references[e].requested=!0}.bind(this))},o.prototype.getUnresolvedReferences=function(){var e=this.references;return Object.keys(this.references).filter((function(t){return!e[t].resolved&&!e[t].requested}))},o.interpolate=function(e){var t=e.match(/{\d+}/g),r=Array.prototype.slice.call(arguments,1);return t&&t.forEach((function(t){var n=parseInt(t.substr(1,t.length-2),10);e=e.replace(t,r[n].toString())})),e},t._=o},64169:e=>{e.exports.runInThisContext=function(e){return new Function("code","return eval(code);").call(globalThis,e)}},52913:(e,t,r)=>{"use strict";r.d(t,{Z:()=>oe});var n={};r.r(n),r.d(n,{escape:()=>y,escapeColumn:()=>v,formatAttributes:()=>w,formatComment:()=>j,formatDirective:()=>E,formatFeature:()=>O,formatItem:()=>k,formatSequence:()=>P,parseAttributes:()=>m,parseDirective:()=>g,parseFeature:()=>b,unescape:()=>d});var o=r(84723),i=r(60113);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r".concat(e.id).concat(e.description?" ".concat(e.description):"","\n").concat(e.sequence,"\n")}function k(e){function t(e){return"attributes"in e?O(e):"directive"in e?E(e):"sequence"in e?P(e):"comment"in e?j(e):"# (invalid item found during format)\n"}return Array.isArray(e)?e.map(t):t(e)}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function C(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r\s*(\S+)\s*(.*)/.exec(e);t?(this._flush(),this.currentSequence={id:t[1],sequence:""},t[2]&&(this.currentSequence.description=t[2].trim())):this.currentSequence&&/\S/.test(e)&&(this.currentSequence.sequence+=e.replace(/\s/g,""))}},{key:"_flush",value:function(){this.currentSequence&&this.seqCallback(this.currentSequence)}},{key:"finish",value:function(){this._flush()}}]),e}(),B=function(){function e(t){M(this,e),this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};var r=function(){};this.featureCallback=t.featureCallback||r,this.endCallback=t.endCallback||r,this.commentCallback=t.commentCallback||r,this.errorCallback=t.errorCallback||r,this.directiveCallback=t.directiveCallback||r,this.sequenceCallback=t.sequenceCallback||r,this.disableDerivesFromReferences=t.disableDerivesFromReferences||!1,this.bufferSize=void 0===t.bufferSize?1e3:t.bufferSize}return F(e,[{key:"addLine",value:function(e){if(this.fastaParser)this.fastaParser.addLine(e);else if(!this.eof)if(this.lineNumber+=1,/^\s*[^#\s>]/.test(e))this._bufferLine(e);else{var t=/^\s*(#+)(.*)/.exec(e);if(t){var r=A(t,2)[1],n=A(t,3)[2];if(3===r.length)this._emitAllUnderConstructionFeatures();else if(2===r.length){var o=g(e);o&&("FASTA"===o.directive?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new D(this.sequenceCallback)):this._emitItem(o))}else n=n.replace(/\s*/,""),this._emitItem({comment:n})}else if(/^\s*$/.test(e));else{if(!/^\s*>/.test(e)){var i=e.replace(/\r?\n?$/g,"");throw new Error("GFF3 parse error. Cannot parse '".concat(i,"'."))}this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new D(this.sequenceCallback),this.fastaParser.addLine(e)}}}},{key:"finish",value:function(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}},{key:"_emitItem",value:function(e){Array.isArray(e)?this.featureCallback(e):"directive"in e?this.directiveCallback(e):"comment"in e&&this.commentCallback(e)}},{key:"_enforceBufferSizeLimit",value:function(){for(var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=function t(r){r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach((function(t){delete e._underConstructionById[t],delete e._completedReferences[t]})),r.forEach((function(e){e.child_features&&e.child_features.forEach((function(e){return t(e)})),e.derived_features&&e.derived_features.forEach((function(e){return t(e)}))})))};this._underConstructionTopLevel.length+t>this.bufferSize;){var n=this._underConstructionTopLevel.shift();n&&(this._emitItem(n),r(n))}}},{key:"_emitAllUnderConstructionFeatures",value:function(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error("some features reference other features that do not exist in the file (or in the same '###' scope). ".concat(Object.keys(this._underConstructionOrphans)))}},{key:"_bufferLine",value:function(e){var t,r,n,o=this,i=T(T({},b(e)),{},{child_features:[],derived_features:[]}),a=(null===(t=i.attributes)||void 0===t?void 0:t.ID)||[],u=(null===(r=i.attributes)||void 0===r?void 0:r.Parent)||[],c=this.disableDerivesFromReferences?[]:(null===(n=i.attributes)||void 0===n?void 0:n.Derives_from)||[];if(a.length||u.length||c.length){var l=void 0;a.forEach((function(e){var t=o._underConstructionById[e];t?(t[t.length-1].type!==i.type&&o._parseError('multi-line feature "'.concat(e,'" has inconsistent types: "').concat(i.type,'", "').concat(t[t.length-1].type,'"')),t.push(i),l=t):(l=[i],o._enforceBufferSizeLimit(1),u.length||c.length||o._underConstructionTopLevel.push(l),o._underConstructionById[e]=l,o._resolveReferencesTo(l,e))})),this._resolveReferencesFrom(l||[i],{Parent:u,Derives_from:c},a)}else this._emitItem([i])}},{key:"_resolveReferencesTo",value:function(e,t){var r=this._underConstructionOrphans[t];r&&(e.forEach((function(e){var t;(t=e.child_features).push.apply(t,C(r.Parent))})),e.forEach((function(e){var t;(t=e.derived_features).push.apply(t,C(r.Derives_from))})),delete this._underConstructionOrphans[t])}},{key:"_parseError",value:function(e){this.eof=!0,this.errorCallback("".concat(this.lineNumber,": ").concat(e))}},{key:"_resolveReferencesFrom",value:function(e,t,r){var n=this;function o(e,t,r){var n=e[t];n||(n={},e[t]=n);var o=n[r]||!1;return n[r]=!0,o}t.Parent.forEach((function(t){var i=n._underConstructionById[t];if(i){r.filter((function(e){return o(n._completedReferences,e,"Parent,".concat(t))})).length||i.forEach((function(t){t.child_features.push(e)}))}else{var a=n._underConstructionOrphans[t];a||(a={Parent:[],Derives_from:[]},n._underConstructionOrphans[t]=a),a.Parent.push(e)}})),t.Derives_from.forEach((function(t){var i=n._underConstructionById[t];if(i){r.filter((function(e){return o(n._completedReferences,e,"Derives_from,".concat(t))})).length||i.forEach((function(t){t.derived_features.push(e)}))}else{var a=n._underConstructionOrphans[t];a||(a={Parent:[],Derives_from:[]},n._underConstructionOrphans[t]=a),a.Derives_from.push(e)}}))}}]),e}(),z=r(554);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};U(this,r),(e=t.call(this,{objectMode:!0})).textBuffer="";var o=te(n);e.encoding=n.encoding||"utf8",e.decoder=new i.s;var a=e.push.bind(Y(e));return e.parser=new B({featureCallback:o.parseFeatures?a:void 0,directiveCallback:o.parseDirectives?a:void 0,commentCallback:o.parseComments?a:void 0,sequenceCallback:o.parseSequences?a:void 0,errorCallback:function(t){return e.emit("error",t)},bufferSize:o.bufferSize,disableDerivesFromReferences:o.disableDerivesFromReferences}),e}return V(r,[{key:"_addLine",value:function(e){e&&this.parser.addLine(e)}},{key:"_nextText",value:function(e){var t=this,r=(this.textBuffer+e).split(/\r?\n/);this.textBuffer=r.pop()||"",r.forEach((function(e){return t._addLine(e)}))}},{key:"_transform",value:function(e,t,r){this._nextText(this.decoder.write(e)),ee(r)}},{key:"_flush",value:function(e){this.decoder.end&&this._nextText(this.decoder.end()),null!=this.textBuffer&&this._addLine(this.textBuffer),this.parser.finish(),ee(e)}}]),r}(o.Transform),ne=function(e){W(r,e);var t=$(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return U(this,r),(e=t.call(this,Object.assign(n,{objectMode:!0}))).linesSinceLastSyncMark=0,e.haveWeEmittedData=!1,e.fastaMode=!1,e.minLinesBetweenSyncMarks=n.minSyncLines||100,e.insertVersionDirective=n.insertVersionDirective||!1,e}return V(r,[{key:"_transform",value:function(e,t,r){var n;if(!this.haveWeEmittedData&&this.insertVersionDirective){var o=Array.isArray(e)?e[0]:e;"directive"in o&&"gff-version"!==o.directive&&this.push("##gff-version 3\n")}if("sequence"in e&&!this.fastaMode&&(this.push("##FASTA\n"),this.fastaMode=!0),n=Array.isArray(e)?e.map(k).join(""):k(e),this.push(n),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push("###\n"),this.linesSinceLastSyncMark=0;else{for(var i=0,a=0;a0&&void 0!==arguments[0]?arguments[0]:{})},parseStringSync:function(e){if(!e)return[];var t=te(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),r=[],n=r.push.bind(r),o=new B({featureCallback:t.parseFeatures?n:void 0,directiveCallback:t.parseDirectives?n:void 0,commentCallback:t.parseComments?n:void 0,sequenceCallback:t.parseSequences?n:void 0,disableDerivesFromReferences:t.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:function(e){throw e}});return e.split(/\r?\n/).forEach(o.addLine.bind(o)),o.finish(),r},formatSync:function(e){var t=[],r=[];e.forEach((function(e){"sequence"in e?r.push(e):t.push(e)}));var n=t.map(k).join("");return r.length&&(n+="##FASTA\n",n+=r.map(P).join("")),n},formatStream:function(){return new ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},formatFile:function(e,t){var r=X({insertVersionDirective:!0},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return new Promise((function(n,o){e.pipe(new ne(r)).on("end",(function(){return n(null)})).on("error",o).pipe(t)}))},util:n}},63082:(e,t,r)=>{"use strict";r.d(t,{IB:()=>b,P:()=>h});var n=r(93403),o=r(41589),i=r(80365).Buffer;function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){for(var r=0;r3?s[3]:void 0,o=s.length>2?s[2]:void 0,!((r=s.length>1&&void 0!==s[1]?s[1]:0)<0)){e.next=6;break}throw new TypeError("regionStart cannot be less than 0");case 6:if((void 0===o||o>t.length)&&(o=t.length),!(r>=o)){e.next=9;break}return e.abrupt("return","");case 9:return a=f(t,r),c=f(t,o)-a,l=i.allocUnsafe(c),e.next=14,this.fasta.read(l,0,c,a,n);case 14:return e.abrupt("return",l.toString("utf8").replace(/\s+/g,""));case 15:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})}],r&&c(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(a,e);var t,r,n,i=(r=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(r);if(n){var o=m(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){var t,r=e.fasta,n=e.path,u=e.fai,c=e.faiPath,l=e.gzi,s=e.gziPath;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,{fasta:r,path:n,fai:u,faiPath:c}),r&&l?t.fasta=new o.BgzfFilehandle({filehandle:r,gziFilehandle:l}):n&&s&&(t.fasta=new o.BgzfFilehandle({path:n,gziPath:s})),t}return t=a,Object.defineProperty(t,"prototype",{writable:!1}),t}(h)},63627:(e,t,r)=>{"use strict";r.d(t,{pC:()=>be});var n=r(33860),o=r.n(n),i=r(94877),a=r.n(i),u=r(80365),c=r(93403),l=r(41589);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return p(e,arguments,y(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)},f(e)}function p(e,t,r){return p=d()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&h(o,r.prototype),o},p.apply(null,arguments)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(i,e);var t,r,n,o=(r=i,n=d(),function(){var e,t=y(r);if(n){var o=y(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(f(Error));function b(e){if(e&&e.aborted){if("undefined"!=typeof DOMException)throw new DOMException("aborted","AbortError");var t=new m("aborted");throw t.code="ERR_ABORTED",t}}function g(e,t){var r=[],n=null;return 0===e.length?e:(e.sort((function(e,t){var r=e.minv.blockPosition-t.minv.blockPosition;return 0!==r?r:e.minv.dataPosition-t.minv.dataPosition})),e.forEach((function(e){var o,i;(!t||e.maxv.compareTo(t)>0)&&(null===n?(r.push(e),n=e):(o=n,(i=e).minv.blockPosition-o.maxv.blockPosition<65e3&&i.maxv.blockPosition-o.minv.blockPosition<5e6?e.maxv.compareTo(n.maxv)>0&&(n.maxv=e.maxv):(r.push(e),n=e)))})),r)}var w=r(16126),S=r.n(w);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){for(var r=0;r0&&(e=n[t]);return e}}],(r=[{key:"toString",value:function(){return"".concat(this.blockPosition,":").concat(this.dataPosition)}},{key:"compareTo",value:function(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}}])&&O(t.prototype,r),n&&O(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])throw new Error("big-endian virtual file offsets not implemented");return new E(1099511627776*e[t+7]+4294967296*e[t+6]+16777216*e[t+5]+65536*e[t+4]+256*e[t+3]+e[t+2],e[t+1]<<8|e[t])}function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function k(e,t){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.minv=t,this.maxv=r,this.bin=n,this._fetchedSize=o}var t,r;return t=e,(r=[{key:"toUniqueString",value:function(){return"".concat(this.minv,"..").concat(this.maxv," (bin ").concat(this.bin,", fetchedSize ").concat(this.fetchedSize(),")")}},{key:"toString",value:function(){return this.toUniqueString()}},{key:"compareTo",value:function(e){return this.minv.compareTo(e.minv)||this.maxv.compareTo(e.maxv)||this.bin-e.bin}},{key:"fetchedSize",value:function(){return void 0!==this._fetchedSize?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}])&&k(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),C=["indices"];function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function T(){T=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(I([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==L(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function A(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function I(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function R(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){I(i,n,o,a,u,"next",e)}function u(e){I(i,n,o,a,u,"throw",e)}a(void 0)}))}}function M(e,t){for(var r=0;r0&&void 0!==o[0]?o[0]:{},e.next=3,this.parse(t);case 3:return(r=e.sent).indices,n=A(r,C),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"_findFirstData",value:function(e,t){return e?e.compareTo(t)>0?t:e:t}},{key:"parse",value:(o=R(T().mark((function e(){var t,r=this,n=arguments;return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},this.parseP||(this.parseP=this._parse(t).catch((function(e){throw r.parseP=void 0,e}))),e.abrupt("return",this.parseP);case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"hasRefSeq",value:(n=R(T().mark((function e(t){var r,n=arguments;return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,this.parse(r);case 3:if(e.t1=t,e.t0=e.sent.indices[e.t1],e.t0){e.next=7;break}e.t0={};case 7:return e.abrupt("return",!!e.t0.binIndex);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&M(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||B(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=B(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function B(e,t){if(e){if("string"==typeof e)return z(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function U(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function H(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){U(i,n,o,a,u,"next",e)}function u(e){U(i,n,o,a,u,"throw",e)}a(void 0)}))}}function V(e,t){for(var r=0;r>26),1+((t-=1)>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(s,e);var t,r,n,o,i,a,u,c=(a=s,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=q(a);if(u){var r=q(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return t=s,r=[{key:"lineCount",value:(i=H(G().mark((function e(t){var r,n,o,i,a=arguments;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},e.next=3,this.parse(r);case 3:if(n=e.sent){e.next=6;break}return e.abrupt("return",-1);case 6:if(o=n.refNameToId[t],n.indices[o]){e.next=10;break}return e.abrupt("return",-1);case 10:if(!(i=n.indices[o].stats)){e.next=13;break}return e.abrupt("return",i.lineCount);case 13:return e.abrupt("return",-1);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_parse",value:(o=H(G().mark((function e(){var t,r,n,o,i,a,u,c,s,f,p,d,h,y,v,m,g,w,S,x=this,O=arguments;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=O.length>0&&void 0!==O[0]?O[0]:{},e.next=3,this.filehandle.readFile(t);case 3:return r=e.sent,e.next=6,(0,l.unzip)(r);case 6:if(n=e.sent,b(t.signal),21578324===n.readUInt32LE(0)){e.next=10;break}throw new Error("Not a TBI file");case 10:if(o=n.readInt32LE(4),i=n.readInt32LE(8),a=65536&i?"zero-based-half-open":"1-based-closed",u={0:"generic",1:"SAM",2:"VCF"}[15&i]){e.next=17;break}throw new Error("invalid Tabix preset format flags ".concat(i));case 17:return c={ref:n.readInt32LE(12),start:n.readInt32LE(16),end:n.readInt32LE(20)},s=n.readInt32LE(24),37449,f=Math.pow(2,29),p=s?String.fromCharCode(s):null,d=n.readInt32LE(28),h=n.readInt32LE(32),y=this._parseNameBytes(n.slice(36,36+h)),v=y.refNameToId,m=y.refIdToName,g=36+h,S=new Array(o).fill(0).map((function(){var e=n.readInt32LE(g);g+=4;for(var t,r={},o=0;o37450)throw new Error("tabix index contains too many bins, please use a CSI index");if(37450===i){var a=n.readInt32LE(g);g+=4,2===a&&(t=x.parsePseudoBin(n,g)),g+=16*a}else{var u=n.readInt32LE(g);g+=4;for(var c=new Array(u),l=0;l3&&void 0!==P[3]?P[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return",[]);case 7:if(a=i.refNameToId[t],u=i.indices[a]){e.next=11;break}return e.abrupt("return",[]);case 11:(u.linearIndex.length?u.linearIndex[r>>14>=u.linearIndex.length?u.linearIndex.length-1:r>>14]:new E(0,0))||console.warn("querying outside of possible tabix range"),c=$(r,n),l=[],s=D(c);try{for(s.s();!(f=s.n()).done;)for(p=Z(f.value,2),d=p[0],h=p[1],y=d;y<=h;y++)if(u.binIndex[y])for(v=u.binIndex[y],m=0;m>14,b-1),x=Math.min(n>>14,b-1),O=S;O<=x;++O)(j=u.linearIndex[O])&&(!w||j.compareTo(w)<0)&&(w=j);return e.abrupt("return",g(l,w));case 23:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})}],r&&V(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(N);function K(e){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K(e)}function J(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=X(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function X(e,t){if(e){if("string"==typeof e)return Q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Q(e,t):void 0}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ne(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function oe(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ne(i,n,o,a,u,"next",e)}function u(e){ne(i,n,o,a,u,"throw",e)}a(void 0)}))}}function ie(e,t){for(var r=0;r1&&void 0!==a[1]?a[1]:{},e.next=3,this.parse(r);case 3:if(n=e.sent){e.next=6;break}return e.abrupt("return",-1);case 6:if(o=n.refNameToId[t],n.indices[o]){e.next=10;break}return e.abrupt("return",-1);case 10:if(!(i=n.indices[o].stats)){e.next=13;break}return e.abrupt("return",i.lineCount);case 13:return e.abrupt("return",-1);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"indexCov",value:(i=oe(re().mark((function e(){return re().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("CSI indexes do not support indexcov");case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:"parseAuxData",value:function(e,t){var r=e.readInt32LE(t),n=65536&r?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[15&r];if(!o)throw new Error("invalid Tabix preset format flags ".concat(r));var i={ref:e.readInt32LE(t+4),start:e.readInt32LE(t+8),end:e.readInt32LE(t+12)},a=e.readInt32LE(t+16),u=a?String.fromCharCode(a):null,c=e.readInt32LE(t+20),l=e.readInt32LE(t+24),s=this._parseNameBytes(e.slice(t+28,t+28+l));return{refIdToName:s.refIdToName,refNameToId:s.refNameToId,skipLines:c,metaChar:u,columnNumbers:i,format:o,coordinateType:n}}},{key:"_parseNameBytes",value:function(e){for(var t=0,r=0,n=[],o={},i=0;i0&&void 0!==d[0]?d[0]:{},e.t0=l.unzip,e.next=4,this.filehandle.readFile(t);case 4:return e.t1=e.sent,e.next=7,(0,e.t0)(e.t1);case 7:if(21582659!==(r=e.sent).readUInt32LE(0)){e.next=12;break}n=1,e.next=17;break;case 12:if(38359875!==r.readUInt32LE(0)){e.next=16;break}n=2,e.next=17;break;case 16:throw new Error("Not a CSI file");case 17:return this.minShift=r.readInt32LE(4),this.depth=r.readInt32LE(8),this.maxBinNumber=((1<<3*(this.depth+1))-1)/7,o=Math.pow(2,this.minShift+3*this.depth),i=r.readInt32LE(12),a=i&&i>=30?this.parseAuxData(r,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},u=r.readInt32LE(16+i),s=16+i+4,f=new Array(u).fill(0).map((function(){var e=r.readInt32LE(s);s+=4;for(var t,n={},o=0;op.maxBinNumber)t=p.parsePseudoBin(r,s+4),s+=48;else{var a=j(r,s+4);c=p._findFirstData(c,a);var u=r.readInt32LE(s+12);s+=16;for(var l=new Array(u),f=0;f3&&void 0!==b[3]?b[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return",[]);case 7:if(a=i.refNameToId[t],u=i.indices[a]){e.next=11;break}return e.abrupt("return",[]);case 11:c=this.reg2bins(r,n),l=[],s=J(c);try{for(s.s();!(f=s.n()).done;)for(w=f.value,S=2,p=function(e){if(Array.isArray(e))return e}(w)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(w,S)||X(w,S)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=p[0],h=p[1],y=d;y<=h;y++)if(u.binIndex[y])for(v=u.binIndex[y],m=0;mMath.pow(2,50)&&(t=Math.pow(2,34)),t-=1;for(var r,n=0,o=0,i=this.minShift+3*this.depth,a=[];n<=this.depth;i-=3,o+=(r=3*n,1*Math.pow(2,r)),n+=1){var u=o+le(e,i),c=o+le(t,i);if(c-u+a.length>this.maxBinNumber)throw new Error("query ".concat(e,"-").concat(t," is too large for current binning scheme (shift ").concat(this.minShift,", depth ").concat(this.depth,"), try a smaller query or a coarser index binning scheme"));a.push([u,c])}return a}}],r&&ie(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(N);function fe(e){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fe(e)}function pe(){pe=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==fe(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function de(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function he(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){de(i,n,o,a,u,"next",e)}function u(e){de(i,n,o,a,u,"throw",e)}a(void 0)}))}}function ye(e,t){for(var r=0;rthis.chunkSizeLimit)){e.next=27;break}throw new Error("Too much data. Chunk size ".concat(f.toLocaleString()," bytes exceeds chunkSizeLimit of ").concat(this.chunkSizeLimit.toLocaleString(),"."));case 27:s+=1,e.next=23;break;case 30:p=Date.now(),d=0;case 32:if(!(d=w[x++];);x--}if(P=this.checkLine(c,t,r,n,j),k=P.startCoordinate,_=P.overlaps,!(void 0!==h&&void 0!==k&&h>k)){e.next=54;break}throw new Error("Lines not sorted by start coordinate (".concat(h," > ").concat(k,"), this file is not usable with Tabix."));case 54:if(h=k,!_){e.next=59;break}u(j.trim(),256*g[x]+(S-w[x])+y.minv.dataPosition+1),e.next=61;break;case 59:if(!(void 0!==k&&k>=n)){e.next=61;break}return e.abrupt("return");case 61:if(!(this.yieldTime&&p-Date.now()>this.yieldTime)){e.next=66;break}return p=Date.now(),b(i),e.next=66,me(1);case 66:S=O+1,e.next=44;break;case 69:d+=1,e.next=32;break;case 72:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return y.apply(this,arguments)})},{key:"getMetadata",value:(h=he(pe().mark((function e(){var t,r=arguments;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.abrupt("return",this.index.getMetadata(t));case 2:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"getHeaderBuffer",value:(d=he(pe().mark((function e(){var t,r,n,o,i,a,u,c,s,f,p,d=arguments;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},e.next=3,this.getMetadata(t);case 3:return r=e.sent,n=r.firstDataLine,o=r.metaChar,i=r.maxBlockSize,b(t.signal),a=((null==n?void 0:n.blockPosition)||0)+i,e.next=11,this._readRegion(0,a,t);case 11:return u=e.sent,b(t.signal),e.prev=13,e.next=16,(0,l.unzip)(u);case 16:u=e.sent,e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(13),console.error(e.t0),new Error("error decompressing block ".concat(e.t0.code," at 0 (length ").concat(a,") ").concat(e.t0));case 23:if(!o){e.next=36;break}c=-1,s="\n".charCodeAt(0),f=o.charCodeAt(0),p=0;case 28:if(!(p0&&void 0!==n[0]?n[0]:{},e.next=3,this.getHeaderBuffer(t);case 3:return r=e.sent,e.abrupt("return",r.toString("utf8"));case 5:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"getReferenceSequenceNames",value:(f=he(pe().mark((function e(){var t,r,n=arguments;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.getMetadata(t);case 3:return r=e.sent,e.abrupt("return",r.refIdToName);case 5:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"checkLine",value:function(e,t,r,n,o){var i=e.columnNumbers,a=e.metaChar,u=e.coordinateType,c=e.format;if(o.charAt(0)===a)return{overlaps:!1};var l=i.ref,s=i.start,f=i.end;l||(l=0),s||(s=0),f||(f=0),"VCF"===c&&(f=8);for(var p=Math.max(l,s,f),d=1,h=0,y="",v=-1/0,m=0;m=n)return{startCoordinate:v,overlaps:!1};if((0===f||f===s)&&v+1<=r)return{startCoordinate:v,overlaps:!1}}else if("VCF"===c&&4===d)y=o.slice(h,m);else if(d===f&&("VCF"===c?this._getVcfEnd(v,y,o.slice(h,m)):parseInt(o.slice(h,m),10))<=r)return{overlaps:!1};if(h=m+1,(d+=1)>p)break}return{startCoordinate:v,overlaps:!0}}},{key:"_getVcfEnd",value:function(e,t,r){var n=e+t.length,o=-1!==r.indexOf("SVTYPE=TRA");if("."===r[0]||o){if(o)return e+1}else for(var i=";",a=0;a1&&void 0!==n[1]?n[1]:{},e.abrupt("return",this.index.lineCount(t,r));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"_readRegion",value:(i=he(pe().mark((function e(t,r){var n,o,i,a,c,l=arguments;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.length>2&&void 0!==l[2]?l[2]:{},o=u.Buffer.alloc(r),e.next=4,this.filehandle.read(o,0,r,t,n);case 4:return i=e.sent,a=i.bytesRead,c=i.buffer,e.abrupt("return",c.slice(0,a));case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"readChunk",value:(n=he(pe().mark((function e(t){var r,n,o=arguments;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this._readRegion(t.minv.blockPosition,t.fetchedSize(),r);case 3:return n=e.sent,e.prev=4,e.abrupt("return",(0,l.unzipChunkSlice)(n,t));case 8:throw e.prev=8,e.t0=e.catch(4),new Error("error decompressing c ".concat(t.toString()," ").concat(e.t0));case 11:case"end":return e.stop()}}),e,this,[[4,8]])}))),function(e){return n.apply(this,arguments)})}],r&&ye(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},46811:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rM,HubFile:()=>T,RaFile:()=>S,RaStanza:()=>p,TrackDbFile:()=>k});var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(d,e);var t,r,u,c,p=(u=d,c=l(),function(){var e,t=f(u);if(c){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function d(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{checkIndent:!0};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),t=p.call(this);var n,o=r.checkIndent;return t._checkIndent=o,n="string"==typeof e?e.trimEnd().split(/\r?\n/):e||[],t._keyAndCommentOrder=[],n.forEach((function(e){t.add(e)})),t}return t=d,(r=[{key:"add",value:function(e){if(""===e)throw new Error("Invalid stanza, contained blank lines");if(e.trim().startsWith("#"))return this._keyAndCommentOrder.push(e.trim()),this;if(e.trimEnd().endsWith("\\")){var t=e.trimEnd().slice(0,-1);return this._continuedLine?this._continuedLine+=t.trimStart():this._continuedLine=t,this}var r,n,i=e;if(this._continuedLine&&(i=this._continuedLine+i.trimStart(),this._continuedLine=void 0),this.indent||this._checkIndent){var u=i.match(/^([ \t]+)/);if(void 0===this.indent)if(u){var c=(n=2,function(e){if(Array.isArray(e))return e}(r=u)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,n)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());this.indent=c[1]}else this.indent="";else if(""===this.indent&&null!==u||this.indent&&u&&this.indent!==u[1])throw new Error("Inconsistent indentation of stanza")}else this.indent="";var l=i.trim(),s=l.indexOf(" ");if(-1===s){if(!this.nameKey)throw new Error("First line in a stanza must have both a key and a value");return this.has(l)?this:(this._keyAndCommentOrder.push(l),a(f(d.prototype),"set",this).call(this,l,""))}var p=l.slice(0,s),h=l.slice(s+1);if(this.has(p)&&h!==this.get(p))throw new Error("Got duplicate key with a different value in stanza: "+'"'.concat(p,'" key has both ').concat(this.get(p)," and ").concat(h));return this._keyAndCommentOrder.push(p),this.nameKey||(this.nameKey=p,this.name=l.slice(s+1)),a(f(d.prototype),"set",this).call(this,p,h)}},{key:"set",value:function(e,t){if("string"!=typeof t)throw new Error("Value of ".concat(e," must be a string, got ").concat(n(t)));return a(f(d.prototype),"set",this).call(this,e,t)}},{key:"delete",value:function(e){if(e===this.nameKey)throw new Error("Cannot delete the first line in a stanza (you can still overwrite it with set()).");return this._keyAndCommentOrder.includes(e)&&(this._keyAndCommentOrder=this._keyAndCommentOrder.filter((function(t){return t!==e}))),a(f(d.prototype),"delete",this).call(this,e)}},{key:"clear",value:function(){this._keyAndCommentOrder.length=0,this._continuedLine=void 0,this.indent=void 0,this.name=void 0,this.nameKey=void 0,a(f(d.prototype),"clear",this).call(this)}},{key:"toString",value:function(){var e=this;if(0===this.size)return"";var t=[];return this._keyAndCommentOrder.forEach((function(r){r.startsWith("#")?t.push("".concat(e.indent).concat(r)):t.push("".concat(e.indent).concat(r," ").concat(e.get(r)).trimEnd())})),"".concat(t.join("\n"),"\n")}}])&&i(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(u(Map));function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{checkIndent:!0};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this);var n,o=r.checkIndent;return t._checkIndent=o,n="string"==typeof e?e.trimEnd().split(/(?:[\t ]*\r?\n){2,}/):e||[],t._stanzaAndCommentOrder=[],n.forEach((function(e){t.add(e)})),t}return t=a,(r=[{key:"add",value:function(e){if(""===e)throw new Error("Invalid stanza, was empty");if(e.trim().startsWith("#")){var t=e.trimEnd().split(/\r?\n/).map((function(e){return e.trim()}));if(t.every((function(e){return e.startsWith("#")})))return this._stanzaAndCommentOrder.push(t.join("\n")),this}var r=new p(e,{checkIndent:this._checkIndent});if(this.nameKey){if(r.nameKey!==this.nameKey)throw new Error("The first line in each stanza must have the same key. "+"Saw both ".concat(this.nameKey," and ").concat(r.nameKey))}else this.nameKey=r.nameKey;if(!r.name)throw new Error("No stanza name: ".concat(r.name));if(this.has(r.name))throw new Error("Got duplicate stanza name: ".concat(r.name));return this._stanzaAndCommentOrder.push(r.name),y(w(a.prototype),"set",this).call(this,r.name,r)}},{key:"update",value:function(e,t){if(!(t instanceof p))throw new Error("Value of ".concat(e," is not an RaStanza"));y(w(a.prototype),"set",this).call(this,e,t)}},{key:"delete",value:function(e){return this._stanzaAndCommentOrder.includes(e)&&(this._stanzaAndCommentOrder=this._stanzaAndCommentOrder.filter((function(t){return t!==e}))),y(w(a.prototype),"delete",this).call(this,e)}},{key:"clear",value:function(){this._stanzaAndCommentOrder.length=0,this.nameKey=void 0,y(w(a.prototype),"clear",this).call(this)}},{key:"toString",value:function(){var e=this;if(0===this.size)return"";var t=[];return this._stanzaAndCommentOrder.forEach((function(r){if(r.startsWith("#"))t.push("".concat(r,"\n"));else{var n=e.get(r);n&&t.push(n.toString())}})),t.join("\n")}}])&&h(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(v(Map));function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)throw new Error("Track ".concat(r," is missing required key(s): ").concat(i.join(", ")));var a=["superTrack","compositeTrack","container","view"];if(!o.some((function(e){return a.includes(e)}))){if(!o.includes("bigDataUrl"))throw new Error("Track ".concat(r,' is missing required key "bigDataUrl"'));if(!o.includes("type")){var u=t.settings(r);if(!Array.from(u.keys()).includes("type"))throw new Error("Neither track ".concat(r,' nor any of its parent tracks have the required key "type"'))}}var c,l,s="",f=r;do{if(f=null===(n=t.get(f))||void 0===n?void 0:n.get("parent")){var p=f.split(" ");f=(c=p,l=1,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(c,l)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(c,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],s+=" "}}while(f);var d=t.get(r);d&&(d.indent=s,t.set(r,d))})),t}return t=a,(r=[{key:"settings",value:function(e){var t,r=this;if(!this.has(e))throw new Error("Track ".concat(e," does not exist"));var n=[e],o=e;do{(o=null===(t=this.get(o))||void 0===t?void 0:t.get("parent"))&&n.push(o)}while(o);var i=new Map;return n.reverse(),n.forEach((function(e){var t;null===(t=r.get(e))||void 0===t||t.forEach((function(e,t){i.set(t,e)}))})),i}}])&&E(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(S);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(i,e);var t,r,n,o=(r=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=L(r);if(n){var o=L(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),"hub"!==(t=o.call(this,e)).nameKey)throw new Error('Hub file must begin with a line like "hub "');var r=["hub","shortLabel","longLabel","genomesFile","email","descriptionUrl"],n=[];if(t.forEach((function(e,t){r.includes(t)||n.push(t)})),n.length>0)throw new Error("Hub file has invalid entr".concat(1===n.length?"y":"ies",": ").concat(n.join(", ")));var a=[];if(r.forEach((function(e){"descriptionUrl"===e||t.get(e)||a.push(e)})),a.length>0)throw new Error("Hub file is missing required entr".concat(1===a.length?"y":"ies",": ").concat(a.join(", ")));return t}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(p);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(i,e);var t,r,n,o=(r=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=R(r);if(n){var o=R(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),"genome"!==(t=o.call(this,e)).nameKey)throw new Error('Genomes file must begin with a line like "genome "');var r=["genome","trackDb"];return t.forEach((function(e,t){var n=[];if(r.forEach((function(t){e.get(t)||n.push(t)})),n.length>0)throw new Error("Genomes file entry ".concat(t," is missing required entr").concat(1===n.length?"y":"ies",": ").concat(n.join(", ")))})),t}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(S)},34213:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s,I:()=>l});const n={InfoFields:{AA:{Number:1,Type:"String",Description:"Ancestral allele"},AC:{Number:"A",Type:"Integer",Description:"Allele count in genotypes, for each ALT allele, in the same order as listed"},AD:{Number:"R",Type:"Integer",Description:"Total read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},AF:{Number:"A",Type:"Float",Description:"Allele frequency for each ALT allele in the same order as listed (estimated from primary data, not called genotypes)"},AN:{Number:1,Type:"Integer",Description:"Total number of alleles in called genotypes"},BQ:{Number:1,Type:"Float",Description:"RMS base quality"},CIGAR:{Number:1,Type:"Float",Description:"Cigar string describing how to align an alternate allele to the reference allele"},DB:{Number:0,Type:"Flag",Description:"dbSNP membership"},DP:{Number:1,Type:"Integer",Description:"combined depth across samples"},END:{Number:1,Type:"Integer",Description:"End position (for use with symbolic alleles)"},H2:{Number:0,Type:"Flag",Description:"HapMap2 membership"},H3:{Number:0,Type:"Flag",Description:"HapMap3 membership"},MQ:{Number:1,Type:null,Description:"RMS mapping quality"},MQ0:{Number:1,Type:"Integer",Description:"Number of MAPQ == 0 reads"},NS:{Number:1,Type:"Integer",Description:"Number of samples with data"},SB:{Number:4,Type:"Integer",Description:"Strand bias"},SOMATIC:{Number:0,Type:"Flag",Description:"Somatic mutation (for cancer genomics)"},VALIDATED:{Number:0,Type:"Flag",Description:"Validated by follow-up experiment"},"1000G":{Number:0,Type:"Flag",Description:"1000 Genomes membership"},IMPRECISE:{Number:0,Type:"Flag",Description:"Imprecise structural variation"},NOVEL:{Number:0,Type:"Flag",Description:"Indicates a novel structural variation"},SVTYPE:{Number:1,Type:"String",Description:"Type of structural variant"},SVLEN:{Number:null,Type:"Integer",Description:"Difference in length between REF and ALT alleles"},CIPOS:{Number:2,Type:"Integer",Description:"Confidence interval around POS for imprecise variants"},CIEND:{Number:2,Type:"Integer",Description:"Confidence interval around END for imprecise variants"},HOMLEN:{Type:"Integer",Description:"Length of base pair identical micro-homology at event breakpoints"},HOMSEQ:{Type:"String",Description:"Sequence of base pair identical micro-homology at event breakpoints"},BKPTID:{Type:"String",Description:"ID of the assembled alternate allele in the assembly file"},MEINFO:{Number:4,Type:"String",Description:"Mobile element info of the form NAME,START,END,POLARITY"},METRANS:{Number:4,Type:"String",Description:"Mobile element transduction info of the form CHR,START,END,POLARITY"},DGVID:{Number:1,Type:"String",Description:"ID of this element in Database of Genomic Variation"},DBVARID:{Number:1,Type:"String",Description:"ID of this element in DBVAR"},DBRIPID:{Number:1,Type:"String",Description:"ID of this element in DBRIP"},MATEID:{Number:null,Type:"String",Description:"ID of mate breakends"},PARID:{Number:1,Type:"String",Description:"ID of partner breakend"},EVENT:{Number:1,Type:"String",Description:"ID of event associated to breakend"},CILEN:{Number:2,Type:"Integer",Description:"Confidence interval around the inserted material between breakend"},DPADJ:{Type:"Integer",Description:"Read Depth of adjacency"},CN:{Number:1,Type:"Integer",Description:"Copy number of segment containing breakend"},CNADJ:{Number:null,Type:"Integer",Description:"Copy number of adjacency"},CICN:{Number:2,Type:"Integer",Description:"Confidence interval around copy number for the segment"},CICNADJ:{Number:null,Type:"Integer",Description:"Confidence interval around copy number for the adjacency"}},GenotypeFields:{AD:{Number:"R",Type:"Integer",Description:"Read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},DP:{Number:1,Type:"Integer",Description:"Read depth"},EC:{Number:"A",Type:"Integer",Description:"Expected alternate allele counts"},FT:{Number:1,Type:"String",Description:'Filter indicating if this genotype was "called"'},GL:{Number:"G",Type:"Float",Description:"Genotype likelihoods"},GP:{Number:"G",Type:"Float",Description:"Genotype posterior probabilities"},GQ:{Number:1,Type:"Integer",Description:"Conditional genotype quality"},GT:{Number:1,Type:"String",Description:"Genotype"},HQ:{Number:2,Type:"Integer",Description:"Haplotype quality"},MQ:{Number:1,Type:"Integer",Description:"RMS mapping quality"},PL:{Number:"G",Type:"Integer",Description:"Phred-scaled genotype likelihoods rounded to the closest integer"},PQ:{Number:1,Type:"Integer",Description:"Phasing quality"},PS:{Number:1,Type:"Integer",Description:"Phase set"}},AltTypes:{DEL:{Description:"Deletion relative to the reference"},INS:{Description:"Insertion of novel sequence relative to the reference"},DUP:{Description:"Region of elevated copy number relative to the reference"},INV:{Description:"Inversion of reference sequence"},CNV:{Description:"Copy number variable region (may be both deletion and duplication)"},"DUP:TANDEM":{Description:"Tandem duplication"},"DEL:ME":{Description:"Deletion of mobile element relative to the reference"},"INS:ME":{Description:"Insertion of a mobile element relative to the reference"},NON_REF:{Description:"Represents any possible alternative allele at this location"},"*":{Description:"Represents any possible alternative allele at this location"}},FilterTypes:{PASS:{Description:"Passed all filters"}}};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1){for(var r,n,o,i=e.includes("[")?"right":"left",a=0;a(.*)");if(!c)throw new Error("failed to parse ".concat(e));var l=null==c?void 0:c[2];return l?{Join:"left",Replacement:l,MateDirection:"right",MatePosition:"<".concat(null==c?void 0:c[1],">:1")}:void 0}if(e.includes("<")){var s=e.match("(.*)<(.*)>");if(!s)throw new Error("failed to parse ".concat(e));var f=null==s?void 0:s[1];return f?{Join:"right",Replacement:f,MateDirection:"right",MatePosition:"<".concat(null==s?void 0:s[2],">:1")}:void 0}}const s=function(){function e(t){var r=this,o=t.header,i=void 0===o?"":o,a=t.strict,u=void 0===a||a;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!i||!i.length)throw new Error("empty header received");var c,l=i.split(/[\r\n]+/).filter((function(e){return e}));if(!l.length)throw new Error("no non-empty header lines specified");if(this.strict=u,this.metadata=JSON.parse(JSON.stringify({INFO:n.InfoFields,FORMAT:n.GenotypeFields,ALT:n.AltTypes,FILTER:n.FilterTypes})),l.forEach((function(e){if(!e.startsWith("#"))throw new Error("Bad line in header:\n".concat(e));e.startsWith("##")?r._parseMetadata(e):c=e})),!c)throw new Error("No format line found in header");var s=c.trim().split("\t"),f=s.slice(0,8),p=["#CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO"];if(s.length<8)throw new Error("VCF header missing columns:\n".concat(c));if(f.length!==p.length||!f.every((function(e,t){return e===p[t]})))throw new Error("VCF column headers not correct:\n".concat(c));this.samples=s.slice(9)}var t,r;return t=e,r=[{key:"_parseGenotypes",value:function(e,t){var r=this,n=t.split("\t"),o={},i=null==e?void 0:e.split(":");return i&&this.samples.forEach((function(e,t){o[e]={},i.forEach((function(t){o[e][t]=null})),n[t].split(":").filter((function(e){return e})).forEach((function(t,n){var a;if(""===t||"."===t||void 0===t)a=null;else{var u=t.split(",").map((function(e){return"."===e?null:e})),c=r.getMetadata("FORMAT",i[n],"Type");a="Integer"===c||"Float"===c?u.map((function(e){return e?+e:e})):u}o[e][i[n]]=a}),{})})),o}},{key:"_parseMetadata",value:function(e){var t=e.trim().match(/^##(.+?)=(.*)/);if(!t)throw new Error("Line is not a valid metadata line: ".concat(e));var r=i(t.slice(1,3),2),n=r[0],o=r[1];if(o.startsWith("<")){n in this.metadata||(this.metadata[n]={});var a=i(this._parseStructuredMetaVal(o),2),u=a[0],c=a[1];this.metadata[n][u]=c}else this.metadata[n]=o}},{key:"_parseStructuredMetaVal",value:function(e){var t=this._parseKeyValue(e.replace(/^<|>$/g,""),","),r=t.ID;return delete t.ID,"Number"in t&&(Number.isNaN(Number(t.Number))||(t.Number=Number(t.Number))),[r,t]}},{key:"getMetadata",value:function(){for(var e=this.metadata,t=arguments.length,r=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:";",r={},n="",o="",i=1,a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&u.every((function(e){return(0,y.default)(e)}))?h.default.createElement(b.default,{key:o,name:o,prefix:k,value:u}):h.default.createElement(g.default,{key:o,name:o,value:u,description:f,prefix:k});if((0,y.default)(u)){t.omitSingleLevel;var p=l(t,i);return(0,m.isUriLocation)(u)?j?null:h.default.createElement(w.default,{key:o,name:o,prefix:k,value:u}):h.default.createElement(e,c(c({},p),{},{key:o,attributes:u,descriptions:d,prefix:[].concat(s(k),[o])}))}return h.default.createElement(S.default,{key:o,name:o,value:E(u,o),description:f,prefix:k,width:Math.min(T,170)})})))}},89739:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(76835),a=n(r(97225)),u=r(94669),c=r(60285),l=(0,i.makeStyles)()((function(e){return{fieldValue:{wordBreak:"break-word",maxHeight:300,fontSize:12,padding:e.spacing(.5),overflow:"auto"}}}));t.default=function(e){var t=e.value,r=l().classes,n="".concat(t).match(/^https?:\/\//);return o.default.createElement("div",{className:r.fieldValue},o.default.isValidElement(t)?t:n?o.default.createElement(u.Link,{href:"".concat(t)},"".concat(t)):o.default.createElement(c.SanitizedHTML,{html:(0,a.default)(t)?JSON.stringify(t):String(t)}))}},32560:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["id"];function i(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,o))})),T=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(n);try{for(T.s();!(t=T.n()).done;)for(var A=t.value,I=0,R=Object.keys(A);Ie.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){(0,i.default)(t)&&(t=t[e])})),"string"==typeof t?t:(0,i.default)(t)&&"string"==typeof(null==t?void 0:t.Description)?t.Description:void 0}},7:function(e,t,r){"use strict";function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2*p?"".concat(n.slice(0,p),"...").concat(n.slice(-p)):n):null)})),l?a.default.createElement("span",{style:{background:u.updownstreamColor}},l):null)}},224:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(63745),a=r(38914);t.default=function(e){var t=e.cds,r=e.sequence;return o.default.createElement("span",{style:{background:i.cdsColor}},(0,a.stitch)(t,r))}},71747:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(63745);t.default=function(e){var t=e.sequence,r=e.upstream,n=e.downstream;return o.default.createElement(o.default.Fragment,null,r?o.default.createElement("span",{style:{background:i.updownstreamColor}},r):null,o.default.createElement("span",{style:{background:i.genomeColor}},t),n?o.default.createElement("span",{style:{background:i.updownstreamColor}},n):null)}},65211:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(38914),a=r(63745);t.default=function(e){for(var t=e.cds,r=e.sequence,n=e.codonTable,u=(0,i.stitch)(t,r),c="",l=0;le.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r".concat(r.name||r.id||"".concat(r.refName,":").concat(r.start+1,"-").concat(r.end),"-").concat(n,"\n")),u.default.createElement("br",null),"genomic"===n?u.default.createElement(p.default,{sequence:y}):"genomic_sequence_updownstream"===n?u.default.createElement(p.default,{sequence:y,upstream:m,downstream:g}):"cds"===n?u.default.createElement(d.default,{cds:x,sequence:y}):"cdna"===n?u.default.createElement(s.default,{exons:E,cds:x,utr:O,sequence:y,intronBp:a}):"protein"===n?u.default.createElement(f.default,{cds:x,codonTable:P,sequence:y}):"gene"===n?u.default.createElement(s.default,{exons:E,cds:x,utr:O,sequence:y,includeIntrons:!0,intronBp:a}):"gene_collapsed_intron"===n?u.default.createElement(s.default,{exons:E,cds:x,sequence:y,utr:O,includeIntrons:!0,collapseIntron:!0,intronBp:a}):"gene_updownstream"===n?u.default.createElement(s.default,{exons:E,cds:x,sequence:y,utr:O,upstream:m,downstream:g,includeIntrons:!0,intronBp:a}):"gene_updownstream_collapsed_intron"===n?u.default.createElement(s.default,{exons:E,cds:x,sequence:y,utr:O,upstream:m,downstream:g,includeIntrons:!0,collapseIntron:!0,intronBp:a}):u.default.createElement("div",null,"Unknown type")))}));t.default=h},60241:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rp)){e.next=7;break}d({error:"Genomic sequence larger than ".concat(p,'bp, use "force load" button to display')}),e.next=19;break;case 7:return l=i-r,s=a+r,e.next=11,b(i,a,u);case 11:return f=e.sent,e.next=14,b(Math.max(0,l),i,u);case 14:return h=e.sent,e.next=17,b(a,s,u);case 17:y=e.sent,c||d({seq:f,upstream:h,downstream:y});case 19:e.next=25;break;case 21:e.prev=21,e.t0=e.catch(0),console.error(e.t0),v(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,21]])})))(),function(){c=!0}}),[t,e,r,n]),{sequence:c,error:y}}},57342:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.genomeColor=t.updownstreamColor=t.cdsColor=t.proteinColor=t.utrColor=t.intronColor=void 0,t.intronColor=void 0,t.utrColor="rgb(200,240,240)",t.proteinColor="rgb(220,160,220)",t.cdsColor="rgb(220,220,180)",t.updownstreamColor="rgba(250,200,200)",t.genomeColor="rgb(200,280,200)"},31160:function(e,t,r){"use strict";var n=["featureData","finalizedFeatureData"],o=["unformattedFeatureData","featureData"];function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return t<=o||(i.subfeatures=null===(n=e.subfeatures)||void 0===n?void 0:n.map((function(e){return m(e,t,r,o+1,i),r(e)}))),i}function b(e){return s.types.model("BaseFeatureWidget",{id:y.ElementId,type:s.types.literal("BaseFeatureWidget"),featureData:s.types.frozen(),formattedFields:s.types.frozen(),unformattedFeatureData:s.types.frozen(),view:s.types.safeReference(e.pluggableMstType("view","stateModel")),track:s.types.safeReference(e.pluggableMstType("track","stateModel")),trackId:s.types.maybe(s.types.string),trackType:s.types.maybe(s.types.string)}).volatile((function(){return{error:void 0}})).actions((function(e){return{setFeatureData:function(t){e.unformattedFeatureData=t},clearFeatureData:function(){e.featureData=void 0},setFormattedData:function(t){e.featureData=t},setExtra:function(t,r){e.trackId=r,e.trackType=t},setError:function(t){e.error=t}}})).actions((function(e){return{afterCreate:function(){(0,s.addDisposer)(e,(0,f.autorun)((function(){var t,r;try{e.setExtra(null===(t=e.track)||void 0===t?void 0:t.type,null===(r=e.track)||void 0===r?void 0:r.configuration.trackId);var n=e.unformattedFeatureData,o=e.track,i=(0,h.getSession)(e);if(n){var a=(0,p.default)(n),u=function(e,t){return c(c({},(0,d.getConf)(i,["formatDetails",e],{feature:t})),(0,d.getConf)(o,["formatDetails",e],{feature:t}))};o&&(a.__jbrowsefmt=u("feature",a),m(a,(0,d.getConf)(o,["formatDetails","depth"]),(function(e){e.__jbrowsefmt=u("subfeatures",e)}))),e.setFormattedData(a)}}catch(t){console.error(t),e.setError(t)}})))}}})).preProcessSnapshot((function(e){return c({unformattedFeatureData:e.featureData,featureData:e.finalizedFeatureData},a(e,n))})).postProcessSnapshot((function(e){e.unformattedFeatureData;var t=e.featureData,r=a(e,o);return c({finalizedFeatureData:JSON.parse(JSON.stringify(t,(function(e,t){return void 0===t?null:t})))},r)}))}t.configSchema=v,t.default=b,t.stateModelFactory=b},38914:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=r.start&&e.start<=r.start})),u=t.findIndex((function(e){return e.end>=o.end&&e.start<=o.end})),c=t[u],l=t[i],s=[].concat(n(t.slice(0,i)),[{start:l.start,end:r.start}]).map((function(e){return a(a({},e),{},{type:"five_prime_UTR"})})),f=[{start:o.end,end:c.end}].concat(n(t.slice(u+1))).map((function(e){return a(a({},e),{},{type:"three_prime_UTR"})}));return[].concat(n(s),n(f))},t.calculateUTRs2=function(e,t){if(!e.length)return[];var r=e.at(0),o=e.at(-1),i=[{start:t.start,end:r.start}].map((function(e){return a(a({},e),{},{type:"five_prime_UTR"})})),u=[{start:o.end,end:t.end}].map((function(e){return a(a({},e),{},{type:"three_prime_UTR"})}));return[].concat(n(i),n(u))},t.ellipses=function(e){return e.length>20?"".concat(e.slice(0,20),"..."):e}},39592:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function a(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions=[],this.fetchESM=null==r?void 0:r.fetchESM,this.fetchCJS=null==r?void 0:r.fetchCJS,this.definitions=JSON.parse(JSON.stringify(t))}var t,r,n,u,l,s,v;return t=e,r=[{key:"loadCJSPlugin",value:(v=c(i().mark((function e(t,r){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("http:"===(n=new URL(t.cjsUrl,r)).protocol||"https:"===n.protocol){e.next=3;break}throw new Error('Cannot load plugins using protocol "'.concat(n.protocol,'"'));case 3:if(this.fetchCJS){e.next=5;break}throw new Error("No fetchCJS callback provided");case 5:return e.abrupt("return",this.fetchCJS(n.href));case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"loadESMPlugin",value:(s=c(i().mark((function e(t,r){var n,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("http:"===(n="esmUrl"in t?new URL(t.esmUrl,r):new URL(t.esmLoc.uri,t.esmLoc.baseUri)).protocol||"https:"===n.protocol){e.next=3;break}throw new Error('cannot load plugins using protocol "'.concat(n.protocol,'"'));case 3:if(this.fetchESM){e.next=5;break}throw new Error("No ESM fetcher installed");case 5:return e.next=7,this.fetchESM(n.href);case 7:if(o=e.sent){e.next=10;break}throw new Error("Could not load ESM plugin: ".concat(n));case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"loadUMDPlugin",value:(l=c(i().mark((function e(t,r){var n,o,a,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("http:"===(n="url"in t?new URL(t.url,r):"umdUrl"in t?new URL(t.umdUrl,r):new URL(t.umdLoc.uri,t.umdLoc.baseUri)).protocol||"https:"===n.protocol){e.next=3;break}throw new Error('cannot load plugins using protocol "'.concat(n.protocol,'"'));case 3:if(o=t.name,a="JBrowsePlugin".concat(o),"undefined"!=typeof jest){e.next=10;break}return e.next=8,m(n.href);case 8:e.next=11;break;case 10:globalThis[a]={default:f.default};case 11:if(u=globalThis[a]){e.next=14;break}throw new Error("Failed to load UMD bundle for ".concat(o,", ").concat(a," is undefined"));case 14:return e.abrupt("return",u);case 15:case"end":return e.stop()}}),e)}))),function(e,t){return l.apply(this,arguments)})},{key:"loadPlugin",value:(u=c(i().mark((function e(t,r){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!d.isElectron||!g(t)){e.next=6;break}return e.next=3,this.loadCJSPlugin(t,r);case 3:case 9:case 15:n=e.sent,e.next=23;break;case 6:if(!y(t)){e.next=12;break}return e.next=9,this.loadESMPlugin(t,r);case 12:if(!h(t)){e.next=18;break}return e.next=15,this.loadUMDPlugin(t,r);case 18:if(d.isElectron||!g(t)){e.next=22;break}throw new Error("CommonJS plugin found, but not in a NodeJS environment: ".concat(JSON.stringify(t)));case 22:throw new Error("Could not determine plugin type: ".concat(JSON.stringify(t)));case 23:if(n.default){e.next=25;break}throw new Error("".concat((i=void 0,h(o=t)?"UMD plugin ".concat(o.name):y(o)?"ESM plugin ".concat(o.esmUrl||(null===(i=o.esmLoc)||void 0===i?void 0:i.uri)):g(o)?"CJS plugin ".concat(o.cjsUrl):"unknown plugin")," does not have a default export, cannot load"));case 25:return e.abrupt("return",n.default);case 26:case"end":return e.stop()}var o,i}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"installGlobalReExports",value:function(e){e.JBrowseExports=Object.fromEntries(Object.entries(p.default).map((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return[n[0],n[1]]})))}},{key:"load",value:(n=c(i().mark((function e(t){var r=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(this.definitions.map(function(){var e=c(i().mark((function e(n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.loadPlugin(n,t);case 2:return e.t0=e.sent,e.t1=n,e.abrupt("return",{plugin:e.t0,definition:e.t1});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=w},48189:function(e,t,r){"use strict";function n(){n=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),u=new A(n||[]);return i(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,u,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&o.call(E,u)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(n,i,a,u){var c=d(e[n],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==l(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var n;i(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[];s(this,e),this.plugins=[],this.jexl=(0,C.default)(),this.pluginMetadata={},this.runtimePluginDefinitions=[],this.elementCreationSchedule=new L("renderer","adapter","text search adapter","display","track","connection","view","widget","rpc method","internet account","add track workflow"),this.rendererTypes=new T("RendererType",y.default),this.adapterTypes=new T("AdapterType",v.default),this.textSearchAdapterTypes=new T("TextSearchAdapterType",E.default),this.trackTypes=new T("TrackType",m.default),this.displayTypes=new T("DisplayType",b.default),this.connectionTypes=new T("ConnectionType",S.default),this.viewTypes=new T("ViewType",g.default),this.widgetTypes=new T("WidgetType",w.default),this.rpcMethods=new T("RpcMethodType",x.default),this.addTrackWidgets=new T("AddTrackWorkflow",j.default),this.internetAccountTypes=new T("InternetAccountType",O.default),this.configured=!1,this.extensionPoints=new Map,this.jbrequireCache=new Map,this.lib=k.default,this.load=function(e){return t.jbrequireCache.has(e)||t.jbrequireCache.set(e,e(t)),t.jbrequireCache.get(e)},this.jbrequire=function(e){if("string"==typeof e){var r=t.lib[e];if(!r)throw new TypeError("No jbrequire re-export defined for package '".concat(e,"'. If this package must be shared between plugins, add it to ReExports.js. If it does not need to be shared, just import it normally."));return r}if("function"==typeof e)return t.load(e);if(e.default)return t.jbrequire(e.default);throw new TypeError("lib passed to jbrequire must be either a string or a function")},this.addPlugin({plugin:new _.default,metadata:{isCore:!0}}),r.forEach((function(e){t.addPlugin(e)}))}var t,r;return p(e,[{key:"pluginConfigurationSchemas",value:function(){var e={};return this.plugins.forEach((function(t){t.configurationSchema&&(e[t.name]=t.configurationSchema)})),e}},{key:"addPlugin",value:function(e){if(this.configured)throw new Error("JBrowse already configured, cannot add plugins");var t,r,n=(t="install"in e&&"configure"in e?[e,{}]:[e.plugin,e.metadata],r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||u(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1],a=void 0===i?{}:i;if(this.plugins.includes(o))throw new Error("plugin already installed");return this.pluginMetadata[o.name]=a,"definition"in e&&this.runtimePluginDefinitions.push(e.definition),o.install(this),this.plugins.push(o),this}},{key:"getPlugin",value:function(e){return this.plugins.find((function(t){return t.name===e}))}},{key:"hasPlugin",value:function(e){return void 0!==this.getPlugin(e)}},{key:"createPluggableElements",value:function(){return this.elementCreationSchedule&&(this.elementCreationSchedule.run(),delete this.elementCreationSchedule),this}},{key:"setRootModel",value:function(e){this.rootModel=e}},{key:"configure",value:function(){var e=this;if(this.configured)throw new Error("already configured");return this.plugins.forEach((function(t){return t.configure(e)})),this.configured=!0,this}},{key:"getElementTypeRecord",value:function(e){switch(e){case"adapter":return this.adapterTypes;case"text search adapter":return this.textSearchAdapterTypes;case"connection":return this.connectionTypes;case"widget":return this.widgetTypes;case"renderer":return this.rendererTypes;case"display":return this.displayTypes;case"track":return this.trackTypes;case"view":return this.viewTypes;case"rpc method":return this.rpcMethods;case"internet account":return this.internetAccountTypes;case"add track workflow":return this.addTrackWidgets;default:throw new Error("invalid element type '".concat(e,"'"))}}},{key:"addElementType",value:function(e,t){var r,n=this;if("function"!=typeof t)throw new Error("must provide a callback function that returns the new type object");var o=this.getElementTypeRecord(e);return null===(r=this.elementCreationSchedule)||void 0===r||r.add(e,(function(){var r=t(n);if(!r.name)throw new Error("cannot add a ".concat(e," with no name"));if(o.has(r.name))throw new Error("".concat(e," ").concat(r.name," already registered, cannot register it again"));o.add(r.name,n.evaluateExtensionPoint("Core-extendPluggableElement",r))})),this}},{key:"getElementType",value:function(e,t){return this.getElementTypeRecord(e).get(t)}},{key:"getElementTypesInGroup",value:function(e){return this.getElementTypeRecord(e).all()}},{key:"getTrackElements",value:function(){return this.getElementTypesInGroup("track")}},{key:"getConnectionElements",value:function(){return this.getElementTypesInGroup("connection")}},{key:"getAddTrackWorkflowElements",value:function(){return this.getElementTypesInGroup("add track workflow")}},{key:"getRpcElements",value:function(){return this.getElementTypesInGroup("rpc method")}},{key:"getDisplayElements",value:function(){return this.getElementTypesInGroup("display")}},{key:"getAdapterElements",value:function(){return this.getElementTypesInGroup("adapter")}},{key:"pluggableMstType",value:function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.types.maybe(h.types.null),o=this.getElementTypeRecord(e).all().map((function(e){return e[t]})).filter((function(e){return(0,h.isType)(e)&&(0,h.isModelType)(e)}));return 0===o.length&&"undefined"==typeof jest?(console.warn("No pluggable types found matching ('".concat(e,"','").concat(t,"')")),n):(r=h.types).union.apply(r,a(o))}},{key:"pluggableConfigSchemaType",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"configSchema",n=this.getElementTypeRecord(e).all().map((function(e){return e[r]})).filter((function(e){return(0,P.isBareConfigurationSchemaType)(e)}));return 0===n.length&&n.push((0,P.ConfigurationSchema)("Null",{})),(t=h.types).union.apply(t,a(n))}},{key:"getRendererType",value:function(e){return this.rendererTypes.get(e)}},{key:"getRendererTypes",value:function(){return this.rendererTypes.all()}},{key:"getAdapterType",value:function(e){return this.adapterTypes.get(e)}},{key:"getTextSearchAdapterType",value:function(e){return this.textSearchAdapterTypes.get(e)}},{key:"getTrackType",value:function(e){return this.trackTypes.get(e)}},{key:"getDisplayType",value:function(e){return this.displayTypes.get(e)}},{key:"getViewType",value:function(e){return this.viewTypes.get(e)}},{key:"getAddTrackWorkflow",value:function(e){return this.addTrackWidgets.get(e)}},{key:"getWidgetType",value:function(e){return this.widgetTypes.get(e)}},{key:"getConnectionType",value:function(e){return this.connectionTypes.get(e)}},{key:"getRpcMethodType",value:function(e){return this.rpcMethods.get(e)}},{key:"getInternetAccountType",value:function(e){return this.internetAccountTypes.get(e)}},{key:"addRendererType",value:function(e){return this.addElementType("renderer",e)}},{key:"addAdapterType",value:function(e){return this.addElementType("adapter",e)}},{key:"addTextSearchAdapterType",value:function(e){return this.addElementType("text search adapter",e)}},{key:"addTrackType",value:function(e){var t=this;return this.addElementType("track",(function(){var r=e(t);return t.getElementTypesInGroup("display").forEach((function(e){e.trackType!==r.name||r.displayTypes.includes(e)||r.addDisplayType(e)})),r}))}},{key:"addDisplayType",value:function(e){return this.addElementType("display",e)}},{key:"addViewType",value:function(e){var t=this;return this.addElementType("view",(function(){var r=e(t);return t.getElementTypesInGroup("display").forEach((function(e){e.viewType!==r.name&&e.viewType!==r.extendedName||r.displayTypes.includes(e)||r.addDisplayType(e)})),r}))}},{key:"addWidgetType",value:function(e){return this.addElementType("widget",e)}},{key:"addConnectionType",value:function(e){return this.addElementType("connection",e)}},{key:"addRpcMethod",value:function(e){return this.addElementType("rpc method",e)}},{key:"addInternetAccountType",value:function(e){return this.addElementType("internet account",e)}},{key:"addAddTrackWorkflowType",value:function(e){return this.addElementType("add track workflow",e)}},{key:"addToExtensionPoint",value:function(e,t){var r=this.extensionPoints.get(e);r||(r=[],this.extensionPoints.set(e,r)),r.push(t)}},{key:"evaluateExtensionPoint",value:function(e,t,r){var n=this.extensionPoints.get(e),o=t;if(n){var a,u=i(n);try{for(u.s();!(a=u.n()).done;){var c=a.value;try{o=c(o,r)}catch(e){console.error(e)}}}catch(e){u.e(e)}finally{u.f()}}return o}},{key:"evaluateAsyncExtensionPoint",value:(t=n().mark((function e(t,r,o){var a,u,c,l,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=this.extensionPoints.get(t),u=r,!a){e.next=27;break}c=i(a),e.prev=4,c.s();case 6:if((l=c.n()).done){e.next=19;break}return s=l.value,e.prev=8,e.next=11,s(u,o);case 11:u=e.sent,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),console.error(e.t0);case 17:e.next=6;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(4),c.e(e.t1);case 24:return e.prev=24,c.f(),e.finish(24);case 27:return e.abrupt("return",u);case 28:case"end":return e.stop()}}),e,this,[[4,21,24,27],[8,14]])})),r=function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function u(e){o(a,n,i,u,c,"next",e)}function c(e){o(a,n,i,u,c,"throw",e)}u(void 0)}))},function(e,t,n){return r.apply(this,arguments)})}]),e}();t.default=A},36450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(7734);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.Attributes}})},23639:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(7734);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.BaseCard}})},39850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(7734);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.FeatureDetails}})},21232:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(56531);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(o).default}})},86358:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["mobx","mobx-state-tree","react","react/jsx-runtime","react-dom","mobx-react","@mui/x-data-grid","@mui/material/utils","@material-ui/core/utils","tss-react/mui","@material-ui/core","@mui/material","prop-types","@mui/material/styles","@material-ui/core/styles","@material-ui/core/Accordion","@material-ui/core/AccordionActions","@material-ui/core/AccordionDetails","@material-ui/core/Alert","@material-ui/core/AlertTitle","@material-ui/core/Autocomplete","@material-ui/core/Avatar","@material-ui/core/AvatarGroup","@material-ui/core/Backdrop","@material-ui/core/Badge","@material-ui/core/Box","@material-ui/core/Breadcrumbs","@material-ui/core/Button","@material-ui/core/ButtonGroup","@material-ui/core/Card","@material-ui/core/CardActions","@material-ui/core/CardActionArea","@material-ui/core/CardContent","@material-ui/core/CardHeader","@material-ui/core/CardMedia","@material-ui/core/CircularProgress","@material-ui/core/Collapse","@material-ui/core/ClickAwayListener","@material-ui/core/Chip","@material-ui/core/Checkbox","@material-ui/core/Container","@material-ui/core/Dialog","@material-ui/core/DialogActions","@material-ui/core/DialogTitle","@material-ui/core/DialogContent","@material-ui/core/DialogContentText","@material-ui/core/Divider","@material-ui/core/Drawer","@material-ui/core/Fab","@material-ui/core/Fade","@material-ui/core/FilledInput","@material-ui/core/FormLabel","@material-ui/core/FormControl","@material-ui/core/FormControlLabel","@material-ui/core/FormHelperText","@material-ui/core/FormGroup","@material-ui/core/Grid","@material-ui/core/Grow","@material-ui/core/Icon","@material-ui/core/IconButton","@material-ui/core/Input","@material-ui/core/InputBase","@material-ui/core/InputLabel","@material-ui/core/InputAdornment","@material-ui/core/Link","@material-ui/core/LinearProgress","@material-ui/core/List","@material-ui/core/ListItem","@material-ui/core/ListItemAvatar","@material-ui/core/ListItemSecondaryAction","@material-ui/core/ListItemIcon","@material-ui/core/ListSubheader","@material-ui/core/ListItemText","@material-ui/core/Menu","@material-ui/core/MenuItem","@material-ui/core/MenuList","@material-ui/core/Modal","@material-ui/core/NativeSelect","@material-ui/core/OutlinedInput","@material-ui/core/Pagination","@material-ui/core/PaginationItem","@material-ui/core/Paper","@material-ui/core/Popover","@material-ui/core/Popper","@material-ui/core/Portal","@material-ui/core/Radio","@material-ui/core/RadioGroup","@material-ui/core/Rating","@material-ui/core/ScopedCssBaseline","@material-ui/core/Select","@material-ui/core/Skeleton","@material-ui/core/Slider","@material-ui/core/Snackbar","@material-ui/core/SnackbarContent","@material-ui/core/SpeedDial","@material-ui/core/SpeedDialAction","@material-ui/core/SpeedDialIcon","@material-ui/core/Stack","@material-ui/core/Step","@material-ui/core/StepButton","@material-ui/core/StepConnector","@material-ui/core/StepLabel","@material-ui/core/StepIcon","@material-ui/core/Stepper","@material-ui/core/SvgIcon","@material-ui/core/Switch","@material-ui/core/Tab","@material-ui/core/Table","@material-ui/core/TableBody","@material-ui/core/TableCell","@material-ui/core/TableContainer","@material-ui/core/TableFooter","@material-ui/core/TableHead","@material-ui/core/TablePagination","@material-ui/core/TableRow","@material-ui/core/TableSortLabel","@material-ui/core/Tabs","@material-ui/core/TextField","@material-ui/core/TextareaAutosize","@material-ui/core/ToggleButton","@material-ui/core/ToggleButtonGroup","@material-ui/core/Toolbar","@material-ui/core/Tooltip","@material-ui/core/Typography","@mui/material/Accordion","@mui/material/AccordionActions","@mui/material/AccordionDetails","@mui/material/Alert","@mui/material/AlertTitle","@mui/material/Autocomplete","@mui/material/Avatar","@mui/material/AvatarGroup","@mui/material/Backdrop","@mui/material/Badge","@mui/material/Box","@mui/material/Breadcrumbs","@mui/material/Button","@mui/material/ButtonGroup","@mui/material/Card","@mui/material/CardActions","@mui/material/CardActionArea","@mui/material/CardContent","@mui/material/CardHeader","@mui/material/CardMedia","@mui/material/CircularProgress","@mui/material/Collapse","@mui/material/ClickAwayListener","@mui/material/Chip","@mui/material/Checkbox","@mui/material/Container","@mui/material/Dialog","@mui/material/DialogActions","@mui/material/DialogTitle","@mui/material/DialogContent","@mui/material/DialogContentText","@mui/material/Divider","@mui/material/Drawer","@mui/material/Fab","@mui/material/Fade","@mui/material/FilledInput","@mui/material/FormLabel","@mui/material/FormControl","@mui/material/FormControlLabel","@mui/material/FormHelperText","@mui/material/FormGroup","@mui/material/Grid","@mui/material/Grow","@mui/material/Icon","@mui/material/IconButton","@mui/material/Input","@mui/material/InputBase","@mui/material/InputLabel","@mui/material/InputAdornment","@mui/material/Link","@mui/material/LinearProgress","@mui/material/List","@mui/material/ListItem","@mui/material/ListItemAvatar","@mui/material/ListItemSecondaryAction","@mui/material/ListItemIcon","@mui/material/ListSubheader","@mui/material/ListItemText","@mui/material/Menu","@mui/material/MenuItem","@mui/material/MenuList","@mui/material/Modal","@mui/material/NativeSelect","@mui/material/OutlinedInput","@mui/material/Pagination","@mui/material/PaginationItem","@mui/material/Paper","@mui/material/Popover","@mui/material/Popper","@mui/material/Portal","@mui/material/Radio","@mui/material/RadioGroup","@mui/material/Rating","@mui/material/ScopedCssBaseline","@mui/material/Select","@mui/material/Skeleton","@mui/material/Slider","@mui/material/Snackbar","@mui/material/SnackbarContent","@mui/material/SpeedDial","@mui/material/SpeedDialAction","@mui/material/SpeedDialIcon","@mui/material/Stack","@mui/material/Step","@mui/material/StepButton","@mui/material/StepConnector","@mui/material/StepLabel","@mui/material/StepIcon","@mui/material/Stepper","@mui/material/SvgIcon","@mui/material/Switch","@mui/material/Tab","@mui/material/Table","@mui/material/TableBody","@mui/material/TableCell","@mui/material/TableContainer","@mui/material/TableFooter","@mui/material/TableHead","@mui/material/TablePagination","@mui/material/TableRow","@mui/material/TableSortLabel","@mui/material/Tabs","@mui/material/TextField","@mui/material/TextareaAutosize","@mui/material/ToggleButton","@mui/material/ToggleButtonGroup","@mui/material/Toolbar","@mui/material/Tooltip","@mui/material/Typography","@material-ui/lab/ToggleButton","@material-ui/lab/ToggleButtonGroup","@material-ui/lab/Autocomplete","@material-ui/lab/Alert","@material-ui/lab","@jbrowse/core/Plugin","@jbrowse/core/pluggableElementTypes","@jbrowse/core/pluggableElementTypes/ViewType","@jbrowse/core/pluggableElementTypes/AdapterType","@jbrowse/core/pluggableElementTypes/DisplayType","@jbrowse/core/pluggableElementTypes/TrackType","@jbrowse/core/pluggableElementTypes/WidgetType","@jbrowse/core/pluggableElementTypes/models","@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType","@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType","@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType","@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType","@jbrowse/core/pluggableElementTypes/renderers/RendererType","@jbrowse/core/configuration","@jbrowse/core/util/types/mst","@jbrowse/core/ui","@jbrowse/core/util","@jbrowse/core/util/color","@jbrowse/core/util/layouts","@jbrowse/core/util/tracks","@jbrowse/core/util/Base1DViewModel","@jbrowse/core/util/io","@jbrowse/core/util/mst-reflection","@jbrowse/core/util/rxjs","@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail","@jbrowse/core/data_adapters/BaseAdapter"]},56531:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)throw new Error("The following modules are in the modules libs, but not the re-exports list: ".concat(se.join(", ")));var fe=Y.default.filter((function(e){return!le.includes(e)}));if(fe.length)throw new Error("The following modules are in the re-exports list, but not the modules libs: ".concat(fe.join(", ")));t.default=ce},45595:(e,t)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,o);if(!n.sessionId)throw new Error("sessionId is required");var u=function(e){return(0,v.default)(e)}(t);return r.get(u,{adapterConf:t,self:e,options:a},void 0,i)},getRefNameMapForAdapter:function(e,t){var r=this;return d(l().mark((function n(){var o;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(null==t?void 0:t.sessionId){n.next=2;break}throw new Error("sessionId is required");case 2:return n.next=4,r.getAdapterMapEntry(e,t);case 4:return o=n.sent,n.abrupt("return",o.forwardMap);case 6:case"end":return n.stop()}}),n)})))()},getReverseRefNameMapForAdapter:function(e,t){var r=this;return d(l().mark((function n(){var o;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.getAdapterMapEntry(e,t);case 2:return o=n.sent,n.abrupt("return",o.reverseMap);case 4:case"end":return n.stop()}}),n)})))()}}}))}},23623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2415);t.default=function(e){return(0,n.ConfigurationSchema)("BaseAssembly",{aliases:{type:"stringArray",defaultValue:[],description:"Other possible names for the assembly"},sequence:e.getTrackType("ReferenceSequenceTrack").configSchema,refNameColors:{type:"stringArray",defaultValue:[],description:"Define custom colors for each reference sequence. Will cycle through this list if there are not enough colors for every sequence."},refNameAliases:(0,n.ConfigurationSchema)("RefNameAliases",{adapter:e.pluggableConfigSchemaType("adapter")},{preProcessSnapshot:function(e){return e.adapter?e:{adapter:{type:"RefNameAliasAdapter"}}}}),cytobands:(0,n.ConfigurationSchema)("Cytoband",{adapter:e.pluggableConfigSchemaType("adapter")},{preProcessSnapshot:function(e){return e.adapter?e:{adapter:{type:"CytobandAdapter"}}}}),displayName:{type:"string",defaultValue:"",description:'A human readable display name for the assembly e.g. "Homo sapiens (hg38)" while the assembly name may just be "hg38"'}},{explicitIdentifier:"name"})}},48534:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:{};if("string"!=typeof e)throw new Error("first arg must be string name of the model that this config schema goes with");var o=t,i=n;return(null===(r=n.baseConfiguration)||void 0===r?void 0:r.jbrowseSchemaDefinition)&&(o=a(a({},n.baseConfiguration.jbrowseSchemaDefinition),o),delete(i=a(a({},n.baseConfiguration.jbrowseSchemaOptions),n)).baseConfiguration),{schemaDefinition:o,options:i}}(e,t,r),i=o.schemaDefinition,l=o.options,y=function(e,t,r){var o,i={};if(r.explicitlyTyped&&(i.type=s.types.optional(s.types.literal(e),e)),r.explicitIdentifier&&r.implicitIdentifier)throw new Error("Cannot have both explicit and implicit identifiers in ".concat(e));r.explicitIdentifier?"string"==typeof r.explicitIdentifier?(i[r.explicitIdentifier]=s.types.identifier,o=r.explicitIdentifier):(i.id=s.types.identifier,o="id"):r.implicitIdentifier&&("string"==typeof r.implicitIdentifier?(i[r.implicitIdentifier]=f.ElementId,o=r.implicitIdentifier):(i.id=f.ElementId,o="id"));var l={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};Object.entries(t).forEach((function(t){var r=n(t,2),o=r[0],a=r[1];if((0,s.isType)(a)&&(0,s.isLateType)(a)||(0,d.isConfigurationSchemaType)(a))i[o]=a;else if("string"==typeof a||"number"==typeof a)l[o]=a;else{if("object"!==c(a))throw new Error('invalid configuration schema definition, "'.concat(o,'" must be either a valid configuration slot definition, a constant, or a nested configuration schema'));if(!a.type)throw new Error("no type set for config slot ".concat(e,".").concat(o));try{i[o]=(0,p.default)(o,a)}catch(t){throw new Error("invalid config slot definition for ".concat(e,".").concat(o,": ").concat(t))}}}));var y=s.types.model("".concat(e,"ConfigurationSchema"),i).actions((function(e){return{setSubschema:function(t,r){if(!(0,d.isConfigurationSchemaType)(i[t]))throw new Error("".concat(t," is not a subschema, cannot replace"));var n=(0,s.isStateTreeNode)(r)?r:i[t].create(r);return e[t]=n,n}}}));Object.keys(l).length&&(y=y.volatile((function(){return l}))),r.actions&&(y=y.actions(r.actions)),r.views&&(y=y.views(r.views)),r.extend&&(y=y.extend(r.extend));var v=o?u({},o,"placeholderId"):{},m=r.explicitlyTyped?a({type:e},v):v,b=(0,s.getSnapshot)(y.create(m));return y=y.postProcessSnapshot((function(e){for(var t,r={},o=!0,i=0,a=Object.entries(e);i{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(82123),i=r(25420),a=r(66769),u=r(35743),c={stringArray:o.types.array(o.types.string),stringArrayMap:o.types.map(o.types.array(o.types.string)),numberMap:o.types.map(o.types.number),boolean:o.types.boolean,color:o.types.refinement("Color",o.types.string,(function(){return!0})),integer:o.types.integer,number:o.types.number,string:o.types.string,text:o.types.string,fileLocation:a.FileLocation,frozen:o.types.frozen()},l={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},s=function(e){return{views:{get valueJSON(){return e.value}}}},f=function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}}}},p={fileLocation:f,number:s,integer:s,boolean:s,frozen:f,stringArray:function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add:function(t){e.value.push(t)},removeAtIndex:function(t){e.value.splice(t,1)},setAtIndex:function(t,r){e.value[t]=r}}}},stringArrayMap:function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add:function(t,r){e.value.set(t,r)},remove:function(t){e.value.delete(t)},addToKey:function(t,r){var n=e.value.get(t);if(!n)throw new Error("".concat(t," not found"));n.push(r)},removeAtKeyIndex:function(t,r){var n=e.value.get(t);if(!n)throw new Error("".concat(t," not found"));n.splice(r,1)},setAtKeyIndex:function(t,r,n){var o=e.value.get(t);if(!o)throw new Error("".concat(t," not found"));o[r]=n}}}},numberMap:function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add:function(t,r){e.value.set(t,r)},remove:function(t){e.value.delete(t)}}}}},d=o.types.refinement("JexlString",o.types.string,(function(e){return e.startsWith("jexl:")}));t.default=function(e,t){var r=t.description,a=void 0===r?"":r,s=t.model,f=t.type,h=t.defaultValue,y=t.contextVariable,v=void 0===y?[]:y;if(!f)throw new Error("type name required");if(s||(s=c[f]),!s)throw new Error('no builtin config slot type "'.concat(f,"\", and no 'model' param provided"));if(void 0===h)throw new Error("no 'defaultValue' provided");var m="".concat(e.charAt(0).toUpperCase()).concat(e.slice(1),"ConfigSlot"),b=o.types.model(m,{name:o.types.literal(e),description:o.types.literal(a),type:o.types.literal(f),value:o.types.optional(o.types.union(d,s),h)}).volatile((function(){return{contextVariable:v}})).views((function(e){return{get isCallback(){return String(e.value).startsWith("jexl:")}}})).views((function(e){return{get expr(){if(e.isCallback){var t=(0,u.getEnv)(e).pluginManager;return t||"undefined"!=typeof jest||console.warn("no pluginManager detected on config env (if you dynamically instantiate a config, for example in renderProps for your display model, check that you add the env argument)"),(0,i.stringToJexlExpression)(String(e.value),null==t?void 0:t.jexl)}return{evalSync:function(){return e.value}}},get valueJSON(){var t;if(!e.isCallback)return(null==(t=e.value)?void 0:t.toJSON)?t.toJSON():'"'.concat(t,'"')}}})).preProcessSnapshot((function(t){return"object"===n(t)&&t.name===e?t:{name:e,description:a,type:f,value:t}})).postProcessSnapshot((function(e){return"object"===n(e.value)?JSON.stringify(e.value)!==JSON.stringify(h)?e.value:void 0:e.value!==h?e.value:void 0})).actions((function(e){return{set:function(t){e.value=t},reset:function(){e.value=h},convertToCallback:function(){e.isCallback||(e.value="jexl:".concat(e.valueJSON||"''"))},convertToValue:function(){if(e.isCallback){try{var t=e.expr.evalSync();if(void 0!==t)return void(e.value=t)}catch(e){}if(e.value=h,e.isCallback){if(!(f in l))throw new Error("no fallbackDefault defined for type ".concat(f));e.value=l[f]}}}}}));p[f]&&(b=b.extend(p[f]));var g=o.types.optional(b,{name:e,type:f,description:a,value:h});return Object.defineProperty(g,"isJBrowseConfigurationSlot",{value:!0}),g}},2415:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationReference=t.ConfigurationSchema=void 0;var i=r(601);Object.defineProperty(t,"ConfigurationSchema",{enumerable:!0,get:function(){return i.ConfigurationSchema}}),Object.defineProperty(t,"ConfigurationReference",{enumerable:!0,get:function(){return i.ConfigurationReference}}),o(r(41635),t)},41635:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:{};if(!e)throw new TypeError("must provide conf object to read");if(!t)return JSON.parse(JSON.stringify((0,i.getSnapshot)(e)));if("string"==typeof t){var n=e[t];if(!n&&(0,i.isStateTreeNode)(e)&&(0,i.isMapType)((0,i.getType)(e))&&(n=e.get(t)),!n)return;if(n.expr){var o=n.expr.evalSync(r);return(0,i.isStateTreeNode)(o)?JSON.parse(JSON.stringify((0,i.getSnapshot)(o))):o}return(0,i.isStateTreeNode)(n)?JSON.parse(JSON.stringify((0,i.getSnapshot)(n))):n}if(Array.isArray(t)){var a=t[0];if(t.length>1){var c=t.slice(1),l=e[a];return!l&&(0,i.isStateTreeNode)(e)&&(0,i.isMapType)((0,i.getType)(e))&&(l=e.get(a)),l?u(l,c,r):void 0}return u(e,a,r)}throw new TypeError("slotPath must be a string or array")}function c(e){if((0,i.isType)(e)){if((0,i.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema")))return!0;if((0,i.isLateType)(e))return!0}return!1}function l(e){return!!(0,i.isType)(e)&&(!!c(e)||((0,i.isUnionType)(e)?(0,a.getUnionSubTypes)(e).every((function(e){return l(e)||"undefined"===e.name})):!(!(0,i.isOptionalType)(e)||!l((0,a.getSubType)(e)))||!(!(0,i.isArrayType)(e)||!l((0,a.getSubType)(e)))||!(!(0,i.isMapType)(e)||!l((0,a.getSubType)(e)))))}function s(e){return(0,i.isStateTreeNode)(e)&&l((0,i.getType)(e))}t.readConfObject=u,t.getConf=function(e,t,r){if(!e)throw new TypeError("must provide a model object");var n=e.configuration;if(s(n))return u(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")},t.getTypeNamesFromExplicitlyTypedUnion=function e(t){if((0,i.isType)(t)&&(t=(0,a.resolveLateType)(t),(0,i.isUnionType)(t))){var r=[];return(0,a.getUnionSubTypes)(t).forEach((function(t){var n,i=e(t=(0,a.resolveLateType)(t));if(i.length||(i=[(0,a.getDefaultValue)(t).type]),!i[0])throw new Error("invalid config schema type ".concat(t));r.push.apply(r,function(e){if(Array.isArray(e))return o(e)}(n=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})),r}return[]},t.isBareConfigurationSchemaType=c,t.isConfigurationSchemaType=l,t.isConfigurationModel=s,t.isConfigurationSlotType=function(e){return"object"===n(e)&&null!==e&&"isJBrowseConfigurationSlot"in e}},53928:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:l.create(),r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSubAdapter=r,this.pluginManager=n,"undefined"==typeof jest){var o=(0,a.isStateTreeNode)(t)?(0,a.getSnapshot)(t):t;this.id="".concat((0,c.default)(o))}else this.id="test"}var t,r;return t=e,(r=[{key:"getConf",value:function(e){return(0,u.readConfObject)(this.config,e)}}])&&o(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.BaseAdapter=s,s.capabilities=[]},84179:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))}}function s(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return(0,m.ObservableCreate)(function(){var n=l(u().mark((function n(o){var i;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.hasDataForRefName(e.refName,r);case 2:i=n.sent,(0,b.checkAbortSignal)(r.signal),i?t.getFeatures(e,r).subscribe(o):o.complete();case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())}},{key:"getFeaturesInMultipleRegions",value:function(e){var t,r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h.merge.apply(void 0,function(e){if(Array.isArray(e))return a(e)}(t=e.map((function(e){return r.getFeaturesInRegion(e,n)})))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}},{key:"hasDataForRefName",value:(v=l(u().mark((function e(t){var r,n,o=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this.getRefNames(r);case 3:return n=e.sent,e.abrupt("return",n.includes(t));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"getRegionQuantitativeStats",value:(f=l(u().mark((function e(t,r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getFeatures(t,r),e.abrupt("return",(0,g.scoresToStats)(t,n));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getMultiRegionQuantitativeStats",value:(c=l(u().mark((function e(){var t,r,n,o,i,a,c,l,s,f=this,p=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=p.length>1?p[1]:void 0,(t=p.length>0&&void 0!==p[0]?p[0]:[]).length){e.next=4;break}return e.abrupt("return",(0,g.blankStats)());case 4:return e.next=6,Promise.all(t.map((function(e){return f.getRegionQuantitativeStats(e,r)})));case 6:return n=e.sent,o=(0,b.max)(n.map((function(e){return e.scoreMax}))),i=(0,b.min)(n.map((function(e){return e.scoreMin}))),a=(0,b.sum)(n.map((function(e){return e.scoreSum}))),c=(0,b.sum)(n.map((function(e){return e.scoreSumSquares}))),l=(0,b.sum)(n.map((function(e){return e.featureCount}))),s=(0,b.sum)(n.map((function(e){return e.basesCovered}))),e.abrupt("return",(0,g.rectifyStats)({scoreMin:i,scoreMax:o,featureCount:l,basesCovered:s,scoreSumSquares:c,scoreSum:a}));case 14:case"end":return e.stop()}}),e)}))),function(){return c.apply(this,arguments)})},{key:"getRegionFeatureDensityStats",value:function(e,t){var r=this,n=+Date.now(),o=function(){var n=l(u().mark((function n(o,c){var l,s,f,p;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return l=e.start,s=e.end,f=.75*l+.25*s,n.next=4,(0,h.firstValueFrom)(r.getFeatures(i(i({},e),{},{start:Math.max(0,Math.round(f-o/2)),end:Math.min(Math.round(f+o/2),s)}),t).pipe((0,y.toArray)()));case 4:return p=n.sent,n.abrupt("return",a(o,{featureDensity:p.length/o},p.length,c));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}(),a=function(){var t=l(u().mark((function t(r,i,a,c){var l,s;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=e.end-e.start,!(a>=70||2*r>l)){t.next=5;break}return t.abrupt("return",i);case 5:if(!(c<=5e3)){t.next=12;break}return s=+Date.now(),c+=s-n,n=s,t.abrupt("return",o(2*r,c));case 12:return console.warn("Stats estimation reached timeout, or didn't get enough features"),t.abrupt("return",{featureDensity:Number.POSITIVE_INFINITY});case 14:case"end":return t.stop()}}),t)})));return function(e,r,n,o){return t.apply(this,arguments)}}();return o(1e3,0)}},{key:"getMultiRegionFeatureDensityStats",value:(o=l(u().mark((function e(t,r){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}throw new Error("No regions supplied");case 2:return e.abrupt("return",this.getRegionFeatureDensityStats(t[0],r));case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})}],r&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),j}(v.BaseAdapter);t.BaseFeatureDataAdapter=w},39105:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},38033:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTextSearchAdapter=t.isRefNameAliasAdapter=t.isFeatureAdapter=t.isRegionsAdapter=t.isSequenceAdapter=void 0,t.isSequenceAdapter=function(e){return"getRegions"in e&&"getFeatures"in e},t.isRegionsAdapter=function(e){return"getRegions"in e},t.isFeatureAdapter=function(e){return"getFeatures"in e},t.isRefNameAliasAdapter=function(e){return"getRefNameAliases"in e},t.isTextSearchAdapter=function(e){return"searchIndex"in e}},16263:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=(0,r(2415).ConfigurationSchema)("CytobandAdapter",{cytobandLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/cytoband.txt.gz"}}},{explicitlyTyped:!0});t.default=n},47085:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=r(53136),c=a(r(32965));t.default=function(e){e.addAdapterType((function(){return new u.AdapterType({name:"CytobandAdapter",configSchema:c.default,getAdapterClass:function(){return Promise.resolve().then((function(){return i(r(16263))})).then((function(e){return e.default}))}})}))}},74477:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(e.regions||(e.region?[e.region]:[]));try{for(n.s();!(r=n.n()).done;){var o=r.value;void 0!==o.refName&&t.dataAdapter.freeResources(o)}}catch(e){n.e(e)}finally{n.f()}}else console.warn(t.dataAdapter,"does not implement freeResources")}));return t},t.clearAdapterCache=function(){f={}}},32220:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(s,e);var t,r,i,l=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(r);if(i){var o=c(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),t=l.call(this,e),"AdapterClass"in e)t.AdapterClass=e.AdapterClass,t.getAdapterClass=a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.AdapterClass);case 1:case"end":return t.stop()}}),t)})));else{if(!("getAdapterClass"in e))throw new Error("no AdapterClass or getAdapterClass is defined for adapter type ".concat(t.name));t.getAdapterClass=e.getAdapterClass}return t.configSchema=e.configSchema,t.adapterCapabilities=e.adapterCapabilities||[],t.adapterMetadata=e.adapterMetadata,t}return t=s,Object.defineProperty(t,"prototype",{writable:!1}),t}(l(r(97358)).default);t.default=s},18202:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(c,e);var t,r,a,u=(r=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=i(r);if(a){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=u.call(this,e)).ReactComponent=e.ReactComponent,t.stateModel=e.stateModel,!t.ReactComponent)throw new Error("no ReactComponent defined for view ".concat(t.name));if(!t.stateModel)throw new Error("no stateModel defined for view ".concat(t.name));return t}return t=c,Object.defineProperty(t,"prototype",{writable:!1}),t}(a(r(97358)).default);t.default=u},2871:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(c,e);var t,r,a,u=(r=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=i(r);if(a){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=u.call(this,e)).stateModel=e.stateModel,t.configSchema=e.configSchema,t.description=e.description,t.url=e.url,t.configEditorComponent=e.configEditorComponent,!t.stateModel)throw new Error("no stateModel defined for connection ".concat(t.name));if(!t.configSchema)throw new Error("no configSchema defined for connection ".concat(t.name));return t}return t=c,Object.defineProperty(t,"prototype",{writable:!1}),t}(a(r(97358)).default);t.default=u},17808:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(97358)),c=r(8043),l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(l,e);var t,r,a,u=(r=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=i(r);if(a){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this,e)).stateModel=e.stateModel,t.subDisplay=e.subDisplay,t.configSchema=e.configSchema,t.ReactComponent=e.ReactComponent,t.trackType=e.trackType,t.viewType=e.viewType,!t.stateModel)throw new Error("no stateModel defined for display ".concat(t.name));if(!t.configSchema)throw new Error("no configSchema provided for display ".concat(t.name));if(!t.ReactComponent)throw new Error("no ReactComponent provided for display ".concat(t.name));if(!t.trackType)throw new Error("no trackType provided for display ".concat(t.name));if(!t.viewType)throw new Error("no viewType provided for display ".concat(t.name));if(!(0,c.getDefaultValue)(t.configSchema).type){var r=t.configSchema?t.configSchema.name:"UNKNOWN";throw new Error("".concat(r," is not explicitlyTyped"))}return t}return t=l,Object.defineProperty(t,"prototype",{writable:!1}),t}(u.default);t.default=l},97653:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(97358)),c=r(8043),l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(l,e);var t,r,a,u=(r=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=i(r);if(a){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this,e)).stateModel=e.stateModel,t.configSchema=e.configSchema,!t.stateModel)throw new Error("no stateModel defined for internet account type ".concat(t.name));if(!t.configSchema)throw new Error("no configSchema provided for internet account type ".concat(t.name));if(!(0,c.getDefaultValue)(t.configSchema).type){var r=t.configSchema?t.configSchema.name:"UNKNOWN";throw new Error("".concat(r," is not explicitlyTyped"))}return t}return t=l,Object.defineProperty(t,"prototype",{writable:!1}),t}(u.default);t.default=l},97358:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var n=0;n=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},o=e.pluggableConfigSchemaType("display"),i=(0,l.resolveIdentifier)(o,(0,l.getRoot)(t),r),a=e.getDisplayType(i.type);if(!a)throw new Error("unknown display type ".concat(i.type));var c=a.stateModel.create(u(u({},n),{},{type:i.type,configuration:i}));t.displays.push(c)},hideDisplay:function(r){var n=e.pluggableConfigSchemaType("display"),o=(0,l.resolveIdentifier)(n,(0,l.getRoot)(t),r),i=t.displays.filter((function(e){return e.configuration===o}));return(0,c.transaction)((function(){return i.forEach((function(e){return t.displays.remove(e)}))})),i.length},replaceDisplay:function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.displays.findIndex((function(e){return e.configuration.displayId===r}));if(-1===i)throw new Error("could not find display id ".concat(r," to replace"));var a=e.pluggableConfigSchemaType("display"),c=(0,l.resolveIdentifier)(a,(0,l.getRoot)(t),n);if(!e.getDisplayType(c.type))throw new Error("unknown display type ".concat(c.type));t.displays.splice(i,1,u(u({},o),{},{type:c.type,configuration:c}))}}})).views((function(t){return{trackMenuItems:function(){var r=t.displays.flatMap((function(e){return e.trackMenuItems()})),n=t.displays[0].configuration.displayId,i=h(t);return[].concat(o(r),o(i.length>1?[{type:"subMenu",label:"Display types",subMenu:i.map((function(r){return{type:"radio",label:e.getDisplayType(r.type).displayName,checked:r.displayId===n,onClick:function(){return t.replaceDisplay(n,r.displayId)}}}))}]:[]))}}}))}},32245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseViewModelWithDisplayedRegions=void 0;var n=r(82123),o=r(66769),i=r(66769),a=n.types.model("BaseView",{id:o.ElementId,displayName:n.types.maybe(n.types.string),minimized:!1}).volatile((function(){return{width:800}})).views((function(){return{menuItems:function(){return[]}}})).actions((function(e){return{setDisplayName:function(t){e.displayName=t},setWidth:function(t){e.width=t},setMinimized:function(t){e.minimized=t}}}));t.default=a,t.BaseViewModelWithDisplayedRegions=a.props({displayedRegions:n.types.array(i.Region)})},75075:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.InternetAccount=void 0;var s=r(82123),f=r(2415),p=r(76743),d=r(66769),h=r(80031),y="undefined"==typeof sessionStorage;t.InternetAccount=s.types.model("InternetAccount",{id:d.ElementId,type:s.types.string,configuration:(0,f.ConfigurationReference)(h.BaseInternetAccountConfig)}).views((function(e){return{get name(){return(0,f.getConf)(e,"name")},get description(){return(0,f.getConf)(e,"description")},get internetAccountId(){return(0,f.getConf)(e,"internetAccountId")},get authHeader(){return(0,f.getConf)(e,"authHeader")},get tokenType(){return(0,f.getConf)(e,"tokenType")},get domains(){return(0,f.getConf)(e,"domains")},get toggleContents(){return null},get SelectorComponent(){},get selectorLabel(){}}})).views((function(e){return{handlesLocation:function(t){return e.domains.some((function(e){return null==t?void 0:t.uri.includes(e)}))},get tokenKey(){return"".concat(e.internetAccountId,"-token")}}})).actions((function(e){return{getTokenFromUser:function(e,t){throw new Error("getTokenFromUser must be implemented by extending model")},storeToken:function(t){sessionStorage.setItem(e.tokenKey,t)},removeToken:function(){sessionStorage.removeItem(e.tokenKey)},retrieveToken:function(){return sessionStorage.getItem(e.tokenKey)},validateToken:function(e,t){return l(u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e);case 1:case"end":return t.stop()}}),t)})))()}}})).actions((function(e){var t=void 0;return{getToken:function(r){return l(u().mark((function n(){var o,i,a;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t){n.next=2;break}return n.abrupt("return",t);case 2:if(!(a=null===(i=null===(o=null==r?void 0:r.internetAccountPreAuthorization)||void 0===o?void 0:o.authInfo)||void 0===i?void 0:i.token)){n.next=6;break}return t=Promise.resolve(a),n.abrupt("return",t);case 6:if(!y){n.next=8;break}throw new Error("Did not get internet account pre-authorization info in worker");case 8:if(!(a=e.retrieveToken())){n.next=12;break}return t=Promise.resolve(a),n.abrupt("return",t);case 12:return t=new Promise((function(t,r){return e.getTokenFromUser((function(r){e.storeToken(r),t(r)}),(function(t){e.removeToken(),r(t)}))})),n.abrupt("return",t);case 14:case"end":return n.stop()}}),n)})))()}}})).actions((function(e){return{addAuthHeaderToInit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return i(i({},t),{},{headers:new Headers(i(i({},t.headers),{},a({},e.authHeader,e.tokenType?"".concat(e.tokenType," ").concat(r):r)))})},getPreAuthorizationInformation:function(t){return l(u().mark((function r(){var n,o;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.getToken(t);case 2:return n=r.sent,r.prev=3,r.next=6,e.validateToken(n,t);case 6:o=r.sent,r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(3),e.removeToken(),r.t0;case 13:return r.abrupt("return",{internetAccountType:e.type,authInfo:{token:o,configuration:(0,f.getConf)(e)}});case 14:case"end":return r.stop()}}),r,null,[[3,9]])})))()}}})).actions((function(e){return{getFetcher:function(t){return function(){var r=l(u().mark((function r(n,o){var i,a;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.getToken(t);case 2:return i=r.sent,a=e.addAuthHeaderToInit(o,i),r.abrupt("return",fetch(n,a));case 5:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}()}}})).actions((function(e){return{openLocation:function(t){return new p.RemoteFileWithRangeCache(t.uri,{fetch:e.getFetcher(t)})}}}))},12341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=(0,r(2415).ConfigurationSchema)("BaseConnection",{name:{type:"string",defaultValue:"nameOfConnection",description:"a unique name for this connection"},assemblyNames:{type:"stringArray",defaultValue:[],description:"optional list of names of assemblies in this connection"}},{explicitlyTyped:!0,explicitIdentifier:"connectionId"});t.default=n},80031:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseInternetAccountConfig=void 0;var n=r(2415);t.BaseInternetAccountConfig=(0,n.ConfigurationSchema)("InternetAccount",{name:{description:"descriptive name of the internet account",type:"string",defaultValue:""},description:{description:"a description of the internet account",type:"string",defaultValue:""},authHeader:{description:"request header for credentials",type:"string",defaultValue:"Authorization"},tokenType:{description:"a custom name for a token to include in the header",type:"string",defaultValue:""},domains:{description:"array of valid domains the url can contain to use this account",type:"stringArray",defaultValue:[]}},{explicitIdentifier:"internetAccountId",explicitlyTyped:!0})},94928:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;tSVG export not supported for this track'}):i(i({},e),{},{features:r,blockKey:"circularChord",reactElement:f.default.createElement(h.default,i(i(i({},t),e),{},{features:r,RenderingComponent:this.ReactComponent}))})}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(d.default);t.default=y},48002:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),u=(0,s.useRef)(null),c=(0,s.useRef)(),l=(0,y.getRoot)(e.displayModel).hydrateFn;return(0,s.useEffect)((function(){var e=(0,p.rIC)((function(){var e;if(u.current){var t=(0,h.createJBrowseTheme)(r);c.current=null!==(e=c.current)&&void 0!==e?e:l(u.current,s.default.createElement(d.ThemeProvider,{theme:t},s.default.createElement(n,a({},i))))}}));return function(){clearTimeout(e);var t=c.current;c.current=void 0,setTimeout((function(){null==t||t.unmount()}))}}),[t,n,l,r,e,i]),s.default.createElement("g",{ref:u,dangerouslySetInnerHTML:{__html:t}})})),b=(0,f.observer)((function(e){var t=e.html,r=e.RenderingComponent,n=(0,s.useRef)(null);return(0,s.useEffect)((function(){var o=n.current;return o&&t&&(o.innerHTML&&(0,v.unmountComponentAtNode)(o),o.style.outline="none",o.innerHTML=t,(0,p.rIC)((function(){(0,v.hydrate)(s.default.createElement(r,a({},e)),o)}))),function(){o&&(0,v.unmountComponentAtNode)(o)}}),[t,r,e]),s.default.createElement("g",{ref:n})})),g=(0,f.observer)((function(e){return(0,y.getRoot)(e.displayModel).hydrateFn?s.default.createElement(m,a({},e)):s.default.createElement(b,a({},e))}));t.default=g},39325:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["theme","html","RenderingComponent"],i=["theme","html","RenderingComponent"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&l(t,e,r);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var p=f(r(63313)),d=r(64694),h=r(60285),y=r(40828),v=r(82123),m=r(74012),b=r(35743),g=(0,y.observer)((function(e){var t=e.theme,r=e.html,n=e.RenderingComponent,i=c(e,o),a=(0,p.useRef)(null),l=(0,p.useRef)(),s=(0,v.getRoot)(i.displayModel).hydrateFn;return(0,p.useEffect)((function(){var e=(0,b.rIC)((function(){var e;if(a.current){var r=(0,h.createJBrowseTheme)(t);l.current=null!==(e=l.current)&&void 0!==e?e:s(a.current,p.default.createElement(d.ThemeProvider,{theme:r},p.default.createElement(n,u({},i))))}}));return function(){clearTimeout(e);var t=l.current;l.current=void 0,setTimeout((function(){null==t||t.unmount()}))}}),[r,t,i,s,n]),p.default.createElement("div",{ref:a,dangerouslySetInnerHTML:{__html:r}})})),w=(0,y.observer)((function(e){var t=e.theme,r=e.html,n=e.RenderingComponent,o=c(e,i),a=(0,p.useRef)(null),l=(0,h.createJBrowseTheme)(t);return(0,p.useEffect)((function(){var e=a.current;return e&&(e&&(0,m.unmountComponentAtNode)(e),e.innerHTML=r,(0,b.rIC)((function(){(0,m.hydrate)(p.default.createElement(d.ThemeProvider,{theme:l},p.default.createElement(n,u({},o))),e)}))),function(){e&&(0,m.unmountComponentAtNode)(e)}}),[r,l,o,n]),p.default.createElement("div",{ref:a})})),S=(0,y.observer)((function(e){return(0,v.getRoot)(e.displayModel).hydrateFn?p.default.createElement(g,u({},e)):p.default.createElement(w,u({},e))}));t.default=S},85204:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;tSVG export not supported for this track'}):c(c({},e),{},{reactElement:h.default.createElement(x.default,c(c(c({},t),e),{},{RenderingComponent:this.ReactComponent}))})}},{key:"deserializeArgsInWorker",value:function(e){var t=c({},e);return t.config=this.configSchema.create(e.config||{},{pluginManager:this.pluginManager}),t.filters=new g.default({filters:e.filters}),t}},{key:"serializeResultsInWorker",value:function(e,t){var r=(0,v.renderToString)(h.default.createElement(y.ThemeProvider,{theme:(0,w.createJBrowseTheme)(t.theme)},e.reactElement));return delete e.reactElement,c(c({},e),{},{html:r})}},{key:"renderInClient",value:(s=a(o().mark((function e(t,r){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.call(r.sessionId,"CoreRender",r);case 2:if(!("canvasRecordedData"in(n=e.sent))){e.next=8;break}return e.next=6,(0,b.getSerializedSvg)(n);case 6:n.html=e.sent,delete n.reactElement;case 8:return e.abrupt("return",n);case 9:case"end":return e.stop()}}),e)}))),function(e,t){return s.apply(this,arguments)})},{key:"renderInWorker",value:(u=a(o().mark((function e(t){var r,n,i,a,u,c=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.signal,n=t.statusCallback,i=void 0===n?function(){}:n,a=this.deserializeArgsInWorker(t),e.next=4,(0,b.updateStatus)("Rendering plot",i,(function(){return c.render(a)}));case 4:return u=e.sent,(0,b.checkAbortSignal)(r),e.abrupt("return",(0,b.updateStatus)("Serializing results",i,(function(){return c.serializeResultsInWorker(u,a)})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"freeResourcesInClient",value:(i=a(o().mark((function e(t,r){var n,i,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.serializeArgsInClient(r),i=this.freeResources(),e.next=4,t.call(r.sessionId,"CoreFreeResources",n);case 4:return a=e.sent,e.abrupt("return",i+a);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})}],r&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),E}(S.default);t.default=O},23311:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerSideRendererType=t.ServerSideRenderedContent=t.FeatureRendererType=t.RendererType=t.CircularChordRendererType=t.ComparativeServerSideRendererType=t.BoxRendererType=void 0;var o=r(98147);Object.defineProperty(t,"BoxRendererType",{enumerable:!0,get:function(){return n(o).default}});var i=r(48002);Object.defineProperty(t,"ComparativeServerSideRendererType",{enumerable:!0,get:function(){return n(i).default}});var a=r(98244);Object.defineProperty(t,"CircularChordRendererType",{enumerable:!0,get:function(){return n(a).default}});var u=r(7183);Object.defineProperty(t,"RendererType",{enumerable:!0,get:function(){return n(u).default}});var c=r(5087);Object.defineProperty(t,"FeatureRendererType",{enumerable:!0,get:function(){return n(c).default}});var l=r(39325);Object.defineProperty(t,"ServerSideRenderedContent",{enumerable:!0,get:function(){return n(l).default}});var s=r(85204);Object.defineProperty(t,"ServerSideRendererType",{enumerable:!0,get:function(){return n(s).default}})},11550:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(this.filterChain);try{for(t.s();!(e=t.n()).done;)if(!e.value.expr.evalSync({feature:arguments.length<=0?void 0:arguments[0]}))return!1}catch(e){t.e(e)}finally{t.f()}return!0}},{key:"toJSON",value:function(){return{filters:this.filterChain.map((function(e){return e.string}))}}}],n=[{key:"fromJSON",value:function(t){return new e(t)}}],r&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=u},55897:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r4&&void 0!==b[4]?b[4]:{},r){e.next=3;break}throw new TypeError("sessionId is required");case 3:return c=!1,e.next=6,this.getWorker(r);case 6:return l=e.sent,s=t.getRpcMethodType(n),e.next=10,s.serializeArguments(i,this.name);case 10:return f=e.sent,p=this.filterArgs(f,r),d=l.call(n,p,o({timeout:3e5,statusCallback:i.statusCallback,rpcDriverClassName:this.name},a)).finally((function(){c=!0})),y=new Promise((function(e,t){h=setInterval((function(){"killed"===l.status?t(new Error("operation timed out, worker process stopped responding, ".concat(l.error))):c&&e(!0)}),m.workerCheckFrequency)})).finally((function(){clearInterval(h)})),v=Promise.race([d,y]),e.abrupt("return",s.deserializeReturn(v,i,this.name));case 16:case"end":return e.stop()}}),e,this)}))),function(e,r,n,o){return t.apply(this,arguments)})}]),e}();t.default=x},77571:function(e,t,r){"use strict";function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t3&&void 0!==u[3]?u[3]:{},t){e.next=3;break}throw new Error("sessionId is required");case 3:return e.next=5,this.getDriverForCall(t,r,n);case 5:return a=e.sent,e.abrupt("return",a.call(this.pluginManager,t,r,n,i));case 7:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})}],r&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());v.configSchema=d.default,t.default=v},75904:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=(0,r(2415).ConfigurationSchema)("BaseRpcDriver",{workerCount:{type:"number",description:"The number of workers to use. If 0 (the default) JBrowse will decide how many workers to use.",defaultValue:0}},{explicitlyTyped:!0});t.default=n},3690:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(82123),i=r(2415),a=n(r(38843)),u=n(r(51952));t.default=(0,i.ConfigurationSchema)("RpcOptions",{defaultDriver:{type:"string",description:"the RPC driver to use for tracks and tasks that are not configured to use a specific RPC backend",defaultValue:"MainThreadRpcDriver"},drivers:o.types.optional(o.types.map(o.types.union(u.default,a.default)),{MainThreadRpcDriver:{type:"MainThreadRpcDriver"},WebWorkerRpcDriver:{type:"WebWorkerRpcDriver"}})},{actions:function(e){return{addDriverConfig:function(t,r){e.drivers.set(t,r)}}}})},12660:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreGetFeatureDensityStats=t.CoreFreeResources=t.CoreRender=t.CoreGetFeatures=t.CoreGetFileInfo=t.CoreGetMetadata=t.CoreGetFeatureDetails=t.CoreGetRefNames=void 0;var o=r(63028);Object.defineProperty(t,"CoreGetRefNames",{enumerable:!0,get:function(){return n(o).default}});var i=r(80874);Object.defineProperty(t,"CoreGetFeatureDetails",{enumerable:!0,get:function(){return n(i).default}});var a=r(85136);Object.defineProperty(t,"CoreGetMetadata",{enumerable:!0,get:function(){return n(a).default}});var u=r(98170);Object.defineProperty(t,"CoreGetFileInfo",{enumerable:!0,get:function(){return n(u).default}});var c=r(25782);Object.defineProperty(t,"CoreGetFeatures",{enumerable:!0,get:function(){return n(c).default}});var l=r(34173);Object.defineProperty(t,"CoreRender",{enumerable:!0,get:function(){return n(l).default}});var s=r(23491);Object.defineProperty(t,"CoreFreeResources",{enumerable:!0,get:function(){return n(s).default}});var f=r(76426);Object.defineProperty(t,"CoreGetFeatureDensityStats",{enumerable:!0,get:function(){return n(f).default}})},51952:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(2415),i=n(r(65411)),a=(0,o.ConfigurationSchema)("MainThreadRpcDriver",{},{baseConfiguration:i.default,explicitlyTyped:!0});t.default=a},23491:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){for(var r=0;r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){for(var r=0;r{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.remoteAbortRpcHandler=t.remoteAbort=t.deserializeAbortSignal=t.isRemoteAbortSignal=t.serializeAbortSignal=void 0;var n=0,o=new WeakMap;t.serializeAbortSignal=function(e,t){var r=o.get(e);return r||(n+=1,o.set(e,n),r=n,e.addEventListener("abort",(function(){var r=o.get(e);void 0!==r&&t("signalAbort",r)}))),{abortSignalId:r}},t.isRemoteAbortSignal=function(e){return"object"===r(e)&&null!==e&&"abortSignalId"in e&&"number"==typeof e.abortSignalId};var i=new Map;function a(e){var t=e.signalId,r=i.get(t);r&&r.abort()}t.deserializeAbortSignal=function(e){var t=e.abortSignalId,r=i.get(t);return r||(r=new AbortController,i.set(t,r)),r.signal},t.remoteAbort=a,t.remoteAbortRpcHandler=function(){return{signalAbort:a}}},38843:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(2415),i=n(r(65411)),a=(0,o.ConfigurationSchema)("WebWorkerRpcDriver",{},{baseConfiguration:i.default,explicitlyTyped:!0});t.default=a},5433:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),d=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),h=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&p(t,e,r);return d(t,e),t},y=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var v=h(r(63313)),m=r(94669),b=r(34506),g=r(41882),w=y(r(84619)),S=y(r(26451)),x=v.default.createContext({parentPopupState:null,rootPopupState:null});function O(e){var t=e.onClick,r=f(e,o),n=(0,v.useContext)(x).rootPopupState;if(!n)throw new Error("must be used inside a CascadingMenu");var i=(0,v.useCallback)((function(e){n.close(),null==t||t(e)}),[n,t]);return v.default.createElement(m.MenuItem,s(s({},r),{},{onClick:i}))}function E(e){var t=e.title,r=e.inset,n=e.popupId,o=f(e,i),a=v.default.useContext(x).parentPopupState,u=(0,g.usePopupState)({popupId:n,variant:"popover",parentPopupState:a});return v.default.createElement(v.default.Fragment,null,v.default.createElement(m.MenuItem,s(s({},(0,g.bindHover)(u)),(0,g.bindFocus)(u)),v.default.createElement(m.ListItemText,{primary:t,inset:r}),v.default.createElement(S.default,null)),v.default.createElement(j,s(s({},o),{},{anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},popupState:u})))}function j(e){var t=e.popupState,r=(e.onMenuItemClick,e.menuItems,e.classes,f(e,a)),n=(0,v.useContext)(x).rootPopupState,o=(0,v.useMemo)((function(){return{rootPopupState:n||t,parentPopupState:t}}),[n,t]);return v.default.createElement(x.Provider,{value:o},v.default.createElement(w.default,s(s({},r),(0,g.bindMenu)(t))))}function P(e){var t=e.popupState,r=(e.onMenuItemClick,e.menuItems,f(e,u)),n=v.default.useContext(x).rootPopupState,o=v.default.useMemo((function(){return{rootPopupState:n||t,parentPopupState:t}}),[n,t]);return v.default.createElement(x.Provider,{value:o},v.default.createElement(m.Menu,s(s({},r),(0,g.bindMenu)(t))))}function k(e){var t=e.item;return"subMenu"in t?v.default.createElement(b.MenuItemEndDecoration,{type:"subMenu"}):"checkbox"===t.type||"radio"===t.type?v.default.createElement(b.MenuItemEndDecoration,{type:t.type,checked:t.checked,disabled:t.disabled}):null}function _(e){var t=e.onMenuItemClick,r=e.menuItems,n=f(e,c),o=r.some((function(e){return"icon"in e&&e.icon}));return v.default.createElement(v.default.Fragment,null,r.map((function(e,r){return"subMenu"in e?v.default.createElement(E,{key:"subMenu-".concat(e.label,"-").concat(r),popupId:"subMenu-".concat(e.label),title:e.label,inset:o,onMenuItemClick:t,menuItems:e.subMenu},v.default.createElement(_,s(s({},n),{},{onMenuItemClick:t,menuItems:e.subMenu}))):"divider"===e.type?v.default.createElement(m.Divider,{key:"divider-".concat(r),component:"li"}):"subHeader"===e.type?v.default.createElement(m.ListSubheader,{key:"subHeader-".concat(e.label,"-").concat(r)},e.label):v.default.createElement(O,{key:"".concat(e.label,"-").concat(r),onClick:"onClick"in e?(i=e.onClick,function(e){t(e,i)}):void 0,disabled:Boolean(e.disabled)},e.icon?v.default.createElement(m.ListItemIcon,null,v.default.createElement(e.icon,null)):null," ",v.default.createElement(m.ListItemText,{primary:e.label,secondary:e.subLabel,inset:o&&!e.icon}),v.default.createElement("div",{style:{flexGrow:1,minWidth:10}}),v.default.createElement(k,{item:e}));var i})))}t.default=function(e){return v.default.createElement(P,s({},e),v.default.createElement(_,s({},e)))}},28550:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["children","menuItems"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),i=(0,p.usePopupState)({popupId:"viewMenu",variant:"popover"});return c.default.createElement(c.default.Fragment,null,c.default.createElement(s.IconButton,a(a(a({},(0,p.bindTrigger)(i)),n),{},{disabled:0===r.length}),t),c.default.createElement(l.default,a(a({},(0,p.bindPopover)(i)),{},{onMenuItemClick:function(e,t){return t()},menuItems:r,popupState:i})))}));t.default=d},42687:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),l=u((0,v.default)(),2),s=l[0],f=l[1].width,p=u((0,d.useState)(),2),y=p[0],b=p[1],g=u((0,d.useState)(null),2),w=g[0],S=g[1],x=u((0,d.useState)(!1),2),O=x[0],E=x[1];(0,d.useEffect)((function(){O&&(null==w||w.blur(),E(!1))}),[O,w]);var j=m(e,{props:e}).classes,P=(0,h.useTheme)(),k=void 0===y?r:y;return d.default.createElement("div",a(a({},c),{},{ref:t}),d.default.createElement("div",{style:{position:"relative"}},d.default.createElement(h.Typography,{ref:s,component:"span",variant:i,className:j.typography},k)),d.default.createElement(h.InputBase,{inputRef:function(e){return S(e)},className:j.inputBase,inputProps:{style:a({width:f},i&&"inherit"!==i?P.typography[i]:{})},classes:{input:j.input,root:j.inputRoot,focused:j.inputFocused},value:k,onChange:function(e){return b(e.target.value)},onKeyDown:function(e){"Enter"===e.key?null==w||w.blur():"Escape"===e.key&&(b(void 0),E(!0))},onBlur:function(){n(y||r||""),b(void 0)}}))}));t.default=b},69918:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313));t.default=function(e){var t=e.error,r="".concat(t),n=function(e){var t="",r=e.indexOf("is not assignable");if(-1!==r){var n=e.slice(0,r+17),o=n.match(/.*at path "(.*)" snapshot `(.*)` is not assignable/m);o&&(e="Failed to load element at ".concat(o[1],"...Failed element had snapshot"),t=o[2]);var i=n.match(/.*snapshot `(.*)` is not assignable/);i&&(e="Failed to load element...Failed element had snapshot",t=i[1])}return t}(r);return o.default.createElement("div",{style:{padding:4,margin:4,overflow:"auto",maxHeight:200,background:"#f88",border:"1px solid black"}},r.slice(0,1e4),n?o.default.createElement("pre",{style:{background:"lightgrey",border:"1px solid black",margin:20}},JSON.stringify(JSON.parse(n),null,2)):null)}},13010:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(94669),a=n(r(87601));t.default=function(e){var t=e.onClose,r=e.open,n=e.onFactoryReset;function u(e){"reset"===e&&n(),t()}return o.default.createElement(a.default,{title:"Reset",onClose:function(){return u()},open:r},o.default.createElement(i.DialogContent,null,o.default.createElement(i.DialogContentText,null,"Are you sure you want to reset? This will restore the default configuration.")),o.default.createElement(i.DialogActions,null,o.default.createElement(i.Button,{onClick:function(){return u()},color:"primary"},"Cancel"),o.default.createElement(i.Button,{onClick:function(){return u("reset")},color:"primary",variant:"contained"},"OK")))}},77091:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o);return y.default.createElement(m.Tooltip,{title:t||""},y.default.createElement(m.ToggleButton,s({},n),r))}function E(e,t){return"string"==typeof e&&e.length>t?"".concat(e.slice(0,Math.max(0,t)),"…"):e}var j=(0,v.observer)((function(e){var t=e.location,r=e.name,n=e.description,o=e.rootModel,u=e.setLocation,c=!t||(0,b.isUriLocation)(t)?"url":"file",l=a((0,y.useState)(t&&"internetAccountId"in t&&t.internetAccountId?t.internetAccountId:c),2),f=l[0],p=l[1],d=(0,b.isAppRootModel)(o)?i(o.internetAccounts):[],h=a((0,y.useState)(d.slice(0,2)),2),v=h[0],j=h[1],P=a((0,y.useState)(d.slice(2)),2),k=P[0],_=P[1],C=a((0,y.useState)(null),2),L=C[0],T=C[1],A=d.find((function(e){return e.internetAccountId===f})),I=(0,y.useCallback)((function(e){u(s(s({},e),(0,b.isUriLocation)(e)?{internetAccountId:null==A?void 0:A.internetAccountId}:{}))}),[u,A]);(0,y.useEffect)((function(){A&&(0,b.isUriLocation)(t)&&t.internetAccountId!==A.internetAccountId&&I(t)}),[t,A,I]);var R=y.default.createElement(w.default,s(s({},e),{},{setLocation:I,label:null==A?void 0:A.selectorLabel}));if("file"===f&&(R=y.default.createElement(g.default,s({},e))),null==A?void 0:A.SelectorComponent){var M=A.SelectorComponent;R=y.default.createElement(M,s(s({},e),{},{setLocation:I}))}return y.default.createElement(y.default.Fragment,null,y.default.createElement(m.Box,{display:"flex"},y.default.createElement(m.InputLabel,{shrink:!0},r)),y.default.createElement(m.Box,{display:"flex",flexDirection:"row"},y.default.createElement(m.Box,null,y.default.createElement(m.ToggleButtonGroup,{value:f,exclusive:!0,onChange:function(e,r){r&&p(r),(0,b.isUriLocation)(t)&&I(t)},"aria-label":"file, url, or account picker"},new URLSearchParams(window.location.search).get("adminKey")?null:y.default.createElement(m.ToggleButton,{value:"file","aria-label":"local file"},"File"),y.default.createElement(m.ToggleButton,{value:"url","aria-label":"url"},"URL"),v.map((function(e){var t=e.internetAccountId,r=e.toggleContents,n=e.name;return y.default.createElement(O,{key:t,value:t,"aria-label":n,title:n},"string"==typeof r?E(r,5):r||E(n,5))})),k.length>0?y.default.createElement(m.ToggleButton,{onClick:function(e){return T(e.target)},selected:!1},"More",y.default.createElement(S.default,null)):null),y.default.createElement(m.Menu,{open:Boolean(L),anchorEl:L,onClose:function(){return T(null)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},null==k?void 0:k.map((function(e,t){return y.default.createElement(m.MenuItem,{key:e.internetAccountId,value:e.internetAccountId,onClick:function(){var r=v.at(-1);j([].concat(i(v.slice(0,-1)),[e])),_([r].concat(i(k.slice(0,t)),i(k.slice(t+1))).filter(x.notEmpty)),p(e.internetAccountId),T(null)}},e.name)}))))),R,y.default.createElement(m.FormHelperText,null,n))}));t.default=j},79364:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(94669),a=r(76835),u=r(35743),c=r(61169);function l(e){return"blobId"in e}var s=(0,a.makeStyles)()((function(e){return{filename:{marginLeft:e.spacing(1)}}}));t.default=function(e){var t=e.location,r=e.setLocation,n=s().classes,a=t&&(l(t)&&t.name||function(e){return"localPath"in e}(t)&&t.localPath),f=t&&l(t)&&!(0,c.getBlob)(t.blobId);return o.default.createElement(i.Box,{display:"flex",flexDirection:"row",alignItems:"center"},o.default.createElement(i.Box,null,o.default.createElement(i.FormControl,{fullWidth:!0},o.default.createElement(i.Button,{variant:"outlined",component:"label"},"Choose File",o.default.createElement("input",{type:"file",hidden:!0,onChange:function(e){var t,n=e.target,o=null===(t=null==n?void 0:n.files)||void 0===t?void 0:t[0];o&&(u.isElectron?r({localPath:o.path,locationType:"LocalPathLocation"}):r((0,c.storeBlobLocation)({blob:o})))}})))),o.default.createElement(i.Box,null,o.default.createElement(i.Typography,{component:"span",className:n.filename,color:a?"initial":"textSecondary"},a||"No file chosen"),f?o.default.createElement(i.Typography,{color:"error"},"(need to reload)"):null))}},99089:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(94669),a=r(40828),u=r(44502),c=(0,a.observer)((function(e){var t=e.location,r=e.setLocation,n=e.label;return o.default.createElement(i.TextField,{fullWidth:!0,variant:"outlined",inputProps:{"data-testid":"urlInput"},defaultValue:t&&(0,u.isUriLocation)(t)?t.uri:"",label:n||"Enter URL",onChange:function(e){r({uri:e.target.value.trim(),locationType:"UriLocation"})}})}));t.default=c},84782:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(92577);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(o).default}})},73610:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,i),a=y().classes;return f.default.createElement(p.Typography,u(u({className:a.dots},o),{},{variant:n}),"".concat(t||"Loading"))}},18195:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LogoFull=t.Logomark=void 0;var o=n(r(63313));function i(e){return"black"===e?{midnight:"#808080",forrest:"#666666",grape:"#4d4d4d",mandarin:"#333333",gray:"#1a1a1a"}:"white"===e?{midnight:"#ffffff",forrest:"#e6e6e6",grape:"#cccccc",mandarin:"#b3b3b3",gray:"#999999"}:{midnight:"#0d233f",forrest:"#135560",grape:"#721e63",mandarin:"#ffb11d",gray:"#dadada"}}function a(e){var t=i(e.variant);return o.default.createElement(o.default.Fragment,null,o.default.createElement("path",{style:{fill:t.midnight},d:"M120.5,57.5c.168,0,.333.012.5.013V40.506c-.167,0-.333-.006-.5-.006a98.325,98.325,0,0,0-77.4,37.565q-2.664,3.378-5.023,6.994l14.206,9.327Q54.043,91.709,56,89.179A81.363,81.363,0,0,1,120.5,57.5Z"}),o.default.createElement("path",{style:{fill:t.forrest},d:"M148.668,86.223c.308.133.6.283.908.42l6.746-15.618c-.153-.067-.3-.143-.454-.21a81.36,81.36,0,0,0-71.777,3.5q-2.8,1.544-5.469,3.309l9.249,14.054A63.93,63.93,0,0,1,148.668,86.223Z"}),o.default.createElement("path",{style:{fill:t.grape},d:"M170.894,109.37A63.929,63.929,0,0,0,113.4,88.861l2.336,15.474a48.456,48.456,0,0,1,44.322,15.42c.111.125.214.255.324.381l11.16-10C171.323,109.879,171.118,109.62,170.894,109.37Z"}),o.default.createElement("path",{style:{fill:t.mandarin},d:"M150.921,150.314c.04.163.07.326.107.489l16.509-4.058c-.039-.163-.067-.326-.107-.489A48.457,48.457,0,0,0,135.575,111.8l-5.515,15.591A32.466,32.466,0,0,1,150.921,150.314Z"}),o.default.createElement("path",{style:{fill:t.gray},d:"M134.1,138.129l-9.779,13.213a32.486,32.486,0,0,1,7.823,14.463l15.147.852c.012-.166.032-.331.041-.5A32.464,32.464,0,0,0,134.1,138.129Z"}))}function u(e){var t=i(e.variant);return o.default.createElement("g",{"aria-label":"JBrowse",transform:"translate(213.084 144.241)",style:{fill:t.midnight}},o.default.createElement("path",{d:"m 26.355,-71.505 v 54.075 2.835 q 0,6.825 -0.42,10.185 -0.735,5.67 -2.835,9.135 -3.255,5.355 -8.505,8.4 -4.83,2.73 -11.55,3.57 L 1.47,11.76 Q 7.35,10.185 9.24,4.2 10.605,-0.105 10.605,-9.975 v -5.565 -55.965 q 1.785,0 4.62,0.315 2.835,0.21 3.255,0.21 1.785,0 2.94,-0.105 4.515,-0.42 4.935,-0.42 z"}),o.default.createElement("path",{d:"m 60.68836,-65.415 v 24.78 h 3.255 q 2.94,0 4.935,-0.525 2.1,-0.525 3.885,-2.1 2.31,-1.995 3.36,-4.83 1.155,-2.835 1.155,-6.09 0,-5.565 -2.94,-8.61 -2.94,-3.045 -8.295,-3.045 -2.52,0 -5.355,0.42 z m 0,30.87 V -6.09 h 5.25 q 4.725,0 8.505,-3.675 3.885,-3.78 3.885,-10.08 0,-8.19 -4.62,-11.655 -4.095,-3.045 -13.02,-3.045 z M 44.93836,0 v -71.505 h 27.09 q 9.135,0 14.385,3.255 6.51,3.99 6.51,12.6 0,7.035 -5.25,11.655 -4.62,4.095 -11.97,5.145 v 0.945 q 7.56,0.735 12.285,3.99 6.615,4.62 6.615,13.335 0,10.185 -7.98,15.75 -6.93,4.83 -17.43,4.83 z"}),o.default.createElement("path",{d:"M 109.44281,0.525 V -50.4 q 1.785,0.21 3.99,0.42 2.31,0.105 3.255,0.105 2.31,0 4.2,-0.21 1.89,-0.21 3.045,-0.315 v 13.02 q 1.89,-6.51 5.46,-9.87 4.41,-4.095 11.655,-4.095 -0.315,2.73 -0.42,6.825 -0.105,3.99 -0.105,7.455 l -0.945,0.84 q -0.945,-0.735 -2.415,-1.05 -1.47,-0.315 -2.94,-0.315 -3.57,0 -6.195,1.89 -2.52,1.785 -3.465,5.04 -0.42,1.155 -0.525,3.15 -0.105,1.89 -0.105,4.515 v 4.515 19.005 q -1.785,-0.21 -2.625,-0.21 -3.675,-0.315 -4.62,-0.315 -2.31,0 -4.2,0.21 -1.89,0.21 -3.045,0.315 z"}),o.default.createElement("path",{d:"m 173.77337,1.47 q -11.655,0 -18.585,-6.825 -6.93,-6.825 -6.93,-18.48 0,-12.6 6.72,-20.055 6.825,-7.455 18.9,-7.455 11.97,0 18.9,6.72 6.93,6.72 6.93,18.48 0,12.285 -6.72,19.74 -7.14,7.875 -19.215,7.875 z m 0.735,-48.09 q -5.88,0 -8.505,6.51 -2.205,5.565 -2.205,15.96 0,8.19 1.47,12.915 2.415,7.98 8.505,7.98 5.565,0 8.19,-7.875 2.205,-6.51 2.205,-16.695 0,-8.505 -2.1,-13.23 -2.52,-5.565 -7.56,-5.565 z"}),o.default.createElement("path",{d:"m 222.03563,-50.4 10.5,36.015 q 3.675,-11.235 5.67,-17.85 2.415,-8.085 5.04,-18.165 1.05,0.105 3.045,0.315 2.1,0.21 2.835,0.21 1.995,0 3.15,-0.105 1.26,-0.21 2.73,-0.42 l 10.71,36.015 q 5.88,-17.43 10.71,-36.015 l 4.2,0.315 4.095,-0.315 q -5.145,13.125 -9.135,24.57 -5.04,14.28 -8.505,26.355 -1.89,-0.21 -3.36,-0.42 -1.365,-0.105 -2.205,-0.105 -1.89,0 -3.36,0.21 -1.365,0.21 -2.31,0.315 l -10.605,-34.755 q -4.41,13.65 -6.72,21.105 -2.31,7.35 -4.095,13.65 -1.89,-0.21 -3.36,-0.42 -1.365,-0.105 -2.31,-0.105 -1.995,0 -3.465,0.21 -1.365,0.21 -2.31,0.315 -3.78,-12.81 -5.04,-17.01 -2.205,-7.245 -5.46,-17.01 -2.835,-8.4 -5.88,-16.905 1.575,0 4.305,0.315 2.73,0.21 3.36,0.21 1.47,0 4.305,-0.21 2.835,-0.315 3.465,-0.315 z"}),o.default.createElement("path",{d:"m 292.84172,-12.81 h 2.625 q 1.47,4.095 4.62,6.51 3.15,2.415 7.35,2.415 2.94,0 5.46,-1.785 2.625,-1.89 2.625,-4.62 0,-3.885 -6.195,-6.615 -10.395,-4.62 -11.655,-5.46 -6.405,-4.515 -6.405,-12.285 0,-7.77 5.25,-12.18 5.25,-4.515 12.81,-4.515 3.99,0 8.085,1.365 4.095,1.26 7.14,3.57 l -2.52,9.24 h -2.94 q -0.63,-3.57 -3.57,-6.195 -2.835,-2.625 -6.405,-2.625 -3.15,0 -5.46,1.575 -2.31,1.47 -2.31,4.515 0,3.885 6.405,6.51 10.185,4.095 11.865,5.25 6.405,4.41 6.405,12.81 0,7.455 -5.46,12.18 -5.355,4.62 -14.805,4.62 -8.19,0 -14.49,-4.305 z"}),o.default.createElement("path",{d:"m 349.61228,-29.925 h 15.54 q 0,-6.51 -1.05,-10.395 -1.68,-6.3 -5.88,-6.3 -5.04,0 -7.14,6.195 -1.47,4.305 -1.47,10.5 z m 30.03,5.04 h -30.03 q 0,9.135 3.045,13.86 3.57,5.67 11.55,5.67 3.255,0 6.405,-1.26 3.15,-1.26 5.88,-3.465 l 1.26,0.945 -2.31,5.88 q -6.72,4.725 -15.015,4.725 -12.915,0 -19.635,-7.245 -6.72,-7.245 -6.72,-20.37 0,-11.235 6.405,-18.165 6.51,-7.035 17.64,-7.035 11.655,0 16.905,7.56 4.62,6.615 4.62,18.9 z"}))}t.Logomark=function(e){var t=e.variant;return o.default.createElement("svg",{viewBox:"0 0 175 175"},o.default.createElement(a,{variant:t}))},t.LogoFull=function(e){var t=e.variant;return o.default.createElement("svg",{viewBox:"0 0 641 175"},o.default.createElement(u,{variant:t}),o.default.createElement(a,{variant:t}))}},34506:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["open","onClose","menuItems","onMenuItemClick"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o);return d.default.createElement(h.Popover,a({open:t,onClose:r,BackdropProps:{invisible:!0},anchorOrigin:a({vertical:"bottom",horizontal:"right"},u.anchorOrigin),transformOrigin:a({vertical:"top",horizontal:"left"},u.transformOrigin)},u),d.default.createElement(E,{open:t,onClose:r,menuItems:n,onMenuItemClick:i,top:!0}))}},16596:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),b=(r=(0,s.useState)(!1),u=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,u)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(r,u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),g=b[0],w=b[1],S=(0,s.useRef)(0),x=(0,s.useRef)(0),O=f(),E=O.classes,j=O.cx;return(0,s.useEffect)((function(){function e(e){e.preventDefault();var t=p?e.clientX:e.clientY,r=S.current-t,n=t-x.current;x.current=t,c(n,r)}function t(){w(!1)}return g?(window.addEventListener("mousemove",e,!0),window.addEventListener("mouseup",t,!0),function(){window.removeEventListener("mousemove",e,!0),window.removeEventListener("mouseup",t,!0)}):function(){}}),[g,c,p]),t=h?p?E.flexbox_verticalHandle:E.flexbox_horizontalHandle:p?E.verticalHandle:E.horizontalHandle,s.default.createElement("div",function(e){for(var t=1;t]*>")})).join("|"),"i");t.default=function(e){var t,r=e.html,n=(0,u.linkify)(r),s=(t=n,l.test(t)?n:(0,i.default)(n));return c||(c=!0,a.default.addHook("afterSanitizeAttributes",(function(e){"A"===e.tagName&&(e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"))}))),o.default.createElement("span",{dangerouslySetInnerHTML:{__html:a.default.sanitize(s)}})}},39051:(e,t,r)=>{"use strict";var n=r(72161);t.Z=function(e){return e.extend((function(){return e=n.observable.array(),{views:{get snackbarMessages(){return e}},actions:{notify:function(e,t,r){var n=this;this.pushSnackbarMessage(e,t,r),"info"!==t&&"success"!==t||setTimeout((function(){n.removeSnackbarMessage(e)}),5e3)},pushSnackbarMessage:function(t,r,n){return e.push({message:t,level:r,action:n})},popSnackbarMessage:function(){return e.pop()},removeSnackbarMessage:function(t){var r=e.find((function(e){return e.message===t}));r&&e.remove(r)}}};var e}))}},66457:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ggplot2Colors3=t.ggplot2Colors4=t.ggplot2Colors5=t.ggplot2Colors6=t.category10=t.dark2=t.tableau10=t.set2=t.set1=void 0,t.category10=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],t.dark2=["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],t.set1=["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],t.set2=["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],t.tableau10=["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],t.ggplot2Colors6=["#F8766D","#B79F00","#00BA38","#00BFC4","#619CFF","#F564E3"],t.ggplot2Colors5=["#F8766D","#A3A500","#00BF7D","#00B0F6","#E76BF3"],t.ggplot2Colors4=["#F8766D","#7CAE00","#00BFC4","#C77CFF"],t.ggplot2Colors3=["#F8766D","#00BA38","#619CFF"]},60285:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SanitizedHTML=t.ResizeHandle=t.ReturnToImportFormDialog=t.Tooltip=t.PrerenderedCanvas=t.Menu=t.LoadingEllipses=t.FileSelector=t.FatalErrorDialog=t.FactoryResetDialog=t.ErrorMessage=t.EditableTypography=t.Dialog=t.CascadingMenu=t.AssemblySelector=t.Logomark=t.LogoFull=void 0,o(r(96510),t);var a=r(18195);Object.defineProperty(t,"LogoFull",{enumerable:!0,get:function(){return a.LogoFull}}),Object.defineProperty(t,"Logomark",{enumerable:!0,get:function(){return a.Logomark}});var u=r(5433);Object.defineProperty(t,"AssemblySelector",{enumerable:!0,get:function(){return i(u).default}});var c=r(60668);Object.defineProperty(t,"CascadingMenu",{enumerable:!0,get:function(){return i(c).default}});var l=r(87601);Object.defineProperty(t,"Dialog",{enumerable:!0,get:function(){return i(l).default}});var s=r(78552);Object.defineProperty(t,"EditableTypography",{enumerable:!0,get:function(){return i(s).default}});var f=r(69918);Object.defineProperty(t,"ErrorMessage",{enumerable:!0,get:function(){return i(f).default}});var p=r(13010);Object.defineProperty(t,"FactoryResetDialog",{enumerable:!0,get:function(){return i(p).default}});var d=r(77091);Object.defineProperty(t,"FatalErrorDialog",{enumerable:!0,get:function(){return i(d).default}});var h=r(84782);Object.defineProperty(t,"FileSelector",{enumerable:!0,get:function(){return i(h).default}});var y=r(4584);Object.defineProperty(t,"LoadingEllipses",{enumerable:!0,get:function(){return i(y).default}});var v=r(34506);Object.defineProperty(t,"Menu",{enumerable:!0,get:function(){return i(v).default}});var m=r(16596);Object.defineProperty(t,"PrerenderedCanvas",{enumerable:!0,get:function(){return i(m).default}});var b=r(66457);Object.defineProperty(t,"Tooltip",{enumerable:!0,get:function(){return i(b).default}});var g=r(74294);Object.defineProperty(t,"ReturnToImportFormDialog",{enumerable:!0,get:function(){return i(g).default}});var w=r(92348);Object.defineProperty(t,"ResizeHandle",{enumerable:!0,get:function(){return i(w).default}});var S=r(21202);Object.defineProperty(t,"SanitizedHTML",{enumerable:!0,get:function(){return i(S).default}}),o(r(34506),t)},37535:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}function f(e){var t=(0,c.useRef)(e),r=(0,c.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,r.current}var p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e>r?r:e0:e.buttons>0)&&i.current?a(y(i.current,e,p.current)):r(!1)},t=function(){return r(!1)};function r(r){var n=m.current,o=h(i.current),a=r?o.addEventListener:o.removeEventListener;a(n?"touchmove":"mousemove",e),a(n?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,n=i.current;if(n&&(v(t),!function(e,t){return t&&!d(e)}(t,m.current)&&n)){if(d(t)){m.current=!0;var o=t.changedTouches||[];o.length&&(p.current=o[0].identifier)}n.focus(),a(y(n,t,p.current)),r(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),u({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},r]}),[u,a]),g=n(b,3),w=g[0],S=g[1],x=g[2];return(0,c.useEffect)((function(){return x}),[x]),c.default.createElement("div",l({},o,{onTouchStart:w,onMouseDown:w,className:"react-colorful__interactive",ref:i,onKeyDown:S,tabIndex:0,role:"slider"}))})),b=function(e){return e.filter(Boolean).join(" ")},g=function(e){var t=e.className,r=e.color,n=e.left,o=e.top,i=void 0===o?.5:o,a=b(["react-colorful__pointer",t]);return c.default.createElement("div",{className:a,style:{top:100*i+"%",left:100*n+"%"}},c.default.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:r}}))},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Math.pow(10,t);return Math.round(r*e)/r},S={grad:.9,turn:360,rad:360/(2*Math.PI)},x=function(e){return"#"===e[0]&&(e=e.substr(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}:{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:1}},O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"deg";return Number(e)*(S[t]||1)},E=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?P({h:O(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},j=E,P=function(e){var t=e.h,r=e.s,n=e.l;return{h:t,s:(r*=(n<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:e.a}},k=function(e){var t=e.h,r=e.s,n=e.v,o=e.a,i=(200-r)*n/100;return{h:w(t),s:w(i>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0),l:w(i/2),a:w(o,2)}},_=function(e){var t=k(e),r=t.h,n=t.s,o=t.l;return"hsl(".concat(r,", ").concat(n,"%, ").concat(o,"%)")},C=function(e){var t=k(e),r=t.h,n=t.s,o=t.l,i=t.a;return"hsla(".concat(r,", ").concat(n,"%, ").concat(o,"%, ").concat(i,")")},L=function(e){var t=e.h,r=e.s,n=e.v,o=e.a;t=t/360*6,r/=100,n/=100;var i=Math.floor(t),a=n*(1-r),u=n*(1-(t-i)*r),c=n*(1-(1-t+i)*r),l=i%6;return{r:w(255*[n,u,a,a,c,n][l]),g:w(255*[c,n,n,u,a,a][l]),b:w(255*[a,a,c,n,n,u][l]),a:w(o,2)}},T=function(e){var t=/hsva?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?F({h:O(t[1],t[2]),s:Number(t[3]),v:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},A=T,I=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?N({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},R=I,M=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},N=function(e){var t=e.r,r=e.g,n=e.b,o=e.a,i=Math.max(t,r,n),a=i-Math.min(t,r,n),u=a?i===t?(r-n)/a:i===r?2+(n-t)/a:4+(t-r)/a:0;return{h:w(60*(u<0?u+6:u)),s:w(i?a/i*100:0),v:w(i/255*100),a:o}},F=function(e){return{h:w(e.h),s:w(e.s),v:w(e.v),a:w(e.a,2)}},Z=c.default.memo((function(e){var t=e.className,r=e.hue,n=e.onChange,o=b(["react-colorful__hue",t]);return c.default.createElement("div",{className:o},c.default.createElement(m,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:p(r+360*e.left,0,360)})},"aria-label":"Hue","aria-valuetext":w(r)},c.default.createElement(g,{className:"react-colorful__hue-pointer",left:r/360,color:_({h:r,s:100,v:100,a:1})})))})),D=c.default.memo((function(e){var t=e.hsva,r=e.onChange,n={backgroundColor:_({h:t.h,s:100,v:100,a:1})};return c.default.createElement("div",{className:"react-colorful__saturation",style:n},c.default.createElement(m,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:p(t.s+100*e.left,0,100),v:p(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation ".concat(w(t.s),"%, Brightness ").concat(w(t.v),"%")},c.default.createElement(g,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:_(t)})))})),B=function(e,t){if(e===t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0},z=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function G(e,t,r){var o=f(r),i=n((0,c.useState)((function(){return e.toHsva(t)})),2),a=i[0],u=i[1],l=(0,c.useRef)({color:t,hsva:a});(0,c.useEffect)((function(){if(!e.equal(t,l.current.color)){var r=e.toHsva(t);l.current={hsva:r,color:t},u(r)}}),[t,e]),(0,c.useEffect)((function(){var t;B(a,l.current.hsva)||e.equal(t=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:t},o(t))}),[a,e,o]);var s=(0,c.useCallback)((function(e){u((function(t){return Object.assign({},t,e)}))}),[]);return[a,s]}var U,H="undefined"!=typeof window?c.useLayoutEffect:c.useEffect,V=new Map,W=function(e){H((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!V.has(t)){var n=t.createElement("style");n.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',V.set(t,n);var o=U||r.nc;o&&n.setAttribute("nonce",o),t.head.appendChild(n)}}),[])},q=function(e){var t=e.className,r=e.colorModel,o=e.color,i=void 0===o?r.defaultColor:o,a=e.onChange,u=s(e,["className","colorModel","color","onChange"]),f=(0,c.useRef)(null);W(f);var p=n(G(r,i,a),2),d=p[0],h=p[1],y=b(["react-colorful",t]);return c.default.createElement("div",l({},u,{ref:f,className:y}),c.default.createElement(D,{hsva:d,onChange:h}),c.default.createElement(Z,{hue:d.h,onChange:h,className:"react-colorful__last-control"}))},$={defaultColor:"000",toHsva:function(e){return N(x(e))},fromHsva:function(e){return function(e){var t=e.r,r=e.g,n=e.b;return"#"+M(t)+M(r)+M(n)}(L(e))},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||B(x(e),x(t))}},Y=function(e){var t=e.className,r=e.hsva,n=e.onChange,o={backgroundImage:"linear-gradient(90deg, ".concat(C(Object.assign({},r,{a:0})),", ").concat(C(Object.assign({},r,{a:1})),")")},i=b(["react-colorful__alpha",t]);return c.default.createElement("div",{className:i},c.default.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),c.default.createElement(m,{onMove:function(e){n({a:e.left})},onKey:function(e){n({a:p(r.a+e.left)})},"aria-label":"Alpha","aria-valuetext":"".concat(w(100*r.a),"%")},c.default.createElement(g,{className:"react-colorful__alpha-pointer",left:r.a,color:C(r)})))},K=function(e){var t=e.className,r=e.colorModel,o=e.color,i=void 0===o?r.defaultColor:o,a=e.onChange,u=s(e,["className","colorModel","color","onChange"]),f=(0,c.useRef)(null);W(f);var p=n(G(r,i,a),2),d=p[0],h=p[1],y=b(["react-colorful",t]);return c.default.createElement("div",l({},u,{ref:f,className:y}),c.default.createElement(D,{hsva:d,onChange:h}),c.default.createElement(Z,{hue:d.h,onChange:h}),c.default.createElement(Y,{hsva:d,onChange:h,className:"react-colorful__last-control"}))},J={defaultColor:{h:0,s:0,l:0,a:1},toHsva:P,fromHsva:k,equal:B},X={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:E,fromHsva:C,equal:z},Q={defaultColor:{h:0,s:0,l:0},toHsva:function(e){var t=e.h,r=e.s,n=e.l;return P({h:t,s:r,l:n,a:1})},fromHsva:function(e){return{h:(t=k(e)).h,s:t.s,l:t.l};var t},equal:B},ee={defaultColor:"hsl(0, 0%, 0%)",toHsva:j,fromHsva:_,equal:z},te={defaultColor:{h:0,s:0,v:0,a:1},toHsva:function(e){return e},fromHsva:F,equal:B},re={defaultColor:"hsva(0, 0%, 0%, 1)",toHsva:T,fromHsva:function(e){var t=F(e),r=t.h,n=t.s,o=t.v,i=t.a;return"hsva(".concat(r,", ").concat(n,"%, ").concat(o,"%, ").concat(i,")")},equal:z},ne={defaultColor:{h:0,s:0,v:0},toHsva:function(e){return{h:e.h,s:e.s,v:e.v,a:1}},fromHsva:function(e){var t=F(e);return{h:t.h,s:t.s,v:t.v}},equal:B},oe={defaultColor:"hsv(0, 0%, 0%)",toHsva:A,fromHsva:function(e){var t=F(e),r=t.h,n=t.s,o=t.v;return"hsv(".concat(r,", ").concat(n,"%, ").concat(o,"%)")},equal:z},ie={defaultColor:{r:0,g:0,b:0,a:1},toHsva:N,fromHsva:L,equal:B},ae={defaultColor:"rgba(0, 0, 0, 1)",toHsva:I,fromHsva:function(e){var t=L(e),r=t.r,n=t.g,o=t.b,i=t.a;return"rgba(".concat(r,", ").concat(n,", ").concat(o,", ").concat(i,")")},equal:z},ue={defaultColor:{r:0,g:0,b:0},toHsva:function(e){var t=e.r,r=e.g,n=e.b;return N({r:t,g:r,b:n,a:1})},fromHsva:function(e){return{r:(t=L(e)).r,g:t.g,b:t.b};var t},equal:B},ce={defaultColor:"rgb(0, 0, 0)",toHsva:R,fromHsva:function(e){var t=L(e),r=t.r,n=t.g,o=t.b;return"rgb(".concat(r,", ").concat(n,", ").concat(o,")")},equal:z},le=/^#?([0-9A-F]{3,8})$/i,se=function(e){var t=e.color,r=void 0===t?"":t,o=e.onChange,i=e.onBlur,a=e.escape,u=e.validate,p=e.format,d=e.process,h=s(e,["color","onChange","onBlur","escape","validate","format","process"]),y=n((0,c.useState)((function(){return a(r)})),2),v=y[0],m=y[1],b=f(o),g=f(i),w=(0,c.useCallback)((function(e){var t=a(e.target.value);m(t),u(t)&&b(d?d(t):t)}),[a,d,u,b]),S=(0,c.useCallback)((function(e){u(e.target.value)||m(a(r)),g(e)}),[r,a,u,g]);return(0,c.useEffect)((function(){m(a(r))}),[r,a]),c.default.createElement("input",l({},h,{value:p?p(v):v,spellCheck:"false",onChange:w,onBlur:S}))},fe=function(e){return"#"+e};t.setNonce=function(e){U=e},t.HexColorPicker=function(e){return c.default.createElement(q,l({},e,{colorModel:$}))},t.HslaColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:J}))},t.HslaStringColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:X}))},t.HslColorPicker=function(e){return c.default.createElement(q,l({},e,{colorModel:Q}))},t.HslStringColorPicker=function(e){return c.default.createElement(q,l({},e,{colorModel:ee}))},t.HsvaColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:te}))},t.HsvaStringColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:re}))},t.HsvColorPicker=function(e){return c.default.createElement(q,l({},e,{colorModel:ne}))},t.HsvStringColorPicker=function(e){return c.default.createElement(q,l({},e,{colorModel:oe}))},t.RgbaColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:ie}))},t.RgbaStringColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:ae}))},t.RgbColorPicker=function(e){return c.default.createElement(q,l({},e,{colorModel:ue}))},t.RgbStringColorPicker=function(e){return c.default.createElement(q,l({},e,{colorModel:ce}))},t.HexColorInput=function(e){var t=e.prefixed,r=e.alpha,n=s(e,["prefixed","alpha"]),o=(0,c.useCallback)((function(e){return e.replace(/([^0-9A-F]+)/gi,"").substr(0,r?8:6)}),[r]),i=(0,c.useCallback)((function(e){return function(e,t){var r=le.exec(e),n=r?r[1].length:0;return 3===n||6===n||!!t&&4===n||!!t&&8===n}(e,r)}),[r]);return c.default.createElement(se,l({},n,{escape:o,format:t?fe:void 0,process:fe,validate:i}))}},96510:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return(null===(e=null==r?void 0:r.palette)||void 0===e?void 0:e.tertiary)&&(r=(0,l.default)(r,{palette:{tertiary:h.palette.augmentColor("color"in r.palette.tertiary?r.palette.tertiary:{color:r.palette.tertiary})}})),(null===(t=null==r?void 0:r.palette)||void 0===t?void 0:t.quaternary)&&(r=(0,l.default)(r,{palette:{quaternary:h.palette.augmentColor("color"in r.palette.quaternary?r.palette.quaternary:{color:r.palette.quaternary})}})),r}t.defaultThemes={default:i({name:"Default (from config)"},y()),lightStock:i({name:"Light (stock)"},y()),lightMinimal:{name:"Light (minimal)",palette:{primary:{main:u.grey[900]},secondary:{main:u.grey[800]},tertiary:h.palette.augmentColor({color:{main:u.grey[900]}}),quaternary:h.palette.augmentColor({color:{main:d}}),stopCodon:"#e22",startCodon:"#3e3",bases:{A:h.palette.augmentColor({color:u.green}),C:h.palette.augmentColor({color:u.blue}),G:h.palette.augmentColor({color:u.orange}),T:h.palette.augmentColor({color:u.red})}}},darkMinimal:{name:"Dark (minimal)",palette:{mode:"dark",primary:{main:u.grey[700]},secondary:{main:u.grey[800]},tertiary:h.palette.augmentColor({color:{main:u.grey[900]}}),quaternary:h.palette.augmentColor({color:{main:d}}),stopCodon:"#e22",startCodon:"#3e3",bases:{A:h.palette.augmentColor({color:u.green}),C:h.palette.augmentColor({color:u.blue}),G:h.palette.augmentColor({color:u.orange}),T:h.palette.augmentColor({color:u.red})}}},darkStock:{name:"Dark (stock)",palette:{mode:"dark",primary:{main:s},secondary:{main:f},tertiary:h.palette.augmentColor({color:{main:p}}),quaternary:h.palette.augmentColor({color:{main:d}}),stopCodon:"#e22",startCodon:"#3e3",bases:{A:h.palette.augmentColor({color:u.green}),C:h.palette.augmentColor({color:u.blue}),G:h.palette.augmentColor({color:u.orange}),T:h.palette.augmentColor({color:u.red})}},components:{MuiAppBar:{defaultProps:{enableColorOnDark:!0},styleOverrides:{primary:function(e){return e.theme.palette.primary.main}}}}}},t.createJBrowseBaseTheme=v,t.createJBrowseTheme=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaultThemes,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default";return(0,c.createTheme)(v("default"===n?(0,l.default)(r.default,m(e)):function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(null===(e=null==(r=m(r))?void 0:r.palette)||void 0===e?void 0:e.quaternary)||(r=(0,l.default)(r,{palette:{quaternary:h.palette.augmentColor({color:{main:"#aaa"}})}})),(null===(t=null==r?void 0:r.palette)||void 0===t?void 0:t.tertiary)||(r=(0,l.default)(r,{palette:{tertiary:h.palette.augmentColor({color:{main:"#aaa"}})}})),r}(r[n])||r.default))}},9462:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=2)for(var a=t.index+1;au&&l++}var p=c/(n-o*l),d=e.zoomTo(p),h=0;pp&&n<=p)return i(i({},(0,a.getSnapshot)(m)),{},{oob:!1,offset:g,coord:u(m,g),index:v});(null===(r=f[y])||void 0===r?void 0:r.regionNumber)===v?(n+=b+h,y++):n+=b}if(p>=n&&l.length>0){var w=l.at(-1),S=p-n+(w.end-w.start);return i(i({},(0,a.getSnapshot)(w)),{},{oob:!0,offset:S,coord:u(w,S),index:l.length-1})}return{coord:0,index:0,refName:"",oob:!0,assemblyName:"",offset:0,start:0,end:0,reversed:!1}},t.bpToPx=function(e){for(var t,r=e.refName,n=e.coord,o=e.regionNumber,i=e.self,a=0,u=i.interRegionPaddingWidth,c=i.bpPerPx,l=i.displayedRegions,s=i.staticBlocks.contentBlocks,f=u*c,p=0,d=0;d=h.start&&n<=h.end&&(!o||o===d)){a+=h.reversed?h.end-n:n-h.start;break}(null===(t=s[p])||void 0===t?void 0:t.regionNumber)===d?(a+=y+f,p++):a+=y}if(l[d])return{index:d,offsetPx:Math.round(a/c)}},t.bpToPxMap=function(e){for(var t,r=e.refName,n=e.coord,o=e.regionNumber,i=e.self,a=0,u=i.interRegionPaddingWidth,c=i.bpPerPx,l=i.displayedRegions,s=i.staticBlocks.contentBlocks,f=u*c,p=0,d=0;d=h.start&&n<=h.end&&(void 0===o||o===d)){a+=h.reversed?h.end-n:n-h.start;break}(null===(t=s[p])||void 0===t?void 0:t.regionNumber)===d?(a+=y+f,p++):a+=y}return l[d]?{index:d,offsetPx:Math.round(a/c)}:{}}},63342:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:e.width/2,n=(0,a.clamp)(t,"minBpPerPx"in e?e.minBpPerPx:0,"maxBpPerPx"in e?e.maxBpPerPx:1/0),o=e.bpPerPx;return Math.abs(o-n)<1e-6?o:(e.bpPerPx=n,e.offsetPx=(0,a.clamp)(Math.round((e.offsetPx+r)*o/n-r),e.minOffset,e.maxOffset),e.bpPerPx)},scrollTo:function(t){var r=(0,a.clamp)(t,e.minOffset,e.maxOffset);return e.offsetPx=r,r},centerAt:function(t,r,n){if(r){var o=e.bpToPx({refName:r,coord:t,regionNumber:n});o&&this.scrollTo(Math.round(o-e.width/2))}},scroll:function(t){var r=e.offsetPx,n=(0,a.clamp)(e.offsetPx+t,e.minOffset,e.maxOffset);return e.offsetPx=n,n-r}}})).actions((function(e){return{moveTo:function(t,r){(0,s.moveTo)(e,t,r)}}}));t.default=f},84997:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(){o=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==n&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return n("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),e=v.call(this),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if("number"==typeof t.maxAge&&0===t.maxAge)throw new TypeError("`maxAge` must be a number greater than 0");return e.maxSize=t.maxSize,e.maxAge=t.maxAge||Number.POSITIVE_INFINITY,e.onEviction=t.onEviction,e.cache=new Map,e.oldCache=new Map,e._size=0,e}return c=m,s=[{key:"_emitEvictions",value:function(e){if("function"==typeof this.onEviction){var t,r=a(e);try{for(r.s();!(t=r.n()).done;){var n=i(t.value,2),o=n[0],u=n[1];this.onEviction(o,u.value)}}catch(e){r.e(e)}finally{r.f()}}}},{key:"_deleteIfExpired",value:function(e,t){return"number"==typeof t.expiry&&t.expiry<=Date.now()&&("function"==typeof this.onEviction&&this.onEviction(e,t.value),this.delete(e))}},{key:"_getOrDeleteIfExpired",value:function(e,t){if(!1===this._deleteIfExpired(e,t))return t.value}},{key:"_getItemValue",value:function(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}},{key:"_peek",value:function(e,t){var r=t.get(e);return this._getItemValue(e,r)}},{key:"_set",value:function(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}},{key:"_moveToRecent",value:function(e,t){this.oldCache.delete(e),this._set(e,t)}},{key:"_entriesAscending",value:o().mark((function e(){var t,r,n,u,c,l,s,f,p,d,h,y;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this.oldCache),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=13;break}if(n=r.value,u=i(n,2),c=u[0],l=u[1],this.cache.has(c)){e.next=11;break}if(!1!==this._deleteIfExpired(c,l)){e.next=11;break}return e.next=11,n;case 11:e.next=3;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),t.e(e.t0);case 18:return e.prev=18,t.f(),e.finish(18);case 21:s=a(this.cache),e.prev=22,s.s();case 24:if((f=s.n()).done){e.next=33;break}if(p=f.value,d=i(p,2),h=d[0],y=d[1],!1!==this._deleteIfExpired(h,y)){e.next=31;break}return e.next=31,p;case 31:e.next=24;break;case 33:e.next=38;break;case 35:e.prev=35,e.t1=e.catch(22),s.e(e.t1);case 38:return e.prev=38,s.f(),e.finish(38);case 41:case"end":return e.stop()}}),e,this,[[1,15,18,21],[22,35,38,41]])}))},{key:"get",value:function(e){if(this.cache.has(e)){var t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){var r=this.oldCache.get(e);if(!1===this._deleteIfExpired(e,r))return this._moveToRecent(e,r),r.value}}},{key:"set",value:function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).maxAge,n=void 0===r?this.maxAge:r,o="number"==typeof n&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(e)?this.cache.set(e,{value:t,expiry:o}):this._set(e,{value:t,expiry:o})}},{key:"has",value:function(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):!!this.oldCache.has(e)&&!this._deleteIfExpired(e,this.oldCache.get(e))}},{key:"peek",value:function(e){return this.cache.has(e)?this._peek(e,this.cache):this.oldCache.has(e)?this._peek(e,this.oldCache):void 0}},{key:"delete",value:function(e){var t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}},{key:"clear",value:function(){this.cache.clear(),this.oldCache.clear(),this._size=0}},{key:"resize",value:function(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");var t=n(this._entriesAscending()),r=t.length-e;r<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(r>0&&this._emitEvictions(t.slice(0,r)),this.oldCache=new Map(t.slice(r)),this.cache=new Map,this._size=0),this.maxSize=e}},{key:"keys",value:o().mark((function e(){var t,r,n,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=i(r.value,1),u=n[0],e.next=7,u;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"values",value:o().mark((function e(){var t,r,n,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=i(r.value,2),u=n[1],e.next=7,u;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:t,value:o().mark((function(){var e,t,r,n,u,c,l,s,f,p,d,h;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:e=a(this.cache),o.prev=1,e.s();case 3:if((t=e.n()).done){o.next=12;break}if(r=t.value,n=i(r,2),u=n[0],c=n[1],!1!==this._deleteIfExpired(u,c)){o.next=10;break}return o.next=10,[u,c.value];case 10:o.next=3;break;case 12:o.next=17;break;case 14:o.prev=14,o.t0=o.catch(1),e.e(o.t0);case 17:return o.prev=17,e.f(),o.finish(17);case 20:l=a(this.oldCache),o.prev=21,l.s();case 23:if((s=l.n()).done){o.next=33;break}if(f=s.value,p=i(f,2),d=p[0],h=p[1],this.cache.has(d)){o.next=31;break}if(!1!==this._deleteIfExpired(d,h)){o.next=31;break}return o.next=31,[d,h.value];case 31:o.next=23;break;case 33:o.next=38;break;case 35:o.prev=35,o.t1=o.catch(21),l.e(o.t1);case 38:return o.prev=38,l.f(),o.finish(38);case 41:case"end":return o.stop()}}),c,this,[[1,14,17,20],[21,35,38,41]])}))},{key:"entriesDescending",value:o().mark((function e(){var t,r,a,u,c,l,s,f,p,d,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=n(this.cache),r=t.length-1;case 2:if(!(r>=0)){e.next=12;break}if(a=t[r],u=i(a,2),c=u[0],l=u[1],!1!==this._deleteIfExpired(c,l)){e.next=9;break}return e.next=9,[c,l.value];case 9:--r,e.next=2;break;case 12:t=n(this.oldCache),s=t.length-1;case 14:if(!(s>=0)){e.next=25;break}if(f=t[s],p=i(f,2),d=p[0],h=p[1],this.cache.has(d)){e.next=22;break}if(!1!==this._deleteIfExpired(d,h)){e.next=22;break}return e.next=22,[d,h.value];case 22:--s,e.next=14;break;case 25:case"end":return e.stop()}}),e,this)}))},{key:"entriesAscending",value:o().mark((function e(){var t,r,n,u,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this._entriesAscending()),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=i(r.value,2),u=n[0],c=n[1],e.next=7,[u,c.value];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"size",get:function(){if(!this._size)return this.oldCache.size;var e,t=0,r=a(this.oldCache.keys());try{for(r.s();!(e=r.n()).done;){var n=e.value;this.cache.has(n)||t++}}catch(e){r.e(e)}finally{r.f()}return Math.min(this._size+t,this.maxSize)}},{key:"entries",value:function(){return this.entriesAscending()}},{key:"forEach",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=a(this.entriesAscending());try{for(n.s();!(t=n.n()).done;){var o=i(t.value,2),u=o[0],c=o[1];e.call(r,c,u,this)}}catch(e){n.e(e)}finally{n.f()}}},{key:u,get:function(){return JSON.stringify(n(this.entriesAscending()))}}],s&&l(c.prototype,s),Object.defineProperty(c,"prototype",{writable:!1}),m}(s(Map),Symbol.iterator,Symbol.toStringTag);t.default=y},61017:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,s(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)},a(e)}function u(e,t,r){return u=c()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&l(o,r.prototype),o},u.apply(null,arguments)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isAbortException=t.observeAbortSignal=t.makeAbortError=t.abortBreakPoint=t.checkAbortSignal=void 0;var f=r(92048),p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(a,e);var t,r,o,i=(r=a,o=c(),function(){var e,t=s(r);if(o){var i=s(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,Object.defineProperty(t,"prototype",{writable:!1}),t}(a(Error));function d(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw v()}}function h(e){return new Promise((function(t){return setTimeout(t,e)}))}function y(){var e;return e=o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h(1);case 2:d(t);case 3:case"end":return e.stop()}}),e)})),y=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))},y.apply(this,arguments)}function v(){if("undefined"!=typeof DOMException)return new DOMException("aborted","AbortError");var e=new p("aborted");return e.code="ERR_ABORTED",e}t.checkAbortSignal=d,t.abortBreakPoint=function(e){return y.apply(this,arguments)},t.makeAbortError=v,t.observeAbortSignal=function(e){return e?(0,f.fromEvent)(e,"abort"):f.Observable.create()},t.isAbortException=function(e){return e instanceof Error&&("AbortError"===e.name||"ERR_ABORTED"===e.code||!!/\b(aborted|aborterror)\b/i.test(e.message))}},38111:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blobToDataURL=void 0,t.blobToDataURL=function(e){var t=new FileReader;return new Promise((function(r,n){t.onload=function(e){e.target?r(e.target.result):n(new Error("unknown result reading blob from canvas"))},t.readAsDataURL(e)}))}},45131:(e,t,r)=>{"use strict";function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=a(e);if(t){var o=a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[];c(this,e),this.blocks=t}return s(e,[{key:"push",value:function(e){if(e instanceof y&&this.blocks.length>0){var t=this.blocks.at(-1);if(t instanceof y)return void t.push(e)}this.blocks.push(e)}},{key:"getBlocks",value:function(){return this.blocks}},{key:"getRegions",value:function(){return this.blocks.map((function(e){return e.toRegion()}))}},{key:"map",value:function(e,t){return this.blocks.map(e,t)}},{key:"forEach",value:function(e,t){return this.blocks.forEach(e,t)}},{key:"length",get:function(){return this.blocks.length}},{key:"totalWidthPx",get:function(){return this.blocks.length>0?(0,f.sum)(this.blocks.map((function(e){return e.widthPx}))):0}},{key:"totalWidthPxWithoutBorders",get:function(){return this.blocks.length>0?(0,f.sum)(this.blocks.filter((function(e){return"boundary"!==e.variant})).map((function(e){return e.widthPx}))):0}},{key:"offsetPx",get:function(){return this.blocks.length>0?this.blocks[0].offsetPx:0}},{key:"contentBlocks",get:function(){return this.blocks.filter((function(e){return e instanceof h}))}},{key:"totalBp",get:function(){return(0,f.sum)(this.contentBlocks.map((function(e){return e.end-e.start})))}}]),e}();t.BlockSet=p;var d=function(){function e(t){c(this,e),this.widthPx=0,Object.assign(this,t),this.assemblyName=t.assemblyName,this.refName=t.refName,this.start=t.start,this.end=t.end,this.key=t.key,this.offsetPx=t.offsetPx}return s(e,[{key:"toRegion",value:function(){return{refName:this.refName,start:this.start,end:this.end,assemblyName:this.assemblyName,reversed:this.reversed}}}]),e}();t.BaseBlock=d;var h=function(e){n(r,e);var t=i(r);function r(){return c(this,r),t.apply(this,arguments)}return s(r)}(d);t.ContentBlock=h;var y=function(e){n(r,e);var t=i(r);function r(e){var n;return c(this,r),(n=t.call(this,e)).elidedBlockCount=0,n.widthPx=e.widthPx,n}return s(r,[{key:"push",value:function(e){this.elidedBlockCount+=1,e&&(this.refName="",this.start=0,this.end=0,this.widthPx+=e.widthPx)}}]),r}(d);t.ElidedBlock=y;var v=function(e){n(r,e);var t=i(r);function r(){return c(this,r),t.apply(this,arguments)}return s(r)}(d);t.InterRegionPaddingBlock=v},51398:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1])||arguments[1],l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=e.offsetPx,f=e.displayedRegions,p=e.bpPerPx,d=e.width,h=e.minimumBlockWidth,y=e.interRegionPaddingWidth;if(!d)throw new Error("view has no width, cannot calculate displayed blocks");for(var v=new u.BlockSet,m=0,b=s,g=b+d,w=0;wb){var L=(t=(0,i.intersection2)(b,g,m,k),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),T=L[0],A=L[1],I=void 0,R=void 0,M=void 0,N=void 0,F=void 0;P?(M=(R=j-(T-m)*p)===j,N=(I=Math.max(E,j-(A-m)*p))===E,F=m+(j-R)/p):(M=(I=(T-m)*p+E)===E,N=(R=Math.min(j,(A-m)*p+E))===j,F=m+(I-E)/p);var Z={assemblyName:x,refName:O,start:I,end:R,reversed:P,offsetPx:F,parentRegion:C,regionNumber:w,widthPx:(R-I)/p,isLeftEndOfDisplayedRegion:M,isRightEndOfDisplayedRegion:N,key:""};Z.key="".concat((0,a.assembleLocStringFast)(Z),"-").concat(w).concat(P?"-reversed":""),c&&0===v.length&&M&&v.push(new u.InterRegionPaddingBlock({key:"".concat(Z.key,"-beforeFirstRegion"),widthPx:-s,offsetPx:Z.offsetPx+s,variant:"boundary"})),l&&_=h&&Z.isRightEndOfDisplayedRegion&&w{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(82123),o=r(35743),i=r(45131);t.default=function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:800,c=e.offsetPx,l=e.displayedRegions,s=e.bpPerPx,f=e.minimumBlockWidth,p=e.interRegionPaddingWidth,d=c*s,h=(c+e.width)*s,y=u,v=Math.ceil(y*s),m=0,b=new i.BlockSet,g=0;g=P&&(_=P-1);var C=Math.floor((d-m)/v)-a;C<0&&(C=0);for(var L=(E-O)/s,T=C;T<=_;T+=1){var A=void 0,I=void 0,R=void 0,M=void 0;j?(R=(I=E-T*v)===E,M=(A=Math.max(O,E-(T+1)*v))===O):(R=(A=O+T*v)===O,M=(I=Math.min(E,O+(T+1)*v))===E);var N={assemblyName:S,refName:x,start:A,end:I,reversed:j,offsetPx:(m+T*v)/s,parentRegion:k,regionNumber:g,widthPx:(I-A)/s,isLeftEndOfDisplayedRegion:R,isRightEndOfDisplayedRegion:M,key:""};N.key="".concat((0,o.assembleLocStringFast)(N),"-").concat(g).concat(j?"-reversed":""),t&&0===g&&0===T&&b.push(new i.InterRegionPaddingBlock({key:"".concat(N.key,"-beforeFirstRegion"),widthPx:u,offsetPx:N.offsetPx-u,variant:"boundary"})),r&&L=f&&N.isRightEndOfDisplayedRegion&&g{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNamedColor=t.namedColorToHex=void 0;var r={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};t.namedColorToHex=function(e){return r[e]},t.isNamedColor=function(e){return!!r[e]}},26888:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namedColorToHex=t.isNamedColor=t.makeContrasting=t.emphasize=t.contrastingTextColor=void 0;var n=r(64694),o=r(12526);function i(e){var t=(0,o.namedColorToHex)(e);return(0,n.getLuminance)(t||e)}t.contrastingTextColor=function(e){return i(e)>.5?"black":"white"},t.emphasize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15,r=(0,o.namedColorToHex)(e);return(0,n.emphasize)(r||e,t)},t.makeContrasting=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"white",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,a=(0,o.namedColorToHex)(e)||e,u=(0,o.namedColorToHex)(t)||t,c=i(u),l=(0,n.getContrastRatio)(a,u),s=a,f=.05;l.5?(0,n.darken)(s,f):(0,n.lighten)(s,f),f+=.05,l=(0,n.getContrastRatio)(a,u);return a};var a=r(12526);Object.defineProperty(t,"isNamedColor",{enumerable:!0,get:function(){return a.isNamedColor}}),Object.defineProperty(t,"namedColorToHex",{enumerable:!0,get:function(){return a.namedColorToHex}})},94604:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.colord=t.Colord=void 0;var o=r(12914),i=n(r(34072)),a=n(r(83764));(0,o.extend)([i.default,a.default]);var u=r(12914);Object.defineProperty(t,"Colord",{enumerable:!0,get:function(){return u.Colord}}),Object.defineProperty(t,"colord",{enumerable:!0,get:function(){return u.colord}})},94278:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(){n=function(){return t};var e,t={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==o&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return n("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:JSON.stringify,o=[],i=new Set,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}(e);try{for(a.s();!(t=a.n()).done;){var u=t.value,c=n(u);i.has(c)||(o.push(u),i.add(c))}}catch(e){a.e(e)}finally{a.f()}return o}},40881:(e,t)=>{"use strict";t.DO=void 0,t.DO=function(e){return e.map((function(e){return">".concat(e.header,"\n").concat(e.seq.replaceAll(/(.{1,80})/g,"$1\n").trimEnd())})).join("\n")}},33397:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(35743);t.default=function e(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=0,a=Object.keys(t);i5e3)break;r+="object"===n(t[u])&&t[u]?e(t[u],r):"".concat(u,"-").concat(t[u],";")}return(0,o.hashCode)(r)}},35743:function(e,t,r){"use strict";var n=r(554);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:function(e){return e},o=e.assemblyName,i=e.refName,a=e.start,u=e.end,c=e.reversed,l=o?"{".concat(o,"}"):"";t=void 0!==a?":".concat(n(a+1)):void 0!==u?":1":"",r=void 0!==u?void 0!==a&&a+1===u?"":"..".concat(n(u)):void 0!==a?"..":"";var s="";return c&&(s="[rev]"),"".concat(l).concat(i).concat(t).concat(r).concat(s)}function T(e,t){if(!e)throw new Error("no location string provided, could not parse");var r=!1;e.endsWith("[rev]")&&(r=!0,e=e.replace(/\[rev]$/,""));var n=(e=e.replace(/\s/,"")).match(/({(.+)})?(.+)/);if(!n)throw new Error('invalid location string: "'.concat(e,'"'));var o=f(n,4),i=o[2],a=o[3];if(!i&&a.startsWith("{}"))throw new Error('no assembly name was provided in location "'.concat(a,'"'));var u=a.lastIndexOf(":");if(-1===u){if(t(a,i))return{assemblyName:i,refName:a,reversed:r};throw new Error('Unknown reference sequence "'.concat(a,'"'))}var c=a.slice(0,u),l=a.slice(u+1);if(t(c,i)&&t(a,i))throw new Error('ambiguous location string: "'.concat(e,'"'));if(t(c,i)){if(!l)return{assemblyName:i,refName:c,reversed:r};var s=l.match(/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/),p=l.match(/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/);if(s){var d=f(s,6),h=d[1],y=d[5];if(void 0!==h&&void 0!==y)return{assemblyName:i,refName:c,start:+h.replaceAll(",",""),end:+y.replaceAll(",",""),reversed:r}}else{if(!p)throw new Error('could not parse range "'.concat(l,'" on location "').concat(e,'"'));var v=f(p,5),m=v[1],b=v[4];if(void 0!==m)return b?{assemblyName:i,refName:c,start:+m.replaceAll(",",""),reversed:r}:{assemblyName:i,refName:c,start:+m.replaceAll(",",""),end:+m.replaceAll(",",""),reversed:r}}}else if(t(a,i))return{assemblyName:i,refName:a,reversed:r};throw new Error('unknown reference sequence name in location "'.concat(e,'"'))}function A(e,t){var r=T(e,t);return"number"==typeof r.start&&(r.start-=1),r}function I(e,t){var r=e.assemblyName||t.assemblyName?(e.assemblyName||"").localeCompare(t.assemblyName||""):0;if(r)return r;var n=e.refName||t.refName?(e.refName||"").localeCompare(t.refName||""):0;if(n)return n;if(void 0!==e.start&&void 0!==t.start){var o=e.start-t.start;if(o)return o}if(void 0!==e.end&&void 0!==t.end){var i=e.end-t.end;if(i)return i}return 0}function R(e,t,r){var n,o=t.reversed,i=t.end,a=void 0===i?0:i,u=t.start;return n=(o?a-e:e-(void 0===u?0:u))/r,Math.round(10*n)/10}v(r(44502),t),v(r(61017),t),v(r(65063),t),v(r(96585),t),v(r(11281),t),v(r(4891),t),v(r(73231),t),t.inDevelopment="object"===(void 0===n?"undefined":h(n))&&n.env&&!1,t.inProduction=!t.inDevelopment,t.useDebounce=function(e,t){var r=f((0,b.useState)(e),2),n=r[0],o=r[1];return(0,b.useEffect)((function(){var r=setTimeout((function(){o(e)}),t);return function(){clearTimeout(r)}}),[e,t]),n},t.useWidthSetter=function(e,t){var r=f((0,j.default)(),2),n=r[0],o=r[1].width;return(0,b.useEffect)((function(){o&&(0,w.isAlive)(e)&&requestAnimationFrame((function(){return e.setWidth(o-2*Number.parseInt(t,10))}))}),[t,e,o]),n},t.useDebouncedCallback=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,r=(0,b.useRef)(),n=(0,b.useRef)();function o(){n.current&&clearTimeout(n.current)}return(0,b.useEffect)((function(){return o}),[]),function(){for(var i=arguments.length,a=new Array(i),u=0;u3&&void 0!==arguments[3]?arguments[3]:function(){},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:170,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:26;function c(e){var l=Date.now(),s=e.lastPosition,f=e.lastTime||l,p=e.lastVelocity||0;l>f+64&&(f=l);for(var d=Math.floor(l-f),h=0;hr?r:e},t.bpToPx=R;var M,N,F=180/Math.PI,Z=Math.PI/180;function D(e,t,r,n){var o=R(e,r,n),i=R(t,r,n);return r.reversed?[i,o]:[o,i]}function B(e,t){if((0,w.isStateTreeNode)(t)&&!(0,w.isAlive)(t))return t;if(t&&(null==e?void 0:e[t.refName])){var r=e[(t=(0,w.isStateTreeNode)(t)?i({},(0,w.getSnapshot)(t)):i({},t)).refName];if(r)return i(i({},t),{},{refName:r,originalRefName:t.refName})}return t}function z(){return z=c(a().mark((function e(t,r){var n,o,u,l,f;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.regions,o=void 0===n?[]:n,u=r.adapterConfig,r.sessionId){e.next=3;break}throw new Error("sessionId is required");case 3:return l=o.map((function(e){return e.assemblyName})),e.t0=Object,e.next=7,Promise.all(s(new Set(l)).map(function(){var e=c(a().mark((function e(n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=n,e.next=3,t.getRefNameMapForAdapter(u,n,r);case 3:return e.t1=e.sent,e.abrupt("return",[e.t0,e.t1]);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 7:return e.t1=e.sent,f=e.t0.fromEntries.call(e.t0,e.t1),e.abrupt("return",i(i({},r),{},{regions:o.map((function(e,t){return B(f[l[t]],e)}))}));case 10:case"end":return e.stop()}}),e)}))),z.apply(this,arguments)}function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:70,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30;return e.length>t?e.slice(0,r)+"..."+e.slice(-r):e}function U(e){return e.split("").reverse().join("")}t.radToDeg=function(e){return e*F%360},t.degToRad=function(e){return e*Z%(2*Math.PI)},t.polarToCartesian=function(e,t){return[e*Math.cos(t),e*Math.sin(t)]},t.cartesianToPolar=function(e,t){return[Math.sqrt(e*e+t*t),Math.atan(t/e)]},t.featureSpanPx=function(e,t,r){return D(e.get("start"),e.get("end"),t,r)},t.bpSpanPx=D,t.iterMap=function(e,t,r){var n,o=Array.from({length:r||0}),i=0,a=l(e);try{for(a.s();!(n=a.n()).done;){var u=n.value;o[i]=t(u),i+=1}}catch(e){a.e(e)}finally{a.f()}return o},t.findLastIndex=function(e,t){for(var r=e.length;r--;)if(t(e[r],r,e))return r;return-1},t.findLast=function(e,t){for(var r=e.length;r--;)if(t(e[r],r,e))return e[r]},t.makeAbortableReaction=function(e,t,r,n,o,i,u){var l;function s(t){(0,O.isAbortException)(t)||((0,w.isAlive)(e)?u(t):console.error(t))}(0,w.addDisposer)(e,(0,S.reaction)((function(){try{return t(e)}catch(e){return void s(e)}}),function(){var t=c(a().mark((function t(n,u){var c,f;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l&&!l.signal.aborted&&l.abort(),(0,w.isAlive)(e)){t.next=3;break}return t.abrupt("return");case 3:return l=new AbortController,o(c=l),t.prev=6,t.next=9,r(n,c.signal,e,u);case 9:f=t.sent,(0,O.checkAbortSignal)(c.signal),(0,w.isAlive)(e)&&i(f),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(6),c&&!c.signal.aborted&&c.abort(),s(t.t0);case 18:case"end":return t.stop()}}),t,null,[[6,14]])})));return function(e,r){return t.apply(this,arguments)}}(),n)),(0,w.addDisposer)(e,(function(){l&&!l.signal.aborted&&l.abort()}))},t.renameRegionIfNeeded=B,t.renameRegionsIfNeeded=function(e,t){return z.apply(this,arguments)},t.minmax=function(e,t){return[Math.min(e,t),Math.max(e,t)]},t.shorten=G,t.stringify=function(e,t){var r=e.refName,n=e.coord,o=e.assemblyName,i=e.oob;return[o&&t?"{".concat(o,"}"):"",r?"".concat(G(r),":").concat(Y(n)).concat(i?" (out of bounds)":""):""].join("")},t.isElectron=/electron/i.test("undefined"!=typeof navigator?navigator.userAgent:""),t.revcom=function(e){return U((0,t.complement)(e))},t.reverse=U,t.complement=(M=/[ACGT]/gi,N={S:"S",w:"w",T:"A",r:"y",a:"t",N:"N",K:"M",x:"x",d:"h",Y:"R",V:"B",y:"r",M:"K",h:"d",k:"m",C:"G",g:"c",t:"a",A:"T",n:"n",W:"W",X:"X",m:"k",v:"b",B:"V",s:"s",H:"D",c:"g",D:"H",b:"v",R:"Y",G:"C"},function(e){return e.replaceAll(M,(function(e){return N[e]||""}))}),t.rIC="undefined"==typeof jest?"undefined"!=typeof window&&window.requestIdleCallback?window.requestIdleCallback:function(e){return setTimeout((function(){return e()}),1)}:function(e){return e()};var H=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2796875,.2765625,.3546875,.5546875,.5546875,.8890625,.665625,.190625,.3328125,.3328125,.3890625,.5828125,.2765625,.3328125,.2765625,.3015625,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.2765625,.2765625,.584375,.5828125,.584375,.5546875,1.0140625,.665625,.665625,.721875,.721875,.665625,.609375,.7765625,.721875,.2765625,.5,.665625,.5546875,.8328125,.721875,.7765625,.665625,.7765625,.721875,.665625,.609375,.721875,.665625,.94375,.665625,.665625,.609375,.2765625,.3546875,.2765625,.4765625,.5546875,.3328125,.5546875,.5546875,.5,.5546875,.5546875,.2765625,.5546875,.5546875,.221875,.240625,.5,.221875,.8328125,.5546875,.5546875,.5546875,.5546875,.3328125,.5,.2765625,.5546875,.5,.721875,.5,.5,.5,.3546875,.259375,.353125,.5890625];function V(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=String(e),o=0,i=0;i]+)>)/gi,"")}function Q(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=l(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;r=o>r?o:r}}catch(e){n.e(e)}finally{n.f()}return r}function ee(e){var t,r=0,n=l(e);try{for(n.s();!(t=n.n()).done;)r+=t.value}catch(e){n.e(e)}finally{n.f()}return r}function te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3;if(e.length<=1)return e;var r=[],n=null;e=e.sort((function(e,t){return e.start-t.start})),r.push(e[0]);for(var o=1;o0?"".concat(Number.parseFloat((e/1e6).toPrecision(3)),"Mbp"):Math.floor(e/1e3)>0?"".concat(Number.parseFloat((e/1e3).toPrecision(3)),"Kbp"):"".concat(Y(Math.floor(e)),"bp")},t.toLocale=Y,t.getTickDisplayStr=function(e,t){return Math.floor(t/1e3)>0?"".concat(Y(Number.parseFloat((e/1e6).toFixed(2))),"M"):"".concat(Y(Math.floor(e)))},t.getViewParams=function(e,t){var r=C(e),n=r.dynamicBlocks,o=r.staticBlocks,i=r.offsetPx,a=(null==n?void 0:n.contentBlocks[0])||{},u=(null==o?void 0:o.contentBlocks[0])||{},c=(null==o?void 0:o.contentBlocks[1])||{};return{offsetPx:t?0:i-u.offsetPx,offsetPx1:t?0:i-c.offsetPx,start:a.start,end:a.end}},t.getLayoutId=function(e){return e.sessionId+"-"+e.layoutId},t.useLocalStorage=function(e,t){var r=f((0,b.useState)((function(){if("undefined"==typeof window)return t;try{var r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch(e){return console.error(e),t}})),2),n=r[0],o=r[1];return[n,function(t){try{var r=t instanceof Function?t(n):t;o(r),"undefined"!=typeof window&&window.localStorage.setItem(e,JSON.stringify(r))}catch(e){console.error(e)}}]},t.getUriLink=K,t.getStr=J,t.coarseStripHTML=X,t.linkify=function(e){return e.replaceAll(/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,"$1$2")},t.measureGridWidth=function(e,t){var r=t||{},n=r.padding,o=void 0===n?30:n,i=r.minWidth,a=void 0===i?80:i,u=r.fontSize,c=void 0===u?12:u,l=r.maxWidth,s=void 0===l?1e3:l,f=r.stripHTML,p=void 0!==f&&f;return Q(e.map((function(e){return J(e)})).map((function(e){return p?X(e):e})).map((function(e){return V(e,c)})).map((function(e){return Math.min(Math.max(e+o,a),s)})))},t.getEnv=function(e){return(0,w.getEnv)(e)},t.localStorageGetItem=function(e){return"undefined"!=typeof localStorage?localStorage.getItem(e):void 0},t.localStorageSetItem=function(e,t){return"undefined"!=typeof localStorage?localStorage.setItem(e,t):void 0},t.max=Q,t.min=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=l(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;r=o{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r3&&void 0!==arguments[3]?arguments[3]:{},o=S[e];if(!o)throw new Error("fetch not registered for ".concat(e));return o(e,t,r,n)},size:500*Math.pow(1024,2),chunkSize:131072,maxFetchSize:100*Math.pow(1024,2),minimumTTL:864e5});t.clearCache=function(){x.reset()};var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(b,e);var t,r,i,l,s,f,h=(s=b,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(s);if(f){var r=m(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function b(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),h.apply(this,arguments)}return t=b,r=[{key:"fetch",value:(l=p(u().mark((function e(t,r){var n,o,i,a,l,s,f,p,d,h,v,g;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S[String(t)]||(S[String(t)]=this.fetchBinaryRange.bind(this)),(n=null==r?void 0:r.headers)&&(n instanceof Headers?o=n.get("range"):Array.isArray(n)?(i=n.find((function(e){return"range"===c(e,1)[0]}))||[void 0,void 0],a=c(i,2),o=a[1]):o=n.range),!o){e.next=14;break}if(!(l=/bytes=(\d+)-(\d+)/.exec(o))){e.next=14;break}return s=c(l,3),f=s[1],p=s[2],d=Number.parseInt(f,10),h=Number.parseInt(p,10),e.next=11,x.getRange(t,d,h-d+1,{signal:null==r?void 0:r.signal});case 11:return v=e.sent,g=v.headers,e.abrupt("return",new Response(v.buffer,{status:206,headers:g}));case 14:return e.abrupt("return",y(m(b.prototype),"fetch",this).call(this,t,r));case 15:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"fetchBinaryRange",value:(i=p(u().mark((function e(t,r,n){var i,l,s,f,p,d,h,v,w,S,x,O,E,j=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=j.length>3&&void 0!==j[3]?j[3]:{},l=new Date,s=a(a({},i.headers),{},{range:"bytes=".concat(r,"-").concat(n)}),e.next=5,y(m(b.prototype),"fetch",this).call(this,t,a(a({},i),{},{headers:s}));case 5:if(f=e.sent,p=new Date,206===f.status){e.next=11;break}throw d="HTTP ".concat(f.status," (").concat(f.statusText,") when fetching ").concat(t," bytes ").concat(r,"-").concat(n),new Error("".concat(d).concat(200===f.status?" (should be 206 for range requests)":""));case 11:h={},v=o(f.headers.entries());try{for(v.s();!(w=v.n()).done;)S=c(w.value,2),x=S[0],O=S[1],h[x]=O}catch(e){v.e(e)}finally{v.f()}return e.next=16,f.arrayBuffer();case 16:return E=e.sent,e.abrupt("return",{headers:h,requestDate:l,responseDate:p,buffer:g.Buffer.from(E)});case 18:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return i.apply(this,arguments)})}],r&&d(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(w.RemoteFile);t.RemoteFileWithRangeCache=O},76743:function(e,t,r){"use strict";function n(){n=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(n,a,u,c){var l=d(e[n],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var n;a(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function r(){for(;++n=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},63089:(e,t)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=r&&n>=e}var d=function(){function e(){c(this,e),this.padding=1,this.widthLimit=1e6}return s(e,[{key:"setAllFilled",value:function(e){this.allFilled=e}},{key:"getItemAt",value:function(e){var t;return this.allFilled?this.allFilled:void 0===(null===(t=this.rowState)||void 0===t?void 0:t.min)||e=this.rowState.max?void 0:this.rowState.bits[e-this.rowState.offset]}},{key:"isRangeClear",value:function(e,t){if(this.allFilled)return!1;if(void 0===this.rowState||t<=this.rowState.min||e>=this.rowState.max)return!0;for(var r=this.rowState,n=r.min,o=r.max,i=r.offset,a=r.bits,u=Math.min(o,t)-i,c=!0,l=Math.max(n,e)-i;l=this.rowState.bits.length){var c=a+1;this.rowState.bits.length+c>this.widthLimit?(console.warn("Layout width limit exceeded, discarding old layout. Please be more careful about discarding unused blocks."),this.rowState=this.initialize(r,n)):c>0&&(this.rowState.bits=[].concat(i(this.rowState.bits),i(Array.from({length:c}))))}if(rthis.widthLimit?(console.warn("Layout width limit exceeded, discarding old layout. Please be more careful about discarding unused blocks."),this.rowState=this.initialize(r,n)):(this.rowState.bits=[].concat(i(Array.from({length:l})),i(this.rowState.bits)),this.rowState.offset-=l)}var s=(a=n-this.rowState.offset)-(o=r-this.rowState.offset);s>2e4&&console.warn("Layout X pitch set too low, feature spans ".concat(s," bits in a single row."),e,t);for(var f=o;fthis.rowState.max&&(this.rowState.max=n)}},{key:"discardRange",value:function(e,t){if(!this.allFilled&&this.rowState&&!(t<=this.rowState.min||e>=this.rowState.max))if(e<=this.rowState.min&&t>=this.rowState.max)this.rowState=void 0;else{if(t>this.rowState.min&&e<=this.rowState.min&&(this.rowState.min=t),e=this.rowState.max&&(this.rowState.max=e),this.rowState.offsetthis.rowState.max+f-this.rowState.offset){var r=this.rowState.min-this.rowState.offset,n=this.rowState.bits.length-1-(this.rowState.max-this.rowState.offset);this.rowState.bits=this.rowState.bits.slice(r,this.rowState.bits.length-n),this.rowState.offset+=r}else if(this.rowState.offsetthis.rowState.max-this.rowState.offset+f){var i=this.rowState.max-this.rowState.offset+1+Math.floor(5e3);this.rowState.bits.length=i}for(var a=Math.max(this.rowState.min,e)-this.rowState.offset,u=Math.min(t,this.rowState.max)-this.rowState.offset,c=a;c>=0&&c0&&void 0!==arguments[0]?arguments[0]:{},r=t.pitchX,n=void 0===r?10:r,o=t.pitchY,i=void 0===o?10:o,a=t.maxHeight,u=void 0===a?1e4:a,l=t.hardRowLimit,s=void 0===l?1e4:l,f=t.displayMode,p=void 0===f?"normal":f;c(this,e),this.pitchX=n,this.pitchY=i,this.hardRowLimit=s,this.maxHeightReached=!1,this.displayMode=p,"compact"===this.displayMode&&(this.pitchY=Math.round(this.pitchY/4)||1,this.pitchX=Math.round(this.pitchX/4)||1),this.bitmap=[],this.rectangles=new Map,this.maxHeight=Math.ceil(u/this.pitchY),this.pTotalHeight=0}return s(e,[{key:"addRect",value:function(e,t,r,n,o){var i=this.rectangles.get(e);if(i)return null===i.top?null:(this.addRectToBitmap(i),i.top*this.pitchY);var a=Math.floor(t/this.pitchX),u=Math.floor(r/this.pitchX),c=Math.ceil(n/this.pitchY),l={id:e,l:a,r:u,top:null,h:c,originalHeight:n,data:o},s=this.maxHeight-c,f=0;if("collapse"!==this.displayMode){for(;f<=s&&this.collides(l,f);f+=1);if(f>s)return l.top=null,this.rectangles.set(e,l),this.maxHeightReached=!0,null}return l.top=f,this.addRectToBitmap(l),this.rectangles.set(e,l),this.pTotalHeight=Math.max(this.pTotalHeight||0,f+c),f*this.pitchY}},{key:"collides",value:function(e,t){for(var r=this.bitmap,n=t+e.h,o=t;othis.hardRowLimit)throw new Error("layout hard limit (".concat(this.hardRowLimit*this.pitchY,"px) exceeded, aborting layout"));r=new d,e[t]=r}return r}},{key:"addRectToBitmap",value:function(e){if(null!==e.top){var t=e.id,r=e.top+e.h;if(e.r-e.l>2e4)for(var n=e.top;n{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.SubLayoutClass=t,this.subLayoutConstructorArgs=r,this.subLayouts=new Map}var t,r;return t=e,r=[{key:"getDataByID",value:function(e){var t,r=n(this.subLayouts.values());try{for(r.s();!(t=r.n()).done;){var o=t.value.getDataByID(e);if(o)return o}}catch(e){r.e(e)}finally{r.f()}}},{key:"getSublayout",value:function(e){var t=this.subLayouts.get(e);return void 0===t?(t=new this.SubLayoutClass(this.subLayoutConstructorArgs),this.subLayouts.set(e,t),t):t}},{key:"addRect",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return this.getSublayout(e).addRect(t,r,n,o,i)}},{key:"discardRange",value:function(e,t,r){var n;return null===(n=this.subLayouts.get(e))||void 0===n?void 0:n.discardRange(t,r)}},{key:"toJSON",value:function(){var e,t,r,i={},a=n(this.subLayouts.entries());try{for(a.s();!(e=a.n()).done;){var u=(t=e.value,r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||o(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=u[0],l=u[1];i[c]=l.toJSON()}}catch(e){a.e(e)}finally{a.f()}return i}}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=u},35687:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);ra&&(this.width+=t-a),void 0!==u&&rc&&(this.height+=n-c),this.parent&&this.parent.expand(e,t,r,n),this.absoluteCache.dirty=!0}},{key:"bottom",get:function(){return this.top+this.height}},{key:"right",get:function(){return this.left+this.width}},{key:"walkParents",value:function(e){this.parent&&(e(this.parent),this.parent.walkParents(e))}},{key:"walkChildren",value:function(e){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(this.children.values());try{for(r.s();!(t=r.n()).done;){var n=t.value;e(n),n.walkChildren(e)}}catch(e){r.e(e)}finally{r.f()}}},{key:"absolute",get:function(){if(this.absoluteCache.dirty){var e=0,t=0;this.walkParents((function(r){e+=r.left,t+=r.top})),this.absoluteCache={dirty:!1,left:this.left+e,right:this.right+e,top:this.top+t,bottom:this.bottom+t,width:this.width,height:this.height}}return this.absoluteCache}},{key:"move",value:function(e,t){this.left+=e,this.top+=t,this.absoluteCache.dirty=!0,this.walkChildren((function(e){e.absoluteCache.dirty=!0}));var r=this.absolute,n=r.left,o=r.right,i=r.top,a=r.bottom;void 0!==n&&void 0!==o&&void 0!==i&&void 0!==a&&this.expand(n,o,i,a)}}])&&i(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=u},95564:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SceneGraph=t.PrecomputedMultiLayout=t.PrecomputedLayout=t.MultiLayout=t.GranularRectLayout=void 0,o(r(14731),t);var a=r(63089);Object.defineProperty(t,"GranularRectLayout",{enumerable:!0,get:function(){return i(a).default}});var u=r(21384);Object.defineProperty(t,"MultiLayout",{enumerable:!0,get:function(){return i(u).default}});var c=r(35687);Object.defineProperty(t,"PrecomputedLayout",{enumerable:!0,get:function(){return i(c).default}});var l=r(80886);Object.defineProperty(t,"PrecomputedMultiLayout",{enumerable:!0,get:function(){return i(l).default}});var s=r(60106);Object.defineProperty(t,"SceneGraph",{enumerable:!0,get:function(){return i(s).default}})},56767:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return"object"===r(e)&&null!==e},o=function(e){return n(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob)};t.default=function e(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet;if(!i.has(t)){i.add(t);var a=function(t){return t.forEach((function(t){r(t),n(t)&&e(t,r,i)}))};Array.isArray(t)&&a(t);for(var u=0,c=Object.values(t);u{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveLateType=t.getEnumerationValues=t.getDefaultValue=t.getPropertyType=t.getUnionSubTypes=t.getSubType=void 0;var n=r(82123);function o(e){var t;if((0,n.isOptionalType)(e))t=e._subtype||e.type;else{if(!(0,n.isArrayType)(e)&&!(0,n.isMapType)(e)){if("function"==typeof e.getSubType)return e.getSubType();throw new TypeError("unsupported mst type")}t=e._subtype||e._subType||e.subType}if(!t)throw new Error("failed to get subtype");return t}function i(e){if(!(0,n.isUnionType)(e))throw new TypeError("not an MST union type");var t=e._types||e.types||o(e)._types||o(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}t.getSubType=o,t.getUnionSubTypes=i,t.getPropertyType=function(e,t){return e.properties[t]},t.getDefaultValue=function(e){if(!(0,n.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue},t.getEnumerationValues=function(e){return i(e).map((function(e){return e.value}))},t.resolveLateType=function(e){return(0,n.isUnionType)(e)||(0,n.isArrayType)(e)||!(0,n.isLateType)(e)?e:e.getSubType()}},70575:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nanoid=t.customAlphabet=t.customRandom=t.random=t.urlAlphabet=void 0,t.urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",t.random=function(e){return crypto.getRandomValues(new Uint8Array(e))},t.customRandom=function(e,t,r){var n=(2<0&&void 0!==arguments[0]?arguments[0]:t,a="";;)for(var u=r(o),c=o;c--;)if((a+=e[u[c]&n]||"").length===i)return a}},t.customAlphabet=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return(0,t.customRandom)(e,r,t.random)},t.nanoid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(e)).reduce((function(e,t){return e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")}),"")}},4891:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.drawImageOntoCanvasContext=t.ImageBitmapType=t.createImageBitmap=t.createCanvas=void 0;var c=u(r(86698)),l=r(1612);t.drawImageOntoCanvasContext=function(e,t){e.serializedCommands?new l.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)};var s="function"==typeof OffscreenCanvas,f=c.default;s?(t.createCanvas=function(e,t){return new OffscreenCanvas(e,t)},t.createImageBitmap=window.createImageBitmap||self.createImageBitmap,t.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):f?(t.createCanvas=function(){return nodeCreateCanvas.apply(void 0,arguments)},t.createImageBitmap=function(){var e=a(o().mark((function e(t){var r,n,i=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((i.length<=1?0:i.length-1)>0)){e.next=2;break}throw new Error("only one-argument uses of createImageBitmap are supported by the node offscreencanvas ponyfill");case 2:return r=t.toDataURL(),n=new nodeImage,e.abrupt("return",new Promise((function(e,t){n.onload=function(){return e(n)},n.onerror=t,n.src=r})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):(t.createCanvas=function(e,t){var r=new l.CanvasSequence;return{width:e,height:t,getContext:function(){return r}}},t.createImageBitmap=function(){var e=a(o().mark((function e(t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.getContext("2d"),e.abrupt("return",{height:t.height,width:t.width,serializedCommands:r.toJSON(),containsNoTransferables:!0});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.ImageBitmapType=String)},73231:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isContainedWithin=t.doesIntersect2=t.intersection2=void 0,t.intersection2=function(e,t,r,n){return t>r&&er?tr&&e=t}},42847:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableCreate=void 0;var n=r(92048),o=r(42166),i=r(35743);t.ObservableCreate=function(e,t){return n.Observable.create((function(t){try{var r=e(t);r&&r.catch&&r.catch((function(e){return t.error(e)}))}catch(e){t.error(e)}})).pipe((0,o.takeUntil)((0,i.observeAbortSignal)(t)))}},20349:(e,t)=>{"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t=0))throw new Error("invalid feature data, end less than start. end: ".concat(this.data.end," start: ").concat(this.data.start));this.data.subfeatures&&(this.subfeatures=null===(r=this.data.subfeatures)||void 0===r?void 0:r.map((function(t,r){return"function"!=typeof t.get?new e({id:t.uniqueId||"".concat(i,"-").concat(r),data:n({strand:o.data.strand},t),parent:o}):t})))}var t,r,i;return t=e,i=[{key:"fromJSON",value:function(t){return new e(n({},t))}}],(r=[{key:"get",value:function(e){return"subfeatures"===e?this.subfeatures:"parent"===e?this.parent():this.data[e]}},{key:"set",value:function(e,t){this.data[e]=t}},{key:"tags",value:function(){return Object.keys(this.data)}},{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 e=n(n({},this.data),{},{uniqueId:this.id()}),t=this.parent();t&&(e.parentId=t.id());var r=this.children();return r&&(e.subfeatures=r.map((function(e){return e.toJSON()}))),e}}])&&o(t.prototype,r),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=c},93563:(e,t,r)=>{"use strict";function n(){n=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(n,a,u,c){var l=d(e[n],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var n;a(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function r(){for(;++n=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t3&&void 0!==arguments[3]&&arguments[3]?n=t/r-e*e/(r*r):(n=t-e*e/r,r>1&&(n/=r-1)),n<0?0:Math.sqrt(n))}function f(e){return u(u({},e),{},{scoreMean:(e.scoreSum||0)/(e.featureCount||e.basesCovered||1),scoreStdDev:s(e.scoreSum,e.scoreSumSquares,e.featureCount||e.basesCovered),featureDensity:(e.featureCount||1)/e.basesCovered})}function p(){var e;return e=n().mark((function e(t,r){var o,i,a,u,s,p,d,h,y,v;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.start,i=t.end,a={scoreMin:Number.MAX_VALUE,scoreMax:Number.MIN_VALUE,scoreSum:0,scoreSumSquares:0,featureCount:0},u=!1,e.next=5,(0,c.firstValueFrom)(r.pipe((0,l.reduce)((function(e,t){var r=t.get("score"),n=t.get("summary"),o=e.scoreMax,i=e.scoreMin;return e.scoreMax=Math.max(o,n?t.get("maxScore"):r),e.scoreMin=Math.min(i,n?t.get("minScore"):r),e.scoreSum+=r,e.scoreSumSquares+=r*r,e.featureCount+=1,u=!0,e}),a)));case 5:return s=e.sent,p=s.scoreMin,d=s.scoreMax,h=s.scoreSum,y=s.scoreSumSquares,v=s.featureCount,e.abrupt("return",u?f({scoreMax:d,scoreMin:p,scoreSum:h,scoreSumSquares:y,featureCount:v,basesCovered:i-o+1}):{scoreMin:0,scoreMax:0,scoreMean:0,scoreStdDev:0,scoreSum:0,scoreSumSquares:0,featureCount:0,featureDensity:0,basesCovered:0});case 12:case"end":return e.stop()}}),e)})),p=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))},p.apply(this,arguments)}t.calcStdFromSums=s,t.rectifyStats=f,t.calcPerBaseStats=function(e,t){for(var r=e.start,n=e.end,o=[],i=t.sort((function(e,t){return e.get("start")-t.get("start")})),a=r,u=0,c=0;a=i[u].get("end");)u+=1;var l=i[u];l&&a>=l.get("start")&&a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTrackName=t.generateUnknownTrackConf=t.generateUnsupportedTrackConf=t.guessTrackType=t.guessAdapter=t.getFileName=t.makeIndexType=t.makeIndex=t.storeBlobLocation=t.setBlobMap=t.getBlobMap=t.getBlob=t.UNSUPPORTED=t.UNKNOWN=t.getParentRenderProps=t.getRpcSessionId=t.getTrackAssemblyNames=void 0;var n=r(82123),o=r(35743),i=r(2415);t.getTrackAssemblyNames=function(e){var t=(0,i.getConf)(e,"assemblyNames");if(!t){var r=(0,n.getParent)(e.configuration);if("sequence"in r)return[(0,i.readConfObject)(r,"name")]}return t},t.getRpcSessionId=function(e){for(var t,r=e;!(0,n.isRoot)(r);r=(0,n.getParent)(r))"rpcSessionId"in r&&(t=r.rpcSessionId);if(!t)throw new Error("getRpcSessionId failed, no parent node in the state tree has an `rpcSessionId` attribute");return t},t.getParentRenderProps=function(e){for(var t=(0,n.getParent)(e);!(0,n.isRoot)(t);t=(0,n.getParent)(t))if("renderProps"in t)return t.renderProps();return{}},t.UNKNOWN="UNKNOWN",t.UNSUPPORTED="UNSUPPORTED";var a={};t.getBlob=function(e){return a[e]},t.getBlobMap=function(){return a},t.setBlobMap=function(e){a=e};var u=0;t.storeBlobLocation=function(e){if(e&&"blob"in e){var t="b".concat(+Date.now(),"-").concat(u++);return a[t]=e.blob,{name:null==e?void 0:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e},t.makeIndex=function(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e},t.makeIndexType=function(e,t,r){return(null==e?void 0:e.toUpperCase().endsWith(t))?t:r},t.getFileName=function(e){var t="uri"in e?e.uri:void 0,r="localPath"in e?e.localPath:void 0,n="blobId"in e?e:void 0;return(null==n?void 0:n.name)||(null==t?void 0:t.slice(t.lastIndexOf("/")+1))||(null==r?void 0:r.slice(r.lastIndexOf("/")+1))||""},t.guessAdapter=function(e,r,n,i){if(i){var a=(0,o.getEnv)(i).pluginManager.evaluateExtensionPoint("Core-guessAdapterForLocation",(function(e,t,r){}))(e,r,n);if(a)return a}return{type:t.UNKNOWN}},t.guessTrackType=function(e,t){if(t){var r=(0,o.getSession)(t),n=(0,o.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",(function(e){}))(e);if(n)return n}return"FeatureTrack"},t.generateUnsupportedTrackConf=function(e,t,r){var n={type:"FeatureTrack",name:"".concat(e," (Unsupported)"),description:'Support not yet implemented for "'.concat(t,'"'),category:r,trackId:""};return n.trackId=(0,o.objectHash)(n),n},t.generateUnknownTrackConf=function(e,t,r){var n={type:"FeatureTrack",name:"".concat(e," (Unknown)"),description:'Could not determine track type for "'.concat(t,'"'),category:r,trackId:""};return n.trackId=(0,o.objectHash)(n),n},t.getTrackName=function(e,t){var r=(0,i.readConfObject)(e,"name");if(!r&&"ReferenceSequenceTrack"===(0,i.readConfObject)(e,"type")){var n=t.assemblies.find((function(t){return t.sequence===e}));return n?"Reference sequence (".concat((0,i.readConfObject)(n,"displayName")||(0,i.readConfObject)(n,"name"),")"):"Reference sequence"}return r}},44502:function(e,t,r){"use strict";function n(e,t){for(var r=0;r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FileLocation=t.UriLocation=t.UriLocationRaw=t.BlobLocation=t.LocalPathLocation=t.Region=t.NoAssemblyRegion=t.PropTypes=t.ElementId=void 0;var s=r(82123),f=l(r(47329)),p=r(40828),d=r(70575);t.ElementId=s.types.optional(s.types.identifier,(function(){return(0,d.nanoid)()})),t.PropTypes={Region:f.default.shape({refName:f.default.string.isRequired,start:f.default.number.isRequired,end:f.default.number.isRequired}),ConfigSchema:p.PropTypes.objectOrObservableObject,Feature:f.default.shape({get:f.default.func.isRequired,id:f.default.func.isRequired})},t.NoAssemblyRegion=s.types.model("NoAssemblyRegion",{refName:s.types.string,start:s.types.number,end:s.types.number,reversed:s.types.optional(s.types.boolean,!1)}).actions((function(e){return{setRefName:function(t){e.refName=t}}})),t.Region=s.types.compose("Region",t.NoAssemblyRegion,s.types.model({assemblyName:s.types.string})),t.LocalPathLocation=s.types.model("LocalPathLocation",{locationType:s.types.literal("LocalPathLocation"),localPath:s.types.string}),t.BlobLocation=s.types.model("BlobLocation",{locationType:s.types.literal("BlobLocation"),name:s.types.string,blobId:s.types.string}),t.UriLocationRaw=s.types.model("UriLocation",{locationType:s.types.literal("UriLocation"),uri:s.types.string,baseUri:s.types.maybe(s.types.string),internetAccountId:s.types.maybe(s.types.string),internetAccountPreAuthorization:s.types.maybe(s.types.model("InternetAccountPreAuthorization",{internetAccountType:s.types.string,authInfo:s.types.frozen()}))}),t.UriLocation=s.types.snapshotProcessor(t.UriLocationRaw,{postProcessor:function(e){var t=e.baseUri,r=c(e,o);return t?e:r}}),t.FileLocation=s.types.snapshotProcessor(s.types.union(t.LocalPathLocation,t.UriLocation,t.BlobLocation),{preProcessor:function(e){if(e){var t=e.locationType,r=c(e,i);if(!t){var n=r.uri,o=r.localPath,a=r.blob,l="";return void 0!==n?l="UriLocation":void 0!==o?l="LocalPathLocation":void 0!==a&&(l="BlobLocation"),u(u({},r),{},{locationType:l})}return e}}})},43757:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},54754:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}Object.defineProperty(t,"__esModule",{value:!0}),t.whenPresent=t.when=void 0;var a=r(72161),u=r(61017);function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.timeout,n=t.signal,o=t.name;return new Promise((function(t,i){var c,l=!1,s=(0,a.when)(e),f=function(){};r&&(c=setTimeout((function(){l||(l=!0,s.cancel(),i(new Error("timed out waiting for ".concat(o||"whenPresent"))))}),r),f=function(){return c&&clearTimeout(c)}),n&&n.addEventListener("abort",(function(){l||(l=!0,s.cancel(),f(),i((0,u.makeAbortError)()))})),s.then((function(){l||(l=!0,f(),t(!0))})).catch((function(e){l||(l=!0,f(),i(e))}))}))}function l(){var e;return e=o().mark((function e(t){var r,n=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,c((function(){return null!=t()}),r);case 3:return e.abrupt("return",t());case 4:case"end":return e.stop()}}),e)})),l=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))},l.apply(this,arguments)}t.when=c,t.whenPresent=function(e){return l.apply(this,arguments)}},42065:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(63313),o=r.n(n),i=r(35127),a=r(97648),u=r(67016),c=r(60285),l=(0,r(76835).makeStyles)()({content:{minWidth:800}});function s(e){var t=e.open,r=e.version,n=e.onClose,s=l().classes;return o().createElement(c.Dialog,{open:t,onClose:n,maxWidth:"xl",title:"JBrowse v".concat(r)},o().createElement(i.Z,{className:s.content},o().createElement(a.Z,null,"JBrowse is a GMOD project © 2019-2021, The Evolutionary Software Foundation"),o().createElement(a.Z,null,"Here are some resources and documentation. Please report the version number above when asking questions. Thanks!"),o().createElement("ul",null,o().createElement("li",null,o().createElement(u.Z,{href:"https://github.com/GMOD/jbrowse-components/discussions",target:"_blank",rel:"noopener noreferrer"},"Question & answer forum")),o().createElement("li",null,o().createElement(u.Z,{href:"https://github.com/GMOD/jbrowse-components/issues/new/choose",target:"_blank",rel:"noopener noreferrer"},"Report a bug")),o().createElement("li",null,o().createElement(u.Z,{href:"https://jbrowse.org/jb2/docs/user_guide",target:"_blank",rel:"noopener noreferrer"},"User guide")),o().createElement("li",null,o().createElement(u.Z,{href:"https://jbrowse.org/jb2/docs/",target:"_blank",rel:"noopener noreferrer"},"Documentation")))))}},60901:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>Y});var n=r(63313),o=r.n(n),i=r(67016),a=r(82015),u=r(40828),c=r(90659),l=r.n(c),s=r(76990),f=r.n(s),p=r(7734),d=r(35743);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function y(){y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==h(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=p;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function v(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function m(e,t){return b.apply(this,arguments)}function b(){var e;return e=y().mark((function e(t,r){var n,o;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,d.getSession)(r),o=r.view,e.prev=2,!o){e.next=8;break}return e.next=6,o.navToLocString(t);case 6:e.next=9;break;case 8:throw new Error("No view associated with this view anymore");case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(2),console.error(e.t0),n.notify("".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[2,11]])})),b=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){v(i,n,o,a,u,"next",e)}function u(e){v(i,n,o,a,u,"throw",e)}a(void 0)}))},b.apply(this,arguments)}var g=r(97648),w=r(80511);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function x(){x=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(w=E);var j=g.prototype=m.prototype=Object.create(w);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==S(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function O(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r100?o().createElement(o().Fragment,null,o().createElement("button",{type:"button",onClick:function(){l()(f),s(!0),setTimeout((function(){return s(!1)}),700)}},c?"Copied to clipboard":"Copy"),o().createElement("button",{type:"button",onClick:function(){return a((function(e){return!e}))}},i?"Show less":"Show more"),o().createElement("div",null,i?f:"".concat(f.slice(0,100),"..."))):o().createElement("div",null,f)}function $(e){var t=e.locString,r=e.model;return o().createElement(i.Z,{onClick:function(e){e.preventDefault(),m(t,r)},href:"#"},t)}const Y=(0,u.observer)((function(e){var t=e.model,r=f()(t.featureData),n=function(e,t){var r;return(null===(r=t.tags)||void 0===r?void 0:r.SA)||t.SA}(0,r);return o().createElement(a.Z,{"data-testid":"alignment-side-drawer"},o().createElement(p.FeatureDetails,G(G({},e),{},{omit:V,descriptions:G(G({},W),{},{tags:W}),feature:r,formatter:function(e,r){return"next_segment_position"===r?o().createElement($,{model:t,locString:e}):o().createElement(q,{value:e})}})),n?o().createElement(k,{model:t,tag:n}):null,void 0!==r.flags?o().createElement(D,G({feature:r},e)):null)}))},41661:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>_});var n=r(23411),o=r(20410),i=r(35743),a=r(76743),u=r(42847),c=r(90254),l=r(71381),s=r(80511);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function x(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function O(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){x(i,n,o,a,u,"next",e)}function u(e){x(i,n,o,a,u,"throw",e)}a(void 0)}))}}function E(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>_n});var n=r(33998),o=r(80365).Buffer;function i(e){return o.from((0,n.inflate)(e))}var a=r(40661),u=r.n(a),c=r(94877),l=r.n(c),s=r(66754),f=r.n(s);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(e,t){for(var r=0;r>n)+(e&(1<>o)+(e&(1<1&&void 0!==arguments[1]?arguments[1]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._buffer=t,this._position=r,this.length=t.length}var t,r;return t=e,(r=[{key:"get",value:function(){var e=this._buffer[this._position];return this._position+=1,e}},{key:"getByte",value:function(){return this.get()}},{key:"getByteAt",value:function(e){return this._buffer[e]}},{key:"position",value:function(){return this._position}},{key:"put",value:function(e){return this._buffer[this._position]=e,this._position+=1,e}},{key:"putAt",value:function(e,t){return this._buffer[e]=t,t}},{key:"setPosition",value:function(e){return this._position=e,e}},{key:"getInt",value:function(){var e=this._buffer.readInt32LE(this._position);return this._position+=4,e}},{key:"remaining",value:function(){return this._buffer.length-this._position}}])&&G(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),H=r(2858),V=(new H._).itf8(),W={parser:(new H._).string("magic",{length:4}).uint8("majorVersion").uint8("minorVersion").string("fileId",{length:20,stripNull:!0}),maxLength:26},q={parser:(new H._).uint8("compressionMethod",{formatter:function(e){var t=["raw","gzip","bzip2","lzma","rans","rans4x16","arith","fqzcomp","tok3"][e];if(!t)throw new Error("compression method number ".concat(e," not implemented"));return t}}).uint8("contentType",{formatter:function(e){var t=["FILE_HEADER","COMPRESSION_HEADER","MAPPED_SLICE_HEADER","UNMAPPED_SLICE_HEADER","EXTERNAL_DATA","CORE_DATA"][e];if(!t)throw new Error("invalid block content type id ".concat(e));return t}}).itf8("contentId").itf8("compressedSize").itf8("uncompressedSize"),maxLength:17},$={parser:(new H._).uint32("crc32"),maxLength:4},Y=(new H._).itf8("size").buffer("ents",{length:"size",formatter:function(e){function t(t,r){for(var n=e.toString("utf8",t,r),o=[],i=0;io&&n.push(t(o,r)),n}}),K=(new H._).uint8(null,{formatter:function(e){return!!e}}),J=(new H._).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new H._).string("key",{length:2,stripNull:!1}).choice("value",{tag:"key",choices:{MI:K,UI:K,PI:K,RN:K,AP:K,RR:K,SM:(new H._).array(null,{type:"uint8",length:5}),TD:(new H._).nest(null,{type:Y,formatter:function(e){return e.ents}})}})});function X(e){for(var t={},r=0;r=3?(r=r.ltf8("recordCounter"),t+=9):2===e&&(r=r.itf8("recordCounter"),t+=5),r=r.itf8("numBlocks").itf8("numContentIds").array("contentIds",{type:V,length:"numContentIds"}),t+=10,e>=2&&(r=r.array("md5",{type:"uint8",length:16}),t+=16),{parser:r,maxLength:function(e){return t+5*e}}},cramMappedSliceHeader:function(e){var t=(new H._).itf8("refSeqId").itf8("refSeqStart").itf8("refSeqSpan").itf8("numRecords"),r=20;return e>=3?(t=t.ltf8("recordCounter"),r+=9):2===e&&(t=t.itf8("recordCounter"),r+=5),t=t.itf8("numBlocks").itf8("numContentIds").array("contentIds",{type:V,length:"numContentIds"}).itf8("refBaseBlockId"),r+=15,e>=2&&(t=t.array("md5",{type:"uint8",length:16}),r+=16),{parser:t,maxLength:function(e){return r+5*e}}},cramEncoding:function(e){return{parser:(new H._).namely("cramEncoding").itf8("codecId").itf8("parametersBytes").choice("parameters",{tag:"codecId",choices:{0:new H._,1:(new H._).itf8("blockContentId"),2:(new H._).itf8("offset").itf8("M"),3:H._.start().itf8("numCodes").array("symbols",{length:"numCodes",type:V}).itf8("numLengths").array("bitLengths",{length:"numLengths",type:V}),4:H._.start().nest("lengthsEncoding",{type:"cramEncoding"}).nest("valuesEncoding",{type:"cramEncoding"}),5:(new H._).uint8("stopByte").itf8("blockContentId"),6:(new H._).itf8("offset").itf8("length"),7:(new H._).itf8("offset").itf8("K"),8:(new H._).itf8("offset").itf8("log2m"),9:(new H._).itf8("offset")}})}},cramDataSeriesEncodingMap:function(e){return(new H._).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new H._).string("key",{length:2,stripNull:!1}).nest("value",{type:this.cramEncoding(e).parser})})},cramTagEncodingMap:function(e){return(new H._).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new H._).itf8("key",{formatter:function(e){return String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)}}).nest("value",{type:this.cramEncoding(e).parser})})},cramCompressionHeader:function(e){var t=new H._;return{parser:t=t.nest("preservation",{type:J,formatter:X}).nest("dataSeriesEncoding",{type:this.cramDataSeriesEncodingMap(e),formatter:X}).nest("tagEncoding",{type:this.cramTagEncodingMap(e),formatter:X})}},cramContainerHeader1:function(e){var t=(new H._).int32("length").itf8("refSeqId").itf8("refSeqStart").itf8("alignmentSpan").itf8("numRecords"),r=24;return e>=3?(t=t.ltf8("recordCounter"),r+=9):2===e&&(t=t.itf8("recordCounter"),r+=5),e>1&&(t=t.ltf8("numBases"),r+=9),{parser:t=t.itf8("numBlocks").itf8("numLandmarks"),maxLength:r+=10}},cramContainerHeader2:function(e){var t=(new H._).itf8("numLandmarks").array("landmarks",{type:(new H._).itf8(),length:"numLandmarks"}),r=0;return e>=3&&(t=t.uint32("crc32"),r=4),{parser:t,maxLength:function(e){return 5+5*e+r}}}};function re(e){var t=Object.assign({},Q);return Object.keys(te).forEach((function(r){t[r]=te[r](e)})),t}var ne=r(36738),oe=r.n(ne),ie=r(59243),ae=r.n(ie);function ue(e){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ue(e)}function ce(e){var t="function"==typeof Map?new Map:void 0;return ce=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return le(e,arguments,pe(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),fe(r,e)},ce(e)}function le(e,t,r){return le=se()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&fe(o,r.prototype),o},le.apply(null,arguments)}function se(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function fe(e,t){return fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fe(e,t)}function pe(e){return pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pe(e)}var de=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fe(e,t)}(i,e);var t,r,n,o=(r=i,n=se(),function(){var e,t=pe(r);if(n){var o=pe(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ue(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(ce(Error));function he(e,t,r){var n=0;if(t.bytePosition+(7-t.bitPosition+r)/8>e.length)throw new de("read error during decoding. the file seems to be truncated.");for(var o=r;o;o--)n<<=1,n|=e[t.bytePosition]>>t.bitPosition&1,t.bitPosition-=1,t.bitPosition<0&&(t.bytePosition+=1),t.bitPosition&=7;return n}function ye(e){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(e)}function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function me(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=t.parse(e),i=o.offset;return me(me({},o.result),{},{_endPosition:i+n,_size:i-r})}function ge(e,t){var r=e.prototype[t],n="_memo_".concat(t);e.prototype[t]=function(){var e=this;if(!(n in this)){var t=r.call(this);this[n]=t,Promise.resolve(t).catch((function(){delete e[n]}))}return this[n]}}function we(e){return ae()(e.toUpperCase().replace(/[^\x21-\x7e]/g,""))}const Se=1,xe=2,Oe=4,Ee=8,je=1,Pe=2,ke=4,_e=8,Ce=16,Le=32,Te=64,Ae=128,Ie=256,Re=512,Me=1024,Ne=2048;var Fe=r(16126),Ze=r.n(Fe);function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}function Be(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{var o=function(){var e,n,o=(e=t.value,n=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,n)||ze(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];r["is"+a]=function(e){return!!(e&i)},r["set"+a]=function(e){return e|i}};for(n.s();!(t=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}return r}var Ve=He([[1,"Paired"],[2,"ProperlyPaired"],[4,"SegmentUnmapped"],[8,"MateUnmapped"],[16,"ReverseComplemented"],[32,"MateReverseComplemented"],[64,"Read1"],[128,"Read2"],[256,"Secondary"],[512,"FailedQc"],[1024,"Duplicate"],[2048,"Supplementary"]]),We=He([[1,"PreservingQualityScores"],[2,"Detached"],[4,"WithMateDownstream"],[8,"DecodeSequenceAsStar"]]),qe=He([[1,"OnNegativeStrand"],[2,"Unmapped"]]),$e=function(){function e(t){var r=t.flags,n=t.cramFlags,o=t.readLength,i=t.mappingQuality,a=t.lengthOnRef,u=t.qualityScores,c=t.mateRecordNumber,l=t.readBases,s=t.readFeatures,f=t.mateToUse,p=t.readGroupId,d=t.readName,h=t.sequenceId,y=t.uniqueId,v=t.templateSize,m=t.alignmentStart,b=t.tags;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=r,this.cramFlags=n,this.readLength=o,this.mappingQuality=i,this.lengthOnRef=a,this.qualityScores=u,l&&(this.readBases=l),this.readGroupId=p,this.readName=d,this.sequenceId=h,this.uniqueId=y,this.templateSize=v,this.alignmentStart=m,this.tags=b,s&&(this.readFeatures=s),f&&(this.mate={flags:f.mateFlags,readName:f.mateReadName,sequenceId:f.mateSequenceId,alignmentStart:f.mateAlignmentStart}),c&&(this.mateRecordNumber=c)}var t,r;return t=e,(r=[{key:"isPaired",value:function(){return!!(this.flags&je)}},{key:"isProperlyPaired",value:function(){return!!(this.flags&Pe)}},{key:"isSegmentUnmapped",value:function(){return!!(this.flags&ke)}},{key:"isMateUnmapped",value:function(){return!!(this.flags&_e)}},{key:"isReverseComplemented",value:function(){return!!(this.flags&Ce)}},{key:"isMateReverseComplemented",value:function(){return!!(this.flags&Le)}},{key:"isRead1",value:function(){return!!(this.flags&Te)}},{key:"isRead2",value:function(){return!!(this.flags&Ae)}},{key:"isSecondary",value:function(){return!!(this.flags&Ie)}},{key:"isFailedQc",value:function(){return!!(this.flags&Re)}},{key:"isDuplicate",value:function(){return!!(this.flags&Me)}},{key:"isSupplementary",value:function(){return!!(this.flags&Ne)}},{key:"isDetached",value:function(){return!!(this.cramFlags&xe)}},{key:"hasMateDownStream",value:function(){return!!(this.cramFlags&Oe)}},{key:"isPreservingQualityScores",value:function(){return!!(this.cramFlags&Se)}},{key:"isUnknownBases",value:function(){return!!(this.cramFlags&Ee)}},{key:"getReadBases",value:function(){if(!this.readBases&&this._refRegion){var e=function(e,t){if(!e.lengthOnRef&&!e.readLength)return null;if(e.isUnknownBases())return null;var r=e.alignmentStart-t.start;if(!e.readFeatures)return t.seq.substr(r,e.lengthOnRef).toUpperCase();for(var n="",o=r,i=0;n.lengththis.mate.alignmentStart&&i>0&&(i=-i),i>0?(o[0]=e,o[1]=r,o[2]=t,o[3]=n):(o[2]=e,o[3]=r,o[0]=t,o[1]=n),o.join("")}return null}},{key:"addReferenceSequence",value:function(e,t){this.readFeatures&&this.readFeatures.forEach((function(r){"X"===r.code&&function(e,t,r,n){if(t){var o=n.refPos-t.start,i=t.seq.charAt(o);i&&(n.ref=i);var a=Ue[i];void 0===a&&(a=4);var u=r.substitutionMatrix[a][n.data];u&&(n.sub=u)}}(0,e,t,r)})),!this.readBases&&e.start<=this.alignmentStart&&e.end>=this.alignmentStart+(this.lengthOnRef||this.readLength)-1&&(this._refRegion=e)}},{key:"toJSON",value:function(){var e=this,t={};return Object.keys(this).forEach((function(r){"_"!==r.charAt(0)&&(t[r]=e[r])})),t.readBases=this.getReadBases(),t}}])&&Be(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ye(e,t){if(e){if("string"==typeof e)return Ke(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ke(e,t):void 0}}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&-2===n.parsedContent.refSeqId?t("RI"):n.parsedContent.refSeqId;var p=t("RL"),d=t("AP");r.APdelta&&(d+=a.lastAlignmentStart),a.lastAlignmentStart=d;var h,y,v,m,b=t("RG");if(r.readNamesIncluded&&(h=Je(t("RN"))),We.isDetached(f)){var g,w=t("MF");r.readNamesIncluded||(h=g=Je(t("RN")));var S=t("NS"),x=t("NP");(w||S>-1)&&(y={mateFlags:w,mateSequenceId:S,mateAlignmentStart:x,mateReadName:g}),v=t("TS"),qe.isUnmapped(w)&&(s=Ve.setMateUnmapped(s)),qe.isOnNegativeStrand(w)&&(s=Ve.setMateReverseComplemented(s))}else We.isWithMateDownstream(f)&&(m=t("NF")+c+1);var O=t("TL");if(O<0)throw new j("invalid TL index");for(var E,P,k,_,C={},L=r.getTagNames(O),T=L.length,A=0;A1?"SC":"IN"],X:["number","BS"],D:["number","DL"],I:["string","IN"],i:["character","BA"],b:["string","BB"],q:["numArray","QQ"],Q:["number","QS"],H:["number","HC"],P:["number","PD"],N:["number","RS"]}[s];if(!p)throw new j('invalid read feature code "'.concat(s,'"'));var d=c(p),h={B:["number","QS"]}[s];h&&(d=[d,c(h)]);var y=i+=f,v=a+=f;"D"===s||"N"===s?a+=d:"I"===s||"S"===s?a-=d.length:"i"===s&&(a-=1),u[l]={code:s,pos:y,refPos:v,data:d}}return u}(d,G,t,0,u)),P=p,E){var U,H=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ye(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(E);try{for(H.s();!(U=H.n()).done;){var V=U.value,W=V.code,q=V.data;"D"===W||"N"===W?P+=q:"I"===W||"S"===W?P-=q.length:"i"===W&&(P-=1)}}catch(e){H.e(e)}finally{H.f()}}if(Number.isNaN(P)&&(console.warn("".concat(h||"".concat(l,":").concat(d)," record has invalid read features")),P=p),k=t("MQ"),We.isPreservingQualityScores(f)){_=new Array(p);for(var $=0;$<_.length;$++)_[$]=t("QS")}}return{readLength:p,sequenceId:l,cramFlags:f,flags:s,alignmentStart:d,readGroupId:b,readName:h,mateToUse:y,templateSize:v,mateRecordNumber:m,readFeatures:E,lengthOnRef:P,mappingQuality:k,qualityScores:_,readBases:Z,tags:C}}function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(){tt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==et(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function nt(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0){var o=e[r.mateRecordNumber];if(!o)throw new j("intra-slice mate record not found, this file seems malformed");n.push.apply(n,ct(t(o)))}return n}(r),o=n.map((function(e){return e.alignmentStart})),i=n.map((function(e){return e.alignmentStart+e.readLength-1})),a=Math.max.apply(Math,ct(i))-Math.min.apply(Math,ct(o))+1;a>=0&&n.forEach((function(e){if(void 0!==e.templateLength)throw new j("mate pair group has some members that have template lengths already, this file seems malformed");e.templateLength=a}))}(e,0,r):function(e,t){var r=Math.min(e.alignmentStart,t.alignmentStart),n=Math.max(e.alignmentStart+e.readLength-1,t.alignmentStart+t.readLength-1)-r+1;e.templateLength=n,t.templateLength=n}(r,n)),delete r.mateRecordNumber}var ft=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.container=t,this.containerPosition=r,this.file=t.file}var t,r,n,o,i,a,u,c,l,s;return t=e,r=[{key:"getHeader",value:(s=it(tt().mark((function e(){var t,r,n,o,i;return tt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.file.getSectionParsers();case 2:return t=e.sent,e.next=5,this.container.getHeader();case 5:return r=e.sent,e.next=8,this.file.readBlock(r._endPosition+this.containerPosition);case 8:if(void 0!==(n=e.sent)){e.next=11;break}throw new Error;case 11:if("MAPPED_SLICE_HEADER"!==n.contentType){e.next=16;break}return o=be(n.content,t.cramMappedSliceHeader.parser,0,r._endPosition),e.abrupt("return",nt(nt({},n),{},{parsedContent:o}));case 16:if("UNMAPPED_SLICE_HEADER"!==n.contentType){e.next=21;break}return i=be(n.content,t.cramUnmappedSliceHeader.parser,0,r._endPosition),e.abrupt("return",nt(nt({},n),{},{parsedContent:i}));case 21:throw new j("error reading slice header block, invalid content type ".concat(n.contentType));case 22:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getBlocks",value:(l=it(tt().mark((function e(){var t,r,n,o,i;return tt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader();case 2:t=e.sent,r=t._endPosition,n=new Array(t.parsedContent.numBlocks),o=0;case 6:if(!(o=0)){e.next=19;break}return e.next=15,this.getBlockByContentId(t.refBaseBlockId);case 15:if(n=e.sent){e.next=18;break}throw new j("embedded reference specified, but reference block does not exist");case 18:return e.abrupt("return",{seq:n.data.toString("utf8"),start:t.refSeqStart,end:t.refSeqStart+t.refSeqSpan-1,span:t.refSeqSpan});case 19:if(!r.referenceRequired&&!this.file.fetchReferenceSequenceCallback){e.next=28;break}if(this.file.fetchReferenceSequenceCallback){e.next=22;break}throw new Error("reference sequence not embedded, and seqFetch callback not provided, cannot fetch reference sequence");case 22:return e.next=24,this.file.fetchReferenceSequenceCallback(t.refSeqId,t.refSeqStart,t.refSeqStart+t.refSeqSpan-1);case 24:if((o=e.sent).length===t.refSeqSpan){e.next=27;break}throw new k("seqFetch callback returned a reference sequence of the wrong length");case 27:return e.abrupt("return",{seq:o,start:t.refSeqStart,end:t.refSeqStart+t.refSeqSpan-1,span:t.refSeqSpan});case 28:return e.abrupt("return",void 0);case 29:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getAllRecords",value:function(){return this.getRecords((function(){return!0}))}},{key:"_fetchRecords",value:(o=it(tt().mark((function e(){var t,r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b,g,w=this;return tt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.file.getDefinition();case 2:return t=e.sent,r=t.majorVersion,e.next=6,this.container.getCompressionScheme();case 6:if(void 0!==(n=e.sent)){e.next=9;break}throw new Error;case 9:return e.next=11,this.getHeader();case 11:if(void 0!==(o=e.sent)){e.next=14;break}throw new Error;case 14:return e.next=16,this._getBlocksContentIdIndex();case 16:if(i=e.sent,!(r>1&&this.file.options.checkSequenceMD5&&ee(o.parsedContent)&&o.parsedContent.refSeqId>=0&&"0000000000000000"!==o.parsedContent.md5.join(""))){e.next=27;break}return e.next=20,this.getReferenceRegion();case 20:if(!(a=e.sent)){e.next=27;break}if(u=a.seq,c=a.start,l=a.end,s=we(u),f=o.parsedContent.md5.map((function(e){return(e<16?"0":"")+e.toString(16)})).join(""),s===f){e.next=27;break}throw new j("MD5 checksum reference mismatch for ref ".concat(o.parsedContent.refSeqId," pos ").concat(c,"..").concat(l,". recorded MD5: ").concat(f,", calculated MD5: ").concat(s));case 27:return e.next=29,this.getCoreDataBlock();case 29:p=e.sent,d={lastAlignmentStart:ee(o.parsedContent)?o.parsedContent.refSeqStart:0,coreBlock:{bitPosition:7,bytePosition:0},externalBlocks:{map:new Map,getCursor:function(e){var t=this.map.get(e);return void 0===t&&(t={bitPosition:7,bytePosition:0},this.map.set(e,t)),t}}},h=function(e){var t=n.getCodecForDataSeries(e);if(!t)throw new j("no codec defined for ".concat(e," data series"));return t.decode(w,p,i,d)},y=new Array(o.parsedContent.numRecords),v=0;case 34:if(!(v=0&&st(y,b,y[b],y[g]);return e.abrupt("return",y);case 54:case"end":return e.stop()}}),e,this,[[35,40]])}))),function(){return o.apply(this,arguments)})},{key:"getRecords",value:(n=it(tt().mark((function e(t){var r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b=this;return tt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.container.filePosition+this.containerPosition,(n=this.file.featureCache.get(r.toString()))||(n=this._fetchRecords(),this.file.featureCache.set(r.toString(),n)),e.next=5,n;case 5:if(o=e.sent,!(i=o.filter(t)).length||!this.file.fetchReferenceSequenceCallback){e.next=23;break}return e.next=10,this.getHeader();case 10:if(!ee((a=e.sent).parsedContent)||!(a.parsedContent.refSeqId>=0||-2===a.parsedContent.refSeqId)){e.next=23;break}return u=a.parsedContent.refSeqId>=0?a.parsedContent.refSeqId:void 0,e.next=15,this.container.getCompressionScheme();case 15:if(void 0!==(c=e.sent)){e.next=18;break}throw new Error;case 18:for(l={},s=0;sp.end&&(p.end=d),i[s].alignmentStarte.length)&&(t=e.length);for(var r=0,n=new Array(t);r>1)&1431655765))+(a>>2&858993459))+(a>>4)&252645135)>>24>l)throw new j("Symbol out of range");e.codes[n]=o}))}))}},{key:"buildCaches",value:function(){this.sortedCodes=Object.values(this.codes).sort((function(e,t){return e.bitLength-t.bitLength||e.bitCode-t.bitCode})),this.sortedByValue=Object.values(this.codes).sort((function(e,t){return e.value-t.value})),this.sortedValuesByBitCode=this.sortedCodes.map((function(e){return e.value})),this.sortedBitCodes=this.sortedCodes.map((function(e){return e.bitCode})),this.sortedBitLengthsByBitCode=this.sortedCodes.map((function(e){return e.bitLength}));var e,t=Math.max.apply(Math,function(e){if(Array.isArray(e))return bt(e)}(e=this.sortedBitCodes)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());this.bitCodeToValue=new Array(t+1).fill(-1);for(var r=0;r-1&&this.sortedBitLengthsByBitCode[c]===u)return this.sortedValuesByBitCode[c];for(var l=a;this.sortedCodes[l+1].bitLength===u&&le.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)throw new de("Attempted to read beyond end of buffer; this file seems truncated.");return[r,n-t]}(e.content,t.bytePosition),i=(n=2,function(e){if(Array.isArray(e))return e}(r=o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,n)||function(e,t){if(e){if("string"==typeof e)return Et(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Et(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],u=i[1];return t.bytePosition=t.bytePosition+u,a}},{key:"_decodeByte",value:function(e,t){if(t.bytePosition>=e.content.length)throw new de("attempted to read beyond end of block. this file seems truncated.");return e.content[t.bytePosition++]}}])&&jt(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(yt);function Ct(e){return Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ct(e)}function Lt(e,t){for(var r=0;r>6&3]="C",t[0][e[0]>>4&3]="G",t[0][e[0]>>2&3]="T",t[0][e[0]>>0&3]="N",t[1][e[1]>>6&3]="A",t[1][e[1]>>4&3]="G",t[1][e[1]>>2&3]="T",t[1][e[1]>>0&3]="N",t[2][e[2]>>6&3]="A",t[2][e[2]>>4&3]="C",t[2][e[2]>>2&3]="T",t[2][e[2]>>0&3]="N",t[3][e[3]>>6&3]="A",t[3][e[3]>>4&3]="C",t[3][e[3]>>2&3]="G",t[3][e[3]>>0&3]="N",t[4][e[4]>>6&3]="A",t[4][e[4]>>4&3]="C",t[4][e[4]>>2&3]="G",t[4][e[4]>>0&3]="T",t}(t.preservation.SM),this.dataSeriesEncoding=t.dataSeriesEncoding,this.tagEncoding=t.tagEncoding,this.preservation=t.preservation,this._size=t._size,this._endPosition=t._endPosition}var t,r;return t=e,(r=[{key:"getCodecForTag",value:function(e){if(!this.tagCodecCache[e]){var t=this.tagEncoding[e];t&&(this.tagCodecCache[e]=er(t,"byteArray"))}return this.tagCodecCache[e]}},{key:"getTagNames",value:function(e){return this.tagIdsDictionary[e]}},{key:"getCodecForDataSeries",value:function(e){var t=this.dataSeriesCodecCache[e];if(void 0===t){var r=this.dataSeriesEncoding[e];if(r){var n=nr[e];if(!n)throw new j("data series name ".concat(e," not defined in file compression header"));t=er(r,n),this.dataSeriesCodecCache[e]=t}}return t}},{key:"toJSON",value:function(){var e=this,t={};return Object.keys(this).forEach((function(r){/Cache$/.test(r)||(t[r]=e[r])})),t}}])&&rr(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),ir=r(80365).Buffer;function ar(e){return ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ar(e)}function ur(){ur=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==ar(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lr(e){for(var t=1;t=a)){e.next=10;break}return e.abrupt("return",void 0);case 10:return u=ir.allocUnsafe(n.maxLength),e.next=13,this.file.read(u,0,n.maxLength,t);case 13:if(d=(c=be(u,n.parser)).numLandmarks,l=-128&d?-16384&d?-2097152&d?-268435456&d?5:4:3:2:1,!(t+c.length>=a)){e.next=18;break}return console.warn("".concat(this.file,": container header at ").concat(t," indicates that the container has length ").concat(c.length,", which extends beyond the length of the file. Skipping this container.")),e.abrupt("return",void 0);case 18:return s=ir.allocUnsafe(o.maxLength(c.numLandmarks)),e.next=21,this.file.read(s,0,o.maxLength(c.numLandmarks),t+c._size-l);case 21:if(f=be(s,o.parser),!this.file.validateChecksums||void 0===f.crc32){e.next=25;break}return e.next=25,this.file.checkCrc32(t,c._size+f._size-l-4,f.crc32,"container header beginning at position ".concat(t));case 25:return p=Object.assign(c,f,{_size:c._size+f._size-l,_endPosition:c._size+f._size-l+t}),e.abrupt("return",p);case 27:case"end":return e.stop()}var d}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&pr(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();"getHeader getCompressionHeaderBlock getCompressionScheme".split(" ").forEach((function(e){return ge(hr,e)}));var yr=r(46865),vr=r(93403);function mr(e,t,r){if(r)return r;if(e)return n=e,o=yr.parse(n),i=o.protocol,a=o.pathname,"file:"===i?new vr.LocalFile(unescape(function(e){if(null==e)throw new Error("Value must not be nullish.");return e}(a))):new vr.RemoteFile(n);var n,o,i,a;if(t)return new vr.LocalFile(t);throw new Error("no url, path, or filehandle provided, cannot open")}function br(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gr(e,t){if(e){if("string"==typeof e)return wr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wr(e,t):void 0}}function wr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function _r(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Cr(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){_r(i,n,o,a,u,"next",e)}function u(e){_r(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Lr(e,t){for(var r=0;r0)throw new Error("Detected big-endian machine, may be unable to run")}var t,r,n,o,a,c,s,p,d,h,y,v;return t=e,r=[{key:"read",value:function(e,t,r,n){return this.file.read(e,t,r,n)}},{key:"stat",value:function(){return this.file.stat()}},{key:"getDefinition",value:(v=Cr(kr().mark((function e(){var t,r;return kr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Or.allocUnsafe(W.maxLength),e.next=3,this.file.read(t,0,W.maxLength,0);case 3:if(2===(r=W.parser.parse(t).result).majorVersion||3===r.majorVersion){e.next=6;break}throw new E("CRAM version ".concat(r.majorVersion," not supported"));case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"getSamHeader",value:(y=Cr(kr().mark((function e(){var t,r,n,o,i;return kr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getContainerById(0);case 2:if(t=e.sent){e.next=5;break}throw new j("file contains no containers");case 5:return e.next=7,t.getFirstBlock();case 7:if(void 0!==(r=e.sent)){e.next=10;break}return e.abrupt("return",xr(""));case 10:return n=r.content,o=n.readInt32LE(0),i=n.toString("utf8",4,4+o),this.header=i,e.abrupt("return",xr(i));case 16:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"getHeaderText",value:(h=Cr(kr().mark((function e(){return kr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getSamHeader();case 2:return e.abrupt("return",this.header);case 3:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"getSectionParsers",value:(d=Cr(kr().mark((function e(){var t,r;return kr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDefinition();case 2:return t=e.sent,r=t.majorVersion,e.abrupt("return",re(r));case 5:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getContainerById",value:(p=Cr(kr().mark((function e(t){var r,n,o,i,a,u,c,l,s,f;return kr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getSectionParsers();case 2:return r=e.sent,n=r.cramFileDefinition.maxLength,e.next=6,this.file.stat();case 6:o=e.sent,i=o.size,a=r.cramContainerHeader1,c=0;case 10:if(!(c<=t)){e.next=38;break}if(!(n+a.maxLength+8>=i)){e.next=13;break}return e.abrupt("return",void 0);case 13:return u=this.getContainerAtPosition(n),e.next=16,u.getHeader();case 16:if(l=e.sent){e.next=19;break}throw new j("container ".concat(t," not found in file"));case 19:if(0!==c){e.next=34;break}n=l._endPosition,s=0;case 22:if(!(s=i)){e.next=10;break}return e.abrupt("return",void 0);case 10:return a=Or.allocUnsafe(n.maxLength),e.next=13,this.file.read(a,0,n.maxLength,t);case 13:return e.abrupt("return",be(a,n.parser,0,t));case 14:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"_parseSection",value:(o=Cr(kr().mark((function e(t,r){var n,o,i,a,u,c,l=arguments;return kr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=l.length>2&&void 0!==l[2]?l[2]:t.maxLength,!(o=l.length>3&&void 0!==l[3]?l[3]:void 0)){e.next=6;break}i=o,e.next=15;break;case 6:return e.next=8,this.file.stat();case 8:if(a=e.sent,u=a.size,!(r+n>=u)){e.next=12;break}return e.abrupt("return",void 0);case 12:return i=Or.allocUnsafe(n),e.next=15,this.file.read(i,0,n,r);case 15:if((c=be(i,t.parser,0,r))._size===n){e.next=18;break}throw new j("section read error: requested size ".concat(n," does not equal parsed size ").concat(c._size));case 18:return e.abrupt("return",c);case 19:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"_uncompress",value:function(e,t,r){if("gzip"===e)i(t).copy(r);else if("bzip2"===e){var n,o=f().array(t),a=f().header(o),u=0;do{-1!=(n=f().decompress(o,a))&&(Or.from(n).copy(r,u),u+=n.length,a-=n.length)}while(-1!=n)}else if("rans"===e)!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0===e.length)return t.fill(0),t;var n=new U(e,r),o=n.get();if(0!==o&&1!==o)throw new j("Invalid rANS order ".concat(o));if(n.getInt()!==n.remaining()-4)throw new j("Incorrect input length.");var i=n.getInt(),a=new U(t||B.allocUnsafe(i));if(a.length=128&&(t.fc[i].F&=-129,t.fc[i].F=(127&t.fc[i].F)<<8|255&e.get()),t.fc[i].C=o,Z.symbolInit(r[i],t.fc[i].C,t.fc[i].F),t.R||(t.R=new Array(C)),t.R.fill(i,o,o+t.fc[i].F),o+=t.fc[i].F,0===n&&i+1===(255&e.getByteAt(e.position()))?(i=255&e.get(),n=255&e.get()):0!==n?(n-=1,i+=1):i=255&e.get()}while(0!==i);D(o=128&&(t[o].fc[u].F&=-129,t[o].fc[u].F=(127&t[o].fc[u].F)<<8|255&e.get()),t[o].fc[u].C=a,0===t[o].fc[u].F&&(t[o].fc[u].F=C),null==r[o][u]&&(r[o][u]=new Z.RansDecSymbol),Z.symbolInit(r[o][u],t[o].fc[u].C,t[o].fc[u].F),null==t[o].R&&(t[o].R=new Array(C)),t[o].R.fill(u,a,a+t[o].fc[u].F),D((a+=t[o].fc[u].F)<=C),0===i&&u+1===(255&e.getByteAt(e.position()))?(u=255&e.get(),i=255&e.get()):0!==i?(i-=1,u+=1):u=255&e.get()}while(0!==u);0===n&&o+1===(255&e.getByteAt(e.position()))?(o=255&e.get(),n=255&e.get()):0!==n?(n-=1,o+=1):o=255&e.get()}while(0!==o)}(e,r,o),function(e,t,r,n){for(var o=t.remaining(),i=e.getInt(),a=e.getInt(),u=e.getInt(),c=e.getInt(),l=o>>2,s=0,f=l,p=2*l,d=3*l,h=0,y=0,v=0,m=0;s=3)){e.next=38;break}return e.next=27,this._parseSection(o.cramBlockCrc32,a+i.compressedSize);case 27:if(void 0!==(s=e.sent)){e.next=30;break}return e.abrupt("return",void 0);case 30:if(c.crc32=s.crc32,!this.validateChecksums){e.next=34;break}return e.next=34,this.checkCrc32(t,i._size+i.compressedSize,s.crc32,"block data");case 34:c._endPosition=s._endPosition,c._size=c.compressedSize+o.cramBlockCrc32.maxLength,e.next=40;break;case 38:c._endPosition=a+c.compressedSize,c._size=c.compressedSize;case 40:return e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&Lr(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();"getDefinition getSectionParsers getSamHeader".split(" ").forEach((function(e){return ge(Ar,e)}));const Ir=Ar;function Rr(e){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(e)}function Mr(){Mr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Rr(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Nr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||Zr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fr(e){return function(e){if(Array.isArray(e))return Dr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Zr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zr(e,t){if(e){if("string"==typeof e)return Dr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dr(e,t):void 0}}function Dr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r3&&void 0!==M[3]?M[3]:{}).viewAsPairs=i.viewAsPairs||!1,i.pairAcrossChr=i.pairAcrossChr||!1,i.maxInsertSize=i.maxInsertSize||2e5,"string"!=typeof t){e.next=6;break}throw new E("string sequence names not yet supported");case 6:return a=t,e.next=9,this.index.getEntriesForRange(a,r,n);case 9:if(u=e.sent,!((c=u.map((function(e){return e.sliceBytes})).reduce((function(e,t){return e+t}),0))>this.fetchSizeLimit)){e.next=13;break}throw new P("data size of ".concat(c.toLocaleString()," bytes exceeded fetch size limit of ").concat(this.fetchSizeLimit.toLocaleString()," bytes"));case 13:return l=function(e){return e.sequenceId===t&&e.alignmentStart<=n&&void 0!==e.lengthOnRef&&e.alignmentStart+e.lengthOnRef-1>=r},e.next=16,Promise.all(u.map((function(e){return R.getRecordsInSlice(e,l)})));case 16:if(s=e.sent,f=(o=Array.prototype).concat.apply(o,Fr(s)),!i.viewAsPairs){e.next=62;break}p={},d={},h=0;case 22:if(!(hthis.fetchSizeLimit)){e.next=57;break}throw new Error("mate data size of ".concat(T.toLocaleString()," bytes exceeded fetch size limit of ").concat(this.fetchSizeLimit.toLocaleString()," bytes"));case 57:return j.forEach((function(e){var t=R.cram.featureCache.get(e.toString());t||(t=R.getRecordsInSlice(e,(function(){return!0})),R.cram.featureCache.set(e.toString(),t)),C.push(t);var r=t.then((function(e){for(var t=[],r=0;r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function qr(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function $r(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){qr(i,n,o,a,u,"next",e)}function u(e){qr(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Yr(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r4&&21578050===t.readUInt32LE(0))throw new j("invalid .crai index file. note: file appears to be a .bai index. this is technically legal but please open a github issue if you need support");for(var r=[],n="",o=0;o=48&&i<=57||!n&&45===i)n+=String.fromCharCode(i);else if(9===i)r.push(Number.parseInt(n,10)),n="";else if(10===i)r.push(Number.parseInt(n,10)),n="",Xr(e,r),r=[];else if(13!==i&&32!==i)throw new j("invalid .crai index file")}return n&&r.push(Number.parseInt(n,10)),6===r.length&&Xr(e,r),Object.entries(e).forEach((function(t){var r=Kr(t,2),n=r[0],o=r[1];e[n]=o.sort((function(e,t){return e.start-t.start||e.span-t.span}))})),e}))}},{key:"getIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._parseCache.get("index",null,e.signal)}},{key:"hasDataForReferenceSequence",value:(o=$r(Wr().mark((function e(t){return Wr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:return e.t0=t,e.abrupt("return",!!e.sent[e.t0]);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getEntriesForRange",value:(n=$r(Wr().mark((function e(t,r,n){var o,i,a,u;return Wr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:if(e.t0=t,o=e.sent[e.t0]){e.next=6;break}return e.abrupt("return",[]);case 6:for(i=function(e){var t=e.start,o=e.start+e.span;return t>n?-1:o<=r?1:0},a=[],u=0;u=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function cn(e,t){if(e){if("string"==typeof e)return ln(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ln(e,t):void 0}}function ln(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&p&&(i+="".concat(d,"I"),d=0),u&&"M"!==a&&(i+="".concat(u).concat(a),u=0),p&&(a="M",u+=p),"b"===m){var S=w.split(","),x=String.fromCharCode.apply(String,function(e){if(Array.isArray(e))return ln(e)}(c=S)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||cn(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());o+=x,f+=x.length,u+=x.length}else"B"===m||"X"===m?(o+=g,f++,u++):"D"===m||"N"===m?(f+=w,u&&(i+="".concat(u).concat(a)),i+=w+m,u=0):"I"===m||"S"===m?(o+=w,u&&(i+="".concat(u).concat(a)),i+=w.length+m,u=0):"i"===m?(u&&(i+="".concat(u).concat(a)),d++,o+=w,u=0):"P"===m?(u&&(i+="".concat(u).concat(a)),i+="".concat(w,"P")):"H"===m&&(u&&(i+="".concat(u).concat(a)),i+="".concat(w,"H"),u=0)}}catch(e){y.e(e)}finally{y.f()}}else p=r-o.length;return o.length!==r&&(p=r-o.length,o+=l.slice(f-s,f-s+p),u&&"M"!==a&&(i+="".concat(u).concat(a),u=0),a="M",u+=p),p&&d>0&&(i+="".concat(d,"I")),u&&(i+="".concat(u).concat(a)),i}(this.record.readFeatures,this.record.alignmentStart,this.record.readLength,this.record._refRegion)}},{key:"tags",value:function(){return Object.getOwnPropertyNames(e.prototype).filter((function(e){return e.startsWith("_get_")&&"_get_mismatches"!==e&&"_get_cram_read_features"!==e})).map((function(e){return e.replace("_get_","")}))}},{key:"id",value:function(){return"".concat(this._store.id,"-").concat(this.record.uniqueId)}},{key:"get",value:function(e){var t="_get_".concat(e);if(this[t])return this[t]()}},{key:"parent",value:function(){}},{key:"children",value:function(){}},{key:"set",value:function(){}},{key:"pairedFeature",value:function(){return!1}},{key:"_get_clipPos",value:function(){var e=this.get("mismatches");if(e.length){var t=-1===this.get("strand")?e.at(-1):e[0],r=t.type,n=t.cliplen;if("softclip"===r||"hardclip"===r)return n}return 0}},{key:"toJSON",value:function(){var e=this;return pn(pn({},Object.fromEntries(this.tags().map((function(t){return[t,e.get(t)]})).filter((function(e){return void 0!==e[1]})))),{},{uniqueId:this.id()})}},{key:"_get_mismatches",value:function(){var e=this.record.readFeatures,t=this.qualRaw();return function(e,t,r){if(!e)return[];var n,o=new Array(e.length),i=0,a=0,u=0,c=0,l=t,s=un(e);try{for(s.s();!(n=s.n()).done;){var f=n.value,p=f.refPos,d=f.code,h=f.pos,y=f.data,v=f.sub,m=f.ref;if(c=u-l,l=u,c&&a>0&&(o[i++]={start:u,type:"insertion",base:"".concat(a),length:0},a=0),u=p-1-t,"X"===d)o[i++]={start:u,length:1,base:v,qual:null==r?void 0:r[h-1],altbase:null==m?void 0:m.toUpperCase(),type:"mismatch"};else if("I"===d)o[i++]={start:u,type:"insertion",base:"".concat(y.length),length:0};else if("N"===d)o[i++]={type:"skip",length:y,start:u,base:"N"};else if("S"===d){var b=y.length;o[i++]={start:u,type:"softclip",base:"S".concat(b),cliplen:b,length:1}}else if("P"===d);else if("H"===d){var g=y;o[i++]={start:u,type:"hardclip",base:"H".concat(g),cliplen:g,length:1}}else"D"===d?o[i++]={type:"deletion",length:y,start:u,base:"*"}:"b"===d||"q"===d||"B"===d||"i"===d&&a++}}catch(e){s.e(e)}finally{s.f()}return c&&a>0&&(o[i++]={start:u,type:"insertion",base:"".concat(a),length:0},a=0),o.slice(0,i)}(e,this.get("start"),t)}}])&&dn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function vn(e){return vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vn(e)}function mn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return bn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function xn(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function On(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){xn(i,n,o,a,u,"next",e)}function u(e){xn(i,n,o,a,u,"throw",e)}a(void 0)}))}}function En(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(23411);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(i,a,u,c){var l=d(e[i],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function a(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function u(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(96731),l=r(84446),s=r(93720),f=r(60285);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(51537),l=r(84446),s=r(93720),f=r(60285);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(51537),l=r(27558),s=r(5932),f=r(84446),p=r(93720),d=r(60285);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(51537),l=r(84446),s=r(93720),f=r(60285);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(51537),l=r(84446),s=r(93720),f=r(60285);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{drawFeats:()=>f});var n=r(35743),o=r(30657),i=r(80511),a=r(13400);function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(S);try{for(k.s();!(P=k.n()).done;){var _=P.value;if(1===_.length&&v){var C=_[0];if(!O||8&C.flags)for(var L=[C].concat((p=(0,i.Y1)(C.SA,C.id,C.strand,C.name),function(e){if(Array.isArray(e))return c(e)}(p)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(p)||u(p)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())).sort((function(e,t){return e.clipPos-t.clipPos})),T=0;T1e4;i&&T?(t.moveTo(C,0),t.beginPath()):(t.beginPath(),t.moveTo(C,0)),i&&T?t.strokeStyle="red":O?"insertSizeAndOrientation"===j?t.strokeStyle=(0,o.k5)(e,r,x)[0]:"orientation"===j?t.strokeStyle=(0,o.uE)(e)[0]:"insertSize"===j?t.strokeStyle=(null===(c=(0,o.Wh)(e,r,x))||void 0===c?void 0:c[0])||"grey":"gradient"===j&&(t.strokeStyle="hsl(".concat(10*Math.log10(_),",50%,50%)")):"orientation"===j||"insertSizeAndOrientation"===j?t.strokeStyle=-1===p&&1===d?"navy":1===p&&-1===d?"green":"grey":"gradient"===j&&(t.strokeStyle="hsl(".concat(10*Math.log10(_),",50%,50%)"));var A=C+2*k,I=Math.min(f+l(b),_);i?_>1e5?(s(t,C+l(b),f,"red"),s(t,L+l(b),f,"red")):T?(t.arc(C+k+l(b),0,_,0,Math.PI),t.stroke()):(t.bezierCurveTo(C+l(b),I,A,I,A+l(b),0),t.stroke()):(t.bezierCurveTo(C+l(b),I,A,I,A+l(b),0),t.stroke())}else E&&y&&s(t,E-g.offsetPx,f,"purple")}}},30801:(e,t,r)=>{"use strict";r.r(t),r.d(t,{drawFeats:()=>h});var n=r(35743),o=r(13400),i=r(2415);function a(e,t,r,n,o,i){r<0&&(e+=r,r=-r),n<0&&(t+=n,n=-n),i&&(o.fillStyle=i),o.fillRect(e,t,r,n)}function u(e,t,r,n,o,i){r<0&&(e+=r,r=-r),n<0&&(t+=n,n=-n),i&&(o.strokeStyle=i),o.strokeRect(e,t,r,n)}var c=r(30657);function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(j);try{for(k.s();!(h=k.n()).done;){var _=h.value;if(_.length>1){var C=_[0],L=_[1],T=S.getCanonicalRefName(C.refName)||C.refName,A=S.getCanonicalRefName(L.refName)||L.refName,I=null===(r=w.bpToPx({refName:T,coord:C.start}))||void 0===r?void 0:r.offsetPx,R=null===(o=w.bpToPx({refName:T,coord:C.end}))||void 0===o?void 0:o.offsetPx,M=null===(c=w.bpToPx({refName:A,coord:L.start}))||void 0===c?void 0:c.offsetPx,N=null===(s=w.bpToPx({refName:A,coord:L.end}))||void 0===s?void 0:s.offsetPx,F=0;if(void 0!==I&&void 0!==R&&void 0!==M&&void 0!==N){if(C.refName===L.refName){var Z=Math.min(C.start,L.start),D=Math.max(C.end,L.end);F=Math.abs(D-Z)}x.push({r1s:I,r1e:R,r2s:M,r2e:N,v0:C,v1:L,distance:F})}}else if(b.drawSingletons){var B=_[0],z=S.getCanonicalRefName(B.refName)||B.refName,G=null===(p=w.bpToPx({refName:z,coord:B.start}))||void 0===p?void 0:p.offsetPx,U=null===(d=w.bpToPx({refName:z,coord:B.end}))||void 0===d?void 0:d.offsetPx;if(void 0!==G&&void 0!==U){var H=Math.max(U-G,2);a(G-w.offsetPx,0,H,O,m,"#f00"),u(G-w.offsetPx,0,H,O,m,"#a00")}}}}catch(e){k.e(e)}finally{k.f()}for(var V=Math.log((0,n.max)(x.map((function(e){return e.distance})))),W=Math.max(Math.log((0,n.min)(x.map((function(e){return e.distance}))))-1,0),q=(b.height-20)/(V-W),$=0,Y=x;${"use strict";r.d(t,{Y1:()=>_,Zr:()=>P,b8:()=>O,hs:()=>g,oZ:()=>S,rp:()=>E,sB:()=>k,uv:()=>x,wK:()=>j,zl:()=>w});var n=r(35743),o=r(33777);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){return c(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||p(e,t)||u()}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e){if(Array.isArray(e))return e}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,u,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,u)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}var s=l().mark(S);function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:"").split(v).slice(0,-1)}function w(e,t,r,n,o){var i=[],a=g(e);return e&&(i=i.concat(function(e,t,r,n){for(var o=0,i=0,a=[],u=r&&t,c=0;c=w.start))break;i.start+=w.length,l++}var S=d(i.start);i.base=n[S]||"X",i.qual=null==o?void 0:o[S],i.altbase=m,s.push(i),i={start:i.start+i.length,length:0,base:"",type:"mismatch"}}else i.start+=b}}catch(e){v.e(e)}finally{v.f()}return s}(t,a,i,r,o))),i}function S(e,t){var r,n,o,i,a,u,c,f;return l().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:r=0,n=0,o=0,i=0;case 4:if(!(i=0&&j=0&&k{"use strict";r.r(t),r.d(t,{default:()=>T});var n=r(20410),o=r(20349),i=r(42847),a=r(90254),u=r(71381),c=r(33777),l=r(80511),s=r(35743);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==f(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0&&O=0&&D.5)||h&&(void 0===v||v>.5)?(l&&(w(l,i,"cov","meth"),l.ref--,l[i]--),f&&(w(f,i,"cov","meth"),f.ref--,f[i]--)):(l&&((null==H?void 0:H.some((function(e){return(0,s.doesIntersect2)(t,t+1,e.start+n,e.start+n+e.length)})))||(w(l,i,"cov","unmeth"),l.ref--,l[i])),f&&((null==H?void 0:H.some((function(e){return(0,s.doesIntersect2)(t+1,t+2,e.start+n,e.start+n+e.length)})))||(w(f,i,"cov","unmeth"),f.ref--,f[i]--))));case 4:case"end":return e.stop()}}),e)})),W=0;case 17:if(!(W=0&&tee.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function P(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function k(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){P(i,n,o,a,u,"next",e)}function u(e){P(i,n,o,a,u,"throw",e)}a(void 0)}))}}function _(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var n=k(j().mark((function n(i){var c,l,s,f,p,d;return j().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.configure();case 2:return c=n.sent,l=c.subadapter,n.next=6,(0,u.z)(l.getFeatures(e,r).pipe((0,a.q)()));case 6:return s=n.sent,n.next=9,S(s,e,r,(function(e){return t.fetchSequence(e)}));case 9:f=n.sent,p=f.bins,d=f.skipmap,p.forEach((function(r,n){var a=e.start+n;i.next(new o.default({id:"".concat(t.id,"-").concat(a),data:{score:r.total,snpinfo:r,start:a,end:a+1,refName:e.refName}}))})),Object.entries(d).forEach((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=n[0],u=n[1];i.next(new o.default({id:a,data:{type:"skip",start:u.start,end:u.end,strand:u.strand,score:u.score,xs:u.xs}}))})),i.complete();case 15:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"getMultiRegionFeatureDensityStats",value:(l=k(j().mark((function e(t,r){var n,o;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return n=e.sent,o=n.subadapter,e.abrupt("return",o.getMultiRegionFeatureDensityStats(t,r));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getRefNames",value:(n=k(j().mark((function e(){var t,r,n,o=arguments;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.configure();case 3:return r=e.sent,n=r.subadapter,e.abrupt("return",n.getRefNames(t));case 6:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"freeResources",value:function(){}}],r&&_(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),y}(n.BaseFeatureDataAdapter)},31951:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(63313),o=r.n(n),i=r(40828),a=r(51537),u=r(35127),c=r(97648),l=r(67016),s=r(82015),f=r(84446),p=r(93720),d=r(60285);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{doAfterAttach:()=>y});var n=r(35743),o=r(33777),i=r(82123);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return s.apply(this,arguments)}function s(){var e;return e=u().mark((function e(t){var r,o,a,c,l,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,n.getContainingTrack)(t),o=r.rpcSessionId,a=(0,n.getSession)(t),c=a.rpcManager,(l=(0,n.getContainingView)(t)).initialized&&!t.error&&!t.regionTooLarge){e.next=5;break}return e.abrupt("return");case 5:return t.setLoading(!0),e.next=8,c.call(o,"PileupGetReducedFeatures",{sessionId:o,regions:l.staticBlocks.contentBlocks,filterBy:(0,i.getSnapshot)(t.filterBy),adapterConfig:t.adapterConfig});case 8:s=e.sent,t.setChainData(s),t.setLoading(!1);case 11:case"end":return e.stop()}}),e)})),s=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))},s.apply(this,arguments)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==f(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,u,"next",e)}function u(e){d(i,n,o,a,u,"throw",e)}a(void 0)}))}}function y(e,t){function r(r){var n=e.ref;if(n){var o=n.getContext("2d");o&&e.chainData&&(o.clearRect(0,0,n.width,2*e.height),o.resetTransform(),o.scale(2,2),t(e,o,n.width,e.height),e.setLastDrawnOffsetPx(r.offsetPx),e.setLastDrawnBpPerPx(r.bpPerPx))}}(0,o.$X)(e,h(p().mark((function t(){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l(e);case 2:case"end":return t.stop()}}),t)}))),{delay:1e3}),(0,o.$X)(e,h(p().mark((function t(){var o;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(o=(0,n.getContainingView)(e)).bpPerPx!==e.lastDrawnBpPerPx&&r(o);case 2:case"end":return t.stop()}}),t)})))),(0,o.$X)(e,h(p().mark((function t(){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r((0,n.getContainingView)(e));case 2:case"end":return t.stop()}}),t)}))),{delay:1e3})}},30657:(e,t,r)=>{"use strict";r.d(t,{If:()=>i,Wh:()=>u,k5:()=>c,uE:()=>l,ue:()=>a,zi:()=>s});var n=r(82123),o=r(33777),i={color_fwd_strand_not_proper:"#ECC8C8",color_rev_strand_not_proper:"#BEBED8",color_fwd_strand:"#EC8B8B",color_rev_strand:"#8F8FD8",color_fwd_missing_mate:"#D11919",color_rev_missing_mate:"#1919D1",color_fwd_diff_chr:"#000",color_rev_diff_chr:"#969696",color_pair_lr:"#c8c8c8",color_pair_rr:"navy",color_pair_rl:"teal",color_pair_ll:"green",color_nostrand:"#c8c8c8",color_interchrom:"purple",color_longinsert:"red",color_shortinsert:"pink",color_unknown:"grey"},a={color_fwd_strand_not_proper:"#CA6767",color_rev_strand_not_proper:"#7272AA",color_fwd_strand:"#DC2A2A",color_rev_strand:"#4141BA",color_fwd_missing_mate:"#921111",color_rev_missing_mate:"#111192",color_fwd_diff_chr:"#000000",color_rev_diff_chr:"#696969",color_pair_lr:"#8C8C8C",color_pair_rr:"#00005A",color_pair_rl:"#005A5A",color_pair_ll:"#005A00",color_nostrand:"#8C8C8C",color_interchrom:"#5A005A",color_longinsert:"#B30000",color_shortinsert:"#FF3A5C",color_unknown:"grey"};function u(e,t,r){var n=e.refName===t.refName,o=Math.abs(e.tlen||0);return n&&o>((null==r?void 0:r.upper)||0)?[i.color_longinsert,a.color_longinsert]:n&&o<((null==r?void 0:r.lower)||0)?[i.color_shortinsert,a.color_shortinsert]:n?void 0:[i.color_interchrom,a.color_interchrom]}function c(e,t,r){return u(e,t,r)||l(e)}function l(e){var t=o.uD.fr,r=o.oL[t[e.pair_orientation||""]];return[i[r]||i.color_unknown,a[r]||a.color_unknown]}var s=n.types.maybe(n.types.model({type:n.types.string,tag:n.types.maybe(n.types.string),extra:n.types.frozen()}))},35131:(e,t,r)=>{"use strict";r.r(t),r.d(t,{renderSvg:()=>l});var n=r(63313),o=r.n(n),i=r(35743);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e,t,r){return s.apply(this,arguments)}function s(){var e;return e=u().mark((function e(t,n,a){var c,l,s,f,p,d,h,y;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=(0,i.getContainingView)(t),l=c.dynamicBlocks.totalWidthPx,s=t.height,!n.rasterizeLayers){e.next=15;break}if((f=document.createElement("canvas")).width=2*l,f.height=2*s,p=f.getContext("2d")){e.next=10;break}return e.abrupt("return");case 10:return p.scale(2,2),a(t,p,l,s),e.abrupt("return",o().createElement("image",{width:l,height:s,xlinkHref:f.toDataURL("image/png")}));case 15:return e.next=17,Promise.resolve().then(r.t.bind(r,43274,23));case 17:return d=e.sent,h=new d.default(l,s),a(t,h,l,s),u=t.id,void 0,v="undefined"==typeof jest,y="arc-clip-".concat(v?u:"jest"),e.abrupt("return",o().createElement(o().Fragment,null,o().createElement("defs",null,o().createElement("clipPath",{id:y},o().createElement("rect",{x:0,y:0,width:l,height:s}))),o().createElement("g",{dangerouslySetInnerHTML:{__html:h.getSvg().innerHTML},clipPath:"url(#".concat(y,")")})));case 22:case"end":return e.stop()}var u,v}),e)})),s=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))},s.apply(this,arguments)}},13400:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(e.chains.values());try{for(r.s();!(t=r.n()).done;)if(1&t.value[0].flags)return!0}catch(e){r.e(e)}finally{r.f()}return!1}r.d(t,{F:()=>o})},33777:(e,t,r)=>{"use strict";r.d(t,{$X:()=>S,ES:()=>g,O:()=>m,TN:()=>h,b4:()=>w,h1:()=>d,oL:()=>v,p:()=>x,uD:()=>y});var n=r(90254),o=r(71381),i=r(82123),a=r(72161);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function f(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){f(i,n,o,a,u,"next",e)}function u(e){f(i,n,o,a,u,"throw",e)}a(void 0)}))}}function d(e,t){var r=e.get("tags");return void 0!==r?r[t]:e.get(t)}function h(e,t,r){var n;return null!==(n=d(e,t))&&void 0!==n?n:d(e,r)}var y={fr:{F1R2:"LR",F2R1:"LR",F1F2:"LL",F2F1:"LL",R1R2:"RR",R2R1:"RR",R1F2:"RL",R2F1:"RL"},rf:{R1F2:"LR",R2F1:"LR",R1R2:"LL",R2R1:"LL",F1F2:"RR",F2F1:"RR",F1R2:"RL",F2R1:"RL"},ff:{F2F1:"LR",R1R2:"LR",F2R1:"LL",R1F2:"LL",R2F1:"RR",F1R2:"RR",R2R1:"RL",F1F2:"RL"}},v={LR:"color_pair_lr",LL:"color_pair_ll",RR:"color_pair_rr",RL:"color_pair_rl"};function m(e,t){return b.apply(this,arguments)}function b(){return(b=p(s().mark((function e(t,r){var i,a,u,c,f,p;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.start,u=t.end,c=t.originalRefName,f=t.refName,e.next=3,(0,o.z)(r.getFeatures(l(l({},t),{},{refName:c||f,end:u+1,start:Math.max(0,a-1)})).pipe((0,n.q)()));case 3:return p=e.sent,e.abrupt("return",null===(i=p[0])||void 0===i?void 0:i.get("seq"));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return"methylation"===e}var w={m:"rgb(255,0,0)",h:"rgb(11, 132, 165)",o:"rgb(111, 78, 129)",f:"rgb(246, 200, 95)",c:"rgb(157, 216, 102)",g:"rgb(255, 160, 86)",e:"rgb(141, 221, 208)",b:"rgb(202, 71, 47)"};function S(e,t,r){(0,i.addDisposer)(e,(0,a.autorun)(p(s().mark((function r(){return s().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,t();case 3:r.next=8;break;case 5:r.prev=5,r.t0=r.catch(0),(0,i.isAlive)(e)&&e.setError(r.t0);case 8:case"end":return r.stop()}}),r,null,[[0,5]])}))),r))}function x(){return"hsl(".concat(200*Math.random(),", 50%, 50%)")}},45063:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(31416),o=r(20410),i=r(76743),a=r(42847),u=r(85915),c=r(19830),l=r(41589);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;r0&&void 0!==k[0]?k[0]:{},r=this.pluginManager,o=this.getConf("bedLocation"),e.next=5,(0,i.openLocation)(o,r).readFile(t);case 5:if(!g(a=e.sent)){e.next=12;break}return e.next=9,(0,l.unzip)(a);case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=a;case 13:if(!((u=e.t0).length>536870888)){e.next=16;break}throw new Error("Data exceeds maximum string length (512MB)");case 16:for(c=new TextDecoder("utf8",{fatal:!0}).decode(u),s=c.split(/\n|\r\n|\r/).filter((function(e){return!!e})),f=[],p=0;p0&&void 0!==n[0]?n[0]:{},this.bedFeatures||(this.bedFeatures=this.loadDataP(t).catch((function(e){throw r.bedFeatures=void 0,e}))),e.abrupt("return",this.bedFeatures);case 3:case"end":return e.stop()}}),e,this)}))),function(){return x.apply(this,arguments)})},{key:"getRefNames",value:(S=y(d().mark((function e(){var t,r,n,o=arguments;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.features,e.abrupt("return",Object.keys(n));case 6:case"end":return e.stop()}}),e,this)}))),function(){return S.apply(this,arguments)})},{key:"getHeader",value:(w=y(d().mark((function e(){var t,r,n,o=arguments;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.header,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"getNames",value:(h=y(d().mark((function e(){var t,r,n,o,i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:if(t=e.sent,r=t.header,!(n=t.columnNames).length){e.next=7;break}return e.abrupt("return",n);case 7:return o=r.split(/\n|\r\n|\r/).filter((function(e){return!!e})),i=o.at(-1),e.abrupt("return",(null==i?void 0:i.includes("\t"))?i.slice(1).split("\t").map((function(e){return e.trim()})):void 0);case 10:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"loadFeatureIntervalTreeHelper",value:(p=y(d().mark((function e(t){var r,n,o,i,a,l,s,p,h,y,v,m,b,g,w=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:if(r=e.sent,n=r.colRef,o=r.colStart,i=r.colEnd,a=r.features,l=r.parser,s=r.scoreColumn,p=a[t]){e.next=12;break}return e.abrupt("return",void 0);case 12:return e.next=14,this.getNames();case 14:h=e.sent,y=new c.ZP,v=p.map((function(e,r){var a="".concat(w.id,"-").concat(t,"-").concat(r);return(0,u.P)(e,n,o,i,s,l,a,h)})),m=f(v);try{for(m.s();!(b=m.n()).done;)g=b.value,y.insert([g.get("start"),g.get("end")],g)}catch(e){m.e(e)}finally{m.f()}return e.abrupt("return",y);case 20:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"loadFeatureIntervalTree",value:(o=y(d().mark((function e(t){var r=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.intervalTrees[t]||(this.intervalTrees[t]=this.loadFeatureIntervalTreeHelper(t).catch((function(e){throw r.intervalTrees[t]=void 0,e}))),e.abrupt("return",this.intervalTrees[t]);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.ObservableCreate)(function(){var r=y(d().mark((function r(n){var o,i,a,u;return d().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e.start,i=e.end,a=e.refName,r.next=3,t.loadFeatureIntervalTree(a);case 3:null==(u=r.sent)||u.search([o,i]).forEach((function(e){return n.next(e)})),n.complete();case 6:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],r&&v(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(o.BaseFeatureDataAdapter);w.capabilities=["getFeatures","getRefNames"];const S=w},12139:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(31416),o=r(20410),i=r(76743),a=r(42847),u=r(63627),c=r(85915);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(){s=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function f(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){f(i,n,o,a,u,"next",e)}function u(e){f(i,n,o,a,u,"throw",e)}a(void 0)}))}}function d(e,t){for(var r=0;r0&&void 0!==r[0]?r[0]:{},e.abrupt("return",this.bed.getReferenceSequenceNames(t));case 2:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"getHeader",value:(f=p(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.bed.getHeader());case 1:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"getNames",value:(o=p(s().mark((function e(){var t,r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.columnNames.length){e.next=2;break}return e.abrupt("return",this.columnNames);case 2:return e.next=4,this.bed.getHeader();case 4:return t=e.sent,r=t.split(/\n|\r\n|\r/).filter((function(e){return!!e})),n=r.at(-1),e.abrupt("return",(null==n?void 0:n.includes("\t"))?n.slice(1).split("\t").map((function(e){return e.trim()})):void 0);case 8:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.ObservableCreate)(function(){var n=p(s().mark((function n(o){var i,a,u,l,f,p;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.bed.getMetadata();case 2:return i=n.sent,a=i.columnNumbers,u=a.ref-1,l=a.start-1,f=a.end-1,n.next=9,t.getNames();case 9:return p=n.sent,n.next=12,t.bed.getLines(e.refName,e.start,e.end,{lineCallback:function(e,r){o.next((0,c.P)(e,u,l,f,t.scoreColumn,t.parser,"".concat(t.id,"-").concat(r),p))},signal:r.signal});case 12:o.complete();case 13:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],r&&d(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),w}(o.BaseFeatureDataAdapter);v.capabilities=["getFeatures","getRefNames"];const m=v},83450:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>k,featureData:()=>E});var n=r(20410),o=r(76743),i=r(42847),a=r(35743),u=r(19830),c=r(41589);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function f(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function y(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,u,"next",e)}function u(e){y(i,n,o,a,u,"throw",e)}a(void 0)}))}}function m(e,t){for(var r=0;r0&&void 0!==S[0]?S[0]:{},r=this.pluginManager,n=this.getConf("bedpeLocation"),e.next=5,(0,o.openLocation)(n,r).readFile(t);case 5:if(!O(i=e.sent)){e.next=12;break}return e.next=9,(0,c.unzip)(i);case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=i;case 13:if(!((a=e.t0).length>536870888)){e.next=16;break}throw new Error("Data exceeds maximum string length (512MB)");case 16:for(u=new TextDecoder("utf8",{fatal:!0}).decode(a),l=u.split(/\n|\r\n|\r/).filter((function(e){return!!e})),s=[],f=0;f0&&void 0!==n[0]?n[0]:{},this.bedpeFeatures||(this.bedpeFeatures=this.loadDataP(t).catch((function(e){throw r.bedpeFeatures=void 0,e}))),e.abrupt("return",this.bedpeFeatures);case 3:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"getRefNames",value:(y=v(h().mark((function e(){var t,r,n,o,i=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.feats1,o=r.feats2,e.abrupt("return",f(new Set([].concat(f(Object.keys(n)),f(Object.keys(o))))));case 7:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"getHeader",value:(d=v(h().mark((function e(){var t,r,n,o=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.header,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getNames",value:(p=v(h().mark((function e(){var t,r,n,o,i;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:if(t=e.sent,r=t.header,!(n=t.columnNames).length){e.next=7;break}return e.abrupt("return",n);case 7:return o=r.split(/\n|\r\n|\r/).filter((function(e){return!!e})),i=o.at(-1),e.abrupt("return",(null==i?void 0:i.includes("\t"))?i.slice(1).split("\t").map((function(e){return e.trim()})):void 0);case 10:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"loadFeatureTreeP",value:(a=v(h().mark((function e(t){var r,n,o,i,a,c,l,f,p,d,y,v,m,b,g,w=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:return r=e.sent,n=r.feats1,o=r.feats2,i=n[t],a=o[t],e.next=9,this.getNames();case 9:if(c=e.sent,l=new u.ZP,f=null==i?void 0:i.map((function(e,r){return E(e,"".concat(w.id,"-").concat(t,"-").concat(r),!1,c)})),p=null==a?void 0:a.map((function(e,r){return E(e,"".concat(w.id,"-").concat(t,"-").concat(r),!0,c)})),f){d=s(f);try{for(d.s();!(y=d.n()).done;)v=y.value,l.insert([v.get("start"),v.get("end")],v)}catch(e){d.e(e)}finally{d.f()}}if(p){m=s(p);try{for(m.s();!(b=m.n()).done;)g=b.value,l.insert([g.get("start"),g.get("end")],g)}catch(e){m.e(e)}finally{m.f()}}return e.abrupt("return",l);case 16:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"loadFeatureTree",value:(n=v(h().mark((function e(t){var r=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.intervalTrees[t]||(this.intervalTrees[t]=this.loadFeatureTreeP(t).catch((function(e){throw r.intervalTrees[t]=void 0,e}))),e.abrupt("return",this.intervalTrees[t]);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var r=v(h().mark((function r(n){var o,i,a,u;return h().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e.start,i=e.end,a=e.refName,r.next=3,t.loadFeatureTree(a);case 3:null==(u=r.sent)||u.search([o,i]).forEach((function(e){return n.next(e)})),n.complete();case 6:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],r&&m(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(n.BaseFeatureDataAdapter);P.capabilities=["getFeatures","getRefNames"];const k=P},6821:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>P});var n=r(2744),o=r(31416),i=r(20410),a=r(76743),u=r(42847),c=r(20349),l=r(80454),s=r(6994),f=r(85915);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}var d=["fields"],h=["chromStart","chromEnd","chrom"];function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",y="executing",v="completed",m={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==p(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=d;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?v:h,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function g(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){g(i,n,o,a,u,"next",e)}function u(e){g(i,n,o,a,u,"throw",e)}a(void 0)}))}}function S(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.refName,o=e.start,i=e.end,a=r.signal;return(0,u.ObservableCreate)(function(){var e=w(b().mark((function e(u){var p,d,y;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.configure(r);case 3:return p=e.sent,d=p.parser,y=p.bigbed,e.next=8,y.getFeatureStream(n,o,i,{signal:a,basesPerSpan:i-o});case 8:e.sent.pipe((0,l.J)(),(0,s.U)((function(e){var r=d.parseLine("".concat(n,"\t").concat(e.start,"\t").concat(e.end,"\t").concat(e.rest),{uniqueId:e.uniqueId}),o=r.blockCount,i=r.blockSizes,a=r.blockStarts,u=r.chromStarts;if(o){var l=u||a||[],s=i,p=e.start;r.subfeatures=[];for(var y=0;y{"use strict";r.d(t,{P:()=>c,d:()=>u});var n=r(35743);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=i){var u=e.get("strand")>0?"five":"three";a.push({type:"".concat(u,"_prime_UTR"),start:n,end:i})}else if(r>n&&r=i){var c=e.get("strand")>0?"five":"three";a.push({type:"".concat(c,"_prime_UTR"),start:n,end:r},{type:"CDS",start:r,end:i})}else if(r<=n&&o>=i)a.push({type:"CDS",start:n,end:i});else if(r>n&&r0?"five":"three",s=e.get("strand")>0?"three":"five";a.push({type:"".concat(l,"_prime_UTR"),start:n,end:r},{type:"CDS",start:r,end:o},{type:"".concat(s,"_prime_UTR"),start:o,end:i})}else if(r<=n&&o>n&&o0?"three":"five";a.push({type:"CDS",start:n,end:o},{type:"".concat(f,"_prime_UTR"),start:o,end:i})}else if(o<=n){var p=e.get("strand")>0?"three":"five";a.push({type:"".concat(p,"_prime_UTR"),start:n,end:i})}}));var u=Object.fromEntries(e.tags().map((function(t){return[t,e.get(t)]})));return u.subfeatures=a,u.type="mRNA",u.uniqueId=e.id(),delete u.chromStarts,delete u.chromStart,delete u.chromEnd,delete u.chrom,delete u.blockStarts,delete u.blockSizes,delete u.blockCount,delete u.thickStart,delete u.thickEnd,new n.SimpleFeature({data:u,id:e.id()})}function c(e,t,r,o,i,c,l,s){var f=e.split("\t"),p=f[t],d=+f[r],h=r===o?1:0,y=+f[o]+h,v=s?function(e,t){return Object.fromEntries(t.split("\t").map((function(t,r){return[e[r],t]})))}(s,e):c.parseLine(e,{uniqueId:l}),m=v.blockCount,b=v.blockSizes,g=v.blockStarts,w=v.chromStarts;if(m){var S=w||g||[],x=b,O=d;v.subfeatures=[];for(var E=0;E{"use strict";r.r(t),r.d(t,{default:()=>N});var n=r(63313),o=r.n(n),i=r(40828),a=r(60285),u=r(35743),c=r(76835),l=r(23054),s=r(74141),f=r(34506),p=r.n(f),d=r(53869),h=r(88213),y=r(36653),v=r(23376),m=r(95921),b=r(62237),g=r(29240),w=r(26796),S=r(73610),x=r(99123);function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(63313),o=r.n(n),i=r(96731),a=r(97648),u=r(35127),c=r(51537),l=r(34179),s=r(27558),f=r(5932),p=r(84446),d=r(93720),h=r(60285),y=r(35743);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(){m=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==v(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function b(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Z:()=>v});var n=r(63313),o=r.n(n),i=r(40828),a=r(35743),u=r(26888),c=r(86127);function l(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rMath.PI?"1":"0";return["M"].concat(l(i),["A",t,t,"0",u,"1"],l(a)).join(" ")}var d=(0,i.observer)((function(e){var t=e.model,r=e.slice,n=e.region,i=(0,c.Z)(),u=t.radiusPx+1,s=r.endRadians,f=r.startRadians,p=(0,a.polarToCartesian)(u,f),d=(0,a.polarToCartesian)(u,s),y=(s-f)*u,v=s-f>Math.PI?"1":"0",m=(s+f)/2,b="[".concat(Number(n.regions.length).toLocaleString(),"]");return o().createElement(o().Fragment,null,o().createElement(h,{text:b,view:t,maxWidthPx:y,radians:m,radiusPx:u,title:"".concat(b," more regions"),color:i.palette.text.primary}),o().createElement("path",{d:["M"].concat(l(p),["A",u,u,"0",v,"1"],l(d)).join(" "),stroke:i.palette.text.secondary,strokeWidth:2,strokeDasharray:"2,2",fill:"none"}))})),h=(0,i.observer)((function(e){var t=e.view,r=e.text,n=e.maxWidthPx,i=e.radians,u=e.radiusPx,c=e.title,l=e.color,s=f().classes,p=(0,a.polarToCartesian)(u+5,i);return r?6.5*r.length4?(0,a.radToDeg)(i+t.offsetRadians-Math.PI/2)>=180?o().createElement("text",{x:0,y:0,className:s.rulerLabel,textAnchor:"start",dominantBaseline:"middle",transform:"translate(".concat(p,") rotate(").concat((0,a.radToDeg)(i),")"),style:{fill:l}},r,o().createElement("title",null,c||r)):o().createElement("text",{x:0,y:0,className:s.rulerLabel,textAnchor:"end",dominantBaseline:"middle",transform:"translate(".concat(p,") rotate(").concat((0,a.radToDeg)(i)+180,")"),style:{fill:l}},r,o().createElement("title",null,c||r)):null:null})),y=(0,i.observer)((function(e){var t,r=e.model,n=e.slice,i=e.region,l=(0,c.Z)(),s=r.radiusPx,f=n.endRadians,d=n.startRadians,y=(f+d)/2,v=(f-d)*s,m=(0,a.getSession)(r).assemblyManager.get(i.assemblyName);if(m&&(t=m.getRefNameColor(i.refName)),t)try{t=(0,u.makeContrasting)(t,l.palette.background.paper)}catch(e){t=l.palette.text.primary}else t=l.palette.text.primary;return o().createElement(o().Fragment,null,o().createElement(h,{text:i.refName,view:r,maxWidthPx:v,radians:y,radiusPx:s,color:t}),o().createElement("path",{d:p(n,s+1,i.start,i.end),stroke:t,strokeWidth:2,fill:"none"}))}));const v=(0,i.observer)((function(e){var t=e.model,r=e.slice;return r.region.elided?o().createElement(d,{key:(0,a.assembleLocString)(r.region.regions[0]),model:t,region:r.region,slice:r}):o().createElement(y,{key:(0,a.assembleLocString)(r.region),region:r.region,model:t,slice:r})}))},63073:(e,t,r)=>{"use strict";r.r(t),r.d(t,{renderToSvg:()=>g});var n=r(63313),o=r.n(n),i=r(84396),a=r(43695),u=r(72161),c=r(35743),l=r(60285),s=r(86127);function f(e){var t=e.width,r=e.height,n=e.shift,i=(0,s.Z)();return o().createElement("rect",{width:t+2*n,height:r,fill:(0,c.stripAlpha)(i.palette.background.default)})}var p=r(23054);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(){h=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==d(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=p;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>ze});var n=r(63313),o=r.n(n),i=r(2415),a=r(82373),u=r(70243),c=r(97648),l=r(37894),s=r(52655),f=r(76835),p=r(40828),d=r(82123),h=r(34638),y=r(66963),v=r(35743),m=r(60285),b=r(8043),g=r(51537),w=r(70774),S=r(34179),x=r(82015),O=r(74141),E=r(16363),j=r(10673),P=r(95414),k=r(84407),_=r(22546),C=r(93720),L=r(69058),T=r(75578);function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Z:()=>d});var n=r(63313),o=r.n(n),i=r(10673),a=r(51537),u=r(76835),c=r(40828);function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>b});var n=r(20410),o=r(20349),i=r(42847),a=r(2415);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=f(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function s(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rn&&f.get("start"){"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(20410),o=r(2415),i=r(69330);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=d.get("start")&&s.start<=d.get("end")?s.end=d.get("end"):(s&&t.push(s),s={refName:i,start:d.get("start"),end:d.get("end")})}catch(e){f.e(e)}finally{f.f()}s&&t.push(s)}}catch(e){r.e(e)}finally{r.f()}return t.sort((function(e,t){return e.refName.localeCompare(t.refName)})),e.abrupt("return",t);case 5:case"end":return e.stop()}var u,h}),e,this)})),s=function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){f(i,r,o,a,u,"next",e)}function u(e){f(i,r,o,a,u,"throw",e)}a(void 0)}))},function(){return s.apply(this,arguments)})},{key:"freeResources",value:function(){}}],r&&p(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(n.BaseAdapter)},98798:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var n=r(20349),o=r(42847),i=r(90254),a=r(69330),u=r(71381);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t=d.get("start")&&u.start<=d.get("end")?u.end=d.get("end"):(u&&t.push(u),u={refName:i,start:d.get("start"),end:d.get("end")})}catch(e){c.e(e)}finally{c.f()}u&&t.push(u)}}catch(e){r.e(e)}finally{r.f()}return e.abrupt("return",t);case 4:case"end":return e.stop()}var p,h}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"freeResources",value:function(){}}],r&&m(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(a.default)},8720:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(20410),o=r(76743);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{wP:()=>O,ZP:()=>E});var n=r(63313),o=r.n(n),i=r(95217),a=r(53136),u=r(2415);const c=(0,u.ConfigurationSchema)("FromConfigAdapter",{features:{type:"frozen",defaultValue:[]}},{explicitlyTyped:!0,implicitIdentifier:"adapterId"}),l=(0,u.ConfigurationSchema)("FromConfigRegionsAdapter",{features:{type:"frozen",defaultValue:[]}},{explicitlyTyped:!0,implicitIdentifier:"adapterId"}),s=(0,u.ConfigurationSchema)("FromConfigSequenceAdapter",{features:{type:"frozen",defaultValue:[]}},{explicitlyTyped:!0,implicitIdentifier:"adapterId"}),f=(0,u.ConfigurationSchema)("RefNameAliasAdapter",{location:{type:"fileLocation",defaultValue:{uri:"/path/to/my/aliases.txt",locationType:"UriLocation"}},refNameColumn:{type:"number",defaultValue:0}},{explicitlyTyped:!0});var p=r(82123),d=r(66769);const h=function(e){return p.types.model("ConfigurationEditorWidget",{id:d.ElementId,type:p.types.literal("ConfigurationEditorWidget"),target:p.types.safeReference(e.pluggableConfigSchemaType("track"))}).actions((function(e){return{setTarget:function(t){e.target=t}}}))};var y=(0,r(40828).observer)((function(e){var t=e.model;if(null==t?void 0:t.target){if(t.target.type)return o().createElement(o().Fragment,null,"".concat(t.target.type," settings"));if((0,p.isStateTreeNode)(t.target)){var r=(0,p.getType)(t.target);if(null==r?void 0:r.name)return o().createElement(o().Fragment,null,"".concat(r.name.replace("ConfigurationSchema","")," settings"))}}return o().createElement(o().Fragment,null,"Settings")}));const v=y;var m=(0,u.ConfigurationSchema)("ConfigurationEditorWidget",{}),b=(0,n.lazy)((function(){return Promise.resolve().then(r.bind(r,32971))}));function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function w(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>P});var n=r(63313),o=r.n(n),i=r(43279),a=r(79282),u=r(89498),c=r(86350),l=r(93720),s=r(35743),f=r(76835),p=r(40828),d=r(98684),h=r(60285);const y=(0,p.observer)((function(e){var t=e.connectionType,r=e.model,i=e.session,a=t.configEditorComponent||d.wP;return o().createElement(n.Suspense,{fallback:o().createElement(h.LoadingEllipses,null)},o().createElement(a,{model:{target:r},session:i}))}));var v=r(51537),m=r(74141),b=r(34179),g=r(35732);const w=(0,p.observer)((function(e){var t=e.connectionTypeChoices,r=e.connectionType,i=e.setConnectionType,a=t[0];return(0,n.useEffect)((function(){r||i(a)}),[r,a,i]),o().createElement("form",{autoComplete:"off"},r?o().createElement(v.Z,{value:r.name,label:"connectionType",helperText:r.description?o().createElement(o().Fragment,null,r.description,r.url?o().createElement(m.Z,{href:r.url,rel:"noopener noreferrer",target:"_blank"},o().createElement(g.Z,null)):null):null,select:!0,fullWidth:!0,onChange:function(e){return i(t.find((function(t){return t.name===e.target.value})))},variant:"outlined"},t.map((function(e){return o().createElement(b.Z,{key:e.name,value:e.name},e.displayName||e.name)}))):null)}));var S=r(36403);function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>ge});var n=r(63313),o=r.n(n),i=r(40828),a=r(98695),u=r(97796),c=r(34179),l=r(69058),s=r(35743),f=r(97648),p=r(43279),d=r(79282),h=r(89498),y=r(86350),v=r(93720),m=r(18130),b=r(76835),g=r(82123),w=r(2415),S=r(67016),x=r(51537),O=r(27558),E=r(5932),j=r(61169),P=r(60285),k=r(82015),_=r(10673),C=r(88696),L=r(16173),T=r(95414),A=r(84407),I=r(22546),R=r(74141),M=r(75578),N=r(11036);function F(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||D(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||D(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){if(e){if("string"==typeof e)return B(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>N});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(84446),c=r(93720),l=r(60285),s=r(11036),f=r(93534),p=r(82015),d=r(42833),h=r(43116),y=r(45475),v=r(63814),m=r(40087),b=r(74141),g=r(2415),w=r(66892),S=r(75578);const x=(0,i.observer)((function(e){var t=e.rootModel,r=e.setIsAssemblyBeingEdited,n=e.setAssemblyBeingEdited,i=t.jbrowse.assemblies;return o().createElement(f.Z,{component:p.Z},o().createElement(d.Z,null,o().createElement(h.Z,null,o().createElement(y.Z,null,o().createElement(v.Z,null,"Name"),o().createElement(v.Z,null,"Display name"),o().createElement(v.Z,null,"Aliases"),o().createElement(v.Z,null,"Actions"))),o().createElement(m.Z,null,i.map((function(e){var i=(0,g.readConfObject)(e,"name"),a=(0,g.readConfObject)(e,"displayName"),u=(0,g.readConfObject)(e,"aliases");return o().createElement(y.Z,{key:i},o().createElement(v.Z,null,i),o().createElement(v.Z,null,a),o().createElement(v.Z,null,u?u.toString():""),o().createElement(v.Z,null,o().createElement(b.Z,{"data-testid":"".concat(i,"-edit"),onClick:function(){r(!0),n(e)}},o().createElement(w.Z,{color:"primary"})),o().createElement(b.Z,{"data-testid":"".concat(i,"-delete"),onClick:function(){return function(e){t.jbrowse.removeAssemblyConf(e)}(i)}},o().createElement(S.Z,{color:"error"}))))})))))}));var O=r(51537),E=r(34179),j=r(69750);function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>St});var n=r(63313),o=r.n(n),i=r(40828);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var u,c=["children","defaultHeight","defaultWidth","disableHeight","disableWidth","nonce","onResize","style","tagName"];function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=r.head||r.getElementsByTagName("head")[0],a=r.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(r.createTextNode(n)),i.appendChild(a)}}(f),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=f.createElement("div")).className="resize-triggers";var d=f.createElement("div");d.className="expand-trigger",d.appendChild(f.createElement("div"));var h=f.createElement("div");h.className="contract-trigger",i.__resizeTriggers__.appendChild(d),i.__resizeTriggers__.appendChild(h),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",c,!0),n&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===r&&a(i)},i.__resizeTriggers__.addEventListener(n,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(s)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",c,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(n,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}(t),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}},{key:"componentWillUnmount",value:function(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.defaultHeight,e.defaultWidth,e.disableHeight),o=void 0!==r&&r,i=e.disableWidth,a=void 0!==i&&i,u=(e.nonce,e.onResize,e.style),l=void 0===u?{}:u,f=e.tagName,p=void 0===f?"div":f,d=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,c),h=this.state,y=h.height,v=h.scaledHeight,m=h.scaledWidth,b=h.width,g={overflow:"visible"},w={},S=!1;return o||(0===y&&(S=!0),g.height=0,w.height=y,w.scaledHeight=v),a||(0===b&&(S=!0),g.width=0,w.width=b,w.scaledWidth=m),(0,n.createElement)(p,s({ref:this._setRef,style:s(s({},g),l)},d),!S&&t(w))}}])&&f(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(n.Component),O=r(49775),E=r(38018),j=r(34179),P=r(76835),k=r(35743),_=r(11036);function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0}:function(){return!0},O=function e(t){for(;null!==b;){if(!x(t))return void requestIdleCallback(e,d);if(b.visited)b.visited=!1,b=null!==b.sibling?b.sibling:b.parent,w=b;else{var o=y.next(h.get(b)).value;if(void 0===o){g?g=!1:(b.isShown&&f.push(b.public.data.id),b.visited=null!==b.child,b=null!==b.child?b.child:null!==b.sibling?b.sibling:b.parent),w=b;continue}var i=n(o.data,r,g?void 0:b,l?s.get(o.data.id):void 0);p.set(i.public.data.id,i),h.set(i,o),g||w!==b?w.sibling=i:w.child=i,w=i}}S&&r.setState({order:f,records:p,updateRequest:{}})};return S?requestIdleCallback(O,d):O(),void 0!==i&&u&&r.order?r:{order:f,records:p}}(e,t,r):function(e,t){var r=e.order,n=e.records,o=t.opennessState;if("object"!==Z(o))return null;for(var i in o)if(n.has(i)){var a=o[i],u=n.get(i),c="boolean"==typeof a?{open:a}:a,l=c.open,s=c.subtreeCallback,f=void 0===s?M:s,p=M,d=M;u.isShown&&(l?function(){for(var e=r.indexOf(i),t=u;null!==t;){if(null!==t.sibling){t=t.sibling;break}t=t.parent}var n=null===t?r.length-1-e:r.indexOf(t.public.data.id)-1-e,o=[[e+1,n]];p=function(t){if(t.isShown=!t.parent||t.parent.public.isOpen&&t.parent.isShown,t.isShown){var r=o[o.length-1];r.push(t.public.data.id),32770===r.length&&o.push([e+1+32768*o.length,0])}},d=function(){for(var e=0;e0?J="positive-descending":(t.scrollLeft=1,J=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),J}return J}var Q=function(e,t){return e};function ee(e){var t,r=e.getItemOffset,o=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,u=e.getStartIndexForOffset,c=e.getStopIndexForStartIndex,l=e.initInstanceProps,s=e.shouldResetStyleCacheOnItemSizeChange,f=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=l(n.props,(0,I.Z)(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:(0,I.Z)(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=V((function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})})),n._callOnScroll=void 0,n._callOnScroll=V((function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,o=n.props,a=o.direction,u=o.itemSize,c=o.layout,l=n._getItemStyleCache(s&&u,s&&c,s&&a);if(l.hasOwnProperty(e))t=l[e];else{var f=r(n.props,e,n._instanceProps),p=i(n.props,e,n._instanceProps),d="horizontal"===a||"horizontal"===c,h="rtl"===a,y=d?f:0;l[e]=t={position:"absolute",left:h?void 0:y,right:h?y:void 0,top:d?0:f,height:d?"100%":p,width:d?p:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=V((function(e,t,r){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===o)return null;var t=n.props.direction,a=o;if("rtl"===t)switch(X()){case"negative":a=-o;break;case"positive-descending":a=i-r-o}return a=Math.max(0,Math.min(a,i-r)),{isScrolling:!0,scrollDirection:e.scrollOffset=t?e.call(null):o.id=requestAnimationFrame(n)}))})},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}(0,R.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return te(e,t),f(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffsetc.clientWidth?K():0:c.scrollHeight>c.clientHeight?K():0}this.scrollTo(a(this.props,e,t,i,this._instanceProps,u))},p.componentDidMount=function(){var e=this.props,t=e.direction,r=e.initialScrollOffset,n=e.layout;if("number"==typeof r&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===n?o.scrollLeft=r:o.scrollTop=r}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,r=e.layout,n=this.state,o=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===r)if("rtl"===t)switch(X()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,u=i.scrollWidth;i.scrollLeft=u-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&$(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,r=e.className,i=e.direction,a=e.height,u=e.innerRef,c=e.innerElementType,l=e.innerTagName,s=e.itemCount,f=e.itemData,p=e.itemKey,d=void 0===p?Q:p,h=e.layout,y=e.outerElementType,v=e.outerTagName,m=e.style,b=e.useIsScrolling,g=e.width,w=this.state.isScrolling,S="horizontal"===i||"horizontal"===h,x=S?this._onScrollHorizontal:this._onScrollVertical,O=this._getRangeToRender(),E=O[0],j=O[1],P=[];if(s>0)for(var k=E;k<=j;k++)P.push((0,n.createElement)(t,{data:f,key:d(k,f),index:k,isScrolling:b?w:void 0,style:this._getItemStyle(k)}));var _=o(this.props,this._instanceProps);return(0,n.createElement)(y||v||"div",{className:r,onScroll:x,ref:this._outerRefSetter,style:(0,A.Z)({position:"relative",height:a,width:g,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},m)},(0,n.createElement)(c||l||"div",{children:P,ref:u,style:{height:S?"100%":_,pointerEvents:w?"none":void 0,width:S?_:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],r=e[1],n=e[2],o=e[3];this._callOnItemsRendered(t,r,n,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,u=i.scrollOffset,c=i.scrollUpdateWasRequested;this._callOnScroll(a,u,c)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,r=e.overscanCount,n=this.state,o=n.isScrolling,i=n.scrollDirection,a=n.scrollOffset;if(0===t)return[0,0,0,0];var l=u(this.props,a,this._instanceProps),s=c(this.props,l,a,this._instanceProps),f=o&&"backward"!==i?1:Math.max(1,r),p=o&&"forward"!==i?1:Math.max(1,r);return[Math.max(0,l-f),Math.max(0,Math.min(t-1,s+p)),l,s]},t}(n.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var te=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},re=function(e,t,r){var n=e.itemSize,o=r.itemMetadataMap,i=r.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var u=o[i];a=u.offset+u.size}for(var c=i+1;c<=t;c++){var l=n(c);o[c]={offset:a,size:l},a+=l}r.lastMeasuredIndex=t}return o[t]},ne=function(e,t,r,n,o){for(;n<=r;){var i=n+Math.floor((r-n)/2),a=re(e,i,t).offset;if(a===o)return i;ao&&(r=i-1)}return n>0?n-1:0},oe=function(e,t){var r=e.itemCount,n=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=r&&(i=r-1),i>=0){var u=n[i];a=u.offset+u.size}return a+(r-i-1)*o},ie=ee({getItemOffset:function(e,t,r){return re(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:oe,getOffsetForIndexAndAlignment:function(e,t,r,n,o,i){var a=e.direction,u=e.height,c=e.layout,l=e.width,s="horizontal"===a||"horizontal"===c?l:u,f=re(e,t,o),p=oe(e,o),d=Math.max(0,Math.min(p-s,f.offset)),h=Math.max(0,f.offset-s+f.size+i);switch("smart"===r&&(r=n>=h-s&&n<=d+s?"auto":"center"),r){case"start":return d;case"end":return h;case"center":return Math.round(h+(d-h)/2);default:return n>=h&&n<=d?n:n0?n[o].offset:0)>=r?ne(e,t,o,0,r):function(e,t,r,n){for(var o=e.itemCount,i=1;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:new Map;e.id&&e.children.length&&t.set(e.id,e);var r,n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ye(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ye(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.children);try{for(n.s();!(r=n.n()).done;)me(r.value,t)}catch(e){n.e(e)}finally{n.f()}return t}function be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.endsWith("(Unsupported)")||e.endsWith("(Unknown)")}function ge(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=we(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function we(e,t){if(e){if("string"==typeof e)return Se(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Se(e,t):void 0}}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ze(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ge(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ge(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?u({connectionConf:e,safelyBreakConnection:c,dereferenceTypeCount:l,name:o}):c()}t&&s({name:o,connectionConf:e})}return o().createElement(o().Fragment,null,o().createElement(Te(),{menuItems:[].concat(Xe((0,k.isSessionWithAddTracks)(r)?[{label:"Add track...",onClick:function(){(0,k.isSessionModelWithWidgets)(r)&&r.showWidget(r.addWidget("AddTrackWidget","addTrackWidget",{view:t.view.id}))}}]:[]),Xe((0,k.isSessionModelWithConnections)(r)?[{label:"Turn on/off connections...",onClick:function(){return d(!0)}}]:[]),Xe((0,k.isSessionModelWithConnectionEditing)(r)?[{label:"Add connection...",onClick:function(){(0,k.isSessionModelWithWidgets)(r)&&r.showWidget(r.addWidget("AddConnectionWidget","addConnectionWidget"))}},{label:"Delete connections...",onClick:function(){return v(!0)}}]:[]),[{type:"divider"},{label:"Sort tracks by name",type:"checkbox",checked:t.activeSortTrackNames,onClick:function(){return t.setSortTrackNames(!t.activeSortTrackNames)}},{label:"Sort categories by name",type:"checkbox",checked:t.activeSortCategories,onClick:function(){return t.setSortCategories(!t.activeSortCategories)}},{type:"divider"}],Xe(t.hasAnySubcategories?[{label:"Collapse subcategories",onClick:function(){return t.collapseSubCategories()}}]:[]),[{label:"Collapse top-level categories",onClick:function(){return t.collapseTopLevelCategories()}},{label:"Expand all categories",onClick:function(){return t.expandAllCategories()}}])},o().createElement(Je.Z,null)),o().createElement(n.Suspense,{fallback:o().createElement(o().Fragment,null)},a?o().createElement(rt,{modalInfo:a,onClose:function(){return u(void 0)}}):null,l?o().createElement(nt,{handleClose:function(){return s(void 0)},deleteDialogDetails:l,session:r}):null,y?o().createElement(ot,{handleClose:function(){return v(!1)},breakConnection:m,session:r}):null,p?o().createElement(it,{handleClose:function(){return d(!1)},session:r,breakConnection:m}):null))}));var ut=r(57708);function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Z:()=>w});var n=r(63313),o=r.n(n),i=r(74141),a=r(44806),u=r(76835),c=r(40828),l=r(34506),s=r.n(l),f=r(35743),p=r(33041);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(63313),o=r.n(n),i=r(35127),a=r(68438),u=r(95414),c=r(84407),l=r(84446),s=r(93720),f=r(60285);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(63313),o=r.n(n),i=r(35127),a=r(68438),u=r(84446),c=r(93720),l=r(60285);const s=(0,r(40828).observer)((function(e){var t=e.deleteDialogDetails,r=e.session,n=e.handleClose,s=t.connectionConf,f=t.name;return o().createElement(l.Dialog,{open:!0,title:'Delete connection "'.concat(f,'"')},o().createElement(i.Z,null,o().createElement(a.Z,null,"Are you sure you want to delete this connection?")),o().createElement(u.Z,null,o().createElement(c.Z,{onClick:function(){return n()},color:"primary"},"Cancel"),o().createElement(c.Z,{variant:"contained",color:"primary",onClick:function(){var e;s&&(null===(e=r.deleteConnection)||void 0===e||e.call(r,s)),n()}},"OK")))}))},83974:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(63313),o=r.n(n),i=r(35127),a=r(97648),u=r(74141),c=r(67929),l=r(84446),s=r(93720),f=r(60285),p=r(76835),d=r(40828),h=r(2415),y=r(89120),v=(0,p.makeStyles)()((function(e){return{connectionContainer:{margin:e.spacing(4),width:500}}}));const m=(0,d.observer)((function(e){var t=e.session,r=e.handleClose,n=e.breakConnection,p=v().classes,d=t.adminMode,m=t.connections,b=t.sessionConnections;return o().createElement(f.Dialog,{open:!0,onClose:r,maxWidth:"lg",title:"Delete connections"},o().createElement(i.Z,null,o().createElement(a.Z,null,"Click the X icon to delete the connection from your config completely"),o().createElement("div",{className:p.connectionContainer},m.map((function(e){var t=(0,h.readConfObject)(e,"name");return o().createElement(a.Z,{key:"conn-".concat(t)},d||(null==b?void 0:b.includes(e))?o().createElement(u.Z,{onClick:function(){return n(e,!0)}},o().createElement(y.default,{color:"error"})):o().createElement(c.Z,{title:"Unable to delete connection in config file as non-admin user"},o().createElement(u.Z,null,o().createElement(y.default,{color:"disabled"}))),t)})),m.length?null:o().createElement(a.Z,null,"No connections found"))),o().createElement(l.Z,null,o().createElement(s.Z,{onClick:function(){return r()},variant:"contained",color:"primary"},"Close")))}))},41701:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>b});var n=r(63313),o=r.n(n),i=r(27558),a=r(5932),u=r(97648),c=r(35127),l=r(84446),s=r(93720),f=r(60285),p=r(76835),d=r(40828),h=r(2415),y=(0,p.makeStyles)()((function(e){return{connectionContainer:{width:500,margin:e.spacing(4)}}})),v=(0,d.observer)((function(e){var t,r=e.conf,n=e.session,u=e.breakConnection,c=n.connectionInstances,l=void 0===c?[]:c,s=(0,h.readConfObject)(r,"name"),f=(0,h.readConfObject)(r,"assemblyNames"),p=l.find((function(e){return s===e.name}));return o().createElement(i.Z,{key:r.connectionId,control:o().createElement(a.Z,{checked:!!p,onChange:function(){var e;p?u(r):null===(e=n.makeConnection)||void 0===e||e.call(n,r)},color:"primary"}),label:[s,f.length?"(".concat((t=f.join(","),t.length>20?"".concat(t.slice(0,20),"..."):t),")"):""].filter((function(e){return!!e})).join(" ")})})),m=(0,d.observer)((function(e){var t=e.session,r=e.breakConnection,n=y().classes;return o().createElement("div",{className:n.connectionContainer},t.connections.length?t.connections.map((function(e,n){return o().createElement("div",{key:e.name+"_"+n},o().createElement(v,{conf:e,session:t,breakConnection:r}))})):o().createElement(u.Z,null,"No connections found"))}));const b=(0,d.observer)((function(e){var t=e.session,r=e.handleClose,n=e.breakConnection;return o().createElement(f.Dialog,{open:!0,onClose:r,maxWidth:"lg",title:"Turn on/off connections"},o().createElement(c.Z,null,o().createElement(u.Z,null,"Use the checkbox to turn on/off connections"),o().createElement(m,{session:t,breakConnection:n})),o().createElement(l.Z,null,o().createElement(s.Z,{onClick:function(){return r()},variant:"contained",color:"primary"},"Close")))}))},85588:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>pe});var n=r(63313),o=r.n(n),i=r(35127),a=r(60285),u=r(40828),c=r(74141),l=r(72161),s=r(82123),f=r(61266),p=r(3449),d=r(61169),h=r(21202),y=r.n(h),v=r(34506),m=r.n(v),b=r(14398),g=r.n(b),w=r(35743),S=r(2415),x=r(9462),O=r(76835),E=r(62784),j=r(7699),P=r(69750),k=r(51537),_=r(22546),C=r(59170),L=r(26796),T=r(57708);function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function $(e,t){if(e){if("string"==typeof e)return Y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(e,t):void 0}}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r5}))}),[G,fe]),de=(0,n.useMemo)((function(){return Q(new Set(fe.flatMap((function(e){return t=e.metadata,Object.entries(t).map((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return J(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0];return"string"==typeof n[1]?o:""})).filter((function(e){return!!e}));var t})))).filter((function(e){return!!G||fe.map((function(t){return t.metadata[e]})).filter((function(e){return!!e})).length>5}))}),[G,fe]),he=(0,n.useMemo)((function(){return["name"].concat(Q(pe),Q(de))}),[pe,de]),ye=ne((0,n.useState)(te(te({name:(0,w.measureGridWidth)(fe.map((function(e){return e.name})),{maxWidth:500,stripHTML:!0})+15},Object.fromEntries(pe.map((function(e){return[e,(0,w.measureGridWidth)(fe.map((function(t){return t[e]})),{maxWidth:400,stripHTML:!0})]})))),Object.fromEntries(de.map((function(e){return[e,(0,w.measureGridWidth)(fe.map((function(t){return t.metadata[e]})),{maxWidth:400,stripHTML:!0})]}))))),2),ve=ye[0],me=ye[1],be=ne((0,n.useState)(Object.fromEntries(he.map((function(e){return[e,!0]})))),2),ge=be[0],we=be[1];(0,n.useEffect)((function(){we((function(e){return te(te({},Object.fromEntries(he.map((function(e){return[e,!0]})))),e)}))}),[he]),(0,n.useEffect)((function(){me((function(e){return te(te({name:e.name},Object.fromEntries(pe.filter((function(e){return ge[e]})).map((function(e){return[e,(0,w.measureGridWidth)(fe.map((function(t){return t[e]})),{stripHTML:!0,maxWidth:400})]})))),Object.fromEntries(de.filter((function(e){return ge[e]})).map((function(e){return[e,(0,w.measureGridWidth)(fe.map((function(t){return t.metadata[e]})),{stripHTML:!0,maxWidth:400})]}))))}))}),[de,ge,pe,G,fe]);var Se=(0,w.useDebounce)(ve,200),xe=[{field:"name",hideable:!1,renderCell:function(e){var t=e.value,r=e.id,n=e.row;return o().createElement("div",{className:u.cell},o().createElement(y(),{html:t}),o().createElement(c.Z,{onClick:function(e){return F({target:e.currentTarget,id:r,conf:n.conf})}},o().createElement(E.Z,null)))},width:null!==(t=Se.name)&&void 0!==t?t:100}].concat(Q(pe.map((function(e){var t;return{field:e,width:null!==(t=Se[e])&&void 0!==t?t:100,renderCell:function(e){var t=e.value;return o().createElement("div",{className:u.cell},t?o().createElement(y(),{html:t}):"")}}}))),Q(de.map((function(e){var t;return{field:e,width:null!==(t=Se[e])&&void 0!==t?t:100,renderCell:function(e){var t=e.value;return o().createElement("div",{className:u.cell},t?o().createElement(y(),{html:t}):"")}}})))),Oe=new Set(oe.map((function(e){return e.configuration.trackId}))),Ee=Object.entries(le).filter((function(e){return e[1].length>0})).map((function(e){var t=ne(e,2),r=t[0],n=t[1];return[r,new Set(n)]})),je=fe.filter((function(e){return Ee.every((function(t){var r=ne(t,2),n=r[0];return r[1].has(e[n])}))}));return o().createElement(o().Fragment,null,N?o().createElement(m(),{anchorEl:null==N?void 0:N.target,menuItems:(null===(r=X.getTrackActionMenuItems)||void 0===r?void 0:r.call(X,N.conf))||[],onMenuItemClick:function(e,t){t(),F(void 0)},open:!!N,onClose:function(){return F(void 0)}}):null,o().createElement(I,{setShowSparse:U,setShowFilters:W,setShowOptions:R,setFilterText:L,setUseShoppingCart:B,showFilters:V,showSparse:G,showOptions:A,filterText:C,useShoppingCart:D,model:i}),o().createElement("div",{ref:P,style:{display:"flex",overflow:"hidden",height:window.innerHeight*ce,width:window.innerWidth*ce}},o().createElement("div",{style:{height:window.innerHeight*ce,width:window.innerWidth*ce-(V?$:0)}},o().createElement(g(),{checkbox:!0,widths:Object.values(ve).map((function(e){return null!=e?e:100})),setWidths:function(e){return me(Object.fromEntries(Object.entries(ve).map((function(t,r){return[t[0],e[r]]}))))},scrollLeft:k}),o().createElement(f._$,{rows:je,columnVisibilityModel:ge,onColumnVisibilityModelChange:function(e){return we(e)},columnHeaderHeight:35,checkboxSelection:!0,disableRowSelectionOnClick:!0,keepNonExistentRowsSelected:!0,onRowSelectionModelChange:function(e){if(D){var t=(0,s.getRoot)(i),r=b.pluggableConfigSchemaType("track"),n=e.map((function(e){return(0,s.resolveIdentifier)(r,t,e)}));i.setSelection(n)}else{var o=Oe,a=new Set(e);(0,l.transaction)((function(){Q(o).filter((function(e){return!a.has(e)})).map((function(e){return h.hideTrack(e)})),Q(a).filter((function(e){return!o.has(e)})).map((function(e){return h.showTrack(e)}))}))}},rowSelectionModel:D?v.map((function(e){return e.trackId})):Q(Oe),slots:{toolbar:A?p.n:null},slotProps:{toolbar:{printOptions:{disableToolbarButton:!0}}},columns:xe,rowHeight:25})),V?o().createElement(o().Fragment,null,o().createElement(a.ResizeHandle,{vertical:!0,onDrag:function(e){return Y($-e)},style:{marginLeft:5,background:"grey",width:5}}),o().createElement("div",{style:{width:$,overflowY:"auto",overflowX:"hidden"}},o().createElement(K,{width:$-10,rows:fe,columns:xe,dispatch:se,filters:le}))):null))}));function se(e){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(e)}function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const pe=(0,u.observer)((function(e){var t=e.handleClose;return o().createElement(a.Dialog,{open:!0,onClose:t,maxWidth:"xl",title:"Faceted track selector"},o().createElement(i.Z,null,o().createElement(le,function(e){for(var t=1;t{"use strict";r.d(t,{Ak:()=>f,h6:()=>s,wB:()=>l,xO:()=>c,zL:()=>u});var n=r(2415),o=r(61169);function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e[0]===t[0])return!0;var r=new Set(e);return t.some((function(e){return r.has(e)}))}function c(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=new Set(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);return e.every((function(e){return t.has(e)}))}function l(e,t,r){var i=(0,n.readConfObject)(t,"category")||[],a=e.toLowerCase();return(0,o.getTrackName)(t,r).toLowerCase().includes(a)||!!i.filter((function(e){return e.toLowerCase().includes(a)})).length}function s(e,t){var r,n=!1,o=i(e);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.children.length?s(a.children,t)&&t.push(a.id):n=!0}}catch(e){o.e(e)}finally{o.f()}return n}function f(e,t){var r,n=i(e);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.children.length&&t.push(o.id)}}catch(e){n.e(e)}finally{n.f()}}},17420:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(63313),o=r.n(n),i=r(40828),a=r(60285),u=r(35127),c=r(68438),l=r(51537),s=r(24137),f=r(84446),p=r(93720),d=r(76835),h=r(35743),y=r(74141),v=r(66963);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(63313),o=r.n(n),i=r(35127),a=r(97648),u=r(84446),c=r(93720),l=r(60285);function s(e){var t=e.onClose,r=e.plugin;return o().createElement(l.Dialog,{open:!0,onClose:function(){return t()},title:"Remove ".concat(r)},o().createElement(i.Z,null,o().createElement(a.Z,null,"Please confirm that you want to remove ",r,"."),o().createElement(a.Z,{color:"error"},"Note: if any resources in this session still use this plugin, it may cause your session to crash")),o().createElement(u.Z,null,o().createElement(c.Z,{variant:"contained",color:"primary",onClick:function(){window.setTimeout((function(){t(r)}),500)}},"Confirm"),o().createElement(c.Z,{variant:"contained",color:"secondary",onClick:function(){t()}},"Cancel")))}},3761:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>K});var n=r(63313),o=r.n(n),i=r(97648),a=r(93720),u=r(51537),c=r(22546),l=r(74141),s=r(82373),f=r(70243),p=r(76835),d=r(40828),h=r(82123),y=r(60285),v=r(35743),m=r(66963),b=r(59170),g=r(98659),w=r(95414),S=r(67929),x=r(84407),O=r(89120),E=r(62237),j=r(44502);function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?u.filter((function(e){return e.name.toLowerCase().includes(a.toLowerCase())})).map((function(e){return o().createElement(L,{key:e.name,plugin:e,model:r})})):o().createElement(i.Z,null,"No plugins currently installed"))}));var A=r(88696),I=r(16173),R=r(67016),M=r(73317),N=r(38639),F=r(11036),Z=r(94689);function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function H(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{fetchGenomesFile:()=>b,fetchHubFile:()=>v,fetchTrackDbFile:()=>w,generateTracks:()=>j,makeLoc:()=>x,makeLoc2:()=>E,makeLocAlt:()=>O,ucscAssemblies:()=>a});var n=r(35743),o=r(76743),i=r(61169);const a="ailMel1\nallMis1\nanoCar1\nanoCar2\nanoGam1\nanoGam3\napiMel1\napiMel2\naplCal1\naptMan1\naquChr2\nbalAcu1\nbisBis1\nbosTau2\nbosTau3\nbosTau4\nbosTau6\nbosTau7\nbosTau8\nbraFlo1\ncaeJap1\ncaePb1\ncaePb2\ncaeRem2\ncaeRem3\ncalJac1\ncalJac3\ncalMil1\ncanFam1\ncanFam3\ncavPor3\ncb3\nce10\nce11\nce2\nce4\nce6\ncerSim1\nchlSab2\nchoHof1\nchrPic1\nci1\nci2\nci3\ncriGri1\ncriGriChoV1\ndanRer10\ndanRer11\ndanRer3\ndanRer4\ndanRer5\ndanRer6\ndanRer7\ndasNov3\ndipOrd1\ndm1\ndm2\ndm3\ndm6\ndp2\ndp3\ndroAna1\ndroAna2\ndroEre1\ndroGri1\ndroMoj1\ndroMoj2\ndroPer1\ndroSec1\ndroSim1\ndroVir1\ndroVir2\ndroYak1\ndroYak2\neboVir3\nechTel1\nechTel2\nequCab1\nequCab2\neriEur1\neriEur2\nfelCat3\nfelCat4\nfelCat5\nfelCat8\nfr1\nfr2\nfr3\ngadMor1\ngalGal2\ngalGal3\ngalGal4\ngalGal5\ngalGal6\ngalVar1\ngasAcu1\ngeoFor1\ngorGor3\ngorGor4\ngorGor5\nhetGla1\nhetGla2\nhg16\nhg18\nhg19\nhg38\nlatCha1\nloxAfr3\nmacEug2\nmacFas5\nmanPen1\nmelGal1\nmelGal5\nmelUnd1\nmicMur1\nmicMur2\nmm10\nmm7\nmm8\nmm9\nmonDom2\nmonDom4\nmonDom5\nmusFur1\nmyoLuc2\nnanPar1\nnasLar1\nnomLeu1\nnomLeu2\nnomLeu3\nochPri2\nochPri3\noreNil2\nornAna1\nornAna2\noryCun2\noryLat2\notoGar3\noviAri1\noviAri3\noviAri4\npanPan1\npanPan2\npanTro1\npanTro2\npanTro3\npanTro4\npanTro5\npanTro6\npapAnu2\npapHam1\npetMar1\npetMar2\nponAbe2\nponAbe3\npriPac1\nproCap1\npteVam1\nrheMac2\nrheMac3\nrheMac8\nrhiRox1\nrn4\nrn5\nrn6\nsacCer1\nsacCer2\nsacCer3\nsaiBol1\nsarHar1\nsorAra1\nsorAra2\nspeTri2\nstrPur1\nstrPur2\nsusScr11\nsusScr2\nsusScr3\ntaeGut1\ntaeGut2\ntarSyr1\ntarSyr2\ntetNig1\ntetNig2\nthaSir1\ntriMan1\ntupBel1\nturTru2\nventer1\nvicPac1\nvicPac2\nxenLae2\nxenTro1\nxenTro2\nxenTro3\nxenTro7\nxenTro9".split(/\r?\n/);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(){c=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.entries());try{var l=function(){var c,l=f(a.value,2),h=l[0],y=l[1],v=function(e){if(Array.isArray(e))return d(e)}(c=y.keys())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||p(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=new Set(["superTrack","compositeTrack","container","view"]);if(v.some((function(e){return m.has(e)})))return 1;var b=[],g=h;do{if(g=(null===(i=e.get(g))||void 0===i?void 0:i.get("parent"))||""){var w=g.split(" ");g=f(w,1)[0],b.push(e.get(g))}}while(g);b.reverse();var S=P(y,b.map((function(e){return null==e?void 0:e.get("shortLabel")})).filter((function(e){return!!e})),t,e,o);u.push(s(s({},S),{},{trackId:"ucsc-trackhub-".concat((0,n.objectHash)(S)),assemblyNames:[r]}))};for(c.s();!(a=c.n()).done;)l()}catch(e){c.e(e)}finally{c.f()}return u}function P(e,t,r,o,a){var u,c=e.get("type"),l=e.get("shortLabel")||"",s=e.get("bigDataUrl")||"",f=e.get("bigDataIndex")||"",p=(0,n.isUriLocation)(r);c||(c=null===(u=o.get(e.get("parent")||""))||void 0===u?void 0:u.get("type"));var d=(null==c?void 0:c.split(" ")[0])||"";"bam"===d&&s.toLowerCase().endsWith("cram")&&(d="cram");var h=p?x(s,r):E(s);switch(d){case"bam":return{type:"AlignmentsTrack",name:e.get("shortLabel"),description:e.get("longLabel"),category:t,adapter:{type:"BamAdapter",bamLocation:h,index:{location:p?O(f,s+".bai",r):E(f,s+".bai")}}};case"bigBarChart":case"bigChain":case"bigInteract":case"bigMaf":case"bigPsl":return{type:"FeatureTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"BigBedAdapter",bigBedLocation:h},renderer:{type:"SvgFeatureRenderer"}};case"bigBed":case"bigGenePred":case"bigNarrowPeak":return{type:"FeatureTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"BigBedAdapter",bigBedLocation:h}};case"bigWig":return{type:"QuantitativeTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"BigWigAdapter",bigWigLocation:h}};case"cram":return{type:"AlignmentsTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"CramAdapter",cramLocation:h,craiLocation:p?O(f,s+".crai",r):E(f,s+".crai"),sequenceAdapter:a}};case"peptideMapping":return(0,i.generateUnsupportedTrackConf)(l,d,t);case"vcfTabix":return{type:"VariantTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"VcfTabixAdapter",vcfGzLocation:h,index:{location:p?O(f,s+".tbi",r):E(f,s+".tbi")}}};case"hic":return{type:"HicTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"HicAdapter",hicLocation:h}};default:return(0,i.generateUnknownTrackConf)(l,d,t)}}},84929:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(20410),o=r(71381),i=r(42847),a=r(35743),u=r(90254);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;rb)){n.next=13;break}return i.complete(),n.abrupt("return");case 13:return g=s.getFeatures(p(p({},e),{},{start:m,end:b}),t),n.next=16,(0,o.z)(g.pipe((0,u.q)()));case 16:for(w=n.sent,S=(null===(c=w[0])||void 0===c?void 0:c.get("seq"))||"",x=y;x{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(51537),l=r(84446),s=r(93720),f=r(60285);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rd?o().createElement(f.ErrorMessage,{error:"It is not recommended to make the step size larger than the window size"}):null,o().createElement(c.Z,{label:"Size of sliding window (bp)",value:"".concat(d),onChange:function(e){return h(e.target.value)}}),o().createElement(c.Z,{label:"Step size of sliding window (bp)",value:"".concat(v),onChange:function(e){return m(e.target.value)}}),o().createElement(l.Z,null,o().createElement(s.Z,{variant:"contained",onClick:function(){t.setGCContentParams({windowSize:+d,windowDelta:+v}),r()}},"Submit"),o().createElement(s.Z,{variant:"contained",color:"secondary",onClick:function(){return r()}},"Cancel"))))}))},88813:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(20410),o=r(76743),i=r(42847),a=r(19830),u=r(20349),c=r(41589),l=r(52913);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==s(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function h(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r536870888)){e.next=14;break}throw new Error("Data exceeds maximum string length (512MB)");case 14:for(i=new TextDecoder("utf8",{fatal:!0}).decode(n),s=i.split(/\n|\r\n|\r/),f=[],h=0;h1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var r=m(p().mark((function r(n){var o,i,a,u,c,l;return p().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i=e.start,a=e.end,u=e.refName,r.next=4,t.loadData();case 4:c=r.sent,l=c.intervalTree,null===(o=l[u])||void 0===o||o.search([i,a]).forEach((function(e){return n.next(e)})),n.complete(),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(0),n.error(r.t0);case 13:case"end":return r.stop()}}),r,null,[[0,10]])})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"featureData",value:function(e){var t,r,n=this,o=function(e){for(var t=1;t0&&(o.subfeatures=e.child_features.flatMap((function(e){return e.map((function(e){return n.featureData(e)}))}))),delete o.child_features,delete o.data,delete o.attributes,delete o.seq_id,o}},{key:"freeResources",value:function(){}}],r&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(n.BaseFeatureDataAdapter)},8509:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var n=r(20410),o=r(96585),i=r(76743),a=r(42847),u=r(20349),c=r(63627),l=r(52913),s=r(2415);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function v(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){v(i,n,o,a,u,"next",e)}function u(e){v(i,n,o,a,u,"throw",e)}a(void 0)}))}}function b(e,t){for(var r=0;r0&&void 0!==r[0]?r[0]:{},e.abrupt("return",this.gff.getReferenceSequenceNames(t));case 2:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"getHeader",value:(d=m(y().mark((function e(){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.gff.getHeader());case 1:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.ObservableCreate)(function(){var n=m(y().mark((function n(o){var i;return y().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.gff.getMetadata();case 2:return i=n.sent,n.next=5,t.getFeaturesHelper(e,r,i,o,!0);case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"getFeaturesHelper",value:(n=m(y().mark((function e(t){var r,n,i,a,u,c,s,f,p,d=this,v=arguments;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=v.length>1&&void 0!==v[1]?v[1]:{},n=v.length>2?v[2]:void 0,i=v.length>3?v[3]:void 0,a=v.length>4?v[4]:void 0,u=v.length>5&&void 0!==v[5]?v[5]:t,e.prev=5,c=[],e.next=9,this.gff.getLines(t.refName,t.start,t.end,(function(e,t){c.push(d.parseLine(n.columnNumbers,e,t))}));case 9:if(!a||!c.length){e.next=17;break}if(s=1/0,f=-1/0,c.forEach((function(e){var t=e.fields[2];if(!d.dontRedispatch.includes(t)){var r=e.start-1;rf&&(f=e.end)}})),!(f>t.end||s0&&(o.subfeatures=e.child_features.flatMap((function(e){return e.map((function(e){return n.featureData(e)}))}))),delete o.child_features,delete o.data,delete o._linehash,delete o.attributes,delete o.seq_id,o}},{key:"freeResources",value:function(){}}],r&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),E}(n.BaseFeatureDataAdapter)},21252:(e,t,r)=>{"use strict";r.r(t),r.d(t,{createFinalConfig:()=>T,fetchConfigFile:()=>I,fetchJb1:()=>C,parseJb1:()=>M});var n=r(76743),o=r(23857),i=r.n(o),a=r(53523),u=r.n(a),c=r(35743);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e){return(null==e?void 0:e.label)&&"string"==typeof e.label}function f(e,t){for(var r=0,n=Object.keys(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function j(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function P(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){j(i,n,o,a,u,"next",e)}function u(e){j(i,n,o,a,u,"throw",e)}a(void 0)}))}}function k(e){return void 0!==e.uri}function _(e){return void 0!==e.localPath}function C(){return L.apply(this,arguments)}function L(){return L=P(O().mark((function e(){var t,r,n,o,i,a,u,c,l,s,f,p,d,h,y=arguments;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=y.length>1&&void 0!==y[1]?y[1]:{include:["{dataRoot}/trackList.json","{dataRoot}/tracks.conf"]},n=y.length>2&&void 0!==y[2]?y[2]:{uri:"",locationType:"UriLocation"},o="uri"in(t=y.length>0&&void 0!==y[0]?y[0]:{uri:"",locationType:"UriLocation"})?"uri":"localPath",i=JSON.parse(JSON.stringify(t)),a="",k(t)&&(a=t.uri),_(t)&&(a=t.localPath),a.endsWith("/")&&(i[o]=a.slice(0,-1)),!(k(n)&&n.uri||_(n)&&n.localPath)){e.next=35;break}u="uri"in n?"uri":"localPath",c="",k(n)&&(c=n.uri),_(n)&&(c=n.localPath),c.endsWith("/")&&(c=c.slice(0,-1)),l={},s=0,f=["jbrowse.conf","jbrowse_conf.json"];case 17:if(!(s1&&void 0!==o[1]?o[1]:G),t),e.next=4,Z(r);case 4:return z(n=N(n=e.sent,t)||n,n),U(n),e.abrupt("return",n);case 9:case"end":return e.stop()}}),e)}))),A.apply(this,arguments)}function I(e){return R.apply(this,arguments)}function R(){return(R=P(O().mark((function e(t){var r;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,n.openLocation)(t).readFile("utf8");case 2:if(r=e.sent,!k(t)){e.next=5;break}return e.abrupt("return",M(r,t.uri));case 5:if(!_(t)){e.next=7;break}return e.abrupt("return",M(r,t.localPath));case 7:return e.abrupt("return",M(r));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.trim().startsWith("{")?function(e,t){if("string"==typeof e){var r;try{r=JSON.parse(e)}catch(e){throw new Error("".concat(e," when parsing configuration."))}return w(r,t)}return w(e,t)}(e,t):g(e,t)}function N(e,t){if(null===t)return null;null===e&&(e={});for(var r=0,n=Object.keys(t);r{"use strict";r.r(t),r.d(t,{convertTrackConfig:()=>f,createRefSeqsAdapter:()=>p});var n=r(76743),o=r(35743),i=r(61169);function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>Pe});var n=r(46865),o=r(94877),i=r.n(o),a=r(33860),u=r.n(a);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==c(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function s(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function f(e,t){return p.apply(this,arguments)}function p(){var e;return e=l().mark((function e(t,r){var n,o,i,a=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(a.length>2&&void 0!==a[2]?a[2]:{}).defaultContent,o=void 0===n?{}:n,e.prev=2,e.next=5,r(t,{encoding:"utf8"});case 5:return i=e.sent,e.abrupt("return",JSON.parse(i));case 9:if(e.prev=9,e.t0=e.catch(2),"ENOENT"!==e.t0.code&&404!==e.t0.status){e.next=13;break}return e.abrupt("return",o);case 13:throw e.t0;case 14:case"end":return e.stop()}}),e,null,[[2,9]])})),p=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){s(i,n,o,a,u,"next",e)}function u(e){s(i,n,o,a,u,"throw",e)}a(void 0)}))},p.apply(this,arguments)}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(){y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==d(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=p;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:h,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function v(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1;)r(e[n=o+i>>>1])>=t?i=n:o=n;return r===this.end?i:o}},{key:"readChunkItems",value:function(e){return f(n.resolve(this.baseURL,this.lazyUrlTemplate.replace(/\{Chunk\}/gi,e)),this.readFile,{defaultContent:[]})}},{key:"iterateSublist",value:function(e,t,r,n,o,i,a){var u=this;return S(y().mark((function c(){var l,s,f,p,d,h,b,g,w,S;return y().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:l=u.attrs.makeGetter("Chunk"),s=u.attrs.makeGetter("Sublist"),f=[],p=y().mark((function c(){var p,h,v;return y().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(e[d][0]!==u.lazyClass){c.next=6;break}p=l(e[d]),h=u.chunkCache.get(p,p).then((function(e){return[e,p]})),f.push(h),c.next=8;break;case 6:return c.next=8,[e[d],a.concat(d)];case 8:if(!(v=s(e[d]))){c.next=11;break}return c.delegateYield(O(j(u.iterateSublist(v,t,r,n,o,i,a.concat(d)))),"t0",11);case 11:case"end":return c.stop()}}),c)})),d=u.binarySearch(e,t,o);case 5:if(!(d=0&&n*i(e[d])t?-1:1,i=e>t?r.start:r.end,a=e>t?r.end:r.start,!(r.topList.length>0)){n.next=5;break}return n.delegateYield(O(j(r.iterateSublist(r.topList,e,t,o,i,a,[0]))),"t0",5);case 5:case"end":return n.stop()}}),n)})))()}},{key:"histogram",value:(o=y().mark((function e(t,r,n){var o,i,a,u,c,l,s,f,p,d,h;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(o=new Array(n)).fill(0),i=(r-t)/n,a=!1,u=!1,e.prev=5,l=j(this.iterate(t,r));case 7:return e.next=9,l.next();case 9:if(!(a=!(s=e.sent).done)){e.next=17;break}for(f=s.value,p=Math.max(0,(this.start(f)-t)/i|0),d=Math.min(n,(this.end(f)-t)/i|0),h=p;h<=d;h+=1)o[h]+=1;case 14:a=!1,e.next=7;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(5),u=!0,c=e.t0;case 23:if(e.prev=23,e.prev=24,!a||null==l.return){e.next=28;break}return e.next=28,l.return();case 28:if(e.prev=28,!u){e.next=31;break}throw c;case 31:return e.finish(28);case 32:return e.finish(23);case 33:return e.abrupt("return",o);case 34:case"end":return e.stop()}}),e,this,[[5,19,23,33],[24,,28,32]])})),a=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=o.apply(e,t);function a(e){h(i,r,n,a,u,"next",e)}function u(e){h(i,r,n,a,u,"throw",e)}a(void 0)}))},function(e,t,r){return a.apply(this,arguments)})}],r&&w(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function C(e,t){for(var r=0;r=e.length||!(t in e[n])?t in this.classes[e[0]].proto?this.classes[e[0]].proto[t]:void 0:e[n][t]}},{key:"makeSetter",value:function(e){var t=this;return function(r,n){t.set(r,e,n)}}},{key:"makeGetter",value:function(e){var t=this;return function(r){return t.get(r,e)}}},{key:"makeFastGetter",value:function(e){var t=this.attrIndices(e);return function(e){if(void 0!==t[e[0]])return e[t[e[0]]]}}},{key:"accessors",value:function(){return this._accessors||(this._accessors=this._makeAccessors()),this._accessors}},{key:"_makeAccessors",value:function(){var e={},t={get:function(e){var t=this.get.field_accessors[e.toLowerCase()];if(t)return t.call(this)},set:function(e,t){var r=this.set.field_accessors[e];if(r)return r.call(this,t)},tags:function(){return r[this[0]]||[]}};t.get.field_accessors={},t.set.field_accessors={},this.classes.forEach((function(t,r){(t.attributes||[]).forEach((function(t,n){e[t]=e[t]||[],e[t][r]=n+1,t=t.toLowerCase(),e[t]=e[t]||[],e[t][r]=n+1}))}));var r=this.classes.map((function(e){return e.attributes}));return Object.keys(e).forEach((function(r){var n=e[r];t.get.field_accessors[r]=n?function(){return this[n[this[0]]]}:function(){}})),t}}])&&C(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function A(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function I(){I=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(A([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==T(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function A(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?M(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function q(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function $(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){q(i,n,o,a,u,"next",e)}function u(e){q(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function K(e){for(var t=1;t=a})),s=u._histograms.meta[0],f=0;f=u._histograms.meta[f].basesPerBin&&(s=u._histograms.meta[f]);if(!((p=a/s.basesPerBin)>.9&&Math.abs(p-Math.round(p))<1e-4)){e.next=52;break}for(d=Math.floor(n/s.basesPerBin),p=Math.round(p),h=[],y=0;y=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ge(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function we(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ge(i,n,o,a,u,"next",e)}function u(e){ge(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Se(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return(0,le.ObservableCreate)(function(){var n=we(be().mark((function n(o){var i,a,u,c,l,s,f;return be().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=r.signal,a=!1,u=!1,n.prev=3,l=Ee(t.nclist.getFeatures(e,r));case 5:return n.next=7,l.next();case 7:if(!(a=!(s=n.sent).done)){n.next=14;break}f=s.value,(0,se.checkAbortSignal)(i),o.next(t.wrapFeature(f));case 11:a=!1,n.next=5;break;case 14:n.next=20;break;case 16:n.prev=16,n.t0=n.catch(3),u=!0,c=n.t0;case 20:if(n.prev=20,n.prev=21,!a||null==l.return){n.next=25;break}return n.next=25,l.return();case 25:if(n.prev=25,!u){n.next=28;break}throw c;case 28:return n.finish(25);case 29:return n.finish(20);case 30:o.complete();case 31:case"end":return n.stop()}}),n,null,[[3,16,20,30],[21,,25,29]])})));return function(e){return n.apply(this,arguments)}}())}},{key:"wrapFeature",value:function(e){return new ve(e,void 0,"".concat(this.id,"-").concat(e.id()))}},{key:"hasDataForRefName",value:(o=we(be().mark((function e(t){var r,n;return be().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",!!(null===(r=null==n?void 0:n.stats)||void 0===r?void 0:r.featureCount));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getRefNames",value:(n=we(be().mark((function e(){return be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.configRefNames||[]);case 1:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"freeResources",value:function(){}}],r&&Se(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(ce.BaseFeatureDataAdapter)},86094:(e,t,r)=>{"use strict";r.d(t,{b0:()=>f,n2:()=>d,sh:()=>p});var n=r(63313),o=r.n(n),i=r(76835),a=r(40828);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(63313),o=r.n(n),i=r(40828),a=r(60285),u=r(35127),c=r(97648),l=r(51537),s=r(84446),f=r(93720);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Z:()=>p});var n=r(63313),o=r.n(n),i=r(40828),a=r(88056),u=r(32439);function c(e,t,r,n,o){return"M"+e+","+t+"h"+(r-o)+"a"+o+","+o+" 0 0 1 "+o+","+o+"v"+(n-2*o)+"a"+o+","+o+" 0 0 1 "+-o+","+o+"h"+(o-r)+"z"}function l(e,t,r,n,o){return"M"+(e+o)+","+t+"h"+(r-o)+"v"+n+"h"+(o-r)+"a"+o+","+o+" 0 0 1 "+-o+","+-o+"v"+(2*o-n)+"a"+o+","+o+" 0 0 1 "+o+","+-o+"z"}function s(e,t,r,n){return[[e,n/2],[e+r,0],[e+r,n]].toString()}var f={gneg:"rgb(227,227,227)",gpos25:"rgb(142,142,142)",gpos50:"rgb(85,85,85)",gpos100:"rgb(0,0,0)",gpos75:"rgb(57,57,57)",gvar:"rgb(0,0,0)",stalk:"rgb(127,127,127)",acen:"#800"};const p=(0,i.observer)((function(e){var t=e.overview,r=e.block,n=e.assembly,i=r.offsetPx,p=r.reversed,d=(0,u.wo)(n,r.refName),h=p?d.length-1:0,y=p?0:d.length-1,v=a.VH,m=!1;return o().createElement("g",{transform:"translate(-".concat(i,")")},d.map((function(e,r){var n,i,a,u=JSON.stringify(e),p=e.refName,d=e.type,b=e.start,g=e.end,w=t.bpToPx({refName:p,coord:b})||0,S=t.bpToPx({refName:p,coord:g})||0,x=Math.min(w,S),O=Math.abs(S-w),E=f[d];return"acen"!==d||m?"acen"===d&&m?o().createElement("polygon",{key:u,points:s(w,0,O,v),fill:E}):h===r?o().createElement("path",{key:u,d:l(x,0,O,v,8),fill:E}):y===r?o().createElement("path",{key:u,d:c(x,0,O,v,8),fill:E}):o().createElement("rect",{key:u,x,y:0,width:O,height:v,fill:E}):(m=!0,o().createElement("polygon",{key:u,points:(n=w,i=O,a=v,[[n,0],[n+i,a/2],[n,a]].toString()),fill:E}))})))}))},45733:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(63313),o=r.n(n),i=r(96731),a=r(97648),u=r(35127),c=r(51537),l=r(34179),s=r(27558),f=r(5932),p=r(84446),d=r(93720),h=r(60285),y=r(35743);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(){m=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==v(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function b(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>M});var n=r(63313),o=r.n(n),i=r(76835),a=r(35127),u=r(97648),c=r(7542),l=r(96731),s=r(51537),f=r(52655),p=r(27558),d=r(5932),h=r(84446),y=r(93720),v=r(40828),m=r(40149),b=r(2415),g=r(90659),w=r.n(g),S=r(60285),x=r(35743),O=r(40881),E=r(73610),j=r(69417);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function k(){k=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(I([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==P(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1e6;return o().createElement(S.Dialog,{maxWidth:"xl",open:!0,onClose:function(){r(),t.setOffsets()},title:"Reference sequence"},o().createElement(a.Z,null,g?o().createElement(u.Z,{color:"error"},"".concat(g)):W?o().createElement(c.Z,null,"Retrieving reference sequence...",o().createElement(l.Z,{style:{marginLeft:10},size:20,disableShrink:!0})):null,o().createElement(s.Z,{"data-testid":"rubberband-sequence",variant:"outlined",multiline:!0,minRows:5,maxRows:10,disabled:$,className:i.dialogContent,fullWidth:!0,value:$?"Reference sequence too large to display, use the download FASTA button":q,InputProps:{readOnly:!0,classes:{input:i.textAreaFont}}}),o().createElement(f.Z,null,o().createElement(p.Z,{control:o().createElement(d.Z,{value:N,onChange:function(e){return F(e.target.checked)}}),label:"Reverse sequence"}),o().createElement(p.Z,{control:o().createElement(d.Z,{value:G,onChange:function(e){return U(e.target.checked)}}),label:"Complement sequence"})),o().createElement(u.Z,{style:{margin:10}},'Note: Check both boxes for the "reverse complement"')),o().createElement(h.Z,null,o().createElement(y.Z,{onClick:function(){w()(q),B(!0),setTimeout((function(){return B(!1)}),500)},disabled:W||!!g||$,color:"primary",startIcon:o().createElement(E.ContentCopy,null)},D?"Copied":"Copy to clipboard"),o().createElement(y.Z,{onClick:function(){(0,m.saveAs)(new Blob([q||""],{type:"text/x-fasta;charset=utf-8"}),"jbrowse_ref_seq.fa")},disabled:W||!!g,color:"primary",startIcon:o().createElement(j.Z,null)},"Download FASTA"),o().createElement(y.Z,{onClick:r,variant:"contained"},"Close")))}))},45379:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});var n=r(63313),o=r.n(n),i=r(76835),a=r(40828),u=r(35743),c=r(7542),l=r(69750),s=r(98695),f=r(96731),p=r(93720),d=r(60285),h=r(89120),y=r(81435),v=r(32439);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==m(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function g(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){g(i,n,o,a,u,"next",e)}function u(e){g(i,n,o,a,u,"throw",e)}a(void 0)}))}}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1)){e.next=24;break}i.setSearchResults(l,t.toLowerCase(),_),e.next=31;break;case 24:if(1!==l.length){e.next=29;break}return e.next=27,U(l[0]);case 27:e.next=31;break;case 29:return e.next=31,i.navToLocString(t,_);case 31:e.next=37;break;case 33:e.prev=33,e.t0=e.catch(0),console.error(e.t0),m.notify("".concat(e.t0),"warning");case 37:case"end":return e.stop()}}),e,null,[[0,33]])}))),W.apply(this,arguments)}return(0,n.useEffect)((function(){D(G)}),[G,_]),o().createElement("div",{className:a.container},N?o().createElement(d.ErrorMessage,{error:N}):null,o().createElement(c.Z,{className:a.importFormContainer},o().createElement("form",{onSubmit:(r=w(b().mark((function e(t){return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),i.setError(void 0),!Z){e.next=5;break}return e.next=5,V(Z);case 5:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},o().createElement(l.ZP,{container:!0,spacing:1,justifyContent:"center",alignItems:"center"},o().createElement(l.ZP,{item:!0},o().createElement(s.Z,null,o().createElement(d.AssemblySelector,{onChange:function(e){return C(e)},localStorageKey:"lgv",session:m,selected:_}))),o().createElement(l.ZP,{item:!0},_?M?o().createElement(h.default,{style:{color:"red"}}):z?o().createElement(s.Z,null,o().createElement(y.Z,{fetchResults:function(e){return(0,v.kx)({queryString:e,assembly:R,textSearchManager:E,rankSearchResults:j,searchScope:I})},model:i,assemblyName:_,value:Z,minWidth:270,onChange:function(e){return D(e)},onSelect:function(e){return A(e)},TextFieldProps:{variant:"outlined",helperText:"Enter sequence name, feature name, or location"}})):o().createElement(f.Z,{size:20,disableShrink:!0}):null),o().createElement(l.ZP,{item:!0},o().createElement(s.Z,null,o().createElement(p.Z,{type:"submit",disabled:!Z,className:a.button,variant:"contained",color:"primary"},"Open")),o().createElement(s.Z,null,o().createElement(p.Z,{disabled:!Z,className:a.button,onClick:function(){i.setError(void 0),i.showAllRegionsInAssembly(_)},variant:"contained",color:"secondary"},"Show all regions in assembly")))))))}))},43971:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>Se});var n=r(63313),o=r.n(n),i=r(82015),a=r(97648),u=r(93720),c=r(76835),l=r(60285),s=r(40828),f=r(73610),p=r(82123),d=r(38441),h=r(35743),y=r(41878),v=r(74141),m=r(2415),b=r(61169),g=r(28550),w=r.n(g),S=r(26796),x=r(89120),O=r(48297),E=r(11036),j=r(90705),P=(0,c.makeStyles)()({dragHandle:{cursor:"grab"},dragHandleIcon:{display:"inline-block",verticalAlign:"middle",pointerEvents:"none"}});const k=function(e){var t=e.trackId,r=e.view,n=e.track,i=P().classes;return o().createElement("span",{draggable:!0,className:i.dragHandle,onDragStart:function(e){var t=e.currentTarget;if(t.parentNode){var o=t.parentNode;e.dataTransfer.setDragImage(o,20,20),r.setDraggingTrackId(n.id)}},onDragEnd:function(){return r.setDraggingTrackId(void 0)},"data-testid":"dragHandle-".concat(r.id,"-").concat(t)},o().createElement(j.Z,{className:i.dragHandleIcon,fontSize:"small"}))};function _(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,te),c=oe(),l=c.classes,s=c.cx,f=r.staticBlocks.offsetPx-r.offsetPx;return o().createElement(i.Z,ne({"data-resizer":"true",className:s(l.scalebarContainer,a),variant:"outlined",ref:t,style:n},u),o().createElement("div",{className:l.scalebarZoomContainer,style:{transform:1!==r.scaleFactor?"scaleX(".concat(r.scaleFactor,")"):void 0}},o().createElement("div",{className:l.scalebar,style:ne({left:f-1,width:r.staticBlocks.totalWidthPx},n)},o().createElement(ue,{model:r}))),o().createElement(ie,{model:r}))})));var le=(0,c.makeStyles)()((function(e){return{verticalGuidesZoomContainer:{position:"absolute",height:"100%",width:"100%",zIndex:1,pointerEvents:"none"},verticalGuidesContainer:{position:"absolute",height:"100%",zIndex:1,pointerEvents:"none",display:"flex"},tick:{position:"absolute",height:"100%",width:1},majorTick:{background:e.palette.action.disabled},minorTick:{background:e.palette.divider}}}));function se(e){var t=e.block,r=e.bpPerPx,n=le(),i=n.classes,a=n.cx,u=(0,Q.Cz)(t.start,t.end,r);return o().createElement(X.b0,{block:t},u.map((function(e){var n=e.type,u=e.base,c=(t.reversed?t.end-u:u-t.start)/r;return o().createElement("div",{key:u,className:a(i.tick,"major"===n||"labeledMajor"===n?i.majorTick:i.minorTick),style:{left:c}})})))}var fe=(0,s.observer)((function(e){var t=e.model,r=t.staticBlocks,n=t.bpPerPx;return o().createElement(o().Fragment,null,r.map((function(e,t){var r="".concat(e.key,"-").concat(t);return e instanceof J.ContentBlock?o().createElement(se,{key:r,block:e,bpPerPx:n}):e instanceof J.ElidedBlock?o().createElement(X.sh,{key:r,width:e.widthPx}):e instanceof J.InterRegionPaddingBlock?o().createElement(X.n2,{key:r,width:e.widthPx,boundary:"boundary"===e.variant}):null})))}));const pe=(0,s.observer)((function(e){var t=e.model,r=le().classes,n=t.staticBlocks.offsetPx-t.offsetPx;return o().createElement("div",{className:r.verticalGuidesZoomContainer,style:{transform:1!==t.scaleFactor?"scaleX(".concat(t.scaleFactor,")"):void 0}},o().createElement("div",{className:r.verticalGuidesContainer,style:{left:n,width:t.staticBlocks.totalWidthPx}},o().createElement(fe,{model:t})))}));var de=(0,c.makeStyles)()((function(e){return{centerLineContainer:{background:"transparent",height:"100%",zIndex:5,position:"absolute",border:"1px ".concat(e.palette.action.active," dashed"),borderTop:"none",borderBottom:"none",pointerEvents:"none"},centerLineText:{position:"absolute",pointerEvents:"none",whiteSpace:"nowrap",fontWeight:"bold"}}})),he=(0,s.observer)((function(e){var t=e.model,r=t.bpPerPx,i=t.centerLineInfo,a=t.trackHeights,u=t.tracks,c=t.width,l=(0,n.useRef)(null),s=de().classes,f=c/2;return u.length?o().createElement("div",{"data-testid":"centerline_container",className:s.centerLineContainer,role:"presentation",ref:l,style:{left:"".concat(f,"px"),width:Math.max(1/r,1)}},i&&o().createElement("div",{"data-testid":"centerline_text",className:s.centerLineText,role:"presentation",style:{left:Math.max(1/r,1)+5,top:a}},i.refName,":"," ",Math.max(Math.round(i.offset)+1,0))):null}));const ye=he;var ve=(0,c.makeStyles)()({tracksContainer:{position:"relative",overflow:"hidden"}});const me=(0,s.observer)((function(e){var t=e.children,r=e.model,i=ve().classes,a=(0,h.getEnv)(r).pluginManager,u=function(e){var t=G((0,n.useState)(!1),2),r=t[0],o=t[1],i=(0,n.useRef)(!1),a=(0,n.useRef)(0);return(0,n.useEffect)((function(){var t=function(){};function n(t){t.preventDefault();var r=t.clientX-a.current;r&&(i.current||(i.current=!0,window.requestAnimationFrame((function(){e.horizontalScroll(-r),i.current=!1,a.current=t.clientX}))))}function u(){a.current=0,r&&o(!1)}return r&&(window.addEventListener("mousemove",n,!0),window.addEventListener("mouseup",u,!0),t=function(){window.removeEventListener("mousemove",n,!0),window.removeEventListener("mouseup",u,!0)}),t}),[e,r,a]),{mouseDown:function(e){if(!e.shiftKey){var t=e.target;t.draggable||t.dataset.resizer||0===e.button&&(a.current=e.clientX,o(!0))}},mouseUp:function(e){e.preventDefault(),o(!1)}}}(r),c=u.mouseDown,s=u.mouseUp,f=(0,n.useRef)(null),p=H(f,r,!0),d=p.guideX,y=p.rubberbandOn,v=p.leftBpOffset,m=p.rightBpOffset,b=p.numOfBpSelected,g=p.width,w=p.left,S=p.anchorPosition,x=p.handleMenuItemClick,O=p.open,E=p.handleClose,j=p.mouseMove,P=p.mouseDown;!function(e,t){var r=(0,n.useRef)(0),o=(0,n.useRef)(),i=(0,n.useRef)(!1);(0,n.useEffect)((function(){var n=e.current;function a(e){var a=B()(e);!0===e.ctrlKey?(e.preventDefault(),r.current+=a.pixelY/500,t.setScaleFactor(r.current<0?1-r.current:1/(1+r.current)),o.current&&clearTimeout(o.current),o.current=setTimeout((function(){t.setScaleFactor(1),t.zoomTo(r.current>0?t.bpPerPx*(1+r.current):t.bpPerPx/(1-r.current),e.clientX-((null==n?void 0:n.getBoundingClientRect().left)||0)),r.current=0}),300)):(Math.abs(a.pixelX)>Math.abs(2*a.pixelY)&&e.preventDefault(),r.current+=a.pixelX,i.current||(i.current=!0,window.requestAnimationFrame((function(){t.horizontalScroll(r.current),r.current=0,i.current=!1}))))}return n?(n.addEventListener("wheel",a),function(){n.removeEventListener("wheel",a)}):function(){}}),[t,e])}(f,r);var k=a.evaluateExtensionPoint("LinearGenomeView-TracksContainerComponent",void 0,{model:r});return o().createElement("div",{ref:f,"data-testid":"trackContainer",className:i.tracksContainer,onMouseDown:function(e){c(e),P(e)},onMouseMove:j,onMouseUp:s},r.showGridlines?o().createElement(pe,{model:r}):null,r.showCenterLine?o().createElement(ye,{model:r}):null,void 0!==d?o().createElement(q,{model:r,coordX:d}):y?o().createElement($.Z,{leftBpOffset:v,rightBpOffset:m,numOfBpSelected:b,width:g,left:w}):null,S?o().createElement(l.Menu,{anchorReference:"anchorPosition",anchorPosition:{left:S.clientX,top:S.clientY},onMenuItemClick:x,open:O,onClose:E,menuItems:r.rubberBandMenuItems()}):null,o().createElement(K,{model:r,ControlComponent:o().createElement(ce,{model:r,style:{height:Z.n8,boxSizing:"border-box"}})}),k,t)}));var be=(0,n.lazy)((function(){return Promise.resolve().then(r.bind(r,45379))})),ge=(0,c.makeStyles)()((function(e){return{note:{textAlign:"center",paddingTop:e.spacing(1),paddingBottom:e.spacing(1)}}})),we=(0,s.observer)((function(e){var t=e.model,r=t.tracks,c=t.error,s=t.initialized,p=t.hasDisplayedRegions,d=ge().classes,y=(0,n.useRef)(null),v=(0,h.getSession)(t);if((0,n.useEffect)((function(){function e(e){var r,n;e.target instanceof Element&&(null===(r=null==y?void 0:y.current)||void 0===r?void 0:r.contains(e.target))&&(null===(n=v.setFocusedViewId)||void 0===n||n.call(v,t.id))}return document.addEventListener("mousedown",e),document.addEventListener("keydown",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("keydown",e)}}),[v,t]),!s&&!c)return o().createElement(l.LoadingEllipses,{variant:"h6"});if(!p||c)return o().createElement(be,{model:t});var m=t.MiniControlsComponent(),b=t.HeaderComponent();return o().createElement("div",{style:{position:"relative"},ref:y},o().createElement(b,{model:t}),o().createElement(m,{model:t}),o().createElement(me,{model:t},r.length?r.map((function(e){return o().createElement(F,{key:e.id,model:t,track:e})})):o().createElement(i.Z,{variant:"outlined",className:d.note},t.hideNoTracksActive?o().createElement("div",{style:{height:"48px"}}):o().createElement(o().Fragment,null,o().createElement(a.Z,null,"No tracks active."),o().createElement(u.Z,{variant:"contained",color:"primary",onClick:t.activateTrackSelector,style:{zIndex:1e3},startIcon:o().createElement(f.TrackSelector,null)},"Open track selector")))))}));const Se=we},52384:(e,t,r)=>{"use strict";r.d(t,{mg:()=>C,ZP:()=>A});var n=r(63313),o=r.n(n),i=r(86127),a=r(41878),u=r(97648),c=r(76835),l=r(40828),s=r(63342),f=r.n(s),p=r(35743),d=r(45131),h=r(88056),y=r(36254),v=r(67929),m=r(45823),b=r(32439);function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.get("start")&&s.coord3){var e=Math.min(l,d),n=Math.max(l,d);t.moveTo(r.pxToBp(e-u),r.pxToBp(n-u))}if(void 0!==l&&void 0===d){var o=r.pxToBp(l-u);o.refName?t.centerAt(Math.round(o.coord),o.refName,o.index):((0,p.getSession)(t).notify("unknown position clicked"),console.error("unknown position clicked",o))}s(void 0),h(void 0),void 0!==l&&w(void 0)}function o(e){"Escape"===e.key&&(s(void 0),h(void 0))}return j?(window.addEventListener("mousemove",e,!0),window.addEventListener("mouseup",n,!0),window.addEventListener("keydown",o,!0),function(){window.removeEventListener("mousemove",e,!0),window.removeEventListener("mouseup",n,!0),window.removeEventListener("keydown",o,!0)}):function(){}}),[j,d,l,t,r,u]),void 0===l)return o().createElement("div",{style:{position:"relative"}},void 0!==v?o().createElement(x,{model:t,open:!j,overview:r,guideX:v}):null,o().createElement("div",{className:E.rubberbandControl,ref:O,onMouseDown:P,onMouseOut:_,onMouseMove:k},a));var C,L,T=l||0,A=0;if(void 0!==l&&void 0!==d&&(T=d{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(63313),o=r.n(n),i=r(35127),a=r(80464),u=r(84446),c=r(93720),l=r(60285);function s(e){var t=e.handleClose;return o().createElement(l.Dialog,{open:!0,maxWidth:"xl",onClose:t,title:"Using the search box"},o().createElement(i.Z,null,o().createElement("h3",null,"Searching"),o().createElement("ul",null,o().createElement("li",null,"Jump to a feature or reference sequence by typing its name in the location box and pressing Enter."),o().createElement("li",null,"Jump to a specific region by typing the region into the location box as: ",o().createElement("code",null,"ref:start..end")," or ",o().createElement("code",null,"ref:start-end"),". Commas are allowed in the start and end coordinates. A space-separated list of locstrings can be used to open up multiple chromosomes at a time")),o().createElement("h3",null,"Example Searches"),o().createElement("ul",null,o().createElement("li",null,o().createElement("code",null,"BRCA")," - searches for the feature named BRCA"),o().createElement("li",null,o().createElement("code",null,"chr4")," - jumps to chromosome 4"),o().createElement("li",null,o().createElement("code",null,"chr4:79,500,000..80,000,000")," - jumps the region on chromosome 4 between 79.5Mb and 80Mb."),o().createElement("li",null,o().createElement("code",null,"chr1:1-100 chr2:1-100")," - create a split view of chr1:1-100 and chr2:1-100"),o().createElement("li",null,o().createElement("code",null,"chr1 chr2 chr3")," - open up multiple chromosomes at once"),o().createElement("li",null,o().createElement("code",null,"chr1:1-100[rev] chr2:1-100")," - open up the first region in the horizontally flipped orientation"),o().createElement("li",null,o().createElement("code",null,"chr1 100 200")," - use whitespace separated refname, start, end"))),o().createElement(a.Z,null),o().createElement(u.Z,null,o().createElement(c.Z,{onClick:function(){return t()},color:"primary"},"Close")))}},81435:(e,t,r)=>{"use strict";r.d(t,{Z:()=>I});var n=r(63313),o=r.n(n),i=r(40828),a=r(35743),u=r(45595),c=r(71468);function l(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(n.s();!(t=n.n()).done;){var o=t.value,i=o.getDisplayString();r[i]||(r[i]=[]),r[i].push(o)}}catch(e){n.e(e)}finally{n.f()}return r}(e)).map((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||s(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];return 1===i.length?{result:i[0]}:{result:new u.ZP({displayString:o,results:i,label:o})}}))}var d=r(51537),h=r(74141),y=r(22546),v=r(27894),m=r(7387);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function L(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r100?[{group:"limitOption",result:new u.ZP({label:"keep typing for more results"})}]:[]))}(e,t.inputValue)},renderInput:function(e){return o().createElement(j,{showHelp:m,params:e,inputBoxVal:K,TextFieldProps:O,setCurrentSearch:D,setInputValue:G})},getOptionLabel:function(e){return"string"==typeof e?e:e.result.getDisplayString()}}))}))},45823:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(63313),o=r.n(n),i=r(76835),a=r(41878),u=r(17329),c=r(97648),l=r(35743),s=(0,i.makeStyles)()((function(e){var t=e.palette,r=t.primary,n=t.tertiary;return{rubberband:{height:"100%",background:n?(0,a.Fq)(n.light,.7):(0,a.Fq)(r.light,.7),position:"absolute",zIndex:10,textAlign:"center",overflow:"hidden"},rubberbandControl:{cursor:"crosshair",width:"100%",minHeight:8},rubberbandText:{color:n?n.contrastText:r.contrastText},popover:{mouseEvents:"none",cursor:"crosshair"},paper:{paddingLeft:e.spacing(1),paddingRight:e.spacing(1)}}}));function f(e){var t=e.leftBpOffset,r=e.rightBpOffset,i=e.numOfBpSelected,a=e.left,f=e.width,p=(0,n.useRef)(null),d=s().classes;return o().createElement(o().Fragment,null,p.current?o().createElement(o().Fragment,null,o().createElement(u.ZP,{className:d.popover,classes:{paper:d.paper},open:!0,anchorEl:p.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"},keepMounted:!0,disableRestoreFocus:!0},o().createElement(c.Z,null,(0,l.stringify)(t))),o().createElement(u.ZP,{className:d.popover,classes:{paper:d.paper},open:!0,anchorEl:p.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,disableRestoreFocus:!0},o().createElement(c.Z,null,(0,l.stringify)(r)))):null,o().createElement("div",{ref:p,className:d.rubberband,style:{left:a,width:f}},i?o().createElement(c.Z,{variant:"h6",className:d.rubberbandText},(0,l.toLocale)(i)," bp"):null))}},3255:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>j});var n=r(63313),o=r.n(n),i=r(60285),a=r(35127),u=r(97648),c=r(80464),l=r(84446),s=r(93720),f=r(93534),p=r(82015),d=r(42833),h=r(43116),y=r(45475),v=r(63814),m=r(40087),b=r(82123),g=r(35743);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=g.prototype=m.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==w(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function x(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function O(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){x(i,n,o,a,u,"next",e)}function u(e){x(i,n,o,a,u,"throw",e)}a(void 0)}))}}function E(e){var t,r=e.searchResults,n=e.assemblyName,i=e.model,a=e.handleClose,u=(0,g.getSession)(i),c=(0,g.getEnv)(u).pluginManager,l=u.assemblyManager,w=n||(null===(t=i.displayedRegions[0])||void 0===t?void 0:t.assemblyName),x=l.get(w);if(!x)throw new Error("assembly ".concat(w," not found"));if(!x.regions)throw new Error("assembly ".concat(w," regions not loaded"));function E(e){return j.apply(this,arguments)}function j(){return j=O(S().mark((function e(t){var r,n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(n=null===(r=null==x?void 0:x.regions)||void 0===r?void 0:r.find((function(e){return t===e.refName})))){e.next=7;break}i.setDisplayedRegions([n]),i.showAllRegions(),e.next=9;break;case 7:return e.next=9,i.navToLocString(t,w);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.warn(e.t0),u.notify("".concat(e.t0),"warning");case 15:case"end":return e.stop()}}),e,null,[[0,11]])}))),j.apply(this,arguments)}return o().createElement(f.Z,{component:p.Z},o().createElement(d.Z,null,o().createElement(h.Z,null,o().createElement(y.Z,null,o().createElement(v.Z,null,"Name"),o().createElement(v.Z,{align:"right"},"Location"),o().createElement(v.Z,{align:"right"},"Track"),o().createElement(v.Z,{align:"right"}))),o().createElement(m.Z,null,r.map((function(e){return o().createElement(y.Z,{key:"".concat(e.getId())},o().createElement(v.Z,{component:"th",scope:"row"},e.getLabel()),o().createElement(v.Z,{align:"right"},e.getLocation()),o().createElement(v.Z,{align:"right"},function(e){var t;if(e){var r=c.pluggableConfigSchemaType("track"),n=(0,b.resolveIdentifier)(r,(0,b.getRoot)(i),e);return(null===(t=null==n?void 0:n.name)||void 0===t?void 0:t.value)||""}return""}(e.getTrackId())||"N/A"),o().createElement(v.Z,{align:"right"},o().createElement(s.Z,{onClick:(t=O(S().mark((function t(){var r,n;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(r=e.getLocation())){t.next=7;break}return t.next=5,E(r);case 5:(n=e.getTrackId())&&i.showTrack(n);case 7:t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),console.error(t.t0),u.notify("".concat(t.t0),"error");case 13:a();case 14:case"end":return t.stop()}}),t,null,[[0,9]])}))),function(){return t.apply(this,arguments)}),color:"primary",variant:"contained"},"Go")));var t})))))}function j(e){var t=e.model,r=e.assemblyName,n=e.searchQuery,f=e.searchResults,p=e.handleClose;return o().createElement(i.Dialog,{open:!0,maxWidth:"xl",onClose:p,title:"Search results"},o().createElement(a.Z,null,(null==f?void 0:f.length)?o().createElement(o().Fragment,null,o().createElement(u.Z,null,"Showing results for ",o().createElement("b",null,n)),o().createElement(E,{model:t,handleClose:p,assemblyName:r,searchResults:f})):o().createElement(u.Z,null,"No results found for ",o().createElement("b",null,n))),o().createElement(c.Z,null),o().createElement(l.Z,null,o().createElement(s.Z,{onClick:function(){return p()},color:"primary"},"Cancel")))}},46227:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(63313),o=r.n(n),i=r(35127),a=r(97648),u=r(51537),c=r(52655),l=r(27558),s=r(5932),f=r(84446),p=r(93720),d=r(60285),h=r(82123),y=r(76835),v=r(40828),m=r(35743);function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{c6:()=>d,kx:()=>s,pG:()=>p,wo:()=>h});var n=r(35743),o=r(45595);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Od:()=>Te,VH:()=>Ae,I1:()=>de.default,n8:()=>Ie,N_:()=>Ne,Rj:()=>ie,EE:()=>Fe,FX:()=>Y,ZP:()=>De});var n=r(63313),o=r.n(n),i=r(53136),a=r(2415),u=r(77043),c=r(66769),l=r(35743),s=r(51398),f=r(71707),p=r(61169),d=r(72161),h=r(82123),y=r(63342),v=r.n(y),m=r(3343),b=r(40149),g=r(76990),w=r.n(g),S=r(73610),x=r(49278),O=r(29541),E=r(14485),j=r(77838),P=r(29240),k=r(88213),_=r(87576),C=r(40828),L=r(82015),T=r(74141),A=r(53869),I=r(90113),R=r(28550),M=r.n(R),N=r(76835),F=(0,N.makeStyles)()((function(e){return{background:{position:"absolute",right:0,zIndex:1001,background:e.palette.background.paper},focusedBackground:{background:e.palette.secondary.light,svg:{fill:e.palette.secondary.contrastText}}}}));const Z=(0,C.observer)((function(e){var t=e.model,r=F(),n=r.classes,i=r.cx,a=t.id,u=t.bpPerPx,c=t.maxBpPerPx,s=t.minBpPerPx,f=t.scaleFactor,p=t.hideHeader,d=(0,l.getSession)(t).focusedViewId;return p?o().createElement(L.Z,{className:i(n.background,d===a?n.focusedBackground:void 0)},o().createElement(M(),{menuItems:t.menuItems()},o().createElement(I.Z,{fontSize:"small"})),o().createElement(T.Z,{"data-testid":"zoom_out",onClick:function(){return t.zoom(2*u)},disabled:u>=c-1e-4||1!==f},o().createElement(A.Z,{fontSize:"small"})),o().createElement(T.Z,{"data-testid":"zoom_in",onClick:function(){return t.zoom(u/2)},disabled:u<=s+1e-4||1!==f},o().createElement(k.Z,{fontSize:"small"}))):null}));var D=r(41878),B=r(93720),z=r(97648),G=r(52655),U=r(39830),H=r(87733),V=r(52384),W=r(48381);function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=u-1e-4||1!==s,size:"large"},o().createElement(A.Z,null)),o().createElement(W.ZP,{size:"small",className:a.slider,value:p,min:100*-Math.log2(u),max:100*-Math.log2(c),onChange:function(e,t){return d(t)},onChangeCommitted:function(){return i.zoomTo(Math.pow(2,-p/100))},disabled:1!==s}),o().createElement(T.Z,{"data-testid":"zoom_in",onClick:function(){return i.zoom(i.bpPerPx/2)},disabled:l<=c+1e-4||1!==s,size:"large"},o().createElement(k.Z,null)))}));var K=r(86127),J=r(81435),X=r(32439);function Q(e){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(e)}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function re(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function ne(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){re(i,n,o,a,u,"next",e)}function u(e){re(i,n,o,a,u,"throw",e)}a(void 0)}))}}var oe=(0,N.makeStyles)()((function(){return{headerRefName:{minWidth:100}}}));const ie=(0,C.observer)((function(e){var t=e.model,r=e.showHelp,n=oe().classes,i=(0,K.Z)(),a=(0,l.getSession)(t),u=a.textSearchManager,c=a.assemblyManager,s=t.assemblyNames,f=t.rankSearchResults,p=s[0],d=c.get(p),h=t.searchScope(p);function y(e){return v.apply(this,arguments)}function v(){return(v=ne(te().mark((function e(r){var n,o;return te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.getLocation(),o=r.getTrackId(),!n){e.next=6;break}return e.next=5,t.navToLocString(n,p);case 5:o&&t.showTrack(o);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(){return(m=ne(te().mark((function e(r){var n,o,i,c,l,s,v,m;return te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!r.hasLocation()){e.next=6;break}return e.next=4,y(r);case 4:e.next=32;break;case 6:if(!(null===(n=r.results)||void 0===n?void 0:n.length)){e.next=10;break}t.setSearchResults(r.results,r.getLabel()),e.next=32;break;case 10:if(o=r.getLabel(),i=(0,X.pG)(o,":"),g=2,c=function(e){if(Array.isArray(e))return e}(b=i)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(b,g)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ee(e,t):void 0}}(b,g)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=c[0],s=c[1],!((v=(null==d?void 0:d.allRefNamesWithLowerCase)||[]).includes(o)||v.includes(l)&&!Number.isNaN(Number.parseInt(s,10)))){e.next=18;break}return e.next=16,t.navToLocString(o,p);case 16:e.next=32;break;case 18:return e.next=20,(0,X.kx)({queryString:o,searchType:"exact",searchScope:h,rankSearchResults:f,textSearchManager:u,assembly:d});case 20:if(!((m=e.sent).length>1)){e.next=25;break}t.setSearchResults(m,o.toLowerCase()),e.next=32;break;case 25:if(1!==m.length){e.next=30;break}return e.next=28,y(m[0]);case 28:e.next=32;break;case 30:return e.next=32,t.navToLocString(o,p);case 32:e.next=38;break;case 34:e.prev=34,e.t0=e.catch(0),console.error(e.t0),a.notify("".concat(e.t0),"warning");case 38:case"end":return e.stop()}var b,g}),e,null,[[0,34]])})))).apply(this,arguments)}return o().createElement(J.Z,{showHelp:r,onSelect:function(e){return m.apply(this,arguments)},assemblyName:p,fetchResults:function(e){return(0,X.kx)({queryString:e,searchScope:h,rankSearchResults:f,textSearchManager:u,assembly:d})},model:t,minWidth:175,TextFieldProps:{variant:"outlined",className:n.headerRefName,style:{margin:Ne},InputProps:{style:{padding:0,height:Fe,background:(0,D.Fq)(i.palette.background.paper,.8)}}}})}));var ae=(0,N.makeStyles)()((function(e){return{headerBar:{display:"flex"},headerForm:{flexWrap:"nowrap",marginRight:7},spacer:{flexGrow:1},panButton:{background:(0,D.Fq)(e.palette.background.paper,.8),color:e.palette.text.primary,margin:Ne},bp:{display:"flex",alignItems:"center",marginLeft:5},toggleButton:{height:44,border:"none",marginLeft:e.spacing(4)},buttonSpacer:{marginRight:e.spacing(2)}}})),ue=(0,C.observer)((function(e){var t=e.model,r=ae().classes;return o().createElement(T.Z,{onClick:t.activateTrackSelector,className:r.toggleButton,title:"Open track selector",value:"track_select"},o().createElement(S.TrackSelector,{className:r.buttonSpacer}))}));function ce(e){var t=e.model,r=ae().classes;return o().createElement(o().Fragment,null,o().createElement(B.Z,{variant:"outlined",className:r.panButton,onClick:function(){return t.slide(-.9)}},o().createElement(H.Z,null)),o().createElement(B.Z,{variant:"outlined",className:r.panButton,onClick:function(){return t.slide(.9)}},o().createElement(U.Z,null)))}var le=(0,C.observer)((function(e){var t=e.model,r=ae().classes,n=t.coarseTotalBp;return o().createElement(z.Z,{variant:"body2",color:"textSecondary",className:r.bp},(0,l.getBpDisplayStr)(n))})),se=function(e){var t=e.model,r=ae().classes;return o().createElement("div",{className:r.headerBar},o().createElement(ue,{model:t}),o().createElement("div",{className:r.spacer}),o().createElement(G.Z,{row:!0,className:r.headerForm},o().createElement(ce,{model:t}),o().createElement(ie,{model:t})),o().createElement(le,{model:t}),o().createElement(Y,{model:t}),o().createElement("div",{className:r.spacer}))};const fe=(0,C.observer)((function(e){var t=e.model;return t.hideHeader?null:t.hideHeaderOverview?o().createElement(se,{model:t}):o().createElement(V.ZP,{model:t},o().createElement(se,{model:t}))}));var pe=r(36254),de=r(43971);function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||Se(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(){ve=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==he(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function me(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function be(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){me(i,n,o,a,u,"next",e)}function u(e){me(i,n,o,a,u,"throw",e)}a(void 0)}))}}function ge(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Se(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function we(e){return function(e){if(Array.isArray(e))return xe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Se(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Se(e,t){if(e){if("string"==typeof e)return xe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xe(e,t):void 0}}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0},get scaleBarHeight(){return Ie+Re},get headerHeight(){return e.hideHeader?0:e.hideHeaderOverview?Te:Te+Ae},get trackHeights(){return(0,l.sum)(e.tracks.map((function(e){return e.displays[0].height})))},get trackHeightsWithResizeHandles(){return this.trackHeights+e.tracks.length*Re},get height(){return this.trackHeightsWithResizeHandles+this.headerHeight+this.scaleBarHeight},get totalBp(){return e.displayedRegions.reduce((function(e,t){return e+t.end-t.start}),0)},get maxBpPerPx(){return this.totalBp/(.9*e.width)},get minBpPerPx(){return.02},get error(){return e.volatileError||this.assemblyErrors},get maxOffset(){return this.displayedRegionsTotalPx-10},get minOffset(){return 30-e.width},get displayedRegionsTotalPx(){return this.totalBp/e.bpPerPx},renderProps:function(){return Ee(Ee({},(0,p.getParentRenderProps)(e)),{},{bpPerPx:e.bpPerPx,highResolutionScaling:(0,a.getConf)((0,l.getSession)(e),"highResolutionScaling")})},searchScope:function(t){return{assemblyName:t,includeAggregateIndexes:!0,tracks:e.tracks}},getTrack:function(t){return e.tracks.find((function(e){return e.configuration.trackId===t}))},rankSearchResults:function(t){var r,n=new Set(e.tracks.map((function(e){return e.configuration.trackId}))),o=ge(t);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.has(i.trackId)&&i.updateScore(i.getScore()+1)}}catch(e){o.e(e)}finally{o.f()}return t},rewriteOnClicks:function(t,r){var n=this;r.forEach((function(r){if("subMenu"in r&&n.rewriteOnClicks(t,r.subMenu),"onClick"in r){var o=r.onClick;r.onClick=function(){for(var r=arguments.length,n=new Array(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:t.width/2,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=(0,l.clamp)(e,t.minBpPerPx,t.maxBpPerPx);if(o===t.bpPerPx)return o;var i=t.bpPerPx;return Math.abs(i-o)<1e-6?(console.warn("zoomTo bpPerPx rounding error"),i):(t.bpPerPx=o,this.scrollTo(Math.round((t.offsetPx+r)*i/o-(n?t.width/2:r))),o)},setOffsets:function(e,r){t.leftOffset=e,t.rightOffset=r},setSearchResults:function(e,r,n){(0,l.getSession)(t).queueDialog((function(o){return[Ce,{model:t,searchResults:e,searchQuery:r,handleClose:o,assemblyName:n}]}))},setNewView:function(e,t){this.zoomTo(e),this.scrollTo(t)},horizontallyFlip:function(){t.displayedRegions=(0,h.cast)(we(t.displayedRegions).reverse().map((function(e){return Ee(Ee({},e),{},{reversed:!e.reversed})}))),this.scrollTo(t.totalBp/t.bpPerPx-t.offsetPx-t.width)},showTrack:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.pluggableConfigSchemaType("track"),a=(0,h.resolveIdentifier)(i,(0,h.getRoot)(t),r);if(!a)throw new Error('Could not resolve identifier "'.concat(r,'"'));var u=e.getTrackType(null==a?void 0:a.type);if(!u)throw new Error("Unknown track type ".concat(a.type));var c=e.getViewType(t.type),l=new Set(c.displayTypes.map((function(e){return e.name}))),s=a.displays.find((function(e){return l.has(e.type)}));if(!s)throw new Error("Could not find a compatible display for view type ".concat(t.type));var f=t.tracks.filter((function(e){return e.configuration===a}));if(0===f.length){var p=u.stateModel.create(Ee(Ee({},n),{},{type:a.type,configuration:a,displays:[Ee({type:s.type,configuration:s},o)]}));return t.tracks.push(p),p}return f[0]},hideTrack:function(r){var n=e.pluggableConfigSchemaType("track"),o=(0,h.resolveIdentifier)(n,(0,h.getRoot)(t),r),i=t.tracks.filter((function(e){return e.configuration===o}));return(0,d.transaction)((function(){return i.forEach((function(e){return t.tracks.remove(e)}))})),i.length}}})).actions((function(e){return{moveTrack:function(t,r){var n=e.tracks.findIndex((function(e){return e.id===t}));if(-1===n)throw new Error("Track ID ".concat(t," not found"));var o=e.tracks.findIndex((function(e){return e.id===r}));if(-1===o)throw new Error("Track ID ".concat(r," not found"));var i=(0,h.getSnapshot)(e.tracks[n]);e.tracks.splice(n,1),e.tracks.splice(o,0,i)},closeView:function(){var t=(0,l.getContainingView)(e);t?(0,l.isViewContainer)(t)&&t.removeView(e):(0,l.getSession)(e).removeView(e)},toggleTrack:function(t){e.hideTrack(t)||e.showTrack(t)},setTrackLabels:function(t){e.trackLabels=t},toggleCenterLine:function(){e.showCenterLine=!e.showCenterLine},setDisplayedRegions:function(t){e.displayedRegions=(0,h.cast)(t),e.zoomTo(e.bpPerPx)},activateTrackSelector:function(){if("hierarchical"===e.trackSelectorType){var t=(0,l.getSession)(e);if((0,l.isSessionModelWithWidgets)(t)){var r=t.addWidget("HierarchicalTrackSelectorWidget","hierarchicalTrackSelector",{view:e});return t.showWidget(r),r}}throw new Error("invalid track selector type ".concat(e.trackSelectorType))},getSelectedRegions:function(t,r){var n=(0,h.getSnapshot)(e),o=v().create(Ee(Ee({},n),{},{interRegionPaddingWidth:e.interRegionPaddingWidth}));return o.setVolatileWidth(e.width),o.moveTo(t,r),o.dynamicBlocks.contentBlocks.map((function(e){return Ee(Ee({},e),{},{start:Math.floor(e.start),end:Math.ceil(e.end)})}))},afterDisplayedRegionsSet:function(t){e.afterDisplayedRegionsSetCallbacks.push(t)},horizontalScroll:function(t){var r=e.offsetPx;return e.scrollTo(e.offsetPx+t)-r},center:function(){var t=e.totalBp/2/e.bpPerPx;e.scrollTo(Math.round(t-e.width/2))},showAllRegions:function(){e.zoomTo(e.maxBpPerPx),this.center()},showAllRegionsInAssembly:function(t){var r=(0,l.getSession)(e),n=r.assemblyManager;if(!t){var o=new Set(e.displayedRegions.map((function(e){return e.assemblyName})));if(o.size>1)return void r.notify("Can't perform operation with multiple assemblies currently");t=we(o)[0]}var i=n.get(t);if(i){var a=i.regions;a&&(this.setDisplayedRegions(a),e.zoomTo(e.maxBpPerPx),this.center())}},setDraggingTrackId:function(t){e.draggingTrackId=t},setScaleFactor:function(t){e.scaleFactor=t},clearView:function(){this.setDisplayedRegions([]),e.tracks.clear(),e.scrollTo(0),e.zoomTo(10)},exportSvg:function(){var t=arguments;return be(ve().mark((function n(){var o,i,a,u,c;return ve().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=t.length>0&&void 0!==t[0]?t[0]:{},n.next=3,Promise.resolve().then(r.bind(r,20546));case 3:return i=n.sent,a=i.renderToSvg,n.next=7,a(e,o);case 7:u=n.sent,c=new Blob([u],{type:"image/svg+xml"}),(0,b.saveAs)(c,o.filename||"image.svg");case 10:case"end":return n.stop()}}),n)})))()}}})).actions((function(e){var t=function(){};return{slide:function(r){var n=ye((0,l.springAnimate)(e.offsetPx,e.offsetPx+e.width*r,e.scrollTo),2),o=n[0],i=n[1];t(),t=i,o()}}})).actions((function(e){var t=function(){};return{zoom:function(r){if(e.zoomTo(e.bpPerPx),!(re.bpPerPx&&e.bpPerPx===e.maxBpPerPx)){var n=e.bpPerPx/r,o=ye((0,l.springAnimate)(1,n,e.setScaleFactor,(function(){e.zoomTo(r),e.setScaleFactor(1)})),2),i=o[0],a=o[1];t(),t=a,i()}}}})).views((function(e){return{get canShowCytobands(){return 1===e.displayedRegions.length&&this.anyCytobandsExist},get showCytobands(){return this.canShowCytobands&&e.showCytobandsSetting},get anyCytobandsExist(){var t=(0,l.getSession)(e).assemblyManager;return e.assemblyNames.some((function(e){var r,n;return null===(n=null===(r=t.get(e))||void 0===r?void 0:r.cytobands)||void 0===n?void 0:n.length}))},get cytobandOffset(){return this.showCytobands?(0,l.measureText)(e.displayedRegions[0].refName,12)+15:0}}})).views((function(e){return{menuItems:function(){var t,r=e.canShowCytobands,n=e.showCytobands,o=(0,l.getSession)(e),i=[{label:"Return to import form",onClick:function(){(0,l.getSession)(e).queueDialog((function(t){return[je,{model:e,handleClose:t}]}))},icon:j.Z}].concat(we((0,l.isSessionWithAddTracks)(o)?[{label:"Sequence search",onClick:function(){(0,l.getSession)(e).queueDialog((function(t){return[Pe,{model:e,handleClose:t}]}))}}]:[]),[{label:"Export SVG",icon:P.Z,onClick:function(){(0,l.getSession)(e).queueDialog((function(t){return[ke,{model:e,handleClose:t}]}))}},{label:"Open track selector",onClick:e.activateTrackSelector,icon:S.TrackSelector},{label:"Horizontally flip",icon:x.Z,onClick:e.horizontallyFlip},{label:"Show...",icon:O.Z,subMenu:[{label:"Show all regions in assembly",onClick:e.showAllRegionsInAssembly},{label:"Show center line",type:"checkbox",checked:e.showCenterLine,onClick:e.toggleCenterLine},{label:"Show header",type:"checkbox",checked:!e.hideHeader,onClick:e.toggleHeader},{label:"Show header overview",type:"checkbox",checked:!e.hideHeaderOverview,onClick:e.toggleHeaderOverview,disabled:e.hideHeader},{label:"Show no tracks active button",type:"checkbox",checked:!e.hideNoTracksActive,onClick:e.toggleNoTracksActive},{label:"Show guidelines",type:"checkbox",checked:e.showGridlines,onClick:e.toggleShowGridlines}].concat(we(r?[{label:"Show ideogram",type:"checkbox",checked:e.showCytobands,onClick:function(){return e.setShowCytobands(!n)}}]:[]))},{label:"Track labels",icon:E.Z,subMenu:[{label:"Overlapping",icon:O.Z,type:"radio",checked:"overlapping"===e.trackLabels,onClick:function(){return e.setTrackLabels("overlapping")}},{label:"Offset",icon:O.Z,type:"radio",checked:"offset"===e.trackLabels,onClick:function(){return e.setTrackLabels("offset")}},{label:"Hidden",icon:O.Z,type:"radio",checked:"hidden"===e.trackLabels,onClick:function(){return e.setTrackLabels("hidden")}}]}]),a=ge(e.trackTypeActions.entries());try{for(a.s();!(t=a.n()).done;){var u=ye(t.value,2),c=u[0],s=u[1];s.length&&(i.push({type:"divider"},{type:"subHeader",label:c}),s.forEach((function(e){return i.push(e)})))}}catch(e){a.e(e)}finally{a.f()}return i}}})).views((function(e){var t,r="";return{get staticBlocks(){var n=(0,f.default)(e),o=JSON.stringify(n);return r!==o&&(t=n,r=o),t},get dynamicBlocks(){return(0,s.default)(e)},get roundedDynamicBlocks(){return this.dynamicBlocks.contentBlocks.map((function(e){return Ee(Ee({},e),{},{start:Math.floor(e.start),end:Math.ceil(e.end)})}))},get visibleLocStrings(){return Le(this.dynamicBlocks.contentBlocks)},get coarseVisibleLocStrings(){return Le(e.coarseDynamicBlocks)}}})).actions((function(e){return{setCoarseDynamicBlocks:function(t){e.coarseDynamicBlocks=t.contentBlocks,e.coarseTotalBp=t.totalBp},afterAttach:function(){var t=this;(0,h.addDisposer)(e,(0,d.autorun)((function(){e.initialized&&t.setCoarseDynamicBlocks(e.dynamicBlocks)}),{delay:150})),(0,h.addDisposer)(e,(0,d.autorun)((function(){var t=function(e){return JSON.stringify(e)},r=e.trackLabels,n=e.showCytobandsSetting,o=e.showCenterLine;"undefined"!=typeof localStorage&&(localStorage.setItem("lgv-trackLabels",r),localStorage.setItem("lgv-showCytobands",t(n)),localStorage.setItem("lgv-showCenterLine",t(o)))})))}}})).actions((function(e){return{moveTo:function(t,r){(0,m.moveTo)(e,t,r)},navToLocString:function(t,r){var n=this;return be(ve().mark((function o(){var i,a,u,c,s;return ve().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i=e.assemblyNames,a=(0,l.getSession)(e),u=a.assemblyManager,c=u.isValidRefName,!(s=r||i[0])){o.next=7;break}return o.next=7,u.waitForAssembly(s);case 7:return o.abrupt("return",n.navToLocations((0,pe.nT)(t,s,c),s));case 8:case"end":return o.stop()}}),o)})))()},navToLocations:function(t,r){var n=this;return be(ve().mark((function o(){var i,a,u,c,s,f,p,h;return ve().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i=(0,l.getSession)(e),a=i.assemblyManager,o.next=3,(0,d.when)((function(){return void 0!==e.volatileWidth}));case 3:return o.next=5,(0,pe.Gc)(t,a,r);case 5:1===(u=o.sent).length?(c=u[0],s=c.reversed,f=c.parentRegion,p=c.start,h=c.end,e.setDisplayedRegions([Ee({reversed:s},f)]),n.navTo(Ee(Ee({},c),{},{start:(0,l.clamp)(null!=p?p:0,0,f.end),end:(0,l.clamp)(null!=h?h:f.end,0,f.end)}))):(e.setDisplayedRegions(u.map((function(e){return void 0===e.start?e.parentRegion:e}))),e.showAllRegions());case 7:case"end":return o.stop()}}),o)})))()},navTo:function(e){this.navToMultiple([e])},navToMultiple:function(t){if(t.some((function(e){return void 0!==e.start&&void 0!==e.end&&e.start>e.end})))throw new Error("found start greater than end");var r=t.at(0),n=t.at(-1);if(r&&n){var o=e.assemblyNames[0],i=(0,l.getSession)(e).assemblyManager,a=i.get(r.assemblyName||o),u=i.get(n.assemblyName||o),c=(null==a?void 0:a.getCanonicalRefName(r.refName))||r.refName,s=(null==u?void 0:u.getCanonicalRefName(n.refName))||n.refName,f=e.displayedRegions.find((function(e){return e.refName===c})),p=(0,l.findLast)(e.displayedRegions,(function(e){return e.refName===s}));if(!f)throw new Error('could not find a region with refName "'.concat(c,'"'));if(!p)throw new Error('could not find a region with refName "'.concat(s,'"'));var d=void 0===r.start?f.start:r.start,h=void 0===r.end?f.end:r.end,y=void 0===n.start?p.start:n.start,v=void 0===n.end?p.end:n.end,m=e.displayedRegions.findIndex((function(e){return c===e.refName&&d>=e.start&&d<=e.end&&h<=e.end&&h>=e.start})),b=e.displayedRegions.findIndex((function(e){return s===e.refName&&y>=e.start&&y<=e.end&&v<=e.end&&v>=e.start}));if(-1===m||-1===b)throw new Error('could not find a region that contained "'.concat(t.map((function(e){return(0,l.assembleLocString)(e)})),'"'));var g=e.displayedRegions[m],w=e.displayedRegions[b];this.moveTo({index:m,offset:g.reversed?g.end-h:d-g.start},{index:b,offset:w.reversed?w.end-y:v-w.start})}}}})).views((function(e){return{rubberBandMenuItems:function(){return[{label:"Zoom to region",icon:k.Z,onClick:function(){return e.moveTo(e.leftOffset,e.rightOffset)}},{label:"Get sequence",icon:_.Z,onClick:function(){return(0,l.getSession)(e).queueDialog((function(t){return[_e,{model:e,handleClose:t}]}))}}]},bpToPx:function(t){var r=t.refName,n=t.coord,o=t.regionNumber;return(0,m.bpToPx)({refName:r,coord:n,regionNumber:o,self:e})},centerAt:function(t,r,n){var o=this.bpToPx({refName:r,coord:t,regionNumber:n});void 0!==o&&e.scrollTo(Math.round(o.offsetPx-e.width/2))},pxToBp:function(t){return(0,m.pxToBp)(e,t)},get centerLineInfo(){return e.displayedRegions.length>0?this.pxToBp(e.width/2):void 0}}})).actions((function(e){return{afterCreate:function(){function t(t){(0,l.getSession)(e).focusedViewId===e.id&&(t.ctrlKey||t.metaKey)&&("ArrowLeft"===t.code&&(t.preventDefault(),e.slide(-.9)),"ArrowRight"===t.code&&(t.preventDefault(),e.slide(.9)),"ArrowUp"===t.code&&1===e.scaleFactor&&(t.preventDefault(),e.zoom(e.bpPerPx/2)),"ArrowDown"===t.code&&1===e.scaleFactor&&(t.preventDefault(),e.zoom(2*e.bpPerPx)))}document.addEventListener("keydown",t),(0,h.addDisposer)(e,(function(){document.removeEventListener("keydown",t)}))}}}))}function De(e){e.addViewType((function(){return new i.ViewType({name:"LinearGenomeView",displayName:"Linear genome view",stateModel:Ze(e),ReactComponent:(0,n.lazy)((function(){return Promise.resolve().then(r.bind(r,43971))}))})}))}},20546:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SVGRuler:()=>O,SVGTracks:()=>y,renderToSvg:()=>N,totalHeight:()=>M});var n=r(63313),o=r.n(n),i=r(43695),a=r(72161),u=r(35743),c=r(84396),l=r(60285),s=r(86127);function f(e){var t=e.width,r=e.height,n=e.shift,i=(0,s.Z)();return o().createElement("rect",{width:t+2*n,height:r,fill:(0,u.stripAlpha)(i.palette.background.default)})}var p=r(61169);function d(e){var t=e.model,r=e.height,n=t.dynamicBlocks,i=t.offsetPx,a=t.interRegionPaddingWidth;return o().createElement(o().Fragment,null,n.contentBlocks.slice(1).map((function(e){return o().createElement("rect",{key:e.key,x:e.offsetPx-i-a,width:a,y:0,height:r,fill:"grey"})})))}function h(e){var t=e.trackLabels,r=e.trackName,n=e.fontSize,i=e.trackLabelOffset,a=e.x,c=(0,s.Z)().palette.text.primary,l="overlay"===t?5:0,f="offset"===t?5:0,p=(0,u.coarseStripHTML)(r);return"none"!==t?o().createElement("g",null,"left"===t?o().createElement("text",{x:i-40,y:20,fill:c,fontSize:n,dominantBaseline:"hanging",textAnchor:"end"},p):o().createElement("text",{x:a+l,y:f,fill:c,fontSize:n,dominantBaseline:"hanging"},p)):null}function y(e){var t=e.displayResults,r=e.model,n=e.offset,i=e.textHeight,a=e.fontSize,c=e.trackLabels,l=void 0===c?"offset":c,s=e.trackLabelOffset,f=void 0===s?0:s,y=(0,u.getSession)(r),v="offset"===l?i:0;return o().createElement(o().Fragment,null,t.map((function(e){var t=e.track,i=e.result,u=n,c=t.configuration,s=(0,p.getTrackName)(c,y),m=t.displays[0],b=Math.max(-r.offsetPx,0);return n+=m.height+v,o().createElement("g",{key:c.trackId,transform:"translate(0 ".concat(u,")")},o().createElement("g",{transform:"translate(".concat(f," ").concat(v,")")},o().createElement(d,{model:r,height:m.height}),i),o().createElement(h,{trackName:s,fontSize:a,trackLabels:l,trackLabelOffset:f,x:b}))})))}var v=r(63342),m=r.n(v),b=r(88056),g=r(71185),w=r(52384),S=r(36254);function x(e){var t=e.start,r=e.end,n=e.bpPerPx,i=e.reversed,a=void 0!==i&&i,c=e.major,l=void 0===c||c,f=e.minor,p=void 0===f||f,d=e.hideText,h=void 0!==d&&d,y=(0,S.Cz)(t,r,n,l,p),v=(0,s.Z)(),m=(0,u.stripAlpha)(v.palette.text.secondary);return o().createElement(o().Fragment,null,y.map((function(e){var i=(a?r-e.base:e.base-t)/n;return o().createElement("line",{key:"tick-"+e.base,x1:i,x2:i,y1:0,y2:"major"===e.type?6:4,strokeWidth:1,stroke:m})})),h?null:y.filter((function(e){return"major"===e.type})).map((function(e){var i=(a?r-e.base:e.base-t)/n;return o().createElement("text",{key:"label-".concat(e.base),x:i-3,y:18,fontSize:11,fill:m},(0,u.getTickDisplayStr)(e.base+1,n))})))}function O(e){var t=e.model,r=e.fontSize,n=t.dynamicBlocks.contentBlocks,i=t.offsetPx,a=t.bpPerPx,c=n.length<5,l=(0,s.Z)(),f=(0,u.stripAlpha)(l.palette.text.primary);return o().createElement(o().Fragment,null,o().createElement(d,{model:t,height:30}),n.map((function(e){var t=e.start,n=e.end,u=e.key,l=e.reversed,s=e.offsetPx,p=e.refName,d=e.widthPx,h=s-i,y="clip-".concat(u);return o().createElement("g",{key:u},o().createElement("defs",null,o().createElement("clipPath",{id:y},o().createElement("rect",{x:0,y:0,width:d,height:100}))),o().createElement("g",{transform:"translate(".concat(h," 0)")},o().createElement("g",{clipPath:"url(#".concat(y,")")},o().createElement("text",{x:4,y:r,fontSize:r,fill:f},p),o().createElement("g",{transform:"translate(0 20)"},o().createElement(x,{hideText:!c,start:t,end:n,bpPerPx:a,reversed:l})))))})))}function E(e){var t=e.model,r=e.fontSize,n=t.offsetPx,i=t.dynamicBlocks,a=i.totalWidthPxWithoutBorders,c=i.totalBp,l=(0,s.Z)(),f=(0,u.getBpDisplayStr)(c),p=Math.max(-n,0),d=p+a,h=(0,u.stripAlpha)(l.palette.text.secondary),y=p+(d-p)/2,v=r;return o().createElement(o().Fragment,null,o().createElement("line",{x1:p,x2:d,y1:10,y2:10,stroke:h}),o().createElement("line",{x1:p,x2:p,y1:5,y2:15,stroke:h}),o().createElement("line",{x1:d,x2:d,y1:5,y2:15,stroke:h}),o().createElement("text",{x:y,y:v,textAnchor:"middle",dominantBaseline:"hanging",fontSize:r,fill:h},f))}function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t1?"":c[0],h=p.get(d),y=(0,s.Z)(),v=(0,u.stripAlpha)(y.palette.text.primary),S=m().create({displayedRegions:JSON.parse(JSON.stringify(f)),interRegionPaddingWidth:0,minimumBlockWidth:t.minimumBlockWidth}),x=t.dynamicBlocks.contentBlocks;if(!x.length)return null;S.setVolatileWidth(a),S.showAllRegions();var j=S.dynamicBlocks.contentBlocks[0],P=x.at(0),_=x.at(-1),C=S.bpToPx(k(k({},P),{},{coord:P.reversed?P.end:P.start}))||0,L=S.bpToPx(k(k({},_),{},{coord:_.reversed?_.start:_.end}))||0,T=+l*n;return o().createElement("g",{id:"header"},o().createElement("text",{x:0,y:0,dominantBaseline:"hanging",fontSize:r,fill:v},d),l?o().createElement("g",{transform:"translate(0 ".concat(i,")")},o().createElement(g.Z,{overview:S,assembly:h,block:j}),o().createElement("rect",{stroke:"red",fill:"rgb(255,0,0,0.1)",width:Math.max(L-C,.5),height:b.VH-1,x:C,y:.5}),o().createElement("g",{transform:"translate(0,".concat(b.VH,")")},o().createElement(w.mg,{overview:S,model:t,useOffset:!1}))):null,o().createElement("g",{transform:"translate(0 ".concat(r+T,")")},o().createElement(E,{model:t,fontSize:r})),o().createElement("g",{transform:"translate(0 ".concat(i+T,")")},o().createElement(O,{model:t,fontSize:r})))}function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function L(){L=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(I([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==C(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t{"use strict";r.d(t,{Cz:()=>p,Gc:()=>d,_S:()=>f,nT:()=>y});var n=r(35743);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new A(n||[]);return a(i,"_invoke",{value:_(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(i,a,u,c){var l=d(e[i],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=n);)i*=2.5;var a=(i=Math.max(i,5))/e,u=0;return!(i%10)&&a/10>=r?u=i/10:!(i%5)&&a/5>=r?u=i/5:!(i%2)&&a/2>=r&&(u=i/2),{majorPitch:i,minorPitch:u}}function p(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=f(r,60,15),a=e,u=t;if(null===a||null===u)return[];if(r<0){var c=[u,a];a=c[0],u=c[1]}a-=Math.abs(20*r)-1,u+=Math.abs(20*r)+1;for(var l=i.minorPitch||i.majorPitch,s=0,p=[],d=Math.floor(a/l)*l;d0&&void 0!==o[0]?o[0]:[],r=o.length>1?o[1]:void 0,n=o.length>2?o[2]:void 0,e.abrupt("return",Promise.all(t.map(function(){var e=s(i().mark((function e(t){var o,a,c,l,s,f;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.assemblyName||n){e.next=3;break}throw new Error("no assembly provided");case 3:return e.next=5,r.waitForAssembly(o);case 5:if(a=e.sent,c=t.refName,a){e.next=9;break}throw new Error("assembly ".concat(o," not found"));case 9:if(l=a.regions){e.next=12;break}throw new Error("regions not loaded yet for ".concat(o));case 12:if(s=a.getCanonicalRefName(t.refName)){e.next=15;break}throw new Error("Could not find refName ".concat(c," in ").concat(a.name));case 15:if(f=l.find((function(e){return e.refName===s}))){e.next=18;break}throw new Error("Could not find refName ".concat(c," in ").concat(o));case 18:return e.abrupt("return",u(u({},t),{},{assemblyName:o,parentRegion:f}));case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 4:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}function y(e,t,r){var o,i,a=e.split(/(\s+)/).map((function(e){return e.trim()})).filter((function(e){return!!e}));try{return a.map((function(e){return(0,n.parseLocString)(e,(function(e){return r(e,t)}))}))}catch(e){var u=(i=3,function(e){if(Array.isArray(e))return e}(o=a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(o,i)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=u[0],s=u[1],f=u[2];if("".concat(e).match(/Unknown reference sequence/)&&Number.isInteger(+s)&&Number.isInteger(+f))return[(0,n.parseLocString)(l+":"+s+".."+f,(function(e){return r(e,t)}))];throw e}}},37997:(e,t,r)=>{"use strict";r.d(t,{fV:()=>Je,qb:()=>Y,rK:()=>G,Ek:()=>Ze,eW:()=>Ce,fU:()=>u,ZP:()=>wt,RH:()=>it,l0:()=>pt});var n=r(95217),o=r(35743),i=r(67394),a=r(2415);const u=(0,a.ConfigurationSchema)("BaseLinearDisplay",{maxFeatureScreenDensity:{type:"number",description:"maximum features per pixel that is displayed in the view, used if byte size estimates not available",defaultValue:.3},fetchSizeLimit:{type:"number",defaultValue:1e6,description:"maximum data to attempt to download for a given track, used if adapter doesn't specify one"},height:{type:"number",defaultValue:100,description:"default height for the track"},mouseover:{type:"string",description:"text to display when the cursor hovers over a feature",defaultValue:"jexl:get(feature,'name')",contextVariable:["feature"]}},{explicitIdentifier:"displayId"});var c=r(77043),l=r(94278),s=r(61169),f=r(72161),p=r(82123),d=r(87576),h=r(63313),y=r.n(h),v=r(40828),m=r(86127),b=r(76835),g=r(60285),w=r(45131),S=r(86094),x=(0,b.makeStyles)()({linearBlocks:{whiteSpace:"nowrap",textAlign:"left",position:"absolute",minHeight:"100%",display:"flex"},heightOverflowed:{position:"absolute",color:"rgb(77,77,77)",borderBottom:"2px solid rgb(77,77,77)",textShadow:"white 0px 0px 1px",whiteSpace:"nowrap",width:"100%",fontWeight:"bold",textAlign:"center",zIndex:2e3,boxSizing:"border-box"}}),O=(0,v.observer)((function(e){var t=e.model,r=x().classes,n=t.blockDefinitions,o=t.blockState;return y().createElement(y().Fragment,null,n.map((function(e){if(e instanceof w.ContentBlock){var n=o.get(e.key);return y().createElement(S.b0,{block:e,key:"".concat(t.id,"-").concat(e.key)},n&&n.ReactComponent?y().createElement(n.ReactComponent,{model:n}):null,n&&n.maxHeightReached?y().createElement("div",{className:r.heightOverflowed,style:{top:n.layout.getTotalHeight()-16,pointerEvents:"none",height:16}},"Max height reached"):null)}if(e instanceof w.ElidedBlock)return y().createElement(S.sh,{key:"".concat(t.id,"-").concat(e.key),width:e.widthPx});if(e instanceof w.InterRegionPaddingBlock)return y().createElement(S.n2,{key:e.key,width:e.widthPx,style:{background:"none"},boundary:"boundary"===e.variant});throw new Error("invalid block type ".concat(JSON.stringify(e)))})))})),E=(0,v.observer)((function(e){var t=e.model,r=x().classes,n=t.blockDefinitions,i=(0,o.getContainingView)(t);return y().createElement("div",{className:r.linearBlocks,style:{left:n.offsetPx-i.offsetPx}},y().createElement(O,{model:t}))}));const j=E;var P=r(41878),k=r(96784),_=r(92503);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ue(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function ce(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ue(i,n,o,a,u,"next",e)}function u(e){ue(i,n,o,a,u,"throw",e)}a(void 0)}))}}const le=p.types.model("BlockState",{key:p.types.string,region:K.Region,reloadFlag:0,isLeftEndOfDisplayedRegion:!1,isRightEndOfDisplayedRegion:!1}).volatile((function(){return{renderInProgress:void 0,filled:!1,reactElement:void 0,features:void 0,layout:void 0,status:"",error:void 0,message:void 0,maxHeightReached:!1,ReactComponent:re,renderProps:void 0}})).actions((function(e){var t;return{doReload:function(){e.reloadFlag=e.reloadFlag+1},afterAttach:function(){var t=this,r=(0,o.getContainingDisplay)(e);setTimeout((function(){(0,p.isAlive)(e)&&(0,o.makeAbortableReaction)(e,se,fe,{name:"".concat(r.id,"/").concat((0,o.assembleLocString)(e.region)," rendering"),delay:r.renderDelay,fireImmediately:!0},t.setLoading,t.setRendered,t.setError)}),r.renderDelay)},setStatus:function(t){e.status=t},setLoading:function(r){void 0===t||t.signal.aborted||t.abort(),e.filled=!1,e.message=void 0,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.error=void 0,e.maxHeightReached=!1,e.renderProps=void 0,t=r},setMessage:function(r){t&&!t.signal.aborted&&t.abort(),e.filled=!1,e.message=r,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.error=void 0,e.maxHeightReached=!1,e.renderProps=void 0,t=void 0},setRendered:function(r){if(r){var n=r.reactElement,o=r.features,i=r.layout,a=r.maxHeightReached,u=r.renderProps;e.filled=!0,e.message=void 0,e.reactElement=n,e.features=o,e.layout=i,e.error=void 0,e.maxHeightReached=a,e.renderProps=u,t=void 0}},setError:function(r){console.error(r),t&&!t.signal.aborted&&t.abort(),e.filled=!1,e.message=void 0,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.maxHeightReached=!1,e.error=r,e.renderProps=void 0,t=void 0,(0,J.isRetryException)(r)&&this.reload()},reload:function(){e.renderInProgress=void 0,e.filled=!1,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.error=void 0,e.message=void 0,e.maxHeightReached=!1,e.ReactComponent=re,e.renderProps=void 0,(0,p.getParent)(e,2).reload()},beforeDestroy:function(){ce(ae().mark((function r(){var n,i,a,u,c,l;return ae().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,t&&!t.signal.aborted&&t.abort(),n=(0,o.getContainingDisplay)(e),i=(0,o.getSession)(e),a=i.rpcManager,u=n.rendererType,c=se((0,p.cast)(e)),!(l=c.renderArgs)){r.next=9;break}return r.next=9,u.freeResourcesInClient(a,JSON.parse(JSON.stringify(l)));case 9:r.next=14;break;case 11:r.prev=11,r.t0=r.catch(0),console.error("Error while destroying block",r.t0);case 14:case"end":return r.stop()}}),r,null,[[0,11]])})))()}}}));function se(e,t){try{var r=t||(0,o.getContainingDisplay)(e),n=(0,o.getSession)(r),i=n.assemblyManager,u=n.rpcManager,c=r.adapterConfig,l=r.rendererType,f=r.error,d=r.parentTrack,h=(0,s.getTrackAssemblyNames)(d),y=e.region.assemblyName;if(!h.includes(y)&&!h.some((function(e){var t;return null===(t=i.get(e))||void 0===t?void 0:t.hasName(y)})))throw new Error("region assembly (".concat(y,") does not match track assemblies (").concat(h,")"));var v=r.renderProps(),m=v.config;(0,a.readConfObject)(m);var b=(0,s.getRpcSessionId)(r),g=(0,o.getContainingView)(r).id;return{rendererType:l,rpcManager:u,renderProps:v,cannotBeRenderedReason:r.regionCannotBeRendered(e.region),displayError:f,renderArgs:{statusCallback:function(t){(0,p.isAlive)(e)&&e.setStatus(t)},assemblyName:e.region.assemblyName,regions:[(0,p.getSnapshot)(e.region)],adapterConfig:c,rendererType:l.name,sessionId:b,layoutId:g,blockKey:e.key,reloadFlag:e.reloadFlag,timeout:1e6}}}catch(e){return{displayError:e}}}function fe(e,t,r){return pe.apply(this,arguments)}function pe(){return(pe=ce(ae().mark((function e(t,r,n){var i,a,u,c,l,s,f,d,h,y,v;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(i=t.rendererType,a=t.renderProps,u=t.rpcManager,c=t.renderArgs,l=t.cannotBeRenderedReason,s=t.displayError,(0,p.isAlive)(n)){e.next=5;break}return e.abrupt("return",void 0);case 5:if(!s){e.next=8;break}return n.setError(s),e.abrupt("return",void 0);case 8:if(!l){e.next=11;break}return n.setMessage(l),e.abrupt("return",void 0);case 11:if(!a.notReady){e.next=13;break}return e.abrupt("return",void 0);case 13:return e.next=15,i.renderInClient(u,ie(ie(ie({},c),a),{},{viewParams:(0,o.getViewParams)(n),signal:r}));case 15:return f=e.sent,d=f.reactElement,h=f.features,y=f.layout,v=f.maxHeightReached,e.abrupt("return",{reactElement:d,features:h,layout:y,maxHeightReached:v,renderProps:a});case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(e){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(e)}function he(){he=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==de(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ye(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function ve(e,t){var r="undefined"==typeof jest;return"clip-".concat(r?e:"jest","-").concat(t)}function me(e){return be.apply(this,arguments)}function be(){var e;return e=he().mark((function e(t){var r,n,i,a,u,c;return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,o.getContainingView)(t),n=r.staticBlocks.contentBlocks,i=(0,o.getSession)(t),a=i.rpcManager,u=t.adapterConfig){e.next=6;break}return e.abrupt("return",{});case 6:return c=(0,s.getRpcSessionId)(t),e.abrupt("return",a.call(c,"CoreGetFeatureDensityStats",{sessionId:c,regions:n,adapterConfig:u,statusCallback:function(e){(0,p.isAlive)(t)&&t.setMessage(e)}}));case 8:case"end":return e.stop()}}),e)})),be=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ye(i,n,o,a,u,"next",e)}function u(e){ye(i,n,o,a,u,"throw",e)}a(void 0)}))},be.apply(this,arguments)}function ge(e){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oe(e){for(var t=1;t=_e})))}).volatile((function(){return{scrollTop:0}})).views((function(e){return{get height(){var t;return null!==(t=e.heightPreConfig)&&void 0!==t?t:(0,a.getConf)(e,"height")}}})).actions((function(e){return{setScrollTop:function(t){e.scrollTop=t},setHeight:function(t){return e.heightPreConfig=Math.max(t,_e),e.height},resizeHeight:function(t){var r=e.height;return this.setHeight(e.height+t)-r}}}))}const Le=function(e){var t=e.model,r=t.regionTooLargeReason;return y().createElement(G,{severity:"warning",action:function(){t.setFeatureDensityStatsLimit(t.featureDensityStats),t.reload()},buttonText:"Force load",message:[r,"Zoom in to see features or force load (may be slow)"].filter((function(e){return!!e})).join(". ")})};function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function Ae(){Ae=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Te(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Ie(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Re(){var e;return e=Ae().mark((function e(t){var r,n,i;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(n=(0,o.getContainingView)(t)).initialized&&n.staticBlocks.contentBlocks.length&&n.bpPerPx!==t.currStatsBpPerPx&&!t.error){e.next=4;break}return e.abrupt("return");case 4:if(void 0===(null===(r=t.featureDensityStats)||void 0===r?void 0:r.featureDensity)){e.next=7;break}return t.setCurrStatsBpPerPx(n.bpPerPx),e.abrupt("return");case 7:return t.clearFeatureDensityStats(),t.setCurrStatsBpPerPx(n.bpPerPx),e.next=11,t.getFeatureDensityStats();case 11:i=e.sent,(0,p.isAlive)(t)&&t.setFeatureDensityStats(i),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(0),!(0,o.isAbortException)(e.t0)&&(0,p.isAlive)(t)&&(console.error(e.t0),t.setError(e.t0));case 18:case"end":return e.stop()}}),e,null,[[0,15]])})),Re=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Ie(i,n,o,a,u,"next",e)}function u(e){Ie(i,n,o,a,u,"throw",e)}a(void 0)}))},Re.apply(this,arguments)}function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}function Ne(){Ne=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new L(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Me(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Fe(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Ze(){return p.types.model({userBpPerPxLimit:p.types.maybe(p.types.number),userByteSizeLimit:p.types.maybe(p.types.number)}).volatile((function(){return{featureDensityStatsP:void 0,featureDensityStats:void 0,currStatsBpPerPx:0}})).views((function(e){return{get currentBytesRequested(){var t;return(null===(t=e.featureDensityStats)||void 0===t?void 0:t.bytes)||0},get currentFeatureScreenDensity(){var t,r=(0,o.getContainingView)(e);return((null===(t=e.featureDensityStats)||void 0===t?void 0:t.featureDensity)||0)*r.bpPerPx},get maxFeatureScreenDensity(){return(0,a.getConf)(e,"maxFeatureScreenDensity")},get featureDensityStatsReady(){var t=(0,o.getContainingView)(e);return!(e.currStatsBpPerPx!==t.bpPerPx||!e.featureDensityStats&&!e.userBpPerPxLimit)},get maxAllowableBytes(){var t;return e.userByteSizeLimit||(null===(t=e.featureDensityStats)||void 0===t?void 0:t.fetchSizeLimit)||(0,a.getConf)(e,"fetchSizeLimit")}}})).actions((function(e){return{afterAttach:function(){(0,p.addDisposer)(e,(0,f.autorun)((function(){return function(e){return Re.apply(this,arguments)}(e)})))}}})).actions((function(e){return{setCurrStatsBpPerPx:function(t){e.currStatsBpPerPx=t},setFeatureDensityStatsLimit:function(t){var r=(0,o.getContainingView)(e);(null==t?void 0:t.bytes)?e.userByteSizeLimit=t.bytes:e.userBpPerPxLimit=r.bpPerPx},getFeatureDensityStats:function(){var t,r=this;return(t=Ne().mark((function t(){return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.featureDensityStatsP||(e.featureDensityStatsP=me(e).catch((function(t){throw(0,p.isAlive)(e)&&r.setFeatureDensityStatsP(void 0),t}))),t.abrupt("return",e.featureDensityStatsP);case 2:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(e){Fe(i,n,o,a,u,"next",e)}function u(e){Fe(i,n,o,a,u,"throw",e)}a(void 0)}))})()},setFeatureDensityStatsP:function(t){e.featureDensityStatsP=t},setFeatureDensityStats:function(t){e.featureDensityStats=t},clearFeatureDensityStats:function(){e.featureDensityStatsP=void 0,e.featureDensityStats=void 0}}})).views((function(e){return{get regionTooLarge(){var t=(0,o.getContainingView)(e);return!(!e.featureDensityStatsReady||t.dynamicBlocks.totalBp<2e4)&&(e.currentBytesRequested>e.maxAllowableBytes||(e.userBpPerPxLimit?t.bpPerPx>e.userBpPerPxLimit:e.currentFeatureScreenDensity>e.maxFeatureScreenDensity))},get regionTooLargeReason(){var t,r=e.currentBytesRequested,n=e.maxAllowableBytes;return r&&r>n?"Requested too much data (".concat((t=r,Math.floor(t/1e6)>0?"".concat(Number.parseFloat((t/1e6).toPrecision(3))," Mb"):Math.floor(t/1e3)>0?"".concat(Number.parseFloat((t/1e3).toPrecision(3))," Kb"):"".concat(Math.floor(t)," bytes")),")"):""}}})).views((function(e){return{regionCannotBeRenderedText:function(t){return e.regionTooLarge?"Force load to see features":""},regionCannotBeRendered:function(t){return e.regionTooLarge?y().createElement(Le,{model:e}):null}}}))}function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}var Be=["height"],ze=["blockState"];function Ge(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function He(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function We(e){return function(e){if(Array.isArray(e))return Ke(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ye(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qe(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function $e(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){qe(i,n,o,a,u,"next",e)}function u(e){qe(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Ye(e,t){if(e){if("string"==typeof e)return Ke(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ke(e,t):void 0}}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.blockState.values());try{for(n.s();!(t=n.n()).done;){var o=t.value;(null==o?void 0:o.features)&&r.push(o.features)}}catch(e){n.e(e)}finally{n.f()}return new l.Z(r)},get featureUnderMouse(){var t=e.featureIdUnderMouse;return t?this.features.get(t):void 0},getFeatureOverlapping:function(t,r,n){var o,i;return null===(i=null===(o=e.blockState.get(t))||void 0===o?void 0:o.layout)||void 0===i?void 0:i.getByCoord(r,n)},getFeatureByID:function(t,r){var n,o;return null===(o=null===(n=e.blockState.get(t))||void 0===n?void 0:n.layout)||void 0===o?void 0:o.getByID(r)},searchFeatureByID:function(t){var r;return e.blockState.forEach((function(e){var n,o=null===(n=null==e?void 0:e.layout)||void 0===n?void 0:n.getByID(t);o&&(r=o)})),r}}})).actions((function(e){return{addBlock:function(t,r){e.blockState.set(t,le.create({key:t,region:r.toRegion()}))},deleteBlock:function(t){e.blockState.delete(t)},selectFeature:function(t){var r=(0,o.getSession)(e);if((0,o.isSessionModelWithWidgets)(r)){var n=r.addWidget("BaseFeatureWidget","baseFeature",{view:(0,o.getContainingView)(e),track:(0,o.getContainingTrack)(e),featureData:t.toJSON()});r.showWidget(n)}(0,o.isSelectionContainer)(r)&&r.setSelection(t)},clearFeatureSelection:function(){(0,o.getSession)(e).clearSelection()},setFeatureIdUnderMouse:function(t){e.featureIdUnderMouse=t},setContextMenuFeature:function(t){e.contextMenuFeature=t}}})).actions((function(e){var t=e.reload;return{reload:function(){return $e(Ve().mark((function r(){return Ve().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e.setError(),e.setCurrStatsBpPerPx(0),e.clearFeatureDensityStats(),We(e.blockState.values()).map((function(e){return e.doReload()})),t();case 5:case"end":return r.stop()}}),r)})))()}}})).views((function(e){return{trackMenuItems:function(){return[]},contextMenuItems:function(){return We(e.contextMenuFeature?[{label:"Open feature details",icon:d.Z,onClick:function(){e.contextMenuFeature&&e.selectFeature(e.contextMenuFeature)}}]:[])},renderProps:function(){return He(He({},(0,s.getParentRenderProps)(e)),{},{notReady:!e.featureDensityStatsReady,rpcDriverName:e.rpcDriverName,displayModel:e,onFeatureClick:function(t,r){var n=r||e.featureIdUnderMouse;if(n){var o=e.features.get(n);o&&e.selectFeature(o)}else e.clearFeatureSelection()},onClick:function(){e.clearFeatureSelection()},onFeatureContextMenu:function(t,r){var n=r||e.featureIdUnderMouse;n?e.setContextMenuFeature(e.features.get(n)):e.clearFeatureSelection()},onMouseMove:function(t,r){e.setFeatureIdUnderMouse(r)},onMouseLeave:function(t){e.setFeatureIdUnderMouse(void 0)},onContextMenu:function(){e.setContextMenuFeature(void 0),e.clearFeatureSelection()}})}}})).actions((function(e){return{renderSvg:function(t){return $e(Ve().mark((function r(){return Ve().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Pe(e,t));case 1:case"end":return r.stop()}}),r)})))()},afterAttach:function(){(0,p.addDisposer)(e,(0,f.autorun)((function(){var t={};(0,o.getContainingView)(e).initialized&&(e.blockDefinitions.contentBlocks.forEach((function(r){t[r.key]=!0,e.blockState.has(r.key)||e.addBlock(r.key,r)})),e.blockState.forEach((function(r,n){t[n]||e.deleteBlock(n)})))})))}}})).preProcessSnapshot((function(e){return e?He({heightPreConfig:e.height},Ge(e,Be)):e})).postProcessSnapshot((function(e){var t=e;return t.blockState,Ge(t,ze)})),Xe=r(53136);function Qe(e){return(0,a.ConfigurationSchema)("LinearBareDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:u,explicitlyTyped:!0})}function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rt(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function yt(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function vt(e){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vt(e)}function mt(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>f});var n=r(63082),o=r(76743);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(20410),o=r(76743);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(63082),o=r(20410),i=r(76743),a=r(42847),u=r(35743),c=r(33860),l=r.n(c),s=r(84997);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==f(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>w});var n=r(20410),o=r(42847),i=r(35743),a=r(90254),u=r(71381);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;rh)){n.next=10;break}return o.complete(),n.abrupt("return");case 10:return y=s.getFeatures(p(p({},e),{},{start:f,end:h}),t),n.next=13,(0,u.z)(y.pipe((0,a.q)()));case 13:if(v=n.sent,m=(null===(c=v[0])||void 0===c?void 0:c.get("seq"))||"",b=r.getConf("search"),g=r.getConf("searchForward"),w=r.getConf("searchReverse"),S=r.getConf("caseInsensitive"),x=new RegExp(b,"g"+(S?"i":"")),b){if(g){O=m.matchAll(x),E=l(O);try{for(E.s();!(j=E.n()).done;)P=j.value,k=f+(P.index||0),(0,i.doesIntersect2)(k,k+b.length,e.start,e.end)&&o.next(new i.SimpleFeature({uniqueId:"".concat(r.id,"-match-").concat(k,"-p"),refName:e.refName,start:k,end:k+P[0].length,name:P[0],strand:1}))}catch(e){E.e(e)}finally{E.f()}}if(w){_=(0,i.revcom)(m).matchAll(x),C=l(_);try{for(C.s();!(L=C.n()).done;)T=L.value,A=h-(T.index||0),(0,i.doesIntersect2)(A,A+b.length,e.start,e.end)&&o.next(new i.SimpleFeature({uniqueId:"".concat(r.id,"-match-").concat(A,"-n"),refName:e.refName,start:A-T[0].length,name:T[0],end:A,strand:-1}))}catch(e){C.e(e)}finally{C.f()}}}o.complete();case 22:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())}},{key:"freeResources",value:function(){}}],r&&v(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),w}(n.BaseFeatureDataAdapter)},68038:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>R});var n=r(20410),o=r(76743),i=r(42847),a=r(20349),u=r(16126),c=r.n(u),l=r(93403),s=r(2858),f=r(80365).Buffer;function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(){d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==p(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;r>6&3]+g[S>>4&3]+g[S>>2&3]+g[3&S]);var x=w.map((function(e){return e.toLowerCase()})),O=function(){function e(t){var r=t.filehandle,n=t.path;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r)this.filehandle=r;else{if(!n)throw new Error("must supply path or filehandle");this.filehandle=new l.LocalFile(n)}this.isBigEndian=void 0}var t,r,n,o,i,a,u,p,h,b,g,S,O,E;return t=e,r=[{key:"_getParser",value:(E=y(d().mark((function e(t){var r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getParsers();case 2:if(e.t0=t,r=e.sent[e.t0]){e.next=6;break}throw new Error("parser ".concat(t," not found"));case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return E.apply(this,arguments)})},{key:"_detectEndianness",value:(O=y(d().mark((function e(){var t,r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.filehandle.read(f.allocUnsafe(8),0,8,0);case 2:if(t=e.sent,(r=t.buffer).readInt32LE(0)!==m){e.next=9;break}this.isBigEndian=!1,this.version=r.readInt32LE(4),e.next=15;break;case 9:if(r.readInt32BE(0)!==m){e.next=14;break}this.isBigEndian=!0,this.version=r.readInt32BE(4),e.next=15;break;case 14:throw new Error("not a 2bit file");case 15:case"end":return e.stop()}}),e,this)}))),function(){return O.apply(this,arguments)})},{key:"_getParsers",value:(S=y(d().mark((function e(){var t,r,n,o;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._detectEndianness();case 2:return t=this.isBigEndian?"big":"little",r=this.isBigEndian?"be":"le",n=(new s._).endianess(t).uint8("nameLength").string("name",{length:"nameLength"}),n=1===this.version?n.buffer("offsetBytes",{length:8}):n.uint32("offset"),o=(new s._).endianess(t).int32("magic",{assert:function(e){return 440477507===e}}).int32("version",{assert:function(e){return 0===e||1===e}}).uint32("sequenceCount",{assert:function(e){return e>=0}}).uint32("reserved"),e.abrupt("return",{header:o,index:(new s._).endianess(t).uint32("sequenceCount").uint32("reserved").array("index",{length:"sequenceCount",type:n}),record1:(new s._).endianess(t).uint32("dnaSize").uint32("nBlockCount"),record2:(new s._).endianess(t).uint32("nBlockCount").array("nBlockStarts",{length:"nBlockCount",type:"uint32".concat(r)}).array("nBlockSizes",{length:"nBlockCount",type:"uint32".concat(r)}).uint32("maskBlockCount"),record3:(new s._).endianess(t).uint32("maskBlockCount").array("maskBlockStarts",{length:"maskBlockCount",type:"uint32".concat(r)}).array("maskBlockSizes",{length:"maskBlockCount",type:"uint32".concat(r)}).int32("reserved")});case 8:case"end":return e.stop()}}),e,this)}))),function(){return S.apply(this,arguments)})},{key:"getHeader",value:(g=y(d().mark((function e(){var t,r,n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._detectEndianness();case 2:return e.next=4,this.filehandle.read(f.allocUnsafe(16),0,16,0);case 4:return t=e.sent,r=t.buffer,e.next=8,this._getParser("header");case 8:return n=e.sent,e.abrupt("return",n.parse(r).result);case 10:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"getIndex",value:(b=y(d().mark((function e(){var t,r,n,o,i,a,u,l=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader();case 2:return t=e.sent,r=8+t.sequenceCount*(257+(1===this.version?8:4)),e.next=6,this.filehandle.read(f.allocUnsafe(r),0,r,8);case 6:return n=e.sent,o=n.buffer,e.next=10,this._getParser("index");case 10:return i=e.sent,a=i.parse(o).result.index,u={},1===this.version?a.forEach((function(e){var t=e.name,r=e.offsetBytes,n=c().fromBytes(r,!0,!l.isBigEndian);if(n.greaterThan(Number.MAX_SAFE_INTEGER))throw new Error("integer overflow. File offset greater than 2^53-1 encountered. This library can only handle offsets up to 2^53-1.");u[t]=n.toNumber()})):a.forEach((function(e){var t=e.name,r=e.offset;u[t]=r})),e.abrupt("return",u);case 15:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"getSequenceNames",value:(h=y(d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:return t=e.sent,e.abrupt("return",Object.keys(t));case 4:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"getSequenceSizes",value:(p=y(d().mark((function e(){var t,r,n,o,i,a,u=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:return t=e.sent,r=Object.keys(t),n=Object.values(t).map((function(e){return u._getSequenceSize(e)})),e.next=7,Promise.all(n);case 7:for(o=e.sent,i={},a=0;a1&&void 0!==E[1]?E[1]:0,n=E.length>2?E[2]:void 0,e.next=4,this.getIndex();case 4:if(o=e.sent,i=o[t]){e.next=8;break}return e.abrupt("return",void 0);case 8:return e.next=10,this._getSequenceRecord(i);case 10:if(a=e.sent,!(r<0)){e.next=13;break}throw new TypeError("regionStart cannot be less than 0");case 13:return(void 0===n||n>a.dnaSize)&&(n=a.dnaSize),u=this._getOverlappingBlocks(r,n,a.nBlocks.starts,a.nBlocks.sizes),c=this._getOverlappingBlocks(r,n,a.maskBlocks.starts,a.maskBlocks.sizes),l=f.allocUnsafe(Math.ceil((n-r)/4)+1),s=Math.floor(r/4),e.next=20,this.filehandle.read(l,0,l.length,a.dnaPosition+s);case 20:for(p=e.sent,h=p.buffer,y="",v=r;vv,u[0]&&v>=u[0].start&&v=u+n[a]||t<=u){if(void 0!==o){i=a;break}}else void 0===o&&(o=a)}if(void 0===o)return[];void 0===i&&(i=r.length);for(var c=new Array(i-o),l=o;l=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>pe});var n=r(63313),o=r.n(n),i=r(40828),a=r(82015),u=r(80464),c=r(7734),l=r(34213),s=r(97648),f=r(51537),p=r(27558),d=r(5932),h=r(61266),y=r(3449),v=r(35743),m=r(14398),b=r.n(m),g=r(9462);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(i,ae));return o().createElement(a.Z,{"data-testid":"variant-side-drawer"},o().createElement(c.FeatureDetails,ce({feature:s,descriptions:ce(ce({},le),n)},e)),o().createElement(u.Z,null),o().createElement(fe,{feature:s,descriptions:n}),o().createElement(u.Z,null),o().createElement(se,{feature:s,descriptions:n}),o().createElement(u.Z,null),"breakend"===i.type?o().createElement(Y,{feature:i,locStrings:i.ALT.map((function(e){var t;return(null===(t=(0,l.I)(e))||void 0===t?void 0:t.MatePosition)||""})),model:t}):null,"translocation"===i.type?o().createElement(Y,{feature:i,model:t,locStrings:["".concat(i.INFO.CHR2[0],":").concat(i.INFO.END)]}):null,o().createElement(_,ce(ce({feature:i},e),{},{descriptions:n})))}))},68451:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(20410),o=r(76743),i=r(42847),a=r(19830),u=r(41589),c=r(34213),l=r(15734);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function y(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,u,"next",e)}function u(e){y(i,n,o,a,u,"throw",e)}a(void 0)}))}}function m(e,t){for(var r=0;r536870888)){e.next=14;break}throw new Error("Data exceeds maximum string length (512MB)");case 14:i=(new TextDecoder).decode(n),c=w(i),l=c.header,s=c.lines,d={},y=f(s.map((function(e,t){var r,n,o,i=(n=e.split("\t"),o=8,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(n,o)||p(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],u=i[1],c=i[3],l=i[7],s=+u-1,f=s+c.length;return{line:e,refName:a,start:s,end:+((null===(r=l.match(/END=(\d+)/))||void 0===r?void 0:r[1].trim())||f),id:t}})));try{for(y.s();!(v=y.n()).done;)m=v.value,b=m.refName,d[b]||(d[b]=new a.ZP),d[b].insert([m.start,m.end],m)}catch(e){y.e(e)}finally{y.f()}return e.abrupt("return",{header:l,intervalTree:d});case 20:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"setup",value:(d=v(h().mark((function e(){var t=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.vcfFeatures||(this.vcfFeatures=this.setupP().catch((function(e){throw t.vcfFeatures=void 0,e}))),e.abrupt("return",this.vcfFeatures);case 2:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getRefNames",value:(n=v(h().mark((function e(){var t,r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,this.setup();case 3:return t=e.sent,r=t.intervalTree,e.abrupt("return",Object.keys(r));case 6:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var r=v(h().mark((function r(n){var o,i,a,u,s,f,p,d;return h().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i=e.start,a=e.end,u=e.refName,r.next=4,t.setup();case 4:s=r.sent,f=s.header,p=s.intervalTree,d=new c.Z({header:f}),null===(o=p[u])||void 0===o||o.search([i,a]).forEach((function(e){return n.next(new l.Z({variant:d.parseLine(e.line),parser:d,id:"".concat(t.id,"-").concat(e.id)}))})),n.complete(),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(0),n.error(r.t0);case 15:case"end":return r.stop()}}),r,null,[[0,12]])})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],r&&m(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(n.BaseFeatureDataAdapter);x.capabilities=["getFeatures","getRefNames"];const O=x},15734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>w});var n=r(34213);function o(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"===t)return["insertion",t];if(""===t)return["deletion",t];if(""===t)return["inversion",t];if(""===t)return["translocation",t];if(t.includes("<"))return["sv",t];if(e.length===t.length)return e.split("").reverse().join("")===t?["inversion",f("inversion",e,t)]:["substitution",f("substitution",e,t)];if(e.length<=t.length){var r=t.length-e.length,o=r.toLocaleString("en-US");return["insertion",r>5?o+"bp INS":f("insertion",e,t)]}if(e.length>t.length){var i=e.length-t.length,a=i.toLocaleString("en-US");return["deletion",i>5?a+"bp DEL":f("deletion",e,t)]}return["indel",f("indel",e,t)]}(e,t),d=i(p,2);c=d[0],l=d[1]}c&&l&&(a.add(c),u.add(l))})),u.size>1){var c=o(u),l=new Set(c.map((function(e){var t=e.split("->");return t[1]?t[0]:e})));u=new Set(o(l).map((function(e){return e.trim()})).map((function(e){var t=c.map((function(e){return e.split("->").map((function(e){return e.trim()}))})).map((function(t){return t[1]&&t[0]===e?t[1]:""})).filter((function(e){return!!e}));return t.length?"".concat(e," -> ").concat(t.join(",")):e})))}return a.size?[o(a).join(","),o(u).join(",")]:[]}function s(e,t,r){if("string"==typeof t&&!t.startsWith("<"))return[];var n=c[t];if(!n&&r.getMetadata("ALT",t)&&(n="sequence_variant"),n)return[n,t];var o=t.split(":");return o.length>1?s(e,"<".concat(o.slice(0,-1).join(":"),">"),r):[]}function f(e,t,r){return"".concat(e," ").concat(t," -> ").concat(r)}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r"===e}));return{refName:a,start:s,end:(null==o?void 0:o.some((function(e){return e.includes("<")})))&&u.END&&!h?+u.END[0]:s+n.length,description:d,type:p,name:null==c?void 0:c.join(","),aliases:c&&c.length>1?e.ID.slice(1):void 0}}},{key:"toJSON",value:function(){return h(h(h({uniqueId:this._id},this.variant),this.data),{},{samples:this.variant.SAMPLES})}}])&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},90405:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(20410),o=r(76743),i=r(42847),a=r(63627),u=r(34213),c=r(15734);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,u,"next",e)}function u(e){d(i,n,o,a,u,"throw",e)}a(void 0)}))}}function y(e,t){for(var r=0;r0&&void 0!==o[0]?o[0]:{},e.next=3,this.configure();case 3:return r=e.sent,n=r.vcf,e.abrupt("return",n.getReferenceSequenceNames(t));case 6:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getHeader",value:(s=h(p().mark((function e(){var t,r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return t=e.sent,r=t.vcf,e.abrupt("return",r.getHeader());case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getMetadata",value:(n=h(p().mark((function e(){var t,r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return t=e.sent,r=t.parser,e.abrupt("return",r.getMetadata());case 5:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var n=h(p().mark((function n(o){var i,a,u,l,s,d;return p().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.refName,a=e.start,u=e.end,n.next=3,t.configure();case 3:return l=n.sent,s=l.vcf,d=l.parser,n.next=8,s.getLines(i,a,u,f({lineCallback:function(e,r){o.next(new c.Z({variant:d.parseLine(e),parser:d,id:"".concat(t.id,"-vcf-").concat(r)}))}},r));case 8:o.complete();case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],r&&y(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),O}(n.BaseFeatureDataAdapter)},49450:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var n=r(2744),o=r(20410),i=r(76743),a=r(35743),u=r(42847),c=r(93563);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function y(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,u,"next",e)}function u(e){y(i,n,o,a,u,"throw",e)}a(void 0)}))}}function m(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.refName,o=e.start,i=e.end,a=r.bpPerPx,c=void 0===a?0:a,l=r.signal,f=r.resolution,p=void 0===f?1:f,y=r.statusCallback,m=void 0===y?function(){}:y;return(0,u.ObservableCreate)(function(){var a=v(h().mark((function a(u){var l,f,y,v,b,g,w;return h().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return m("Downloading bigwig data"),l=t.getConf("source"),a.next=4,t.setup(r);case 4:return f=a.sent,y=f.bigwig,a.next=8,y.getFeatures(n,o,i,d(d({},r),{},{basesPerSpan:c/p}));case 8:v=a.sent,b=s(v),a.prev=10,w=h().mark((function t(){var r,o;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=g.value,l&&(r.source=l),o="".concat(l,":").concat(e.refName,":").concat(r.start,"-").concat(r.end),r.refName=n,r.uniqueId=o,u.next({get:function(e){return r[e]},id:function(){return o},toJSON:function(){return r}});case 6:case"end":return t.stop()}}),t)})),b.s();case 13:if((g=b.n()).done){a.next=17;break}return a.delegateYield(w(),"t0",15);case 15:a.next=13;break;case 17:a.next=22;break;case 19:a.prev=19,a.t1=a.catch(10),b.e(a.t1);case 22:return a.prev=22,b.f(),a.finish(22);case 25:u.complete();case 26:case"end":return a.stop()}}),a,null,[[10,19,22,25]])})));return function(e){return a.apply(this,arguments)}}(),l)}},{key:"getMultiRegionFeatureDensityStats",value:(o=v(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{featureDensity:0});case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"freeResources",value:function(){}}],r&&m(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),j}(o.BaseFeatureDataAdapter);S.capabilities=["hasResolution","hasLocalStats","hasGlobalStats"];const x=S},25628:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(63313),o=r.n(n),i=r(35127),a=r(97648),u=r(51537),c=r(84446),l=r(93720),s=r(87601),f=r.n(s),p=r(2415);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(27558),l=r(18264),s=r(84446),f=r(93720),p=r(60285),d=r(42687);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>p});var n=r(63313),o=r.n(n),i=r(40828),a=r(35743),u=r(2415),c=r(37997),l=r(4399);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const p=(0,i.observer)((function(e){var t=e.model,r=t.stats,n=t.height,i=t.needsScalebar,p=(0,a.getContainingView)(t).trackLabels,d=(0,a.getContainingTrack)(t),h="overlapping"===p?(0,a.measureText)((0,u.getConf)(d,"name"),12.8)+100:50;return o().createElement("div",null,o().createElement(c.qb,function(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{renderSvg:()=>f});var n=r(63313),o=r.n(n),i=r(35743),a=r(72161),u=r(4399);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new A(n||[]);return o(a,"_invoke",{value:_(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==c(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function _(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function s(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function f(e,t,r){return p.apply(this,arguments)}function p(){var e;return e=l().mark((function e(t,r,n){var c,s,f,p;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.when)((function(){return!!t.stats&&!!t.regionCannotBeRenderedText}));case 2:return c=t.needsScalebar,s=t.stats,f=(0,i.getContainingView)(t),p=f.offsetPx,e.t0=o(),e.t1=o().Fragment,e.t2=o(),e.t3={id:"snpcov"},e.next=10,n(r);case 10:return e.t4=e.sent,e.t5=e.t2.createElement.call(e.t2,"g",e.t3,e.t4),e.t6=c&&s?o().createElement("g",{transform:"translate(".concat(Math.max(-p,0),")")},o().createElement(u.Z,{model:t,orientation:"left"})):null,e.abrupt("return",e.t0.createElement.call(e.t0,e.t1,null,e.t5,e.t6));case 14:case"end":return e.stop()}}),e)})),p=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){s(i,n,o,a,u,"next",e)}function u(e){s(i,n,o,a,u,"throw",e)}a(void 0)}))},p.apply(this,arguments)}},34086:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>$});var n=r(63313),o=r.n(n),i=r(35127),a=r(93720),u=r(84446),c=r(76835),l=r(35743),s=r(76990),f=r.n(s),p=r(82015),d=r(40076),h=r(82165),y=r(18567),v=r(74141),m=r(80464),b=r(40828),g=r(16848),w=r.n(g),S=r(89120);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function E(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(y,F)),m=D((0,n.useState)("blue"),2),b=m[0],g=m[1],w=D((0,n.useState)({idx:0,field:null}),2),S=w[0],x=w[1];return o().createElement("div",null,o().createElement(a.Z,{disabled:!d.length,onClick:function(e){return f(e.currentTarget)}},"Change color of selected items"),o().createElement(a.Z,{onClick:function(){return r((0,T.A1)(Z(t),d))},disabled:!d.length},o().createElement(M.Z,null),i?"Move selected items up":null),o().createElement(a.Z,{onClick:function(){return r((0,T.vi)(Z(t),d))},disabled:!d.length},o().createElement(R.Z,null),i?"Move selected items down":null),o().createElement(a.Z,{onClick:function(){return r((0,T.A1)(Z(t),d,t.length))},disabled:!d.length},o().createElement(A.Z,null),i?"Move selected items to top":null),o().createElement(a.Z,{onClick:function(){return r((0,T.vi)(Z(t),d,t.length))},disabled:!d.length},o().createElement(I.Z,null),i?"Move selected items to bottom":null),o().createElement(C.ColorPopover,{anchorEl:s,color:b,onChange:function(e){g(e),d.forEach((function(r){var n=t.find((function(e){return e.name===r}));n&&(n.color=e)})),r(Z(t))},onClose:function(){return f(null)}}),o().createElement("div",{style:{height:400,width:"100%"}},o().createElement(_._$,{getRowId:function(e){return e.name},checkboxSelection:!0,disableRowSelectionOnClick:!0,onRowSelectionModelChange:function(e){return h(e)},rows:t,rowHeight:25,columnHeaderHeight:33,columns:[{field:"color",headerName:"Color",renderCell:function(e){var n=e.value,i=e.id;return o().createElement(L(),{color:n||"blue",onChange:function(e){var n=t.find((function(e){return e.name===i}));n&&(n.color=e),r(Z(t))}})}},{field:"name",sortingOrder:[null],headerName:"Name",width:(0,l.measureGridWidth)(t.map((function(e){return e.name})))}].concat(Z(Object.keys(v).map((function(e){return{field:e,sortingOrder:[null],renderCell:function(e){var t=e.value;return o().createElement("div",{className:u.cell},o().createElement(N.SanitizedHTML,{html:(0,l.getStr)(t)}))},width:(0,l.measureGridWidth)(t.map((function(t){return t[e]})))}})))),sortModel:[],onSortModelChange:function(e){var n=e[0],o=(S.idx+1)%2,i=(null==n?void 0:n.field)||S.field;x({idx:o,field:i}),r(i?Z(t).sort((function(e,t){var r=(0,l.getStr)(e[i]),n=(0,l.getStr)(t[i]);return 1===o?r.localeCompare(n):n.localeCompare(r)})):t)}})))};function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||V(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e,t){if(e){if("string"==typeof e)return W(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(e,t):void 0}}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r

3&&void 0!==A[3]?A[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return",[]);case 7:if(a=i.indices[t]){e.next=10;break}return e.abrupt("return",[]);case 10:u=D(r,n),c=[],l=j(u);try{for(l.s();!(s=l.n()).done;)for(f=E(s.value,2),p=f[0],d=f[1],h=p;h<=d;h++)if(a.binIndex[h]){y=a.binIndex[h],m=j(y);try{for(m.s();!(b=m.n()).done;)g=b.value,c.push(g)}catch(e){m.e(e)}finally{m.f()}}}catch(e){l.e(e)}finally{l.f()}for(w=a.linearIndex.length,x=Math.min(r>>14,w-1),O=Math.min(n>>14,w-1),P=x;P<=O;++P)(k=a.linearIndex[P])&&(!S||k.compareTo(S)<0)&&(S=k);return e.abrupt("return",v(c,S));case 19:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return i.apply(this,arguments)})},{key:"parse",value:(o=T(C().mark((function e(){var t,r=this,n=arguments;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},this.setupP||(this.setupP=this._parse(t).catch((function(e){throw r.setupP=void 0,e}))),e.abrupt("return",this.setupP);case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"hasRefSeq",value:(n=T(C().mark((function e(t){var r,n,o,i=arguments;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},e.next=3,this.parse(r);case 3:return o=e.sent,e.abrupt("return",!!(null===(n=o.indices[t])||void 0===n?void 0:n.binIndex));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&I(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),h}(x),B=r(80365),z=r(40661),G=r.n(z),U=r(41589),H=r(93403),V=r(33860),q=r.n(V),W=r(94877),Q=r.n(W);function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function Y(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=K(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function K(e,t){if(e){if("string"==typeof e)return J(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(e,t):void 0}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function re(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function ne(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){re(i,n,o,a,u,"next",e)}function u(e){re(i,n,o,a,u,"throw",e)}a(void 0)}))}}function oe(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:function(e){return e},r=0,n=0,o=[],i={},a=0;a=30?this.parseAuxData(n,16):void 0,c=n.readInt32LE(16+i),s=16+i+4,p=new Array(c),d=0;dthis.maxBinNumber)v=m(n,s+28),s+=44;else{for(f=b(f,a(n,s)),s+=8,S=n.readInt32LE(s),s+=4,x=new Array(S),O=0;O3&&void 0!==S[3]?S[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(a=e.sent,u=null==a?void 0:a.indices[t]){e.next=8;break}return e.abrupt("return",[]);case 8:if(0!==(c=this.reg2bins(r,n)).length){e.next=11;break}return e.abrupt("return",[]);case 11:l=[],s=Y(c);try{for(s.s();!(f=s.n()).done;)for(x=f.value,O=2,p=function(e){if(Array.isArray(e))return e}(x)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(x,O)||K(x,O)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=p[0],h=p[1],y=d;y<=h;y++)if(u.binIndex[y]){m=u.binIndex[y],b=Y(m);try{for(b.s();!(g=b.n()).done;)w=g.value,l.push(w)}catch(e){b.e(e)}finally{b.f()}}}catch(e){s.e(e)}finally{s.f()}return e.abrupt("return",v(l,new i(0,0)));case 15:case"end":return e.stop()}var x,O}),e,this)}))),function(e,t,r){return u.apply(this,arguments)})},{key:"reg2bins",value:function(e,t){(e-=1)<1&&(e=1),t>Math.pow(2,50)&&(t=Math.pow(2,34)),t-=1;for(var r,n=0,o=0,i=this.minShift+3*this.depth,a=[];n<=this.depth;i-=3,o+=(r=3*n,1*Math.pow(2,r)),n+=1){var u=o+ce(e,i),c=o+ce(t,i);if(c-u+a.length>this.maxBinNumber)throw new Error("query ".concat(e,"-").concat(t," is too large for current binning scheme (shift ").concat(this.minShift,", depth ").concat(this.depth,"), try a smaller query or a coarser index binning scheme"));a.push([u,c])}return a}},{key:"parse",value:(o=ne(te().mark((function e(){var t,r=this,n=arguments;return te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},this.setupP||(this.setupP=this._parse(t).catch((function(e){throw r.setupP=void 0,e}))),e.abrupt("return",this.setupP);case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"hasRefSeq",value:(n=ne(te().mark((function e(t){var r,n,o,i=arguments;return te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},e.next=3,this.parse(r);case 3:return o=e.sent,e.abrupt("return",!!(null===(n=o.indices[t])||void 0===n?void 0:n.binIndex));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&oe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),y}(x);function se(e){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(e)}function fe(e,t){for(var r=0;r>16}var t,r;return t=e,(r=[{key:"get",value:function(e){return this[e]?(this.data[e]||(this.data[e]=this[e]()),this.data[e]):this._get(e.toLowerCase())}},{key:"end",value:function(){return this.get("start")+this.get("length_on_ref")}},{key:"seq_id",value:function(){return this._refID}},{key:"_get",value:function(e){return e in this.data||(this.data[e]=this._parseTag(e)),this.data[e]}},{key:"_tags",value:function(){var e=this;this._parseAllTags();var t=["seq"];this.isSegmentUnmapped()||t.push("start","end","strand","score","qual","MQ","CIGAR","length_on_ref","template_length"),this.isPaired()&&t.push("next_segment_position","pair_orientation"),t=t.concat(this._tagList||[]);for(var r=0,n=Object.keys(this.data);r>8;return 255===e?void 0:e}},{key:"score",value:function(){return this.get("mq")}},{key:"qual",value:function(){var e;return null===(e=this.qualRaw())||void 0===e?void 0:e.join(" ")}},{key:"qualRaw",value:function(){if(!this.isSegmentUnmapped()){var e=this.bytes,t=e.start,r=e.byteArray,n=t+36+this.get("_l_read_name")+4*this.get("_n_cigar_op")+this.get("_seq_bytes"),o=this.get("seq_length");return r.subarray(n,n+o)}}},{key:"strand",value:function(){return this.isReverseComplemented()?-1:1}},{key:"multi_segment_next_segment_strand",value:function(){if(!this.isMateUnmapped())return this.isMateReverseComplemented()?-1:1}},{key:"name",value:function(){return this.get("_read_name")}},{key:"_read_name",value:function(){var e=this.get("_l_read_name"),t=this.bytes,r=t.byteArray,n=t.start;return r.toString("ascii",n+36,n+36+e-1)}},{key:"_parseTag",value:function(e){if(!this._allTagsParsed){for(var t,r=this.bytes,n=r.byteArray,o=r.start,i=this._tagOffset||o+36+this.get("_l_read_name")+4*this.get("_n_cigar_op")+this.get("_seq_bytes")+this.get("seq_length"),a=this.bytes.end;i>4)+de[15&y],i+=4}else for(var v=0;v>4)+de[15&b],i+=4}else for(var g=0;g>4,s=de[15&c];if("S"===s&&l===i)return o+=4,l=(c=t.readInt32LE(o))>>4,"N"!==(s=de[15&c])&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(var f=0;f>4)+(s=de[15&c]),"H"!==s&&"S"!==s&&"I"!==s&&(u+=l),o+=4;return this.data.length_on_ref=u,a}}},{key:"_flags",value:function(){}},{key:"length_on_ref",value:function(){return this.data.length_on_ref||this.get("cigar"),this.data.length_on_ref}},{key:"_n_cigar_op",value:function(){return 65535&this.get("_flag_nc")}},{key:"_l_read_name",value:function(){return 255&this.get("_bin_mq_nl")}},{key:"_seq_bytes",value:function(){return this.get("seq_length")+1>>1}},{key:"getReadBases",value:function(){return this.seq()}},{key:"seq",value:function(){for(var e=this.bytes,t=e.byteArray,r=e.start+36+this.get("_l_read_name")+4*this.get("_n_cigar_op"),n=this.get("_seq_bytes"),o=this.get("seq_length"),i="",a=0,u=0;u>4],++a0?(o[0]=e,o[1]=r,o[2]=t,o[3]=n):(o[2]=e,o[3]=r,o[0]=t,o[1]=n),o.join("")}return""}},{key:"_bin_mq_nl",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+12)}},{key:"_flag_nc",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+16)}},{key:"seq_length",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+20)}},{key:"_next_refid",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+24)}},{key:"_next_pos",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+28)}},{key:"template_length",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+32)}},{key:"toJSON",value:function(){for(var e={},t=0,r=Object.keys(this);te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.split(/\r?\n/));try{for(o.s();!(t=o.n()).done;){var i=me(r=t.value.split(/\t/))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||be(r)||ve(),a=i[0],u=i.slice(1);a&&n.push({tag:a.slice(1),data:u.map((function(e){var t=ye(e.split(":",2),2);return{tag:t[0],value:t[1]}}))})}}catch(e){o.e(e)}finally{o.f()}return n}function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function xe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Oe(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Oe(e,t){if(e){if("string"==typeof e)return Ee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ee(e,t):void 0}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ke(e){for(var t=1;t0&&void 0!==r[0]?r[0]:{},e.next=3,this.getHeader(t);case 3:return e.abrupt("return",this.header);case 4:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"_readRefSeqs",value:(s=Ie(je().mark((function e(t,r,n){var o,i,a,u,c,l,s,f,p,d,h,y,v;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t>r)){e.next=2;break}return e.abrupt("return",this._readRefSeqs(t,2*r,n));case 2:return o=r+65536,e.next=5,this.bam.read(B.Buffer.alloc(o),0,r,0,n);case 5:if(i=e.sent,a=i.bytesRead,u=i.buffer,a){e.next=10;break}throw new Error("Error reading refseqs from header");case 10:return e.next=12,(0,U.unzip)(u.subarray(0,Math.min(a,r)));case 12:c=e.sent,l=c.readInt32LE(t),s=t+4,f={},p=[],d=0;case 18:if(!(dc.length)){e.next=28;break}return console.warn("BAM header is very big. Re-fetching ".concat(r," bytes.")),e.abrupt("return",this._readRefSeqs(t,2*r,n));case 28:d+=1,e.next=18;break;case 31:return e.abrupt("return",{chrToIndex:f,indexToChr:p});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return s.apply(this,arguments)})},{key:"getRecordsForRange",value:(l=Ie(je().mark((function e(t,r,n,o){return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ge(this.streamRecordsForRange(t,r,n,o)));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return l.apply(this,arguments)})},{key:"streamRecordsForRange",value:function(e,t,r,n){var o=this;return Re(je().mark((function i(){var a,u,c;return je().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Ne(o.getHeader(n));case 2:if(void 0!==(u=null===(a=o.chrToIndex)||void 0===a?void 0:a[e])&&o.index){i.next=8;break}return i.next=6,[];case 6:i.next=12;break;case 8:return i.next=10,Ne(o.index.blocksForRange(u,t-1,r,n));case 10:return c=i.sent,i.delegateYield(Fe(Ze(o._fetchChunkFeatures(c,u,t,r,n))),"t0",12);case 12:case"end":return i.stop()}}),i)})))()}},{key:"_fetchChunkFeatures",value:function(e,t,r,n){var o=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return Re(je().mark((function a(){var u,c,l,s,f,p,d,y,v,m,b;return je().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:u=i.viewAsPairs,c=[],l=!1,s=xe(e),a.prev=4,s.s();case 6:if((f=s.n()).done){a.next=41;break}return p=f.value,a.next=10,Ne(o.featureCache.get(p.toString(),{chunk:p,opts:i},i.signal));case 10:d=a.sent,y=[],v=xe(d),a.prev=13,v.s();case 15:if((m=v.n()).done){a.next=26;break}if((b=m.value).seq_id()!==t){a.next=24;break}if(!(b.get("start")>=n)){a.next=23;break}return l=!0,a.abrupt("break",26);case 23:b.get("end")>=r&&y.push(b);case 24:a.next=15;break;case 26:a.next=31;break;case 28:a.prev=28,a.t0=a.catch(13),v.e(a.t0);case 31:return a.prev=31,v.f(),a.finish(31);case 34:return c.push(y),a.next=37,y;case 37:if(!l){a.next=39;break}return a.abrupt("break",41);case 39:a.next=6;break;case 41:a.next=46;break;case 43:a.prev=43,a.t1=a.catch(4),s.e(a.t1);case 46:return a.prev=46,s.f(),a.finish(46);case 49:if(h(i.signal),!u){a.next=53;break}return a.next=53,o.fetchPairs(t,c,i);case 53:case"end":return a.stop()}}),a,null,[[4,43,46,49],[13,28,31,34]])})))()}},{key:"fetchPairs",value:(c=Ie(je().mark((function e(t,r,n){var o,i,a,u,c,l,s,f,p,d,h,y,v=this;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.pairAcrossChr,i=n.maxInsertSize,a=void 0===i?2e5:i,u={},c={},r.map((function(e){var t,r,n,o={},i=xe(e);try{for(i.s();!(t=i.n()).done;){var a=t.value,l=a.name(),s=a.id();o[l]||(o[l]=0),o[l]++,c[s]=1}}catch(e){i.e(e)}finally{i.f()}for(var f=0,p=Object.entries(o);f2&&void 0!==u[2]?u[2]:{},e.next=3,this.bam.read(B.Buffer.alloc(r),0,r,t,n);case 3:return o=e.sent,i=o.bytesRead,a=o.buffer,e.abrupt("return",a.subarray(0,Math.min(i,r)));case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"_readChunk",value:(a=Ie(je().mark((function e(t){var r,n,o,i,a,u,c;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.chunk,n=t.opts,e.next=3,this._readRegion(r.minv.blockPosition,r.fetchedSize(),n);case 3:return o=e.sent,e.next=6,(0,U.unzipChunkSlice)(o,r);case 6:return i=e.sent,a=i.buffer,u=i.cpositions,c=i.dpositions,e.abrupt("return",{data:a,cpositions:u,dpositions:c,chunk:r});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"readBamFeatures",value:(i=Ie(je().mark((function e(t,r,n,o){var i,a,u,c,l,s,f;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=0,a=[],u=0,c=+Date.now();case 4:if(!(i+4=n[u++];);u--}if(!(s0?256*r[u]+(i-n[u])+o.minv.dataPosition+1:G().signed(t.slice(i,s))}),a.push(f),!(this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime)){e.next=15;break}return e.next=14,d(1);case 14:c=+Date.now();case 15:i=s+1,e.next=4;break;case 18:return e.abrupt("return",a);case 19:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return i.apply(this,arguments)})},{key:"hasRefSeq",value:(o=Ie(je().mark((function e(t){var r,n,o;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=null===(r=this.chrToIndex)||void 0===r?void 0:r[t],e.abrupt("return",void 0!==o&&(null===(n=this.index)||void 0===n?void 0:n.hasRefSeq(o)));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"lineCount",value:(n=Ie(je().mark((function e(t){var r,n;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null===(r=this.chrToIndex)||void 0===r?void 0:r[t],e.abrupt("return",void 0!==n&&this.index?this.index.lineCount(n):0);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"indexCov",value:(r=Ie(je().mark((function e(t,r,n){var o,i;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.index){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.index.parse();case 4:return i=null===(o=this.chrToIndex)||void 0===o?void 0:o[t],e.abrupt("return",void 0===i?[]:this.index.indexCov(i,r,n));case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"blocksForRange",value:(t=Ie(je().mark((function e(t,r,n,o){var i,a;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.index){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.index.parse();case 4:return a=null===(i=this.chrToIndex)||void 0===i?void 0:i[t],e.abrupt("return",void 0===a?[]:this.index.blocksForRange(a,r,n,o));case 6:case"end":return e.stop()}}),e,this)}))),function(e,r,n,o){return t.apply(this,arguments)})}]),e}();function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}var We=["referer"];function Qe(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function $e(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ye(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ye(e,t){if(e){if("string"==typeof e)return Ke(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ke(e,t):void 0}}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function et(e){for(var t=1;t0&&void 0!==x[0]?x[0]:{},r="".concat(this.baseUrl,"/").concat(this.trackId,"?referenceName=na&class=header"),e.next=4,fetch(r,t);case 4:if((n=e.sent).ok){e.next=13;break}return e.t0=Error,e.t1="HTTP ".concat(n.status," fetching ").concat(r,": "),e.next=10,n.text();case 10:throw e.t2=e.sent,e.t3=e.t1.concat.call(e.t1,e.t2),new e.t0(e.t3);case 13:return e.next=15,n.json();case 15:return o=e.sent,e.next=18,dt(o.htsget.urls,t);case 18:if((i=e.sent).readInt32LE(0)===ze){e.next=21;break}throw new Error("Not a BAM file");case 21:a=i.readInt32LE(4),u=i.toString("utf8",8,8+a),c=we(u),l=[],s={},f=c.filter((function(e){return"SQ"===e.tag})),p=$e(f.entries());try{for(p.s();!(d=p.n()).done;){O=d.value,E=2,h=function(e){if(Array.isArray(e))return e}(O)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(O,E)||Ye(O,E)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=h[0],v=h[1],m="",b=0,g=$e(v.data);try{for(g.s();!(w=g.n()).done;)"SN"===(S=w.value).tag?m=S.value:"LN"===S.tag&&(b=+S.value)}catch(e){g.e(e)}finally{g.f()}s[m]=y,l[y]={refName:m,length:b}}}catch(e){p.e(e)}finally{p.f()}return this.chrToIndex=s,this.indexToChr=l,e.abrupt("return",c);case 32:case"end":return e.stop()}var O,E}),e,this)}))),function(){return n.apply(this,arguments)})}],r&&tt(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(Ve)},2744:(e,t,r)=>{"use strict";r.d(t,{Q:()=>Zn,B:()=>wn});var n=BigInt(32);"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return function(e,t,r){var o=Number(!!r),i=Number(!r);return BigInt(e.getInt32(t,r)*i+e.getInt32(t+4,r)*o)<>n),a=Number(r&BigInt(4294967295));o?(e.setInt32(t+4,i,o),e.setUint32(t,a,o)):(e.setInt32(t,i,o),e.setUint32(t+4,a,o))}(this,e,t,r)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,r){!function(e,t,r,o){var i=Number(r>>n),a=Number(r&BigInt(4294967295));o?(e.setUint32(t+4,i,o),e.setUint32(t,a,o)):(e.setUint32(t,i,o),e.setUint32(t+4,a,o))}(this,e,t,r)});var o=r(80365);class i{constructor(e,t){this.code="",this.scopes=[["vars"]],this.bitFields=[],this.tmpVariableCount=0,this.references=new Map,this.imports=[],this.reverseImports=new Map,this.useContextVariables=!1,this.importPath=e,this.useContextVariables=t}generateVariable(e){const t=[...this.scopes[this.scopes.length-1]];return e&&t.push(e),t.join(".")}generateOption(e){switch(typeof e){case"number":return e.toString();case"string":return this.generateVariable(e);case"function":return`${this.addImport(e)}.call(${this.generateVariable()}, vars)`}}generateError(e){this.pushCode(`throw new Error(${e});`)}generateTmpVariable(){return"$tmp"+this.tmpVariableCount++}pushCode(e){this.code+=e+"\n"}pushPath(e){e&&this.scopes[this.scopes.length-1].push(e)}popPath(e){e&&this.scopes[this.scopes.length-1].pop()}pushScope(e){this.scopes.push([e])}popScope(){this.scopes.pop()}addImport(e){if(!this.importPath)return`(${e})`;let t=this.reverseImports.get(e);return t||(t=this.imports.push(e)-1,this.reverseImports.set(e,t)),`${this.importPath}[${t}]`}addReference(e){this.references.has(e)||this.references.set(e,{resolved:!1,requested:!1})}markResolved(e){const t=this.references.get(e);t&&(t.resolved=!0)}markRequested(e){e.forEach((e=>{const t=this.references.get(e);t&&(t.requested=!0)}))}getUnresolvedReferences(){return Array.from(this.references).filter((([e,t])=>!t.resolved&&!t.requested)).map((([e,t])=>e))}}const a=new Map,u="___parser_",c={uint8:1,uint16le:2,uint16be:2,uint32le:4,uint32be:4,int8:1,int16le:2,int16be:2,int32le:4,int32be:4,int64be:8,int64le:8,uint64be:8,uint64le:8,floatle:4,floatbe:4,doublele:8,doublebe:8},l={uint8:"Uint8",uint16le:"Uint16",uint16be:"Uint16",uint32le:"Uint32",uint32be:"Uint32",int8:"Int8",int16le:"Int16",int16be:"Int16",int32le:"Int32",int32be:"Int32",int64be:"BigInt64",int64le:"BigInt64",uint64be:"BigUint64",uint64le:"BigUint64",floatle:"Float32",floatbe:"Float32",doublele:"Float64",doublebe:"Float64"},s={uint8:!1,uint16le:!0,uint16be:!1,uint32le:!0,uint32be:!1,int8:!1,int16le:!0,int16be:!1,int32le:!0,int32be:!1,int64be:!1,int64le:!0,uint64be:!1,uint64le:!0,floatle:!0,floatbe:!1,doublele:!0,doublebe:!1};class f{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new f}primitiveGenerateN(e,t){const r=l[e],n=s[e];t.pushCode(`${t.generateVariable(this.varName)} = dataView.get${r}(offset, ${n});`),t.pushCode(`offset += ${c[e]};`)}primitiveN(e,t,r){return this.setNextParser(e,t,r)}useThisEndian(e){return e+this.endian.toLowerCase()}uint8(e,t={}){return this.primitiveN("uint8",e,t)}uint16(e,t={}){return this.primitiveN(this.useThisEndian("uint16"),e,t)}uint16le(e,t={}){return this.primitiveN("uint16le",e,t)}uint16be(e,t={}){return this.primitiveN("uint16be",e,t)}uint32(e,t={}){return this.primitiveN(this.useThisEndian("uint32"),e,t)}uint32le(e,t={}){return this.primitiveN("uint32le",e,t)}uint32be(e,t={}){return this.primitiveN("uint32be",e,t)}int8(e,t={}){return this.primitiveN("int8",e,t)}int16(e,t={}){return this.primitiveN(this.useThisEndian("int16"),e,t)}int16le(e,t={}){return this.primitiveN("int16le",e,t)}int16be(e,t={}){return this.primitiveN("int16be",e,t)}int32(e,t={}){return this.primitiveN(this.useThisEndian("int32"),e,t)}int32le(e,t={}){return this.primitiveN("int32le",e,t)}int32be(e,t={}){return this.primitiveN("int32be",e,t)}bigIntVersionCheck(){if(!DataView.prototype.getBigInt64)throw new Error("BigInt64 is unsupported on this runtime")}int64(e,t={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("int64"),e,t)}int64be(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("int64be",e,t)}int64le(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("int64le",e,t)}uint64(e,t={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("uint64"),e,t)}uint64be(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("uint64be",e,t)}uint64le(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("uint64le",e,t)}floatle(e,t={}){return this.primitiveN("floatle",e,t)}floatbe(e,t={}){return this.primitiveN("floatbe",e,t)}doublele(e,t={}){return this.primitiveN("doublele",e,t)}doublebe(e,t={}){return this.primitiveN("doublebe",e,t)}bitN(e,t,r){return r.length=e,this.setNextParser("bit",t,r)}bit1(e,t={}){return this.bitN(1,e,t)}bit2(e,t={}){return this.bitN(2,e,t)}bit3(e,t={}){return this.bitN(3,e,t)}bit4(e,t={}){return this.bitN(4,e,t)}bit5(e,t={}){return this.bitN(5,e,t)}bit6(e,t={}){return this.bitN(6,e,t)}bit7(e,t={}){return this.bitN(7,e,t)}bit8(e,t={}){return this.bitN(8,e,t)}bit9(e,t={}){return this.bitN(9,e,t)}bit10(e,t={}){return this.bitN(10,e,t)}bit11(e,t={}){return this.bitN(11,e,t)}bit12(e,t={}){return this.bitN(12,e,t)}bit13(e,t={}){return this.bitN(13,e,t)}bit14(e,t={}){return this.bitN(14,e,t)}bit15(e,t={}){return this.bitN(15,e,t)}bit16(e,t={}){return this.bitN(16,e,t)}bit17(e,t={}){return this.bitN(17,e,t)}bit18(e,t={}){return this.bitN(18,e,t)}bit19(e,t={}){return this.bitN(19,e,t)}bit20(e,t={}){return this.bitN(20,e,t)}bit21(e,t={}){return this.bitN(21,e,t)}bit22(e,t={}){return this.bitN(22,e,t)}bit23(e,t={}){return this.bitN(23,e,t)}bit24(e,t={}){return this.bitN(24,e,t)}bit25(e,t={}){return this.bitN(25,e,t)}bit26(e,t={}){return this.bitN(26,e,t)}bit27(e,t={}){return this.bitN(27,e,t)}bit28(e,t={}){return this.bitN(28,e,t)}bit29(e,t={}){return this.bitN(29,e,t)}bit30(e,t={}){return this.bitN(30,e,t)}bit31(e,t={}){return this.bitN(31,e,t)}bit32(e,t={}){return this.bitN(32,e,t)}namely(e){return a.set(e,this),this.alias=e,this}skip(e,t={}){return this.seek(e,t)}seek(e,t={}){if(t.assert)throw new Error("assert option on seek is not allowed.");return this.setNextParser("seek","",{length:e})}string(e,t){if(!t.zeroTerminated&&!t.length&&!t.greedy)throw new Error("One of length, zeroTerminated, or greedy must be defined for string.");if((t.zeroTerminated||t.length)&&t.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(t.stripNull&&!t.length&&!t.greedy)throw new Error("length or greedy must be defined if stripNull is enabled.");return t.encoding=t.encoding||"utf8",this.setNextParser("string",e,t)}buffer(e,t){if(!t.length&&!t.readUntil)throw new Error("length or readUntil must be defined for buffer.");return this.setNextParser("buffer",e,t)}wrapped(e,t){if("object"!=typeof t&&"object"==typeof e&&(t=e,e=""),!t||!t.wrapper||!t.type)throw new Error("Both wrapper and type must be defined for wrapped.");if(!t.length&&!t.readUntil)throw new Error("length or readUntil must be defined for wrapped.");return this.setNextParser("wrapper",e,t)}array(e,t){if(!t.readUntil&&!t.length&&!t.lengthInBytes)throw new Error("One of readUntil, length and lengthInBytes must be defined for array.");if(!t.type)throw new Error("type is required for array.");if("string"==typeof t.type&&!a.has(t.type)&&!(t.type in c))throw new Error(`Array element type "${t.type}" is unkown.`);return this.setNextParser("array",e,t)}choice(e,t){if("object"!=typeof t&&"object"==typeof e&&(t=e,e=""),!t)throw new Error("tag and choices are are required for choice.");if(!t.tag)throw new Error("tag is requird for choice.");if(!t.choices)throw new Error("choices is required for choice.");for(const e in t.choices){const r=parseInt(e,10),n=t.choices[r];if(isNaN(r))throw new Error(`Choice key "${e}" is not a number.`);if("string"==typeof n&&!a.has(n)&&!(n in c))throw new Error(`Choice type "${n}" is unkown.`)}return this.setNextParser("choice",e,t)}nest(e,t){if("object"!=typeof t&&"object"==typeof e&&(t=e,e=""),!t||!t.type)throw new Error("type is required for nest.");if(!(t.type instanceof f||a.has(t.type)))throw new Error("type must be a known parser name or a Parser object.");if(!(t.type instanceof f||e))throw new Error("type must be a Parser object if the variable name is omitted.");return this.setNextParser("nest",e,t)}pointer(e,t){if(!t.offset)throw new Error("offset is required for pointer.");if(!t.type)throw new Error("type is required for pointer.");if("string"==typeof t.type&&!(t.type in c)&&!a.has(t.type))throw new Error(`Pointer type "${t.type}" is unkown.`);return this.setNextParser("pointer",e,t)}saveOffset(e,t={}){return this.setNextParser("saveOffset",e,t)}endianness(e){switch(e.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error('endianness must be one of "little" or "big"')}return this}endianess(e){return this.endianness(e)}useContextVars(e=!0){return this.useContextVariables=e,this}create(e){if(!(e instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=e,this}getContext(e){const t=new i(e,this.useContextVariables);return t.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(t),t.pushCode(`return ${u+this.alias}(0).result;`)):this.addRawCode(t),t}getCode(){return this.getContext("imports").code}addRawCode(e){e.pushCode("var offset = 0;"),e.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),e.pushCode("vars.$parent = null;"),e.pushCode("vars.$root = vars;"),this.generate(e),this.resolveReferences(e),e.pushCode("delete vars.$parent;"),e.pushCode("delete vars.$root;"),e.pushCode("return vars;")}addAliasedCode(e){return e.pushCode(`function ${u+this.alias}(offset, context) {`),e.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),e.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"),e.pushCode("vars = Object.assign(vars, ctx);"),this.generate(e),e.markResolved(this.alias),this.resolveReferences(e),e.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"),e.pushCode("return { offset: offset, result: vars };"),e.pushCode("}"),e}resolveReferences(e){const t=e.getUnresolvedReferences();e.markRequested(t),t.forEach((t=>{var r;null===(r=a.get(t))||void 0===r||r.addAliasedCode(e)}))}compile(){const e="imports",t=this.getContext(e);this.compiled=new Function(e,"TextDecoder",`return function (buffer, constructorFn) { ${t.code} };`)(t.imports,TextDecoder)}sizeOf(){let e=NaN;if(Object.keys(c).indexOf(this.type)>=0)e=c[this.type];else if("string"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("buffer"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("array"===this.type&&"number"==typeof this.options.length){let t=NaN;"string"==typeof this.options.type?t=c[this.options.type]:this.options.type instanceof f&&(t=this.options.type.sizeOf()),e=this.options.length*t}else"seek"===this.type?e=this.options.length:"nest"===this.type?e=this.options.type.sizeOf():this.type||(e=0);return this.next&&(e+=this.next.sizeOf()),e}parse(e){return this.compiled||this.compile(),this.compiled(e,this.constructorFn)}setNextParser(e,t,r){const n=new f;return n.type=e,n.varName=t,n.options=r,n.endian=this.endian,this.head?this.head.next=n:this.next=n,this.head=n,this}generate(e){if(this.type){switch(this.type){case"uint8":case"uint16le":case"uint16be":case"uint32le":case"uint32be":case"int8":case"int16le":case"int16be":case"int32le":case"int32be":case"int64be":case"int64le":case"uint64be":case"uint64le":case"floatle":case"floatbe":case"doublele":case"doublebe":this.primitiveGenerateN(this.type,e);break;case"bit":this.generateBit(e);break;case"string":this.generateString(e);break;case"buffer":this.generateBuffer(e);break;case"seek":this.generateSeek(e);break;case"nest":this.generateNest(e);break;case"array":this.generateArray(e);break;case"choice":this.generateChoice(e);break;case"pointer":this.generatePointer(e);break;case"saveOffset":this.generateSaveOffset(e);break;case"wrapper":this.generateWrapper(e)}"bit"!==this.type&&this.generateAssert(e)}const t=e.generateVariable(this.varName);return this.options.formatter&&"bit"!==this.type&&this.generateFormatter(e,t,this.options.formatter),this.generateNext(e)}generateAssert(e){if(!this.options.assert)return;const t=e.generateVariable(this.varName);switch(typeof this.options.assert){case"function":{const r=e.addImport(this.options.assert);e.pushCode(`if (!${r}.call(vars, ${t})) {`)}break;case"number":e.pushCode(`if (${this.options.assert} !== ${t}) {`);break;case"string":e.pushCode(`if (${JSON.stringify(this.options.assert)} !== ${t}) {`);break;default:throw new Error("assert option must be a string, number or a function.")}e.generateError(`"Assertion error: ${t} is " + ${JSON.stringify(this.options.assert.toString())}`),e.pushCode("}")}generateNext(e){return this.next&&(e=this.next.generate(e)),e}generateBit(e){const t=JSON.parse(JSON.stringify(this));if(t.options=this.options,t.generateAssert=this.generateAssert.bind(this),t.generateFormatter=this.generateFormatter.bind(this),t.varName=e.generateVariable(t.varName),e.bitFields.push(t),!this.next||this.next&&["bit","nest"].indexOf(this.next.type)<0){const t=e.generateTmpVariable();e.pushCode(`var ${t} = 0;`);const r=(t=0)=>{let r=0;for(let n=t;n32)break;r+=t}return r},n=r=>(r<=8?(e.pushCode(`${t} = dataView.getUint8(offset);`),r=8):r<=16?(e.pushCode(`${t} = dataView.getUint16(offset);`),r=16):r<=24?(e.pushCode(`${t} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`),r=24):(e.pushCode(`${t} = dataView.getUint32(offset);`),r=32),e.pushCode(`offset += ${r/8};`),r);let o=0;const i="be"===this.endian;let a=0,u=0;e.bitFields.forEach(((c,l)=>{let s=c.options.length;if(s>u){if(u){const r=-1>>>32-u;e.pushCode(`${c.varName} = (${t} & 0x${r.toString(16)}) << ${s-u};`),s-=u}o=0,u=a=n(r(l)-u)}const f=i?a-o-s:o,p=-1>>>32-s;e.pushCode(`${c.varName} ${s> ${f} & 0x${p.toString(16)};`),32===c.options.length&&e.pushCode(`${c.varName} >>>= 0`),c.options.assert&&c.generateAssert(e),c.options.formatter&&c.generateFormatter(e,c.varName,c.options.formatter),o+=s,u-=s})),e.bitFields=[]}}generateSeek(e){const t=e.generateOption(this.options.length);e.pushCode(`offset += ${t};`)}generateString(e){const t=e.generateVariable(this.varName),r=e.generateTmpVariable(),n=this.options.encoding,o="hex"===n.toLowerCase(),i='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){const a=this.options.length;e.pushCode(`var ${r} = offset;`),e.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${r} < ${a});`);const u=`offset - ${r} < ${a} ? offset - 1 : offset`;e.pushCode(o?`${t} = Array.from(buffer.subarray(${r}, ${u}), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(${r}, ${u}));`)}else if(this.options.length){const r=e.generateOption(this.options.length);e.pushCode(o?`${t} = Array.from(buffer.subarray(offset, offset + ${r}), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(offset, offset + ${r}));`),e.pushCode(`offset += ${r};`)}else this.options.zeroTerminated?(e.pushCode(`var ${r} = offset;`),e.pushCode("while(dataView.getUint8(offset++) !== 0);"),e.pushCode(o?`${t} = Array.from(buffer.subarray(${r}, offset - 1), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(${r}, offset - 1));`)):this.options.greedy&&(e.pushCode(`var ${r} = offset;`),e.pushCode("while(buffer.length > offset++);"),e.pushCode(o?`${t} = Array.from(buffer.subarray(${r}, offset), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(${r}, offset));`));this.options.stripNull&&e.pushCode(`${t} = ${t}.replace(/\\x00+$/g, '')`)}generateBuffer(e){const t=e.generateVariable(this.varName);if("function"==typeof this.options.readUntil){const r=this.options.readUntil,n=e.generateTmpVariable(),o=e.generateTmpVariable();e.pushCode(`var ${n} = offset;`),e.pushCode(`var ${o} = 0;`),e.pushCode("while (offset < buffer.length) {"),e.pushCode(`${o} = dataView.getUint8(offset);`);const i=e.addImport(r);e.pushCode(`if (${i}.call(${e.generateVariable()}, ${o}, buffer.subarray(offset))) break;`),e.pushCode("offset += 1;"),e.pushCode("}"),e.pushCode(`${t} = buffer.subarray(${n}, offset);`)}else if("eof"===this.options.readUntil)e.pushCode(`${t} = buffer.subarray(offset);`);else{const r=e.generateOption(this.options.length);e.pushCode(`${t} = buffer.subarray(offset, offset + ${r});`),e.pushCode(`offset += ${r};`)}this.options.clone&&e.pushCode(`${t} = buffer.constructor.from(${t});`)}generateArray(e){const t=e.generateOption(this.options.length),r=e.generateOption(this.options.lengthInBytes),n=this.options.type,o=e.generateTmpVariable(),i=e.generateVariable(this.varName),p=e.generateTmpVariable(),d=this.options.key,h="string"==typeof d;if(h?e.pushCode(`${i} = {};`):e.pushCode(`${i} = [];`),"function"==typeof this.options.readUntil?e.pushCode("do {"):"eof"===this.options.readUntil?e.pushCode(`for (var ${o} = 0; offset < buffer.length; ${o}++) {`):void 0!==r?e.pushCode(`for (var ${o} = offset + ${r}; offset < ${o}; ) {`):e.pushCode(`for (var ${o} = ${t}; ${o} > 0; ${o}--) {`),"string"==typeof n)if(a.get(n)){const i=e.generateTmpVariable();if(e.pushCode(`var ${i} = ${u+n}(offset, {`),e.useContextVariables){const n=e.generateVariable();e.pushCode(`$parent: ${n},`),e.pushCode(`$root: ${n}.$root,`),this.options.readUntil||void 0!==r||e.pushCode(`$index: ${t} - ${o},`)}e.pushCode("});"),e.pushCode(`var ${p} = ${i}.result; offset = ${i}.offset;`),n!==this.alias&&e.addReference(n)}else{const t=l[n],r=s[n];e.pushCode(`var ${p} = dataView.get${t}(offset, ${r});`),e.pushCode(`offset += ${c[n]};`)}else if(n instanceof f){e.pushCode(`var ${p} = {};`);const i=e.generateVariable();e.pushScope(p),e.useContextVariables&&(e.pushCode(`${p}.$parent = ${i};`),e.pushCode(`${p}.$root = ${i}.$root;`),this.options.readUntil||void 0!==r||e.pushCode(`${p}.$index = ${t} - ${o};`)),n.generate(e),e.useContextVariables&&(e.pushCode(`delete ${p}.$parent;`),e.pushCode(`delete ${p}.$root;`),e.pushCode(`delete ${p}.$index;`)),e.popScope()}if(h?e.pushCode(`${i}[${p}.${d}] = ${p};`):e.pushCode(`${i}.push(${p});`),e.pushCode("}"),"function"==typeof this.options.readUntil){const t=this.options.readUntil,r=e.addImport(t);e.pushCode(`while (!${r}.call(${e.generateVariable()}, ${p}, buffer.subarray(offset)));`)}}generateChoiceCase(e,t,r){if("string"==typeof r){const t=e.generateVariable(this.varName);if(a.has(r)){const n=e.generateTmpVariable();e.pushCode(`var ${n} = ${u+r}(offset, {`),e.useContextVariables&&(e.pushCode(`$parent: ${t}.$parent,`),e.pushCode(`$root: ${t}.$root,`)),e.pushCode("});"),e.pushCode(`${t} = ${n}.result; offset = ${n}.offset;`),r!==this.alias&&e.addReference(r)}else{const n=l[r],o=s[r];e.pushCode(`${t} = dataView.get${n}(offset, ${o});`),e.pushCode(`offset += ${c[r]}`)}}else r instanceof f&&(e.pushPath(t),r.generate(e),e.popPath(t))}generateChoice(e){const t=e.generateOption(this.options.tag),r=e.generateVariable(this.varName);if(this.varName&&(e.pushCode(`${r} = {};`),e.useContextVariables)){const t=e.generateVariable();e.pushCode(`${r}.$parent = ${t};`),e.pushCode(`${r}.$root = ${t}.$root;`)}e.pushCode(`switch(${t}) {`);for(const t in this.options.choices){const r=parseInt(t,10),n=this.options.choices[r];e.pushCode(`case ${r}:`),this.generateChoiceCase(e,this.varName,n),e.pushCode("break;")}e.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(e,this.varName,this.options.defaultChoice):e.generateError(`"Met undefined tag value " + ${t} + " at choice"`),e.pushCode("}"),this.varName&&e.useContextVariables&&(e.pushCode(`delete ${r}.$parent;`),e.pushCode(`delete ${r}.$root;`))}generateNest(e){const t=e.generateVariable(this.varName);if(this.options.type instanceof f){if(this.varName&&(e.pushCode(`${t} = {};`),e.useContextVariables)){const r=e.generateVariable();e.pushCode(`${t}.$parent = ${r};`),e.pushCode(`${t}.$root = ${r}.$root;`)}e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName),this.varName&&e.useContextVariables&&e.useContextVariables&&(e.pushCode(`delete ${t}.$parent;`),e.pushCode(`delete ${t}.$root;`))}else if(a.has(this.options.type)){const r=e.generateTmpVariable();if(e.pushCode(`var ${r} = ${u+this.options.type}(offset, {`),e.useContextVariables){const t=e.generateVariable();e.pushCode(`$parent: ${t},`),e.pushCode(`$root: ${t}.$root,`)}e.pushCode("});"),e.pushCode(`${t} = ${r}.result; offset = ${r}.offset;`),this.options.type!==this.alias&&e.addReference(this.options.type)}}generateWrapper(e){const t=e.generateVariable(this.varName),r=e.generateTmpVariable();if("function"==typeof this.options.readUntil){const t=this.options.readUntil,n=e.generateTmpVariable(),o=e.generateTmpVariable();e.pushCode(`var ${n} = offset;`),e.pushCode(`var ${o} = 0;`),e.pushCode("while (offset < buffer.length) {"),e.pushCode(`${o} = dataView.getUint8(offset);`);const i=e.addImport(t);e.pushCode(`if (${i}.call(${e.generateVariable()}, ${o}, buffer.subarray(offset))) break;`),e.pushCode("offset += 1;"),e.pushCode("}"),e.pushCode(`${r} = buffer.subarray(${n}, offset);`)}else if("eof"===this.options.readUntil)e.pushCode(`${r} = buffer.subarray(offset);`);else{const t=e.generateOption(this.options.length);e.pushCode(`${r} = buffer.subarray(offset, offset + ${t});`),e.pushCode(`offset += ${t};`)}this.options.clone&&e.pushCode(`${r} = buffer.constructor.from(${r});`);const n=e.generateTmpVariable(),o=e.generateTmpVariable(),i=e.generateTmpVariable(),c=e.addImport(this.options.wrapper);if(e.pushCode(`${r} = ${c}.call(this, ${r}).subarray(0);`),e.pushCode(`var ${n} = buffer;`),e.pushCode(`var ${o} = offset;`),e.pushCode(`var ${i} = dataView;`),e.pushCode(`buffer = ${r};`),e.pushCode("offset = 0;"),e.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof f)this.varName&&e.pushCode(`${t} = {};`),e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName);else if(a.has(this.options.type)){const r=e.generateTmpVariable();e.pushCode(`var ${r} = ${u+this.options.type}(0);`),e.pushCode(`${t} = ${r}.result;`),this.options.type!==this.alias&&e.addReference(this.options.type)}e.pushCode(`buffer = ${n};`),e.pushCode(`dataView = ${i};`),e.pushCode(`offset = ${o};`)}generateFormatter(e,t,r){if("function"==typeof r){const n=e.addImport(r);e.pushCode(`${t} = ${n}.call(${e.generateVariable()}, ${t});`)}}generatePointer(e){const t=this.options.type,r=e.generateOption(this.options.offset),n=e.generateTmpVariable(),o=e.generateVariable(this.varName);if(e.pushCode(`var ${n} = offset;`),e.pushCode(`offset = ${r};`),this.options.type instanceof f){if(e.pushCode(`${o} = {};`),e.useContextVariables){const t=e.generateVariable();e.pushCode(`${o}.$parent = ${t};`),e.pushCode(`${o}.$root = ${t}.$root;`)}e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName),e.useContextVariables&&(e.pushCode(`delete ${o}.$parent;`),e.pushCode(`delete ${o}.$root;`))}else if(a.has(this.options.type)){const t=e.generateTmpVariable();if(e.pushCode(`var ${t} = ${u+this.options.type}(offset, {`),e.useContextVariables){const t=e.generateVariable();e.pushCode(`$parent: ${t},`),e.pushCode(`$root: ${t}.$root,`)}e.pushCode("});"),e.pushCode(`${o} = ${t}.result; offset = ${t}.offset;`),this.options.type!==this.alias&&e.addReference(this.options.type)}else if(Object.keys(c).indexOf(this.options.type)>=0){const r=l[t],n=s[t];e.pushCode(`${o} = dataView.get${r}(offset, ${n});`),e.pushCode(`offset += ${c[t]};`)}e.pushCode(`offset = ${n};`)}generateSaveOffset(e){const t=e.generateVariable(this.varName);e.pushCode(`${t} = offset`)}}var p=r(33860),d=r.n(p),h=r(94877),y=r.n(h);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e)return!0}return!1}},{key:"isContiguous",value:function(){return this.ranges.length>1}},{key:"getRanges",value:function(){return this.ranges.map((function(t){return new e(t.min,t.max)}))}},{key:"toString",value:function(){return this.ranges.map((function(e){return"[".concat(e.min,"-").concat(e.max,"]")})).join(",")}},{key:"union",value:function(t){for(var r=this.getRanges().concat(t.getRanges()).sort(this.rangeOrder),n=[],o=r[0],i=1;io.max()+1?(n.push(o),o=a):a.max()>o.max()&&(o=new e(o.min(),a.max()))}return n.push(o),1===n.length?n[0]:new e(n)}},{key:"intersection",value:function(t){for(var r=this,n=t,o=this.ranges(),i=n.ranges(),a=o.length,u=i.length,c=0,l=0,s=[];c=f&&s.push(new e(f,p)),r.max()>n.max()?l+=1:c+=1}if(0===s.length)throw new Error("found range of length 0");return 1===s.length?s[0]:new e(s)}},{key:"coverage",value:function(){var e,t=0,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this.ranges());try{for(r.s();!(e=r.n()).done;){var n=e.value;t+=n.max()-n.min()+1}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"rangeOrder",value:function(e,t){var r=e,n=t;return arguments.length<2&&(n=r,r=this),r.min()n.min()?1:r.max()r.max()?1:0}}],r&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function w(e){let t=e.length;for(;--t>=0;)e[t]=0}const S=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),x=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),O=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),j=new Array(576);w(j);const P=new Array(60);w(P);const k=new Array(512);w(k);const A=new Array(256);w(A);const _=new Array(29);w(_);const C=new Array(30);function L(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}let T,I,R;function M(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}w(C);const N=e=>e<256?k[e]:k[256+(e>>>7)],F=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},D=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{D(e,r[2*t],r[2*t+1])},B=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},z=(e,t,r)=>{const n=new Array(16);let o,i,a=0;for(o=1;o<=15;o++)a=a+r[o-1]<<1,n[o]=a;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=B(n[t]++,t))}},G=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},U=e=>{e.bi_valid>8?F(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},H=(e,t,r,n)=>{const o=2*t,i=2*r;return e[o]{const n=e.heap[r];let o=r<<1;for(;o<=e.heap_len&&(o{let n,o,i,a,u=0;if(0!==e.sym_next)do{n=255&e.pending_buf[e.sym_buf+u++],n+=(255&e.pending_buf[e.sym_buf+u++])<<8,o=e.pending_buf[e.sym_buf+u++],0===n?Z(e,o,t):(i=A[o],Z(e,i+256+1,t),a=S[i],0!==a&&(o-=_[i],D(e,o,a)),n--,i=N(n),Z(e,i,r),a=x[i],0!==a&&(n-=C[i],D(e,n,a)))}while(u{const r=t.dyn_tree,n=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.elems;let a,u,c,l=-1;for(e.heap_len=0,e.heap_max=573,a=0;a>1;a>=1;a--)V(e,r,a);c=i;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],V(e,r,1),u=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=u,r[2*c]=r[2*a]+r[2*u],e.depth[c]=(e.depth[a]>=e.depth[u]?e.depth[a]:e.depth[u])+1,r[2*a+1]=r[2*u+1]=c,e.heap[1]=c++,V(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,n=t.max_code,o=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,s,f,p,d,h,y=0;for(p=0;p<=15;p++)e.bl_count[p]=0;for(r[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)s=e.heap[l],p=r[2*r[2*s+1]+1]+1,p>c&&(p=c,y++),r[2*s+1]=p,s>n||(e.bl_count[p]++,d=0,s>=u&&(d=a[s-u]),h=r[2*s],e.opt_len+=h*(p+d),i&&(e.static_len+=h*(o[2*s+1]+d)));if(0!==y){do{for(p=c-1;0===e.bl_count[p];)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[c]--,y-=2}while(y>0);for(p=c;0!==p;p--)for(s=e.bl_count[p];0!==s;)f=e.heap[--l],f>n||(r[2*f+1]!==p&&(e.opt_len+=(p-r[2*f+1])*r[2*f],r[2*f+1]=p),s--)}})(e,t),z(r,l,e.bl_count)},Q=(e,t,r)=>{let n,o,i=-1,a=t[1],u=0,c=7,l=4;for(0===a&&(c=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=t[2*(n+1)+1],++u{let n,o,i=-1,a=t[1],u=0,c=7,l=4;for(0===a&&(c=138,l=3),n=0;n<=r;n++)if(o=a,a=t[2*(n+1)+1],!(++u{D(e,0+(n?1:0),3),U(e),F(e,r),F(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};var J={_tr_init:e=>{Y||((()=>{let e,t,r,n,o;const i=new Array(16);for(r=0,n=0;n<28;n++)for(_[n]=r,e=0;e<1<>=7;n<30;n++)for(C[n]=o<<7,e=0;e<1<{let o,i,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),W(e,e.l_desc),W(e,e.d_desc),a=(e=>{let t;for(Q(e,e.dyn_ltree,e.l_desc.max_code),Q(e,e.dyn_dtree,e.d_desc.max_code),W(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*E[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==t?K(e,t,r,n):4===e.strategy||i===o?(D(e,2+(n?1:0),3),q(e,j,P)):(D(e,4+(n?1:0),3),((e,t,r,n)=>{let o;for(D(e,t-257,5),D(e,r-1,5),D(e,n-4,4),o=0;o(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+256+1)]++,e.dyn_dtree[2*N(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{D(e,2,3),Z(e,256,j),(e=>{16===e.bi_valid?(F(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},X=(e,t,r,n)=>{let o=65535&e|0,i=e>>>16&65535|0,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{o=o+t[n++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16|0};const ee=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());var te=(e,t,r,n)=>{const o=ee,i=n+r;e^=-1;for(let r=n;r>>8^o[255&(e^t[r])];return-1^e},re={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ne={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:oe,_tr_stored_block:ie,_tr_flush_block:ae,_tr_tally:ue,_tr_align:ce}=J,{Z_NO_FLUSH:le,Z_PARTIAL_FLUSH:se,Z_FULL_FLUSH:fe,Z_FINISH:pe,Z_BLOCK:de,Z_OK:he,Z_STREAM_END:ye,Z_STREAM_ERROR:ve,Z_DATA_ERROR:me,Z_BUF_ERROR:be,Z_DEFAULT_COMPRESSION:ge,Z_FILTERED:we,Z_HUFFMAN_ONLY:Se,Z_RLE:xe,Z_FIXED:Oe,Z_DEFAULT_STRATEGY:Ee,Z_UNKNOWN:je,Z_DEFLATED:Pe}=ne,ke=258,Ae=262,_e=42,Ce=113,Le=666,Te=(e,t)=>(e.msg=re[t],t),Ie=e=>2*e-(e>4?9:0),Re=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Me=e=>{let t,r,n,o=e.w_size;t=e.hash_size,n=t;do{r=e.head[--n],e.head[n]=r>=o?r-o:0}while(--t);t=o,n=t;do{r=e.prev[--n],e.prev[n]=r>=o?r-o:0}while(--t)};let Ne=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},De=(e,t)=>{ae(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Fe(e.strm)},Ze=(e,t)=>{e.pending_buf[e.pending++]=t},Be=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},ze=(e,t,r,n)=>{let o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,t.set(e.input.subarray(e.next_in,e.next_in+o),r),1===e.state.wrap?e.adler=X(e.adler,t,o,r):2===e.state.wrap&&(e.adler=te(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)},Ge=(e,t)=>{let r,n,o=e.max_chain_length,i=e.strstart,a=e.prev_length,u=e.nice_match;const c=e.strstart>e.w_size-Ae?e.strstart-(e.w_size-Ae):0,l=e.window,s=e.w_mask,f=e.prev,p=e.strstart+ke;let d=l[i+a-1],h=l[i+a];e.prev_length>=e.good_match&&(o>>=2),u>e.lookahead&&(u=e.lookahead);do{if(r=t,l[r+a]===h&&l[r+a-1]===d&&l[r]===l[i]&&l[++r]===l[i+1]){i+=2,r++;do{}while(l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&ia){if(e.match_start=t,a=n,n>=u)break;d=l[i+a-1],h=l[i+a]}}}while((t=f[t&s])>c&&0!=--o);return a<=e.lookahead?a:e.lookahead},Ue=e=>{const t=e.w_size;let r,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ae)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Me(e),n+=t),0===e.strm.avail_in)break;if(r=ze(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=Ne(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=Ne(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let r,n,o,i=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,u=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outn+e.strm.avail_in&&(r=n+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Fe(e.strm),n&&(n>r&&(n=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,r-=n),r&&(ze(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===a);return u-=e.strm.avail_in,u&&(u>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=u&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-u,e.strm.next_in),e.strstart),e.strstart+=u,e.insert+=u>e.w_size-e.insert?e.w_size-e.insert:u),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(ze(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,i=o>e.w_size?e.w_size:o,n=e.strstart-e.block_start,(n>=i||(n||t===pe)&&t!==le&&0===e.strm.avail_in&&n<=o)&&(r=n>o?o:n,a=t===pe&&0===e.strm.avail_in&&r===n?1:0,ie(e,e.block_start,r,a),e.block_start+=r,Fe(e.strm)),a?3:1)},Ve=(e,t)=>{let r,n;for(;;){if(e.lookahead=3&&(e.ins_h=Ne(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-Ae&&(e.match_length=Ge(e,r)),e.match_length>=3)if(n=ue(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Ne(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Ne(e,e.ins_h,e.window[e.strstart+1]);else n=ue(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(De(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===pe?(De(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(De(e,!1),0===e.strm.avail_out)?1:2},qe=(e,t)=>{let r,n,o;for(;;){if(e.lookahead=3&&(e.ins_h=Ne(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,n=ue(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=Ne(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(De(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=ue(e,0,e.window[e.strstart-1]),n&&De(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=ue(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===pe?(De(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(De(e,!1),0===e.strm.avail_out)?1:2};function We(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}const Qe=[new We(0,0,0,0,He),new We(4,4,8,4,Ve),new We(4,5,16,8,Ve),new We(4,6,32,32,Ve),new We(4,4,16,16,qe),new We(8,16,32,32,qe),new We(8,16,128,128,qe),new We(8,32,128,256,qe),new We(32,128,258,1024,qe),new We(32,258,258,4096,qe)];function $e(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Pe,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Re(this.dyn_ltree),Re(this.dyn_dtree),Re(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Re(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Re(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ye=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==_e&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Ce&&t.status!==Le?1:0},Ke=e=>{if(Ye(e))return Te(e,ve);e.total_in=e.total_out=0,e.data_type=je;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?_e:Ce,e.adler=2===t.wrap?0:1,t.last_flush=-2,oe(t),he},Je=e=>{const t=Ke(e);var r;return t===he&&((r=e.state).window_size=2*r.w_size,Re(r.head),r.max_lazy_match=Qe[r.level].max_lazy,r.good_match=Qe[r.level].good_length,r.nice_match=Qe[r.level].nice_length,r.max_chain_length=Qe[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},Xe=(e,t,r,n,o,i)=>{if(!e)return ve;let a=1;if(t===ge&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||r!==Pe||n<8||n>15||t<0||t>9||i<0||i>Oe||8===n&&1!==a)return Te(e,ve);8===n&&(n=9);const u=new $e;return e.state=u,u.strm=e,u.status=_e,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<Xe(e,t,Pe,15,8,Ee),deflateInit2:Xe,deflateReset:Je,deflateResetKeep:Ke,deflateSetHeader:(e,t)=>Ye(e)||2!==e.state.wrap?ve:(e.state.gzhead=t,he),deflate:(e,t)=>{if(Ye(e)||t>de||t<0)return e?Te(e,ve):ve;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===Le&&t!==pe)return Te(e,0===e.avail_out?be:ve);const n=r.last_flush;if(r.last_flush=t,0!==r.pending){if(Fe(e),0===e.avail_out)return r.last_flush=-1,he}else if(0===e.avail_in&&Ie(t)<=Ie(n)&&t!==pe)return Te(e,be);if(r.status===Le&&0!==e.avail_in)return Te(e,be);if(r.status===_e&&0===r.wrap&&(r.status=Ce),r.status===_e){let t=Pe+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=Se||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=n<<6,0!==r.strstart&&(t|=32),t+=31-t%31,Be(r,t),0!==r.strstart&&(Be(r,e.adler>>>16),Be(r,65535&e.adler)),e.adler=1,r.status=Ce,Fe(e),0!==r.pending)return r.last_flush=-1,he}if(57===r.status)if(e.adler=0,Ze(r,31),Ze(r,139),Ze(r,8),r.gzhead)Ze(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Ze(r,255&r.gzhead.time),Ze(r,r.gzhead.time>>8&255),Ze(r,r.gzhead.time>>16&255),Ze(r,r.gzhead.time>>24&255),Ze(r,9===r.level?2:r.strategy>=Se||r.level<2?4:0),Ze(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Ze(r,255&r.gzhead.extra.length),Ze(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=te(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(Ze(r,0),Ze(r,0),Ze(r,0),Ze(r,0),Ze(r,0),Ze(r,9===r.level?2:r.strategy>=Se||r.level<2?4:0),Ze(r,3),r.status=Ce,Fe(e),0!==r.pending)return r.last_flush=-1,he;if(69===r.status){if(r.gzhead.extra){let t=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let o=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+o),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=te(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=o,Fe(e),0!==r.pending)return r.last_flush=-1,he;t=0,n-=o}let o=new Uint8Array(r.gzhead.extra);r.pending_buf.set(o.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>t&&(e.adler=te(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=te(e.adler,r.pending_buf,r.pending-n,n)),Fe(e),0!==r.pending)return r.last_flush=-1,he;n=0}t=r.gzindexn&&(e.adler=te(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=te(e.adler,r.pending_buf,r.pending-n,n)),Fe(e),0!==r.pending)return r.last_flush=-1,he;n=0}t=r.gzindexn&&(e.adler=te(e.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(Fe(e),0!==r.pending))return r.last_flush=-1,he;Ze(r,255&e.adler),Ze(r,e.adler>>8&255),e.adler=0}if(r.status=Ce,Fe(e),0!==r.pending)return r.last_flush=-1,he}if(0!==e.avail_in||0!==r.lookahead||t!==le&&r.status!==Le){let n=0===r.level?He(r,t):r.strategy===Se?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(Ue(e),0===e.lookahead)){if(t===le)return 1;break}if(e.match_length=0,r=ue(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(De(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===pe?(De(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(De(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===xe?((e,t)=>{let r,n,o,i;const a=e.window;for(;;){if(e.lookahead<=ke){if(Ue(e),e.lookahead<=ke&&t===le)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(o=e.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){i=e.strstart+ke;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&oe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=ue(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=ue(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(De(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===pe?(De(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(De(e,!1),0===e.strm.avail_out)?1:2})(r,t):Qe[r.level].func(r,t);if(3!==n&&4!==n||(r.status=Le),1===n||3===n)return 0===e.avail_out&&(r.last_flush=-1),he;if(2===n&&(t===se?ce(r):t!==de&&(ie(r,0,0,!1),t===fe&&(Re(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Fe(e),0===e.avail_out))return r.last_flush=-1,he}return t!==pe?he:r.wrap<=0?ye:(2===r.wrap?(Ze(r,255&e.adler),Ze(r,e.adler>>8&255),Ze(r,e.adler>>16&255),Ze(r,e.adler>>24&255),Ze(r,255&e.total_in),Ze(r,e.total_in>>8&255),Ze(r,e.total_in>>16&255),Ze(r,e.total_in>>24&255)):(Be(r,e.adler>>>16),Be(r,65535&e.adler)),Fe(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?he:ye)},deflateEnd:e=>{if(Ye(e))return ve;const t=e.state.status;return e.state=null,t===Ce?Te(e,me):he},deflateSetDictionary:(e,t)=>{let r=t.length;if(Ye(e))return ve;const n=e.state,o=n.wrap;if(2===o||1===o&&n.status!==_e||n.lookahead)return ve;if(1===o&&(e.adler=X(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===o&&(Re(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}const i=e.avail_in,a=e.next_in,u=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Ue(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=Ne(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,Ue(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=a,e.input=u,e.avail_in=i,n.wrap=o,he},deflateInfo:"pako deflate (from Nodeca project)"};const tt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var rt={assign:function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const t in r)tt(r,t)&&(e[t]=r[t])}}return e},flattenChunks:e=>{let t=0;for(let r=0,n=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;ot[254]=ot[254]=1;var it={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,o,i,a=e.length,u=0;for(o=0;o>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},buf2string:(e,t)=>{const r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,o;const i=new Array(2*r);for(o=0,n=0;n4)i[o++]=65533,n+=a-1;else{for(t&=2===a?31:3===a?15:7;a>1&&n1?i[o++]=65533:t<65536?i[o++]=t:(t-=65536,i[o++]=55296|t>>10&1023,i[o++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&nt)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n{(t=t||e.length)>e.length&&(t=e.length);let r=t-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+ot[e[r]]>t?r:t}},at=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const ut=Object.prototype.toString,{Z_NO_FLUSH:ct,Z_SYNC_FLUSH:lt,Z_FULL_FLUSH:st,Z_FINISH:ft,Z_OK:pt,Z_STREAM_END:dt,Z_DEFAULT_COMPRESSION:ht,Z_DEFAULT_STRATEGY:yt,Z_DEFLATED:vt}=ne;function mt(e){this.options=rt.assign({level:ht,method:vt,chunkSize:16384,windowBits:15,memLevel:8,strategy:yt},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new at,this.strm.avail_out=0;let r=et.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==pt)throw new Error(re[r]);if(t.header&&et.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?it.string2buf(t.dictionary):"[object ArrayBuffer]"===ut.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=et.deflateSetDictionary(this.strm,e),r!==pt)throw new Error(re[r]);this._dict_set=!0}}function bt(e,t){const r=new mt(t);if(r.push(e,!0),r.err)throw r.msg||re[r.err];return r.result}mt.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=t===~~t?t:!0===t?ft:ct,"string"==typeof e?r.input=it.string2buf(e):"[object ArrayBuffer]"===ut.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===lt||i===st)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(o=et.deflate(r,i),o===dt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),o=et.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===pt;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},mt.prototype.onData=function(e){this.chunks.push(e)},mt.prototype.onEnd=function(e){e===pt&&(this.result=rt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var gt={Deflate:mt,deflate:bt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,bt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,bt(e,t)},constants:ne};const wt=16209;var St=function(e,t){let r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b,g,w,S,x,O,E,j;const P=e.state;r=e.next_in,E=e.input,n=r+(e.avail_in-5),o=e.next_out,j=e.output,i=o-(t-e.avail_out),a=o+(e.avail_out-257),u=P.dmax,c=P.wsize,l=P.whave,s=P.wnext,f=P.window,p=P.hold,d=P.bits,h=P.lencode,y=P.distcode,v=(1<>>24,p>>>=g,d-=g,g=b>>>16&255,0===g)j[o++]=65535&b;else{if(!(16&g)){if(0==(64&g)){b=h[(65535&b)+(p&(1<>>=g,d-=g),d<15&&(p+=E[r++]<>>24,p>>>=g,d-=g,g=b>>>16&255,!(16&g)){if(0==(64&g)){b=y[(65535&b)+(p&(1<u){e.msg="invalid distance too far back",P.mode=wt;break e}if(p>>>=g,d-=g,g=o-i,S>g){if(g=S-g,g>l&&P.sane){e.msg="invalid distance too far back",P.mode=wt;break e}if(x=0,O=f,0===s){if(x+=c-g,g2;)j[o++]=O[x++],j[o++]=O[x++],j[o++]=O[x++],w-=3;w&&(j[o++]=O[x++],w>1&&(j[o++]=O[x++]))}else{x=o-S;do{j[o++]=j[x++],j[o++]=j[x++],j[o++]=j[x++],w-=3}while(w>2);w&&(j[o++]=j[x++],w>1&&(j[o++]=j[x++]))}break}}break}}while(r>3,r-=w,d-=w<<3,p&=(1<{const c=u.bits;let l,s,f,p,d,h,y=0,v=0,m=0,b=0,g=0,w=0,S=0,x=0,O=0,E=0,j=null;const P=new Uint16Array(16),k=new Uint16Array(16);let A,_,C,L=null;for(y=0;y<=15;y++)P[y]=0;for(v=0;v=1&&0===P[b];b--);if(g>b&&(g=b),0===b)return o[i++]=20971520,o[i++]=20971520,u.bits=1,0;for(m=1;m0&&(0===e||1!==b))return-1;for(k[1]=0,y=1;y<15;y++)k[y+1]=k[y]+P[y];for(v=0;v852||2===e&&O>592)return 1;for(;;){A=y-S,a[v]+1=h?(_=L[a[v]-h],C=j[a[v]-h]):(_=96,C=0),l=1<>S)+s]=A<<24|_<<16|C|0}while(0!==s);for(l=1<>=1;if(0!==l?(E&=l-1,E+=l):E=0,v++,0==--P[y]){if(y===b)break;y=t[r+a[v]]}if(y>g&&(E&p)!==f){for(0===S&&(S=g),d+=m,w=y-S,x=1<852||2===e&&O>592)return 1;f=E&p,o[f]=g<<24|w<<16|d-i|0}}return 0!==E&&(o[d+E]=y-S<<24|64<<16|0),u.bits=g,0};const{Z_FINISH:kt,Z_BLOCK:At,Z_TREES:_t,Z_OK:Ct,Z_STREAM_END:Lt,Z_NEED_DICT:Tt,Z_STREAM_ERROR:It,Z_DATA_ERROR:Rt,Z_MEM_ERROR:Mt,Z_BUF_ERROR:Nt,Z_DEFLATED:Ft}=ne,Dt=16180,Zt=16190,Bt=16191,zt=16192,Gt=16194,Ut=16199,Ht=16200,Vt=16206,qt=16209,Wt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Qt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const $t=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},Yt=e=>{if($t(e))return It;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Dt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Ct},Kt=e=>{if($t(e))return It;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Yt(e)},Jt=(e,t)=>{let r;if($t(e))return It;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?It:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Kt(e))},Xt=(e,t)=>{if(!e)return It;const r=new Qt;e.state=r,r.strm=e,r.window=null,r.mode=Dt;const n=Jt(e,t);return n!==Ct&&(e.state=null),n};let er,tr,rr=!0;const nr=e=>{if(rr){er=new Int32Array(512),tr=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Pt(1,e.lens,0,288,er,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Pt(2,e.lens,0,32,tr,0,e.work,{bits:5}),rr=!1}e.lencode=er,e.lenbits=9,e.distcode=tr,e.distbits=5},or=(e,t,r,n)=>{let o;const i=e.state;return null===i.window&&(i.wsize=1<=i.wsize?(i.window.set(t.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>n&&(o=n),i.window.set(t.subarray(r-n,r-n+o),i.wnext),(n-=o)?(i.window.set(t.subarray(r-n,r),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whaveXt(e,15),inflateInit2:Xt,inflate:(e,t)=>{let r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b,g,w,S,x,O,E=0;const j=new Uint8Array(4);let P,k;const A=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if($t(e)||!e.output||!e.input&&0!==e.avail_in)return It;r=e.state,r.mode===Bt&&(r.mode=zt),a=e.next_out,o=e.output,c=e.avail_out,i=e.next_in,n=e.input,u=e.avail_in,l=r.hold,s=r.bits,f=u,p=c,O=Ct;e:for(;;)switch(r.mode){case Dt:if(0===r.wrap){r.mode=zt;break}for(;s<16;){if(0===u)break e;u--,l+=n[i++]<>>8&255,r.check=te(r.check,j,2,0),l=0,s=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=qt;break}if((15&l)!==Ft){e.msg="unknown compression method",r.mode=qt;break}if(l>>>=4,s-=4,x=8+(15&l),0===r.wbits&&(r.wbits=x),x>15||x>r.wbits){e.msg="invalid window size",r.mode=qt;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(j[0]=255&l,j[1]=l>>>8&255,r.check=te(r.check,j,2,0)),l=0,s=0,r.mode=16182;case 16182:for(;s<32;){if(0===u)break e;u--,l+=n[i++]<>>8&255,j[2]=l>>>16&255,j[3]=l>>>24&255,r.check=te(r.check,j,4,0)),l=0,s=0,r.mode=16183;case 16183:for(;s<16;){if(0===u)break e;u--,l+=n[i++]<>8),512&r.flags&&4&r.wrap&&(j[0]=255&l,j[1]=l>>>8&255,r.check=te(r.check,j,2,0)),l=0,s=0,r.mode=16184;case 16184:if(1024&r.flags){for(;s<16;){if(0===u)break e;u--,l+=n[i++]<>>8&255,r.check=te(r.check,j,2,0)),l=0,s=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(d=r.length,d>u&&(d=u),d&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(i,i+d),x)),512&r.flags&&4&r.wrap&&(r.check=te(r.check,n,d,i)),u-=d,i+=d,r.length-=d),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===u)break e;d=0;do{x=n[i+d++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Bt;break;case 16189:for(;s<32;){if(0===u)break e;u--,l+=n[i++]<>>=7&s,s-=7&s,r.mode=Vt;break}for(;s<3;){if(0===u)break e;u--,l+=n[i++]<>>=1,s-=1,3&l){case 0:r.mode=16193;break;case 1:if(nr(r),r.mode=Ut,t===_t){l>>>=2,s-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=qt}l>>>=2,s-=2;break;case 16193:for(l>>>=7&s,s-=7&s;s<32;){if(0===u)break e;u--,l+=n[i++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=qt;break}if(r.length=65535&l,l=0,s=0,r.mode=Gt,t===_t)break e;case Gt:r.mode=16195;case 16195:if(d=r.length,d){if(d>u&&(d=u),d>c&&(d=c),0===d)break e;o.set(n.subarray(i,i+d),a),u-=d,i+=d,c-=d,a+=d,r.length-=d;break}r.mode=Bt;break;case 16196:for(;s<14;){if(0===u)break e;u--,l+=n[i++]<>>=5,s-=5,r.ndist=1+(31&l),l>>>=5,s-=5,r.ncode=4+(15&l),l>>>=4,s-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=qt;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,s-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},O=Pt(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,O){e.msg="invalid code lengths set",r.mode=qt;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,m=E>>>16&255,b=65535&E,!(v<=s);){if(0===u)break e;u--,l+=n[i++]<>>=v,s-=v,r.lens[r.have++]=b;else{if(16===b){for(k=v+2;s>>=v,s-=v,0===r.have){e.msg="invalid bit length repeat",r.mode=qt;break}x=r.lens[r.have-1],d=3+(3&l),l>>>=2,s-=2}else if(17===b){for(k=v+3;s>>=v,s-=v,x=0,d=3+(7&l),l>>>=3,s-=3}else{for(k=v+7;s>>=v,s-=v,x=0,d=11+(127&l),l>>>=7,s-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=qt;break}for(;d--;)r.lens[r.have++]=x}}if(r.mode===qt)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=qt;break}if(r.lenbits=9,P={bits:r.lenbits},O=Pt(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,O){e.msg="invalid literal/lengths set",r.mode=qt;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},O=Pt(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,O){e.msg="invalid distances set",r.mode=qt;break}if(r.mode=Ut,t===_t)break e;case Ut:r.mode=Ht;case Ht:if(u>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=i,e.avail_in=u,r.hold=l,r.bits=s,St(e,p),a=e.next_out,o=e.output,c=e.avail_out,i=e.next_in,n=e.input,u=e.avail_in,l=r.hold,s=r.bits,r.mode===Bt&&(r.back=-1);break}for(r.back=0;E=r.lencode[l&(1<>>24,m=E>>>16&255,b=65535&E,!(v<=s);){if(0===u)break e;u--,l+=n[i++]<>g)],v=E>>>24,m=E>>>16&255,b=65535&E,!(g+v<=s);){if(0===u)break e;u--,l+=n[i++]<>>=g,s-=g,r.back+=g}if(l>>>=v,s-=v,r.back+=v,r.length=b,0===m){r.mode=16205;break}if(32&m){r.back=-1,r.mode=Bt;break}if(64&m){e.msg="invalid literal/length code",r.mode=qt;break}r.extra=15&m,r.mode=16201;case 16201:if(r.extra){for(k=r.extra;s>>=r.extra,s-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;E=r.distcode[l&(1<>>24,m=E>>>16&255,b=65535&E,!(v<=s);){if(0===u)break e;u--,l+=n[i++]<>g)],v=E>>>24,m=E>>>16&255,b=65535&E,!(g+v<=s);){if(0===u)break e;u--,l+=n[i++]<>>=g,s-=g,r.back+=g}if(l>>>=v,s-=v,r.back+=v,64&m){e.msg="invalid distance code",r.mode=qt;break}r.offset=b,r.extra=15&m,r.mode=16203;case 16203:if(r.extra){for(k=r.extra;s>>=r.extra,s-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=qt;break}r.mode=16204;case 16204:if(0===c)break e;if(d=p-c,r.offset>d){if(d=r.offset-d,d>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=qt;break}d>r.wnext?(d-=r.wnext,h=r.wsize-d):h=r.wnext-d,d>r.length&&(d=r.length),y=r.window}else y=o,h=a-r.offset,d=r.length;d>c&&(d=c),c-=d,r.length-=d;do{o[a++]=y[h++]}while(--d);0===r.length&&(r.mode=Ht);break;case 16205:if(0===c)break e;o[a++]=r.length,c--,r.mode=Ht;break;case Vt:if(r.wrap){for(;s<32;){if(0===u)break e;u--,l|=n[i++]<{if($t(e))return It;let t=e.state;return t.window&&(t.window=null),e.state=null,Ct},inflateGetHeader:(e,t)=>{if($t(e))return It;const r=e.state;return 0==(2&r.wrap)?It:(r.head=t,t.done=!1,Ct)},inflateSetDictionary:(e,t)=>{const r=t.length;let n,o,i;return $t(e)?It:(n=e.state,0!==n.wrap&&n.mode!==Zt?It:n.mode===Zt&&(o=1,o=X(o,t,r,0),o!==n.check)?Rt:(i=or(e,t,r,r),i?(n.mode=16210,Mt):(n.havedict=1,Ct)))},inflateInfo:"pako inflate (from Nodeca project)"},ar=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const ur=Object.prototype.toString,{Z_NO_FLUSH:cr,Z_FINISH:lr,Z_OK:sr,Z_STREAM_END:fr,Z_NEED_DICT:pr,Z_STREAM_ERROR:dr,Z_DATA_ERROR:hr,Z_MEM_ERROR:yr}=ne;function vr(e){this.options=rt.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new at,this.strm.avail_out=0;let r=ir.inflateInit2(this.strm,t.windowBits);if(r!==sr)throw new Error(re[r]);if(this.header=new ar,ir.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=it.string2buf(t.dictionary):"[object ArrayBuffer]"===ur.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=ir.inflateSetDictionary(this.strm,t.dictionary),r!==sr)))throw new Error(re[r])}function mr(e,t){const r=new vr(t);if(r.push(e),r.err)throw r.msg||re[r.err];return r.result}vr.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize,o=this.options.dictionary;let i,a,u;if(this.ended)return!1;for(a=t===~~t?t:!0===t?lr:cr,"[object ArrayBuffer]"===ur.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),i=ir.inflate(r,a),i===pr&&o&&(i=ir.inflateSetDictionary(r,o),i===sr?i=ir.inflate(r,a):i===hr&&(i=pr));r.avail_in>0&&i===fr&&r.state.wrap>0&&0!==e[r.next_in];)ir.inflateReset(r),i=ir.inflate(r,a);switch(i){case dr:case hr:case pr:case yr:return this.onEnd(i),this.ended=!0,!1}if(u=r.avail_out,r.next_out&&(0===r.avail_out||i===fr))if("string"===this.options.to){let e=it.utf8border(r.output,r.next_out),t=r.next_out-e,o=it.buf2string(r.output,e);r.next_out=t,r.avail_out=n-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(o)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(i!==sr||0!==u){if(i===fr)return i=ir.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},vr.prototype.onData=function(e){this.chunks.push(e)},vr.prototype.onEnd=function(e){e===sr&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=rt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var br={Inflate:vr,inflate:mr,inflateRaw:function(e,t){return(t=t||{}).raw=!0,mr(e,t)},ungzip:mr,constants:ne};const{Deflate:gr,deflate:wr,deflateRaw:Sr,gzip:xr}=gt,{Inflate:Or,inflate:Er,inflateRaw:jr,ungzip:Pr}=br;var kr=jr;function Ar(e){return Ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ar(e)}function _r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;t&&r&&Number(a.offset)-r<=2e3?(t.length=BigInt(Number(t.length)+Number(a.length)-r+Number(a.offset)),t.blocks.push(a)):o.push(t={blocks:[a],length:a.length,offset:a.offset}),r=Number(t.offset)+Number(t.length)}}catch(e){i.e(e)}finally{i.f()}return o}function Fr(e){if(e&&e.aborted){if("undefined"==typeof DOMException){var t=new Mr("aborted");throw t.code="ERR_ABORTED",t}throw new DOMException("aborted","AbortError")}}function Dr(e){return Dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dr(e)}function Zr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Br(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Hr(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Vr(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Hr(i,n,o,a,u,"next",e)}function u(e){Hr(i,n,o,a,u,"throw",e)}a(void 0)}))}}function qr(e,t){for(var r=0;r=r}var Yr=function(){function e(t,r,n,i,a,u){var c,l=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bbi=t,this.refsByName=r,this.cirTreeOffset=n,this.isBigEndian=i,this.isCompressed=a,this.blockType=u,this.featureCache=new(d())({cache:new(y())({maxSize:1e3}),fill:(c=Vr(Ur().mark((function e(t,r){var n,i,a,u;return Ur().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Number(t.length),i=Number(t.offset),e.next=4,l.bbi.read(o.Buffer.alloc(n),0,n,i,{signal:r});case 4:return a=e.sent,u=a.buffer,e.abrupt("return",u);case 7:case"end":return e.stop()}}),e)}))),function(e,t){return c.apply(this,arguments)})}),!(n>=0))throw new Error("invalid cirTreeOffset!");var s=function(e){var t,r=e?"big":"little",n=(new f).endianess(r).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),o=(new f).endianess(r).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:(new f).endianess(r).array("blocksToFetch",{length:"cnt",type:(new f).endianess(r).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:(new f).array("recurOffsets",{length:"cnt",type:(new f).endianess(r).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),i=(new f).endianess(r).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:(new f).endianess(r).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:(t={},Wr(t,3,(new f).array("items",{length:"itemCount",type:(new f).floatle("score")})),Wr(t,2,(new f).array("items",{length:"itemCount",type:(new f).endianess(r).int32("start").floatle("score")})),Wr(t,1,(new f).array("items",{length:"itemCount",type:(new f).endianess(r).int32("start").int32("end").floatle("score")})),t)}),bigBedParser:i,summaryParser:n,leafParser:o}}(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}var t,r,n,i;return t=e,r=[{key:"readWigData",value:(i=Vr(Ur().mark((function e(t,r,n,i,a){var u,c,l,s,f,p,d,h,y,v,m,b,w,S,x,O=this;return Ur().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,u=this.refsByName,c=this.bbi,l=this.cirTreeOffset,s=this.isBigEndian,void 0===(f=u[t])&&i.complete(),p={chrId:f,start:r,end:n},this.cirTreePromise||(this.cirTreePromise=c.read(o.Buffer.alloc(48),0,48,Number(l),a)),e.next=8,this.cirTreePromise;case 8:return d=e.sent,h=d.buffer,y=s?h.readUInt32BE(4):h.readUInt32LE(4),v=[],m=0,b=function(e,t,r){try{var n=e.subarray(t),o=O.leafParser.parse(n);if(o.blocksToFetch&&(v=v.concat(o.blocksToFetch.filter((function(e){return w(e)})).map((function(e){return{offset:e.blockOffset,length:e.blockSize}})))),o.recurOffsets){var a=o.recurOffsets.filter((function(e){return w(e)})).map((function(e){return Number(e.blockOffset)}));a.length>0&&x(a,r+1)}}catch(e){i.error(e)}},w=function(e){var t=e.startChrom,o=e.startBase,i=e.endChrom,a=e.endBase;return(tf||i===f&&a>=r)},S=function(){var e=Vr(Ur().mark((function e(t,r,n){var o,u,c,l,s,f;return Ur().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=r.max()-r.min(),u=r.min(),e.next=5,O.featureCache.get("".concat(o,"_").concat(u),{length:o,offset:u},null==a?void 0:a.signal);case 5:c=e.sent,l=zr(t);try{for(l.s();!(s=l.n()).done;)f=s.value,r.contains(f)&&(b(c,f-u,n),0==(m-=1)&&O.readFeatures(i,v,Br(Br({},a),{},{request:p})))}catch(e){l.e(e)}finally{l.f()}e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),i.error(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,r,n){return e.apply(this,arguments)}}(),x=function(e,t){try{m+=e.length;for(var r=4+32*Number(y),n=new g(e[0],e[0]+r),o=1;o2&&void 0!==s[2]?s[2]:{},e.prev=1,o=this.blockType,i=this.isCompressed,a=n.signal,u=n.request,c=Nr(r),Fr(a),e.next=8,Promise.all(c.map(function(){var e=Vr(Ur().mark((function e(r){var n,c,s,f,p,d,h,y;return Ur().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Fr(a),n=r.length,c=r.offset,e.next=4,l.featureCache.get("".concat(n,"_").concat(c),r,a);case 4:s=e.sent,f=zr(r.blocks),e.prev=6,f.s();case 8:if((p=f.n()).done){e.next=27;break}d=p.value,Fr(a),h=Number(d.offset)-Number(r.offset),y=s,i&&(v=s.subarray(h),y=kr(v.subarray(2)),h=0),Fr(a),e.t0=o,e.next="summary"===e.t0?18:"bigwig"===e.t0?20:"bigbed"===e.t0?22:24;break;case 18:return t.next(l.parseSummaryBlock(y,h,u)),e.abrupt("break",25);case 20:return t.next(l.parseBigWigBlock(y,h,u)),e.abrupt("break",25);case 22:return t.next(l.parseBigBedBlock(y,h,256*Number(d.offset),u)),e.abrupt("break",25);case 24:console.warn("Don't know what to do with ".concat(o));case 25:e.next=8;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(6),f.e(e.t1);case 32:return e.prev=32,f.f(),e.finish(32);case 35:case"end":return e.stop()}var v}),e,null,[[6,29,32,35]])})));return function(t){return e.apply(this,arguments)}}()));case 8:t.complete(),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.error(e.t0);case 14:case"end":return e.stop()}}),e,this,[[1,11]])}))),function(e,t){return n.apply(this,arguments)})}],r&&qr(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Kr=r(93403),Jr=r(7388),Xr=r(71381),en=r(90254);function tn(e){return tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn(e)}function rn(){rn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(L([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==tn(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function nn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function on(e){for(var t=1;t1&&void 0!==y[1]?y[1]:2e3,e.next=3,this.bbi.read(o.Buffer.alloc(r),0,r,0,t);case 3:if(n=e.sent,i=n.buffer,a=this._isBigEndian(i),u=pn(a),c=u.headerParser.parse(i),l=c.magic,s=c.asOffset,f=c.totalSummaryOffset,c.fileType=l===fn?"bigbed":"bigwig",!(s>r||f>r)){e.next=12;break}return e.abrupt("return",this._getMainHeader(t,2*r));case 12:if(s&&(p=Number(c.asOffset),c.autoSql=(v=i.subarray(p,i.indexOf(0,p)),(new TextDecoder).decode(v))),!(c.totalSummaryOffset>r-40)){e.next=15;break}return e.abrupt("return",this._getMainHeader(t,2*r));case 15:return c.totalSummaryOffset&&(d=i.subarray(Number(c.totalSummaryOffset)),h=u.totalSummaryParser.parse(d),c.totalSummary=on(on({},h),{},{basesCovered:Number(h.basesCovered)})),e.abrupt("return",on(on({},c),{},{isBigEndian:a}));case 17:case"end":return e.stop()}var v}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"_isBigEndian",value:function(e){var t=e.readInt32LE(0);if(t===sn||t===fn)return!1;if((t=e.readInt32BE(0))===sn||t===fn)return!0;throw new Error("not a BigWig/BigBed file")}},{key:"_readChromTree",value:(u=un(rn().mark((function e(t,r){var n,i,a,u,c,l,s,p,d,h,y,v,m,b,g,w=this;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=t.isBigEndian,i=n?"big":"little",a=[],u={},c=Number(t.unzoomedDataOffset),l=Number(t.chromTreeOffset);c%4!=0;)c+=1;return s=c-l,e.next=10,this.bbi.read(o.Buffer.alloc(s),0,s,Number(l),r);case 10:return p=e.sent,d=p.buffer,h=pn(n),y=h.chromTreeParser.parse(d),v=y.keySize,m=(new f).endianess(i).string("key",{stripNull:!0,length:v}).uint32("refId").uint32("refSize").saveOffset("offset"),b=(new f).endianess(i).skip(v).uint64("childOffset").saveOffset("offset"),g=function(){var e=un(rn().mark((function e(t){var r,n,o,i,c,s,f,p,y,v,S,x,O,E;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((r=t)>=d.length)){e.next=3;break}throw new Error("reading beyond end of buffer");case 3:if(n=h.isLeafNode.parse(d.subarray(r)),o=n.isLeafNode,i=n.cnt,r+=n.offset,!o){e.next=10;break}for(c=0;c0,u));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getFeatureStream",value:(i=un(rn().mark((function e(t,r,n,o){var i,a,u,c,l;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader(o);case 2:if(i=this.renameRefSeqs(t),c=(u=o||{}).basesPerSpan,l=u.scale,!c){e.next=10;break}return e.next=7,this.getView(1/c,o);case 7:a=e.sent,e.next=19;break;case 10:if(!l){e.next=16;break}return e.next=13,this.getView(l,o);case 13:a=e.sent,e.next=19;break;case 16:return e.next=18,this.getView(1,o);case 18:a=e.sent;case 19:return e.abrupt("return",new Jr.y((function(e){a.readWigData(i,r,n,e,o)})));case 20:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return i.apply(this,arguments)})},{key:"getFeatures",value:(n=un(rn().mark((function e(t,r,n,o){var i,a;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getFeatureStream(t,r,n,o);case 2:return i=e.sent,e.next=5,(0,Xr.z)(i.pipe((0,en.q)()));case 5:return a=e.sent,e.abrupt("return",a.flat());case 7:case"end":return e.stop()}}),e,this)}))),function(e,t,r,o){return n.apply(this,arguments)})}],r&&cn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function hn(e){return hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hn(e)}function yn(){yn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(L([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==hn(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function vn(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function mn(e,t){for(var r=0;r=0)){e.next=20;break}if(!((p=o[f])&&p.reductionLevel<=2*l)){e.next=17;break}return d=Number(p.indexOffset),e.abrupt("return",new Yr(this.bbi,i,d,u,c>0,"summary"));case 17:f-=1,e.next=12;break;case 20:return e.abrupt("return",this.getUnzoomedView(r));case 21:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){vn(i,r,o,a,u,"next",e)}function u(e){vn(i,r,o,a,u,"throw",e)}a(void 0)}))},function(e,t){return o.apply(this,arguments)})}],r&&mn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(dn),Sn=r(92803),xn=r(78283),On=r(6994);function En(e){return En="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},En(e)}var jn=["signal"];function Pn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=kn(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function kn(e,t){if(e){if("string"==typeof e)return An(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?An(e,t):void 0}}function An(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Cn(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Ln(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Cn(i,n,o,a,u,"next",e)}function u(e){Cn(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Tn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function In(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.signal,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,jn);return this.readIndicesCache.get(JSON.stringify(r),e,t)}},{key:"getView",value:(u=Ln(_n().mark((function e(t,r){return _n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getUnzoomedView(r));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"_readIndices",value:(a=Ln(_n().mark((function e(t){var r,n,i,a,u,c,l,s,p,d,h,y,v,m,b,g;return _n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader(t);case 2:return r=e.sent,n=r.extHeaderOffset,i=r.isBigEndian,e.next=7,this.bbi.read(o.Buffer.alloc(64),0,64,Number(n));case 7:if(a=e.sent,u=a.buffer,c=i?"big":"little",l=(new f).endianess(c).uint16("size").uint16("count").uint64("offset").parse(u),s=l.count,p=l.offset,0!==s){e.next=14;break}return e.abrupt("return",[]);case 14:return h=(d=20)*s,e.next=18,this.bbi.read(o.Buffer.alloc(h),0,h,Number(p));case 18:for(y=e.sent,v=y.buffer,m=(new f).endianess(c).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),b=[],g=0;g1&&void 0!==l[1]?l[1]:{},e.next=3,this.getHeader(r);case 3:return n=e.sent,i=n.isBigEndian,e.next=7,this.readIndices(r);case 7:if(0!==(a=e.sent).length){e.next=10;break}return e.abrupt("return",[]);case 10:return u=a.map(function(){var e=Ln(_n().mark((function e(n){var a,u,l,s,p,d,h,y,v,m,b,g;return _n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.offset,u=n.field,e.next=3,c.bbi.read(o.Buffer.alloc(32),0,32,Number(a),r);case 3:return l=e.sent,s=l.buffer,p=i?"big":"little",d=(new f).endianess(p).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),h=d.parse(s),y=h.blockSize,v=h.keySize,m=h.valSize,b=(new f).endianess(p).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:(new f).array("leafkeys",{length:"cnt",type:(new f).endianess(p).string("key",{length:v,stripNull:!0}).uint64("offset")}),1:(new f).array("keys",{length:"cnt",type:(new f).endianess(p).string("key",{length:v,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),g=function(){var e=Ln(_n().mark((function e(n){var i,a,l,s,f,p,d,h,w;return _n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Number(n),a=4+y*(v+m),e.next=4,c.bbi.read(o.Buffer.alloc(a),0,a,i,r);case 4:if(l=e.sent,s=l.buffer,!(f=b.parse(s)).leafkeys){e.next=18;break}d=0;case 9:if(!(d1&&void 0!==u[1]?u[1]:{},e.next=3,this.searchExtraIndexBlocks(t,r);case 3:if(0!==(n=e.sent).length){e.next=6;break}return e.abrupt("return",[]);case 6:return e.next=8,this.getUnzoomedView(r);case 8:return o=e.sent,i=n.map((function(e){return new Jr.y((function(t){o.readFeatures(t,[e],r)})).pipe((0,xn.u)((function(e,t){return e.concat(t)})),(0,On.U)((function(t){var r,n=Pn(t);try{for(n.s();!(r=n.n()).done;)r.value.field=e.field}catch(e){n.e(e)}finally{n.f()}return t})))})),e.next=12,(0,Xr.z)(Sn.T.apply(void 0,function(e){if(Array.isArray(e))return An(e)}(c=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||kn(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));case 12:return a=e.sent,e.abrupt("return",a.filter((function(e){var r;return(null===(r=e.rest)||void 0===r?void 0:r.split("\t")[(e.field||0)-3])===t})));case 14:case"end":return e.stop()}var c}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&Rn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(dn)},316:e=>{"use strict";function t(e,r,n,o){this.message=e,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(t,Error),t.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;tMe&&(Me=Te,Ne=[]),Ne.push(e))}function Ve(){var t,r,n,i,a,p,d;return t=Te,et()!==o&&(r=qe())!==o&&et()!==o&&(n=We())!==o&&et()!==o&&(i=$e())!==o&&et()!==o?(40===e.charCodeAt(Te)?(a=u,Te++):(a=o,0===Fe&&He(c)),a!==o&&et()!==o?(p=function(){var e,t,r,n,i;if(e=Te,(t=Ye())!==o)if(et()!==o){for(r=[],n=Te,et()!==o&&(i=Ye())!==o?(Ie=n,n=P(t,i)):(Te=n,n=o);n!==o;)r.push(n),n=Te,et()!==o&&(i=Ye())!==o?(Ie=n,n=P(t,i)):(Te=n,n=o);r!==o&&(n=et())!==o?(Ie=e,e=t=k(t,r)):(Te=e,e=o)}else Te=e,e=o;else Te=e,e=o;return e}(),p!==o&&et()!==o?(41===e.charCodeAt(Te)?(d=l,Te++):(d=o,0===Fe&&He(s)),d!==o&&et()!==o?(Ie=t,t=f(r,n,i,p)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o),t}function qe(){var t;return e.substr(Te,6)===p?(t=p,Te+=6):(t=o,0===Fe&&He(d)),t===o&&(e.substr(Te,6)===h?(t=h,Te+=6):(t=o,0===Fe&&He(y)),t===o&&(e.substr(Te,5)===v?(t=v,Te+=5):(t=o,0===Fe&&He(m)))),t}function We(){var t,r,n,i;return(t=Je())===o&&(t=Te,(r=Je())!==o&&(n=Qe())!==o?t=r=[r,n]:(Te=t,t=o),t===o&&(t=Te,(r=Je())!==o?(e.substr(Te,4)===b?(n=b,Te+=4):(n=o,0===Fe&&He(g)),n!==o?t=r=[r,n]:(Te=t,t=o)):(Te=t,t=o),t===o&&(t=Te,(r=Je())!==o&&(n=Qe())!==o?(e.substr(Te,4)===b?(i=b,Te+=4):(i=o,0===Fe&&He(g)),i!==o?t=r=[r,n,i]:(Te=t,t=o)):(Te=t,t=o)))),t}function Qe(){var t;return e.substr(Te,7)===w?(t=w,Te+=7):(t=o,0===Fe&&He(S)),t===o&&(e.substr(Te,5)===x?(t=x,Te+=5):(t=o,0===Fe&&He(O)),t===o&&(e.substr(Te,6)===E?(t=E,Te+=6):(t=o,0===Fe&&He(j)))),t}function $e(){var e;return(e=Xe())===o&&(e=et()),e}function Ye(){var t,r,n,i,a,f,p,d;return t=Te,(r=Ke())!==o&&et()!==o&&(n=Je())!==o&&et()!==o?(59===e.charCodeAt(Te)?(i=C,Te++):(i=o,0===Fe&&He(L)),i!==o&&et()!==o&&(a=$e())!==o?(Ie=t,t=r=T(r,n,a)):(Te=t,t=o)):(Te=t,t=o),t===o&&(t=Te,(r=Ke())!==o&&et()!==o?(91===e.charCodeAt(Te)?(n=I,Te++):(n=o,0===Fe&&He(R)),n!==o&&et()!==o?(i=function(){var t;return t=function(){var t,r,n;if(Fe++,t=Te,et()!==o){if(r=[],Pe.test(e.charAt(Te))?(n=e.charAt(Te),Te++):(n=o,0===Fe&&He(ke)),n!==o)for(;n!==o;)r.push(n),Pe.test(e.charAt(Te))?(n=e.charAt(Te),Te++):(n=o,0===Fe&&He(ke));else r=o;r!==o?(Ie=t,t=Ae()):(Te=t,t=o)}else Te=t,t=o;return Fe--,t===o&&(o,0===Fe&&He(je)),t}(),t===o&&(t=Je()),t}(),i!==o&&et()!==o?(93===e.charCodeAt(Te)?(a=M,Te++):(a=o,0===Fe&&He(N)),a!==o&&et()!==o&&(f=Je())!==o&&et()!==o?(59===e.charCodeAt(Te)?(p=C,Te++):(p=o,0===Fe&&He(L)),p!==o&&et()!==o&&(d=$e())!==o?(Ie=t,t=r=F(r,i,f,d)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o),t===o&&(t=Te,(r=Ke())!==o&&et()!==o?(40===e.charCodeAt(Te)?(n=u,Te++):(n=o,0===Fe&&He(c)),n!==o&&et()!==o?(i=function(){var t,r,n,i,a,u;if(t=Te,(r=Je())!==o){for(n=[],i=Te,44===e.charCodeAt(Te)?(a=Z,Te++):(a=o,0===Fe&&He(B)),a!==o&&et()!==o&&(u=Je())!==o?(Ie=i,i=a=P(r,u)):(Te=i,i=o);i!==o;)n.push(i),i=Te,44===e.charCodeAt(Te)?(a=Z,Te++):(a=o,0===Fe&&He(B)),a!==o&&et()!==o&&(u=Je())!==o?(Ie=i,i=a=P(r,u)):(Te=i,i=o);n!==o?(Ie=t,t=r=z(r,n)):(Te=t,t=o)}else Te=t,t=o;return t}(),i!==o&&et()!==o?(41===e.charCodeAt(Te)?(a=l,Te++):(a=o,0===Fe&&He(s)),a!==o&&et()!==o&&(f=Je())!==o&&et()!==o?(59===e.charCodeAt(Te)?(p=C,Te++):(p=o,0===Fe&&He(L)),p!==o&&et()!==o&&(d=$e())!==o?(Ie=t,t=r=D(r,i,f,d)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o),t===o&&(t=function(){var t,r,n,i,a;return t=Te,(r=et())!==o?(n=function(){var t;return 35===e.charCodeAt(Te)?(t=A,Te++):(t=o,0===Fe&&He(_)),t}(),n!==o&&(i=Xe())!==o&&(a=et())!==o?t=r=[r,n,i,a]:(Te=t,t=o)):(Te=t,t=o),t}()))),t}function Ke(){var t,r,n;return e.substr(Te,3)===G?(t=G,Te+=3):(t=o,0===Fe&&He(U)),t===o&&(e.substr(Te,4)===H?(t=H,Te+=4):(t=o,0===Fe&&He(V)),t===o&&(e.substr(Te,5)===q?(t=q,Te+=5):(t=o,0===Fe&&He(W)),t===o&&(e.substr(Te,6)===Q?(t=Q,Te+=6):(t=o,0===Fe&&He($)),t===o&&(e.substr(Te,4)===Y?(t=Y,Te+=4):(t=o,0===Fe&&He(K)),t===o&&(e.substr(Te,5)===J?(t=J,Te+=5):(t=o,0===Fe&&He(X)),t===o&&(e.substr(Te,5)===ee?(t=ee,Te+=5):(t=o,0===Fe&&He(te)),t===o&&(e.substr(Te,4)===re?(t=re,Te+=4):(t=o,0===Fe&&He(ne)),t===o&&(e.substr(Te,6)===oe?(t=oe,Te+=6):(t=o,0===Fe&&He(ie)),t===o&&(e.substr(Te,7)===ae?(t=ae,Te+=7):(t=o,0===Fe&&He(ue)),t===o&&(e.substr(Te,4)===ce?(t=ce,Te+=4):(t=o,0===Fe&&He(le)),t===o&&(e.substr(Te,6)===se?(t=se,Te+=6):(t=o,0===Fe&&He(fe)),t===o&&(e.substr(Te,6)===pe?(t=pe,Te+=6):(t=o,0===Fe&&He(de)),t===o&&(e.substr(Te,3)===he?(t=he,Te+=3):(t=o,0===Fe&&He(ye)),t===o&&(t=Te,(r=qe())!==o&&et()!==o&&(n=We())!==o?(Ie=t,t=r=ve(r,n)):(Te=t,t=o))))))))))))))),t}function Je(){var t,r,n,i,a;if(t=Te,r=Te,me.test(e.charAt(Te))?(n=e.charAt(Te),Te++):(n=o,0===Fe&&He(be)),n!==o){for(i=[],ge.test(e.charAt(Te))?(a=e.charAt(Te),Te++):(a=o,0===Fe&&He(we));a!==o;)i.push(a),ge.test(e.charAt(Te))?(a=e.charAt(Te),Te++):(a=o,0===Fe&&He(we));i!==o?r=n=[n,i]:(Te=r,r=o)}else Te=r,r=o;return r!==o&&(Ie=t,r=Se(r)),r}function Xe(){var t,r,n;for(t=Te,r=[],xe.test(e.charAt(Te))?(n=e.charAt(Te),Te++):(n=o,0===Fe&&He(Oe));n!==o;)r.push(n),xe.test(e.charAt(Te))?(n=e.charAt(Te),Te++):(n=o,0===Fe&&He(Oe));return r!==o&&(Ie=t,r=Ee(r)),r}function et(){var t,r;for(Fe++,t=[],Ce.test(e.charAt(Te))?(r=e.charAt(Te),Te++):(r=o,0===Fe&&He(Le));r!==o;)t.push(r),Ce.test(e.charAt(Te))?(r=e.charAt(Te),Te++):(r=o,0===Fe&&He(Le));return Fe--,t===o&&(r=o,0===Fe&&He(_e)),t}if((n=a())!==o&&Te===e.length)return n;throw n!==o&&Te{"use strict";r.d(t,{Z:()=>P});var n={};r.r(n),r.d(n,{bigChain:()=>a,bigGenePred:()=>u,bigInteract:()=>c,bigLink:()=>l,bigMaf:()=>s,bigNarrowPeak:()=>f,bigPsl:()=>p,defaultBedSchema:()=>d,mafFrames:()=>h,mafSummary:()=>y});var o=r(316),i=r.n(o),a='table bigChain\n"bigChain pairwise alignment"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint score; "Score (0-1000)"\n char[1] strand; "+ or - for strand"\n uint tSize; "size of target sequence"\n string qName; "name of query sequence"\n uint qSize; "size of query sequence"\n uint qStart; "start of alignment on query sequence"\n uint qEnd; "end of alignment on query sequence"\n uint chainScore; "score from chain"\n )',u='table bigGenePred\n"bigGenePred gene models"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint score; "Score (0-1000)"\n char[1] strand; "+ or - for strand"\n uint thickStart; "Start of where display should be thick (start codon)"\n uint thickEnd; "End of where display should be thick (stop codon)"\n uint reserved; "RGB value (use R,G,B string in input file)"\n int blockCount; "Number of blocks"\n int[blockCount] blockSizes; "Comma separated list of block sizes"\n int[blockCount] chromStarts; "Start positions relative to chromStart"\n string name2; "Alternative/human readable name"\n string cdsStartStat; "Status of CDS start annotation (none, unknown, incomplete, or complete)"\n string cdsEndStat; "Status of CDS end annotation (none, unknown, incomplete, or complete)"\n int[blockCount] exonFrames; "Exon frame {0,1,2}, or -1 if no frame for exon"\n string type; "Transcript type"\n string geneName; "Primary identifier for gene"\n string geneName2; "Alternative/human readable gene name"\n string geneType; "Gene type"\n )',c='table interact\n"interaction between two regions"\n (\n string chrom; "Chromosome (or contig, scaffold, etc.). For interchromosomal, use 2 records"\n uint chromStart; "Start position of lower region. For interchromosomal, set to chromStart of this region"\n uint chromEnd; "End position of upper region. For interchromosomal, set to chromEnd of this region"\n string name; "Name of item, for display. Usually \'sourceName/targetName/exp\' or empty"\n uint score; "Score (0-1000)"\n double value; "Strength of interaction or other data value. Typically basis for score"\n string exp; "Experiment name (metadata for filtering). Use . if not applicable"\n string color; "Item color. Specified as r,g,b or hexadecimal #RRGGBB or html color name, as in //www.w3.org/TR/css3-color/#html4. Use 0 and spectrum setting to shade by score"\n string sourceChrom; "Chromosome of source region (directional) or lower region. For non-directional interchromosomal, chrom of this region."\n uint sourceStart; "Start position in chromosome of source/lower/this region"\n uint sourceEnd; "End position in chromosome of source/lower/this region"\n string sourceName; "Identifier of source/lower/this region"\n string sourceStrand; "Orientation of source/lower/this region: + or -. Use . if not applicable"\n string targetChrom; "Chromosome of target region (directional) or upper region. For non-directional interchromosomal, chrom of other region"\n uint targetStart; "Start position in chromosome of target/upper/this region"\n uint targetEnd; "End position in chromosome of target/upper/this region"\n string targetName; "Identifier of target/upper/this region"\n string targetStrand; "Orientation of target/upper/this region: + or -. Use . if not applicable"\n\n )',l='table bigLink\n"bigLink pairwise alignment"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint qStart; "start of alignment on query sequence"\n )',s='table bedMaf\n"Bed3 with MAF block"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n lstring mafBlock; "MAF block"\n )',f='table bigNarrowPeak\n"BED6+4 Peaks of signal enrichment based on pooled, normalized (interpreted) data."\n(\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name;\t "Name given to a region (preferably unique). Use . if no name is assigned"\n uint score; "Indicates how dark the peak will be displayed in the browser (0-1000) "\n char[1] strand; "+ or - or . for unknown"\n float signalValue; "Measurement of average enrichment for the region"\n float pValue; "Statistical significance of signal value (-log10). Set to -1 if not used."\n float qValue; "Statistical significance with multiple-test correction applied (FDR -log10). Set to -1 if not used."\n int peak; "Point-source called for this peak; 0-based offset from chromStart. Set to -1 if no point-source called."\n)',p='table bigPsl\n"bigPsl pairwise alignment"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint score; "Score (0-1000)"\n char[1] strand; "+ or - indicates whether the query aligns to the + or - strand on the reference"\n uint thickStart; "Start of where display should be thick (start codon)"\n uint thickEnd; "End of where display should be thick (stop codon)"\n uint reserved; "RGB value (use R,G,B string in input file)"\n int blockCount; "Number of blocks"\n int[blockCount] blockSizes; "Comma separated list of block sizes"\n int[blockCount] chromStarts; "Start positions relative to chromStart"\n\n uint oChromStart;"Start position in other chromosome"\n uint oChromEnd; "End position in other chromosome"\n char[1] oStrand; "+ or -, - means that psl was reversed into BED-compatible coordinates"\n uint oChromSize; "Size of other chromosome."\n int[blockCount] oChromStarts; "Start positions relative to oChromStart or from oChromStart+oChromSize depending on strand"\n\n lstring oSequence; "Sequence on other chrom (or empty)"\n string oCDS; "CDS in NCBI format"\n\n uint chromSize;"Size of target chromosome"\n\n uint match; "Number of bases matched."\n uint misMatch; " Number of bases that don\'t match "\n uint repMatch; " Number of bases that match but are part of repeats "\n uint nCount; " Number of \'N\' bases "\n uint seqType; "0=empty, 1=nucleotide, 2=amino_acid"\n )',d='table defaultBedSchema\n"BED12"\n (\n string chrom; "The name of the chromosome (e.g. chr3, chrY, chr2_random) or scaffold (e.g. scaffold10671)."\n uint chromStart; "The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0."\n uint chromEnd; "The ending position of the feature in the chromosome or scaffold. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99."\n string name; "Defines the name of the BED line."\n float score; "Feature score, doesn\'t care about the 0-1000 limit as in bed"\n char strand; "Defines the strand. Either \'.\' (=no strand) or \'+\' or \'-\'"\n uint thickStart; "The starting position at which the feature is drawn thickly (for example, the start codon in gene displays). When there is no thick part, thickStart and thickEnd are usually set to the chromStart position."\n uint thickEnd; "The ending position at which the feature is drawn thickly (for example the stop codon in gene displays)."\n string itemRgb; "An RGB value of the form R,G,B (e.g. 255,0,0). "\n uint blockCount; " The number of blocks (exons) in the BED line."\n uint[blockCount] blockSizes; " A comma-separated list of the block sizes. The number of items in this list should correspond to blockCount."\n uint[blockCount] blockStarts; "A comma-separated list of block starts. All of the blockStart positions should be calculated relative to chromStart. The number of items in this list should correspond to blockCount."\n )',h='table mafFrames\n"codon frame assignment for MAF components"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start range in chromosome"\n uint chromEnd; "End range in chromosome"\n string src; "Name of sequence source in MAF"\n ubyte frame; "frame (0,1,2) for first base(+) or last bast(-)"\n char[1] strand; "+ or -"\n string name; "Name of gene used to define frame"\n int prevFramePos; "target position of the previous base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous"\n int nextFramePos; "target position of the next base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous"\n ubyte isExonStart; "does this start the CDS portion of an exon?"\n ubyte isExonEnd; "does this end the CDS portion of an exon?"\n )',y='table mafSummary\n"Positions and scores for alignment blocks"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string src; "Sequence name or database of alignment"\n float score; "Floating point score."\n char[1] leftStatus; "Gap/break annotation for preceding block"\n char[1] rightStatus; "Gap/break annotation for following block"\n )';function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.autoSql)this.autoSql=S(i().parse(t.autoSql));else if(t.type){if(!m[t.type])throw new Error("Type not found");this.autoSql=S(m[t.type])}else this.autoSql=S(m.defaultBedSchema),this.attemptDefaultBed=!0}var t,r;return t=e,r=[{key:"parseLine",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.autoSql,n=t.uniqueId,o=Array.isArray(e)?e:e.split("\t"),i={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&function(e){var t;return e.length>=12&&!Number.isNaN(parseInt(e[9],10))&&(null===(t=e[10])||void 0===t?void 0:t.split(",").filter((function(e){return!!e})).length)===parseInt(e[9],10)}(o))for(var a=0;a{"use strict";r.r(t),r.d(t,{BgzfFilehandle:()=>te,unzip:()=>s,unzipChunk:()=>p,unzipChunkSlice:()=>h});var n=r(80365),o=r(93403),i=r(33998);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))}}function s(e){return f.apply(this,arguments)}function f(){return(f=l(u().mark((function e(t){var r,o,a,c,l,s,f,p,d,h;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,o=0,a=0,c=[],l=0;case 5:if(f=t.subarray(o),s=new i.Inflate,r=s.strm,s.push(f,i.Z_SYNC_FLUSH),!s.err){e.next=12;break}throw new Error(s.msg);case 12:o+=r.next_in,c[a]=s.result,l+=c[a].length,a+=1;case 16:if(r.avail_in){e.next=5;break}case 17:for(p=new Uint8Array(l),d=0,h=0;d=c.blockPosition)){e.next=30;break}return f[y]=f[y].subarray(0,c.blockPosition===a.blockPosition?c.dataPosition-a.dataPosition+1:c.dataPosition+1),p.push(l),d.push(s),h+=f[y].length,e.abrupt("break",33);case 30:h+=f[y].length,y++;case 32:if(o.avail_in){e.next=9;break}case 33:for(S=new Uint8Array(h),x=0,O=0;x>>=0)&&e<256)&&(n=S[e])?n:(r=E(e,0,!0),o&&(S[e]=r),r):(o=-128<=(e|=0)&&e<128)&&(n=w[e])?n:(r=E(e,e<0?-1:0,!1),o&&(w[e]=r),r)}function O(e,t){if(isNaN(e))return t?I:T;if(t){if(e<0)return I;if(e>=_)return D}else{if(e<=-C)return Z;if(e+1>=C)return F}return e<0?O(-e,t).neg():E(e%A|0,e/A|0,t)}function E(e,t,r){return new m(e,t,r)}m.fromInt=x,m.fromNumber=O,m.fromBits=E;var j=Math.pow;function P(e,t,r){if(0===e.length)throw Error("empty string");if("number"==typeof t?(r=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?I:T;if((r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return P(e.substring(1),t,r).neg();for(var o=O(j(r,8)),i=T,a=0;a>>0:this.low},B.toNumber=function(){return this.unsigned?(this.high>>>0)*A+(this.low>>>0):this.high*A+(this.low>>>0)},B.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((i=u).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},B.getHighBits=function(){return this.high},B.getHighBitsUnsigned=function(){return this.high>>>0},B.getLowBits=function(){return this.low},B.getLowBitsUnsigned=function(){return this.low>>>0},B.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Z)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},B.isOdd=function(){return 1==(1&this.low)},B.isEven=function(){return 0==(1&this.low)},B.equals=function(e){return b(e)||(e=k(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},B.eq=B.equals,B.notEquals=function(e){return!this.eq(e)},B.neq=B.notEquals,B.ne=B.notEquals,B.lessThan=function(e){return this.comp(e)<0},B.lt=B.lessThan,B.lessThanOrEqual=function(e){return this.comp(e)<=0},B.lte=B.lessThanOrEqual,B.le=B.lessThanOrEqual,B.greaterThan=function(e){return this.comp(e)>0},B.gt=B.greaterThan,B.greaterThanOrEqual=function(e){return this.comp(e)>=0},B.gte=B.greaterThanOrEqual,B.ge=B.greaterThanOrEqual,B.compare=function(e){if(b(e)||(e=k(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},B.comp=B.compare,B.negate=function(){return!this.unsigned&&this.eq(Z)?Z:this.not().add(R)},B.neg=B.negate,B.add=function(e){b(e)||(e=k(e));var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,a=65535&e.high,u=e.low>>>16,c=0,l=0,s=0,f=0;return s+=(f+=o+(65535&e.low))>>>16,l+=(s+=n+u)>>>16,c+=(l+=r+a)>>>16,c+=t+i,E((s&=65535)<<16|(f&=65535),(c&=65535)<<16|(l&=65535),this.unsigned)},B.subtract=function(e){return b(e)||(e=k(e)),this.add(e.neg())},B.sub=B.subtract,B.multiply=function(e){if(this.isZero())return this;if(b(e)||(e=k(e)),v)return E(v.mul(this.low,this.high,e.low,e.high),v.get_high(),this.unsigned);if(e.isZero())return this.unsigned?I:T;if(this.eq(Z))return e.isOdd()?Z:T;if(e.eq(Z))return this.isOdd()?Z:T;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(L)&&e.lt(L))return O(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,a=65535&e.high,u=e.low>>>16,c=65535&e.low,l=0,s=0,f=0,p=0;return f+=(p+=o*c)>>>16,s+=(f+=n*c)>>>16,f&=65535,s+=(f+=o*u)>>>16,l+=(s+=r*c)>>>16,s&=65535,l+=(s+=n*u)>>>16,s&=65535,l+=(s+=o*a)>>>16,l+=t*c+r*u+n*a+o*i,E((f&=65535)<<16|(p&=65535),(l&=65535)<<16|(s&=65535),this.unsigned)},B.mul=B.multiply,B.divide=function(e){if(b(e)||(e=k(e)),e.isZero())throw Error("division by zero");var t,r,n;if(v)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?E((this.unsigned?v.div_u:v.div_s)(this.low,this.high,e.low,e.high),v.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?I:T;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return I;if(e.gt(this.shru(1)))return M;n=I}else{if(this.eq(Z))return e.eq(R)||e.eq(N)?Z:e.eq(Z)?R:(t=this.shr(1).div(e).shl(1)).eq(T)?e.isNegative()?R:N:(r=this.sub(e.mul(t)),n=t.add(r.div(e)));if(e.eq(Z))return this.unsigned?I:T;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=T}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(t)/Math.LN2),i=o<=48?1:j(2,o-48),a=O(t),u=a.mul(e);u.isNegative()||u.gt(r);)u=(a=O(t-=i,this.unsigned)).mul(e);a.isZero()&&(a=R),n=n.add(a),r=r.sub(u)}return n},B.div=B.divide,B.modulo=function(e){return b(e)||(e=k(e)),v?E((this.unsigned?v.rem_u:v.rem_s)(this.low,this.high,e.low,e.high),v.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},B.mod=B.modulo,B.rem=B.modulo,B.not=function(){return E(~this.low,~this.high,this.unsigned)},B.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},B.clz=B.countLeadingZeros,B.countTrailingZeros=function(){return this.low?g(this.low):g(this.high)+32},B.ctz=B.countTrailingZeros,B.and=function(e){return b(e)||(e=k(e)),E(this.low&e.low,this.high&e.high,this.unsigned)},B.or=function(e){return b(e)||(e=k(e)),E(this.low|e.low,this.high|e.high,this.unsigned)},B.xor=function(e){return b(e)||(e=k(e)),E(this.low^e.low,this.high^e.high,this.unsigned)},B.shiftLeft=function(e){return b(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?E(this.low<>>32-e,this.unsigned):E(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):E(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},B.shr=B.shiftRight,B.shiftRightUnsigned=function(e){return b(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?E(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):E(32===e?this.high:this.high>>>e-32,0,this.unsigned)},B.shru=B.shiftRightUnsigned,B.shr_u=B.shiftRightUnsigned,B.rotateLeft=function(e){var t;return b(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?E(this.high,this.low,this.unsigned):e<32?(t=32-e,E(this.low<>>t,this.high<>>t,this.unsigned)):(t=32-(e-=32),E(this.high<>>t,this.low<>>t,this.unsigned))},B.rotl=B.rotateLeft,B.rotateRight=function(e){var t;return b(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?E(this.high,this.low,this.unsigned):e<32?(t=32-e,E(this.high<>>e,this.low<>>e,this.unsigned)):(t=32-(e-=32),E(this.low<>>e,this.high<>>e,this.unsigned))},B.rotr=B.rotateRight,B.toSigned=function(){return this.unsigned?E(this.low,this.high,!1):this},B.toUnsigned=function(){return this.unsigned?this:E(this.low,this.high,!0)},B.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},B.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},B.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},m.fromBytes=function(e,t,r){return r?m.fromBytesLE(e,t):m.fromBytesBE(e,t)},m.fromBytesLE=function(e,t){return new m(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},m.fromBytesBE=function(e,t){return new m(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};const z=m;function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function U(){U=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(L([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==G(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function H(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function V(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){H(i,n,o,a,u,"next",e)}function u(e){H(i,n,o,a,u,"throw",e)}a(void 0)}))}}function q(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=z.fromBytesLE(e.slice(t,t+8),r);if(n.greaterThan(Number.MAX_SAFE_INTEGER)||n.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return n.toNumber()}},{key:"_getIndex",value:function(){return this.index||(this.index=this._readIndex()),this.index}},{key:"_readIndex",value:(u=V(U().mark((function e(){var t,r,o,i,a,u,c;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.Buffer.allocUnsafe(8),e.next=3,this.filehandle.read(t,0,8,0);case 3:if(r=this._readLongWithOverflow(t,0,!0)){e.next=6;break}return e.abrupt("return",[[0,0]]);case 6:if((o=new Array(r+1))[0]=[0,0],!((i=16*r)>Number.MAX_SAFE_INTEGER)){e.next=11;break}throw new TypeError("integer overflow");case 11:return t=n.Buffer.allocUnsafe(i),e.next=14,this.filehandle.read(t,0,i,8);case 14:for(a=0;ar?0:n0?c=l-1:s<0&&(u=l+1),l=Math.ceil((c-u)/2)+u,s=a(o[l],o[l+1]);i.push(o[l]),f=l+1;case 15:if(!(f=n)){e.next=19;break}return e.abrupt("break",22);case 19:f+=1,e.next=15;break;case 22:return i[i.length-1][1]e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function J(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function X(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){J(i,n,o,a,u,"next",e)}function u(e){J(i,n,o,a,u,"throw",e)}a(void 0)}))}}function ee(e,t){for(var r=0;r=i?0:i-d,y=Math.min(i+o,d+f.length)-d,h>=0&&h{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){return o="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o(e)}var i=r(80365).Buffer,a=r(64169),u=r(37108)._,c=r(16126);"undefined"!=typeof window&&(window.Buffer=i),"undefined"!=typeof self&&(self.Buffer=i);var l={UInt8:1,UInt16LE:2,UInt16BE:2,UInt32LE:4,UInt32BE:4,Int8:1,Int16LE:2,Int16BE:2,Int32LE:4,Int32BE:4,FloatLE:4,FloatBE:4,DoubleLE:8,DoubleBE:8,UInt64:8,Int64:8},s={},f="___parser_",p=[];!function(){var e;for(e=1;e<=32;e++)p.push(e)}();var d={};Object.keys(l).concat(Object.keys({String:null,Buffer:null,Array:null,Skip:null,Choice:null,Nest:null,Bit:null,Itf8:null,Ltf8:null})).forEach((function(e){d[e.toLowerCase()]=e}));var h=function(){this.varName="",this.type="",this.options={},this.next=null,this.head=null,this.compiled=null,this.endian="le",this.constructorFn=null,this.alias=null};h.start=function(){return new h},Object.keys(l).forEach((function(e){h.prototype[e.toLowerCase()]=function(t,r){return this.setNextParser(e.toLowerCase(),t,r)};var t=e.replace(/BE|LE/,"").toLowerCase();t in h.prototype||(h.prototype[t]=function(e,r){return this[t+this.endian](e,r)})})),p.forEach((function(e){h.prototype["bit".concat(e.toString())]=function(t,r){return r||(r={}),r.length=e,this.setNextParser("bit",t,r)}})),h.prototype.namely=function(e){return s[e]=this,this.alias=e,this},h.prototype.skip=function(e,t){if(t&&t.assert)throw new Error("assert option on skip is not allowed.");return this.setNextParser("skip","",{length:e})},h.prototype.string=function(e,t){if(!t.zeroTerminated&&!t.length&&!t.greedy)throw new Error("Neither length, zeroTerminated, nor greedy is defined for string.");if((t.zeroTerminated||t.length)&&t.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(t.stripNull&&!t.length&&!t.greedy)throw new Error("Length or greedy must be defined if stripNull is defined.");return t.encoding=t.encoding||"utf8",this.setNextParser("string",e,t)},h.prototype.buffer=function(e,t){if(!t.length&&!t.readUntil)throw new Error("Length nor readUntil is defined in buffer parser");return this.setNextParser("buffer",e,t)},h.prototype.array=function(e,t){if(!t.readUntil&&!t.length&&!t.lengthInBytes)throw new Error("Length option of array is not defined.");if(!t.type)throw new Error("Type option of array is not defined.");if("string"==typeof t.type&&!s[t.type]&&Object.keys(l).indexOf(d[t.type])<0)throw new Error('Specified primitive type "'.concat(t.type,'" is not supported.'));return this.setNextParser("array",e,t)},h.prototype.choice=function(e,t){if(1===arguments.length&&"object"===o(e)&&(t=e,e=null),!t.tag)throw new Error("Tag option of array is not defined.");if(!t.choices)throw new Error("Choices option of array is not defined.");return Object.keys(t.choices).forEach((function(r){if(!t.choices[r])throw new Error("Choice Case ".concat(r," of ").concat(e," is not valid."));if("string"==typeof t.choices[r]&&!s[t.choices[r]]&&Object.keys(l).indexOf(d[t.choices[r]])<0)throw new Error('Specified primitive type "'.concat(t.choices[r],'" is not supported.'))}),this),this.setNextParser("choice",e,t)},h.prototype.nest=function(e,t){if(1===arguments.length&&"object"===o(e)&&(t=e,e=null),!t.type)throw new Error("Type option of nest is not defined.");if(!(t.type instanceof h||s[t.type]))throw new Error("Type option of nest must be a Parser object.");if(!(t.type instanceof h||e))throw new Error("options.type must be a object if variable name is omitted.");return this.setNextParser("nest",e,t)},h.prototype.endianess=function(e){switch(e.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error("Invalid endianess: ".concat(e))}return this},h.prototype.create=function(e){if(!(e instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=e,this},h.prototype.getCode=function(){var e=new u;return e.pushCode("if (!Buffer.isBuffer(buffer)) {"),e.generateError('"argument buffer is not a Buffer object"'),e.pushCode("}"),this.alias?this.addAliasedCode(e):this.addRawCode(e),this.alias?e.pushCode("return {0}(0)",f+this.alias):e.pushCode("return { offset: offset, result: vars };"),e.code},h.prototype.addRawCode=function(e){e.pushCode("var offset = 0;"),this.constructorFn?e.pushCode("var vars = new constructorFn();"):e.pushCode("var vars = {};"),this.generate(e),this.resolveReferences(e),e.pushCode("return { offset: offset, result: vars };")},h.prototype.addAliasedCode=function(e){return e.pushCode("function {0}(offset) {",f+this.alias),this.constructorFn?e.pushCode("var vars = new constructorFn();"):e.pushCode("var vars = {};"),this.generate(e),e.markResolved(this.alias),this.resolveReferences(e),e.pushCode("return { offset: offset, result: vars };"),e.pushCode("}"),e},h.prototype.resolveReferences=function(e){var t=e.getUnresolvedReferences();e.markRequested(t),t.forEach((function(t){s[t].addAliasedCode(e)}))},h.prototype.compile=function(){var e="(function(buffer, constructorFn, Long) { ".concat(this.getCode()," })");this.compiled=a.runInThisContext(e)},h.prototype.sizeOf=function(){var e=NaN;if(Object.keys(l).indexOf(this.type)>=0)e=l[this.type];else if("String"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("Buffer"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("Array"===this.type&&"number"==typeof this.options.length){var t=NaN;"string"==typeof this.options.type?t=l[d[this.options.type]]:this.options.type instanceof h&&(t=this.options.type.sizeOf()),e=this.options.length*t}else"Skip"===this.type?e=this.options.length:"Nest"===this.type?e=this.options.type.sizeOf():this.type||(e=0);return this.next&&(e+=this.next.sizeOf()),e},h.prototype.parse=function(e){return this.compiled||this.compile(),this.compiled(e,this.constructorFn,c)},h.prototype.setNextParser=function(e,t,r){var n=new h;return n.type=d[e],n.varName=t,n.options=r||n.options,n.endian=this.endian,this.head?this.head.next=n:this.next=n,this.head=n,this},h.prototype.generate=function(e){this.type&&(this["generate".concat(this.type)](e),this.generateAssert(e));var t=e.generateVariable(this.varName);return this.options.formatter&&this.generateFormatter(e,t,this.options.formatter),this.generateNext(e)},h.prototype.generateAssert=function(e){if(this.options.assert){var t=e.generateVariable(this.varName);switch(o(this.options.assert)){case"function":e.pushCode("if (!({0}).call(vars, {1})) {",this.options.assert,t);break;case"number":e.pushCode("if ({0} !== {1}) {",this.options.assert,t);break;case"string":e.pushCode('if ("{0}" !== {1}) {',this.options.assert,t);break;default:throw new Error("Assert option supports only strings, numbers and assert functions.")}e.generateError('"Assert error: {0} is " + {0}',t),e.pushCode("}")}},h.prototype.generateNext=function(e){return this.next&&(e=this.next.generate(e)),e},Object.keys(l).forEach((function(e){h.prototype["generate".concat(e)]=function(t){"UInt64"===e?t.pushCode("{0} = Long.fromBytes(buffer.slice(offset,offset+8), true, this.endian === 'le').toNumber();",t.generateVariable(this.varName),e):"Int64"===e?t.pushCode("{0} = Long.fromBytes(buffer.slice(offset,offset+8), false, this.endian === 'le').toNumber();",t.generateVariable(this.varName),e):t.pushCode("{0} = buffer.read{1}(offset);",t.generateVariable(this.varName),e),t.pushCode("offset += {0};",l[e])}})),h.prototype.generateBit=function(e){var t=JSON.parse(JSON.stringify(this));if(t.varName=e.generateVariable(t.varName),e.bitFields.push(t),!this.next||this.next&&["Bit","Nest"].indexOf(this.next.type)<0){var r=0;e.bitFields.forEach((function(e){r+=e.options.length}));var n=e.generateTmpVariable();if(r<=8)e.pushCode("var {0} = buffer.readUInt8(offset);",n),r=8;else if(r<=16)e.pushCode("var {0} = buffer.readUInt16BE(offset);",n),r=16;else if(r<=24){var o=e.generateTmpVariable(),i=e.generateTmpVariable();e.pushCode("var {0} = buffer.readUInt16BE(offset);",o),e.pushCode("var {0} = buffer.readUInt8(offset + 2);",i),e.pushCode("var {2} = ({0} << 8) | {1};",o,i,n),r=24}else{if(!(r<=32))throw new Error("Currently, bit field sequence longer than 4-bytes is not supported.");e.pushCode("var {0} = buffer.readUInt32BE(offset);",n),r=32}e.pushCode("offset += {0};",r/8);var a=0,u="be"===this.endian;e.bitFields.forEach((function(t){e.pushCode("{0} = {1} >> {2} & {3};",t.varName,n,u?r-a-t.options.length:a,(1< offset++);"),e.pushCode("{0} = buffer.toString('{1}', {2}, offset);",t,this.options.encoding,r)),this.options.stripNull&&e.pushCode("{0} = {0}.replace(/\\x00+$/g, '')",t)},h.prototype.generateBuffer=function(e){"eof"===this.options.readUntil?e.pushCode("{0} = buffer.slice(offset);",e.generateVariable(this.varName)):(e.pushCode("{0} = buffer.slice(offset, offset + {1});",e.generateVariable(this.varName),e.generateOption(this.options.length)),e.pushCode("offset += {0};",e.generateOption(this.options.length))),this.options.clone&&e.pushCode("{0} = Buffer.from({0});",e.generateVariable(this.varName))},h.prototype.generateArray=function(e){var t=e.generateOption(this.options.length),r=e.generateOption(this.options.lengthInBytes),n=this.options.type,o=e.generateTmpVariable(),i=e.generateVariable(this.varName),a=e.generateTmpVariable(),u=this.options.key,c="string"==typeof u;if(c?e.pushCode("{0} = {};",i):e.pushCode("{0} = [];",i),"function"==typeof this.options.readUntil?e.pushCode("do {"):"eof"===this.options.readUntil?e.pushCode("for (var {0} = 0; offset < buffer.length; {0}++) {",o):void 0!==r?e.pushCode("for (var {0} = offset; offset - {0} < {1}; ) {",o,r):e.pushCode("for (var {0} = 0; {0} < {1}; {0}++) {",o,t),"string"==typeof n)if(s[n]){var p=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",p,f+n),e.pushCode("var {0} = {1}.result; offset = {1}.offset;",a,p),n!==this.alias&&e.addReference(n)}else e.pushCode("var {0} = buffer.read{1}(offset);",a,d[n]),e.pushCode("offset += {0};",l[d[n]]);else n instanceof h&&(e.pushCode("var {0} = {};",a),e.pushScope(a),n.generate(e),e.popScope());c?e.pushCode("{0}[{2}.{1}] = {2};",i,u,a):e.pushCode("{0}.push({1});",i,a),e.pushCode("}"),"function"==typeof this.options.readUntil&&e.pushCode(" while (!({0}).call(this, {1}, buffer.slice(offset)));",this.options.readUntil,a)},h.prototype.generateChoiceCase=function(e,t,r){if("string"==typeof r)if(s[r]){var n=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",n,f+r),e.pushCode("{0} = {1}.result; offset = {1}.offset;",e.generateVariable(this.varName),n),r!==this.alias&&e.addReference(r)}else e.pushCode("{0} = buffer.read{1}(offset);",e.generateVariable(this.varName),d[r]),e.pushCode("offset += {0};",l[d[r]]);else r instanceof h&&(e.pushPath(t),r.generate(e),e.popPath(t))},h.prototype.generateChoice=function(e){var t=e.generateOption(this.options.tag);this.varName&&e.pushCode("{0} = {};",e.generateVariable(this.varName)),e.pushCode("switch({0}) {",t),Object.keys(this.options.choices).forEach((function(t){var r=this.options.choices[t];Number.isNaN(parseInt(t,10))?e.pushCode("case '{0}':",t):e.pushCode("case {0}:",t),this.generateChoiceCase(e,this.varName,r),e.pushCode("break;")}),this),e.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(e,this.varName,this.options.defaultChoice):e.generateError('"Met undefined tag value " + {0} + " at choice"',t),e.pushCode("}")},h.prototype.generateNest=function(e){var t=e.generateVariable(this.varName);if(this.options.type instanceof h)this.varName&&e.pushCode("{0} = {};",t),e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName);else if(s[this.options.type]){var r=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",r,f+this.options.type),e.pushCode("{0} = {1}.result; offset = {1}.offset;",t,r),this.options.type!==this.alias&&e.addReference(this.options.type)}},h.prototype.generateFormatter=function(e,t,r){"function"==typeof r&&e.pushCode("{0} = ({1}).call(this, {0});",t,r)},h.prototype.isInteger=function(){return!!this.type.match(/U?Int[8|16|32][BE|LE]?|Bit\d+/)},h.prototype.itf8=function(e,t){return this.setNextParser("itf8",e,t)},h.prototype.itf8=function(e,t){return this.setNextParser("itf8",e,t)},h.prototype.generateItf8=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();e.pushCode("\n var ".concat(r," = buffer[offset];\n if (").concat(r," < 0x80) {\n ").concat(t," = ").concat(r,";\n offset += 1;\n } else if (").concat(r," < 0xc0) {\n ").concat(t," = ((").concat(r,"<<8) | buffer[offset+1]) & 0x3fff;\n offset += 2;\n } else if (").concat(r," < 0xe0) {\n ").concat(t," = ((").concat(r,"<<16) | (buffer[offset+1]<< 8) | buffer[offset+2]) & 0x1fffff;\n offset += 3;\n } else if (").concat(r," < 0xf0) {\n ").concat(t," = ((").concat(r,"<<24) | (buffer[offset+1]<<16) | (buffer[offset+2]<<8) | buffer[offset+3]) & 0x0fffffff;\n offset += 4\n } else {\n ").concat(t," = ((").concat(r," & 0x0f)<<28) | (buffer[offset+1]<<20) | (buffer[offset+2]<<12) | (buffer[offset+3]<<4) | (buffer[offset+4] & 0x0f);\n // x=((0xff & 0x0f)<<28) | (0xff<<20) | (0xff<<12) | (0xff<<4) | (0x0f & 0x0f);\n // TODO *val_p = uv < 0x80000000UL ? uv : -((int32_t) (0xffffffffUL - uv)) - 1;\n offset += 5\n }\n "))},h.prototype.ltf8=function(e,t){return this.setNextParser("ltf8",e,t)},h.prototype.generateLtf8=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();e.pushCode("\n var ".concat(r," = buffer[offset];\n if (").concat(r," < 0x80) {\n ").concat(t," = ").concat(r,";\n offset += 1;\n } else if (").concat(r," < 0xc0) {\n ").concat(t," = ((buffer[offset]<<8) | buffer[offset+1]) & 0x3fff;\n offset += 2;\n } else if (").concat(r," < 0xe0) {\n ").concat(t," = ((buffer[offset]<<16) | (buffer[offset+1]<<8) | buffer[offset+2]) & 0x1fffff;\n ").concat(t," = (((").concat(r," & 63) << 16) | buffer.readUInt16LE(offset + 1));\n offset += 3;\n } else if (").concat(r," < 0xf0) {\n ").concat(t," = ((buffer[offset]<<24) | (buffer[offset+1]<<16) | (buffer[offset+2]<<8) | buffer[offset+3]) & 0x0fffffff;\n offset += 4;\n } else if (").concat(r," < 0xf8) {\n ").concat(t," = (((buffer[offset] & 15) * Math.pow(2,32))) +\n (buffer[offset+1]<<24) | (buffer[offset+2]<<16 | buffer[offset+3]<<8 | buffer[offset+4])\n // TODO *val_p = uv < 0x80000000UL ? uv : -((int32_t) (0xffffffffUL - uv)) - 1;\n offset += 5;\n } else if (").concat(r," < 0xfc) {\n ").concat(t," = ((((buffer[offset] & 7) << 8) | buffer[offset+1] )) * Math.pow(2,32) +\n (buffer[offset+2]<<24) | (buffer[offset+3]<<16 | buffer[offset+4]<<8 | buffer[offset+5])\n offset += 6;\n } else if (").concat(r," < 0xfe) {\n ").concat(t," = ((((buffer[offset] & 3) << 16) | buffer[offset+1]<<8 | buffer[offset+2])) * Math.pow(2,32) +\n (buffer[offset+3]<<24) | (buffer[offset+4]<<16 | buffer[offset+5]<<8 | buffer[offset+6])\n offset += 7;\n } else if (").concat(r," < 0xff) {\n ").concat(t," = Long.fromBytesBE(buffer.slice(offset+1,offset+8));\n if (").concat(t,".greaterThan(Number.MAX_SAFE_INTEGER) || ").concat(t,".lessThan(Number.MIN_SAFE_INTEGER))\n throw new Error('integer overflow')\n ").concat(t," = ").concat(t,".toNumber()\n offset += 8;\n } else {\n ").concat(t," = Long.fromBytesBE(buffer.slice(offset+1,offset+9));\n if (").concat(t,".greaterThan(Number.MAX_SAFE_INTEGER) || ").concat(t,".lessThan(Number.MIN_SAFE_INTEGER))\n throw new Error('integer overflow')\n ").concat(t," = ").concat(t,".toNumber()\n offset += 9;\n }\n "))},t._=h},37108:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return n="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(e)}var o=function(){this.code="",this.scopes=[["vars"]],this.isAsync=!1,this.bitFields=[],this.tmpVariableCount=0,this.references={}};o.prototype.generateVariable=function(e){var t=[];for(Array.prototype.push.apply(t,this.scopes[this.scopes.length-1]);/^\$parent\./.test(e);)t.pop(),e=e.replace(/^\$parent\./,"");return e&&t.push(e),t.join(".")},o.prototype.generateOption=function(e){switch(n(e)){case"number":return e.toString();case"string":return this.generateVariable(e);case"function":return"(".concat(e,").call(").concat(this.generateVariable(),", vars)");default:return}},o.prototype.generateError=function(){var e=Array.prototype.slice.call(arguments),t=o.interpolate.apply(this,e);this.isAsync?this.pushCode("return process.nextTick(function() { callback(new Error(".concat(t,"), vars); });")):this.pushCode("throw new Error(".concat(t,");"))},o.prototype.generateTmpVariable=function(){return"$tmp".concat(this.tmpVariableCount++)},o.prototype.pushCode=function(){var e=Array.prototype.slice.call(arguments);this.code+="".concat(o.interpolate.apply(this,e),"\n")},o.prototype.pushPath=function(e){e&&this.scopes[this.scopes.length-1].push(e)},o.prototype.popPath=function(e){e&&this.scopes[this.scopes.length-1].pop()},o.prototype.pushScope=function(e){this.scopes.push([e])},o.prototype.popScope=function(){this.scopes.pop()},o.prototype.addReference=function(e){this.references[e]||(this.references[e]={resolved:!1,requested:!1})},o.prototype.markResolved=function(e){this.references[e].resolved=!0},o.prototype.markRequested=function(e){e.forEach(function(e){this.references[e].requested=!0}.bind(this))},o.prototype.getUnresolvedReferences=function(){var e=this.references;return Object.keys(this.references).filter((function(t){return!e[t].resolved&&!e[t].requested}))},o.interpolate=function(e){var t=e.match(/{\d+}/g),r=Array.prototype.slice.call(arguments,1);return t&&t.forEach((function(t){var n=parseInt(t.substr(1,t.length-2),10);e=e.replace(t,r[n].toString())})),e},t._=o},64169:e=>{e.exports.runInThisContext=function(e){return new Function("code","return eval(code);").call(globalThis,e)}},52913:(e,t,r)=>{"use strict";r.d(t,{Z:()=>oe});var n={};r.r(n),r.d(n,{escape:()=>y,escapeColumn:()=>v,formatAttributes:()=>w,formatComment:()=>j,formatDirective:()=>E,formatFeature:()=>O,formatItem:()=>k,formatSequence:()=>P,parseAttributes:()=>m,parseDirective:()=>g,parseFeature:()=>b,unescape:()=>d});var o=r(84723),i=r(60113);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r".concat(e.id).concat(e.description?" ".concat(e.description):"","\n").concat(e.sequence,"\n")}function k(e){function t(e){return"attributes"in e?O(e):"directive"in e?E(e):"sequence"in e?P(e):"comment"in e?j(e):"# (invalid item found during format)\n"}return Array.isArray(e)?e.map(t):t(e)}function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function _(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r\s*(\S+)\s*(.*)/.exec(e);t?(this._flush(),this.currentSequence={id:t[1],sequence:""},t[2]&&(this.currentSequence.description=t[2].trim())):this.currentSequence&&/\S/.test(e)&&(this.currentSequence.sequence+=e.replace(/\s/g,""))}},{key:"_flush",value:function(){this.currentSequence&&this.seqCallback(this.currentSequence)}},{key:"finish",value:function(){this._flush()}}]),e}(),B=function(){function e(t){M(this,e),this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};var r=function(){};this.featureCallback=t.featureCallback||r,this.endCallback=t.endCallback||r,this.commentCallback=t.commentCallback||r,this.errorCallback=t.errorCallback||r,this.directiveCallback=t.directiveCallback||r,this.sequenceCallback=t.sequenceCallback||r,this.disableDerivesFromReferences=t.disableDerivesFromReferences||!1,this.bufferSize=void 0===t.bufferSize?1e3:t.bufferSize}return F(e,[{key:"addLine",value:function(e){if(this.fastaParser)this.fastaParser.addLine(e);else if(!this.eof)if(this.lineNumber+=1,/^\s*[^#\s>]/.test(e))this._bufferLine(e);else{var t=/^\s*(#+)(.*)/.exec(e);if(t){var r=T(t,2)[1],n=T(t,3)[2];if(3===r.length)this._emitAllUnderConstructionFeatures();else if(2===r.length){var o=g(e);o&&("FASTA"===o.directive?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new Z(this.sequenceCallback)):this._emitItem(o))}else n=n.replace(/\s*/,""),this._emitItem({comment:n})}else if(/^\s*$/.test(e));else{if(!/^\s*>/.test(e)){var i=e.replace(/\r?\n?$/g,"");throw new Error("GFF3 parse error. Cannot parse '".concat(i,"'."))}this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new Z(this.sequenceCallback),this.fastaParser.addLine(e)}}}},{key:"finish",value:function(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}},{key:"_emitItem",value:function(e){Array.isArray(e)?this.featureCallback(e):"directive"in e?this.directiveCallback(e):"comment"in e&&this.commentCallback(e)}},{key:"_enforceBufferSizeLimit",value:function(){for(var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=function t(r){r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach((function(t){delete e._underConstructionById[t],delete e._completedReferences[t]})),r.forEach((function(e){e.child_features&&e.child_features.forEach((function(e){return t(e)})),e.derived_features&&e.derived_features.forEach((function(e){return t(e)}))})))};this._underConstructionTopLevel.length+t>this.bufferSize;){var n=this._underConstructionTopLevel.shift();n&&(this._emitItem(n),r(n))}}},{key:"_emitAllUnderConstructionFeatures",value:function(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error("some features reference other features that do not exist in the file (or in the same '###' scope). ".concat(Object.keys(this._underConstructionOrphans)))}},{key:"_bufferLine",value:function(e){var t,r,n,o=this,i=L(L({},b(e)),{},{child_features:[],derived_features:[]}),a=(null===(t=i.attributes)||void 0===t?void 0:t.ID)||[],u=(null===(r=i.attributes)||void 0===r?void 0:r.Parent)||[],c=this.disableDerivesFromReferences?[]:(null===(n=i.attributes)||void 0===n?void 0:n.Derives_from)||[];if(a.length||u.length||c.length){var l=void 0;a.forEach((function(e){var t=o._underConstructionById[e];t?(t[t.length-1].type!==i.type&&o._parseError('multi-line feature "'.concat(e,'" has inconsistent types: "').concat(i.type,'", "').concat(t[t.length-1].type,'"')),t.push(i),l=t):(l=[i],o._enforceBufferSizeLimit(1),u.length||c.length||o._underConstructionTopLevel.push(l),o._underConstructionById[e]=l,o._resolveReferencesTo(l,e))})),this._resolveReferencesFrom(l||[i],{Parent:u,Derives_from:c},a)}else this._emitItem([i])}},{key:"_resolveReferencesTo",value:function(e,t){var r=this._underConstructionOrphans[t];r&&(e.forEach((function(e){var t;(t=e.child_features).push.apply(t,_(r.Parent))})),e.forEach((function(e){var t;(t=e.derived_features).push.apply(t,_(r.Derives_from))})),delete this._underConstructionOrphans[t])}},{key:"_parseError",value:function(e){this.eof=!0,this.errorCallback("".concat(this.lineNumber,": ").concat(e))}},{key:"_resolveReferencesFrom",value:function(e,t,r){var n=this;function o(e,t,r){var n=e[t];n||(n={},e[t]=n);var o=n[r]||!1;return n[r]=!0,o}t.Parent.forEach((function(t){var i=n._underConstructionById[t];if(i){r.filter((function(e){return o(n._completedReferences,e,"Parent,".concat(t))})).length||i.forEach((function(t){t.child_features.push(e)}))}else{var a=n._underConstructionOrphans[t];a||(a={Parent:[],Derives_from:[]},n._underConstructionOrphans[t]=a),a.Parent.push(e)}})),t.Derives_from.forEach((function(t){var i=n._underConstructionById[t];if(i){r.filter((function(e){return o(n._completedReferences,e,"Derives_from,".concat(t))})).length||i.forEach((function(t){t.derived_features.push(e)}))}else{var a=n._underConstructionOrphans[t];a||(a={Parent:[],Derives_from:[]},n._underConstructionOrphans[t]=a),a.Derives_from.push(e)}}))}}]),e}(),z=r(554);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};U(this,r),(e=t.call(this,{objectMode:!0})).textBuffer="";var o=te(n);e.encoding=n.encoding||"utf8",e.decoder=new i.s;var a=e.push.bind($(e));return e.parser=new B({featureCallback:o.parseFeatures?a:void 0,directiveCallback:o.parseDirectives?a:void 0,commentCallback:o.parseComments?a:void 0,sequenceCallback:o.parseSequences?a:void 0,errorCallback:function(t){return e.emit("error",t)},bufferSize:o.bufferSize,disableDerivesFromReferences:o.disableDerivesFromReferences}),e}return V(r,[{key:"_addLine",value:function(e){e&&this.parser.addLine(e)}},{key:"_nextText",value:function(e){var t=this,r=(this.textBuffer+e).split(/\r?\n/);this.textBuffer=r.pop()||"",r.forEach((function(e){return t._addLine(e)}))}},{key:"_transform",value:function(e,t,r){this._nextText(this.decoder.write(e)),ee(r)}},{key:"_flush",value:function(e){this.decoder.end&&this._nextText(this.decoder.end()),null!=this.textBuffer&&this._addLine(this.textBuffer),this.parser.finish(),ee(e)}}]),r}(o.Transform),ne=function(e){q(r,e);var t=Q(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return U(this,r),(e=t.call(this,Object.assign(n,{objectMode:!0}))).linesSinceLastSyncMark=0,e.haveWeEmittedData=!1,e.fastaMode=!1,e.minLinesBetweenSyncMarks=n.minSyncLines||100,e.insertVersionDirective=n.insertVersionDirective||!1,e}return V(r,[{key:"_transform",value:function(e,t,r){var n;if(!this.haveWeEmittedData&&this.insertVersionDirective){var o=Array.isArray(e)?e[0]:e;"directive"in o&&"gff-version"!==o.directive&&this.push("##gff-version 3\n")}if("sequence"in e&&!this.fastaMode&&(this.push("##FASTA\n"),this.fastaMode=!0),n=Array.isArray(e)?e.map(k).join(""):k(e),this.push(n),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push("###\n"),this.linesSinceLastSyncMark=0;else{for(var i=0,a=0;a0&&void 0!==arguments[0]?arguments[0]:{})},parseStringSync:function(e){if(!e)return[];var t=te(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),r=[],n=r.push.bind(r),o=new B({featureCallback:t.parseFeatures?n:void 0,directiveCallback:t.parseDirectives?n:void 0,commentCallback:t.parseComments?n:void 0,sequenceCallback:t.parseSequences?n:void 0,disableDerivesFromReferences:t.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:function(e){throw e}});return e.split(/\r?\n/).forEach(o.addLine.bind(o)),o.finish(),r},formatSync:function(e){var t=[],r=[];e.forEach((function(e){"sequence"in e?r.push(e):t.push(e)}));var n=t.map(k).join("");return r.length&&(n+="##FASTA\n",n+=r.map(P).join("")),n},formatStream:function(){return new ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},formatFile:function(e,t){var r=J({insertVersionDirective:!0},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return new Promise((function(n,o){e.pipe(new ne(r)).on("end",(function(){return n(null)})).on("error",o).pipe(t)}))},util:n}},63082:(e,t,r)=>{"use strict";r.d(t,{IB:()=>b,P:()=>h});var n=r(93403),o=r(41589),i=r(80365).Buffer;function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){for(var r=0;r3?s[3]:void 0,o=s.length>2?s[2]:void 0,!((r=s.length>1&&void 0!==s[1]?s[1]:0)<0)){e.next=6;break}throw new TypeError("regionStart cannot be less than 0");case 6:if((void 0===o||o>t.length)&&(o=t.length),!(r>=o)){e.next=9;break}return e.abrupt("return","");case 9:return a=f(t,r),c=f(t,o)-a,l=i.allocUnsafe(c),e.next=14,this.fasta.read(l,0,c,a,n);case 14:return e.abrupt("return",l.toString("utf8").replace(/\s+/g,""));case 15:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})}],r&&c(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(a,e);var t,r,n,i=(r=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(r);if(n){var o=m(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){var t,r=e.fasta,n=e.path,u=e.fai,c=e.faiPath,l=e.gzi,s=e.gziPath;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,{fasta:r,path:n,fai:u,faiPath:c}),r&&l?t.fasta=new o.BgzfFilehandle({filehandle:r,gziFilehandle:l}):n&&s&&(t.fasta=new o.BgzfFilehandle({path:n,gziPath:s})),t}return t=a,Object.defineProperty(t,"prototype",{writable:!1}),t}(h)},63627:(e,t,r)=>{"use strict";r.d(t,{pC:()=>be});var n=r(33860),o=r.n(n),i=r(94877),a=r.n(i),u=r(80365),c=r(93403),l=r(41589);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return p(e,arguments,y(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)},f(e)}function p(e,t,r){return p=d()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&h(o,r.prototype),o},p.apply(null,arguments)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(i,e);var t,r,n,o=(r=i,n=d(),function(){var e,t=y(r);if(n){var o=y(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(f(Error));function b(e){if(e&&e.aborted){if("undefined"!=typeof DOMException)throw new DOMException("aborted","AbortError");var t=new m("aborted");throw t.code="ERR_ABORTED",t}}function g(e,t){var r=[],n=null;return 0===e.length?e:(e.sort((function(e,t){var r=e.minv.blockPosition-t.minv.blockPosition;return 0!==r?r:e.minv.dataPosition-t.minv.dataPosition})),e.forEach((function(e){var o,i;(!t||e.maxv.compareTo(t)>0)&&(null===n?(r.push(e),n=e):(o=n,(i=e).minv.blockPosition-o.maxv.blockPosition<65e3&&i.maxv.blockPosition-o.minv.blockPosition<5e6?e.maxv.compareTo(n.maxv)>0&&(n.maxv=e.maxv):(r.push(e),n=e)))})),r)}var w=r(16126),S=r.n(w);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){for(var r=0;r0&&(e=n[t]);return e}}],(r=[{key:"toString",value:function(){return"".concat(this.blockPosition,":").concat(this.dataPosition)}},{key:"compareTo",value:function(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}}])&&O(t.prototype,r),n&&O(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])throw new Error("big-endian virtual file offsets not implemented");return new E(1099511627776*e[t+7]+4294967296*e[t+6]+16777216*e[t+5]+65536*e[t+4]+256*e[t+3]+e[t+2],e[t+1]<<8|e[t])}function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function k(e,t){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.minv=t,this.maxv=r,this.bin=n,this._fetchedSize=o}var t,r;return t=e,(r=[{key:"toUniqueString",value:function(){return"".concat(this.minv,"..").concat(this.maxv," (bin ").concat(this.bin,", fetchedSize ").concat(this.fetchedSize(),")")}},{key:"toString",value:function(){return this.toUniqueString()}},{key:"compareTo",value:function(e){return this.minv.compareTo(e.minv)||this.maxv.compareTo(e.maxv)||this.bin-e.bin}},{key:"fetchedSize",value:function(){return void 0!==this._fetchedSize?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}])&&k(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),_=["indices"];function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function L(){L=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(I([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==C(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function T(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function I(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function R(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){I(i,n,o,a,u,"next",e)}function u(e){I(i,n,o,a,u,"throw",e)}a(void 0)}))}}function M(e,t){for(var r=0;r0&&void 0!==o[0]?o[0]:{},e.next=3,this.parse(t);case 3:return(r=e.sent).indices,n=T(r,_),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"_findFirstData",value:function(e,t){return e?e.compareTo(t)>0?t:e:t}},{key:"parse",value:(o=R(L().mark((function e(){var t,r=this,n=arguments;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},this.parseP||(this.parseP=this._parse(t).catch((function(e){throw r.parseP=void 0,e}))),e.abrupt("return",this.parseP);case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"hasRefSeq",value:(n=R(L().mark((function e(t){var r,n=arguments;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,this.parse(r);case 3:if(e.t1=t,e.t0=e.sent.indices[e.t1],e.t0){e.next=7;break}e.t0={};case 7:return e.abrupt("return",!!e.t0.binIndex);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&M(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||B(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=B(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function B(e,t){if(e){if("string"==typeof e)return z(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function U(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function H(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){U(i,n,o,a,u,"next",e)}function u(e){U(i,n,o,a,u,"throw",e)}a(void 0)}))}}function V(e,t){for(var r=0;r>26),1+((t-=1)>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}var $=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}(s,e);var t,r,n,o,i,a,u,c=(a=s,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=W(a);if(u){var r=W(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return t=s,r=[{key:"lineCount",value:(i=H(G().mark((function e(t){var r,n,o,i,a=arguments;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},e.next=3,this.parse(r);case 3:if(n=e.sent){e.next=6;break}return e.abrupt("return",-1);case 6:if(o=n.refNameToId[t],n.indices[o]){e.next=10;break}return e.abrupt("return",-1);case 10:if(!(i=n.indices[o].stats)){e.next=13;break}return e.abrupt("return",i.lineCount);case 13:return e.abrupt("return",-1);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_parse",value:(o=H(G().mark((function e(){var t,r,n,o,i,a,u,c,s,f,p,d,h,y,v,m,g,w,S,x=this,O=arguments;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=O.length>0&&void 0!==O[0]?O[0]:{},e.next=3,this.filehandle.readFile(t);case 3:return r=e.sent,e.next=6,(0,l.unzip)(r);case 6:if(n=e.sent,b(t.signal),21578324===n.readUInt32LE(0)){e.next=10;break}throw new Error("Not a TBI file");case 10:if(o=n.readInt32LE(4),i=n.readInt32LE(8),a=65536&i?"zero-based-half-open":"1-based-closed",u={0:"generic",1:"SAM",2:"VCF"}[15&i]){e.next=17;break}throw new Error("invalid Tabix preset format flags ".concat(i));case 17:return c={ref:n.readInt32LE(12),start:n.readInt32LE(16),end:n.readInt32LE(20)},s=n.readInt32LE(24),37449,f=Math.pow(2,29),p=s?String.fromCharCode(s):null,d=n.readInt32LE(28),h=n.readInt32LE(32),y=this._parseNameBytes(n.slice(36,36+h)),v=y.refNameToId,m=y.refIdToName,g=36+h,S=new Array(o).fill(0).map((function(){var e=n.readInt32LE(g);g+=4;for(var t,r={},o=0;o37450)throw new Error("tabix index contains too many bins, please use a CSI index");if(37450===i){var a=n.readInt32LE(g);g+=4,2===a&&(t=x.parsePseudoBin(n,g)),g+=16*a}else{var u=n.readInt32LE(g);g+=4;for(var c=new Array(u),l=0;l3&&void 0!==P[3]?P[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return",[]);case 7:if(a=i.refNameToId[t],u=i.indices[a]){e.next=11;break}return e.abrupt("return",[]);case 11:(u.linearIndex.length?u.linearIndex[r>>14>=u.linearIndex.length?u.linearIndex.length-1:r>>14]:new E(0,0))||console.warn("querying outside of possible tabix range"),c=Q(r,n),l=[],s=Z(c);try{for(s.s();!(f=s.n()).done;)for(p=D(f.value,2),d=p[0],h=p[1],y=d;y<=h;y++)if(u.binIndex[y])for(v=u.binIndex[y],m=0;m>14,b-1),x=Math.min(n>>14,b-1),O=S;O<=x;++O)(j=u.linearIndex[O])&&(!w||j.compareTo(w)<0)&&(w=j);return e.abrupt("return",g(l,w));case 23:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})}],r&&V(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(N);function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function K(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=J(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function J(e,t){if(e){if("string"==typeof e)return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(e,t):void 0}}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ne(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function oe(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ne(i,n,o,a,u,"next",e)}function u(e){ne(i,n,o,a,u,"throw",e)}a(void 0)}))}}function ie(e,t){for(var r=0;r1&&void 0!==a[1]?a[1]:{},e.next=3,this.parse(r);case 3:if(n=e.sent){e.next=6;break}return e.abrupt("return",-1);case 6:if(o=n.refNameToId[t],n.indices[o]){e.next=10;break}return e.abrupt("return",-1);case 10:if(!(i=n.indices[o].stats)){e.next=13;break}return e.abrupt("return",i.lineCount);case 13:return e.abrupt("return",-1);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"indexCov",value:(i=oe(re().mark((function e(){return re().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("CSI indexes do not support indexcov");case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:"parseAuxData",value:function(e,t){var r=e.readInt32LE(t),n=65536&r?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[15&r];if(!o)throw new Error("invalid Tabix preset format flags ".concat(r));var i={ref:e.readInt32LE(t+4),start:e.readInt32LE(t+8),end:e.readInt32LE(t+12)},a=e.readInt32LE(t+16),u=a?String.fromCharCode(a):null,c=e.readInt32LE(t+20),l=e.readInt32LE(t+24),s=this._parseNameBytes(e.slice(t+28,t+28+l));return{refIdToName:s.refIdToName,refNameToId:s.refNameToId,skipLines:c,metaChar:u,columnNumbers:i,format:o,coordinateType:n}}},{key:"_parseNameBytes",value:function(e){for(var t=0,r=0,n=[],o={},i=0;i0&&void 0!==d[0]?d[0]:{},e.t0=l.unzip,e.next=4,this.filehandle.readFile(t);case 4:return e.t1=e.sent,e.next=7,(0,e.t0)(e.t1);case 7:if(21582659!==(r=e.sent).readUInt32LE(0)){e.next=12;break}n=1,e.next=17;break;case 12:if(38359875!==r.readUInt32LE(0)){e.next=16;break}n=2,e.next=17;break;case 16:throw new Error("Not a CSI file");case 17:return this.minShift=r.readInt32LE(4),this.depth=r.readInt32LE(8),this.maxBinNumber=((1<<3*(this.depth+1))-1)/7,o=Math.pow(2,this.minShift+3*this.depth),i=r.readInt32LE(12),a=i&&i>=30?this.parseAuxData(r,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},u=r.readInt32LE(16+i),s=16+i+4,f=new Array(u).fill(0).map((function(){var e=r.readInt32LE(s);s+=4;for(var t,n={},o=0;op.maxBinNumber)t=p.parsePseudoBin(r,s+4),s+=48;else{var a=j(r,s+4);c=p._findFirstData(c,a);var u=r.readInt32LE(s+12);s+=16;for(var l=new Array(u),f=0;f3&&void 0!==b[3]?b[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return",[]);case 7:if(a=i.refNameToId[t],u=i.indices[a]){e.next=11;break}return e.abrupt("return",[]);case 11:c=this.reg2bins(r,n),l=[],s=K(c);try{for(s.s();!(f=s.n()).done;)for(w=f.value,S=2,p=function(e){if(Array.isArray(e))return e}(w)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(w,S)||J(w,S)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=p[0],h=p[1],y=d;y<=h;y++)if(u.binIndex[y])for(v=u.binIndex[y],m=0;mMath.pow(2,50)&&(t=Math.pow(2,34)),t-=1;for(var r,n=0,o=0,i=this.minShift+3*this.depth,a=[];n<=this.depth;i-=3,o+=(r=3*n,1*Math.pow(2,r)),n+=1){var u=o+le(e,i),c=o+le(t,i);if(c-u+a.length>this.maxBinNumber)throw new Error("query ".concat(e,"-").concat(t," is too large for current binning scheme (shift ").concat(this.minShift,", depth ").concat(this.depth,"), try a smaller query or a coarser index binning scheme"));a.push([u,c])}return a}}],r&&ie(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(N);function fe(e){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fe(e)}function pe(){pe=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(L([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==fe(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function de(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function he(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){de(i,n,o,a,u,"next",e)}function u(e){de(i,n,o,a,u,"throw",e)}a(void 0)}))}}function ye(e,t){for(var r=0;rthis.chunkSizeLimit)){e.next=27;break}throw new Error("Too much data. Chunk size ".concat(f.toLocaleString()," bytes exceeds chunkSizeLimit of ").concat(this.chunkSizeLimit.toLocaleString(),"."));case 27:s+=1,e.next=23;break;case 30:p=Date.now(),d=0;case 32:if(!(d=w[x++];);x--}if(P=this.checkLine(c,t,r,n,j),k=P.startCoordinate,A=P.overlaps,!(void 0!==h&&void 0!==k&&h>k)){e.next=54;break}throw new Error("Lines not sorted by start coordinate (".concat(h," > ").concat(k,"), this file is not usable with Tabix."));case 54:if(h=k,!A){e.next=59;break}u(j.trim(),256*g[x]+(S-w[x])+y.minv.dataPosition+1),e.next=61;break;case 59:if(!(void 0!==k&&k>=n)){e.next=61;break}return e.abrupt("return");case 61:if(!(this.yieldTime&&p-Date.now()>this.yieldTime)){e.next=66;break}return p=Date.now(),b(i),e.next=66,me(1);case 66:S=O+1,e.next=44;break;case 69:d+=1,e.next=32;break;case 72:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return y.apply(this,arguments)})},{key:"getMetadata",value:(h=he(pe().mark((function e(){var t,r=arguments;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.abrupt("return",this.index.getMetadata(t));case 2:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"getHeaderBuffer",value:(d=he(pe().mark((function e(){var t,r,n,o,i,a,u,c,s,f,p,d=arguments;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},e.next=3,this.getMetadata(t);case 3:return r=e.sent,n=r.firstDataLine,o=r.metaChar,i=r.maxBlockSize,b(t.signal),a=((null==n?void 0:n.blockPosition)||0)+i,e.next=11,this._readRegion(0,a,t);case 11:return u=e.sent,b(t.signal),e.prev=13,e.next=16,(0,l.unzip)(u);case 16:u=e.sent,e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(13),console.error(e.t0),new Error("error decompressing block ".concat(e.t0.code," at 0 (length ").concat(a,") ").concat(e.t0));case 23:if(!o){e.next=36;break}c=-1,s="\n".charCodeAt(0),f=o.charCodeAt(0),p=0;case 28:if(!(p0&&void 0!==n[0]?n[0]:{},e.next=3,this.getHeaderBuffer(t);case 3:return r=e.sent,e.abrupt("return",r.toString("utf8"));case 5:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"getReferenceSequenceNames",value:(f=he(pe().mark((function e(){var t,r,n=arguments;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.getMetadata(t);case 3:return r=e.sent,e.abrupt("return",r.refIdToName);case 5:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"checkLine",value:function(e,t,r,n,o){var i=e.columnNumbers,a=e.metaChar,u=e.coordinateType,c=e.format;if(o.charAt(0)===a)return{overlaps:!1};var l=i.ref,s=i.start,f=i.end;l||(l=0),s||(s=0),f||(f=0),"VCF"===c&&(f=8);for(var p=Math.max(l,s,f),d=1,h=0,y="",v=-1/0,m=0;m=n)return{startCoordinate:v,overlaps:!1};if((0===f||f===s)&&v+1<=r)return{startCoordinate:v,overlaps:!1}}else if("VCF"===c&&4===d)y=o.slice(h,m);else if(d===f&&("VCF"===c?this._getVcfEnd(v,y,o.slice(h,m)):parseInt(o.slice(h,m),10))<=r)return{overlaps:!1};if(h=m+1,(d+=1)>p)break}return{startCoordinate:v,overlaps:!0}}},{key:"_getVcfEnd",value:function(e,t,r){var n=e+t.length,o=-1!==r.indexOf("SVTYPE=TRA");if("."===r[0]||o){if(o)return e+1}else for(var i=";",a=0;a1&&void 0!==n[1]?n[1]:{},e.abrupt("return",this.index.lineCount(t,r));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"_readRegion",value:(i=he(pe().mark((function e(t,r){var n,o,i,a,c,l=arguments;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.length>2&&void 0!==l[2]?l[2]:{},o=u.Buffer.alloc(r),e.next=4,this.filehandle.read(o,0,r,t,n);case 4:return i=e.sent,a=i.bytesRead,c=i.buffer,e.abrupt("return",c.slice(0,a));case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"readChunk",value:(n=he(pe().mark((function e(t){var r,n,o=arguments;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this._readRegion(t.minv.blockPosition,t.fetchedSize(),r);case 3:return n=e.sent,e.prev=4,e.abrupt("return",(0,l.unzipChunkSlice)(n,t));case 8:throw e.prev=8,e.t0=e.catch(4),new Error("error decompressing c ".concat(t.toString()," ").concat(e.t0));case 11:case"end":return e.stop()}}),e,this,[[4,8]])}))),function(e){return n.apply(this,arguments)})}],r&&ye(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},46811:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rM,HubFile:()=>L,RaFile:()=>S,RaStanza:()=>p,TrackDbFile:()=>k});var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(d,e);var t,r,u,c,p=(u=d,c=l(),function(){var e,t=f(u);if(c){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function d(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{checkIndent:!0};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),t=p.call(this);var n,o=r.checkIndent;return t._checkIndent=o,n="string"==typeof e?e.trimEnd().split(/\r?\n/):e||[],t._keyAndCommentOrder=[],n.forEach((function(e){t.add(e)})),t}return t=d,(r=[{key:"add",value:function(e){if(""===e)throw new Error("Invalid stanza, contained blank lines");if(e.trim().startsWith("#"))return this._keyAndCommentOrder.push(e.trim()),this;if(e.trimEnd().endsWith("\\")){var t=e.trimEnd().slice(0,-1);return this._continuedLine?this._continuedLine+=t.trimStart():this._continuedLine=t,this}var r,n,i=e;if(this._continuedLine&&(i=this._continuedLine+i.trimStart(),this._continuedLine=void 0),this.indent||this._checkIndent){var u=i.match(/^([ \t]+)/);if(void 0===this.indent)if(u){var c=(n=2,function(e){if(Array.isArray(e))return e}(r=u)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,n)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());this.indent=c[1]}else this.indent="";else if(""===this.indent&&null!==u||this.indent&&u&&this.indent!==u[1])throw new Error("Inconsistent indentation of stanza")}else this.indent="";var l=i.trim(),s=l.indexOf(" ");if(-1===s){if(!this.nameKey)throw new Error("First line in a stanza must have both a key and a value");return this.has(l)?this:(this._keyAndCommentOrder.push(l),a(f(d.prototype),"set",this).call(this,l,""))}var p=l.slice(0,s),h=l.slice(s+1);if(this.has(p)&&h!==this.get(p))throw new Error("Got duplicate key with a different value in stanza: "+'"'.concat(p,'" key has both ').concat(this.get(p)," and ").concat(h));return this._keyAndCommentOrder.push(p),this.nameKey||(this.nameKey=p,this.name=l.slice(s+1)),a(f(d.prototype),"set",this).call(this,p,h)}},{key:"set",value:function(e,t){if("string"!=typeof t)throw new Error("Value of ".concat(e," must be a string, got ").concat(n(t)));return a(f(d.prototype),"set",this).call(this,e,t)}},{key:"delete",value:function(e){if(e===this.nameKey)throw new Error("Cannot delete the first line in a stanza (you can still overwrite it with set()).");return this._keyAndCommentOrder.includes(e)&&(this._keyAndCommentOrder=this._keyAndCommentOrder.filter((function(t){return t!==e}))),a(f(d.prototype),"delete",this).call(this,e)}},{key:"clear",value:function(){this._keyAndCommentOrder.length=0,this._continuedLine=void 0,this.indent=void 0,this.name=void 0,this.nameKey=void 0,a(f(d.prototype),"clear",this).call(this)}},{key:"toString",value:function(){var e=this;if(0===this.size)return"";var t=[];return this._keyAndCommentOrder.forEach((function(r){r.startsWith("#")?t.push("".concat(e.indent).concat(r)):t.push("".concat(e.indent).concat(r," ").concat(e.get(r)).trimEnd())})),"".concat(t.join("\n"),"\n")}}])&&i(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(u(Map));function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{checkIndent:!0};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this);var n,o=r.checkIndent;return t._checkIndent=o,n="string"==typeof e?e.trimEnd().split(/(?:[\t ]*\r?\n){2,}/):e||[],t._stanzaAndCommentOrder=[],n.forEach((function(e){t.add(e)})),t}return t=a,(r=[{key:"add",value:function(e){if(""===e)throw new Error("Invalid stanza, was empty");if(e.trim().startsWith("#")){var t=e.trimEnd().split(/\r?\n/).map((function(e){return e.trim()}));if(t.every((function(e){return e.startsWith("#")})))return this._stanzaAndCommentOrder.push(t.join("\n")),this}var r=new p(e,{checkIndent:this._checkIndent});if(this.nameKey){if(r.nameKey!==this.nameKey)throw new Error("The first line in each stanza must have the same key. "+"Saw both ".concat(this.nameKey," and ").concat(r.nameKey))}else this.nameKey=r.nameKey;if(!r.name)throw new Error("No stanza name: ".concat(r.name));if(this.has(r.name))throw new Error("Got duplicate stanza name: ".concat(r.name));return this._stanzaAndCommentOrder.push(r.name),y(w(a.prototype),"set",this).call(this,r.name,r)}},{key:"update",value:function(e,t){if(!(t instanceof p))throw new Error("Value of ".concat(e," is not an RaStanza"));y(w(a.prototype),"set",this).call(this,e,t)}},{key:"delete",value:function(e){return this._stanzaAndCommentOrder.includes(e)&&(this._stanzaAndCommentOrder=this._stanzaAndCommentOrder.filter((function(t){return t!==e}))),y(w(a.prototype),"delete",this).call(this,e)}},{key:"clear",value:function(){this._stanzaAndCommentOrder.length=0,this.nameKey=void 0,y(w(a.prototype),"clear",this).call(this)}},{key:"toString",value:function(){var e=this;if(0===this.size)return"";var t=[];return this._stanzaAndCommentOrder.forEach((function(r){if(r.startsWith("#"))t.push("".concat(r,"\n"));else{var n=e.get(r);n&&t.push(n.toString())}})),t.join("\n")}}])&&h(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(v(Map));function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)throw new Error("Track ".concat(r," is missing required key(s): ").concat(i.join(", ")));var a=["superTrack","compositeTrack","container","view"];if(!o.some((function(e){return a.includes(e)}))){if(!o.includes("bigDataUrl"))throw new Error("Track ".concat(r,' is missing required key "bigDataUrl"'));if(!o.includes("type")){var u=t.settings(r);if(!Array.from(u.keys()).includes("type"))throw new Error("Neither track ".concat(r,' nor any of its parent tracks have the required key "type"'))}}var c,l,s="",f=r;do{if(f=null===(n=t.get(f))||void 0===n?void 0:n.get("parent")){var p=f.split(" ");f=(c=p,l=1,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(c,l)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(c,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],s+=" "}}while(f);var d=t.get(r);d&&(d.indent=s,t.set(r,d))})),t}return t=a,(r=[{key:"settings",value:function(e){var t,r=this;if(!this.has(e))throw new Error("Track ".concat(e," does not exist"));var n=[e],o=e;do{(o=null===(t=this.get(o))||void 0===t?void 0:t.get("parent"))&&n.push(o)}while(o);var i=new Map;return n.reverse(),n.forEach((function(e){var t;null===(t=r.get(e))||void 0===t||t.forEach((function(e,t){i.set(t,e)}))})),i}}])&&E(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(S);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(i,e);var t,r,n,o=(r=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(r);if(n){var o=C(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),"hub"!==(t=o.call(this,e)).nameKey)throw new Error('Hub file must begin with a line like "hub "');var r=["hub","shortLabel","longLabel","genomesFile","email","descriptionUrl"],n=[];if(t.forEach((function(e,t){r.includes(t)||n.push(t)})),n.length>0)throw new Error("Hub file has invalid entr".concat(1===n.length?"y":"ies",": ").concat(n.join(", ")));var a=[];if(r.forEach((function(e){"descriptionUrl"===e||t.get(e)||a.push(e)})),a.length>0)throw new Error("Hub file is missing required entr".concat(1===a.length?"y":"ies",": ").concat(a.join(", ")));return t}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(p);function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(i,e);var t,r,n,o=(r=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=R(r);if(n){var o=R(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),"genome"!==(t=o.call(this,e)).nameKey)throw new Error('Genomes file must begin with a line like "genome "');var r=["genome","trackDb"];return t.forEach((function(e,t){var n=[];if(r.forEach((function(t){e.get(t)||n.push(t)})),n.length>0)throw new Error("Genomes file entry ".concat(t," is missing required entr").concat(1===n.length?"y":"ies",": ").concat(n.join(", ")))})),t}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(S)},34213:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s,I:()=>l});const n={InfoFields:{AA:{Number:1,Type:"String",Description:"Ancestral allele"},AC:{Number:"A",Type:"Integer",Description:"Allele count in genotypes, for each ALT allele, in the same order as listed"},AD:{Number:"R",Type:"Integer",Description:"Total read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},AF:{Number:"A",Type:"Float",Description:"Allele frequency for each ALT allele in the same order as listed (estimated from primary data, not called genotypes)"},AN:{Number:1,Type:"Integer",Description:"Total number of alleles in called genotypes"},BQ:{Number:1,Type:"Float",Description:"RMS base quality"},CIGAR:{Number:1,Type:"Float",Description:"Cigar string describing how to align an alternate allele to the reference allele"},DB:{Number:0,Type:"Flag",Description:"dbSNP membership"},DP:{Number:1,Type:"Integer",Description:"combined depth across samples"},END:{Number:1,Type:"Integer",Description:"End position (for use with symbolic alleles)"},H2:{Number:0,Type:"Flag",Description:"HapMap2 membership"},H3:{Number:0,Type:"Flag",Description:"HapMap3 membership"},MQ:{Number:1,Type:null,Description:"RMS mapping quality"},MQ0:{Number:1,Type:"Integer",Description:"Number of MAPQ == 0 reads"},NS:{Number:1,Type:"Integer",Description:"Number of samples with data"},SB:{Number:4,Type:"Integer",Description:"Strand bias"},SOMATIC:{Number:0,Type:"Flag",Description:"Somatic mutation (for cancer genomics)"},VALIDATED:{Number:0,Type:"Flag",Description:"Validated by follow-up experiment"},"1000G":{Number:0,Type:"Flag",Description:"1000 Genomes membership"},IMPRECISE:{Number:0,Type:"Flag",Description:"Imprecise structural variation"},NOVEL:{Number:0,Type:"Flag",Description:"Indicates a novel structural variation"},SVTYPE:{Number:1,Type:"String",Description:"Type of structural variant"},SVLEN:{Number:null,Type:"Integer",Description:"Difference in length between REF and ALT alleles"},CIPOS:{Number:2,Type:"Integer",Description:"Confidence interval around POS for imprecise variants"},CIEND:{Number:2,Type:"Integer",Description:"Confidence interval around END for imprecise variants"},HOMLEN:{Type:"Integer",Description:"Length of base pair identical micro-homology at event breakpoints"},HOMSEQ:{Type:"String",Description:"Sequence of base pair identical micro-homology at event breakpoints"},BKPTID:{Type:"String",Description:"ID of the assembled alternate allele in the assembly file"},MEINFO:{Number:4,Type:"String",Description:"Mobile element info of the form NAME,START,END,POLARITY"},METRANS:{Number:4,Type:"String",Description:"Mobile element transduction info of the form CHR,START,END,POLARITY"},DGVID:{Number:1,Type:"String",Description:"ID of this element in Database of Genomic Variation"},DBVARID:{Number:1,Type:"String",Description:"ID of this element in DBVAR"},DBRIPID:{Number:1,Type:"String",Description:"ID of this element in DBRIP"},MATEID:{Number:null,Type:"String",Description:"ID of mate breakends"},PARID:{Number:1,Type:"String",Description:"ID of partner breakend"},EVENT:{Number:1,Type:"String",Description:"ID of event associated to breakend"},CILEN:{Number:2,Type:"Integer",Description:"Confidence interval around the inserted material between breakend"},DPADJ:{Type:"Integer",Description:"Read Depth of adjacency"},CN:{Number:1,Type:"Integer",Description:"Copy number of segment containing breakend"},CNADJ:{Number:null,Type:"Integer",Description:"Copy number of adjacency"},CICN:{Number:2,Type:"Integer",Description:"Confidence interval around copy number for the segment"},CICNADJ:{Number:null,Type:"Integer",Description:"Confidence interval around copy number for the adjacency"}},GenotypeFields:{AD:{Number:"R",Type:"Integer",Description:"Read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},DP:{Number:1,Type:"Integer",Description:"Read depth"},EC:{Number:"A",Type:"Integer",Description:"Expected alternate allele counts"},FT:{Number:1,Type:"String",Description:'Filter indicating if this genotype was "called"'},GL:{Number:"G",Type:"Float",Description:"Genotype likelihoods"},GP:{Number:"G",Type:"Float",Description:"Genotype posterior probabilities"},GQ:{Number:1,Type:"Integer",Description:"Conditional genotype quality"},GT:{Number:1,Type:"String",Description:"Genotype"},HQ:{Number:2,Type:"Integer",Description:"Haplotype quality"},MQ:{Number:1,Type:"Integer",Description:"RMS mapping quality"},PL:{Number:"G",Type:"Integer",Description:"Phred-scaled genotype likelihoods rounded to the closest integer"},PQ:{Number:1,Type:"Integer",Description:"Phasing quality"},PS:{Number:1,Type:"Integer",Description:"Phase set"}},AltTypes:{DEL:{Description:"Deletion relative to the reference"},INS:{Description:"Insertion of novel sequence relative to the reference"},DUP:{Description:"Region of elevated copy number relative to the reference"},INV:{Description:"Inversion of reference sequence"},CNV:{Description:"Copy number variable region (may be both deletion and duplication)"},"DUP:TANDEM":{Description:"Tandem duplication"},"DEL:ME":{Description:"Deletion of mobile element relative to the reference"},"INS:ME":{Description:"Insertion of a mobile element relative to the reference"},NON_REF:{Description:"Represents any possible alternative allele at this location"},"*":{Description:"Represents any possible alternative allele at this location"}},FilterTypes:{PASS:{Description:"Passed all filters"}}};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1){for(var r,n,o,i=e.includes("[")?"right":"left",a=0;a(.*)");if(!c)throw new Error("failed to parse ".concat(e));var l=null==c?void 0:c[2];return l?{Join:"left",Replacement:l,MateDirection:"right",MatePosition:"<".concat(null==c?void 0:c[1],">:1")}:void 0}if(e.includes("<")){var s=e.match("(.*)<(.*)>");if(!s)throw new Error("failed to parse ".concat(e));var f=null==s?void 0:s[1];return f?{Join:"right",Replacement:f,MateDirection:"right",MatePosition:"<".concat(null==s?void 0:s[2],">:1")}:void 0}}const s=function(){function e(t){var r=this,o=t.header,i=void 0===o?"":o,a=t.strict,u=void 0===a||a;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!i||!i.length)throw new Error("empty header received");var c,l=i.split(/[\r\n]+/).filter((function(e){return e}));if(!l.length)throw new Error("no non-empty header lines specified");if(this.strict=u,this.metadata=JSON.parse(JSON.stringify({INFO:n.InfoFields,FORMAT:n.GenotypeFields,ALT:n.AltTypes,FILTER:n.FilterTypes})),l.forEach((function(e){if(!e.startsWith("#"))throw new Error("Bad line in header:\n".concat(e));e.startsWith("##")?r._parseMetadata(e):c=e})),!c)throw new Error("No format line found in header");var s=c.trim().split("\t"),f=s.slice(0,8),p=["#CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO"];if(s.length<8)throw new Error("VCF header missing columns:\n".concat(c));if(f.length!==p.length||!f.every((function(e,t){return e===p[t]})))throw new Error("VCF column headers not correct:\n".concat(c));this.samples=s.slice(9)}var t,r;return t=e,r=[{key:"_parseGenotypes",value:function(e,t){var r=this,n=t.split("\t"),o={},i=null==e?void 0:e.split(":");return i&&this.samples.forEach((function(e,t){o[e]={},i.forEach((function(t){o[e][t]=null})),n[t].split(":").filter((function(e){return e})).forEach((function(t,n){var a;if(""===t||"."===t||void 0===t)a=null;else{var u=t.split(",").map((function(e){return"."===e?null:e})),c=r.getMetadata("FORMAT",i[n],"Type");a="Integer"===c||"Float"===c?u.map((function(e){return e?+e:e})):u}o[e][i[n]]=a}),{})})),o}},{key:"_parseMetadata",value:function(e){var t=e.trim().match(/^##(.+?)=(.*)/);if(!t)throw new Error("Line is not a valid metadata line: ".concat(e));var r=i(t.slice(1,3),2),n=r[0],o=r[1];if(o.startsWith("<")){n in this.metadata||(this.metadata[n]={});var a=i(this._parseStructuredMetaVal(o),2),u=a[0],c=a[1];this.metadata[n][u]=c}else this.metadata[n]=o}},{key:"_parseStructuredMetaVal",value:function(e){var t=this._parseKeyValue(e.replace(/^<|>$/g,""),","),r=t.ID;return delete t.ID,"Number"in t&&(Number.isNaN(Number(t.Number))||(t.Number=Number(t.Number))),[r,t]}},{key:"getMetadata",value:function(){for(var e=this.metadata,t=arguments.length,r=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:";",r={},n="",o="",i=1,a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&u.every((function(e){return(0,y.default)(e)}))?h.default.createElement(b.default,{key:o,name:o,prefix:k,value:u}):h.default.createElement(g.default,{key:o,name:o,value:u,description:f,prefix:k});if((0,y.default)(u)){t.omitSingleLevel;var p=l(t,i);return(0,m.isUriLocation)(u)?j?null:h.default.createElement(w.default,{key:o,name:o,prefix:k,value:u}):h.default.createElement(e,c(c({},p),{},{key:o,attributes:u,descriptions:d,prefix:[].concat(s(k),[o])}))}return h.default.createElement(S.default,{key:o,name:o,value:E(u,o),description:f,prefix:k,width:Math.min(L,170)})})))}},89739:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(76835),a=n(r(97225)),u=r(94669),c=r(60285),l=(0,i.makeStyles)()((function(e){return{fieldValue:{wordBreak:"break-word",maxHeight:300,fontSize:12,padding:e.spacing(.5),overflow:"auto"}}}));t.default=function(e){var t=e.value,r=l().classes,n="".concat(t).match(/^https?:\/\//);return o.default.createElement("div",{className:r.fieldValue},o.default.isValidElement(t)?t:n?o.default.createElement(u.Link,{href:"".concat(t)},"".concat(t)):o.default.createElement(c.SanitizedHTML,{html:(0,a.default)(t)?JSON.stringify(t):String(t)}))}},32560:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["id"];function i(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,o))})),L=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(n);try{for(L.s();!(t=L.n()).done;)for(var T=t.value,I=0,R=Object.keys(T);Ie.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){(0,i.default)(t)&&(t=t[e])})),"string"==typeof t?t:(0,i.default)(t)&&"string"==typeof(null==t?void 0:t.Description)?t.Description:void 0}},7:function(e,t,r){"use strict";function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2*p?"".concat(n.slice(0,p),"...").concat(n.slice(-p)):n):null)})),l?a.default.createElement("span",{style:{background:u.updownstreamColor}},l):null)}},224:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(63745),a=r(38914);t.default=function(e){var t=e.cds,r=e.sequence;return o.default.createElement("span",{style:{background:i.cdsColor}},(0,a.stitch)(t,r))}},71747:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(63745);t.default=function(e){var t=e.sequence,r=e.upstream,n=e.downstream;return o.default.createElement(o.default.Fragment,null,r?o.default.createElement("span",{style:{background:i.updownstreamColor}},r):null,o.default.createElement("span",{style:{background:i.genomeColor}},t),n?o.default.createElement("span",{style:{background:i.updownstreamColor}},n):null)}},65211:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(38914),a=r(63745);t.default=function(e){for(var t=e.cds,r=e.sequence,n=e.codonTable,u=(0,i.stitch)(t,r),c="",l=0;le.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r".concat(r.name||r.id||"".concat(r.refName,":").concat(r.start+1,"-").concat(r.end),"-").concat(n,"\n")),u.default.createElement("br",null),"genomic"===n?u.default.createElement(p.default,{sequence:y}):"genomic_sequence_updownstream"===n?u.default.createElement(p.default,{sequence:y,upstream:m,downstream:g}):"cds"===n?u.default.createElement(d.default,{cds:x,sequence:y}):"cdna"===n?u.default.createElement(s.default,{exons:E,cds:x,utr:O,sequence:y,intronBp:a}):"protein"===n?u.default.createElement(f.default,{cds:x,codonTable:P,sequence:y}):"gene"===n?u.default.createElement(s.default,{exons:E,cds:x,utr:O,sequence:y,includeIntrons:!0,intronBp:a}):"gene_collapsed_intron"===n?u.default.createElement(s.default,{exons:E,cds:x,sequence:y,utr:O,includeIntrons:!0,collapseIntron:!0,intronBp:a}):"gene_updownstream"===n?u.default.createElement(s.default,{exons:E,cds:x,sequence:y,utr:O,upstream:m,downstream:g,includeIntrons:!0,intronBp:a}):"gene_updownstream_collapsed_intron"===n?u.default.createElement(s.default,{exons:E,cds:x,sequence:y,utr:O,upstream:m,downstream:g,includeIntrons:!0,collapseIntron:!0,intronBp:a}):u.default.createElement("div",null,"Unknown type")))}));t.default=h},60241:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rp)){e.next=7;break}d({error:"Genomic sequence larger than ".concat(p,'bp, use "force load" button to display')}),e.next=19;break;case 7:return l=i-r,s=a+r,e.next=11,b(i,a,u);case 11:return f=e.sent,e.next=14,b(Math.max(0,l),i,u);case 14:return h=e.sent,e.next=17,b(a,s,u);case 17:y=e.sent,c||d({seq:f,upstream:h,downstream:y});case 19:e.next=25;break;case 21:e.prev=21,e.t0=e.catch(0),console.error(e.t0),v(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,21]])})))(),function(){c=!0}}),[t,e,r,n]),{sequence:c,error:y}}},57342:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.genomeColor=t.updownstreamColor=t.cdsColor=t.proteinColor=t.utrColor=t.intronColor=void 0,t.intronColor=void 0,t.utrColor="rgb(200,240,240)",t.proteinColor="rgb(220,160,220)",t.cdsColor="rgb(220,220,180)",t.updownstreamColor="rgba(250,200,200)",t.genomeColor="rgb(200,280,200)"},31160:function(e,t,r){"use strict";var n=["featureData","finalizedFeatureData"],o=["unformattedFeatureData","featureData"];function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return t<=o||(i.subfeatures=null===(n=e.subfeatures)||void 0===n?void 0:n.map((function(e){return m(e,t,r,o+1,i),r(e)}))),i}function b(e){return s.types.model("BaseFeatureWidget",{id:y.ElementId,type:s.types.literal("BaseFeatureWidget"),featureData:s.types.frozen(),formattedFields:s.types.frozen(),unformattedFeatureData:s.types.frozen(),view:s.types.safeReference(e.pluggableMstType("view","stateModel")),track:s.types.safeReference(e.pluggableMstType("track","stateModel")),trackId:s.types.maybe(s.types.string),trackType:s.types.maybe(s.types.string)}).volatile((function(){return{error:void 0}})).actions((function(e){return{setFeatureData:function(t){e.unformattedFeatureData=t},clearFeatureData:function(){e.featureData=void 0},setFormattedData:function(t){e.featureData=t},setExtra:function(t,r){e.trackId=r,e.trackType=t},setError:function(t){e.error=t}}})).actions((function(e){return{afterCreate:function(){(0,s.addDisposer)(e,(0,f.autorun)((function(){var t,r;try{e.setExtra(null===(t=e.track)||void 0===t?void 0:t.type,null===(r=e.track)||void 0===r?void 0:r.configuration.trackId);var n=e.unformattedFeatureData,o=e.track,i=(0,h.getSession)(e);if(n){var a=(0,p.default)(n),u=function(e,t){return c(c({},(0,d.getConf)(i,["formatDetails",e],{feature:t})),(0,d.getConf)(o,["formatDetails",e],{feature:t}))};o&&(a.__jbrowsefmt=u("feature",a),m(a,(0,d.getConf)(o,["formatDetails","depth"]),(function(e){e.__jbrowsefmt=u("subfeatures",e)}))),e.setFormattedData(a)}}catch(t){console.error(t),e.setError(t)}})))}}})).preProcessSnapshot((function(e){return c({unformattedFeatureData:e.featureData,featureData:e.finalizedFeatureData},a(e,n))})).postProcessSnapshot((function(e){e.unformattedFeatureData;var t=e.featureData,r=a(e,o);return c({finalizedFeatureData:JSON.parse(JSON.stringify(t,(function(e,t){return void 0===t?null:t})))},r)}))}t.configSchema=v,t.default=b,t.stateModelFactory=b},38914:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=r.start&&e.start<=r.start})),u=t.findIndex((function(e){return e.end>=o.end&&e.start<=o.end})),c=t[u],l=t[i],s=[].concat(n(t.slice(0,i)),[{start:l.start,end:r.start}]).map((function(e){return a(a({},e),{},{type:"five_prime_UTR"})})),f=[{start:o.end,end:c.end}].concat(n(t.slice(u+1))).map((function(e){return a(a({},e),{},{type:"three_prime_UTR"})}));return[].concat(n(s),n(f))},t.calculateUTRs2=function(e,t){if(!e.length)return[];var r=e.at(0),o=e.at(-1),i=[{start:t.start,end:r.start}].map((function(e){return a(a({},e),{},{type:"five_prime_UTR"})})),u=[{start:o.end,end:t.end}].map((function(e){return a(a({},e),{},{type:"three_prime_UTR"})}));return[].concat(n(i),n(u))},t.ellipses=function(e){return e.length>20?"".concat(e.slice(0,20),"..."):e}},39592:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function a(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions=[],this.fetchESM=null==r?void 0:r.fetchESM,this.fetchCJS=null==r?void 0:r.fetchCJS,this.definitions=JSON.parse(JSON.stringify(t))}var t,r,n,u,l,s,v;return t=e,r=[{key:"loadCJSPlugin",value:(v=c(i().mark((function e(t,r){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("http:"===(n=new URL(t.cjsUrl,r)).protocol||"https:"===n.protocol){e.next=3;break}throw new Error('Cannot load plugins using protocol "'.concat(n.protocol,'"'));case 3:if(this.fetchCJS){e.next=5;break}throw new Error("No fetchCJS callback provided");case 5:return e.abrupt("return",this.fetchCJS(n.href));case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"loadESMPlugin",value:(s=c(i().mark((function e(t,r){var n,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("http:"===(n="esmUrl"in t?new URL(t.esmUrl,r):new URL(t.esmLoc.uri,t.esmLoc.baseUri)).protocol||"https:"===n.protocol){e.next=3;break}throw new Error('cannot load plugins using protocol "'.concat(n.protocol,'"'));case 3:if(this.fetchESM){e.next=5;break}throw new Error("No ESM fetcher installed");case 5:return e.next=7,this.fetchESM(n.href);case 7:if(o=e.sent){e.next=10;break}throw new Error("Could not load ESM plugin: ".concat(n));case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"loadUMDPlugin",value:(l=c(i().mark((function e(t,r){var n,o,a,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("http:"===(n="url"in t?new URL(t.url,r):"umdUrl"in t?new URL(t.umdUrl,r):new URL(t.umdLoc.uri,t.umdLoc.baseUri)).protocol||"https:"===n.protocol){e.next=3;break}throw new Error('cannot load plugins using protocol "'.concat(n.protocol,'"'));case 3:if(o=t.name,a="JBrowsePlugin".concat(o),"undefined"!=typeof jest){e.next=10;break}return e.next=8,m(n.href);case 8:e.next=11;break;case 10:globalThis[a]={default:f.default};case 11:if(u=globalThis[a]){e.next=14;break}throw new Error("Failed to load UMD bundle for ".concat(o,", ").concat(a," is undefined"));case 14:return e.abrupt("return",u);case 15:case"end":return e.stop()}}),e)}))),function(e,t){return l.apply(this,arguments)})},{key:"loadPlugin",value:(u=c(i().mark((function e(t,r){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!d.isElectron||!g(t)){e.next=6;break}return e.next=3,this.loadCJSPlugin(t,r);case 3:case 9:case 15:n=e.sent,e.next=23;break;case 6:if(!y(t)){e.next=12;break}return e.next=9,this.loadESMPlugin(t,r);case 12:if(!h(t)){e.next=18;break}return e.next=15,this.loadUMDPlugin(t,r);case 18:if(d.isElectron||!g(t)){e.next=22;break}throw new Error("CommonJS plugin found, but not in a NodeJS environment: ".concat(JSON.stringify(t)));case 22:throw new Error("Could not determine plugin type: ".concat(JSON.stringify(t)));case 23:if(n.default){e.next=25;break}throw new Error("".concat(w(t)," does not have a default export, cannot load"));case 25:return e.abrupt("return",n.default);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"installGlobalReExports",value:function(e){e.JBrowseExports=Object.fromEntries(Object.entries(p.default).map((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return[n[0],n[1]]})))}},{key:"load",value:(n=c(i().mark((function e(t){var r=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(this.definitions.map(function(){var e=c(i().mark((function e(n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.loadPlugin(n,t);case 2:return e.t0=e.sent,e.t1=n,e.abrupt("return",{plugin:e.t0,definition:e.t1});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=S},48189:function(e,t,r){"use strict";function n(){n=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),u=new T(n||[]);return i(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,u,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&o.call(E,u)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(n,i,a,u){var c=d(e[n],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==l(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var n;i(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[];s(this,e),this.plugins=[],this.jexl=(0,_.default)(),this.pluginMetadata={},this.runtimePluginDefinitions=[],this.elementCreationSchedule=new C("renderer","adapter","text search adapter","display","track","connection","view","widget","rpc method","internet account","add track workflow"),this.rendererTypes=new L("RendererType",y.default),this.adapterTypes=new L("AdapterType",v.default),this.textSearchAdapterTypes=new L("TextSearchAdapterType",E.default),this.trackTypes=new L("TrackType",m.default),this.displayTypes=new L("DisplayType",b.default),this.connectionTypes=new L("ConnectionType",S.default),this.viewTypes=new L("ViewType",g.default),this.widgetTypes=new L("WidgetType",w.default),this.rpcMethods=new L("RpcMethodType",x.default),this.addTrackWidgets=new L("AddTrackWorkflow",j.default),this.internetAccountTypes=new L("InternetAccountType",O.default),this.configured=!1,this.extensionPoints=new Map,this.jbrequireCache=new Map,this.lib=k.default,this.load=function(e){return t.jbrequireCache.has(e)||t.jbrequireCache.set(e,e(t)),t.jbrequireCache.get(e)},this.jbrequire=function(e){if("string"==typeof e){var r=t.lib[e];if(!r)throw new TypeError("No jbrequire re-export defined for package '".concat(e,"'. If this package must be shared between plugins, add it to ReExports.js. If it does not need to be shared, just import it normally."));return r}if("function"==typeof e)return t.load(e);if(e.default)return t.jbrequire(e.default);throw new TypeError("lib passed to jbrequire must be either a string or a function")},this.addPlugin({plugin:new A.default,metadata:{isCore:!0}}),r.forEach((function(e){t.addPlugin(e)}))}var t,r;return p(e,[{key:"pluginConfigurationSchemas",value:function(){var e={};return this.plugins.forEach((function(t){t.configurationSchema&&(e[t.name]=t.configurationSchema)})),e}},{key:"addPlugin",value:function(e){if(this.configured)throw new Error("JBrowse already configured, cannot add plugins");var t,r,n=(t="install"in e&&"configure"in e?[e,{}]:[e.plugin,e.metadata],r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||u(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1],a=void 0===i?{}:i;if(this.plugins.includes(o))throw new Error("plugin already installed");return this.pluginMetadata[o.name]=a,"definition"in e&&this.runtimePluginDefinitions.push(e.definition),o.install(this),this.plugins.push(o),this}},{key:"getPlugin",value:function(e){return this.plugins.find((function(t){return t.name===e}))}},{key:"hasPlugin",value:function(e){return void 0!==this.getPlugin(e)}},{key:"createPluggableElements",value:function(){return this.elementCreationSchedule&&(this.elementCreationSchedule.run(),delete this.elementCreationSchedule),this}},{key:"setRootModel",value:function(e){this.rootModel=e}},{key:"configure",value:function(){var e=this;if(this.configured)throw new Error("already configured");return this.plugins.forEach((function(t){return t.configure(e)})),this.configured=!0,this}},{key:"getElementTypeRecord",value:function(e){switch(e){case"adapter":return this.adapterTypes;case"text search adapter":return this.textSearchAdapterTypes;case"connection":return this.connectionTypes;case"widget":return this.widgetTypes;case"renderer":return this.rendererTypes;case"display":return this.displayTypes;case"track":return this.trackTypes;case"view":return this.viewTypes;case"rpc method":return this.rpcMethods;case"internet account":return this.internetAccountTypes;case"add track workflow":return this.addTrackWidgets;default:throw new Error("invalid element type '".concat(e,"'"))}}},{key:"addElementType",value:function(e,t){var r,n=this;if("function"!=typeof t)throw new Error("must provide a callback function that returns the new type object");var o=this.getElementTypeRecord(e);return null===(r=this.elementCreationSchedule)||void 0===r||r.add(e,(function(){var r=t(n);if(!r.name)throw new Error("cannot add a ".concat(e," with no name"));if(o.has(r.name))throw new Error("".concat(e," ").concat(r.name," already registered, cannot register it again"));o.add(r.name,n.evaluateExtensionPoint("Core-extendPluggableElement",r))})),this}},{key:"getElementType",value:function(e,t){return this.getElementTypeRecord(e).get(t)}},{key:"getElementTypesInGroup",value:function(e){return this.getElementTypeRecord(e).all()}},{key:"getTrackElements",value:function(){return this.getElementTypesInGroup("track")}},{key:"getConnectionElements",value:function(){return this.getElementTypesInGroup("connection")}},{key:"getAddTrackWorkflowElements",value:function(){return this.getElementTypesInGroup("add track workflow")}},{key:"getRpcElements",value:function(){return this.getElementTypesInGroup("rpc method")}},{key:"getDisplayElements",value:function(){return this.getElementTypesInGroup("display")}},{key:"getAdapterElements",value:function(){return this.getElementTypesInGroup("adapter")}},{key:"pluggableMstType",value:function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.types.maybe(h.types.null),o=this.getElementTypeRecord(e).all().map((function(e){return e[t]})).filter((function(e){return(0,h.isType)(e)&&(0,h.isModelType)(e)}));return 0===o.length&&"undefined"==typeof jest?(console.warn("No pluggable types found matching ('".concat(e,"','").concat(t,"')")),n):(r=h.types).union.apply(r,a(o))}},{key:"pluggableConfigSchemaType",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"configSchema",n=this.getElementTypeRecord(e).all().map((function(e){return e[r]})).filter((function(e){return(0,P.isBareConfigurationSchemaType)(e)}));return 0===n.length&&n.push((0,P.ConfigurationSchema)("Null",{})),(t=h.types).union.apply(t,a(n))}},{key:"getRendererType",value:function(e){return this.rendererTypes.get(e)}},{key:"getRendererTypes",value:function(){return this.rendererTypes.all()}},{key:"getAdapterType",value:function(e){return this.adapterTypes.get(e)}},{key:"getTextSearchAdapterType",value:function(e){return this.textSearchAdapterTypes.get(e)}},{key:"getTrackType",value:function(e){return this.trackTypes.get(e)}},{key:"getDisplayType",value:function(e){return this.displayTypes.get(e)}},{key:"getViewType",value:function(e){return this.viewTypes.get(e)}},{key:"getAddTrackWorkflow",value:function(e){return this.addTrackWidgets.get(e)}},{key:"getWidgetType",value:function(e){return this.widgetTypes.get(e)}},{key:"getConnectionType",value:function(e){return this.connectionTypes.get(e)}},{key:"getRpcMethodType",value:function(e){return this.rpcMethods.get(e)}},{key:"getInternetAccountType",value:function(e){return this.internetAccountTypes.get(e)}},{key:"addRendererType",value:function(e){return this.addElementType("renderer",e)}},{key:"addAdapterType",value:function(e){return this.addElementType("adapter",e)}},{key:"addTextSearchAdapterType",value:function(e){return this.addElementType("text search adapter",e)}},{key:"addTrackType",value:function(e){var t=this;return this.addElementType("track",(function(){var r=e(t);return t.getElementTypesInGroup("display").forEach((function(e){e.trackType!==r.name||r.displayTypes.includes(e)||r.addDisplayType(e)})),r}))}},{key:"addDisplayType",value:function(e){return this.addElementType("display",e)}},{key:"addViewType",value:function(e){var t=this;return this.addElementType("view",(function(){var r=e(t);return t.getElementTypesInGroup("display").forEach((function(e){e.viewType!==r.name&&e.viewType!==r.extendedName||r.displayTypes.includes(e)||r.addDisplayType(e)})),r}))}},{key:"addWidgetType",value:function(e){return this.addElementType("widget",e)}},{key:"addConnectionType",value:function(e){return this.addElementType("connection",e)}},{key:"addRpcMethod",value:function(e){return this.addElementType("rpc method",e)}},{key:"addInternetAccountType",value:function(e){return this.addElementType("internet account",e)}},{key:"addAddTrackWorkflowType",value:function(e){return this.addElementType("add track workflow",e)}},{key:"addToExtensionPoint",value:function(e,t){var r=this.extensionPoints.get(e);r||(r=[],this.extensionPoints.set(e,r)),r.push(t)}},{key:"evaluateExtensionPoint",value:function(e,t,r){var n=this.extensionPoints.get(e),o=t;if(n){var a,u=i(n);try{for(u.s();!(a=u.n()).done;){var c=a.value;try{o=c(o,r)}catch(e){console.error(e)}}}catch(e){u.e(e)}finally{u.f()}}return o}},{key:"evaluateAsyncExtensionPoint",value:(t=n().mark((function e(t,r,o){var a,u,c,l,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=this.extensionPoints.get(t),u=r,!a){e.next=27;break}c=i(a),e.prev=4,c.s();case 6:if((l=c.n()).done){e.next=19;break}return s=l.value,e.prev=8,e.next=11,s(u,o);case 11:u=e.sent,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),console.error(e.t0);case 17:e.next=6;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(4),c.e(e.t1);case 24:return e.prev=24,c.f(),e.finish(24);case 27:return e.abrupt("return",u);case 28:case"end":return e.stop()}}),e,this,[[4,21,24,27],[8,14]])})),r=function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function u(e){o(a,n,i,u,c,"next",e)}function c(e){o(a,n,i,u,c,"throw",e)}u(void 0)}))},function(e,t,n){return r.apply(this,arguments)})}]),e}();t.default=T},36450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(7734);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.Attributes}})},23639:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(7734);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.BaseCard}})},39850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(7734);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.FeatureDetails}})},21232:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(56531);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(o).default}})},86358:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["mobx","mobx-state-tree","react","react/jsx-runtime","react-dom","mobx-react","@mui/x-data-grid","@mui/material/utils","@material-ui/core/utils","tss-react/mui","@material-ui/core","@mui/material","prop-types","@mui/material/styles","@material-ui/core/styles","@material-ui/core/Accordion","@material-ui/core/AccordionActions","@material-ui/core/AccordionDetails","@material-ui/core/Alert","@material-ui/core/AlertTitle","@material-ui/core/Autocomplete","@material-ui/core/Avatar","@material-ui/core/AvatarGroup","@material-ui/core/Backdrop","@material-ui/core/Badge","@material-ui/core/Box","@material-ui/core/Breadcrumbs","@material-ui/core/Button","@material-ui/core/ButtonGroup","@material-ui/core/Card","@material-ui/core/CardActions","@material-ui/core/CardActionArea","@material-ui/core/CardContent","@material-ui/core/CardHeader","@material-ui/core/CardMedia","@material-ui/core/CircularProgress","@material-ui/core/Collapse","@material-ui/core/ClickAwayListener","@material-ui/core/Chip","@material-ui/core/Checkbox","@material-ui/core/Container","@material-ui/core/Dialog","@material-ui/core/DialogActions","@material-ui/core/DialogTitle","@material-ui/core/DialogContent","@material-ui/core/DialogContentText","@material-ui/core/Divider","@material-ui/core/Drawer","@material-ui/core/Fab","@material-ui/core/Fade","@material-ui/core/FilledInput","@material-ui/core/FormLabel","@material-ui/core/FormControl","@material-ui/core/FormControlLabel","@material-ui/core/FormHelperText","@material-ui/core/FormGroup","@material-ui/core/Grid","@material-ui/core/Grow","@material-ui/core/Icon","@material-ui/core/IconButton","@material-ui/core/Input","@material-ui/core/InputBase","@material-ui/core/InputLabel","@material-ui/core/InputAdornment","@material-ui/core/Link","@material-ui/core/LinearProgress","@material-ui/core/List","@material-ui/core/ListItem","@material-ui/core/ListItemAvatar","@material-ui/core/ListItemSecondaryAction","@material-ui/core/ListItemIcon","@material-ui/core/ListSubheader","@material-ui/core/ListItemText","@material-ui/core/Menu","@material-ui/core/MenuItem","@material-ui/core/MenuList","@material-ui/core/Modal","@material-ui/core/NativeSelect","@material-ui/core/OutlinedInput","@material-ui/core/Pagination","@material-ui/core/PaginationItem","@material-ui/core/Paper","@material-ui/core/Popover","@material-ui/core/Popper","@material-ui/core/Portal","@material-ui/core/Radio","@material-ui/core/RadioGroup","@material-ui/core/Rating","@material-ui/core/ScopedCssBaseline","@material-ui/core/Select","@material-ui/core/Skeleton","@material-ui/core/Slider","@material-ui/core/Snackbar","@material-ui/core/SnackbarContent","@material-ui/core/SpeedDial","@material-ui/core/SpeedDialAction","@material-ui/core/SpeedDialIcon","@material-ui/core/Stack","@material-ui/core/Step","@material-ui/core/StepButton","@material-ui/core/StepConnector","@material-ui/core/StepLabel","@material-ui/core/StepIcon","@material-ui/core/Stepper","@material-ui/core/SvgIcon","@material-ui/core/Switch","@material-ui/core/Tab","@material-ui/core/Table","@material-ui/core/TableBody","@material-ui/core/TableCell","@material-ui/core/TableContainer","@material-ui/core/TableFooter","@material-ui/core/TableHead","@material-ui/core/TablePagination","@material-ui/core/TableRow","@material-ui/core/TableSortLabel","@material-ui/core/Tabs","@material-ui/core/TextField","@material-ui/core/TextareaAutosize","@material-ui/core/ToggleButton","@material-ui/core/ToggleButtonGroup","@material-ui/core/Toolbar","@material-ui/core/Tooltip","@material-ui/core/Typography","@mui/material/Accordion","@mui/material/AccordionActions","@mui/material/AccordionDetails","@mui/material/Alert","@mui/material/AlertTitle","@mui/material/Autocomplete","@mui/material/Avatar","@mui/material/AvatarGroup","@mui/material/Backdrop","@mui/material/Badge","@mui/material/Box","@mui/material/Breadcrumbs","@mui/material/Button","@mui/material/ButtonGroup","@mui/material/Card","@mui/material/CardActions","@mui/material/CardActionArea","@mui/material/CardContent","@mui/material/CardHeader","@mui/material/CardMedia","@mui/material/CircularProgress","@mui/material/Collapse","@mui/material/ClickAwayListener","@mui/material/Chip","@mui/material/Checkbox","@mui/material/Container","@mui/material/Dialog","@mui/material/DialogActions","@mui/material/DialogTitle","@mui/material/DialogContent","@mui/material/DialogContentText","@mui/material/Divider","@mui/material/Drawer","@mui/material/Fab","@mui/material/Fade","@mui/material/FilledInput","@mui/material/FormLabel","@mui/material/FormControl","@mui/material/FormControlLabel","@mui/material/FormHelperText","@mui/material/FormGroup","@mui/material/Grid","@mui/material/Grow","@mui/material/Icon","@mui/material/IconButton","@mui/material/Input","@mui/material/InputBase","@mui/material/InputLabel","@mui/material/InputAdornment","@mui/material/Link","@mui/material/LinearProgress","@mui/material/List","@mui/material/ListItem","@mui/material/ListItemAvatar","@mui/material/ListItemSecondaryAction","@mui/material/ListItemIcon","@mui/material/ListSubheader","@mui/material/ListItemText","@mui/material/Menu","@mui/material/MenuItem","@mui/material/MenuList","@mui/material/Modal","@mui/material/NativeSelect","@mui/material/OutlinedInput","@mui/material/Pagination","@mui/material/PaginationItem","@mui/material/Paper","@mui/material/Popover","@mui/material/Popper","@mui/material/Portal","@mui/material/Radio","@mui/material/RadioGroup","@mui/material/Rating","@mui/material/ScopedCssBaseline","@mui/material/Select","@mui/material/Skeleton","@mui/material/Slider","@mui/material/Snackbar","@mui/material/SnackbarContent","@mui/material/SpeedDial","@mui/material/SpeedDialAction","@mui/material/SpeedDialIcon","@mui/material/Stack","@mui/material/Step","@mui/material/StepButton","@mui/material/StepConnector","@mui/material/StepLabel","@mui/material/StepIcon","@mui/material/Stepper","@mui/material/SvgIcon","@mui/material/Switch","@mui/material/Tab","@mui/material/Table","@mui/material/TableBody","@mui/material/TableCell","@mui/material/TableContainer","@mui/material/TableFooter","@mui/material/TableHead","@mui/material/TablePagination","@mui/material/TableRow","@mui/material/TableSortLabel","@mui/material/Tabs","@mui/material/TextField","@mui/material/TextareaAutosize","@mui/material/ToggleButton","@mui/material/ToggleButtonGroup","@mui/material/Toolbar","@mui/material/Tooltip","@mui/material/Typography","@material-ui/lab/ToggleButton","@material-ui/lab/ToggleButtonGroup","@material-ui/lab/Autocomplete","@material-ui/lab/Alert","@material-ui/lab","@jbrowse/core/Plugin","@jbrowse/core/pluggableElementTypes","@jbrowse/core/pluggableElementTypes/ViewType","@jbrowse/core/pluggableElementTypes/AdapterType","@jbrowse/core/pluggableElementTypes/DisplayType","@jbrowse/core/pluggableElementTypes/TrackType","@jbrowse/core/pluggableElementTypes/WidgetType","@jbrowse/core/pluggableElementTypes/models","@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType","@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType","@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType","@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType","@jbrowse/core/pluggableElementTypes/renderers/RendererType","@jbrowse/core/configuration","@jbrowse/core/util/types/mst","@jbrowse/core/ui","@jbrowse/core/util","@jbrowse/core/util/color","@jbrowse/core/util/layouts","@jbrowse/core/util/tracks","@jbrowse/core/util/Base1DViewModel","@jbrowse/core/util/io","@jbrowse/core/util/mst-reflection","@jbrowse/core/util/rxjs","@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail","@jbrowse/core/data_adapters/BaseAdapter"]},56531:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)throw new Error("The following modules are in the modules libs, but not the re-exports list: ".concat(se.join(", ")));var fe=$.default.filter((function(e){return!le.includes(e)}));if(fe.length)throw new Error("The following modules are in the re-exports list, but not the modules libs: ".concat(fe.join(", ")));t.default=ce},45595:(e,t)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,o);if(!n.sessionId)throw new Error("sessionId is required");var u=function(e){return(0,v.default)(e)}(t);return r.get(u,{adapterConf:t,self:e,options:a},void 0,i)},getRefNameMapForAdapter:function(e,t){var r=this;return d(l().mark((function n(){var o;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(null==t?void 0:t.sessionId){n.next=2;break}throw new Error("sessionId is required");case 2:return n.next=4,r.getAdapterMapEntry(e,t);case 4:return o=n.sent,n.abrupt("return",o.forwardMap);case 6:case"end":return n.stop()}}),n)})))()},getReverseRefNameMapForAdapter:function(e,t){var r=this;return d(l().mark((function n(){var o;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.getAdapterMapEntry(e,t);case 2:return o=n.sent,n.abrupt("return",o.reverseMap);case 4:case"end":return n.stop()}}),n)})))()}}}))}},23623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2415);t.default=function(e){return(0,n.ConfigurationSchema)("BaseAssembly",{aliases:{type:"stringArray",defaultValue:[],description:"Other possible names for the assembly"},sequence:e.getTrackType("ReferenceSequenceTrack").configSchema,refNameColors:{type:"stringArray",defaultValue:[],description:"Define custom colors for each reference sequence. Will cycle through this list if there are not enough colors for every sequence."},refNameAliases:(0,n.ConfigurationSchema)("RefNameAliases",{adapter:e.pluggableConfigSchemaType("adapter")},{preProcessSnapshot:function(e){return e.adapter?e:{adapter:{type:"RefNameAliasAdapter"}}}}),cytobands:(0,n.ConfigurationSchema)("Cytoband",{adapter:e.pluggableConfigSchemaType("adapter")},{preProcessSnapshot:function(e){return e.adapter?e:{adapter:{type:"CytobandAdapter"}}}}),displayName:{type:"string",defaultValue:"",description:'A human readable display name for the assembly e.g. "Homo sapiens (hg38)" while the assembly name may just be "hg38"'}},{explicitIdentifier:"name"})}},48534:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:{};if("string"!=typeof e)throw new Error("first arg must be string name of the model that this config schema goes with");var o=t,i=n;return(null===(r=n.baseConfiguration)||void 0===r?void 0:r.jbrowseSchemaDefinition)&&(o=a(a({},n.baseConfiguration.jbrowseSchemaDefinition),o),delete(i=a(a({},n.baseConfiguration.jbrowseSchemaOptions),n)).baseConfiguration),{schemaDefinition:o,options:i}}(e,t,r),i=o.schemaDefinition,l=o.options,y=function(e,t,r){var o,i={};if(r.explicitlyTyped&&(i.type=s.types.optional(s.types.literal(e),e)),r.explicitIdentifier&&r.implicitIdentifier)throw new Error("Cannot have both explicit and implicit identifiers in ".concat(e));r.explicitIdentifier?"string"==typeof r.explicitIdentifier?(i[r.explicitIdentifier]=s.types.identifier,o=r.explicitIdentifier):(i.id=s.types.identifier,o="id"):r.implicitIdentifier&&("string"==typeof r.implicitIdentifier?(i[r.implicitIdentifier]=f.ElementId,o=r.implicitIdentifier):(i.id=f.ElementId,o="id"));var l={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};Object.entries(t).forEach((function(t){var r=n(t,2),o=r[0],a=r[1];if((0,s.isType)(a)&&(0,s.isLateType)(a)||(0,d.isConfigurationSchemaType)(a))i[o]=a;else if("string"==typeof a||"number"==typeof a)l[o]=a;else{if("object"!==c(a))throw new Error('invalid configuration schema definition, "'.concat(o,'" must be either a valid configuration slot definition, a constant, or a nested configuration schema'));if(!a.type)throw new Error("no type set for config slot ".concat(e,".").concat(o));try{i[o]=(0,p.default)(o,a)}catch(t){throw new Error("invalid config slot definition for ".concat(e,".").concat(o,": ").concat(t))}}}));var y=s.types.model("".concat(e,"ConfigurationSchema"),i).actions((function(e){return{setSubschema:function(t,r){if(!(0,d.isConfigurationSchemaType)(i[t]))throw new Error("".concat(t," is not a subschema, cannot replace"));var n=(0,s.isStateTreeNode)(r)?r:i[t].create(r);return e[t]=n,n}}}));Object.keys(l).length&&(y=y.volatile((function(){return l}))),r.actions&&(y=y.actions(r.actions)),r.views&&(y=y.views(r.views)),r.extend&&(y=y.extend(r.extend));var v=o?u({},o,"placeholderId"):{},m=r.explicitlyTyped?a({type:e},v):v,b=(0,s.getSnapshot)(y.create(m));return y=y.postProcessSnapshot((function(e){for(var t,r={},o=!0,i=0,a=Object.entries(e);i{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(82123),i=r(25420),a=r(66769),u=r(35743),c={stringArray:o.types.array(o.types.string),stringArrayMap:o.types.map(o.types.array(o.types.string)),numberMap:o.types.map(o.types.number),boolean:o.types.boolean,color:o.types.refinement("Color",o.types.string,(function(){return!0})),integer:o.types.integer,number:o.types.number,string:o.types.string,text:o.types.string,fileLocation:a.FileLocation,frozen:o.types.frozen()},l={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},s=function(e){return{views:{get valueJSON(){return e.value}}}},f=function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}}}},p={fileLocation:f,number:s,integer:s,boolean:s,frozen:f,stringArray:function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add:function(t){e.value.push(t)},removeAtIndex:function(t){e.value.splice(t,1)},setAtIndex:function(t,r){e.value[t]=r}}}},stringArrayMap:function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add:function(t,r){e.value.set(t,r)},remove:function(t){e.value.delete(t)},addToKey:function(t,r){var n=e.value.get(t);if(!n)throw new Error("".concat(t," not found"));n.push(r)},removeAtKeyIndex:function(t,r){var n=e.value.get(t);if(!n)throw new Error("".concat(t," not found"));n.splice(r,1)},setAtKeyIndex:function(t,r,n){var o=e.value.get(t);if(!o)throw new Error("".concat(t," not found"));o[r]=n}}}},numberMap:function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add:function(t,r){e.value.set(t,r)},remove:function(t){e.value.delete(t)}}}}},d=o.types.refinement("JexlString",o.types.string,(function(e){return e.startsWith("jexl:")}));t.default=function(e,t){var r=t.description,a=void 0===r?"":r,s=t.model,f=t.type,h=t.defaultValue,y=t.contextVariable,v=void 0===y?[]:y;if(!f)throw new Error("type name required");if(s||(s=c[f]),!s)throw new Error('no builtin config slot type "'.concat(f,"\", and no 'model' param provided"));if(void 0===h)throw new Error("no 'defaultValue' provided");var m="".concat(e.charAt(0).toUpperCase()).concat(e.slice(1),"ConfigSlot"),b=o.types.model(m,{name:o.types.literal(e),description:o.types.literal(a),type:o.types.literal(f),value:o.types.optional(o.types.union(d,s),h)}).volatile((function(){return{contextVariable:v}})).views((function(e){return{get isCallback(){return String(e.value).startsWith("jexl:")}}})).views((function(e){return{get expr(){if(e.isCallback){var t=(0,u.getEnv)(e).pluginManager;return t||"undefined"!=typeof jest||console.warn("no pluginManager detected on config env (if you dynamically instantiate a config, for example in renderProps for your display model, check that you add the env argument)"),(0,i.stringToJexlExpression)(String(e.value),null==t?void 0:t.jexl)}return{evalSync:function(){return e.value}}},get valueJSON(){var t;if(!e.isCallback)return(null==(t=e.value)?void 0:t.toJSON)?t.toJSON():'"'.concat(t,'"')}}})).preProcessSnapshot((function(t){return"object"===n(t)&&t.name===e?t:{name:e,description:a,type:f,value:t}})).postProcessSnapshot((function(e){return"object"===n(e.value)?JSON.stringify(e.value)!==JSON.stringify(h)?e.value:void 0:e.value!==h?e.value:void 0})).actions((function(e){return{set:function(t){e.value=t},reset:function(){e.value=h},convertToCallback:function(){e.isCallback||(e.value="jexl:".concat(e.valueJSON||"''"))},convertToValue:function(){if(e.isCallback){try{var t=e.expr.evalSync();if(void 0!==t)return void(e.value=t)}catch(e){}if(e.value=h,e.isCallback){if(!(f in l))throw new Error("no fallbackDefault defined for type ".concat(f));e.value=l[f]}}}}}));p[f]&&(b=b.extend(p[f]));var g=o.types.optional(b,{name:e,type:f,description:a,value:h});return Object.defineProperty(g,"isJBrowseConfigurationSlot",{value:!0}),g}},2415:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationReference=t.ConfigurationSchema=void 0;var i=r(601);Object.defineProperty(t,"ConfigurationSchema",{enumerable:!0,get:function(){return i.ConfigurationSchema}}),Object.defineProperty(t,"ConfigurationReference",{enumerable:!0,get:function(){return i.ConfigurationReference}}),o(r(41635),t)},41635:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:{};if(!e)throw new TypeError("must provide conf object to read");if(!t)return JSON.parse(JSON.stringify((0,i.getSnapshot)(e)));if("string"==typeof t){var n=e[t];if(!n&&(0,i.isStateTreeNode)(e)&&(0,i.isMapType)((0,i.getType)(e))&&(n=e.get(t)),!n)return;if(n.expr){var o=n.expr.evalSync(r);return(0,i.isStateTreeNode)(o)?JSON.parse(JSON.stringify((0,i.getSnapshot)(o))):o}return(0,i.isStateTreeNode)(n)?JSON.parse(JSON.stringify((0,i.getSnapshot)(n))):n}if(Array.isArray(t)){var a=t[0];if(t.length>1){var c=t.slice(1),l=e[a];return!l&&(0,i.isStateTreeNode)(e)&&(0,i.isMapType)((0,i.getType)(e))&&(l=e.get(a)),l?u(l,c,r):void 0}return u(e,a,r)}throw new TypeError("slotPath must be a string or array")}function c(e){if((0,i.isType)(e)){if((0,i.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema")))return!0;if((0,i.isLateType)(e))return!0}return!1}function l(e){return!!(0,i.isType)(e)&&(!!c(e)||((0,i.isUnionType)(e)?(0,a.getUnionSubTypes)(e).every((function(e){return l(e)||"undefined"===e.name})):!(!(0,i.isOptionalType)(e)||!l((0,a.getSubType)(e)))||!(!(0,i.isArrayType)(e)||!l((0,a.getSubType)(e)))||!(!(0,i.isMapType)(e)||!l((0,a.getSubType)(e)))))}function s(e){return(0,i.isStateTreeNode)(e)&&l((0,i.getType)(e))}t.readConfObject=u,t.getConf=function(e,t,r){if(!e)throw new TypeError("must provide a model object");var n=e.configuration;if(s(n))return u(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")},t.getTypeNamesFromExplicitlyTypedUnion=function e(t){if((0,i.isType)(t)&&(t=(0,a.resolveLateType)(t),(0,i.isUnionType)(t))){var r=[];return(0,a.getUnionSubTypes)(t).forEach((function(t){var n,i=e(t=(0,a.resolveLateType)(t));if(i.length||(i=[(0,a.getDefaultValue)(t).type]),!i[0])throw new Error("invalid config schema type ".concat(t));r.push.apply(r,function(e){if(Array.isArray(e))return o(e)}(n=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})),r}return[]},t.isBareConfigurationSchemaType=c,t.isConfigurationSchemaType=l,t.isConfigurationModel=s,t.isConfigurationSlotType=function(e){return"object"===n(e)&&null!==e&&"isJBrowseConfigurationSlot"in e}},53928:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:l.create(),r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSubAdapter=r,this.pluginManager=n,"undefined"==typeof jest){var o=(0,a.isStateTreeNode)(t)?(0,a.getSnapshot)(t):t;this.id="".concat((0,c.default)(o))}else this.id="test"}var t,r;return t=e,(r=[{key:"getConf",value:function(e){return(0,u.readConfObject)(this.config,e)}}])&&o(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.BaseAdapter=s,s.capabilities=[]},84179:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))}}function s(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return(0,m.ObservableCreate)(function(){var n=l(u().mark((function n(o){var i;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.hasDataForRefName(e.refName,r);case 2:i=n.sent,(0,b.checkAbortSignal)(r.signal),i?t.getFeatures(e,r).subscribe(o):o.complete();case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())}},{key:"getFeaturesInMultipleRegions",value:function(e){var t,r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h.merge.apply(void 0,function(e){if(Array.isArray(e))return a(e)}(t=e.map((function(e){return r.getFeaturesInRegion(e,n)})))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}},{key:"hasDataForRefName",value:(v=l(u().mark((function e(t){var r,n,o=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this.getRefNames(r);case 3:return n=e.sent,e.abrupt("return",n.includes(t));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"getRegionQuantitativeStats",value:(f=l(u().mark((function e(t,r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getFeatures(t,r),e.abrupt("return",(0,g.scoresToStats)(t,n));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getMultiRegionQuantitativeStats",value:(c=l(u().mark((function e(){var t,r,n,o,i,a,c,l,s,f=this,p=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=p.length>1?p[1]:void 0,(t=p.length>0&&void 0!==p[0]?p[0]:[]).length){e.next=4;break}return e.abrupt("return",(0,g.blankStats)());case 4:return e.next=6,Promise.all(t.map((function(e){return f.getRegionQuantitativeStats(e,r)})));case 6:return n=e.sent,o=(0,b.max)(n.map((function(e){return e.scoreMax}))),i=(0,b.min)(n.map((function(e){return e.scoreMin}))),a=(0,b.sum)(n.map((function(e){return e.scoreSum}))),c=(0,b.sum)(n.map((function(e){return e.scoreSumSquares}))),l=(0,b.sum)(n.map((function(e){return e.featureCount}))),s=(0,b.sum)(n.map((function(e){return e.basesCovered}))),e.abrupt("return",(0,g.rectifyStats)({scoreMin:i,scoreMax:o,featureCount:l,basesCovered:s,scoreSumSquares:c,scoreSum:a}));case 14:case"end":return e.stop()}}),e)}))),function(){return c.apply(this,arguments)})},{key:"getRegionFeatureDensityStats",value:function(e,t){var r=this,n=+Date.now(),o=function(){var n=l(u().mark((function n(o,c){var l,s,f,p;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return l=e.start,s=e.end,f=.75*l+.25*s,n.next=4,(0,h.firstValueFrom)(r.getFeatures(i(i({},e),{},{start:Math.max(0,Math.round(f-o/2)),end:Math.min(Math.round(f+o/2),s)}),t).pipe((0,y.toArray)()));case 4:return p=n.sent,n.abrupt("return",a(o,{featureDensity:p.length/o},p.length,c));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}(),a=function(){var t=l(u().mark((function t(r,i,a,c){var l,s;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=e.end-e.start,!(a>=70||2*r>l)){t.next=5;break}return t.abrupt("return",i);case 5:if(!(c<=5e3)){t.next=12;break}return s=+Date.now(),c+=s-n,n=s,t.abrupt("return",o(2*r,c));case 12:return console.warn("Stats estimation reached timeout, or didn't get enough features"),t.abrupt("return",{featureDensity:Number.POSITIVE_INFINITY});case 14:case"end":return t.stop()}}),t)})));return function(e,r,n,o){return t.apply(this,arguments)}}();return o(1e3,0)}},{key:"getMultiRegionFeatureDensityStats",value:(o=l(u().mark((function e(t,r){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}throw new Error("No regions supplied");case 2:return e.abrupt("return",this.getRegionFeatureDensityStats(t[0],r));case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})}],r&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),j}(v.BaseAdapter);t.BaseFeatureDataAdapter=w},39105:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},38033:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTextSearchAdapter=t.isRefNameAliasAdapter=t.isFeatureAdapter=t.isRegionsAdapter=t.isSequenceAdapter=void 0,t.isSequenceAdapter=function(e){return"getRegions"in e&&"getFeatures"in e},t.isRegionsAdapter=function(e){return"getRegions"in e},t.isFeatureAdapter=function(e){return"getFeatures"in e},t.isRefNameAliasAdapter=function(e){return"getRefNameAliases"in e},t.isTextSearchAdapter=function(e){return"searchIndex"in e}},16263:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=(0,r(2415).ConfigurationSchema)("CytobandAdapter",{cytobandLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/cytoband.txt.gz"}}},{explicitlyTyped:!0});t.default=n},47085:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=r(53136),c=a(r(32965));t.default=function(e){e.addAdapterType((function(){return new u.AdapterType({name:"CytobandAdapter",configSchema:c.default,getAdapterClass:function(){return Promise.resolve().then((function(){return i(r(16263))})).then((function(e){return e.default}))}})}))}},74477:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(e.regions||(e.region?[e.region]:[]));try{for(n.s();!(r=n.n()).done;){var o=r.value;void 0!==o.refName&&t.dataAdapter.freeResources(o)}}catch(e){n.e(e)}finally{n.f()}}else console.warn(t.dataAdapter,"does not implement freeResources")}));return t},t.clearAdapterCache=function(){f={}}},32220:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(s,e);var t,r,i,l=(r=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(r);if(i){var o=c(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),t=l.call(this,e),"AdapterClass"in e)t.AdapterClass=e.AdapterClass,t.getAdapterClass=a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.AdapterClass);case 1:case"end":return t.stop()}}),t)})));else{if(!("getAdapterClass"in e))throw new Error("no AdapterClass or getAdapterClass is defined for adapter type ".concat(t.name));t.getAdapterClass=e.getAdapterClass}return t.configSchema=e.configSchema,t.adapterCapabilities=e.adapterCapabilities||[],t.adapterMetadata=e.adapterMetadata,t}return t=s,Object.defineProperty(t,"prototype",{writable:!1}),t}(l(r(97358)).default);t.default=s},18202:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(c,e);var t,r,a,u=(r=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=i(r);if(a){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=u.call(this,e)).ReactComponent=e.ReactComponent,t.stateModel=e.stateModel,!t.ReactComponent)throw new Error("no ReactComponent defined for view ".concat(t.name));if(!t.stateModel)throw new Error("no stateModel defined for view ".concat(t.name));return t}return t=c,Object.defineProperty(t,"prototype",{writable:!1}),t}(a(r(97358)).default);t.default=u},2871:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(c,e);var t,r,a,u=(r=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=i(r);if(a){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=u.call(this,e)).stateModel=e.stateModel,t.configSchema=e.configSchema,t.description=e.description,t.url=e.url,t.configEditorComponent=e.configEditorComponent,!t.stateModel)throw new Error("no stateModel defined for connection ".concat(t.name));if(!t.configSchema)throw new Error("no configSchema defined for connection ".concat(t.name));return t}return t=c,Object.defineProperty(t,"prototype",{writable:!1}),t}(a(r(97358)).default);t.default=u},17808:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(97358)),c=r(8043),l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(l,e);var t,r,a,u=(r=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=i(r);if(a){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this,e)).stateModel=e.stateModel,t.subDisplay=e.subDisplay,t.configSchema=e.configSchema,t.ReactComponent=e.ReactComponent,t.trackType=e.trackType,t.viewType=e.viewType,!t.stateModel)throw new Error("no stateModel defined for display ".concat(t.name));if(!t.configSchema)throw new Error("no configSchema provided for display ".concat(t.name));if(!t.ReactComponent)throw new Error("no ReactComponent provided for display ".concat(t.name));if(!t.trackType)throw new Error("no trackType provided for display ".concat(t.name));if(!t.viewType)throw new Error("no viewType provided for display ".concat(t.name));if(!(0,c.getDefaultValue)(t.configSchema).type){var r=t.configSchema?t.configSchema.name:"UNKNOWN";throw new Error("".concat(r," is not explicitlyTyped"))}return t}return t=l,Object.defineProperty(t,"prototype",{writable:!1}),t}(u.default);t.default=l},97653:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(r(97358)),c=r(8043),l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(l,e);var t,r,a,u=(r=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=i(r);if(a){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this,e)).stateModel=e.stateModel,t.configSchema=e.configSchema,!t.stateModel)throw new Error("no stateModel defined for internet account type ".concat(t.name));if(!t.configSchema)throw new Error("no configSchema provided for internet account type ".concat(t.name));if(!(0,c.getDefaultValue)(t.configSchema).type){var r=t.configSchema?t.configSchema.name:"UNKNOWN";throw new Error("".concat(r," is not explicitlyTyped"))}return t}return t=l,Object.defineProperty(t,"prototype",{writable:!1}),t}(u.default);t.default=l},97358:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var n=0;n=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},o=e.pluggableConfigSchemaType("display"),i=(0,l.resolveIdentifier)(o,(0,l.getRoot)(t),r),a=e.getDisplayType(i.type);if(!a)throw new Error("unknown display type ".concat(i.type));var c=a.stateModel.create(u(u({},n),{},{type:i.type,configuration:i}));t.displays.push(c)},hideDisplay:function(r){var n=e.pluggableConfigSchemaType("display"),o=(0,l.resolveIdentifier)(n,(0,l.getRoot)(t),r),i=t.displays.filter((function(e){return e.configuration===o}));return(0,c.transaction)((function(){return i.forEach((function(e){return t.displays.remove(e)}))})),i.length},replaceDisplay:function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.displays.findIndex((function(e){return e.configuration.displayId===r}));if(-1===i)throw new Error("could not find display id ".concat(r," to replace"));var a=e.pluggableConfigSchemaType("display"),c=(0,l.resolveIdentifier)(a,(0,l.getRoot)(t),n);if(!e.getDisplayType(c.type))throw new Error("unknown display type ".concat(c.type));t.displays.splice(i,1,u(u({},o),{},{type:c.type,configuration:c}))}}})).views((function(t){return{trackMenuItems:function(){var r=t.displays.flatMap((function(e){return e.trackMenuItems()})),n=t.displays[0].configuration.displayId,i=h(t);return[].concat(o(r),o(i.length>1?[{type:"subMenu",label:"Display types",subMenu:i.map((function(r){return{type:"radio",label:e.getDisplayType(r.type).displayName,checked:r.displayId===n,onClick:function(){return t.replaceDisplay(n,r.displayId)}}}))}]:[]))}}}))}},32245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseViewModelWithDisplayedRegions=void 0;var n=r(82123),o=r(66769),i=r(66769),a=n.types.model("BaseView",{id:o.ElementId,displayName:n.types.maybe(n.types.string),minimized:!1}).volatile((function(){return{width:800}})).views((function(){return{menuItems:function(){return[]}}})).actions((function(e){return{setDisplayName:function(t){e.displayName=t},setWidth:function(t){e.width=t},setMinimized:function(t){e.minimized=t}}}));t.default=a,t.BaseViewModelWithDisplayedRegions=a.props({displayedRegions:n.types.array(i.Region)})},75075:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.InternetAccount=void 0;var s=r(82123),f=r(2415),p=r(76743),d=r(66769),h=r(80031),y="undefined"==typeof sessionStorage;t.InternetAccount=s.types.model("InternetAccount",{id:d.ElementId,type:s.types.string,configuration:(0,f.ConfigurationReference)(h.BaseInternetAccountConfig)}).views((function(e){return{get name(){return(0,f.getConf)(e,"name")},get description(){return(0,f.getConf)(e,"description")},get internetAccountId(){return(0,f.getConf)(e,"internetAccountId")},get authHeader(){return(0,f.getConf)(e,"authHeader")},get tokenType(){return(0,f.getConf)(e,"tokenType")},get domains(){return(0,f.getConf)(e,"domains")},get toggleContents(){return null},get SelectorComponent(){},get selectorLabel(){}}})).views((function(e){return{handlesLocation:function(t){return e.domains.some((function(e){return null==t?void 0:t.uri.includes(e)}))},get tokenKey(){return"".concat(e.internetAccountId,"-token")}}})).actions((function(e){return{getTokenFromUser:function(e,t){throw new Error("getTokenFromUser must be implemented by extending model")},storeToken:function(t){sessionStorage.setItem(e.tokenKey,t)},removeToken:function(){sessionStorage.removeItem(e.tokenKey)},retrieveToken:function(){return sessionStorage.getItem(e.tokenKey)},validateToken:function(e,t){return l(u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e);case 1:case"end":return t.stop()}}),t)})))()}}})).actions((function(e){var t=void 0;return{getToken:function(r){return l(u().mark((function n(){var o,i,a;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t){n.next=2;break}return n.abrupt("return",t);case 2:if(!(a=null===(i=null===(o=null==r?void 0:r.internetAccountPreAuthorization)||void 0===o?void 0:o.authInfo)||void 0===i?void 0:i.token)){n.next=6;break}return t=Promise.resolve(a),n.abrupt("return",t);case 6:if(!y){n.next=8;break}throw new Error("Did not get internet account pre-authorization info in worker");case 8:if(!(a=e.retrieveToken())){n.next=12;break}return t=Promise.resolve(a),n.abrupt("return",t);case 12:return t=new Promise((function(t,r){return e.getTokenFromUser((function(r){e.storeToken(r),t(r)}),(function(t){e.removeToken(),r(t)}))})),n.abrupt("return",t);case 14:case"end":return n.stop()}}),n)})))()}}})).actions((function(e){return{addAuthHeaderToInit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return i(i({},t),{},{headers:new Headers(i(i({},t.headers),{},a({},e.authHeader,e.tokenType?"".concat(e.tokenType," ").concat(r):r)))})},getPreAuthorizationInformation:function(t){return l(u().mark((function r(){var n,o;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.getToken(t);case 2:return n=r.sent,r.prev=3,r.next=6,e.validateToken(n,t);case 6:o=r.sent,r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(3),e.removeToken(),r.t0;case 13:return r.abrupt("return",{internetAccountType:e.type,authInfo:{token:o,configuration:(0,f.getConf)(e)}});case 14:case"end":return r.stop()}}),r,null,[[3,9]])})))()}}})).actions((function(e){return{getFetcher:function(t){return function(){var r=l(u().mark((function r(n,o){var i,a;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.getToken(t);case 2:return i=r.sent,a=e.addAuthHeaderToInit(o,i),r.abrupt("return",fetch(n,a));case 5:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}()}}})).actions((function(e){return{openLocation:function(t){return new p.RemoteFileWithRangeCache(t.uri,{fetch:e.getFetcher(t)})}}}))},12341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=(0,r(2415).ConfigurationSchema)("BaseConnection",{name:{type:"string",defaultValue:"nameOfConnection",description:"a unique name for this connection"},assemblyNames:{type:"stringArray",defaultValue:[],description:"optional list of names of assemblies in this connection"}},{explicitlyTyped:!0,explicitIdentifier:"connectionId"});t.default=n},80031:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseInternetAccountConfig=void 0;var n=r(2415);t.BaseInternetAccountConfig=(0,n.ConfigurationSchema)("InternetAccount",{name:{description:"descriptive name of the internet account",type:"string",defaultValue:""},description:{description:"a description of the internet account",type:"string",defaultValue:""},authHeader:{description:"request header for credentials",type:"string",defaultValue:"Authorization"},tokenType:{description:"a custom name for a token to include in the header",type:"string",defaultValue:""},domains:{description:"array of valid domains the url can contain to use this account",type:"stringArray",defaultValue:[]}},{explicitIdentifier:"internetAccountId",explicitlyTyped:!0})},94928:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;tSVG export not supported for this track'}):i(i({},e),{},{features:r,blockKey:"circularChord",reactElement:f.default.createElement(h.default,i(i(i({},t),e),{},{features:r,RenderingComponent:this.ReactComponent}))})}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(d.default);t.default=y},48002:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),u=(0,s.useRef)(null),c=(0,s.useRef)(),l=(0,y.getRoot)(e.displayModel).hydrateFn;return(0,s.useEffect)((function(){var e=(0,p.rIC)((function(){var e;if(u.current){var t=(0,h.createJBrowseTheme)(r);c.current=null!==(e=c.current)&&void 0!==e?e:l(u.current,s.default.createElement(d.ThemeProvider,{theme:t},s.default.createElement(n,a({},i))))}}));return function(){clearTimeout(e);var t=c.current;c.current=void 0,setTimeout((function(){null==t||t.unmount()}))}}),[t,n,l,r,e,i]),s.default.createElement("g",{ref:u,dangerouslySetInnerHTML:{__html:t}})})),b=(0,f.observer)((function(e){var t=e.html,r=e.RenderingComponent,n=(0,s.useRef)(null);return(0,s.useEffect)((function(){var o=n.current;return o&&t&&(o.innerHTML&&(0,v.unmountComponentAtNode)(o),o.style.outline="none",o.innerHTML=t,(0,p.rIC)((function(){(0,v.hydrate)(s.default.createElement(r,a({},e)),o)}))),function(){o&&(0,v.unmountComponentAtNode)(o)}}),[t,r,e]),s.default.createElement("g",{ref:n})})),g=(0,f.observer)((function(e){return(0,y.getRoot)(e.displayModel).hydrateFn?s.default.createElement(m,a({},e)):s.default.createElement(b,a({},e))}));t.default=g},39325:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["theme","html","RenderingComponent"],i=["theme","html","RenderingComponent"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&l(t,e,r);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var p=f(r(63313)),d=r(64694),h=r(60285),y=r(40828),v=r(82123),m=r(74012),b=r(35743),g=(0,y.observer)((function(e){var t=e.theme,r=e.html,n=e.RenderingComponent,i=c(e,o),a=(0,p.useRef)(null),l=(0,p.useRef)(),s=(0,v.getRoot)(i.displayModel).hydrateFn;return(0,p.useEffect)((function(){var e=(0,b.rIC)((function(){var e;if(a.current){var r=(0,h.createJBrowseTheme)(t);l.current=null!==(e=l.current)&&void 0!==e?e:s(a.current,p.default.createElement(d.ThemeProvider,{theme:r},p.default.createElement(n,u({},i))))}}));return function(){clearTimeout(e);var t=l.current;l.current=void 0,setTimeout((function(){null==t||t.unmount()}))}}),[r,t,i,s,n]),p.default.createElement("div",{ref:a,dangerouslySetInnerHTML:{__html:r}})})),w=(0,y.observer)((function(e){var t=e.theme,r=e.html,n=e.RenderingComponent,o=c(e,i),a=(0,p.useRef)(null),l=(0,h.createJBrowseTheme)(t);return(0,p.useEffect)((function(){var e=a.current;return e&&(e&&(0,m.unmountComponentAtNode)(e),e.innerHTML=r,(0,b.rIC)((function(){(0,m.hydrate)(p.default.createElement(d.ThemeProvider,{theme:l},p.default.createElement(n,u({},o))),e)}))),function(){e&&(0,m.unmountComponentAtNode)(e)}}),[r,l,o,n]),p.default.createElement("div",{ref:a})})),S=(0,y.observer)((function(e){return(0,v.getRoot)(e.displayModel).hydrateFn?p.default.createElement(g,u({},e)):p.default.createElement(w,u({},e))}));t.default=S},85204:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;tSVG export not supported for this track'}):c(c({},e),{},{reactElement:h.default.createElement(x.default,c(c(c({},t),e),{},{RenderingComponent:this.ReactComponent}))})}},{key:"deserializeArgsInWorker",value:function(e){var t=c({},e);return t.config=this.configSchema.create(e.config||{},{pluginManager:this.pluginManager}),t.filters=new g.default({filters:e.filters}),t}},{key:"serializeResultsInWorker",value:function(e,t){var r=(0,v.renderToString)(h.default.createElement(y.ThemeProvider,{theme:(0,w.createJBrowseTheme)(t.theme)},e.reactElement));return delete e.reactElement,c(c({},e),{},{html:r})}},{key:"renderInClient",value:(s=a(o().mark((function e(t,r){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.call(r.sessionId,"CoreRender",r);case 2:if(!("canvasRecordedData"in(n=e.sent))){e.next=8;break}return e.next=6,(0,b.getSerializedSvg)(n);case 6:n.html=e.sent,delete n.reactElement;case 8:return e.abrupt("return",n);case 9:case"end":return e.stop()}}),e)}))),function(e,t){return s.apply(this,arguments)})},{key:"renderInWorker",value:(u=a(o().mark((function e(t){var r,n,i,a,u,c=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.signal,n=t.statusCallback,i=void 0===n?function(){}:n,a=this.deserializeArgsInWorker(t),e.next=4,(0,b.updateStatus)("Rendering plot",i,(function(){return c.render(a)}));case 4:return u=e.sent,(0,b.checkAbortSignal)(r),e.abrupt("return",(0,b.updateStatus)("Serializing results",i,(function(){return c.serializeResultsInWorker(u,a)})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"freeResourcesInClient",value:(i=a(o().mark((function e(t,r){var n,i,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.serializeArgsInClient(r),i=this.freeResources(),e.next=4,t.call(r.sessionId,"CoreFreeResources",n);case 4:return a=e.sent,e.abrupt("return",i+a);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})}],r&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),E}(S.default);t.default=O},23311:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerSideRendererType=t.ServerSideRenderedContent=t.FeatureRendererType=t.RendererType=t.CircularChordRendererType=t.ComparativeServerSideRendererType=t.BoxRendererType=void 0;var o=r(98147);Object.defineProperty(t,"BoxRendererType",{enumerable:!0,get:function(){return n(o).default}});var i=r(48002);Object.defineProperty(t,"ComparativeServerSideRendererType",{enumerable:!0,get:function(){return n(i).default}});var a=r(98244);Object.defineProperty(t,"CircularChordRendererType",{enumerable:!0,get:function(){return n(a).default}});var u=r(7183);Object.defineProperty(t,"RendererType",{enumerable:!0,get:function(){return n(u).default}});var c=r(5087);Object.defineProperty(t,"FeatureRendererType",{enumerable:!0,get:function(){return n(c).default}});var l=r(39325);Object.defineProperty(t,"ServerSideRenderedContent",{enumerable:!0,get:function(){return n(l).default}});var s=r(85204);Object.defineProperty(t,"ServerSideRendererType",{enumerable:!0,get:function(){return n(s).default}})},11550:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(this.filterChain);try{for(t.s();!(e=t.n()).done;)if(!e.value.expr.evalSync({feature:arguments.length<=0?void 0:arguments[0]}))return!1}catch(e){t.e(e)}finally{t.f()}return!0}},{key:"toJSON",value:function(){return{filters:this.filterChain.map((function(e){return e.string}))}}}],n=[{key:"fromJSON",value:function(t){return new e(t)}}],r&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=u},55897:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r4&&void 0!==g[4]?g[4]:{},r){e.next=3;break}throw new TypeError("sessionId is required");case 3:return c=!1,e.next=6,this.getWorker(r);case 6:return l=e.sent,s=t.evaluateExtensionPoint("Core-extendWorker",l),f=t.getRpcMethodType(n),e.next=11,f.serializeArguments(i,this.name);case 11:return p=e.sent,d=this.filterArgs(p,r),h=s.call(n,d,o({timeout:3e5,statusCallback:i.statusCallback,rpcDriverClassName:this.name},a)).finally((function(){c=!0})),v=new Promise((function(e,t){y=setInterval((function(){"killed"===s.status?t(new Error("operation timed out, worker process stopped responding, ".concat(s.error))):c&&e(!0)}),b.workerCheckFrequency)})).finally((function(){clearInterval(y)})),m=Promise.race([h,v]),e.abrupt("return",f.deserializeReturn(m,i,this.name));case 17:case"end":return e.stop()}}),e,this)}))),function(e,r,n,o){return t.apply(this,arguments)})}]),e}();t.default=x},77571:function(e,t,r){"use strict";function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t3&&void 0!==u[3]?u[3]:{},t){e.next=3;break}throw new Error("sessionId is required");case 3:return e.next=5,this.getDriverForCall(t,r,n);case 5:return a=e.sent,e.abrupt("return",a.call(this.pluginManager,t,r,n,i));case 7:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})}],r&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());v.configSchema=d.default,t.default=v},75904:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=(0,r(2415).ConfigurationSchema)("BaseRpcDriver",{workerCount:{type:"number",description:"The number of workers to use. If 0 (the default) JBrowse will decide how many workers to use.",defaultValue:0}},{explicitlyTyped:!0});t.default=n},3690:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(82123),i=r(2415),a=n(r(38843)),u=n(r(51952));t.default=(0,i.ConfigurationSchema)("RpcOptions",{defaultDriver:{type:"string",description:"the RPC driver to use for tracks and tasks that are not configured to use a specific RPC backend",defaultValue:"MainThreadRpcDriver"},drivers:o.types.optional(o.types.map(o.types.union(u.default,a.default)),{MainThreadRpcDriver:{type:"MainThreadRpcDriver"},WebWorkerRpcDriver:{type:"WebWorkerRpcDriver"}})},{actions:function(e){return{addDriverConfig:function(t,r){e.drivers.set(t,r)}}}})},12660:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreGetFeatureDensityStats=t.CoreFreeResources=t.CoreRender=t.CoreGetFeatures=t.CoreGetFileInfo=t.CoreGetMetadata=t.CoreGetFeatureDetails=t.CoreGetRefNames=void 0;var o=r(63028);Object.defineProperty(t,"CoreGetRefNames",{enumerable:!0,get:function(){return n(o).default}});var i=r(80874);Object.defineProperty(t,"CoreGetFeatureDetails",{enumerable:!0,get:function(){return n(i).default}});var a=r(85136);Object.defineProperty(t,"CoreGetMetadata",{enumerable:!0,get:function(){return n(a).default}});var u=r(98170);Object.defineProperty(t,"CoreGetFileInfo",{enumerable:!0,get:function(){return n(u).default}});var c=r(25782);Object.defineProperty(t,"CoreGetFeatures",{enumerable:!0,get:function(){return n(c).default}});var l=r(34173);Object.defineProperty(t,"CoreRender",{enumerable:!0,get:function(){return n(l).default}});var s=r(23491);Object.defineProperty(t,"CoreFreeResources",{enumerable:!0,get:function(){return n(s).default}});var f=r(76426);Object.defineProperty(t,"CoreGetFeatureDensityStats",{enumerable:!0,get:function(){return n(f).default}})},51952:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(2415),i=n(r(65411)),a=(0,o.ConfigurationSchema)("MainThreadRpcDriver",{},{baseConfiguration:i.default,explicitlyTyped:!0});t.default=a},23491:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){for(var r=0;r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){for(var r=0;r{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.remoteAbortRpcHandler=t.remoteAbort=t.deserializeAbortSignal=t.isRemoteAbortSignal=t.serializeAbortSignal=void 0;var n=0,o=new WeakMap;t.serializeAbortSignal=function(e,t){var r=o.get(e);return r||(n+=1,o.set(e,n),r=n,e.addEventListener("abort",(function(){var r=o.get(e);void 0!==r&&t("signalAbort",r)}))),{abortSignalId:r}},t.isRemoteAbortSignal=function(e){return"object"===r(e)&&null!==e&&"abortSignalId"in e&&"number"==typeof e.abortSignalId};var i=new Map;function a(e){var t=e.signalId,r=i.get(t);r&&r.abort()}t.deserializeAbortSignal=function(e){var t=e.abortSignalId,r=i.get(t);return r||(r=new AbortController,i.set(t,r)),r.signal},t.remoteAbort=a,t.remoteAbortRpcHandler=function(){return{signalAbort:a}}},38843:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(2415),i=n(r(65411)),a=(0,o.ConfigurationSchema)("WebWorkerRpcDriver",{},{baseConfiguration:i.default,explicitlyTyped:!0});t.default=a},5433:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),d=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),h=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&p(t,e,r);return d(t,e),t},y=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var v=h(r(63313)),m=r(94669),b=r(34506),g=r(41882),w=y(r(84619)),S=y(r(26451)),x=v.default.createContext({parentPopupState:null,rootPopupState:null});function O(e){var t=e.onClick,r=f(e,o),n=(0,v.useContext)(x).rootPopupState;if(!n)throw new Error("must be used inside a CascadingMenu");var i=(0,v.useCallback)((function(e){n.close(),null==t||t(e)}),[n,t]);return v.default.createElement(m.MenuItem,s(s({},r),{},{onClick:i}))}function E(e){var t=e.title,r=e.inset,n=e.popupId,o=f(e,i),a=v.default.useContext(x).parentPopupState,u=(0,g.usePopupState)({popupId:n,variant:"popover",parentPopupState:a});return v.default.createElement(v.default.Fragment,null,v.default.createElement(m.MenuItem,s(s({},(0,g.bindHover)(u)),(0,g.bindFocus)(u)),v.default.createElement(m.ListItemText,{primary:t,inset:r}),v.default.createElement(S.default,null)),v.default.createElement(j,s(s({},o),{},{anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},popupState:u})))}function j(e){var t=e.popupState,r=(e.onMenuItemClick,e.menuItems,e.classes,f(e,a)),n=(0,v.useContext)(x).rootPopupState,o=(0,v.useMemo)((function(){return{rootPopupState:n||t,parentPopupState:t}}),[n,t]);return v.default.createElement(x.Provider,{value:o},v.default.createElement(w.default,s(s({},r),(0,g.bindMenu)(t))))}function P(e){var t=e.popupState,r=(e.onMenuItemClick,e.menuItems,f(e,u)),n=v.default.useContext(x).rootPopupState,o=v.default.useMemo((function(){return{rootPopupState:n||t,parentPopupState:t}}),[n,t]);return v.default.createElement(x.Provider,{value:o},v.default.createElement(m.Menu,s(s({},r),(0,g.bindMenu)(t))))}function k(e){var t=e.item;return"subMenu"in t?v.default.createElement(b.MenuItemEndDecoration,{type:"subMenu"}):"checkbox"===t.type||"radio"===t.type?v.default.createElement(b.MenuItemEndDecoration,{type:t.type,checked:t.checked,disabled:t.disabled}):null}function A(e){var t=e.onMenuItemClick,r=e.menuItems,n=f(e,c),o=r.some((function(e){return"icon"in e&&e.icon}));return v.default.createElement(v.default.Fragment,null,r.map((function(e,r){return"subMenu"in e?v.default.createElement(E,{key:"subMenu-".concat(e.label,"-").concat(r),popupId:"subMenu-".concat(e.label),title:e.label,inset:o,onMenuItemClick:t,menuItems:e.subMenu},v.default.createElement(A,s(s({},n),{},{onMenuItemClick:t,menuItems:e.subMenu}))):"divider"===e.type?v.default.createElement(m.Divider,{key:"divider-".concat(r),component:"li"}):"subHeader"===e.type?v.default.createElement(m.ListSubheader,{key:"subHeader-".concat(e.label,"-").concat(r)},e.label):v.default.createElement(O,{key:"".concat(e.label,"-").concat(r),onClick:"onClick"in e?(i=e.onClick,function(e){t(e,i)}):void 0,disabled:Boolean(e.disabled)},e.icon?v.default.createElement(m.ListItemIcon,null,v.default.createElement(e.icon,null)):null," ",v.default.createElement(m.ListItemText,{primary:e.label,secondary:e.subLabel,inset:o&&!e.icon}),v.default.createElement("div",{style:{flexGrow:1,minWidth:10}}),v.default.createElement(k,{item:e}));var i})))}t.default=function(e){return v.default.createElement(P,s({},e),v.default.createElement(A,s({},e)))}},28550:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["children","menuItems"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),i=(0,p.usePopupState)({popupId:"viewMenu",variant:"popover"});return c.default.createElement(c.default.Fragment,null,c.default.createElement(s.IconButton,a(a(a({},(0,p.bindTrigger)(i)),n),{},{disabled:0===r.length}),t),c.default.createElement(l.default,a(a({},(0,p.bindPopover)(i)),{},{onMenuItemClick:function(e,t){return t()},menuItems:r,popupState:i})))}));t.default=d},42687:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),l=u((0,v.default)(),2),s=l[0],f=l[1].width,p=u((0,d.useState)(),2),y=p[0],b=p[1],g=u((0,d.useState)(null),2),w=g[0],S=g[1],x=u((0,d.useState)(!1),2),O=x[0],E=x[1];(0,d.useEffect)((function(){O&&(null==w||w.blur(),E(!1))}),[O,w]);var j=m(e,{props:e}).classes,P=(0,h.useTheme)(),k=void 0===y?r:y;return d.default.createElement("div",a(a({},c),{},{ref:t}),d.default.createElement("div",{style:{position:"relative"}},d.default.createElement(h.Typography,{ref:s,component:"span",variant:i,className:j.typography},k)),d.default.createElement(h.InputBase,{inputRef:function(e){return S(e)},className:j.inputBase,inputProps:{style:a({width:f},i&&"inherit"!==i?P.typography[i]:{})},classes:{input:j.input,root:j.inputRoot,focused:j.inputFocused},value:k,onChange:function(e){return b(e.target.value)},onKeyDown:function(e){"Enter"===e.key?null==w||w.blur():"Escape"===e.key&&(b(void 0),E(!0))},onBlur:function(){n(y||r||""),b(void 0)}}))}));t.default=b},69918:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313));t.default=function(e){var t=e.error,r="".concat(t),n=function(e){var t="",r=e.indexOf("is not assignable");if(-1!==r){var n=e.slice(0,r+17),o=n.match(/.*at path "(.*)" snapshot `(.*)` is not assignable/m);o&&(e="Failed to load element at ".concat(o[1],"...Failed element had snapshot"),t=o[2]);var i=n.match(/.*snapshot `(.*)` is not assignable/);i&&(e="Failed to load element...Failed element had snapshot",t=i[1])}return t}(r);return o.default.createElement("div",{style:{padding:4,margin:4,overflow:"auto",maxHeight:200,background:"#f88",border:"1px solid black"}},r.slice(0,1e4),n?o.default.createElement("pre",{style:{background:"lightgrey",border:"1px solid black",margin:20}},JSON.stringify(JSON.parse(n),null,2)):null)}},13010:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(94669),a=n(r(87601));t.default=function(e){var t=e.onClose,r=e.open,n=e.onFactoryReset;function u(e){"reset"===e&&n(),t()}return o.default.createElement(a.default,{title:"Reset",onClose:function(){return u()},open:r},o.default.createElement(i.DialogContent,null,o.default.createElement(i.DialogContentText,null,"Are you sure you want to reset? This will restore the default configuration.")),o.default.createElement(i.DialogActions,null,o.default.createElement(i.Button,{onClick:function(){return u()},color:"primary"},"Cancel"),o.default.createElement(i.Button,{onClick:function(){return u("reset")},color:"primary",variant:"contained"},"OK")))}},77091:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o);return y.default.createElement(m.Tooltip,{title:t||""},y.default.createElement(m.ToggleButton,s({},n),r))}function E(e,t){return"string"==typeof e&&e.length>t?"".concat(e.slice(0,Math.max(0,t)),"…"):e}var j=(0,v.observer)((function(e){var t=e.location,r=e.name,n=e.description,o=e.rootModel,u=e.setLocation,c=!t||(0,b.isUriLocation)(t)?"url":"file",l=a((0,y.useState)(t&&"internetAccountId"in t&&t.internetAccountId?t.internetAccountId:c),2),f=l[0],p=l[1],d=(0,b.isAppRootModel)(o)?i(o.internetAccounts):[],h=a((0,y.useState)(d.slice(0,2)),2),v=h[0],j=h[1],P=a((0,y.useState)(d.slice(2)),2),k=P[0],A=P[1],_=a((0,y.useState)(null),2),C=_[0],L=_[1],T=d.find((function(e){return e.internetAccountId===f})),I=(0,y.useCallback)((function(e){u(s(s({},e),(0,b.isUriLocation)(e)?{internetAccountId:null==T?void 0:T.internetAccountId}:{}))}),[u,T]);(0,y.useEffect)((function(){T&&(0,b.isUriLocation)(t)&&t.internetAccountId!==T.internetAccountId&&I(t)}),[t,T,I]);var R=y.default.createElement(w.default,s(s({},e),{},{setLocation:I,label:null==T?void 0:T.selectorLabel}));if("file"===f&&(R=y.default.createElement(g.default,s({},e))),null==T?void 0:T.SelectorComponent){var M=T.SelectorComponent;R=y.default.createElement(M,s(s({},e),{},{setLocation:I}))}return y.default.createElement(y.default.Fragment,null,y.default.createElement(m.Box,{display:"flex"},y.default.createElement(m.InputLabel,{shrink:!0},r)),y.default.createElement(m.Box,{display:"flex",flexDirection:"row"},y.default.createElement(m.Box,null,y.default.createElement(m.ToggleButtonGroup,{value:f,exclusive:!0,onChange:function(e,r){r&&p(r),(0,b.isUriLocation)(t)&&I(t)},"aria-label":"file, url, or account picker"},new URLSearchParams(window.location.search).get("adminKey")?null:y.default.createElement(m.ToggleButton,{value:"file","aria-label":"local file"},"File"),y.default.createElement(m.ToggleButton,{value:"url","aria-label":"url"},"URL"),v.map((function(e){var t=e.internetAccountId,r=e.toggleContents,n=e.name;return y.default.createElement(O,{key:t,value:t,"aria-label":n,title:n},"string"==typeof r?E(r,5):r||E(n,5))})),k.length>0?y.default.createElement(m.ToggleButton,{onClick:function(e){return L(e.target)},selected:!1},"More",y.default.createElement(S.default,null)):null),y.default.createElement(m.Menu,{open:Boolean(C),anchorEl:C,onClose:function(){return L(null)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},null==k?void 0:k.map((function(e,t){return y.default.createElement(m.MenuItem,{key:e.internetAccountId,value:e.internetAccountId,onClick:function(){var r=v.at(-1);j([].concat(i(v.slice(0,-1)),[e])),A([r].concat(i(k.slice(0,t)),i(k.slice(t+1))).filter(x.notEmpty)),p(e.internetAccountId),L(null)}},e.name)}))))),R,y.default.createElement(m.FormHelperText,null,n))}));t.default=j},79364:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(94669),a=r(76835),u=r(35743),c=r(61169);function l(e){return"blobId"in e}var s=(0,a.makeStyles)()((function(e){return{filename:{marginLeft:e.spacing(1)}}}));t.default=function(e){var t=e.location,r=e.setLocation,n=s().classes,a=t&&(l(t)&&t.name||function(e){return"localPath"in e}(t)&&t.localPath),f=t&&l(t)&&!(0,c.getBlob)(t.blobId);return o.default.createElement(i.Box,{display:"flex",flexDirection:"row",alignItems:"center"},o.default.createElement(i.Box,null,o.default.createElement(i.FormControl,{fullWidth:!0},o.default.createElement(i.Button,{variant:"outlined",component:"label"},"Choose File",o.default.createElement("input",{type:"file",hidden:!0,onChange:function(e){var t,n=e.target,o=null===(t=null==n?void 0:n.files)||void 0===t?void 0:t[0];o&&(u.isElectron?r({localPath:o.path,locationType:"LocalPathLocation"}):r((0,c.storeBlobLocation)({blob:o})))}})))),o.default.createElement(i.Box,null,o.default.createElement(i.Typography,{component:"span",className:n.filename,color:a?"initial":"textSecondary"},a||"No file chosen"),f?o.default.createElement(i.Typography,{color:"error"},"(need to reload)"):null))}},99089:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(63313)),i=r(94669),a=r(40828),u=r(44502),c=(0,a.observer)((function(e){var t=e.location,r=e.setLocation,n=e.label;return o.default.createElement(i.TextField,{fullWidth:!0,variant:"outlined",inputProps:{"data-testid":"urlInput"},defaultValue:t&&(0,u.isUriLocation)(t)?t.uri:"",label:n||"Enter URL",onChange:function(e){r({uri:e.target.value.trim(),locationType:"UriLocation"})}})}));t.default=c},84782:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(92577);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(o).default}})},73610:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,i),a=y().classes;return f.default.createElement(p.Typography,u(u({className:a.dots},o),{},{variant:n}),"".concat(t||"Loading"))}},18195:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LogoFull=t.Logomark=void 0;var o=n(r(63313));function i(e){return"black"===e?{midnight:"#808080",forrest:"#666666",grape:"#4d4d4d",mandarin:"#333333",gray:"#1a1a1a"}:"white"===e?{midnight:"#ffffff",forrest:"#e6e6e6",grape:"#cccccc",mandarin:"#b3b3b3",gray:"#999999"}:{midnight:"#0d233f",forrest:"#135560",grape:"#721e63",mandarin:"#ffb11d",gray:"#dadada"}}function a(e){var t=i(e.variant);return o.default.createElement(o.default.Fragment,null,o.default.createElement("path",{style:{fill:t.midnight},d:"M120.5,57.5c.168,0,.333.012.5.013V40.506c-.167,0-.333-.006-.5-.006a98.325,98.325,0,0,0-77.4,37.565q-2.664,3.378-5.023,6.994l14.206,9.327Q54.043,91.709,56,89.179A81.363,81.363,0,0,1,120.5,57.5Z"}),o.default.createElement("path",{style:{fill:t.forrest},d:"M148.668,86.223c.308.133.6.283.908.42l6.746-15.618c-.153-.067-.3-.143-.454-.21a81.36,81.36,0,0,0-71.777,3.5q-2.8,1.544-5.469,3.309l9.249,14.054A63.93,63.93,0,0,1,148.668,86.223Z"}),o.default.createElement("path",{style:{fill:t.grape},d:"M170.894,109.37A63.929,63.929,0,0,0,113.4,88.861l2.336,15.474a48.456,48.456,0,0,1,44.322,15.42c.111.125.214.255.324.381l11.16-10C171.323,109.879,171.118,109.62,170.894,109.37Z"}),o.default.createElement("path",{style:{fill:t.mandarin},d:"M150.921,150.314c.04.163.07.326.107.489l16.509-4.058c-.039-.163-.067-.326-.107-.489A48.457,48.457,0,0,0,135.575,111.8l-5.515,15.591A32.466,32.466,0,0,1,150.921,150.314Z"}),o.default.createElement("path",{style:{fill:t.gray},d:"M134.1,138.129l-9.779,13.213a32.486,32.486,0,0,1,7.823,14.463l15.147.852c.012-.166.032-.331.041-.5A32.464,32.464,0,0,0,134.1,138.129Z"}))}function u(e){var t=i(e.variant);return o.default.createElement("g",{"aria-label":"JBrowse",transform:"translate(213.084 144.241)",style:{fill:t.midnight}},o.default.createElement("path",{d:"m 26.355,-71.505 v 54.075 2.835 q 0,6.825 -0.42,10.185 -0.735,5.67 -2.835,9.135 -3.255,5.355 -8.505,8.4 -4.83,2.73 -11.55,3.57 L 1.47,11.76 Q 7.35,10.185 9.24,4.2 10.605,-0.105 10.605,-9.975 v -5.565 -55.965 q 1.785,0 4.62,0.315 2.835,0.21 3.255,0.21 1.785,0 2.94,-0.105 4.515,-0.42 4.935,-0.42 z"}),o.default.createElement("path",{d:"m 60.68836,-65.415 v 24.78 h 3.255 q 2.94,0 4.935,-0.525 2.1,-0.525 3.885,-2.1 2.31,-1.995 3.36,-4.83 1.155,-2.835 1.155,-6.09 0,-5.565 -2.94,-8.61 -2.94,-3.045 -8.295,-3.045 -2.52,0 -5.355,0.42 z m 0,30.87 V -6.09 h 5.25 q 4.725,0 8.505,-3.675 3.885,-3.78 3.885,-10.08 0,-8.19 -4.62,-11.655 -4.095,-3.045 -13.02,-3.045 z M 44.93836,0 v -71.505 h 27.09 q 9.135,0 14.385,3.255 6.51,3.99 6.51,12.6 0,7.035 -5.25,11.655 -4.62,4.095 -11.97,5.145 v 0.945 q 7.56,0.735 12.285,3.99 6.615,4.62 6.615,13.335 0,10.185 -7.98,15.75 -6.93,4.83 -17.43,4.83 z"}),o.default.createElement("path",{d:"M 109.44281,0.525 V -50.4 q 1.785,0.21 3.99,0.42 2.31,0.105 3.255,0.105 2.31,0 4.2,-0.21 1.89,-0.21 3.045,-0.315 v 13.02 q 1.89,-6.51 5.46,-9.87 4.41,-4.095 11.655,-4.095 -0.315,2.73 -0.42,6.825 -0.105,3.99 -0.105,7.455 l -0.945,0.84 q -0.945,-0.735 -2.415,-1.05 -1.47,-0.315 -2.94,-0.315 -3.57,0 -6.195,1.89 -2.52,1.785 -3.465,5.04 -0.42,1.155 -0.525,3.15 -0.105,1.89 -0.105,4.515 v 4.515 19.005 q -1.785,-0.21 -2.625,-0.21 -3.675,-0.315 -4.62,-0.315 -2.31,0 -4.2,0.21 -1.89,0.21 -3.045,0.315 z"}),o.default.createElement("path",{d:"m 173.77337,1.47 q -11.655,0 -18.585,-6.825 -6.93,-6.825 -6.93,-18.48 0,-12.6 6.72,-20.055 6.825,-7.455 18.9,-7.455 11.97,0 18.9,6.72 6.93,6.72 6.93,18.48 0,12.285 -6.72,19.74 -7.14,7.875 -19.215,7.875 z m 0.735,-48.09 q -5.88,0 -8.505,6.51 -2.205,5.565 -2.205,15.96 0,8.19 1.47,12.915 2.415,7.98 8.505,7.98 5.565,0 8.19,-7.875 2.205,-6.51 2.205,-16.695 0,-8.505 -2.1,-13.23 -2.52,-5.565 -7.56,-5.565 z"}),o.default.createElement("path",{d:"m 222.03563,-50.4 10.5,36.015 q 3.675,-11.235 5.67,-17.85 2.415,-8.085 5.04,-18.165 1.05,0.105 3.045,0.315 2.1,0.21 2.835,0.21 1.995,0 3.15,-0.105 1.26,-0.21 2.73,-0.42 l 10.71,36.015 q 5.88,-17.43 10.71,-36.015 l 4.2,0.315 4.095,-0.315 q -5.145,13.125 -9.135,24.57 -5.04,14.28 -8.505,26.355 -1.89,-0.21 -3.36,-0.42 -1.365,-0.105 -2.205,-0.105 -1.89,0 -3.36,0.21 -1.365,0.21 -2.31,0.315 l -10.605,-34.755 q -4.41,13.65 -6.72,21.105 -2.31,7.35 -4.095,13.65 -1.89,-0.21 -3.36,-0.42 -1.365,-0.105 -2.31,-0.105 -1.995,0 -3.465,0.21 -1.365,0.21 -2.31,0.315 -3.78,-12.81 -5.04,-17.01 -2.205,-7.245 -5.46,-17.01 -2.835,-8.4 -5.88,-16.905 1.575,0 4.305,0.315 2.73,0.21 3.36,0.21 1.47,0 4.305,-0.21 2.835,-0.315 3.465,-0.315 z"}),o.default.createElement("path",{d:"m 292.84172,-12.81 h 2.625 q 1.47,4.095 4.62,6.51 3.15,2.415 7.35,2.415 2.94,0 5.46,-1.785 2.625,-1.89 2.625,-4.62 0,-3.885 -6.195,-6.615 -10.395,-4.62 -11.655,-5.46 -6.405,-4.515 -6.405,-12.285 0,-7.77 5.25,-12.18 5.25,-4.515 12.81,-4.515 3.99,0 8.085,1.365 4.095,1.26 7.14,3.57 l -2.52,9.24 h -2.94 q -0.63,-3.57 -3.57,-6.195 -2.835,-2.625 -6.405,-2.625 -3.15,0 -5.46,1.575 -2.31,1.47 -2.31,4.515 0,3.885 6.405,6.51 10.185,4.095 11.865,5.25 6.405,4.41 6.405,12.81 0,7.455 -5.46,12.18 -5.355,4.62 -14.805,4.62 -8.19,0 -14.49,-4.305 z"}),o.default.createElement("path",{d:"m 349.61228,-29.925 h 15.54 q 0,-6.51 -1.05,-10.395 -1.68,-6.3 -5.88,-6.3 -5.04,0 -7.14,6.195 -1.47,4.305 -1.47,10.5 z m 30.03,5.04 h -30.03 q 0,9.135 3.045,13.86 3.57,5.67 11.55,5.67 3.255,0 6.405,-1.26 3.15,-1.26 5.88,-3.465 l 1.26,0.945 -2.31,5.88 q -6.72,4.725 -15.015,4.725 -12.915,0 -19.635,-7.245 -6.72,-7.245 -6.72,-20.37 0,-11.235 6.405,-18.165 6.51,-7.035 17.64,-7.035 11.655,0 16.905,7.56 4.62,6.615 4.62,18.9 z"}))}t.Logomark=function(e){var t=e.variant;return o.default.createElement("svg",{viewBox:"0 0 175 175"},o.default.createElement(a,{variant:t}))},t.LogoFull=function(e){var t=e.variant;return o.default.createElement("svg",{viewBox:"0 0 641 175"},o.default.createElement(u,{variant:t}),o.default.createElement(a,{variant:t}))}},34506:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["open","onClose","menuItems","onMenuItemClick"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o);return d.default.createElement(h.Popover,a({open:t,onClose:r,BackdropProps:{invisible:!0},anchorOrigin:a({vertical:"bottom",horizontal:"right"},u.anchorOrigin),transformOrigin:a({vertical:"top",horizontal:"left"},u.transformOrigin)},u),d.default.createElement(E,{open:t,onClose:r,menuItems:n,onMenuItemClick:i,top:!0}))}},16596:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),b=(r=(0,s.useState)(!1),u=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,u)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(r,u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),g=b[0],w=b[1],S=(0,s.useRef)(0),x=(0,s.useRef)(0),O=f(),E=O.classes,j=O.cx;return(0,s.useEffect)((function(){function e(e){e.preventDefault();var t=p?e.clientX:e.clientY,r=S.current-t,n=t-x.current;x.current=t,c(n,r)}function t(){w(!1)}return g?(window.addEventListener("mousemove",e,!0),window.addEventListener("mouseup",t,!0),function(){window.removeEventListener("mousemove",e,!0),window.removeEventListener("mouseup",t,!0)}):function(){}}),[g,c,p]),t=h?p?E.flexbox_verticalHandle:E.flexbox_horizontalHandle:p?E.verticalHandle:E.horizontalHandle,s.default.createElement("div",function(e){for(var t=1;t]*>")})).join("|"),"i");t.default=function(e){var t,r=e.html,n=(0,u.linkify)(r),s=(t=n,l.test(t)?n:(0,i.default)(n));return c||(c=!0,a.default.addHook("afterSanitizeAttributes",(function(e){"A"===e.tagName&&(e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"))}))),o.default.createElement("span",{dangerouslySetInnerHTML:{__html:a.default.sanitize(s)}})}},39051:(e,t,r)=>{"use strict";var n=r(72161);t.Z=function(e){return e.extend((function(){return e=n.observable.array(),{views:{get snackbarMessages(){return e}},actions:{notify:function(e,t,r){var n=this;this.pushSnackbarMessage(e,t,r),"info"!==t&&"success"!==t||setTimeout((function(){n.removeSnackbarMessage(e)}),5e3)},pushSnackbarMessage:function(t,r,n){return e.push({message:t,level:r,action:n})},popSnackbarMessage:function(){return e.pop()},removeSnackbarMessage:function(t){var r=e.find((function(e){return e.message===t}));r&&e.remove(r)}}};var e}))}},66457:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ggplot2Colors3=t.ggplot2Colors4=t.ggplot2Colors5=t.ggplot2Colors6=t.category10=t.dark2=t.tableau10=t.set2=t.set1=void 0,t.category10=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],t.dark2=["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],t.set1=["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],t.set2=["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],t.tableau10=["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],t.ggplot2Colors6=["#F8766D","#B79F00","#00BA38","#00BFC4","#619CFF","#F564E3"],t.ggplot2Colors5=["#F8766D","#A3A500","#00BF7D","#00B0F6","#E76BF3"],t.ggplot2Colors4=["#F8766D","#7CAE00","#00BFC4","#C77CFF"],t.ggplot2Colors3=["#F8766D","#00BA38","#619CFF"]},60285:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SanitizedHTML=t.ResizeHandle=t.ReturnToImportFormDialog=t.Tooltip=t.PrerenderedCanvas=t.Menu=t.LoadingEllipses=t.FileSelector=t.FatalErrorDialog=t.FactoryResetDialog=t.ErrorMessage=t.EditableTypography=t.Dialog=t.CascadingMenu=t.AssemblySelector=t.Logomark=t.LogoFull=void 0,o(r(96510),t);var a=r(18195);Object.defineProperty(t,"LogoFull",{enumerable:!0,get:function(){return a.LogoFull}}),Object.defineProperty(t,"Logomark",{enumerable:!0,get:function(){return a.Logomark}});var u=r(5433);Object.defineProperty(t,"AssemblySelector",{enumerable:!0,get:function(){return i(u).default}});var c=r(60668);Object.defineProperty(t,"CascadingMenu",{enumerable:!0,get:function(){return i(c).default}});var l=r(87601);Object.defineProperty(t,"Dialog",{enumerable:!0,get:function(){return i(l).default}});var s=r(78552);Object.defineProperty(t,"EditableTypography",{enumerable:!0,get:function(){return i(s).default}});var f=r(69918);Object.defineProperty(t,"ErrorMessage",{enumerable:!0,get:function(){return i(f).default}});var p=r(13010);Object.defineProperty(t,"FactoryResetDialog",{enumerable:!0,get:function(){return i(p).default}});var d=r(77091);Object.defineProperty(t,"FatalErrorDialog",{enumerable:!0,get:function(){return i(d).default}});var h=r(84782);Object.defineProperty(t,"FileSelector",{enumerable:!0,get:function(){return i(h).default}});var y=r(4584);Object.defineProperty(t,"LoadingEllipses",{enumerable:!0,get:function(){return i(y).default}});var v=r(34506);Object.defineProperty(t,"Menu",{enumerable:!0,get:function(){return i(v).default}});var m=r(16596);Object.defineProperty(t,"PrerenderedCanvas",{enumerable:!0,get:function(){return i(m).default}});var b=r(66457);Object.defineProperty(t,"Tooltip",{enumerable:!0,get:function(){return i(b).default}});var g=r(74294);Object.defineProperty(t,"ReturnToImportFormDialog",{enumerable:!0,get:function(){return i(g).default}});var w=r(92348);Object.defineProperty(t,"ResizeHandle",{enumerable:!0,get:function(){return i(w).default}});var S=r(21202);Object.defineProperty(t,"SanitizedHTML",{enumerable:!0,get:function(){return i(S).default}}),o(r(34506),t)},37535:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}function f(e){var t=(0,c.useRef)(e),r=(0,c.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,r.current}var p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e>r?r:e0:e.buttons>0)&&i.current?a(y(i.current,e,p.current)):r(!1)},t=function(){return r(!1)};function r(r){var n=m.current,o=h(i.current),a=r?o.addEventListener:o.removeEventListener;a(n?"touchmove":"mousemove",e),a(n?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,n=i.current;if(n&&(v(t),!function(e,t){return t&&!d(e)}(t,m.current)&&n)){if(d(t)){m.current=!0;var o=t.changedTouches||[];o.length&&(p.current=o[0].identifier)}n.focus(),a(y(n,t,p.current)),r(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),u({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},r]}),[u,a]),g=n(b,3),w=g[0],S=g[1],x=g[2];return(0,c.useEffect)((function(){return x}),[x]),c.default.createElement("div",l({},o,{onTouchStart:w,onMouseDown:w,className:"react-colorful__interactive",ref:i,onKeyDown:S,tabIndex:0,role:"slider"}))})),b=function(e){return e.filter(Boolean).join(" ")},g=function(e){var t=e.className,r=e.color,n=e.left,o=e.top,i=void 0===o?.5:o,a=b(["react-colorful__pointer",t]);return c.default.createElement("div",{className:a,style:{top:100*i+"%",left:100*n+"%"}},c.default.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:r}}))},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Math.pow(10,t);return Math.round(r*e)/r},S={grad:.9,turn:360,rad:360/(2*Math.PI)},x=function(e){return"#"===e[0]&&(e=e.substr(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}:{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:1}},O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"deg";return Number(e)*(S[t]||1)},E=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?P({h:O(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},j=E,P=function(e){var t=e.h,r=e.s,n=e.l;return{h:t,s:(r*=(n<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:e.a}},k=function(e){var t=e.h,r=e.s,n=e.v,o=e.a,i=(200-r)*n/100;return{h:w(t),s:w(i>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0),l:w(i/2),a:w(o,2)}},A=function(e){var t=k(e),r=t.h,n=t.s,o=t.l;return"hsl(".concat(r,", ").concat(n,"%, ").concat(o,"%)")},_=function(e){var t=k(e),r=t.h,n=t.s,o=t.l,i=t.a;return"hsla(".concat(r,", ").concat(n,"%, ").concat(o,"%, ").concat(i,")")},C=function(e){var t=e.h,r=e.s,n=e.v,o=e.a;t=t/360*6,r/=100,n/=100;var i=Math.floor(t),a=n*(1-r),u=n*(1-(t-i)*r),c=n*(1-(1-t+i)*r),l=i%6;return{r:w(255*[n,u,a,a,c,n][l]),g:w(255*[c,n,n,u,a,a][l]),b:w(255*[a,a,c,n,n,u][l]),a:w(o,2)}},L=function(e){var t=/hsva?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?F({h:O(t[1],t[2]),s:Number(t[3]),v:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},T=L,I=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?N({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},R=I,M=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},N=function(e){var t=e.r,r=e.g,n=e.b,o=e.a,i=Math.max(t,r,n),a=i-Math.min(t,r,n),u=a?i===t?(r-n)/a:i===r?2+(n-t)/a:4+(t-r)/a:0;return{h:w(60*(u<0?u+6:u)),s:w(i?a/i*100:0),v:w(i/255*100),a:o}},F=function(e){return{h:w(e.h),s:w(e.s),v:w(e.v),a:w(e.a,2)}},D=c.default.memo((function(e){var t=e.className,r=e.hue,n=e.onChange,o=b(["react-colorful__hue",t]);return c.default.createElement("div",{className:o},c.default.createElement(m,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:p(r+360*e.left,0,360)})},"aria-label":"Hue","aria-valuetext":w(r)},c.default.createElement(g,{className:"react-colorful__hue-pointer",left:r/360,color:A({h:r,s:100,v:100,a:1})})))})),Z=c.default.memo((function(e){var t=e.hsva,r=e.onChange,n={backgroundColor:A({h:t.h,s:100,v:100,a:1})};return c.default.createElement("div",{className:"react-colorful__saturation",style:n},c.default.createElement(m,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:p(t.s+100*e.left,0,100),v:p(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation ".concat(w(t.s),"%, Brightness ").concat(w(t.v),"%")},c.default.createElement(g,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:A(t)})))})),B=function(e,t){if(e===t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0},z=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function G(e,t,r){var o=f(r),i=n((0,c.useState)((function(){return e.toHsva(t)})),2),a=i[0],u=i[1],l=(0,c.useRef)({color:t,hsva:a});(0,c.useEffect)((function(){if(!e.equal(t,l.current.color)){var r=e.toHsva(t);l.current={hsva:r,color:t},u(r)}}),[t,e]),(0,c.useEffect)((function(){var t;B(a,l.current.hsva)||e.equal(t=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:t},o(t))}),[a,e,o]);var s=(0,c.useCallback)((function(e){u((function(t){return Object.assign({},t,e)}))}),[]);return[a,s]}var U,H="undefined"!=typeof window?c.useLayoutEffect:c.useEffect,V=new Map,q=function(e){H((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!V.has(t)){var n=t.createElement("style");n.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',V.set(t,n);var o=U||r.nc;o&&n.setAttribute("nonce",o),t.head.appendChild(n)}}),[])},W=function(e){var t=e.className,r=e.colorModel,o=e.color,i=void 0===o?r.defaultColor:o,a=e.onChange,u=s(e,["className","colorModel","color","onChange"]),f=(0,c.useRef)(null);q(f);var p=n(G(r,i,a),2),d=p[0],h=p[1],y=b(["react-colorful",t]);return c.default.createElement("div",l({},u,{ref:f,className:y}),c.default.createElement(Z,{hsva:d,onChange:h}),c.default.createElement(D,{hue:d.h,onChange:h,className:"react-colorful__last-control"}))},Q={defaultColor:"000",toHsva:function(e){return N(x(e))},fromHsva:function(e){return function(e){var t=e.r,r=e.g,n=e.b;return"#"+M(t)+M(r)+M(n)}(C(e))},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||B(x(e),x(t))}},$=function(e){var t=e.className,r=e.hsva,n=e.onChange,o={backgroundImage:"linear-gradient(90deg, ".concat(_(Object.assign({},r,{a:0})),", ").concat(_(Object.assign({},r,{a:1})),")")},i=b(["react-colorful__alpha",t]);return c.default.createElement("div",{className:i},c.default.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),c.default.createElement(m,{onMove:function(e){n({a:e.left})},onKey:function(e){n({a:p(r.a+e.left)})},"aria-label":"Alpha","aria-valuetext":"".concat(w(100*r.a),"%")},c.default.createElement(g,{className:"react-colorful__alpha-pointer",left:r.a,color:_(r)})))},Y=function(e){var t=e.className,r=e.colorModel,o=e.color,i=void 0===o?r.defaultColor:o,a=e.onChange,u=s(e,["className","colorModel","color","onChange"]),f=(0,c.useRef)(null);q(f);var p=n(G(r,i,a),2),d=p[0],h=p[1],y=b(["react-colorful",t]);return c.default.createElement("div",l({},u,{ref:f,className:y}),c.default.createElement(Z,{hsva:d,onChange:h}),c.default.createElement(D,{hue:d.h,onChange:h}),c.default.createElement($,{hsva:d,onChange:h,className:"react-colorful__last-control"}))},K={defaultColor:{h:0,s:0,l:0,a:1},toHsva:P,fromHsva:k,equal:B},J={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:E,fromHsva:_,equal:z},X={defaultColor:{h:0,s:0,l:0},toHsva:function(e){var t=e.h,r=e.s,n=e.l;return P({h:t,s:r,l:n,a:1})},fromHsva:function(e){return{h:(t=k(e)).h,s:t.s,l:t.l};var t},equal:B},ee={defaultColor:"hsl(0, 0%, 0%)",toHsva:j,fromHsva:A,equal:z},te={defaultColor:{h:0,s:0,v:0,a:1},toHsva:function(e){return e},fromHsva:F,equal:B},re={defaultColor:"hsva(0, 0%, 0%, 1)",toHsva:L,fromHsva:function(e){var t=F(e),r=t.h,n=t.s,o=t.v,i=t.a;return"hsva(".concat(r,", ").concat(n,"%, ").concat(o,"%, ").concat(i,")")},equal:z},ne={defaultColor:{h:0,s:0,v:0},toHsva:function(e){return{h:e.h,s:e.s,v:e.v,a:1}},fromHsva:function(e){var t=F(e);return{h:t.h,s:t.s,v:t.v}},equal:B},oe={defaultColor:"hsv(0, 0%, 0%)",toHsva:T,fromHsva:function(e){var t=F(e),r=t.h,n=t.s,o=t.v;return"hsv(".concat(r,", ").concat(n,"%, ").concat(o,"%)")},equal:z},ie={defaultColor:{r:0,g:0,b:0,a:1},toHsva:N,fromHsva:C,equal:B},ae={defaultColor:"rgba(0, 0, 0, 1)",toHsva:I,fromHsva:function(e){var t=C(e),r=t.r,n=t.g,o=t.b,i=t.a;return"rgba(".concat(r,", ").concat(n,", ").concat(o,", ").concat(i,")")},equal:z},ue={defaultColor:{r:0,g:0,b:0},toHsva:function(e){var t=e.r,r=e.g,n=e.b;return N({r:t,g:r,b:n,a:1})},fromHsva:function(e){return{r:(t=C(e)).r,g:t.g,b:t.b};var t},equal:B},ce={defaultColor:"rgb(0, 0, 0)",toHsva:R,fromHsva:function(e){var t=C(e),r=t.r,n=t.g,o=t.b;return"rgb(".concat(r,", ").concat(n,", ").concat(o,")")},equal:z},le=/^#?([0-9A-F]{3,8})$/i,se=function(e){var t=e.color,r=void 0===t?"":t,o=e.onChange,i=e.onBlur,a=e.escape,u=e.validate,p=e.format,d=e.process,h=s(e,["color","onChange","onBlur","escape","validate","format","process"]),y=n((0,c.useState)((function(){return a(r)})),2),v=y[0],m=y[1],b=f(o),g=f(i),w=(0,c.useCallback)((function(e){var t=a(e.target.value);m(t),u(t)&&b(d?d(t):t)}),[a,d,u,b]),S=(0,c.useCallback)((function(e){u(e.target.value)||m(a(r)),g(e)}),[r,a,u,g]);return(0,c.useEffect)((function(){m(a(r))}),[r,a]),c.default.createElement("input",l({},h,{value:p?p(v):v,spellCheck:"false",onChange:w,onBlur:S}))},fe=function(e){return"#"+e};t.setNonce=function(e){U=e},t.HexColorPicker=function(e){return c.default.createElement(W,l({},e,{colorModel:Q}))},t.HslaColorPicker=function(e){return c.default.createElement(Y,l({},e,{colorModel:K}))},t.HslaStringColorPicker=function(e){return c.default.createElement(Y,l({},e,{colorModel:J}))},t.HslColorPicker=function(e){return c.default.createElement(W,l({},e,{colorModel:X}))},t.HslStringColorPicker=function(e){return c.default.createElement(W,l({},e,{colorModel:ee}))},t.HsvaColorPicker=function(e){return c.default.createElement(Y,l({},e,{colorModel:te}))},t.HsvaStringColorPicker=function(e){return c.default.createElement(Y,l({},e,{colorModel:re}))},t.HsvColorPicker=function(e){return c.default.createElement(W,l({},e,{colorModel:ne}))},t.HsvStringColorPicker=function(e){return c.default.createElement(W,l({},e,{colorModel:oe}))},t.RgbaColorPicker=function(e){return c.default.createElement(Y,l({},e,{colorModel:ie}))},t.RgbaStringColorPicker=function(e){return c.default.createElement(Y,l({},e,{colorModel:ae}))},t.RgbColorPicker=function(e){return c.default.createElement(W,l({},e,{colorModel:ue}))},t.RgbStringColorPicker=function(e){return c.default.createElement(W,l({},e,{colorModel:ce}))},t.HexColorInput=function(e){var t=e.prefixed,r=e.alpha,n=s(e,["prefixed","alpha"]),o=(0,c.useCallback)((function(e){return e.replace(/([^0-9A-F]+)/gi,"").substr(0,r?8:6)}),[r]),i=(0,c.useCallback)((function(e){return function(e,t){var r=le.exec(e),n=r?r[1].length:0;return 3===n||6===n||!!t&&4===n||!!t&&8===n}(e,r)}),[r]);return c.default.createElement(se,l({},n,{escape:o,format:t?fe:void 0,process:fe,validate:i}))}},96510:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return(null===(e=null==r?void 0:r.palette)||void 0===e?void 0:e.tertiary)&&(r=(0,l.default)(r,{palette:{tertiary:h.palette.augmentColor("color"in r.palette.tertiary?r.palette.tertiary:{color:r.palette.tertiary})}})),(null===(t=null==r?void 0:r.palette)||void 0===t?void 0:t.quaternary)&&(r=(0,l.default)(r,{palette:{quaternary:h.palette.augmentColor("color"in r.palette.quaternary?r.palette.quaternary:{color:r.palette.quaternary})}})),r}t.defaultThemes={default:i({name:"Default (from config)"},y()),lightStock:i({name:"Light (stock)"},y()),lightMinimal:{name:"Light (minimal)",palette:{primary:{main:u.grey[900]},secondary:{main:u.grey[800]},tertiary:h.palette.augmentColor({color:{main:u.grey[900]}}),quaternary:h.palette.augmentColor({color:{main:d}}),stopCodon:"#e22",startCodon:"#3e3",bases:{A:h.palette.augmentColor({color:u.green}),C:h.palette.augmentColor({color:u.blue}),G:h.palette.augmentColor({color:u.orange}),T:h.palette.augmentColor({color:u.red})}}},darkMinimal:{name:"Dark (minimal)",palette:{mode:"dark",primary:{main:u.grey[700]},secondary:{main:u.grey[800]},tertiary:h.palette.augmentColor({color:{main:u.grey[900]}}),quaternary:h.palette.augmentColor({color:{main:d}}),stopCodon:"#e22",startCodon:"#3e3",bases:{A:h.palette.augmentColor({color:u.green}),C:h.palette.augmentColor({color:u.blue}),G:h.palette.augmentColor({color:u.orange}),T:h.palette.augmentColor({color:u.red})}}},darkStock:{name:"Dark (stock)",palette:{mode:"dark",primary:{main:s},secondary:{main:f},tertiary:h.palette.augmentColor({color:{main:p}}),quaternary:h.palette.augmentColor({color:{main:d}}),stopCodon:"#e22",startCodon:"#3e3",bases:{A:h.palette.augmentColor({color:u.green}),C:h.palette.augmentColor({color:u.blue}),G:h.palette.augmentColor({color:u.orange}),T:h.palette.augmentColor({color:u.red})}},components:{MuiAppBar:{defaultProps:{enableColorOnDark:!0},styleOverrides:{primary:function(e){return e.theme.palette.primary.main}}}}}},t.createJBrowseBaseTheme=v,t.createJBrowseTheme=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaultThemes,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default";return(0,c.createTheme)(v("default"===n?(0,l.default)(r.default,m(e)):function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(null===(e=null==(r=m(r))?void 0:r.palette)||void 0===e?void 0:e.quaternary)||(r=(0,l.default)(r,{palette:{quaternary:h.palette.augmentColor({color:{main:"#aaa"}})}})),(null===(t=null==r?void 0:r.palette)||void 0===t?void 0:t.tertiary)||(r=(0,l.default)(r,{palette:{tertiary:h.palette.augmentColor({color:{main:"#aaa"}})}})),r}(r[n])||r.default))}},9462:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=2)for(var a=t.index+1;au&&l++}var p=c/(n-o*l),d=e.zoomTo(p),h=0;pp&&n<=p)return i(i({},(0,a.getSnapshot)(m)),{},{oob:!1,offset:g,coord:u(m,g),index:v});(null===(r=f[y])||void 0===r?void 0:r.regionNumber)===v?(n+=b+h,y++):n+=b}if(p>=n&&l.length>0){var w=l.at(-1),S=p-n+(w.end-w.start);return i(i({},(0,a.getSnapshot)(w)),{},{oob:!0,offset:S,coord:u(w,S),index:l.length-1})}return{coord:0,index:0,refName:"",oob:!0,assemblyName:"",offset:0,start:0,end:0,reversed:!1}},t.bpToPx=function(e){for(var t,r=e.refName,n=e.coord,o=e.regionNumber,i=e.self,a=0,u=i.interRegionPaddingWidth,c=i.bpPerPx,l=i.displayedRegions,s=i.staticBlocks.contentBlocks,f=u*c,p=0,d=0;d=h.start&&n<=h.end&&(!o||o===d)){a+=h.reversed?h.end-n:n-h.start;break}(null===(t=s[p])||void 0===t?void 0:t.regionNumber)===d?(a+=y+f,p++):a+=y}if(l[d])return{index:d,offsetPx:Math.round(a/c)}},t.bpToPxMap=function(e){for(var t,r=e.refName,n=e.coord,o=e.regionNumber,i=e.self,a=0,u=i.interRegionPaddingWidth,c=i.bpPerPx,l=i.displayedRegions,s=i.staticBlocks.contentBlocks,f=u*c,p=0,d=0;d=h.start&&n<=h.end&&(void 0===o||o===d)){a+=h.reversed?h.end-n:n-h.start;break}(null===(t=s[p])||void 0===t?void 0:t.regionNumber)===d?(a+=y+f,p++):a+=y}return l[d]?{index:d,offsetPx:Math.round(a/c)}:{}}},63342:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:e.width/2,n=(0,a.clamp)(t,"minBpPerPx"in e?e.minBpPerPx:0,"maxBpPerPx"in e?e.maxBpPerPx:1/0),o=e.bpPerPx;return Math.abs(o-n)<1e-6?o:(e.bpPerPx=n,e.offsetPx=(0,a.clamp)(Math.round((e.offsetPx+r)*o/n-r),e.minOffset,e.maxOffset),e.bpPerPx)},scrollTo:function(t){var r=(0,a.clamp)(t,e.minOffset,e.maxOffset);return e.offsetPx=r,r},centerAt:function(t,r,n){if(r){var o=e.bpToPx({refName:r,coord:t,regionNumber:n});o&&this.scrollTo(Math.round(o-e.width/2))}},scroll:function(t){var r=e.offsetPx,n=(0,a.clamp)(e.offsetPx+t,e.minOffset,e.maxOffset);return e.offsetPx=n,n-r}}})).actions((function(e){return{moveTo:function(t,r){(0,s.moveTo)(e,t,r)}}}));t.default=f},84997:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(){o=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==n&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return n("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),e=v.call(this),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if("number"==typeof t.maxAge&&0===t.maxAge)throw new TypeError("`maxAge` must be a number greater than 0");return e.maxSize=t.maxSize,e.maxAge=t.maxAge||Number.POSITIVE_INFINITY,e.onEviction=t.onEviction,e.cache=new Map,e.oldCache=new Map,e._size=0,e}return c=m,s=[{key:"_emitEvictions",value:function(e){if("function"==typeof this.onEviction){var t,r=a(e);try{for(r.s();!(t=r.n()).done;){var n=i(t.value,2),o=n[0],u=n[1];this.onEviction(o,u.value)}}catch(e){r.e(e)}finally{r.f()}}}},{key:"_deleteIfExpired",value:function(e,t){return"number"==typeof t.expiry&&t.expiry<=Date.now()&&("function"==typeof this.onEviction&&this.onEviction(e,t.value),this.delete(e))}},{key:"_getOrDeleteIfExpired",value:function(e,t){if(!1===this._deleteIfExpired(e,t))return t.value}},{key:"_getItemValue",value:function(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}},{key:"_peek",value:function(e,t){var r=t.get(e);return this._getItemValue(e,r)}},{key:"_set",value:function(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}},{key:"_moveToRecent",value:function(e,t){this.oldCache.delete(e),this._set(e,t)}},{key:"_entriesAscending",value:o().mark((function e(){var t,r,n,u,c,l,s,f,p,d,h,y;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this.oldCache),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=13;break}if(n=r.value,u=i(n,2),c=u[0],l=u[1],this.cache.has(c)){e.next=11;break}if(!1!==this._deleteIfExpired(c,l)){e.next=11;break}return e.next=11,n;case 11:e.next=3;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),t.e(e.t0);case 18:return e.prev=18,t.f(),e.finish(18);case 21:s=a(this.cache),e.prev=22,s.s();case 24:if((f=s.n()).done){e.next=33;break}if(p=f.value,d=i(p,2),h=d[0],y=d[1],!1!==this._deleteIfExpired(h,y)){e.next=31;break}return e.next=31,p;case 31:e.next=24;break;case 33:e.next=38;break;case 35:e.prev=35,e.t1=e.catch(22),s.e(e.t1);case 38:return e.prev=38,s.f(),e.finish(38);case 41:case"end":return e.stop()}}),e,this,[[1,15,18,21],[22,35,38,41]])}))},{key:"get",value:function(e){if(this.cache.has(e)){var t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){var r=this.oldCache.get(e);if(!1===this._deleteIfExpired(e,r))return this._moveToRecent(e,r),r.value}}},{key:"set",value:function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).maxAge,n=void 0===r?this.maxAge:r,o="number"==typeof n&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(e)?this.cache.set(e,{value:t,expiry:o}):this._set(e,{value:t,expiry:o})}},{key:"has",value:function(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):!!this.oldCache.has(e)&&!this._deleteIfExpired(e,this.oldCache.get(e))}},{key:"peek",value:function(e){return this.cache.has(e)?this._peek(e,this.cache):this.oldCache.has(e)?this._peek(e,this.oldCache):void 0}},{key:"delete",value:function(e){var t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}},{key:"clear",value:function(){this.cache.clear(),this.oldCache.clear(),this._size=0}},{key:"resize",value:function(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");var t=n(this._entriesAscending()),r=t.length-e;r<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(r>0&&this._emitEvictions(t.slice(0,r)),this.oldCache=new Map(t.slice(r)),this.cache=new Map,this._size=0),this.maxSize=e}},{key:"keys",value:o().mark((function e(){var t,r,n,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=i(r.value,1),u=n[0],e.next=7,u;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"values",value:o().mark((function e(){var t,r,n,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=i(r.value,2),u=n[1],e.next=7,u;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:t,value:o().mark((function(){var e,t,r,n,u,c,l,s,f,p,d,h;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:e=a(this.cache),o.prev=1,e.s();case 3:if((t=e.n()).done){o.next=12;break}if(r=t.value,n=i(r,2),u=n[0],c=n[1],!1!==this._deleteIfExpired(u,c)){o.next=10;break}return o.next=10,[u,c.value];case 10:o.next=3;break;case 12:o.next=17;break;case 14:o.prev=14,o.t0=o.catch(1),e.e(o.t0);case 17:return o.prev=17,e.f(),o.finish(17);case 20:l=a(this.oldCache),o.prev=21,l.s();case 23:if((s=l.n()).done){o.next=33;break}if(f=s.value,p=i(f,2),d=p[0],h=p[1],this.cache.has(d)){o.next=31;break}if(!1!==this._deleteIfExpired(d,h)){o.next=31;break}return o.next=31,[d,h.value];case 31:o.next=23;break;case 33:o.next=38;break;case 35:o.prev=35,o.t1=o.catch(21),l.e(o.t1);case 38:return o.prev=38,l.f(),o.finish(38);case 41:case"end":return o.stop()}}),c,this,[[1,14,17,20],[21,35,38,41]])}))},{key:"entriesDescending",value:o().mark((function e(){var t,r,a,u,c,l,s,f,p,d,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=n(this.cache),r=t.length-1;case 2:if(!(r>=0)){e.next=12;break}if(a=t[r],u=i(a,2),c=u[0],l=u[1],!1!==this._deleteIfExpired(c,l)){e.next=9;break}return e.next=9,[c,l.value];case 9:--r,e.next=2;break;case 12:t=n(this.oldCache),s=t.length-1;case 14:if(!(s>=0)){e.next=25;break}if(f=t[s],p=i(f,2),d=p[0],h=p[1],this.cache.has(d)){e.next=22;break}if(!1!==this._deleteIfExpired(d,h)){e.next=22;break}return e.next=22,[d,h.value];case 22:--s,e.next=14;break;case 25:case"end":return e.stop()}}),e,this)}))},{key:"entriesAscending",value:o().mark((function e(){var t,r,n,u,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this._entriesAscending()),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=i(r.value,2),u=n[0],c=n[1],e.next=7,[u,c.value];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"size",get:function(){if(!this._size)return this.oldCache.size;var e,t=0,r=a(this.oldCache.keys());try{for(r.s();!(e=r.n()).done;){var n=e.value;this.cache.has(n)||t++}}catch(e){r.e(e)}finally{r.f()}return Math.min(this._size+t,this.maxSize)}},{key:"entries",value:function(){return this.entriesAscending()}},{key:"forEach",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=a(this.entriesAscending());try{for(n.s();!(t=n.n()).done;){var o=i(t.value,2),u=o[0],c=o[1];e.call(r,c,u,this)}}catch(e){n.e(e)}finally{n.f()}}},{key:u,get:function(){return JSON.stringify(n(this.entriesAscending()))}}],s&&l(c.prototype,s),Object.defineProperty(c,"prototype",{writable:!1}),m}(s(Map),Symbol.iterator,Symbol.toStringTag);t.default=y},61017:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,s(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)},a(e)}function u(e,t,r){return u=c()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&l(o,r.prototype),o},u.apply(null,arguments)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isAbortException=t.observeAbortSignal=t.makeAbortError=t.abortBreakPoint=t.checkAbortSignal=void 0;var f=r(92048),p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(a,e);var t,r,o,i=(r=a,o=c(),function(){var e,t=s(r);if(o){var i=s(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,Object.defineProperty(t,"prototype",{writable:!1}),t}(a(Error));function d(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw v()}}function h(e){return new Promise((function(t){return setTimeout(t,e)}))}function y(){var e;return e=o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h(1);case 2:d(t);case 3:case"end":return e.stop()}}),e)})),y=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))},y.apply(this,arguments)}function v(){if("undefined"!=typeof DOMException)return new DOMException("aborted","AbortError");var e=new p("aborted");return e.code="ERR_ABORTED",e}t.checkAbortSignal=d,t.abortBreakPoint=function(e){return y.apply(this,arguments)},t.makeAbortError=v,t.observeAbortSignal=function(e){return e?(0,f.fromEvent)(e,"abort"):f.Observable.create()},t.isAbortException=function(e){return e instanceof Error&&("AbortError"===e.name||"ERR_ABORTED"===e.code||!!/\b(aborted|aborterror)\b/i.test(e.message))}},38111:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blobToDataURL=void 0,t.blobToDataURL=function(e){var t=new FileReader;return new Promise((function(r,n){t.onload=function(e){e.target?r(e.target.result):n(new Error("unknown result reading blob from canvas"))},t.readAsDataURL(e)}))}},45131:(e,t,r)=>{"use strict";function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=a(e);if(t){var o=a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[];c(this,e),this.blocks=t}return s(e,[{key:"push",value:function(e){if(e instanceof y&&this.blocks.length>0){var t=this.blocks.at(-1);if(t instanceof y)return void t.push(e)}this.blocks.push(e)}},{key:"getBlocks",value:function(){return this.blocks}},{key:"getRegions",value:function(){return this.blocks.map((function(e){return e.toRegion()}))}},{key:"map",value:function(e,t){return this.blocks.map(e,t)}},{key:"forEach",value:function(e,t){return this.blocks.forEach(e,t)}},{key:"length",get:function(){return this.blocks.length}},{key:"totalWidthPx",get:function(){return this.blocks.length>0?(0,f.sum)(this.blocks.map((function(e){return e.widthPx}))):0}},{key:"totalWidthPxWithoutBorders",get:function(){return this.blocks.length>0?(0,f.sum)(this.blocks.filter((function(e){return"boundary"!==e.variant})).map((function(e){return e.widthPx}))):0}},{key:"offsetPx",get:function(){return this.blocks.length>0?this.blocks[0].offsetPx:0}},{key:"contentBlocks",get:function(){return this.blocks.filter((function(e){return e instanceof h}))}},{key:"totalBp",get:function(){return(0,f.sum)(this.contentBlocks.map((function(e){return e.end-e.start})))}}]),e}();t.BlockSet=p;var d=function(){function e(t){c(this,e),this.widthPx=0,Object.assign(this,t),this.assemblyName=t.assemblyName,this.refName=t.refName,this.start=t.start,this.end=t.end,this.key=t.key,this.offsetPx=t.offsetPx}return s(e,[{key:"toRegion",value:function(){return{refName:this.refName,start:this.start,end:this.end,assemblyName:this.assemblyName,reversed:this.reversed}}}]),e}();t.BaseBlock=d;var h=function(e){n(r,e);var t=i(r);function r(){return c(this,r),t.apply(this,arguments)}return s(r)}(d);t.ContentBlock=h;var y=function(e){n(r,e);var t=i(r);function r(e){var n;return c(this,r),(n=t.call(this,e)).elidedBlockCount=0,n.widthPx=e.widthPx,n}return s(r,[{key:"push",value:function(e){this.elidedBlockCount+=1,e&&(this.refName="",this.start=0,this.end=0,this.widthPx+=e.widthPx)}}]),r}(d);t.ElidedBlock=y;var v=function(e){n(r,e);var t=i(r);function r(){return c(this,r),t.apply(this,arguments)}return s(r)}(d);t.InterRegionPaddingBlock=v},51398:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1])||arguments[1],l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=e.offsetPx,f=e.displayedRegions,p=e.bpPerPx,d=e.width,h=e.minimumBlockWidth,y=e.interRegionPaddingWidth;if(!d)throw new Error("view has no width, cannot calculate displayed blocks");for(var v=new u.BlockSet,m=0,b=s,g=b+d,w=0;wb){var C=(t=(0,i.intersection2)(b,g,m,k),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),L=C[0],T=C[1],I=void 0,R=void 0,M=void 0,N=void 0,F=void 0;P?(M=(R=j-(L-m)*p)===j,N=(I=Math.max(E,j-(T-m)*p))===E,F=m+(j-R)/p):(M=(I=(L-m)*p+E)===E,N=(R=Math.min(j,(T-m)*p+E))===j,F=m+(I-E)/p);var D={assemblyName:x,refName:O,start:I,end:R,reversed:P,offsetPx:F,parentRegion:_,regionNumber:w,widthPx:(R-I)/p,isLeftEndOfDisplayedRegion:M,isRightEndOfDisplayedRegion:N,key:""};D.key="".concat((0,a.assembleLocStringFast)(D),"-").concat(w).concat(P?"-reversed":""),c&&0===v.length&&M&&v.push(new u.InterRegionPaddingBlock({key:"".concat(D.key,"-beforeFirstRegion"),widthPx:-s,offsetPx:D.offsetPx+s,variant:"boundary"})),l&&A=h&&D.isRightEndOfDisplayedRegion&&w{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(82123),o=r(35743),i=r(45131);t.default=function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:800,c=e.offsetPx,l=e.displayedRegions,s=e.bpPerPx,f=e.minimumBlockWidth,p=e.interRegionPaddingWidth,d=c*s,h=(c+e.width)*s,y=u,v=Math.ceil(y*s),m=0,b=new i.BlockSet,g=0;g=P&&(A=P-1);var _=Math.floor((d-m)/v)-a;_<0&&(_=0);for(var C=(E-O)/s,L=_;L<=A;L+=1){var T=void 0,I=void 0,R=void 0,M=void 0;j?(R=(I=E-L*v)===E,M=(T=Math.max(O,E-(L+1)*v))===O):(R=(T=O+L*v)===O,M=(I=Math.min(E,O+(L+1)*v))===E);var N={assemblyName:S,refName:x,start:T,end:I,reversed:j,offsetPx:(m+L*v)/s,parentRegion:k,regionNumber:g,widthPx:(I-T)/s,isLeftEndOfDisplayedRegion:R,isRightEndOfDisplayedRegion:M,key:""};N.key="".concat((0,o.assembleLocStringFast)(N),"-").concat(g).concat(j?"-reversed":""),t&&0===g&&0===L&&b.push(new i.InterRegionPaddingBlock({key:"".concat(N.key,"-beforeFirstRegion"),widthPx:u,offsetPx:N.offsetPx-u,variant:"boundary"})),r&&C=f&&N.isRightEndOfDisplayedRegion&&g{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNamedColor=t.namedColorToHex=void 0;var r={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};t.namedColorToHex=function(e){return r[e]},t.isNamedColor=function(e){return!!r[e]}},26888:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namedColorToHex=t.isNamedColor=t.makeContrasting=t.emphasize=t.contrastingTextColor=void 0;var n=r(64694),o=r(12526);function i(e){var t=(0,o.namedColorToHex)(e);return(0,n.getLuminance)(t||e)}t.contrastingTextColor=function(e){return i(e)>.5?"black":"white"},t.emphasize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15,r=(0,o.namedColorToHex)(e);return(0,n.emphasize)(r||e,t)},t.makeContrasting=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"white",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,a=(0,o.namedColorToHex)(e)||e,u=(0,o.namedColorToHex)(t)||t,c=i(u),l=(0,n.getContrastRatio)(a,u),s=a,f=.05;l.5?(0,n.darken)(s,f):(0,n.lighten)(s,f),f+=.05,l=(0,n.getContrastRatio)(a,u);return a};var a=r(12526);Object.defineProperty(t,"isNamedColor",{enumerable:!0,get:function(){return a.isNamedColor}}),Object.defineProperty(t,"namedColorToHex",{enumerable:!0,get:function(){return a.namedColorToHex}})},94604:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.colord=t.Colord=void 0;var o=r(12914),i=n(r(34072)),a=n(r(83764));(0,o.extend)([i.default,a.default]);var u=r(12914);Object.defineProperty(t,"Colord",{enumerable:!0,get:function(){return u.Colord}}),Object.defineProperty(t,"colord",{enumerable:!0,get:function(){return u.colord}})},94278:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(){n=function(){return t};var e,t={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==o&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return n("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:JSON.stringify,o=[],i=new Set,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}(e);try{for(a.s();!(t=a.n()).done;){var u=t.value,c=n(u);i.has(c)||(o.push(u),i.add(c))}}catch(e){a.e(e)}finally{a.f()}return o}},40881:(e,t)=>{"use strict";t.DO=void 0,t.DO=function(e){return e.map((function(e){return">".concat(e.header,"\n").concat(e.seq.replaceAll(/(.{1,80})/g,"$1\n").trimEnd())})).join("\n")}},33397:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(35743);t.default=function e(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=0,a=Object.keys(t);i5e3)break;r+="object"===n(t[u])&&t[u]?e(t[u],r):"".concat(u,"-").concat(t[u],";")}return(0,o.hashCode)(r)}},35743:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:function(e){return e},o=e.assemblyName,i=e.refName,a=e.start,u=e.end,c=e.reversed,l=o?"{".concat(o,"}"):"";t=void 0!==a?":".concat(n(a+1)):void 0!==u?":1":"",r=void 0!==u?void 0!==a&&a+1===u?"":"..".concat(n(u)):void 0!==a?"..":"";var s="";return c&&(s="[rev]"),"".concat(l).concat(i).concat(t).concat(r).concat(s)}function C(e,t){if(!e)throw new Error("no location string provided, could not parse");var r=!1;e.endsWith("[rev]")&&(r=!0,e=e.replace(/\[rev]$/,""));var n=(e=e.replace(/\s/,"")).match(/({(.+)})?(.+)/);if(!n)throw new Error('invalid location string: "'.concat(e,'"'));var o=f(n,4),i=o[2],a=o[3];if(!i&&a.startsWith("{}"))throw new Error('no assembly name was provided in location "'.concat(a,'"'));var u=a.lastIndexOf(":");if(-1===u){if(t(a,i))return{assemblyName:i,refName:a,reversed:r};throw new Error('Unknown reference sequence "'.concat(a,'"'))}var c=a.slice(0,u),l=a.slice(u+1);if(t(c,i)&&t(a,i))throw new Error('ambiguous location string: "'.concat(e,'"'));if(t(c,i)){if(!l)return{assemblyName:i,refName:c,reversed:r};var s=l.match(/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/),p=l.match(/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/);if(s){var d=f(s,6),h=d[1],y=d[5];if(void 0!==h&&void 0!==y)return{assemblyName:i,refName:c,start:+h.replaceAll(",",""),end:+y.replaceAll(",",""),reversed:r}}else{if(!p)throw new Error('could not parse range "'.concat(l,'" on location "').concat(e,'"'));var v=f(p,5),m=v[1],b=v[4];if(void 0!==m)return b?{assemblyName:i,refName:c,start:+m.replaceAll(",",""),reversed:r}:{assemblyName:i,refName:c,start:+m.replaceAll(",",""),end:+m.replaceAll(",",""),reversed:r}}}else if(t(a,i))return{assemblyName:i,refName:a,reversed:r};throw new Error('unknown reference sequence name in location "'.concat(e,'"'))}function L(e,t){var r=C(e,t);return"number"==typeof r.start&&(r.start-=1),r}function T(e,t){var r=e.assemblyName||t.assemblyName?(e.assemblyName||"").localeCompare(t.assemblyName||""):0;if(r)return r;var n=e.refName||t.refName?(e.refName||"").localeCompare(t.refName||""):0;if(n)return n;if(void 0!==e.start&&void 0!==t.start){var o=e.start-t.start;if(o)return o}if(void 0!==e.end&&void 0!==t.end){var i=e.end-t.end;if(i)return i}return 0}function I(e,t,r){var n,o=t.reversed,i=t.end,a=void 0===i?0:i,u=t.start;return n=(o?a-e:e-(void 0===u?0:u))/r,Math.round(10*n)/10}y(r(44502),t),y(r(61017),t),y(r(65063),t),y(r(96585),t),y(r(11281),t),y(r(4891),t),y(r(73231),t),t.useDebounce=function(e,t){var r=f((0,m.useState)(e),2),n=r[0],o=r[1];return(0,m.useEffect)((function(){var r=setTimeout((function(){o(e)}),t);return function(){clearTimeout(r)}}),[e,t]),n},t.useWidthSetter=function(e,t){var r=f((0,E.default)(),2),n=r[0],o=r[1].width;return(0,m.useEffect)((function(){o&&(0,g.isAlive)(e)&&requestAnimationFrame((function(){return e.setWidth(o-2*Number.parseInt(t,10))}))}),[t,e,o]),n},t.useDebouncedCallback=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,r=(0,m.useRef)(),n=(0,m.useRef)();function o(){n.current&&clearTimeout(n.current)}return(0,m.useEffect)((function(){return o}),[]),function(){for(var i=arguments.length,a=new Array(i),u=0;u3&&void 0!==arguments[3]?arguments[3]:function(){},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:170,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:26;function c(e){var l=Date.now(),s=e.lastPosition,f=e.lastTime||l,p=e.lastVelocity||0;l>f+64&&(f=l);for(var d=Math.floor(l-f),h=0;hr?r:e},t.bpToPx=I;var R,M,N=180/Math.PI,F=Math.PI/180;function D(e,t,r,n){var o=I(e,r,n),i=I(t,r,n);return r.reversed?[i,o]:[o,i]}function Z(e,t){if((0,g.isStateTreeNode)(t)&&!(0,g.isAlive)(t))return t;if(t&&(null==e?void 0:e[t.refName])){var r=e[(t=(0,g.isStateTreeNode)(t)?i({},(0,g.getSnapshot)(t)):i({},t)).refName];if(r)return i(i({},t),{},{refName:r,originalRefName:t.refName})}return t}function B(){return B=c(a().mark((function e(t,r){var n,o,u,l,f;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.regions,o=void 0===n?[]:n,u=r.adapterConfig,r.sessionId){e.next=3;break}throw new Error("sessionId is required");case 3:return l=o.map((function(e){return e.assemblyName})),e.t0=Object,e.next=7,Promise.all(s(new Set(l)).map(function(){var e=c(a().mark((function e(n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=n,e.next=3,t.getRefNameMapForAdapter(u,n,r);case 3:return e.t1=e.sent,e.abrupt("return",[e.t0,e.t1]);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 7:return e.t1=e.sent,f=e.t0.fromEntries.call(e.t0,e.t1),e.abrupt("return",i(i({},r),{},{regions:o.map((function(e,t){return Z(f[l[t]],e)}))}));case 10:case"end":return e.stop()}}),e)}))),B.apply(this,arguments)}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:70,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30;return e.length>t?e.slice(0,r)+"..."+e.slice(-r):e}function G(e){return e.split("").reverse().join("")}t.radToDeg=function(e){return e*N%360},t.degToRad=function(e){return e*F%(2*Math.PI)},t.polarToCartesian=function(e,t){return[e*Math.cos(t),e*Math.sin(t)]},t.cartesianToPolar=function(e,t){return[Math.sqrt(e*e+t*t),Math.atan(t/e)]},t.featureSpanPx=function(e,t,r){return D(e.get("start"),e.get("end"),t,r)},t.bpSpanPx=D,t.iterMap=function(e,t,r){var n,o=Array.from({length:r||0}),i=0,a=l(e);try{for(a.s();!(n=a.n()).done;){var u=n.value;o[i]=t(u),i+=1}}catch(e){a.e(e)}finally{a.f()}return o},t.findLastIndex=function(e,t){for(var r=e.length;r--;)if(t(e[r],r,e))return r;return-1},t.findLast=function(e,t){for(var r=e.length;r--;)if(t(e[r],r,e))return e[r]},t.makeAbortableReaction=function(e,t,r,n,o,i,u){var l;function s(t){(0,x.isAbortException)(t)||((0,g.isAlive)(e)?u(t):console.error(t))}(0,g.addDisposer)(e,(0,w.reaction)((function(){try{return t(e)}catch(e){return void s(e)}}),function(){var t=c(a().mark((function t(n,u){var c,f;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l&&!l.signal.aborted&&l.abort(),(0,g.isAlive)(e)){t.next=3;break}return t.abrupt("return");case 3:return l=new AbortController,o(c=l),t.prev=6,t.next=9,r(n,c.signal,e,u);case 9:f=t.sent,(0,x.checkAbortSignal)(c.signal),(0,g.isAlive)(e)&&i(f),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(6),c&&!c.signal.aborted&&c.abort(),s(t.t0);case 18:case"end":return t.stop()}}),t,null,[[6,14]])})));return function(e,r){return t.apply(this,arguments)}}(),n)),(0,g.addDisposer)(e,(function(){l&&!l.signal.aborted&&l.abort()}))},t.renameRegionIfNeeded=Z,t.renameRegionsIfNeeded=function(e,t){return B.apply(this,arguments)},t.minmax=function(e,t){return[Math.min(e,t),Math.max(e,t)]},t.shorten=z,t.stringify=function(e,t){var r=e.refName,n=e.coord,o=e.assemblyName,i=e.oob;return[o&&t?"{".concat(o,"}"):"",r?"".concat(z(r),":").concat(Q(n)).concat(i?" (out of bounds)":""):""].join("")},t.isElectron=/electron/i.test("undefined"!=typeof navigator?navigator.userAgent:""),t.revcom=function(e){return G((0,t.complement)(e))},t.reverse=G,t.complement=(R=/[ACGT]/gi,M={S:"S",w:"w",T:"A",r:"y",a:"t",N:"N",K:"M",x:"x",d:"h",Y:"R",V:"B",y:"r",M:"K",h:"d",k:"m",C:"G",g:"c",t:"a",A:"T",n:"n",W:"W",X:"X",m:"k",v:"b",B:"V",s:"s",H:"D",c:"g",D:"H",b:"v",R:"Y",G:"C"},function(e){return e.replaceAll(R,(function(e){return M[e]||""}))}),t.rIC="undefined"==typeof jest?"undefined"!=typeof window&&window.requestIdleCallback?window.requestIdleCallback:function(e){return setTimeout((function(){return e()}),1)}:function(e){return e()};var U=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2796875,.2765625,.3546875,.5546875,.5546875,.8890625,.665625,.190625,.3328125,.3328125,.3890625,.5828125,.2765625,.3328125,.2765625,.3015625,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.2765625,.2765625,.584375,.5828125,.584375,.5546875,1.0140625,.665625,.665625,.721875,.721875,.665625,.609375,.7765625,.721875,.2765625,.5,.665625,.5546875,.8328125,.721875,.7765625,.665625,.7765625,.721875,.665625,.609375,.721875,.665625,.94375,.665625,.665625,.609375,.2765625,.3546875,.2765625,.4765625,.5546875,.3328125,.5546875,.5546875,.5,.5546875,.5546875,.2765625,.5546875,.5546875,.221875,.240625,.5,.221875,.8328125,.5546875,.5546875,.5546875,.5546875,.3328125,.5,.2765625,.5546875,.5,.721875,.5,.5,.5,.3546875,.259375,.353125,.5890625];function H(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=String(e),o=0,i=0;i]+)>)/gi,"")}function J(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=l(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;r=o>r?o:r}}catch(e){n.e(e)}finally{n.f()}return r}function X(e){var t,r=0,n=l(e);try{for(n.s();!(t=n.n()).done;)r+=t.value}catch(e){n.e(e)}finally{n.f()}return r}function ee(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3;if(e.length<=1)return e;var r=[],n=null;e=e.sort((function(e,t){return e.start-t.start})),r.push(e[0]);for(var o=1;o0?"".concat(Number.parseFloat((e/1e6).toPrecision(3)),"Mbp"):Math.floor(e/1e3)>0?"".concat(Number.parseFloat((e/1e3).toPrecision(3)),"Kbp"):"".concat(Q(Math.floor(e)),"bp")},t.toLocale=Q,t.getTickDisplayStr=function(e,t){return Math.floor(t/1e3)>0?"".concat(Q(Number.parseFloat((e/1e6).toFixed(2))),"M"):"".concat(Q(Math.floor(e)))},t.getViewParams=function(e,t){var r=A(e),n=r.dynamicBlocks,o=r.staticBlocks,i=r.offsetPx,a=(null==n?void 0:n.contentBlocks[0])||{},u=(null==o?void 0:o.contentBlocks[0])||{},c=(null==o?void 0:o.contentBlocks[1])||{};return{offsetPx:t?0:i-u.offsetPx,offsetPx1:t?0:i-c.offsetPx,start:a.start,end:a.end}},t.getLayoutId=function(e){return e.sessionId+"-"+e.layoutId},t.useLocalStorage=function(e,t){var r=f((0,m.useState)((function(){if("undefined"==typeof window)return t;try{var r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch(e){return console.error(e),t}})),2),n=r[0],o=r[1];return[n,function(t){try{var r=t instanceof Function?t(n):t;o(r),"undefined"!=typeof window&&window.localStorage.setItem(e,JSON.stringify(r))}catch(e){console.error(e)}}]},t.getUriLink=$,t.getStr=Y,t.coarseStripHTML=K,t.linkify=function(e){return e.replaceAll(/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,"$1$2")},t.measureGridWidth=function(e,t){var r=t||{},n=r.padding,o=void 0===n?30:n,i=r.minWidth,a=void 0===i?80:i,u=r.fontSize,c=void 0===u?12:u,l=r.maxWidth,s=void 0===l?1e3:l,f=r.stripHTML,p=void 0!==f&&f;return J(e.map((function(e){return Y(e)})).map((function(e){return p?K(e):e})).map((function(e){return H(e,c)})).map((function(e){return Math.min(Math.max(e+o,a),s)})))},t.getEnv=function(e){return(0,g.getEnv)(e)},t.localStorageGetItem=function(e){return"undefined"!=typeof localStorage?localStorage.getItem(e):void 0},t.localStorageSetItem=function(e,t){return"undefined"!=typeof localStorage?localStorage.setItem(e,t):void 0},t.max=J,t.min=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=l(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;r=o{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r3&&void 0!==arguments[3]?arguments[3]:{},o=S[e];if(!o)throw new Error("fetch not registered for ".concat(e));return o(e,t,r,n)},size:500*Math.pow(1024,2),chunkSize:131072,maxFetchSize:100*Math.pow(1024,2),minimumTTL:864e5});t.clearCache=function(){x.reset()};var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(b,e);var t,r,i,l,s,f,h=(s=b,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(s);if(f){var r=m(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function b(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),h.apply(this,arguments)}return t=b,r=[{key:"fetch",value:(l=p(u().mark((function e(t,r){var n,o,i,a,l,s,f,p,d,h,v,g;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S[String(t)]||(S[String(t)]=this.fetchBinaryRange.bind(this)),(n=null==r?void 0:r.headers)&&(n instanceof Headers?o=n.get("range"):Array.isArray(n)?(i=n.find((function(e){return"range"===c(e,1)[0]}))||[void 0,void 0],a=c(i,2),o=a[1]):o=n.range),!o){e.next=14;break}if(!(l=/bytes=(\d+)-(\d+)/.exec(o))){e.next=14;break}return s=c(l,3),f=s[1],p=s[2],d=Number.parseInt(f,10),h=Number.parseInt(p,10),e.next=11,x.getRange(t,d,h-d+1,{signal:null==r?void 0:r.signal});case 11:return v=e.sent,g=v.headers,e.abrupt("return",new Response(v.buffer,{status:206,headers:g}));case 14:return e.abrupt("return",y(m(b.prototype),"fetch",this).call(this,t,r));case 15:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"fetchBinaryRange",value:(i=p(u().mark((function e(t,r,n){var i,l,s,f,p,d,h,v,w,S,x,O,E,j=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=j.length>3&&void 0!==j[3]?j[3]:{},l=new Date,s=a(a({},i.headers),{},{range:"bytes=".concat(r,"-").concat(n)}),e.next=5,y(m(b.prototype),"fetch",this).call(this,t,a(a({},i),{},{headers:s}));case 5:if(f=e.sent,p=new Date,206===f.status){e.next=11;break}throw d="HTTP ".concat(f.status," (").concat(f.statusText,") when fetching ").concat(t," bytes ").concat(r,"-").concat(n),new Error("".concat(d).concat(200===f.status?" (should be 206 for range requests)":""));case 11:h={},v=o(f.headers.entries());try{for(v.s();!(w=v.n()).done;)S=c(w.value,2),x=S[0],O=S[1],h[x]=O}catch(e){v.e(e)}finally{v.f()}return e.next=16,f.arrayBuffer();case 16:return E=e.sent,e.abrupt("return",{headers:h,requestDate:l,responseDate:p,buffer:g.Buffer.from(E)});case 18:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return i.apply(this,arguments)})}],r&&d(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(w.RemoteFile);t.RemoteFileWithRangeCache=O},76743:function(e,t,r){"use strict";function n(){n=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(n,a,u,c){var l=d(e[n],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var n;a(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function r(){for(;++n=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},63089:(e,t)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=r&&n>=e}var d=function(){function e(){c(this,e),this.padding=1,this.widthLimit=1e6}return s(e,[{key:"setAllFilled",value:function(e){this.allFilled=e}},{key:"getItemAt",value:function(e){var t;return this.allFilled?this.allFilled:void 0===(null===(t=this.rowState)||void 0===t?void 0:t.min)||e=this.rowState.max?void 0:this.rowState.bits[e-this.rowState.offset]}},{key:"isRangeClear",value:function(e,t){if(this.allFilled)return!1;if(void 0===this.rowState||t<=this.rowState.min||e>=this.rowState.max)return!0;for(var r=this.rowState,n=r.min,o=r.max,i=r.offset,a=r.bits,u=Math.min(o,t)-i,c=!0,l=Math.max(n,e)-i;l=this.rowState.bits.length){var c=a+1;this.rowState.bits.length+c>this.widthLimit?(console.warn("Layout width limit exceeded, discarding old layout. Please be more careful about discarding unused blocks."),this.rowState=this.initialize(r,n)):c>0&&(this.rowState.bits=[].concat(i(this.rowState.bits),i(Array.from({length:c}))))}if(rthis.widthLimit?(console.warn("Layout width limit exceeded, discarding old layout. Please be more careful about discarding unused blocks."),this.rowState=this.initialize(r,n)):(this.rowState.bits=[].concat(i(Array.from({length:l})),i(this.rowState.bits)),this.rowState.offset-=l)}var s=(a=n-this.rowState.offset)-(o=r-this.rowState.offset);s>2e4&&console.warn("Layout X pitch set too low, feature spans ".concat(s," bits in a single row."),e,t);for(var f=o;fthis.rowState.max&&(this.rowState.max=n)}},{key:"discardRange",value:function(e,t){if(!this.allFilled&&this.rowState&&!(t<=this.rowState.min||e>=this.rowState.max))if(e<=this.rowState.min&&t>=this.rowState.max)this.rowState=void 0;else{if(t>this.rowState.min&&e<=this.rowState.min&&(this.rowState.min=t),e=this.rowState.max&&(this.rowState.max=e),this.rowState.offsetthis.rowState.max+f-this.rowState.offset){var r=this.rowState.min-this.rowState.offset,n=this.rowState.bits.length-1-(this.rowState.max-this.rowState.offset);this.rowState.bits=this.rowState.bits.slice(r,this.rowState.bits.length-n),this.rowState.offset+=r}else if(this.rowState.offsetthis.rowState.max-this.rowState.offset+f){var i=this.rowState.max-this.rowState.offset+1+Math.floor(5e3);this.rowState.bits.length=i}for(var a=Math.max(this.rowState.min,e)-this.rowState.offset,u=Math.min(t,this.rowState.max)-this.rowState.offset,c=a;c>=0&&c0&&void 0!==arguments[0]?arguments[0]:{},r=t.pitchX,n=void 0===r?10:r,o=t.pitchY,i=void 0===o?10:o,a=t.maxHeight,u=void 0===a?1e4:a,l=t.hardRowLimit,s=void 0===l?1e4:l,f=t.displayMode,p=void 0===f?"normal":f;c(this,e),this.pitchX=n,this.pitchY=i,this.hardRowLimit=s,this.maxHeightReached=!1,this.displayMode=p,"compact"===this.displayMode&&(this.pitchY=Math.round(this.pitchY/4)||1,this.pitchX=Math.round(this.pitchX/4)||1),this.bitmap=[],this.rectangles=new Map,this.maxHeight=Math.ceil(u/this.pitchY),this.pTotalHeight=0}return s(e,[{key:"addRect",value:function(e,t,r,n,o){var i=this.rectangles.get(e);if(i)return null===i.top?null:(this.addRectToBitmap(i),i.top*this.pitchY);var a=Math.floor(t/this.pitchX),u=Math.floor(r/this.pitchX),c=Math.ceil(n/this.pitchY),l={id:e,l:a,r:u,top:null,h:c,originalHeight:n,data:o},s=this.maxHeight-c,f=0;if("collapse"!==this.displayMode){for(;f<=s&&this.collides(l,f);f+=1);if(f>s)return l.top=null,this.rectangles.set(e,l),this.maxHeightReached=!0,null}return l.top=f,this.addRectToBitmap(l),this.rectangles.set(e,l),this.pTotalHeight=Math.max(this.pTotalHeight||0,f+c),f*this.pitchY}},{key:"collides",value:function(e,t){for(var r=this.bitmap,n=t+e.h,o=t;othis.hardRowLimit)throw new Error("layout hard limit (".concat(this.hardRowLimit*this.pitchY,"px) exceeded, aborting layout"));r=new d,e[t]=r}return r}},{key:"addRectToBitmap",value:function(e){if(null!==e.top){var t=e.id,r=e.top+e.h;if(e.r-e.l>2e4)for(var n=e.top;n{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.SubLayoutClass=t,this.subLayoutConstructorArgs=r,this.subLayouts=new Map}var t,r;return t=e,r=[{key:"getDataByID",value:function(e){var t,r=n(this.subLayouts.values());try{for(r.s();!(t=r.n()).done;){var o=t.value.getDataByID(e);if(o)return o}}catch(e){r.e(e)}finally{r.f()}}},{key:"getSublayout",value:function(e){var t=this.subLayouts.get(e);return void 0===t?(t=new this.SubLayoutClass(this.subLayoutConstructorArgs),this.subLayouts.set(e,t),t):t}},{key:"addRect",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return this.getSublayout(e).addRect(t,r,n,o,i)}},{key:"discardRange",value:function(e,t,r){var n;return null===(n=this.subLayouts.get(e))||void 0===n?void 0:n.discardRange(t,r)}},{key:"toJSON",value:function(){var e,t,r,i={},a=n(this.subLayouts.entries());try{for(a.s();!(e=a.n()).done;){var u=(t=e.value,r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||o(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=u[0],l=u[1];i[c]=l.toJSON()}}catch(e){a.e(e)}finally{a.f()}return i}}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=u},35687:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);ra&&(this.width+=t-a),void 0!==u&&rc&&(this.height+=n-c),this.parent&&this.parent.expand(e,t,r,n),this.absoluteCache.dirty=!0}},{key:"bottom",get:function(){return this.top+this.height}},{key:"right",get:function(){return this.left+this.width}},{key:"walkParents",value:function(e){this.parent&&(e(this.parent),this.parent.walkParents(e))}},{key:"walkChildren",value:function(e){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(this.children.values());try{for(r.s();!(t=r.n()).done;){var o=t.value;e(o),o.walkChildren(e)}}catch(e){r.e(e)}finally{r.f()}}},{key:"absolute",get:function(){if(this.absoluteCache.dirty){var e=0,t=0;this.walkParents((function(r){e+=r.left,t+=r.top})),this.absoluteCache={dirty:!1,left:this.left+e,right:this.right+e,top:this.top+t,bottom:this.bottom+t,width:this.width,height:this.height}}return this.absoluteCache}},{key:"move",value:function(e,t){this.left+=e,this.top+=t,this.absoluteCache.dirty=!0,this.walkChildren((function(e){e.absoluteCache.dirty=!0}));var r=this.absolute,n=r.left,o=r.right,i=r.top,a=r.bottom;void 0!==n&&void 0!==o&&void 0!==i&&void 0!==a&&this.expand(n,o,i,a)}}])&&o(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=i},95564:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SceneGraph=t.PrecomputedMultiLayout=t.PrecomputedLayout=t.MultiLayout=t.GranularRectLayout=void 0,o(r(14731),t);var a=r(63089);Object.defineProperty(t,"GranularRectLayout",{enumerable:!0,get:function(){return i(a).default}});var u=r(21384);Object.defineProperty(t,"MultiLayout",{enumerable:!0,get:function(){return i(u).default}});var c=r(35687);Object.defineProperty(t,"PrecomputedLayout",{enumerable:!0,get:function(){return i(c).default}});var l=r(80886);Object.defineProperty(t,"PrecomputedMultiLayout",{enumerable:!0,get:function(){return i(l).default}});var s=r(60106);Object.defineProperty(t,"SceneGraph",{enumerable:!0,get:function(){return i(s).default}})},56767:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return"object"===r(e)&&null!==e},o=function(e){return n(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob)};t.default=function e(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet;if(!i.has(t)){i.add(t);var a=function(t){return t.forEach((function(t){r(t),n(t)&&e(t,r,i)}))};Array.isArray(t)&&a(t);for(var u=0,c=Object.values(t);u{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveLateType=t.getEnumerationValues=t.getDefaultValue=t.getPropertyType=t.getUnionSubTypes=t.getSubType=void 0;var n=r(82123);function o(e){var t;if((0,n.isOptionalType)(e))t=e._subtype||e.type;else{if(!(0,n.isArrayType)(e)&&!(0,n.isMapType)(e)){if("function"==typeof e.getSubType)return e.getSubType();throw new TypeError("unsupported mst type")}t=e._subtype||e._subType||e.subType}if(!t)throw new Error("failed to get subtype");return t}function i(e){if(!(0,n.isUnionType)(e))throw new TypeError("not an MST union type");var t=e._types||e.types||o(e)._types||o(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}t.getSubType=o,t.getUnionSubTypes=i,t.getPropertyType=function(e,t){return e.properties[t]},t.getDefaultValue=function(e){if(!(0,n.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue},t.getEnumerationValues=function(e){return i(e).map((function(e){return e.value}))},t.resolveLateType=function(e){return(0,n.isUnionType)(e)||(0,n.isArrayType)(e)||!(0,n.isLateType)(e)?e:e.getSubType()}},70575:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nanoid=t.customAlphabet=t.customRandom=t.random=t.urlAlphabet=void 0,t.urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",t.random=function(e){return crypto.getRandomValues(new Uint8Array(e))},t.customRandom=function(e,t,r){var n=(2<0&&void 0!==arguments[0]?arguments[0]:t,a="";;)for(var u=r(o),c=o;c--;)if((a+=e[u[c]&n]||"").length===i)return a}},t.customAlphabet=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return(0,t.customRandom)(e,r,t.random)},t.nanoid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(e)).reduce((function(e,t){return e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")}),"")}},4891:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.drawImageOntoCanvasContext=t.ImageBitmapType=t.createImageBitmap=t.createCanvas=void 0;var c=u(r(86698)),l=r(1612);t.drawImageOntoCanvasContext=function(e,t){e.serializedCommands?new l.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)};var s="function"==typeof OffscreenCanvas,f=c.default;s?(t.createCanvas=function(e,t){return new OffscreenCanvas(e,t)},t.createImageBitmap=window.createImageBitmap||self.createImageBitmap,t.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):f?(t.createCanvas=function(){return nodeCreateCanvas.apply(void 0,arguments)},t.createImageBitmap=function(){var e=a(o().mark((function e(t){var r,n,i=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((i.length<=1?0:i.length-1)>0)){e.next=2;break}throw new Error("only one-argument uses of createImageBitmap are supported by the node offscreencanvas ponyfill");case 2:return r=t.toDataURL(),n=new nodeImage,e.abrupt("return",new Promise((function(e,t){n.onload=function(){return e(n)},n.onerror=t,n.src=r})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):(t.createCanvas=function(e,t){var r=new l.CanvasSequence;return{width:e,height:t,getContext:function(){return r}}},t.createImageBitmap=function(){var e=a(o().mark((function e(t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.getContext("2d"),e.abrupt("return",{height:t.height,width:t.width,serializedCommands:r.toJSON(),containsNoTransferables:!0});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.ImageBitmapType=String)},73231:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isContainedWithin=t.doesIntersect2=t.intersection2=void 0,t.intersection2=function(e,t,r,n){return t>r&&er?tr&&e=t}},42847:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableCreate=void 0;var n=r(92048),o=r(42166),i=r(35743);t.ObservableCreate=function(e,t){return n.Observable.create((function(t){try{var r=e(t);r&&r.catch&&r.catch((function(e){return t.error(e)}))}catch(e){t.error(e)}})).pipe((0,o.takeUntil)((0,i.observeAbortSignal)(t)))}},20349:(e,t)=>{"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t=0))throw new Error("invalid feature data, end less than start. end: ".concat(this.data.end," start: ").concat(this.data.start));this.data.subfeatures&&(this.subfeatures=null===(r=this.data.subfeatures)||void 0===r?void 0:r.map((function(t,r){return"function"!=typeof t.get?new e({id:t.uniqueId||"".concat(i,"-").concat(r),data:n({strand:o.data.strand},t),parent:o}):t})))}var t,r,i;return t=e,i=[{key:"fromJSON",value:function(t){return new e(n({},t))}}],(r=[{key:"get",value:function(e){return"subfeatures"===e?this.subfeatures:"parent"===e?this.parent():this.data[e]}},{key:"set",value:function(e,t){this.data[e]=t}},{key:"tags",value:function(){return Object.keys(this.data)}},{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 e=n(n({},this.data),{},{uniqueId:this.id()}),t=this.parent();t&&(e.parentId=t.id());var r=this.children();return r&&(e.subfeatures=r.map((function(e){return e.toJSON()}))),e}}])&&o(t.prototype,r),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=c},93563:(e,t,r)=>{"use strict";function n(){n=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(n,a,u,c){var l=d(e[n],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var n;a(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function r(){for(;++n=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t3&&void 0!==arguments[3]&&arguments[3]?n=t/r-e*e/(r*r):(n=t-e*e/r,r>1&&(n/=r-1)),n<0?0:Math.sqrt(n))}function f(e){return u(u({},e),{},{scoreMean:(e.scoreSum||0)/(e.featureCount||e.basesCovered||1),scoreStdDev:s(e.scoreSum,e.scoreSumSquares,e.featureCount||e.basesCovered),featureDensity:(e.featureCount||1)/e.basesCovered})}function p(){var e;return e=n().mark((function e(t,r){var o,i,a,u,s,p,d,h,y,v;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.start,i=t.end,a={scoreMin:Number.MAX_VALUE,scoreMax:Number.MIN_VALUE,scoreSum:0,scoreSumSquares:0,featureCount:0},u=!1,e.next=5,(0,c.firstValueFrom)(r.pipe((0,l.reduce)((function(e,t){var r=t.get("score"),n=t.get("summary"),o=e.scoreMax,i=e.scoreMin;return e.scoreMax=Math.max(o,n?t.get("maxScore"):r),e.scoreMin=Math.min(i,n?t.get("minScore"):r),e.scoreSum+=r,e.scoreSumSquares+=r*r,e.featureCount+=1,u=!0,e}),a)));case 5:return s=e.sent,p=s.scoreMin,d=s.scoreMax,h=s.scoreSum,y=s.scoreSumSquares,v=s.featureCount,e.abrupt("return",u?f({scoreMax:d,scoreMin:p,scoreSum:h,scoreSumSquares:y,featureCount:v,basesCovered:i-o+1}):{scoreMin:0,scoreMax:0,scoreMean:0,scoreStdDev:0,scoreSum:0,scoreSumSquares:0,featureCount:0,featureDensity:0,basesCovered:0});case 12:case"end":return e.stop()}}),e)})),p=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))},p.apply(this,arguments)}t.calcStdFromSums=s,t.rectifyStats=f,t.calcPerBaseStats=function(e,t){for(var r=e.start,n=e.end,o=[],i=t.sort((function(e,t){return e.get("start")-t.get("start")})),a=r,u=0,c=0;a=i[u].get("end");)u+=1;var l=i[u];l&&a>=l.get("start")&&a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTrackName=t.generateUnknownTrackConf=t.generateUnsupportedTrackConf=t.guessTrackType=t.guessAdapter=t.getFileName=t.makeIndexType=t.makeIndex=t.storeBlobLocation=t.setBlobMap=t.getBlobMap=t.getBlob=t.UNSUPPORTED=t.UNKNOWN=t.getParentRenderProps=t.getRpcSessionId=t.getTrackAssemblyNames=void 0;var n=r(82123),o=r(35743),i=r(2415);t.getTrackAssemblyNames=function(e){var t=(0,i.getConf)(e,"assemblyNames");if(!t){var r=(0,n.getParent)(e.configuration);if("sequence"in r)return[(0,i.readConfObject)(r,"name")]}return t},t.getRpcSessionId=function(e){for(var t,r=e;!(0,n.isRoot)(r);r=(0,n.getParent)(r))"rpcSessionId"in r&&(t=r.rpcSessionId);if(!t)throw new Error("getRpcSessionId failed, no parent node in the state tree has an `rpcSessionId` attribute");return t},t.getParentRenderProps=function(e){for(var t=(0,n.getParent)(e);!(0,n.isRoot)(t);t=(0,n.getParent)(t))if("renderProps"in t)return t.renderProps();return{}},t.UNKNOWN="UNKNOWN",t.UNSUPPORTED="UNSUPPORTED";var a={};t.getBlob=function(e){return a[e]},t.getBlobMap=function(){return a},t.setBlobMap=function(e){a=e};var u=0;t.storeBlobLocation=function(e){if(e&&"blob"in e){var t="b".concat(+Date.now(),"-").concat(u++);return a[t]=e.blob,{name:null==e?void 0:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e},t.makeIndex=function(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e},t.makeIndexType=function(e,t,r){return(null==e?void 0:e.toUpperCase().endsWith(t))?t:r},t.getFileName=function(e){var t="uri"in e?e.uri:void 0,r="localPath"in e?e.localPath:void 0,n="blobId"in e?e:void 0;return(null==n?void 0:n.name)||(null==t?void 0:t.slice(t.lastIndexOf("/")+1))||(null==r?void 0:r.slice(r.lastIndexOf("/")+1))||""},t.guessAdapter=function(e,r,n,i){if(i){var a=(0,o.getEnv)(i).pluginManager.evaluateExtensionPoint("Core-guessAdapterForLocation",(function(e,t,r){}))(e,r,n);if(a)return a}return{type:t.UNKNOWN}},t.guessTrackType=function(e,t){if(t){var r=(0,o.getSession)(t),n=(0,o.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",(function(e){}))(e);if(n)return n}return"FeatureTrack"},t.generateUnsupportedTrackConf=function(e,t,r){var n={type:"FeatureTrack",name:"".concat(e," (Unsupported)"),description:'Support not yet implemented for "'.concat(t,'"'),category:r,trackId:""};return n.trackId=(0,o.objectHash)(n),n},t.generateUnknownTrackConf=function(e,t,r){var n={type:"FeatureTrack",name:"".concat(e," (Unknown)"),description:'Could not determine track type for "'.concat(t,'"'),category:r,trackId:""};return n.trackId=(0,o.objectHash)(n),n},t.getTrackName=function(e,t){var r=(0,i.readConfObject)(e,"name");if(!r&&"ReferenceSequenceTrack"===(0,i.readConfObject)(e,"type")){var n=t.assemblies.find((function(t){return t.sequence===e}));return n?"Reference sequence (".concat((0,i.readConfObject)(n,"displayName")||(0,i.readConfObject)(n,"name"),")"):"Reference sequence"}return r}},44502:function(e,t,r){"use strict";function n(e,t){for(var r=0;r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FileLocation=t.UriLocation=t.UriLocationRaw=t.BlobLocation=t.LocalPathLocation=t.Region=t.NoAssemblyRegion=t.PropTypes=t.ElementId=void 0;var s=r(82123),f=l(r(47329)),p=r(40828),d=r(70575);t.ElementId=s.types.optional(s.types.identifier,(function(){return(0,d.nanoid)()})),t.PropTypes={Region:f.default.shape({refName:f.default.string.isRequired,start:f.default.number.isRequired,end:f.default.number.isRequired}),ConfigSchema:p.PropTypes.objectOrObservableObject,Feature:f.default.shape({get:f.default.func.isRequired,id:f.default.func.isRequired})},t.NoAssemblyRegion=s.types.model("NoAssemblyRegion",{refName:s.types.string,start:s.types.number,end:s.types.number,reversed:s.types.optional(s.types.boolean,!1)}).actions((function(e){return{setRefName:function(t){e.refName=t}}})),t.Region=s.types.compose("Region",t.NoAssemblyRegion,s.types.model({assemblyName:s.types.string})),t.LocalPathLocation=s.types.model("LocalPathLocation",{locationType:s.types.literal("LocalPathLocation"),localPath:s.types.string}),t.BlobLocation=s.types.model("BlobLocation",{locationType:s.types.literal("BlobLocation"),name:s.types.string,blobId:s.types.string}),t.UriLocationRaw=s.types.model("UriLocation",{locationType:s.types.literal("UriLocation"),uri:s.types.string,baseUri:s.types.maybe(s.types.string),internetAccountId:s.types.maybe(s.types.string),internetAccountPreAuthorization:s.types.maybe(s.types.model("InternetAccountPreAuthorization",{internetAccountType:s.types.string,authInfo:s.types.frozen()}))}),t.UriLocation=s.types.snapshotProcessor(t.UriLocationRaw,{postProcessor:function(e){var t=e.baseUri,r=c(e,o);return t?e:r}}),t.FileLocation=s.types.snapshotProcessor(s.types.union(t.LocalPathLocation,t.UriLocation,t.BlobLocation),{preProcessor:function(e){if(e){var t=e.locationType,r=c(e,i);if(!t){var n=r.uri,o=r.localPath,a=r.blob,l="";return void 0!==n?l="UriLocation":void 0!==o?l="LocalPathLocation":void 0!==a&&(l="BlobLocation"),u(u({},r),{},{locationType:l})}return e}}})},43757:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},54754:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&i.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}Object.defineProperty(t,"__esModule",{value:!0}),t.whenPresent=t.when=void 0;var a=r(72161),u=r(61017);function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.timeout,n=t.signal,o=t.name;return new Promise((function(t,i){var c,l=!1,s=(0,a.when)(e),f=function(){};r&&(c=setTimeout((function(){l||(l=!0,s.cancel(),i(new Error("timed out waiting for ".concat(o||"whenPresent"))))}),r),f=function(){return c&&clearTimeout(c)}),n&&n.addEventListener("abort",(function(){l||(l=!0,s.cancel(),f(),i((0,u.makeAbortError)()))})),s.then((function(){l||(l=!0,f(),t(!0))})).catch((function(e){l||(l=!0,f(),i(e))}))}))}function l(){var e;return e=o().mark((function e(t){var r,n=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,c((function(){return null!=t()}),r);case 3:return e.abrupt("return",t());case 4:case"end":return e.stop()}}),e)})),l=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))},l.apply(this,arguments)}t.when=c,t.whenPresent=function(e){return l.apply(this,arguments)}},42065:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(63313),o=r.n(n),i=r(35127),a=r(97648),u=r(67016),c=r(60285),l=(0,r(76835).makeStyles)()({content:{minWidth:800}});function s(e){var t=e.open,r=e.version,n=e.onClose,s=l().classes;return o().createElement(c.Dialog,{open:t,onClose:n,maxWidth:"xl",title:"JBrowse v".concat(r)},o().createElement(i.Z,{className:s.content},o().createElement(a.Z,null,"JBrowse is a GMOD project © 2019-2021, The Evolutionary Software Foundation"),o().createElement(a.Z,null,"Here are some resources and documentation. Please report the version number above when asking questions. Thanks!"),o().createElement("ul",null,o().createElement("li",null,o().createElement(u.Z,{href:"https://github.com/GMOD/jbrowse-components/discussions",target:"_blank",rel:"noopener noreferrer"},"Question & answer forum")),o().createElement("li",null,o().createElement(u.Z,{href:"https://github.com/GMOD/jbrowse-components/issues/new/choose",target:"_blank",rel:"noopener noreferrer"},"Report a bug")),o().createElement("li",null,o().createElement(u.Z,{href:"https://jbrowse.org/jb2/docs/user_guide",target:"_blank",rel:"noopener noreferrer"},"User guide")),o().createElement("li",null,o().createElement(u.Z,{href:"https://jbrowse.org/jb2/docs/",target:"_blank",rel:"noopener noreferrer"},"Documentation")))))}},60901:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>$});var n=r(63313),o=r.n(n),i=r(67016),a=r(82015),u=r(40828),c=r(90659),l=r.n(c),s=r(76990),f=r.n(s),p=r(7734),d=r(35743);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function y(){y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==h(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=p;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function v(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function m(e,t){return b.apply(this,arguments)}function b(){var e;return e=y().mark((function e(t,r){var n,o;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,d.getSession)(r),o=r.view,e.prev=2,!o){e.next=8;break}return e.next=6,o.navToLocString(t);case 6:e.next=9;break;case 8:throw new Error("No view associated with this view anymore");case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(2),console.error(e.t0),n.notify("".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[2,11]])})),b=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){v(i,n,o,a,u,"next",e)}function u(e){v(i,n,o,a,u,"throw",e)}a(void 0)}))},b.apply(this,arguments)}var g=r(97648),w=r(80511);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function x(){x=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(w=E);var j=g.prototype=m.prototype=Object.create(w);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==S(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function O(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r100?o().createElement(o().Fragment,null,o().createElement("button",{type:"button",onClick:function(){l()(f),s(!0),setTimeout((function(){return s(!1)}),700)}},c?"Copied to clipboard":"Copy"),o().createElement("button",{type:"button",onClick:function(){return a((function(e){return!e}))}},i?"Show less":"Show more"),o().createElement("div",null,i?f:"".concat(f.slice(0,100),"..."))):o().createElement("div",null,f)}function Q(e){var t=e.locString,r=e.model;return o().createElement(i.Z,{onClick:function(e){e.preventDefault(),m(t,r)},href:"#"},t)}const $=(0,u.observer)((function(e){var t=e.model,r=f()(t.featureData),n=function(e,t){var r;return(null===(r=t.tags)||void 0===r?void 0:r.SA)||t.SA}(0,r);return o().createElement(a.Z,{"data-testid":"alignment-side-drawer"},o().createElement(p.FeatureDetails,G(G({},e),{},{omit:V,descriptions:G(G({},q),{},{tags:q}),feature:r,formatter:function(e,r){return"next_segment_position"===r?o().createElement(Q,{model:t,locString:e}):o().createElement(W,{value:e})}})),n?o().createElement(k,{model:t,tag:n}):null,void 0!==r.flags?o().createElement(Z,G({feature:r},e)):null)}))},41661:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>A});var n=r(23411),o=r(20410),i=r(35743),a=r(76743),u=r(42847),c=r(90254),l=r(71381),s=r(80511);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function x(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function O(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){x(i,n,o,a,u,"next",e)}function u(e){x(i,n,o,a,u,"throw",e)}a(void 0)}))}}function E(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>Un});var n=r(45996),o=r(80365).Buffer;function i(e){return o.from((0,n.inflate)(e))}var a=r(91684),u=r.n(a),c=r(63084),l=r.n(c),s=r(37990),f=r.n(s),p=r(55862),d=r(76396),h=r.n(d);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){for(var r=0;r>n)+(e&(1<>o)+(e&(1<1&&void 0!==arguments[1]?arguments[1]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._buffer=t,this._position=r,this.length=t.length}var t,r;return t=e,(r=[{key:"get",value:function(){var e=this._buffer[this._position];return this._position+=1,e}},{key:"getByte",value:function(){return this.get()}},{key:"getByteAt",value:function(e){return this._buffer[e]}},{key:"position",value:function(){return this._position}},{key:"put",value:function(e){return this._buffer[this._position]=e,this._position+=1,e}},{key:"putAt",value:function(e,t){return this._buffer[e]=t,t}},{key:"setPosition",value:function(e){return this._position=e,e}},{key:"getInt",value:function(){var e=this._buffer.readInt32LE(this._position);return this._position+=4,e}},{key:"remaining",value:function(){return this._buffer.length-this._position}}])&&V(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function W(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0===e.length)return t.fill(0),t;var n=new q(e,r),o=n.get();if(0!==o&&1!==o)throw new A("Invalid rANS order ".concat(o));if(n.getInt()!==n.remaining()-4)throw new A("Incorrect input length.");var i=n.getInt(),a=new q(t||U.allocUnsafe(i));if(a.length=128&&(t.fc[i].F&=-129,t.fc[i].F=(127&t.fc[i].F)<<8|255&e.get()),t.fc[i].C=o,z.symbolInit(r[i],t.fc[i].C,t.fc[i].F),t.R||(t.R=new Array(T)),t.R.fill(i,o,o+t.fc[i].F),o+=t.fc[i].F,0===n&&i+1===(255&e.getByteAt(e.position()))?(i=255&e.get(),n=255&e.get()):0!==n?(n-=1,i+=1):i=255&e.get()}while(0!==i);G(o=128&&(t[o].fc[u].F&=-129,t[o].fc[u].F=(127&t[o].fc[u].F)<<8|255&e.get()),t[o].fc[u].C=a,0===t[o].fc[u].F&&(t[o].fc[u].F=T),null==r[o][u]&&(r[o][u]=new z.RansDecSymbol),z.symbolInit(r[o][u],t[o].fc[u].C,t[o].fc[u].F),null==t[o].R&&(t[o].R=new Array(T)),t[o].R.fill(u,a,a+t[o].fc[u].F),G((a+=t[o].fc[u].F)<=T),0===i&&u+1===(255&e.getByteAt(e.position()))?(u=255&e.get(),i=255&e.get()):0!==i?(i-=1,u+=1):u=255&e.get()}while(0!==u);0===n&&o+1===(255&e.getByteAt(e.position()))?(o=255&e.get(),n=255&e.get()):0!==n?(n-=1,o+=1):o=255&e.get()}while(0!==o)}(e,r,o),function(e,t,r,n){for(var o=t.remaining(),i=e.getInt(),a=e.getInt(),u=e.getInt(),c=e.getInt(),l=o>>2,s=0,f=l,p=2*l,d=3*l,h=0,y=0,v=0,m=0;so&&n.push(t(o,r)),n}}),ee=(new Q._).uint8(null,{formatter:function(e){return!!e}}),te=(new Q._).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new Q._).string("key",{length:2,stripNull:!1}).choice("value",{tag:"key",choices:{MI:ee,UI:ee,PI:ee,RN:ee,AP:ee,RR:ee,SM:(new Q._).array(null,{type:"uint8",length:5}),TD:(new Q._).nest(null,{type:X,formatter:function(e){return e.ents}})}})});function re(e){for(var t={},r=0;r=3?(r=r.ltf8("recordCounter"),t+=9):2===e&&(r=r.itf8("recordCounter"),t+=5),r=r.itf8("numBlocks").itf8("numContentIds").array("contentIds",{type:$,length:"numContentIds"}),t+=10,e>=2&&(r=r.array("md5",{type:"uint8",length:16}),t+=16),{parser:r,maxLength:function(e){return t+5*e}}},cramMappedSliceHeader:function(e){var t=(new Q._).itf8("refSeqId").itf8("refSeqStart").itf8("refSeqSpan").itf8("numRecords"),r=20;return e>=3?(t=t.ltf8("recordCounter"),r+=9):2===e&&(t=t.itf8("recordCounter"),r+=5),t=t.itf8("numBlocks").itf8("numContentIds").array("contentIds",{type:$,length:"numContentIds"}).itf8("refBaseBlockId"),r+=15,e>=2&&(t=t.array("md5",{type:"uint8",length:16}),r+=16),{parser:t,maxLength:function(e){return r+5*e}}},cramEncoding:function(e){return{parser:(new Q._).namely("cramEncoding").itf8("codecId").itf8("parametersBytes").choice("parameters",{tag:"codecId",choices:{0:new Q._,1:(new Q._).itf8("blockContentId"),2:(new Q._).itf8("offset").itf8("M"),3:Q._.start().itf8("numCodes").array("symbols",{length:"numCodes",type:$}).itf8("numLengths").array("bitLengths",{length:"numLengths",type:$}),4:Q._.start().nest("lengthsEncoding",{type:"cramEncoding"}).nest("valuesEncoding",{type:"cramEncoding"}),5:(new Q._).uint8("stopByte").itf8("blockContentId"),6:(new Q._).itf8("offset").itf8("length"),7:(new Q._).itf8("offset").itf8("K"),8:(new Q._).itf8("offset").itf8("log2m"),9:(new Q._).itf8("offset")}})}},cramDataSeriesEncodingMap:function(e){return(new Q._).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new Q._).string("key",{length:2,stripNull:!1}).nest("value",{type:this.cramEncoding(e).parser})})},cramTagEncodingMap:function(e){return(new Q._).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new Q._).itf8("key",{formatter:function(e){return String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)}}).nest("value",{type:this.cramEncoding(e).parser})})},cramCompressionHeader:function(e){var t=new Q._;return{parser:t=t.nest("preservation",{type:te,formatter:re}).nest("dataSeriesEncoding",{type:this.cramDataSeriesEncodingMap(e),formatter:re}).nest("tagEncoding",{type:this.cramTagEncodingMap(e),formatter:re})}},cramContainerHeader1:function(e){var t=(new Q._).int32("length").itf8("refSeqId").itf8("refSeqStart").itf8("alignmentSpan").itf8("numRecords"),r=24;return e>=3?(t=t.ltf8("recordCounter"),r+=9):2===e&&(t=t.itf8("recordCounter"),r+=5),e>1&&(t=t.ltf8("numBases"),r+=9),{parser:t=t.itf8("numBlocks").itf8("numLandmarks"),maxLength:r+=10}},cramContainerHeader2:function(e){var t=(new Q._).itf8("numLandmarks").array("landmarks",{type:(new Q._).itf8(),length:"numLandmarks"}),r=0;return e>=3&&(t=t.uint32("crc32"),r=4),{parser:t,maxLength:function(e){return 5+5*e+r}}}};function ae(e){var t=Object.assign({},ne);return Object.keys(ie).forEach((function(r){t[r]=ie[r](e)})),t}var ue=r(4585),ce=r.n(ue);function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function se(e){var t="function"==typeof Map?new Map:void 0;return se=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return fe(e,arguments,he(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),de(r,e)},se(e)}function fe(e,t,r){return fe=pe()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&de(o,r.prototype),o},fe.apply(null,arguments)}function pe(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}function he(e){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},he(e)}var ye=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(i,e);var t,r,n,o=(r=i,n=pe(),function(){var e,t=he(r);if(n){var o=he(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(se(Error));function ve(e,t,r){var n=0;if(t.bytePosition+(7-t.bitPosition+r)/8>e.length)throw new ye("read error during decoding. the file seems to be truncated.");for(var o=r;o;o--)n<<=1,n|=e[t.bytePosition]>>t.bitPosition&1,t.bitPosition-=1,t.bitPosition<0&&(t.bytePosition+=1),t.bitPosition&=7;return n}function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=t.parse(e),i=o.offset;return ge(ge({},o.result),{},{_endPosition:i+n,_size:i-r})}function Se(e,t){var r=e.prototype[t],n="_memo_".concat(t);e.prototype[t]=function(){var e=this;if(!(n in this)){var t=r.call(this);this[n]=t,Promise.resolve(t).catch((function(){delete e[n]}))}return this[n]}}function xe(e){return ce()(e.toUpperCase().replace(/[^\x21-\x7e]/g,""))}const Oe=1,Ee=2,je=4,Pe=8,ke=1,Ae=2,_e=4,Ce=8,Le=16,Te=32,Ie=64,Re=128,Me=256,Ne=512,Fe=1024,De=2048;var Ze=r(83401),Be=r.n(Ze);function ze(e){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ze(e)}function Ge(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{var o=function(){var e,n,o=(e=t.value,n=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,n)||Ue(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];r["is"+a]=function(e){return!!(e&i)},r["set"+a]=function(e){return e|i}};for(n.s();!(t=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}return r}var We=qe([[1,"Paired"],[2,"ProperlyPaired"],[4,"SegmentUnmapped"],[8,"MateUnmapped"],[16,"ReverseComplemented"],[32,"MateReverseComplemented"],[64,"Read1"],[128,"Read2"],[256,"Secondary"],[512,"FailedQc"],[1024,"Duplicate"],[2048,"Supplementary"]]),Qe=qe([[1,"PreservingQualityScores"],[2,"Detached"],[4,"WithMateDownstream"],[8,"DecodeSequenceAsStar"]]),$e=qe([[1,"OnNegativeStrand"],[2,"Unmapped"]]),Ye=function(){function e(t){var r=t.flags,n=t.cramFlags,o=t.readLength,i=t.mappingQuality,a=t.lengthOnRef,u=t.qualityScores,c=t.mateRecordNumber,l=t.readBases,s=t.readFeatures,f=t.mateToUse,p=t.readGroupId,d=t.readName,h=t.sequenceId,y=t.uniqueId,v=t.templateSize,m=t.alignmentStart,b=t.tags;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=r,this.cramFlags=n,this.readLength=o,this.mappingQuality=i,this.lengthOnRef=a,this.qualityScores=u,l&&(this.readBases=l),this.readGroupId=p,this.readName=d,this.sequenceId=h,this.uniqueId=y,this.templateSize=v,this.alignmentStart=m,this.tags=b,s&&(this.readFeatures=s),f&&(this.mate={flags:f.mateFlags,readName:f.mateReadName,sequenceId:f.mateSequenceId,alignmentStart:f.mateAlignmentStart}),c&&(this.mateRecordNumber=c)}var t,r;return t=e,(r=[{key:"isPaired",value:function(){return!!(this.flags&ke)}},{key:"isProperlyPaired",value:function(){return!!(this.flags&Ae)}},{key:"isSegmentUnmapped",value:function(){return!!(this.flags&_e)}},{key:"isMateUnmapped",value:function(){return!!(this.flags&Ce)}},{key:"isReverseComplemented",value:function(){return!!(this.flags&Le)}},{key:"isMateReverseComplemented",value:function(){return!!(this.flags&Te)}},{key:"isRead1",value:function(){return!!(this.flags&Ie)}},{key:"isRead2",value:function(){return!!(this.flags&Re)}},{key:"isSecondary",value:function(){return!!(this.flags&Me)}},{key:"isFailedQc",value:function(){return!!(this.flags&Ne)}},{key:"isDuplicate",value:function(){return!!(this.flags&Fe)}},{key:"isSupplementary",value:function(){return!!(this.flags&De)}},{key:"isDetached",value:function(){return!!(this.cramFlags&Ee)}},{key:"hasMateDownStream",value:function(){return!!(this.cramFlags&je)}},{key:"isPreservingQualityScores",value:function(){return!!(this.cramFlags&Oe)}},{key:"isUnknownBases",value:function(){return!!(this.cramFlags&Pe)}},{key:"getReadBases",value:function(){if(!this.readBases&&this._refRegion){var e=function(e,t){if(!e.lengthOnRef&&!e.readLength)return null;if(e.isUnknownBases())return null;var r=e.alignmentStart-t.start;if(!e.readFeatures)return t.seq.substr(r,e.lengthOnRef).toUpperCase();for(var n="",o=r,i=0;n.lengththis.mate.alignmentStart&&i>0&&(i=-i),i>0?(o[0]=e,o[1]=r,o[2]=t,o[3]=n):(o[2]=e,o[3]=r,o[0]=t,o[1]=n),o.join("")}return null}},{key:"addReferenceSequence",value:function(e,t){this.readFeatures&&this.readFeatures.forEach((function(r){"X"===r.code&&function(e,t,r,n){if(t){var o=n.refPos-t.start,i=t.seq.charAt(o);i&&(n.ref=i);var a=Ve[i];void 0===a&&(a=4);var u=r.substitutionMatrix[a][n.data];u&&(n.sub=u)}}(0,e,t,r)})),!this.readBases&&e.start<=this.alignmentStart&&e.end>=this.alignmentStart+(this.lengthOnRef||this.readLength)-1&&(this._refRegion=e)}},{key:"toJSON",value:function(){var e=this,t={};return Object.keys(this).forEach((function(r){"_"!==r.charAt(0)&&(t[r]=e[r])})),t.readBases=this.getReadBases(),t}}])&&Ge(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ke(e,t){if(e){if("string"==typeof e)return Je(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Je(e,t):void 0}}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&-2===n.parsedContent.refSeqId?t("RI"):n.parsedContent.refSeqId;var p=t("RL"),d=t("AP");r.APdelta&&(d+=a.lastAlignmentStart),a.lastAlignmentStart=d;var h,y,v,m,b=t("RG");if(r.readNamesIncluded&&(h=Xe(t("RN"))),Qe.isDetached(f)){var g,w=t("MF");r.readNamesIncluded||(h=g=Xe(t("RN")));var S=t("NS"),x=t("NP");(w||S>-1)&&(y={mateFlags:w,mateSequenceId:S,mateAlignmentStart:x,mateReadName:g}),v=t("TS"),$e.isUnmapped(w)&&(s=We.setMateUnmapped(s)),$e.isOnNegativeStrand(w)&&(s=We.setMateReverseComplemented(s))}else Qe.isWithMateDownstream(f)&&(m=t("NF")+c+1);var O=t("TL");if(O<0)throw new A("invalid TL index");for(var E,j,P,k,_={},C=r.getTagNames(O),L=C.length,T=0;T1?"SC":"IN"],X:["number","BS"],D:["number","DL"],I:["string","IN"],i:["character","BA"],b:["string","BB"],q:["numArray","QQ"],Q:["number","QS"],H:["number","HC"],P:["number","PD"],N:["number","RS"]}[s];if(!p)throw new A('invalid read feature code "'.concat(s,'"'));var d=c(p),h={B:["number","QS"]}[s];h&&(d=[d,c(h)]);var y=i+=f,v=a+=f;"D"===s||"N"===s?a+=d:"I"===s||"S"===s?a-=d.length:"i"===s&&(a-=1),u[l]={code:s,pos:y,refPos:v,data:d}}return u}(d,G,t,0,u)),j=p,E){var U,H=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ke(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(E);try{for(H.s();!(U=H.n()).done;){var V=U.value,q=V.code,W=V.data;"D"===q||"N"===q?j+=W:"I"===q||"S"===q?j-=W.length:"i"===q&&(j-=1)}}catch(e){H.e(e)}finally{H.f()}}if(Number.isNaN(j)&&(console.warn("".concat(h||"".concat(l,":").concat(d)," record has invalid read features")),j=p),P=t("MQ"),Qe.isPreservingQualityScores(f)){k=new Array(p);for(var Q=0;Q=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function it(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0){var o=e[r.mateRecordNumber];if(!o)throw new A("intra-slice mate record not found, this file seems malformed");n.push.apply(n,st(t(o)))}return n}(r),o=n.map((function(e){return e.alignmentStart})),i=n.map((function(e){return e.alignmentStart+e.readLength-1})),a=Math.max.apply(Math,st(i))-Math.min.apply(Math,st(o))+1;a>=0&&n.forEach((function(e){if(void 0!==e.templateLength)throw new A("mate pair group has some members that have template lengths already, this file seems malformed");e.templateLength=a}))}(e,0,r):function(e,t){var r=Math.min(e.alignmentStart,t.alignmentStart),n=Math.max(e.alignmentStart+e.readLength-1,t.alignmentStart+t.readLength-1)-r+1;e.templateLength=n,t.templateLength=n}(r,n)),delete r.mateRecordNumber}var dt=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.container=t,this.containerPosition=r,this.file=t.file}var t,r,n,o,i,a,u,c,l,s;return t=e,r=[{key:"getHeader",value:(s=ut(nt().mark((function e(){var t,r,n,o,i;return nt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.file.getSectionParsers();case 2:return t=e.sent,e.next=5,this.container.getHeader();case 5:return r=e.sent,e.next=8,this.file.readBlock(r._endPosition+this.containerPosition);case 8:if(void 0!==(n=e.sent)){e.next=11;break}throw new Error;case 11:if("MAPPED_SLICE_HEADER"!==n.contentType){e.next=16;break}return o=we(n.content,t.cramMappedSliceHeader.parser,0,r._endPosition),e.abrupt("return",it(it({},n),{},{parsedContent:o}));case 16:if("UNMAPPED_SLICE_HEADER"!==n.contentType){e.next=21;break}return i=we(n.content,t.cramUnmappedSliceHeader.parser,0,r._endPosition),e.abrupt("return",it(it({},n),{},{parsedContent:i}));case 21:throw new A("error reading slice header block, invalid content type ".concat(n.contentType));case 22:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getBlocks",value:(l=ut(nt().mark((function e(){var t,r,n,o,i;return nt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader();case 2:t=e.sent,r=t._endPosition,n=new Array(t.parsedContent.numBlocks),o=0;case 6:if(!(o=0)){e.next=19;break}return e.next=15,this.getBlockByContentId(t.refBaseBlockId);case 15:if(n=e.sent){e.next=18;break}throw new A("embedded reference specified, but reference block does not exist");case 18:return e.abrupt("return",{seq:n.data.toString("utf8"),start:t.refSeqStart,end:t.refSeqStart+t.refSeqSpan-1,span:t.refSeqSpan});case 19:if(!r.referenceRequired&&!this.file.fetchReferenceSequenceCallback){e.next=28;break}if(this.file.fetchReferenceSequenceCallback){e.next=22;break}throw new Error("reference sequence not embedded, and seqFetch callback not provided, cannot fetch reference sequence");case 22:return e.next=24,this.file.fetchReferenceSequenceCallback(t.refSeqId,t.refSeqStart,t.refSeqStart+t.refSeqSpan-1);case 24:if((o=e.sent).length===t.refSeqSpan){e.next=27;break}throw new C("seqFetch callback returned a reference sequence of the wrong length");case 27:return e.abrupt("return",{seq:o,start:t.refSeqStart,end:t.refSeqStart+t.refSeqSpan-1,span:t.refSeqSpan});case 28:return e.abrupt("return",void 0);case 29:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getAllRecords",value:function(){return this.getRecords((function(){return!0}))}},{key:"_fetchRecords",value:(o=ut(nt().mark((function e(){var t,r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b,g,w=this;return nt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.file.getDefinition();case 2:return t=e.sent,r=t.majorVersion,e.next=6,this.container.getCompressionScheme();case 6:if(void 0!==(n=e.sent)){e.next=9;break}throw new Error;case 9:return e.next=11,this.getHeader();case 11:if(void 0!==(o=e.sent)){e.next=14;break}throw new Error;case 14:return e.next=16,this._getBlocksContentIdIndex();case 16:if(i=e.sent,!(r>1&&this.file.options.checkSequenceMD5&&oe(o.parsedContent)&&o.parsedContent.refSeqId>=0&&"0000000000000000"!==o.parsedContent.md5.join(""))){e.next=27;break}return e.next=20,this.getReferenceRegion();case 20:if(!(a=e.sent)){e.next=27;break}if(u=a.seq,c=a.start,l=a.end,s=xe(u),f=o.parsedContent.md5.map((function(e){return(e<16?"0":"")+e.toString(16)})).join(""),s===f){e.next=27;break}throw new A("MD5 checksum reference mismatch for ref ".concat(o.parsedContent.refSeqId," pos ").concat(c,"..").concat(l,". recorded MD5: ").concat(f,", calculated MD5: ").concat(s));case 27:return e.next=29,this.getCoreDataBlock();case 29:p=e.sent,d={lastAlignmentStart:oe(o.parsedContent)?o.parsedContent.refSeqStart:0,coreBlock:{bitPosition:7,bytePosition:0},externalBlocks:{map:new Map,getCursor:function(e){var t=this.map.get(e);return void 0===t&&(t={bitPosition:7,bytePosition:0},this.map.set(e,t)),t}}},h=function(e){var t=n.getCodecForDataSeries(e);if(!t)throw new A("no codec defined for ".concat(e," data series"));return t.decode(w,p,i,d)},y=new Array(o.parsedContent.numRecords),v=0;case 34:if(!(v=0&&pt(y,b,y[b],y[g]);return e.abrupt("return",y);case 54:case"end":return e.stop()}}),e,this,[[35,40]])}))),function(){return o.apply(this,arguments)})},{key:"getRecords",value:(n=ut(nt().mark((function e(t){var r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b=this;return nt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.container.filePosition+this.containerPosition,(n=this.file.featureCache.get(r.toString()))||(n=this._fetchRecords(),this.file.featureCache.set(r.toString(),n)),e.next=5,n;case 5:if(o=e.sent,!(i=o.filter(t)).length||!this.file.fetchReferenceSequenceCallback){e.next=23;break}return e.next=10,this.getHeader();case 10:if(!oe((a=e.sent).parsedContent)||!(a.parsedContent.refSeqId>=0||-2===a.parsedContent.refSeqId)){e.next=23;break}return u=a.parsedContent.refSeqId>=0?a.parsedContent.refSeqId:void 0,e.next=15,this.container.getCompressionScheme();case 15:if(void 0!==(c=e.sent)){e.next=18;break}throw new Error;case 18:for(l={},s=0;sp.end&&(p.end=d),i[s].alignmentStarte.length)&&(t=e.length);for(var r=0,n=new Array(t);r>1)&1431655765))+(a>>2&858993459))+(a>>4)&252645135)>>24>l)throw new A("Symbol out of range");e.codes[n]=o}))}))}},{key:"buildCaches",value:function(){this.sortedCodes=Object.values(this.codes).sort((function(e,t){return e.bitLength-t.bitLength||e.bitCode-t.bitCode})),this.sortedByValue=Object.values(this.codes).sort((function(e,t){return e.value-t.value})),this.sortedValuesByBitCode=this.sortedCodes.map((function(e){return e.value})),this.sortedBitCodes=this.sortedCodes.map((function(e){return e.bitCode})),this.sortedBitLengthsByBitCode=this.sortedCodes.map((function(e){return e.bitLength}));var e,t=Math.max.apply(Math,function(e){if(Array.isArray(e))return wt(e)}(e=this.sortedBitCodes)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());this.bitCodeToValue=new Array(t+1).fill(-1);for(var r=0;r-1&&this.sortedBitLengthsByBitCode[c]===u)return this.sortedValuesByBitCode[c];for(var l=a;this.sortedCodes[l+1].bitLength===u&&le.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)throw new ye("Attempted to read beyond end of buffer; this file seems truncated.");return[r,n-t]}(e.content,t.bytePosition),i=(n=2,function(e){if(Array.isArray(e))return e}(r=o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,n)||function(e,t){if(e){if("string"==typeof e)return Pt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pt(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],u=i[1];return t.bytePosition=t.bytePosition+u,a}},{key:"_decodeByte",value:function(e,t){if(t.bytePosition>=e.content.length)throw new ye("attempted to read beyond end of block. this file seems truncated.");return e.content[t.bytePosition++]}}],r&&kt(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(mt);function Lt(e){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lt(e)}function Tt(e,t){for(var r=0;r>6&3]="C",t[0][e[0]>>4&3]="G",t[0][e[0]>>2&3]="T",t[0][e[0]>>0&3]="N",t[1][e[1]>>6&3]="A",t[1][e[1]>>4&3]="G",t[1][e[1]>>2&3]="T",t[1][e[1]>>0&3]="N",t[2][e[2]>>6&3]="A",t[2][e[2]>>4&3]="C",t[2][e[2]>>2&3]="T",t[2][e[2]>>0&3]="N",t[3][e[3]>>6&3]="A",t[3][e[3]>>4&3]="C",t[3][e[3]>>2&3]="G",t[3][e[3]>>0&3]="N",t[4][e[4]>>6&3]="A",t[4][e[4]>>4&3]="C",t[4][e[4]>>2&3]="G",t[4][e[4]>>0&3]="T",t}(t.preservation.SM),this.dataSeriesEncoding=t.dataSeriesEncoding,this.tagEncoding=t.tagEncoding,this.preservation=t.preservation,this._size=t._size,this._endPosition=t._endPosition}var t,r;return t=e,(r=[{key:"getCodecForTag",value:function(e){if(!this.tagCodecCache[e]){var t=this.tagEncoding[e];t&&(this.tagCodecCache[e]=rr(t,"byteArray"))}return this.tagCodecCache[e]}},{key:"getTagNames",value:function(e){return this.tagIdsDictionary[e]}},{key:"getCodecForDataSeries",value:function(e){var t=this.dataSeriesCodecCache[e];if(void 0===t){var r=this.dataSeriesEncoding[e];if(r){var n=ir[e];if(!n)throw new A("data series name ".concat(e," not defined in file compression header"));t=rr(r,n),this.dataSeriesCodecCache[e]=t}}return t}},{key:"toJSON",value:function(){var e=this,t={};return Object.keys(this).forEach((function(r){/Cache$/.test(r)||(t[r]=e[r])})),t}}])&&or(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),ur=r(80365).Buffer;function cr(e){return cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cr(e)}function lr(){lr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(L([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==cr(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function sr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fr(e){for(var t=1;t=a)){e.next=10;break}return e.abrupt("return",void 0);case 10:return u=ur.allocUnsafe(n.maxLength),e.next=13,this.file.read(u,0,n.maxLength,t);case 13:if(d=(c=we(u,n.parser)).numLandmarks,l=-128&d?-16384&d?-2097152&d?-268435456&d?5:4:3:2:1,!(t+c.length>=a)){e.next=18;break}return console.warn("".concat(this.file,": container header at ").concat(t," indicates that the container has length ").concat(c.length,", which extends beyond the length of the file. Skipping this container.")),e.abrupt("return",void 0);case 18:return s=ur.allocUnsafe(o.maxLength(c.numLandmarks)),e.next=21,this.file.read(s,0,o.maxLength(c.numLandmarks),t+c._size-l);case 21:if(f=we(s,o.parser),!this.file.validateChecksums||void 0===f.crc32){e.next=25;break}return e.next=25,this.file.checkCrc32(t,c._size+f._size-l-4,f.crc32,"container header beginning at position ".concat(t));case 25:return p=Object.assign(c,f,{_size:c._size+f._size-l,_endPosition:c._size+f._size-l+t}),e.abrupt("return",p);case 27:case"end":return e.stop()}var d}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&hr(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();"getHeader getCompressionHeaderBlock getCompressionScheme".split(" ").forEach((function(e){return Se(vr,e)}));var mr=r(70265),br=r(24350),gr=r.n(br),wr=r(57285);function Sr(e){return Sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sr(e)}function xr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Or(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function jr(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Pr(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){jr(i,n,o,a,u,"next",e)}function u(e){jr(i,n,o,a,u,"throw",e)}a(void 0)}))}}function kr(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.baseOverrides={},this.url=t;var n=r.fetch||_r.fetch&&_r.fetch.bind(_r);if(!n)throw new TypeError("no fetch function supplied, and none found in global environment");r.overrides&&(this.baseOverrides=r.overrides),this.fetchImplementation=n}var t,r,n,o,i,a,u,c;return t=e,r=[{key:"getBufferFromResponse",value:(c=Pr(Er().mark((function e(t){var r;return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.buffer){e.next=4;break}return e.abrupt("return",t.buffer());case 4:if("function"!=typeof t.arrayBuffer){e.next=11;break}return e.next=7,t.arrayBuffer();case 7:return r=e.sent,e.abrupt("return",wr.Buffer.from(r));case 11:throw new TypeError("invalid HTTP response object, has no buffer method, and no arrayBuffer method");case 12:case"end":return e.stop()}}),e)}))),function(e){return c.apply(this,arguments)})},{key:"fetch",value:(u=Pr(Er().mark((function e(t,r){var n;return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.fetchImplementation(t,r);case 3:case 12:n=e.sent,e.next=16;break;case 6:if(e.prev=6,e.t0=e.catch(0),!"".concat(e.t0).includes("Failed to fetch")){e.next=15;break}return console.warn("generic-filehandle: refetching ".concat(t," to attempt to work around chrome CORS header caching bug")),e.next=12,this.fetchImplementation(t,Or(Or({},r),{},{cache:"reload"}));case 15:throw e.t0;case 16:return e.abrupt("return",n);case 17:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(e,t){return u.apply(this,arguments)})},{key:"read",value:(a=Pr(Er().mark((function e(t){var r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m=arguments;return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=m.length>1&&void 0!==m[1]?m[1]:0,n=m.length>2?m[2]:void 0,o=m.length>3&&void 0!==m[3]?m[3]:0,a=(i=m.length>4&&void 0!==m[4]?m[4]:{}).headers,u=void 0===a?{}:a,c=i.signal,l=i.overrides,s=void 0===l?{}:l,n<1/0?u.range="bytes=".concat(o,"-").concat(o+n):n===1/0&&0!==o&&(u.range="bytes=".concat(o,"-")),f=Or(Or(Or({},this.baseOverrides),s),{},{headers:Or(Or(Or({},u),s.headers),this.baseOverrides.headers),method:"GET",redirect:"follow",mode:"cors",signal:c}),e.next=9,this.fetch(this.url,f);case 9:if((p=e.sent).ok){e.next=12;break}throw new Error("HTTP ".concat(p.status," ").concat(p.statusText," ").concat(this.url));case 12:if((200!==p.status||0!==o)&&206!==p.status){e.next=21;break}return e.next=15,this.getBufferFromResponse(p);case 15:return d=e.sent,h=d.copy(t,r,0,Math.min(n,d.length)),y=p.headers.get("content-range"),(v=/\/(\d+)$/.exec(y||""))&&v[1]&&(this._stat={size:parseInt(v[1],10)}),e.abrupt("return",{bytesRead:h,buffer:t});case 21:if(200!==p.status){e.next=23;break}throw new Error("${this.url} fetch returned status 200, expected 206");case 23:throw new Error("HTTP ".concat(p.status," fetching ").concat(this.url));case 24:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"readFile",value:(i=Pr(Er().mark((function e(){var t,r,n,o,i,a,u,c,l,s,f,p=arguments;return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"string"==typeof(t=p.length>0&&void 0!==p[0]?p[0]:{})?(r=t,n={}):(r=t.encoding,delete(n=t).encoding),i=(o=n).headers,a=void 0===i?{}:i,u=o.signal,c=o.overrides,l=void 0===c?{}:c,s=Or(Or({headers:a,method:"GET",redirect:"follow",mode:"cors",signal:u},this.baseOverrides),l),e.next=6,this.fetch(this.url,s);case 6:if(f=e.sent){e.next=9;break}throw new Error("generic-filehandle failed to fetch");case 9:if(200===f.status){e.next=11;break}throw Object.assign(new Error("HTTP ".concat(f.status," fetching ").concat(this.url)),{status:f.status});case 11:if("utf8"!==r){e.next=13;break}return e.abrupt("return",f.text());case 13:if(!r){e.next=15;break}throw new Error("unsupported encoding: ".concat(r));case 15:return e.abrupt("return",this.getBufferFromResponse(f));case 16:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"stat",value:(o=Pr(Er().mark((function e(){var t;return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._stat){e.next=6;break}return t=wr.Buffer.allocUnsafe(10),e.next=4,this.read(t,0,10,0);case 4:if(this._stat){e.next=6;break}throw new Error("unable to determine size of file at ".concat(this.url));case 6:return e.abrupt("return",this._stat);case 7:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"close",value:(n=Pr(Er().mark((function e(){return Er().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return");case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})}],r&&kr(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Lr(e,t,r){if(r)return r;if(e)return n=e,o=mr.parse(n),i=o.protocol,a=o.pathname,"file:"===i?new(gr())(unescape(function(e){if(null==e)throw new Error("Value must not be nullish.");return e}(a))):new Cr(n);var n,o,i,a;if(t)return new(gr())(t);throw new Error("no url, path, or filehandle provided, cannot open")}function Tr(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ir(e,t){if(e){if("string"==typeof e)return Rr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rr(e,t):void 0}}function Rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Gr(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Ur(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Gr(i,n,o,a,u,"next",e)}function u(e){Gr(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Hr(e,t){for(var r=0;r0)throw new Error("Detected big-endian machine, may be unable to run")}var t,r,n,o,a,c,s,d,y,v,m,b,g;return t=e,r=[{key:"read",value:function(e,t,r,n){return this.file.read(e,t,r,n)}},{key:"stat",value:function(){return this.file.stat()}},{key:"getDefinition",value:(g=Ur(zr().mark((function e(){var t,r;return zr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Fr.allocUnsafe(Y.maxLength),e.next=3,this.file.read(t,0,Y.maxLength,0);case 3:if(2===(r=Y.parser.parse(t).result).majorVersion||3===r.majorVersion){e.next=6;break}throw new k("CRAM version ".concat(r.majorVersion," not supported"));case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"getSamHeader",value:(b=Ur(zr().mark((function e(){var t,r,n,o,i;return zr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getContainerById(0);case 2:if(t=e.sent){e.next=5;break}throw new A("file contains no containers");case 5:return e.next=7,t.getFirstBlock();case 7:if(void 0!==(r=e.sent)){e.next=10;break}return e.abrupt("return",Nr(""));case 10:return n=r.content,o=n.readInt32LE(0),i=n.toString("utf8",4,4+o),this.header=i,e.abrupt("return",Nr(i));case 16:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"getHeaderText",value:(m=Ur(zr().mark((function e(){return zr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getSamHeader();case 2:return e.abrupt("return",this.header);case 3:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"getSectionParsers",value:(v=Ur(zr().mark((function e(){var t,r;return zr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDefinition();case 2:return t=e.sent,r=t.majorVersion,e.abrupt("return",ae(r));case 5:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"getContainerById",value:(y=Ur(zr().mark((function e(t){var r,n,o,i,a,u,c,l,s,f;return zr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getSectionParsers();case 2:return r=e.sent,n=r.cramFileDefinition.maxLength,e.next=6,this.file.stat();case 6:o=e.sent,i=o.size,a=r.cramContainerHeader1,c=0;case 10:if(!(c<=t)){e.next=38;break}if(!(n+a.maxLength+8>=i)){e.next=13;break}return e.abrupt("return",void 0);case 13:return u=this.getContainerAtPosition(n),e.next=16,u.getHeader();case 16:if(l=e.sent){e.next=19;break}throw new A("container ".concat(t," not found in file"));case 19:if(0!==c){e.next=34;break}n=l._endPosition,s=0;case 22:if(!(s=i)){e.next=10;break}return e.abrupt("return",void 0);case 10:return a=Fr.allocUnsafe(n.maxLength),e.next=13,this.file.read(a,0,n.maxLength,t);case 13:return e.abrupt("return",we(a,n.parser,0,t));case 14:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"_parseSection",value:(a=Ur(zr().mark((function e(t,r){var n,o,i,a,u,c,l=arguments;return zr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=l.length>2&&void 0!==l[2]?l[2]:t.maxLength,!(o=l.length>3&&void 0!==l[3]?l[3]:void 0)){e.next=6;break}i=o,e.next=15;break;case 6:return e.next=8,this.file.stat();case 8:if(a=e.sent,u=a.size,!(r+n>=u)){e.next=12;break}return e.abrupt("return",void 0);case 12:return i=Fr.allocUnsafe(n),e.next=15,this.file.read(i,0,n,r);case 15:if((c=we(i,t.parser,0,r))._size===n){e.next=18;break}throw new A("section read error: requested size ".concat(n," does not equal parsed size ").concat(c._size));case 18:return e.abrupt("return",c);case 19:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"_uncompress",value:(o=Ur(zr().mark((function e(t,r,n){var o,a,u,c,l,s;return zr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("gzip"!==t){e.next=5;break}i(r).copy(n),e.next=46;break;case 5:if("bzip2"!==t){e.next=12;break}o=f().array(r),a=f().header(o),u=0;do{-1!=(c=f().decompress(o,a))&&(Fr.from(c).copy(n,u),u+=c.length,a-=c.length)}while(-1!=c);e.next=46;break;case 12:if("lzma"!==t){e.next=25;break}return console.log("t1"),l=new Response(new p.XzReadableStream(qr(r))),console.log("t2"),e.t0=Fr,e.next=19,l.arrayBuffer();case 19:e.t1=e.sent,s=e.t0.from.call(e.t0,e.t1),console.log("t3"),s.copy(n),e.next=46;break;case 25:if("rans"!==t){e.next=29;break}W(r,n),e.next=46;break;case 29:if("rans4x16"!==t){e.next=33;break}h().r4x16_uncompress(r,n),e.next=46;break;case 33:if("arith"!==t){e.next=37;break}h().arith_uncompress(r,n),e.next=46;break;case 37:if("fqzcomp"!==t){e.next=41;break}h().fqzcomp_uncompress(r,n),e.next=46;break;case 41:if("tok3"!==t){e.next=45;break}h().tok3_uncompress(r,n),e.next=46;break;case 45:throw new k("".concat(t," decompression not yet implemented"));case 46:case"end":return e.stop()}}),e)}))),function(e,t,r){return o.apply(this,arguments)})},{key:"readBlock",value:(n=Ur(zr().mark((function e(t){var r,n,o,i,a,u,c,l,s;return zr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDefinition();case 2:return r=e.sent,n=r.majorVersion,e.next=6,this.getSectionParsers();case 6:return o=e.sent,e.next=9,this.readBlockHeader(t);case 9:if(void 0!==(i=e.sent)){e.next=12;break}return e.abrupt("return",void 0);case 12:if(a=i._endPosition,u=Fr.allocUnsafe(i.uncompressedSize),c=Br(Br({},i),{},{_endPosition:a,contentPosition:a,content:u}),"raw"===i.compressionMethod){e.next=23;break}return l=Fr.allocUnsafe(i.compressedSize),e.next=19,this.read(l,0,i.compressedSize,a);case 19:return e.next=21,this._uncompress(i.compressionMethod,l,u);case 21:e.next=25;break;case 23:return e.next=25,this.read(u,0,i.uncompressedSize,a);case 25:if(!(n>=3)){e.next=39;break}return e.next=28,this._parseSection(o.cramBlockCrc32,a+i.compressedSize);case 28:if(void 0!==(s=e.sent)){e.next=31;break}return e.abrupt("return",void 0);case 31:if(c.crc32=s.crc32,!this.validateChecksums){e.next=35;break}return e.next=35,this.checkCrc32(t,i._size+i.compressedSize,s.crc32,"block data");case 35:c._endPosition=s._endPosition,c._size=c.compressedSize+o.cramBlockCrc32.maxLength,e.next=41;break;case 39:c._endPosition=a+c.compressedSize,c._size=c.compressedSize;case 41:return e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&Hr(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();"getDefinition getSectionParsers getSamHeader".split(" ").forEach((function(e){return Se(Wr,e)}));const Qr=Wr;function $r(e){return $r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$r(e)}function Yr(){Yr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(L([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==$r(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Kr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||Xr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jr(e){return function(e){if(Array.isArray(e))return en(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Xr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xr(e,t){if(e){if("string"==typeof e)return en(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?en(e,t):void 0}}function en(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r3&&void 0!==M[3]?M[3]:{}).viewAsPairs=i.viewAsPairs||!1,i.pairAcrossChr=i.pairAcrossChr||!1,i.maxInsertSize=i.maxInsertSize||2e5,"string"!=typeof t){e.next=6;break}throw new k("string sequence names not yet supported");case 6:return a=t,e.next=9,this.index.getEntriesForRange(a,r,n);case 9:if(u=e.sent,!((c=u.map((function(e){return e.sliceBytes})).reduce((function(e,t){return e+t}),0))>this.fetchSizeLimit)){e.next=13;break}throw new _("data size of ".concat(c.toLocaleString()," bytes exceeded fetch size limit of ").concat(this.fetchSizeLimit.toLocaleString()," bytes"));case 13:return l=function(e){return e.sequenceId===t&&e.alignmentStart<=n&&void 0!==e.lengthOnRef&&e.alignmentStart+e.lengthOnRef-1>=r},e.next=16,Promise.all(u.map((function(e){return R.getRecordsInSlice(e,l)})));case 16:if(s=e.sent,f=(o=Array.prototype).concat.apply(o,Jr(s)),!i.viewAsPairs){e.next=62;break}p={},d={},h=0;case 22:if(!(hthis.fetchSizeLimit)){e.next=57;break}throw new Error("mate data size of ".concat(L.toLocaleString()," bytes exceeded fetch size limit of ").concat(this.fetchSizeLimit.toLocaleString()," bytes"));case 57:return E.forEach((function(e){var t=R.cram.featureCache.get(e.toString());t||(t=R.getRecordsInSlice(e,(function(){return!0})),R.cram.featureCache.set(e.toString(),t)),A.push(t);var r=t.then((function(e){for(var t=[],r=0;r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ln(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function sn(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ln(i,n,o,a,u,"next",e)}function u(e){ln(i,n,o,a,u,"throw",e)}a(void 0)}))}}function fn(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r4&&21578050===t.readUInt32LE(0))throw new A("invalid .crai index file. note: file appears to be a .bai index. this is technically legal but please open a github issue if you need support");for(var r=[],n="",o=0;o=48&&i<=57||!n&&45===i)n+=String.fromCharCode(i);else if(9===i)r.push(Number.parseInt(n,10)),n="";else if(10===i)r.push(Number.parseInt(n,10)),n="",hn(e,r),r=[];else if(13!==i&&32!==i)throw new A("invalid .crai index file")}return n&&r.push(Number.parseInt(n,10)),6===r.length&&hn(e,r),Object.entries(e).forEach((function(t){var r=pn(t,2),n=r[0],o=r[1];e[n]=o.sort((function(e,t){return e.start-t.start||e.span-t.span}))})),e}))}},{key:"getIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._parseCache.get("index",null,e.signal)}},{key:"hasDataForReferenceSequence",value:(o=sn(cn().mark((function e(t){return cn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:return e.t0=t,e.abrupt("return",!!e.sent[e.t0]);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getEntriesForRange",value:(n=sn(cn().mark((function e(t,r,n){var o,i,a,u;return cn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:if(e.t0=t,o=e.sent[e.t0]){e.next=6;break}return e.abrupt("return",[]);case 6:for(i=function(e){var t=e.start,o=e.start+e.span;return t>n?-1:o<=r?1:0},a=[],u=0;u=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function On(e,t){if(e){if("string"==typeof e)return En(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?En(e,t):void 0}}function En(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&p&&(i+="".concat(d,"I"),d=0),u&&"M"!==a&&(i+="".concat(u).concat(a),u=0),p&&(a="M",u+=p),"b"===m){var S=w.split(","),x=String.fromCharCode.apply(String,function(e){if(Array.isArray(e))return En(e)}(c=S)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||On(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());o+=x,f+=x.length,u+=x.length}else"B"===m||"X"===m?(o+=g,f++,u++):"D"===m||"N"===m?(f+=w,u&&(i+="".concat(u).concat(a)),i+=w+m,u=0):"I"===m||"S"===m?(o+=w,u&&(i+="".concat(u).concat(a)),i+=w.length+m,u=0):"i"===m?(u&&(i+="".concat(u).concat(a)),d++,o+=w,u=0):"P"===m?(u&&(i+="".concat(u).concat(a)),i+="".concat(w,"P")):"H"===m&&(u&&(i+="".concat(u).concat(a)),i+="".concat(w,"H"),u=0)}}catch(e){y.e(e)}finally{y.f()}}else p=r-o.length;return o.length!==r&&(p=r-o.length,o+=l.slice(f-s,f-s+p),u&&"M"!==a&&(i+="".concat(u).concat(a),u=0),a="M",u+=p),p&&d>0&&(i+="".concat(d,"I")),u&&(i+="".concat(u).concat(a)),i}(this.record.readFeatures,this.record.alignmentStart,this.record.readLength,this.record._refRegion)}},{key:"tags",value:function(){return Object.getOwnPropertyNames(e.prototype).filter((function(e){return e.startsWith("_get_")&&"_get_mismatches"!==e&&"_get_cram_read_features"!==e})).map((function(e){return e.replace("_get_","")}))}},{key:"id",value:function(){return"".concat(this._store.id,"-").concat(this.record.uniqueId)}},{key:"get",value:function(e){var t="_get_".concat(e);if(this[t])return this[t]()}},{key:"parent",value:function(){}},{key:"children",value:function(){}},{key:"set",value:function(){}},{key:"pairedFeature",value:function(){return!1}},{key:"_get_clipPos",value:function(){var e=this.get("mismatches");if(e.length){var t=-1===this.get("strand")?e.at(-1):e[0],r=t.type,n=t.cliplen;if("softclip"===r||"hardclip"===r)return n}return 0}},{key:"toJSON",value:function(){var e=this;return kn(kn({},Object.fromEntries(this.tags().map((function(t){return[t,e.get(t)]})).filter((function(e){return void 0!==e[1]})))),{},{uniqueId:this.id()})}},{key:"_get_mismatches",value:function(){var e=this.record.readFeatures,t=this.qualRaw();return function(e,t,r){if(!e)return[];var n,o=new Array(e.length),i=0,a=0,u=0,c=0,l=t,s=xn(e);try{for(s.s();!(n=s.n()).done;){var f=n.value,p=f.refPos,d=f.code,h=f.pos,y=f.data,v=f.sub,m=f.ref;if(c=u-l,l=u,c&&a>0&&(o[i++]={start:u,type:"insertion",base:"".concat(a),length:0},a=0),u=p-1-t,"X"===d)o[i++]={start:u,length:1,base:v,qual:null==r?void 0:r[h-1],altbase:null==m?void 0:m.toUpperCase(),type:"mismatch"};else if("I"===d)o[i++]={start:u,type:"insertion",base:"".concat(y.length),length:0};else if("N"===d)o[i++]={type:"skip",length:y,start:u,base:"N"};else if("S"===d){var b=y.length;o[i++]={start:u,type:"softclip",base:"S".concat(b),cliplen:b,length:1}}else if("P"===d);else if("H"===d){var g=y;o[i++]={start:u,type:"hardclip",base:"H".concat(g),cliplen:g,length:1}}else"D"===d?o[i++]={type:"deletion",length:y,start:u,base:"*"}:"b"===d||"q"===d||"B"===d||"i"===d&&a++}}catch(e){s.e(e)}finally{s.f()}return c&&a>0&&(o[i++]={start:u,type:"insertion",base:"".concat(a),length:0},a=0),o.slice(0,i)}(e,this.get("start"),t)}}])&&An(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ln(e){return Ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ln(e)}function Tn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return In(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?In(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function In(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Fn(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Dn(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Fn(i,n,o,a,u,"next",e)}function u(e){Fn(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Zn(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(23411);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(i,a,u,c){var l=d(e[i],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function a(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function u(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(96731),l=r(84446),s=r(93720),f=r(60285);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(51537),l=r(84446),s=r(93720),f=r(60285);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(51537),l=r(27558),s=r(5932),f=r(84446),p=r(93720),d=r(60285);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(51537),l=r(84446),s=r(93720),f=r(60285);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(51537),l=r(84446),s=r(93720),f=r(60285);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{drawFeats:()=>f});var n=r(35743),o=r(30657),i=r(80511),a=r(13400);function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(S);try{for(k.s();!(P=k.n()).done;){var A=P.value;if(1===A.length&&v){var _=A[0];if(!O||8&_.flags)for(var C=[_].concat((p=(0,i.Y1)(_.SA,_.id,_.strand,_.name),function(e){if(Array.isArray(e))return c(e)}(p)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(p)||u(p)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())).sort((function(e,t){return e.clipPos-t.clipPos})),L=0;L1e4;i&&L?(t.moveTo(_,0),t.beginPath()):(t.beginPath(),t.moveTo(_,0)),i&&L?t.strokeStyle="red":O?"insertSizeAndOrientation"===j?t.strokeStyle=(0,o.k5)(e,r,x)[0]:"orientation"===j?t.strokeStyle=(0,o.uE)(e)[0]:"insertSize"===j?t.strokeStyle=(null===(c=(0,o.Wh)(e,r,x))||void 0===c?void 0:c[0])||"grey":"gradient"===j&&(t.strokeStyle="hsl(".concat(10*Math.log10(A),",50%,50%)")):"orientation"===j||"insertSizeAndOrientation"===j?t.strokeStyle=-1===p&&1===d?"navy":1===p&&-1===d?"green":"grey":"gradient"===j&&(t.strokeStyle="hsl(".concat(10*Math.log10(A),",50%,50%)"));var T=_+2*k,I=Math.min(f+l(b),A);i?A>1e5?(s(t,_+l(b),f,"red"),s(t,C+l(b),f,"red")):L?(t.arc(_+k+l(b),0,A,0,Math.PI),t.stroke()):(t.bezierCurveTo(_+l(b),I,T,I,T+l(b),0),t.stroke()):(t.bezierCurveTo(_+l(b),I,T,I,T+l(b),0),t.stroke())}else E&&y&&s(t,E-g.offsetPx,f,"purple")}}},30801:(e,t,r)=>{"use strict";r.r(t),r.d(t,{drawFeats:()=>h});var n=r(35743),o=r(13400),i=r(2415);function a(e,t,r,n,o,i){r<0&&(e+=r,r=-r),n<0&&(t+=n,n=-n),i&&(o.fillStyle=i),o.fillRect(e,t,r,n)}function u(e,t,r,n,o,i){r<0&&(e+=r,r=-r),n<0&&(t+=n,n=-n),i&&(o.strokeStyle=i),o.strokeRect(e,t,r,n)}var c=r(30657);function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(j);try{for(k.s();!(h=k.n()).done;){var A=h.value;if(A.length>1){var _=A[0],C=A[1],L=S.getCanonicalRefName(_.refName)||_.refName,T=S.getCanonicalRefName(C.refName)||C.refName,I=null===(r=w.bpToPx({refName:L,coord:_.start}))||void 0===r?void 0:r.offsetPx,R=null===(o=w.bpToPx({refName:L,coord:_.end}))||void 0===o?void 0:o.offsetPx,M=null===(c=w.bpToPx({refName:T,coord:C.start}))||void 0===c?void 0:c.offsetPx,N=null===(s=w.bpToPx({refName:T,coord:C.end}))||void 0===s?void 0:s.offsetPx,F=0;if(void 0!==I&&void 0!==R&&void 0!==M&&void 0!==N){if(_.refName===C.refName){var D=Math.min(_.start,C.start),Z=Math.max(_.end,C.end);F=Math.abs(Z-D)}x.push({r1s:I,r1e:R,r2s:M,r2e:N,v0:_,v1:C,distance:F})}}else if(b.drawSingletons){var B=A[0],z=S.getCanonicalRefName(B.refName)||B.refName,G=null===(p=w.bpToPx({refName:z,coord:B.start}))||void 0===p?void 0:p.offsetPx,U=null===(d=w.bpToPx({refName:z,coord:B.end}))||void 0===d?void 0:d.offsetPx;if(void 0!==G&&void 0!==U){var H=Math.max(U-G,2);a(G-w.offsetPx,0,H,O,m,"#f00"),u(G-w.offsetPx,0,H,O,m,"#a00")}}}}catch(e){k.e(e)}finally{k.f()}for(var V=Math.log((0,n.max)(x.map((function(e){return e.distance})))),q=Math.max(Math.log((0,n.min)(x.map((function(e){return e.distance}))))-1,0),W=(b.height-20)/(V-q),Q=0,$=x;Q<$.length;Q++){var Y=$[Q],K=Y.r1e,J=Y.r1s,X=Y.r2e,ee=Y.r2s,te=Y.distance,re=Y.v0,ne=Y.v1,oe=Math.max(K-J,2),ie=Math.max(X-ee,2),ae=(v=2,function(e){if(Array.isArray(e))return e}(y=f({type:E,v0:re,v1:ne,stats:P})||[])||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(y,v)||l(y,v)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),ue=ae[0],ce=ae[1],le=(Math.log(te)-q)*W,se=O/2-.5,fe=ee-K;a(K-w.offsetPx,le+se,fe,1,m,"black"),u(J-w.offsetPx,le,oe,O,m,ce),u(ee-w.offsetPx,le,ie,O,m,ce),a(J-w.offsetPx,le,oe,O,m,ue),a(ee-w.offsetPx,le,ie,O,m,ue)}}({self:e,view:d,asm:y,ctx:t,chainData:r}):function(e){var t,r,o,l,s,f,d=e.ctx,h=e.self,y=e.view,v=e.asm,m=[],b=[],g=e.chainData.chains,w=h.height,S=(0,i.getConf)(h,"featureHeight"),x=p(g);try{for(x.s();!(f=x.n()).done;){var O,E=f.value,j=Number.MAX_VALUE,P=Number.MIN_VALUE,k=p(E);try{for(k.s();!(O=k.n()).done;){var A=O.value,_=v.getCanonicalRefName(A.refName)||A.refName,C=null===(t=y.bpToPx({refName:_,coord:A.start}))||void 0===t?void 0:t.offsetPx,L=null===(r=y.bpToPx({refName:_,coord:A.end}))||void 0===r?void 0:r.offsetPx;void 0!==C&&void 0!==L&&(j=Math.min(j,C),P=Math.max(P,L))}}catch(e){k.e(e)}finally{k.f()}var T=Math.abs(P-j);m.push(T),b.push(j)}}catch(e){x.e(e)}finally{x.f()}for(var I=Math.log((0,n.max)(m)),R=Math.max(Math.log((0,n.min)(m))-1,0),M=(w-20)/(I-R),N=S/2-.5,F=0;F{"use strict";r.d(t,{Y1:()=>A,Zr:()=>P,b8:()=>O,hs:()=>g,oZ:()=>S,rp:()=>E,sB:()=>k,uv:()=>x,wK:()=>j,zl:()=>w});var n=r(35743),o=r(33777);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){return c(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||p(e,t)||u()}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e){if(Array.isArray(e))return e}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,u,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,u)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}var s=l().mark(S);function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:"").split(v).slice(0,-1)}function w(e,t,r,n,o){var i=[],a=g(e);return e&&(i=i.concat(function(e,t,r,n){for(var o=0,i=0,a=[],u=r&&t,c=0;c=w.start))break;i.start+=w.length,l++}var S=d(i.start);i.base=n[S]||"X",i.qual=null==o?void 0:o[S],i.altbase=m,s.push(i),i={start:i.start+i.length,length:0,base:"",type:"mismatch"}}else i.start+=b}}catch(e){v.e(e)}finally{v.f()}return s}(t,a,i,r,o))),i}function S(e,t){var r,n,o,i,a,u,c,f;return l().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:r=0,n=0,o=0,i=0;case 4:if(!(i=0&&j=0&&k{"use strict";r.r(t),r.d(t,{default:()=>L});var n=r(20410),o=r(20349),i=r(42847),a=r(90254),u=r(71381),c=r(33777),l=r(80511),s=r(35743);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==f(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0&&O=0&&Z.5)||h&&(void 0===v||v>.5)?(l&&(w(l,i,"cov","meth"),l.ref--,l[i]--),f&&(w(f,i,"cov","meth"),f.ref--,f[i]--)):(l&&((null==H?void 0:H.some((function(e){return(0,s.doesIntersect2)(t,t+1,e.start+n,e.start+n+e.length)})))||(w(l,i,"cov","unmeth"),l.ref--,l[i])),f&&((null==H?void 0:H.some((function(e){return(0,s.doesIntersect2)(t+1,t+2,e.start+n,e.start+n+e.length)})))||(w(f,i,"cov","unmeth"),f.ref--,f[i]--))));case 4:case"end":return e.stop()}}),e)})),q=0;case 17:if(!(q=0&&tee.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function P(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function k(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){P(i,n,o,a,u,"next",e)}function u(e){P(i,n,o,a,u,"throw",e)}a(void 0)}))}}function A(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var n=k(j().mark((function n(i){var c,l,s,f,p,d;return j().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.configure();case 2:return c=n.sent,l=c.subadapter,n.next=6,(0,u.z)(l.getFeatures(e,r).pipe((0,a.q)()));case 6:return s=n.sent,n.next=9,S(s,e,r,(function(e){return t.fetchSequence(e)}));case 9:f=n.sent,p=f.bins,d=f.skipmap,p.forEach((function(r,n){var a=e.start+n;i.next(new o.default({id:"".concat(t.id,"-").concat(a),data:{score:r.total,snpinfo:r,start:a,end:a+1,refName:e.refName}}))})),Object.entries(d).forEach((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=n[0],u=n[1];i.next(new o.default({id:a,data:{type:"skip",start:u.start,end:u.end,strand:u.strand,score:u.score,xs:u.xs}}))})),i.complete();case 15:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"getMultiRegionFeatureDensityStats",value:(l=k(j().mark((function e(t,r){var n,o;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return n=e.sent,o=n.subadapter,e.abrupt("return",o.getMultiRegionFeatureDensityStats(t,r));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getRefNames",value:(n=k(j().mark((function e(){var t,r,n,o=arguments;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.configure();case 3:return r=e.sent,n=r.subadapter,e.abrupt("return",n.getRefNames(t));case 6:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"freeResources",value:function(){}}],r&&A(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),y}(n.BaseFeatureDataAdapter)},31951:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(63313),o=r.n(n),i=r(40828),a=r(51537),u=r(35127),c=r(97648),l=r(67016),s=r(82015),f=r(84446),p=r(93720),d=r(60285);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{doAfterAttach:()=>y});var n=r(35743),o=r(33777),i=r(82123);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return s.apply(this,arguments)}function s(){var e;return e=u().mark((function e(t){var r,o,a,c,l,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,n.getContainingTrack)(t),o=r.rpcSessionId,a=(0,n.getSession)(t),c=a.rpcManager,(l=(0,n.getContainingView)(t)).initialized&&!t.error&&!t.regionTooLarge){e.next=5;break}return e.abrupt("return");case 5:return t.setLoading(!0),e.next=8,c.call(o,"PileupGetReducedFeatures",{sessionId:o,regions:l.staticBlocks.contentBlocks,filterBy:(0,i.getSnapshot)(t.filterBy),adapterConfig:t.adapterConfig});case 8:s=e.sent,t.setChainData(s),t.setLoading(!1);case 11:case"end":return e.stop()}}),e)})),s=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))},s.apply(this,arguments)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==f(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,u,"next",e)}function u(e){d(i,n,o,a,u,"throw",e)}a(void 0)}))}}function y(e,t){function r(r){var n=e.ref;if(n){var o=n.getContext("2d");o&&e.chainData&&(o.clearRect(0,0,n.width,2*e.height),o.resetTransform(),o.scale(2,2),t(e,o,n.width,e.height),e.setLastDrawnOffsetPx(r.offsetPx),e.setLastDrawnBpPerPx(r.bpPerPx))}}(0,o.$X)(e,h(p().mark((function t(){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l(e);case 2:case"end":return t.stop()}}),t)}))),{delay:1e3}),(0,o.$X)(e,h(p().mark((function t(){var o;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(o=(0,n.getContainingView)(e)).bpPerPx!==e.lastDrawnBpPerPx&&r(o);case 2:case"end":return t.stop()}}),t)})))),(0,o.$X)(e,h(p().mark((function t(){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r((0,n.getContainingView)(e));case 2:case"end":return t.stop()}}),t)}))),{delay:1e3})}},30657:(e,t,r)=>{"use strict";r.d(t,{If:()=>i,Wh:()=>u,k5:()=>c,uE:()=>l,ue:()=>a,zi:()=>s});var n=r(82123),o=r(33777),i={color_fwd_strand_not_proper:"#ECC8C8",color_rev_strand_not_proper:"#BEBED8",color_fwd_strand:"#EC8B8B",color_rev_strand:"#8F8FD8",color_fwd_missing_mate:"#D11919",color_rev_missing_mate:"#1919D1",color_fwd_diff_chr:"#000",color_rev_diff_chr:"#969696",color_pair_lr:"#c8c8c8",color_pair_rr:"navy",color_pair_rl:"teal",color_pair_ll:"green",color_nostrand:"#c8c8c8",color_interchrom:"purple",color_longinsert:"red",color_shortinsert:"pink",color_unknown:"grey"},a={color_fwd_strand_not_proper:"#CA6767",color_rev_strand_not_proper:"#7272AA",color_fwd_strand:"#DC2A2A",color_rev_strand:"#4141BA",color_fwd_missing_mate:"#921111",color_rev_missing_mate:"#111192",color_fwd_diff_chr:"#000000",color_rev_diff_chr:"#696969",color_pair_lr:"#8C8C8C",color_pair_rr:"#00005A",color_pair_rl:"#005A5A",color_pair_ll:"#005A00",color_nostrand:"#8C8C8C",color_interchrom:"#5A005A",color_longinsert:"#B30000",color_shortinsert:"#FF3A5C",color_unknown:"grey"};function u(e,t,r){var n=e.refName===t.refName,o=Math.abs(e.tlen||0);return n&&o>((null==r?void 0:r.upper)||0)?[i.color_longinsert,a.color_longinsert]:n&&o<((null==r?void 0:r.lower)||0)?[i.color_shortinsert,a.color_shortinsert]:n?void 0:[i.color_interchrom,a.color_interchrom]}function c(e,t,r){return u(e,t,r)||l(e)}function l(e){var t=o.uD.fr,r=o.oL[t[e.pair_orientation||""]];return[i[r]||i.color_unknown,a[r]||a.color_unknown]}var s=n.types.maybe(n.types.model({type:n.types.string,tag:n.types.maybe(n.types.string),extra:n.types.frozen()}))},35131:(e,t,r)=>{"use strict";r.r(t),r.d(t,{renderSvg:()=>l});var n=r(63313),o=r.n(n),i=r(35743);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e,t,r){return s.apply(this,arguments)}function s(){var e;return e=u().mark((function e(t,n,a){var c,l,s,f,p,d,h,y;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=(0,i.getContainingView)(t),l=c.dynamicBlocks.totalWidthPx,s=t.height,!n.rasterizeLayers){e.next=15;break}if((f=document.createElement("canvas")).width=2*l,f.height=2*s,p=f.getContext("2d")){e.next=10;break}return e.abrupt("return");case 10:return p.scale(2,2),a(t,p,l,s),e.abrupt("return",o().createElement("image",{width:l,height:s,xlinkHref:f.toDataURL("image/png")}));case 15:return e.next=17,Promise.resolve().then(r.t.bind(r,43274,23));case 17:return d=e.sent,h=new d.default(l,s),a(t,h,l,s),u=t.id,void 0,v="undefined"==typeof jest,y="arc-clip-".concat(v?u:"jest"),e.abrupt("return",o().createElement(o().Fragment,null,o().createElement("defs",null,o().createElement("clipPath",{id:y},o().createElement("rect",{x:0,y:0,width:l,height:s}))),o().createElement("g",{dangerouslySetInnerHTML:{__html:h.getSvg().innerHTML},clipPath:"url(#".concat(y,")")})));case 22:case"end":return e.stop()}var u,v}),e)})),s=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))},s.apply(this,arguments)}},13400:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(e.chains.values());try{for(r.s();!(t=r.n()).done;)if(1&t.value[0].flags)return!0}catch(e){r.e(e)}finally{r.f()}return!1}r.d(t,{F:()=>o})},33777:(e,t,r)=>{"use strict";r.d(t,{$X:()=>S,ES:()=>g,O:()=>m,TN:()=>h,b4:()=>w,h1:()=>d,oL:()=>v,p:()=>x,uD:()=>y});var n=r(90254),o=r(71381),i=r(82123),a=r(72161);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function f(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){f(i,n,o,a,u,"next",e)}function u(e){f(i,n,o,a,u,"throw",e)}a(void 0)}))}}function d(e,t){var r=e.get("tags");return void 0!==r?r[t]:e.get(t)}function h(e,t,r){var n;return null!==(n=d(e,t))&&void 0!==n?n:d(e,r)}var y={fr:{F1R2:"LR",F2R1:"LR",F1F2:"LL",F2F1:"LL",R1R2:"RR",R2R1:"RR",R1F2:"RL",R2F1:"RL"},rf:{R1F2:"LR",R2F1:"LR",R1R2:"LL",R2R1:"LL",F1F2:"RR",F2F1:"RR",F1R2:"RL",F2R1:"RL"},ff:{F2F1:"LR",R1R2:"LR",F2R1:"LL",R1F2:"LL",R2F1:"RR",F1R2:"RR",R2R1:"RL",F1F2:"RL"}},v={LR:"color_pair_lr",LL:"color_pair_ll",RR:"color_pair_rr",RL:"color_pair_rl"};function m(e,t){return b.apply(this,arguments)}function b(){return(b=p(s().mark((function e(t,r){var i,a,u,c,f,p;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.start,u=t.end,c=t.originalRefName,f=t.refName,e.next=3,(0,o.z)(r.getFeatures(l(l({},t),{},{refName:c||f,end:u+1,start:Math.max(0,a-1)})).pipe((0,n.q)()));case 3:return p=e.sent,e.abrupt("return",null===(i=p[0])||void 0===i?void 0:i.get("seq"));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return"methylation"===e}var w={m:"rgb(255,0,0)",h:"rgb(11, 132, 165)",o:"rgb(111, 78, 129)",f:"rgb(246, 200, 95)",c:"rgb(157, 216, 102)",g:"rgb(255, 160, 86)",e:"rgb(141, 221, 208)",b:"rgb(202, 71, 47)"};function S(e,t,r){(0,i.addDisposer)(e,(0,a.autorun)(p(s().mark((function r(){return s().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,t();case 3:r.next=8;break;case 5:r.prev=5,r.t0=r.catch(0),(0,i.isAlive)(e)&&e.setError(r.t0);case 8:case"end":return r.stop()}}),r,null,[[0,5]])}))),r))}function x(){return"hsl(".concat(200*Math.random(),", 50%, 50%)")}},45063:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(31416),o=r(20410),i=r(76743),a=r(42847),u=r(85915),c=r(19830),l=r(41589);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;r0&&void 0!==k[0]?k[0]:{},r=this.pluginManager,o=this.getConf("bedLocation"),e.next=5,(0,i.openLocation)(o,r).readFile(t);case 5:if(!g(a=e.sent)){e.next=12;break}return e.next=9,(0,l.unzip)(a);case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=a;case 13:if(!((u=e.t0).length>536870888)){e.next=16;break}throw new Error("Data exceeds maximum string length (512MB)");case 16:for(c=new TextDecoder("utf8",{fatal:!0}).decode(u),s=c.split(/\n|\r\n|\r/).filter((function(e){return!!e})),f=[],p=0;p0&&void 0!==n[0]?n[0]:{},this.bedFeatures||(this.bedFeatures=this.loadDataP(t).catch((function(e){throw r.bedFeatures=void 0,e}))),e.abrupt("return",this.bedFeatures);case 3:case"end":return e.stop()}}),e,this)}))),function(){return x.apply(this,arguments)})},{key:"getRefNames",value:(S=y(d().mark((function e(){var t,r,n,o=arguments;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.features,e.abrupt("return",Object.keys(n));case 6:case"end":return e.stop()}}),e,this)}))),function(){return S.apply(this,arguments)})},{key:"getHeader",value:(w=y(d().mark((function e(){var t,r,n,o=arguments;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.header,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"getNames",value:(h=y(d().mark((function e(){var t,r,n,o,i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:if(t=e.sent,r=t.header,!(n=t.columnNames).length){e.next=7;break}return e.abrupt("return",n);case 7:return o=r.split(/\n|\r\n|\r/).filter((function(e){return!!e})),i=o.at(-1),e.abrupt("return",(null==i?void 0:i.includes("\t"))?i.slice(1).split("\t").map((function(e){return e.trim()})):void 0);case 10:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"loadFeatureIntervalTreeHelper",value:(p=y(d().mark((function e(t){var r,n,o,i,a,l,s,p,h,y,v,m,b,g,w=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:if(r=e.sent,n=r.colRef,o=r.colStart,i=r.colEnd,a=r.features,l=r.parser,s=r.scoreColumn,p=a[t]){e.next=12;break}return e.abrupt("return",void 0);case 12:return e.next=14,this.getNames();case 14:h=e.sent,y=new c.ZP,v=p.map((function(e,r){var a="".concat(w.id,"-").concat(t,"-").concat(r);return(0,u.P)(e,n,o,i,s,l,a,h)})),m=f(v);try{for(m.s();!(b=m.n()).done;)g=b.value,y.insert([g.get("start"),g.get("end")],g)}catch(e){m.e(e)}finally{m.f()}return e.abrupt("return",y);case 20:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"loadFeatureIntervalTree",value:(o=y(d().mark((function e(t){var r=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.intervalTrees[t]||(this.intervalTrees[t]=this.loadFeatureIntervalTreeHelper(t).catch((function(e){throw r.intervalTrees[t]=void 0,e}))),e.abrupt("return",this.intervalTrees[t]);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.ObservableCreate)(function(){var r=y(d().mark((function r(n){var o,i,a,u;return d().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e.start,i=e.end,a=e.refName,r.next=3,t.loadFeatureIntervalTree(a);case 3:null==(u=r.sent)||u.search([o,i]).forEach((function(e){return n.next(e)})),n.complete();case 6:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],r&&v(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(o.BaseFeatureDataAdapter);w.capabilities=["getFeatures","getRefNames"];const S=w},12139:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(31416),o=r(20410),i=r(76743),a=r(42847),u=r(63627),c=r(85915);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(){s=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function f(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){f(i,n,o,a,u,"next",e)}function u(e){f(i,n,o,a,u,"throw",e)}a(void 0)}))}}function d(e,t){for(var r=0;r0&&void 0!==r[0]?r[0]:{},e.abrupt("return",this.bed.getReferenceSequenceNames(t));case 2:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"getHeader",value:(f=p(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.bed.getHeader());case 1:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"getNames",value:(o=p(s().mark((function e(){var t,r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.columnNames.length){e.next=2;break}return e.abrupt("return",this.columnNames);case 2:return e.next=4,this.bed.getHeader();case 4:return t=e.sent,r=t.split(/\n|\r\n|\r/).filter((function(e){return!!e})),n=r.at(-1),e.abrupt("return",(null==n?void 0:n.includes("\t"))?n.slice(1).split("\t").map((function(e){return e.trim()})):void 0);case 8:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.ObservableCreate)(function(){var n=p(s().mark((function n(o){var i,a,u,l,f,p;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.bed.getMetadata();case 2:return i=n.sent,a=i.columnNumbers,u=a.ref-1,l=a.start-1,f=a.end-1,n.next=9,t.getNames();case 9:return p=n.sent,n.next=12,t.bed.getLines(e.refName,e.start,e.end,{lineCallback:function(e,r){o.next((0,c.P)(e,u,l,f,t.scoreColumn,t.parser,"".concat(t.id,"-").concat(r),p))},signal:r.signal});case 12:o.complete();case 13:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],r&&d(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),w}(o.BaseFeatureDataAdapter);v.capabilities=["getFeatures","getRefNames"];const m=v},83450:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>k,featureData:()=>E});var n=r(20410),o=r(76743),i=r(42847),a=r(35743),u=r(19830),c=r(41589);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function f(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function y(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,u,"next",e)}function u(e){y(i,n,o,a,u,"throw",e)}a(void 0)}))}}function m(e,t){for(var r=0;r0&&void 0!==S[0]?S[0]:{},r=this.pluginManager,n=this.getConf("bedpeLocation"),e.next=5,(0,o.openLocation)(n,r).readFile(t);case 5:if(!O(i=e.sent)){e.next=12;break}return e.next=9,(0,c.unzip)(i);case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=i;case 13:if(!((a=e.t0).length>536870888)){e.next=16;break}throw new Error("Data exceeds maximum string length (512MB)");case 16:for(u=new TextDecoder("utf8",{fatal:!0}).decode(a),l=u.split(/\n|\r\n|\r/).filter((function(e){return!!e})),s=[],f=0;f0&&void 0!==n[0]?n[0]:{},this.bedpeFeatures||(this.bedpeFeatures=this.loadDataP(t).catch((function(e){throw r.bedpeFeatures=void 0,e}))),e.abrupt("return",this.bedpeFeatures);case 3:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"getRefNames",value:(y=v(h().mark((function e(){var t,r,n,o,i=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.feats1,o=r.feats2,e.abrupt("return",f(new Set([].concat(f(Object.keys(n)),f(Object.keys(o))))));case 7:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"getHeader",value:(d=v(h().mark((function e(){var t,r,n,o=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.header,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getNames",value:(p=v(h().mark((function e(){var t,r,n,o,i;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:if(t=e.sent,r=t.header,!(n=t.columnNames).length){e.next=7;break}return e.abrupt("return",n);case 7:return o=r.split(/\n|\r\n|\r/).filter((function(e){return!!e})),i=o.at(-1),e.abrupt("return",(null==i?void 0:i.includes("\t"))?i.slice(1).split("\t").map((function(e){return e.trim()})):void 0);case 10:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"loadFeatureTreeP",value:(a=v(h().mark((function e(t){var r,n,o,i,a,c,l,f,p,d,y,v,m,b,g,w=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:return r=e.sent,n=r.feats1,o=r.feats2,i=n[t],a=o[t],e.next=9,this.getNames();case 9:if(c=e.sent,l=new u.ZP,f=null==i?void 0:i.map((function(e,r){return E(e,"".concat(w.id,"-").concat(t,"-").concat(r),!1,c)})),p=null==a?void 0:a.map((function(e,r){return E(e,"".concat(w.id,"-").concat(t,"-").concat(r),!0,c)})),f){d=s(f);try{for(d.s();!(y=d.n()).done;)v=y.value,l.insert([v.get("start"),v.get("end")],v)}catch(e){d.e(e)}finally{d.f()}}if(p){m=s(p);try{for(m.s();!(b=m.n()).done;)g=b.value,l.insert([g.get("start"),g.get("end")],g)}catch(e){m.e(e)}finally{m.f()}}return e.abrupt("return",l);case 16:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"loadFeatureTree",value:(n=v(h().mark((function e(t){var r=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.intervalTrees[t]||(this.intervalTrees[t]=this.loadFeatureTreeP(t).catch((function(e){throw r.intervalTrees[t]=void 0,e}))),e.abrupt("return",this.intervalTrees[t]);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var r=v(h().mark((function r(n){var o,i,a,u;return h().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e.start,i=e.end,a=e.refName,r.next=3,t.loadFeatureTree(a);case 3:null==(u=r.sent)||u.search([o,i]).forEach((function(e){return n.next(e)})),n.complete();case 6:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],r&&m(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(n.BaseFeatureDataAdapter);P.capabilities=["getFeatures","getRefNames"];const k=P},6821:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>P});var n=r(2744),o=r(31416),i=r(20410),a=r(76743),u=r(42847),c=r(20349),l=r(80454),s=r(6994),f=r(85915);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}var d=["fields"],h=["chromStart","chromEnd","chrom"];function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",y="executing",v="completed",m={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==p(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=d;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?v:h,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function g(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){g(i,n,o,a,u,"next",e)}function u(e){g(i,n,o,a,u,"throw",e)}a(void 0)}))}}function S(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.refName,o=e.start,i=e.end,a=r.signal;return(0,u.ObservableCreate)(function(){var e=w(b().mark((function e(u){var p,d,y;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.configure(r);case 3:return p=e.sent,d=p.parser,y=p.bigbed,e.next=8,y.getFeatureStream(n,o,i,{signal:a,basesPerSpan:i-o});case 8:e.sent.pipe((0,l.J)(),(0,s.U)((function(e){var r=d.parseLine("".concat(n,"\t").concat(e.start,"\t").concat(e.end,"\t").concat(e.rest),{uniqueId:e.uniqueId}),o=r.blockCount,i=r.blockSizes,a=r.blockStarts,u=r.chromStarts;if(o){var l=u||a||[],s=i,p=e.start;r.subfeatures=[];for(var y=0;y{"use strict";r.d(t,{P:()=>c,d:()=>u});var n=r(35743);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=i){var u=e.get("strand")>0?"five":"three";a.push({type:"".concat(u,"_prime_UTR"),start:n,end:i})}else if(r>n&&r=i){var c=e.get("strand")>0?"five":"three";a.push({type:"".concat(c,"_prime_UTR"),start:n,end:r},{type:"CDS",start:r,end:i})}else if(r<=n&&o>=i)a.push({type:"CDS",start:n,end:i});else if(r>n&&r0?"five":"three",s=e.get("strand")>0?"three":"five";a.push({type:"".concat(l,"_prime_UTR"),start:n,end:r},{type:"CDS",start:r,end:o},{type:"".concat(s,"_prime_UTR"),start:o,end:i})}else if(r<=n&&o>n&&o0?"three":"five";a.push({type:"CDS",start:n,end:o},{type:"".concat(f,"_prime_UTR"),start:o,end:i})}else if(o<=n){var p=e.get("strand")>0?"three":"five";a.push({type:"".concat(p,"_prime_UTR"),start:n,end:i})}}));var u=Object.fromEntries(e.tags().map((function(t){return[t,e.get(t)]})));return u.subfeatures=a,u.type="mRNA",u.uniqueId=e.id(),delete u.chromStarts,delete u.chromStart,delete u.chromEnd,delete u.chrom,delete u.blockStarts,delete u.blockSizes,delete u.blockCount,delete u.thickStart,delete u.thickEnd,new n.SimpleFeature({data:u,id:e.id()})}function c(e,t,r,o,i,c,l,s){var f=e.split("\t"),p=f[t],d=+f[r],h=r===o?1:0,y=+f[o]+h,v=s?function(e,t){return Object.fromEntries(t.split("\t").map((function(t,r){return[e[r],t]})))}(s,e):c.parseLine(e,{uniqueId:l}),m=v.blockCount,b=v.blockSizes,g=v.blockStarts,w=v.chromStarts;if(m){var S=w||g||[],x=b,O=d;v.subfeatures=[];for(var E=0;E{"use strict";r.r(t),r.d(t,{default:()=>N});var n=r(63313),o=r.n(n),i=r(40828),a=r(60285),u=r(35743),c=r(76835),l=r(23054),s=r(74141),f=r(34506),p=r.n(f),d=r(53869),h=r(88213),y=r(36653),v=r(23376),m=r(95921),b=r(62237),g=r(29240),w=r(26796),S=r(73610),x=r(99123);function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(63313),o=r.n(n),i=r(96731),a=r(97648),u=r(35127),c=r(51537),l=r(34179),s=r(27558),f=r(5932),p=r(84446),d=r(93720),h=r(60285),y=r(35743);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(){m=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==v(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function b(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Z:()=>v});var n=r(63313),o=r.n(n),i=r(40828),a=r(35743),u=r(26888),c=r(86127);function l(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rMath.PI?"1":"0";return["M"].concat(l(i),["A",t,t,"0",u,"1"],l(a)).join(" ")}var d=(0,i.observer)((function(e){var t=e.model,r=e.slice,n=e.region,i=(0,c.Z)(),u=t.radiusPx+1,s=r.endRadians,f=r.startRadians,p=(0,a.polarToCartesian)(u,f),d=(0,a.polarToCartesian)(u,s),y=(s-f)*u,v=s-f>Math.PI?"1":"0",m=(s+f)/2,b="[".concat(Number(n.regions.length).toLocaleString(),"]");return o().createElement(o().Fragment,null,o().createElement(h,{text:b,view:t,maxWidthPx:y,radians:m,radiusPx:u,title:"".concat(b," more regions"),color:i.palette.text.primary}),o().createElement("path",{d:["M"].concat(l(p),["A",u,u,"0",v,"1"],l(d)).join(" "),stroke:i.palette.text.secondary,strokeWidth:2,strokeDasharray:"2,2",fill:"none"}))})),h=(0,i.observer)((function(e){var t=e.view,r=e.text,n=e.maxWidthPx,i=e.radians,u=e.radiusPx,c=e.title,l=e.color,s=f().classes,p=(0,a.polarToCartesian)(u+5,i);return r?6.5*r.length4?(0,a.radToDeg)(i+t.offsetRadians-Math.PI/2)>=180?o().createElement("text",{x:0,y:0,className:s.rulerLabel,textAnchor:"start",dominantBaseline:"middle",transform:"translate(".concat(p,") rotate(").concat((0,a.radToDeg)(i),")"),style:{fill:l}},r,o().createElement("title",null,c||r)):o().createElement("text",{x:0,y:0,className:s.rulerLabel,textAnchor:"end",dominantBaseline:"middle",transform:"translate(".concat(p,") rotate(").concat((0,a.radToDeg)(i)+180,")"),style:{fill:l}},r,o().createElement("title",null,c||r)):null:null})),y=(0,i.observer)((function(e){var t,r=e.model,n=e.slice,i=e.region,l=(0,c.Z)(),s=r.radiusPx,f=n.endRadians,d=n.startRadians,y=(f+d)/2,v=(f-d)*s,m=(0,a.getSession)(r).assemblyManager.get(i.assemblyName);if(m&&(t=m.getRefNameColor(i.refName)),t)try{t=(0,u.makeContrasting)(t,l.palette.background.paper)}catch(e){t=l.palette.text.primary}else t=l.palette.text.primary;return o().createElement(o().Fragment,null,o().createElement(h,{text:i.refName,view:r,maxWidthPx:v,radians:y,radiusPx:s,color:t}),o().createElement("path",{d:p(n,s+1,i.start,i.end),stroke:t,strokeWidth:2,fill:"none"}))}));const v=(0,i.observer)((function(e){var t=e.model,r=e.slice;return r.region.elided?o().createElement(d,{key:(0,a.assembleLocString)(r.region.regions[0]),model:t,region:r.region,slice:r}):o().createElement(y,{key:(0,a.assembleLocString)(r.region),region:r.region,model:t,slice:r})}))},63073:(e,t,r)=>{"use strict";r.r(t),r.d(t,{renderToSvg:()=>g});var n=r(63313),o=r.n(n),i=r(84396),a=r(43695),u=r(72161),c=r(35743),l=r(60285),s=r(86127);function f(e){var t=e.width,r=e.height,n=e.shift,i=(0,s.Z)();return o().createElement("rect",{width:t+2*n,height:r,fill:(0,c.stripAlpha)(i.palette.background.default)})}var p=r(23054);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(){h=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==d(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=p;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>ze});var n=r(63313),o=r.n(n),i=r(2415),a=r(82373),u=r(70243),c=r(97648),l=r(37894),s=r(52655),f=r(76835),p=r(40828),d=r(82123),h=r(34638),y=r(66963),v=r(35743),m=r(60285),b=r(8043),g=r(51537),w=r(70774),S=r(34179),x=r(82015),O=r(74141),E=r(16363),j=r(10673),P=r(95414),k=r(84407),A=r(22546),_=r(93720),C=r(69058),L=r(75578);function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Z:()=>d});var n=r(63313),o=r.n(n),i=r(10673),a=r(51537),u=r(76835),c=r(40828);function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>b});var n=r(20410),o=r(20349),i=r(42847),a=r(2415);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=f(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function s(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rn&&f.get("start"){"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(20410),o=r(2415),i=r(69330);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=d.get("start")&&s.start<=d.get("end")?s.end=d.get("end"):(s&&t.push(s),s={refName:i,start:d.get("start"),end:d.get("end")})}catch(e){f.e(e)}finally{f.f()}s&&t.push(s)}}catch(e){r.e(e)}finally{r.f()}return t.sort((function(e,t){return e.refName.localeCompare(t.refName)})),e.abrupt("return",t);case 5:case"end":return e.stop()}var u,h}),e,this)})),s=function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){f(i,r,o,a,u,"next",e)}function u(e){f(i,r,o,a,u,"throw",e)}a(void 0)}))},function(){return s.apply(this,arguments)})},{key:"freeResources",value:function(){}}],r&&p(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(n.BaseAdapter)},98798:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var n=r(20349),o=r(42847),i=r(90254),a=r(69330),u=r(71381);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t=d.get("start")&&u.start<=d.get("end")?u.end=d.get("end"):(u&&t.push(u),u={refName:i,start:d.get("start"),end:d.get("end")})}catch(e){c.e(e)}finally{c.f()}u&&t.push(u)}}catch(e){r.e(e)}finally{r.f()}return e.abrupt("return",t);case 4:case"end":return e.stop()}var p,h}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"freeResources",value:function(){}}],r&&m(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),b}(a.default)},8720:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(20410),o=r(76743);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{wP:()=>O,ZP:()=>E});var n=r(63313),o=r.n(n),i=r(95217),a=r(53136),u=r(2415);const c=(0,u.ConfigurationSchema)("FromConfigAdapter",{features:{type:"frozen",defaultValue:[]}},{explicitlyTyped:!0,implicitIdentifier:"adapterId"}),l=(0,u.ConfigurationSchema)("FromConfigRegionsAdapter",{features:{type:"frozen",defaultValue:[]}},{explicitlyTyped:!0,implicitIdentifier:"adapterId"}),s=(0,u.ConfigurationSchema)("FromConfigSequenceAdapter",{features:{type:"frozen",defaultValue:[]}},{explicitlyTyped:!0,implicitIdentifier:"adapterId"}),f=(0,u.ConfigurationSchema)("RefNameAliasAdapter",{location:{type:"fileLocation",defaultValue:{uri:"/path/to/my/aliases.txt",locationType:"UriLocation"}},refNameColumn:{type:"number",defaultValue:0}},{explicitlyTyped:!0});var p=r(82123),d=r(66769);const h=function(e){return p.types.model("ConfigurationEditorWidget",{id:d.ElementId,type:p.types.literal("ConfigurationEditorWidget"),target:p.types.safeReference(e.pluggableConfigSchemaType("track"))}).actions((function(e){return{setTarget:function(t){e.target=t}}}))};var y=(0,r(40828).observer)((function(e){var t=e.model;if(null==t?void 0:t.target){if(t.target.type)return o().createElement(o().Fragment,null,"".concat(t.target.type," settings"));if((0,p.isStateTreeNode)(t.target)){var r=(0,p.getType)(t.target);if(null==r?void 0:r.name)return o().createElement(o().Fragment,null,"".concat(r.name.replace("ConfigurationSchema","")," settings"))}}return o().createElement(o().Fragment,null,"Settings")}));const v=y;var m=(0,u.ConfigurationSchema)("ConfigurationEditorWidget",{}),b=(0,n.lazy)((function(){return Promise.resolve().then(r.bind(r,32971))}));function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function w(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>P});var n=r(63313),o=r.n(n),i=r(43279),a=r(79282),u=r(89498),c=r(86350),l=r(93720),s=r(35743),f=r(76835),p=r(40828),d=r(98684),h=r(60285);const y=(0,p.observer)((function(e){var t=e.connectionType,r=e.model,i=e.session,a=t.configEditorComponent||d.wP;return o().createElement(n.Suspense,{fallback:o().createElement(h.LoadingEllipses,null)},o().createElement(a,{model:{target:r},session:i}))}));var v=r(51537),m=r(74141),b=r(34179),g=r(35732);const w=(0,p.observer)((function(e){var t=e.connectionTypeChoices,r=e.connectionType,i=e.setConnectionType,a=t[0];return(0,n.useEffect)((function(){r||i(a)}),[r,a,i]),o().createElement("form",{autoComplete:"off"},r?o().createElement(v.Z,{value:r.name,label:"connectionType",helperText:r.description?o().createElement(o().Fragment,null,r.description,r.url?o().createElement(m.Z,{href:r.url,rel:"noopener noreferrer",target:"_blank"},o().createElement(g.Z,null)):null):null,select:!0,fullWidth:!0,onChange:function(e){return i(t.find((function(t){return t.name===e.target.value})))},variant:"outlined"},t.map((function(e){return o().createElement(b.Z,{key:e.name,value:e.name},e.displayName||e.name)}))):null)}));var S=r(36403);function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>ge});var n=r(63313),o=r.n(n),i=r(40828),a=r(98695),u=r(97796),c=r(34179),l=r(69058),s=r(35743),f=r(97648),p=r(43279),d=r(79282),h=r(89498),y=r(86350),v=r(93720),m=r(18130),b=r(76835),g=r(82123),w=r(2415),S=r(67016),x=r(51537),O=r(27558),E=r(5932),j=r(61169),P=r(60285),k=r(82015),A=r(10673),_=r(88696),C=r(16173),L=r(95414),T=r(84407),I=r(22546),R=r(74141),M=r(75578),N=r(11036);function F(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Z(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||Z(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){if(e){if("string"==typeof e)return B(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>F});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(84446),c=r(93720),l=r(60285),s=r(11036),f=r(93534),p=r(82015),d=r(42833),h=r(43116),y=r(45475),v=r(63814),m=r(40087),b=r(74141),g=r(2415),w=r(66892),S=r(75578);const x=(0,i.observer)((function(e){var t=e.rootModel,r=e.setIsAssemblyBeingEdited,n=e.setAssemblyBeingEdited,i=t.jbrowse.assemblies;return o().createElement(f.Z,{component:p.Z},o().createElement(d.Z,null,o().createElement(h.Z,null,o().createElement(y.Z,null,o().createElement(v.Z,null,"Name"),o().createElement(v.Z,null,"Display name"),o().createElement(v.Z,null,"Aliases"),o().createElement(v.Z,null,"Actions"))),o().createElement(m.Z,null,i.map((function(e){var i=(0,g.readConfObject)(e,"name"),a=(0,g.readConfObject)(e,"displayName"),u=(0,g.readConfObject)(e,"aliases");return o().createElement(y.Z,{key:i},o().createElement(v.Z,null,i),o().createElement(v.Z,null,a),o().createElement(v.Z,null,u?u.toString():""),o().createElement(v.Z,null,o().createElement(b.Z,{"data-testid":"".concat(i,"-edit"),onClick:function(){r(!0),n(e)}},o().createElement(w.Z,{color:"primary"})),o().createElement(b.Z,{"data-testid":"".concat(i,"-delete"),onClick:function(){return function(e){t.jbrowse.removeAssemblyConf(e)}(i)}},o().createElement(S.Z,{color:"error"}))))})))))}));var O=r(51537),E=r(34179),j=r(69750);function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>St});var n=r(63313),o=r.n(n),i=r(40828);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var u,c=["children","defaultHeight","defaultWidth","disableHeight","disableWidth","nonce","onResize","style","tagName"];function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=r.head||r.getElementsByTagName("head")[0],a=r.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(r.createTextNode(n)),i.appendChild(a)}}(f),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=f.createElement("div")).className="resize-triggers";var d=f.createElement("div");d.className="expand-trigger",d.appendChild(f.createElement("div"));var h=f.createElement("div");h.className="contract-trigger",i.__resizeTriggers__.appendChild(d),i.__resizeTriggers__.appendChild(h),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",c,!0),n&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===r&&a(i)},i.__resizeTriggers__.addEventListener(n,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(s)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",c,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(n,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}(t),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}},{key:"componentWillUnmount",value:function(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.defaultHeight,e.defaultWidth,e.disableHeight),o=void 0!==r&&r,i=e.disableWidth,a=void 0!==i&&i,u=(e.nonce,e.onResize,e.style),l=void 0===u?{}:u,f=e.tagName,p=void 0===f?"div":f,d=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,c),h=this.state,y=h.height,v=h.scaledHeight,m=h.scaledWidth,b=h.width,g={overflow:"visible"},w={},S=!1;return o||(0===y&&(S=!0),g.height=0,w.height=y,w.scaledHeight=v),a||(0===b&&(S=!0),g.width=0,w.width=b,w.scaledWidth=m),(0,n.createElement)(p,s({ref:this._setRef,style:s(s({},g),l)},d),!S&&t(w))}}])&&f(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(n.Component),O=r(49775),E=r(38018),j=r(34179),P=r(76835),k=r(35743),A=r(11036);function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0}:function(){return!0},O=function e(t){for(;null!==b;){if(!x(t))return void requestIdleCallback(e,d);if(b.visited)b.visited=!1,b=null!==b.sibling?b.sibling:b.parent,w=b;else{var o=y.next(h.get(b)).value;if(void 0===o){g?g=!1:(b.isShown&&f.push(b.public.data.id),b.visited=null!==b.child,b=null!==b.child?b.child:null!==b.sibling?b.sibling:b.parent),w=b;continue}var i=n(o.data,r,g?void 0:b,l?s.get(o.data.id):void 0);p.set(i.public.data.id,i),h.set(i,o),g||w!==b?w.sibling=i:w.child=i,w=i}}S&&r.setState({order:f,records:p,updateRequest:{}})};return S?requestIdleCallback(O,d):O(),void 0!==i&&u&&r.order?r:{order:f,records:p}}(e,t,r):function(e,t){var r=e.order,n=e.records,o=t.opennessState;if("object"!==D(o))return null;for(var i in o)if(n.has(i)){var a=o[i],u=n.get(i),c="boolean"==typeof a?{open:a}:a,l=c.open,s=c.subtreeCallback,f=void 0===s?M:s,p=M,d=M;u.isShown&&(l?function(){for(var e=r.indexOf(i),t=u;null!==t;){if(null!==t.sibling){t=t.sibling;break}t=t.parent}var n=null===t?r.length-1-e:r.indexOf(t.public.data.id)-1-e,o=[[e+1,n]];p=function(t){if(t.isShown=!t.parent||t.parent.public.isOpen&&t.parent.isShown,t.isShown){var r=o[o.length-1];r.push(t.public.data.id),32770===r.length&&o.push([e+1+32768*o.length,0])}},d=function(){for(var e=0;e0?K="positive-descending":(t.scrollLeft=1,K=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),K}return K}var X=function(e,t){return e};function ee(e){var t,r=e.getItemOffset,o=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,u=e.getStartIndexForOffset,c=e.getStopIndexForStartIndex,l=e.initInstanceProps,s=e.shouldResetStyleCacheOnItemSizeChange,f=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=l(n.props,(0,I.Z)(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:(0,I.Z)(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=V((function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})})),n._callOnScroll=void 0,n._callOnScroll=V((function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,o=n.props,a=o.direction,u=o.itemSize,c=o.layout,l=n._getItemStyleCache(s&&u,s&&c,s&&a);if(l.hasOwnProperty(e))t=l[e];else{var f=r(n.props,e,n._instanceProps),p=i(n.props,e,n._instanceProps),d="horizontal"===a||"horizontal"===c,h="rtl"===a,y=d?f:0;l[e]=t={position:"absolute",left:h?void 0:y,right:h?y:void 0,top:d?0:f,height:d?"100%":p,width:d?p:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=V((function(e,t,r){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===o)return null;var t=n.props.direction,a=o;if("rtl"===t)switch(J()){case"negative":a=-o;break;case"positive-descending":a=i-r-o}return a=Math.max(0,Math.min(a,i-r)),{isScrolling:!0,scrollDirection:e.scrollOffset=t?e.call(null):o.id=requestAnimationFrame(n)}))})},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}(0,R.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return te(e,t),f(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffsetc.clientWidth?Y():0:c.scrollHeight>c.clientHeight?Y():0}this.scrollTo(a(this.props,e,t,i,this._instanceProps,u))},p.componentDidMount=function(){var e=this.props,t=e.direction,r=e.initialScrollOffset,n=e.layout;if("number"==typeof r&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===n?o.scrollLeft=r:o.scrollTop=r}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,r=e.layout,n=this.state,o=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===r)if("rtl"===t)switch(J()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,u=i.scrollWidth;i.scrollLeft=u-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Q(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,r=e.className,i=e.direction,a=e.height,u=e.innerRef,c=e.innerElementType,l=e.innerTagName,s=e.itemCount,f=e.itemData,p=e.itemKey,d=void 0===p?X:p,h=e.layout,y=e.outerElementType,v=e.outerTagName,m=e.style,b=e.useIsScrolling,g=e.width,w=this.state.isScrolling,S="horizontal"===i||"horizontal"===h,x=S?this._onScrollHorizontal:this._onScrollVertical,O=this._getRangeToRender(),E=O[0],j=O[1],P=[];if(s>0)for(var k=E;k<=j;k++)P.push((0,n.createElement)(t,{data:f,key:d(k,f),index:k,isScrolling:b?w:void 0,style:this._getItemStyle(k)}));var A=o(this.props,this._instanceProps);return(0,n.createElement)(y||v||"div",{className:r,onScroll:x,ref:this._outerRefSetter,style:(0,T.Z)({position:"relative",height:a,width:g,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},m)},(0,n.createElement)(c||l||"div",{children:P,ref:u,style:{height:S?"100%":A,pointerEvents:w?"none":void 0,width:S?A:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],r=e[1],n=e[2],o=e[3];this._callOnItemsRendered(t,r,n,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,u=i.scrollOffset,c=i.scrollUpdateWasRequested;this._callOnScroll(a,u,c)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,r=e.overscanCount,n=this.state,o=n.isScrolling,i=n.scrollDirection,a=n.scrollOffset;if(0===t)return[0,0,0,0];var l=u(this.props,a,this._instanceProps),s=c(this.props,l,a,this._instanceProps),f=o&&"backward"!==i?1:Math.max(1,r),p=o&&"forward"!==i?1:Math.max(1,r);return[Math.max(0,l-f),Math.max(0,Math.min(t-1,s+p)),l,s]},t}(n.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var te=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},re=function(e,t,r){var n=e.itemSize,o=r.itemMetadataMap,i=r.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var u=o[i];a=u.offset+u.size}for(var c=i+1;c<=t;c++){var l=n(c);o[c]={offset:a,size:l},a+=l}r.lastMeasuredIndex=t}return o[t]},ne=function(e,t,r,n,o){for(;n<=r;){var i=n+Math.floor((r-n)/2),a=re(e,i,t).offset;if(a===o)return i;ao&&(r=i-1)}return n>0?n-1:0},oe=function(e,t){var r=e.itemCount,n=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=r&&(i=r-1),i>=0){var u=n[i];a=u.offset+u.size}return a+(r-i-1)*o},ie=ee({getItemOffset:function(e,t,r){return re(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:oe,getOffsetForIndexAndAlignment:function(e,t,r,n,o,i){var a=e.direction,u=e.height,c=e.layout,l=e.width,s="horizontal"===a||"horizontal"===c?l:u,f=re(e,t,o),p=oe(e,o),d=Math.max(0,Math.min(p-s,f.offset)),h=Math.max(0,f.offset-s+f.size+i);switch("smart"===r&&(r=n>=h-s&&n<=d+s?"auto":"center"),r){case"start":return d;case"end":return h;case"center":return Math.round(h+(d-h)/2);default:return n>=h&&n<=d?n:n0?n[o].offset:0)>=r?ne(e,t,o,0,r):function(e,t,r,n){for(var o=e.itemCount,i=1;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:new Map;e.id&&e.children.length&&t.set(e.id,e);var r,n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ye(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ye(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.children);try{for(n.s();!(r=n.n()).done;)me(r.value,t)}catch(e){n.e(e)}finally{n.f()}return t}function be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.endsWith("(Unsupported)")||e.endsWith("(Unknown)")}function ge(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=we(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function we(e,t){if(e){if("string"==typeof e)return Se(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Se(e,t):void 0}}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ze(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ge(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ge(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?u({connectionConf:e,safelyBreakConnection:c,dereferenceTypeCount:l,name:o}):c()}t&&s({name:o,connectionConf:e})}return o().createElement(o().Fragment,null,o().createElement(Le(),{menuItems:[].concat(Je((0,k.isSessionWithAddTracks)(r)?[{label:"Add track...",onClick:function(){(0,k.isSessionModelWithWidgets)(r)&&r.showWidget(r.addWidget("AddTrackWidget","addTrackWidget",{view:t.view.id}))}}]:[]),Je((0,k.isSessionModelWithConnections)(r)?[{label:"Turn on/off connections...",onClick:function(){return d(!0)}}]:[]),Je((0,k.isSessionModelWithConnectionEditing)(r)?[{label:"Add connection...",onClick:function(){(0,k.isSessionModelWithWidgets)(r)&&r.showWidget(r.addWidget("AddConnectionWidget","addConnectionWidget"))}},{label:"Delete connections...",onClick:function(){return v(!0)}}]:[]),[{type:"divider"},{label:"Sort tracks by name",type:"checkbox",checked:t.activeSortTrackNames,onClick:function(){return t.setSortTrackNames(!t.activeSortTrackNames)}},{label:"Sort categories by name",type:"checkbox",checked:t.activeSortCategories,onClick:function(){return t.setSortCategories(!t.activeSortCategories)}},{type:"divider"}],Je(t.hasAnySubcategories?[{label:"Collapse subcategories",onClick:function(){return t.collapseSubCategories()}}]:[]),[{label:"Collapse top-level categories",onClick:function(){return t.collapseTopLevelCategories()}},{label:"Expand all categories",onClick:function(){return t.expandAllCategories()}}])},o().createElement(Ke.Z,null)),o().createElement(n.Suspense,{fallback:o().createElement(o().Fragment,null)},a?o().createElement(rt,{modalInfo:a,onClose:function(){return u(void 0)}}):null,l?o().createElement(nt,{handleClose:function(){return s(void 0)},deleteDialogDetails:l,session:r}):null,y?o().createElement(ot,{handleClose:function(){return v(!1)},breakConnection:m,session:r}):null,p?o().createElement(it,{handleClose:function(){return d(!1)},session:r,breakConnection:m}):null))}));var ut=r(57708);function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Z:()=>w});var n=r(63313),o=r.n(n),i=r(74141),a=r(44806),u=r(76835),c=r(40828),l=r(34506),s=r.n(l),f=r(35743),p=r(33041);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(63313),o=r.n(n),i=r(35127),a=r(68438),u=r(95414),c=r(84407),l=r(84446),s=r(93720),f=r(60285);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(63313),o=r.n(n),i=r(35127),a=r(68438),u=r(84446),c=r(93720),l=r(60285);const s=(0,r(40828).observer)((function(e){var t=e.deleteDialogDetails,r=e.session,n=e.handleClose,s=t.connectionConf,f=t.name;return o().createElement(l.Dialog,{open:!0,title:'Delete connection "'.concat(f,'"')},o().createElement(i.Z,null,o().createElement(a.Z,null,"Are you sure you want to delete this connection?")),o().createElement(u.Z,null,o().createElement(c.Z,{onClick:function(){return n()},color:"primary"},"Cancel"),o().createElement(c.Z,{variant:"contained",color:"primary",onClick:function(){var e;s&&(null===(e=r.deleteConnection)||void 0===e||e.call(r,s)),n()}},"OK")))}))},83974:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(63313),o=r.n(n),i=r(35127),a=r(97648),u=r(74141),c=r(67929),l=r(84446),s=r(93720),f=r(60285),p=r(76835),d=r(40828),h=r(2415),y=r(89120),v=(0,p.makeStyles)()((function(e){return{connectionContainer:{margin:e.spacing(4),width:500}}}));const m=(0,d.observer)((function(e){var t=e.session,r=e.handleClose,n=e.breakConnection,p=v().classes,d=t.adminMode,m=t.connections,b=t.sessionConnections;return o().createElement(f.Dialog,{open:!0,onClose:r,maxWidth:"lg",title:"Delete connections"},o().createElement(i.Z,null,o().createElement(a.Z,null,"Click the X icon to delete the connection from your config completely"),o().createElement("div",{className:p.connectionContainer},m.map((function(e){var t=(0,h.readConfObject)(e,"name");return o().createElement(a.Z,{key:"conn-".concat(t)},d||(null==b?void 0:b.includes(e))?o().createElement(u.Z,{onClick:function(){return n(e,!0)}},o().createElement(y.default,{color:"error"})):o().createElement(c.Z,{title:"Unable to delete connection in config file as non-admin user"},o().createElement(u.Z,null,o().createElement(y.default,{color:"disabled"}))),t)})),m.length?null:o().createElement(a.Z,null,"No connections found"))),o().createElement(l.Z,null,o().createElement(s.Z,{onClick:function(){return r()},variant:"contained",color:"primary"},"Close")))}))},41701:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>b});var n=r(63313),o=r.n(n),i=r(27558),a=r(5932),u=r(97648),c=r(35127),l=r(84446),s=r(93720),f=r(60285),p=r(76835),d=r(40828),h=r(2415),y=(0,p.makeStyles)()((function(e){return{connectionContainer:{width:500,margin:e.spacing(4)}}})),v=(0,d.observer)((function(e){var t,r=e.conf,n=e.session,u=e.breakConnection,c=n.connectionInstances,l=void 0===c?[]:c,s=(0,h.readConfObject)(r,"name"),f=(0,h.readConfObject)(r,"assemblyNames"),p=l.find((function(e){return s===e.name}));return o().createElement(i.Z,{key:r.connectionId,control:o().createElement(a.Z,{checked:!!p,onChange:function(){var e;p?u(r):null===(e=n.makeConnection)||void 0===e||e.call(n,r)},color:"primary"}),label:[s,f.length?"(".concat((t=f.join(","),t.length>20?"".concat(t.slice(0,20),"..."):t),")"):""].filter((function(e){return!!e})).join(" ")})})),m=(0,d.observer)((function(e){var t=e.session,r=e.breakConnection,n=y().classes;return o().createElement("div",{className:n.connectionContainer},t.connections.length?t.connections.map((function(e,n){return o().createElement("div",{key:e.name+"_"+n},o().createElement(v,{conf:e,session:t,breakConnection:r}))})):o().createElement(u.Z,null,"No connections found"))}));const b=(0,d.observer)((function(e){var t=e.session,r=e.handleClose,n=e.breakConnection;return o().createElement(f.Dialog,{open:!0,onClose:r,maxWidth:"lg",title:"Turn on/off connections"},o().createElement(c.Z,null,o().createElement(u.Z,null,"Use the checkbox to turn on/off connections"),o().createElement(m,{session:t,breakConnection:n})),o().createElement(l.Z,null,o().createElement(s.Z,{onClick:function(){return r()},variant:"contained",color:"primary"},"Close")))}))},85588:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>pe});var n=r(63313),o=r.n(n),i=r(35127),a=r(60285),u=r(40828),c=r(74141),l=r(72161),s=r(82123),f=r(61266),p=r(3449),d=r(61169),h=r(21202),y=r.n(h),v=r(34506),m=r.n(v),b=r(14398),g=r.n(b),w=r(35743),S=r(2415),x=r(9462),O=r(76835),E=r(62784),j=r(7699),P=r(69750),k=r(51537),A=r(22546),_=r(59170),C=r(26796),L=r(57708);function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Q(e,t){if(e){if("string"==typeof e)return $(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$(e,t):void 0}}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r5}))}),[G,fe]),de=(0,n.useMemo)((function(){return X(new Set(fe.flatMap((function(e){return t=e.metadata,Object.entries(t).map((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return K(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0];return"string"==typeof n[1]?o:""})).filter((function(e){return!!e}));var t})))).filter((function(e){return!!G||fe.map((function(t){return t.metadata[e]})).filter((function(e){return!!e})).length>5}))}),[G,fe]),he=(0,n.useMemo)((function(){return["name"].concat(X(pe),X(de))}),[pe,de]),ye=ne((0,n.useState)(te(te({name:(0,w.measureGridWidth)(fe.map((function(e){return e.name})),{maxWidth:500,stripHTML:!0})+15},Object.fromEntries(pe.map((function(e){return[e,(0,w.measureGridWidth)(fe.map((function(t){return t[e]})),{maxWidth:400,stripHTML:!0})]})))),Object.fromEntries(de.map((function(e){return[e,(0,w.measureGridWidth)(fe.map((function(t){return t.metadata[e]})),{maxWidth:400,stripHTML:!0})]}))))),2),ve=ye[0],me=ye[1],be=ne((0,n.useState)(Object.fromEntries(he.map((function(e){return[e,!0]})))),2),ge=be[0],we=be[1];(0,n.useEffect)((function(){we((function(e){return te(te({},Object.fromEntries(he.map((function(e){return[e,!0]})))),e)}))}),[he]),(0,n.useEffect)((function(){me((function(e){return te(te({name:e.name},Object.fromEntries(pe.filter((function(e){return ge[e]})).map((function(e){return[e,(0,w.measureGridWidth)(fe.map((function(t){return t[e]})),{stripHTML:!0,maxWidth:400})]})))),Object.fromEntries(de.filter((function(e){return ge[e]})).map((function(e){return[e,(0,w.measureGridWidth)(fe.map((function(t){return t.metadata[e]})),{stripHTML:!0,maxWidth:400})]}))))}))}),[de,ge,pe,G,fe]);var Se=(0,w.useDebounce)(ve,200),xe=[{field:"name",hideable:!1,renderCell:function(e){var t=e.value,r=e.id,n=e.row;return o().createElement("div",{className:u.cell},o().createElement(y(),{html:t}),o().createElement(c.Z,{onClick:function(e){return F({target:e.currentTarget,id:r,conf:n.conf})}},o().createElement(E.Z,null)))},width:null!==(t=Se.name)&&void 0!==t?t:100}].concat(X(pe.map((function(e){var t;return{field:e,width:null!==(t=Se[e])&&void 0!==t?t:100,renderCell:function(e){var t=e.value;return o().createElement("div",{className:u.cell},t?o().createElement(y(),{html:t}):"")}}}))),X(de.map((function(e){var t;return{field:e,width:null!==(t=Se[e])&&void 0!==t?t:100,renderCell:function(e){var t=e.value;return o().createElement("div",{className:u.cell},t?o().createElement(y(),{html:t}):"")}}})))),Oe=new Set(oe.map((function(e){return e.configuration.trackId}))),Ee=Object.entries(le).filter((function(e){return e[1].length>0})).map((function(e){var t=ne(e,2),r=t[0],n=t[1];return[r,new Set(n)]})),je=fe.filter((function(e){return Ee.every((function(t){var r=ne(t,2),n=r[0];return r[1].has(e[n])}))}));return o().createElement(o().Fragment,null,N?o().createElement(m(),{anchorEl:null==N?void 0:N.target,menuItems:(null===(r=J.getTrackActionMenuItems)||void 0===r?void 0:r.call(J,N.conf))||[],onMenuItemClick:function(e,t){t(),F(void 0)},open:!!N,onClose:function(){return F(void 0)}}):null,o().createElement(I,{setShowSparse:U,setShowFilters:q,setShowOptions:R,setFilterText:C,setUseShoppingCart:B,showFilters:V,showSparse:G,showOptions:T,filterText:_,useShoppingCart:Z,model:i}),o().createElement("div",{ref:P,style:{display:"flex",overflow:"hidden",height:window.innerHeight*ce,width:window.innerWidth*ce}},o().createElement("div",{style:{height:window.innerHeight*ce,width:window.innerWidth*ce-(V?Q:0)}},o().createElement(g(),{checkbox:!0,widths:Object.values(ve).map((function(e){return null!=e?e:100})),setWidths:function(e){return me(Object.fromEntries(Object.entries(ve).map((function(t,r){return[t[0],e[r]]}))))},scrollLeft:k}),o().createElement(f._$,{rows:je,columnVisibilityModel:ge,onColumnVisibilityModelChange:function(e){return we(e)},columnHeaderHeight:35,checkboxSelection:!0,disableRowSelectionOnClick:!0,keepNonExistentRowsSelected:!0,onRowSelectionModelChange:function(e){if(Z){var t=(0,s.getRoot)(i),r=b.pluggableConfigSchemaType("track"),n=e.map((function(e){return(0,s.resolveIdentifier)(r,t,e)}));i.setSelection(n)}else{var o=Oe,a=new Set(e);(0,l.transaction)((function(){X(o).filter((function(e){return!a.has(e)})).map((function(e){return h.hideTrack(e)})),X(a).filter((function(e){return!o.has(e)})).map((function(e){return h.showTrack(e)}))}))}},rowSelectionModel:Z?v.map((function(e){return e.trackId})):X(Oe),slots:{toolbar:T?p.n:null},slotProps:{toolbar:{printOptions:{disableToolbarButton:!0}}},columns:xe,rowHeight:25})),V?o().createElement(o().Fragment,null,o().createElement(a.ResizeHandle,{vertical:!0,onDrag:function(e){return $(Q-e)},style:{marginLeft:5,background:"grey",width:5}}),o().createElement("div",{style:{width:Q,overflowY:"auto",overflowX:"hidden"}},o().createElement(Y,{width:Q-10,rows:fe,columns:xe,dispatch:se,filters:le}))):null))}));function se(e){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(e)}function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const pe=(0,u.observer)((function(e){var t=e.handleClose;return o().createElement(a.Dialog,{open:!0,onClose:t,maxWidth:"xl",title:"Faceted track selector"},o().createElement(i.Z,null,o().createElement(le,function(e){for(var t=1;t{"use strict";r.d(t,{Ak:()=>f,h6:()=>s,wB:()=>l,xO:()=>c,zL:()=>u});var n=r(2415),o=r(61169);function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e[0]===t[0])return!0;var r=new Set(e);return t.some((function(e){return r.has(e)}))}function c(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=new Set(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);return e.every((function(e){return t.has(e)}))}function l(e,t,r){var i=(0,n.readConfObject)(t,"category")||[],a=e.toLowerCase();return(0,o.getTrackName)(t,r).toLowerCase().includes(a)||!!i.filter((function(e){return e.toLowerCase().includes(a)})).length}function s(e,t){var r,n=!1,o=i(e);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.children.length?s(a.children,t)&&t.push(a.id):n=!0}}catch(e){o.e(e)}finally{o.f()}return n}function f(e,t){var r,n=i(e);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.children.length&&t.push(o.id)}}catch(e){n.e(e)}finally{n.f()}}},17420:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(63313),o=r.n(n),i=r(40828),a=r(60285),u=r(35127),c=r(68438),l=r(51537),s=r(24137),f=r(84446),p=r(93720),d=r(76835),h=r(35743),y=r(74141),v=r(66963);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(63313),o=r.n(n),i=r(35127),a=r(97648),u=r(84446),c=r(93720),l=r(60285);function s(e){var t=e.onClose,r=e.plugin;return o().createElement(l.Dialog,{open:!0,onClose:function(){return t()},title:"Remove ".concat(r)},o().createElement(i.Z,null,o().createElement(a.Z,null,"Please confirm that you want to remove ",r,"."),o().createElement(a.Z,{color:"error"},"Note: if any resources in this session still use this plugin, it may cause your session to crash")),o().createElement(u.Z,null,o().createElement(c.Z,{variant:"contained",color:"primary",onClick:function(){window.setTimeout((function(){t(r)}),500)}},"Confirm"),o().createElement(c.Z,{variant:"contained",color:"secondary",onClick:function(){t()}},"Cancel")))}},3761:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>Y});var n=r(63313),o=r.n(n),i=r(97648),a=r(93720),u=r(51537),c=r(22546),l=r(74141),s=r(82373),f=r(70243),p=r(76835),d=r(40828),h=r(82123),y=r(60285),v=r(35743),m=r(66963),b=r(59170),g=r(98659),w=r(95414),S=r(67929),x=r(84407),O=r(89120),E=r(62237),j=r(44502);function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?u.filter((function(e){return e.name.toLowerCase().includes(a.toLowerCase())})).map((function(e){return o().createElement(C,{key:e.name,plugin:e,model:r})})):o().createElement(i.Z,null,"No plugins currently installed"))}));var T=r(88696),I=r(16173),R=r(67016),M=r(73317),N=r(38639),F=r(11036),D=r(94689);function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function H(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{fetchGenomesFile:()=>b,fetchHubFile:()=>v,fetchTrackDbFile:()=>w,generateTracks:()=>j,makeLoc:()=>x,makeLoc2:()=>E,makeLocAlt:()=>O,ucscAssemblies:()=>a});var n=r(35743),o=r(76743),i=r(61169);const a="ailMel1\nallMis1\nanoCar1\nanoCar2\nanoGam1\nanoGam3\napiMel1\napiMel2\naplCal1\naptMan1\naquChr2\nbalAcu1\nbisBis1\nbosTau2\nbosTau3\nbosTau4\nbosTau6\nbosTau7\nbosTau8\nbraFlo1\ncaeJap1\ncaePb1\ncaePb2\ncaeRem2\ncaeRem3\ncalJac1\ncalJac3\ncalMil1\ncanFam1\ncanFam3\ncavPor3\ncb3\nce10\nce11\nce2\nce4\nce6\ncerSim1\nchlSab2\nchoHof1\nchrPic1\nci1\nci2\nci3\ncriGri1\ncriGriChoV1\ndanRer10\ndanRer11\ndanRer3\ndanRer4\ndanRer5\ndanRer6\ndanRer7\ndasNov3\ndipOrd1\ndm1\ndm2\ndm3\ndm6\ndp2\ndp3\ndroAna1\ndroAna2\ndroEre1\ndroGri1\ndroMoj1\ndroMoj2\ndroPer1\ndroSec1\ndroSim1\ndroVir1\ndroVir2\ndroYak1\ndroYak2\neboVir3\nechTel1\nechTel2\nequCab1\nequCab2\neriEur1\neriEur2\nfelCat3\nfelCat4\nfelCat5\nfelCat8\nfr1\nfr2\nfr3\ngadMor1\ngalGal2\ngalGal3\ngalGal4\ngalGal5\ngalGal6\ngalVar1\ngasAcu1\ngeoFor1\ngorGor3\ngorGor4\ngorGor5\nhetGla1\nhetGla2\nhg16\nhg18\nhg19\nhg38\nlatCha1\nloxAfr3\nmacEug2\nmacFas5\nmanPen1\nmelGal1\nmelGal5\nmelUnd1\nmicMur1\nmicMur2\nmm10\nmm7\nmm8\nmm9\nmonDom2\nmonDom4\nmonDom5\nmusFur1\nmyoLuc2\nnanPar1\nnasLar1\nnomLeu1\nnomLeu2\nnomLeu3\nochPri2\nochPri3\noreNil2\nornAna1\nornAna2\noryCun2\noryLat2\notoGar3\noviAri1\noviAri3\noviAri4\npanPan1\npanPan2\npanTro1\npanTro2\npanTro3\npanTro4\npanTro5\npanTro6\npapAnu2\npapHam1\npetMar1\npetMar2\nponAbe2\nponAbe3\npriPac1\nproCap1\npteVam1\nrheMac2\nrheMac3\nrheMac8\nrhiRox1\nrn4\nrn5\nrn6\nsacCer1\nsacCer2\nsacCer3\nsaiBol1\nsarHar1\nsorAra1\nsorAra2\nspeTri2\nstrPur1\nstrPur2\nsusScr11\nsusScr2\nsusScr3\ntaeGut1\ntaeGut2\ntarSyr1\ntarSyr2\ntetNig1\ntetNig2\nthaSir1\ntriMan1\ntupBel1\nturTru2\nventer1\nvicPac1\nvicPac2\nxenLae2\nxenTro1\nxenTro2\nxenTro3\nxenTro7\nxenTro9".split(/\r?\n/);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(){c=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.entries());try{var l=function(){var c,l=f(a.value,2),h=l[0],y=l[1],v=function(e){if(Array.isArray(e))return d(e)}(c=y.keys())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||p(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=new Set(["superTrack","compositeTrack","container","view"]);if(v.some((function(e){return m.has(e)})))return 1;var b=[],g=h;do{if(g=(null===(i=e.get(g))||void 0===i?void 0:i.get("parent"))||""){var w=g.split(" ");g=f(w,1)[0],b.push(e.get(g))}}while(g);b.reverse();var S=P(y,b.map((function(e){return null==e?void 0:e.get("shortLabel")})).filter((function(e){return!!e})),t,e,o);u.push(s(s({},S),{},{trackId:"ucsc-trackhub-".concat((0,n.objectHash)(S)),assemblyNames:[r]}))};for(c.s();!(a=c.n()).done;)l()}catch(e){c.e(e)}finally{c.f()}return u}function P(e,t,r,o,a){var u,c=e.get("type"),l=e.get("shortLabel")||"",s=e.get("bigDataUrl")||"",f=e.get("bigDataIndex")||"",p=(0,n.isUriLocation)(r);c||(c=null===(u=o.get(e.get("parent")||""))||void 0===u?void 0:u.get("type"));var d=(null==c?void 0:c.split(" ")[0])||"";"bam"===d&&s.toLowerCase().endsWith("cram")&&(d="cram");var h=p?x(s,r):E(s);switch(d){case"bam":return{type:"AlignmentsTrack",name:e.get("shortLabel"),description:e.get("longLabel"),category:t,adapter:{type:"BamAdapter",bamLocation:h,index:{location:p?O(f,s+".bai",r):E(f,s+".bai")}}};case"bigBarChart":case"bigChain":case"bigInteract":case"bigMaf":case"bigPsl":return{type:"FeatureTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"BigBedAdapter",bigBedLocation:h},renderer:{type:"SvgFeatureRenderer"}};case"bigBed":case"bigGenePred":case"bigNarrowPeak":return{type:"FeatureTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"BigBedAdapter",bigBedLocation:h}};case"bigWig":return{type:"QuantitativeTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"BigWigAdapter",bigWigLocation:h}};case"cram":return{type:"AlignmentsTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"CramAdapter",cramLocation:h,craiLocation:p?O(f,s+".crai",r):E(f,s+".crai"),sequenceAdapter:a}};case"peptideMapping":return(0,i.generateUnsupportedTrackConf)(l,d,t);case"vcfTabix":return{type:"VariantTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"VcfTabixAdapter",vcfGzLocation:h,index:{location:p?O(f,s+".tbi",r):E(f,s+".tbi")}}};case"hic":return{type:"HicTrack",name:l,description:e.get("longLabel"),category:t,adapter:{type:"HicAdapter",hicLocation:h}};default:return(0,i.generateUnknownTrackConf)(l,d,t)}}},84929:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(20410),o=r(71381),i=r(42847),a=r(35743),u=r(90254);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;rb)){n.next=13;break}return i.complete(),n.abrupt("return");case 13:return g=s.getFeatures(p(p({},e),{},{start:m,end:b}),t),n.next=16,(0,o.z)(g.pipe((0,u.q)()));case 16:for(w=n.sent,S=(null===(c=w[0])||void 0===c?void 0:c.get("seq"))||"",x=y;x{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(51537),l=r(84446),s=r(93720),f=r(60285);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rd?o().createElement(f.ErrorMessage,{error:"It is not recommended to make the step size larger than the window size"}):null,o().createElement(c.Z,{label:"Size of sliding window (bp)",value:"".concat(d),onChange:function(e){return h(e.target.value)}}),o().createElement(c.Z,{label:"Step size of sliding window (bp)",value:"".concat(v),onChange:function(e){return m(e.target.value)}}),o().createElement(l.Z,null,o().createElement(s.Z,{variant:"contained",onClick:function(){t.setGCContentParams({windowSize:+d,windowDelta:+v}),r()}},"Submit"),o().createElement(s.Z,{variant:"contained",color:"secondary",onClick:function(){return r()}},"Cancel"))))}))},88813:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(20410),o=r(76743),i=r(42847),a=r(19830),u=r(20349),c=r(41589),l=r(52913);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==s(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function h(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r536870888)){e.next=14;break}throw new Error("Data exceeds maximum string length (512MB)");case 14:for(i=new TextDecoder("utf8",{fatal:!0}).decode(n),s=i.split(/\n|\r\n|\r/),f=[],h=0;h1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var r=m(p().mark((function r(n){var o,i,a,u,c,l;return p().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i=e.start,a=e.end,u=e.refName,r.next=4,t.loadData();case 4:c=r.sent,l=c.intervalTree,null===(o=l[u])||void 0===o||o.search([i,a]).forEach((function(e){return n.next(e)})),n.complete(),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(0),n.error(r.t0);case 13:case"end":return r.stop()}}),r,null,[[0,10]])})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"featureData",value:function(e){var t,r,n=this,o=function(e){for(var t=1;t0&&(o.subfeatures=e.child_features.flatMap((function(e){return e.map((function(e){return n.featureData(e)}))}))),delete o.child_features,delete o.data,delete o.attributes,delete o.seq_id,o}},{key:"freeResources",value:function(){}}],r&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(n.BaseFeatureDataAdapter)},8509:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var n=r(20410),o=r(96585),i=r(76743),a=r(42847),u=r(20349),c=r(63627),l=r(52913),s=r(2415);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function v(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){v(i,n,o,a,u,"next",e)}function u(e){v(i,n,o,a,u,"throw",e)}a(void 0)}))}}function b(e,t){for(var r=0;r0&&void 0!==r[0]?r[0]:{},e.abrupt("return",this.gff.getReferenceSequenceNames(t));case 2:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"getHeader",value:(d=m(y().mark((function e(){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.gff.getHeader());case 1:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.ObservableCreate)(function(){var n=m(y().mark((function n(o){var i;return y().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.gff.getMetadata();case 2:return i=n.sent,n.next=5,t.getFeaturesHelper(e,r,i,o,!0);case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"getFeaturesHelper",value:(n=m(y().mark((function e(t){var r,n,i,a,u,c,s,f,p,d=this,v=arguments;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=v.length>1&&void 0!==v[1]?v[1]:{},n=v.length>2?v[2]:void 0,i=v.length>3?v[3]:void 0,a=v.length>4?v[4]:void 0,u=v.length>5&&void 0!==v[5]?v[5]:t,e.prev=5,c=[],e.next=9,this.gff.getLines(t.refName,t.start,t.end,(function(e,t){c.push(d.parseLine(n.columnNumbers,e,t))}));case 9:if(!a||!c.length){e.next=17;break}if(s=1/0,f=-1/0,c.forEach((function(e){var t=e.fields[2];if(!d.dontRedispatch.includes(t)){var r=e.start-1;rf&&(f=e.end)}})),!(f>t.end||s0&&(o.subfeatures=e.child_features.flatMap((function(e){return e.map((function(e){return n.featureData(e)}))}))),delete o.child_features,delete o.data,delete o._linehash,delete o.attributes,delete o.seq_id,o}},{key:"freeResources",value:function(){}}],r&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),E}(n.BaseFeatureDataAdapter)},21252:(e,t,r)=>{"use strict";r.r(t),r.d(t,{createFinalConfig:()=>L,fetchConfigFile:()=>I,fetchJb1:()=>_,parseJb1:()=>M});var n=r(76743),o=r(23857),i=r.n(o),a=r(53523),u=r.n(a),c=r(35743);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e){return(null==e?void 0:e.label)&&"string"==typeof e.label}function f(e,t){for(var r=0,n=Object.keys(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function j(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function P(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){j(i,n,o,a,u,"next",e)}function u(e){j(i,n,o,a,u,"throw",e)}a(void 0)}))}}function k(e){return void 0!==e.uri}function A(e){return void 0!==e.localPath}function _(){return C.apply(this,arguments)}function C(){return C=P(O().mark((function e(){var t,r,n,o,i,a,u,c,l,s,f,p,d,h,y=arguments;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=y.length>1&&void 0!==y[1]?y[1]:{include:["{dataRoot}/trackList.json","{dataRoot}/tracks.conf"]},n=y.length>2&&void 0!==y[2]?y[2]:{uri:"",locationType:"UriLocation"},o="uri"in(t=y.length>0&&void 0!==y[0]?y[0]:{uri:"",locationType:"UriLocation"})?"uri":"localPath",i=JSON.parse(JSON.stringify(t)),a="",k(t)&&(a=t.uri),A(t)&&(a=t.localPath),a.endsWith("/")&&(i[o]=a.slice(0,-1)),!(k(n)&&n.uri||A(n)&&n.localPath)){e.next=35;break}u="uri"in n?"uri":"localPath",c="",k(n)&&(c=n.uri),A(n)&&(c=n.localPath),c.endsWith("/")&&(c=c.slice(0,-1)),l={},s=0,f=["jbrowse.conf","jbrowse_conf.json"];case 17:if(!(s1&&void 0!==o[1]?o[1]:G),t),e.next=4,D(r);case 4:return z(n=N(n=e.sent,t)||n,n),U(n),e.abrupt("return",n);case 9:case"end":return e.stop()}}),e)}))),T.apply(this,arguments)}function I(e){return R.apply(this,arguments)}function R(){return(R=P(O().mark((function e(t){var r;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,n.openLocation)(t).readFile("utf8");case 2:if(r=e.sent,!k(t)){e.next=5;break}return e.abrupt("return",M(r,t.uri));case 5:if(!A(t)){e.next=7;break}return e.abrupt("return",M(r,t.localPath));case 7:return e.abrupt("return",M(r));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.trim().startsWith("{")?function(e,t){if("string"==typeof e){var r;try{r=JSON.parse(e)}catch(e){throw new Error("".concat(e," when parsing configuration."))}return w(r,t)}return w(e,t)}(e,t):g(e,t)}function N(e,t){if(null===t)return null;null===e&&(e={});for(var r=0,n=Object.keys(t);r{"use strict";r.r(t),r.d(t,{convertTrackConfig:()=>f,createRefSeqsAdapter:()=>p});var n=r(76743),o=r(35743),i=r(61169);function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>Pe});var n=r(46865),o=r(94877),i=r.n(o),a=r(33860),u=r.n(a);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==c(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function s(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function f(e,t){return p.apply(this,arguments)}function p(){var e;return e=l().mark((function e(t,r){var n,o,i,a=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(a.length>2&&void 0!==a[2]?a[2]:{}).defaultContent,o=void 0===n?{}:n,e.prev=2,e.next=5,r(t,{encoding:"utf8"});case 5:return i=e.sent,e.abrupt("return",JSON.parse(i));case 9:if(e.prev=9,e.t0=e.catch(2),"ENOENT"!==e.t0.code&&404!==e.t0.status){e.next=13;break}return e.abrupt("return",o);case 13:throw e.t0;case 14:case"end":return e.stop()}}),e,null,[[2,9]])})),p=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){s(i,n,o,a,u,"next",e)}function u(e){s(i,n,o,a,u,"throw",e)}a(void 0)}))},p.apply(this,arguments)}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(){y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==d(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=p;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:h,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function v(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1;)r(e[n=o+i>>>1])>=t?i=n:o=n;return r===this.end?i:o}},{key:"readChunkItems",value:function(e){return f(n.resolve(this.baseURL,this.lazyUrlTemplate.replace(/\{Chunk\}/gi,e)),this.readFile,{defaultContent:[]})}},{key:"iterateSublist",value:function(e,t,r,n,o,i,a){var u=this;return S(y().mark((function c(){var l,s,f,p,d,h,b,g,w,S;return y().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:l=u.attrs.makeGetter("Chunk"),s=u.attrs.makeGetter("Sublist"),f=[],p=y().mark((function c(){var p,h,v;return y().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(e[d][0]!==u.lazyClass){c.next=6;break}p=l(e[d]),h=u.chunkCache.get(p,p).then((function(e){return[e,p]})),f.push(h),c.next=8;break;case 6:return c.next=8,[e[d],a.concat(d)];case 8:if(!(v=s(e[d]))){c.next=11;break}return c.delegateYield(O(j(u.iterateSublist(v,t,r,n,o,i,a.concat(d)))),"t0",11);case 11:case"end":return c.stop()}}),c)})),d=u.binarySearch(e,t,o);case 5:if(!(d=0&&n*i(e[d])t?-1:1,i=e>t?r.start:r.end,a=e>t?r.end:r.start,!(r.topList.length>0)){n.next=5;break}return n.delegateYield(O(j(r.iterateSublist(r.topList,e,t,o,i,a,[0]))),"t0",5);case 5:case"end":return n.stop()}}),n)})))()}},{key:"histogram",value:(o=y().mark((function e(t,r,n){var o,i,a,u,c,l,s,f,p,d,h;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(o=new Array(n)).fill(0),i=(r-t)/n,a=!1,u=!1,e.prev=5,l=j(this.iterate(t,r));case 7:return e.next=9,l.next();case 9:if(!(a=!(s=e.sent).done)){e.next=17;break}for(f=s.value,p=Math.max(0,(this.start(f)-t)/i|0),d=Math.min(n,(this.end(f)-t)/i|0),h=p;h<=d;h+=1)o[h]+=1;case 14:a=!1,e.next=7;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(5),u=!0,c=e.t0;case 23:if(e.prev=23,e.prev=24,!a||null==l.return){e.next=28;break}return e.next=28,l.return();case 28:if(e.prev=28,!u){e.next=31;break}throw c;case 31:return e.finish(28);case 32:return e.finish(23);case 33:return e.abrupt("return",o);case 34:case"end":return e.stop()}}),e,this,[[5,19,23,33],[24,,28,32]])})),a=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=o.apply(e,t);function a(e){h(i,r,n,a,u,"next",e)}function u(e){h(i,r,n,a,u,"throw",e)}a(void 0)}))},function(e,t,r){return a.apply(this,arguments)})}],r&&w(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function _(e,t){for(var r=0;r=e.length||!(t in e[n])?t in this.classes[e[0]].proto?this.classes[e[0]].proto[t]:void 0:e[n][t]}},{key:"makeSetter",value:function(e){var t=this;return function(r,n){t.set(r,e,n)}}},{key:"makeGetter",value:function(e){var t=this;return function(r){return t.get(r,e)}}},{key:"makeFastGetter",value:function(e){var t=this.attrIndices(e);return function(e){if(void 0!==t[e[0]])return e[t[e[0]]]}}},{key:"accessors",value:function(){return this._accessors||(this._accessors=this._makeAccessors()),this._accessors}},{key:"_makeAccessors",value:function(){var e={},t={get:function(e){var t=this.get.field_accessors[e.toLowerCase()];if(t)return t.call(this)},set:function(e,t){var r=this.set.field_accessors[e];if(r)return r.call(this,t)},tags:function(){return r[this[0]]||[]}};t.get.field_accessors={},t.set.field_accessors={},this.classes.forEach((function(t,r){(t.attributes||[]).forEach((function(t,n){e[t]=e[t]||[],e[t][r]=n+1,t=t.toLowerCase(),e[t]=e[t]||[],e[t][r]=n+1}))}));var r=this.classes.map((function(e){return e.attributes}));return Object.keys(e).forEach((function(r){var n=e[r];t.get.field_accessors[r]=n?function(){return this[n[this[0]]]}:function(){}})),t}}])&&_(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function T(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function I(){I=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(T([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==L(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?M(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function W(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Q(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){W(i,n,o,a,u,"next",e)}function u(e){W(i,n,o,a,u,"throw",e)}a(void 0)}))}}function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t=a})),s=u._histograms.meta[0],f=0;f=u._histograms.meta[f].basesPerBin&&(s=u._histograms.meta[f]);if(!((p=a/s.basesPerBin)>.9&&Math.abs(p-Math.round(p))<1e-4)){e.next=52;break}for(d=Math.floor(n/s.basesPerBin),p=Math.round(p),h=[],y=0;y=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ge(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function we(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ge(i,n,o,a,u,"next",e)}function u(e){ge(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Se(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return(0,le.ObservableCreate)(function(){var n=we(be().mark((function n(o){var i,a,u,c,l,s,f;return be().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=r.signal,a=!1,u=!1,n.prev=3,l=Ee(t.nclist.getFeatures(e,r));case 5:return n.next=7,l.next();case 7:if(!(a=!(s=n.sent).done)){n.next=14;break}f=s.value,(0,se.checkAbortSignal)(i),o.next(t.wrapFeature(f));case 11:a=!1,n.next=5;break;case 14:n.next=20;break;case 16:n.prev=16,n.t0=n.catch(3),u=!0,c=n.t0;case 20:if(n.prev=20,n.prev=21,!a||null==l.return){n.next=25;break}return n.next=25,l.return();case 25:if(n.prev=25,!u){n.next=28;break}throw c;case 28:return n.finish(25);case 29:return n.finish(20);case 30:o.complete();case 31:case"end":return n.stop()}}),n,null,[[3,16,20,30],[21,,25,29]])})));return function(e){return n.apply(this,arguments)}}())}},{key:"wrapFeature",value:function(e){return new ve(e,void 0,"".concat(this.id,"-").concat(e.id()))}},{key:"hasDataForRefName",value:(o=we(be().mark((function e(t){var r,n;return be().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",!!(null===(r=null==n?void 0:n.stats)||void 0===r?void 0:r.featureCount));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getRefNames",value:(n=we(be().mark((function e(){return be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.configRefNames||[]);case 1:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"freeResources",value:function(){}}],r&&Se(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(ce.BaseFeatureDataAdapter)},86094:(e,t,r)=>{"use strict";r.d(t,{b0:()=>f,n2:()=>d,sh:()=>p});var n=r(63313),o=r.n(n),i=r(76835),a=r(40828);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(63313),o=r.n(n),i=r(40828),a=r(60285),u=r(35127),c=r(97648),l=r(51537),s=r(84446),f=r(93720);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Z:()=>p});var n=r(63313),o=r.n(n),i=r(40828),a=r(88056),u=r(32439);function c(e,t,r,n,o){return"M"+e+","+t+"h"+(r-o)+"a"+o+","+o+" 0 0 1 "+o+","+o+"v"+(n-2*o)+"a"+o+","+o+" 0 0 1 "+-o+","+o+"h"+(o-r)+"z"}function l(e,t,r,n,o){return"M"+(e+o)+","+t+"h"+(r-o)+"v"+n+"h"+(o-r)+"a"+o+","+o+" 0 0 1 "+-o+","+-o+"v"+(2*o-n)+"a"+o+","+o+" 0 0 1 "+o+","+-o+"z"}function s(e,t,r,n){return[[e,n/2],[e+r,0],[e+r,n]].toString()}var f={gneg:"rgb(227,227,227)",gpos25:"rgb(142,142,142)",gpos50:"rgb(85,85,85)",gpos100:"rgb(0,0,0)",gpos75:"rgb(57,57,57)",gvar:"rgb(0,0,0)",stalk:"rgb(127,127,127)",acen:"#800"};const p=(0,i.observer)((function(e){var t=e.overview,r=e.block,n=e.assembly,i=r.offsetPx,p=r.reversed,d=(0,u.wo)(n,r.refName),h=p?d.length-1:0,y=p?0:d.length-1,v=a.VH,m=!1;return o().createElement("g",{transform:"translate(-".concat(i,")")},d.map((function(e,r){var n,i,a,u=JSON.stringify(e),p=e.refName,d=e.type,b=e.start,g=e.end,w=t.bpToPx({refName:p,coord:b})||0,S=t.bpToPx({refName:p,coord:g})||0,x=Math.min(w,S),O=Math.abs(S-w),E=f[d];return"acen"!==d||m?"acen"===d&&m?o().createElement("polygon",{key:u,points:s(w,0,O,v),fill:E}):h===r?o().createElement("path",{key:u,d:l(x,0,O,v,8),fill:E}):y===r?o().createElement("path",{key:u,d:c(x,0,O,v,8),fill:E}):o().createElement("rect",{key:u,x,y:0,width:O,height:v,fill:E}):(m=!0,o().createElement("polygon",{key:u,points:(n=w,i=O,a=v,[[n,0],[n+i,a/2],[n,a]].toString()),fill:E}))})))}))},45733:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(63313),o=r.n(n),i=r(96731),a=r(97648),u=r(35127),c=r(51537),l=r(34179),s=r(27558),f=r(5932),p=r(84446),d=r(93720),h=r(60285),y=r(35743);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(){m=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==v(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function b(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>M});var n=r(63313),o=r.n(n),i=r(76835),a=r(35127),u=r(97648),c=r(7542),l=r(96731),s=r(51537),f=r(52655),p=r(27558),d=r(5932),h=r(84446),y=r(93720),v=r(40828),m=r(40149),b=r(2415),g=r(90659),w=r.n(g),S=r(60285),x=r(35743),O=r(40881),E=r(73610),j=r(69417);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function k(){k=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(I([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==P(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1e6;return o().createElement(S.Dialog,{maxWidth:"xl",open:!0,onClose:function(){r(),t.setOffsets()},title:"Reference sequence"},o().createElement(a.Z,null,g?o().createElement(u.Z,{color:"error"},"".concat(g)):q?o().createElement(c.Z,null,"Retrieving reference sequence...",o().createElement(l.Z,{style:{marginLeft:10},size:20,disableShrink:!0})):null,o().createElement(s.Z,{"data-testid":"rubberband-sequence",variant:"outlined",multiline:!0,minRows:5,maxRows:10,disabled:Q,className:i.dialogContent,fullWidth:!0,value:Q?"Reference sequence too large to display, use the download FASTA button":W,InputProps:{readOnly:!0,classes:{input:i.textAreaFont}}}),o().createElement(f.Z,null,o().createElement(p.Z,{control:o().createElement(d.Z,{value:N,onChange:function(e){return F(e.target.checked)}}),label:"Reverse sequence"}),o().createElement(p.Z,{control:o().createElement(d.Z,{value:G,onChange:function(e){return U(e.target.checked)}}),label:"Complement sequence"})),o().createElement(u.Z,{style:{margin:10}},'Note: Check both boxes for the "reverse complement"')),o().createElement(h.Z,null,o().createElement(y.Z,{onClick:function(){w()(W),B(!0),setTimeout((function(){return B(!1)}),500)},disabled:q||!!g||Q,color:"primary",startIcon:o().createElement(E.ContentCopy,null)},Z?"Copied":"Copy to clipboard"),o().createElement(y.Z,{onClick:function(){(0,m.saveAs)(new Blob([W||""],{type:"text/x-fasta;charset=utf-8"}),"jbrowse_ref_seq.fa")},disabled:q||!!g,color:"primary",startIcon:o().createElement(j.Z,null)},"Download FASTA"),o().createElement(y.Z,{onClick:r,variant:"contained"},"Close")))}))},45379:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});var n=r(63313),o=r.n(n),i=r(76835),a=r(40828),u=r(35743),c=r(7542),l=r(69750),s=r(98695),f=r(96731),p=r(93720),d=r(60285),h=r(89120),y=r(81435),v=r(32439);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==m(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function g(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){g(i,n,o,a,u,"next",e)}function u(e){g(i,n,o,a,u,"throw",e)}a(void 0)}))}}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1)){e.next=24;break}i.setSearchResults(l,t.toLowerCase(),A),e.next=31;break;case 24:if(1!==l.length){e.next=29;break}return e.next=27,U(l[0]);case 27:e.next=31;break;case 29:return e.next=31,i.navToLocString(t,A);case 31:e.next=37;break;case 33:e.prev=33,e.t0=e.catch(0),console.error(e.t0),m.notify("".concat(e.t0),"warning");case 37:case"end":return e.stop()}}),e,null,[[0,33]])}))),q.apply(this,arguments)}return(0,n.useEffect)((function(){Z(G)}),[G,A]),o().createElement("div",{className:a.container},N?o().createElement(d.ErrorMessage,{error:N}):null,o().createElement(c.Z,{className:a.importFormContainer},o().createElement("form",{onSubmit:(r=w(b().mark((function e(t){return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),i.setError(void 0),!D){e.next=5;break}return e.next=5,V(D);case 5:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},o().createElement(l.ZP,{container:!0,spacing:1,justifyContent:"center",alignItems:"center"},o().createElement(l.ZP,{item:!0},o().createElement(s.Z,null,o().createElement(d.AssemblySelector,{onChange:function(e){return _(e)},localStorageKey:"lgv",session:m,selected:A}))),o().createElement(l.ZP,{item:!0},A?M?o().createElement(h.default,{style:{color:"red"}}):z?o().createElement(s.Z,null,o().createElement(y.Z,{fetchResults:function(e){return(0,v.kx)({queryString:e,assembly:R,textSearchManager:E,rankSearchResults:j,searchScope:I})},model:i,assemblyName:A,value:D,minWidth:270,onChange:function(e){return Z(e)},onSelect:function(e){return T(e)},TextFieldProps:{variant:"outlined",helperText:"Enter sequence name, feature name, or location"}})):o().createElement(f.Z,{size:20,disableShrink:!0}):null),o().createElement(l.ZP,{item:!0},o().createElement(s.Z,null,o().createElement(p.Z,{type:"submit",disabled:!D,className:a.button,variant:"contained",color:"primary"},"Open")),o().createElement(s.Z,null,o().createElement(p.Z,{disabled:!D,className:a.button,onClick:function(){i.setError(void 0),i.showAllRegionsInAssembly(A)},variant:"contained",color:"secondary"},"Show all regions in assembly")))))))}))},43971:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>xe});var n=r(63313),o=r.n(n),i=r(82015),a=r(97648),u=r(93720),c=r(76835),l=r(60285),s=r(35743),f=r(40828),p=r(73610),d=r(82123),h=r(38441),y=r(41878),v=r(74141),m=r(2415),b=r(61169),g=r(28550),w=r.n(g),S=r(26796),x=r(89120),O=r(48297),E=r(11036),j=r(90705),P=(0,c.makeStyles)()({dragHandle:{cursor:"grab"},dragHandleIcon:{display:"inline-block",verticalAlign:"middle",pointerEvents:"none"}});const k=function(e){var t=e.trackId,r=e.view,n=e.track,i=P().classes;return o().createElement("span",{draggable:!0,className:i.dragHandle,onDragStart:function(e){var t=e.currentTarget;if(t.parentNode){var o=t.parentNode;e.dataTransfer.setDragImage(o,20,20),r.setDraggingTrackId(n.id)}},onDragEnd:function(){return r.setDraggingTrackId(void 0)},"data-testid":"dragHandle-".concat(r.id,"-").concat(t)},o().createElement(j.Z,{className:i.dragHandleIcon,fontSize:"small"}))};function A(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,te),c=oe(),l=c.classes,s=c.cx,f=r.staticBlocks.offsetPx-r.offsetPx;return o().createElement(i.Z,ne({"data-resizer":"true",className:s(l.scalebarContainer,a),variant:"outlined",ref:t,style:n},u),o().createElement("div",{className:l.scalebarZoomContainer,style:{transform:1!==r.scaleFactor?"scaleX(".concat(r.scaleFactor,")"):void 0}},o().createElement("div",{className:l.scalebar,style:ne({left:f-1,width:r.staticBlocks.totalWidthPx},n)},o().createElement(ue,{model:r}))),o().createElement(ie,{model:r}))})));var le=(0,c.makeStyles)()((function(e){return{verticalGuidesZoomContainer:{position:"absolute",height:"100%",width:"100%",zIndex:1,pointerEvents:"none"},verticalGuidesContainer:{position:"absolute",height:"100%",zIndex:1,pointerEvents:"none",display:"flex"},tick:{position:"absolute",height:"100%",width:1},majorTick:{background:e.palette.action.disabled},minorTick:{background:e.palette.divider}}}));function se(e){var t=e.block,r=e.bpPerPx,n=le(),i=n.classes,a=n.cx,u=(0,X.Cz)(t.start,t.end,r);return o().createElement(J.b0,{block:t},u.map((function(e){var n=e.type,u=e.base,c=(t.reversed?t.end-u:u-t.start)/r;return o().createElement("div",{key:u,className:a(i.tick,"major"===n||"labeledMajor"===n?i.majorTick:i.minorTick),style:{left:c}})})))}var fe=(0,f.observer)((function(e){var t=e.model,r=t.staticBlocks,n=t.bpPerPx;return o().createElement(o().Fragment,null,r.map((function(e,t){var r="".concat(e.key,"-").concat(t);return e instanceof K.ContentBlock?o().createElement(se,{key:r,block:e,bpPerPx:n}):e instanceof K.ElidedBlock?o().createElement(J.sh,{key:r,width:e.widthPx}):e instanceof K.InterRegionPaddingBlock?o().createElement(J.n2,{key:r,width:e.widthPx,boundary:"boundary"===e.variant}):null})))}));const pe=(0,f.observer)((function(e){var t=e.model,r=le().classes,n=t.staticBlocks.offsetPx-t.offsetPx;return o().createElement("div",{className:r.verticalGuidesZoomContainer,style:{transform:1!==t.scaleFactor?"scaleX(".concat(t.scaleFactor,")"):void 0}},o().createElement("div",{className:r.verticalGuidesContainer,style:{left:n,width:t.staticBlocks.totalWidthPx}},o().createElement(fe,{model:t})))}));var de=(0,c.makeStyles)()((function(e){return{centerLineContainer:{background:"transparent",height:"100%",zIndex:5,position:"absolute",border:"1px ".concat(e.palette.action.active," dashed"),borderTop:"none",borderBottom:"none",pointerEvents:"none"},centerLineText:{position:"absolute",pointerEvents:"none",whiteSpace:"nowrap",fontWeight:"bold"}}})),he=(0,f.observer)((function(e){var t=e.model,r=t.bpPerPx,i=t.centerLineInfo,a=t.trackHeights,u=t.tracks,c=t.width,l=(0,n.useRef)(null),s=de().classes,f=c/2;return u.length?o().createElement("div",{"data-testid":"centerline_container",className:s.centerLineContainer,role:"presentation",ref:l,style:{left:"".concat(f,"px"),width:Math.max(1/r,1)}},i&&o().createElement("div",{"data-testid":"centerline_text",className:s.centerLineText,role:"presentation",style:{left:Math.max(1/r,1)+5,top:a}},i.refName,":"," ",Math.max(Math.round(i.offset)+1,0))):null}));const ye=he;var ve=(0,c.makeStyles)()({tracksContainer:{position:"relative",overflow:"hidden"}});const me=(0,f.observer)((function(e){var t=e.children,r=e.model,i=ve().classes,a=(0,s.getEnv)(r).pluginManager,u=function(e){var t=G((0,n.useState)(!1),2),r=t[0],o=t[1],i=(0,n.useRef)(!1),a=(0,n.useRef)(0);return(0,n.useEffect)((function(){var t=function(){};function n(t){t.preventDefault();var r=t.clientX-a.current;r&&(i.current||(i.current=!0,window.requestAnimationFrame((function(){e.horizontalScroll(-r),i.current=!1,a.current=t.clientX}))))}function u(){a.current=0,r&&o(!1)}return r&&(window.addEventListener("mousemove",n,!0),window.addEventListener("mouseup",u,!0),t=function(){window.removeEventListener("mousemove",n,!0),window.removeEventListener("mouseup",u,!0)}),t}),[e,r,a]),{mouseDown:function(e){if(!e.shiftKey){var t=e.target;t.draggable||t.dataset.resizer||0===e.button&&(a.current=e.clientX,o(!0))}},mouseUp:function(e){e.preventDefault(),o(!1)}}}(r),c=u.mouseDown,f=u.mouseUp,p=(0,n.useRef)(null),d=H(p,r,!0),h=d.guideX,y=d.rubberbandOn,v=d.leftBpOffset,m=d.rightBpOffset,b=d.numOfBpSelected,g=d.width,w=d.left,S=d.anchorPosition,x=d.handleMenuItemClick,O=d.open,E=d.handleClose,j=d.mouseMove,P=d.mouseDown;!function(e,t){var r=(0,n.useRef)(0),o=(0,n.useRef)(),i=(0,n.useRef)(!1);(0,n.useEffect)((function(){var n=e.current;function a(e){var a=B()(e);!0===e.ctrlKey?(e.preventDefault(),r.current+=a.pixelY/500,t.setScaleFactor(r.current<0?1-r.current:1/(1+r.current)),o.current&&clearTimeout(o.current),o.current=setTimeout((function(){t.setScaleFactor(1),t.zoomTo(r.current>0?t.bpPerPx*(1+r.current):t.bpPerPx/(1-r.current),e.clientX-((null==n?void 0:n.getBoundingClientRect().left)||0)),r.current=0}),300)):(Math.abs(a.pixelX)>Math.abs(2*a.pixelY)&&e.preventDefault(),r.current+=a.pixelX,i.current||(i.current=!0,window.requestAnimationFrame((function(){t.horizontalScroll(r.current),r.current=0,i.current=!1}))))}return n?(n.addEventListener("wheel",a),function(){n.removeEventListener("wheel",a)}):function(){}}),[t,e])}(p,r);var k=a.evaluateExtensionPoint("LinearGenomeView-TracksContainerComponent",void 0,{model:r});return o().createElement("div",{ref:p,"data-testid":"trackContainer",className:i.tracksContainer,onMouseDown:function(e){c(e),P(e)},onMouseMove:j,onMouseUp:f},r.showGridlines?o().createElement(pe,{model:r}):null,r.showCenterLine?o().createElement(ye,{model:r}):null,void 0!==h?o().createElement(W,{model:r,coordX:h}):y?o().createElement(Q.Z,{leftBpOffset:v,rightBpOffset:m,numOfBpSelected:b,width:g,left:w}):null,S?o().createElement(l.Menu,{anchorReference:"anchorPosition",anchorPosition:{left:S.clientX,top:S.clientY},onMenuItemClick:x,open:O,onClose:E,menuItems:r.rubberBandMenuItems()}):null,o().createElement(Y,{model:r,ControlComponent:o().createElement(ce,{model:r,style:{height:D.n8,boxSizing:"border-box"}})}),k,t)}));var be=(0,n.lazy)((function(){return Promise.resolve().then(r.bind(r,45379))})),ge=(0,c.makeStyles)()((function(e){return{note:{textAlign:"center",paddingTop:e.spacing(1),paddingBottom:e.spacing(1)},rel:{position:"relative"},top:{zIndex:1e3}}}));function we(e){var t=e.model,r=ge().classes,n=t.hideNoTracksActive;return o().createElement(i.Z,{className:r.note},n?o().createElement("div",{style:{height:"48px"}}):o().createElement(o().Fragment,null,o().createElement(a.Z,null,"No tracks active."),o().createElement(u.Z,{variant:"contained",color:"primary",onClick:function(){return t.activateTrackSelector()},className:r.top,startIcon:o().createElement(p.TrackSelector,null)},"Open track selector")))}var Se=(0,f.observer)((function(e){var t=e.model,r=t.tracks,i=t.error,a=t.initialized,u=t.hasDisplayedRegions,c=(0,n.useRef)(null),f=(0,s.getSession)(t),p=ge().classes;if((0,n.useEffect)((function(){function e(e){var r,n;e.target instanceof Element&&(null===(r=null==c?void 0:c.current)||void 0===r?void 0:r.contains(e.target))&&(null===(n=f.setFocusedViewId)||void 0===n||n.call(f,t.id))}return document.addEventListener("mousedown",e),document.addEventListener("keydown",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("keydown",e)}}),[f,t]),!a&&!i)return o().createElement(l.LoadingEllipses,{variant:"h6"});if(!u||i)return o().createElement(be,{model:t});var d=t.MiniControlsComponent(),h=t.HeaderComponent();return o().createElement("div",{className:p.rel,ref:c,onMouseLeave:function(){return f.setHovered(void 0)},onMouseMove:function(e){var r=c.current;if(r){var n=t.tracks,o=e.clientX-r.getBoundingClientRect().left,i=t.pxToBp(o),a=n.find((function(e){return e.displays[0].featureUnderMouse}));f.setHovered({hoverPosition:i,hoverFeature:a})}}},o().createElement(h,{model:t}),o().createElement(d,{model:t}),o().createElement(me,{model:t},r.length?r.map((function(e){return o().createElement(F,{key:e.id,model:t,track:e})})):o().createElement(we,{model:t})))}));const xe=Se},52384:(e,t,r)=>{"use strict";r.d(t,{mg:()=>_,ZP:()=>T});var n=r(63313),o=r.n(n),i=r(86127),a=r(41878),u=r(97648),c=r(76835),l=r(40828),s=r(63342),f=r.n(s),p=r(35743),d=r(45131),h=r(88056),y=r(36254),v=r(67929),m=r(45823),b=r(32439);function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.get("start")&&s.coord3){var e=Math.min(l,d),n=Math.max(l,d);t.moveTo(r.pxToBp(e-u),r.pxToBp(n-u))}if(void 0!==l&&void 0===d){var o=r.pxToBp(l-u);o.refName?t.centerAt(Math.round(o.coord),o.refName,o.index):((0,p.getSession)(t).notify("unknown position clicked"),console.error("unknown position clicked",o))}s(void 0),h(void 0),void 0!==l&&w(void 0)}function o(e){"Escape"===e.key&&(s(void 0),h(void 0))}return j?(window.addEventListener("mousemove",e,!0),window.addEventListener("mouseup",n,!0),window.addEventListener("keydown",o,!0),function(){window.removeEventListener("mousemove",e,!0),window.removeEventListener("mouseup",n,!0),window.removeEventListener("keydown",o,!0)}):function(){}}),[j,d,l,t,r,u]),void 0===l)return o().createElement("div",{className:E.rel},void 0!==v?o().createElement(x,{model:t,open:!j,overview:r,guideX:v}):null,o().createElement("div",{className:E.rubberbandControl,ref:O,onMouseDown:P,onMouseOut:A,onMouseMove:k},a));var _,C,L=l||0,T=0;if(void 0!==l&&void 0!==d&&(L=d{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(63313),o=r.n(n),i=r(35127),a=r(80464),u=r(84446),c=r(93720),l=r(60285);function s(e){var t=e.handleClose;return o().createElement(l.Dialog,{open:!0,maxWidth:"xl",onClose:t,title:"Using the search box"},o().createElement(i.Z,null,o().createElement("h3",null,"Searching"),o().createElement("ul",null,o().createElement("li",null,"Jump to a feature or reference sequence by typing its name in the location box and pressing Enter."),o().createElement("li",null,"Jump to a specific region by typing the region into the location box as: ",o().createElement("code",null,"ref:start..end")," or ",o().createElement("code",null,"ref:start-end"),". Commas are allowed in the start and end coordinates. A space-separated list of locstrings can be used to open up multiple chromosomes at a time")),o().createElement("h3",null,"Example Searches"),o().createElement("ul",null,o().createElement("li",null,o().createElement("code",null,"BRCA")," - searches for the feature named BRCA"),o().createElement("li",null,o().createElement("code",null,"chr4")," - jumps to chromosome 4"),o().createElement("li",null,o().createElement("code",null,"chr4:79,500,000..80,000,000")," - jumps the region on chromosome 4 between 79.5Mb and 80Mb."),o().createElement("li",null,o().createElement("code",null,"chr1:1-100 chr2:1-100")," - create a split view of chr1:1-100 and chr2:1-100"),o().createElement("li",null,o().createElement("code",null,"chr1 chr2 chr3")," - open up multiple chromosomes at once"),o().createElement("li",null,o().createElement("code",null,"chr1:1-100[rev] chr2:1-100")," - open up the first region in the horizontally flipped orientation"),o().createElement("li",null,o().createElement("code",null,"chr1 100 200")," - use whitespace separated refname, start, end"))),o().createElement(a.Z,null),o().createElement(u.Z,null,o().createElement(c.Z,{onClick:function(){return t()},color:"primary"},"Close")))}},81435:(e,t,r)=>{"use strict";r.d(t,{Z:()=>I});var n=r(63313),o=r.n(n),i=r(40828),a=r(35743),u=r(45595),c=r(71468);function l(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(n.s();!(t=n.n()).done;){var o=t.value,i=o.getDisplayString();r[i]||(r[i]=[]),r[i].push(o)}}catch(e){n.e(e)}finally{n.f()}return r}(e)).map((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||s(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];return 1===i.length?{result:i[0]}:{result:new u.ZP({displayString:o,results:i,label:o})}}))}var d=r(51537),h=r(74141),y=r(22546),v=r(27894),m=r(7387);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function C(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r100?[{group:"limitOption",result:new u.ZP({label:"keep typing for more results"})}]:[]))}(e,t.inputValue)},renderInput:function(e){return o().createElement(j,{showHelp:m,params:e,inputBoxVal:Y,TextFieldProps:O,setCurrentSearch:Z,setInputValue:G})},getOptionLabel:function(e){return"string"==typeof e?e:e.result.getDisplayString()}}))}))},45823:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(63313),o=r.n(n),i=r(76835),a=r(41878),u=r(17329),c=r(97648),l=r(35743),s=(0,i.makeStyles)()((function(e){var t=e.palette,r=t.primary,n=t.tertiary;return{rubberband:{height:"100%",background:n?(0,a.Fq)(n.light,.7):(0,a.Fq)(r.light,.7),position:"absolute",zIndex:10,textAlign:"center",overflow:"hidden"},rubberbandControl:{cursor:"crosshair",width:"100%",minHeight:8},rubberbandText:{color:n?n.contrastText:r.contrastText},popover:{mouseEvents:"none",cursor:"crosshair"},paper:{paddingLeft:e.spacing(1),paddingRight:e.spacing(1)}}}));function f(e){var t=e.leftBpOffset,r=e.rightBpOffset,i=e.numOfBpSelected,a=e.left,f=e.width,p=(0,n.useRef)(null),d=s().classes;return o().createElement(o().Fragment,null,p.current?o().createElement(o().Fragment,null,o().createElement(u.ZP,{className:d.popover,classes:{paper:d.paper},open:!0,anchorEl:p.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"},keepMounted:!0,disableRestoreFocus:!0},o().createElement(c.Z,null,(0,l.stringify)(t))),o().createElement(u.ZP,{className:d.popover,classes:{paper:d.paper},open:!0,anchorEl:p.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,disableRestoreFocus:!0},o().createElement(c.Z,null,(0,l.stringify)(r)))):null,o().createElement("div",{ref:p,className:d.rubberband,style:{left:a,width:f}},i?o().createElement(c.Z,{variant:"h6",className:d.rubberbandText},(0,l.toLocale)(i)," bp"):null))}},3255:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>j});var n=r(63313),o=r.n(n),i=r(60285),a=r(35127),u=r(97648),c=r(80464),l=r(84446),s=r(93720),f=r(93534),p=r(82015),d=r(42833),h=r(43116),y=r(45475),v=r(63814),m=r(40087),b=r(82123),g=r(35743);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=g.prototype=m.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==w(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function x(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function O(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){x(i,n,o,a,u,"next",e)}function u(e){x(i,n,o,a,u,"throw",e)}a(void 0)}))}}function E(e){var t,r=e.searchResults,n=e.assemblyName,i=e.model,a=e.handleClose,u=(0,g.getSession)(i),c=(0,g.getEnv)(u).pluginManager,l=u.assemblyManager,w=n||(null===(t=i.displayedRegions[0])||void 0===t?void 0:t.assemblyName),x=l.get(w);if(!x)throw new Error("assembly ".concat(w," not found"));if(!x.regions)throw new Error("assembly ".concat(w," regions not loaded"));function E(e){return j.apply(this,arguments)}function j(){return j=O(S().mark((function e(t){var r,n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(n=null===(r=null==x?void 0:x.regions)||void 0===r?void 0:r.find((function(e){return t===e.refName})))){e.next=7;break}i.setDisplayedRegions([n]),i.showAllRegions(),e.next=9;break;case 7:return e.next=9,i.navToLocString(t,w);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.warn(e.t0),u.notify("".concat(e.t0),"warning");case 15:case"end":return e.stop()}}),e,null,[[0,11]])}))),j.apply(this,arguments)}return o().createElement(f.Z,{component:p.Z},o().createElement(d.Z,null,o().createElement(h.Z,null,o().createElement(y.Z,null,o().createElement(v.Z,null,"Name"),o().createElement(v.Z,{align:"right"},"Location"),o().createElement(v.Z,{align:"right"},"Track"),o().createElement(v.Z,{align:"right"}))),o().createElement(m.Z,null,r.map((function(e){return o().createElement(y.Z,{key:"".concat(e.getId())},o().createElement(v.Z,{component:"th",scope:"row"},e.getLabel()),o().createElement(v.Z,{align:"right"},e.getLocation()),o().createElement(v.Z,{align:"right"},function(e){var t;if(e){var r=c.pluggableConfigSchemaType("track"),n=(0,b.resolveIdentifier)(r,(0,b.getRoot)(i),e);return(null===(t=null==n?void 0:n.name)||void 0===t?void 0:t.value)||""}return""}(e.getTrackId())||"N/A"),o().createElement(v.Z,{align:"right"},o().createElement(s.Z,{onClick:(t=O(S().mark((function t(){var r,n;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(r=e.getLocation())){t.next=7;break}return t.next=5,E(r);case 5:(n=e.getTrackId())&&i.showTrack(n);case 7:t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),console.error(t.t0),u.notify("".concat(t.t0),"error");case 13:a();case 14:case"end":return t.stop()}}),t,null,[[0,9]])}))),function(){return t.apply(this,arguments)}),color:"primary",variant:"contained"},"Go")));var t})))))}function j(e){var t=e.model,r=e.assemblyName,n=e.searchQuery,f=e.searchResults,p=e.handleClose;return o().createElement(i.Dialog,{open:!0,maxWidth:"xl",onClose:p,title:"Search results"},o().createElement(a.Z,null,(null==f?void 0:f.length)?o().createElement(o().Fragment,null,o().createElement(u.Z,null,"Showing results for ",o().createElement("b",null,n)),o().createElement(E,{model:t,handleClose:p,assemblyName:r,searchResults:f})):o().createElement(u.Z,null,"No results found for ",o().createElement("b",null,n))),o().createElement(c.Z,null),o().createElement(l.Z,null,o().createElement(s.Z,{onClick:function(){return p()},color:"primary"},"Cancel")))}},46227:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(63313),o=r.n(n),i=r(35127),a=r(97648),u=r(51537),c=r(52655),l=r(27558),s=r(5932),f=r(84446),p=r(93720),d=r(60285),h=r(82123),y=r(76835),v=r(40828),m=r(35743);function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{c6:()=>d,kx:()=>s,pG:()=>p,wo:()=>h});var n=r(35743),o=r(45595);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Od:()=>Le,VH:()=>Te,I1:()=>de.default,n8:()=>Ie,N_:()=>Ne,Rj:()=>ie,EE:()=>Fe,FX:()=>$,ZP:()=>Ze});var n=r(63313),o=r.n(n),i=r(53136),a=r(2415),u=r(77043),c=r(66769),l=r(35743),s=r(51398),f=r(71707),p=r(61169),d=r(72161),h=r(82123),y=r(63342),v=r.n(y),m=r(3343),b=r(40149),g=r(76990),w=r.n(g),S=r(73610),x=r(49278),O=r(29541),E=r(14485),j=r(77838),P=r(29240),k=r(88213),A=r(87576),_=r(40828),C=r(82015),L=r(74141),T=r(53869),I=r(90113),R=r(28550),M=r.n(R),N=r(76835),F=(0,N.makeStyles)()((function(e){return{background:{position:"absolute",right:0,zIndex:1001,background:e.palette.background.paper},focusedBackground:{background:e.palette.secondary.light,svg:{fill:e.palette.secondary.contrastText}}}}));const D=(0,_.observer)((function(e){var t=e.model,r=F(),n=r.classes,i=r.cx,a=t.id,u=t.bpPerPx,c=t.maxBpPerPx,s=t.minBpPerPx,f=t.scaleFactor,p=t.hideHeader,d=(0,l.getSession)(t).focusedViewId;return p?o().createElement(C.Z,{className:i(n.background,d===a?n.focusedBackground:void 0)},o().createElement(M(),{menuItems:t.menuItems()},o().createElement(I.Z,{fontSize:"small"})),o().createElement(L.Z,{"data-testid":"zoom_out",onClick:function(){return t.zoom(2*u)},disabled:u>=c-1e-4||1!==f},o().createElement(T.Z,{fontSize:"small"})),o().createElement(L.Z,{"data-testid":"zoom_in",onClick:function(){return t.zoom(u/2)},disabled:u<=s+1e-4||1!==f},o().createElement(k.Z,{fontSize:"small"}))):null}));var Z=r(41878),B=r(93720),z=r(97648),G=r(52655),U=r(39830),H=r(87733),V=r(52384),q=r(48381);function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=u-1e-4||1!==s,size:"large"},o().createElement(T.Z,null)),o().createElement(q.ZP,{size:"small",className:a.slider,value:p,min:100*-Math.log2(u),max:100*-Math.log2(c),onChange:function(e,t){return d(t)},onChangeCommitted:function(){return i.zoomTo(Math.pow(2,-p/100))},disabled:1!==s}),o().createElement(L.Z,{"data-testid":"zoom_in",onClick:function(){return i.zoom(i.bpPerPx/2)},disabled:l<=c+1e-4||1!==s,size:"large"},o().createElement(k.Z,null)))}));var Y=r(86127),K=r(81435),J=r(32439);function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function re(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function ne(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){re(i,n,o,a,u,"next",e)}function u(e){re(i,n,o,a,u,"throw",e)}a(void 0)}))}}var oe=(0,N.makeStyles)()((function(){return{headerRefName:{minWidth:100}}}));const ie=(0,_.observer)((function(e){var t=e.model,r=e.showHelp,n=oe().classes,i=(0,Y.Z)(),a=(0,l.getSession)(t),u=a.textSearchManager,c=a.assemblyManager,s=t.assemblyNames,f=t.rankSearchResults,p=s[0],d=c.get(p),h=t.searchScope(p);function y(e){return v.apply(this,arguments)}function v(){return(v=ne(te().mark((function e(r){var n,o;return te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.getLocation(),o=r.getTrackId(),!n){e.next=6;break}return e.next=5,t.navToLocString(n,p);case 5:o&&t.showTrack(o);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(){return(m=ne(te().mark((function e(r){var n,o,i,c,l,s,v,m;return te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!r.hasLocation()){e.next=6;break}return e.next=4,y(r);case 4:e.next=32;break;case 6:if(!(null===(n=r.results)||void 0===n?void 0:n.length)){e.next=10;break}t.setSearchResults(r.results,r.getLabel()),e.next=32;break;case 10:if(o=r.getLabel(),i=(0,J.pG)(o,":"),g=2,c=function(e){if(Array.isArray(e))return e}(b=i)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(b,g)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ee(e,t):void 0}}(b,g)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=c[0],s=c[1],!((v=(null==d?void 0:d.allRefNamesWithLowerCase)||[]).includes(o)||v.includes(l)&&!Number.isNaN(Number.parseInt(s,10)))){e.next=18;break}return e.next=16,t.navToLocString(o,p);case 16:e.next=32;break;case 18:return e.next=20,(0,J.kx)({queryString:o,searchType:"exact",searchScope:h,rankSearchResults:f,textSearchManager:u,assembly:d});case 20:if(!((m=e.sent).length>1)){e.next=25;break}t.setSearchResults(m,o.toLowerCase()),e.next=32;break;case 25:if(1!==m.length){e.next=30;break}return e.next=28,y(m[0]);case 28:e.next=32;break;case 30:return e.next=32,t.navToLocString(o,p);case 32:e.next=38;break;case 34:e.prev=34,e.t0=e.catch(0),console.error(e.t0),a.notify("".concat(e.t0),"warning");case 38:case"end":return e.stop()}var b,g}),e,null,[[0,34]])})))).apply(this,arguments)}return o().createElement(K.Z,{showHelp:r,onSelect:function(e){return m.apply(this,arguments)},assemblyName:p,fetchResults:function(e){return(0,J.kx)({queryString:e,searchScope:h,rankSearchResults:f,textSearchManager:u,assembly:d})},model:t,minWidth:175,TextFieldProps:{variant:"outlined",className:n.headerRefName,style:{margin:Ne},InputProps:{style:{padding:0,height:Fe,background:(0,Z.Fq)(i.palette.background.paper,.8)}}}})}));var ae=(0,N.makeStyles)()((function(e){return{headerBar:{display:"flex"},headerForm:{flexWrap:"nowrap",marginRight:7},spacer:{flexGrow:1},panButton:{background:(0,Z.Fq)(e.palette.background.paper,.8),color:e.palette.text.primary,margin:Ne},bp:{display:"flex",alignItems:"center",marginLeft:5},toggleButton:{height:44,border:"none",marginLeft:e.spacing(4)},buttonSpacer:{marginRight:e.spacing(2)}}})),ue=(0,_.observer)((function(e){var t=e.model,r=ae().classes;return o().createElement(L.Z,{onClick:t.activateTrackSelector,className:r.toggleButton,title:"Open track selector",value:"track_select"},o().createElement(S.TrackSelector,{className:r.buttonSpacer}))}));function ce(e){var t=e.model,r=ae().classes;return o().createElement(o().Fragment,null,o().createElement(B.Z,{variant:"outlined",className:r.panButton,onClick:function(){return t.slide(-.9)}},o().createElement(H.Z,null)),o().createElement(B.Z,{variant:"outlined",className:r.panButton,onClick:function(){return t.slide(.9)}},o().createElement(U.Z,null)))}var le=(0,_.observer)((function(e){var t=e.model,r=ae().classes,n=t.coarseTotalBp;return o().createElement(z.Z,{variant:"body2",color:"textSecondary",className:r.bp},(0,l.getBpDisplayStr)(n))})),se=function(e){var t=e.model,r=ae().classes;return o().createElement("div",{className:r.headerBar},o().createElement(ue,{model:t}),o().createElement("div",{className:r.spacer}),o().createElement(G.Z,{row:!0,className:r.headerForm},o().createElement(ce,{model:t}),o().createElement(ie,{model:t})),o().createElement(le,{model:t}),o().createElement($,{model:t}),o().createElement("div",{className:r.spacer}))};const fe=(0,_.observer)((function(e){var t=e.model;return t.hideHeader?null:t.hideHeaderOverview?o().createElement(se,{model:t}):o().createElement(V.ZP,{model:t},o().createElement(se,{model:t}))}));var pe=r(36254),de=r(43971);function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||Se(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(){ve=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(L([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==he(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function me(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function be(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){me(i,n,o,a,u,"next",e)}function u(e){me(i,n,o,a,u,"throw",e)}a(void 0)}))}}function ge(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Se(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function we(e){return function(e){if(Array.isArray(e))return xe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Se(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Se(e,t){if(e){if("string"==typeof e)return xe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xe(e,t):void 0}}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0},get scaleBarHeight(){return Ie+Re},get headerHeight(){return e.hideHeader?0:e.hideHeaderOverview?Le:Le+Te},get trackHeights(){return(0,l.sum)(e.tracks.map((function(e){return e.displays[0].height})))},get trackHeightsWithResizeHandles(){return this.trackHeights+e.tracks.length*Re},get height(){return this.trackHeightsWithResizeHandles+this.headerHeight+this.scaleBarHeight},get totalBp(){return e.displayedRegions.reduce((function(e,t){return e+t.end-t.start}),0)},get maxBpPerPx(){return this.totalBp/(.9*e.width)},get minBpPerPx(){return.02},get error(){return e.volatileError||this.assemblyErrors},get maxOffset(){return this.displayedRegionsTotalPx-10},get minOffset(){return 30-e.width},get displayedRegionsTotalPx(){return this.totalBp/e.bpPerPx},renderProps:function(){return Ee(Ee({},(0,p.getParentRenderProps)(e)),{},{bpPerPx:e.bpPerPx,highResolutionScaling:(0,a.getConf)((0,l.getSession)(e),"highResolutionScaling")})},searchScope:function(t){return{assemblyName:t,includeAggregateIndexes:!0,tracks:e.tracks}},getTrack:function(t){return e.tracks.find((function(e){return e.configuration.trackId===t}))},rankSearchResults:function(t){var r,n=new Set(e.tracks.map((function(e){return e.configuration.trackId}))),o=ge(t);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.has(i.trackId)&&i.updateScore(i.getScore()+1)}}catch(e){o.e(e)}finally{o.f()}return t},rewriteOnClicks:function(t,r){var n=this;r.forEach((function(r){if("subMenu"in r&&n.rewriteOnClicks(t,r.subMenu),"onClick"in r){var o=r.onClick;r.onClick=function(){for(var r=arguments.length,n=new Array(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:t.width/2,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=(0,l.clamp)(e,t.minBpPerPx,t.maxBpPerPx);if(o===t.bpPerPx)return o;var i=t.bpPerPx;return Math.abs(i-o)<1e-6?(console.warn("zoomTo bpPerPx rounding error"),i):(t.bpPerPx=o,this.scrollTo(Math.round((t.offsetPx+r)*i/o-(n?t.width/2:r))),o)},setOffsets:function(e,r){t.leftOffset=e,t.rightOffset=r},setSearchResults:function(e,r,n){(0,l.getSession)(t).queueDialog((function(o){return[_e,{model:t,searchResults:e,searchQuery:r,handleClose:o,assemblyName:n}]}))},setNewView:function(e,t){this.zoomTo(e),this.scrollTo(t)},horizontallyFlip:function(){t.displayedRegions=(0,h.cast)(we(t.displayedRegions).reverse().map((function(e){return Ee(Ee({},e),{},{reversed:!e.reversed})}))),this.scrollTo(t.totalBp/t.bpPerPx-t.offsetPx-t.width)},showTrack:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.pluggableConfigSchemaType("track"),a=(0,h.resolveIdentifier)(i,(0,h.getRoot)(t),r);if(!a)throw new Error('Could not resolve identifier "'.concat(r,'"'));var u=e.getTrackType(null==a?void 0:a.type);if(!u)throw new Error("Unknown track type ".concat(a.type));var c=e.getViewType(t.type),l=new Set(c.displayTypes.map((function(e){return e.name}))),s=a.displays.find((function(e){return l.has(e.type)}));if(!s)throw new Error("Could not find a compatible display for view type ".concat(t.type));var f=t.tracks.filter((function(e){return e.configuration===a}));if(0===f.length){var p=u.stateModel.create(Ee(Ee({},n),{},{type:a.type,configuration:a,displays:[Ee({type:s.type,configuration:s},o)]}));return t.tracks.push(p),p}return f[0]},hideTrack:function(r){var n=e.pluggableConfigSchemaType("track"),o=(0,h.resolveIdentifier)(n,(0,h.getRoot)(t),r),i=t.tracks.filter((function(e){return e.configuration===o}));return(0,d.transaction)((function(){return i.forEach((function(e){return t.tracks.remove(e)}))})),i.length}}})).actions((function(e){return{moveTrack:function(t,r){var n=e.tracks.findIndex((function(e){return e.id===t}));if(-1===n)throw new Error("Track ID ".concat(t," not found"));var o=e.tracks.findIndex((function(e){return e.id===r}));if(-1===o)throw new Error("Track ID ".concat(r," not found"));var i=(0,h.getSnapshot)(e.tracks[n]);e.tracks.splice(n,1),e.tracks.splice(o,0,i)},closeView:function(){var t=(0,l.getContainingView)(e);t?(0,l.isViewContainer)(t)&&t.removeView(e):(0,l.getSession)(e).removeView(e)},toggleTrack:function(t){e.hideTrack(t)||e.showTrack(t)},setTrackLabels:function(t){localStorage.setItem("lgv-trackLabels",t),e.trackLabels=t},toggleCenterLine:function(){e.showCenterLine=!e.showCenterLine},setDisplayedRegions:function(t){e.displayedRegions=(0,h.cast)(t),e.zoomTo(e.bpPerPx)},activateTrackSelector:function(){if("hierarchical"===e.trackSelectorType){var t=(0,l.getSession)(e);if((0,l.isSessionModelWithWidgets)(t)){var r=t.addWidget("HierarchicalTrackSelectorWidget","hierarchicalTrackSelector",{view:e});return t.showWidget(r),r}}throw new Error("invalid track selector type ".concat(e.trackSelectorType))},getSelectedRegions:function(t,r){var n=(0,h.getSnapshot)(e),o=v().create(Ee(Ee({},n),{},{interRegionPaddingWidth:e.interRegionPaddingWidth}));return o.setVolatileWidth(e.width),o.moveTo(t,r),o.dynamicBlocks.contentBlocks.map((function(e){return Ee(Ee({},e),{},{start:Math.floor(e.start),end:Math.ceil(e.end)})}))},afterDisplayedRegionsSet:function(t){e.afterDisplayedRegionsSetCallbacks.push(t)},horizontalScroll:function(t){var r=e.offsetPx;return e.scrollTo(e.offsetPx+t)-r},center:function(){var t=e.totalBp/2/e.bpPerPx;e.scrollTo(Math.round(t-e.width/2))},showAllRegions:function(){e.zoomTo(e.maxBpPerPx),this.center()},showAllRegionsInAssembly:function(t){var r=(0,l.getSession)(e),n=r.assemblyManager;if(!t){var o=new Set(e.displayedRegions.map((function(e){return e.assemblyName})));if(o.size>1)return void r.notify("Can't perform operation with multiple assemblies currently");t=we(o)[0]}var i=n.get(t);if(i){var a=i.regions;a&&(this.setDisplayedRegions(a),e.zoomTo(e.maxBpPerPx),this.center())}},setDraggingTrackId:function(t){e.draggingTrackId=t},setScaleFactor:function(t){e.scaleFactor=t},clearView:function(){this.setDisplayedRegions([]),e.tracks.clear(),e.scrollTo(0),e.zoomTo(10)},exportSvg:function(){var t=arguments;return be(ve().mark((function n(){var o,i,a,u,c;return ve().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=t.length>0&&void 0!==t[0]?t[0]:{},n.next=3,Promise.resolve().then(r.bind(r,20546));case 3:return i=n.sent,a=i.renderToSvg,n.next=7,a(e,o);case 7:u=n.sent,c=new Blob([u],{type:"image/svg+xml"}),(0,b.saveAs)(c,o.filename||"image.svg");case 10:case"end":return n.stop()}}),n)})))()}}})).actions((function(e){var t=function(){};return{slide:function(r){var n=ye((0,l.springAnimate)(e.offsetPx,e.offsetPx+e.width*r,e.scrollTo),2),o=n[0],i=n[1];t(),t=i,o()}}})).actions((function(e){var t=function(){};return{zoom:function(r){if(e.zoomTo(e.bpPerPx),!(re.bpPerPx&&e.bpPerPx===e.maxBpPerPx)){var n=e.bpPerPx/r,o=ye((0,l.springAnimate)(1,n,e.setScaleFactor,(function(){e.zoomTo(r),e.setScaleFactor(1)})),2),i=o[0],a=o[1];t(),t=a,i()}}}})).views((function(e){return{get canShowCytobands(){return 1===e.displayedRegions.length&&this.anyCytobandsExist},get showCytobands(){return this.canShowCytobands&&e.showCytobandsSetting},get anyCytobandsExist(){var t=(0,l.getSession)(e).assemblyManager;return e.assemblyNames.some((function(e){var r,n;return null===(n=null===(r=t.get(e))||void 0===r?void 0:r.cytobands)||void 0===n?void 0:n.length}))},get cytobandOffset(){return this.showCytobands?(0,l.measureText)(e.displayedRegions[0].refName,12)+15:0}}})).views((function(e){return{menuItems:function(){var t,r=e.canShowCytobands,n=e.showCytobands,o=(0,l.getSession)(e),i=[{label:"Return to import form",onClick:function(){(0,l.getSession)(e).queueDialog((function(t){return[je,{model:e,handleClose:t}]}))},icon:j.Z}].concat(we((0,l.isSessionWithAddTracks)(o)?[{label:"Sequence search",onClick:function(){(0,l.getSession)(e).queueDialog((function(t){return[Pe,{model:e,handleClose:t}]}))}}]:[]),[{label:"Export SVG",icon:P.Z,onClick:function(){(0,l.getSession)(e).queueDialog((function(t){return[ke,{model:e,handleClose:t}]}))}},{label:"Open track selector",onClick:e.activateTrackSelector,icon:S.TrackSelector},{label:"Horizontally flip",icon:x.Z,onClick:e.horizontallyFlip},{label:"Show...",icon:O.Z,subMenu:[{label:"Show all regions in assembly",onClick:e.showAllRegionsInAssembly},{label:"Show center line",type:"checkbox",checked:e.showCenterLine,onClick:e.toggleCenterLine},{label:"Show header",type:"checkbox",checked:!e.hideHeader,onClick:e.toggleHeader},{label:"Show header overview",type:"checkbox",checked:!e.hideHeaderOverview,onClick:e.toggleHeaderOverview,disabled:e.hideHeader},{label:"Show no tracks active button",type:"checkbox",checked:!e.hideNoTracksActive,onClick:e.toggleNoTracksActive},{label:"Show guidelines",type:"checkbox",checked:e.showGridlines,onClick:e.toggleShowGridlines}].concat(we(r?[{label:"Show ideogram",type:"checkbox",checked:e.showCytobands,onClick:function(){return e.setShowCytobands(!n)}}]:[]))},{label:"Track labels",icon:E.Z,subMenu:[{label:"Overlapping",icon:O.Z,type:"radio",checked:"overlapping"===e.trackLabelsSetting,onClick:function(){return e.setTrackLabels("overlapping")}},{label:"Offset",icon:O.Z,type:"radio",checked:"offset"===e.trackLabelsSetting,onClick:function(){return e.setTrackLabels("offset")}},{label:"Hidden",icon:O.Z,type:"radio",checked:"hidden"===e.trackLabelsSetting,onClick:function(){return e.setTrackLabels("hidden")}}]}]),a=ge(e.trackTypeActions.entries());try{for(a.s();!(t=a.n()).done;){var u=ye(t.value,2),c=u[0],s=u[1];s.length&&(i.push({type:"divider"},{type:"subHeader",label:c}),s.forEach((function(e){return i.push(e)})))}}catch(e){a.e(e)}finally{a.f()}return i}}})).views((function(e){var t,r="";return{get staticBlocks(){var n=(0,f.default)(e),o=JSON.stringify(n);return r!==o&&(t=n,r=o),t},get dynamicBlocks(){return(0,s.default)(e)},get roundedDynamicBlocks(){return this.dynamicBlocks.contentBlocks.map((function(e){return Ee(Ee({},e),{},{start:Math.floor(e.start),end:Math.ceil(e.end)})}))},get visibleLocStrings(){return Ce(this.dynamicBlocks.contentBlocks)},get coarseVisibleLocStrings(){return Ce(e.coarseDynamicBlocks)}}})).actions((function(e){return{setCoarseDynamicBlocks:function(t){e.coarseDynamicBlocks=t.contentBlocks,e.coarseTotalBp=t.totalBp},afterAttach:function(){var t=this;(0,h.addDisposer)(e,(0,d.autorun)((function(){e.initialized&&t.setCoarseDynamicBlocks(e.dynamicBlocks)}),{delay:150})),(0,h.addDisposer)(e,(0,d.autorun)((function(){var t=function(e){return JSON.stringify(e)},r=e.showCytobandsSetting,n=e.showCenterLine;"undefined"!=typeof localStorage&&(localStorage.setItem("lgv-showCytobands",t(r)),localStorage.setItem("lgv-showCenterLine",t(n)))})))}}})).actions((function(e){return{moveTo:function(t,r){(0,m.moveTo)(e,t,r)},navToLocString:function(t,r){var n=this;return be(ve().mark((function o(){var i,a,u,c,s;return ve().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i=e.assemblyNames,a=(0,l.getSession)(e),u=a.assemblyManager,c=u.isValidRefName,!(s=r||i[0])){o.next=7;break}return o.next=7,u.waitForAssembly(s);case 7:return o.abrupt("return",n.navToLocations((0,pe.nT)(t,s,c),s));case 8:case"end":return o.stop()}}),o)})))()},navToLocations:function(t,r){var n=this;return be(ve().mark((function o(){var i,a,u,c,s,f,p,h;return ve().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i=(0,l.getSession)(e),a=i.assemblyManager,o.next=3,(0,d.when)((function(){return void 0!==e.volatileWidth}));case 3:return o.next=5,(0,pe.Gc)(t,a,r);case 5:1===(u=o.sent).length?(c=u[0],s=c.reversed,f=c.parentRegion,p=c.start,h=c.end,e.setDisplayedRegions([Ee({reversed:s},f)]),n.navTo(Ee(Ee({},c),{},{start:(0,l.clamp)(null!=p?p:0,0,f.end),end:(0,l.clamp)(null!=h?h:f.end,0,f.end)}))):(e.setDisplayedRegions(u.map((function(e){return void 0===e.start?e.parentRegion:e}))),e.showAllRegions());case 7:case"end":return o.stop()}}),o)})))()},navTo:function(e){this.navToMultiple([e])},navToMultiple:function(t){if(t.some((function(e){return void 0!==e.start&&void 0!==e.end&&e.start>e.end})))throw new Error("found start greater than end");var r=t.at(0),n=t.at(-1);if(r&&n){var o=e.assemblyNames[0],i=(0,l.getSession)(e).assemblyManager,a=i.get(r.assemblyName||o),u=i.get(n.assemblyName||o),c=(null==a?void 0:a.getCanonicalRefName(r.refName))||r.refName,s=(null==u?void 0:u.getCanonicalRefName(n.refName))||n.refName,f=e.displayedRegions.find((function(e){return e.refName===c})),p=(0,l.findLast)(e.displayedRegions,(function(e){return e.refName===s}));if(!f)throw new Error('could not find a region with refName "'.concat(c,'"'));if(!p)throw new Error('could not find a region with refName "'.concat(s,'"'));var d=void 0===r.start?f.start:r.start,h=void 0===r.end?f.end:r.end,y=void 0===n.start?p.start:n.start,v=void 0===n.end?p.end:n.end,m=e.displayedRegions.findIndex((function(e){return c===e.refName&&d>=e.start&&d<=e.end&&h<=e.end&&h>=e.start})),b=e.displayedRegions.findIndex((function(e){return s===e.refName&&y>=e.start&&y<=e.end&&v<=e.end&&v>=e.start}));if(-1===m||-1===b)throw new Error('could not find a region that contained "'.concat(t.map((function(e){return(0,l.assembleLocString)(e)})),'"'));var g=e.displayedRegions[m],w=e.displayedRegions[b];this.moveTo({index:m,offset:g.reversed?g.end-h:d-g.start},{index:b,offset:w.reversed?w.end-y:v-w.start})}}}})).views((function(e){return{rubberBandMenuItems:function(){return[{label:"Zoom to region",icon:k.Z,onClick:function(){return e.moveTo(e.leftOffset,e.rightOffset)}},{label:"Get sequence",icon:A.Z,onClick:function(){return(0,l.getSession)(e).queueDialog((function(t){return[Ae,{model:e,handleClose:t}]}))}}]},bpToPx:function(t){var r=t.refName,n=t.coord,o=t.regionNumber;return(0,m.bpToPx)({refName:r,coord:n,regionNumber:o,self:e})},centerAt:function(t,r,n){var o=this.bpToPx({refName:r,coord:t,regionNumber:n});void 0!==o&&e.scrollTo(Math.round(o.offsetPx-e.width/2))},pxToBp:function(t){return(0,m.pxToBp)(e,t)},get centerLineInfo(){return e.displayedRegions.length>0?this.pxToBp(e.width/2):void 0}}})).actions((function(e){return{afterCreate:function(){function t(t){(0,l.getSession)(e).focusedViewId===e.id&&(t.ctrlKey||t.metaKey)&&("ArrowLeft"===t.code?(t.preventDefault(),e.slide(-.9)):"ArrowRight"===t.code?(t.preventDefault(),e.slide(.9)):"ArrowUp"===t.code&&1===e.scaleFactor?(t.preventDefault(),e.zoom(e.bpPerPx/2)):"ArrowDown"===t.code&&1===e.scaleFactor&&(t.preventDefault(),e.zoom(2*e.bpPerPx)))}document.addEventListener("keydown",t),(0,h.addDisposer)(e,(function(){document.removeEventListener("keydown",t)}))}}}))}function Ze(e){e.addViewType((function(){return new i.ViewType({name:"LinearGenomeView",displayName:"Linear genome view",stateModel:De(e),ReactComponent:(0,n.lazy)((function(){return Promise.resolve().then(r.bind(r,43971))}))})}))}},20546:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SVGRuler:()=>O,SVGTracks:()=>y,renderToSvg:()=>N,totalHeight:()=>M});var n=r(63313),o=r.n(n),i=r(43695),a=r(72161),u=r(35743),c=r(84396),l=r(60285),s=r(86127);function f(e){var t=e.width,r=e.height,n=e.shift,i=(0,s.Z)();return o().createElement("rect",{width:t+2*n,height:r,fill:(0,u.stripAlpha)(i.palette.background.default)})}var p=r(61169);function d(e){var t=e.model,r=e.height,n=t.dynamicBlocks,i=t.offsetPx,a=t.interRegionPaddingWidth;return o().createElement(o().Fragment,null,n.contentBlocks.slice(1).map((function(e){return o().createElement("rect",{key:e.key,x:e.offsetPx-i-a,width:a,y:0,height:r,fill:"grey"})})))}function h(e){var t=e.trackLabels,r=e.trackName,n=e.fontSize,i=e.trackLabelOffset,a=e.x,c=(0,s.Z)().palette.text.primary,l="overlay"===t?5:0,f="offset"===t?5:0,p=(0,u.coarseStripHTML)(r);return"none"!==t?o().createElement("g",null,"left"===t?o().createElement("text",{x:i-40,y:20,fill:c,fontSize:n,dominantBaseline:"hanging",textAnchor:"end"},p):o().createElement("text",{x:a+l,y:f,fill:c,fontSize:n,dominantBaseline:"hanging"},p)):null}function y(e){var t=e.displayResults,r=e.model,n=e.offset,i=e.textHeight,a=e.fontSize,c=e.trackLabels,l=void 0===c?"offset":c,s=e.trackLabelOffset,f=void 0===s?0:s,y=(0,u.getSession)(r),v="offset"===l?i:0;return o().createElement(o().Fragment,null,t.map((function(e){var t=e.track,i=e.result,u=n,c=t.configuration,s=(0,p.getTrackName)(c,y),m=t.displays[0],b=Math.max(-r.offsetPx,0);return n+=m.height+v,o().createElement("g",{key:c.trackId,transform:"translate(0 ".concat(u,")")},o().createElement("g",{transform:"translate(".concat(f," ").concat(v,")")},o().createElement(d,{model:r,height:m.height}),i),o().createElement(h,{trackName:s,fontSize:a,trackLabels:l,trackLabelOffset:f,x:b}))})))}var v=r(63342),m=r.n(v),b=r(88056),g=r(71185),w=r(52384),S=r(36254);function x(e){var t=e.start,r=e.end,n=e.bpPerPx,i=e.reversed,a=void 0!==i&&i,c=e.major,l=void 0===c||c,f=e.minor,p=void 0===f||f,d=e.hideText,h=void 0!==d&&d,y=(0,S.Cz)(t,r,n,l,p),v=(0,s.Z)(),m=(0,u.stripAlpha)(v.palette.text.secondary);return o().createElement(o().Fragment,null,y.map((function(e){var i=(a?r-e.base:e.base-t)/n;return o().createElement("line",{key:"tick-"+e.base,x1:i,x2:i,y1:0,y2:"major"===e.type?6:4,strokeWidth:1,stroke:m})})),h?null:y.filter((function(e){return"major"===e.type})).map((function(e){var i=(a?r-e.base:e.base-t)/n;return o().createElement("text",{key:"label-".concat(e.base),x:i-3,y:18,fontSize:11,fill:m},(0,u.getTickDisplayStr)(e.base+1,n))})))}function O(e){var t=e.model,r=e.fontSize,n=t.dynamicBlocks.contentBlocks,i=t.offsetPx,a=t.bpPerPx,c=n.length<5,l=(0,s.Z)(),f=(0,u.stripAlpha)(l.palette.text.primary);return o().createElement(o().Fragment,null,o().createElement(d,{model:t,height:30}),n.map((function(e){var t=e.start,n=e.end,u=e.key,l=e.reversed,s=e.offsetPx,p=e.refName,d=e.widthPx,h=s-i,y="clip-".concat(u);return o().createElement("g",{key:u},o().createElement("defs",null,o().createElement("clipPath",{id:y},o().createElement("rect",{x:0,y:0,width:d,height:100}))),o().createElement("g",{transform:"translate(".concat(h," 0)")},o().createElement("g",{clipPath:"url(#".concat(y,")")},o().createElement("text",{x:4,y:r,fontSize:r,fill:f},p),o().createElement("g",{transform:"translate(0 20)"},o().createElement(x,{hideText:!c,start:t,end:n,bpPerPx:a,reversed:l})))))})))}function E(e){var t=e.model,r=e.fontSize,n=t.offsetPx,i=t.dynamicBlocks,a=i.totalWidthPxWithoutBorders,c=i.totalBp,l=(0,s.Z)(),f=(0,u.getBpDisplayStr)(c),p=Math.max(-n,0),d=p+a,h=(0,u.stripAlpha)(l.palette.text.secondary),y=p+(d-p)/2,v=r;return o().createElement(o().Fragment,null,o().createElement("line",{x1:p,x2:d,y1:10,y2:10,stroke:h}),o().createElement("line",{x1:p,x2:p,y1:5,y2:15,stroke:h}),o().createElement("line",{x1:d,x2:d,y1:5,y2:15,stroke:h}),o().createElement("text",{x:y,y:v,textAnchor:"middle",dominantBaseline:"hanging",fontSize:r,fill:h},f))}function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t1?"":c[0],h=p.get(d),y=(0,s.Z)(),v=(0,u.stripAlpha)(y.palette.text.primary),S=m().create({displayedRegions:JSON.parse(JSON.stringify(f)),interRegionPaddingWidth:0,minimumBlockWidth:t.minimumBlockWidth}),x=t.dynamicBlocks.contentBlocks;if(!x.length)return null;S.setVolatileWidth(a),S.showAllRegions();var j=S.dynamicBlocks.contentBlocks[0],P=x.at(0),A=x.at(-1),_=S.bpToPx(k(k({},P),{},{coord:P.reversed?P.end:P.start}))||0,C=S.bpToPx(k(k({},A),{},{coord:A.reversed?A.start:A.end}))||0,L=+l*n;return o().createElement("g",{id:"header"},o().createElement("text",{x:0,y:0,dominantBaseline:"hanging",fontSize:r,fill:v},d),l?o().createElement("g",{transform:"translate(0 ".concat(i,")")},o().createElement(g.Z,{overview:S,assembly:h,block:j}),o().createElement("rect",{stroke:"red",fill:"rgb(255,0,0,0.1)",width:Math.max(C-_,.5),height:b.VH-1,x:_,y:.5}),o().createElement("g",{transform:"translate(0,".concat(b.VH,")")},o().createElement(w.mg,{overview:S,model:t,useOffset:!1}))):null,o().createElement("g",{transform:"translate(0 ".concat(r+L,")")},o().createElement(E,{model:t,fontSize:r})),o().createElement("g",{transform:"translate(0 ".concat(i+L,")")},o().createElement(O,{model:t,fontSize:r})))}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function C(){C=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(I([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==_(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t{"use strict";r.d(t,{Cz:()=>p,Gc:()=>d,_S:()=>f,nT:()=>y});var n=r(35743);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:A(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(i,a,u,c){var l=d(e[i],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=n);)i*=2.5;var a=(i=Math.max(i,5))/e,u=0;return!(i%10)&&a/10>=r?u=i/10:!(i%5)&&a/5>=r?u=i/5:!(i%2)&&a/2>=r&&(u=i/2),{majorPitch:i,minorPitch:u}}function p(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=f(r,60,15),a=e,u=t;if(null===a||null===u)return[];if(r<0){var c=[u,a];a=c[0],u=c[1]}a-=Math.abs(20*r)-1,u+=Math.abs(20*r)+1;for(var l=i.minorPitch||i.majorPitch,s=0,p=[],d=Math.floor(a/l)*l;d0&&void 0!==o[0]?o[0]:[],r=o.length>1?o[1]:void 0,n=o.length>2?o[2]:void 0,e.abrupt("return",Promise.all(t.map(function(){var e=s(i().mark((function e(t){var o,a,c,l,s,f;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.assemblyName||n){e.next=3;break}throw new Error("no assembly provided");case 3:return e.next=5,r.waitForAssembly(o);case 5:if(a=e.sent,c=t.refName,a){e.next=9;break}throw new Error("assembly ".concat(o," not found"));case 9:if(l=a.regions){e.next=12;break}throw new Error("regions not loaded yet for ".concat(o));case 12:if(s=a.getCanonicalRefName(t.refName)){e.next=15;break}throw new Error("Could not find refName ".concat(c," in ").concat(a.name));case 15:if(f=l.find((function(e){return e.refName===s}))){e.next=18;break}throw new Error("Could not find refName ".concat(c," in ").concat(o));case 18:return e.abrupt("return",u(u({},t),{},{assemblyName:o,parentRegion:f}));case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 4:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}function y(e,t,r){var o,i,a=e.split(/(\s+)/).map((function(e){return e.trim()})).filter((function(e){return!!e}));try{return a.map((function(e){return(0,n.parseLocString)(e,(function(e){return r(e,t)}))}))}catch(e){var u=(i=3,function(e){if(Array.isArray(e))return e}(o=a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(o,i)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=u[0],s=u[1],f=u[2];if("".concat(e).match(/Unknown reference sequence/)&&Number.isInteger(+s)&&Number.isInteger(+f))return[(0,n.parseLocString)(l+":"+s+".."+f,(function(e){return r(e,t)}))];throw e}}},37997:(e,t,r)=>{"use strict";r.d(t,{fV:()=>Ke,qb:()=>$,rK:()=>G,Ek:()=>De,eW:()=>_e,fU:()=>u,ZP:()=>wt,RH:()=>it,l0:()=>pt});var n=r(95217),o=r(35743),i=r(67394),a=r(2415);const u=(0,a.ConfigurationSchema)("BaseLinearDisplay",{maxFeatureScreenDensity:{type:"number",description:"maximum features per pixel that is displayed in the view, used if byte size estimates not available",defaultValue:.3},fetchSizeLimit:{type:"number",defaultValue:1e6,description:"maximum data to attempt to download for a given track, used if adapter doesn't specify one"},height:{type:"number",defaultValue:100,description:"default height for the track"},mouseover:{type:"string",description:"text to display when the cursor hovers over a feature",defaultValue:"jexl:get(feature,'name')",contextVariable:["feature"]}},{explicitIdentifier:"displayId"});var c=r(77043),l=r(94278),s=r(61169),f=r(72161),p=r(82123),d=r(87576),h=r(63313),y=r.n(h),v=r(40828),m=r(86127),b=r(76835),g=r(60285),w=r(45131),S=r(86094),x=(0,b.makeStyles)()({linearBlocks:{whiteSpace:"nowrap",textAlign:"left",position:"absolute",minHeight:"100%",display:"flex"},heightOverflowed:{position:"absolute",color:"rgb(77,77,77)",borderBottom:"2px solid rgb(77,77,77)",textShadow:"white 0px 0px 1px",whiteSpace:"nowrap",width:"100%",fontWeight:"bold",textAlign:"center",zIndex:2e3,boxSizing:"border-box"}}),O=(0,v.observer)((function(e){var t=e.model,r=x().classes,n=t.blockDefinitions,o=t.blockState;return y().createElement(y().Fragment,null,n.map((function(e){if(e instanceof w.ContentBlock){var n=o.get(e.key);return y().createElement(S.b0,{block:e,key:"".concat(t.id,"-").concat(e.key)},n&&n.ReactComponent?y().createElement(n.ReactComponent,{model:n}):null,n&&n.maxHeightReached?y().createElement("div",{className:r.heightOverflowed,style:{top:n.layout.getTotalHeight()-16,pointerEvents:"none",height:16}},"Max height reached"):null)}if(e instanceof w.ElidedBlock)return y().createElement(S.sh,{key:"".concat(t.id,"-").concat(e.key),width:e.widthPx});if(e instanceof w.InterRegionPaddingBlock)return y().createElement(S.n2,{key:e.key,width:e.widthPx,style:{background:"none"},boundary:"boundary"===e.variant});throw new Error("invalid block type ".concat(JSON.stringify(e)))})))})),E=(0,v.observer)((function(e){var t=e.model,r=x().classes,n=t.blockDefinitions,i=(0,o.getContainingView)(t);return y().createElement("div",{className:r.linearBlocks,style:{left:n.offsetPx-i.offsetPx}},y().createElement(O,{model:t}))}));const j=E;var P=r(41878),k=r(96784),A=r(92503);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ue(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function ce(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ue(i,n,o,a,u,"next",e)}function u(e){ue(i,n,o,a,u,"throw",e)}a(void 0)}))}}const le=p.types.model("BlockState",{key:p.types.string,region:Y.Region,reloadFlag:0,isLeftEndOfDisplayedRegion:!1,isRightEndOfDisplayedRegion:!1}).volatile((function(){return{renderInProgress:void 0,filled:!1,reactElement:void 0,features:void 0,layout:void 0,status:"",error:void 0,message:void 0,maxHeightReached:!1,ReactComponent:re,renderProps:void 0}})).actions((function(e){var t;return{doReload:function(){e.reloadFlag=e.reloadFlag+1},afterAttach:function(){var t=this,r=(0,o.getContainingDisplay)(e);setTimeout((function(){(0,p.isAlive)(e)&&(0,o.makeAbortableReaction)(e,se,fe,{name:"".concat(r.id,"/").concat((0,o.assembleLocString)(e.region)," rendering"),delay:r.renderDelay,fireImmediately:!0},t.setLoading,t.setRendered,t.setError)}),r.renderDelay)},setStatus:function(t){e.status=t},setLoading:function(r){void 0===t||t.signal.aborted||t.abort(),e.filled=!1,e.message=void 0,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.error=void 0,e.maxHeightReached=!1,e.renderProps=void 0,t=r},setMessage:function(r){t&&!t.signal.aborted&&t.abort(),e.filled=!1,e.message=r,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.error=void 0,e.maxHeightReached=!1,e.renderProps=void 0,t=void 0},setRendered:function(r){if(r){var n=r.reactElement,o=r.features,i=r.layout,a=r.maxHeightReached,u=r.renderProps;e.filled=!0,e.message=void 0,e.reactElement=n,e.features=o,e.layout=i,e.error=void 0,e.maxHeightReached=a,e.renderProps=u,t=void 0}},setError:function(r){console.error(r),t&&!t.signal.aborted&&t.abort(),e.filled=!1,e.message=void 0,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.maxHeightReached=!1,e.error=r,e.renderProps=void 0,t=void 0,(0,K.isRetryException)(r)&&this.reload()},reload:function(){e.renderInProgress=void 0,e.filled=!1,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.error=void 0,e.message=void 0,e.maxHeightReached=!1,e.ReactComponent=re,e.renderProps=void 0,(0,p.getParent)(e,2).reload()},beforeDestroy:function(){ce(ae().mark((function r(){var n,i,a,u,c,l;return ae().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,t&&!t.signal.aborted&&t.abort(),n=(0,o.getContainingDisplay)(e),i=(0,o.getSession)(e),a=i.rpcManager,u=n.rendererType,c=se((0,p.cast)(e)),!(l=c.renderArgs)){r.next=9;break}return r.next=9,u.freeResourcesInClient(a,JSON.parse(JSON.stringify(l)));case 9:r.next=14;break;case 11:r.prev=11,r.t0=r.catch(0),console.error("Error while destroying block",r.t0);case 14:case"end":return r.stop()}}),r,null,[[0,11]])})))()}}}));function se(e,t){try{var r=t||(0,o.getContainingDisplay)(e),n=(0,o.getSession)(r),i=n.assemblyManager,u=n.rpcManager,c=r.adapterConfig,l=r.rendererType,f=r.error,d=r.parentTrack,h=(0,s.getTrackAssemblyNames)(d),y=e.region.assemblyName;if(!h.includes(y)&&!h.some((function(e){var t;return null===(t=i.get(e))||void 0===t?void 0:t.hasName(y)})))throw new Error("region assembly (".concat(y,") does not match track assemblies (").concat(h,")"));var v=r.renderProps(),m=v.config;(0,a.readConfObject)(m);var b=(0,s.getRpcSessionId)(r),g=(0,o.getContainingView)(r).id;return{rendererType:l,rpcManager:u,renderProps:v,cannotBeRenderedReason:r.regionCannotBeRendered(e.region),displayError:f,renderArgs:{statusCallback:function(t){(0,p.isAlive)(e)&&e.setStatus(t)},assemblyName:e.region.assemblyName,regions:[(0,p.getSnapshot)(e.region)],adapterConfig:c,rendererType:l.name,sessionId:b,layoutId:g,blockKey:e.key,reloadFlag:e.reloadFlag,timeout:1e6}}}catch(e){return{displayError:e}}}function fe(e,t,r){return pe.apply(this,arguments)}function pe(){return(pe=ce(ae().mark((function e(t,r,n){var i,a,u,c,l,s,f,d,h,y,v;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(i=t.rendererType,a=t.renderProps,u=t.rpcManager,c=t.renderArgs,l=t.cannotBeRenderedReason,s=t.displayError,(0,p.isAlive)(n)){e.next=5;break}return e.abrupt("return",void 0);case 5:if(!s){e.next=8;break}return n.setError(s),e.abrupt("return",void 0);case 8:if(!l){e.next=11;break}return n.setMessage(l),e.abrupt("return",void 0);case 11:if(!a.notReady){e.next=13;break}return e.abrupt("return",void 0);case 13:return e.next=15,i.renderInClient(u,ie(ie(ie({},c),a),{},{viewParams:(0,o.getViewParams)(n),signal:r}));case 15:return f=e.sent,d=f.reactElement,h=f.features,y=f.layout,v=f.maxHeightReached,e.abrupt("return",{reactElement:d,features:h,layout:y,maxHeightReached:v,renderProps:a});case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(e){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(e)}function he(){he=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(L([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==de(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ye(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function ve(e,t){var r="undefined"==typeof jest;return"clip-".concat(r?e:"jest","-").concat(t)}function me(e){return be.apply(this,arguments)}function be(){var e;return e=he().mark((function e(t){var r,n,i,a,u,c;return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,o.getContainingView)(t),n=r.staticBlocks.contentBlocks,i=(0,o.getSession)(t),a=i.rpcManager,u=t.adapterConfig){e.next=6;break}return e.abrupt("return",{});case 6:return c=(0,s.getRpcSessionId)(t),e.abrupt("return",a.call(c,"CoreGetFeatureDensityStats",{sessionId:c,regions:n,adapterConfig:u,statusCallback:function(e){(0,p.isAlive)(t)&&t.setMessage(e)}}));case 8:case"end":return e.stop()}}),e)})),be=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ye(i,n,o,a,u,"next",e)}function u(e){ye(i,n,o,a,u,"throw",e)}a(void 0)}))},be.apply(this,arguments)}function ge(e){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oe(e){for(var t=1;t=Ae})))}).volatile((function(){return{scrollTop:0}})).views((function(e){return{get height(){var t;return null!==(t=e.heightPreConfig)&&void 0!==t?t:(0,a.getConf)(e,"height")}}})).actions((function(e){return{setScrollTop:function(t){e.scrollTop=t},setHeight:function(t){return e.heightPreConfig=Math.max(t,Ae),e.height},resizeHeight:function(t){var r=e.height;return this.setHeight(e.height+t)-r}}}))}const Ce=function(e){var t=e.model,r=t.regionTooLargeReason;return y().createElement(G,{severity:"warning",action:function(){t.setFeatureDensityStatsLimit(t.featureDensityStats),t.reload()},buttonText:"Force load",message:[r,"Zoom in to see features or force load (may be slow)"].filter((function(e){return!!e})).join(". ")})};function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function Te(){Te=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(L([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Le(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Ie(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Re(){var e;return e=Te().mark((function e(t){var r,n,i;return Te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(n=(0,o.getContainingView)(t)).initialized&&n.staticBlocks.contentBlocks.length&&n.bpPerPx!==t.currStatsBpPerPx&&!t.error){e.next=4;break}return e.abrupt("return");case 4:if(void 0===(null===(r=t.featureDensityStats)||void 0===r?void 0:r.featureDensity)){e.next=7;break}return t.setCurrStatsBpPerPx(n.bpPerPx),e.abrupt("return");case 7:return t.clearFeatureDensityStats(),t.setCurrStatsBpPerPx(n.bpPerPx),e.next=11,t.getFeatureDensityStats();case 11:i=e.sent,(0,p.isAlive)(t)&&t.setFeatureDensityStats(i),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(0),!(0,o.isAbortException)(e.t0)&&(0,p.isAlive)(t)&&(console.error(e.t0),t.setError(e.t0));case 18:case"end":return e.stop()}}),e,null,[[0,15]])})),Re=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Ie(i,n,o,a,u,"next",e)}function u(e){Ie(i,n,o,a,u,"throw",e)}a(void 0)}))},Re.apply(this,arguments)}function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}function Ne(){Ne=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new C(n||[]);return o(a,"_invoke",{value:P(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(L([])));x&&x!==r&&n.call(x,a)&&(w=x);var O=g.prototype=m.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Me(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function P(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Fe(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function De(){return p.types.model({userBpPerPxLimit:p.types.maybe(p.types.number),userByteSizeLimit:p.types.maybe(p.types.number)}).volatile((function(){return{featureDensityStatsP:void 0,featureDensityStats:void 0,currStatsBpPerPx:0}})).views((function(e){return{get currentBytesRequested(){var t;return(null===(t=e.featureDensityStats)||void 0===t?void 0:t.bytes)||0},get currentFeatureScreenDensity(){var t,r=(0,o.getContainingView)(e);return((null===(t=e.featureDensityStats)||void 0===t?void 0:t.featureDensity)||0)*r.bpPerPx},get maxFeatureScreenDensity(){return(0,a.getConf)(e,"maxFeatureScreenDensity")},get featureDensityStatsReady(){var t=(0,o.getContainingView)(e);return!(e.currStatsBpPerPx!==t.bpPerPx||!e.featureDensityStats&&!e.userBpPerPxLimit)},get maxAllowableBytes(){var t;return e.userByteSizeLimit||(null===(t=e.featureDensityStats)||void 0===t?void 0:t.fetchSizeLimit)||(0,a.getConf)(e,"fetchSizeLimit")}}})).actions((function(e){return{afterAttach:function(){(0,p.addDisposer)(e,(0,f.autorun)((function(){return function(e){return Re.apply(this,arguments)}(e)})))}}})).actions((function(e){return{setCurrStatsBpPerPx:function(t){e.currStatsBpPerPx=t},setFeatureDensityStatsLimit:function(t){var r=(0,o.getContainingView)(e);(null==t?void 0:t.bytes)?e.userByteSizeLimit=t.bytes:e.userBpPerPxLimit=r.bpPerPx},getFeatureDensityStats:function(){var t,r=this;return(t=Ne().mark((function t(){return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.featureDensityStatsP||(e.featureDensityStatsP=me(e).catch((function(t){throw(0,p.isAlive)(e)&&r.setFeatureDensityStatsP(void 0),t}))),t.abrupt("return",e.featureDensityStatsP);case 2:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(e){Fe(i,n,o,a,u,"next",e)}function u(e){Fe(i,n,o,a,u,"throw",e)}a(void 0)}))})()},setFeatureDensityStatsP:function(t){e.featureDensityStatsP=t},setFeatureDensityStats:function(t){e.featureDensityStats=t},clearFeatureDensityStats:function(){e.featureDensityStatsP=void 0,e.featureDensityStats=void 0}}})).views((function(e){return{get regionTooLarge(){var t=(0,o.getContainingView)(e);return!(!e.featureDensityStatsReady||t.dynamicBlocks.totalBp<2e4)&&(e.currentBytesRequested>e.maxAllowableBytes||(e.userBpPerPxLimit?t.bpPerPx>e.userBpPerPxLimit:e.currentFeatureScreenDensity>e.maxFeatureScreenDensity))},get regionTooLargeReason(){var t,r=e.currentBytesRequested,n=e.maxAllowableBytes;return r&&r>n?"Requested too much data (".concat((t=r,Math.floor(t/1e6)>0?"".concat(Number.parseFloat((t/1e6).toPrecision(3))," Mb"):Math.floor(t/1e3)>0?"".concat(Number.parseFloat((t/1e3).toPrecision(3))," Kb"):"".concat(Math.floor(t)," bytes")),")"):""}}})).views((function(e){return{regionCannotBeRenderedText:function(t){return e.regionTooLarge?"Force load to see features":""},regionCannotBeRendered:function(t){return e.regionTooLarge?y().createElement(Ce,{model:e}):null}}}))}function Ze(e){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}var Be=["height"],ze=["blockState"];function Ge(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function He(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function qe(e){return function(e){if(Array.isArray(e))return Ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$e(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Qe(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){We(i,n,o,a,u,"next",e)}function u(e){We(i,n,o,a,u,"throw",e)}a(void 0)}))}}function $e(e,t){if(e){if("string"==typeof e)return Ye(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ye(e,t):void 0}}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.blockState.values());try{for(n.s();!(t=n.n()).done;){var o=t.value;(null==o?void 0:o.features)&&r.push(o.features)}}catch(e){n.e(e)}finally{n.f()}return new l.Z(r)},get featureUnderMouse(){var t=e.featureIdUnderMouse;return t?this.features.get(t):void 0},getFeatureOverlapping:function(t,r,n){var o,i;return null===(i=null===(o=e.blockState.get(t))||void 0===o?void 0:o.layout)||void 0===i?void 0:i.getByCoord(r,n)},getFeatureByID:function(t,r){var n,o;return null===(o=null===(n=e.blockState.get(t))||void 0===n?void 0:n.layout)||void 0===o?void 0:o.getByID(r)},searchFeatureByID:function(t){var r;return e.blockState.forEach((function(e){var n,o=null===(n=null==e?void 0:e.layout)||void 0===n?void 0:n.getByID(t);o&&(r=o)})),r}}})).actions((function(e){return{addBlock:function(t,r){e.blockState.set(t,le.create({key:t,region:r.toRegion()}))},deleteBlock:function(t){e.blockState.delete(t)},selectFeature:function(t){var r=(0,o.getSession)(e);if((0,o.isSessionModelWithWidgets)(r)){var n=r.addWidget("BaseFeatureWidget","baseFeature",{view:(0,o.getContainingView)(e),track:(0,o.getContainingTrack)(e),featureData:t.toJSON()});r.showWidget(n)}(0,o.isSelectionContainer)(r)&&r.setSelection(t)},clearFeatureSelection:function(){(0,o.getSession)(e).clearSelection()},setFeatureIdUnderMouse:function(t){e.featureIdUnderMouse=t},setContextMenuFeature:function(t){e.contextMenuFeature=t}}})).actions((function(e){var t=e.reload;return{reload:function(){return Qe(Ve().mark((function r(){return Ve().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e.setError(),e.setCurrStatsBpPerPx(0),e.clearFeatureDensityStats(),qe(e.blockState.values()).map((function(e){return e.doReload()})),t();case 5:case"end":return r.stop()}}),r)})))()}}})).views((function(e){return{trackMenuItems:function(){return[]},contextMenuItems:function(){return qe(e.contextMenuFeature?[{label:"Open feature details",icon:d.Z,onClick:function(){e.contextMenuFeature&&e.selectFeature(e.contextMenuFeature)}}]:[])},renderProps:function(){return He(He({},(0,s.getParentRenderProps)(e)),{},{notReady:!e.featureDensityStatsReady,rpcDriverName:e.rpcDriverName,displayModel:e,onFeatureClick:function(t,r){var n=r||e.featureIdUnderMouse;if(n){var o=e.features.get(n);o&&e.selectFeature(o)}else e.clearFeatureSelection()},onClick:function(){e.clearFeatureSelection()},onFeatureContextMenu:function(t,r){var n=r||e.featureIdUnderMouse;n?e.setContextMenuFeature(e.features.get(n)):e.clearFeatureSelection()},onMouseMove:function(t,r){e.setFeatureIdUnderMouse(r)},onMouseLeave:function(t){e.setFeatureIdUnderMouse(void 0)},onContextMenu:function(){e.setContextMenuFeature(void 0),e.clearFeatureSelection()}})}}})).actions((function(e){return{renderSvg:function(t){return Qe(Ve().mark((function r(){return Ve().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Pe(e,t));case 1:case"end":return r.stop()}}),r)})))()},afterAttach:function(){(0,p.addDisposer)(e,(0,f.autorun)((function(){var t={};(0,o.getContainingView)(e).initialized&&(e.blockDefinitions.contentBlocks.forEach((function(r){t[r.key]=!0,e.blockState.has(r.key)||e.addBlock(r.key,r)})),e.blockState.forEach((function(r,n){t[n]||e.deleteBlock(n)})))})))}}})).preProcessSnapshot((function(e){return e?He({heightPreConfig:e.height},Ge(e,Be)):e})).postProcessSnapshot((function(e){var t=e;return t.blockState,Ge(t,ze)})),Je=r(53136);function Xe(e){return(0,a.ConfigurationSchema)("LinearBareDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:u,explicitlyTyped:!0})}function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rt(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function yt(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function vt(e){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vt(e)}function mt(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>f});var n=r(63082),o=r(76743);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(20410),o=r(76743);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,c,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,c)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(63082),o=r(20410),i=r(76743),a=r(42847),u=r(35743),c=r(33860),l=r.n(c),s=r(84997);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==f(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>w});var n=r(20410),o=r(42847),i=r(35743),a=r(90254),u=r(71381);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;rh)){n.next=10;break}return o.complete(),n.abrupt("return");case 10:return y=s.getFeatures(p(p({},e),{},{start:f,end:h}),t),n.next=13,(0,u.z)(y.pipe((0,a.q)()));case 13:if(v=n.sent,m=(null===(c=v[0])||void 0===c?void 0:c.get("seq"))||"",b=r.getConf("search"),g=r.getConf("searchForward"),w=r.getConf("searchReverse"),S=r.getConf("caseInsensitive"),x=new RegExp(b,"g"+(S?"i":"")),b){if(g){O=m.matchAll(x),E=l(O);try{for(E.s();!(j=E.n()).done;)P=j.value,k=f+(P.index||0),(0,i.doesIntersect2)(k,k+b.length,e.start,e.end)&&o.next(new i.SimpleFeature({uniqueId:"".concat(r.id,"-match-").concat(k,"-p"),refName:e.refName,start:k,end:k+P[0].length,name:P[0],strand:1}))}catch(e){E.e(e)}finally{E.f()}}if(w){A=(0,i.revcom)(m).matchAll(x),_=l(A);try{for(_.s();!(C=_.n()).done;)L=C.value,T=h-(L.index||0),(0,i.doesIntersect2)(T,T+b.length,e.start,e.end)&&o.next(new i.SimpleFeature({uniqueId:"".concat(r.id,"-match-").concat(T,"-n"),refName:e.refName,start:T-L[0].length,name:L[0],end:T,strand:-1}))}catch(e){_.e(e)}finally{_.f()}}}o.complete();case 22:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())}},{key:"freeResources",value:function(){}}],r&&v(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),w}(n.BaseFeatureDataAdapter)},68038:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>R});var n=r(20410),o=r(76743),i=r(42847),a=r(20349),u=r(16126),c=r.n(u),l=r(93403),s=r(2858),f=r(80365).Buffer;function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(){d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};l(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==p(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;r>6&3]+g[S>>4&3]+g[S>>2&3]+g[3&S]);var x=w.map((function(e){return e.toLowerCase()})),O=function(){function e(t){var r=t.filehandle,n=t.path;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r)this.filehandle=r;else{if(!n)throw new Error("must supply path or filehandle");this.filehandle=new l.LocalFile(n)}this.isBigEndian=void 0}var t,r,n,o,i,a,u,p,h,b,g,S,O,E;return t=e,r=[{key:"_getParser",value:(E=y(d().mark((function e(t){var r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getParsers();case 2:if(e.t0=t,r=e.sent[e.t0]){e.next=6;break}throw new Error("parser ".concat(t," not found"));case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return E.apply(this,arguments)})},{key:"_detectEndianness",value:(O=y(d().mark((function e(){var t,r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.filehandle.read(f.allocUnsafe(8),0,8,0);case 2:if(t=e.sent,(r=t.buffer).readInt32LE(0)!==m){e.next=9;break}this.isBigEndian=!1,this.version=r.readInt32LE(4),e.next=15;break;case 9:if(r.readInt32BE(0)!==m){e.next=14;break}this.isBigEndian=!0,this.version=r.readInt32BE(4),e.next=15;break;case 14:throw new Error("not a 2bit file");case 15:case"end":return e.stop()}}),e,this)}))),function(){return O.apply(this,arguments)})},{key:"_getParsers",value:(S=y(d().mark((function e(){var t,r,n,o;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._detectEndianness();case 2:return t=this.isBigEndian?"big":"little",r=this.isBigEndian?"be":"le",n=(new s._).endianess(t).uint8("nameLength").string("name",{length:"nameLength"}),n=1===this.version?n.buffer("offsetBytes",{length:8}):n.uint32("offset"),o=(new s._).endianess(t).int32("magic",{assert:function(e){return 440477507===e}}).int32("version",{assert:function(e){return 0===e||1===e}}).uint32("sequenceCount",{assert:function(e){return e>=0}}).uint32("reserved"),e.abrupt("return",{header:o,index:(new s._).endianess(t).uint32("sequenceCount").uint32("reserved").array("index",{length:"sequenceCount",type:n}),record1:(new s._).endianess(t).uint32("dnaSize").uint32("nBlockCount"),record2:(new s._).endianess(t).uint32("nBlockCount").array("nBlockStarts",{length:"nBlockCount",type:"uint32".concat(r)}).array("nBlockSizes",{length:"nBlockCount",type:"uint32".concat(r)}).uint32("maskBlockCount"),record3:(new s._).endianess(t).uint32("maskBlockCount").array("maskBlockStarts",{length:"maskBlockCount",type:"uint32".concat(r)}).array("maskBlockSizes",{length:"maskBlockCount",type:"uint32".concat(r)}).int32("reserved")});case 8:case"end":return e.stop()}}),e,this)}))),function(){return S.apply(this,arguments)})},{key:"getHeader",value:(g=y(d().mark((function e(){var t,r,n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._detectEndianness();case 2:return e.next=4,this.filehandle.read(f.allocUnsafe(16),0,16,0);case 4:return t=e.sent,r=t.buffer,e.next=8,this._getParser("header");case 8:return n=e.sent,e.abrupt("return",n.parse(r).result);case 10:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"getIndex",value:(b=y(d().mark((function e(){var t,r,n,o,i,a,u,l=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader();case 2:return t=e.sent,r=8+t.sequenceCount*(257+(1===this.version?8:4)),e.next=6,this.filehandle.read(f.allocUnsafe(r),0,r,8);case 6:return n=e.sent,o=n.buffer,e.next=10,this._getParser("index");case 10:return i=e.sent,a=i.parse(o).result.index,u={},1===this.version?a.forEach((function(e){var t=e.name,r=e.offsetBytes,n=c().fromBytes(r,!0,!l.isBigEndian);if(n.greaterThan(Number.MAX_SAFE_INTEGER))throw new Error("integer overflow. File offset greater than 2^53-1 encountered. This library can only handle offsets up to 2^53-1.");u[t]=n.toNumber()})):a.forEach((function(e){var t=e.name,r=e.offset;u[t]=r})),e.abrupt("return",u);case 15:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"getSequenceNames",value:(h=y(d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:return t=e.sent,e.abrupt("return",Object.keys(t));case 4:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"getSequenceSizes",value:(p=y(d().mark((function e(){var t,r,n,o,i,a,u=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:return t=e.sent,r=Object.keys(t),n=Object.values(t).map((function(e){return u._getSequenceSize(e)})),e.next=7,Promise.all(n);case 7:for(o=e.sent,i={},a=0;a1&&void 0!==E[1]?E[1]:0,n=E.length>2?E[2]:void 0,e.next=4,this.getIndex();case 4:if(o=e.sent,i=o[t]){e.next=8;break}return e.abrupt("return",void 0);case 8:return e.next=10,this._getSequenceRecord(i);case 10:if(a=e.sent,!(r<0)){e.next=13;break}throw new TypeError("regionStart cannot be less than 0");case 13:return(void 0===n||n>a.dnaSize)&&(n=a.dnaSize),u=this._getOverlappingBlocks(r,n,a.nBlocks.starts,a.nBlocks.sizes),c=this._getOverlappingBlocks(r,n,a.maskBlocks.starts,a.maskBlocks.sizes),l=f.allocUnsafe(Math.ceil((n-r)/4)+1),s=Math.floor(r/4),e.next=20,this.filehandle.read(l,0,l.length,a.dnaPosition+s);case 20:for(p=e.sent,h=p.buffer,y="",v=r;vv,u[0]&&v>=u[0].start&&v=u+n[a]||t<=u){if(void 0!==o){i=a;break}}else void 0===o&&(o=a)}if(void 0===o)return[];void 0===i&&(i=r.length);for(var c=new Array(i-o),l=o;l=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>pe});var n=r(63313),o=r.n(n),i=r(40828),a=r(82015),u=r(80464),c=r(7734),l=r(34213),s=r(97648),f=r(51537),p=r(27558),d=r(5932),h=r(61266),y=r(3449),v=r(35743),m=r(14398),b=r.n(m),g=r(9462);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(i,ae));return o().createElement(a.Z,{"data-testid":"variant-side-drawer"},o().createElement(c.FeatureDetails,ce({feature:s,descriptions:ce(ce({},le),n)},e)),o().createElement(u.Z,null),o().createElement(fe,{feature:s,descriptions:n}),o().createElement(u.Z,null),o().createElement(se,{feature:s,descriptions:n}),o().createElement(u.Z,null),"breakend"===i.type?o().createElement($,{feature:i,locStrings:i.ALT.map((function(e){var t;return(null===(t=(0,l.I)(e))||void 0===t?void 0:t.MatePosition)||""})),model:t}):null,"translocation"===i.type?o().createElement($,{feature:i,model:t,locStrings:["".concat(i.INFO.CHR2[0],":").concat(i.INFO.END)]}):null,o().createElement(A,ce(ce({feature:i},e),{},{descriptions:n})))}))},68451:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(20410),o=r(76743),i=r(42847),a=r(19830),u=r(41589),c=r(34213),l=r(15734);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function y(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,u,"next",e)}function u(e){y(i,n,o,a,u,"throw",e)}a(void 0)}))}}function m(e,t){for(var r=0;r536870888)){e.next=14;break}throw new Error("Data exceeds maximum string length (512MB)");case 14:i=(new TextDecoder).decode(n),c=w(i),l=c.header,s=c.lines,d={},y=f(s.map((function(e,t){var r,n,o,i=(n=e.split("\t"),o=8,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(n,o)||p(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],u=i[1],c=i[3],l=i[7],s=+u-1,f=s+c.length;return{line:e,refName:a,start:s,end:+((null===(r=l.match(/END=(\d+)/))||void 0===r?void 0:r[1].trim())||f),id:t}})));try{for(y.s();!(v=y.n()).done;)m=v.value,b=m.refName,d[b]||(d[b]=new a.ZP),d[b].insert([m.start,m.end],m)}catch(e){y.e(e)}finally{y.f()}return e.abrupt("return",{header:l,intervalTree:d});case 20:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"setup",value:(d=v(h().mark((function e(){var t=this;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.vcfFeatures||(this.vcfFeatures=this.setupP().catch((function(e){throw t.vcfFeatures=void 0,e}))),e.abrupt("return",this.vcfFeatures);case 2:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getRefNames",value:(n=v(h().mark((function e(){var t,r;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,this.setup();case 3:return t=e.sent,r=t.intervalTree,e.abrupt("return",Object.keys(r));case 6:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var r=v(h().mark((function r(n){var o,i,a,u,s,f,p,d;return h().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i=e.start,a=e.end,u=e.refName,r.next=4,t.setup();case 4:s=r.sent,f=s.header,p=s.intervalTree,d=new c.Z({header:f}),null===(o=p[u])||void 0===o||o.search([i,a]).forEach((function(e){return n.next(new l.Z({variant:d.parseLine(e.line),parser:d,id:"".concat(t.id,"-").concat(e.id)}))})),n.complete(),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(0),n.error(r.t0);case 15:case"end":return r.stop()}}),r,null,[[0,12]])})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],r&&m(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),k}(n.BaseFeatureDataAdapter);x.capabilities=["getFeatures","getRefNames"];const O=x},15734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>w});var n=r(34213);function o(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"===t)return["insertion",t];if(""===t)return["deletion",t];if(""===t)return["inversion",t];if(""===t)return["translocation",t];if(t.includes("<"))return["sv",t];if(e.length===t.length)return e.split("").reverse().join("")===t?["inversion",f("inversion",e,t)]:["substitution",f("substitution",e,t)];if(e.length<=t.length){var r=t.length-e.length,o=r.toLocaleString("en-US");return["insertion",r>5?o+"bp INS":f("insertion",e,t)]}if(e.length>t.length){var i=e.length-t.length,a=i.toLocaleString("en-US");return["deletion",i>5?a+"bp DEL":f("deletion",e,t)]}return["indel",f("indel",e,t)]}(e,t),d=i(p,2);c=d[0],l=d[1]}c&&l&&(a.add(c),u.add(l))})),u.size>1){var c=o(u),l=new Set(c.map((function(e){var t=e.split("->");return t[1]?t[0]:e})));u=new Set(o(l).map((function(e){return e.trim()})).map((function(e){var t=c.map((function(e){return e.split("->").map((function(e){return e.trim()}))})).map((function(t){return t[1]&&t[0]===e?t[1]:""})).filter((function(e){return!!e}));return t.length?"".concat(e," -> ").concat(t.join(",")):e})))}return a.size?[o(a).join(","),o(u).join(",")]:[]}function s(e,t,r){if("string"==typeof t&&!t.startsWith("<"))return[];var n=c[t];if(!n&&r.getMetadata("ALT",t)&&(n="sequence_variant"),n)return[n,t];var o=t.split(":");return o.length>1?s(e,"<".concat(o.slice(0,-1).join(":"),">"),r):[]}function f(e,t,r){return"".concat(e," ").concat(t," -> ").concat(r)}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r"===e}));return{refName:a,start:s,end:(null==o?void 0:o.some((function(e){return e.includes("<")})))&&u.END&&!h?+u.END[0]:s+n.length,description:d,type:p,name:null==c?void 0:c.join(","),aliases:c&&c.length>1?e.ID.slice(1):void 0}}},{key:"toJSON",value:function(){return h(h(h({uniqueId:this._id},this.variant),this.data),{},{samples:this.variant.SAMPLES})}}])&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},90405:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(20410),o=r(76743),i=r(42847),a=r(63627),u=r(34213),c=r(15734);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,u,"next",e)}function u(e){d(i,n,o,a,u,"throw",e)}a(void 0)}))}}function y(e,t){for(var r=0;r0&&void 0!==o[0]?o[0]:{},e.next=3,this.configure();case 3:return r=e.sent,n=r.vcf,e.abrupt("return",n.getReferenceSequenceNames(t));case 6:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getHeader",value:(s=h(p().mark((function e(){var t,r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return t=e.sent,r=t.vcf,e.abrupt("return",r.getHeader());case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getMetadata",value:(n=h(p().mark((function e(){var t,r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return t=e.sent,r=t.parser,e.abrupt("return",r.getMetadata());case 5:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var n=h(p().mark((function n(o){var i,a,u,l,s,d;return p().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.refName,a=e.start,u=e.end,n.next=3,t.configure();case 3:return l=n.sent,s=l.vcf,d=l.parser,n.next=8,s.getLines(i,a,u,f({lineCallback:function(e,r){o.next(new c.Z({variant:d.parseLine(e),parser:d,id:"".concat(t.id,"-vcf-").concat(r)}))}},r));case 8:o.complete();case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],r&&y(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),O}(n.BaseFeatureDataAdapter)},49450:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var n=r(2744),o=r(20410),i=r(76743),a=r(35743),u=r(42847),c=r(93563);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function y(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,u,"next",e)}function u(e){y(i,n,o,a,u,"throw",e)}a(void 0)}))}}function m(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.refName,o=e.start,i=e.end,a=r.bpPerPx,c=void 0===a?0:a,l=r.signal,f=r.resolution,p=void 0===f?1:f,y=r.statusCallback,m=void 0===y?function(){}:y;return(0,u.ObservableCreate)(function(){var a=v(h().mark((function a(u){var l,f,y,v,b,g,w;return h().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return m("Downloading bigwig data"),l=t.getConf("source"),a.next=4,t.setup(r);case 4:return f=a.sent,y=f.bigwig,a.next=8,y.getFeatures(n,o,i,d(d({},r),{},{basesPerSpan:c/p}));case 8:v=a.sent,b=s(v),a.prev=10,w=h().mark((function t(){var r,o;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=g.value,l&&(r.source=l),o="".concat(l,":").concat(e.refName,":").concat(r.start,"-").concat(r.end),r.refName=n,r.uniqueId=o,u.next({get:function(e){return r[e]},id:function(){return o},toJSON:function(){return r}});case 6:case"end":return t.stop()}}),t)})),b.s();case 13:if((g=b.n()).done){a.next=17;break}return a.delegateYield(w(),"t0",15);case 15:a.next=13;break;case 17:a.next=22;break;case 19:a.prev=19,a.t1=a.catch(10),b.e(a.t1);case 22:return a.prev=22,b.f(),a.finish(22);case 25:u.complete();case 26:case"end":return a.stop()}}),a,null,[[10,19,22,25]])})));return function(e){return a.apply(this,arguments)}}(),l)}},{key:"getMultiRegionFeatureDensityStats",value:(o=v(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{featureDensity:0});case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"freeResources",value:function(){}}],r&&m(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),j}(o.BaseFeatureDataAdapter);S.capabilities=["hasResolution","hasLocalStats","hasGlobalStats"];const x=S},25628:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(63313),o=r.n(n),i=r(35127),a=r(97648),u=r(51537),c=r(84446),l=r(93720),s=r(87601),f=r.n(s),p=r(2415);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(63313),o=r.n(n),i=r(40828),a=r(35127),u=r(97648),c=r(27558),l=r(18264),s=r(84446),f=r(93720),p=r(60285),d=r(42687);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>p});var n=r(63313),o=r.n(n),i=r(40828),a=r(35743),u=r(2415),c=r(37997),l=r(4399);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const p=(0,i.observer)((function(e){var t=e.model,r=t.stats,n=t.height,i=t.needsScalebar,p=(0,a.getContainingView)(t).trackLabels,d=(0,a.getContainingTrack)(t),h="overlapping"===p?(0,a.measureText)((0,u.getConf)(d,"name"),12.8)+100:50;return o().createElement("div",null,o().createElement(c.qb,function(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{renderSvg:()=>f});var n=r(63313),o=r.n(n),i=r(35743),a=r(72161),u=r(4399);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:A(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var O=Object.getPrototypeOf,E=O&&O(O(I([])));E&&E!==r&&n.call(E,a)&&(x=E);var j=S.prototype=g.prototype=Object.create(x);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==c(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function s(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function f(e,t,r){return p.apply(this,arguments)}function p(){var e;return e=l().mark((function e(t,r,n){var c,s,f,p;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.when)((function(){return!!t.stats&&!!t.regionCannotBeRenderedText}));case 2:return c=t.needsScalebar,s=t.stats,f=(0,i.getContainingView)(t),p=f.offsetPx,e.t0=o(),e.t1=o().Fragment,e.t2=o(),e.t3={id:"snpcov"},e.next=10,n(r);case 10:return e.t4=e.sent,e.t5=e.t2.createElement.call(e.t2,"g",e.t3,e.t4),e.t6=c&&s?o().createElement("g",{transform:"translate(".concat(Math.max(-p,0),")")},o().createElement(u.Z,{model:t,orientation:"left"})):null,e.abrupt("return",e.t0.createElement.call(e.t0,e.t1,null,e.t5,e.t6));case 14:case"end":return e.stop()}}),e)})),p=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){s(i,n,o,a,u,"next",e)}function u(e){s(i,n,o,a,u,"throw",e)}a(void 0)}))},p.apply(this,arguments)}},34086:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>Q});var n=r(63313),o=r.n(n),i=r(35127),a=r(93720),u=r(84446),c=r(76835),l=r(35743),s=r(76990),f=r.n(s),p=r(82015),d=r(40076),h=r(82165),y=r(18567),v=r(74141),m=r(80464),b=r(40828),g=r(16848),w=r.n(g),S=r(89120);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function E(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(y,F)),m=Z((0,n.useState)("blue"),2),b=m[0],g=m[1],w=Z((0,n.useState)({idx:0,field:null}),2),S=w[0],x=w[1];return o().createElement("div",null,o().createElement(a.Z,{disabled:!d.length,onClick:function(e){return f(e.currentTarget)}},"Change color of selected items"),o().createElement(a.Z,{onClick:function(){return r((0,L.A1)(D(t),d))},disabled:!d.length},o().createElement(M.Z,null),i?"Move selected items up":null),o().createElement(a.Z,{onClick:function(){return r((0,L.vi)(D(t),d))},disabled:!d.length},o().createElement(R.Z,null),i?"Move selected items down":null),o().createElement(a.Z,{onClick:function(){return r((0,L.A1)(D(t),d,t.length))},disabled:!d.length},o().createElement(T.Z,null),i?"Move selected items to top":null),o().createElement(a.Z,{onClick:function(){return r((0,L.vi)(D(t),d,t.length))},disabled:!d.length},o().createElement(I.Z,null),i?"Move selected items to bottom":null),o().createElement(_.ColorPopover,{anchorEl:s,color:b,onChange:function(e){g(e),d.forEach((function(r){var n=t.find((function(e){return e.name===r}));n&&(n.color=e)})),r(D(t))},onClose:function(){return f(null)}}),o().createElement("div",{style:{height:400,width:"100%"}},o().createElement(A._$,{getRowId:function(e){return e.name},checkboxSelection:!0,disableRowSelectionOnClick:!0,onRowSelectionModelChange:function(e){return h(e)},rows:t,rowHeight:25,columnHeaderHeight:33,columns:[{field:"color",headerName:"Color",renderCell:function(e){var n=e.value,i=e.id;return o().createElement(C(),{color:n||"blue",onChange:function(e){var n=t.find((function(e){return e.name===i}));n&&(n.color=e),r(D(t))}})}},{field:"name",sortingOrder:[null],headerName:"Name",width:(0,l.measureGridWidth)(t.map((function(e){return e.name})))}].concat(D(Object.keys(v).map((function(e){return{field:e,sortingOrder:[null],renderCell:function(e){var t=e.value;return o().createElement("div",{className:u.cell},o().createElement(N.SanitizedHTML,{html:(0,l.getStr)(t)}))},width:(0,l.measureGridWidth)(t.map((function(t){return t[e]})))}})))),sortModel:[],onSortModelChange:function(e){var n=e[0],o=(S.idx+1)%2,i=(null==n?void 0:n.field)||S.field;x({idx:o,field:i}),r(i?D(t).sort((function(e,t){var r=(0,l.getStr)(e[i]),n=(0,l.getStr)(t[i]);return 1===o?r.localeCompare(n):n.localeCompare(r)})):t)}})))};function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||V(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e,t){if(e){if("string"==typeof e)return q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(e,t):void 0}}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r