"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8526],{8526:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var o=n(71328),r=n(68446),s=n(40474),l=n(69500);const i=(0,r.observer)((function(e){const{model:t}=e;return(0,l.jsxs)("div",{children:[(0,l.jsx)(o.GQ,{...e}),(0,l.jsx)(s.A,{model:t})]})}))},40474:(e,t,n)=>{n.d(t,{A:()=>m});var o=n(99546),r=n(68446),s=n(69500);const l=e=>{const{color:t="rgb(255,255,255,0.8)"}=e;return(0,s.jsx)("rect",{...e,...(0,o.getFillProps)(t)})},i=function({source:e,idx:t,rowHeight:n,labelWidth:o,model:r,exportSVG:i}){const a=Math.min(20,n),{needsCustomLegend:c,needsScalebar:d,needsFullHeightScalebar:h,rowHeightTooSmallForScalebar:x,renderColorBoxes:g}=r,u=Math.min(n,12),m=n>11,b=g?15:0,j=o+b+5,p=(i?10:0)||(d&&!x?50:0);return(0,s.jsxs)(s.Fragment,{children:[h?null:(0,s.jsx)(l,{y:t*n+1,x:p,width:j,height:a}),e.color?(0,s.jsx)(l,{y:t*n+1,x:p,width:b,height:c?n:a,color:e.color}):null,m?(0,s.jsx)("text",{y:t*n+13,x:p+b+2,fontSize:u,children:e.name}):null]})},a=(0,r.observer)((function({model:e,rowHeight:t,exportSVG:n}){const{needsScalebar:o,needsFullHeightScalebar:r,rowHeightTooSmallForScalebar:a,renderColorBoxes:c,sources:d,labelWidth:h}=e,x=h+(c?15:0)+5,g=(n?10:0)||(o&&!a?50:0);return d?(0,s.jsxs)(s.Fragment,{children:[r?(0,s.jsx)(l,{y:0,x:g,width:x,height:(d.length+.25)*t}):null,d.map(((o,r)=>(0,s.jsx)(i,{source:o,idx:r,model:e,rowHeight:t,exportSVG:n,labelWidth:h},`${o.name}-${r}`)))]}):null}));var c=n(58474),d=n(90461);const h=(0,r.observer)((function({model:e,orientation:t,exportSVG:n}){const{labelWidth:r}=e,{width:l}=(0,o.getContainingView)(e);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("g",{transform:`translate(${n?0:(0,c.A3)(e)},0)`,children:(0,s.jsx)(d.A,{model:e,orientation:t})}),(0,s.jsx)("g",{transform:`translate(${l-r-100},0)`,children:(0,s.jsx)(a,{exportSVG:n,model:e,rowHeight:12})})]})})),x=(0,r.observer)((({model:e})=>{const{ticks:t,scaleType:n}=e,{width:r}=(0,o.getContainingView)(e),i=`[${t?.values[0]}-${t?.values[1]}]${"log"===n?" (log scale)":""}`,a=(0,o.measureText)(i,14),c=r-a-25;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l,{y:0,x:c,width:a+6,height:16}),(0,s.jsx)("text",{y:13,x:c,children:i})]})})),g=(0,r.observer)((function({model:e,orientation:t,exportSVG:n}){const{sources:o,rowHeight:r,rowHeightTooSmallForScalebar:l,needsCustomLegend:i,ticks:c}=e;return o?.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{exportSVG:n,model:e,rowHeight:e.rowHeight}),l||i?(0,s.jsx)(x,{model:e}):o.map(((n,o)=>(0,s.jsx)("g",{transform:`translate(0 ${r*o})`,children:(0,s.jsx)(d.A,{model:e,orientation:t})},`${JSON.stringify(c)}-${o}`)))]}):null})),u=(0,r.observer)((function({children:e,model:t,exportSVG:n}){const{height:r}=t;return n?e:(0,s.jsx)("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:r,width:(0,o.getContainingView)(t).width},children:e})})),m=(0,r.observer)((function(e){const{model:t,orientation:n,exportSVG:o}=e,{stats:r,needsFullHeightScalebar:l,sources:i}=t;return r&&i?(0,s.jsx)(u,{...e,children:l?(0,s.jsx)(h,{model:t,orientation:n,exportSVG:o}):(0,s.jsx)(g,{model:t,orientation:n,exportSVG:o})}):null}))},58474:(e,t,n)=>{n.d(t,{A3:()=>a,BO:()=>s,oJ:()=>l});var o=n(68584),r=n(99546);function s(e,t,n=1){const o=t.map((t=>e.findIndex((e=>e.name===t)))).sort(((e,t)=>e-t));let r=0;for(const t of o){const o=Math.max(r,t-n);o>=r&&e.splice(o,0,e.splice(t,1)[0]),r+=1}return e}function l(e,t,n=1){const o=t.map((t=>e.findIndex((e=>e.name===t)))).sort(((e,t)=>t-e));let r=e.length-1;for(const t of o){const o=Math.min(r,t+n);o<=r&&e.splice(o,0,e.splice(t,1)[0]),r-=1}return e}const i=12.8;function a(e){const{prefersOffset:t}=e,{trackLabels:n}=(0,r.getContainingView)(e),s=(0,r.getContainingTrack)(e),l=(0,o.getConf)(s,"name");return"overlapping"!==n||t?10:(0,r.measureText)(l,i)+100}}}]);
//# sourceMappingURL=8526.f7f261d8.chunk.js.map