"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8880],{26842:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(7552),a=n(99546),o=n(68446),l=n(90461);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}const s=e=>{const{color:t="rgb(255,255,255,0.8)"}=e;return r.createElement("rect",i({},e,{fill:t}))},c=(0,o.observer)((function({model:e,rowHeight:t,labelWidth:n,exportSVG:a}){const{needsCustomLegend:o,needsScalebar:l,needsFullHeightScalebar:i,rowHeightTooSmallForScalebar:c,renderColorBoxes:m,sources:g}=e,h=Math.min(t,12),u=t>11,d=m?15:0,f=n+d+5,p=(a?10:0)||(l&&!c?50:0);return g?r.createElement(r.Fragment,null,i?r.createElement(s,{y:0,x:p,width:f,height:(g.length+.25)*t}):null,g.map(((e,n)=>{const a=Math.min(20,t);return r.createElement(r.Fragment,{key:`${e.name}-${n}`},i?null:r.createElement(s,{y:n*t+1,x:p,width:f,height:a}),e.color?r.createElement(s,{y:n*t+1,x:p,width:d,height:o?t:a,color:e.color}):null,u?r.createElement("text",{y:n*t+13,x:p+d+2,fontSize:h},e.name):null)}))):null})),m=(0,o.observer)((({model:e})=>{const{ticks:t,scaleType:n}=e,{width:o}=(0,a.getContainingView)(e),l=`[${t?.values[0]}-${t?.values[1]}]`+("log"===n?" (log scale)":""),i=(0,a.measureText)(l,14),c=o-i-25;return r.createElement(r.Fragment,null,r.createElement(s,{y:0,x:c,width:i+6,height:16}),r.createElement("text",{y:13,x:c},l))}));var g=n(58474);const h=(0,o.observer)((function({children:e,model:t,exportSVG:n}){const{height:o}=t;return n?e:r.createElement("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:o,width:(0,a.getContainingView)(t).width}},e)})),u=(0,o.observer)((function(e){const{model:t,orientation:n,exportSVG:o}=e,{stats:i,needsCustomLegend:s,needsFullHeightScalebar:u,rowHeightTooSmallForScalebar:d,rowHeight:f,sources:p,ticks:w}=t,b=Math.min(f,12),E=f>11,{width:x}=(0,a.getContainingView)(t);if(!i||!p)return null;const v=Math.max(...p.map((e=>(0,a.measureText)(e.name,b))).map((e=>E?e:20))||[0]);return r.createElement(h,e,u?r.createElement(r.Fragment,null,r.createElement("g",{transform:`translate(${o?0:(0,g.A3)(t)},0)`},r.createElement(l.A,{model:t,orientation:n})),r.createElement("g",{transform:`translate(${x-v-100},0)`},r.createElement(c,{exportSVG:o,model:t,rowHeight:12,labelWidth:v}))):r.createElement(r.Fragment,null,r.createElement(c,{exportSVG:o,model:t,rowHeight:t.rowHeight,labelWidth:v}),d||s?r.createElement(m,e):p.map(((e,a)=>r.createElement("g",{transform:`translate(0 ${f*a})`,key:`${JSON.stringify(w)}-${a}`},r.createElement(l.A,{model:t,orientation:n}))))))}))},58474:(e,t,n)=>{n.d(t,{A3:()=>s,BO:()=>o,oJ:()=>l});var r=n(99546),a=n(68584);function o(e,t,n=1){const r=t.map((t=>e.findIndex((e=>e.name===t)))).sort(((e,t)=>e-t));let a=0;for(const t of r){const r=Math.max(a,t-n);r>=a&&e.splice(r,0,e.splice(t,1)[0]),a+=1}return e}function l(e,t,n=1){const r=t.map((t=>e.findIndex((e=>e.name===t)))).sort(((e,t)=>t-e));let a=e.length-1;for(const t of r){const r=Math.min(a,t+n);r<=a&&e.splice(r,0,e.splice(t,1)[0]),a-=1}return e}const i=12.8;function s(e){const{prefersOffset:t}=e,{trackLabels:n}=(0,r.getContainingView)(e),o=(0,r.getContainingTrack)(e),l=(0,a.getConf)(o,"name");return"overlapping"!==n||t?10:(0,r.measureText)(l,i)+100}},28880:(e,t,n)=>{n.d(t,{renderSvg:()=>i});var r=n(7552),a=n(99546),o=n(42489),l=n(26842);async function i(e,t,n){await(0,o.when)((()=>!!e.stats&&!!e.regionCannotBeRenderedText));const{offsetPx:i}=(0,a.getContainingView)(e);return r.createElement(r.Fragment,null,r.createElement("g",{id:"snpcov"},await n(t)),r.createElement("g",{transform:`translate(${Math.max(-i,0)})`},r.createElement(l.A,{model:e,orientation:"left",exportSVG:!0})))}}}]);
//# sourceMappingURL=8880.9335e37c.chunk.js.map