UNPKG

auspice

Version:

Web app for visualizing pathogen evolution

1 lines 41.2 kB
(self.webpackChunkauspice=self.webpackChunkauspice||[]).push([[815],{73815:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>Q});var n=s(40590),o=s.n(n),i=s(82684),a=s(47329),r=s.n(a),l=s(4667),c=s(1326),h=s(26439),d=(s(2955),s(2739)),u=s(87899),f=s(63463),p=s(14179),m=s(89007),v=s(30600),y=s(59352),g=s(1608),x=s(67843),C=s(29530),b=s(17494),w=s.n(b),M=s(27878),_=s(70570),S=s(8515);function E(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,n)}return s}function z(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?E(Object(s),!0).forEach((function(e){k(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):E(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}function k(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function N(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var s=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=s){var n,o,i=[],a=!0,r=!1;try{for(s=s.call(t);!(a=(n=s.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){r=!0,o=t}finally{try{a||null==s.return||s.return()}finally{if(r)throw o}}return i}}(t,e)||O(t,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.")}()}function P(t,e){var s="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!s){if(Array.isArray(t)||(s=O(t))||e&&t&&"number"==typeof t.length){s&&(t=s);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},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,r=!1;return{s:function(){s=s.call(t)},n:function(){var t=s.next();return a=t.done,t},e:function(t){r=!0,i=t},f:function(){try{a||null==s.return||s.return()}finally{if(r)throw i}}}}function B(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(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.")}()}function O(t,e){if(t){if("string"==typeof t)return A(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?A(t,e):void 0}}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,n=new Array(e);s<e;s++)n[s]=t[s];return n}var Y=function(t,e,s){this.svg=(0,c.Z)(t),this.genomeMap=e,this.callbacks=s,this.okToDrawBars=!1};function j(t,e,s){return(e-5)/t.length>s?t:null}Y.prototype.render=function(t){this.props=t,this.selectedCds=t.selectedCds,this.selectedPositions=t.selectedPositions,this.aa="nuc"!==this.selectedCds,this.showCounts=t.showCounts,this.bars=t.bars,this._setSelectedNodes(),this.svg.selectAll("*").remove(),this._calcOffsets(t.width,t.height),this._createGroups(),this._setScales(t.maxYVal),this._setZoomBounds(),this._setZoomCoordinates(t.zoomMin,t.zoomMax),this._drawAxes(),this._setUpZoomBrush(),this._drawNavCds(),this._drawMainCds(),this.okToDrawBars=!0,this._drawBars()},Y.prototype.update=function(t){var e=this,s=t.selectedCds,n=void 0===s?void 0:s,o=t.selectedPositions,i=void 0===o?void 0:o,a=t.newBars,r=void 0===a?void 0:a,l=t.showCounts,c=void 0===l?void 0:l,h=t.zoomMax,d=void 0===h?void 0:h,u=t.zoomMin,f=void 0===u?void 0:u;n&&(this.selectedCds=n,this._setUpZoomBrushWrapping(),this.aa="nuc"!==this.selectedCds,this._setZoomBounds()),void 0!==c&&(this.showCounts=c),r||void 0!==i?(r&&(this.bars=r[0],this._updateOffsets(),this._updateMainScaleAndAxis(r[1]),this._drawNavCds()),void 0!==i&&(this.selectedPositions=i),(n||void 0!==i)&&this._setZoomCoordinates(f,d,!!n),this._groups.navBrush.call(this.brush.move,(function(){return e.zoomCoordinates.map(e.scales.xNav)})),void 0!==i&&(this._clearSelectedBars(),this._setSelectedNodes(),this._highlightSelectedBars())):void 0===f&&void 0===d||(this._setZoomCoordinates(f,d,!1),this._groups.navBrush.call(this.brush.move,(function(){return e.zoomCoordinates.map(e.scales.xNav)})))},Y.prototype._setZoomBounds=function(){if(this.aa){var t=this.selectedCds.segments.map((function(t){return t.rangeGenome})).flat();this.zoomBounds=[Math.min.apply(Math,B(t)),Math.max.apply(Math,B(t))]}else this.zoomBounds=B(this.genomeMap[0].range)},Y.prototype._setZoomCoordinates=function(t,e,s){if(s&&this.zoomCoordinates&&(this.zoomCoordinates=void 0),this.selectedCds===_.BJ){var n,o=this.scales.xNav.domain();if(null!==(n=this.selectedPositions)&&void 0!==n&&n.length){var i=Math.min.apply(Math,B(this.selectedPositions)),a=Math.max.apply(Math,B(this.selectedPositions));if(this.zoomCoordinates&&(this.zoomCoordinates[0]!==o[0]||this.zoomCoordinates[1]!==o[1])&&i>this.zoomCoordinates[0]&&a<this.zoomCoordinates[1])return;var r=Math.floor(.05*o[1]);r>1e3&&(r=1e3),this.zoomCoordinates=[i-r,a+r]}else this.zoomCoordinates=o;(t||e)&&(t&&(this.zoomCoordinates[0]=t),e&&(this.zoomCoordinates[1]=e),this.zoomCoordinates[0]>=this.zoomCoordinates[1]&&(t&&(this.zoomCoordinates=[t,o[1]]),e&&(this.zoomCoordinates=[o[0],e]))),this.zoomCoordinates[0]<o[0]&&(this.zoomCoordinates[0]=o[0]),this.zoomCoordinates[1]>o[1]&&(this.zoomCoordinates[1]=o[1])}else{var l=this.selectedCds.segments;this.selectedCds.isWrapping?("+"===this.selectedCds.strand?this.zoomCoordinates=[l[l.length-1].rangeGenome[1],l[0].rangeGenome[0]]:this.zoomCoordinates=[l[0].rangeGenome[1],l[l.length-1].rangeGenome[0]],t&&t<this.zoomCoordinates[0]&&(this.zoomCoordinates[0]=t),e&&e>this.zoomCoordinates[0]&&(this.zoomCoordinates[1]=e)):(this.zoomCoordinates=B(this.zoomBounds),t&&t>this.zoomCoordinates[0]&&t<this.zoomCoordinates[1]&&(this.zoomCoordinates[0]=t),e&&e>this.zoomCoordinates[0]&&e<this.zoomCoordinates[1]&&(this.zoomCoordinates[1]=e))}},Y.prototype._setSelectedNodes=function(){if(this.selectedNodes=[],this.selectedPositions.length&&this.bars)if(this.aa){var t,e=P(this.bars);try{for(e.s();!(t=e.n()).done;){var s,n=t.value,o=P(this.selectedPositions);try{for(o.s();!(s=o.n()).done;){var i=s.value;n.codon===i&&this.selectedNodes.push(n)}}catch(t){o.e(t)}finally{o.f()}}}catch(t){e.e(t)}finally{e.f()}}else{var a,r=P(this.bars);try{for(r.s();!(a=r.n()).done;){var l=a.value;-1!==this.selectedPositions.indexOf(l.x)&&this.selectedNodes.push(l)}}catch(t){r.e(t)}finally{r.f()}}},Y.prototype._drawMainCds=function(){var t=this;this._groups.mainCds.selectAll("*").remove();var e=N(this.scales.xMain.domain(),2),s=e[0],n=e[1];if(this.selectedCds!==_.BJ)return this._groups.mainCds.selectAll(".cds").data(this._cdsSegments({selected:!0})).enter().append("rect").attr("class","gene").attr("x",(function(e){return t.scales.xMain(Math.max(e.rangeLocal[0]-.5,s))})).attr("y",0).attr("width",(function(e){return t.scales.xMain(Math.min(e.rangeLocal[1]+.5,n))-t.scales.xMain(Math.max(e.rangeLocal[0]-.5,s))})).attr("height",this.offsets.mainCdsRectHeight).style("fill",this.selectedCds.color).style("stroke","#fff").style("stroke-width",2).style("opacity",1).on("mouseover",(function(e){t.callbacks.onHover({d3event:m.B,tooltip:t._cdsTooltip(e)})})).on("mouseout",(function(e){t.callbacks.onLeave(e)})),void this._groups.mainCds.append("text").attr("x",(function(){var e=t.scales.xMain(Math.max(1,s));return e+(t.scales.xMain(Math.min(t.selectedCds.length,n))-e)/2})).attr("y",1).attr("pointer-events","none").attr("text-anchor","middle").attr("dominant-baseline","hanging").style("fill","white").style("font-size","".concat(this.offsets.mainCdsRectHeight-2,"px")).text((function(){return t.selectedCds.name}));var o=this._cdsSegments({range:[s,n]}).map((function(e){var o=[t.scales.xMain(Math.max(e.rangeGenome[0]-.5,s)),t.scales.xMain(Math.min(e.rangeGenome[1]+.5,n))],i=(e.cds.stackPosition-1)*t.offsets.mainCdsJitter;return z({rangePx:o,yPx:"+"===e.cds.strand?t.offsets.mainCdsPositiveDelta-i-t.offsets.mainCdsRectHeight:t.offsets.mainCdsNegativeDelta+i},e)}));this._groups.mainCds.selectAll(".cds").data(o).enter().append("path").attr("class","gene").attr("d",(function(e){return function(t,e){var s=e.mainCdsRectHeight,n=Math.floor(t.rangePx[1]-t.rangePx[0]),o=Math.round(t.rangePx[0]);if(n<20)return"M ".concat(o,",").concat(t.yPx," h ").concat(n," v ").concat(s," h -").concat(n," Z");var i=Math.floor(Math.min(n/4,10));n-=i;var a=s/2;return"+"===t.cds.strand?"M ".concat(o,",").concat(t.yPx," h ").concat(n," l ").concat(i,",").concat(a," l -").concat(i,",").concat(a," h -").concat(n," Z"):(o=Math.round(t.rangePx[1]),"M ".concat(o,",").concat(t.yPx," h -").concat(n," l -").concat(i,",").concat(a," l ").concat(i,",").concat(a," h ").concat(n," Z"))}(e,t.offsets)})).style("fill",(function(t){return t.cds.color})).style("opacity",.7).on("mouseover",(function(e){t.callbacks.onHover({d3event:m.B,tooltip:t._cdsTooltip(e)})})).on("mouseout",this.callbacks.onLeave).on("click",this.callbacks.onCdsClick).style("cursor","pointer"),this._groups.mainCds.selectAll(".cdsText").data(o).enter().append("text").attr("x",(function(t){return t.rangePx[0]+.5*(t.rangePx[1]-t.rangePx[0])})).attr("y",(function(t){return t.yPx+1})).attr("pointer-events","none").attr("text-anchor","middle").attr("dominant-baseline","hanging").style("font-size","".concat(this.offsets.mainCdsRectHeight-2,"px")).style("fill","white").text((function(t){return j(t.cds.name,t.rangePx[1]-t.rangePx[0],10)}))},Y.prototype._drawNavCds=function(){var t=this;this._groups.navCds.selectAll("*").remove();var e=this._cdsSegments({}).map((function(e){return z({rangePx:e.rangeGenome.map(t.scales.xNav),yPx:"+"===e.cds.strand?t.offsets.navCdsPositiveStrandSpace-e.cds.stackPosition*t.offsets.navCdsRectHeight:t.offsets.navCdsNegativeY1Delta+(e.cds.stackPosition-1)*t.offsets.navCdsRectHeight},e)}));this._groups.navCds.selectAll(".cdsNav").data(e).enter().append("rect").attr("class","gene").attr("x",(function(t){return t.rangePx[0]})).attr("y",(function(t){return t.yPx})).attr("width",(function(t){return t.rangePx[1]-t.rangePx[0]})).attr("height",this.offsets.navCdsRectHeight).style("fill",(function(t){return t.cds.color})).style("fill-opacity",(function(e){return t.selectedCds===_.BJ||e.cds.name===t.selectedCds.name?1:.3})).style("stroke","#fff").style("stroke-width",1).on("mouseover",(function(e){t.callbacks.onHover({d3event:m.B,tooltip:t._cdsTooltip(e)})})).on("mouseout",(function(e){t.callbacks.onLeave(e)})).on("click",this.callbacks.onCdsClick).style("cursor","pointer"),this._groups.navCds.selectAll(".cdsNavText").data(e).enter().append("text").attr("x",(function(t){return t.rangePx[0]+.5*(t.rangePx[1]-t.rangePx[0])})).attr("y",(function(t){return t.yPx+2})).attr("pointer-events","none").attr("text-anchor","middle").attr("dominant-baseline","hanging").style("font-size","".concat(this.offsets.navCdsRectHeight-2,"px")).style("fill","#fff").text((function(t){return j(t.cds.name,t.rangePx[1]-t.rangePx[0],7.5)}))},Y.prototype._cdsSegments=function(t){var e=this,s=t.range,n=void 0===s?void 0:s,o=t.selected,i=void 0!==o&&o,a=[];return this.genomeMap[0].genes.forEach((function(t){t.cds.forEach((function(s){i&&s.name!==e.selectedCds.name||s.segments.forEach((function(e){if(!n||!(e.rangeGenome[1]<n[0]||e.rangeGenome[0]>n[1])){var o=z({},e);o.cds=s,o.gene=t,a.push(o)}}))}))})),a},Y.prototype._clearSelectedBars=function(){var t,e=P(this.selectedNodes);try{for(e.s();!(t=e.n()).done;){var s=t.value,n=this.aa?"#cds-".concat(this.selectedCds.name,"-").concat(s.codon):"#nt".concat(s.x);(0,c.Z)(n).style("fill",p.I6)}}catch(t){e.e(t)}finally{e.f()}this.selectedNodes=[]},Y.prototype._highlightSelectedBars=function(){var t,e=P(this.selectedNodes);try{for(e.s();!(t=e.n()).done;){var s=t.value,n=this.aa?"#cds-".concat(this.selectedCds.name,"-").concat(s.codon):"#nt".concat(s.x);(0,c.Z)(n).style("fill","red")}}catch(t){e.e(t)}finally{e.f()}},Y.prototype._drawLoadingState=function(){var t=this;this._groups.mainBars.append("rect").attr("class","loading").attr("x",0).attr("y",0).attr("width",(function(){return t.scales.xMain.range()[1]})).attr("height",(function(){return t.scales.y.range()[0]})).attr("fill-opacity",.1),this._groups.mainBars.append("text").attr("y",(function(){return t.scales.y.range()[0]/2})).attr("x",(function(){return t.scales.xMain.range()[1]/2})).attr("pointer-events","none").attr("text-anchor","middle").attr("dominant-baseline","middle").style("fill",p.I6).style("font-size","5rem").style("font-weight",200).text("data loading")},Y.prototype._drawBars=function(){var t=this;if(this.okToDrawBars){if(this._groups.mainBars.selectAll("*").remove(),!this.bars)return this._drawLoadingState();if(0!==this.bars.length){var e=this.scales.xMain.domain()[0],s=this.scales.xMain(e+1)-this.scales.xMain(e);this.aa&&(s*=3),(s*=.9)<1.5&&(s=1.5);var n=this.aa?function(e){return"cds-".concat(t.selectedCds.name,"-").concat(e.codon)}:function(t){return"nt"+t.x},o=s/2;this._groups.mainBars.selectAll(".bar").data(this.bars).enter().append("rect").attr("class","bar").attr("id",n).attr("x",(function(e){return t.aa?t.scales.xMain(3*(e.codon-1)+2)-o:t.scales.xMain(e.x)-o})).attr("y",(function(e){return t.scales.y(e.y)})).attr("width",s).attr("height",(function(e){return t.offsets.heightMainBars-t.scales.y(e.y)})).style("fill",p.I6).on("mouseover",(function(e){t.callbacks.onHover({d3event:m.B,tooltip:t.aa?t._mainTooltipAa(e):t._mainTooltipNuc(e)})})).on("mouseout",(function(e){t.callbacks.onLeave(e)})).on("click",(function(e){t.callbacks.onClick(e)})).style("cursor","pointer"),this._highlightSelectedBars()}else this._groups.mainBars.append("text").attr("x",(function(){return t.scales.xMain.range()[1]/2})).attr("y",(function(){return t.scales.y.range()[0]/2})).attr("pointer-events","none").attr("text-anchor","middle").attr("dominant-baseline","middle").style("fill",p.I6).style("font-size","3rem").style("font-weight",300).text(this.aa?"No mutations for ".concat(this.selectedCds.name):"No nucleotide mutations")}},Y.prototype._setScales=function(t){this.scales={};var e=this.genomeMap[0].range,s=this.selectedCds===_.BJ?e[1]:this.selectedCds.length,n=this.selectedCds===_.BJ?e[0]:0;this.scales.xMain=(0,v.Z)().domain([n,s]).range([0,this.offsets.widthNarrow]),this.scales.xNav=(0,v.Z)().domain(B(e)).range([0,this.offsets.width]),this.scales.y=(0,v.Z)().domain([0,t]).range([this.offsets.heightMainBars,0]),this.scales.xMainUpperLimit=s},Y.prototype._drawAxes=function(){var t=this;this.axes={},this.axes.y=(0,y.y4)(this.scales.y).ticks(4),this.axes.xMain=(0,y.LL)(this.scales.xMain).ticks(16).tickFormat((function(e){return t.aa?Math.ceil(e/3):e})),this.axes.xNav=(0,y.LL)(this.scales.xNav).ticks(20,",f"),this.scales.xNav.domain()[1]-this.scales.xNav.domain()[0]>1e6&&this.axes.xNav.tickFormat((0,g.WU)(".1e")),this._groups.mainXAxis.append("text").attr("class","axisLabel").attr("y",7).attr("x",-2).attr("pointer-events","none").attr("text-anchor","end").attr("dominant-baseline","hanging").style("fill",p.I6).style("font-size","12px").text("AA pos").style("visibility",this.aa?"visible":"hidden"),this._groups.mainYAxis.call(this.axes.y),this._groups.mainXAxis.call(this.axes.xMain),this._groups.navXAxis.call(this.axes.xNav)},Y.prototype._updateMainScaleAndAxis=function(t){var e=this.genomeMap[0].range,s=this.selectedCds===_.BJ?e[1]:this.selectedCds.length,n=this.selectedCds===_.BJ?e[0]:0;this.scales.xMain.domain()[1]!==s&&(this._groups.mainBars.attr("transform","translate("+this.offsets.x1Narrow+","+this.offsets.mainY1+")"),this._groups.mainCds.attr("transform","translate("+this.offsets.x1Narrow+","+this.offsets.mainCdsY1+")"),this._groups.mainXAxis.attr("transform","translate("+this.offsets.x1Narrow+","+this.offsets.mainAxisY1+")"),this._groups.mainClip.select("#cliprect").attr("width",this.offsets.widthNarrow).attr("height",this.offsets.heightMainBars),this.scales.xMain.domain([n,s]).range([0,this.offsets.widthNarrow]),this.scales.xMainUpperLimit=s,this._groups.mainXAxis.call(this.axes.xMain)),this._groups.mainXAxis.select(".axisLabel").style("visibility",this.aa?"visible":"hidden"),this.scales.y.domain([0,t]).range([this.offsets.heightMainBars,0]),this._groups.mainYAxis.call(this.axes.y)},Y.prototype._calcOffsets=function(t,e){var s=this.genomeMap[0].metadata,n=s.strandsObserved.has("+")?13*s.posStrandStackHeight:0,o=s.strandsObserved.has("-")?13*s.negStrandStackHeight:0,i=s.strandsObserved.has("+")?16+8*(s.posStrandStackHeight-1):0,a=s.strandsObserved.has("-")?16+8*(s.negStrandStackHeight-1):0;this.offsets={},this.offsets.tinySpace=2,this.offsets.brushHandleHeight=14,this.offsets.navCdsRectHeight=13,this.offsets.navAxisY1=e-0-this.offsets.brushHandleHeight-20-o,this.offsets.navCdsY1=this.offsets.navAxisY1-2-n,this.offsets.navCdsPositiveStrandSpace=n,this.offsets.navCdsNegativeY1Delta=this.offsets.navAxisY1+20-this.offsets.navCdsY1,this.offsets.brushY1=this.offsets.navCdsY1-2,this.offsets.brushHeight=this.offsets.navCdsNegativeY1Delta+o+4,this.offsets.mainAxisY1=this.offsets.brushY1-2-20,this.aa?this.offsets.mainCdsY1=this.offsets.mainAxisY1-2-16:this.offsets.mainCdsY1=this.offsets.mainAxisY1-2-a-2-i,this.offsets.mainCdsNegativeStrandSpace=a,this.offsets.mainCdsPositiveStrandSpace=i,this.offsets.mainCdsPositiveDelta=i,this.offsets.mainCdsNegativeDelta=i+2,this.offsets.mainCdsJitter=8,this.offsets.mainCdsRectHeight=16,this.offsets.mainY1=10,this.offsets.heightMainBars=this.offsets.mainCdsY1-this.offsets.mainY1-2,this.offsets.x1=30,this.offsets.width=t-this.offsets.x1-15,this.offsets.xMainInternalPad=20,this.aa?(this.offsets.x1Narrow=this.offsets.x1+this.offsets.xMainInternalPad,this.offsets.widthNarrow=this.offsets.width-2*this.offsets.xMainInternalPad):(this.offsets.x1Narrow=this.offsets.x1,this.offsets.widthNarrow=this.offsets.width)},Y.prototype._updateOffsets=function(){this.aa?(this.offsets.x1Narrow=this.offsets.x1+this.offsets.xMainInternalPad,this.offsets.widthNarrow=this.offsets.width-2*this.offsets.xMainInternalPad,this.offsets.mainCdsY1=this.offsets.mainAxisY1-this.offsets.tinySpace-this.offsets.mainCdsRectHeight):(this.offsets.x1Narrow=this.offsets.x1,this.offsets.widthNarrow=this.offsets.width,this.offsets.mainCdsY1=this.offsets.mainAxisY1-this.offsets.tinySpace-this.offsets.mainCdsNegativeStrandSpace-this.offsets.tinySpace-this.offsets.mainCdsPositiveStrandSpace),this.offsets.heightMainBars=this.offsets.mainCdsY1-this.offsets.mainY1-this.offsets.tinySpace},Y.prototype._setUpZoomBrush=function(){var t=this;this.brush=(0,C.Yu)().extent([[0,0],[this.offsets.width,this.offsets.brushHeight]]).on("brush",(function(){t._brushChanged()})).on("end",(function(){t._brushChanged(!0),t._dispatchZoomCoordinates()})),this._groups.navBrush.attr("class","brush").attr("stroke-width",0).call(this.brush).call(this.brush.move,(function(){return t.zoomCoordinates.map(t.scales.xNav)}));var e=this.offsets.brushHandleHeight-4;this.brushHandle=this._groups.navBrush.selectAll(".handle--custom").data([{type:"w"},{type:"e"}]).enter().append("path").attr("class","handle--custom").attr("stroke",p.I6).attr("stroke-width",2).attr("cursor",(function(e,s){return t.zoomCoordinates[s]===t.zoomBounds[s]?0===s?"e-resize":"w-resize":"ew-resize"})).attr("d","M0,0 -5,".concat(e," 5,").concat(e," Z")).attr("transform",(function(e){return"e"===e.type?"translate(".concat(t.scales.xNav(t.zoomCoordinates[1]),",").concat(t.offsets.brushHeight,")"):"translate(".concat(t.scales.xNav(t.zoomCoordinates[0]),",").concat(t.offsets.brushHeight,")")})),this._setUpZoomBrushWrapping()},Y.prototype._setUpZoomBrushWrapping=function(){var t,e=this;null===(t=this._navBrushWrappingSelection)||void 0===t||t.remove(),this._navBrushWrappingSelection=void 0,this._groups.navBrush.select(".selection").attr("fill-opacity",.3),this.selectedCds!==_.BJ&&!1!==this.selectedCds.isWrapping&&(this._navBrushWrappingSelection=this._groups.navBrushWrapping.selectAll(".selection-wrapping").data(this.zoomCoordinates).enter().append("rect").attr("class","selection-wrapping").attr("x",(function(t,s){return 0===s?0:e.scales.xNav(t)})).attr("y",0).attr("width",(function(t,s){return 0===s?e.scales.xNav(t):e.offsets.width-e.scales.xNav(t)})).attr("height",this.offsets.brushHeight).attr("fill","#777").attr("fill-opacity",.3),this._groups.navBrush.select(".selection").attr("fill-opacity",0))},Y.prototype._dispatchZoomCoordinates=function(){this.props.dispatch((0,M.Bm)(this.zoomCoordinates))},Y.prototype._brushChanged=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=(m.B.selection||this.scales.xNav.range()).map(this.scales.xNav.invert,this.scales.xNav);if(this.zoomCoordinates=s.map(Math.round),this.selectedCds===_.BJ)this.scales.xMain.domain(this.zoomCoordinates);else{var n=N((0,S.bM)(this.selectedCds,this.zoomCoordinates),2),o=n[0];n[1]?this.scales.xMain.domain(o):(this._setZoomCoordinates(),this._groups.navBrush.call(this.brush.move,(function(){return t.zoomCoordinates.map(t.scales.xNav)})))}this.axes.xMain=this.axes.xMain.scale(this.scales.xMain),this._groups.mainXAxis.call(this.axes.xMain),this._drawBars(),this._drawMainCds(),this.brushHandle&&(this.brushHandle.attr("display",null).attr("transform",(function(e,s){return"translate(".concat(t.scales.xNav(t.zoomCoordinates[s]),",").concat(t.offsets.brushHeight,")")})),e&&this._groups.navBrush.selectAll(".handle--custom").attr("cursor",(function(e,s){return t.zoomCoordinates[s]===t.zoomBounds[s]?0===s?"e-resize":"w-resize":"ew-resize"}))),this._navBrushWrappingSelection&&this._navBrushWrappingSelection.attr("x",(function(e,s){return 0===s?0:t.scales.xNav(t.zoomCoordinates[1])})).attr("width",(function(e,s){return 0===s?t.scales.xNav(t.zoomCoordinates[0]):t.offsets.width-t.scales.xNav(t.zoomCoordinates[1])}))},Y.prototype._setUpMousewheelZooming=function(){var t=this,e=[[this.offsets.x1Narrow,this.offsets.mainY1],[this.offsets.widthNarrow,this.offsets.heightMainBars+this.offsets.mainY1]],s=(0,x.sP)().translateExtent(e).extent(e).on("zoom",(function(){var e=m.B.transform,s=t.zoomCoordinates[1]-t.zoomCoordinates[0],n=(s-s/e.k)/2,o=[Math.max(t.zoomCoordinates[0]+n,t.scales.xNav(0)),Math.min(t.zoomCoordinates[1]-n,t.scales.xNav.domain()[1])];o[1]-o[0]<500&&e.k>1||(t.zoomCoordinates=o,e.rescaleX(t.scales.xMain),t._groups.navBrush.call(t.brush.move,(function(){return t.zoomCoordinates.map(t.scales.xNav)})))})),n=["option","shift"];w().bind(n,(function(){t._groups.keyPressOverlay=t.svg.append("rect").attr("class","overlay").attr("text","zoom").attr("transform","translate("+t.offsets.x1Narrow+","+t.offsets.mainY1+")").attr("width",t.offsets.widthNarrow).attr("height",t.offsets.navCdsY1-t.offsets.mainY1).call(s).on("wheel",(function(){m.B.preventDefault()}))}),"keydown"),w().bind(n,(function(){t._groups.keyPressOverlay&&t._groups.keyPressOverlay.remove()}),"keyup")},Y.prototype._createGroups=function(){this._groups={},this._groups.mainBars=this.svg.append("g").attr("id","mainBars").attr("clip-path","url(#clip)").attr("transform","translate("+this.offsets.x1Narrow+","+this.offsets.mainY1+")"),this._groups.navBrush=this.svg.append("g").attr("id","navBrush").attr("transform","translate("+this.offsets.x1+","+this.offsets.brushY1+")"),this._groups.navBrushWrapping=this.svg.append("g").attr("id","navBrushWrapping").attr("transform","translate("+this.offsets.x1+","+this.offsets.brushY1+")"),this._groups.navCds=this.svg.append("g").attr("id","navCds").attr("transform","translate("+this.offsets.x1+","+this.offsets.navCdsY1+")"),this._groups.mainCds=this.svg.append("g").attr("id","mainCds").attr("transform","translate("+this.offsets.x1Narrow+","+this.offsets.mainCdsY1+")"),this._groups.mainYAxis=this.svg.append("g").attr("id","entropyYAxis").attr("transform","translate("+this.offsets.x1+","+this.offsets.mainY1+")"),this._groups.mainXAxis=this.svg.append("g").attr("id","mainXAxis").attr("transform","translate("+this.offsets.x1Narrow+","+this.offsets.mainAxisY1+")"),this._groups.navXAxis=this.svg.append("g").attr("id","navXAxis").attr("transform","translate("+this.offsets.x1+","+this.offsets.navAxisY1+")"),this._groups.mainClip=this.svg.append("g").attr("id","mainClip"),this._groups.mainClip.append("clipPath").attr("class","clipPath").attr("id","clip").append("rect").attr("id","cliprect").attr("x",0).attr("y",0).attr("width",this.offsets.widthNarrow).attr("height",this.offsets.heightMainBars)},Y.prototype._mainTooltipAa=function(t){return function(e){var s=(0,S.ZR)(this.genomeMap,this.selectedCds.name);if(!s)return console.error("CDS ".concat(this.selectedCds.name," not found in genomeMap (i.e. JSON annotations)")),null;var n=(0,S.le)(s,t.codon),o=n.frame,a=n.nucCoordinates;return i.createElement("div",{className:"tooltip",style:p.fu.tooltip},i.createElement("div",null,e("Codon {{codon}} in protein {{protein}}",{codon:t.codon,protein:this.selectedCds.name})),i.createElement("p",null),i.createElement("div",null,e("Nuc positions {{positions}}",{positions:a.join(", ")})),i.createElement("p",null),i.createElement("div",null,"-"===s.strand?"Negative strand":"Positive strand".concat("+"!==s.strand?" (assumed)":""),", ".concat(o)),i.createElement("p",null),i.createElement("div",null,this.showCounts?"".concat(e("Num changes observed"),": ").concat(t.y):"".concat(e("Normalised Shannon entropy"),": ").concat(t.y)),i.createElement("div",{style:p.fu.comment},e("Click to color tree & map by this genotype"),i.createElement("br",null),e("Shift+click to add/remove positions")))}.bind(this)},Y.prototype._mainTooltipNuc=function(t){return function(e){var s,n=t.x,o=(0,S.Io)(this.genomeMap,n);return s=o?i.createElement("div",null,"Overlaps with ".concat(o.length," CDS segment").concat(o.length>1?"s":"",":"),i.createElement("p",null),i.createElement("table",{className:"entropy-table"},i.createElement("tbody",null,i.createElement("tr",{key:"header"},i.createElement("td",{style:{minWidth:"60px"}},"CDS"),i.createElement("td",null,"Nt Pos (in CDS)"),i.createElement("td",null,"AA Pos")),o.map((function(t){return i.createElement("tr",{key:t.cds.name+t.nucLocal},i.createElement("td",null,t.cds.name),i.createElement("td",null,t.nucLocal),i.createElement("td",null,t.aaLocal))}))))):i.createElement("div",null,e("No overlapping CDSs")),i.createElement("div",{className:"tooltip",style:p.fu.tooltip},i.createElement("div",null,e("Nucleotide {{nuc}}",{nuc:n})),i.createElement("p",null),s,i.createElement("p",null),i.createElement("div",null,this.showCounts?"".concat(e("Num changes observed"),": ").concat(t.y):"".concat(e("Normalised Shannon entropy"),": ").concat(t.y)),i.createElement("div",{style:p.fu.comment},e("Click to color tree & map by this genotype"),i.createElement("br",null),e("Shift+click to add/remove positions")))}.bind(this)},Y.prototype._cdsTooltip=function(t){return function(e){var s,n,o,a,r,l=t.cds.segments.length>1;return i.createElement("div",{className:"tooltip entropy",style:p.fu.tooltip},i.createElement("table",{className:"entropy-table"},i.createElement("tbody",null,t.cds.displayName&&i.createElement("tr",null,i.createElement("td",null,"Name"),i.createElement("td",null,t.cds.displayName)),i.createElement("tr",null,i.createElement("td",null,"CDS name"),i.createElement("td",null,t.cds.name)),t.cds.description&&i.createElement("tr",null,i.createElement("td",null,"Description"),i.createElement("td",null,t.cds.description)),t.cds.name!==t.gene.name&&i.createElement("tr",null,i.createElement("td",null,"Gene name"),i.createElement("td",null,t.gene.name)),i.createElement("tr",null,i.createElement("td",null,"CDS length"),i.createElement("td",null,"".concat(t.cds.length/3," amino acids"))),l?i.createElement(i.Fragment,null,i.createElement("tr",null,i.createElement("td",null,"CDS segment"),i.createElement("td",null,"".concat(t.segmentNumber,"/").concat(t.cds.segments.length))),i.createElement("tr",null,i.createElement("td",null,"Segment length"),i.createElement("td",null,(n=t.rangeLocal,o=n[1]-n[0]+1,a=o%3,r=String(Math.floor(o/3)),a&&(r+=1===a?" ⅓":" ⅔"),r+" amino acids"))),i.createElement("tr",null,i.createElement("td",null,"Segment coords"),i.createElement("td",null,t.rangeGenome.join(" - ")+" (genome coordinates)"))):i.createElement("tr",null,i.createElement("td",null,"CDS coords"),i.createElement("td",null,t.rangeGenome.join(" - ")+" (genome coordinates)")),i.createElement("tr",null,i.createElement("td",null,"Strand"),i.createElement("td",null,"+"===t.cds.strand?"Positive":"Negative")),i.createElement("tr",null,i.createElement("td",null,"Frame"),i.createElement("td",null,"".concat(t.frame," (").concat("+"===t.cds.strand?"F":"R").concat(t.frame,")"))),i.createElement("tr",null,i.createElement("td",{style:{minWidth:"100px"}},"Phase"),i.createElement("td",null,t.phase)))),(null===(s=this.selectedCds)||void 0===s?void 0:s.name)!==t.cds.name&&i.createElement("div",{style:p.fu.comment},e("Click to view this CDS in isolation")))}.bind(this)};const H=Y,D=function(t){var e=t.d3event,s=t.width,n=t.height,o=t.children;if(!e)return null;var a={container:{position:"absolute",maxWidth:500,padding:"10px",borderRadius:10,zIndex:1e3,pointerEvents:"none",fontFamily:p.fu.panel.fontFamily,fontSize:14,lineHeight:1,fontWeight:p.fu.panel.fontWeight,color:p.fu.panel.color,backgroundColor:p.fu.panel.backgroundColor,wordWrap:"break-word",wordBreak:"break-word"}},r={x:e.layerX,y:e.layerY};return r.x<.7*s?a.container.left=r.x:a.container.right=s-r.x,r.y<.5*n?a.container.top=r.y:a.container.bottom=n-r.y,i.createElement("div",{style:a.container},o)};var L,Z,T=s(15742),I=(s(91204),s(12225)),R=s(56113);function W(t){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(t)}function J(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,n)}return s}function G(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?J(Object(s),!0).forEach((function(e){$(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):J(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}function U(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var s=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=s){var n,o,i=[],a=!0,r=!1;try{for(s=s.call(t);!(a=(n=s.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){r=!0,o=t}finally{try{a||null==s.return||s.return()}finally{if(r)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return X(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?X(t,e):void 0}}(t,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.")}()}function X(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,n=new Array(e);s<e;s++)n[s]=t[s];return n}function q(t,e){for(var s=0;s<e.length;s++){var n=e[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function F(t,e){return F=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},F(t,e)}function V(t){return V=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},V(t)}function $(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}s(61812);var K=(0,l.$j)((function(t){return{selectedCds:t.entropy.selectedCds,selectedPositions:t.entropy.selectedPositions,bars:t.entropy.bars,genomeMap:t.entropy.genomeMap,maxYVal:t.entropy.maxYVal,showCounts:t.entropy.showCounts,loaded:t.entropy.loaded,onScreen:t.entropy.onScreen,colorBy:t.controls.colorBy,zoomMin:t.controls.zoomMin,zoomMax:t.controls.zoomMax,defaultColorBy:t.controls.defaults.colorBy,panelLayout:t.controls.panelLayout,narrativeMode:t.narrative.display,showOnlyPanels:t.controls.showOnlyPanels}}))((Z=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&F(t,e)}(l,t);var e,s,n,a,r=(n=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(t){return!1}}(),function(){var t,e=V(n);if(a){var s=V(this).constructor;t=Reflect.construct(e,arguments,s)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===W(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=r.call(this,t)).state={hovered:!1,chart:!1},e}return e=l,s=[{key:"onHover",value:function(t){this.setState({hovered:t})}},{key:"onLeave",value:function(){this.setState({hovered:!1})}},{key:"onClick",value:function(t){if(!this.props.narrativeMode){var e=!!window.event.shiftKey,s=U(void 0===t.codon?[_.BJ,t.x]:[this.props.selectedCds.name,t.codon],2),n=s[0],o=s[1],i=e?(0,I.sI)({currentColorBy:this.props.colorBy,gene:n,position:o}):(0,I.bP)({gene:n,positions:[o]});this.props.dispatch((0,f.j)(i)),this.setState({hovered:!1})}}},{key:"onCdsClick",value:function(t){this.props.dispatch((0,M.J8)((0,S.ZR)(this.props.genomeMap,t.cds.name))),this.setState({hovered:!1})}},{key:"resetLayout",value:function(t){var e=this;if(this.props.narrativeMode||!this.state.chart)return null;var s=this.props.selectedCds===_.BJ,n=this.props.genomeMap[0].proteinOnly&&1===this.props.genomeMap[0].genes.length;return i.createElement("div",{style:G(G({},p.ug),t.resetLayout)},i.createElement("button",{key:1,style:p.fp,onClick:function(){s||n?e.state.chart.update({zoomMin:e.state.chart.zoomBounds[0],zoomMax:e.state.chart.zoomBounds[1]}):e.props.dispatch((0,M.J8)(_.BJ))}},i.createElement("span",{style:t.switchTitle}," ",this.props.t("Reset Layout")," ")))}},{key:"entropyCountSwitch",value:function(t){var e=this,s=this.props.t;return this.props.narrativeMode?null:i.createElement("div",{style:G(G({},p.ug),t.entropyCountSwitch)},i.createElement("button",{key:1,style:this.props.showCounts?p.fp:p.cq,onClick:function(){return e.props.dispatch((0,M.wC)(!1))}},i.createElement("span",{style:t.switchTitle}," ",s("entropy")," ")),i.createElement("button",{key:2,style:this.props.showCounts?p.cq:p.fp,onClick:function(){return e.props.dispatch((0,M.wC)(!0))}},i.createElement("span",{style:t.switchTitle}," ",s("events")," ")))}},{key:"setUp",value:function(t){var e=new H(this.d3entropy,t.genomeMap,{onHover:this.onHover.bind(this),onLeave:this.onLeave.bind(this),onClick:this.onClick.bind(this),onCdsClick:this.onCdsClick.bind(this)});e.render(t),t.narrativeMode&&(0,c.Z)(this.d3entropy).selectAll(".handle--custom").style("visibility","hidden"),this.setState({chart:e})}},{key:"visibilityOnScreenChange",value:function(t){if(1!==t.length)return console.error("Unexpected IntersectionObserver callback entries of length",t.length);var e=t[0].isIntersecting;return e!==this.props.onScreen?!e||this.props.bars?this.props.dispatch({type:T.M0,onScreen:e}):void this.props.dispatch((function(t,s){var n=s(),o=n.entropy,i=n.tree,a=U((0,S.UB)(i.nodes,i.visibility,o.selectedCds,o.showCounts),2),r=a[0],l=a[1];t({type:T.M0,onScreen:e,entropyData:r,entropyMaxYVal:l})})):void 0}},{key:"componentDidMount",value:function(){this.props.loaded&&(this.setUp(this.props),new IntersectionObserver(this.visibilityOnScreenChange.bind(this),{threshold:0}).observe(this.d3entropy))}},{key:"UNSAFE_componentWillReceiveProps",value:function(t){if(t.loaded||this.setState({chart:!1}),this.state.chart){if(this.props.width!==t.width||this.props.height!==t.height)this.state.chart.render(t);else{var e={};this.props.zoomMax===t.zoomMax&&this.props.zoomMin===t.zoomMin||(e.zoomMax=t.zoomMax,e.zoomMin=t.zoomMin),this.props.bars!==t.bars&&(e.newBars=[t.bars,t.maxYVal]),this.props.selectedCds!==t.selectedCds&&(e.selectedCds=t.selectedCds),this.props.showCounts!==t.showCounts&&(e.showCounts=t.showCounts),o()(this.props.selectedPositions,t.selectedPositions)||(e.selectedPositions=t.selectedPositions),Object.keys(e).length&&this.state.chart.update(e)}this.props.narrativeMode!==t.narrativeMode&&(t.narrativeMode?(0,c.Z)(this.d3entropy).selectAll(".handle--custom").style("visibility","hidden"):(0,c.Z)(this.d3entropy).selectAll(".handle--custom").style("visibility","visible"))}else t.loaded&&this.setUp(t)}},{key:"title",value:function(){return this.props.width<500?"Diversity":this.props.selectedCds===_.BJ?"Nucleotide diversity of genome":"Amino acid diversity of CDS ".concat(this.props.selectedCds.name)}},{key:"render",value:function(){var t,e=this,s={switchContainer:{position:"absolute",marginTop:-5,paddingLeft:(t=this.props.width)-100},switchContainerWide:{position:"absolute",marginTop:-25,paddingLeft:t-185},switchTitle:{margin:5,position:"relative",top:-1},resetLayout:{position:"absolute",right:190,top:0,zIndex:100},entropyCountSwitch:{position:"absolute",right:50,top:0,zIndex:100},helpIcon:{position:"absolute",right:25,top:3,fontSize:"16px",cursor:"help",color:"#888"}};return i.createElement(u.Z,{infocard:this.props.showOnlyPanels,title:this.title()},i.createElement(D,{d3event:this.state.hovered.d3event,width:this.props.width,height:this.props.height},this.state.hovered?this.state.hovered.tooltip(this.props.t):null),i.createElement("svg",{id:"d3entropyParent",style:{pointerEvents:"auto"},width:this.props.width,height:this.props.height},i.createElement("g",null,i.createElement("g",null,i.createElement("g",null,i.createElement("g",null,i.createElement("g",{ref:function(t){e.d3entropy=t},id:"d3entropy"})))))),this.resetLayout(s),this.entropyCountSwitch(s),i.createElement("span",{style:s.helpIcon,"data-tip":!0,"data-for":"entropyHelp"},i.createElement(d.DAO,null)),i.createElement(R.mi,{place:"left",type:"dark",effect:"solid",id:"entropyHelp",style:{maxWidth:"50vh"}},i.createElement("div",null,"This panel displays the observed diversity across the current genome or a selected CDS"," (currently you are viewing ".concat(this.props.selectedCds===_.BJ?"the genome":"CDS ".concat(this.props.selectedCds.name),"). "),i.createElement("p",null),"The lower axis shows the genome with +ve strand CDSs above and -ve strand CDSs below and the grey overlay allows zooming in to a region. The upper axis shows either the zoomed in region of the genome or a selected CDS; in the latter case the coordinates represent amino acids.",i.createElement("p",null),"Clicking on a CDS will select it and show it on the upper axis.",' Clicking "Reset Layout" will always return you to viewing the entire genome.')))}},{key:"componentWillUnmount",value:function(){}}],s&&q(e.prototype,s),l}(i.Component),$(Z,"propTypes",{dispatch:r().func.isRequired,loaded:r().bool.isRequired,colorBy:r().string.isRequired,defaultColorBy:r().string.isRequired,selectedCds:r().any.isRequired,selectedPositions:r().array.isRequired}),L=Z))||L;const Q=(0,h.Z)()(K)},63664:(t,e,s)=>{(e=s(55788)(!1)).push([t.id,'\n/* Variables - keep in sync with globalStyles.js*/\n:root {\n --darkGrey: #333;\n --medGrey: #888;\n}\n\n/* Normally elements with .overlay are children of the .brush, however\nthe overlay added on key-presses is is not a child of .brush */\n#d3entropy .overlay {\n fill: none;\n pointer-events: all;\n}\n\n#d3entropy .niceText {\n font-family: "Lato", "Helvetica Neue", "Helvetica", "sans-serif";\n font-size: 14px;\n font-style: italic;\n color: var(--medGrey);\n}\n\n.brush .selection {\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n#d3entropy .cdsText {\n pointer-events: none;\n}\n#d3entropy .cds {\n cursor: pointer;\n}\n\ntable.entropy-table {\n font-weight: 300;\n}\n\ntable.entropy-table td {\n padding-bottom: 3px;\n padding-right: 5px;\n}',""]),t.exports=e},61812:(t,e,s)=>{var n=s(63664);"string"==typeof n&&(n=[[t.id,n,""]]),s(14246)(n,{}),n.locals&&(t.exports=n.locals)}}]);