"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[5413],{5413:function(e,n,t){t.r(n);var r=t(33028),o=(t(30969),t(57211)),i=t(90550),a=t(74409),l=t(37574),s=(0,i.observer)((function(e){var n=e.model;return(0,l.jsxs)("div",{children:[(0,l.jsx)(o.qb,(0,r.Z)({},e)),(0,l.jsx)(a.Z,{model:n})]})}));n.default=s},74409:function(e,n,t){t.d(n,{Z:function(){return x}});var r=t(33028),o=t(68079),i=t(30969),a=t(81073),l=t(90550),s=t(70765),c=t(37574),u=function(e){var n=e.color,t=void 0===n?"rgb(255,255,255,0.8)":n;return(0,c.jsx)("rect",(0,r.Z)((0,r.Z)({},e),{},{fill:t}))},h=(0,l.observer)((function(e){var n=e.model,t=e.rowHeight,r=e.labelWidth,o=e.exportSVG,a=n.needsCustomLegend,l=n.needsScalebar,s=n.needsFullHeightScalebar,h=n.rowHeightTooSmallForScalebar,d=n.renderColorBoxes,f=n.sources,g=Math.min(t,12),x=t>11,m=d?15:0,v=r+m+5,j=(o?10:0)||(l&&!h?50:0);return f?(0,c.jsxs)(c.Fragment,{children:[s?(0,c.jsx)(u,{y:0,x:j,width:v,height:(f.length+.25)*t}):null,f.map((function(e,n){var r=Math.min(20,t);return(0,c.jsxs)(i.Fragment,{children:[s?null:(0,c.jsx)(u,{y:n*t+1,x:j,width:v,height:r}),e.color?(0,c.jsx)(u,{y:n*t+1,x:j,width:m,height:a?t:r,color:e.color}):null,x?(0,c.jsx)("text",{y:n*t+13,x:j+m+2,fontSize:g,children:e.name}):null]},"".concat(e.name,"-").concat(n))}))]}):null})),d=(0,l.observer)((function(e){var n=e.model,t=n.ticks,r=n.scaleType,o=(0,a.getContainingView)(n).width,i="[".concat(null===t||void 0===t?void 0:t.values[0],"-").concat(null===t||void 0===t?void 0:t.values[1],"]")+("log"===r?" (log scale)":""),l=(0,a.measureText)(i,14),s=o-l-25;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,{y:0,x:s,width:l+6,height:16}),(0,c.jsx)("text",{y:13,x:s,children:i})]})})),f=t(29477),g=(0,l.observer)((function(e){var n=e.children,t=e.model;if(e.exportSVG)return(0,c.jsx)(c.Fragment,{children:n});var r=t.height;return(0,c.jsx)("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:r,width:(0,a.getContainingView)(t).width},children:n})})),x=(0,l.observer)((function(e){var n=e.model,t=e.orientation,i=e.exportSVG,l=n.stats,u=n.needsCustomLegend,x=n.needsFullHeightScalebar,m=n.rowHeightTooSmallForScalebar,v=n.rowHeight,j=n.sources,p=n.ticks,w=Math.min(v,12),b=v>11,y=(0,a.getContainingView)(n).width;if(!(l&&j))return null;var S=Math.max.apply(Math,(0,o.Z)(j.map((function(e){return(0,a.measureText)(e.name,w)})).map((function(e){return b?e:20}))||[0]));return(0,c.jsx)(g,(0,r.Z)((0,r.Z)({},e),{},{children:x?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("g",{transform:"translate(".concat(i?0:(0,f.os)(n),",0)"),children:(0,c.jsx)(s.Z,{model:n,orientation:t})}),(0,c.jsx)("g",{transform:"translate(".concat(y-S-100,",0)"),children:(0,c.jsx)(h,{exportSVG:i,model:n,rowHeight:12,labelWidth:S})})]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(h,{exportSVG:i,model:n,rowHeight:n.rowHeight,labelWidth:S}),m||u?(0,c.jsx)(d,(0,r.Z)({},e)):j.map((function(e,r){return(0,c.jsx)("g",{transform:"translate(0 ".concat(v*r,")"),children:(0,c.jsx)(s.Z,{model:n,orientation:t})},"".concat(JSON.stringify(p),"-").concat(r))}))]})}))}))},29477:function(e,n,t){t.d(n,{A1:function(){return a},os:function(){return c},vi:function(){return l}});var r=t(41361),o=t(81073),i=t(9077);function a(e,n){var t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=n.map((function(n){return e.findIndex((function(e){return e.name===n}))})).sort((function(e,n){return e-n})),a=0,l=(0,r.Z)(i);try{for(l.s();!(t=l.n()).done;){var s=t.value,c=Math.max(a,s-o);c>=a&&e.splice(c,0,e.splice(s,1)[0]),a+=1}}catch(u){l.e(u)}finally{l.f()}return e}function l(e,n){var t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=n.map((function(n){return e.findIndex((function(e){return e.name===n}))})).sort((function(e,n){return n-e})),a=e.length-1,l=(0,r.Z)(i);try{for(l.s();!(t=l.n()).done;){var s=t.value,c=Math.min(a,s+o);c<=a&&e.splice(c,0,e.splice(s,1)[0]),a-=1}}catch(u){l.e(u)}finally{l.f()}return e}var s=12.8;function c(e){var n=e.prefersOffset,t=(0,o.getContainingView)(e).trackLabels,r=(0,o.getContainingTrack)(e),a=(0,i.getConf)(r,"name");return"overlapping"!==t||n?10:(0,o.measureText)(a,s)+100}}}]);
//# sourceMappingURL=5413.dcfb0444.chunk.js.map